summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 05:47:37 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 05:47:37 +0000
commit00e2eb4fd0266c5be01e3a527a66aaad5ab4b634 (patch)
treea6a58bd544eb0b76b9d3acc678ea88791acca045
parentInitial commit. (diff)
downloadlibixion-upstream.tar.xz
libixion-upstream.zip
Adding upstream version 0.19.0.upstream/0.19.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
-rw-r--r--AUTHORS11
-rw-r--r--ChangeLog13828
-rw-r--r--LICENSE373
-rw-r--r--Makefile.am185
-rw-r--r--Makefile.in1110
-rw-r--r--README.md66
-rw-r--r--aclocal.m41793
-rwxr-xr-xautogen.sh16
-rw-r--r--bin/env.sh.in2
-rwxr-xr-xbin/gen-gfm-release-table.sh30
-rwxr-xr-xbin/gen-spirv-shader-arrays.py87
-rwxr-xr-xbin/run-python-test-osx.sh36
-rwxr-xr-xbin/run-python.sh51
-rwxr-xr-xcompile348
-rwxr-xr-xconfig.guess1754
-rw-r--r--config.h.in105
-rwxr-xr-xconfig.sub1890
-rwxr-xr-xconfigure24120
-rw-r--r--configure.ac223
-rwxr-xr-xdepcomp791
-rw-r--r--doc/conf.py271
-rw-r--r--doc/cpp/data_store/cell_access.rst79
-rw-r--r--doc/cpp/data_store/dirty_cell_tracker.rst8
-rw-r--r--doc/cpp/data_store/document.rst18
-rw-r--r--doc/cpp/data_store/index.rst13
-rw-r--r--doc/cpp/data_store/model_context.rst24
-rw-r--r--doc/cpp/data_store/types.rst89
-rw-r--r--doc/cpp/formula/formula_cell.rst10
-rw-r--r--doc/cpp/formula/formula_engine.rst19
-rw-r--r--doc/cpp/formula/formula_name_resolver.rst10
-rw-r--r--doc/cpp/formula/formula_tokens.rst19
-rw-r--r--doc/cpp/formula/index.rst12
-rw-r--r--doc/cpp/formula/types.rst14
-rw-r--r--doc/cpp/index.rst16
-rw-r--r--doc/cpp/interface/index.rst10
-rw-r--r--doc/cpp/quickstart/index.rst13
-rw-r--r--doc/cpp/quickstart/using_document.rst143
-rw-r--r--doc/cpp/quickstart/using_model_context.rst318
-rw-r--r--doc/doxygen.conf2276
-rw-r--r--doc/environment.yml8
-rw-r--r--doc/index.rst29
-rw-r--r--doc/overview/index.rst19
-rw-r--r--doc/python/document.rst58
-rw-r--r--doc/python/index.rst11
-rw-r--r--doc/python/quickstart.rst85
-rw-r--r--doc/python/sheet.rst83
-rw-r--r--doc/requirements.txt1
-rw-r--r--doc_example/Makefile.am25
-rw-r--r--doc_example/Makefile.in1207
-rw-r--r--doc_example/document_simple.cpp82
-rw-r--r--doc_example/model_context_simple.cpp142
-rw-r--r--doc_example/section_examples/Makefile.am19
-rw-r--r--doc_example/section_examples/Makefile.in1069
-rw-r--r--doc_example/section_examples/cell_access.cpp77
-rw-r--r--include/Makefile.am2
-rw-r--r--include/Makefile.in666
-rw-r--r--include/ixion/Makefile.am31
-rw-r--r--include/ixion/Makefile.in752
-rw-r--r--include/ixion/address.hpp347
-rw-r--r--include/ixion/address_iterator.hpp67
-rw-r--r--include/ixion/cell.hpp132
-rw-r--r--include/ixion/cell_access.hpp67
-rw-r--r--include/ixion/compute_engine.hpp89
-rw-r--r--include/ixion/config.hpp50
-rw-r--r--include/ixion/dirty_cell_tracker.hpp97
-rw-r--r--include/ixion/document.hpp94
-rw-r--r--include/ixion/env.hpp61
-rw-r--r--include/ixion/exceptions.hpp98
-rw-r--r--include/ixion/formula.hpp217
-rw-r--r--include/ixion/formula_function_opcode.hpp370
-rw-r--r--include/ixion/formula_name_resolver.hpp129
-rw-r--r--include/ixion/formula_opcode.hpp61
-rw-r--r--include/ixion/formula_result.hpp136
-rw-r--r--include/ixion/formula_tokens.hpp215
-rw-r--r--include/ixion/formula_tokens_fwd.hpp27
-rw-r--r--include/ixion/global.hpp35
-rw-r--r--include/ixion/info.hpp26
-rw-r--r--include/ixion/interface/Makefile.am6
-rw-r--r--include/ixion/interface/Makefile.in611
-rw-r--r--include/ixion/interface/session_handler.hpp50
-rw-r--r--include/ixion/interface/table_handler.hpp63
-rw-r--r--include/ixion/macros.hpp18
-rw-r--r--include/ixion/matrix.hpp122
-rw-r--r--include/ixion/model_context.hpp446
-rw-r--r--include/ixion/model_iterator.hpp76
-rw-r--r--include/ixion/module.hpp37
-rw-r--r--include/ixion/named_expressions_iterator.hpp57
-rw-r--r--include/ixion/table.hpp34
-rw-r--r--include/ixion/types.hpp373
-rwxr-xr-xinstall-sh541
-rw-r--r--libixion.pc.in11
-rwxr-xr-xltmain.sh11251
-rw-r--r--m4/ax_cxx_compile_stdcxx.m4951
-rw-r--r--m4/ax_cxx_compile_stdcxx_17.m435
-rw-r--r--m4/boost.m41578
-rw-r--r--m4/libtool.m48394
-rw-r--r--m4/ltoptions.m4437
-rw-r--r--m4/ltsugar.m4124
-rw-r--r--m4/ltversion.m423
-rw-r--r--m4/lt~obsolete.m499
-rw-r--r--misc/libixion.spec.in76
-rwxr-xr-xmissing215
-rw-r--r--src/Makefile.am54
-rw-r--r--src/Makefile.in1345
-rw-r--r--src/app_common.cpp40
-rw-r--r--src/app_common.hpp23
-rw-r--r--src/include/Makefile.am4
-rw-r--r--src/include/Makefile.in491
-rw-r--r--src/include/depth_first_search.hpp226
-rw-r--r--src/include/test_global.hpp43
-rw-r--r--src/ixion_formula_tokenizer.cpp156
-rw-r--r--src/ixion_parser.cpp134
-rw-r--r--src/ixion_sorter.cpp93
-rw-r--r--src/libixion/Makefile.am164
-rw-r--r--src/libixion/Makefile.in1552
-rw-r--r--src/libixion/address.cpp568
-rw-r--r--src/libixion/address_iterator.cpp316
-rw-r--r--src/libixion/calc_status.cpp29
-rw-r--r--src/libixion/calc_status.hpp57
-rw-r--r--src/libixion/cell.cpp578
-rw-r--r--src/libixion/cell_access.cpp176
-rw-r--r--src/libixion/cell_queue_manager.cpp149
-rw-r--r--src/libixion/cell_queue_manager.hpp47
-rw-r--r--src/libixion/column_store_type.hpp73
-rw-r--r--src/libixion/compute_engine.cpp132
-rw-r--r--src/libixion/compute_engine_test.cpp125
-rw-r--r--src/libixion/compute_engine_vulkan.cpp234
-rw-r--r--src/libixion/compute_engine_vulkan.hpp39
-rw-r--r--src/libixion/config.cpp27
-rw-r--r--src/libixion/constants.inl.in7
-rw-r--r--src/libixion/debug.cpp35
-rw-r--r--src/libixion/debug.hpp47
-rw-r--r--src/libixion/dirty_cell_tracker.cpp418
-rw-r--r--src/libixion/dirty_cell_tracker_test.cpp395
-rw-r--r--src/libixion/document.cpp237
-rw-r--r--src/libixion/document_test.cpp190
-rw-r--r--src/libixion/exceptions.cpp117
-rw-r--r--src/libixion/formula.cpp464
-rw-r--r--src/libixion/formula_calc.cpp89
-rw-r--r--src/libixion/formula_function_opcode.cpp26
-rw-r--r--src/libixion/formula_functions.cpp2389
-rw-r--r--src/libixion/formula_functions.hpp129
-rw-r--r--src/libixion/formula_interpreter.cpp1753
-rw-r--r--src/libixion/formula_interpreter.hpp125
-rw-r--r--src/libixion/formula_lexer.cpp345
-rw-r--r--src/libixion/formula_lexer.hpp55
-rw-r--r--src/libixion/formula_name_resolver.cpp2057
-rw-r--r--src/libixion/formula_parser.cpp268
-rw-r--r--src/libixion/formula_parser.hpp80
-rw-r--r--src/libixion/formula_result.cpp421
-rw-r--r--src/libixion/formula_tokens.cpp303
-rw-r--r--src/libixion/formula_value_stack.cpp625
-rw-r--r--src/libixion/formula_value_stack.hpp153
-rw-r--r--src/libixion/general_test.cpp1495
-rw-r--r--src/libixion/global.cpp103
-rw-r--r--src/libixion/impl_types.cpp40
-rw-r--r--src/libixion/impl_types.hpp69
-rw-r--r--src/libixion/info.cpp41
-rw-r--r--src/libixion/interface.cpp19
-rw-r--r--src/libixion/ixion_test_track_deps.cpp155
-rw-r--r--src/libixion/lexer_tokens.cpp156
-rw-r--r--src/libixion/lexer_tokens.hpp75
-rw-r--r--src/libixion/matrix.cpp331
-rw-r--r--src/libixion/model_context.cpp425
-rw-r--r--src/libixion/model_context_impl.cpp1126
-rw-r--r--src/libixion/model_context_impl.hpp206
-rw-r--r--src/libixion/model_iterator.cpp408
-rw-r--r--src/libixion/model_types.cpp16
-rw-r--r--src/libixion/model_types.hpp31
-rw-r--r--src/libixion/module.cpp111
-rw-r--r--src/libixion/name_resolver_test.cpp1131
-rw-r--r--src/libixion/named_expressions_iterator.cpp85
-rw-r--r--src/libixion/queue_entry.cpp17
-rw-r--r--src/libixion/queue_entry.hpp29
-rw-r--r--src/libixion/table.cpp40
-rw-r--r--src/libixion/types.cpp133
-rw-r--r--src/libixion/utf8.cpp72
-rw-r--r--src/libixion/utf8.hpp27
-rw-r--r--src/libixion/utils.cpp70
-rw-r--r--src/libixion/utils.hpp111
-rw-r--r--src/libixion/vulkan_obj.cpp870
-rw-r--r--src/libixion/vulkan_obj.hpp319
-rw-r--r--src/libixion/workbook.cpp55
-rw-r--r--src/libixion/workbook.hpp78
-rw-r--r--src/model_parser.cpp1203
-rw-r--r--src/model_parser.hpp157
-rw-r--r--src/python/Makefile.am35
-rw-r--r--src/python/Makefile.in1145
-rw-r--r--src/python/document.cpp313
-rw-r--r--src/python/document.hpp21
-rw-r--r--src/python/global.cpp39
-rw-r--r--src/python/global.hpp45
-rw-r--r--src/python/python.cpp174
-rw-r--r--src/python/sheet.cpp376
-rw-r--r--src/python/sheet.hpp44
-rw-r--r--src/python/test-env.sh9
-rw-r--r--src/session_handler.cpp169
-rw-r--r--src/session_handler.hpp66
-rw-r--r--src/sort_input_parser.cpp151
-rw-r--r--src/sort_input_parser.hpp54
-rw-r--r--src/table_handler.cpp141
-rw-r--r--src/table_handler.hpp59
-rw-r--r--src/test/Makefile.am9
-rw-r--r--src/test/Makefile.in646
-rw-r--r--src/test/test_global.cpp24
-rwxr-xr-xtest-driver153
-rw-r--r--test/00-command-exit.txt9
-rw-r--r--test/01-concat-operator.txt31
-rw-r--r--test/01-exponent-operator.txt17
-rw-r--r--test/01-inline-array-div.txt35
-rw-r--r--test/01-inline-array-exp.txt35
-rw-r--r--test/01-inline-array-mul.txt35
-rw-r--r--test/01-inline-array-op-lhs.txt54
-rw-r--r--test/01-inline-array-op-rhs.txt54
-rw-r--r--test/01-inline-array-string-concat.txt19
-rw-r--r--test/01-inline-array.txt29
-rw-r--r--test/01-ranged-definitions-dups.txt37
-rw-r--r--test/01-simple-arithmetic.txt53
-rw-r--r--test/02-circular-01.txt27
-rw-r--r--test/02-circular-02.txt15
-rw-r--r--test/03-expression.txt17
-rw-r--r--test/03-leading-signs.txt22
-rw-r--r--test/04-function-abs.txt20
-rw-r--r--test/04-function-and-boolean.txt25
-rw-r--r--test/04-function-and.txt34
-rw-r--r--test/04-function-average.txt13
-rw-r--r--test/04-function-column-row.txt36
-rw-r--r--test/04-function-columns-rows.txt20
-rw-r--r--test/04-function-concatenate.txt12
-rw-r--r--test/04-function-count-formula.txt14
-rw-r--r--test/04-function-count.txt35
-rw-r--r--test/04-function-counta-edit.txt43
-rw-r--r--test/04-function-counta-static-args.txt12
-rw-r--r--test/04-function-countblank.txt38
-rw-r--r--test/04-function-exact.txt16
-rw-r--r--test/04-function-find.txt35
-rw-r--r--test/04-function-invalid-name.txt9
-rw-r--r--test/04-function-isblank.txt40
-rw-r--r--test/04-function-iserror.txt24
-rw-r--r--test/04-function-iseven.txt40
-rw-r--r--test/04-function-isformula.txt20
-rw-r--r--test/04-function-islogical.txt64
-rw-r--r--test/04-function-isna.txt20
-rw-r--r--test/04-function-isnumber.txt20
-rw-r--r--test/04-function-isref.txt18
-rw-r--r--test/04-function-istext.txt39
-rw-r--r--test/04-function-left-utf8.txt33
-rw-r--r--test/04-function-left.txt36
-rw-r--r--test/04-function-len.txt12
-rw-r--r--test/04-function-logical.txt12
-rw-r--r--test/04-function-median.txt49
-rw-r--r--test/04-function-mid-utf8.txt13
-rw-r--r--test/04-function-mid.txt28
-rw-r--r--test/04-function-mmult-inline.txt14
-rw-r--r--test/04-function-mmult.txt43
-rw-r--r--test/04-function-mode.txt26
-rw-r--r--test/04-function-n.txt26
-rw-r--r--test/04-function-nested.txt10
-rw-r--r--test/04-function-or.txt39
-rw-r--r--test/04-function-pi-int.txt11
-rw-r--r--test/04-function-replace.txt20
-rw-r--r--test/04-function-rept.txt19
-rw-r--r--test/04-function-right-utf8.txt33
-rw-r--r--test/04-function-right.txt45
-rw-r--r--test/04-function-sheet.txt31
-rw-r--r--test/04-function-sheets.txt27
-rw-r--r--test/04-function-single.txt14
-rw-r--r--test/04-function-substitute.txt34
-rw-r--r--test/04-function-t.txt74
-rw-r--r--test/04-function-textjoin.txt30
-rw-r--r--test/04-function-trim.txt21
-rw-r--r--test/04-function-true-false.txt34
-rw-r--r--test/04-function-type.txt42
-rw-r--r--test/05-range-reference.txt25
-rw-r--r--test/06-range-reference-basic-01.txt28
-rw-r--r--test/06-range-reference-basic-02.txt34
-rw-r--r--test/06-range-reference-circular-01.txt11
-rw-r--r--test/06-range-reference-unordered.txt17
-rw-r--r--test/06-range-reference-whole-column.txt17
-rw-r--r--test/06-range-reference-whole-row.txt17
-rw-r--r--test/07-fraction-numbers.txt12
-rw-r--r--test/08-boolean-cells.txt25
-rw-r--r--test/08-numeric-cells.txt17
-rw-r--r--test/09-string-cells.txt17
-rw-r--r--test/10-shared-formulas-01.txt9
-rw-r--r--test/11-reference-to-numeric-cell-01.txt23
-rw-r--r--test/12-inline-string-01.txt33
-rw-r--r--test/13-relational-operators-01.txt30
-rw-r--r--test/13-relational-operators-02.txt23
-rw-r--r--test/13-relational-operators-03.txt19
-rw-r--r--test/20-table-reference-01.txt37
-rw-r--r--test/21-named-exp-workbook-01.txt54
-rw-r--r--test/21-named-exp-worksheet-01.txt73
-rw-r--r--test/22-formulas-with-cached-results.txt15
-rw-r--r--test/22-grouped-formulas-with-cached-results.txt38
-rwxr-xr-xtest/parser-test-func.sh12
-rwxr-xr-xtest/parser-test-t0.sh9
-rwxr-xr-xtest/parser-test-t1.sh9
-rwxr-xr-xtest/parser-test-t2.sh9
-rwxr-xr-xtest/parser-test-t3.sh9
-rwxr-xr-xtest/parser-test-t4.sh9
-rwxr-xr-xtest/parser-test-t5.sh9
-rwxr-xr-xtest/parser-test-t6.sh9
-rwxr-xr-xtest/parser-test-t7.sh9
-rwxr-xr-xtest/parser-test-t8.sh9
-rwxr-xr-xtest/python/document.py242
-rwxr-xr-xtest/python/module.py40
-rw-r--r--test/thread/function-parallel.txt11
-rw-r--r--test/thread/function-wait-simple.txt8
309 files changed, 115853 insertions, 0 deletions
diff --git a/AUTHORS b/AUTHORS
new file mode 100644
index 0000000..636f8d0
--- /dev/null
+++ b/AUTHORS
@@ -0,0 +1,11 @@
+Kohei Yoshida <kohei.yoshida@gmail.com>
+Markus Mohrhard <markus.mohrhard@googlemail.com>
+David Tardon <dtardon@redhat.com>
+Cédric Bosdonnat <cedric.bosdonnat@free.fr>
+Fridrich Štrba <fridrich.strba@bluewin.ch>
+Andreas Sturmlechner <asturm@gentoo.org>
+Andreas Schwab <schwab@linux-m68k.org>
+Bjoern Michaelsen <bjoern.michaelsen@canonical.com>
+Miklos Vajna <vmiklos@frugalware.org>
+Rene Engelhard <rene@debian.org>
+Tomas Chvatal <tchvatal@suse.cz>
diff --git a/ChangeLog b/ChangeLog
new file mode 100644
index 0000000..26b6c65
--- /dev/null
+++ b/ChangeLog
@@ -0,0 +1,13828 @@
+# Generated by Makefile. Do not edit.
+
+commit aad765d54425bc02ea55d498f45b1389d445d927
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Sep 26 20:49:41 2023 -0400
+
+ Add entry for the upcoming release
+
+commit ce840fa2f8591a7fd79613e0be4646e41e5c7846
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Sep 26 20:35:14 2023 -0400
+
+ Regen doc and test data lists
+
+commit 2a3b4a7bf0285a5b35dfa6dd81257aec2af4ba74
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Sep 26 20:29:26 2023 -0400
+
+ Clean up bin directory
+
+ Most of these wrapper scripts are obsolete since libtool can provide
+ the same functionality.
+
+commit ebb8c990d08f9e80e38f3941024925ff671cb19a
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Sep 26 19:53:25 2023 -0400
+
+ Set the version number to 0.19.0
+
+ The release is right around the corner...
+
+commit 247b882a37ab875abc9d6654ba128a830c088c01
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Sep 26 18:19:46 2023 -0400
+
+ Fix build with MSVC
+
+ error C2440: '<function-style-cast>': cannot convert from 'initializer list' to 'ixion::resolved_stack_value::value_type'
+
+commit d4e514b9e698b4c3481cce2076c73795b2006738
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sat Sep 23 19:50:23 2023 -0400
+
+ Inline arrays are now supported
+
+commit aa90417e4cacbcbff3e0a458272b3071bb221112
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sat Sep 23 19:43:18 2023 -0400
+
+ Make sure MMULT can operate on inline matrices
+
+commit 6231f4bd122494bd3eb04d299da86ca273a870c5
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sat Sep 23 19:27:26 2023 -0400
+
+ Support {inline matrix} & {inline matrix} concat operation
+
+ and add a test case for all three variants of string concatenation
+ operations.
+
+commit 0a549fdebc4be8de72760b650c67dc0ebf68b906
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Sep 22 21:20:16 2023 -0400
+
+ Support string & {inline matrix} (concat operation)
+
+commit 14f7e62dc45f7e6a865e026a492ee7ce0b4249bc
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu Sep 21 21:31:31 2023 -0400
+
+ Support {inline matrix} & "string" (concat operation)
+
+commit ec0c2d5d6df66c2159a5120e8c52d1b49a0a9c66
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu Sep 21 18:19:36 2023 -0400
+
+ Rename matrix_or_numeric_t to allow it to store string value too
+
+commit dd7bd5359c4355f8808997d2bcf9f3531a51dfd0
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Sep 20 21:16:09 2023 -0400
+
+ Rename functions for consistency
+
+commit aab3a644e7e0d70e3105599695f3ed8be40fae92
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Sep 20 21:11:49 2023 -0400
+
+ Handle division between matrix and scalar value
+
+commit 97be548cc03d0f87818e3d69edc3dffa1408e05f
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Sep 20 19:07:32 2023 -0400
+
+ Capture potential error condtion in operation on numeric value pair
+
+commit 6d15bc26dc4f4df08ca435779c438f416da46f11
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Sep 20 18:27:49 2023 -0400
+
+ Wrap std::variant in class to avoid using raw index() values
+
+commit f2877afe86c0507a7a8d6d4087b36d16ccd032fa
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Sep 19 20:28:24 2023 -0400
+
+ Handle exponent (^) operator in matrix-value operations
+
+commit 66e0ce43f210c4bd548cc21ce4857a76cff44330
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Sep 19 19:28:31 2023 -0400
+
+ Make multiply_op a template argument
+
+commit 1725326a2b69349e98f3a937dd1b422c121e7559
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Sep 19 19:17:46 2023 -0400
+
+ Add a test case involving string values
+
+commit 1a779b85a084b7eadc9287e7e44e47e9ece47efd
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Sep 19 19:06:13 2023 -0400
+
+ Add support for matrix by matrix multiplication
+
+ It works differently than the mathematical matrix by matrix
+ multiplication.
+
+commit 1986ca0aa2ce3b13e60d597d12830359f8d97f5e
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Sep 18 22:01:01 2023 -0400
+
+ Make it clear what's not supported
+
+commit ed1bfc394c6b3b6708dfafc39a5f6a1994765e09
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Sep 18 21:59:20 2023 -0400
+
+ Support range reference as matrix
+
+commit c545e05e3c62ab2c3e3a6783fa7f2c855d5216b6
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Sep 18 20:32:10 2023 -0400
+
+ Support multiplication between a matrix and a numeric value
+
+commit 156cffe5afc81e83feb7cafbce301fb2618503b8
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Sep 18 18:17:47 2023 -0400
+
+ Better to use braces here as a local variable is defined within
+
+commit e68f1d4203d44f0b7713ae610f2fdf08ca8a20ad
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Sep 18 17:33:36 2023 -0400
+
+ Unnecessary nested anonymous namespace
+
+commit fac1ac6dd17350a364b2dec1ef7a73b0aea86d0f
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Sep 18 17:29:50 2023 -0400
+
+ Support value <op> matrix
+
+commit 53c601ec72dbef79f9ab1499a5bfd3170860b7af
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Sep 15 19:33:56 2023 -0400
+
+ Add test file for the matrix to numeric value operators
+
+commit 38c54c751755a0a0ffcd1e517cba9501767c9eec
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Sep 15 19:24:38 2023 -0400
+
+ Add support for the rest of the operators
+
+commit bc4e9a6b26cbc463f49fffde56c17c430b6c250e
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Sep 15 18:24:11 2023 -0400
+
+ Support inline array - numeric value
+
+commit a1633278bbd01ffec6713826cacabcb95f6ab738
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu Sep 14 23:31:11 2023 -0400
+
+ Support inline array + numeric value
+
+ Other operator types will follow soon.
+
+commit 4c84fe43d194a7dce3f0a9beb0809d383f145ea3
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu Sep 14 21:54:34 2023 -0400
+
+ Refactor pop_stack_value_or_string() to return result
+
+commit d5df6c560fbaaf1594ec57a4a1033f645b40d028
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Sep 13 22:19:38 2023 -0400
+
+ Add a test case for inline arrays
+
+commit 88291bf50eb1fd21003052f7a264debf33c904d5
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Sep 13 22:17:35 2023 -0400
+
+ Use std::deque to store string values in the pool
+
+ This is to avoid fragmented string instances across memory.
+
+commit ea0780827d4b52493673b9f73e23add9f79daf1d
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Sep 13 22:13:32 2023 -0400
+
+ Extract common code block to retreive a string value
+
+commit 80f1ef5b656ff9429d0bdbdb10226fbf7955c1ec
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Sep 13 21:58:53 2023 -0400
+
+ Remove 'using namespace std'
+
+commit 61f7db4915ae5280fb5617e7eb6afa5bc3a7656e
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Sep 13 21:37:36 2023 -0400
+
+ Handle plus or minus sign tokens correctly for numeric values
+
+commit 7cb8516bbf850990f8dbbfef478d8e5368bb6708
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Sep 13 21:16:23 2023 -0400
+
+ Support string values inside inline arrays
+
+ It is still optimized for all numeric arrays.
+
+commit 91ebaf269c3f3870a2e9617b764141e59ba5c600
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Sep 12 21:22:46 2023 -0400
+
+ First cut on parsing inline arrays
+
+ Numeric values only for now.
+
+commit efdd40679b5327a783a48ad5d964eef0a4223b1b
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Sep 11 22:48:41 2023 -0400
+
+ Add a token for array row separator
+
+commit 8652b155759baa2deda5b86c404f118d73303894
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Sep 11 22:24:24 2023 -0400
+
+ Let's avoid whitespaces in token names
+
+commit f1dd7836d922edf45af6fa5f3eedf18561f3f6bb
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Sep 11 22:07:35 2023 -0400
+
+ Add array-open and array-close opcode types
+
+commit e0ef477aee90281e6ba4a8ecfb48e5a5b3dc7829
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Sep 11 21:56:13 2023 -0400
+
+ Define operator chars and reduce repeated operator case entries
+
+commit 1234cb0bcb32d280afc0e8f9bfc9e436c1adf576
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Sep 11 21:55:32 2023 -0400
+
+ Make it clear what types of tokens these are
+
+commit 6d952f0387b8b0cbf13463f6e2e6c41233336692
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Jul 19 22:52:05 2023 -0400
+
+ named_expressions_iterator to support move construction
+
+commit e47bac341e4de67fa2507a1772f9318d251999f6
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Jul 19 22:31:20 2023 -0400
+
+ Add the ability to specify sheet display preference when printing
+
+commit 863557629ecd4712523888a76dab5ed69193aaa4
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Jul 19 21:09:38 2023 -0400
+
+ Use ranged for loop
+
+commit c0a83340e059698219ed503ed701bb13c3db704e
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Jun 19 19:44:33 2023 -0400
+
+ Add set_sheet_name() to both model_context and document classes
+
+commit 9a4618ab8a9fd16bc18e3ac76bcda336f90ed43f
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Jun 19 18:19:35 2023 -0400
+
+ Set the version to 0.18.99 (pre 0.19.0)
+
+commit ac210d4d535fdbb454c3224904ff65cad05580c0
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon May 15 19:51:27 2023 -0400
+
+ Try to fix the gitlab CI
+
+commit 79a9daa3db16239b8057aa21cbbdefb5aa4fbb3c
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon May 15 19:45:31 2023 -0400
+
+ Fix build issue with Clang 16 on Windows
+
+ Thanks to Stefan for the suggested fix.
+
+ c.f. #53 (https://gitlab.com/ixion/ixion/-/issues/53)
+
+commit 44e9254f71fa550a8c240c13740cec1a18ed41d7
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Jan 31 19:43:04 2023 -0500
+
+ Update CHANGELOG
+
+commit 4734a9d6af7e13e71973979e3949f3c164f320e4
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Jan 31 19:27:52 2023 -0500
+
+ Set the version to 0.18.1
+
+commit 672a267edde2ef2c657735161a9ea2fc31eb517f
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sat Jan 28 11:30:36 2023 -0500
+
+ Fix 32-bit build, as reported on Debian (#52)
+
+commit 3747d5cc91d9e7dbb1c416b39b2f5108405bf103
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sat Jan 7 12:39:42 2023 -0500
+
+ Let's call it 'index', to be consistent with 'genindex'
+
+commit 9f5cc8006d6d25301227ab5fc2bced2d5a323dd0
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sat Jan 7 12:34:35 2023 -0500
+
+ Set anchor named 'root' at the project root
+
+ This is to be used by another project to reference the landing page
+ of the ixion doc.
+
+commit 6289bd8b667052b05b0c84f4415fc89a11b0fdba
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Nov 16 22:35:50 2022 -0500
+
+ Finish up the list of features for 0.18.0
+
+commit a2848b3ba5b64d99e72cda87cb6108c792c8930c
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Nov 16 21:45:57 2022 -0500
+
+ Adjust for the recent test executable changes
+
+commit 1333b7092db2c4ede04fe610901bc74e24350c27
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Nov 16 21:29:13 2022 -0500
+
+ Set the next version number
+
+commit f564dcb694d42c31b178f2da69c153baf8ad9191
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Nov 14 17:52:18 2022 -0500
+
+ formula_token is a struct now
+
+commit 4f69e1bbd760fa0a94ea00cba8e6542e7ddb4c67
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Nov 9 21:54:44 2022 -0500
+
+ Use range-based for loop
+
+commit 61424140d0902fddaa0decf48b7910e821a50cc1
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Nov 9 20:55:11 2022 -0500
+
+ Finally, remove mem_str_buf class itself
+
+commit 9175d708c52e6b8477dae463646c2287cc660f64
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Nov 9 20:51:59 2022 -0500
+
+ This is definitely not needed anymore
+
+commit c0bb45905db5fc9c07318dc9dc292092c1cec93a
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Nov 9 20:50:11 2022 -0500
+
+ These header includes are no longer needed
+
+commit 60ee943feb2a008c6bb24e179b35057c11cdd7c1
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Nov 9 20:14:27 2022 -0500
+
+ Replace mem_str_buf with std::string_view
+
+commit 250ab29d41015040d289ea3a5edb1d80bbe90bd6
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Nov 9 20:14:27 2022 -0500
+
+ Replace mem_str_buf with std::string_view
+
+commit 29f06ae82ecaff3822b557132f959b6ac0f8ae84
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Nov 9 20:14:27 2022 -0500
+
+ Replace mem_str_buf with std::string_view
+
+commit 64809bdf4ac76000ccf0eb380fe35a2c40f880fe
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Nov 9 20:14:27 2022 -0500
+
+ Replace mem_str_buf with std::string_view
+
+commit 3d6ead63638dc53e0886b4f8fa12a6d2201da62b
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Nov 9 20:14:27 2022 -0500
+
+ Replace mem_str_buf with std::string_view
+
+commit 369a7018a5c68d9fc9705d9d42bfda2286d5bc94
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Nov 9 20:06:21 2022 -0500
+
+ Replace mem_str_buf with std::string_view
+
+commit 123f5bef5f91c7a9bd29aa9483de20b18e72cd7b
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Nov 9 20:00:41 2022 -0500
+
+ unused
+
+commit dc0da3bd7b4302d3f1b94d9c216847d8f42c3a99
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Nov 9 19:56:35 2022 -0500
+
+ mem_str_buf is not used here
+
+commit 0283638b6a86b1eb5203d86883c5cf20c236cc74
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Nov 9 19:46:38 2022 -0500
+
+ unused
+
+commit 40a2d66b6dcca4dfd6bdf8cb2e5863b4d8f83b35
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Nov 9 19:45:24 2022 -0500
+
+ Let's not pass token to these methods for consistency
+
+commit 7ff59d7738e80bf62b0876c9e3116f242d5345e0
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Nov 9 19:24:00 2022 -0500
+
+ Re-implement lexer token storage structure
+
+commit f61dd1672caee7be683e85372350022ddbe3372b
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Nov 9 18:10:17 2022 -0500
+
+ No need for this explicit == operator; it's now implcit
+
+commit 20ab083f68ac057e9e94d8afa7cd26d41e627b9b
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Nov 9 18:08:48 2022 -0500
+
+ Fix build with logging enabled & simplify the code a bit
+
+commit e8a154fe9d5799b2017b9300e91179485da0d41c
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Nov 8 23:21:37 2022 -0500
+
+ More on documenting the code
+
+commit 9892a8b6fae40ff662a46a8d79ac6b4a9ddac37f
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Nov 8 22:43:12 2022 -0500
+
+ More on documenting the formula token symbols
+
+commit d124fd10c9d3b10fe755f62ece7d05e231cf6de1
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Nov 8 22:24:04 2022 -0500
+
+ Replace mem_str_buf with std::string_view
+
+commit bd81ae078202f488824e715276b9a46c4e20ae44
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Nov 8 22:16:18 2022 -0500
+
+ Remove 'using namespace std'
+
+commit 50c5cd1521554ce7dddb03fe6c0c8b51c8673e70
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Nov 8 22:08:54 2022 -0500
+
+ Imporove formula_token doc & safety check on opcode-only token
+
+commit 8c0a24d385531a4c55706fe12a1e347b4895d208
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Nov 8 20:56:41 2022 -0500
+
+ Clarify the purpose of create_formula_error_tokens()
+
+ This is currently used in orcus to store the state of invalid formulas
+ in cells.
+
+commit 9619d128e121eacdbae032885e83cb710d0b5945
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Nov 8 20:03:24 2022 -0500
+
+ Add test cases for multi-sheet references in SHEETS()
+
+ We now support multi-sheet references in Excel A1.
+
+commit 933b831d15b12d6db693d14b99ee3a30bf1523cb
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Nov 8 19:43:37 2022 -0500
+
+ Make table_t streamable
+
+commit 6f5ec9679aaf3b6a721f3fdbfb0ef10155d42553
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Nov 8 19:34:44 2022 -0500
+
+ Merge write_string() with operator<<()
+
+ This standalone write_string() feels a bit awkward.
+
+commit d22619b00270cf71db4c32ba2e47b441305931f6
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Nov 8 19:11:27 2022 -0500
+
+ formula_tokens_t to store formula_token objects directly
+
+ This should prevent memory fragmentation, and simplifies the code
+ quite a bit.
+
+commit 14ef0a028ade655f70ad106dd26e99a087e3a9b3
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Nov 8 18:32:47 2022 -0500
+
+ This is now a struct
+
+commit a5d3b15b0de1f395c79711c94b318c88825e1246
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Nov 7 22:22:21 2022 -0500
+
+ Reimplement formula_token with std::variant and no virtual functions
+
+commit f75c0abb8ae8d666854c9f8fd77981477d2a64ba
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Nov 7 20:02:38 2022 -0500
+
+ Remove 'using namespace std'
+
+commit 0e97fbdd10aac8ccb8f4bb851866dd34c74a5053
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Nov 7 19:02:55 2022 -0500
+
+ I don't think this is really necessary
+
+commit 129923beacc51d23d10090d12916516ddf7afe4e
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Nov 7 18:55:53 2022 -0500
+
+ parsed_addr2 is not necessary here
+
+commit 5610de6793e83e9ebb8fb7a3992d9a8422c87055
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Nov 7 18:54:55 2022 -0500
+
+ parse_address_excel_r1c1() to not take the model context
+
+commit 99de8982479c13bf94b1e5ab6e931d88466be40b
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Nov 7 18:54:03 2022 -0500
+
+ Implement multi-sheet parsing for Excel R1C1
+
+commit 4a7fec78fba96624ec4ffbb1a5755c337f6daf73
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Nov 4 21:02:33 2022 -0400
+
+ parse_address_excel_r1c1() to take the end position
+
+commit c9b4d1052cc7c4ee3717224f682607a70c96ce2a
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Nov 4 20:53:36 2022 -0400
+
+ parse_address_r1c1() to take the end position
+
+commit 75a0c08647db1b84e4359dba4da4ca7a23f89ea3
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Nov 4 20:41:21 2022 -0400
+
+ parse_number() to take the end position not the last valid char position
+
+commit 5b4895ec6d76f4e4b9ad24930f6a4555af3cda65
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Nov 4 18:46:48 2022 -0400
+
+ Set the 'was_quote' flag correctly for non-quote chars
+
+commit 019711a8ae317bcbefb9617a1aeb9cc588186b55
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu Nov 3 23:21:34 2022 -0400
+
+ Fix MSVC build via cmake
+
+ ixion-test clashed with the static test-only library of the same name.
+
+commit 799389c591ecc778c89f15ffc70f3b56b52268be
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu Nov 3 22:57:23 2022 -0400
+
+ Correctly handle sheet name with double quote i.e. `"`
+
+commit 8d4ccf9ce5c964df9a46d1166f5cd23978c5d57c
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu Nov 3 22:42:10 2022 -0400
+
+ Add some negative cases
+
+ I may add more later as I discover them.
+
+commit 00bdcf6a2fa8f467a706f60423f0f76f8647443e
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu Nov 3 22:21:34 2022 -0400
+
+ Initial version of reworked Excel sheet name parsing for sheet ranges
+
+commit 570acb86bf9c563a2bebda3b79c3dd3d019fff5a
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Nov 2 21:54:02 2022 -0400
+
+ Use std::optional to consolidate two output parameters
+
+commit b8cce1a9a780a18b94c6bc13c0d7216eb6b23848
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Nov 2 21:36:34 2022 -0400
+
+ parse_address_excel_a1() to take the end position
+
+commit 88c4e7b0207a3a6cd1aa57dc2d59f2a7fcb90458
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Nov 2 21:31:53 2022 -0400
+
+ Have the callers skip the separator upon successful sheet name parsing
+
+commit f3772f95d059e1465e24d2802a040cd3b567130f
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Nov 2 21:23:41 2022 -0400
+
+ parse_sheet_name() to take the end position
+
+commit 4568321f0adc6157b24188c6ff951100726bf0aa
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Nov 2 21:20:14 2022 -0400
+
+ parse_sheet_name_quoted() to take the end position not the last char position
+
+commit f209a673660a01fa537f86b23b16929657f38ffc
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Nov 2 21:00:36 2022 -0400
+
+ parse_address_a1() to take the end position, not the last char position
+
+commit 1df121225e9cf4721b4c2c147202f9d55f85e3c1
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Nov 2 17:54:17 2022 -0400
+
+ test_name_resolver_ prefix to just test_
+
+commit 63555c3bcdfd890e8e260f5af8219ab8142fcfa6
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Nov 1 22:28:54 2022 -0400
+
+ Split the name resolver test cases into separate test program
+
+ The cmake part is not tested.
+
+commit d8b12988a07f4882a1926104c9fef00dc0e5012d
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Nov 1 22:10:56 2022 -0400
+
+ Standardize the way to print test case scopes
+
+commit 9b0518c05030613f70b9b1c27280eb96086eb352
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Nov 1 19:46:01 2022 -0400
+
+ Include test_global.hpp first in every test source file
+
+commit de28507fe548977bd71811031bab0951986e35aa
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Oct 31 22:02:19 2022 -0400
+
+ Adjust in response to the 'trait' to 'traits' change in mdds
+
+commit e6f1d52230a3224b02c99563abf349b9867a32b6
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Oct 17 10:01:53 2022 -0400
+
+ Fix symbol import export macros
+
+commit 30ce7b11689cd7e8e6b4a37d64bab6c2df9eec39
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Aug 17 18:53:12 2022 -0400
+
+ The gitlab ci doesn't have autoconf 2.71 or newer
+
+commit 9effd90cb57e8bd5e647445c364a9a9e91d36f32
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Aug 17 18:45:35 2022 -0400
+
+ Switch to mdds-2.1 as its new dependency
+
+commit 9d28e19f419fb614355143af41af02bfec1f8ed2
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Aug 17 16:59:28 2022 -0400
+
+ Update config generation step to use autoreconf
+
+commit 7f7777a9e5e59e46547572862476e26f97a9261b
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu Apr 28 22:21:55 2022 -0400
+
+ Update the changlog.
+
+commit 60c6bb7e2115b51d7f2d6c68f69e1972699bc28d
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu Apr 28 21:53:51 2022 -0400
+
+ Implement MODE() function (#47)
+
+commit 85fea7f8638431685ddc1f8e1f018041a97ecf6c
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu Apr 28 20:49:15 2022 -0400
+
+ Extract the block that appends values from value stack into a function.
+
+ This can be generally useful.
+
+commit 07f2792da5b3511475975ec773da6703c217a020
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Apr 27 22:37:06 2022 -0400
+
+ Capture and set a formula error globally in interpret() method
+
+commit eb0e440a4ddacf31f7e544538dbcb64213d49250
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Apr 27 22:22:01 2022 -0400
+
+ This is a constant.
+
+commit 4bdb9c47234f66f23e9b76c25ed0bbb72a1c0945
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Apr 27 22:19:53 2022 -0400
+
+ Use static array for read-only data.
+
+commit 46c8d499ca7660e5c4dea9cba3b3d7aee965041d
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Apr 27 21:05:08 2022 -0400
+
+ Implement MEDIAN() function (#47)
+
+commit 01f059eb77983756e402c7d548455126eba22685
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Apr 26 22:19:03 2022 -0400
+
+ Implement TEXTJOIN() function (#47)
+
+commit b50bd7c13f63029b46ef7a0ad6d855066203fe71
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Apr 26 20:59:50 2022 -0400
+
+ Turns out we support both horizontal and vertical directions.
+
+commit e4cfd9e48cf9be14fe4f4f5f276770defe3c776c
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Apr 20 22:29:15 2022 -0400
+
+ Implement SUBSTITUTE() function (#47)
+
+commit 0971bae74337c03dc651c7a853a97b207803f8eb
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Apr 13 21:39:37 2022 -0400
+
+ ISERROR() should handle error value on the stack.
+
+commit 413be13d7dc6c054f7e5186da5d3a56fc65ec292
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Apr 13 21:18:22 2022 -0400
+
+ Add a nested function test case.
+
+commit b3874166f48d90ed88be4c1807aad97bf192bccd
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Apr 13 21:10:03 2022 -0400
+
+ Implement REPLACE() function (#47)
+
+commit a6572d1e0de06a71caaa1087f1e8475f8f616e53
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Apr 12 20:29:47 2022 -0400
+
+ Add note about case-sensitive search.
+
+commit ddea0a568acc6cfd6489f9342e993ef581844a42
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Apr 12 20:16:11 2022 -0400
+
+ Implement FIND() function (#47)
+
+commit 05643f02789ec84037896c0780f34f7a3d71cac3
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Apr 6 21:00:34 2022 -0400
+
+ Put a string result value in quotes & display the result type.
+
+commit 31c409a1093facf224a06fd85ae177e7f93dd890
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Apr 6 20:15:28 2022 -0400
+
+ Implement EXACT() function (#47)
+
+commit a4325cdd00d4cc889ed18e4d46209a692b21e148
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Apr 6 18:20:12 2022 -0400
+
+ Implement T() function (#47)
+
+commit c0665623bd44e9ed86b2203d5e23fcb766461db8
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Apr 5 21:08:18 2022 -0400
+
+ Implement REPT() function (#47)
+
+commit a48e977913648f7c32f65ace03dade6a3cefa8a6
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Apr 5 20:45:44 2022 -0400
+
+ Implement TRIM() function (#47)
+
+commit ef35755373a0e3148b312003218bee7c31a44e7e
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Apr 4 22:05:45 2022 -0400
+
+ Fix LEN() function to correctly process UTF-8 string.
+
+commit 2e60de38c8309544bd67dce84d7bf4b3076addd9
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Apr 4 21:57:48 2022 -0400
+
+ Implement MID() function (#47)
+
+commit 9205fe1040a968481a669a49c907106c1fd49630
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sat Apr 2 11:14:33 2022 -0400
+
+ Add a test case for the 2nd argument missing.
+
+commit 33e946f42b3a15cc31d0c227930f2e60c27a9c3f
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu Mar 31 21:47:37 2022 -0400
+
+ Update the specs.
+
+commit 39c90a5fc704337b1de6181781bd6909880bfd24
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu Mar 31 21:25:48 2022 -0400
+
+ Implement RIGHT() function (#47)
+
+commit 045d086e9cd925cb4132c7d6ab389430825fb05a
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Mar 29 19:54:18 2022 -0400
+
+ Fix the CI build.
+
+commit f84fe525ed7e25167f0d7ce91465ff1dd40d83ab
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Mar 29 19:49:38 2022 -0400
+
+ Add C++ preprocessing rules for slickedit workspace.
+
+commit 63ff88e67815f438104662f65245595ddf885b54
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Mar 29 19:45:51 2022 -0400
+
+ Fix the LEFT() function to handle utf-8 strings correctly.
+
+commit a3e999871c80416f2af2be9f848c04316e2b4a86
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Mar 29 18:00:54 2022 -0400
+
+ Organize the function declarations by their categories.
+
+commit 481249d967c9059a89dfcb1c9cce6ebe35aac6e8
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Mar 29 17:39:58 2022 -0400
+
+ Implement N() function (#47)
+
+commit 633d996bcb60b53a5a959be9e8868868ffac16c2
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Mar 29 16:40:01 2022 -0400
+
+ Implement TYPE() function (#47)
+
+commit 3d8cb558a0e16beb2714f92a8b2e1406462e8f59
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Mar 22 22:46:06 2022 -0400
+
+ Implement ISNA() function (#47)
+
+ This change also introduces error as a new stack value type.
+
+commit 8b103b17975d9ec8acebcdeac5195542b4be7cb4
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Mar 22 22:08:13 2022 -0400
+
+ Implement NA() function (#47)
+
+commit c404e1dcc4bd1ec67cc7d325d619f634268cba0a
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Mar 22 20:32:58 2022 -0400
+
+ Implement SHEETS() function (#47)
+
+commit bed6b1fb2403826102c6e23847a88f7581cdaaea
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Mar 21 22:10:26 2022 -0400
+
+ Implement SHEET() function (#47)
+
+ This commit also introduces #N/A formula error type.
+
+commit d78e7b6cefb0ba937bd41f656e9546fd91f7dad7
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Mar 21 21:31:33 2022 -0400
+
+ Add COLUMNS and ROWS to the specs.
+
+commit 8b63fa5e7fa1c07aac2399ef25286879f5484ea1
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Mar 21 21:22:14 2022 -0400
+
+ Implement COLUMNS() and ROWS() functions (#47)
+
+commit 8f7c7d356e305fef218dc6c9043269ea87a228e2
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu Mar 17 22:12:44 2022 -0400
+
+ Add ROW and COLUMN to the specs.
+
+commit af9bdd0865f23a3978e4fe99cb9140142d03684e
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu Mar 17 22:09:04 2022 -0400
+
+ Implement ROW() function (#47)
+
+commit 6378346f54594be075b57071bcdf92adc7eaa9d5
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu Mar 17 21:57:15 2022 -0400
+
+ Implement COLUMN() function (#47)
+
+commit 246c7e35a2ac8973df6d77049ed45b581eaedd85
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Mar 16 21:10:22 2022 -0400
+
+ Add COUNTBLANK to the specs.
+
+commit 07d65d38b2e4db0c17d39f85e6aa028acfe90865
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Mar 16 21:07:54 2022 -0400
+
+ Implement COUNTBLANK() function (#47)
+
+commit 3ccc6d585076d6a963a3433988e5b899ba3d9ccc
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Mar 14 22:37:52 2022 -0400
+
+ Specify the return types for COUNT and COUNTA.
+
+commit b34a18d34c1f39074b0450cc32d5dc8e36e5d637
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Mar 14 22:25:52 2022 -0400
+
+ COUNT is now implemented.
+
+commit 90479f4de467aed5ecf307194f3d527246f18f0f
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Mar 14 22:10:22 2022 -0400
+
+ Make sure a whole column range can be used within COUNT().
+
+ Also values_t only contains a single int; we can pass it by value.
+
+commit 8efc34b8bb93babe82503e36d5e8ab3629913975
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Mar 14 21:49:28 2022 -0400
+
+ Fix COUNTA() function to allow static string args & no args.
+
+commit 479567d8c07f70f6b56db441a831f792ebd1dabd
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Mar 14 21:43:11 2022 -0400
+
+ Add another test case for COUNT that involves formula cells as inputs.
+
+commit 17377c2e6e0654efa172d01eec7983318fe155ac
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Mar 14 21:35:02 2022 -0400
+
+ Implement COUNT() function (#47)
+
+commit af05fbf9d22d0c12c23e030bbcba2a83130bd823
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu Mar 3 21:57:14 2022 -0500
+
+ Replace all uses of IXION_N_ELEMENTS with std::size().
+
+commit 3d2fae9a33c8c0be6609b014290610fdccadc1cc
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu Mar 3 21:53:40 2022 -0500
+
+ Add a public to_formula_error_type() function and use it to ...
+
+ ... parse an error string e.g. #VALUE! in the model parser.
+
+commit 41441ee4e62e1f1b446e80173a7fddd2b8af0d2f
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu Mar 3 21:22:25 2022 -0500
+
+ Behave consistently for getting a numeric value too.
+
+ i.e. trigger #VALUE! when the value type doesn't allow implicit
+ conversion to numeric value.
+
+commit f8b6ca84fd30c8048b68eaf62fb8ce4d21898d8f
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu Mar 3 21:20:04 2022 -0500
+
+ =NOT(A7) where A7 is empty should be true.
+
+ In other words, when the referenced cell is empty it's equivalent of
+ being false when requesting a boolean value.
+
+commit d352a524f3fd68113445b8a11e5b3114286770e1
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu Mar 3 21:14:46 2022 -0500
+
+ Add return types for TRUE() and FALSE().
+
+commit 3bc0a995479871c7eb6b3e0fd0d8e1da73701999
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu Mar 3 21:13:50 2022 -0500
+
+ Implement NOT() function (#47)
+
+commit a38429cfc485aa1a4111dd8e183fa8ddaea1d8c3
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu Mar 3 20:42:57 2022 -0500
+
+ Update the specs with TRUE and FALSE functions.
+
+commit 29ecad5c8265fcce6a5d61b61beabf1de2c740fa
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu Mar 3 20:40:33 2022 -0500
+
+ Implement TRUE() and FALSE() functions (#47)
+
+ These are no brainers.
+
+commit 52c0a381aff9bcefb5daf9fdcace0560211d9fb6
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Feb 23 21:43:43 2022 -0500
+
+ Don't forget to move here.
+
+commit ed45e4d13f26226357135f3d2fea0ff75aee10c1
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Feb 23 21:38:04 2022 -0500
+
+ Some cosmetic change, to have 'break' tucked inside the case scope.
+
+commit 55e1d44028852015633bb94af5b72a0d0a630ab2
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Feb 23 21:06:29 2022 -0500
+
+ Add a missing header include.
+
+commit 496dd4390edb7051542b9ff26afdc0832cf71a7f
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Feb 23 21:01:38 2022 -0500
+
+ Update the specs to add entry for OR.
+
+commit 0b3da75dc831c0ea0151ea7e89777d032e702575
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Feb 23 20:56:50 2022 -0500
+
+ Implement built-in OR function (#47)
+
+commit ae72e7b206689fbcf7a944af9618e1bf01c974c5
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Feb 23 18:44:57 2022 -0500
+
+ Extract parts of the AND function implementation into another function.
+
+ This is so that I can re-use it for the upcoming OR function.
+
+commit 01d89e8a5e5c77b35cf5949470fd0cdd33edd257
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Feb 23 18:14:15 2022 -0500
+
+ AND function should return a boolean result.
+
+commit 32d7189e0780c79eb7517c5302ca6ad52ac41b1d
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Feb 23 17:47:55 2022 -0500
+
+ Start recording the return types of functions.
+
+commit 5caf524ac3f4fdc669ae44462179f4b1715cf0c1
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Feb 22 21:48:37 2022 -0500
+
+ Update the specs wrt ISLOGICAL function.
+
+commit 95300e55a4918561322b03b50e0e78b8397ce482
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Feb 22 21:46:50 2022 -0500
+
+ Implement ISLOGICAL built-in function (#47)
+
+ Also convert the result types of other ISFOO functions to boolean.
+
+commit 1af9abf5112bd8b0ef7b858507186d451e4ad1b4
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Feb 22 20:40:34 2022 -0500
+
+ Let's write debug outputs to stderr.
+
+commit 3a9a0837279ea417a1f468324c1e933d257b0eea
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Feb 22 20:36:18 2022 -0500
+
+ Chase and fix the boolean result being displayed as numeric value.
+
+commit c1195dfa606c0bbe92b55fc9f6086e925fb1ec5b
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Feb 22 19:59:14 2022 -0500
+
+ Add boolean type to stack_value.
+
+commit 827367a74c1d0da53f4eb871ddf6238464f49997
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Feb 22 19:31:23 2022 -0500
+
+ Switch to using std::variant in stack_value.
+
+commit ee06c267e5b1091b7c3856c76d14c32f56e3abbf
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Feb 22 19:01:08 2022 -0500
+
+ Add boolean formula result type.
+
+commit df6346faa297d466487d2fdbeae3974bee366080
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Feb 22 18:21:59 2022 -0500
+
+ AND function is now considered implemented.
+
+commit 95d9b5bec12e007600c71734864d7cbded5ba4b6
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Feb 22 18:15:51 2022 -0500
+
+ Add brief descriptions.
+
+commit 6b49b65e3980008fe558fe83a5751c49470f8423
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Feb 21 23:25:35 2022 -0500
+
+ Handle boolean element blocks in AND function.
+
+ Note the special treatment for std::vector<bool>.
+
+commit 7949daadf4b5f6ab47156d763efdb34b39a22dca
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Jan 26 19:17:59 2022 -0500
+
+ Add a reminder for handling boolean block type.
+
+commit bc7f11c4d273c52cd636f6cbcf0eb49b25336830
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Jan 26 19:10:08 2022 -0500
+
+ Create general functions to get element ranges.
+
+commit 74a88569acef271ca4c4aefda17aba81fd9e39d4
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu Jan 20 23:36:13 2022 -0500
+
+ Implement built-in AND function (#47)
+
+commit 29797bc0158daa85f155d4882e8e2d1e3cc3fc56
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Jan 19 21:47:04 2022 -0500
+
+ Set the version to 0.17.99 and the API version to 0.18.
+
+commit 0874438d6c64e9ba8c727d0e56b39fb770ef77c8
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Jan 19 21:22:31 2022 -0500
+
+ Remove formula_model_access header file.
+
+commit 70058443153ddc0b83c2e6ff75e645f2cef5b694
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Jan 19 21:13:14 2022 -0500
+
+ Remove inheritance from model_context.
+
+commit 84dc1bbc97d517dbff94bbfea73ff3e4dbdceaff
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Jan 19 20:55:52 2022 -0500
+
+ Remove all uses of formula_model_access with model_context.
+
+commit 74cd249517a968021d1fc60336d06bb1f728364e
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Jan 19 20:23:40 2022 -0500
+
+ Fill the specs for AND function. Not implemented yet.
+
+commit 77cbbb94e9e5471367d445514eeb627d4e6cd911
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Jan 17 15:31:52 2022 -0500
+
+ Implement ISERROR function (#47)
+
+commit 009a93e413a7c54a67ee202884e60d46a37d7eb9
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Jan 17 14:15:18 2022 -0500
+
+ Add some notes for future implementations.
+
+commit c5832e7a468db23b106d4a4f68b067999478ea37
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Jan 17 13:59:15 2022 -0500
+
+ Implement ISODD and ISEVEN functions (#47)
+
+commit b726e308262c159e6180e15c352a7608f4be4065
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Jan 17 13:15:12 2022 -0500
+
+ Update the specs file.
+
+commit 5394c20dfcb5b1247eba7593013a78db940ac6b6
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Jan 17 13:14:21 2022 -0500
+
+ Implement ISREF function (#47)
+
+commit 03c9d8933b1a81c47390c6550f4715d06ae04522
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Jan 17 12:49:43 2022 -0500
+
+ Update the specs file.
+
+commit dc190e0f0bd56160127912937a0fe8af68e49411
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Jan 17 12:47:25 2022 -0500
+
+ Implement ISNONTEXT function (#47)
+
+commit ac16f94a4a107b1cd042596c50ad05964b99b354
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Jan 17 12:40:11 2022 -0500
+
+ Implement ISTEXT function (#47)
+
+commit 29db5d3013343386a7436ac790c98ef7705fc81f
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sat Jan 15 17:24:35 2022 -0500
+
+ This was checked in by mistake.
+
+commit 0503c13a46e8cc50d0d830f45579ac09a08f1df4
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sat Jan 15 12:37:35 2022 -0500
+
+ Add another nested function test.
+
+commit e608f25cfc2d77ed63f5f6dfb3b2912b20aa428f
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Jan 14 18:56:04 2022 -0500
+
+ Implement ISFORMULA function (#47)
+
+commit a2f0294ccf73c41521a59d6c1290521c85af84e6
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Jan 14 18:21:24 2022 -0500
+
+ Update the specs.
+
+commit 5693262ac1159d250de8fc3201ee5410156f8afd
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Jan 14 18:15:23 2022 -0500
+
+ Implement ISNUMBER function (#47).
+
+ Also add the test case file for ISBLANK which I forgot to add.
+
+commit 877d6be7df17d845fbd9df212566d3a42ad788c5
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Jan 14 15:39:23 2022 -0500
+
+ Leave a note about passing a range ref to ISBLANK.
+
+commit 16d723c91038bbcde5dec046f5b79cfb1e551b6f
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Jan 14 15:11:46 2022 -0500
+
+ Implement ISBLANK with range reference. (#47)
+
+commit 24ae2ca0423d41dde3cbfd519767d8905616a7d1
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Jan 14 14:16:12 2022 -0500
+
+ ISBLANK should allow non-reference value.
+
+ If the passed argument is not a reference type, it should return
+ false.
+
+commit fbd69aeae29d3f39cd3cbe915d58ff28db3dc489
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu Jan 13 22:30:45 2022 -0500
+
+ Implement ISBLANK function (#47)
+
+commit b82ef2a78433a540b15b9a73a910dda8c387c683
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu Jan 13 22:06:31 2022 -0500
+
+ Implement ABS function (#47)
+
+commit 5485a1892b714632376d81cc4a48ac26166f78b6
+Author: Fred GOT <fred.gotpub@gmail.com>
+Date: Mon Nov 15 13:19:37 2021 +0000
+
+ Update README.md
+
+commit 4d579eae8e7be88272ba5b0746fe2269e7a3b6ca
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu Oct 28 21:27:40 2021 -0400
+
+ Categorize items.
+
+commit a28bcd35a51ae25fa6f1bd0f61c729cefa5dc4b2
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu Oct 28 21:24:28 2021 -0400
+
+ Set the doc version to 0.17.0.
+
+commit 6fa7b812e8ce92097f67b44435937b4b3857a8c1
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu Oct 28 21:06:59 2021 -0400
+
+ Set the version to 0.17.0 and populate CHANGELOG for this version.
+
+commit 99f4c37250f8592c7d1f9c0d9ff99972616a5bcb
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Oct 25 13:27:41 2021 -0400
+
+ Build fix for VS 2017.
+
+commit bf8183e391cd197d757be6a38a8781e6c43a7c2c
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sat Sep 25 10:31:35 2021 -0400
+
+ Install the vulkan module via cmake.
+
+commit e032ae53dea1b785ec30941c1bb980df4ce3b135
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sat Sep 25 10:10:33 2021 -0400
+
+ Fix cmake build.
+
+commit 2ee72fdfd4ccad7d03c34c34b8380ca686441972
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Sep 24 10:05:55 2021 -0400
+
+ The parameter min max values may be 0 instead of missing.
+
+commit 0b31c99ca3e705bccfa956773ef9c32cf6fe71ad
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu Sep 23 20:42:43 2021 -0400
+
+ Add another rpath to libixion-<api>.so.
+
+ This is so that it can find the vulkan module after installation.
+
+commit fea608f29a1baa8c57ee16cc9335d2e63b5ffcb8
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu Sep 23 20:29:54 2021 -0400
+
+ This is no longer relevant.
+
+commit fb8155ac4b3c1a4099a22609590170d5fbc52a24
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu Sep 23 20:10:21 2021 -0400
+
+ Add script to parse function specs and generate markdown table.
+
+commit 584ed350d24ff583df00af26acd8cdf9c2a31356
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu Sep 23 19:05:47 2021 -0400
+
+ Add entries for non-yet-implemented functions.
+
+ Also add 'implemented' properties too.
+
+commit 1bf06863f3655bca49edcaf8f82a1bd33f9737be
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Sep 22 22:54:21 2021 -0400
+
+ Add symbols related to formula function opcodes.
+
+commit 64a6740b235a2a50719bc0fbe2a2580a117b1ff6
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Sep 22 22:33:41 2021 -0400
+
+ Update code example in the doc.
+
+commit 9826a2e125ecaae5a40b77b83c7e05f316ec4bd2
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Sep 22 21:39:04 2021 -0400
+
+ Remove symbols that no longer exist.
+
+commit 5a8fd0d6f66276f662f3d9b72cadc8c825d37c2e
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Sep 22 21:34:30 2021 -0400
+
+ {@link ...} tags don't work well with doxygen.
+
+commit ad82f9efc8aed53ab3f5435a44b02cbdc0da6e24
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Sep 22 10:45:15 2021 -0400
+
+ Use std::variant for the value in formula_name_t.
+
+commit 750d58bffb32855181dd1981ed6bd54e6b5759ba
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Sep 21 22:51:38 2021 -0400
+
+ Use std::variant for model_iterator::cell::value.
+
+ For an empty cell, store a boolean value of false so that equality check
+ works as expected.
+
+commit 658dad65511fe4417e0bf59c294f2ab59c4a1c3b
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Sep 21 22:30:16 2021 -0400
+
+ @link doesn't work well with doxygen.
+
+commit f388b4102b51fcdfcb23acc5f52a19e3a89f6d1c
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Sep 21 22:27:33 2021 -0400
+
+ matrix::element to store std::variant value instead of using union.
+
+ Also convert a whole bunch of related methods' return value types
+ from const std::string* to std::string_view.
+
+commit ede3c27dac5d0c793241e92fa755bb990e016afc
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Sep 17 22:05:47 2021 -0400
+
+ Remove deprecated model_context::erase_cell().
+
+ Call empty_cell() instead.
+
+commit ccc70ad81dd3a7df9bb09f2e169dc80aca25665f
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Sep 17 22:03:26 2021 -0400
+
+ Remove deprecated model_context::get_all_formula_cells().
+
+commit 852ecff7f78965c580529f311776363976934e80
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Sep 17 21:51:44 2021 -0400
+
+ model_context::get_identifier_from_string() to take string_view.
+
+commit 131cca72d73b8d327fae20f2237588d9a5b9cbbc
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Sep 17 21:36:28 2021 -0400
+
+ model_context::set_named_expression() to take std::string instead of ...
+
+ ... a char pointer and a size. The caller can move a string into this
+ call.
+
+commit f86a29cfdf93e8bc307e0edea1587b4b671fb5d9
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Sep 17 21:06:10 2021 -0400
+
+ Remove append_sheet that takes a char pointer and a string size.
+
+ It is just a front for the other variant that takes std::string.
+
+commit 5d7e0ca147e890ea80ec8878d36c23e45d3b52f4
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Sep 17 20:50:32 2021 -0400
+
+ model_context::set_string_cell() to take string_view.
+
+commit b49a270b9f5f10efafe13eecbcb9e3c2fb4ee9ad
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu Sep 16 22:37:16 2021 -0400
+
+ Move mem_str_buf.hpp header out of public space.
+
+ This class will be slowly phased out in favor of std::string_view.
+
+commit 1a6c2c0975e8d6c7ae611f154360b8707765604c
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu Sep 16 22:25:00 2021 -0400
+
+ Refresh slickedit project.
+
+commit 1e64cc932800e4ac160e25859730da815025f980
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu Sep 16 22:16:45 2021 -0400
+
+ Use std::variant in model_context::input_cell.
+
+commit 46a181c9df834345ee6cacf7b57c22f9bde6688b
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu Sep 16 22:03:46 2021 -0400
+
+ Use std::string_view in formula_name_t::table_type.
+
+commit 53a73e69565d5d4cf61677890f9b082dd5a7a5b7
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu Sep 16 21:26:16 2021 -0400
+
+ std::string_view in create_formula_error_tokens().
+
+commit 6f35182a42c5eb8be67cd5dab248236695c5ce0e
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu Sep 16 21:10:42 2021 -0400
+
+ Use std::string_view in parse_formula_string().
+
+commit fc62d9d57ad2cd5334506e7691ad25b07681fb63
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu Sep 16 20:52:13 2021 -0400
+
+ More on switching from const char* to std::string_view.
+
+commit 3537dfacffdac40c2cd928fc918175d63d4b51f9
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu Sep 16 20:42:32 2021 -0400
+
+ Use std::string_view in lieu of raw const char*.
+
+commit 969823a9edf6dcc6e163b67e00531c392cefb5ed
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu Sep 16 20:28:04 2021 -0400
+
+ Use std::variant to replace union.
+
+commit 9917be8478030d17ddbd1c06c8121f69af1c9f66
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu Sep 16 20:10:29 2021 -0400
+
+ NULL is no more.
+
+commit 8337c191143827b17a2f0a26b99d59b856975c26
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu Sep 16 20:05:53 2021 -0400
+
+ Simplify formula_result::parse().
+
+ It no longer takes formula_model_access since string formula results
+ aren't converted to string ID's.
+
+commit 193cfc41f06d6267bb1315ae60d1d895d3f4b2ce
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Sep 15 23:24:17 2021 -0400
+
+ get_sheet_index() to take string_view.
+
+commit 4f2cb393d795d0b422e5ecd92b4b61a7ee05d352
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Sep 15 23:17:35 2021 -0400
+
+ add_string() and append_string() to take string_view.
+
+commit c8c64774915883f203388cc8d0d2eb582bdc50d9
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Sep 15 22:56:16 2021 -0400
+
+ append_string() doesn't need to be a part of the formula_model_access interface.
+
+ It is supposed to be called only from initial document loading and not
+ during formula calculation.
+
+commit 0c3f9589442847d7aab2ec7ed4b2a31553425293
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Sep 15 22:46:13 2021 -0400
+
+ get_named_expression() to take string_view.
+
+commit f326039b7434c93d405abcac77b3c46c051c994a
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Sep 15 22:33:25 2021 -0400
+
+ session_handler to use string_view in lieu of const char*.
+
+commit 4a65f07753dff608eb644b8e4e72d3338bc6163b
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Sep 15 22:30:28 2021 -0400
+
+ resolve() method to take string_view.
+
+commit 611fbd7a7c60c787286dfab2ef8899f91ac40c2a
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Sep 15 21:03:17 2021 -0400
+
+ Use relative header paths in public headers.
+
+commit ab0e25d2672f770fb569ad420f8a9db0ff577cfb
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Sep 15 20:46:14 2021 -0400
+
+ Use string_view in function opcode functions.
+
+commit 7bcdc99800146e4bf0f4dfc2d2a61c3562777be9
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Sep 15 20:29:36 2021 -0400
+
+ Update exceptions' signatures to post C++11.
+
+commit feb6465f7e0cd571ac6803b3793587c27afadbe7
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Sep 15 19:48:03 2021 -0400
+
+ to_bool() to take string_view.
+
+commit 0e5224286f7fa7fcf551384de1cbf8f2bd7a92d1
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Sep 15 19:44:19 2021 -0400
+
+ to_double to take string_view.
+
+commit 66b77e1f8f4c17c79cd38dfd885f3da43c88ef11
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Sep 15 19:31:34 2021 -0400
+
+ Get rid of this weird global class with no state.
+
+commit 6dc7f14841377072822573575e59694b177c91b4
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Sep 15 19:13:40 2021 -0400
+
+ Move formula_error class to exceptions.hpp.
+
+commit 7f82a65a087766cf06b722cb98b4a509a52a6e80
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Sep 15 00:15:37 2021 -0400
+
+ Hide load_file_content() from public API.
+
+ Also add app_common.?pp which I forgot to add previously.
+
+commit c1ff8c1f87f894b313191d7ed3744c3bcebb02bf
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Sep 15 00:04:00 2021 -0400
+
+ Use std::isdigit, and remove is_digit from public API.
+
+commit 5cf46ddc52c3a2f49ab4a99cc1c67461e7f1b59f
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Sep 14 23:38:01 2021 -0400
+
+ Move or remove weird global functions from public API.
+
+commit bc7256124ff2d1ad31ede41df3f5ff3c41fbb491
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Sep 14 23:21:15 2021 -0400
+
+ Use std::variant in lieu of union.
+
+commit e35d13f5a3b416b7b698a3a49eb3d12c75761ba3
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Sep 14 22:49:41 2021 -0400
+
+ document::set_formula_cell() to take string_view.
+
+commit 8e4b88002a36f60cfd214447fde25032311cecc3
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Sep 14 21:20:35 2021 -0400
+
+ document::set_string_cell() to take std::string_view.
+
+commit 8fe449fab279ae15a43448cd40c784901d8bc8b7
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Sep 14 21:02:30 2021 -0400
+
+ const char* to std::string_view in compute_engine.
+
+commit ee62da6d9025654f26b6cc197a0669cfadf7484a
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Sep 13 22:55:23 2021 -0400
+
+ You still need to make the extern "C" function visible...
+
+commit 9b13065f97147a84640142bf9a5aac9c1a2a1e92
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Sep 13 22:44:41 2021 -0400
+
+ Implement module loading on Windows and get the Vulkan test working.
+
+commit 407201fce72db313fa317688f39435e53d636482
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Sep 13 21:38:15 2021 -0400
+
+ Enable assert macros even in release builds.
+
+commit d76a6bd2a8115cb6b254f88cba3383a4f21329bb
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Sep 13 21:20:45 2021 -0400
+
+ Add option to build vulkan module via cmake.
+
+commit 636e4287dc740030a5aa6a2235b17a9a09ad5ec8
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu Sep 9 13:21:54 2021 +0000
+
+ Fixed a bug in wording.
+
+commit b36239ea91728ff4e1667bfdf87d0226965b20f5
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sat Aug 14 11:03:45 2021 -0400
+
+ Remove all doxygen warnings.
+
+commit b2b546a28f5a224b2d42e526c17284c75dcc51a8
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Aug 13 20:51:07 2021 -0400
+
+ Address some doxygen warnings.
+
+ We need to start replacing {@link ...} with simple method_name().
+ The latter works better with doxygen.
+
+commit 548f08966d3b64fcfd06eeb6caa5d52bc2b0dc00
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Aug 13 20:09:35 2021 -0400
+
+ Turn this into a compile-time check & add check for the function ID too.
+
+commit 2cb6891fb53749932dde1a577644df7b01fdd837
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Aug 13 19:43:59 2021 -0400
+
+ Make sure that string ID values don't exceed 32-bit size.
+
+commit f3a4981db86411d5df3fe217ee4c95e85cd59b36
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Aug 13 19:31:31 2021 -0400
+
+ Explicitly store unsigned 32-bit integer with formula tokens.
+
+ Also fix the size of string ID's to 32-bit, and rename get_index() to
+ get_uint32() to make its intent explicit.
+
+commit 735db7ea4276bea0c43ee5ff8a72c15972fb886b
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Aug 13 16:21:21 2021 -0400
+
+ Fix documentation building.
+
+commit 7e60507821190ee18739d45166803af028ee2e19
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Aug 13 15:14:15 2021 -0400
+
+ Update the doc build settings for the readthedocs site.
+
+ Mostly carried over from the mdds project.
+
+commit 48eeb9791d84767ba5c0da971694ce145a01c318
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu Aug 12 20:33:21 2021 -0400
+
+ Fix build with MSVC.
+
+commit 70544c957c29ef6113c4d740cc355a428ee04985
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Aug 11 19:54:56 2021 -0400
+
+ Fix the build with MSVC.
+
+ Actually I'm surprised the old code built with gcc.
+
+commit e40fdf8cc7d87cb4b15588f6d91835f6d61d2f0e
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sun May 30 00:52:56 2021 -0400
+
+ Wrong namespace labels.
+
+commit 55c8b509240a689abc72cd61c1fbec48bfe7feec
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed May 26 23:20:20 2021 -0400
+
+ Declare this derived class final.
+
+commit f6e6fee1815415373265505d38e2ebaf94b56612
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed May 26 20:36:11 2021 -0400
+
+ Improve inline comments to describe the vulkan pipeline more.
+
+commit ab54161ebd2f1454455f3df544572c3fca9158c3
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed May 26 11:46:10 2021 -0400
+
+ Print only the first 15 and last 5 values & measure running times.
+
+commit 88a3c4985e4735c5a253375e792dba9d803ee976
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue May 25 23:54:18 2021 -0400
+
+ Specify runpath to $ORIGIN so that it can find the vulkan module ...
+
+ ... without relying on IXION_MODULE_PATH being set.
+
+commit b4d344e1228652342b8110c3586bc44f8ab42104
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue May 25 22:09:01 2021 -0400
+
+ I don't think I need this, since I use fence to wait.
+
+commit c6625ca1cec1b5db2f97b09000dd4c2c45395e47
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue May 25 22:05:19 2021 -0400
+
+ Ensure that the flush / invalidate range is a multiple of the atom size.
+
+commit dc00a9165101d055700e6a91a0a90c7b8b5f8095
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue May 25 21:44:40 2021 -0400
+
+ Add CPU implementation of fibonacci numbers.
+
+commit 7cc28dae3e4777064b33d216114e8f6d6dd3693b
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue May 25 21:20:26 2021 -0400
+
+ Generalize the raw data byte size calculation.
+
+commit 452af0058bcc1617c07e46fc324dcaff9282a506
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue May 25 21:08:04 2021 -0400
+
+ Finish fibonacci computation all the way.
+
+commit 81139e61e5048a27eafd17b9ef0a5fdff5d639a1
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon May 24 22:51:03 2021 -0400
+
+ Create a pipeline instance.
+
+ Also pass BUFFER_ELEMENTS as a special constant to the shader code.
+
+commit b64911793e52a1b203d54134f89172e7ec398309
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri May 21 23:16:25 2021 -0400
+
+ Actually I don't need to go through std::ostringstream for this...
+
+commit 6c75526dc47cc48442c864d4f01796b10cafb787
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri May 21 22:39:31 2021 -0400
+
+ Create a shader module instance for fibonnaci computation.
+
+commit 1b0b1f5031046d70eb8abd1439c60e7694f46295
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri May 21 16:44:37 2021 -0400
+
+ Print test function names.
+
+commit 58d3fdf74d6854bdd80caa6ec78500127d3f7eb5
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri May 14 20:36:51 2021 -0400
+
+ Fix CMake build.
+
+commit a24a3c55fb28970552aff2cb90128e06334c421e
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue May 4 08:39:02 2021 -0400
+
+ Maybe use gfortran-9?
+
+commit ed94dd5db9349f29c794a0e6e974f3f1aaefd3d4
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue May 4 08:34:41 2021 -0400
+
+ Remove gfortran-8 package usage.
+
+commit 5c5a509a8740c1c380090f3c69901a389890be4d
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Mar 23 21:01:35 2021 -0400
+
+ Create a pipeline cache next. This one is no brainer.
+
+commit 79013b8bb23039fcd35ab7618ada70ae43729999
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Mar 22 22:36:51 2021 -0400
+
+ Update the descriptor set with the content of the buffer.
+
+commit 97a74069313d9e4a7499e8c000cb4d3bae53798d
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Mar 22 22:03:27 2021 -0400
+
+ Allocate a descriptor set from the descriptor pool and layout.
+
+ I believe there is no need to destroy descriptor sets individually
+ since destroying the pool will take care of that?
+
+commit 7e3cf8c8c2d5168968f7859fae6f031009b2aa9e
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Mar 19 21:39:20 2021 -0400
+
+ Create a pipeline layout.
+
+commit cf6fa61678b666ff1bbd03192da1ec7d61fd8ae8
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Mar 19 20:57:05 2021 -0400
+
+ Create descriptor set layout and its wrapping class.
+
+commit 8b3eb803513b9bf850890418918407fe200ced12
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Mar 17 23:29:34 2021 -0400
+
+ Pass initializer_list by value.
+
+commit 6ac5b7fe4139bfb585f1e9b0e103ae34dc1786bf
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Mar 17 23:24:49 2021 -0400
+
+ Move the buffer-copy part into its own function, and create ...
+
+ ... a descriptor pool. Also write down the rest of the steps as
+ a reminder.
+
+commit d7a7de2827ee6d3904c0f18e6be043a68cfacdc8
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Mar 16 20:39:02 2021 -0400
+
+ Finally submit the copy command to the queue and wait on it via fence.
+
+commit b3e80edc1c60121e2bae4998f0efc86fb8ada2ec
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Mar 15 21:14:43 2021 -0400
+
+ Record command for copying from one buffer to another.
+
+ All I have left to do is to submit it to the queue.
+
+commit 00c871b3e22482329d5e6fcf96d57e01f70422d6
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Mar 15 20:00:09 2021 -0400
+
+ Let's flush the modified memory range before unmapping.
+
+commit 3d9631b4d6883dbe012cdb02c77d1ff5929e4d4f
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sun Mar 14 17:06:15 2021 -0400
+
+ Let's not forget to initialize this with a null value.
+
+commit 6b8a97868cd1307fb67984754a12c189b409b21a
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sat Mar 13 21:37:23 2021 -0500
+
+ Create a device-local buffer too. To be continued.
+
+commit 4276fc1d04491f075a72a79f439d482737386122
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sat Mar 13 15:14:58 2021 -0500
+
+ write_to_memory sounds better.
+
+commit 03139ba4e33852ce1a40637bd5ea55b62b806994
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sat Mar 13 15:07:52 2021 -0500
+
+ Don't forget to account for the size of the integer.
+
+commit e1d2e840458626ef95995c554571dc972c8e4853
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sat Mar 13 14:52:57 2021 -0500
+
+ WIP: set up a method to compute fibonacci sequence, and ...
+
+ ... go far enough to allocate buffer memory and populate it with
+ input data.
+
+commit 96a4674f4ca47ad1016bae3892870e31b43bf899
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Mar 12 23:03:23 2021 -0500
+
+ WIP: RAII wrapper for buffer object. Not finished yet.
+
+ I still need to find & allocate memory and assign data to it.
+
+commit 46acda579331d9a686e871a57fee4e326880e7e4
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Mar 12 20:44:05 2021 -0500
+
+ Create a command pool.
+
+commit 9b973355b1816aa59d43ad6ba269a1aa9150daf8
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu Mar 11 22:04:37 2021 -0500
+
+ Create a logical device and pick a compute queue family.
+
+ For now we are picking the first available physical device.
+
+commit 3bec790b4731be7f8c64c0615cdaae5709f3f9ca
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Mar 10 22:16:41 2021 -0500
+
+ Set up a wrapper for VkDevice and query for available physical devices.
+
+ Still not done yet. I need to work on obtaining a compute queue family.
+
+commit 4add59dcbdd12ccbdef13edf258c5e6c74faac3b
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Mar 10 21:07:13 2021 -0500
+
+ Create vk_instance to wrap VkInstance creation and destruction.
+
+commit 19584cf6f4df55e114dd1f0644dc09117b515153
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Mar 10 19:35:51 2021 -0500
+
+ Change the header guard name.
+
+commit 2e89a87a219ea491ffe454f7c299e687601ebe20
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Mar 9 21:05:20 2021 -0500
+
+ Set up a callback function for validation layer.
+
+ Without this no messages from the validation layer would be printed.
+
+commit bc7c0b0ff62b7df62334cbdae1d774ffa8694748
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Mar 9 20:47:05 2021 -0500
+
+ VK_EXT_debug_report is deprecated.
+
+commit 98fce03d3a476b3a0f5b6a7975c9a7d90262077c
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Mar 9 20:43:37 2021 -0500
+
+ Use khronos validation layer instead.
+
+commit a41122664344ba6f4ef30d6ad822dc67af9cb997
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Mar 9 20:36:16 2021 -0500
+
+ Detect validation layer before enabling it.
+
+commit b3fedd075c9712254519d268e8d23bf19ce14a78
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Mar 9 20:17:12 2021 -0500
+
+ Detect and set up vulkan library & create vulkan instance.
+
+commit 1284577aaf2170e3f290b47a4e5c0fad01e8855b
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Mar 8 22:01:09 2021 -0500
+
+ Rename all the cuda bits to vulkan.
+
+ This will be used to experiment with vulkan as a potential compute
+ engine.
+
+commit 6a2286d547824f66dd84fbe27ee025831d8d3107
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Mar 8 21:41:11 2021 -0500
+
+ Let's print something during test run.
+
+ Also remove debug statements from the cuda compute engine.
+
+commit dcb164c8c56861d70befca03f1fe026e011c1c48
+Author: David Tardon <dtardon@redhat.com>
+Date: Sun May 2 21:41:04 2021 +0200
+
+ fix cell count check
+
+commit c159098d377313a5c2dbc6d1053714b35cbb0f04
+Author: David Tardon <dtardon@redhat.com>
+Date: Sun May 2 21:35:56 2021 +0200
+
+ fix assertion
+
+commit ecfd2f08fafab3da627b655fcfc4d6ec231e463d
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Feb 9 23:11:41 2021 -0500
+
+ Add all currently implemented function specs.
+
+commit 774d3f2760d7fabbc24bf97dce24834e168704f2
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Feb 9 22:54:26 2021 -0500
+
+ Add a work-in-progress builtin function specifications.
+
+ This will be also used to track already implemented functions vs
+ all function opcodes to query those not yet implemented.
+
+commit b37e8a76b84110930e853726b235908c4b0033db
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Feb 9 22:02:34 2021 -0500
+
+ Sort the cases alphabetically.
+
+commit 13c52de54179be8d30c4a7f296a14e3155a35bef
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Feb 8 09:14:26 2021 -0500
+
+ Up the CMake minimum version to silence warnings.
+
+commit 5f55b86bbbe443c0286673e117e576e615d08b40
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sat Feb 6 11:00:56 2021 -0500
+
+ Fix the build with VS 2019.
+
+commit 0d067ac80e89f4617c6a999dff776f58c5d75d56
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Feb 5 17:30:27 2021 -0500
+
+ Fix CMake build with VS 2017.
+
+commit 4b01623c619e1eefee94c926d6ade5c3dcb04a29
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Jan 6 23:28:55 2021 -0500
+
+ Print argument separators correctly.
+
+commit c8be04fa69c05f27f2ce237fa4b8190d59ad40a7
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Jan 6 22:55:12 2021 -0500
+
+ Implement LEFT() built-in function. (#43)
+
+commit 1992b8ab9c7765b8da06b6054bb3c0ab990c62f7
+Author: orbea <orbea@riseup.net>
+Date: Wed Oct 28 08:13:31 2020 -0700
+
+ Fix build with clang.
+
+commit bafe7037c63bf741f84020ea6a6d3fdedfe11af3
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Oct 16 16:35:21 2020 -0400
+
+ We need to allow dots in names but not as the first characters (#41)
+
+commit f3a538b52df6b72039364bccd395ec14b657594a
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Oct 16 15:25:23 2020 -0400
+
+ Also check against empty names and names starting with ...
+
+ ... numeric characters (#41)
+
+commit aab0d51d613a9267ede24904734ff7e85708b105
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Oct 16 15:21:22 2020 -0400
+
+ Add a test case for named expression name validation (#41)
+
+commit 16969ebfd35397c1b3e1a927ab7836ee7ef3a22f
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Oct 16 14:58:10 2020 -0400
+
+ Validate the name of each named expression (#41)
+
+commit 444b07079e3c472eaec06f8b9af965777981f04c
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Sep 30 18:30:19 2020 -0400
+
+ Set the required mdds API version to 2.0.
+
+commit d838eab48af378af75671b4d305efd5763d02605
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Sep 30 12:49:26 2020 -0400
+
+ Set the new C++ baseline in cmake too. (#37)
+
+commit b3b5a7072ef0748bf905b1d8fdc28602d377e10d
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Sep 30 09:52:14 2020 -0400
+
+ Nobody should be using this anymore.
+
+commit d97a14d119ae9b20536457c403288c26bc24593e
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Sep 30 09:50:07 2020 -0400
+
+ As a first test, replace all uses of ixion::make_unique with ...
+
+ ... the one in the std namespace.
+
+commit f9cfcbc8e2a84059496ea3e6abab4c634ccf8278
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Sep 30 09:43:31 2020 -0400
+
+ Set the C++ baseline to C++17. This is related to #37.
+
+commit c087433eceaa9ead1b3d968f0d7eb3873fe20b73
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Sep 29 19:28:25 2020 -0400
+
+ Internalize column_store_type.hpp header file.
+
+commit 1e0290e888e92675a0826b2facedf1985bad17f4
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Sep 29 19:12:41 2020 -0400
+
+ Remove get_column() and get_columns() from model_context.
+
+ model_context_impl will continue to have them.
+
+commit f77ab7591bfc95a542218cceda566ea1d5960491
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Sep 29 17:18:48 2020 -0400
+
+ Mark these methods deprecated.
+
+commit aa10eacfee3af66955cb4ef6e605860e165dc971
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Sep 28 17:33:43 2020 -0400
+
+ Set the version number up to 0.16.99 and the API version to 0.17.
+
+commit 3ae006fae016f1d169501216b673879a17a6554f
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Sep 28 17:13:31 2020 -0400
+
+ Adjust model_iterator to use detail::model_context_impl instead.
+
+ This is in preparation for the future removal of get_column(s)
+ methods from model_context. (#38)
+
+commit def5cc4b6c7d846b05714e7495eddf0346ec401c
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sat Sep 26 13:34:26 2020 -0400
+
+ Update CHANGELOG.
+
+commit 5bb042296272e82a9b80489223dccfe87d4a9108
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sat Sep 26 13:27:18 2020 -0400
+
+ Set version number to 0.16.1.
+
+commit f5571274b3a8ee06f30dbf75c054ab78cc966b99
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Sep 23 21:28:18 2020 -0400
+
+ Work around the floating point rounding errors esp. on 32-bit platforms.
+
+ This is related to #39.
+
+commit 49c0b5fdfc315bdec5a111b118ce025b6365dc01
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Sep 23 20:35:35 2020 -0400
+
+ Make the size of void* available as a macro, and use it to ...
+
+ ... specify uint32 as the size of string_id_t on 32-bit platforms.
+
+ This is related to #39.
+
+commit 41b79d2a1ddb170abbf978161e48c8118da8fa12
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Sep 21 21:15:57 2020 -0400
+
+ Print the min and max values of string_id_t.
+
+commit 6b1c2e308e903536ca7bc9584215f1d68ed13222
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Sep 21 21:12:18 2020 -0400
+
+ Check the size of string_id_t which is an alias to uint64_t.
+
+commit 931219140de262da261cbebdde578f40a2d19b1b
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Sep 21 21:00:58 2020 -0400
+
+ Add a debug statement in case we have an invalid string index.
+
+commit f9b8a29cf96cda39bfd36ffda64e942f17fa0f1e
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Sep 1 21:04:13 2020 -0400
+
+ Move the old package download table out of README.
+
+commit 04642ce02382f242efc476d04060c7ac68a58441
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Sep 1 20:59:18 2020 -0400
+
+ Typo.
+
+commit 220f5ea876744655c32c2e27de444f77b054f999
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Sep 1 20:47:34 2020 -0400
+
+ Use the prefix without the 'lib' for package URLs.
+
+commit f7cd800a2787c112b2e1da13249f1c30f940531a
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Sep 1 20:44:59 2020 -0400
+
+ Add script to generate the release page template.
+
+commit ced976c201d9dd6177c6051ccee0efde0b7af002
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Sep 1 20:10:46 2020 -0400
+
+ Populate the CHANGELOG from the 0.16.0 milestone task list.
+
+commit 5e8e63bb3b3bf4c6127ee0ded0e388c47b64efdf
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Sep 1 19:45:04 2020 -0400
+
+ Add a space in between.
+
+commit 1727664370aef3b0433fbc00def439edbbddb01e
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Aug 31 23:42:26 2020 -0400
+
+ Fix build with Visual Studio 16.
+
+commit 29952cd406c5b704d92eb5ddd3c2ed39ac62fe75
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Aug 31 20:49:30 2020 -0400
+
+ Fix make distcheck.
+
+commit 1494c38fc6a78249a7565c26e5a785e3e10057fe
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Aug 31 20:16:46 2020 -0400
+
+ Set the version number to 0.16.0, in preparation for the release.
+
+commit 1bf35e21626249375530067296cdd0ff7c8a711f
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sat Aug 29 12:23:19 2020 -0400
+
+ Let's not call them "planned" features.
+
+ They may or may not be implemented, depending on time and interest.
+
+commit d6d27b77d5053a8c512805be29b5c64256239ef5
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sat Aug 29 12:21:29 2020 -0400
+
+ Omit manually printed function names from the debug outputs.
+
+commit f77e226acdefccfe579eac0d4bd4589160652de0
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sat Aug 29 11:03:15 2020 -0400
+
+ Remove spdlog bits from doc and cmake build script.
+
+commit 196479d26c2cedfed9231de2d22ce01dc1611425
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sat Aug 29 10:51:17 2020 -0400
+
+ Tweak the logging output prefixes.
+
+commit 9b187523e5105da85ccc235762a9fa1c78976839
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sat Aug 29 10:36:46 2020 -0400
+
+ Replace all uses of SPDLOG_DEBUG and _TRACE with IXION_*.
+
+ While spdlog is great, my need for logging is limited to compile
+ time and wasn't worth the extra hussle of having another run-time
+ dependency. IXION's own logging is very simple, and is inspired by
+ the logging facility implemented in LibreOffice which was done by
+ Stephan Bergmann. That said, the one in ixion is very simplified
+ version of LibreOffice's logging.
+
+commit 69279d8d3b43f5e4711ba521628675b1177e7b5a
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu Aug 27 21:08:37 2020 -0400
+
+ matrix class to no longer allow storage of string ID's.
+
+commit 266d0f951c27ef5c673ab2d11784958071d26b0b
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu Aug 27 20:46:54 2020 -0400
+
+ Add test for retrieving a single string value from an array result.
+
+ With this, I can remove the TODO marker.
+
+commit 1aa58b66b6ea3f1c0f47c5b1cb788814f330696b
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu Aug 27 19:57:40 2020 -0400
+
+ Rename get_string_value() to get_string().
+
+commit 7ea3235d409e7e655344161fc0c2432838151b82
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu Aug 27 19:49:01 2020 -0400
+
+ Let's switch to event notification method.
+
+ This way I only need one virtual method & it can be extended to
+ add other event types if needed.
+
+commit 647e97171d5111bcca40577f0f2c48d1b456b56c
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Aug 26 23:25:33 2020 -0400
+
+ get_string_value() on empty cell should return an empty string.
+
+commit 479f682ea9ad27c28cacc1c3493fcd33ad25ee64
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Aug 26 23:05:02 2020 -0400
+
+ Store the wait policy directly in model_context, and switch ...
+
+ ... between the two policy modes automatically before and after
+ the calculation. In theory we should be in block mode only during
+ calculation.
+
+commit 9a375dc22481eb4e50d430a7ff97762392c67b46
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Aug 25 21:51:51 2020 -0400
+
+ Introduce a policy on what to do when querying for a formula ...
+
+ ... result when the result itself is not yet available. With this,
+ I can retire the *_nowait() methods.
+
+commit cf63d04c4dec7d836287b6cf4d4bc29729000258
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Aug 25 20:37:00 2020 -0400
+
+ Actually this method no longer makes sense, since formula cells ...
+
+ ... don't produce string ID's anymore.
+
+commit 62caaa5cf0aa9b66f808667492e2a97814f3eac2
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Aug 25 20:26:38 2020 -0400
+
+ Formula cells no longer produce string IDs.
+
+commit 8115bb08c0a6a75018d11075fa1a2a8e09f2f1d0
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Aug 25 20:17:03 2020 -0400
+
+ formula_result to no longer allow storing of string_id.
+
+ And rename the 'string_value' enum member to just 'string'.
+
+commit 04e2face20b750f2392bf4ed6243b28d23b88de6
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Aug 24 22:55:10 2020 -0400
+
+ Switch to storing raw string values in formula results for real.
+
+commit 0858319efc83e20621ab35187c6b8d8b9752aa5b
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Aug 24 22:51:29 2020 -0400
+
+ Add the ability to run gdb and valgrind with python interpreter.
+
+ This is copied from orcus.
+
+commit f7ece24cd5f487275d304702b4950d1cc67741fa
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Aug 24 21:39:17 2020 -0400
+
+ Support storage of raw string values in ixion::matrix.
+
+commit 3e2d6aa4c824f25ee9ec60f1b308742b61f25a99
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Aug 24 21:03:25 2020 -0400
+
+ Add a string_value result type and in formula_result, and ...
+
+ ... allow storage of raw string values in formula results. It is
+ not yet used. Also, I need to adjust ixion::matrix to allow storage
+ of raw string values there too.
+
+commit 2cb3b6157e0012419299b97eaabfdef6e185d380
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sat May 23 10:02:32 2020 -0400
+
+ Fix the cmake build with MSVC.
+
+commit 49a7280b735e8c67ccb7c3bb363ad4473a19691c
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri May 15 22:39:34 2020 -0400
+
+ Expose the formula function name to opcode function to public.
+
+ Also add function docs and make the size of the opcode explicit.
+
+commit 076f6576e7398842457d34fd68140512795c7e00
+Author: Lars Wendler <polynomial-c@gentoo.org>
+Date: Fri May 15 12:42:20 2020 +0200
+
+ configure.ac: avoid bashisms
+
+ or else we end up with unpredictable results if shell != /bin/bash:
+
+ ./configure: 19427: test: xno: unexpected operator
+
+ Reported-by: Matt Whitlock <gentoo@mattwhitlock.name>
+ Gentoo-bug: https://bugs.gentoo.org/723128
+ Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
+
+commit bf9b343de50ce8d3f5a670db699e30c600327ca8
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon May 11 19:18:48 2020 -0400
+
+ Add links to the quick start sections.
+
+commit 7493472d473858ab3e39e61cb0224d43cbee1634
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon May 11 19:12:08 2020 -0400
+
+ Tuck the Matrix section under Types.
+
+ Thereby leaving room for possibly other types to come in.
+
+commit 79a836f214189047b28efe5ad35e74d97f76b968
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sun May 10 13:53:00 2020 -0400
+
+ Add a link to the complete code example.
+
+commit 5031816a99f9cd8fa69db64da4760ef8f4f4166d
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sun May 10 13:47:19 2020 -0400
+
+ Add a section code example for cell_access.
+
+commit 8e36882fd655e4099eed525eb733bc9eaacaf0e6
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sun May 10 12:54:12 2020 -0400
+
+ dirty_cell_tracker doesn't make use of formula_model_access.
+
+ And in theory it shouldn't, as it does its things purely based on
+ cell and cell range addresses.
+
+commit ac21faeb8ab536e2b2f1024662a15bca1212ca77
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sun May 10 12:51:59 2020 -0400
+
+ Add missing types and classes to the doc.
+
+commit 01ace390ffaf102e0eba18e45d9b596287049838
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sun May 10 12:17:49 2020 -0400
+
+ Tweak the wording.
+
+commit 625c28cdfd9d6f26af1fa55659f43a872fee3b6a
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sun May 10 12:10:13 2020 -0400
+
+ Add some verbiage to the front page.
+
+commit 50aacbbb49c757a4f36a4f8b96df3dca85dabc85
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sat May 9 21:12:48 2020 -0400
+
+ Re-word project summary.
+
+commit 48719838034579982575f0e737887cc839a7b7a2
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sat May 9 12:31:42 2020 -0400
+
+ Example code should be more liberally licensed. Let's use MIT license.
+
+commit 510ce08ffbf36edda0522a8bc37050b5b3d423b7
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sat May 9 12:23:31 2020 -0400
+
+ More on documenting the global types.
+
+commit 0d86ef3039d4b56a04287ed20eb2b346309140af
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sat May 9 11:35:50 2020 -0400
+
+ Add rst files to slickedit workspace.
+
+commit fd443f2f8b5618107b2bc31ce2f58527626b2c8b
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sat May 9 11:32:59 2020 -0400
+
+ Rename Overview->Quickstart for the Python API section too.
+
+commit a1acef326962d7dab7bfcd5f41105e1964ec8c40
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sat May 9 11:31:31 2020 -0400
+
+ Add some very brief project overview.
+
+ This needs to be expanded later.
+
+commit a5f90ee11c56071d851293befc10390efe4fcff9
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sat May 9 11:20:52 2020 -0400
+
+ maxdepth of 2 is probably more convenient.
+
+commit 9b08d1c9f5a17541ed8befd971bd3cc13ac8a6da
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sat May 9 11:18:34 2020 -0400
+
+ Move all formula related sections under a common 'Formula' section.
+
+commit 18c4d70a1aa47db01ce479539768dbf0d94bfc3f
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sat May 9 10:45:46 2020 -0400
+
+ Moving sections around for (hopefully) better organization.
+
+commit 1af29b12d0d4a8d01dbd8c4ea599b03d6f2db403
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sat May 9 10:13:54 2020 -0400
+
+ Sigh...
+
+commit 1e8e70147fa8afa58535c36f961f68f7da57c800
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sat May 9 09:45:20 2020 -0400
+
+ Change the section title here too.
+
+commit 90b9008e9a6ec87556ffd8b908b57217ff0f5840
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sat May 9 09:41:22 2020 -0400
+
+ I need to rename it here too.
+
+commit aedfd971acb71e77a940413970e2ead1041c8348
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sat May 9 09:38:30 2020 -0400
+
+ Rename C++ Overview to Quickstart.
+
+commit 6ff9650c33c38af20c8688fe4b4de8dae9ced028
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sat May 9 09:15:48 2020 -0400
+
+ Drop hard-coded VS 15 generator.
+
+commit ca13a1875f832bb82b7d09cd2779e2f1abe8033b
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu May 7 20:51:29 2020 -0400
+
+ Finish up the "using document class" section of the documentation.
+
+commit 44f4e32b49648f3f44bd8fb386c9439252fee479
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed May 6 22:39:36 2020 -0400
+
+ Work on the "using ixion::document" section of the doc ...
+
+ ... and while at it, add a new constructor to the class to allow
+ specifying a non-default cell address syntax.
+
+commit f109d053aa24bd2ab0b026a344783f318637b1a6
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed May 6 19:36:29 2020 -0400
+
+ Add a new example code for using ixion::document.
+
+commit 1fc618f57ebf1d1f7fdf483c37103a49ca7b1365
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue May 5 22:05:09 2020 -0400
+
+ Add warning about registering and unregistering formula cells.
+
+commit 525e9dbd84488219fba8d047e5ec51058fd2d829
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue May 5 21:29:11 2020 -0400
+
+ Add a hook for writing doc on ixion::document.
+
+ To be completed later.
+
+commit d8177567bb3fcbc8eb25acf7d2d2c27b9ea7ba3f
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue May 5 20:52:10 2020 -0400
+
+ Update the sphinx documentation to include ixion::document.
+
+ Also organize the API around data storage a bit.
+
+commit 8f1c8f6910e59e89a9b8079e212212a22ca3b6e4
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue May 5 20:41:50 2020 -0400
+
+ Implement empty_cell() in document.
+
+commit 1ae04b33cd11b35bf93f0aea536a443c829fba40
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue May 5 20:13:05 2020 -0400
+
+ Deprecate erase_cell() method both in model_context and ixion.Sheet.
+
+ Let's call it empty_cell().
+
+commit cfedc8b3efc5eae48774f42422ebaa05f1a9da77
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon May 4 22:37:52 2020 -0400
+
+ Don't forget to unregister formula cells when modifying cells.
+
+commit 891b17a04565ba89a4c890ee0e09720791c52a0d
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon May 4 22:22:35 2020 -0400
+
+ Add boolean I/O and a test case for it.
+
+commit 1acd666b9a76a85df043fb9a2c7a9d0dbd9e9335
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon May 4 21:44:49 2020 -0400
+
+ Add string I/O to document.
+
+commit ed316fe75de7f16cbdda5ea5ba38f98b041f1d32
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon May 4 21:10:02 2020 -0400
+
+ Take care of running calculations.
+
+commit 567a110845830a89ed78069c1a5903857299e1ac
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon May 4 20:41:20 2020 -0400
+
+ Add bits for numeric value io & add a test case.
+
+commit d1f36c65afec60b6610dc5b489a36423250cf9a2
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon May 4 19:46:51 2020 -0400
+
+ Add a skeleton ixion::document class definition.
+
+commit 9f3ac7f3d63ee9e7f366ed80019bd1e8e47deae4
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sat May 2 12:37:15 2020 -0400
+
+ Add cell_access to the documentation.
+
+commit 1e17eee6ba9570d1d0e2b2a01323470c8225a8ac
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sat May 2 12:23:18 2020 -0400
+
+ Add some hint.
+
+commit 350b1597d40cc507deaa6eea320138653ba37059
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sat May 2 12:08:22 2020 -0400
+
+ Clarify the expectation of those range set parameters.
+
+commit ba402b369316aa4f40955f0811ce79e37f858e0c
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sat May 2 10:36:28 2020 -0400
+
+ Add a bit more example to the quickstart page.
+
+commit 8bc777e5bffc8978045231d7af8243cc8d4e9284
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri May 1 22:43:17 2020 -0400
+
+ Extra guard protection.
+
+commit d957d3706c04d26b83e3d595e0403bae3be12997
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri May 1 22:32:24 2020 -0400
+
+ No need to manually prefix library name with 'lib' in cmake.
+
+ I believe that's done automagically when building it on unix.
+
+commit f5401b79f861a3027aaa22b96bb80a0802f878dd
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri May 1 22:26:16 2020 -0400
+
+ Fix MSVC build.
+
+commit 5d9fe99309513bf3c0eb7e7dcd16b8be4cc8cf7d
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri May 1 21:45:35 2020 -0400
+
+ Add cell_value_t enum which factors in formula cell result type.
+
+commit 69fe820d9aa33e928985e79c6001aa52d0a50d37
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri May 1 21:12:13 2020 -0400
+
+ Add test case for cell_access's get_string_value().
+
+commit d94fcf78b1deb50861d7010c282c9696e6246063
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri May 1 20:53:18 2020 -0400
+
+ Add get_string_value() to cell_access.
+
+ Test code will be added for this later.
+
+commit d95e31efc4dac954ba1d4434f5b3a0329ad78cc8
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri May 1 20:08:20 2020 -0400
+
+ Add methods to access four types of cell values, and ...
+
+ ... use them in model_parser.
+
+commit e73090e1b16b72d279fa642cde41121d684050ec
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri May 1 18:48:59 2020 -0400
+
+ Set up cell_access class.
+
+commit f8edefb81f15dc5df1c542dbc87204cea71142cc
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu Apr 30 21:58:03 2020 -0400
+
+ Use mtv's position objects to avoid double lookups of cell position.
+
+ First to get the cell type, and second to retrieve the cell value.
+ Use of position objects will avoid this.
+
+commit e2b166af8450c958f676dcd25a35b00d9b3ab954
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu Apr 30 21:30:52 2020 -0400
+
+ Add get_string_value(...) method that returns actual string value...
+
+ ... instead of a string identifier.
+
+commit fd05b1be4b1148328dd54e9fe3e63d65bac20f25
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu Apr 30 20:25:45 2020 -0400
+
+ Produce a better exception message when a numeric result is requested ...
+
+ ... on a string result.
+
+commit 8df4d85fee2924bdb2ff4401762f07ccf8e8ea40
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu Apr 30 19:08:09 2020 -0400
+
+ formula_error to optionally store a specific error message.
+
+commit 902abb6c4ab46dfa888e222b6a37846fb6e2337f
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Apr 24 21:20:51 2020 -0400
+
+ Print both opcode name and its representation string.
+
+commit de1fbd8c5443072f7cea1d3a6904fd039d76b649
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sat Mar 28 14:19:03 2020 -0400
+
+ Fix windows build wrt M_PI constant.
+
+commit 2a0591855123bbeaaaf846c760c27ea24db46d8b
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sat Feb 22 11:36:58 2020 -0500
+
+ Add a URL to the complete source code example.
+
+commit 579ffa487e600c02c15993b1ae20bccbe67b359f
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sat Feb 22 10:42:04 2020 -0500
+
+ Finish up the last sub-section to conclude this section.
+
+commit 7a2a51d5f42b09286f7c77f64a412ce044286666
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Feb 21 11:57:49 2020 -0500
+
+ Remove weird sentence.
+
+commit 37ef219ef4b3093e4c8ed4ae481268aedbcfdb88
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Feb 21 11:50:18 2020 -0500
+
+ Finish up the rest of the sub-section.
+
+commit 0e27e88eb02dfe08d525bc072cb7c4dcb8ff474f
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Feb 21 10:50:56 2020 -0500
+
+ Move the Overview to Quickstart, and tuck it under a parent Overview.
+
+commit 23e4de7ec5595031b37f6a3c1f7dd1935e957328
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Feb 21 10:40:26 2020 -0500
+
+ More editing of doc.
+
+commit 0a2750c38f5d8616d1044ac93eed6098ce4c1700
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Feb 19 19:27:31 2020 -0500
+
+ More editing.
+
+commit c053f03a31795ca8aacbff9b013ef580a93029a7
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Feb 19 09:37:34 2020 -0500
+
+ More editing of the doc.
+
+commit cba6ac19762693c5ab675a863f42dc1a1c5c23da
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sat Feb 15 16:15:01 2020 -0500
+
+ Annotate the first section.
+
+commit f9cc76fe9eede1929ca0a46e1c18ff52253b38fb
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Feb 14 09:03:41 2020 -0500
+
+ More files to ignore.
+
+commit 1a09a8aebaeb15ee4c4bbf514dd63fafbe518468
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Feb 14 09:02:52 2020 -0500
+
+ Set up the C++ Overview section and add code snippets.
+
+ Text body to be added later.
+
+commit ac54622159b54b43fb8b9b8a50783d797333ea00
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Feb 12 09:16:46 2020 -0500
+
+ Re-work it a bit.
+
+commit 2bbbcb572bc029319bf73ef45cc966b38a000321
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Feb 12 08:49:47 2020 -0500
+
+ Remove formula cell and insert a new one.
+
+commit 0f4f8e300ccbe0f0d8fd8c719861338e1b739c86
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Feb 11 19:33:41 2020 -0500
+
+ Pass the formula cell pointer to register.
+
+commit bb31e0aaf1f9a9f12b13defdb0af3e39e90d35c1
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Feb 11 19:18:04 2020 -0500
+
+ Rename IXION_DEBUG to IXION_LOGGING because it's literally for logging.
+
+commit 2360ef0e943dfcf3a2103826fa6ae4308b529d85
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Feb 11 19:14:04 2020 -0500
+
+ Add --enable-debug-utils and use it for extra check when ...
+
+ ... registering formula cells.
+
+commit 747877aff8268a9d603b283fe4a24bdf90cb9692
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Feb 11 18:36:26 2020 -0500
+
+ register_formula_cell(...) to take an optional formula_cell pointer.
+
+commit b712a38eaa9e0a12c5bb0dc3cc9661bee029ed1b
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Feb 11 10:56:11 2020 -0500
+
+ Have set_formula_cell(...) methods to return a pointer to formula_cell.
+
+commit f94cc48732889b8d9bca6d80d1d5e67d145c8b5d
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Feb 11 10:26:37 2020 -0500
+
+ Rename model-context to model-context-simple.
+
+commit f5ba5dbdb26dac2365652ddff43dfeef24a90fb0
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Feb 11 10:25:12 2020 -0500
+
+ Complete the code example.
+
+commit 9b2043fe61a5cbca947201926e86e4ac9b134edc
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Feb 10 23:11:24 2020 -0500
+
+ Add an example code to use in future documentation.
+
+ More to come later.
+
+commit faf43b8ecaf63a528e32c6c304c64f32ff7c4370
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Feb 10 10:12:26 2020 -0500
+
+ Remove get_string_identifier(char*,size_t) from the model access interface.
+
+ And rename it to something else to avoid confusion.
+
+commit f0703363a2d085c7f140f9710b4a12d461c15281
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Feb 10 09:27:35 2020 -0500
+
+ Move the string pool code into its own class.
+
+ And synchronize the add_string() method.
+
+commit 492831552871bf6862f6c80456f2efcf461d006b
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Feb 10 08:38:38 2020 -0500
+
+ Adjust stack_value to store a raw std::string value.
+
+commit de2ce7376508c92431499edc66106652de877d48
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Feb 5 13:06:56 2020 -0500
+
+ Revert "Add a get method that takes a name."
+
+ This reverts commit b900d2bd9d2b51379acdd81adfd69e1726c0a92c.
+
+commit b900d2bd9d2b51379acdd81adfd69e1726c0a92c
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Feb 5 13:04:43 2020 -0500
+
+ Add a get method that takes a name.
+
+commit 20d13d85a1550712806c62d272e49891ba00da23
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Feb 4 22:32:25 2020 -0500
+
+ Add size() that returns the number of named expressions.
+
+commit a208e22569dc342a0429ba4547408f7328d52168
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Feb 3 14:40:57 2020 -0500
+
+ Add a test case for storing named expressions with their origins.
+
+commit 62e29ab0f1faae195d3831775941c6cb78b99c06
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Feb 3 14:17:25 2020 -0500
+
+ I forgot to add this file.
+
+commit 51b14522e2f62ad33f55a93ea316756cdebf62e2
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Feb 3 14:00:18 2020 -0500
+
+ get_named_expression() to return named_expression_t*.
+
+commit ee05a97585f07c740f59f59c96b6fce3b65def82
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Feb 3 13:32:48 2020 -0500
+
+ Add variants of set_named_expression() that take the origin cell position.
+
+commit 51be2a7d8821cf82ad9a555f472f9a483b1df306
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Feb 3 13:21:12 2020 -0500
+
+ Change the backend storage to make room for the origin value.
+
+commit 042b6092cc9fa408e29de1f89a8bc3352a52c3d6
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Feb 3 11:46:10 2020 -0500
+
+ Make sure we can't change the sheet size after the fact.
+
+commit bb199950a4ac3750902c9ec70ff282e8edca146a
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Feb 3 09:15:14 2020 -0500
+
+ Specify the sheet size at model_context construction time.
+
+commit be1711ad5c7a7c98c3b06113e03fc9928710ea63
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu Jan 30 10:25:23 2020 -0500
+
+ Re-organize the opcode printing piece a bit.
+
+commit 43993020942148f1625e106472a65ca1b4744753
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Jan 29 19:05:19 2020 -0500
+
+ Let's not print anything on error tokens.
+
+ We'll wait until we have a concrete use case for printing non-empty
+ strings for error tokens.
+
+commit 1b7ee66ee6cb33f182ca034e0b65b06de5efcc5e
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Jan 28 20:47:41 2020 -0500
+
+ A bit of cleanup around logging output.
+
+commit d1874e96c48fa4cc6bfa8fdd428215b9713e826f
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Jan 28 13:30:22 2020 -0500
+
+ Specially craft formula string output for error formulas.
+
+ And for now, I'm turning it into json.
+
+commit dd2ab1bbd0f3bd92c2e270841fc0b2e617c82d4a
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Jan 28 12:39:10 2020 -0500
+
+ Create a dedicated token for invalid formula condition.
+
+ And have it store the number of message tokens that follow.
+
+commit ad4c1cd3fb01becf18ae7cfbd3f60dab88f9b0e1
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Jan 28 10:15:16 2020 -0500
+
+ Add another public function to create formula error token set.
+
+commit 6e4a7c1138dbafb342b29784fe88cf2c6b698c47
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Jan 27 13:59:07 2020 -0500
+
+ Add a test case for iterating over sheet local named expressions.
+
+commit bdf85dbd4f5f8bbb2b5c0941e0d2b499697e4323
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Jan 27 12:54:40 2020 -0500
+
+ Add a test case for iterating through global named expressions.
+
+commit a6b66bbd1e4cbb38c021c167bf57704086848bc8
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Jan 27 10:56:32 2020 -0500
+
+ Initial implementation of named_expressions_iterator. Not tested yet.
+
+ This change also moves model_context_impl into a separate set of files
+ in order for it to be accessible outside of model_context.
+
+commit 12d10e926e656e04045234935c1687673aa53823
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Jan 24 13:09:37 2020 -0500
+
+ Fix handling of nested scopes involving [] and ''.
+
+commit ccc9f0f5007bffc313f214531a37a7450c8e9bd6
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Jan 24 12:05:08 2020 -0500
+
+ Handle a lexer name that contains a single-quoted segment.
+
+commit a65528d770741ee51647892cc466e73e2d6d143c
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu Jan 23 18:26:46 2020 -0500
+
+ Parse empty string tokens correctly.
+
+ This fixes e.g. =IF(A1="","A","B") becoming =IF(A1=,"A","B").
+
+commit 7825cc33c567b891165fbcfc6af22298fbb1452c
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu Jan 23 15:21:29 2020 -0500
+
+ Implement PI and INT built-in functions.
+
+commit bb2b89c0863fdd499d92f374ac4020ccdbb9c815
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu Jan 23 13:15:30 2020 -0500
+
+ Correctly resolve a named expression in ODFF resolver.
+
+commit fae7341565e7fd9aaa4941c26ac12da238693fb8
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu Jan 23 12:49:30 2020 -0500
+
+ Add tracing on inserted named expressions.
+
+commit 60b0f11f4c3e07899acaad64b18a2a98a1aeeb54
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu Jan 23 11:00:25 2020 -0500
+
+ Add trace statements, mostly to use the to_string() function.
+
+commit 03494ddd002bdd70879e0ed6d38fe27340419717
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu Jan 23 10:43:41 2020 -0500
+
+ Add a set of test cases for the new ODF cell-range-address syntax.
+
+ And it passes! For the record, this syntax also cover ODF's
+ cell-address syntax (9.2.1) as well.
+
+commit 5e90ad585bca651547337216b3a43d673ae2c5c6
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu Jan 23 09:51:29 2020 -0500
+
+ Refactor calc_a1_resolver into dot_a1_resolver with func objects.
+
+ And use it to create a new resolver for ODF cell-range-address syntax.
+
+commit ec142f3d10aded0e89a94868b1c73e00a6ae8a8f
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Jan 22 14:53:16 2020 -0500
+
+ Add a method doc, to make it clear that the base sheet position ...
+
+ ... is to be used when the reference string does NOT contain an explicit
+ sheet name.
+
+commit 89ff83b481c4ef33c52cb8a223f42fe0479d6eaf
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Jan 22 07:52:45 2020 -0500
+
+ Retire DEBUG_NAME_RESOLVER in favor of using spdlog.
+
+commit 866f8327d40df2185738fef3f0261c1ccb8b7d44
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Jan 21 22:29:56 2020 -0500
+
+ Remove this comment as this is no longer true.
+
+commit 8aaa34d23334af2839b047cdc64b674b60984f92
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Jan 21 17:27:05 2020 -0500
+
+ Add a test case for ODFF resolver...
+
+ ... to make sure the ODFF resolver doesn't have the same issue I
+ just fixed in the Calc A1 resolver. Turns out it does not.
+
+commit 1701b8894ea43ba476e32727ec5cd9c36acc9a3e
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Jan 21 17:24:57 2020 -0500
+
+ Add a few more test cases and fix the handling of absolute sheet flag.
+
+commit f46a1cb98ff6eebe883f40e89972e8802fa07df3
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Jan 21 16:00:31 2020 -0500
+
+ Ensure that it resolves relative sheet indices correctly.
+
+commit 7fcdb2fc4c0da2a266adba37a89e04be97c64eef
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Jan 21 15:50:49 2020 -0500
+
+ Correctly handle multi-sheet range references.
+
+commit 459506839fd289e3d49bb8c6bfae32eb63e5f006
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Jan 21 14:22:01 2020 -0500
+
+ Add range reference round-trip test cases for Excel A1 too.
+
+ Turns out we didn't test this function.
+
+commit 8cacc92b263dab877985b4a5b44f87e87ac79058
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Jan 21 13:54:01 2020 -0500
+
+ Handle Calc A1's absolute sheet names.
+
+commit d396b2eaf6a9ead2b4b77b1cb26dcc93fa536c92
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Jan 21 13:49:53 2020 -0500
+
+ Add absolute address markers to stir things up.
+
+commit 3056974f3e2b258295aa788a691e49ba59f3c8c4
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Jan 21 13:45:57 2020 -0500
+
+ Remove duplicate code blocks.
+
+commit d8f017d92329d65c344a89909f49cc3a6f333278
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Jan 21 13:35:45 2020 -0500
+
+ Handle absolute sheet names correctly & handle range references.
+
+commit 35ae51cff6c9c1a5d604749d53470ac67f5b2ea2
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Jan 21 11:38:41 2020 -0500
+
+ Initial Calc A1 resolver implementation.
+
+ Mostly a copy-n-paste from Excel A1, with different sheet name separator.
+
+commit 6a4f4bfd2d17eafe910b0750cc9f6fc199403393
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Jan 17 17:51:44 2020 -0500
+
+ Let's not catch all exceptions silently during formula tokenization.
+
+commit 72c0e62782056b091b8d161a3808bbe2e14e27e6
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Jan 17 11:44:40 2020 -0500
+
+ Make sure we print in-equality opcode tokens correctly.
+
+commit 489fef59813114a9421d2b497a0eaae42c5fb34d
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu Jan 16 19:44:20 2020 -0500
+
+ Fix build MinGW Boost linking errors.
+
+ This is related to #25. Thanks for Stefan for pointing this out.
+
+commit b914abfc123e1916edb489390adca0d38a445f50
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Jan 15 14:25:01 2020 -0500
+
+ Implement print_formula_token() (single token as opposed to multiple).
+
+ This is related to #24.
+
+commit 4f8a3a816f268d0076cd92a4cfd71c8857e3649c
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Jan 14 11:08:20 2020 -0500
+
+ Add a test case for the newly-added concat (&) operator.
+
+commit 5806d72aa73cb1725b8804fe2de2b82f33d7ba3c
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Jan 14 11:02:47 2020 -0500
+
+ Implement a concat (&) operator.
+
+commit 9b9b9bc5a5a2dcf1963e765924dad75239e15c92
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Jan 14 09:23:13 2020 -0500
+
+ Probably not a good idea to set this resolver instance static.
+
+commit 823c897d3c24c64ac924662dd88e9723aaaf72e6
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Jan 14 08:11:36 2020 -0500
+
+ Recover from a parsing error on numeral, and fall back to parsing it as a name.
+
+commit a2ce99cb1158f3f3b3602b81d163b77608b49ce0
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Jan 13 20:33:03 2020 -0500
+
+ Add meat to the test case.
+
+commit 5b8e807366d7e07015a44c56c6aeabf23593505d
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Jan 13 16:00:25 2020 -0500
+
+ Add a new test case and partially implement it.
+
+ Also in the test debug output, include sheet indices.
+
+commit 56b377095464bc53b752b934b8c326d3b7c3a1d1
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Jan 13 15:17:41 2020 -0500
+
+ Iterate through sheet range when adding or removing range listeners.
+
+ This code is not tested yet.
+
+commit 56837f1ff3ec7f2b9ef43fe86687a65ffcc41437
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Jan 13 15:05:35 2020 -0500
+
+ These are redundant. abs_range_t::valid() checks the same condition.
+
+commit 561c587b9baf3213000d693b57354c5eb2b0d4e6
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Jan 13 15:00:38 2020 -0500
+
+ Officially allow a range of sheets in abs_range_t.
+
+commit 631ea8d05ed0a2687bf3657cf0a2a27d873b548d
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Jan 13 14:12:08 2020 -0500
+
+ Print the source range too.
+
+commit 56f3dc41f30fc8200f3b92f4281efd96fd0ad303
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Jan 10 16:09:32 2020 -0500
+
+ Handle odff sheet range where the second sheet name is omitted.
+
+commit f037890603f5ce05f95aa98ec44ec31aba3a788f
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Jan 10 14:38:21 2020 -0500
+
+ Handle invalid sheet index correctly.
+
+commit 4187207987a452d08eea42be732f245ee48725b3
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Jan 10 11:22:13 2020 -0500
+
+ Do the same check in all the other places.
+
+commit ee8e90e85c74d1a4fe921b6a6f5fa308632c0654
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Jan 10 11:06:27 2020 -0500
+
+ Throw a more specialized exception.
+
+commit 0463b3a80eacba307e577b3fd7b5e437b079359e
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Jan 10 10:54:52 2020 -0500
+
+ Check for a valid sheet index, and throw if invalid.
+
+commit c2ea69a9d845492d461083be614432868c1cd1b0
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Jan 7 11:05:05 2020 -0500
+
+ Let's make the implicit sheet address absolute, not relative.
+
+commit 1c851b1ac34f52b2431dd268c87bef77453ef4e3
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Jan 7 11:02:28 2020 -0500
+
+ Add another constructor that takes abs_address_t and column and row spans.
+
+commit 45b2fc44a7452d4c44bedcd466bd4273bad9ba5d
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Jan 7 09:23:37 2020 -0500
+
+ Properly parse ODFF addresses (both single and range) containing sheet names.
+
+commit f431f05e49034b2180a1f12f9bef64c1b895e5f6
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Jan 6 20:56:45 2020 -0500
+
+ Nobody appears to be using these error condition tokens.
+
+ Probably a relict from the earlier prototypes.
+
+commit a539339de6adde95e5fb22de92057551b3d5e56f
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Jan 6 20:36:53 2020 -0500
+
+ Use char values rather than literal strings.
+
+commit b3366b002ffa8666105b11e8c366d7e9e924045f
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Jan 6 20:31:20 2020 -0500
+
+ Add support for the exponent (^) operator.
+
+ This addresses #21.
+
+commit f835f0f10310069c2d26559fb84f012797ace365
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Jan 6 14:30:11 2020 -0500
+
+ Add test case for cached formula results for grouped formula cells.
+
+commit b3129ba7b641f3186b8c07acdf99ca298ee14d8d
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Jan 6 13:39:15 2020 -0500
+
+ Support all four result types.
+
+commit 999b70336457c564b78e629795348e2774fada6f
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Jan 6 13:30:13 2020 -0500
+
+ Allow initialization with precise error value.
+
+commit 9ab4db6922e76bb641a5718bd02cce9dde1c5f7c
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Jan 6 13:04:23 2020 -0500
+
+ Add method to define grouped formula cells with cached result values.
+
+commit fd62705816cab649813f1dbe2154a8c6798c49aa
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Jan 6 11:52:52 2020 -0500
+
+ Add a test case for storing non-numeric values to matrices.
+
+commit ebb2a5b3e5a0a54fd81c3940a8f1ddda3801aaa7
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Jan 6 11:46:53 2020 -0500
+
+ Support setting cached results to grouped formulas.
+
+commit f8e1c4155604eb262a3a12ab01000b03bd5a5b59
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Jan 6 11:01:41 2020 -0500
+
+ Support storage of error values in matrices.
+
+commit 09af51b961cb549cdb563efac8d180c3734ab8ef
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Jan 3 11:51:15 2020 -0500
+
+ Reordering of the formula_function_t members breaks API compat.
+
+ Therefore up the API version.
+
+commit 2f860bf9ba1c1ec9d6c9ee8bd80d1e6d72a1d281
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Jan 3 11:47:50 2020 -0500
+
+ Try to use the variants of set_formula_cell() that takes token stores.
+
+commit e3f85fc09f42429c34c4eaa5407990c8fb123fc5
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Jan 3 11:34:30 2020 -0500
+
+ We need a variant of this set_formula_cell that takes formula_result.
+
+ To be primarily used by orcus.
+
+commit bbf1f9e1eaddbcbac7e2e75de87c0c4f0f2a8ee8
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Jan 3 11:03:56 2020 -0500
+
+ Set the version to 0.15.99. It's officially a next-release development.
+
+commit cbedadd740f512ef2c14748bed1020034da8e2f6
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu Jan 2 15:16:47 2020 -0500
+
+ Add a method doc.
+
+commit 3a27a89a5f66479ff89124261a88bcafe37b5310
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu Jan 2 14:52:04 2020 -0500
+
+ Make sure it also works with cached error results.
+
+commit 08c5edd269e091734dcd6f7ad108aa967a960d61
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu Jan 2 11:51:55 2020 -0500
+
+ Add result-cache mode and get that to work as expected.
+
+ This commit also includes a brand-new test case.
+
+commit 5f12a8d01d44e6bd65df1612f4648193ba0e70c5
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Dec 20 14:38:11 2019 -0500
+
+ More descriptive error message.
+
+commit 1900475f72fa109fa31e28b7d80551a15a7a7051
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Dec 20 13:21:28 2019 -0500
+
+ Add trace on sheet insertion.
+
+commit 85296c2163bb61cfe732352d63aa7c826b422c3f
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Dec 20 13:08:44 2019 -0500
+
+ We can do away with just one version of append_sheet() here.
+
+commit 82b27f68b5e6bf94ea8de690b11ffbb9ccafc1b1
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Dec 20 11:35:51 2019 -0500
+
+ Add tracing statements during formula cell registration.
+
+commit 8ef603de776d777e75b201b74731dc2afbb4a6ca
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Dec 20 09:13:12 2019 -0500
+
+ Really correctly handle unset column or row ranges.
+
+ And add a test case to go with it.
+
+commit cdb6cf501eec2123adfa07df89a20792e5fd54ca
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu Dec 19 15:19:08 2019 -0500
+
+ Correctly handle unset column and row ranges.
+
+commit accc2331852992bf348e2737b21d61b0acc67a94
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu Dec 19 10:42:40 2019 -0500
+
+ Get the --sheets option to actually work.
+
+commit 577d095bf512085702e6283d63ebba8c2613c988
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu Dec 19 09:37:25 2019 -0500
+
+ Print formula cell information prior to calc when log tracing is on.
+
+commit 707a5a203da405a61ee25be4776e7b86401eb4af
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Dec 18 08:54:59 2019 -0500
+
+ Use this script to fill function name enum values and literals.
+
+commit 0acb9af5184f2620b0422e72af52e5e8348e4de0
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Dec 18 08:50:08 2019 -0500
+
+ Script to generate C++ code from function name lists.
+
+ And add a list of functions that are specific to ixion. Right now
+ there is only one such function "WAIT".
+
+commit c21020a8438ef93203a00fcbd49c61f8c756a957
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Dec 16 09:27:40 2019 -0500
+
+ Scan all function names from libreoffice repo.
+
+ All but a few. Some are skipped.
+
+commit 5515f92a1b9ade36ea413997a56540c24047709b
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Dec 4 19:11:22 2019 -0500
+
+ This is a very outdated illustration.
+
+commit c6dbafb9be570d191fe3bfa7513c95e0688cd29f
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Dec 4 19:08:29 2019 -0500
+
+ Quick-n-dirty script to extract function names from libreoffice code.
+
+ Use this script on formula/inc/core_resource.hrc.
+
+commit 7d3d1cfc8d7b68804e2eafb25c2c655fb94b29a4
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Dec 4 19:07:57 2019 -0500
+
+ We don't need this script anymore.
+
+commit 2d203c52cf8c031fb2e6720c661d30ed5221bd62
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Nov 20 14:43:53 2019 -0500
+
+ Handle disordered range references properly.
+
+ This addresses #18.
+
+commit 534786f659348c31b03e523d93c67a515a55b9bc
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Nov 19 14:44:41 2019 -0500
+
+ More on ensuring that a token exists before accessing it.
+
+commit 8bdf770492fd16e5d5862ad0717c0dd1c084a743
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Nov 18 15:12:43 2019 -0500
+
+ Support reordering of range boundaries.
+
+ We need this for handling ODS formulas which allow unordered range
+ values.
+
+commit 13d7e7991177335f485fda285fc3e5094cdbce53
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Nov 18 14:33:17 2019 -0500
+
+ Add a few missing function names to help the parsing process.
+
+ They are not implemented yet.
+
+commit f6e3409d4f8c6766a179c3692ff4d4dd112ecc84
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Nov 18 14:22:53 2019 -0500
+
+ Add debug statement for non-printing tokens.
+
+ And add a '<>' token to the list of printed tokens.
+
+commit cdf5f1c9bbbfca559cd49adb5442ad5739486f6a
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Nov 18 13:46:24 2019 -0500
+
+ Add trace statements in the formula parsing code.
+
+commit 693a11a3b02911a423dc93459685b787050b7be0
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Nov 18 11:13:39 2019 -0500
+
+ Throw a better message than just 'TODO'.
+
+commit 1093f79dffac8ddb052830d260bce8744fd7f084
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Nov 18 11:04:41 2019 -0500
+
+ Add a test case for handling leading signs.
+
+commit a3c0afb76346ba809f297d5d3c274206bc464b2b
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Nov 18 10:43:09 2019 -0500
+
+ Allow a leading sign token as part of a factor.
+
+ It appears to work in common cases. I need to do more testing.
+
+commit df170e8adfcb645d134480ccece6335400959b22
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Nov 18 09:01:44 2019 -0500
+
+ Add a test case for nested functions.
+
+commit 367db49ffeaadf4402f290d4ef22232564b285fb
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Nov 18 08:37:51 2019 -0500
+
+ Use std::deque over std::vector with std::unique_ptr.
+
+commit b37ea4247c1dfe5ec675addaae22a29d0d4b3909
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Nov 18 08:24:14 2019 -0500
+
+ Push a new stack in each function call, and pop one when finished.
+
+ And when poping a stack, grab the result value and push that value
+ onto the previous stack.
+
+commit 28b2bd2b0d67c4b50cc2c2464ed62d39435efc2a
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Nov 18 07:48:48 2019 -0500
+
+ Switch to using a stack of value stacks.
+
+ It needs to have at least one element at any given moment.
+
+commit 22b349f524cb564126968143f57fcf8c76815cf9
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sat Nov 16 13:11:05 2019 -0500
+
+ Abstract access to the stack.
+
+commit 22d3f6cbcbde3995d248bb70c269960facdc9667
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Nov 15 22:04:07 2019 -0500
+
+ Make it officially non-copyable.
+
+commit 118e24646646bff281fe0735f838200919f17356
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Nov 15 21:59:15 2019 -0500
+
+ Rename value_stack_t to formula_value_stack.
+
+commit 2b8c45ea488e89a074e2e744a4af727e7f2e2e07
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Nov 15 18:55:08 2019 -0500
+
+ Trace stack activities.
+
+commit defd860e858d926f451b8662dcb48133ea9905a9
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Nov 15 17:51:33 2019 -0500
+
+ Switch to using spdlog for these debug statements.
+
+commit f6f23fcb07bac0e8396832fdcc338ea01fed047e
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Nov 15 15:31:38 2019 -0500
+
+ This debug output is not all that useful.
+
+commit 3325e895e1e7d9cc2de68e34317d8da6ab58b967
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Nov 15 15:06:30 2019 -0500
+
+ We don't need this now.
+
+commit 0828824e8c388114d6588b731f2b6c360a3cce62
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Nov 15 15:02:39 2019 -0500
+
+ Print function token name for debugging.
+
+commit 7e0d2baa4395c22476da0245a00057cb8786dc41
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Nov 15 14:53:46 2019 -0500
+
+ Create better output for formula cells.
+
+commit 4a0d24a885067ec8bd4e97426d70fd2c893dc2af
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Nov 15 13:39:15 2019 -0500
+
+ Print the internal indices of the cell position.
+
+commit bd7bfcdfc6baf7624b19f3c01bf8a61f4bcb1ab9
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Nov 15 12:57:02 2019 -0500
+
+ Use spdlog here.
+
+commit 0891528c3ebbf59b0634d01b57499183bac1974b
+Author: orbea <orbea@riseup.net>
+Date: Mon Sep 23 12:09:37 2019 -0700
+
+ Fix build with gcc and an external fmt.
+
+commit a8fe2c542b16ee30723ab3d7f3b643ee479e9723
+Author: orbea <orbea@riseup.net>
+Date: Fri Aug 23 08:50:28 2019 -0700
+
+ Fix build with clang.
+
+commit 288bb07e1e23e797384125c88bfd26fcd7150619
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu Aug 8 18:45:18 2019 -0400
+
+ 0.15.0 is officially out now.
+
+commit f0f9410a96d93958cf79e0468d28133b15e7f2e6
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu Aug 8 17:10:37 2019 -0400
+
+ Add links to the 0.15.0 packages.
+
+commit 5975e27faf73f8f5aac2d0e14a2538785dfa8228
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu Aug 8 16:58:39 2019 -0400
+
+ Up the version to 0.15.0.
+
+commit 55afa4e90e04df35af06b5235c896e1802098d6e
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu Aug 8 09:03:07 2019 -0400
+
+ Update CHANGELOG for changes that will go into the upcoming 0.15.0.
+
+commit def4adf84671fad25fbbdde4efb2808d4cbe07b6
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Aug 7 21:32:11 2019 -0400
+
+ Update the AUTHORS info.
+
+commit 2dd7efc7c35abeb9b05f98e2e0ae07500d0e6b88
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Aug 5 21:40:53 2019 -0400
+
+ Fix make distcheck.
+
+commit 4eba89d54c2602430eec9398c2a62207c02abf91
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Aug 2 20:14:52 2019 -0400
+
+ Ignore this artifact.
+
+commit 4a2bc113c7440edfa130a37ac3a3e06d6ea946a6
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu Aug 1 20:42:15 2019 -0400
+
+ Add all cmake scripts to slickedit workspace.
+
+commit 98a18a47f34bef05f8a2547565d0f857ea8223d8
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Jul 31 22:06:33 2019 -0400
+
+ Make the location of the configued inline file more explicit.
+
+commit 575aba02774d934647f9f09ec5f7ea8953f1d619
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Jul 24 16:18:50 2019 -0400
+
+ Apply workaround for the gitlab default ci-runner.
+
+ Borrowed from the same workaround applied against orcus.
+
+commit 389c8def65406ae92077686a2e9095afebab28f4
+Author: Andreas Sturmlechner <asturm@gentoo.org>
+Date: Wed Jul 24 20:01:01 2019 +0200
+
+ Fix build when built against spdlog without bundled fmt
+
+commit bc5e4cb8f9b1928b2c42ed4a7d038f095e6ca089
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Mar 11 20:13:18 2019 -0400
+
+ cmake: Apply the API version to the library name as well.
+
+commit 756bfeb330fdb8f7080863b2e03c019330a00b7c
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Mar 11 19:54:39 2019 -0400
+
+ cmake: fix the install target.
+
+ There was supposed to be a ixion directory underneath ixion-<API_VER>.
+
+commit 28abf1bb0bc9e3a5a78683202f60de0746600c75
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Mar 8 23:07:53 2019 -0500
+
+ Use virtual dtor for class inheritance with virtual methods.
+
+commit 0915864bd3e439d8f5fb0606ad18c3047814565a
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu Mar 7 21:42:16 2019 -0500
+
+ Implement fill_down_cells() in model_context.
+
+ For now, filling down of formula cells is not supported.
+
+ This addresses #15.
+
+commit 1f72b58bf552491ad0646ee33c46f3224b01dbca
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu Feb 21 18:14:14 2019 -0500
+
+ Point to the readthedocs for API doc.
+
+commit af832b5277c76c8dd5e50b5fe2f460172f089ff4
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu Feb 21 18:10:21 2019 -0500
+
+ Add doc requirements.
+
+commit 6d5fb75a8116ae785cebad2b98b5990d4c2b6403
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu Feb 21 18:06:53 2019 -0500
+
+ Switch to RTD theme and add hook for readthedocs integration.
+
+commit 98b1ec3ae66f086818f4c40a7d7df1a1a49b553d
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Jan 29 07:44:35 2019 -0500
+
+ Run tests quietly during the build.
+
+ You can always manually run tests by 'ctest -V' after the build.
+
+commit 732fef514bfd3578363163e6e1fce0e9e52ea35f
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Jan 28 22:12:53 2019 -0500
+
+ Treat individual test files as individual test cases.
+
+commit d0fd7237c68d947b5c456cca6a6d233927958776
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Jan 28 21:59:03 2019 -0500
+
+ Properly execute thread parser tests as part of ctest.
+
+ This fixes #14.
+
+commit a94043d823599540f8509acfdb0a6398e0c9ad77
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Jan 28 20:58:35 2019 -0500
+
+ Minor wording tweak.
+
+commit ad59e3d5f88c4edba5da6b773433d043f93daedc
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Jan 28 20:57:01 2019 -0500
+
+ Actually you don't need to always build Boost as static libs.
+
+commit 1c549b83250dce48b50542e30d5fe73002d1463d
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Jan 28 20:41:42 2019 -0500
+
+ We can simply use CMake's configure_file here.
+
+ This way there is no need for the gen-files.py script any more.
+
+commit b973ea807baaed39dde6e71fb10f420c3c988f3b
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Jan 28 20:36:21 2019 -0500
+
+ Split CMakeLists.txt one per directory.
+
+commit 90a52b77af7a1dcc1556daad0d0ad34910da8b57
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Jan 28 17:20:08 2019 -0500
+
+ Further tweak the cmake script.
+
+ The option function is for boolean options. For a string option, we
+ should use set() with CACHE STRING properties.
+
+ Also further silence warnings on inplicit conversions.
+
+commit e7398c373e79ef365168b301af6503381dc9cef0
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Jan 28 08:31:31 2019 -0500
+
+ grouped_ranges is no longer in use. Remove its files.
+
+commit 1a93f6a9c0680eae205eaaa84df78837016b9e69
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Jan 23 09:25:13 2019 -0500
+
+ Use foreach to clean things up a bit.
+
+commit 9d80a94ceb6b7b491aa651f66b8282958a587d7f
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Jan 23 08:15:46 2019 -0500
+
+ Suppress warnings on implicit integer conversions.
+
+commit 703859e9ba4c758b218642c56f2c3cf7959002c3
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Jan 15 22:28:57 2019 -0500
+
+ Add a full MPL 2.0 license file.
+
+commit bb14f190ac9926b98150d939e2b3d6180379e37b
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Jan 15 22:11:42 2019 -0500
+
+ Add the parser tests to the cmake-based test suite.
+
+commit 6393fa1a74e05c6edaedfb94a3966c07cc1e4a8a
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Jan 15 21:31:29 2019 -0500
+
+ Add two more tests to the cmake-based test suite.
+
+commit 7ca80a0ce29a3681e3d4f47f1f5b1d7557d0dd8c
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Jan 15 21:26:00 2019 -0500
+
+ Use deque to store worksheet instances.
+
+ This is also to reduce level of indirection.
+
+commit 9fcd740eea86344116018015221fd4d08bb9e42c
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Jan 15 21:22:27 2019 -0500
+
+ Use deque to store column stores to reduce indirection levels.
+
+commit d264028960e2d5639ccc921456f43c02ccc11359
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Jan 15 18:02:17 2019 -0500
+
+ Avoid object slicing on deletion of the impl instance.
+
+commit 14e7d97184aa26a9ea2dd37b9e03a4c11964a3fb
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Jan 15 09:01:16 2019 -0500
+
+ Add track-dependency test to the list of tests.
+
+commit 68f6544bfee38963862de88091f0e22bf48f2042
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Jan 15 08:53:00 2019 -0500
+
+ Add a check target and add ixion-test to its first test.
+
+commit e9e2a497a28f6d41b48f4035c292cd2b677086b7
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Jan 14 22:43:34 2019 -0500
+
+ Let's not forget the install target.
+
+commit 3f901dce8c895095ae2c33270ae214ddbccfd290
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Jan 14 22:40:22 2019 -0500
+
+ Point to CONTRIBUTING.md.
+
+commit 00a862d533f30b4219d055f775f654c6652432af
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Jan 14 22:30:05 2019 -0500
+
+ Support install target for cmake.
+
+commit f5147b7e71f08eba72951db353bfbb21910a9b62
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Jan 14 21:43:13 2019 -0500
+
+ Get Windows build to work again.
+
+commit 31e2af7ceb0526f6314334567998dc078b1e58b6
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu Nov 29 17:30:25 2018 -0500
+
+ rc_abs_range_t to construct from abs_range_t.
+
+ It loses the sheet indices, of course, but the rest should be copied
+ over.
+
+commit e3192ab3e4013efb07b7214c785dde7a9842f4ec
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu Nov 29 07:54:47 2018 -0500
+
+ Let's consistently use ';' as separators in ostream outputs.
+
+commit 35b3e96e22b9e871624519a103f18cc879151064
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Nov 28 18:46:28 2018 -0500
+
+ Add a test case where only one cell is to be iterated over.
+
+commit cbb4e3859122d4ab1268dbf3c5c17617ca36676e
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Nov 28 18:44:12 2018 -0500
+
+ Add test cases for ranged vertical iteration, and fix one issue found.
+
+commit add3c0b1d4b8ab06bc5665035405205e4097768b
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Nov 27 22:28:21 2018 -0500
+
+ Actually use the clipped row range. Still untested.
+
+ The test comes next.
+
+commit 34b673666a396086d44bd3f4045c3689ddc666ba
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Nov 27 19:22:34 2018 -0500
+
+ Clip the row range for the vertical iterator. Not tested yet.
+
+commit 53565e8467a9a5436d3aa63fa31cf98fb9511b56
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Nov 27 19:05:04 2018 -0500
+
+ Clip the column range for the vertical iterator. Not tested yet.
+
+commit 999915d961e9a849776cff51315c6740313c119b
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Nov 27 17:19:48 2018 -0500
+
+ Add test for column clipping.
+
+commit 245990557a8ed7babd3b8e7ee68b20db88db529a
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Nov 27 08:29:08 2018 -0500
+
+ Add another test case for row-wise clipping.
+
+commit e13b2de9e43134c952f7ea0b55d6adda60872dfd
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Nov 27 08:15:37 2018 -0500
+
+ Add the first test for row-range clipping.
+
+ More to be added later.
+
+commit 8f1cd00ef44c4392b70c1a02927d7eded81d636a
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Nov 26 21:33:11 2018 -0500
+
+ Add a convenience method to mass-insert a range of cell values.
+
+ Not optimized yet. Mostly to be used from unit test code.
+
+commit 7139d0cedeecf3f257480064cbf29c1fa0633458
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Nov 26 19:33:22 2018 -0500
+
+ set sub-range for horizontal iteration. Not tested yet.
+
+commit 031d313ef595c02e430cfc51b97fd3fe891b4694
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Nov 26 18:28:08 2018 -0500
+
+ Additional parameter to specify range on the sheet to iterate over.
+
+ For now it has no effects.
+
+commit e095bb7ddafcebe0401577063eacaf121e758836
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sun Nov 25 21:19:20 2018 -0500
+
+ Let's not forget to check for this.
+
+commit 3fbf4c9fd091dd732bd093d0a89116f4901f88a2
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sun Nov 25 21:15:10 2018 -0500
+
+ Simplify the code a bit by using the static `get` method.
+
+ It now handles boolean_element_block as well.
+
+commit 7ee12c4a8668e6e71e9244d796875e9adc1d134a
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sun Nov 25 20:10:24 2018 -0500
+
+ Remove duplicated blocks & make it a bit more readable.
+
+commit 9a5de32154edc3286c670ecdba6bb4df3563885e
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sun Nov 25 20:08:40 2018 -0500
+
+ Add a test on empty model context.
+
+commit 7b9b8e36367b17476a184680d9f6ea0fd586c003
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sun Nov 25 20:03:16 2018 -0500
+
+ Add formula cells to the test as well.
+
+commit 0ae430c87d98ef06d57c631da87457f149c1d938
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sun Nov 25 19:48:44 2018 -0500
+
+ Add test cases that check for cell values.
+
+ And fix the issue with boolean values.
+
+commit 733f5b1a5ddb6666f8890be46886b592473a36ea
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sun Nov 25 18:35:06 2018 -0500
+
+ Avoid unnecessary updates of current cell.
+
+commit 913eb85916bcd7a85668a16fb483ae7fed293cdb
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sun Nov 25 18:27:52 2018 -0500
+
+ Add a first test case for vertical iteration, and fix bugs.
+
+commit e3dac73cac8aa4c65eeb8c2c713bd40bda27303d
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sun Nov 25 15:10:13 2018 -0500
+
+ m_it_cols must be initialized even for empty columns.
+
+commit 9470fee636c91f1b39fb220e812b88a954d38984
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sun Nov 25 15:09:09 2018 -0500
+
+ Don't forget to store the column row positions.
+
+commit 575b193dc987ca328d7ef8a4410fdb663bde8a17
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sun Nov 25 15:02:41 2018 -0500
+
+ Implement vertical (i.e column-wise) iteration. Not tested yet.
+
+commit f3e5aa21b8ade854ced33e3302f8e8319a95d191
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sun Nov 25 13:42:42 2018 -0500
+
+ Skeleton implementation for the vertical iterator.
+
+commit 5404cc2269754f2d600678499baa5e9c4541d426
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sun Nov 25 13:30:26 2018 -0500
+
+ Rename vertical to horizontal. No idea why I called it vertical.
+
+commit 7252602c9291237252fb73dfaedfbc4ced33afbf
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sun Nov 25 13:22:42 2018 -0500
+
+ Reduce the number of indirections.
+
+ model_iterator::impl serves as the base interface class for the core
+ iterator implementation. The impl class needs to have public visibility
+ for the derived classes to have access to it.
+
+commit 35fe473d31c18483ed15454251c84232a8d348f4
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sun Nov 25 11:38:18 2018 -0500
+
+ Refactor the model_iterator implementation to make room for another core.
+
+commit cce6af6a4e707f5c2fab21f604a673aad7347c2c
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sat Nov 24 13:07:53 2018 -0500
+
+ This method should be deprecated in favor of model_iterator.
+
+commit 95ca423e637b6ebbe8e3a014a2a61c6f132bfd8a
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sat Nov 24 13:03:21 2018 -0500
+
+ Add test cases for iterating over non-empty cells.
+
+commit 8e5e7f1512aa2de0e9af2e4d9f4546cbe9f31859
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sat Nov 24 12:06:01 2018 -0500
+
+ Add a method doc.
+
+commit 2554165c15215b865a69a7ea432df67f5c9de232
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sat Nov 24 11:52:20 2018 -0500
+
+ Rename model_iterator_direction_t and re-use it in abs_address_iterator.
+
+commit 392fb1445be57216da6a41f444b8e0f336ca5b60
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sat Nov 24 11:38:50 2018 -0500
+
+ Implement the iteration using mdds::mtv::collection.
+
+ With an empty sheet for a starter.
+
+commit a62d172832aa6f90af330e72f10503d074fbe764
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Nov 21 20:42:32 2018 -0500
+
+ Set up a skeleton model_iterator class. Still massively WIP.
+
+commit 1a529f8c402890fa4fa00cf101c1c37f489b2698
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Nov 19 21:02:51 2018 -0500
+
+ Update types.
+
+commit 80144fedc6e9e1f26583d4b67d3fae24ce142280
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Nov 19 18:43:16 2018 -0500
+
+ Update in response to the API change in 0.14.
+
+commit ffb458dbedb3515277ac2c1063e7790542fb9209
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Nov 7 18:30:52 2018 -0500
+
+ Switch documentation theme to cloud theme.
+
+commit e35246009c8abc57df08615522ceb11c487423bb
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Nov 5 17:26:15 2018 -0500
+
+ Switch to mdds-1.5 and make all necessary adjustments.
+
+ mdds-1.5 uses standard integer types.
+
+commit ede6b5dc06b3675755778ecefc603b0f7815881e
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu Nov 1 08:02:27 2018 -0400
+
+ Add --enable-werror compile time option.
+
+ But for now we need to disable -Wwrite-strings, else the python
+ layer code would not compile.
+
+commit dff02ec79280ff489c0d21b6e428a51ed11e0597
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Oct 31 18:36:08 2018 -0400
+
+ We don't use boost log any more.
+
+commit 447ed474bd42a6936ade3b50c95bafb22773b183
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Oct 10 07:26:28 2018 -0400
+
+ Ensure that libixion-<ver>.so built in the current build is used.
+
+ Occasionally we build a shared object that is binary incompatible with
+ the one currently installed on the system with the same so name.
+
+commit a447b910a970e5213747c4dac6e189be2f15da31
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Oct 9 23:11:14 2018 -0400
+
+ Add configure switches for compile time logging.
+
+commit ae2716d919a3aaab8bb6af2c697d11a783e367a1
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Oct 9 22:37:09 2018 -0400
+
+ Switch from boost log to spdlog, for compile-time logging on/off.
+
+commit cfa42a1644942a14db1151643b9caea8c50347ec
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Oct 9 19:30:34 2018 -0400
+
+ Replace own logging with boost log.
+
+commit 509495114c3991206764df1cde4e8cbcb7197f47
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Oct 9 19:12:04 2018 -0400
+
+ Tweak the wording a bit.
+
+commit 2983fa7d241e4b35cad5b5ef665a5cb99064d7c6
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Oct 9 17:27:18 2018 -0400
+
+ Add --debug option to turn on and off the debug outputs.
+
+commit 9df5e91fa2f6287dc1cc1311eb79b86c348c6c02
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Oct 9 17:08:25 2018 -0400
+
+ Move the circular safe flag to the calc status object.
+
+ This fixes the #REF! problem.
+
+commit b03111d944c1515d089ef1798be024bff32a9a49
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Oct 9 08:33:02 2018 -0400
+
+ Add more debug statements to aid my debugging attempt.
+
+commit 6dc35d78a90d2ad1b2e5bf100a0ebdc0f942b800
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Oct 9 08:11:05 2018 -0400
+
+ Modify the test case to exhibit the problem.
+
+commit ae94606dfef2f0f8cbf72dc1970af347d18d481a
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Oct 9 07:56:44 2018 -0400
+
+ Update supported features list.
+
+commit 62eb8eba978d3dabe952bd1f11673c24bfbcad85
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Oct 9 07:53:41 2018 -0400
+
+ Add more details on this item.
+
+commit db3bed259fdbd20866ca28bfc596290c440771c7
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Oct 9 07:37:40 2018 -0400
+
+ Add new items.
+
+commit 7dda2a820e3bf67558db023674087cb976dc2c9c
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Oct 8 20:04:55 2018 -0400
+
+ Pass the entry structure to the formula queue manager.
+
+ This way we can avoid having to fetch the formula cell instances
+ again during the interpretation.
+
+commit 41b9a3fb313b450b3f99bc9e0a1e7d0a08629c06
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Oct 8 18:49:39 2018 -0400
+
+ Avoid repeatedly fetching each formula cell from the model.
+
+commit e13a738c23cbe3a51aed09abd233dcc6a25e0b98
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Oct 8 18:37:41 2018 -0400
+
+ Rework the implementation of calculate_sorted_cells().
+
+ And remove topo_sort_calculator and all its files.
+
+commit 57df912f041f86df725044285b52f224197658ed
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Oct 8 18:21:14 2018 -0400
+
+ calculate_cells() will be no more.
+
+commit 964ad009c70bd5020764906486aea45aa779712b
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Oct 8 18:17:49 2018 -0400
+
+ Add documentations for the new public functions.
+
+commit b4718510e67871ef7ce5f51e2fa4e87e9c9da71d
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Oct 8 08:52:14 2018 -0400
+
+ Modify test_volatile_function() to use the new calculation API.
+
+commit c25917a14eae13e83b318c775121ee59c7b46c37
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Oct 8 07:42:19 2018 -0400
+
+ Use the new calculation API in the python layer.
+
+commit 2a5d537d0f8af4f8309bd14854127a33f5099e78
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Oct 8 07:31:18 2018 -0400
+
+ We don't need to declare a formula cell a modified cell.
+
+ A formula cel becomes a dirty cell if edited, which implies that
+ it's a modified cell from the implementation's prospective.
+
+commit 27ab0c8f00b820774d5b0ac55b4f7bf237fd48c8
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Oct 5 20:04:07 2018 -0400
+
+ Perform recalculation using the new API too.
+
+ All tests pass!
+
+commit 53e32cd3c5d442638315dca94477c20dc092c22e
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Oct 5 19:52:22 2018 -0400
+
+ Perform full calculation via new API.
+
+commit c50e90c3864edbc36f1c0406111c7ab9c0147689
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Oct 5 19:45:52 2018 -0400
+
+ Allow optionally specify known dirty formula cells when querying.
+
+ These known dirty formula cells should be treated the same way as
+ modified cells except that modified cells are not formula cells and
+ therefore don't end up included in the final sorted formula cells,
+ and the dirty formula cells do end up in the final sorted formula
+ cells.
+
+commit f61db97f29a231e6328347048ec86255ec411cbe
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Oct 5 17:52:15 2018 -0400
+
+ Ensure that those that track volatile cells are marked dirty.
+
+commit 9bd94df1d3f9a7734eb742ee3a39333da6515b85
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Oct 5 08:14:44 2018 -0400
+
+ m_dirty_formula_cells to store cell ranges rather than single cells.
+
+commit c345546ac8cc9e1479a9123e960b54c2940b5a9d
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu Oct 4 20:33:48 2018 -0400
+
+ Add calculate_sorted_cells() as a public free function.
+
+ This one takes an array of formula cells, grouped or otherwise, which
+ are already topologically sorted.
+
+commit 6f03d0a8e4cc0dbb103805fcbcaf0f59407e4682
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu Oct 4 19:50:06 2018 -0400
+
+ Add free-function variant of query_and_sort_dirty_cells().
+
+ And modified_cells are now a set of cell ranges.
+
+commit f6cc49b05a41bfee073bc5040084981fcf961e0d
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu Oct 4 19:42:22 2018 -0400
+
+ query_dirty_cells() to return a set of ranges.
+
+commit b426c404455eddcee8f04df020e4c143a349ea7d
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu Oct 4 18:04:57 2018 -0400
+
+ Rename the method to query_and_sort_dirty_cells().
+
+ Also add a bit more test for this method.
+
+commit 88a160d442e5891afcc20d3e5719db4dd25c4c33
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu Oct 4 17:31:50 2018 -0400
+
+ Add the first test on in-place topological sort.
+
+commit 5ed2e9291f555276d5848f5c0a386e642111ae09
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu Oct 4 08:15:40 2018 -0400
+
+ Actually perform topological sort in query_dirty_cells_sorted().
+
+ And adjust depth_first_search's ctor to make it more flexible wrt
+ the source value container.
+
+ This code is still untested.
+
+commit 971beb32b50b5ffe92e63eb0f578ff4af91b8b05
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Oct 3 21:42:58 2018 -0400
+
+ Return an array of ranges to avoid unnecessary conversions.
+
+commit c9e4a8e6f9cc7cea3c62add819ee26b9409c9cce
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Oct 3 20:17:37 2018 -0400
+
+ Add back_inserter to depth_first_search to remove duplicated code.
+
+commit f6e73d32cc806962cdba80acd38cf3a81e9f9b5a
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Oct 3 19:18:02 2018 -0400
+
+ Adjust for the relocation in slickedit project.
+
+commit a931e64934394c554553d5ed9ec546a8f4a8afdb
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Oct 3 18:45:35 2018 -0400
+
+ Move depth_first_search.hpp into a private place.
+
+ This class should not be in a public place.
+
+commit e390de074ea1fe0e5656fe87e470580842328f53
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Oct 3 18:38:00 2018 -0400
+
+ Use ranged for loop for this.
+
+commit 7d017836531c5fdda2e5b7eeb693a9dc5eb73cc9
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Oct 3 18:33:46 2018 -0400
+
+ Some cleanup & modernization of depth_first_search.
+
+commit 75b71bdbf74b92f4d00a5b1fa77098150eb8fcca
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Oct 3 08:54:20 2018 -0400
+
+ Add a new member method that performs in-place topological sort.
+
+ It's yet to be implemented.
+
+commit ccec3aac16469297dcd9970ad6d9974a8b9fbdb7
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Oct 3 08:10:44 2018 -0400
+
+ Extend this test case to cover a bit more complex scenario.
+
+commit 2bac6a011fe28a54645c39bd94a05bbd94d1c9c4
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Oct 3 07:59:44 2018 -0400
+
+ Remove factual error from the method documentation.
+
+ get_affected_cell_ranges() only returns directly affected ranges.
+
+commit 86290a1db084a2ac016e38ce7b88033531ade720
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Oct 2 20:37:13 2018 -0400
+
+ Fix the issue of not properly picking up a cell in a range.
+
+commit f4abd1e05229e949f611f31ced9749c7f2e91759
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Oct 2 17:58:08 2018 -0400
+
+ Correctly keep track of range-to-cell and range-to-range relations.
+
+commit ad9e8402a56da4d128417b5da5460f0c93e7d43a
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Oct 2 08:23:39 2018 -0400
+
+ Reduce the amount of duplicated code.
+
+commit 39b18447c5f0dd903669bd7d152754c38e47d407
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Oct 1 20:56:40 2018 -0400
+
+ Implement 'print dependency' command.
+
+ For now, volatile cells are not printed.
+
+commit c537e5847c60bd097ac74fa33ea1334f00293d96
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Oct 1 19:59:29 2018 -0400
+
+ Use enum class for the parser commands.
+
+ And use mdds::sorted_string_map for converting the command strings
+ to their enum counterparts.
+
+commit 755d565ae4a6fafe6f405273f0b52e9d24ec4df2
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Oct 1 18:23:10 2018 -0400
+
+ Rename these two members to fit their roles better.
+
+ And make them less confusing.
+
+commit 5fb4f462286a8f25dc93182756c22d5df779cea7
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Oct 1 18:02:10 2018 -0400
+
+ insert_depend() -> set_reference_relation().
+
+ The former IMO is less awkward and more representative of what it
+ actually does.
+
+commit 3ea7a74d56b8922b2acc3cefb648293a65129ba0
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Oct 1 17:54:14 2018 -0400
+
+ topo_sort_cells() -> sort_cells(), and have it return the results.
+
+commit 139d1aff1b103984dbf4fd801117dd8304efa82c
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sat Sep 29 13:11:17 2018 -0400
+
+ Rename depend_tracker to topo_sort_calculator.
+
+ I believe the new name is more fitting than the old one. This class
+ didn't really track dependency the way the dirty_cell_tracker does;
+ it only performs topological sort based on formula cell's reference
+ information.
+
+commit 7e223a0dab8aead84eb01077d92b1228a3b88648
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sat Sep 29 12:48:03 2018 -0400
+
+ Rename function param to make its role a bit more clear.
+
+commit 963d31e0f73c047509d236468d00b2b3127589a4
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sat Sep 29 12:46:12 2018 -0400
+
+ Same thing applies here.
+
+ The new code is much simpler than the old one.
+
+commit 17d2b35cfee5b0fc207debdbe522064302917bac
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sat Sep 29 12:44:10 2018 -0400
+
+ Use range-for loop instead of std::for_each with function object.
+
+commit d265db0444c42254b0c8885c52a4ba5c1a1f7841
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Sep 28 20:21:50 2018 -0400
+
+ Add this item.
+
+commit 1ff315a87a1d844c7063d2f7f205ed1524b979c3
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Sep 28 12:28:07 2018 -0400
+
+ cell_listener_tracker is officially no more.
+
+commit eace8a1339ab5a51e8a4287b66e3ab6fb80d54b0
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Sep 28 12:10:24 2018 -0400
+
+ Add test case for recursive tracking.
+
+ Mostly to make sure we don't go into an infinite loop.
+
+commit ec5ef8ac2c5e262f269c4a0b9bc907c979bcd40d
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Sep 28 11:25:46 2018 -0400
+
+ Detect presence of circular dependency to avoid infinite loops.
+
+ Now we can re-enable the parser tests.
+
+commit 15d69a69c99f0c30dba65c43d7b154ed561eb4e8
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Sep 28 11:13:49 2018 -0400
+
+ Add a method doc.
+
+commit 6c4338f73c1f1331c5f9c341f8980e9d62978fe2
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Sep 28 10:50:03 2018 -0400
+
+ Swap cell_listener_tracker with dirty_cell_tracker.
+
+ The parser tests currently hang because of circular dependency
+ creating infinite loops.
+
+commit 6a1048c2b7f46c8a38b6f16664da4a2612538919
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Sep 28 10:34:39 2018 -0400
+
+ There is no reason this has to be a heap-instance.
+
+commit f7f1dadfdf90aab60d8d1f283c941aeff8714a64
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Sep 28 10:14:19 2018 -0400
+
+ Unnecessary forward declaration.
+
+commit 5ffa7e069cdc8744040a2da8b24742abc1b3ceb6
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu Sep 27 20:37:36 2018 -0400
+
+ Add test for tracking between different sheets.
+
+commit d56eec7ec917c434b3b67ed49cc84028e6c549e8
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu Sep 27 19:20:34 2018 -0400
+
+ Same with true with the remove() methods. Consolidate them into one.
+
+commit c968d238de18046f96f90d818e8e1a693d9917e6
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu Sep 27 19:12:18 2018 -0400
+
+ We don't need two variants of add(), as it turns out.
+
+commit 363a0eb5ef234f960b42644b0b304070889a6a22
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu Sep 27 19:02:34 2018 -0400
+
+ Test volatile cells.
+
+commit 307bd630d2d918bb3944766a1de2ca116651332e
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Sep 26 22:43:23 2018 -0400
+
+ Implement removal of cell-to-range tracking & its test.
+
+commit bb44c11104328cea673d1a163d3e42afe049307a
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Sep 26 21:59:48 2018 -0400
+
+ Check for invalid input range here.
+
+commit d8381c31e45876ef504a9e93119f00fe75190079
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Sep 26 18:30:52 2018 -0400
+
+ Go a bit further on the test.
+
+commit 53e6f3d38c191284ac8c8d5c5fbc23ff15d74a87
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Sep 26 18:25:20 2018 -0400
+
+ Implement and test removal of cell-to-cell tracking.
+
+commit 291cb20be79063fbb1418297a00a8e0193e94d13
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Sep 26 18:01:27 2018 -0400
+
+ Make the cell addresses a bit more clearer.
+
+commit 2d79ac808ce8a15add769fdf2499646143dc7047
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Sep 25 22:22:23 2018 -0400
+
+ More testing on chained tracking involving ranges.
+
+commit bed77c21087fe3610c4642ef0d8cd4a1388362d3
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Sep 25 21:20:12 2018 -0400
+
+ Implement cell-to-range tracking.
+
+ Also test for empty queries to make sure we don't crash.
+
+commit f0750a3182031760b092d41d60bc3c8f2f38a399
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Sep 24 21:53:39 2018 -0400
+
+ Rework the internal to pass around cell ranges rather than cells.
+
+commit fd608d7a595a8b354da57309f5507bcefea0476c
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Sep 24 18:27:57 2018 -0400
+
+ Add test for indirect dependency i.e. A1->A2->A3.
+
+commit 8597a6cf28d935331e98afcce60dad00cd0c0b2d
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sat Sep 22 16:25:46 2018 -0400
+
+ Progress on the test case.
+
+commit 104bb1e285346c266324beddc55eefa5eca07171
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sat Sep 22 15:41:55 2018 -0400
+
+ Do resize the array correctly.
+
+commit 555e69bce9ac71fb7bbb80759f7c43ebfa0bc0db
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sat Sep 22 15:28:05 2018 -0400
+
+ Add a test case for dirty_cell_tracker.
+
+ This currently fails with an exception thrown in mdds::rtree.
+
+commit 277a3a54d1bf7bad184d2ca824e2dd6e1a6cfeb2
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Sep 21 22:03:35 2018 -0400
+
+ Implement adding a cell-to-cell listener.
+
+ This has yet to be tested.
+
+commit 4db00351e2603bad988e929d249bc01230101d65
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Sep 21 19:20:22 2018 -0400
+
+ Rename cell_address_set_t to abs_address_set_t.
+
+ The latter feels more consistent with the rest of the address names.
+
+commit 398bc3a3951cb257630c8545d39dd09e14faf13f
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu Sep 20 22:12:06 2018 -0400
+
+ Add volatile cell handling.
+
+ This one is identical to cell_listener_tracker.
+
+commit 54523e70fca10312af730ecdc97320e60bf8b5b7
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu Sep 20 20:33:43 2018 -0400
+
+ Empty implementation of dirty_cell_tracker.
+
+ This will be a drop-in replacement for cell_listener_tracker, and will
+ use mdds::rtree for its implementation.
+
+commit 80f10111505a2db29f15004a03face26dc7247f7
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Sep 19 18:45:52 2018 -0400
+
+ Replace all uses of get_all_dirty_cells() with query_dirty_cells().
+
+ And remove get_all_dirty_cells().
+
+commit a6e76cd01fe6ce70c9d09976a0555e49a3cc00a9
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Sep 18 22:57:57 2018 -0400
+
+ Add query_dirty_cells(), to later replace get_all_dirty_cells().
+
+ The replacement hasn't happened yet. That's my next step.
+
+commit b5da9ceca5e7e0edfa65d619933853b0f7dfe9aa
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Sep 18 19:19:22 2018 -0400
+
+ Let's just use cell_address_set_t for this too.
+
+ It's not clear why we need to use a vector for this rather than just
+ re-using cell_address_set_t.
+
+commit 559ce4de64f75a0190869f392b211188484b1ac0
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Sep 18 19:06:07 2018 -0400
+
+ Remove dirty_formula_cells_t. Just use cell_address_set_t directly.
+
+commit b74639b03c0250c0a25f93ac2baceb57acbcec3c
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Sep 17 18:30:51 2018 -0400
+
+ Let's not check if the volatile cell is a formula cell.
+
+ 1) It's an expensive call, and
+ 2) The caller should check that prior to inserting each vc position.
+
+commit 71dc3af34885533674b5707cbfd52c744138c9ac
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Sep 17 18:26:02 2018 -0400
+
+ get_volatile_cells() should be an impl. detail too.
+
+commit eee5a25e739051eeaa57c326fc3f2fa2b2fd862a
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Sep 17 18:18:05 2018 -0400
+
+ Move these privates methods into its pimpl to hide them entirely.
+
+commit dcabed28301a06a5a500345663e866eac38c6e50
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Sep 17 18:12:23 2018 -0400
+
+ Make the following member methods private.
+
+ These are only called from get_all_dirty_cells().
+
+ * get_all_cell_listeners()
+ * get_all_range_listeners()
+
+commit 99dcf9b2478818e0ed473ff61e440fe25db4ddfc
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Sep 17 18:01:31 2018 -0400
+
+ Move get_all_dirty_cells() to cell_listener_tracker.
+
+commit e0af36bb2f046d632fa2d0753380007f2aea7230
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Sep 14 19:57:14 2018 -0400
+
+ The concept of grouped ranges is obsolete, and not to be used.
+
+ Let's remove it.
+
+commit d702c67d0e63bffd7d6463a1c2ce9bc2c248277d
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Sep 14 16:38:17 2018 -0400
+
+ Add URL's to the 0.14.1 packages.
+
+commit 4b986374d46f431dc432c192cbcb286968c693fa
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Sep 7 19:52:52 2018 -0400
+
+ CID#191665: Resource leak (RESOURCE_LEAK)
+
+ The code loaded dynamic modules via dlopen() but it would never
+ unload them properly via corresponding dlclose(). This change will
+ hopefully address this.
+
+ Unfortunately this change will require an API change, thus bumping
+ up the API version.
+
+commit 7895668bb09a973a93074c8e8ad0f9fc65f30ddb
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Sep 7 19:10:56 2018 -0400
+
+ CID#191667: Uninitialized pointer field (UNINIT_CTOR)
+
+commit 2752eeb74adca7245564801281fccd6fa11150c9
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Sep 7 19:06:00 2018 -0400
+
+ CID#191669: Dereference null return value (NULL_RETURNS)
+
+ dereference: Dereferencing a pointer that might be null ps_expected
+ when calling operator <<. [Note: The source code implementation of
+ the function has been overridden by a builtin model.]
+
+commit ae13970c7471c21874d0d1386a82b7382538d699
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Sep 7 19:01:00 2018 -0400
+
+ CID#54470: Structurally dead code (UNREACHABLE)
+
+ unreachable: This code cannot be reached: this->m_stack.push_value(0.);.
+
+commit c015f6c723c5e669d78da2236327d9a0389676ba
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Sep 7 18:57:54 2018 -0400
+
+ CID#191666: Uninitialized scalar field (UNINIT_CTOR)
+
+commit 4198916c3ff2b5c9aacef82b6658f9d0990f4dd8
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Sep 7 18:54:09 2018 -0400
+
+ CID#191664: Uncaught exception (UNCAUGHT_EXCEPT)
+
+ root_function: In function main(int, char **) an exception of type
+ boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::bad_any_cast> >
+ is thrown and never caught.
+
+commit b198a6d8edd41669a318f86fa22a7aad6cda7305
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Aug 28 23:07:40 2018 -0400
+
+ Add bits about fixing some build issues.
+
+commit 869492c9f3f61aaab0d1ecdda147ea9adbdb04d5
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Aug 28 22:58:49 2018 -0400
+
+ Fix build issues on 32-bit platforms.
+
+ The string ID's are stored in mdds's unsigned long block, but we
+ have changed the underlying type of string ID's from unsigned long
+ to uint64_t. Because of this, on 32-bit systems it caused a type
+ mismatch. On 64-bit systems this was fine since unsigned long was
+ the underlying type for uint64_t...
+
+commit 68eede673d290f64376ba0d6a12e09daa046a9e3
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Aug 27 18:35:10 2018 -0400
+
+ Add -Wshadow and remove all warnings triggered by this.
+
+commit e666d0b349d445f4e352ec7161be8e27a275c362
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Aug 22 20:34:13 2018 -0400
+
+ Add the ref-counted formula cell object bits.
+
+commit b74ec638a9851ccc9a4624594a63d5f8d5bcb583
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Aug 22 20:22:16 2018 -0400
+
+ And don't forget the up the API version.
+
+commit 3c4134a0668169b3d71e93792a289cede417ece6
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Aug 22 20:21:39 2018 -0400
+
+ Update the checksum on re-generated 0.14.0 packages.
+
+commit dbb229782d26e256819b8e81006f4fa72ad1fb9e
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Aug 22 20:11:33 2018 -0400
+
+ Actually there is API incompatible change. Bumping up the API version.
+
+commit 934179c0365151d9555dbbda200877ee89792f9a
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Aug 22 20:01:29 2018 -0400
+
+ Add URL's to the 0.14.0 packages.
+
+commit 4d3075c04e4bda15bbff18ba2179424519eab71d
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Aug 22 18:33:16 2018 -0400
+
+ Up the version to 0.14.0.
+
+commit e436596999557e18fecd2536d544c056c3596c65
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Aug 21 22:13:05 2018 -0400
+
+ mdds 1.4.0 is released.
+
+commit 06837d2b084bb4024eb105f9a1402a42697d3016
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Jun 12 22:27:45 2018 -0400
+
+ It now depends on the master branch of mdds.
+
+commit 603729483b2c167f283c5383d35e4a7ce174c8d1
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Apr 16 18:39:50 2018 -0400
+
+ The gettimeofday call is no longer used.
+
+commit 18f62b00f17dfd794c3bcfe23a18a124b0238d6a
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Apr 16 18:29:10 2018 -0400
+
+ Use cross-platform way to query seconds since epoch.
+
+commit 2719761a74396021ac911c89c12d092978186f69
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Apr 16 18:16:14 2018 -0400
+
+ There is no need to append an extra character like this.
+
+commit bb09b2a2522d78660c26b75282a4ebf0936a112c
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Apr 9 17:22:35 2018 -0400
+
+ Make get_single_result_cache() -> get_result_cache().
+
+ This method should be the primary method to be called to get a
+ formula result.
+
+commit e477bd775e8ded376760b37c807a13ec299b65b7
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sun Apr 8 21:20:18 2018 -0400
+
+ Add new changes.
+
+commit be91d1b029064f8bad829379aa424f0e15de9657
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sun Apr 8 20:14:18 2018 -0400
+
+ Add a boolean 'grouped' member to formula_group_t.
+
+commit 5c8af00f910b1cf68ce2a11bc027edd0604328ee
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sun Apr 8 20:07:49 2018 -0400
+
+ Add a method to determine the parent position of a group.
+
+commit 5e128e40f5918907e2d0934c1450569f8ad183fa
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Apr 4 18:17:55 2018 -0400
+
+ Change the wording for clarity.
+
+ * whole_column -> all_columns
+ * whole_row -> all_rows
+
+commit fe7fe672c339493f1032cf1285188d4408adb5f7
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Apr 2 20:53:25 2018 -0400
+
+ Revert "Use the grouped range to move the listening destination."
+
+ This reverts commit 401231d770591a3fd6619a7c31aa8cee823a88a4.
+
+commit 401231d770591a3fd6619a7c31aa8cee823a88a4
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Apr 2 20:35:06 2018 -0400
+
+ Use the grouped range to move the listening destination.
+
+ In case the listening destination cell is within a grouped range,
+ move to its origin position (top-left cell) for the purpose of
+ tracking dependencies.
+
+commit 817396a1bda3082ad41534ea65047db7c66e6faf
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Apr 2 18:36:25 2018 -0400
+
+ Re-implement grouped_range with rectangle_set.
+
+ flat_segment_tree wouldn't have worked since two goruped ranges may
+ still overlap by either column or row direction without them actually
+ overlapping with each other.
+
+commit 7a4066b617efddcdac68b315048f947e2517d34b
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sat Mar 31 09:41:12 2018 -0400
+
+ Store group size with the calc_status instance.
+
+ And add a method to formula cell that returns formula group
+ properties.
+
+ This commit also renames sheet_size_t to rc_size_t, to make it sound
+ more generic and be usable in other areas.
+
+commit eb29194b87a7ad73b01a0c0e377af8d2042830a8
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Mar 30 22:49:43 2018 -0400
+
+ Keep track of grouped ranges so that we can find their origins.
+
+commit 0c64338400e823dc7cfa67647a7eaf91032d84c9
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu Mar 29 20:39:35 2018 -0400
+
+ Remove unused method.
+
+ I don't think there is any value keeping this method around.
+
+commit 158699bdaf8ea17634a07e320605455f07e3b143
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu Mar 29 19:32:05 2018 -0400
+
+ Use ranged for loop and remove unused function object.
+
+commit 5c10772ae03f9e2b4f1d4c801d079b6d4d3aaf6e
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu Mar 29 19:14:42 2018 -0400
+
+ Fix a bug in get_all_dirty_cells().
+
+ * C5 listens to A1:C1.
+ * A10 listens to C5.
+
+ When A1 gets modified, the old code would only return C5 as its
+ dependent, but it should actually return both C5 and A10. This change
+ fixes it.
+
+commit 62f4d060dd071357dba0b7ba1de6592b0855aa2b
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Mar 28 23:10:22 2018 -0400
+
+ Add a separate test program for dependency tracking.
+
+ Currently range tracking isn't working. I need to look into this.
+
+commit 85cf3b39cdcf1bf30aea66971349568ef6ef58e7
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Mar 28 21:57:29 2018 -0400
+
+ Be more descriptive.
+
+commit e91f61cb44ad39021a805c009d7ec5a13034eb8d
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Mar 28 21:44:49 2018 -0400
+
+ Retrieve a single numeric value from a matrix result.
+
+commit 62f46e18c0eafd9e17511b4d5ebe72825ecf4ee1
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Mar 28 20:08:59 2018 -0400
+
+ Check for re-calculation as well.
+
+commit 4f6245bb0b28ff59bbf18edb52fbee0d4904d09f
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Mar 28 19:59:19 2018 -0400
+
+ Add a function that always returns a single cell result value.
+
+ And use it when validating formula cell calculation results. With
+ this, now we can enable the MMULT function calculation test which
+ returns a matrix result.
+
+commit 1bfabe2e2663946028ced59db57cfb9cb89da128
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Mar 27 21:46:30 2018 -0400
+
+ Add some rudimentary test for matrix and numeric_matrix.
+
+commit c421a8413f1cbd378810280c3e9deefb65f5ad4b
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Mar 27 20:32:56 2018 -0400
+
+ Make nuemric_matrix column-major.
+
+ Since the matrix class is column-major, we need to make
+ numeric_matrix also column-major as well, else it would transepose
+ the content when being passed to the matrix constructor.
+
+commit c03353d24078f8b5d790336b4046cbdcef80fece
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Mar 27 20:28:00 2018 -0400
+
+ Print out the matrix result for real.
+
+commit 5e1b7103e10e1aef0a3a597eb3fd86dc85a21e00
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Mar 26 21:34:07 2018 -0400
+
+ Remove unused & non-functional class.
+
+commit 42934079d6a3741c56dfb482c6ccb4b700ce9014
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Mar 26 21:31:13 2018 -0400
+
+ Get the matrix formula cell to calculate & fix the display string.
+
+commit 790c5d97ca25ff9683a3acdfedbcaa4c18abe3f1
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Mar 26 21:15:33 2018 -0400
+
+ Finally manage to insert grouped formula cells for matrix values.
+
+ Still not working fully yet.
+
+commit e1177987476fae59ba0ed4428da500b0b9bbc197
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Mar 26 18:38:43 2018 -0400
+
+ Discover and parse matrix formula definitions.
+
+ Matrix cells are not yet created.
+
+commit c7023be5b6afb55f24f9c93fafb985883f349a9d
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sat Mar 24 13:30:15 2018 -0400
+
+ Add test case for ranged definitions with duplicate values.
+
+commit d4b11e8967890947ebcb02072e3b59ebae2527fe
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sat Mar 24 12:49:45 2018 -0400
+
+ Support iterating in either horizontal or vertical direction.
+
+commit fe5e0c3d13465339c83493c03b55bc921129d477
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sat Mar 24 11:18:44 2018 -0400
+
+ Add iterator for absolute address ranges.
+
+ And use it to iterate through cells within range.
+
+commit 320f7026c64492d970bc437189ce9b2dfb8a0eb9
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Mar 23 22:28:31 2018 -0400
+
+ Work on supporting assignment to cell range.
+
+ The goal is to let you do things like:
+
+ {A1:C3}=1
+
+ to mass-assign the same value to multiple cells which in this case
+ is A1:C3. Not finished yet.
+
+commit f825b566f7eed096d0a1d86a28bfa5dbe01e0402
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Mar 23 20:01:11 2018 -0400
+
+ Remove non-buildable debug statement code.
+
+commit 6b02023e674424dd22df2d7911f712c6b1fb6bdf
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu Mar 22 17:43:45 2018 -0400
+
+ Stack is LIFO, not FIFO.
+
+commit fcdaa998f94a243f599b3cc2023a7aa8985f5a88
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Mar 21 21:20:49 2018 -0400
+
+ Add the ability to store matrix result to formula cell.
+
+commit f83adb060523ac41bfb140a46d8b92e7a40b14b5
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Mar 21 19:53:04 2018 -0400
+
+ Add these files to slickedit project.
+
+commit 21c2a34c2226586fab4a242eca13ab6d2e7d66a3
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Mar 21 18:39:22 2018 -0400
+
+ Share single calc_status instance amongst all grouped cells.
+
+commit a062604d5df1fb691f0e2ee03ea78daad3d55a6c
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Mar 20 22:35:14 2018 -0400
+
+ Add a class that manages creation of grouped formula cells.
+
+ I still need to work on sharing the calc status object amongst the
+ grouped cells.
+
+commit ea5770cb1ca2e3a8313b00fc528dbe0b7f7bd488
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Mar 20 21:22:18 2018 -0400
+
+ Make sure we calculate only the top-left cell of a group.
+
+ Of course if it's not grouped, it's okay to calculate.
+
+commit d3186c61746b5d2686e1645488650ff60b59388d
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Mar 20 21:15:21 2018 -0400
+
+ Reduce the amount of dereferencing.
+
+commit 68ff9546747556030b31173ec78a69c9050f8596
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Mar 20 20:46:35 2018 -0400
+
+ Rename interpret_status to calc_status. Easier to type.
+
+commit 84675c852edac57b9be4ab097132785799e9bb07
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Mar 20 19:30:44 2018 -0400
+
+ Preparing formula_cell to be groupable...
+
+ Store group position info, and make the interpret_status object
+ shareable.
+
+commit 804f13bcea5f0a7a25820791f30a219368f9d07c
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Mar 19 22:06:20 2018 -0400
+
+ Disambiguate make_unique.
+
+commit 03b4c383f2094566694b2d5307c072988944e0cd
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Mar 19 21:55:59 2018 -0400
+
+ Push matrix result onto the value stack.
+
+commit 94813f3bad6bb9f1700d5f9416965dd3b05e169d
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Mar 19 21:12:52 2018 -0400
+
+ Implement MMULT partially.
+
+ Only the top-left matrix value is returned as the result for now.
+
+commit ac52c79fba6251f9f2a51f1b3858ec7d1c63f883
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Mar 16 21:27:09 2018 -0400
+
+ Add function hook for MMULT.
+
+ I have yet to properly implement this function.
+
+commit 95685e1986a0fe64f76e2e6f88cd7cb2103c7ecb
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Mar 16 18:18:32 2018 -0400
+
+ Rename get_store() to just get().
+
+commit ad384af0a7ca768bb8a538d630389c632d3abc87
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu Mar 15 22:02:03 2018 -0400
+
+ We don't need this struct now.
+
+commit 67de163f742cff925766137ea76bd48b837b24ec
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu Mar 15 21:56:28 2018 -0400
+
+ Use std::unique_ptr for this.
+
+commit 1964aa6b90c8fef7f993984651aef53076cac5a0
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu Mar 15 21:42:47 2018 -0400
+
+ Add a variant of set_formula_cell() that takes shared formula tokens.
+
+commit 194de0da5ed511ccaca2a85874bb85c997d74668
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu Mar 15 21:25:11 2018 -0400
+
+ Change set_formula_cell() to take formula_tokens_t instead.
+
+commit 4dba364ccda347823b7c920faf5b56acc7d9df47
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu Mar 15 20:41:53 2018 -0400
+
+ No more separate tokens storage with model_context.
+
+commit 2df2be51a49602cc09e7733c1dda0f4ecac7a6f2
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu Mar 15 20:19:37 2018 -0400
+
+ No more shared flag in formula_cell.
+
+commit 5caa380f9c8481bcac9914955778afa48f43982f
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu Mar 15 20:17:53 2018 -0400
+
+ Remove identifer storage from formula_cell, and get it working.
+
+commit 7b138c958ac9d16997941e4e324e14091baf7e62
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu Mar 15 18:49:57 2018 -0400
+
+ This method doesn't need to be in the interface.
+
+commit e6247cb934abff67f30ee9c024f605de08fe7a93
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Mar 13 22:28:11 2018 -0400
+
+ Getter is const. Also let's return a const reference instead.
+
+commit 53e6ba8587a6f454eb4233ff013af0ec8bf04284
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Mar 13 21:25:34 2018 -0400
+
+ Make the formula_tokens_store's pointer type forward-declareable.
+
+ And add setter and ctor for this in formula_cell.
+
+commit d3c70591b3e7d49cfa2bde2fb38b7e5d05f49641
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Mar 13 19:26:00 2018 -0400
+
+ Let's not forget to add a way to get the actual tokens.
+
+commit 3ebb94cf06dffcd01a4d1fa76f9366f1f7a46c28
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Mar 13 19:18:14 2018 -0400
+
+ Add a staic create() method and write some test code on ref-counting.
+
+commit 6fd3a15cc58346582584f00d7979e2fe7be14d27
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Mar 13 18:55:28 2018 -0400
+
+ Add a new class to store ref-counted formula tokens.
+
+ Not used or tested yet.
+
+commit 14101da22a1bdf2238783c4a9dd6c334ff2706f7
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Feb 19 10:57:12 2018 -0500
+
+ Support configuration option for output precision.
+
+commit ea8a160b021494d59fc9add18537bf95151b57a0
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Feb 12 18:24:52 2018 -0500
+
+ Do actually make use of the argument separator specified in the config.
+
+commit a0df598f829864cf346de7c1fad4d0b2feeec23c
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sat Feb 10 11:58:13 2018 -0500
+
+ Add a test case for the built-in CONCATENATE function.
+
+commit 2ae3fa659555f1a90ee0a37e2194416e3a0f0cfd
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Feb 6 22:17:30 2018 -0500
+
+ Up the version to a development version.
+
+commit 32ee682a379e1626f5f5a06765fa67504ca20cfe
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Feb 6 22:09:32 2018 -0500
+
+ This part is not cross-platform. Conditionalize it against _WIN32.
+
+commit cefe6073242891a74aeaab3c5ffa3f0ecad182cf
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Feb 6 21:59:15 2018 -0500
+
+ Put the compute engine and related code under 'draft' namespace.
+
+ They are still largely experimental.
+
+commit 381484fcce806bc6d5742bb548b0c3343147130d
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Feb 6 21:48:51 2018 -0500
+
+ Let's call the default compute engine "default" instead of "base".
+
+commit edf79aa57df59488a1202764389620e497523d15
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Feb 5 18:46:14 2018 -0500
+
+ Add --enable-cuda build option to enable/disable CUDA compute engine.
+
+commit c928f23e5037c8352fa85b29c5eebb4a723df94d
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Nov 28 20:29:38 2017 -0500
+
+ Use boost filesystem for real.
+
+commit 26832e00afafbfa97c078765178e20d1ce9fcac2
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Nov 28 18:53:34 2017 -0500
+
+ Change it so that new module types can be added later.
+
+commit 392458df4d8fa119408e53eb9969ad4e6f5ad24d
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Nov 27 20:23:50 2017 -0500
+
+ Avoid hard-coding the API version string.
+
+commit e95147daeecf04a8db1e74649c93f8f8e6d2bd92
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Nov 20 21:12:36 2017 -0500
+
+ Add class and method docs.
+
+commit a02450f9de44b0964851f2e44a75eb8cf4ba2b38
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Nov 20 20:57:48 2017 -0500
+
+ Store the create/destroy function pointers for compute_engine classes.
+
+commit 59e6d0ea6ec956177412c04cc6f8f8dd2ce1e1ac
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sat Nov 18 22:38:40 2017 -0500
+
+ Get module definition data from the cuda module.
+
+commit b9c8815a28436bbdaa3e427a0e90d33426d15692
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sat Nov 18 21:06:49 2017 -0500
+
+ Set up a test environment for the new compute_engine class.
+
+commit cabbb69afbbed81a2e8b5346893ae540f305d5ea
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sat Nov 18 18:59:36 2017 -0500
+
+ Use nullptr.
+
+commit a00f1c8c39ca136eb4dd4b686318dc303ddcf75e
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sun Oct 8 21:42:49 2017 -0400
+
+ Remove obsolete Visual Studio solution files.
+
+ Use cmake instead.
+
+commit 2aa13f6f281da3dda38046d5df9ba44b504a493a
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Aug 15 20:54:48 2017 -0400
+
+ Update the authors list.
+
+commit b4f8fb210e389844a488be843fdc13ddd258d62e
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Aug 15 19:34:52 2017 -0400
+
+ Add URL's to the 0.13.0 packages.
+
+commit 789a08ebc3e7fc2a3914fc34b2497bf476952bfc
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Aug 15 19:18:03 2017 -0400
+
+ Update the changelog.
+
+commit bc55f21bbefc4ca9e73164453c60c859cd8ec5dc
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Aug 15 19:10:39 2017 -0400
+
+ Up the version to 0.13.0.
+
+commit 1bee3e9977e10818b75c7f44fcaaa9fa1aa49801
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Aug 4 21:23:17 2017 -0400
+
+ Another failing test case and a fix for it.
+
+commit 9819ad4284d173e81106d4dd55a67ab2048dd8d3
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Aug 4 21:06:14 2017 -0400
+
+ With this change, the newly-added test now passes.
+
+commit 1e57b24c3acb9797847eed776d92750c8fc2afc0
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu Aug 3 20:58:58 2017 -0400
+
+ Add a test that currently fails.
+
+commit 7a075c84cfe4a1963d18c107004200c87c7e9b73
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu Jul 13 18:29:09 2017 -0400
+
+ Remove code duplicates.
+
+commit 352b95e4adf49a697166313fa590068553a8cc05
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu Jul 13 17:51:44 2017 -0400
+
+ Test boolean values with SUM.
+
+commit bc7b844c203e5a0cd8dd9ebd68f8452a1cba8dba
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu Jul 13 17:50:15 2017 -0400
+
+ Get boolean values to work in COUNTA function.
+
+commit 2f488e2af2353e52be14222b01f525b556758cfe
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Jul 12 21:48:04 2017 -0400
+
+ cmake: enable parallel build with MSVC backend.
+
+commit beb852797fc2232c93a89719a4a95421fac8c304
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Jul 12 21:39:19 2017 -0400
+
+ cmake: silence some known compiler errors for MSVC.
+
+commit 7687a5a674c84503a01f47c56a1808cbf6c45d0e
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Jul 12 21:07:43 2017 -0400
+
+ Add initial boolean value type support.
+
+ Still experimental, and not all corner cases are expected to be
+ working.
+
+commit 1cdb0489d2b825c04079e5ac38940df75c409aca
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Jul 12 18:45:03 2017 -0400
+
+ More descriptive exception message.
+
+commit 7a92289de22b9be106cdb9bf8e9a19bc6f12669c
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu Jun 8 16:47:16 2017 -0400
+
+ Tweak the wording a bit.
+
+commit 14b28d947ae04be1d13469461b055a1b28ef73b0
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Jun 7 21:24:25 2017 -0400
+
+ Add a contribution guide.
+
+commit 8b22a794a3b4545748e06367ac64fb118f2a0b10
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Jun 7 21:12:59 2017 -0400
+
+ cmake: add ixion-sorter and ixion-formula-tokenizer executables.
+
+commit 4abf226d052663f42ba9c2433a04033758f96824
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Jun 7 21:03:38 2017 -0400
+
+ cmake: add ixion-parser target.
+
+ And fix one build error.
+
+commit ffb9ad7e66285526ca8b2a97f8164b90cc31ba8d
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Jun 7 20:40:03 2017 -0400
+
+ cmake: define necessary compiler definitions for a DLL build.
+
+commit 3270d6b1f541fc011da062942cb96ac02d690712
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Jun 7 20:27:23 2017 -0400
+
+ Perform pre-build file generation the same way autoconf does.
+
+ We need this for non-autoconf build system i.e. cmake.
+
+commit 31495ad282df5acc66e9b8d40fbdd4e7095572d7
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Jun 7 18:40:56 2017 -0400
+
+ Fix the build on vs2017.
+
+commit 699333f0b227ccde92271cf83719180cda835ebd
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Jun 7 17:49:11 2017 -0400
+
+ cmake: add all the source files for libixion target.
+
+ Still not buildable.
+
+commit c1f85fe0c245c56736a192456feceeb185ecc553
+Author: Markus Mohrhard <markus.mohrhard@googlemail.com>
+Date: Thu Jun 8 04:21:59 2017 +0200
+
+ fix missing header include
+
+commit d300ed3caadba1f73a30000280477f059f300418
+Author: Markus Mohrhard <markus.mohrhard@googlemail.com>
+Date: Thu Jun 8 04:10:55 2017 +0200
+
+ we might no longer need the old ABI
+
+commit 7212efdbd79c4af43588cfd68886d2c0795a930b
+Author: Markus Mohrhard <markus.mohrhard@googlemail.com>
+Date: Thu Jun 8 03:52:51 2017 +0200
+
+ more debugging help
+
+commit aa1c9681a77f71fdefe794b9fc124679ab56cbc4
+Author: Markus Mohrhard <markus.mohrhard@googlemail.com>
+Date: Thu Jun 8 03:48:15 2017 +0200
+
+ help in debugging failure in ci job
+
+commit bd73d17226c751ae4fc7b3dbc8697d26f109d8ea
+Author: Markus Mohrhard <markus.mohrhard@googlemail.com>
+Date: Thu Jun 8 03:30:09 2017 +0200
+
+ recognize gcc 5.4 and gcc 6.3 in boost.m4
+
+commit 927808c7d6d4a78acb824d1416f3c86bb3766176
+Author: Markus Mohrhard <markus.mohrhard@googlemail.com>
+Date: Thu Jun 8 03:25:25 2017 +0200
+
+ update boost.m4
+
+commit 432ed93f59c0cbe764cc3718bc7f653f99ca71b1
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu Feb 9 21:30:18 2017 -0500
+
+ Support named expression parsing with Excel R1C1.
+
+commit a726d8d64a441ad6febc6797e4f1152adaf0ae32
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Feb 7 19:33:36 2017 -0500
+
+ When the sheet name is given and isn't found in the model, it's invalid.
+
+commit 150e0ac7793e8ed6aea10a18c1fc92fd841a2480
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Feb 6 21:50:08 2017 -0500
+
+ parse_formula_string() and print_formula_tokens() to return value.
+
+ With C++11's move semantics, this makes more sense...
+
+commit a21ee8087c2d18f7b52f5a4cf1045e79b7a804fa
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Feb 3 21:50:09 2017 -0500
+
+ Add test case to handle invalid name error.
+
+commit 10e9a8c9f69c2ebe60accc38c78eee83b4f2388e
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Feb 3 21:49:38 2017 -0500
+
+ Handle '#NAME?' error in the formula result.
+
+commit 0a7a8b2c6727d6d2d017324e5beaf9cdba4a7bd0
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Feb 3 21:14:28 2017 -0500
+
+ Fix wrong error message.
+
+commit cbc4fb5c9d131d6f038c6d74836d597309cee3b4
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Feb 3 21:08:12 2017 -0500
+
+ Use parse_assignment() method to simplify the code a bit.
+
+commit edb4f8853fa580c08296aae38d21e89547ee8092
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Feb 3 20:15:25 2017 -0500
+
+ Generate #NAME? error on non-existing named expression.
+
+commit 3b5c7a37c6f136932eaad6c554537dc28d19b7c5
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Feb 3 18:55:51 2017 -0500
+
+ Throw a more specialized exception for non-existing named expression.
+
+commit 4e069dbf47c29c0523b033ad283fff6b0ee626da
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Feb 3 18:36:46 2017 -0500
+
+ Let's remove this. This has become bit-rotted.
+
+commit 36f578bccfe73ade51b9176453951a4e5643ac0b
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Feb 3 18:35:23 2017 -0500
+
+ Add new error type for #NAME?.
+
+commit 2c83e6fb3c7d498a07aeff719b5fbaa34cb35563
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Feb 3 18:25:04 2017 -0500
+
+ Print named expression names.
+
+commit c57d435fca8163d0fbab849183c924c51d4e4fc6
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Feb 3 18:20:24 2017 -0500
+
+ Print individual token data via formula-tokenizer.
+
+commit 079b58d8ca2097c73b410d8064d26d5dbf1d9065
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Feb 3 17:31:45 2017 -0500
+
+ Make sure the 'exit' command really exits.
+
+commit 12768b2c7f7ccecbf6b6bc5b2a81cdb0a33b82a4
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu Feb 2 22:32:18 2017 -0500
+
+ Check the sheet index against the sheet count.
+
+commit f5a72147fe4f46ea16ce061c4071054fa723a67c
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu Feb 2 22:17:12 2017 -0500
+
+ We can't assume that mp_cxt is never nullptr.
+
+commit 7aef80602ad02e2bac0f200b5319e8cca7f58a8f
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu Feb 2 21:13:32 2017 -0500
+
+ We don't need this interface method now.
+
+commit b55d48d1c39cdbf811d8fac556d47f4a546fd674
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu Feb 2 20:29:48 2017 -0500
+
+ Check the results and test the recalc after editing.
+
+ Now I can add this to the official list of test cases.
+
+commit 4ae122f9d9af80e067ed6a1ecd4899d90c1a0ba0
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu Feb 2 20:12:56 2017 -0500
+
+ Pass the "show sheet name" flag to the session handler too.
+
+commit 3f60def1bf25d3cab79bc12c7d8a87a69ff19639
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu Feb 2 18:36:58 2017 -0500
+
+ Test file for sheet-local named expression.
+
+commit d64f1b93f8fdb36b708e8755cbab6d8c5432c71a
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Feb 1 18:45:37 2017 -0500
+
+ Handle sheet-local named expressions.
+
+commit 01debe03a12d5b672630063f4e072d8ea6a31c74
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Jan 30 22:44:45 2017 -0500
+
+ Add new session command to toggle sheet name display.
+
+commit 0bdd9bd21f8dd7442a75619c63392c339a187382
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Jan 25 22:18:33 2017 -0500
+
+ Use override keywords.
+
+commit 0ca4162e1650d9a47d52d858ef746435bb85d2d1
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Jan 25 22:13:34 2017 -0500
+
+ Make this test case an official part of the test collection.
+
+commit d01a86a5ca8db35f7a980acec43aacefe71760e8
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Jan 25 22:12:48 2017 -0500
+
+ Test for editing and re-calculation.
+
+commit 7e64bbe109eabcdfd78f2f5db5727da36753dade
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Jan 25 20:04:22 2017 -0500
+
+ Make sure that address position outside the sheet boundaries is invalid.
+
+commit b38de9a120440cd1f964d57108876ec75142c688
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Jan 25 19:26:29 2017 -0500
+
+ Ensure that the column value won't overflow.
+
+commit db8837fa7bf43b67793f02a9a144076607cf0a41
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Jan 25 19:04:16 2017 -0500
+
+ Add test for named expressions.
+
+ It currently fails on 'MyRange2'.
+
+commit 9417577fa8a78df5657df3cf2c6d10fe785d8f9b
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Jan 25 16:38:48 2017 -0500
+
+ Remove bitrotted debug code...
+
+commit 71f5957549e7de302c419fc848b8269167b21aa2
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Jan 24 23:00:29 2017 -0500
+
+ Refactor a bit to expand named expression during reference retrieval.
+
+commit a50d0c8f7e73960e6049db95dd9521caa1b656d0
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Jan 24 21:28:08 2017 -0500
+
+ And push the named expression into the model for real.
+
+commit 9cb27dedabb4ba99ef6c77b7ddab2ee718bd91c0
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu Jan 19 22:20:37 2017 -0500
+
+ Parse the named expression block.
+
+ Next step is to push it into the model.
+
+commit d0f40e3d3f4f07586b7c784f7b381eaeabd453b6
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Jan 18 18:45:39 2017 -0500
+
+ Store formula_tokens_t for named expression instead of formula_cell.
+
+ And this will bump up the API version.
+
+commit b1997764afc3c8660a5f9b90f68a6ea455cb8b2e
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Jan 18 18:18:54 2017 -0500
+
+ Parse named expression blocks.
+
+commit 1c13ab7efd9f5f5d128b298ae670671ffb6f5ea2
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Jan 17 21:44:37 2017 -0500
+
+ Parse session block.
+
+commit 7f91f8389cade81691b09bd5f45bd7ef43525219
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Jan 17 20:36:10 2017 -0500
+
+ Refactor the model parser a bit...
+
+commit f5b7e16ac36b052b2e33a7d3eb21e00826b511a5
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Jan 16 22:46:40 2017 -0500
+
+ Test file that I need to support. It doesn't work yet.
+
+commit 66f8238d7309165ddd005a2b7ddcb024a388e798
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Jan 16 22:46:16 2017 -0500
+
+ Prepare for upcoming session mode.
+
+commit 26cb9b2d026a185841def623aba01d5c9d3e7ee9
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Jan 16 22:20:14 2017 -0500
+
+ Require an explicit 'exit' command.
+
+commit da294fc2d80772b4cdc43e23595cb23d619a4760
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Jan 16 19:59:38 2017 -0500
+
+ Implement setters for the sheet-local named expressions.
+
+commit 16353df35408c3c6f6afd7727ad9d2dc6ecd1a3a
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Jan 16 18:47:11 2017 -0500
+
+ Implement getter methods for sheet-local named expressions.
+
+commit 3d7e11aef952947c4c1041c5149bd7fb042620ba
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Jan 16 18:07:47 2017 -0500
+
+ Move the named expression type into a common place.
+
+commit 5fed7a42cc4582ba785074661248e52d07d4f32d
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Jan 13 19:51:37 2017 -0500
+
+ Add rudimentary formula string tokenizer.
+
+ Use for debugging.
+
+commit c4e6aff5a34e7cec2b360284d8bd241dba5105bc
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Dec 14 21:18:31 2016 -0500
+
+ Add URL's to the 0.12.2 packages.
+
+commit 59c2852a4ccc2fc736e0a11a1135bf5de881c8d4
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Dec 14 21:01:02 2016 -0500
+
+ Up the version to 0.12.2.
+
+commit 95abcd359ebe848566d710e7b3ad54bb35138252
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Dec 14 20:59:54 2016 -0500
+
+ Update the CHANGELOG.
+
+commit 7c75ce333a27c808069d9b7f541968d4cad9181d
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Dec 14 20:55:22 2016 -0500
+
+ Fix lexer tokenizer to get R1C1 addresses properly parsed.
+
+ For now, a lexer name that contains a '[' and ']' pair can have any
+ characters in-between, in order to have e.g. 'R[-5]C' properly
+ parsed as a name.
+
+commit 5daa352543d12e10e81307210728dab3d0063ef5
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Dec 14 18:38:47 2016 -0500
+
+ Fix a range address parsing error.
+
+ It previously failed to parse 'R[-5]C:R[-1]C'.
+
+commit 496bb1a2332f809029f934fd31ce1e2f0f434d7e
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Dec 13 22:46:24 2016 -0500
+
+ Add a test case that ixion currently fails to parse.
+
+commit 13a5896b9a8ed558b1ed23170d565e56e5a441f7
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu Sep 29 20:10:12 2016 -0400
+
+ Export these hash::operator(...) symbols.
+
+commit 27e8cbda4bfab21c92cffc70d8478dd7b1ffcf42
+Author: Markus Mohrhard <markus.mohrhard@googlemail.com>
+Date: Wed Sep 21 23:36:47 2016 +0200
+
+ add CI config
+
+commit 51af38eb0788f95339cecb98f588d16643b98edb
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sat Sep 17 15:35:17 2016 -0400
+
+ Add entry to 0.12.1.
+
+commit f5d9be4201a23267b94d4c9584e27a53d6658b48
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sat Sep 17 12:05:31 2016 -0400
+
+ Set the version to 0.12.1.
+
+commit 38ea08e184dc84bd22b3f8962f5bf1be5b55a64a
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sat Sep 17 12:00:20 2016 -0400
+
+ Add extra check to make sure the file is not really compiled.
+
+commit d05cad7e901a2a558c8645fcf820271be49d828d
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sat Sep 10 15:36:00 2016 -0400
+
+ Add --enable-threads configure option.
+
+ When the threads are disabled, the thread count parameter will be
+ ignored and the calculation is always performed single-threaded.
+
+commit 466e7d9ecfeb7ead6d359ef2b6af60e571a90d43
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Jul 15 22:15:59 2016 -0400
+
+ Update.
+
+commit 7014df346fcec57710686438e29b2df7f81bd9d8
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Jul 15 22:13:51 2016 -0400
+
+ Add 0.12.0 to the download table.
+
+commit d85839c616293d3b73fd685a2a2bf3ff36200019
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Jul 15 20:04:36 2016 -0400
+
+ Remove unused.
+
+commit adf09865453a9d89f935b265d54b49d73c56aaf7
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu Jul 14 22:22:11 2016 -0400
+
+ CID 164670: Uncaught exception.
+
+ In function "main(int, char **)" an exception of type
+ "ixion::depth_first_search<...>::dfs_error" is thrown and never caught.
+
+commit f0442f4475350034ba3881d791297e2a935a98dd
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu Jul 14 22:17:13 2016 -0400
+
+ CID 164669: p0 may be nullptr and get dereferenced.
+
+commit ec9c561bf182e0370c67f5ffb60e578833484a6a
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu Jul 14 22:03:18 2016 -0400
+
+ CID 164668: Remove the code block that would never get reached.
+
+commit 9d5da4d09ff07cf613baea85612ba34b54fed9e4
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Jul 13 16:01:09 2016 -0400
+
+ Variable 'len' is reassigned a value before the old one has been used.
+
+commit 930f5cbc400a424ca924dec56c3660aee05dc3b2
+Author: Markus Mohrhard <markus.mohrhard@googlemail.com>
+Date: Wed Jul 13 13:56:30 2016 +0200
+
+ use enum class to avoid name conflict with local variable
+
+commit ad5767e6cdf4474b87bea2f6cc59d32308f18ff7
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Jul 12 22:44:36 2016 -0400
+
+ Fix this.
+
+commit 423b797d71309bc69e34d954eb749e937f802b14
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Jul 12 22:41:40 2016 -0400
+
+ Manage to get make distcheck to pass.
+
+commit 58da528ec301a25db0f1b345af4ac22d92432142
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Jul 12 22:30:06 2016 -0400
+
+ Remove build-time dependency on boost thread.
+
+commit 8237d4633e6dbc84eb903ce7e5570d4fc2d0e7e3
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Jul 12 22:26:20 2016 -0400
+
+ Set the version to 0.12.0 & some copy-n-paste of docs.
+
+commit b14272ae48cea590ac55f7859eab323c53ab14ba
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Jul 12 22:22:50 2016 -0400
+
+ More on documenting the code.
+
+commit 84f6e0a3e739d743f3b52fb62eafc5030b0a1b52
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Jul 12 21:44:56 2016 -0400
+
+ Update.
+
+commit ddc24b16ce10e4f3ee2e0b6bb8952ab156d70478
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Jul 12 21:41:31 2016 -0400
+
+ Add link to the doc.
+
+commit deedbf2e5b4f21e8265481247553ea98baf66db0
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Jul 12 21:34:59 2016 -0400
+
+ Split the doc into sections.
+
+commit 3dacc7be0ff4e6a1a75e1f46ed9ee4793a32119b
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Jul 12 21:15:00 2016 -0400
+
+ Move formula_error_t and associated function to types.hpp.
+
+ It makes more sense that way.
+
+commit aeda3d18990d205a7c247f458f4ecde64950f352
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Jul 12 21:05:26 2016 -0400
+
+ More on documentation.
+
+commit 503b9fc48a91559b6310138e4ce66380dcc8757c
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Jul 11 21:05:11 2016 -0400
+
+ Get ixion to build on OSX again.
+
+ and make check passes too.
+
+commit cd98e73ab2c97299cc0573a90fbb0840baac15df
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Jul 6 22:26:16 2016 -0400
+
+ get_all_formula_cells() to return the list directly.
+
+commit 3e861d01843d0187574bfeb08f4defb1986ef636
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Jul 6 22:13:08 2016 -0400
+
+ Add more to the doc. We are far from complete.
+
+commit c72fe3684bd0d5cd64ed88fab9dcafcff90c84c3
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Jul 6 21:42:47 2016 -0400
+
+ Document address types.
+
+commit 0e9006be552f728048142a1943312a691a588f16
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Jul 6 21:07:41 2016 -0400
+
+ Document the main formula API and interface classes for C++.
+
+commit aa2afd6bab5e618b9424ba443c92fa49251ffc3f
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Jul 5 22:32:12 2016 -0400
+
+ Attributes should come up front.
+
+commit 7db11cc2422b62bdc59c3f0ff28e65c39f94eb2d
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Jul 5 22:29:46 2016 -0400
+
+ Be sure to set appropriate exception object when returning a nullptr.
+
+commit 092f989ca9b4fa1b8d5cb7f49830c9dbedf46bde
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Jul 5 22:11:23 2016 -0400
+
+ NULL->nullptr
+
+commit d48315a3dcc0f9888aab0664c83b4cb7e34c2462
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Jul 5 22:05:18 2016 -0400
+
+ Document all the method parameters.
+
+commit 580a9e67467a497b43ee4721fa8d9b7d860f3f90
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Jul 5 21:56:26 2016 -0400
+
+ Update the document to add the new 'threads' parameter.
+
+commit 0b806053ddd7a27239c88b126da3afabc9df6857
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Jul 5 21:49:59 2016 -0400
+
+ Update the documentation to reflect the change.
+
+commit 9d3b592deb6b34fb237e4c019503bf70ee762311
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Jul 5 21:46:20 2016 -0400
+
+ Turn get_sheet_names() method into a sheet_names read-only attribute.
+
+ That's probably more pythonic.
+
+commit 1a0582f9300616f73f99274a6ea9dfe074afe51d
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Jul 5 20:53:20 2016 -0400
+
+ Rename document to pyobj_document.
+
+ To disambiguate it from non-python document class.
+
+commit b128857229849a570eb600d2803ea0cca2dac0eb
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Jul 5 20:42:35 2016 -0400
+
+ Revise the doc for ixion.Document.
+
+commit edb2f7bb4a40476c612ba2141bc6059e6bfd1192
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Jul 5 19:28:14 2016 -0400
+
+ Set current module correctly.
+
+commit 54c3e3121fc8d6efd99b5252306de924d9874176
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Jul 5 19:23:32 2016 -0400
+
+ Restructure the sphinx doc.
+
+commit 8ef58dda013241f3510a919fa05646dc438d4324
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Jul 5 19:10:18 2016 -0400
+
+ Use breathe & bootstrap in sphinx doc.
+
+commit bac9f2de781e5620e58f2913a6ce1d68c8c6f696
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Jul 5 19:05:06 2016 -0400
+
+ Set up build targets for documentation.
+
+ For both doxygen and sphinx.
+
+commit dfa56f9064ee48ddf09a8bae6fd0338d5de5a13e
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sun Jul 3 20:56:02 2016 -0400
+
+ Add threaded calculation support in the Python API.
+
+commit 5f617a2dfdb2e028461ad4ded0d07421f266aba6
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Jul 1 20:18:54 2016 -0400
+
+ Add an entry for a bug fix in threaded calculation code.
+
+commit f68aedf5d4aae66c77313793e2a2118a9cc2414f
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Jul 1 20:14:30 2016 -0400
+
+ Execute parser tests for 1-8 threads.
+
+commit beaac157ef44192f28dc7ab2ca794c7f805bf3b8
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Jul 1 19:00:14 2016 -0400
+
+ We need to block on get_result_cache().
+
+ Else threaded calculation would sometimes generate wrong results.
+
+commit 00649a301f7d693863e458a556b73629f776db74
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Jul 1 17:57:11 2016 -0400
+
+ Print out more details.
+
+commit efb654942443d314d2f25f8ccd98728954a71fbe
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Jul 1 13:11:04 2016 -0400
+
+ pimplize matrix.
+
+commit 0bc8cde0fd31f94af4aaa1070171c5ef734ecf3d
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Jul 1 12:22:55 2016 -0400
+
+ get_ref_tokens() to actually return the tokens.
+
+commit e3fa536be4be874d3081d0a3c92c43e695fddfe3
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Jul 1 12:12:56 2016 -0400
+
+ Cleanup.
+
+commit 518b6fd7477c8dfaac99d4ad56e547e4fc36ea5e
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Jul 1 12:09:43 2016 -0400
+
+ Export these symbols.
+
+commit bad4c3549637c14636090c95cd4b78fe6f3950d5
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Jul 1 12:06:03 2016 -0400
+
+ Rename formula_token_base to formula_token.
+
+commit e091c6c91560280944b41315c6976b5b3bd73208
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Jul 1 12:04:09 2016 -0400
+
+ Hide concrete formula tokens implementations.
+
+commit 53bfe28022afacb3b431d85d02c17c5bb2da6e17
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Jul 1 11:53:52 2016 -0400
+
+ Make formula_result::result_type an enum class.
+
+commit 1cc41e64a341b01645f9025e373a3d783115a552
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Jul 1 11:47:38 2016 -0400
+
+ Apply pimpl to formula_result.
+
+commit ed239880808f8ae807fc32e69ba9bfa1bf2a62e6
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Jul 1 11:17:43 2016 -0400
+
+ Rename formula_name_type to formula_name_t, and export its symbols.
+
+commit 6ee03e5c45e1306f7dbe96b523def0ce3f52d144
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Jul 1 11:06:20 2016 -0400
+
+ is_volatile doesn't need to be in a public header.
+
+commit d85e5ee2c838e2310b4d36cc13eaafb477d3ef6d
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Jul 1 11:02:43 2016 -0400
+
+ Hide cell_queue_manager.hpp too.
+
+commit c1a207453c6d8acf2deca4bf34731d6e8975e76d
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Jul 1 10:53:58 2016 -0400
+
+ Hide lexer_tokens.hpp.
+
+commit 968ebdb508d9ff14b31a284d193b01ff19b7c8de
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Jul 1 10:19:31 2016 -0400
+
+ Hide formula_parser.hpp.
+
+commit d664b1cc9f93fa6b58f897b5cbf763fe39ab00e9
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Jul 1 10:13:29 2016 -0400
+
+ formula_lexer.hpp doesn't need to be a public header.
+
+commit c997858e7c3ec4587e1932f78d9f71122f9e70b6
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Jul 1 10:09:21 2016 -0400
+
+ Cleanup.
+
+commit eca83edcb153eb045588fefeeaba443d96ab2512
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Jul 1 09:55:35 2016 -0400
+
+ Get the threading to work with pthread.
+
+ Apparently -Wl,--no-as-needed is required to work around a bug in
+ gcc 4.8.
+
+commit f63fc1acbf926dfffa6496b2287d229c082e3cbe
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Jul 1 09:20:11 2016 -0400
+
+ No need to have global sleep method.
+
+commit aae2d7ba78c0643732dfd5c35a3b9451944e9303
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Jul 1 09:10:10 2016 -0400
+
+ formula_error_t to be enum class.
+
+commit 7cea7717fc5a253d66fe3e4802f2465e594d4153
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Jul 1 09:01:36 2016 -0400
+
+ lexer_opcode_t to be enum class.
+
+commit 5c4a3f65fda1fe498279f386532fb473cd18fbc3
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Jul 1 08:51:15 2016 -0400
+
+ We don't use include/ixion/thread.hpp.
+
+commit b94f2e222d130864acd7088c9ebb5abac79a199b
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Jul 1 08:46:43 2016 -0400
+
+ Update the comment about number of threads.
+
+commit b349a2d782ce320bfc646ae5c39d0089960d5895
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Jul 1 08:45:08 2016 -0400
+
+ Remove additional boost header includes.
+
+commit e6e72a78f35d3b241c69dec57bbf3ed4fc2475b5
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Jul 1 08:41:57 2016 -0400
+
+ Replace use of boost/noncopyable with the standard '= delete'.
+
+commit 92dad84273ab88e430b2acbc16be976de26ed2ee
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu Jun 30 21:56:27 2016 -0400
+
+ pimplize session_handler.
+
+commit 5ffd2c4e625f6e900cd5e6360da0e99bb517f6ff
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu Jun 30 21:47:41 2016 -0400
+
+ Update CHANGELOG.
+
+commit 7a497071467917dd8f9b9bc0a75733af3b824a07
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu Jun 30 21:44:30 2016 -0400
+
+ Exception-safe way to join a thread.
+
+ Because the wait_one() method may throw.
+
+commit 21af4316f83aaf439fa4adf1f22cf6abf223e5be
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu Jun 30 21:41:31 2016 -0400
+
+ We can unlock mutex a bit earlier.
+
+commit c680e67057caa4b9482b5f0ee19215d96b14a533
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu Jun 30 21:39:31 2016 -0400
+
+ Prevent crash when a session factory is not set.
+
+commit 4daba7922e7c52aff90543122b0decfb1b9a20ef
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu Jun 30 21:34:05 2016 -0400
+
+ Make the output from the session handler multi-thread friendly.
+
+commit 3be5f21a6cdf6947eff682b6ceace5dd9472181d
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu Jun 30 21:18:05 2016 -0400
+
+ Create one session handler instance per cell.
+
+ It's a step toward making it thread safe.
+
+commit f8bae849c2f757de69796982f88aa099ba5882e9
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu Jun 30 17:15:27 2016 -0400
+
+ Re-implement the multi-threaded formula calculation engine.
+
+ Using C++11's async API makes the logic much, much simpler.
+
+commit d696bb517965ea00d3f41956e47c6e9ab3414aa9
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Jun 28 22:02:49 2016 -0400
+
+ Set up a skeleton API for the new formula cell queue manager.
+
+commit d788cfcc7828832f824029ad99d41a350f9ef8e9
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Jun 27 21:58:33 2016 -0400
+
+ Early bailout to reduce scope level.
+
+commit 764f401fbcdcf1478465cdbf8a6fd0b1bf2f9145
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Jun 27 21:49:38 2016 -0400
+
+ lock_guard over unique_lock when we don't need to unlock/lock.
+
+commit f2e8b7d537ea0d9b721fb81a04d77eae92fe71d8
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Jun 27 21:48:32 2016 -0400
+
+ Notify outside of the locked scope.
+
+commit b4c20414d3668cbc8f56b072be0ad182d5fbed2e
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Jun 27 21:47:35 2016 -0400
+
+ Avoid naked new operator in favor of unique_ptr.
+
+commit 61059b571a4ac07a4cec8398787c34fade6f1cb4
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sun Jun 26 14:27:23 2016 -0400
+
+ More cleanup of the header file.
+
+commit d22416673fc50c0080c2c82ca1fc6064c0f9878e
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Jun 24 23:45:59 2016 -0400
+
+ Use C++11's standard thread API.
+
+commit 9704b5942462fc95f80b369267b06fe6fa1bd7f8
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Jun 24 23:35:58 2016 -0400
+
+ We can use lambda here.
+
+commit 1af8f02511d11186bcc951bda929a5439752775d
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Jun 24 21:37:41 2016 -0400
+
+ Entirely hide the private methods & boost headers.
+
+ This will break API compatibility, hence the API version change.
+
+commit 55f482b4de88e17c5b2f42c317405e2ba391d2fc
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Jun 24 21:22:59 2016 -0400
+
+ pimplize formula_cell.
+
+commit 19bd124cef90f8492c6b082c8d52888c37dced7b
+Author: David Tardon <dtardon@redhat.com>
+Date: Thu Jun 16 15:03:37 2016 +0200
+
+ update boost.m4 to fix version detection with gcc 6.1
+
+commit a60c813d91833beb98cf5435cb66f40df697fba6
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon May 16 22:31:28 2016 -0400
+
+ Nodify while the mutex is still held.
+
+commit 4852fc91cf7609b292683e07d4b2eba84f6d2f67
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon May 16 22:30:17 2016 -0400
+
+ Fix python's version requirement.
+
+ Not sure why I set that to 0.28.
+
+commit f853792a5c3dec3c390f37b79c51cc4a0ee4460d
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri May 13 20:19:16 2016 -0400
+
+ Slightly make the threaded mode better.
+
+ Still broken.
+
+commit a1a2108c86de36a59e936bc6a9272eacecb8bce8
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri May 13 19:53:05 2016 -0400
+
+ Use closures.
+
+commit 79244d856bf822b0bb679dc11ea1b8a92ffc2e30
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri May 13 19:46:16 2016 -0400
+
+ Remove non-functioning debug conditionals.
+
+commit 7ffde1134c20f31897523b70d07a5ad68b619d3e
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed May 11 20:49:11 2016 -0400
+
+ Add 0.11.1 source packages.
+
+commit 3ffd62e7882bf948cdf593c2d7afb3229a4d596f
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed May 11 20:35:33 2016 -0400
+
+ Update it.
+
+commit 44539859a75774d3ad14f1ff5edccabeafca3d42
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Apr 4 20:03:05 2016 -0400
+
+ Add method docs.
+
+commit c1dc87c6c1284aa89b9d8a7af0bf5e5673df590f
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Apr 4 19:37:26 2016 -0400
+
+ It now requires mdds API version 1.2 (from the master branch).
+
+commit 5ebabdacfde847e7000e00ed79c7056c967b230f
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sat Apr 2 20:37:12 2016 -0400
+
+ Add model_context::get_columns().
+
+commit b0787b0d01b509559ec8779e3b06669d484f062b
+Author: David Tardon <dtardon@redhat.com>
+Date: Sun Feb 14 17:07:03 2016 +0100
+
+ MDDS_HASH_CONTAINER_BOOST was removed in mdds 1.0
+
+commit 97b5fe6bf868341e743b7b6e106b8991fc6b3684
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sun Feb 14 08:32:08 2016 -0500
+
+ Fix one factual error. cell.hpp still depends on boost::thread.
+
+commit 8da8a5b402e9e2861210baa0c1b236cf3750c964
+Author: David Tardon <dtardon@redhat.com>
+Date: Sun Feb 14 09:04:18 2016 +0100
+
+ distribute LICENSE
+
+commit cb8626668248d1de109c725569e97eadf96e7d28
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sat Feb 13 12:19:11 2016 -0500
+
+ We don't use shared_lock in ixion.
+
+commit aad829b30a0a4c13dcad84ff3a8fa883b08977de
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sat Feb 13 10:02:04 2016 -0500
+
+ Added URLs to the 0.11.0 packages.
+
+commit e7b9b3f2dd5314ff99dfe893c0c130707ce2c650
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sat Feb 13 08:37:47 2016 -0500
+
+ Finally make check passes on OSX.
+
+commit 0df924770c2dd01451bdf29b2ff2514c6cf0dcff
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Feb 12 23:19:48 2016 -0500
+
+ Fix make distcheck on linux.
+
+ This breaks make check on OSX, but I have no other choice.
+
+commit 705df7fad38c09861dc218e9893bbed5cfcc0887
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Feb 12 23:00:16 2016 -0500
+
+ Finally make check passes on OSX.
+
+commit 826d69a613ad35b5b7791812ed84791cc0964f40
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Feb 12 22:54:03 2016 -0500
+
+ Add /usr/local/* path.
+
+commit c06d6fc9c609f8173351cc08f83de2c375c92439
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Feb 12 22:28:07 2016 -0500
+
+ Add special script to run python tests on OSX.
+
+commit 550f0f3394127eb36235e27a10c4e5fbd4f673d8
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu Feb 11 21:36:40 2016 -0500
+
+ mdds 1.1.0 is officially out now. Make that a new requirement.
+
+commit a9f085f425ec5d591047df5301da5180e32abda8
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Nov 3 17:32:19 2015 -0500
+
+ mdds 1.0.0 is officially out now.
+
+commit 24c8320a72b6bade1e313d8492f1faae88c285d4
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Oct 13 19:14:02 2015 -0400
+
+ Add note about building from the master branch wrt mdds.
+
+commit e96f9a5280e3197ec44ff79b035dca7db8eb2bc3
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Oct 13 19:05:25 2015 -0400
+
+ Add build instructions.
+
+commit 6f1c764cf094b57aea67aefa00f1b63b3f410d15
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sun Oct 11 12:14:34 2015 -0400
+
+ Update.
+
+commit 37768b18396410f5156c603d73a98be0cf37cc46
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sun Oct 11 11:58:17 2015 -0400
+
+ COPYING->LICENSE
+
+commit 608095d04525f4e7dcd64d681f52d573dee0f873
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sun Oct 11 11:57:14 2015 -0400
+
+ Fix make distcheck.
+
+commit 8c8685df6d076345aaca6be6ffb08661d2bcda18
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sun Oct 11 10:49:02 2015 -0400
+
+ NEWS->CHANGELOG
+
+commit a9b2e13887f81d168e22eab1bd286d6227e616fd
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sun Oct 11 10:48:34 2015 -0400
+
+ Update NEWS.
+
+commit df1b8eb69779e74999ddb41ae86473aa6092298c
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sun Oct 11 10:22:15 2015 -0400
+
+ Manually specify API versions from now on, starting with 0.11.
+
+commit 6f00eefd2656ab77fd3379f177bcc0b3d90a2e23
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sat Sep 19 15:29:58 2015 +0000
+
+ Use table syntax for the download section.
+
+commit df58c0c2a15be373f284b0bad0d23eb4fc0aae15
+Author: Kohei Yoshida <kohei.yoshida@collabora.com>
+Date: Sat Aug 22 18:50:38 2015 -0400
+
+ Set DYLD_LIBRARY_PATH in more places to let 'make check' finally pass.
+
+commit b95bc9c5115e870cd8b2b461bf940e1cc374ca33
+Author: Kohei Yoshida <kohei.yoshida@collabora.com>
+Date: Sat Aug 22 17:52:26 2015 -0400
+
+ Explicitly define destructors, else model_context_error won't get caught.
+
+ In the try-catch block in document_append_sheet(), the catch block for
+ model_context_error wasn't being visited unless I defined its destructor
+ explicitly. It was hitting the catch block for general_error instead.
+
+commit a2cfa39722bea16ea71475bb0fa2003b5920d7ee
+Author: Kohei Yoshida <kohei.yoshida@collabora.com>
+Date: Sat Aug 22 15:30:16 2015 -0400
+
+ Make sure that we pick up the shared object from the build first.
+
+commit 56df9ab761a1445f8b18308f5fdc12902308432c
+Author: Kohei Yoshida <kohei.yoshida@collabora.com>
+Date: Sat Aug 22 14:42:56 2015 -0400
+
+ Fix a bug with the life cycle of string objects in the model.
+
+ std::string objects must be heap-allocated, else they would get copied
+ when the vector's buffer reallocates.
+
+commit 484a812b86e6d19fb82c06a70e05b027ce302742
+Author: Kohei Yoshida <kohei.yoshida@collabora.com>
+Date: Sat Aug 22 13:14:39 2015 -0400
+
+ Add method to help debug string pool in model_context on OSX.
+
+commit 200d1c7989df86f4f19308729780bbeeb17ee8f7
+Author: Kohei Yoshida <kohei.yoshida@collabora.com>
+Date: Sat Aug 22 11:46:29 2015 -0400
+
+ Add test cases for the string pool, which seems to be broken on OSX.
+
+commit 2fd42abda91a3740836fb82fe4cb820d6dad392e
+Author: Kohei Yoshida <kohei.yoshida@collabora.com>
+Date: Sat Aug 22 09:07:31 2015 -0400
+
+ Export correct symbol for python3.
+
+commit 3ef6cedf268c8e923efe534471a5fa1eb7ac5118
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Aug 18 21:02:18 2015 -0400
+
+ Some cleanup of the configure script and set default value for --enable-python.
+
+commit 2a14960fcf75e5f87fef329f89f7e90e7a2c358e
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Aug 18 12:54:44 2015 -0400
+
+ Fix the handling of --enable-python switch.
+
+ Turns out that conditionalizing the SUBDIRS doesn't work all that well.
+
+commit f15c376d251dd49b2202005ffed157f7d32c4393
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Jul 7 22:19:33 2015 -0400
+
+ Use the master branch of mdds.
+
+commit e26a5b8bde8fd4f090e772b0ee1cb167552339b4
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Jun 29 19:40:38 2015 -0400
+
+ IXION-ize it and use full file path.
+
+commit 72175bfe0da274bd1ccff81a7d8b16efafeb7097
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Jun 29 19:30:44 2015 -0400
+
+ Better script to run arbitrary python scripts within ixion.
+
+ Copied over from orcus.
+
+commit 4fffef148e327419c125a58ab96e0525f3e7df07
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sat Jun 13 12:54:17 2015 -0400
+
+ Use = delete to explicitly delete special member methods.
+
+commit 739d454598d3510b0a6378037c9e0726ad7ef257
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sat Jun 13 12:41:32 2015 -0400
+
+ Remove boost::noncopyable from the public headers.
+
+commit f3926ffa212faaf4be0614f1ad28300245f53a51
+Merge: 41958a9 0e1c1d3
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sun Jun 7 15:19:42 2015 +0000
+
+ Merge branch 'python-optional' into 'master'
+
+ Python optional
+
+ This patch makes python bindings optional if requested through --disable-python.
+
+ Also fixed configure and a typo (the latter exists in 0.9 branch as well).
+
+ See merge request !1
+
+commit 0e1c1d3a0964eef7d0dfc47f2e45ac6cfde918e8
+Author: Andreas Sturmlechner <andreas.sturmlechner@gmail.com>
+Date: Sat Jun 6 21:48:43 2015 +0200
+
+ configure.ac: Drop hash_container
+
+commit f972e7e8f6f831b4cc40acf59258148f0c231ee4
+Author: Andreas Sturmlechner <andreas.sturmlechner@gmail.com>
+Date: Sun May 31 11:55:08 2015 +0200
+
+ src/Makefile.am: Fix typo
+
+commit c10d840ff1f138dd5d8bdfca7d18673f0e30de05
+Author: Andreas Sturmlechner <andreas.sturmlechner@gmail.com>
+Date: Sun May 31 10:14:17 2015 +0200
+
+ python: Make it optional
+
+ python bindings are built unless disabled
+
+commit 41958a9e824890acb1f60b758affb75f12155f00
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu Jun 4 20:01:18 2015 -0400
+
+ We don't need these anymore since we no longer use ptr_vector.
+
+commit 17a85111371e9efa60c71f1272f5e73369b2cc40
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Jun 1 20:51:46 2015 -0400
+
+ formula_function_t to be enum class.
+
+commit fbd990e1acb49e6eba558463533839fe7cdb95e6
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Jun 1 20:42:07 2015 -0400
+
+ Remove the last use of ptr_vector.
+
+commit b4996fec7be4dd454a871841229b80f51a667f68
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Jun 1 19:11:10 2015 -0400
+
+ Add these files to the slickedit project.
+
+commit 3993cbbe39333b3cfcd008abfcc61465da628298
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Jun 1 19:09:18 2015 -0400
+
+ These headers no longer exist. Remove them from the slickedit project.
+
+commit 131a41f7d994169ce0f5941a2c3c01ab01e358c8
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Jun 1 19:05:53 2015 -0400
+
+ Replace another use of ptr_vector with std::vector with std::unique_ptr.
+
+commit e553d43926ec7b7a75dc93b156dfd7cc44693597
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri May 29 19:35:35 2015 -0400
+
+ Remove rarely used formula_tokens_fwd.hpp.
+
+commit 289879c6a09b405fb7c472ff51993d5bd44a630b
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri May 29 19:19:04 2015 -0400
+
+ Replace boost::ptr_vector with stuff from the standard.
+
+commit f8e15d3d5a5d83ae72d1ee5f08b1f58aa5171c72
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sat May 23 15:08:08 2015 -0400
+
+ Replace use of boost::ptr_vector with std::vector.
+
+commit 3502eab844731af72002b58a3abcb653ac936976
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sat May 23 14:49:48 2015 -0400
+
+ Remove use of boost::ptr_map from model_context_impl.
+
+commit 1a67cf59b848a5fa3092afb14b02595f6a03f7a3
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sat May 23 14:45:26 2015 -0400
+
+ Remove use of boost::ptr_map from table_handler.
+
+commit a29475edfca04bf39ffe22ab3ede68a1b9921e26
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sat May 23 14:24:23 2015 -0400
+
+ Remove use of boost::ptr_map from depth_first_search.
+
+commit 6972a3bd45496148b0227cba41ac9f9bd9fece2a
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri May 22 19:28:14 2015 -0400
+
+ Re-use general_error for size reduction.
+
+commit 7d5812579420ccf08eb1f9c3d0e33e407a4f1e1e
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu May 21 22:12:29 2015 -0400
+
+ We don't need these hash_container macros anymore.
+
+commit 7465c8039878a787323664cb45cd6d2376026f14
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu May 21 21:50:12 2015 -0400
+
+ Replace boost::ptr_vector with std::vector with std::unique_ptr.
+
+commit eb8eea0c8f557b8ebe86e0228efe81af9eebcd66
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu May 21 21:32:19 2015 -0400
+
+ Move value_stack_t and its friends out of a public header.
+
+commit a2c6c461693e2607b3012626c081db4df77006ed
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu May 21 20:06:16 2015 -0400
+
+ stack_value_t to use enum class.
+
+commit ad219afdde35e8c91866fcc9a2f2b8fe1b3ad338
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu May 21 20:00:03 2015 -0400
+
+ Header cleanup.
+
+commit e07b04343b6e56fbe3d0bba24a0630e8eb198c5b
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu May 21 19:54:02 2015 -0400
+
+ Use std::unique_ptr.
+
+commit 9b0a817247ddb1973a608dc27cb26897e01a0367
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue May 12 14:43:33 2015 -0400
+
+ Convert celltype_t to enum class.
+
+commit ce79c771b0d94578be89e12b0cd9cee682bcb88c
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue May 12 14:33:48 2015 -0400
+
+ Convert formula_name_resolver_t to enum class.
+
+commit 9e52b19a946aad536ce58516050177444a0e539a
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sat May 9 12:36:57 2015 -0400
+
+ python: ixion.column_label() to optionally take name resolver type.
+
+ It's an integer type whose value corresponds with the enum value of
+ formula_name_resolver_t.
+
+commit 45260bb942d8cd50e2da53acebfc8a6f7958f473
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri May 8 22:51:23 2015 -0400
+
+ R1C1: implement all the other missing methods.
+
+ Table names should be identical to the A1 counterpart's.
+
+commit c48db1c3f187b858638a127d7d39f6dfc5a40866
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri May 8 22:31:49 2015 -0400
+
+ Handle sheet name containing single quote(s) correctly.
+
+ Two consecutive single quotes ('') represent a single quote.
+
+commit 092a0fc799d532897935b65b3a668cdfa0a4e183
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri May 8 19:21:09 2015 -0400
+
+ R1C1: Implement get_name() for range addresses.
+
+commit a46c2d7a731c3dc01681b0e5034d9f073f5bf6b4
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri May 8 19:01:52 2015 -0400
+
+ Rename write_sheet_name->append_sheet_name.
+
+commit f45cc9876cef8c04a47db681d6b4a674bd16eb15
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri May 8 18:54:24 2015 -0400
+
+ R1C1: more test case on ranges with sheet names.
+
+commit 51ad6182446bd1b5b16531e67f8370eb5ec9d117
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri May 8 18:16:24 2015 -0400
+
+ R1C1: more test cases on range parsing.
+
+commit 5a90fa60b8ac4eb239e78c6269b82d3ccc489bb0
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu May 7 23:03:56 2015 -0400
+
+ R1C1: parse range addresses.
+
+ More test cases to be added later.
+
+commit bec1a9445d5c635249a0ec74d2c76ea011cbfbe8
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu May 7 21:58:19 2015 -0400
+
+ R1C1: make sure the parser is case-insensitive.
+
+commit 5a271916ef5308b1693cdac6c23c0d9d2119ef00
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue May 5 21:24:02 2015 -0400
+
+ Another invalid address.
+
+commit d9d80cc319f28c21ea1c40f09bbe5cc9c072a219
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue May 5 21:21:35 2015 -0400
+
+ R1C1: add test for invalid addresses & handle 1-based vs 0-based addresses.
+
+commit 34b3fbd508f76f67502a25f0eece77a420ad804f
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri May 1 22:25:32 2015 -0400
+
+ R1C1: write sheet name to address string when requested.
+
+commit 8ba0a30055f3c2f7fdd785caf0971f1c189f1d06
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri May 1 19:32:23 2015 -0400
+
+ R1C1: Fix some issues with parsing single cell addresses.
+
+commit a5e82d7e14fe120408794415086bb6ed9ffa3016
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu Apr 30 22:47:38 2015 -0400
+
+ R1C1: Implement single cell reference parsing.
+
+commit 63ce46e99a91ae484af6b282705e57b7ed00a069
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Apr 27 22:30:19 2015 -0400
+
+ We no longer use boost::scoped_ptr.
+
+commit 754bfb7329298f59456dba484d105d4c569e5795
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Apr 27 22:26:51 2015 -0400
+
+ Set up basic unit test for R1C1 resolver. The test currently fails.
+
+commit 1f6781495eb6ec4b8dbb208c8102b2739a4ec7c2
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Apr 27 22:25:23 2015 -0400
+
+ Allow use of valgrind and gdb with unit test binaries.
+
+commit a24fa1f0e58b4819711989ecf61056fb83ad9cda
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Apr 27 20:58:37 2015 -0400
+
+ Have formula_name_resolver::get() return std::unique_ptr.
+
+commit 198ed0e9dd2dbe3a4f974632fd2c8330e6aa038e
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Apr 27 19:25:15 2015 -0400
+
+ Create skeleton for the new Excel R1C1 name resolver.
+
+commit aa3d5102be634de3d7362dfb4376fb62af6d03ba
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Apr 27 19:14:07 2015 -0400
+
+ Enable C++11.
+
+ Just copying what Markus did in orcus.
+
+commit 52ceda5a8b942fc15e382196b59f720b75fd3085
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sun Apr 26 12:57:22 2015 -0400
+
+ python: write test case for ixion.column_label().
+
+commit d309a04c47e143af6eab70b09c33bc130c2e0900
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sun Apr 26 12:29:05 2015 -0400
+
+ Rename the python test file to make room for another one.
+
+commit d778db376578568e563be53747f11c7b7a1ef3f6
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu Apr 23 22:57:35 2015 -0400
+
+ python: implement module function 'column_label'.
+
+ This returns a tuple of column labels for specified numeric column
+ range.
+
+commit 31bc48224dc8999b75fd99580aa013dd17e52cd0
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Apr 22 21:16:10 2015 -0400
+
+ Up the API version.
+
+commit 810d378bf8058356fec0f05e374075d6d13bd3f9
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Apr 22 21:05:21 2015 -0400
+
+ http://bugs.python.org/issue11587
+
+commit 30fdfa47dc29219fb20c0e0665662fbb6042b11a
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Apr 20 23:05:31 2015 -0400
+
+ Port python binding from python 2 to python 3.
+
+commit 88ea80126aec04c934791db4e55e2dbc1c921265
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Apr 6 22:30:46 2015 -0400
+
+ coverity#54467: Wrapper object use after free.
+
+commit a079b576399f7ad5de76a9034ffaf4770ffdca65
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sun Apr 5 14:24:35 2015 +0000
+
+ Add 0.9.1 source package to README.
+
+commit 5e6bd296ca5183c347048f51822b78565f2890ff
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sun Apr 5 10:15:49 2015 -0400
+
+ Do this only when it's a git checkout.
+
+commit 823c96ff213760bf3e4e9f26c7b456b1e522b0f2
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sun Apr 5 10:07:10 2015 -0400
+
+ Update AUTHORS.
+
+commit dee0ffa0a7ea98e33d305b7d56216030a9712448
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sun Apr 5 10:00:30 2015 -0400
+
+ Create README on the fly.
+
+commit 4e3686355f73d3b1f69651b5f6a31e6a1e5da2ef
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sun Apr 5 09:41:26 2015 -0400
+
+ Set the version to 0.9.1.
+
+commit 2bd12372cef579d5c644b844ffb3b198b51c5bce
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sun Apr 5 12:54:59 2015 +0000
+
+ Reformatted the Download section to make it appear better.
+
+commit 2684b41e7d17adb8326a1eb5db58c64c49f4598e
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sun Apr 5 08:46:40 2015 -0400
+
+ Add Download section content to README.
+
+commit 2ac9865bef5bd7def83272c0e44d5ccc541ddc3b
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sun Apr 5 08:29:25 2015 -0400
+
+ Put the project's old wiki home content into README.
+
+commit e9b71b7d083bddd291f12efd07113d7aec9f87ff
+Author: David Tardon <dtardon@redhat.com>
+Date: Sun Apr 5 10:55:49 2015 +0200
+
+ add something to NEWS
+
+commit a833414d6f8a841da968692a9773bd86dc873ed6
+Author: David Tardon <dtardon@redhat.com>
+Date: Fri Mar 6 08:33:19 2015 -0500
+
+ match argument and format unit
+
+ This makes ixion.sheet work correctly on s390x.
+
+commit 877f3e2fe6b38d320a6732c5d569652b7cbdc872
+Author: David Tardon <dtardon@redhat.com>
+Date: Fri Mar 6 14:12:12 2015 +0100
+
+ set correct CPPFLAGS for the python module
+
+commit 9e7763aa51d50b941754ad678fd5ec8e4fe5670f
+Author: David Tardon <dtardon@redhat.com>
+Date: Fri Mar 6 10:17:55 2015 +0100
+
+ let python do the arg parsing
+
+commit e7806c150283ed4e7dbbeda82f9408ece9139841
+Author: David Tardon <dtardon@redhat.com>
+Date: Fri Mar 6 10:14:01 2015 +0100
+
+ add cast
+
+commit 209bea9422b2e4675cc87eb63ab98790e60a73e7
+Author: David Tardon <dtardon@redhat.com>
+Date: Fri Mar 6 09:56:46 2015 +0100
+
+ use METH_NOARGS flag
+
+commit 21e8f74df328006a24096f4587e8d668f75ac185
+Author: David Tardon <dtardon@redhat.com>
+Date: Thu Mar 5 17:47:30 2015 +0100
+
+ add missing includes for assert()
+
+commit 6acd183e4db7b8dc4c6336750f01b68de3fb4fb1
+Author: David Tardon <dtardon@redhat.com>
+Date: Thu Mar 5 16:26:37 2015 +0100
+
+ fix python test on some platforms
+
+ Functions with METH_VARAGS flag (of type PyCFunction) do not take
+ keywords. Attempt to use a 3rd argument would access some irrelevant
+ data on the stack.
+
+commit a32dad8961413056a10f61881843fa4a895c89c9
+Author: David Tardon <dtardon@redhat.com>
+Date: Wed Feb 18 08:42:02 2015 +0100
+
+ fix make distcheck
+
+commit b85f73c1ad4e665e265330d22f3f5c319b58c541
+Author: David Tardon <dtardon@redhat.com>
+Date: Wed Feb 18 07:57:58 2015 +0100
+
+ package ixion-python-test.py
+
+commit c940a1c061e98ff0cce8119e6ced2565996e6f5a
+Author: David Tardon <dtardon@redhat.com>
+Date: Mon Feb 9 21:20:04 2015 +0100
+
+ add compile to .gitignore
+
+commit a359ee803fb24a3c190941974bc61dc3ff4443d6
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Feb 16 20:29:19 2015 -0500
+
+ Add python doc files to automake file.
+
+commit 4232d1b8b1ec3d350ca8ce1d2f981d29171d2b84
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Feb 16 20:16:53 2015 -0500
+
+ Add Makefile target to build python documentation.
+
+commit 993cade2e3a03a8c50b9f0b04a693edb5ab50bc8
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Feb 16 19:52:37 2015 -0500
+
+ python-doc: correct way to reference API's.
+
+commit fbc1fb3969eed8043ec175883f2cb5c23825a1f5
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Feb 16 19:22:38 2015 -0500
+
+ Let's throw an exception when appending a sheet with an existing name.
+
+commit 8728e84af73cecb4ffdab5545accdd849ca2efce
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Feb 16 19:19:34 2015 -0500
+
+ Forgot to add this file.
+
+commit d71d9991c855c80ff34cf2ae9451cdb74b6f30df
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Feb 16 18:00:18 2015 -0500
+
+ python-doc: more editing.
+
+commit 3f5eae7f0bfcaa0895a1da8b1f163a1b3c3b0efb
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Feb 16 17:47:54 2015 -0500
+
+ python-doc: warn about potential perf issue with get_sheet().
+
+commit de9f3e00016d7c5ab06f2ede6df0f2e080874cda
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Feb 16 07:28:07 2015 -0500
+
+ python-doc: sounds better this way.
+
+commit a4a3e319fad108813c4739d06bf8f99527b71f10
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sun Feb 15 23:08:04 2015 -0500
+
+ python-doc: write doc for Document.get_sheet().
+
+commit 8c492986b2e4a7b39c08aa7b62b562ba0fa8a8c9
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sun Feb 15 23:07:38 2015 -0500
+
+ python: don't forget to set IndexError when no sheet object is found.
+
+commit 8cf1ce46b7b8061f380b4351257497e98389b62b
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sun Feb 15 22:56:16 2015 -0500
+
+ python: Document.get_sheet() to accept string argument as well.
+
+ When the argument is of type string, it finds a sheet object by sheet
+ name.
+
+commit 1401156149f09e00980b0380da3a25822731027a
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sun Feb 15 22:29:04 2015 -0500
+
+ python: add Document.get_sheet() to get sheet object by index.
+
+commit 874316069fba43ca61de3cb3fa26dd8c74f14831
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sun Feb 15 21:54:29 2015 -0500
+
+ python-doc: add Document.get_sheet_names() to the doc.
+
+commit 1af723891805e4d4fbde6055775f59b2a4f8711d
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sun Feb 15 21:49:44 2015 -0500
+
+ python: Document.get_sheet_names() to get a tuple of sheet names.
+
+ The return value can also be used to examine how many sheets are
+ present in the document.
+
+commit 845d384d98ce3bfd0f90cc565a93e0811957d00b
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sun Feb 15 17:00:39 2015 -0500
+
+ python-doc: let's not make each method a sub section.
+
+commit 4b7b622bf41fb0302caf2f730333f6eae4b798b3
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sun Feb 15 10:15:15 2015 -0500
+
+ python-doc: add more texts to the Sheet API.
+
+commit 685149522f680474783fbc82a45556306cbde2df
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sat Feb 14 21:37:24 2015 -0500
+
+ python-doc: more editing.
+
+commit 7068b4d5fd9d314a1f8d1329e1c226032dae89e1
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sat Feb 14 21:05:37 2015 -0500
+
+ python-doc: Add Document and Sheet API pages.
+
+commit c86c8b565013ddd9e8b9919b9ccc59d27f3d247e
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sat Feb 14 19:10:03 2015 -0500
+
+ python: raise SheetError when dealing with detached Sheet objects.
+
+commit f6b9e35d69dc3212dc0695b9e34aa484a0e69983
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sat Feb 14 17:06:54 2015 -0500
+
+ python: more doc editing.
+
+commit a5e4835a01b663ac4914eabb927c0b6b8ef72cd6
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sat Feb 14 12:28:11 2015 -0500
+
+ python: put 2 whitespaces before comment (per PEP8).
+
+commit d063c8cced202ae50301693d7928c45bb484a02b
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Feb 13 22:27:05 2015 -0500
+
+ python: slight wording change.
+
+commit 18cf0558cbf11d9b6ac76f7b53c2d34fb2b6e257
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Feb 13 22:08:48 2015 -0500
+
+ get_string_value() should return string formula result.
+
+ To be consistent with get_numeric_value() which already returns
+ numeric formula result.
+
+commit 07d7e992c25b888467fc095d6dae446d24da5317
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Feb 13 18:07:46 2015 -0500
+
+ python: more editing of Overview doc.
+
+commit dfb89929bc9d51ad6ab850f5625618ebad2ff6e3
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu Feb 12 22:02:34 2015 -0500
+
+ python: put this in a Note box.
+
+commit 2a12698f130136e4c73e6031d8866b1672f2d172
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu Feb 12 21:52:22 2015 -0500
+
+ python: add more content to the documentation.
+
+commit eebcae84fce0b674596d71910f3982a87484a8cd
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu Feb 12 20:49:27 2015 -0500
+
+ More updates.
+
+commit ca8c8fcd1b3f092d9a5f2b3e1727274487c9c90f
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Feb 11 23:18:44 2015 -0500
+
+ python: start writing some documentation.
+
+commit 37411214938491605da289fd604cbb30e6e1fe06
+Author: David Tardon <dtardon@redhat.com>
+Date: Mon Feb 9 21:17:47 2015 +0100
+
+ update boost.m4
+
+ The old one breaks on detecting boost version when used with gcc 5.
+
+commit 2c4ba9ec2a5fba8a6e81a4c433208f15e1ec62f6
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Feb 6 21:25:29 2015 -0500
+
+ Update the interface description to match the renaming.
+
+commit 93fe268de59a2f95eeadf34eda344cd54b2ddf5f
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Feb 6 21:22:48 2015 -0500
+
+ Rename the header file name to match the renamed interface name.
+
+commit eea1a7e7ce7c35af5e282f80e11d2f268d3db426
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Feb 6 21:15:22 2015 -0500
+
+ Rename iface::model_context to iface::formula_model_access.
+
+ The interface was meant to be used only from the formula interpreter
+ and its associated classes. Let's make that explicit by renaming
+ the interface name.
+
+ This also resolves the confusion between the interface and its
+ implementation which were both named model_context.
+
+commit c269975f8439d892c11cfdaec8ae27666cd717da
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu Feb 5 21:54:23 2015 -0500
+
+ ixion now requires mdds 0.12.0 (due to segment_tree API change).
+
+commit d1488b4d778a99264418402c93440e3ff0e980f1
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu Feb 5 20:55:41 2015 -0500
+
+ python: make the test fail when wrong exception is raised.
+
+commit 723c82559876145318a099bb16d7896b57440fbf
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu Feb 5 18:58:40 2015 -0500
+
+ python: Implement Sheet.erase_cell().
+
+commit 0c8236b3a6415bdd29a0153106fc805821eff00c
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Feb 3 23:06:12 2015 -0500
+
+ Next version will be 0.9.0.
+
+commit 2afd110fbc7e617af9375f0b75e196b96392edd2
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Feb 3 23:02:23 2015 -0500
+
+ python: Add test case for partial recalculations of formula cells.
+
+commit f634014df02536d9e696fd00095b59ffc0b94e22
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Feb 3 22:53:07 2015 -0500
+
+ Remove compiler warnings.
+
+commit ba2c6a9cd9bf1038272e05d674032e455bab5280
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Feb 3 22:43:29 2015 -0500
+
+ python: have Document.calculate() to do partial calculation.
+
+ i.e. only calculate the ones that need to be re-calculated.
+
+commit 0d8311fb07876607e5f0606eedf1dcdf7b9b079a
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Feb 2 23:03:30 2015 -0500
+
+ Remove duplicate code blocks.
+
+commit 5b8ecb5f1f97587007241812cba3d27464bcd6c6
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Feb 2 22:58:21 2015 -0500
+
+ python: Sheet.get_numeric_value() to raise TypeError when appropriate.
+
+ When trying to fetch numeric value from a formula cell when its result
+ is not yet available, we should not block. Instead we should raise
+ an exception.
+
+ For now TypeError is raised. But in the future we should raise our
+ own exception such as ixion.FormulaError.
+
+commit 138953f96eb5200f07af58773f86b71b40e5e9f8
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Feb 2 22:17:36 2015 -0500
+
+ Document the blocking nature of get_numeric_value().
+
+commit 0f459cb681509923dba1b956298c302410e5ac3b
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sun Feb 1 12:53:11 2015 -0500
+
+ python: add test cases for string value I/O.
+
+commit 3783216146c09543d6c515aee0ef469518fd10b0
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sun Feb 1 12:47:37 2015 -0500
+
+ Use ixion::element_type_string here.
+
+commit 0b7d81dd189758a81653fdf0399c40bc44a93ef4
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sun Feb 1 12:39:32 2015 -0500
+
+ python: use absolute path to the test file when setting sys.path.
+
+ This way the script can be run anywhere independent of the current
+ working directory.
+
+commit b0f9ab52134bb3e93daeef3bc03a7c5afe6283f8
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sat Jan 31 23:23:42 2015 -0500
+
+ python: Make sure the sheet name attribute is not writable directly.
+
+commit d783e3f18d3374e8426ec5b7a34d434726421b6d
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sat Jan 31 23:19:40 2015 -0500
+
+ python: add test for sheet insertions.
+
+commit 55a942cb1bfad944c43ef0754a8fcb562dbeec1b
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sat Jan 31 23:10:00 2015 -0500
+
+ python: add formal unit test.
+
+ This gets run when running 'make check'.
+
+commit 6b3f9ca8912f857b114474c0be0ad2d883b987b5
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sat Jan 31 19:04:28 2015 -0500
+
+ python: implement Document.calculate(), though still a bit crude.
+
+ Full calculations of all formula cells for now.
+
+commit 2a4f1d15d01d67cb22f6c5303eb8d6ba4e88cb78
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sat Jan 31 16:21:45 2015 -0500
+
+ python: add skeleton for Document.calculate().
+
+commit e6dbbe01483985d9082be558f4f23ff614cebf88
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sat Jan 31 16:09:36 2015 -0500
+
+ python: implement set_string_cell() and get_string_value().
+
+commit 122e45d81b38c3298305cbdc31a47eddedb116a3
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Jan 30 22:18:24 2015 -0500
+
+ python: create & store formula resolver instance in a shared place.
+
+commit f09f37ad85137af66af41fbff368c0cba51db4c6
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Jan 30 20:52:53 2015 -0500
+
+ python: implement set_formula_cell() and get_formula_expression().
+
+commit 5a502eb15b0365d81b38d17e4a61d62db74801dd
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Jan 28 21:32:18 2015 -0500
+
+ python: implement get_numeric_value() in Sheet class.
+
+commit deb445c2b73fe875b1f6de034236e3ec94c343bb
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Jan 28 20:52:11 2015 -0500
+
+ python: implement set_numeric_cell() for Sheet class.
+
+commit 4ea1af15d1274043c0e49065fec0cd3568be4f7f
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Jan 27 21:37:37 2015 -0500
+
+ python: Pass model_context (pointer) to the sheet object.
+
+ It will be used later to store cell values.
+
+commit d5fd6244dd3b239610647636d77be7dcd61ea817
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Jan 27 21:21:31 2015 -0500
+
+ Move the sheet vector to document_data.
+
+commit dbd1d2e07d47275f965a964a720733946416831c
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Jan 26 22:26:27 2015 -0500
+
+ Set up non-python part of the document storage.
+
+ Use model_context there.
+
+commit 165723f5b2dedb49aea8cd20117a525d67ebfdbe
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Jan 26 21:52:57 2015 -0500
+
+ Append sheet instance to the document when append_sheet() is called.
+
+commit 81e9ba542fddba134c9ddf432c9a7f50d64ba7c2
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Jan 26 21:44:25 2015 -0500
+
+ Maybe I don't have to bail out on failing tp_init.
+
+ That might leak actually.
+
+commit 9c388d392abdd6730b09dfade98b3f0d6bae8ec1
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sun Jan 25 21:52:15 2015 -0500
+
+ python: Make Sheet.name read-only.
+
+commit e4f498a2df1225c4ceadc6de294ac0cd5b70afa9
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sun Jan 25 19:31:42 2015 -0500
+
+ python: Add 'name' member to 'Sheet' class.
+
+commit 351aa18bcbe904e814072f700de1a45199996cd1
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sun Jan 25 17:56:23 2015 -0500
+
+ Have Document.append_sheet() return an inserted sheet instance.
+
+commit 4e7273adefaaf73b604c9b1bfd17119dfdc544cf
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sun Jan 25 13:13:00 2015 -0500
+
+ Add skeleton for 'Sheet' class.
+
+ Still not sure how to have Document's append_sheet return a Sheet
+ object...
+
+commit bfc99bfeb5a7998521396922204d839b69a00cb6
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sun Jan 25 12:54:32 2015 -0500
+
+ Move the 'document' code to its own source/header files.
+
+commit 0ace22812e1a37b792ba0e16416582663186e5e6
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sun Jan 25 11:46:46 2015 -0500
+
+ Add python.cpp to the slickedit project file.
+
+commit 03fcf407aa857a3f7a17c343f8715a742b0bd536
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sat Jan 24 23:18:46 2015 -0500
+
+ Add class 'Document' placeholder to the python module.
+
+commit f1eb785ac0fac9a01ee367211cdf09b62e37420c
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Jan 23 19:29:27 2015 -0500
+
+ ixion.info() to print the real version number string.
+
+commit acdb47f4ea53706776425f1c5296338a229431c5
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu Jan 22 22:04:53 2015 -0500
+
+ Initial hook to build ixion python module.
+
+commit ae9d116d34ab635c1d2742f4ddfac3d54938c6e1
+Author: Markus Mohrhard <markus.mohrhard@googlemail.com>
+Date: Fri Jan 9 20:31:13 2015 +0100
+
+ adapt ixion to mdds::rectangle_set change
+
+commit e7c1189aef95f3cdd0bce7062eb45bc5500c0233
+Author: Andreas Schwab <schwab@linux-m68k.org>
+Date: Fri Dec 19 20:10:28 2014 +0100
+
+ Avoid spurious testsuite failure due to excess floating point precision
+
+ Neither 0.1 nor 0.2 are exactly representable in binary floating point,
+ accumulating rounding errors while summing them up. If the sum is
+ computed in excess precision it no longer compares equal to a value that
+ is rounded to double precision.
+
+commit d6d0f99c908f2282506f8ea26b94dcb13ab6e7a0
+Author: Bjoern Michaelsen <bjoern.michaelsen@canonical.com>
+Date: Fri Oct 10 18:20:36 2014 +0200
+
+ multiple build system fixes
+
+ 1/ automake: error: using '$(top_srcdir)' in TESTS is currently broken: '$(top_srcdir)/test/ixion-parser-test.sh'
+ 2/ ixion-test not finding boost symbols on linking
+
+commit ed340d93d62310a078b4538667d58c676dc474ad
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu Sep 4 17:46:51 2014 +0200
+
+ Add test cases for more variants of table references.
+
+commit 25fac85221431425ee2c906b4ef43948a61ec969
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu Sep 4 17:45:09 2014 +0200
+
+ Add debug output for table reference method.
+
+commit 95618c7cd28d8d14901e30507cd732b4519527e1
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu Sep 4 16:11:08 2014 +0200
+
+ Parse table reference with separator characters correctly.
+
+ The key is to keep track of nest levels with [] and don't treat separator
+ characters as separators when next level is > 0.
+
+commit 3fd476fc2a7232edb6b37b6eb7ff2e39dc34dbb5
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu Sep 4 15:37:38 2014 +0200
+
+ Fix printing of table token for a single argument case.
+
+commit c9978c9db817dcdc49c27f5fc59df0b9497ce772
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Aug 29 00:10:24 2014 -0400
+
+ Adjust for area specifiers for single column table references.
+
+ No test for this yet. There is some parsing error that prevents this
+ from working.
+
+commit 4e5c55097d35de2c4e3de042deb2953ce639d1d9
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu Aug 28 23:52:02 2014 -0400
+
+ Correctly determine table reference range for area specifier only cases.
+
+commit 37347f08363511bacf0c5e8462d21b0f20c86390
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu Aug 28 23:30:07 2014 -0400
+
+ Properly print table references.
+
+commit 16b2bf6a8acad5ffca297cd672f4b1b0f4825d69
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu Aug 28 17:39:54 2014 -0400
+
+ Add 3 more test cases.
+
+commit c422131c44c4d80555aaa1661d432ae04f003fa8
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu Aug 28 17:30:34 2014 -0400
+
+ More check for COUNTA.
+
+commit 0007c0240635e96aab6b74b0c7b32b17202c3c77
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Aug 27 22:37:10 2014 -0400
+
+ Add COUNTA built-in function.
+
+commit 905368f182a66f5048b1e1e6e39032d63c70cdfd
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Aug 26 18:32:12 2014 -0400
+
+ Update the table_handler interface to support column range and areas.
+
+ The implementation has yet to be updated to properly support column
+ ranges and area specifiers.
+
+commit 42f79a29a97cb6fba9be8b7789b2bdad37f09e6f
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sat Aug 23 09:46:18 2014 -0400
+
+ Parse column range in table reference correctly.
+
+commit cf4baf7f1232559882a292b27e63c4e7823849f3
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sat Aug 23 09:26:35 2014 -0400
+
+ Prepare for supporting column range in table references.
+
+ A reference such as 'Table[[#Headers],[Col1]:[Col2]]' is valid.
+
+commit 729fe8681bd0af9e281d90b2d01106f3250f13a2
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Aug 22 21:09:15 2014 -0400
+
+ Table reference without a column name is valid.
+
+ As long as at least one area specifier is given.
+
+commit 59bc58094ea552f79269156e06e6acc8bc363ae6
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Aug 22 20:19:37 2014 -0400
+
+ It's actually '#Headers' plural not '#Header' singular.
+
+commit cabb037cbe5eca70d88cf55c2d28b273470a5f59
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Aug 22 20:15:58 2014 -0400
+
+ Add more test cases.
+
+commit 72e17d5d6274be251783a27a78e16fb248718f1d
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Aug 22 20:08:41 2014 -0400
+
+ Parse area specifier in table reference.
+
+commit 000416f37dcdcff987709f247ad7af158ab88d04
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Aug 22 17:50:44 2014 -0400
+
+ A table reference may specify more than one area types.
+
+ Let's prepare the types for this first.
+
+commit e765d83821c3f66e3d5792617f94c9c0859987df
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu Aug 21 23:03:12 2014 -0400
+
+ Support resolving Table[Column] syntax.
+
+commit 1dd658c0da9aa0971c95ec4b4a9d58ffa01e0a76
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu Aug 21 22:38:32 2014 -0400
+
+ Parsing a table reference should be done purely based on syntax.
+
+ IOW, it should not depend on whether or not the document model has
+ a string identifier for the table name, column name etc. This is to
+ allow tokenization of formula expressions before registering tables
+ to the document.
+
+commit 39d92de5583b97343773729522cfaf2eae8a932a
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu Aug 21 21:49:03 2014 -0400
+
+ Actually, table_handler is not needed just to parse table references.
+
+ It's needed when we need to resolve table references.
+
+commit f5095b9b217cbb4232770be4172ded0d97841e31
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu Aug 21 21:33:13 2014 -0400
+
+ Check the result of SUBTOTAL in this test case.
+
+commit b1c8d303d071ed0a363f7c2dde006026a081840c
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Aug 19 23:15:06 2014 -0400
+
+ Correctly calculate SUBTOTAL for the test case.
+
+ Still far from being complete.
+
+commit 5728eaa6f3ab046e731acd637fe7fd907d6d05a0
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Aug 19 09:38:14 2014 -0400
+
+ Add table.hpp to the makefile.
+
+commit 38257e49d548af57b81e1ccde67a037251da61fb
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Aug 18 22:05:08 2014 -0400
+
+ Initial cut on handling table references.
+
+ Still work in progress.
+
+commit b69db21a2a6d384e44996c1d9141f94263e7065f
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu Aug 14 22:02:22 2014 -0400
+
+ Add dummy SUBTOTAL function. For now it always returns 123.
+
+commit fd07473bf8ad0743083c4758be5c7d8c78a07027
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu Aug 14 17:58:08 2014 -0400
+
+ Parse table column names.
+
+commit 1953240cea371cf1a275c1e2e5ad214bdfb3b64f
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Aug 13 23:04:26 2014 -0400
+
+ Add support for defining tables. Still work in progress.
+
+ I just need to work on parsing the column definitions.
+
+commit 41eae2c6e41061d545a2e645972ad0ce87638540
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Aug 12 18:45:06 2014 -0400
+
+ model_context impl to NOT manage the life cycles of the handlers.
+
+ Let the client code manage it.
+
+commit 234593621c568b8e25ee6017da5bd7134ab6bffc
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Aug 11 21:19:44 2014 -0400
+
+ Set up skeleton table_handler implementation.
+
+commit 92ce349c6179923ce2f51aaf1e14356dda1466b5
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Aug 11 21:08:17 2014 -0400
+
+ Rename table interface to table_handler interface.
+
+ To be consistent with session_handler...
+
+commit de42e461e9722dc07cac30ec2666713a1ba8f291
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Aug 11 17:40:35 2014 -0400
+
+ Move session handler implementation out of libixion.
+
+ It makes more sense to move it to ixion-parser than to leave it in
+ libixion.
+
+commit 0216e573a923cf5703cb7eddb79a650e81d26d4b
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Aug 11 11:21:36 2014 -0400
+
+ Move ixion_test into src/libixion.
+
+commit b507c4b786dd97c5f6b6d97114cc2c64bbf674bd
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Aug 11 11:08:29 2014 -0400
+
+ Hide this private method.
+
+commit ab1dc5df50b0e4a24d22f74693b9888374cad29d
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Aug 11 11:02:58 2014 -0400
+
+ Just use boost::unordered_set.
+
+commit b4a483a760bd3fb1d4b8d2d5561b36a2903ebbc2
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Aug 11 09:31:37 2014 -0400
+
+ Use pimpl for cell_listener_tracker.
+
+commit 7fead5cbce430f42818801360e74afb1c6a4e541
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sun Aug 10 22:41:00 2014 -0400
+
+ Hide depends_tracker.hpp. This is also an implementation detail.
+
+commit d992b1487b039a69d1edc698f32ff8765b9ca41e
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sun Aug 10 22:19:14 2014 -0400
+
+ Remove unused header includes.
+
+commit 7370e126fb3ca7c019d8bd285e780f002adf7b28
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sun Aug 10 22:15:39 2014 -0400
+
+ Update slickedit project file.
+
+commit 0ce16e69ab8794d206a1af535dc5f46e9d795d3e
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sun Aug 10 22:14:31 2014 -0400
+
+ Hide formula_interpreter.hpp too.
+
+commit 50f74ea8f5243736c96face212b077131ba333e5
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sun Aug 10 22:09:24 2014 -0400
+
+ Hide formula_functions.hpp header.
+
+commit e6a8545d0840b7d74fe9c7255d39272cab0df4fe
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sun Aug 10 21:56:25 2014 -0400
+
+ Use string_id_t to store string identifiers in all places.
+
+commit ee82bba97ae495f1c3900574d8595e4afd44b656
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sun Aug 10 21:52:14 2014 -0400
+
+ Update slickedit file.
+
+commit b34247cf827cb124a5d0def3d51363ec06afc32f
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sat Aug 9 13:53:19 2014 -0400
+
+ function_objects.hpp header is an implementation detail. Hide it.
+
+commit 4cd09036c37b294d5e1cf73450368111d110609b
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sat Aug 9 13:26:20 2014 -0400
+
+ Make get_session_handler() a non-const method.
+
+ Since it returns a non-const pointer which may point to the internal
+ state of the model context.
+
+commit a573dad918a77a6f19d7304c209d5a6796b12a9a
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sat Aug 9 10:30:35 2014 -0400
+
+ Make get_session_handler() an optional virtual method.
+
+ The client code doesn't need to implement this interface if it doesn't
+ wish to support session_handler.
+
+ And add interface.cpp which I forgot to add in the last commit.
+
+commit db6f90f28c33dc69f443763d17dcbb370e58f187
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sat Aug 9 10:25:23 2014 -0400
+
+ Hide the destructor implementations & add table interface.
+
+ Table interface will be used to resolve table references.
+
+commit 5ca89562793d8a21e1ba812e4b684c5553692060
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Jun 11 19:35:21 2014 -0400
+
+ Support stream output of range_t and address_t.
+
+commit d9195d86a32cd4163ff11de568b96f175416ca9c
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Jun 10 22:23:42 2014 -0400
+
+ Remove 2 of the 4 variants of get_name() from formula_name_resolver.
+
+ To simplify the interface a bit.
+
+commit 2ba5cb9f2d99975bb94320f577fd7a393c482d46
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Jun 10 22:16:09 2014 -0400
+
+ Use relative A1 style for displaying cell names again.
+
+ It looks better this way.
+
+commit 18b3c9e115324c64c2061867a3c5998356e6ee0d
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Jun 10 22:01:29 2014 -0400
+
+ Use multi_type_matrix to implement ixion::matrix.
+
+ mixed_type_matrix has been long deprecated.
+
+commit b868125f104a0f4f1b9809684a3ecad3f2ba58fe
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Jun 9 21:06:26 2014 -0400
+
+ Fix built-in AVERAGE function when its has range reference as input.
+
+commit f180104a683848ecc1d3f9488a360f7f21873370
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sun Jun 8 23:24:32 2014 -0400
+
+ Let's not store formula_name_resolver instance in model_context.
+
+commit a4940d628ed75949cf04ab6d6d16befc87a81dc3
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sun Jun 8 18:56:13 2014 -0400
+
+ Fix variable description.
+
+commit fc4c2a18b9f4075485d549c415dc00cb84a2ce73
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sun Jun 8 18:51:27 2014 -0400
+
+ parser_formula_string() and print_formula_tokens() to take name resolver.
+
+ To prevent each call from creating a resolver instance which is a waste
+ especially when calling these functions repeatedly.
+
+commit abcd0d478902c2c5ff82ebfc67b74bbb6dbae030
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sun Jun 8 17:26:04 2014 -0400
+
+ Simplify get_name() implementations of formula name resolvers.
+
+ Those that take absolute address / range without anchor position should
+ simply re-use the other variants that take address_t / range_t with
+ anchor position.
+
+commit e520257a2b7c2daf89d7c924e747be7b2f4a11d8
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sun Jun 8 16:37:46 2014 -0400
+
+ Handle range reference name resolution for ODFF.
+
+commit 8a15df406e913ede1e8469cdf7c7e023a345e26a
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sun Jun 8 13:34:36 2014 -0400
+
+ Use to_address() for this.
+
+commit ba1b5c76ed08859d89faec6cd476af31fe165c0d
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sun Jun 8 13:19:43 2014 -0400
+
+ Some cleanup.
+
+commit 3c98e9404fca7d1d949465022d7eb38c2c6fe84d
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sun Jun 8 13:03:41 2014 -0400
+
+ Handle single cell reference in ODFF.
+
+ Much of the code is a re-use of existing Excel A1 name resolver.
+
+commit 44e854e24fc6b4f139a1af6ba2b356fef7634087
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sun Jun 8 11:27:43 2014 -0400
+
+ Make these methods inline, now that the whole class is hidden.
+
+commit 8eda0889c96ccc01cc6e5b2b4f1a111bb1d541a0
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sun Jun 8 11:21:26 2014 -0400
+
+ Skeleton name resolver for ODFF.
+
+commit db913b3f46ad9dd7ed63260ac4f245a9c5aca8ce
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sat Jun 7 21:57:57 2014 -0400
+
+ Rename test name accordingly.
+
+commit 015a103945895ca839b2632abc90b4f644bdef9e
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sat Jun 7 21:53:25 2014 -0400
+
+ rename formula_name_resolver_a1 -> excel_a1.
+
+ Short name now that it's just a hidden implementation detail.
+
+commit eaa52644871dce06c7baeb9000ea7e42e450f357
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sat Jun 7 21:51:15 2014 -0400
+
+ Hide the name resolver concrete class.
+
+commit f8b439b96b02b6fab5867c229d93738902619a37
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sat Jun 7 21:23:57 2014 -0400
+
+ formula_parser to support different name resolver types.
+
+commit 6e02d3bf03ab82bfa3adbe771eba987321840bc6
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Mar 10 12:57:01 2014 -0400
+
+ Bump the mdds version check to 0.9.0.
+
+commit 778110a62cfc7b2b446d87d4a8efbbe3a4422e96
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Dec 13 14:40:18 2013 -0500
+
+ Another compiler warning due to signed vs unsigned.
+
+commit 70e2e1c13e048224885d303b4e69828cf35184df
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Dec 13 14:36:09 2013 -0500
+
+ Remove compiler warnings.
+
+commit 873d0fc370e4bb9e09e0e89b108bbbd0610ed929
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Dec 13 14:31:43 2013 -0500
+
+ Forgot return statement here.
+
+commit 0c0f2b2e528729945196d78f3ca867c4b1370d46
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Oct 15 00:32:59 2013 -0400
+
+ Surround literal strings with double-quotes when printing formulas.
+
+commit 2e9a863381bb0f1fa22f964fc58756bc52efdad7
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Oct 14 22:46:45 2013 -0400
+
+ Support a way to append strings without checking for duplicates.
+
+ This is needed in case of duplicate strings one of which is unformatted
+ while the other has format runs. In xlsx these two are assigned different
+ string ID's.
+
+commit 53928bdab6eadb20267b1b9cf89fc4a207fba5a6
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sat Oct 5 10:41:37 2013 -0400
+
+ Scripts to change licenses and add modelines in source files.
+
+commit c0571cf95a65996c4bc479dc487747014bf210de
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sat Oct 5 10:38:33 2013 -0400
+
+ Update for the license change.
+
+commit 016d252260cedbd427c3be4933443638552dd8d2
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sat Oct 5 10:37:04 2013 -0400
+
+ Change license from MIT to MPL 2.0.
+
+ Also add emacs and vim modelines.
+
+commit 7d8a563229aa86553db23a52e55c3d9f3b14d3b9
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sat Jun 8 10:56:29 2013 -0400
+
+ Adjust for recent change in mdds.
+
+commit 8210ff5aba1a14648f195ffbcb433d2d7e04527c
+Author: Fridrich Štrba <fridrich.strba@bluewin.ch>
+Date: Wed May 29 10:11:26 2013 +0200
+
+ Some cleanup of pkg-config file
+
+commit ff2dd5fb758843a0c2dd47863c9ecb7b3de7d769
+Author: Fridrich Štrba <fridrich.strba@bluewin.ch>
+Date: Thu May 23 07:47:13 2013 +0200
+
+ Ignore more files and make the *.pc file generation easier
+
+commit a3e9bc077cd06459d4c05e02362e76afd781d466
+Author: Fridrich Štrba <fridrich.strba@bluewin.ch>
+Date: Wed May 22 16:10:31 2013 +0200
+
+ Some little build-system refactoring
+
+commit 025be4f5abf9be2b7115f8be4d24adcf332903d8
+Author: Fridrich Štrba <fridrich.strba@bluewin.ch>
+Date: Wed May 22 16:09:48 2013 +0200
+
+ Try to get the ixion exports right on both windows and *nix
+
+commit deade5700bee1ea2c3946434eb7d811404824a1b
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sun May 19 11:50:08 2013 -0400
+
+ Let the caller specify sheet size on each sheet insertion.
+
+commit 176e3e93abdac071b0b6c3ff370959f80a04225a
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue May 14 18:20:14 2013 -0400
+
+ Add a method that returns textural column name from numeric one.
+
+commit 4b022a3f080a469e67afbe786c1984d6dfc362b3
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue May 14 18:14:48 2013 -0400
+
+ Let's remove this simple name resolver. We'll never use it.
+
+commit 58288751c52105236171251041ddab1c7e1d1b31
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue May 14 18:11:20 2013 -0400
+
+ Use callback macro and custom block func template from mdds.
+
+commit f53d4ba5adab8b0daed47dbc6cee175ddfb91a3a
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri May 10 19:32:19 2013 -0400
+
+ Avoid returning a temporary.
+
+commit 339563b43691ef12dbd1185a189e55feafd7e39d
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri May 10 19:30:12 2013 -0400
+
+ Export this function.
+
+commit 9e12603ad46d5bf19b774bd88096aa80eeab6b58
+Author: Fridrich Štrba <fridrich.strba@bluewin.ch>
+Date: Thu May 2 17:44:19 2013 -0400
+
+ Fix build on Windows.
+
+commit e3e9f4cd29f68ecf1008364b48a35543bcf41829
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Apr 29 20:44:04 2013 -0400
+
+ Specify element and element block types in ixion namespace.
+
+commit a5933070becc6ae15ad1a2bb3cea1e4a74f3ee14
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sun Apr 28 19:38:35 2013 -0400
+
+ Up the version to make it an API incompatible change.
+
+commit 7ac94772f287627cc332fa0c8337710543f6d3a0
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sun Apr 28 19:35:16 2013 -0400
+
+ Provide a way to retrieve column from model_context.
+
+commit cd9eb6de66be91c17ef64d4fbcced800ed285aff
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sun Apr 28 19:04:33 2013 -0400
+
+ Dedicated header for column_store_t - column storage using mdds::multi_type_vector.
+
+commit ae2b95c9ccbc16bd90d07a9e9d164fd866818f21
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sun Apr 28 17:44:12 2013 -0400
+
+ A bit of cleanup.
+
+commit 8d771a8cbd98fc4fabe21cf87a3f8f43bd759a5e
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Apr 26 17:46:12 2013 -0400
+
+ We need mdds here too.
+
+commit 6b414567f22c17204e1f7e9428517d2437d5ac07
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Apr 26 14:21:12 2013 -0400
+
+ Simplify mdds package detection, by using pkg-config.
+
+commit 04ebfc0c72272e4bb775a1516328679507cfa130
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Mar 27 09:56:06 2013 -0400
+
+ Fix incorrect initialization order.
+
+commit faa6de5d792092b6018741b4a6f4f4c0097d7980
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Mar 26 13:55:59 2013 -0400
+
+ Update boost.m4 from [ https://github.com/tsuna/boost.m4 ].
+
+commit 2c691f65ff050c251cd5fda3a02e6884aafe8ebf
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Mar 26 13:49:48 2013 -0400
+
+ test_PROGRAMS doesn't work for me. I get "test_dir not defined" error.
+
+commit 1c30fa93a573460f4a0ba4c19e5ca4f1ab78c2e8
+Author: Tomas Chvatal <tchvatal@suse.cz>
+Date: Tue Mar 26 18:15:12 2013 +0100
+
+ Build test binary only for tests not for install.
+
+commit 821cdb2f83af7d554f135e9136c0a595e2faf849
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Mar 26 10:04:36 2013 -0400
+
+ Add this include, else the build may break.
+
+commit 632b597b7ee4dba727a2c52d5a78050f6cbc5bf0
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Mar 26 01:34:47 2013 -0400
+
+ Fix packaging.
+
+commit 4a81d78f71bd60535254a4dfaca8030644ebeffb
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Mar 26 00:53:50 2013 -0400
+
+ Add tar.bz2 and xz as package formats.
+
+commit 4cdfad58f6a60b7dcf23311ee90ec1632004ee81
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Feb 19 19:01:51 2013 -0500
+
+ A little cleanup.
+
+commit 64117fd4ae5beb99543e9086352a95896d2ac94c
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Feb 19 18:55:07 2013 -0500
+
+ Use position hint during cell value import to speed things up.
+
+ This eliminates the lookup scalability problem, and with some documents
+ speeds up the import of cell values from (too long to measure) to a few
+ seconds.
+
+ This change needs mdds 0.7.0 to compile.
+
+commit f97d747eaa89d3522cce20369345e0c605b2c852
+Author: Markus Mohrhard <markus.mohrhard@googlemail.com>
+Date: Sun Jan 20 18:33:20 2013 +0100
+
+ add boolean cell support
+
+commit 061c984b4a76b8cfbfd581d9d10490079c34489f
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Dec 19 14:03:51 2012 -0500
+
+ Fix the naming inconsistency.
+
+commit c73b834ff42202b654bc6ee60f3c5a7534b9f6fb
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Dec 19 14:02:11 2012 -0500
+
+ A little more fix here.
+
+commit 305e67bcc01bb241242323e42e7ab99c0862cf29
+Author: Markus Mohrhard <markus.mohrhard@googlemail.com>
+Date: Wed Dec 19 19:37:26 2012 +0100
+
+ this variable is only used in the DEBUG case
+
+commit 539fcebca4e659eaf22d29d047373b023915b73a
+Author: Markus Mohrhard <markus.mohrhard@googlemail.com>
+Date: Wed Dec 19 19:28:10 2012 +0100
+
+ rethrowing the same exception instead of a copy
+
+commit 16dcdddd852ff533d0821ef98397bda72788e222
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Dec 19 13:11:38 2012 -0500
+
+ Test for name resolver on parsing names without row indices.
+
+commit 860926323b5f9b522bacde5e0e8bae89de5a2218
+Author: Markus Mohrhard <markus.mohrhard@googlemail.com>
+Date: Wed Dec 19 18:41:06 2012 +0100
+
+ prevent to recognize [A-Z]* strings as cell address
+
+commit f5a3a73fb0f8093cde1547f641ead9dbd799325f
+Author: Markus Mohrhard <markus.mohrhard@googlemail.com>
+Date: Wed Dec 19 03:29:34 2012 +0100
+
+ output "=" for fop_equal
+
+commit 1727fa063396fa44f49370f12355244b59440cbe
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Dec 11 19:04:29 2012 -0500
+
+ Actually we can't use an ID of 0 for empty string. Use the max value.
+
+commit cdcf940a9033e7f503dccd2164b9bdf1592dfe19
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sat Oct 6 18:16:49 2012 -0400
+
+ Don't forget to insert an empty string.
+
+ Empty string is associated with a special ID of 0 (via empty_string_id).
+
+commit f9fa0cffb5dc198d4227471d821f312169dadd30
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Oct 2 10:42:44 2012 -0400
+
+ Support parsing absolute column and row positions in A1 syntax.
+
+commit 71af10432fdf7bb2cd5685ea521915fa60300ffa
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Oct 2 09:46:00 2012 -0400
+
+ Remove duplicated code blocks.
+
+commit d39fdfce77796389df618fbe8e77783d1938733e
+Author: Markus Mohrhard <markus.mohrhard@googlemail.com>
+Date: Sat Sep 29 20:31:14 2012 +0200
+
+ support shared formual without range attached
+
+commit 68750ae77fb4837fd1dfd1178994a9b33a7dcc7a
+Author: Rene Engelhard <rene@debian.org>
+Date: Tue Sep 11 09:20:39 2012 -0400
+
+ Another mdds header to check.
+
+commit 5423f5bb7d15beaa3f6620aa2e5147c18699b350
+Author: Markus Mohrhard <markus.mohrhard@googlemail.com>
+Date: Wed Sep 5 22:55:07 2012 +0200
+
+ extract common parts into own Property File
+
+commit 28a1c1f9b501d0b71b8ed24c9982c297ed65f97b
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Sep 5 14:24:22 2012 -0400
+
+ The working version for the next release will be 0.5.0.
+
+commit 0b59ed6e8abac0a29bf874edac60a366e4143673
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu Aug 30 15:44:10 2012 -0400
+
+ Fixed a crasher bug on Windows (32-bit).
+
+ Forgot to replace this size_t with string_id_t.
+
+commit a038588b121fb2759682980ba598e5c13087e00f
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu Aug 30 13:27:33 2012 -0400
+
+ On Windows a dll file doesn't start with lib.
+
+ libixion.dll -> ixion.dll.
+
+commit 24b0dd8988f1e722e8479fb91435551c7d33954d
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Aug 28 21:45:32 2012 -0400
+
+ Get it to build again on Windows.
+
+commit a827456bfca6242395c53f5e9956b0d4c82f5e74
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri Jul 27 16:50:14 2012 -0400
+
+ Get ixion to build against latest mdds master.
+
+ mdds no longer supports size_t as standard type. Switch to using
+ unsigned long for string identifiers (for now).
+
+commit ba55441d19f7d409de586df3e683c97879e71a1b
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu Jul 12 22:43:11 2012 -0400
+
+ Renamed file.
+
+commit bb4fc447bae13d0ab1988f2cdc153db70fff4d3e
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu Jul 12 22:37:29 2012 -0400
+
+ Template function is implicitly inline.
+
+commit 2a47ab2288f40ad9e31c794b7f57cf6cbc8874fc
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu Jul 12 22:25:09 2012 -0400
+
+ Get it to build with the latest mdds master.
+
+commit 826f07c3d21e2215b15584844b8d899940f59476
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sat May 26 18:25:34 2012 -0400
+
+ Updating the years of my copyright.
+
+commit fd244a2d3b03f328a60c07dc44ae3d4fa038343f
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sat May 26 18:13:06 2012 -0400
+
+ Support row-only range addresses (e.g. 3:3).
+
+commit acb05194ebba40cadb9074f747756c85230433ad
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sat May 26 12:52:29 2012 -0400
+
+ Another test case for multiple whole columns.
+
+commit 2ab21889ad5d6eb4470e6c794b03a7fe048cb7b0
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sat May 26 12:51:18 2012 -0400
+
+ More strict checking of reference address.
+
+commit 27f7b91783428dd8ead7e9f62cf3d8cd7977c557
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sat May 26 12:20:15 2012 -0400
+
+ Handle ranges whose row ranges are not set (= whole columns).
+
+commit ac67211b2732fa1d27f54e019f2d1cdb55004251
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri May 25 19:42:36 2012 -0400
+
+ Use address_t to store transient parsed address value.
+
+commit 5eab880300d0dcff04c270465c2b98287ba1992e
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri May 25 19:28:44 2012 -0400
+
+ Export these constants.
+
+commit 7ef7ffde6bbb079799ad6bcefeac38d269c3f393
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri May 25 19:12:07 2012 -0400
+
+ Allow range types to specify whole column or whole row.
+
+commit 2c7838f0920734e93bd5017a97eeea3eb6e4e1f6
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu May 24 17:46:14 2012 -0400
+
+ Fixed build with name resolver's debug turned on, new test case.
+
+ Currently we fail to parse H:H (whole column reference) correctly.
+
+commit 1684cdd3f95a2aff9f652c24e4cf2dea43e2227e
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu May 24 17:34:11 2012 -0400
+
+ Fixed build with formula parser debug enabled.
+
+commit 81a448b410e8d2a3530e6d8f48ffae0956afbc6a
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue May 22 01:35:03 2012 -0400
+
+ << operator should take a const reference.
+
+commit f74e93ea5131c59094fd43dd5dd5f0ca8e14b9ea
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue May 15 18:12:12 2012 -0400
+
+ These too.
+
+commit 72224869e750593e29fbf9ba3de818a7b342d4b3
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue May 15 18:07:18 2012 -0400
+
+ Use at() to access sheet and column instances.
+
+ It's more STL-ish that way.
+
+commit d17a2958072cc63c196edb7e4266ef5836d7b2c1
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon May 14 19:18:27 2012 -0400
+
+ Init model_context with no sheet, then have the client code append them.
+
+commit 1f657727a3c514799999bf2f4bda7e39432a94af
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sun May 13 20:17:05 2012 -0400
+
+ More changes to formula cell handling and shared formula tokens.
+
+commit 090856f4896fa013e91dd2b6b1e04aeeabd00b0a
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sun May 13 19:28:35 2012 -0400
+
+ Forgot to remove this one too.
+
+commit 955589850865b322af78ac092111b18aa3ca4ceb
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sat May 12 17:05:29 2012 -0400
+
+ Let's not store an empty string to the shared string pool.
+
+commit c35d10df1ed3fa1525086cb30b65e386f95b79f7
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sat May 12 16:46:26 2012 -0400
+
+ Added get_string_count() to the model_context.
+
+commit a8599ad83a25bf9fcf199f96ae6687a6e035fbac
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sat May 12 12:31:55 2012 -0400
+
+ Export formula_cell::get_identifier().
+
+commit f1996b992752f1b74afb64ba7353559c517dd7f6
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sat May 12 00:52:34 2012 -0400
+
+ Return invalid range when sheet is empty.
+
+commit 376f89825bec2c5927db77992ee9b322d67a6ebf
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sat May 12 00:50:03 2012 -0400
+
+ Support invalid state in addresses and ranges.
+
+commit 9f60cefd3eb61ba8c2bc75d7f0a926ca253a1a11
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri May 11 22:37:41 2012 -0400
+
+ More test on data range.
+
+commit 974b5eab9cd43de5304ce10e5fd64686eefe98e6
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri May 11 22:18:13 2012 -0400
+
+ More test code for get_data_range(), and found&fixed a bug.
+
+commit 0e24dab34639e617b8b53e59ecf59b9d8cc64bea
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri May 11 21:05:32 2012 -0400
+
+ Hopefully better data range calculation algorithm.
+
+commit b9c797f5c8d2886b4664a975107908a01a4e8c93
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri May 11 20:39:44 2012 -0400
+
+ Some silly fixes. Let's not forget return statements.
+
+commit 9a92828ece22f4ae0b3c3b6d3ba0ea743f4020d0
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri May 11 19:31:10 2012 -0400
+
+ Implemented get_data_range() that returns data range of a sheet.
+
+commit cacf4c1b26bfcf6ef5db39da215165ba488ecb4d
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sat May 5 13:25:26 2012 -0400
+
+ Aded more methods to model_context implementation for external use.
+
+commit 6de0e250eb06079160b3d92538c53aea6695e0ad
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri May 4 19:20:53 2012 -0400
+
+ Add an empty cell type which makes code a bit simpler and more efficient.
+
+commit 98011202b26b0e7e82999ae1fea6b3c4194a48f2
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Fri May 4 19:13:58 2012 -0400
+
+ Renamed typedefs to make them less confusing.
+
+ And wrote descriptions.
+
+commit 30e5945de00de076de72ea1ecc133db363ea3ff9
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu May 3 18:07:49 2012 -0400
+
+ Not using boost::noncopyable reduces the size of the class by 8 bytes.
+
+commit c94c06314a8437b6a8da3037f7a33dda68945535
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu May 3 18:04:43 2012 -0400
+
+ More cleanup for formula_cell.
+
+commit ec3da3e12decec8b10229cf18cec6cd64c97c430
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu May 3 17:51:42 2012 -0400
+
+ base_cell is history. Good riddance!
+
+commit 54b502c23feaa09a19d13a6a1a0e9e7bca2409c8
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu May 3 17:46:03 2012 -0400
+
+ Started moving stuff from base_cell to formula_cell.
+
+commit 0dc12178f72c92ebc8c6beaaade48d14017e7d97
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu May 3 17:33:21 2012 -0400
+
+ Removed these callbacks for ptr_map. I use mdds::grid_map for cell storage now.
+
+commit 4ae6eb99e6a17460bcdfe451c48813b6ec911c00
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu May 3 17:31:22 2012 -0400
+
+ string_cell and numeric_cell are no more.
+
+ Now mdds::grid_map stores raw values directly. No need to have those
+ cell classes around.
+
+commit 9b1b846b37c77688b975adfec3d0c0ae96a1a60e
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu May 3 17:26:07 2012 -0400
+
+ New scripts to enable gdb and valgrind runs during test.
+
+commit 74d8a787ccb08cd4f2ace5ee9ac9e51e1f694a5e
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Thu May 3 16:52:36 2012 -0400
+
+ Added another test for model_context that currently causes segfault.
+
+commit 4a32648cb0a26e68f5728b5bfdb0bc9ba514e5c4
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed May 2 23:23:17 2012 -0400
+
+ Let's not access result cache directly here...
+
+commit 5ffa2d45c6aad183d21ef4936a1b20b94f6f758d
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed May 2 23:12:30 2012 -0400
+
+ Fixed range listener code.
+
+commit 9ae4762d2d5e9474efb4647a76f275d4d194d796
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed May 2 22:41:21 2012 -0400
+
+ I need to check for the emptiness here as well.
+
+commit 4ab52a661c0bedaa6850831de504b01b5825592f
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed May 2 22:33:30 2012 -0400
+
+ get_cell_name() is no more.
+
+commit 9a655d21040d15b06394eb3d1ac76319f5e9e698
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed May 2 22:25:40 2012 -0400
+
+ I can't query cell type on empty cell.
+
+commit a21f7e3c292975e12f9cacb2c2947893b60e06dc
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed May 2 22:03:54 2012 -0400
+
+ I needed to keep dirty_cell_addrs_t which stores modified cells.
+
+commit f645aba4e403c402004ea7c782176ed44868d5c7
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed May 2 21:01:06 2012 -0400
+
+ I need to manually insert a changed cell here.
+
+commit 4e9c899750cbbcd5a3af783f745f5177726af24c
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed May 2 20:50:36 2012 -0400
+
+ Some debugging & fixed get_numeric_value() for formula cells.
+
+commit a35ece90e640003f57fbb06976a598d646f9093c
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed May 2 19:51:22 2012 -0400
+
+ get_cell_position is no more.
+
+commit e6f7a2b6ffd2eca26bb5a85213406ef0e8bb4e11
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed May 2 19:23:02 2012 -0400
+
+ dirty_cells_t now stores abs_address_t insttead of formula_cell pointers.
+
+commit bc9294228e2eed40a0f9941e813d29ea6b46861f
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue May 1 19:11:07 2012 -0400
+
+ Let's return respective empty values when the cell type does not match.
+
+commit 14f17e43f7ca15ff7cea8825b62b223a2869bbe8
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue May 1 19:05:42 2012 -0400
+
+ Adjust to changes in grid_map's method changes.
+
+commit 19b37fbb917043f86dc416041a81e2dfcbc81bfc
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue May 1 18:48:56 2012 -0400
+
+ Adjusted to avoid mdds storage error.
+
+commit 0b122e1b725c60e30a10c10d5726131ea58895ce
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue May 1 18:47:23 2012 -0400
+
+ Added test for model context storage.
+
+commit 75010dc7c2c0012a88d2e85033110b36c87e7b2b
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Apr 30 23:38:03 2012 -0400
+
+ Totally switched to the new mdds::grid_map based cell storage.
+
+ But tests crash everywhere. More work ahead.
+
+commit 8147ce6ebbf63b0d553c5417bed158325018bc66
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sun Apr 29 14:03:36 2012 -0400
+
+ Defined cell block for formula cells.
+
+commit 7e50569409abab879c55acbf4c5a9a091354e8a8
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sat Apr 28 15:46:28 2012 -0400
+
+ Required callbacks for formula_cell_block.
+
+commit 97cae9857fa3ab7675cc166d175437078e993cf9
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sat Apr 28 12:26:46 2012 -0400
+
+ Make room for the new cell storage type using mdds::grid_map.
+
+ I have yet to add some customization to this new storage.
+
+commit dea9761eadb8fdafb483e5a312c64e2a22080580
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Apr 25 17:28:11 2012 -0400
+
+ I don't need this forward declaration.
+
+commit 2813b36827c3ab4d89820f9ad037781b626a9839
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Apr 24 19:29:36 2012 -0400
+
+ The whole private part is now in the impl class.
+
+commit fc2a93150601e06060065e8bfe6e809762c2fddc
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Apr 24 19:12:30 2012 -0400
+
+ Worked on moving stuff from model_context into its impl class.
+
+commit 1e9de7ff9caf58af4b93bffca94dafef0306fb51
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Apr 11 17:46:04 2012 -0400
+
+ Cell instances, except for formula_cell, shouldn't be used outside model_context.
+
+commit 6a600d7bcdcec1d2e1aed9ee518c23786fce9531
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Apr 11 17:36:36 2012 -0400
+
+ Use empty_string_id instead of raw value of 0.
+
+commit 0e814ba846a6482b5c1312e0c990035991fc9689
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Apr 11 01:02:39 2012 -0400
+
+ cells_in_range is totally gone from the source tree.
+
+ I won't miss it.
+
+commit 4065c31f460549c3a09b6bdea96fd41dc091c3ea
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Apr 11 00:53:14 2012 -0400
+
+ The idea of cells_in_range was a big mistake.
+
+commit d6e8a1f40f9175253fdd4af767b3afa199f2702e
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Apr 11 00:12:36 2012 -0400
+
+ Trying to remove external use of base_cell.
+
+commit 4eb40415cd31c66c34bcfde3a3000eb789c518f9
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Apr 11 00:05:35 2012 -0400
+
+ get_string_identifier() sounds more fit for what it does.
+
+commit f17496d0c49178265bde1da3971fa6d4ac22d4c9
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Apr 11 00:01:27 2012 -0400
+
+ get_cell() is now gone.
+
+commit b12e9468396815e2393599fdf4d7281ad1dbf597
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed Apr 11 00:00:25 2012 -0400
+
+ Last use of get_cell() eliminated.
+
+commit 35d482f4e93f8a9a6777947faa241a03b43bfd7d
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Apr 10 23:46:48 2012 -0400
+
+ Even less get_cell(). Almost there...
+
+commit a1c974014c392a20f3ba586c595539b0dc9ba025
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Apr 10 22:26:39 2012 -0400
+
+ Silly typo.
+
+commit 9a257c83802149ceab9734aaa6ee64f5eeff62ab
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Apr 10 22:02:38 2012 -0400
+
+ More on avoiding use of get_cell().
+
+commit 7b5bddf37ba37435a61a3a0f225f69aeab65fa30
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Apr 10 19:52:00 2012 -0400
+
+ Method to get string value directly from the model.
+
+commit e255e8ca24627e03c9f2da932fdb4441b0914935
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Apr 10 19:37:33 2012 -0400
+
+ More reduction on use of get_cell().
+
+commit 81deb1829b8135b08fb35cc25c602b5cc3b69798
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Apr 10 18:55:58 2012 -0400
+
+ Encapsulate formula_cell retrieval.
+
+ For now, we need to keep using the formula cell instances externally.
+
+commit ee83a379b4bf5926e6701e8c5e60dfd77f3b3291
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Apr 10 18:35:18 2012 -0400
+
+ Encapsulate numeric cell value access.
+
+commit af06df2a1edbdc8aa407e39606569dddf327a5dd
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue Apr 10 18:08:38 2012 -0400
+
+ set_cell() is no more.
+
+commit c6c839ab664e99afee1d6b884fbc936926e741c1
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Apr 9 19:33:26 2012 -0400
+
+ Pass raw formula strings to the model to have the model handle it internally.
+
+commit 13fdee07c70fe16428c1522d1a9f632a264eaa11
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Apr 9 19:12:46 2012 -0400
+
+ Pass string cell values to the model context the same way.
+
+commit 821552de72c3ebd9b067bf1777184008746d2adc
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Mon Apr 9 19:05:19 2012 -0400
+
+ Pass the values of numeric cells to the model instead of passing cells.
+
+ First step toward limiting the use of cell objects outside the model
+ context. Eventually no cells will be used outside the model.
+
+commit 072670db4281563d5e5f9bd5a74c0a1c7dd00b6a
+Author: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Sat Mar 10 00:05:29 2012 -0500
+
+ Export cell_listener_tracker.
+
+commit 79f8c20d5e5efcdf6c3803ec5741e47b71206cff
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Wed Jan 4 19:35:02 2012 -0500
+
+ New test case for logical functions.
+
+ For now it only contains tests for IF.
+
+commit 7abbb3d7a49f17669f88b683821ed3626449ad76
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Wed Jan 4 19:30:19 2012 -0500
+
+ Implemented IF function.
+
+ Also added fnc_ prefix to the methods that implement built-in functions
+ to avoid naming clashes with C++ keywords (such as 'if').
+
+commit 43f31024c789036136aea31b97e2d4f4d7f43f40
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Tue Jan 3 18:27:32 2012 -0500
+
+ Extracted methods to make the execution flow clearer.
+
+commit aa0f2fdab650daeda9f876b0644c6680ce8380cc
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Thu Dec 29 16:09:11 2011 -0500
+
+ Basic test case for relational comparison of string values.
+
+ It's far from comprehensive, but it's a start.
+
+commit dc697a52be0e00118de74b7d4fe3df5730399fda
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Thu Dec 29 15:52:32 2011 -0500
+
+ Fixed an error in test script.
+
+commit a6752b14381199651fef75437d0b670542332d00
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Thu Dec 29 15:43:48 2011 -0500
+
+ Relational comparisons with strings & test with referenced numbers.
+
+commit 2778940d884a3bce06c77167158d620009e97485
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Wed Dec 28 19:37:45 2011 -0500
+
+ Getting ready for mixed type relational comparison support.
+
+commit d680f97697049632249d5fdd72a95ad7fbeaef7f
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Wed Dec 28 19:32:33 2011 -0500
+
+ Removed excessive debug statements.
+
+commit ebf6ca556e64c53211b35d31673db88662d75bb0
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Wed Dec 28 19:12:20 2011 -0500
+
+ Some debugging attempt.
+
+commit 979b7c5d3f48faa497621ff3b8ffc115e7a6b950
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Wed Dec 28 14:12:12 2011 -0500
+
+ Support not equal "<>" operator.
+
+commit 6b00140ecddaed120cf6047bc96be814e2461649
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Wed Dec 28 13:59:41 2011 -0500
+
+ Interpret less equal and greater equal operators correctly.
+
+commit 1109cf4dd17aeee5f59f8941a080b4f628b03484
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Wed Dec 28 13:41:49 2011 -0500
+
+ Abstract away iteration steps.
+
+commit 6ca6546f264c10ac91f9fe7b023769a94eab57c5
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Thu Dec 22 17:38:36 2011 -0500
+
+ Added formula tokens for less and greater equals.
+
+ The test case still fails, however. I still need to adjust the parser
+ to correctly translate the lexer tokens.
+
+commit 28cd70e8d31fa5c1d09dc7e5dc8f9f10a7802da0
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Thu Dec 22 17:30:07 2011 -0500
+
+ Removed duplication.
+
+commit a593530a475a19f34dbf9a86376dc9ddeb6ccb46
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Wed Dec 21 19:28:31 2011 -0500
+
+ Added less '<' and greater '>' operators.
+
+commit eecbdaf6a6a56c5b4ebeeca4146ba69c0db08997
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Wed Dec 21 19:19:05 2011 -0500
+
+ A little cleanup.
+
+commit ed440626fc76005f6a9984443b3de31bf9f2cfb6
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Wed Dec 21 19:06:34 2011 -0500
+
+ Correctly interpret equal operator. New test case for relational operators.
+
+commit ec859df573e770d22b32c57bb606ba126d7a0c16
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Tue Dec 20 18:45:23 2011 -0500
+
+ Throw an error when not all tokens get interpreted.
+
+commit 8ef98f2b4182a9dbbbe19510cba75a1b18d9f7cc
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Tue Dec 20 18:31:52 2011 -0500
+
+ Added equal operator to the lexer.
+
+commit 76b611e23cba95b51fcbb02a17a4b191ef0d71b5
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Sat Dec 17 19:37:41 2011 -0500
+
+ Format fix.
+
+commit f28e25890e5588379f439ce15307875f3b86d59d
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Fri Dec 16 19:23:06 2011 -0500
+
+ Test the delta value between two invocations of NOW().
+
+commit 631bdcdb6c72a8ab8b9264baf2a15c14e6c2ef54
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Thu Dec 15 17:49:58 2011 -0500
+
+ Add test code for volatile cell re-calculation.
+
+ However, the volatile cell is not being recalculated since the cached
+ formula result is not cleared.
+
+commit aaf443ee18f598314e001a7ef556f3211dbe903d
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Thu Dec 15 17:15:00 2011 -0500
+
+ Always append volatile cells to the list of dirty cells.
+
+commit 5d58bfab49f0e23fbbbab38340adbc17d17e2d4c
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Wed Dec 14 20:21:17 2011 -0500
+
+ Keep track of volatile cells.
+
+commit ed8b86536de475eb7267030a03c9a96751d020b5
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Wed Dec 14 19:32:07 2011 -0500
+
+ Unregister existing formula cell before setting a new one into the model.
+
+ And let's not implicitly unregister when registering. that's wasteful.
+
+commit fb5e711c161c6cad7d5d473642f3b6b73eae7376
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Wed Dec 14 19:28:39 2011 -0500
+
+ Added NOW() built-in function. But it only returns useless value at the moment.
+
+commit 5e8912dddbab27c1a75556fa31fe8b128262b4b1
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Wed Dec 14 19:04:18 2011 -0500
+
+ Added function that checks volatility of function.
+
+ For now it always returns false.
+
+commit 583e65f144fd3614e9c3783c5e6225034db0f673
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Thu Dec 8 17:15:54 2011 -0500
+
+ Test the formula calculation flow using the public API.
+
+ Test for volatile functions will be added after I implement it.
+
+commit 19f362bf921dedeff960a7ca853d5dca2a72bfe0
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Wed Dec 7 19:39:14 2011 -0500
+
+ Started writing a test code for volatile functions. Still in progress.
+
+commit 320a9c382f5d0bf811736548844ba6269f84331b
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Wed Dec 7 19:18:41 2011 -0500
+
+ Public API to unregister formula cell.
+
+commit 1ba0ee7ba0a89547d96697af0ec0e46cbd874d9e
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Fri Dec 2 19:27:24 2011 -0500
+
+ More appropriate test name.
+
+commit 219eb0a805f9fc3cb33cb9486829ecee24128c35
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Thu Dec 1 17:55:49 2011 -0500
+
+ Added CONCATENATE built-in function.
+
+ Unfortunately this forced me to use non-const model_context instance
+ all over the interpreter, since that function may add a new string
+ to the shared string table.
+
+commit 4340b68aa2144b48c406da885e5465e1d249f2da
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Tue Nov 29 20:14:48 2011 -0500
+
+ Fixed a bug and check the result.
+
+commit 06e62089652977195c3f2d873bac144a3c084aef
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Tue Nov 29 19:53:48 2011 -0500
+
+ pop_string() now properly supports a single cell reference.
+
+commit d9f5e0c48a6a2c91ed229489605fd4dda41a5838
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Tue Nov 29 18:29:23 2011 -0500
+
+ formula_result now stores string as an identifier instead of raw string.
+
+commit b530be3c8ddec5b1018640157e73e01746c13a12
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Wed Nov 23 12:54:15 2011 -0500
+
+ More on pop_string().
+
+ I need a common method for all cell types that return a string ID.
+
+commit 586f37ae647a943bdcd191f9f2acc3b811aebc26
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Fri Nov 18 19:34:41 2011 -0500
+
+ Adding a method to pop string for all stack value types.
+
+ It's not complete yet...
+
+commit b6877c13ac847cc2946d15fdc3d45f29a49892b9
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Fri Nov 18 19:22:33 2011 -0500
+
+ Handle numeric argument in LEN.
+
+commit 65238e453413aa11351b1930eb1afbb218c33bde
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Fri Nov 18 19:09:13 2011 -0500
+
+ Added new built-in function LEN.
+
+ For now it can only handle inline string argument.
+
+commit 0f583efa0384ce48a1f7483f1fcc8dbaec54db5f
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Fri Nov 18 18:43:50 2011 -0500
+
+ Test referencing cell that contains string & quote the string results.
+
+commit 23a7b4e2dd42b9b3a41ec14f618963a20eb3c943
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Fri Nov 18 18:33:12 2011 -0500
+
+ Interpret string tokens correctly.
+
+commit 8eea9b0a6390c6bd7293fa0800a9090b7cf812fd
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Thu Nov 17 17:54:29 2011 -0500
+
+ Parser inline strings into string tokens.
+
+commit d547c7bfa9407742e77691b9413b28c18dca318b
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Thu Nov 17 17:10:58 2011 -0500
+
+ New test case for inline string support.
+
+commit 685238cb3a371a0d11e8b64b23f307c439e66293
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Wed Nov 16 19:20:13 2011 -0500
+
+ Support parsing of sheet names with space.
+
+ Such sheet names must be surrounded with single quotes.
+
+commit 46815aa04054750b35a1a01e14117261890b1028
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Wed Nov 16 18:51:45 2011 -0500
+
+ New macro for literal strings.
+
+commit a640c7632fe1d084d9aa11e6dc0dab8dbc2641b8
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Wed Nov 16 18:29:20 2011 -0500
+
+ Make cell listener tracker a non-singleton.
+
+ This allows the same client process to spawn multiple model context
+ instances.
+
+commit c0ec0fa1431b94f874be4ef461c96912a6c08a29
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Tue Nov 15 18:39:34 2011 -0500
+
+ Support case insensitive function name lookup.
+
+commit 3ac9c8a12c2854b670c51da40aad234a77f9e920
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Mon Nov 14 18:43:49 2011 -0500
+
+ Added new test for case insensitive resolution of built-in function names.
+
+ This test currently fails since ixion currently assumes all function
+ names are UPPERCASE.
+
+commit 78659697e53682761c105cab31c103d35c00a82f
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Mon Nov 14 18:31:11 2011 -0500
+
+ Re-named to a more accurate test name.
+
+commit af10f51599dd66ecad511e2ef7774c79ab2138e2
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Thu Nov 10 17:31:07 2011 -0500
+
+ More symbols to be exported.
+
+commit a3fd37a7669ad3630f8b243b109173083d2598a3
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Thu Nov 10 17:08:01 2011 -0500
+
+ Turn symbol visibility off by default, and avoid name clashing.
+
+commit 8f97307c260fb0e75c70487aa059bf5f9a6445d2
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Sun Nov 6 22:00:57 2011 -0500
+
+ Forgot to add env.hpp to the makefile.
+
+commit 1eb6bafaba3e829b51940b0ac9de1c2064ab7531
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Sun Nov 6 14:52:31 2011 -0500
+
+ Added Visual Studio solution and project files.
+
+ Generated using Visual Studio 2008.
+
+commit da20e401ff5824866c4ef997cb03d7d7f6e37404
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Sun Nov 6 13:56:45 2011 -0500
+
+ Exported all necessary symbols under MSVC++.
+
+ ixion-parser.exe now runs under Windows. Whoo Hoo!
+
+commit 08513c1385fa35e4fa318f0660689dbeec8cde99
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Sun Nov 6 01:10:35 2011 -0400
+
+ Started exporting symbols for generated dll on windows.
+
+commit 0ec4c85e80e8655e9da3ae277950d6bd899b607b
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Sun Nov 6 00:19:34 2011 -0400
+
+ renamed namespace interface to iface.
+
+ 'interface' is a keyword with MSVC++.
+
+commit 3e120af0f9e04fa85969d28a5b947ff84f3ac36a
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Sat Nov 5 23:56:48 2011 -0400
+
+ Removed build error and warnings with MSVC++.
+
+commit 17d460ccb970f97eb9214a182c3b0db77269dac0
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Wed Oct 26 23:09:58 2011 -0400
+
+ The pack script now does not run libtoolize nor autoconf etc.
+
+ This will make it easier to build RPMs for multiple platforms with a
+ single spec file.
+
+commit 04ed911fc7be387753cbc3f916d692be15468231
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Wed Oct 26 23:00:04 2011 -0400
+
+ More rpm spec tweaking. It's in good shape now.
+
+commit 17de54116e44b739ff951e6c3ea411eeed481f0c
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Wed Oct 26 19:50:21 2011 -0400
+
+ No need to specify standard directories.
+
+commit 0ef9db7bf94a57cc5f97d2a6fe800ee4643a8f72
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Wed Oct 26 19:40:59 2011 -0400
+
+ Summary should not end with a dot (per rpmlint).
+
+commit c66034b638bcff1e832aa07d805d56e2fd3c1a9a
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Wed Oct 26 19:34:13 2011 -0400
+
+ Tweaked the rpm spec file.
+
+commit 00b3c731f627b276d445694a43dfc1e30dd3809f
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Wed Oct 26 02:10:54 2011 -0400
+
+ More tweaks with package scripts.
+
+commit 4c5c896809f0b1cd67ce79a3470dd97599df829c
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Wed Oct 26 02:03:53 2011 -0400
+
+ RPM script shouldn't use custom mdds path.
+
+commit 7a190c68f43f0f4a290f72a5f32de92ca18ad581
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Wed Oct 26 02:01:19 2011 -0400
+
+ More changes to autoconf & packaging.
+
+commit 7df69deab81b504cc4118c9e791a5f72d4884b38
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Wed Oct 26 01:47:57 2011 -0400
+
+ Check mdds header usability even when custom include path is given.
+
+commit 22d35c1b8a817fd92534260bd08a750a26c1e1c6
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Wed Oct 26 01:21:29 2011 -0400
+
+ Auto-detect system mdds headers if present.
+
+commit 6743dfa37fcede458983980d5d35c1dfe50a9240
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Wed Oct 26 00:00:09 2011 -0400
+
+ configure.ac now generates the rpm spec file.
+
+commit d22263d99cfbdea39e84e984040e35625e5475ef
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Tue Oct 25 23:43:32 2011 -0400
+
+ Initial version of package script and rpm spec file.
+
+ They still need work.
+
+commit 4fdb609f3e0532deb57f326ebb5d1ffde9511645
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Mon Oct 24 20:50:15 2011 -0400
+
+ Function description.
+
+commit 2507e42d990faf173815b36835b76dfadc9eb470
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Mon Oct 24 19:23:06 2011 -0400
+
+ Moved ixion-sorter code out of the libixion part.
+
+ That code doesn't belong there.
+
+commit b7915ed78333739f5497612f163fa1f43bf645ac
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Mon Oct 24 01:53:57 2011 -0400
+
+ Wrapper for boost::interprocess::unique_ptr and use it for formula cell.
+
+commit 79ea5f8eaf82c239f0d6eb0b63a649828e5c45b3
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Mon Oct 24 01:37:21 2011 -0400
+
+ Re-implemented shared formulas and removed unused code.
+
+commit 64543fe3f82169afd45f77cb29270c68cdf1cb77
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Mon Oct 24 01:05:32 2011 -0400
+
+ Simplify it a bit.
+
+commit 6fafbed46a7ef6af7ad07dac848ac9443fa0c4aa
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Mon Oct 24 00:42:23 2011 -0400
+
+ String cell definition now doesn't have to be quoted.
+
+ This simplifies parsing of string cell definitions.
+
+commit 4385e46c2b2217ecccd665ba157e897f8a97800b
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Mon Oct 24 00:36:04 2011 -0400
+
+ New test case for re-calculating formula cells referencing numeric cell.
+
+commit 27aa80f1011d5d7ac72934fd32fc6fb9091e3282
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Mon Oct 24 00:25:59 2011 -0400
+
+ Removed unused stuff.
+
+commit fa905351f6704b812beb51aee356736ad705f368
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Mon Oct 24 00:20:06 2011 -0400
+
+ Fixed referencing cells not re-calculating when the referenced cell was not
+ formula cell.
+
+commit 408e49e8b1c09c104b0e1f97ade1c8d8b63d6a8d
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Sun Oct 23 18:26:46 2011 -0400
+
+ Fixed some stuff.
+
+commit b44cf20d769ffe04570cf72f48ae9dd0ea7b2503
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Sun Oct 23 15:22:28 2011 -0400
+
+ Convert string number to numeric value without lexer.
+
+ It's much simpler this way.
+
+commit 59e2dcc04ee4bf5ec58d150fde653bee6bd31848
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Sun Oct 23 15:06:16 2011 -0400
+
+ Valid name with empty definition should remove the cell.
+
+commit 0e264d93b938e68446d8fdce8300fde44b3e6aff
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Sun Oct 23 15:03:11 2011 -0400
+
+ Get all tests to pass.
+
+commit ed8904a40a499bb1a610ea2ced914728dc4f867b
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Sun Oct 23 14:48:44 2011 -0400
+
+ Use unique_ptr to wrap raw pointer instance for exception safety.
+
+commit 01130d73e778a856bc1be36bcfd0dfa9cefab0b3
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Sun Oct 23 12:09:30 2011 -0400
+
+ Reduce indentation level.
+
+commit 451cb272bcd408cd9fe8f095fc9d38cdb32be9ae
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Sun Oct 23 12:05:11 2011 -0400
+
+ Re-do the re-calc code using the formula API.
+
+commit b2f5e1e249fa5a95c74010e2b3eb97ab3c3aa259
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Sun Oct 23 02:05:16 2011 -0400
+
+ Cleanup.
+
+commit b81719b2b2b17a11f48adcdbc3ae178ca84505c3
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Sun Oct 23 02:01:34 2011 -0400
+
+ Check results without using parse_data.
+
+commit 44979ee3d31c4c8189673ec17d2e4686050dc59a
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Sun Oct 23 01:47:00 2011 -0400
+
+ Clean-up.
+
+commit d908cee6672bb5f854243e73590d808c7a194f56
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Sun Oct 23 01:42:55 2011 -0400
+
+ Use the formula API to calculate cells.
+
+commit d266a9ba2f73b53015c668bdb85cba538f305943
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Sun Oct 23 01:39:13 2011 -0400
+
+ Print separator before first non-formula cell is printed.
+
+commit 4ff28e0293768a2c45976a3ee75f768a936447cd
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Sun Oct 23 01:28:36 2011 -0400
+
+ Now I don't need to convert lexer tokens to formula tokens before calculation.
+
+commit 55ab9a95dac3ae0bd3b9444ab5381dac912d3833
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Sun Oct 23 01:21:35 2011 -0400
+
+ Re-wrote parse_init.
+
+ Now, the initialization directly creates cells and puts them into
+ the model context.
+
+commit 47eefd981c2afb94bbf4ffc9457a7883eb757579
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Sat Oct 22 20:51:20 2011 -0400
+
+ Added model_parser.hpp to Makefile.am.
+
+commit 84380057e1243ad79472a513d73639e2e1192ff1
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Fri Oct 21 22:20:43 2011 -0400
+
+ const-ness.
+
+commit 5e7103cb25eb86cc7d47cb7c9ef7f22fcd6acde4
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Fri Oct 21 22:09:46 2011 -0400
+
+ Use for_each to simplify the code a bit.
+
+commit 7e4d3094f438552401fa6bdecc8998d17c18702a
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Fri Oct 21 21:46:54 2011 -0400
+
+ Moved model_parser code out of libixion.
+
+ This code does not belong to the library part of the code.
+
+commit e2d562fe348b2720dc35ed6b7bf6749ab2c9c4d0
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Fri Oct 21 19:36:30 2011 -0400
+
+ Better wording.
+
+commit 571da4c1b21ffaec7fa9796dce43cc34c0902842
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Fri Oct 21 19:34:07 2011 -0400
+
+ Added function descriptions etc.
+
+commit 6ee652ce1d5c0733f5c958ee870b7fd5729090f5
+Author: Miklos Vajna <vmiklos@frugalware.org>
+Date: Sat Oct 15 15:13:03 2011 +0200
+
+ Fix doxygen syntax to avoid misleading output
+
+commit 41bbee32712519ec1bcf95330ef8df7d5b0b43b1
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Thu Oct 6 01:28:06 2011 -0400
+
+ Use the sheet index of the cell when a sheet name is not explicitly given.
+
+commit 811d36f2c75c24586a0a9adb7571c0efc5e5dac2
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Wed Oct 5 19:04:11 2011 -0400
+
+ Ranges with sheet names.
+
+commit 39f89a378f8af4f392913bf62a46dbae0bb0f4de
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Wed Oct 5 18:57:54 2011 -0400
+
+ Test resolving sheets that are not the first sheet.
+
+commit 35dec931593b5d19462129fb900d708c3d7b8dcf
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Wed Oct 5 18:49:46 2011 -0400
+
+ Append sheet name to the reference name for real.
+
+ Now all tests pass again.
+
+commit 36240fed316a92ad1a7cb06232843242971b25fc
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Wed Oct 5 18:33:07 2011 -0400
+
+ Additional flag to toggle sheet names in reference names.
+
+commit 4ec3c1c52e45e275843fa334f80646682df45842
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Tue Oct 4 19:00:54 2011 -0400
+
+ Handle sheet names and indices in the model_context implementation.
+
+commit abe14ebafacff459c6352bb571be709aa06bc98e
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Sun Oct 2 13:58:26 2011 -0400
+
+ Added test case for 3D references. This currently fails.
+
+ The implementation will follow.
+
+commit 9100879779d493e5404e8db5e7d7cc31c097649f
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Sun Oct 2 13:36:10 2011 -0400
+
+ Removed methods from interface that are not needed from the formula parser.
+
+ The formula parser / interpreter only need read-only access to the context
+ model. The only exception is access to the formula cells in order to
+ update their circular dependency check flags.
+
+commit 7e819e4d2ae4cfb4b39b94aee548859ca6588035
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Sun Oct 2 13:16:04 2011 -0400
+
+ I can put everything but main() in the anonymous namespace here.
+
+commit 4e13e0856ef222b2266adba0968978cc91962deb
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Wed Sep 28 10:57:44 2011 +0900
+
+ Optionally pass model_context instance to the resolver for sheet name resolution.
+
+commit 208730f8757d43f52b86a2d33b6120a7911e91ba
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Wed Sep 28 09:43:23 2011 +0900
+
+ Fixed a bug or two.
+
+commit 2a37396c5ea7580c8a965134fcd458fa658496e0
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Tue Sep 27 14:42:48 2011 +0900
+
+ We don't use this constructor. Revert this.
+
+commit 0d1ab576e0cb71e6deabcd8c8902f422301cda51
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Tue Sep 27 13:56:33 2011 +0900
+
+ Get shared formula cells to finally work.
+
+commit 099e8d2b434edfb75ce5385581359b20b81ce326
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Tue Sep 27 11:40:35 2011 +0900
+
+ Handle shared token ranges.
+
+commit 5c9969040125aa04ad4b3053b88c042f2738b6ba
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Mon Sep 26 17:21:26 2011 +0900
+
+ Now share the tokens for real if applicable.
+
+commit ca3b707d2fa56cfffec8c2715d01863fb9ed9fec
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Mon Sep 26 16:28:08 2011 +0900
+
+ Unresolved ref token is no more.
+
+commit d9f94ea8142d4bc6b005af63d61c17a01c84a4e4
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Mon Sep 26 16:17:24 2011 +0900
+
+ Started working on supporting shared formulas.
+
+commit a89395ededbdf2b2f496797c4c2198a8e7cd6f22
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Mon Sep 26 13:57:36 2011 +0900
+
+ Let's reset the cell listener tracker in the dtor of model_context.
+
+commit 6ad5bb59d2eba6462be6d03260239f2b01aca304
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Mon Sep 26 13:53:50 2011 +0900
+
+ Shared token bit in formula_cell.
+
+commit c8047f090a81e5496d859f69d0f0363006380e8b
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Mon Sep 26 13:49:17 2011 +0900
+
+ Turns out that I need to reset the cell listener tracker for each file.
+
+ Otherwise it causes ill-behavior when parsing multiple model files
+ in one go.
+
+commit 4974a8759d45d570358c6e7d5eeb817f5b736cca
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Mon Sep 26 11:53:43 2011 +0900
+
+ New test case for sharing formula tokens across contiguous cells.
+
+commit cdb8a75f32baa9c5b3002c4b6fb90d1fc4441c62
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Mon Sep 26 09:57:57 2011 +0900
+
+ Test name resolution of single and range references.
+
+commit 8ca750c9cf9e8caabe3f8fa2e25493b4ce35a41e
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Mon Sep 26 09:54:03 2011 +0900
+
+ Print range names.
+
+commit 5107c0cd4d9afa851f22a3dc62085ea4f76fe89a
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Sun Sep 25 12:36:27 2011 +0900
+
+ Removed the non-const version of get_formula_tokens().
+
+ It makes no sense to have this method; once the tokens are set for
+ a cell, we don't modify them. We either add them or remove them.
+
+commit 1cd07895e4ec2be8fba73af4d3eed326d682a60c
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Sun Sep 25 12:22:27 2011 +0900
+
+ Method descriptions.
+
+commit 77067877cacf5e03e629489940c26a3c96d983bb
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Sun Sep 25 12:02:14 2011 +0900
+
+ Implemented const_cells_in_range and other associated changes.
+
+commit c90f3fa414213767967149829f97ebe184aed72b
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Sun Sep 25 10:47:50 2011 +0900
+
+ Throw model_context_error on errors related to model_context behaviors.
+
+commit 8208a270606aab5ae3c30f55916c1022cb5c5a9d
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Sun Sep 25 10:39:46 2011 +0900
+
+ Move common exceptions into own exceptions.hpp.
+
+commit e76d48f4bda3b0a0cb22d840265ef5be917428c2
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Sat Sep 24 00:53:19 2011 -0400
+
+ The method expects formula_cell instance. Let's make that explicit.
+
+commit 3e1963490179ae6ce00a7eb2974023add4dba89a
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Sat Sep 24 00:46:44 2011 -0400
+
+ Wrong indentation.
+
+commit c9e804ff178f07ded8987a2d00e21727e373551a
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Sat Sep 24 00:41:56 2011 -0400
+
+ Throw an exception on NULL formula tokens.
+
+commit 1521c17c999ff512703d27f54a60be0611baab3b
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Sat Sep 24 00:23:07 2011 -0400
+
+ Moved more function objects to be used from calculate_cells() in formula.cpp.
+
+commit 0e66e662ba2f5bed109d6d3fb3b9cbf264b5df31
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Fri Sep 23 23:50:15 2011 -0400
+
+ Moved dirty_cells_t to types.hpp.
+
+commit a4d2f28bc2b7ee750f0fd6d895949fe51a7c9936
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Fri Sep 23 23:24:38 2011 -0400
+
+ Removed unused code.
+
+commit 9b0c402cd035b481b4718df6cbdda62c9cf50916
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Fri Sep 23 23:13:55 2011 -0400
+
+ We only have to track dependency between formula cells.
+
+ So, let's not use base_cell but use formula_cell type directly.
+
+commit 7b6b89d94f96b018dd2f762c7cc1bc402d99a9d1
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Thu Sep 22 16:20:00 2011 -0400
+
+ register_formula_cell() requires non-const model context.
+
+ This is because it needs to have a list of non-const formula_cell
+ pointers in the listener tracker.
+
+commit fe0954399bd883c073380d3c86cbcf02719bf835
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Thu Sep 22 16:01:52 2011 -0400
+
+ Make const where possible.
+
+commit 6c6ec44feb038eb9a659c89290ac4570512d550d
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Thu Sep 22 15:54:30 2011 -0400
+
+ Made formula_cell_listener_handler shareable.
+
+ I need to use this in formula.cpp.
+
+commit 816427340077133679cb31eb2b5b0518eaf25922
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Wed Sep 21 18:58:57 2011 -0400
+
+ Moved basic typedef's to types.hpp (new header).
+
+commit e687bffc0e65ee3f0d82ec67396ca62e88153c7c
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Wed Sep 21 18:44:22 2011 -0400
+
+ Store formula tokens per sheet.
+
+ To prevent us from running out of the identifiers.
+
+commit 9de988531d6cf3a13f281a896c299fa11d1682eb
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Sat Sep 17 11:36:47 2011 -0400
+
+ Avoid allocating string just to parse result strings.
+
+commit e53e89c7d073e3a7e73c99199fe372f39bf6c6a0
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Fri Sep 16 22:02:18 2011 -0400
+
+ Try not to create a string object just to convert it to a double.
+
+commit cb799a9600f9a87ade33e02e52d44316f372a126
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Fri Sep 16 20:46:54 2011 -0400
+
+ A little cleanup.
+
+commit 29912f43a4a120887c6b4a07c1c69068e8863fdd
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Fri Sep 16 19:43:07 2011 -0400
+
+ Done refactoring the lexer. Now no more buffer to consider.
+
+ This is much easier to read & understand.
+
+commit 6186b2a7e05f7adafa2a23a5806eebbe39a4c950
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Fri Sep 16 19:19:50 2011 -0400
+
+ More on refactoring the lexer.
+
+commit 5b4a5d753b45601de6eef2c4763dd51adfd281d3
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Thu Sep 15 23:51:54 2011 -0400
+
+ Refactored lexer code to make it more readable.
+
+commit d6c9c5cdcb5652a1a1a31dbfb2ff83e5a34d4d78
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Thu Sep 15 22:53:47 2011 -0400
+
+ resolve() now takes char pointer and size instead of string instance.
+
+ This saves the caller from having to instantiate a string object just
+ to call this method.
+
+commit fd9a09cc1bdb3213687aec02d1b5cd7fe82556a5
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Thu Sep 15 21:28:11 2011 -0400
+
+ Done supporting string formula result.
+
+commit 1258cee519298483372ef5920ccd7a209e5ce798
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Thu Sep 15 18:22:09 2011 -0400
+
+ Began working on supporting string formula result.
+
+commit 3173d4fa091ef5eb9f667353c227c503c6ca8154
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Thu Sep 15 17:51:01 2011 -0400
+
+ Compare string values during the chek run.
+
+commit d600ffa871cb8b4a95a06a205986f8f40bfdf587
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Thu Sep 15 17:41:59 2011 -0400
+
+ Use the pointer to the new string instance, not the old one.
+
+ The passed const char* pointer will be invalid by the time I need
+ to do the lookup.
+
+commit 84dad21ac3f4e0ac2511c614dbc8a23824f27fa9
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Thu Sep 15 17:34:05 2011 -0400
+
+ Store string instances with the model context for real.
+
+commit 6b1f8d9138920480f2f3914b65feaee2df69e34c
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Thu Sep 15 17:06:32 2011 -0400
+
+ Parse string result to check string cell contents.
+
+commit d18124b67f4e31e82a177cb98e9fb1ab15471ad8
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Thu Sep 15 16:44:02 2011 -0400
+
+ Test file for defining string cells.
+
+commit 55e5cc6c3c700ba96fa301d98a692aff0347461c
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Thu Sep 15 01:49:05 2011 -0400
+
+ model_cell's name can also be mem_str_buf.
+
+commit b5eb92ab0edb87f8844dd31228a1c9c785e09587
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Thu Sep 15 01:31:57 2011 -0400
+
+ Let's not create string instances for lexer tokens.
+
+ While the raw string expression is being tokenized, there is no
+ reason to create duplicate string instances. Re-use the raw string
+ expression buffer and avoid creating excess string instances.
+
+commit a01f09c8aa53ba7edf05491f3212870bf6a3f8f4
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Thu Sep 15 01:01:25 2011 -0400
+
+ Convert to string cells.
+
+commit b3ed3f66e47458547569e69da118d4c65dff843c
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Thu Sep 15 00:38:37 2011 -0400
+
+ Parse quoted strings in the lexer.
+
+commit 1cb5a8ba16d61ef4c7f6ba02f4509d4123c2c909
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Wed Sep 14 21:07:16 2011 -0400
+
+ I call them numeric cells, not value cells.
+
+commit 86e0e72fe60842aae9cc9374e7a827cf48d5b311
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Wed Sep 14 19:28:58 2011 -0400
+
+ Extracted common code block into a method.
+
+commit cbef0c304bfe820352ac436a648b4891d52c0de4
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Wed Sep 14 19:14:14 2011 -0400
+
+ Adjusted output to print numeric cells to stdout.
+
+commit bbc3661d90029e56bf0c62604d4dbdf069cd21c6
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Wed Sep 14 19:04:47 2011 -0400
+
+ Sum up the value cells in formula.
+
+commit 54c36f3544e0eab921ad7b8b48eaf354d5b2e93f
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Wed Sep 14 18:47:32 2011 -0400
+
+ I prefer the term "numeric cell".
+
+commit 778de2bb1d97701449b8b41c06df0d8c7e3ed9bb
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Wed Sep 14 18:46:17 2011 -0400
+
+ Only treat the first ':' as the separator.
+
+ This interfered with range reference definitions.
+
+commit f0acbb3ca4ff8492717ebff411a25214e6d42801
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Wed Sep 14 18:34:21 2011 -0400
+
+ Verify results on numeric cells.
+
+commit bd8b46901bdc6b309ff5f2c514298bdfc732e49f
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Wed Sep 14 01:48:48 2011 -0400
+
+ Convert cells containing values into numeric_cell instances.
+
+commit eff9c0b9e8bd9dfbec6a363f625c584cb2e16db3
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Wed Sep 14 00:40:53 2011 -0400
+
+ Parse value difinitions whose separator is ':' instead of '='.
+
+commit fd4aadc3f06869ddc7f2c1c534b46f90e753fb47
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Tue Sep 13 18:46:19 2011 -0400
+
+ New test file for testing value cell definitions.
+
+commit 77c9790b442bacbaecc4b2c388bac14d7c984efe
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Tue Sep 13 21:30:56 2011 -0400
+
+ Various build fixes.
+
+commit 61aa1777be9d543e308ca33b9f6ab22e4119f7af
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Sat Sep 10 16:52:45 2011 -0400
+
+ Clean up.
+
+commit 443d9e036c7c24abc028c2725935b7fcbd1e91ac
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Sat Sep 10 16:34:23 2011 -0400
+
+ Lastly, use the session handler to print circular references.
+
+ This removes manual printing to stdout from formula_cell.
+
+commit b204b98eeeffc16ce9b8cbe4547e544f605b5340
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Sat Sep 10 16:25:28 2011 -0400
+
+ Print formula inrepretation runs to stdout via session handler.
+
+ Thus avoiding manually printing in the formula interpreter code.
+
+commit dba4f5ef8007de96328e9b8e2bd72a233555e094
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Sat Sep 10 14:16:35 2011 -0400
+
+ Make the cell listener tracker instance a static local in the method.
+
+commit 103f1a61420cee4ce5eddf4b85bf0998095a4527
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Sat Sep 10 13:54:36 2011 -0400
+
+ Updated description of base_cell.
+
+commit 1e8570e5ef338d2222c42a299e5a3a7e9f196356
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Fri Sep 9 20:40:49 2011 -0400
+
+ Added session handler to encapsulate the code that writes to stdout.
+
+commit 91c1abeab38fb113a191fbfcda17404f6dbb6dc4
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Thu Sep 8 20:27:38 2011 -0400
+
+ Some cleanups. Trying to remove formula cell methods that take context.
+
+commit d211b73e83c2acbc433a32efb819cb1f429f1e0c
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Thu Sep 8 20:16:41 2011 -0400
+
+ Removed redundant method.
+
+commit f7624eb26902ab6c7ed78a3e8b43cd9ea3f98542
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Thu Sep 8 19:58:13 2011 -0400
+
+ Now, formula_cell stores identifier for its formula tokens.
+
+ With this, the cell instance itself no longer stores the tokens but
+ just an integer ID to retrieve them from the model context. This
+ will also serve as a stepping stone for the future shared formula
+ work.
+
+commit 7ee516c43ea4ea524b1c3b343a2f7433f6cc64ea
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Thu Sep 8 17:28:56 2011 -0400
+
+ Have model context manage the life cycles of formula tokens instances.
+
+commit a34c840b270bc75921f9a5ab3967a96e64afdb1f
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Thu Sep 8 17:03:03 2011 -0400
+
+ Disable public instantiation of cell listener tracker.
+
+ It's a singleton now.
+
+commit 2a89ec1b5f9af27b5f6a803ba6e302f65096b564
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Thu Sep 8 16:58:35 2011 -0400
+
+ Turn cell range tracker into a singleton, and remove it from model_context.
+
+commit 991fa7818e86453f0bd674357afd1e8ee8085384
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Thu Sep 8 16:44:00 2011 -0400
+
+ Have cell listener tracker use interface::model_context.
+
+ Also, the interface now needs to provide access to non-const cell
+ instances.
+
+commit 12a9c3c92bc2413bfff1564821fbfec1f7c68307
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Wed Sep 7 19:16:39 2011 -0400
+
+ Make the raw data member private to base_cell.
+
+commit cf23a0a366d3b44507bb785eac90d093baeff43b
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Wed Sep 7 19:10:59 2011 -0400
+
+ Get the size of formula_tokens_t.
+
+commit c0f561ce35514661026688998357dd29318e12b2
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Wed Sep 7 18:57:04 2011 -0400
+
+ Cell type doesn't need a full 32-bit range; use the higher 24-bits for flags.
+
+ This saves 8 bytes from the size of formula_cell, by not having an extra
+ boolean data member for the circular safe flag and also due to memory
+ alignment.
+
+commit db075e57293775c9eaa847b438db548511b28d7e
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Tue Sep 6 19:11:25 2011 -0400
+
+ Prep for squeezing in bit flags into a cell type value.
+
+commit e182f0fff0a727f9ba7b4b90126f71cbcdf530e1
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Mon Sep 5 22:58:03 2011 -0400
+
+ Reduce scoping of a local var.
+
+commit 4bbd127d7614b6e44f694ba1226f62cd62ad0422
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Mon Sep 5 22:47:58 2011 -0400
+
+ Removed blank lines.
+
+commit f470fa3e5b89d91552ea8519b87cf14aadbac8af
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Mon Sep 5 22:46:03 2011 -0400
+
+ Prevent base_cell from being instantiated.
+
+commit fc6ae5280a8b5be629b140a5c5ad042de0f635fc
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Mon Sep 5 22:43:13 2011 -0400
+
+ Removed virtual-ness from the cell classes.
+
+commit 7df87a9a2c46a38935d41f003da7c7a5957471a5
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Mon Sep 5 21:54:51 2011 -0400
+
+ No one uses base_cell::print().
+
+commit 4eaacf060f77e0df999e465380322b382851caa1
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Mon Sep 5 18:44:23 2011 -0400
+
+ Cosmetics.
+
+commit f9636f85a06c0c1c49058a8c2790afac85880828
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Mon Sep 5 18:30:20 2011 -0400
+
+ Cell instances should not be copyable.
+
+ I need to implement cloning for cells later.
+
+commit 4513153f0d3d3889d7b8102fda2c58c42c192892
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Mon Sep 5 18:16:20 2011 -0400
+
+ base_cell no longer stores listeners.
+
+commit b1a0169823311d2d268ab03f1f8ec62b5daa1134
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Mon Sep 5 17:45:34 2011 -0400
+
+ Minor build fixes when using from external code.
+
+commit 5bfa5e6a09253cc542e54c9bb33cfc4829c0059f
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Mon Sep 5 16:24:38 2011 -0400
+
+ Put local stuff into anonymous namespace.
+
+commit 70b5f13a814c7d36d43b01d04ea256c0829cf1be
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Mon Sep 5 14:36:22 2011 -0400
+
+ Function description.
+
+commit 603d70fa73d16f5dc25ee198b750928ddff33d2a
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Mon Sep 5 14:34:46 2011 -0400
+
+ Return the config instance for real.
+
+commit d936bece4ae0ac055ecdfb36580cee37a212ee96
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Mon Sep 5 14:29:35 2011 -0400
+
+ Added config struct to configure ixion's run-time behavior.
+
+ It doesn't change any run-time behaviors as of yet.
+
+commit 5b79232c01e79eceaf8fb5c8a82a82c7b1e9bcbe
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Mon Sep 5 14:03:13 2011 -0400
+
+ Re-arranged parameter order.
+
+ To have both functions begin with the identical set of parameters.
+
+commit 7298301d471933d98f5b5690a15907e34b2d5c75
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Mon Sep 5 13:57:25 2011 -0400
+
+ Use for_each instead of manual loop.
+
+commit a0899b60b099e46e32e74e0d104f41887ad39885
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Mon Sep 5 13:48:57 2011 -0400
+
+ Print separators and function names.
+
+ These need to be configurable in the future.
+
+commit d62e16ff6bc0a7bb1ce65991315069936af54f33
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Mon Sep 5 12:48:19 2011 -0400
+
+ Initial work on printing formula tokens.
+
+commit 882ad2974537c8fd3ba9ddb9b354145c5731c5ab
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Mon Sep 5 01:19:15 2011 -0400
+
+ Now parse the lexer tokens and turn them into formula tokens.
+
+commit deab0c44df326978bd53486d6946b11e36da5f0a
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Mon Sep 5 01:01:48 2011 -0400
+
+ Wrong header guard name.
+
+commit bb36aa6a185a57e4a40dc5d6181a1dfa1f96b508
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Mon Sep 5 00:55:27 2011 -0400
+
+ First, convert incoming raw formula string into lexer tokens.
+
+commit 924314c4bc9bb1809a38e052ed21a8a881dff39a
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Mon Sep 5 00:33:24 2011 -0400
+
+ Added skeleton method to print formula tokens.
+
+commit 786e368c4f43d3219abfbc967645bb248579f9fa
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Mon Sep 5 00:15:36 2011 -0400
+
+ Removed types.hpp. It was a bad idea.
+
+commit beb740645d738cf1bcdc813c35cc1ec53b0f180e
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Sun Sep 4 23:47:32 2011 -0400
+
+ Wrapper script to run ixion-test.
+
+commit 9a978462b9cbe8398cdaefb564bef609964c85c8
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Sun Sep 4 23:46:29 2011 -0400
+
+ New files to start adding useful functions for external apps to call.
+
+commit 4b515a5161398b694efbf12d45f4aeb9b70e3685
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Sat Sep 3 16:03:11 2011 -0400
+
+ Added Makefile.am files under include to correctly install headers.
+
+commit 03221d3765ae3b305753d59a46965988ed1b0afc
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Thu Aug 11 18:25:14 2011 -0400
+
+ Added documentation.
+
+commit 4a0a4c85aa101afe1ee3b621a8fb3b458a4f34a6
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Thu Aug 11 18:02:43 2011 -0400
+
+ More use of interface::model_context.
+
+commit ab6d5767f3f7dcbedab50992fd25b721e188be3b
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Thu Aug 11 17:45:27 2011 -0400
+
+ Renamed formula_name_resolver_base to remove _base.
+
+commit 4966ad37ed02d2216b673143e7e0b03bf69accb7
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Thu Aug 11 17:37:23 2011 -0400
+
+ Now the entire formula interpreter uses interface::model_context.
+
+commit bbc18027b5dc9f5b3692f5f45878d98b0acd5289
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Wed Aug 10 19:30:42 2011 -0400
+
+ More methods that need to be virtual.
+
+commit 078a50e8ea9c48cc2bbc5737f037cbb32a195df0
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Wed Aug 10 19:20:12 2011 -0400
+
+ Added two interface headers and started adopting the existing code.
+
+commit a2b97487e23faacea808288579cf3ba10e11673f
+Author: Kohei Yoshida <kohei.yoshida@suse.com>
+Date: Tue Aug 9 19:06:56 2011 -0400
+
+ Removed standard iterator and moved to first(), next() based iterator.
+
+ This is to allow abstraction of this class which I'll work on soon.
+
+commit 78a5c4a63026d4cbc611e986c6bcef3eb5c672f6
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Tue Aug 9 18:22:31 2011 -0400
+
+ Header description for cells_in_range.
+
+commit 7e5b4eeb52cc464034dce1368e43e023a0a3f72e
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Tue Aug 9 18:18:50 2011 -0400
+
+ Extracted a common code block into a method.
+
+commit b06581b186a398a349fb3abadd5e43f9b7475d16
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Mon Aug 8 00:20:10 2011 -0400
+
+ Removed friend-ness and moved data members to the bottom.
+
+commit 22b87027d354816838ac7542d4759b809c0861bf
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sun Aug 7 23:54:19 2011 -0400
+
+ Changed method name.
+
+commit 5bf7a4b55119f154f58f5bdeb6bf3a4ab8bf70e3
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sun Aug 7 23:50:07 2011 -0400
+
+ Added note for the future plan of model_context class.
+
+commit 0738cba43a8c4c3a61095a22d266b87e4a6718f2
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sun Aug 7 23:46:39 2011 -0400
+
+ Updated the year of my copyright notices.
+
+commit 16c88c40bbfa1a8980aa3b9cd594f737b7b41a0e
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sun Aug 7 23:10:28 2011 -0400
+
+ Turned off all debug statements.
+
+commit 848b490b9b3c25b0f1a313a0a01a20721df51ebf
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sun Aug 7 23:07:05 2011 -0400
+
+ Implemented cells-in-range iterator and finally detected circular dependency!
+
+commit 20113f2f13c225c8fd190f6baafda84e31e7f6ea
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sat Aug 6 23:38:55 2011 -0400
+
+ This was never supposed to be checked in.
+
+commit 918b817f1004309df4eb911e7dc1472ac5bd768d
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sat Aug 6 23:38:04 2011 -0400
+
+ Added skeleton for cells_in_range class.
+
+ This class will allow iteratoring through non-empty cell instances
+ for specified range.
+
+commit 93f65f664b2b3ef62028e02f7af3b33f43608206
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sat Aug 6 21:33:23 2011 -0400
+
+ Spit a debug message on unprocessed token types during circular reference check.
+
+commit 1b247fd1802a8424eab7fc5b407ada780a8cf4b9
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sat Aug 6 17:14:24 2011 -0400
+
+ More debugging. Finally found out where I'm deadlocking.
+
+commit e4c06c577548a284d006f41103e46225895694f6
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sat Aug 6 16:50:50 2011 -0400
+
+ Started debugging dependency tracker.
+
+commit 6bf4bcd591e0dc788a400b71b4ea07296bf53da0
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Fri Aug 5 19:40:46 2011 -0400
+
+ I'm finished with this TODO item.
+
+commit 0d38ca86caa5a4b439b857dd3084005db2130245
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Fri Aug 5 19:37:18 2011 -0400
+
+ Started debugging again.
+
+commit 9fbd5937e8b3d83db51c4f3b51f7b3abab973390
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Fri Aug 5 19:26:59 2011 -0400
+
+ Oops.
+
+commit 5392a498ddf4ec79f90274fb609b8632251f839c
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Fri Aug 5 19:24:37 2011 -0400
+
+ I'm not supposed to be using cout directly this way.
+
+commit 0044c837c9a16aa36b052bd74f44330878254708
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Fri Aug 5 14:40:49 2011 -0400
+
+ More debugging on range listener tracking in presence of circular references.
+
+commit ac70129496fe924f8212787d0a1d3d670e074312
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Fri Aug 5 11:01:26 2011 -0400
+
+ Range listener tracker is no more. The name is cell listener tracker.
+
+commit 4b34407cb1222e9a0ae2d219d09267f85ef34023
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Thu Aug 4 18:10:29 2011 -0400
+
+ More debugging statements.
+
+commit fda8a308e4f523f7755055f92b713de7b55b7c37
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Thu Aug 4 17:42:23 2011 -0400
+
+ Don't check for presence of cell instance when adding or removing listeners.
+
+ This fixes the failure to detect circular references when adding
+ formula to empty cell(s).
+
+commit 40bac736b437aaeb7a4b0c39fd4a351c49be3e38
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Thu Aug 4 17:38:12 2011 -0400
+
+ Support 'exit' command to explicitly exit the interpretation.
+
+ This is useful when you only need to partially execute the model for
+ debugging.
+
+commit c172d81d56ebd94a7311741899d3740e06f8ab39
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Wed Aug 3 19:17:59 2011 -0400
+
+ Completely removed listeners from cell instances.
+
+commit d88355aca824602fb1f23b3ed4e331a3ab42b2e3
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Wed Aug 3 18:48:21 2011 -0400
+
+ Changed file names.
+
+commit 6b6c8072189b678b6518d2d4dc62cd5c33bc4e6b
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Wed Aug 3 18:42:32 2011 -0400
+
+ More on class name change.
+
+commit eb59309a67c53554d0817031d79b0c3b3ddc6b13
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Wed Aug 3 18:40:52 2011 -0400
+
+ Renamed range_listener_tracker to cell_listener_tracker.
+
+ This class now keeps track of single cell listeners as well as range
+ listeners.
+
+commit 9fa0f1e24bd4054c04941398ee750eeb45af9918
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Mon Aug 1 19:12:24 2011 -0400
+
+ Added method to pick up all listeners of single cell addresses.
+
+commit 31d234fa2d0dc7acb6e4ae98695ff64700b96df4
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Mon Aug 1 18:46:36 2011 -0400
+
+ Renamed methods.
+
+commit 38de132a07a086cc74402b864f41b138cc6764a4
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Mon Aug 1 18:38:16 2011 -0400
+
+ Typo
+
+commit 92b53330c8c4724aeb04bb69ce7dc10307b381c1
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Mon Aug 1 18:37:23 2011 -0400
+
+ New methods to add and remove cell listeners.
+
+commit efa57e6f513ce37dfb8296552114404d1569ab08
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Mon Aug 1 18:24:24 2011 -0400
+
+ Added new data member to store single cell listeners.
+
+commit 2f72c05a965fa574e5ea625d8f51e84473f3a485
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Fri Jul 29 19:38:43 2011 -0400
+
+ Replace debug cout with __IXION_DEBUG_OUT__.
+
+commit 40c738fde56d6bd7559d3f0bc5b2e1786b45a6cc
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Thu Jul 28 20:40:53 2011 -0400
+
+ Hmm. I forgot to check this change in !?
+
+commit 0238e413af52ae78928180c6805e9a131740eaed
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Thu Jul 28 20:36:38 2011 -0400
+
+ I didn't mean to commit this.
+
+commit 5d7be3290738c5f26ab28c402a8158526791fec5
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Thu Jul 28 18:33:28 2011 -0400
+
+ New test for detecting circular reference of single cells during edit.
+
+ The engine currently fails to detect this.
+
+commit e106b47d845436409daa58750b4596127155f52b
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Thu Jul 28 18:32:44 2011 -0400
+
+ Stop traversing range references when the original target address is reached.
+
+commit dffdb4013a068e65c9755ae2680b6fbcff03a8f5
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Thu Jul 28 18:02:36 2011 -0400
+
+ New test for circular range references.
+
+ This currently crashes the engine.
+
+commit a791163b40b1eb6867b16555ec5a7029f3a4a2ae
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Thu Jul 28 17:53:03 2011 -0400
+
+ Adding more test cases for range ref tracking.
+
+commit abee3e2dc4462a49641aca8fc175ebaabfd5e469
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Thu Jul 28 17:41:41 2011 -0400
+
+ Perhaps a better way to avoid checking listeners of the same target twice.
+
+commit e3216d0d23ac837e7077e7df8e2bd6004301a77d
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Thu Jul 28 17:33:18 2011 -0400
+
+ Remove bogus circular reference check during range listener traversing.
+
+ Also, make sure we only check values of those cells that are defined
+ in the run, by clearing previously held check values from the last run.
+
+commit ca4cf332abfd3d51138efdf5303b6f7cccf70c3d
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Wed Jul 27 19:27:07 2011 -0400
+
+ This is the year 2011.
+
+commit 90c43fc0efac581a9e36a5ac5846b939a908058d
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Wed Jul 27 19:21:34 2011 -0400
+
+ A5 has a constant value of 5.
+
+commit fca7e4edde6e9beb10f9ea7c774dfd801e296f9f
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Wed Jul 27 19:10:52 2011 -0400
+
+ New test case for chained reference tracking.
+
+ cell -> range -> cell -> range -> cell referencing. This currently
+ fails.
+
+commit 899690d956f8f13ada972e266334fce3871ee489
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Wed Jul 27 19:00:48 2011 -0400
+
+ Make sure to check for the boundary case.
+
+commit 171e1e480aab8376c4a89aa1001f85f732d24e98
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Wed Jul 27 18:53:16 2011 -0400
+
+ I got the row and column backward when searching for the range listeners!
+
+ No wonder the search would turn up no hits. Now fixed & all tests pass.
+
+commit 51c30ab4b6aa5ab48f728e7962278b5501513fbd
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Wed Jul 27 18:07:01 2011 -0400
+
+ Debugging the range listener tracker...
+
+commit f4dc801cc416e8aa3aa24d9a736f50b3ccdf78bf
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Tue Jul 26 18:46:25 2011 -0400
+
+ More debugging. Added name resolver methods for absolute refs.
+
+commit 470762a4f7a6ba858f8f618d8c1bc4e4869c8d28
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Tue Jul 26 14:38:27 2011 -0400
+
+ More test case for editing an existing value cell.
+
+ This currently fails.
+
+commit 676f7122cfe7b191e362d3e923ad60f4dc715fed
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Tue Jul 26 14:28:18 2011 -0400
+
+ Account for relative addresses when generating names from addresses.
+
+commit 949015d245fcde11570a2fa5c8eba39231648b71
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Tue Jul 26 14:17:00 2011 -0400
+
+ Test range listener's ability to trigger recalc on value cell addition.
+
+ Previously, adding a value to a cell that used to be empty didn't
+ trigger a recalc because no existing cell was modified. With the new
+ way of tracking range references, this should correctly trigger a
+ recalc.
+
+commit a1b88117cfe5982381dbfdc46b8a05bfcf8da0ac
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Tue Jul 26 13:44:56 2011 -0400
+
+ More debugging on resolving range refs & fixed relative range address storage.
+
+commit 457ef93e751f6cfa9b6ee8c69ecad9e3871f27ea
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Tue Jul 26 12:51:31 2011 -0400
+
+ More systematic way of producing debug outputs for range tokens.
+
+commit bcfc8b03f0d2be6f33362da7bdd03f692b7c4e9f
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Tue Jul 26 11:48:57 2011 -0400
+
+ New test file for very simple, basic range reference tracking.
+
+commit b156930689974f1d6a38c624619663c886c39d2a
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Tue Jul 26 11:37:49 2011 -0400
+
+ Fully implemented get_all_listeners().
+
+commit 81e98ba8448bcb1da61fe72efbc780a63287a05c
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Tue Jul 26 10:47:15 2011 -0400
+
+ get_all_listener() should conceptually be a const function.
+
+commit 0df90c95bf7a5ee20cbdf3f731431cc44f5a19d0
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Tue Jul 26 10:02:10 2011 -0400
+
+ More on range listener implementation.
+
+ Partially implemented range listener query method. Not done yet.
+
+commit 717228c2f9a6da88629ea5980ff60df0824cc5f8
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Fri Jul 22 19:42:28 2011 -0400
+
+ Added macro to toggle debug statements & ensure open-ended ranges.
+
+ rectangle_set's ranges are open-ended; we need to ensure x1 < x2 and
+ y1 < y2.
+
+commit c0a4ca8af9044db78d76f77af4f81ef45190b59d
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Thu Jul 21 18:34:34 2011 -0400
+
+ Let's not forget to delete all the listener set instances in dtor.
+
+commit ea5a266d5e0e59bdcfe6333eb448c721c4ecb5e0
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Thu Jul 21 18:29:07 2011 -0400
+
+ Implemented addition and removal of range listener tracker.
+
+commit dd3fe6122679e45f200f9abd2956eafb33734fdc
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Thu Jul 21 17:21:47 2011 -0400
+
+ Set up storage data member for range listeners.
+
+commit 68837ca14d1fcd92f864ab25b2e992b50ea8bc58
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Wed Jul 20 23:29:52 2011 -0400
+
+ Re-arranged formula ref handler to make use of range listeners.
+
+ At this point, the dependency based on range-to-cells is broken
+ temporarily because I haven't implemented the range listeners'
+ methods yet.
+
+commit f044bf4cb5f330da0f23f0c66912427682f66d6f
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Tue Jul 19 19:28:41 2011 -0400
+
+ Defined some data member types.
+
+commit 255db4d8925e9f6d7602bcfb667ce19e0588c5be
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Wed Jun 8 19:10:48 2011 -0400
+
+ Added empty skeleton for range listener tracker. To be filled later.
+
+commit 7a2fbc23d31858e30ac8c343d0e979386b09cd0c
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Wed Jun 1 00:02:51 2011 -0400
+
+ A little safeguard to test the logic.
+
+commit 0a2b8a84c13366f4f7a2f6683de81a191f0f649a
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Tue May 31 23:55:09 2011 -0400
+
+ Push cell references to the stack, and resolve them later.
+
+ We need this behavior for functions that manipulate reference addresses.
+
+commit 3800aeccb53f35a34cd943f69079fc23817cc92c
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Thu May 26 21:18:15 2011 -0400
+
+ Version 0.3.0.
+
+commit 69676ee136e0d83188e2b3434ec13cec12786859
+Merge: 24f08d1 f7ada18
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Thu May 26 21:04:50 2011 -0400
+
+ Merge branch 'range-ref-support'
+
+commit f7ada189c6db529c49c1e6c00f8a742329fc36b0
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Thu May 26 21:04:09 2011 -0400
+
+ Added permanent test case for range reference handling.
+
+commit 5a0d678d1823f750a029671f9682be73dbbd0f74
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Thu May 26 20:10:08 2011 -0400
+
+ Handle dependency tracking with range references correctly.
+
+ Now the cells should be calculated in the correct topological
+ order even in presence of range references.
+
+commit 8b6b7f375636d10d368b5f1b2a40c3b531893121
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Thu May 26 17:13:16 2011 -0400
+
+ Pick up range references from formula cells.
+
+commit f2972035fc99c153193d03cc16c1240d864dc500
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Thu May 26 17:07:27 2011 -0400
+
+ Only debug model parser for now.
+
+commit 9dd722efd1def07bc94a181b6862b24f4f0630f1
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Wed May 25 19:13:21 2011 -0400
+
+ Removed debug statement.
+
+commit e9dd58ff09ea3329c5d5b453ee06f794cc5d9961
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Wed May 25 18:58:58 2011 -0400
+
+ Fixed range value retrieval from the context.
+
+ But right now this causes deadlock since range reference dependency
+ is not properly tracked. That's to be worked on later.
+
+commit ce6264297ea14d9b73444e62fa7e7824e3b0be59
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Wed May 25 18:37:09 2011 -0400
+
+ Properly implement summation of matrix value.
+
+commit d4379cf4f252640b2093d6e85875d8b2c7082c0f
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Wed May 25 18:19:59 2011 -0400
+
+ Updated copyright years.
+
+commit c27aba7c3a3e67e693ba458f807a74e7207d729d
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Wed May 25 00:42:55 2011 -0400
+
+ More on getting range reference to work properly during formula interpretation.
+
+commit faa7dd15ba237d4cc11eea689d7c469316134326
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Wed May 25 00:14:44 2011 -0400
+
+ Implemented model_context::get_range_value for real.
+
+commit d9f50ad110a56213b766e611f0dd25629f17d145
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Tue May 24 23:34:11 2011 -0400
+
+ Class description.
+
+commit 0b2e10095d2bd42f6a020153eb5d850ccf78bc2b
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Tue May 24 18:47:46 2011 -0400
+
+ Added a means to get range values from the context.
+
+ A range value is represented by a matrix object.
+
+commit 57b67f002fc8ddb7cecc6c2063071cdb96e78824
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Tue May 24 18:22:50 2011 -0400
+
+ Pass model_context to the value stack container.
+
+commit 24f08d143e79b09e2d61924a0f6a19e97e777618
+Author: Cédric Bosdonnat <cedric.bosdonnat.ooo@free.fr>
+Date: Tue May 24 12:05:44 2011 +0200
+
+ Fixed automake tooling
+
+commit 0ad33f7bc6e02c3f78483e986ce241f9445f0b42
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Tue May 24 11:50:23 2011 -0400
+
+ A little cleanup in built-in functions.
+
+commit abad946428591bda2730eb8645d9b0aa64229e0c
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Tue May 24 10:46:59 2011 -0400
+
+ Properly initialize the matrix storage.
+
+commit 82fb7252a9d230b65971b0179963c5b667afc1a6
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Tue May 24 10:39:58 2011 -0400
+
+ Added new class ixion::matrix.
+
+ This class will store range data, as well as in-line matrix data
+ during formula interpretation.
+
+commit 28eee36bab7b3990961899c004bd2f250eca5228
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Mon May 23 20:14:45 2011 -0400
+
+ Cleaned up a bit.
+
+commit 55fab8ec41cacb0aa9d01a83d1adb62df8193bb5
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Mon May 23 18:50:34 2011 -0400
+
+ Added configure switch to specify mdds header include path.
+
+commit 5a7948b54726382a07891399d4ded7412d3875bb
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Thu May 19 18:50:12 2011 -0400
+
+ Removing TODO comment...
+
+commit f108d2edea1eb31a59515e60e786696d94e4dc4b
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Thu May 19 17:30:52 2011 -0400
+
+ Finally push range reference to the stack.
+
+commit 331404a34c3c9609d4394f478b08f51164153011
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Thu May 19 17:07:29 2011 -0400
+
+ Debug output for range references.
+
+commit 5809a4c94337dc09d058d1425f7de11c8ee4affd
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Thu May 19 16:55:17 2011 -0400
+
+ Use push_value and pop_value of value_stack_t directly.
+
+commit 9199537b5965cdb37ef254d3f3269a4ee7d3cd7f
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Thu May 19 16:51:11 2011 -0400
+
+ Methods to push single and range refs to the stack values.
+
+commit 7d0fccb1530889f2e4faef312c9b46fe1e137bc8
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Tue May 17 18:48:03 2011 -0400
+
+ A bit cleaner algorithm making better use of the stack value API.
+
+commit c2ef94c07f85ebc7f0d71c1aba0fc3ab2b821c88
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sun May 15 00:15:45 2011 -0400
+
+ Each function to return its result to the stack instead of return value.
+
+commit da4f839b1c18f02575c797c70730e42d8995f8ec
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sat May 14 23:43:19 2011 -0400
+
+ value_stack_t as a separate class.
+
+ To allow adding methods that handle stack values.
+
+commit b021ea9adb89966dd7d5feecab8793fa5a8d455c
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sat May 14 22:22:23 2011 -0400
+
+ factor may no longer include named expression.
+
+commit eedecf5f26b193a79200730f0d2b7be2d5763074
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sat May 14 22:09:41 2011 -0400
+
+ Turn formula_function into a non-static class that can be instantiated.
+
+commit 45dcee9f0e0e887b18eab4296020106eb6936687
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sat May 14 22:05:12 2011 -0400
+
+ Allow stack_value to store single and range references.
+
+commit df8c71c7090065c1f94809804b3f943b348c3eeb
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sat May 14 21:34:20 2011 -0400
+
+ Make stack_value a class instead of a struct.
+
+ Also did some other work to store references as stack values, instead
+ of resolving references on the spot. We need to keep them for functions
+ such as OFFSET, which modifies reference addresses.
+
+commit 3a64a37cdb23957c59c3558cc458b27f72b5e5dd
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sat May 14 20:02:29 2011 -0400
+
+ In-line comment.
+
+commit 63ece902b6e17864b89f0ded91cf95d5d51ebcd0
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sat May 14 19:58:45 2011 -0400
+
+ Re-use value stack container for formula functions.
+
+commit 471949e976dec29fd54f5c1d96bef8cc922253b6
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sat May 14 19:41:55 2011 -0400
+
+ Moved stack value related stuff to global.
+
+commit c576b98f7f641e639fc34d1028377491269bf42f
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sat May 14 17:26:44 2011 -0400
+
+ Convert stack values to arguments all in one go.
+
+commit ab102bf7248c8edb732f628015e621acfe6f72ff
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sat May 14 16:51:42 2011 -0400
+
+ Added class description.
+
+commit a0ce6909c9d4b4cdf3738d0c9d7aa5fdd5f4b6d4
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Fri May 13 02:30:55 2011 -0400
+
+ Fixed syntax error. I wonder why this ever compiled with newer gcc...
+
+commit 98dca4fd9214fa87f11ca60b1b300b96029eb3b2
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Thu May 12 21:45:56 2011 -0400
+
+ Just make sure that we have the correct stack size at the end of interpretation.
+
+commit 8039f56a4cd02b3aabc975a099ce8116329ed530
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Thu May 12 19:57:16 2011 -0400
+
+ A little cleanup.
+
+commit 655dddfc796187a22b9e35145664025f92c3fa57
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Thu May 12 19:38:49 2011 -0400
+
+ Switch to using variable stack to pass value around in formula interpreter.
+
+commit d64928c541381d36905bc2e9a816f89d7473bd6c
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Wed May 11 19:12:11 2011 -0400
+
+ Turn on debug for interpreter only.
+
+commit a74abeb536b0d4bbea2cf823cd36811b9d28afa0
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Wed May 11 18:59:35 2011 -0400
+
+ Correctly convert range type names into range reference tokens.
+
+commit e753b006ff26716753caf7c65357ba5c6293d3cf
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Wed May 11 18:19:06 2011 -0400
+
+ include/Makefile.in is no longer there.
+
+commit f62b681a4a439de91dd872c98ccdaa6ea3fbe43a
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Mon May 9 00:40:29 2011 -0400
+
+ Correctly parse 2D range references.
+
+commit b293088e9238187b0381284affd2b64c7a822b17
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sun May 8 23:41:19 2011 -0400
+
+ Extracted method that parses single cell address part.
+
+commit 2b0a4b29d56b4380ab5f1feed247c50fd0d858bf
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Mon Apr 25 00:00:53 2011 -0400
+
+ Don't forget to remove itself as the listener of its referenced cells.
+
+ When editing a formula cell, the cell needs to be removed from its
+ references as a listening cell prior to updating its formula tokens.
+
+commit 484378967d79898cfc9fad3adb8c70cdd4551ec1
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sun Apr 24 23:27:22 2011 -0400
+
+ Added description for the function object.
+
+commit 8cf1f7db23ee2dc353da78f86930c5f8f0bfd3dc
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sun Apr 24 23:15:11 2011 -0400
+
+ Extracted another code block into function object with for_each.
+
+commit b1947f22a70e499bed18dc9db76a85c3b27dbfaf
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sun Apr 24 12:34:26 2011 -0400
+
+ Extracted code block that convert lexer tokens into formula tokens.
+
+commit 2dc745561c7547f5771920d8e498cce7093c8a90
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sun Apr 24 11:32:36 2011 -0400
+
+ Added class/method descriptions.
+
+commit 089be4845a97a96ece9564f7ac8faf1a44c24ce7
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sun Apr 24 10:37:12 2011 -0400
+
+ Added absolute range and general range types.
+
+commit 6977ddc852f91ebfdb7e7ea21c9a73aa7010f8fb
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sat Apr 23 16:45:05 2011 -0400
+
+ Removed Makefile's from the include directory.
+
+ It builds fine without those makefiles. Let's remove them.
+
+commit 83cf4f5caf7a249118714edccb1fe293638529ec
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sat Apr 23 16:33:51 2011 -0400
+
+ Created include/ixion directory & moved header files into include/ixion.
+
+commit 74c3801b1b1ce6347a02506fd41997e1e70127c7
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sat Apr 23 16:12:18 2011 -0400
+
+ Renamed header directory from inc to include.
+
+commit 4da04f608e2fa51b90ed455a6486fbbff341a967
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sun Apr 17 18:58:44 2011 -0400
+
+ Comment.
+
+commit a51ff556970bd1698e21793ea658a0ad677e1ef4
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sun Apr 17 18:38:08 2011 -0400
+
+ Let's support line comments. Lines that start with '%%' are considered comments.
+
+commit e471f1c55bbdc16e271723f85bca4fed4e44e53d
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sun Apr 17 18:12:43 2011 -0400
+
+ Removed test that's a bit redundant.
+
+ 04-function-single.txt now tests all built-in functions. Let's use
+ that one.
+
+commit 30319487a72cc72ae964643a8dea35882e41f2af
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sun Apr 17 18:12:06 2011 -0400
+
+ Verify the results of fractions.
+
+commit 4c10bc4fd5e614f5272d3365e5c88bb0044ee4d4
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sun Apr 17 18:06:23 2011 -0400
+
+ Simple test for built-in functions.
+
+commit 3aa90ca7863ff6bd93664a6c55be48a011ce77f7
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sun Apr 17 17:23:20 2011 -0400
+
+ Verify the result.
+
+commit 5d3a4bd2cf2319bf12bdf050c924b2065b176a3c
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sun Apr 17 15:22:58 2011 -0400
+
+ Check the result.
+
+commit 942e9a1b5908fca9fd9aa473ca614762a39e77c2
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sun Apr 17 13:34:33 2011 -0400
+
+ Use abs_address_t instead of address_t where appropriate.
+
+ Some methods always expect absolute addresses. Let's use abs_address_t
+ for those.
+
+commit d82dcb1f03fde7b7e91e9776d027ead799f9cf90
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sun Apr 17 13:05:36 2011 -0400
+
+ Added abosolute address type abs_address_t.
+
+commit 749abd11ada204808f71ab4f72009f31fe84c7a6
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Mon Apr 11 01:10:51 2011 -0400
+
+ Fixed class description.
+
+ Class single_ref_token may store either relative or absolute address.
+
+commit d5772294a1ffbd16fc37f28016076433aba0b4f2
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Mon Apr 11 01:01:07 2011 -0400
+
+ Fixed circular dependency detection.
+
+commit 8beb4961618750503a3fdafc8be4915baec31948
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Mon Apr 11 00:33:25 2011 -0400
+
+ Make all necessary changes to get it to work.
+
+commit 873aa76c4eafb68ec7aa64d3ffaa238ffc3562e7
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sat Apr 9 15:33:45 2011 -0400
+
+ Let's defer setting the reference position with the formula parser.
+
+ We need to first parse the cell name in order to get the correct
+ reference position, then pass that onto the formula parser.
+
+commit 0014c44a509c813f0e86740f2090438b484bae62
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sat Apr 9 15:16:17 2011 -0400
+
+ address_t to carry relative/absolute flags & modified resolve().
+
+ resolve() call now takes reference position in case it needs to
+ calculate relative address.
+
+commit c7de370d0b7169e48b659bb8f7d3e2af5a733b1d
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sat Apr 9 13:44:09 2011 -0400
+
+ Set class descriptions to make it clear what single_ref_token should store.
+
+commit bbbad74ae326cfec5144ed7c53164bd2af8c76d8
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sat Apr 9 11:44:21 2011 -0400
+
+ Moved thread test files out.
+
+commit 4930af983b3d6b0d36920ff60217f5b112c5aa92
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Mon Apr 4 00:22:35 2011 -0400
+
+ Run the parser tests as part of make check once again.
+
+commit e0888667170e8fc2d2f0e99b35a5ca59801f4e4d
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sun Apr 3 23:28:30 2011 -0400
+
+ Use formula name resolver to print cell address.
+
+ This is so that even the names of empty cells can be properly printed.
+
+commit 5d9b9f57a226c444c9bf7435e05dce8456f43fcf
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sun Apr 3 22:48:41 2011 -0400
+
+ Fixed handling of listener cells during re-calculation.
+
+commit 54c1d649be3ce67a5fb35d767a375ac28e900e80
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sat Apr 2 13:12:34 2011 -0400
+
+ Removed the old slickedit project files.
+
+commit 6580e2f4f532656a8bad2deb5b80044cae1dbb1c
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sat Apr 2 12:35:53 2011 -0400
+
+ Added wrapper script to execute development version of ixion-parser.
+
+commit ba00e5ce199100eb8be28cdc93673b6bbdd5e22e
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Thu Mar 31 17:57:47 2011 -0400
+
+ Fixed re-calc.
+
+ ptr_map does NOT overwrite existing value unlike std::map. You need
+ to remove existing value first.
+
+commit 888afd8f550b4004fd1d288449fdc0b4d0f7063d
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sun Mar 27 21:15:00 2011 -0400
+
+ Fixed cell name resolution during formula result check.
+
+commit 5b08429f4577ba49e074323ee911278dfb8791af
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sun Mar 20 10:56:56 2011 -0400
+
+ Resolve function names first, over A1 cell names.
+
+commit fdf35cca32a48450e9e473946004381f532809b7
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sun Mar 20 01:15:49 2011 -0400
+
+ More test, and removed debug statements.
+
+commit 3b379947ddd9e9914dd6121158438ff11d7c6b7e
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sat Mar 19 18:38:59 2011 -0400
+
+ Fixed address to A1 name conversion & more test cases.
+
+commit 3e80712491c7c45334d9fbd98fc2e0266bbca02d
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sat Mar 19 17:56:10 2011 -0400
+
+ Set up a simple test code that gets runing during make check.
+
+ Right now, I'm only testing A1 name resolution.
+
+commit a4dea11ebd7ab3ce139512543fa17e0694d3b871
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sat Mar 19 13:36:49 2011 -0400
+
+ Removal of unused methods, typedef's etc.
+
+commit ecab0f58a0275d47a468bf1c5927b7d1e8080cd0
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sat Mar 19 13:27:09 2011 -0400
+
+ Dependency tracker now uses dirty cells instead of name to cell map.
+
+commit 9e7c5287724e1369a6986a5ff2f5329f793960a4
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sat Mar 19 13:13:59 2011 -0400
+
+ More on removing usage of name-to-pointer cell map.
+
+commit e478014b5521cb5081a3efe2d111977081a157e1
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sat Mar 19 12:40:43 2011 -0400
+
+ Fixed listener cell registration, plus some cleanup.
+
+commit d1912a72a9bf0c84680d2f84e83159ffff773e23
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sat Mar 19 11:48:09 2011 -0400
+
+ More on using context to get cell names.
+
+commit e90e515218c315a6b7ceb7f95681b760e918a896
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sat Mar 19 11:34:28 2011 -0400
+
+ Finally identified and fixed the cell dependency breakage.
+
+commit 546b98207a0743be970cab4022d6639b50b1c69f
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sat Mar 19 11:13:34 2011 -0400
+
+ More attempts to remove usage of global::get_cell_name().
+
+commit 2015b3601458a0d4a1294a1a4dcfad23e2e9a510
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Mon Mar 14 02:54:37 2011 -0400
+
+ Some work toward getting cell name from cell pointer via context.
+
+commit bfc6b7ab10e8958ec89b52ef875459a6922c8b1d
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sun Mar 13 16:53:53 2011 -0400
+
+ Print single ref tokens.
+
+commit 83abb9fb2b9b1d2356125dd81b94668dbdc80793
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sun Mar 13 14:05:40 2011 -0400
+
+ Insert a single ref token for cell reference during lexer-to-formula token conversion.
+
+commit eae9891fbe56b82762119aaaf44d753a1a8967b2
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sun Mar 13 13:56:58 2011 -0400
+
+ Convert all formula tokens first, then pick up dependency info in another loop.
+
+commit a7c9c480227c45efbeae71fdea2a877717a53946
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sun Mar 13 03:32:22 2011 -0400
+
+ Store cell listeners by cell address, not by pointer value.
+
+commit fe09a12415a2800a9ed7dba4f4253af347287675
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sun Mar 13 03:08:24 2011 -0400
+
+ cell's print listener now uses the context object to resolve listener names.
+
+commit 133d90a07635d7a75ebfa8722a66f641de3be73e
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sun Mar 13 01:58:52 2011 -0500
+
+ Store cell instances into the context for real.
+
+commit eec2bad92e1c38c334d1b6c5e0f5e1f4c7cb622c
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sun Mar 13 01:26:10 2011 -0500
+
+ I tend to use foo_type naming convention for typedef in class scope.
+
+commit 0626c47527867efb0980bca12296ed7431c41205
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sun Mar 13 01:23:00 2011 -0500
+
+ Correctly recognize definitions of formula cells and put them into context.
+
+ I have yet to properly store cell instances into the context.
+
+commit be0e9cf8b5f1bc147b7544a5ac6d95ff41109f4a
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sun Mar 13 00:14:42 2011 -0500
+
+ parse A1-style cell reference, and store 3D cell address with cell ref token.
+
+ Instead of storing a pointer to a cell instance, a cell ref token now
+ stores the address of a cell, and the cell instance is looked up
+ from the context.
+
+commit d8619146748bd73f027ccb8b342cde6df8ed02a3
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Mon Mar 7 01:48:36 2011 -0500
+
+ Code cleanup.
+
+commit e5f402786803db8a4827d8e486f3d53150ae0ec1
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Mon Mar 7 01:43:07 2011 -0500
+
+ Removed usage of pointer-to-name map from the thread manager.
+
+ We now use the context to manage stuff like that; no need to carry
+ around a separate cell pointer to name mapping object.
+
+commit c06d8263d1f7f146c9a7997400d2909b4813e4bf
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Mon Mar 7 01:17:11 2011 -0500
+
+ You can pass a const reference thru boost::bind if the class is not copyable.
+
+commit b974b065344fe88e25d6948eb781898b3b8cf92d
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Mon Mar 7 00:58:46 2011 -0500
+
+ Print named expression names during debugging of lexer conversion.
+
+commit 307f0b0e21b19b574ae0db967666aec6e0e7a9a6
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Mon Mar 7 00:46:38 2011 -0500
+
+ Print the name of named expression for interpreter debugging.
+
+commit 5b0363cd47a4b2ec4bc999aea5f0b9250b1694f4
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Mon Mar 7 00:30:32 2011 -0500
+
+ Detect circular referencing of named expressions, and throw an error.
+
+commit 3ddde30cb18ec23ae60799ed4c14aadf286065cf
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sun Mar 6 23:53:32 2011 -0500
+
+ Expand named expressions before interpreting tokens.
+
+commit 2b3d7ef82f2efef07527848bdbfe6ce8b83ab00c
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sun Mar 6 23:22:01 2011 -0500
+
+ Make a duplicate token set for the interpreter.
+
+commit 9222326f7379392817308fbc0b05102e9392300f
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sun Mar 6 22:51:06 2011 -0500
+
+ This is now a requirement rather than a future wish list item...
+
+ Nested interpretation of named expression won't resolve circular
+ dependency of named expressions...
+
+commit 2c7af07ee25780d4395b2f62271ab40b76c052dd
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sun Mar 6 22:43:32 2011 -0500
+
+ Added note for the future.
+
+ We should avoid nested interpretation as much as we can, since that
+ may create too many recursions and at worst case stack memory
+ overflow.
+
+commit a1ae6979659e22870180c46612f8c09d42bee179
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sun Mar 6 22:19:06 2011 -0500
+
+ Interpret named expression recursively.
+
+commit b088be1e8066d6bdb44b0bf63bbae06bfb8b7324
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sun Mar 6 18:19:34 2011 -0500
+
+ Treat each target as named expression, and pass the context object around.
+
+commit 5a3a42b634a7154c7faf3935cafe0608b9ac9f8e
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sun Mar 6 17:29:47 2011 -0500
+
+ Added header guard. I somehow forgot.
+
+commit 838f8f91c722185dc50b1d2f8714a18ca0271039
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sun Mar 6 15:52:10 2011 -0500
+
+ Removed unused method.
+
+commit b6d9c910676d1b99270a2c7b0d92a45485c74c93
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sun Mar 6 15:45:34 2011 -0500
+
+ Renamed several names to fit their purpose better.
+
+ Cells that one cell depends on are called "precedents".
+
+commit 938ab3145a9617f7f264d73501e59b50105d6169
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sun Mar 6 15:34:27 2011 -0500
+
+ Added named expression container to the context, plus code comments.
+
+commit dfd46e3ac1af5a6c6459eb047234139403ac9bf6
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sun Mar 6 14:00:42 2011 -0500
+
+ Added model_context class (still empty) to fill it with context specific data.
+
+ Also some code cleanup and commenting.
+
+commit 558c8d5e92ffe2cabda645ae7771f9333d9f24ce
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sun Mar 6 12:42:05 2011 -0500
+
+ Wrote a skeleton for simple name resolver.
+
+commit deddd7c3896bc0191de131e8e5d520a00761d3b3
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sun Mar 6 02:24:22 2011 -0500
+
+ Added new files for formula name resolver classes.
+
+commit bcd57843fb2dafc593267dbd47f53ed0b13d597c
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sun Mar 6 01:25:40 2011 -0500
+
+ Avoid returning a pointer to a temorary instance.
+
+ When returning const char* pointer, the pointer must point to a
+ live object, not a temporary.
+
+commit b7ab02261dc5c678c13b3cbb4959862d5a3fc376
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sun Mar 6 00:41:19 2011 -0500
+
+ Added workspace and project files for slickedit.
+
+commit b53c2bdda2b1ee45f30292493fe3cf2fd8ccdf74
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sun Mar 6 00:28:51 2011 -0500
+
+ Added documentation for get_opcode_name().
+
+commit 1fe8e3536e4bbe6e02660f64b7ccdcfc33f9747b
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sat Mar 5 23:58:14 2011 -0500
+
+ In-line comments.
+
+commit 8a465d59a0ff862b1e0ff0fdeaba9b9a877f359f
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sat Mar 5 23:54:18 2011 -0500
+
+ Fixed a typo.
+
+commit 0aacf3391bd9d2b1fbb6d5ead3af294d02c0d0f9
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Thu Nov 11 17:30:59 2010 -0500
+
+ Removed unnecessary header includes.
+
+commit 15a6fabd6dc5c80b417bc0f7b8baa994e964975a
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Wed Sep 29 17:32:42 2010 -0400
+
+ Another place where I forgot to remove boost/unordered_set.hpp
+
+commit 14d8165b40ff1efef57fc93c694496878be21da0
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Wed Sep 29 17:30:19 2010 -0400
+
+ Forgot to remove #include <boost/unordered_set.hpp>.
+
+commit 43da20b81263d8b085a3fd6142be97f1f482b109
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Wed Sep 29 13:14:35 2010 -0400
+
+ Skip boost >= 1.36 and boost::unordered check when the hash compat is ON.
+
+commit 9c4f1b689fcb0599a695ea4b813ecd9ada8c63cc
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Wed Sep 29 12:54:36 2010 -0400
+
+ Added --with-hash-container-compat configure switch to use std::hash_foo.
+
+ Without this switch, ixion uses boost::unordered_*. With this switch
+ it expects to find std::hash_* instead.
+
+commit 06337dc63574268e91d28d214a34a5940347a13a
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Wed Sep 29 12:12:56 2010 -0400
+
+ Added compatibility layer for hash containers.
+
+ Define _IXION_HASH_CONTAINER_COMPAT compiler macro to use
+
+ ::std::hash_map
+ ::std::hash_set
+
+ instead of
+
+ ::boost::unordered_map
+ ::boost::unordered_set
+
+commit 76bc0d08b8b89093bb8e8ee0b4a8a4207698b716
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Mon Sep 20 07:58:16 2010 -0400
+
+ Some fix on const ref argument passing.
+
+ Avoid unnecessary copying of string instance in constructor.
+ Let's stick with const foo_type& foo instead of foo_type const& foo
+ coding style.
+
+commit 4b1926a698c4197ced16d64d000341515ab78ed8
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Mon Sep 20 07:48:27 2010 -0400
+
+ Simple indent fix to keep it consistent with the rest of the code.
+
+commit 8d3e01a77d081a9b3e853127a2665e6f09e4d6c1
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Mon Sep 20 07:47:27 2010 -0400
+
+ Adopted the new file structure.
+
+commit ea95cc76d4fede584e13ab79d1233a6437994480
+Author: Cédric Bosdonnat <cedricbosdo@openoffice.org>
+Date: Fri Sep 10 16:41:44 2010 +0200
+
+ Added example file for the calculations tests
+
+commit fb634c83b58da8f8d8121244daf9e34000da85e3
+Author: Cédric Bosdonnat <cedricbosdo@openoffice.org>
+Date: Fri Sep 10 16:40:03 2010 +0200
+
+ Added SUM function and implemented MIN and AVERAGE
+
+commit 981c3cf518d6296275063b862cedd130fe3ebcf4
+Author: Cédric Bosdonnat <cedricbosdo@openoffice.org>
+Date: Thu Sep 9 14:01:07 2010 +0200
+
+ Forgot to add the makefile.mk to the distribution
+
+commit 6d098b745a06a36cc7dbfc166b19d8fd9ba67a0e
+Author: Cédric Bosdonnat <cedricbosdo@openoffice.org>
+Date: Thu Sep 9 13:52:28 2010 +0200
+
+ Removed the use of -std=c++0x and switch to boost
+
+commit 9b0b525b4e35868b9aa344eede11b5d88cb15098
+Author: Cédric Bosdonnat <cedricbosdo@openoffice.org>
+Date: Thu Sep 9 13:49:03 2010 +0200
+
+ Added dmake script for integration in OOo
+
+commit c0d3bcfd532b0f2558e2964085e534bf6e19c66e
+Author: Cédric Bosdonnat <cedricbosdo@openoffice.org>
+Date: Wed Sep 8 18:08:01 2010 +0200
+
+ Possibility to ignore unresolved names in formula parser
+
+ Added a mode to the formula parser to create an unresolved_ref_token for
+ the unresolved names instead of failing. The default behaviour is the
+ previous one: fail when the name isn't resolved.
+
+commit a9c513e2eda26de6501f026fc83fe14fbb8167ac
+Author: Cédric Bosdonnat <cedricbosdo@openoffice.org>
+Date: Tue Sep 7 16:18:11 2010 +0200
+
+ Some packaging improvements
+
+ * Changed version to 0.2.0 as this is a first release
+ * Automaticaly generate ChangeLog for make dist
+ * add the .pc.in file to the dist
+
+commit c554a35fcea10e7c0365fedd7dd0999513509436
+Author: Fridrich Štrba <fridrich.strba@bluewin.ch>
+Date: Tue Sep 7 15:56:12 2010 +0200
+
+ Make libixion build as shared library on windows and make the detection of boost libraries to use the boost.m4 from http://github.com/tsuna/boost.m4/raw/master/build-aux/boost.m4
+
+commit 067af9f41a1402e12c0170dde8b4936220f815a2
+Author: Cédric Bosdonnat <cedricbosdo@openoffice.org>
+Date: Tue Sep 7 13:57:50 2010 +0200
+
+ Automated the test running
+
+commit 0c0fff479235fd37a60c2b3ab642e4b67dc6c05c
+Author: Cédric Bosdonnat <cedricbosdo@openoffice.org>
+Date: Tue Sep 7 12:44:29 2010 +0200
+
+ Extracted a library and added use of autotools
+
+commit f98d1516ed96dce98846297b7df61614423e5c91
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Mon Jul 12 22:30:31 2010 -0400
+
+ Code cleanup.
+
+commit 3fb0116319c775a9e811c2bbb714d1de45b30e89
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Mon Jul 12 21:54:11 2010 -0400
+
+ Fixed a serious bug in depth_first_search.
+
+ index to cell node mapping was entirely wrong! The fact that the
+ formula cell dependency worked correctly was entirely pure luck.
+
+commit 8433d9fe2e5cd06abe7d81490daf2ce6e8a91350
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Mon Jul 12 20:45:32 2010 -0400
+
+ Done parsing sort input and run depth first search.
+
+ The result is incorrect. I need to look into this.
+
+commit a82c262b3bc8c2b431b7b02ed41aaa19bd4c5f0d
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Mon Jul 12 19:04:40 2010 -0400
+
+ More work on sort input parsing.
+
+commit 6c73ac1ddfedccce4f965394d870ecbc3a2a2459
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Mon Jul 12 16:47:51 2010 -0400
+
+ Load file content into memory.
+
+commit a8d09cb063f99db5e235a9cfada3ecae1eb0e93f
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Mon Jul 12 16:32:45 2010 -0400
+
+ Added skeleton for sort input parser.
+
+commit 14288ee57a0f2a8685d3da144c266e7cc996326d
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Mon Jul 12 15:29:10 2010 -0400
+
+ Use templatized depend_set to keep track of dependencies.
+
+commit c46b243b35a5ddf35258036907252250a210a257
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Mon Jul 12 14:18:15 2010 -0400
+
+ Removed depth_first_search::cell_handler base class, in favor of using template's typename.
+
+commit 1ca3fd7dd8e2831bfc5cdc6ff931b47b3da82afb
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Mon Jul 12 13:21:48 2010 -0400
+
+ Removed code relevant to printing dot script code.
+
+commit ce1193e301a7fe318437b4c0b28075d0a56fd21e
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Mon Jul 12 13:12:43 2010 -0400
+
+ Fully templatized depth_first_search.
+
+commit b0445a752b41bd59ba965ddb09a2329059ea94f4
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Fri Jul 9 23:31:50 2010 -0400
+
+ Replaced all uses of base_cell with typedef'ed value_type inside depth_first_search.
+
+ This is in preparation for templatizing depth_first_search.
+
+commit 4d19f5b366cd62b4a8b48f061d2639cb4527c612
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Fri Jul 9 23:22:17 2010 -0400
+
+ Fixed indentation.
+
+commit ec079a9d4482a14018190114b262c72583c7b716
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Fri Jul 9 23:19:55 2010 -0400
+
+ Let's not use const base_cell* in depth_first_search.
+
+commit d3dbd2e210c9c4b2802e9c6f275302ddd97ad3c8
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Fri Jul 9 23:07:16 2010 -0400
+
+ More work on making depth_first_search independent of depends_tracker.
+
+commit eee5b59f9a6d813683011493a6105a0fcfad1a83
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Fri Jul 9 22:40:26 2010 -0400
+
+ Always use base_cell type to represent cells inside depends_tracker.
+
+commit 48a2dfa7d982d34cc205414161fd0867bfb0b01d
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Fri Jul 9 20:22:32 2010 -0400
+
+ More on sorter.
+
+commit 7ce5248673dbb08af9d0b46bed99241a5094246a
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Fri Jul 9 19:54:29 2010 -0400
+
+ Removed unnecessary parens from the return statements.
+
+commit 82b05d8766c2fe6bc56370cb5f194c422cd9630e
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Fri Jul 9 19:31:52 2010 -0400
+
+ A bug in Makefile...
+
+commit 4223307a000e06887aa7d835be33e51d626f8b4e
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Fri Jul 9 18:01:28 2010 -0400
+
+ Added ixion-sorter executable and its stub entry.
+
+commit 51d3b363f373fb9ea7de772e081f2cc347b2e422
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Fri Jul 9 17:55:55 2010 -0400
+
+ Renamed main.cpp to ixion_parser.cpp.
+
+commit 68ff1f23ffd8d27572e68e59a22da25074a26257
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Mon Jun 21 20:04:57 2010 -0400
+
+ Some files I used for illustration in my blog post.
+
+commit b275e90361833ce920b1088235a635babb79ecde
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Mon Jun 21 14:41:25 2010 -0400
+
+ Added graphbiz file for test case 01.
+
+commit a952fdf4ebfbd762f321a69d152248ac4fa2a757
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Mon Jun 21 11:17:31 2010 -0400
+
+ Fix a typo.
+
+commit 532f84f8640a8a296236be55de856260cdf7a552
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Mon Jun 21 11:10:23 2010 -0400
+
+ Tweaked the help text for the --thread, -t option.
+
+commit 067287bf5dee2f72aaec25e140a2c8006614a9d4
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Mon Jun 21 00:39:30 2010 -0400
+
+ Put another global function into the global class space as its static method.
+
+commit d5224c34cc98a2ef901b335073f7bef2232ff689
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sun Jun 20 20:43:35 2010 -0400
+
+ Better wording for dirty_cells_t.
+
+commit a19e3f512b62c62c40e524a0298676a835d3d4d1
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sun Jun 20 20:40:35 2010 -0400
+
+ Moved sleep() into global class space.
+
+ Let's use the global class as a placeholder for all platform dependent
+ calls.
+
+commit a84fee70f8e696cdd844e6c35500b7bb66ad00ec
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sun Jun 20 20:26:38 2010 -0400
+
+ Moved get_current_time() into global class space.
+
+commit 4eff75672d565ccbc2a2f259ad0ced834f918c8c
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sun Jun 20 20:20:51 2010 -0400
+
+ Removed thread_test.cpp. I don't need it any more.
+
+commit 5f70c4fbef99f133da385dd502d3e47249593af0
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sun Jun 20 18:09:34 2010 -0400
+
+ Moved the header include line.
+
+commit 31dbacc23f8cb30248a4d06fcfa10b97a770b400
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sun Jun 20 18:06:59 2010 -0400
+
+ Always use boost::program_options, and remove the getopt code entirely.
+
+commit e12126f563a39ad476bf040cf33fa2d56b4562e9
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sun Jun 20 18:02:46 2010 -0400
+
+ Fix a build break when getopt is used.
+
+commit 023693ec1a652a405d36d5843eff69bf47e338a6
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sun Jun 20 17:54:03 2010 -0400
+
+ More on formatting the help output.
+
+commit 81e6031e73d28440e4c2f2d82e3d81a5956afc84
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sun Jun 20 17:38:36 2010 -0400
+
+ Use boost::program_options to parse command line options.
+
+commit 54e02d8b1887006b9e091e820e598c597ae16d8d
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sun Jun 20 01:10:49 2010 -0400
+
+ Make it buildable on Windows, by defining WIN32.
+
+commit 032780b7284b5acfad9a7a7df4e1e7b66dcdc1bd
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sun Jun 20 01:09:19 2010 -0400
+
+ Additional re-calculation test.
+
+commit e16fe8d751777cca43c8589be2ead35f0200aa4b
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Fri Jun 18 21:08:35 2010 -0400
+
+ Move all function objects near the top of the file.
+
+commit ae09653ac14a7c910420ef5567940c94a80da87b
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Fri Jun 18 20:32:21 2010 -0400
+
+ Re-calculate only dirty cells.
+
+commit 63bd7a9c970668cbf6a6408a8f5fe76659d379c5
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Fri Jun 18 19:30:51 2010 -0400
+
+ Calculate only dirty cells.
+
+commit 75788f00bc10634b57ee30ed3672c1e39e565538
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Fri Jun 18 17:33:46 2010 -0400
+
+ Have calc() take the list of recalc cells as an argument.
+
+commit f6a50e6757ef956ce767987ba8bef6771f26a885
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Fri Jun 18 17:20:22 2010 -0400
+
+ Have lexer token's print() return std::string instead of c string.
+
+commit 909ee5cceb439866a7f465bee0dc8349ae0ae70c
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Fri Jun 18 15:15:55 2010 -0400
+
+ Register listener cells when converting lexer tokens to formula tokens.
+
+commit 3ae1d567d0fd5bfd020631aa4e8fff4d0e43c57c
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Fri Jun 18 09:50:40 2010 -0400
+
+ Check the re-calculation results.
+
+commit 0a8fc2da4f7cc11f33aea65bc5ad0c76b4ff4e26
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Fri Jun 18 00:22:27 2010 -0400
+
+ Removed unused header includes.
+
+commit 7c2f4fed209e0ac19d15ab1a97a00aadbe239c69
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Fri Jun 18 00:18:28 2010 -0400
+
+ Removed unused stack printer.
+
+commit 7856bd5666fcf438540528b9b8d70bd27ce5d67d
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Thu Jun 17 23:53:25 2010 -0400
+
+ Removed parse_mode_input() function, which no longer makes sense.
+
+commit f4e9fd855edd80afc68845c992ddcbc416cc1d3f
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Thu Jun 17 23:47:32 2010 -0400
+
+ Combined two near identical functions into one.
+
+commit f0df9f87f51d7a2187f742d66a72cce0e756d1a1
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Thu Jun 17 23:41:44 2010 -0400
+
+ add_listener() sounds better.
+
+commit f9f749bc329e33446c2336caab8715bbee33dfe7
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Thu Jun 17 23:36:19 2010 -0400
+
+ It's actually the base_cell that needs to keep track of listening formula cells.
+
+commit ed02117bca6c02bc365470d486df8067c767424d
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Thu Jun 17 23:14:25 2010 -0400
+
+ Formula cells need to keep track of listening cells.
+
+commit bd2764c6a8f1c0935f6599b8b378e7bf52e975fb
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Thu Jun 17 21:54:39 2010 -0400
+
+ Fixed a bug in lexer.
+
+commit 55ca6694b34c43e5abe331809774575decac2d2a
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Thu Jun 17 21:33:09 2010 -0400
+
+ Parse fractional numbers correctly.
+
+commit 717009f03600812c29817332b7fa90a1a891eeb4
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Thu Jun 17 21:11:47 2010 -0400
+
+ Reworked lexer for efficiency.
+
+commit 1b476e907a704be1b496253d015f21288c5fda86
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Thu Jun 17 19:35:25 2010 -0400
+
+ Use mem_str_buf in the lexer code for efficiency.
+
+commit 5448c756ead98a98e046e0fa7faa550ccd3ea3ef
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Thu Jun 17 18:16:58 2010 -0400
+
+ Started working on parsing fractional numbers. To be continued.
+
+commit 6f4e25430f4ac36c537506e951cfc8a6af2a0991
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Thu Jun 17 18:02:10 2010 -0400
+
+ Added appropriate commands to all test documents.
+
+commit 48de79afa718d4edfaf73573fad6269a9ba0deb5
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Thu Jun 17 17:53:11 2010 -0400
+
+ Clear the parse data only once after switching to edit mode.
+
+commit 8b05a4129a8c6ba79b2cab515ed70222ccfe8181
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Thu Jun 17 17:39:55 2010 -0400
+
+ Reset global data for thread control before performing threaded calculation.
+
+ Recalc failed because I forgot to reset global thread control data before
+ performing recalculation.
+
+commit 98a48fce23d56e63b62b2fc025a2973dd9f19a34
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Thu Jun 17 16:42:35 2010 -0400
+
+ Make cell pointer name map globally accessible.
+
+commit f07207f208758ad4e5a3f34bdb0c8342dd89fbf1
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Thu Jun 17 15:15:27 2010 -0400
+
+ Used typedef'ed name.
+
+commit d23ee9605d01642794fe5b4da8d554f5cc8820c5
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Thu Jun 17 14:34:30 2010 -0400
+
+ A little code cleanup.
+
+commit aeb5dc5f7d6fd8136cbd77b83340756db085f233
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Thu Jun 17 14:23:53 2010 -0400
+
+ mode-init -> mode init, mode-result -> mode result etc.
+
+ Let's make the mode command its own command and have it take one
+ argument to switch modes.
+
+commit 4ccdc9b5fe43b578fda3ce9738e2f8a47fa6f748
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Thu Jun 17 14:11:42 2010 -0400
+
+ Dynamically create cell pointer-to-name map during calculation.
+
+commit d67c8e63983751cb3d95337897a156eaa6e35c3c
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Thu Jun 17 12:46:23 2010 -0400
+
+ Refactored the calculation code to prepare for re-calc support.
+
+commit 5b8a31c6fad59b8c449a082d7a3073ed99b3fe51
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Wed Jun 16 23:22:51 2010 -0400
+
+ formula_result class in its own files.
+
+commit 803e89a49b9cee94bfaa79cd097f06269f01f688
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Wed Jun 16 23:08:14 2010 -0400
+
+ Finally verify calculation results and throw exceptions if results differ from the expected.
+
+commit 62e6cd2d17552a617252d0c1b53c031ef8d0d44f
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Wed Jun 16 21:36:37 2010 -0400
+
+ model_parser::check() method to check formula calculation results.
+
+commit c27c9d7475343bbfbfd2fe14d617a97f6333f00b
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Wed Jun 16 21:25:05 2010 -0400
+
+ Use formula_result to cache result instead of formula_cell::result_cache.
+
+commit 1da88470f9ec5539606f697cc006429f43d4ae5f
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Wed Jun 16 21:08:26 2010 -0400
+
+ Fix a build break.
+
+commit ae44d9338c175b1a786a28b61b5c510f6c84b4a7
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Wed Jun 16 20:38:57 2010 -0400
+
+ Parse error results.
+
+commit aca608083f100b2d39621b7271e893979beb0a75
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Wed Jun 16 19:55:04 2010 -0400
+
+ mem_str_buf in its own files.
+
+commit 5d7a5797a908a21ed7162fce7dae2e7477b11413
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Wed Jun 16 19:36:20 2010 -0400
+
+ More on parsing formula results.
+
+commit c9af4839b0e7b7b625653f35274b83ffdaa83bed
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Wed Jun 16 17:22:38 2010 -0400
+
+ Empty parse_result call, to be completed later.
+
+commit 0b65699ce7bd3227e24640b4d7dad6ce9874cda9
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Wed Jun 16 17:10:16 2010 -0400
+
+ Add error data member to formula_result.
+
+commit f17b00eef749b4bc5ee452f280b74fd1153e0e1e
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Wed Jun 16 16:47:20 2010 -0400
+
+ Refactored model_parser to support different parse modes.
+
+commit 756c1afa1ab318736ac515993af0748f91c04a4d
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Wed Jun 16 15:08:54 2010 -0400
+
+ More on model parser change.
+
+commit 497dc2d598b9d0315370ab11cb2120842c8a3665
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Wed Jun 16 14:01:46 2010 -0400
+
+ Remove unused data member and methods.
+
+commit 453e048c54f32ba08498a7e9ac45b41c8c2d0383
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Wed Jun 16 12:34:27 2010 -0400
+
+ A little cleanup.
+
+commit 1913efa01ea2bad82fde9f25d0fa1faa82e66ba9
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Wed Jun 16 12:15:22 2010 -0400
+
+ Perform full calculation during parsing of the model input file.
+
+commit b88eda8081397f1674a3229fe7fb16609f0892c6
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Wed Jun 16 10:02:57 2010 -0400
+
+ Modified help output.
+
+commit f72ccea3856ba139b90290124c292ee855ead101
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Tue Jun 15 23:14:51 2010 -0400
+
+ More on model input parsing.
+
+ Pick up commands. When a line begins with a '%', it contains a
+ command name.
+
+commit 707360c5288a5b6825002d992066fa179025db5f
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Tue Jun 15 22:05:24 2010 -0400
+
+ More efficient parsing of model input files.
+
+ Load the entire content of model input file into memory and use char
+ pointer to keep track of current string buffer. It's much faster
+ this way.
+
+commit 65a9510d373a77eb7f67bc6b451d357c86511530
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Tue Jun 15 20:29:55 2010 -0400
+
+ Use std::string instead of vector<char>.
+
+commit f338aef1d116f50c22418ae77655711757d35135
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Tue Jun 15 18:22:26 2010 -0400
+
+ Moved inputparser.?pp to model_parser.?pp.
+
+commit 22c1fbf10e15afb79eeb6416fee1f6ef165190aa
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Tue Jun 15 17:20:22 2010 -0400
+
+ More javadoc comment etc.
+
+commit 78ce47e041c4ce25f66ab118b7ed9f8ba820f542
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Tue Jun 15 16:45:10 2010 -0400
+
+ Display the number of threads specified.
+
+commit 6da385b9810fdd6a2671bd92e13c82b24c5c115d
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Tue Jun 15 16:43:11 2010 -0400
+
+ Add ability to specify number of threads at run-time.
+
+commit 5a8e737d482c51fb189dd0742c7415bb4a3366b5
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Tue Jun 15 14:07:31 2010 -0400
+
+ is_circular_safe() should be a private method.
+
+commit 2aff1ee49040c73e4ede494f763846fe69df9390
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Tue Jun 15 13:57:37 2010 -0400
+
+ Javadoc comments for some methods.
+
+commit 43b85ce5165f400bb0ef731a74ecf15ca9748c14
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Tue Jun 15 13:47:03 2010 -0400
+
+ Fixed incorrect mutexing of the interpret() method.
+
+ It was actually not locking the mutex at all during cell interpretation!
+
+commit 1f26e5cc6c91ebed234d5e25ed757a99614530ae
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Tue Jun 15 13:36:00 2010 -0400
+
+ New test file for testing concurrency.
+
+ This file is much simpler than the 05 file.
+
+commit e82ba1d707d672cf3f6810564d92107e105315ba
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Tue Jun 15 13:33:35 2010 -0400
+
+ More on fixing synchronization problem. Now the results are calculated correctly.
+
+commit 4134714a86a95f351a37e4082dee3787df6167c1
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Tue Jun 15 12:20:15 2010 -0400
+
+ Removed unused class.
+
+commit b694205f79979b737adbf5f1f8235bb0c1f0a719
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Tue Jun 15 12:19:20 2010 -0400
+
+ A little cleanup.
+
+commit d647c54da6ab5921500448ac481444727f7054ef
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Tue Jun 15 12:11:34 2010 -0400
+
+ Improved debug statement generation to make each output set atomic, and fixed one synchronization error which caused incorrect results.
+
+commit 8cd7f407943824abd048a23f1b3f2aedc7880814
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Tue Jun 15 00:56:38 2010 -0400
+
+ Cleaned up the output format a little to make it easier to read.
+
+commit 322beba25b08df939c42dfed9c0188daed80f1e4
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Tue Jun 15 00:32:14 2010 -0400
+
+ Fixed a single-thread calculation.
+
+commit 2573b78fb633b76b4ee56ed1aa6905ca6ea1546b
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Mon Jun 14 21:52:57 2010 -0400
+
+ Display the number of CPUs.
+
+commit 40eeb92a2a46820639d38d2cd074a41463164274
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Mon Jun 14 20:09:53 2010 -0400
+
+ Build fix & disabled debug statements for the formula cell code.
+
+commit f27b4950bd658a76de0b20ec0b5bacfaf62543ea
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Mon Jun 14 18:14:26 2010 -0400
+
+ Interpret cells using threads for real, after circular dependencies have been detected.
+
+commit e36752329054114deb6e341e4f4327e23fbd00ad
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Mon Jun 14 16:49:00 2010 -0400
+
+ Started working on circular dependency detection in threaded mode.
+
+commit 3802a2c3a1a0eedc14bd2249ef8f2545069891fa
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Mon Jun 14 11:25:36 2010 -0400
+
+ Print total duration for each test case.
+
+commit d3dff7900d3f23817d9555874075967ce20e0c29
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sun Jun 13 16:52:51 2010 -0400
+
+ Display if the process is using threads.
+
+commit 644317629c67a3e58ae23e7c95ebb9c683f1b886
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sun Jun 13 16:42:55 2010 -0400
+
+ -t to toggle using threads.
+
+commit 1aa95963e23dfaf902f4ab61a01e3a0bdff4d822
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sun Jun 13 12:02:47 2010 -0400
+
+ Move all debug statements related to interpretation to a single place for atomic output for each cell.
+
+commit 048ad29ecbea8fc623d4e08e79374f121b04340b
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sun Jun 13 11:45:29 2010 -0400
+
+ Fixed a build break.
+
+commit 1dc70f42c72612d06719100324db15c519063823
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Thu Jun 3 22:38:28 2010 -0400
+
+ Disable debug statements from the input parser code.
+
+commit 9424af5e9737c601bd41ec9977d093123f8889c1
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Thu Jun 3 22:23:54 2010 -0400
+
+ Disable debug statements from formula parser.
+
+commit ad0ece1ec90074c88063774a4d444d6d88a05661
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Thu Jun 3 22:13:45 2010 -0400
+
+ More on interpreter adjustment for threads.
+
+commit a12c7814deb823eafaa6f440f0dd0d5d96b95936
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Thu Jun 3 19:30:13 2010 -0400
+
+ Introduce --use-thread command line option to toggle use of threads at run-time.
+
+commit 1129162b1bb695aa46a32cbace539429bf650bb4
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Thu Jun 3 19:09:47 2010 -0400
+
+ Use cell_queue_manager to calculate cells with threads.
+
+commit 76fd0d0017b4d007bc254cf420db0ffc42366a7f
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Wed Jun 2 23:59:01 2010 -0400
+
+ Fixed cell_queue_manager to properly call formula_cell::interpret().
+
+commit 87bcb99a4d66e41e5aa4374c7897248d9a9cf89a
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Wed Jun 2 23:41:20 2010 -0400
+
+ Disable debug statements in formula_cell.
+
+commit d8ffb20e2a906154f83abf3edf63609382c7b031
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Wed Jun 2 23:34:52 2010 -0400
+
+ Extracted method for code cleanup.
+
+commit bd48bec9bd9cc8130cbadf54658081944096f8c1
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Wed Jun 2 23:25:55 2010 -0400
+
+ Synchronize formula cell calculation and result retrieval.
+
+commit e8b0abe7ad4a04ff503b3126bb4bae11e680146b
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Wed Jun 2 22:01:55 2010 -0400
+
+ Added synchronized_data template by Andrew Williams, added formula_cell::interpret() method.
+
+commit eb64227c6c7298b41fbf7626dcb56b85f3b50289
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Wed Jun 2 00:45:18 2010 -0400
+
+ Hook the cell_queue_manager methods to the actual implementation calls.
+
+commit a3ae8d368263110b206fbfd43d24b720cc49d7fd
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Wed Jun 2 00:28:13 2010 -0400
+
+ Copied the thread queue manager code from misc/thread_test.cpp, and got it to compile.
+
+commit 6716407d3638e733e9f639b6609626ed61078561
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Wed Jun 2 00:03:45 2010 -0400
+
+ Added skeleton files for the new cell_queue_manager class.
+
+commit e8a9b7910b6881dc6e382b6762c7989636fd4e60
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Mon May 31 22:54:21 2010 -0400
+
+ Use struct to bind relevant members together, with mutex.
+
+commit 2ea42c9ea83532e527ec6990e306cdfca63c2a2d
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Mon May 31 22:17:31 2010 -0400
+
+ Use a single enum data member to define actions, instead of using multiple boolean values.
+
+commit a693e6b3694d30cab8db5a5161d38433b156b0a2
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Wed May 26 23:43:36 2010 -0400
+
+ Code cleanup.
+
+commit 7c5fbab07ad0b220c30bbae0be8d76601073dbda
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Wed May 26 23:36:27 2010 -0400
+
+ I still need to check for empty cell container inside the inner while loop.
+
+commit 0929dd436674ac57de78946c746110ae91f0984c
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Wed May 26 23:07:51 2010 -0400
+
+ Have the worker threads register their idle status. This method seems more robust.
+
+commit 1312c2a10c87bd11c5fa673f4111529a3eaead16
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Tue May 25 23:22:00 2010 -0400
+
+ Use worker threads to interpret cells. There are still some synchronization issues.
+
+commit 3daa85f35e703a80abf8cb72e33c2fe3a6ed9cb0
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Tue May 25 21:22:55 2010 -0400
+
+ Renamed some symbols & added javadoc.
+
+commit 057fa090cbc4df756d66ed508f44cb8383d0337c
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Tue May 25 01:10:41 2010 -0400
+
+ Have the manager thread spawn worker threads of arbitrary count.
+
+commit 57d10121638e2c8b7b7a683d94212911eab4d52a
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sun May 23 22:33:48 2010 -0400
+
+ Main thread should wait until the queue thread becomes ready.
+
+commit 21ddfcc76f0982569afed9ba2bea660298e30857
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sun May 23 22:05:12 2010 -0400
+
+ More on thread queue.
+
+commit 897479a200312f3907fc0e53e9377918decca323
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sun May 23 01:42:53 2010 -0400
+
+ More on thread queue.
+
+commit 2df52a8c37450969b9f31ae412f860bac124a057
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sat May 22 20:39:31 2010 -0400
+
+ Made 'make' to run the test directly.
+
+commit 5837c82533ab626fb75858e5fb1f2cf664a53da7
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Wed May 19 22:59:13 2010 -0400
+
+ Use boost.thread instead of pthread.
+
+commit 7a4339edb6a7e3f7ddc726c3294c03d3dac2287d
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Wed May 19 20:03:02 2010 -0400
+
+ Practice code for posix threads.
+
+commit afc94fa8ea66bfb3b18817bda2c77804e8e61df4
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Mon May 17 00:32:11 2010 -0400
+
+ Now, interpret cells during DFS for real.
+
+commit dc80b36e79520a574bf33310d4e64cd133b8ee50
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Mon May 17 00:24:53 2010 -0400
+
+ Use handler to handle black cells during DFS.
+
+commit 70afb21c76bf7042ed727cbf2ad8c81c33738703
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Mon May 17 00:14:55 2010 -0400
+
+ More on topological sort rework.
+
+commit f746a971d0f376fe20058628aaaf02537844f7b5
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sun May 16 23:27:00 2010 -0400
+
+ Added hook for interpreting cells during topological sort.
+
+commit 1404ad1ccfb4cb28fabd61e13a9cf4570a36d4fc
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sun May 16 22:48:43 2010 -0400
+
+ Added WAIT() function to test for parallel formula computation.
+
+commit b81179725c96f7723025ecde1865ee0fe5f7d0a7
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Wed May 12 21:22:10 2010 -0400
+
+ Turned formula_result into a class with proper encapsulation of its data members.
+
+commit b6f7c52503281636136b07191fc24dc3c4fa7c10
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Wed May 12 20:29:58 2010 -0400
+
+ Updated comment.
+
+commit f3111fab9f4ea0baacfb2158685d44f542113703
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Wed May 12 20:18:57 2010 -0400
+
+ Added formula_result struct to store a dual-type formula result: numeric or textural.
+
+commit f92ae45eda6e2981bd9e21937d3bb04b5203d943
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sun May 9 16:35:56 2010 -0400
+
+ Make sure to set the token position correctly after processing functions.
+
+commit 700b14ee3c94bc0ef6ede68b4080bda16874b631
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sun May 9 16:33:00 2010 -0400
+
+ TODO comment.
+
+commit 1a634c735e69c0eaa1b891cea6d90681b5f01f79
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sun May 9 16:24:07 2010 -0400
+
+ formula_functions::interpret() as the central point of function interpretations.
+
+commit 1ebd25c9775bd2d90e50e014c4a78c9c82f770a3
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sun May 9 16:12:47 2010 -0400
+
+ Use std::string instead of const char* to pass lexer token prinouts around.
+
+ By using const char*, sometimes token printouts wouldn't get returned properly.
+
+commit 40affcae5a35ec6e2bfce493ed2d95e3edbe43f9
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sun May 9 15:57:36 2010 -0400
+
+ New files for formula function interpretations.
+
+commit 4478bd9f407b4fc685dcc04244eaadb693764cec
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sun May 9 15:57:03 2010 -0400
+
+ New test model for function interpretation.
+
+commit 23bcbf73e9c7605998905b600121745911c8347d
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sun May 9 15:56:24 2010 -0400
+
+ Interpret functions during calculation.
+
+commit b65ebbb2813f57f076956d94dd2dafe433731791
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sun May 9 14:54:07 2010 -0400
+
+ Pick up built-in function names and create function tokens.
+
+ For now, I only check for MIN, MAX and AVERAGE function names.
+
+commit 1d7700bb229597c3499ec695e0013e8db1118436
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sat May 8 17:54:31 2010 -0400
+
+ Print error message on reference error during lexer token parsing.
+
+commit 6fb7467570b2e39004809e89d9b36581178e3609
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sat May 8 17:49:33 2010 -0400
+
+ Print ',' for separator tokens.
+
+commit 8760c8cf61c7bbe9d629309e589601b908dab992
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sat May 8 17:41:35 2010 -0400
+
+ Check for empty tokens before interpreting.
+
+commit 3399450bff16597b035ca5026c58284fc398f792
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sat May 8 17:32:30 2010 -0400
+
+ Renamed model input files to prefix them with numbers.
+
+commit c53af55339aca777a350930a7b8811851e08db06
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sat May 8 17:30:46 2010 -0400
+
+ Modified cli interface to allow parsing multiple model files.
+
+commit 1ad6df0151533ea494596fb270afc26a1580572e
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sat May 8 17:21:21 2010 -0400
+
+ Exec name to ixion-parser, and use -O2 for compiler optimization.
+
+commit 339b6c38701873fad06e913f337e477bc65c20af
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sat May 8 17:15:21 2010 -0400
+
+ Added slickedit workspace files.
+
+commit a98cba5de3393c809ff0c32aa1dfca306fc8e9ad
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Thu Apr 29 00:01:41 2010 -0400
+
+ Define error type for invalid expression.
+
+commit 5502473d0bd8ad69ec45dcff051fb9ebbee8755e
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Wed Apr 28 23:57:12 2010 -0400
+
+ Reset values in the interpreter before each interpretation.
+
+commit b01c4090244e4a22c3eebac6d8dded0653c1fc86
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Wed Apr 28 23:54:55 2010 -0400
+
+ Handle division by zero condition, and store error condition with formula cells.
+
+commit 3d7dbf2bd1ee2951758dfa5a9641cbb0be4a73d7
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Wed Apr 28 23:30:36 2010 -0400
+
+ Add cases for self-reference (illegal) and division by zero (error).
+
+commit 73310ea07021783bc62164f9e182953fd2666f04
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Wed Apr 28 23:26:59 2010 -0400
+
+ Add more example of circular dependency.
+
+commit 29c381e387ff678f221668f6e358cf4c3e7442a2
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Tue Apr 27 23:48:29 2010 -0400
+
+ Added two more cells that are not circular dependent.
+
+commit f77aff4a0159c8a5158eb5fab0126085437d1d6b
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Tue Apr 27 23:44:17 2010 -0400
+
+ Detect circular dependency conditions and flag #REF! for such cases.
+
+commit eed92606bd03e2d7bd3f562a1a346c4969109fa8
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Tue Apr 27 23:29:57 2010 -0400
+
+ Added test model for detecting circular dependencies.
+
+commit d1ac9b0902f747ca8f2657082c0c6f86b703a05b
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sun Apr 18 21:55:17 2010 -0400
+
+ Return expression immediately when the next token is neither + nor -.
+
+commit 4abf42f3f5aca5baa5d37b9e11e942d5280ba435
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sun Apr 18 20:36:48 2010 -0400
+
+ Removed multiply_op() too.
+
+commit 0b4cb9684e648371ea811330176cc5f21ec3121a
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sun Apr 18 20:32:54 2010 -0400
+
+ Removed plus_op().
+
+commit c4d177fbb2371e43b6521bbae89cd34f306dd822
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sun Apr 18 14:31:03 2010 -0400
+
+ Fixed the definition of expressions to get the order of precedence correctly.
+
+commit 98577c3bb9c45185ed7c7f01d112f7ac6986ac86
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sun Apr 18 12:13:14 2010 -0400
+
+ Print cell names instead of pointers during expression parsing.
+
+commit 4cc03283993b2d8bf21af0b08bbca872f741f584
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sun Apr 18 12:05:24 2010 -0400
+
+ Moved some typedef's to global.hpp.
+
+commit a2bc38504bdc0e2cb1b957d6dc997f3a18df7492
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sat Apr 17 22:29:15 2010 -0400
+
+ Store calculation results with the formula cells, and use them when referenced.
+
+commit c101dc10e51183cd6af4e6737fb159d69d0d45b4
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sat Apr 17 21:21:53 2010 -0400
+
+ Removed unused data member.
+
+commit f1bf55a1423720b52355f31bd46f4726efff8742
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sat Apr 17 20:51:48 2010 -0400
+
+ A little cleanup.
+
+commit d836c03bb5de2f9c38988f5c6a1eabe2201499fe
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sat Apr 17 20:43:21 2010 -0400
+
+ Beautify interpreted expression.
+
+commit 22defc6b176d4a38ecef3684e3c0d9fb8bc7ee9b
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sat Apr 17 20:37:53 2010 -0400
+
+ Actually calculate result of expression interpretation.
+
+commit d96ce74691d98563c9f6636852ddcd3182d9a50e
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sat Apr 17 11:57:16 2010 -0400
+
+ Handle factors beginning with '+' or '-'.
+
+commit c26b315c198852db6cfc813ac8e6c342787723c0
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sat Apr 17 11:18:13 2010 -0400
+
+ Minor stuff.
+
+commit 2c9db67f2bc78aecde1ddcae8493dd47246c8801
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sat Apr 17 11:06:44 2010 -0400
+
+ Another test case for parens.
+
+commit f3e691e8d81466f700d23e4795733a2ca0fd8930
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sat Apr 17 11:04:08 2010 -0400
+
+ A little cleanup
+
+commit 12a23936a37749bc343a5acaa713f6f39d1e9f27
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sat Apr 17 11:03:16 2010 -0400
+
+ Use switch instead of nested if's.
+
+commit e49d38312d9e48dca49c48a686d484220ecea6e9
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sat Apr 17 11:01:03 2010 -0400
+
+ Break factor() into paren(), variable() and constant().
+
+commit a7966b0db0cc2bae664c94fd319569d763ef04c7
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sat Apr 17 10:54:05 2010 -0400
+
+ Removed unused methods.
+
+commit 64fb5df44887b85d450620aa080ad117281de696
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sat Apr 17 10:52:55 2010 -0400
+
+ Modified interpreter handler description.
+
+commit 555c3eda08cf0f49c5efecf12c9e7c62e8ee6d43
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sat Apr 17 10:49:52 2010 -0400
+
+ Parse expressions containing parens.
+
+commit 078f006cbca7f84de67229895452ac04253565d0
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sat Apr 17 10:42:03 2010 -0400
+
+ More on parsing expressions. I can now parse simple expressions without parens.
+
+commit fd804e6baca5b36279c11bd08875e12b32ff0711
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sat Apr 17 00:14:39 2010 -0400
+
+ More on parsing expressions.
+
+commit bde226a304c3c277598de6f1cade536f7f3e5fa9
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Fri Apr 16 23:57:52 2010 -0400
+
+ More on parsing expressions.
+
+commit 4ec53e579cd14883b446563baaae5c9780cfe9f3
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Fri Apr 16 23:39:06 2010 -0400
+
+ Started implementing expression parser.
+
+commit 2f0868da5bc113bbeb9c9aceac7111d3aa85cb3e
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Fri Apr 16 00:17:05 2010 -0400
+
+ Call formula_interpreter's interpret() on each formula cell.
+
+ At this point the interpret() method is still just a skeleton.
+
+commit 46b99f92378d8e248c09b52ec71a9c19d1b3b68b
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Fri Apr 16 00:03:17 2010 -0400
+
+ Moved lexer token printing method into lexer_tokens.* files.
+
+commit 3d975ad0a132d5aa91d923b83819c300e600d173
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Thu Apr 15 23:55:21 2010 -0400
+
+ Remove const from base_cell* where I need to.
+
+ These pointers are later used to interpret cells. So they can't be
+ const.
+
+commit bb3711f3d1ccdfba65975989436a21b68e350c11
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Thu Apr 15 23:43:24 2010 -0400
+
+ renamed local vars to make their role clearer.
+
+commit d47fb58bff5d5d15d82b06ff6e79f62c6badda45
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Thu Apr 15 23:10:59 2010 -0400
+
+ Added skeleton files for formula_interpreter.
+
+commit 0754e12bd7be1cbfd2a1217504041e6573aea752
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Thu Apr 15 22:58:23 2010 -0400
+
+ print sorted cells once again.
+
+commit d18b9b6469f7e4f5eafecd9867dc0da5a4080231
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Thu Apr 15 22:50:47 2010 -0400
+
+ blank line
+
+commit 33e3a65ca34eeacce055f714fb87751b65255bd5
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Thu Apr 15 22:43:02 2010 -0400
+
+ Convert primitive and value tokens.
+
+commit 55031c5c3c4ad4e7b824aa3c5874eba93d33ffd1
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Thu Apr 15 22:01:27 2010 -0400
+
+ Add opcode token to use it for the primitive token types.
+
+commit b77d20fcf1ef721c018f69aed840e925c0da121c
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Thu Apr 15 01:07:48 2010 -0400
+
+ Finally print something in formula_parser::print_tokens().
+
+commit 2e27782663f08bc70f6fece40d5c543e75241cc0
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Thu Apr 15 00:29:12 2010 -0400
+
+ Call print_tokens() to print formula tokens.
+
+commit 16975b83de19cac311d32c6aeb14fec9cdde9e25
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Wed Apr 14 22:41:21 2010 -0400
+
+ renamed tokens.* to lexer_tokens.*
+
+commit e92af3953590c8d05a5caabf7213e5877a20b951
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Wed Apr 14 22:38:21 2010 -0400
+
+ renamed a bunch of lexer classes etc. to have them start with lexer_.
+
+commit 62e934a9f6a5af92d98eb256d59aaccb0d56fe1c
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Wed Apr 14 22:34:11 2010 -0400
+
+ Add print_tokens() skeleton.
+
+commit 0a165252649605094ea67d8d76f94b25b4f22b4e
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Wed Apr 14 22:26:29 2010 -0400
+
+ Commented out debug prints for the dependency tracker code.
+
+ I now need to focus on lexer to formula token conversion.
+
+commit c2341d90acc54b3b63d15a47901804d818a5fb04
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Wed Apr 14 22:18:34 2010 -0400
+
+ Use iterator for the for-loop, instead of array access.
+
+commit 8652b9132f34f99f8e4630bc78815e477bb5da9c
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Wed Apr 14 00:03:14 2010 -0400
+
+ have topo_sort_cells() return a vector of sorted cell ptrs.
+
+commit 5f58b17fb350b51785a9cc8b36644f621f10db10
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Tue Apr 13 23:25:48 2010 -0400
+
+ prettify printout of sorted cells.
+
+commit e48cd57caeb7bc87d5368f8f68f080ba1edfa3c1
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Tue Apr 13 23:21:29 2010 -0400
+
+ Make sure to process all cells, even the ones that are not formula cells.
+
+commit 1d5a2455297ffbce4ea8ea107b5d9a25cac17365
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Tue Apr 13 23:00:18 2010 -0400
+
+ Store topologically sorted cells.
+
+commit 2e90a3238cf05117017bb9b4161722047d592633
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Tue Apr 13 22:55:16 2010 -0400
+
+ a little code cleanup.
+
+commit b9b2471d6c23f4898d2a025f1ec6d37647e57601
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Tue Apr 13 22:52:27 2010 -0400
+
+ Add initialization to make the dfs repeatable.
+
+commit 27a63a53e672563c356c3eb36b8af787a212442f
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Tue Apr 13 22:42:26 2010 -0400
+
+ Moved depth_first_search into its own files.
+
+commit dc64a3f724526dd97c008f3fa87c89af435f2df0
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Tue Apr 13 21:25:40 2010 -0400
+
+ Move method definitions of depth_first_search out of its class declaration.
+
+commit c10fd81c51f868bddd45a15efff53cefb8d0ad9c
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Tue Apr 13 20:50:12 2010 -0400
+
+ Store own cell pointer in celldata struct too.
+
+commit 525a4a1e8e3d35845fdcc93858e1f397d3dcd7a3
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Tue Apr 13 20:29:10 2010 -0400
+
+ Use celldata struct to store metadata for each cell, instead of using separate vectors.
+
+commit 340422a9447be3e7ffc6d50d90efab277b2dd4a9
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Tue Apr 13 00:53:40 2010 -0400
+
+ Print the result of the depth-first search on all cells.
+
+commit 8cf32e5fee8bd149f08a4796cb27818a41cbcdc5
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Tue Apr 13 00:46:12 2010 -0400
+
+ Const-ness.
+
+commit d4aaac828a3b58c06ba1218645669563221e961c
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Tue Apr 13 00:42:24 2010 -0400
+
+ Better debug statements.
+
+commit 200dd5cff8bcea20cdee27c2c533078cab0135b3
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Tue Apr 13 00:32:44 2010 -0400
+
+ Print cell names instead of cell pointers for debugging.
+
+commit 078ee11347d135eb387fe8fb491ee88dc6a9e1e1
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Tue Apr 13 00:23:29 2010 -0400
+
+ Perform depth first search on all cells.
+
+commit 798c05ec658d294128548f16436d318932d0116b
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sat Apr 10 22:52:41 2010 -0400
+
+ Added another cell A6 to intentionally create two roots in the dependency tree.
+
+commit b34a2ae0982cdf19087aabdd861b6c22657f6166
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sat Apr 10 22:39:53 2010 -0400
+
+ More description for depends_tracker class.
+
+commit e46b07ee8c4ab2f29f8823f27b0e02aeebfff850
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Mon Mar 29 09:34:42 2010 -0400
+
+ Removed unused lines.
+
+commit af73f07ecb227524e3dbe0a1a548b64ea41b7304
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Mon Mar 29 09:27:35 2010 -0400
+
+ More exception safe depend cell insertion.
+
+commit cd16f680f7b76d427db09f07cce03c53719a0335
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Mon Mar 29 01:24:39 2010 -0400
+
+ Add javadoc comment
+
+commit 2961503f985e076b0925007bffd6967358089b27
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Mon Mar 29 01:22:26 2010 -0400
+
+ Generate dot graph script to show dependency graph.
+
+commit 6c23c82da9ce5fc62064cae002cedea4ec97860a
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sun Mar 28 22:25:17 2010 -0400
+
+ Pass cell dependency information to the dependency tracker.
+
+commit 037126cc3f1be165030a3d711acb04fa9379ee0f
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sun Mar 28 21:56:29 2010 -0400
+
+ Have formula parser pick up depende cells during parsing.
+
+commit c341290c6e0e9eb9b089613a4ae7ec89977c21ae
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sun Mar 28 20:08:04 2010 -0400
+
+ More on dependency tracker.
+
+commit 7c4c0912fac0ab5b5986c16bf48f3dc122605392
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sun Mar 28 16:22:08 2010 -0400
+
+ Renamed some files & fixed Makefile dependencies.
+
+commit 120fdf8f7ffa23c486c71e61b7cab11f96397a00
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sun Mar 28 16:16:57 2010 -0400
+
+ Updated javadoc.
+
+commit e952b6f4f3f0121f22882b387cafeb02c0551dd9
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sun Mar 28 16:10:59 2010 -0400
+
+ Make sure the formula parser no longer has tokens left.
+
+commit 83bee8490320fe47747694cce8c907c437a195ad
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sun Mar 28 15:54:34 2010 -0400
+
+ Transfer formula tokens from the parser to the formula cell.
+
+commit fea5addebf3191f3b9ef8926dc43e9c4ed18c4d8
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sat Mar 20 21:52:03 2010 -0400
+
+ Removed compiler warnings on enum switch statements.
+
+commit 18b3aa10288bbdb60801ca69f5677fb888c7dbc6
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sat Mar 20 17:33:30 2010 -0400
+
+ Initial work on formula parser. Pick up single cell references.
+
+commit e59dac8694f895d8025dd5db98b4a3326d401d82
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sat Mar 20 13:03:38 2010 -0400
+
+ Added swap_tokens method.
+
+commit a21d9e4b640d0b3a669d06a14a45074bc0e66dce
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sat Mar 20 12:07:00 2010 -0400
+
+ Removed in-line TODO.
+
+commit 5f83624e5c7c6cb42e386a0948cdaab6fe74c081
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sat Mar 20 12:03:58 2010 -0400
+
+ Check to ensure no duplicate cell names exist before creating formula_cell instances.
+
+commit 4cfe381c1162e377231bdac3051ff20e4b2390e1
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sat Mar 20 11:35:26 2010 -0400
+
+ Pass the cell name map instance to formula_parser instances.
+
+commit 2610b9cfc7a3069d43515da21953e058f19da278
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sat Mar 20 11:29:23 2010 -0400
+
+ The name to pointer map needs to store base_cell pointers.
+
+commit 4f17b83cd43053617e2cdee2f1ef7204aeb0a658
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sat Mar 20 11:18:30 2010 -0400
+
+ Create a set of empty formula cell instances associated with their names.
+
+ We need to have the pointers to formula cells instances before converting
+ the lexer tokens to formula tokens, in order to resolve cell references
+ correctly.
+
+commit d3908e1740418980411597e3f355f00fb71b28d0
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Thu Mar 18 19:39:26 2010 -0400
+
+ More on dependency tracker.
+
+commit 9bdb58654b887593be916b442649a6fbbf1dfeda
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Thu Mar 18 18:44:06 2010 -0400
+
+ Skeleton files for class dep_tracker that tracks cell dependencies.
+
+commit 8529be3e9d9296778e95280154618087c74aeb92
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Thu Mar 18 18:32:51 2010 -0400
+
+ More on formula parser.
+
+commit 827a6f908f861f5f04d6719e34f1b6464ad96f9d
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Thu Mar 18 18:20:30 2010 -0400
+
+ renamed tokens_foo to lexer_tokens_foo.
+
+commit ce6fecb90f022166793a8f9e6285c1bc46067e6f
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Thu Mar 18 18:04:32 2010 -0400
+
+ added new files for formula tokens.
+
+ Formula tokens differ from lexer tokens, therefore should use different
+ types to represent them.
+
+commit 73912c5fd3d5472ac832ccd81c2bbeab2179bd85
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Thu Mar 18 17:24:51 2010 -0400
+
+ model_parser should use model_parser::cell class to record cell tokens.
+
+commit c31d0d7da3f730c3dd5fedff64905f83f9806d97
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Thu Mar 18 17:03:19 2010 -0400
+
+ changed oc_foo to op_foo in opcode names.
+
+commit 81a4d3651f60c50bf30f379b290cfaddd6b4bc9a
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Thu Mar 18 16:49:40 2010 -0400
+
+ Moved code around a bit.
+
+commit b4827e8c2ba495be03016e65ca7902951bd880c7
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Thu Mar 18 16:41:40 2010 -0400
+
+ Forgot to add virtual keyword to print().
+
+commit ac105dc506ba643f861f2f2fc19b16cc5aefc783
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Thu Mar 18 15:41:06 2010 -0400
+
+ Added skeletons for the new formula parser class.
+
+commit b4c7eaa177203502e0013c262ac80b5e5602c41d
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Thu Mar 18 10:38:40 2010 -0400
+
+ A little cleanup by removing duplicated code block.
+
+commit bc05f8a4d040f9c50269c91210dc008ce2986961
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Thu Mar 18 10:22:53 2010 -0400
+
+ Handle command line arguments correctly, without throwing exceptions.
+
+commit 3ae18e277702bdaf75a9ea67e8527175badfafed
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Mon Mar 15 00:32:33 2010 -0400
+
+ Added license header to Makefile.
+
+commit 9747930f5c57ccc09fef3fc0e9e19d07b4981499
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sun Mar 14 23:58:12 2010 -0400
+
+ print cell names
+
+commit 2a1455bd1f81d0542fdf762137da87d75fa5f858
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sun Mar 14 23:56:10 2010 -0400
+
+ Introduced base_cell.
+
+commit 1d6560708e08755613f5f9f43cbcaa551a2cd060
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sun Mar 14 23:43:30 2010 -0400
+
+ model_parser now stores list of formula cells.
+
+commit b1c9294ea3dc8ba7342dd95880c5c24eb4f3474c
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sun Mar 14 23:24:29 2010 -0400
+
+ Use token class for generic opcode only tokens, and make token_base an abstract class.
+
+commit eada2f7020fdf086ea6576cc26999ae51706df7b
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sun Mar 14 20:53:24 2010 -0400
+
+ Handle parentheses.
+
+commit 479287b320918aae52f1849d0c48a2ea95e85bcd
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sun Mar 14 20:36:31 2010 -0400
+
+ Renamed a model input file.
+
+commit a4e37526b1a614b24a205972f3fa47f48835446a
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sun Mar 14 20:45:15 2010 -0400
+
+ More detailed token printing.
+
+commit aedaaf8302a83d952880cc929a38b486442f162d
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sun Mar 14 20:32:30 2010 -0400
+
+ Handle string tokens.
+
+commit 4214155a129eb1195b46c842747db47add80b7c6
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sun Mar 14 17:09:31 2010 -0400
+
+ More on tokenization.
+
+commit 240823c47586a3513036da8b950391331f4e76a1
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sun Mar 14 16:41:14 2010 -0400
+
+ Pick up numerals as value tokens.
+
+commit 50617f3be0c29d879ec0168e184dfd4d98d095fd
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sun Mar 14 14:46:00 2010 -0400
+
+ Track current characters as a data member.
+
+commit f48e32f5eef8faed562d28a11b81f3c34a80aebd
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sun Mar 14 14:04:10 2010 -0400
+
+ Main loop for tokenizer.
+
+commit 0e09385326b920b3da297bbffba8d6f55b70f676
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sun Mar 14 13:28:49 2010 -0400
+
+ Tokenize formula strings when parsing input.
+
+commit 5009653217a5586662c93c7d915c97a98acbb997
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sun Mar 14 11:46:14 2010 -0400
+
+ Swap tokens from lexer to cell.
+
+commit 0a7eee14e61ed8468257f6108c014687e6e94b6b
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sun Mar 14 11:39:38 2010 -0400
+
+ Added source files for global symbols.
+
+commit 4b7108df599a2feb826ce0468b3a258229f36369
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sun Mar 14 10:49:52 2010 -0400
+
+ renamed cell to string_cell.
+
+commit 26a2a75b30e65a47699ad8a536fa6bd4a8b521a0
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sun Mar 14 10:35:54 2010 -0400
+
+ added formula lexer source files.
+
+commit f4d738d483b172e3a03993ca6a4e862b169ba8d0
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sun Mar 14 01:23:32 2010 -0500
+
+ More on model input parsing.
+
+commit 60a1ef0a5998d7722b740d69d2969ad58ced3a10
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sun Mar 14 01:14:27 2010 -0500
+
+ Fixed parse error on model input parsing.
+
+commit 98eb994de4f13a1068ee15a2ff34afbcda24dff7
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sun Mar 14 00:41:48 2010 -0500
+
+ More on model parsing.
+
+commit be5548f6619b8dd4e102b90d4544eaa661fb9b62
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sat Mar 13 23:45:41 2010 -0500
+
+ Added skeletons for cell and tokens_base.
+
+commit bd2360650d33c1bbd55e1b14204aaa79d28acf15
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sat Mar 13 22:54:01 2010 -0500
+
+ Added model parser main loop.
+
+commit 97b321aff45659923e41cedb4d30414a121c4a58
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sat Mar 13 22:04:37 2010 -0500
+
+ More on model parser. Added simple test input file.
+
+commit 126d859dba6e59d5b664966dec8718fc15e2a7e5
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sat Mar 13 21:17:08 2010 -0500
+
+ Added main.cpp.
+
+commit 05b7c69fcc5c824cb2d6e8e5adbbb269823b66e0
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sat Mar 13 20:44:46 2010 -0500
+
+ Initial skeleton for model input parser executable.
+
+commit 43747fea3ca218d60d69d03dec75ead225e70bea
+Author: Kohei Yoshida <kyoshida@novell.com>
+Date: Sat Mar 13 20:20:44 2010 -0500
+
+ Added README.
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..a612ad9
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,373 @@
+Mozilla Public License Version 2.0
+==================================
+
+1. Definitions
+--------------
+
+1.1. "Contributor"
+ means each individual or legal entity that creates, contributes to
+ the creation of, or owns Covered Software.
+
+1.2. "Contributor Version"
+ means the combination of the Contributions of others (if any) used
+ by a Contributor and that particular Contributor's Contribution.
+
+1.3. "Contribution"
+ means Covered Software of a particular Contributor.
+
+1.4. "Covered Software"
+ means Source Code Form to which the initial Contributor has attached
+ the notice in Exhibit A, the Executable Form of such Source Code
+ Form, and Modifications of such Source Code Form, in each case
+ including portions thereof.
+
+1.5. "Incompatible With Secondary Licenses"
+ means
+
+ (a) that the initial Contributor has attached the notice described
+ in Exhibit B to the Covered Software; or
+
+ (b) that the Covered Software was made available under the terms of
+ version 1.1 or earlier of the License, but not also under the
+ terms of a Secondary License.
+
+1.6. "Executable Form"
+ means any form of the work other than Source Code Form.
+
+1.7. "Larger Work"
+ means a work that combines Covered Software with other material, in
+ a separate file or files, that is not Covered Software.
+
+1.8. "License"
+ means this document.
+
+1.9. "Licensable"
+ means having the right to grant, to the maximum extent possible,
+ whether at the time of the initial grant or subsequently, any and
+ all of the rights conveyed by this License.
+
+1.10. "Modifications"
+ means any of the following:
+
+ (a) any file in Source Code Form that results from an addition to,
+ deletion from, or modification of the contents of Covered
+ Software; or
+
+ (b) any new file in Source Code Form that contains any Covered
+ Software.
+
+1.11. "Patent Claims" of a Contributor
+ means any patent claim(s), including without limitation, method,
+ process, and apparatus claims, in any patent Licensable by such
+ Contributor that would be infringed, but for the grant of the
+ License, by the making, using, selling, offering for sale, having
+ made, import, or transfer of either its Contributions or its
+ Contributor Version.
+
+1.12. "Secondary License"
+ means either the GNU General Public License, Version 2.0, the GNU
+ Lesser General Public License, Version 2.1, the GNU Affero General
+ Public License, Version 3.0, or any later versions of those
+ licenses.
+
+1.13. "Source Code Form"
+ means the form of the work preferred for making modifications.
+
+1.14. "You" (or "Your")
+ means an individual or a legal entity exercising rights under this
+ License. For legal entities, "You" includes any entity that
+ controls, is controlled by, or is under common control with You. For
+ purposes of this definition, "control" means (a) the power, direct
+ or indirect, to cause the direction or management of such entity,
+ whether by contract or otherwise, or (b) ownership of more than
+ fifty percent (50%) of the outstanding shares or beneficial
+ ownership of such entity.
+
+2. License Grants and Conditions
+--------------------------------
+
+2.1. Grants
+
+Each Contributor hereby grants You a world-wide, royalty-free,
+non-exclusive license:
+
+(a) under intellectual property rights (other than patent or trademark)
+ Licensable by such Contributor to use, reproduce, make available,
+ modify, display, perform, distribute, and otherwise exploit its
+ Contributions, either on an unmodified basis, with Modifications, or
+ as part of a Larger Work; and
+
+(b) under Patent Claims of such Contributor to make, use, sell, offer
+ for sale, have made, import, and otherwise transfer either its
+ Contributions or its Contributor Version.
+
+2.2. Effective Date
+
+The licenses granted in Section 2.1 with respect to any Contribution
+become effective for each Contribution on the date the Contributor first
+distributes such Contribution.
+
+2.3. Limitations on Grant Scope
+
+The licenses granted in this Section 2 are the only rights granted under
+this License. No additional rights or licenses will be implied from the
+distribution or licensing of Covered Software under this License.
+Notwithstanding Section 2.1(b) above, no patent license is granted by a
+Contributor:
+
+(a) for any code that a Contributor has removed from Covered Software;
+ or
+
+(b) for infringements caused by: (i) Your and any other third party's
+ modifications of Covered Software, or (ii) the combination of its
+ Contributions with other software (except as part of its Contributor
+ Version); or
+
+(c) under Patent Claims infringed by Covered Software in the absence of
+ its Contributions.
+
+This License does not grant any rights in the trademarks, service marks,
+or logos of any Contributor (except as may be necessary to comply with
+the notice requirements in Section 3.4).
+
+2.4. Subsequent Licenses
+
+No Contributor makes additional grants as a result of Your choice to
+distribute the Covered Software under a subsequent version of this
+License (see Section 10.2) or under the terms of a Secondary License (if
+permitted under the terms of Section 3.3).
+
+2.5. Representation
+
+Each Contributor represents that the Contributor believes its
+Contributions are its original creation(s) or it has sufficient rights
+to grant the rights to its Contributions conveyed by this License.
+
+2.6. Fair Use
+
+This License is not intended to limit any rights You have under
+applicable copyright doctrines of fair use, fair dealing, or other
+equivalents.
+
+2.7. Conditions
+
+Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted
+in Section 2.1.
+
+3. Responsibilities
+-------------------
+
+3.1. Distribution of Source Form
+
+All distribution of Covered Software in Source Code Form, including any
+Modifications that You create or to which You contribute, must be under
+the terms of this License. You must inform recipients that the Source
+Code Form of the Covered Software is governed by the terms of this
+License, and how they can obtain a copy of this License. You may not
+attempt to alter or restrict the recipients' rights in the Source Code
+Form.
+
+3.2. Distribution of Executable Form
+
+If You distribute Covered Software in Executable Form then:
+
+(a) such Covered Software must also be made available in Source Code
+ Form, as described in Section 3.1, and You must inform recipients of
+ the Executable Form how they can obtain a copy of such Source Code
+ Form by reasonable means in a timely manner, at a charge no more
+ than the cost of distribution to the recipient; and
+
+(b) You may distribute such Executable Form under the terms of this
+ License, or sublicense it under different terms, provided that the
+ license for the Executable Form does not attempt to limit or alter
+ the recipients' rights in the Source Code Form under this License.
+
+3.3. Distribution of a Larger Work
+
+You may create and distribute a Larger Work under terms of Your choice,
+provided that You also comply with the requirements of this License for
+the Covered Software. If the Larger Work is a combination of Covered
+Software with a work governed by one or more Secondary Licenses, and the
+Covered Software is not Incompatible With Secondary Licenses, this
+License permits You to additionally distribute such Covered Software
+under the terms of such Secondary License(s), so that the recipient of
+the Larger Work may, at their option, further distribute the Covered
+Software under the terms of either this License or such Secondary
+License(s).
+
+3.4. Notices
+
+You may not remove or alter the substance of any license notices
+(including copyright notices, patent notices, disclaimers of warranty,
+or limitations of liability) contained within the Source Code Form of
+the Covered Software, except that You may alter any license notices to
+the extent required to remedy known factual inaccuracies.
+
+3.5. Application of Additional Terms
+
+You may choose to offer, and to charge a fee for, warranty, support,
+indemnity or liability obligations to one or more recipients of Covered
+Software. However, You may do so only on Your own behalf, and not on
+behalf of any Contributor. You must make it absolutely clear that any
+such warranty, support, indemnity, or liability obligation is offered by
+You alone, and You hereby agree to indemnify every Contributor for any
+liability incurred by such Contributor as a result of warranty, support,
+indemnity or liability terms You offer. You may include additional
+disclaimers of warranty and limitations of liability specific to any
+jurisdiction.
+
+4. Inability to Comply Due to Statute or Regulation
+---------------------------------------------------
+
+If it is impossible for You to comply with any of the terms of this
+License with respect to some or all of the Covered Software due to
+statute, judicial order, or regulation then You must: (a) comply with
+the terms of this License to the maximum extent possible; and (b)
+describe the limitations and the code they affect. Such description must
+be placed in a text file included with all distributions of the Covered
+Software under this License. Except to the extent prohibited by statute
+or regulation, such description must be sufficiently detailed for a
+recipient of ordinary skill to be able to understand it.
+
+5. Termination
+--------------
+
+5.1. The rights granted under this License will terminate automatically
+if You fail to comply with any of its terms. However, if You become
+compliant, then the rights granted under this License from a particular
+Contributor are reinstated (a) provisionally, unless and until such
+Contributor explicitly and finally terminates Your grants, and (b) on an
+ongoing basis, if such Contributor fails to notify You of the
+non-compliance by some reasonable means prior to 60 days after You have
+come back into compliance. Moreover, Your grants from a particular
+Contributor are reinstated on an ongoing basis if such Contributor
+notifies You of the non-compliance by some reasonable means, this is the
+first time You have received notice of non-compliance with this License
+from such Contributor, and You become compliant prior to 30 days after
+Your receipt of the notice.
+
+5.2. If You initiate litigation against any entity by asserting a patent
+infringement claim (excluding declaratory judgment actions,
+counter-claims, and cross-claims) alleging that a Contributor Version
+directly or indirectly infringes any patent, then the rights granted to
+You by any and all Contributors for the Covered Software under Section
+2.1 of this License shall terminate.
+
+5.3. In the event of termination under Sections 5.1 or 5.2 above, all
+end user license agreements (excluding distributors and resellers) which
+have been validly granted by You or Your distributors under this License
+prior to termination shall survive termination.
+
+************************************************************************
+* *
+* 6. Disclaimer of Warranty *
+* ------------------------- *
+* *
+* Covered Software is provided under this License on an "as is" *
+* basis, without warranty of any kind, either expressed, implied, or *
+* statutory, including, without limitation, warranties that the *
+* Covered Software is free of defects, merchantable, fit for a *
+* particular purpose or non-infringing. The entire risk as to the *
+* quality and performance of the Covered Software is with You. *
+* Should any Covered Software prove defective in any respect, You *
+* (not any Contributor) assume the cost of any necessary servicing, *
+* repair, or correction. This disclaimer of warranty constitutes an *
+* essential part of this License. No use of any Covered Software is *
+* authorized under this License except under this disclaimer. *
+* *
+************************************************************************
+
+************************************************************************
+* *
+* 7. Limitation of Liability *
+* -------------------------- *
+* *
+* Under no circumstances and under no legal theory, whether tort *
+* (including negligence), contract, or otherwise, shall any *
+* Contributor, or anyone who distributes Covered Software as *
+* permitted above, be liable to You for any direct, indirect, *
+* special, incidental, or consequential damages of any character *
+* including, without limitation, damages for lost profits, loss of *
+* goodwill, work stoppage, computer failure or malfunction, or any *
+* and all other commercial damages or losses, even if such party *
+* shall have been informed of the possibility of such damages. This *
+* limitation of liability shall not apply to liability for death or *
+* personal injury resulting from such party's negligence to the *
+* extent applicable law prohibits such limitation. Some *
+* jurisdictions do not allow the exclusion or limitation of *
+* incidental or consequential damages, so this exclusion and *
+* limitation may not apply to You. *
+* *
+************************************************************************
+
+8. Litigation
+-------------
+
+Any litigation relating to this License may be brought only in the
+courts of a jurisdiction where the defendant maintains its principal
+place of business and such litigation shall be governed by laws of that
+jurisdiction, without reference to its conflict-of-law provisions.
+Nothing in this Section shall prevent a party's ability to bring
+cross-claims or counter-claims.
+
+9. Miscellaneous
+----------------
+
+This License represents the complete agreement concerning the subject
+matter hereof. If any provision of this License is held to be
+unenforceable, such provision shall be reformed only to the extent
+necessary to make it enforceable. Any law or regulation which provides
+that the language of a contract shall be construed against the drafter
+shall not be used to construe this License against a Contributor.
+
+10. Versions of the License
+---------------------------
+
+10.1. New Versions
+
+Mozilla Foundation is the license steward. Except as provided in Section
+10.3, no one other than the license steward has the right to modify or
+publish new versions of this License. Each version will be given a
+distinguishing version number.
+
+10.2. Effect of New Versions
+
+You may distribute the Covered Software under the terms of the version
+of the License under which You originally received the Covered Software,
+or under the terms of any subsequent version published by the license
+steward.
+
+10.3. Modified Versions
+
+If you create software not governed by this License, and you want to
+create a new license for such software, you may create and use a
+modified version of this License if you rename the license and remove
+any references to the name of the license steward (except to note that
+such modified license differs from this License).
+
+10.4. Distributing Source Code Form that is Incompatible With Secondary
+Licenses
+
+If You choose to distribute Source Code Form that is Incompatible With
+Secondary Licenses under the terms of this version of the License, the
+notice described in Exhibit B of this License must be attached.
+
+Exhibit A - Source Code Form License Notice
+-------------------------------------------
+
+ This Source Code Form is subject to the terms of the Mozilla Public
+ License, v. 2.0. If a copy of the MPL was not distributed with this
+ file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+If it is not possible or desirable to put the notice in a particular
+file, then You may include the notice in a location (such as a LICENSE
+file in a relevant directory) where a recipient would be likely to look
+for such a notice.
+
+You may add additional accurate notices of copyright ownership.
+
+Exhibit B - "Incompatible With Secondary Licenses" Notice
+---------------------------------------------------------
+
+ This Source Code Form is "Incompatible With Secondary Licenses", as
+ defined by the Mozilla Public License, v. 2.0.
diff --git a/Makefile.am b/Makefile.am
new file mode 100644
index 0000000..ff0a0e2
--- /dev/null
+++ b/Makefile.am
@@ -0,0 +1,185 @@
+SUBDIRS = src include doc_example
+ACLOCAL_AMFLAGS = -I m4
+
+pcfiles = libixion-@IXION_API_VERSION@.pc
+
+pkgconfig_DATA = $(pcfiles)
+pkgconfigdir = $(libdir)/pkgconfig
+
+bin_data = \
+ bin/gen-gfm-release-table.sh \
+ bin/gen-spirv-shader-arrays.py \
+ bin/run-python-test-osx.sh \
+ bin/run-python.sh
+
+test_data = \
+ test/00-command-exit.txt \
+ test/01-concat-operator.txt \
+ test/01-exponent-operator.txt \
+ test/01-inline-array-div.txt \
+ test/01-inline-array-exp.txt \
+ test/01-inline-array-mul.txt \
+ test/01-inline-array-op-lhs.txt \
+ test/01-inline-array-op-rhs.txt \
+ test/01-inline-array-string-concat.txt \
+ test/01-inline-array.txt \
+ test/01-ranged-definitions-dups.txt \
+ test/01-simple-arithmetic.txt \
+ test/02-circular-01.txt \
+ test/02-circular-02.txt \
+ test/03-expression.txt \
+ test/03-leading-signs.txt \
+ test/04-function-abs.txt \
+ test/04-function-and-boolean.txt \
+ test/04-function-and.txt \
+ test/04-function-average.txt \
+ test/04-function-column-row.txt \
+ test/04-function-columns-rows.txt \
+ test/04-function-concatenate.txt \
+ test/04-function-count-formula.txt \
+ test/04-function-count.txt \
+ test/04-function-counta-edit.txt \
+ test/04-function-counta-static-args.txt \
+ test/04-function-countblank.txt \
+ test/04-function-exact.txt \
+ test/04-function-find.txt \
+ test/04-function-invalid-name.txt \
+ test/04-function-isblank.txt \
+ test/04-function-iserror.txt \
+ test/04-function-iseven.txt \
+ test/04-function-isformula.txt \
+ test/04-function-islogical.txt \
+ test/04-function-isna.txt \
+ test/04-function-isnumber.txt \
+ test/04-function-isref.txt \
+ test/04-function-istext.txt \
+ test/04-function-left-utf8.txt \
+ test/04-function-left.txt \
+ test/04-function-len.txt \
+ test/04-function-logical.txt \
+ test/04-function-median.txt \
+ test/04-function-mid-utf8.txt \
+ test/04-function-mid.txt \
+ test/04-function-mmult-inline.txt \
+ test/04-function-mmult.txt \
+ test/04-function-mode.txt \
+ test/04-function-n.txt \
+ test/04-function-nested.txt \
+ test/04-function-or.txt \
+ test/04-function-pi-int.txt \
+ test/04-function-replace.txt \
+ test/04-function-rept.txt \
+ test/04-function-right-utf8.txt \
+ test/04-function-right.txt \
+ test/04-function-sheet.txt \
+ test/04-function-sheets.txt \
+ test/04-function-single.txt \
+ test/04-function-substitute.txt \
+ test/04-function-t.txt \
+ test/04-function-textjoin.txt \
+ test/04-function-trim.txt \
+ test/04-function-true-false.txt \
+ test/04-function-type.txt \
+ test/05-range-reference.txt \
+ test/06-range-reference-basic-01.txt \
+ test/06-range-reference-basic-02.txt \
+ test/06-range-reference-circular-01.txt \
+ test/06-range-reference-unordered.txt \
+ test/06-range-reference-whole-column.txt \
+ test/06-range-reference-whole-row.txt \
+ test/07-fraction-numbers.txt \
+ test/08-boolean-cells.txt \
+ test/08-numeric-cells.txt \
+ test/09-string-cells.txt \
+ test/10-shared-formulas-01.txt \
+ test/11-reference-to-numeric-cell-01.txt \
+ test/12-inline-string-01.txt \
+ test/13-relational-operators-01.txt \
+ test/13-relational-operators-02.txt \
+ test/13-relational-operators-03.txt \
+ test/20-table-reference-01.txt \
+ test/21-named-exp-workbook-01.txt \
+ test/21-named-exp-worksheet-01.txt \
+ test/22-formulas-with-cached-results.txt \
+ test/22-grouped-formulas-with-cached-results.txt \
+ test/parser-test-func.sh \
+ test/parser-test-t0.sh \
+ test/parser-test-t1.sh \
+ test/parser-test-t2.sh \
+ test/parser-test-t3.sh \
+ test/parser-test-t4.sh \
+ test/parser-test-t5.sh \
+ test/parser-test-t6.sh \
+ test/parser-test-t7.sh \
+ test/parser-test-t8.sh \
+ test/python/document.py \
+ test/python/module.py \
+ test/thread/function-parallel.txt \
+ test/thread/function-wait-simple.txt
+
+doc_data = \
+ doc/conf.py \
+ doc/cpp/data_store/cell_access.rst \
+ doc/cpp/data_store/dirty_cell_tracker.rst \
+ doc/cpp/data_store/document.rst \
+ doc/cpp/data_store/index.rst \
+ doc/cpp/data_store/model_context.rst \
+ doc/cpp/data_store/types.rst \
+ doc/cpp/formula/formula_cell.rst \
+ doc/cpp/formula/formula_engine.rst \
+ doc/cpp/formula/formula_name_resolver.rst \
+ doc/cpp/formula/formula_tokens.rst \
+ doc/cpp/formula/index.rst \
+ doc/cpp/formula/types.rst \
+ doc/cpp/index.rst \
+ doc/cpp/interface/index.rst \
+ doc/cpp/quickstart/index.rst \
+ doc/cpp/quickstart/using_document.rst \
+ doc/cpp/quickstart/using_model_context.rst \
+ doc/doxygen.conf \
+ doc/environment.yml \
+ doc/index.rst \
+ doc/overview/index.rst \
+ doc/python/document.rst \
+ doc/python/index.rst \
+ doc/python/quickstart.rst \
+ doc/python/sheet.rst \
+ doc/requirements.txt
+
+EXTRA_DIST = \
+ LICENSE \
+ libixion.pc.in \
+ autogen.sh \
+ $(bin_data) \
+ $(test_data) \
+ $(doc_data)
+
+.PHONY: distclean-local dist-hook doc-doxygen doc-sphinx doc
+
+distclean-local:
+ rm -rf *.pc
+
+dist-hook:
+ @if test -d "$(srcdir)/.git"; \
+ then \
+ echo Creating ChangeLog && \
+ ( cd "$(top_srcdir)" && \
+ echo '# Generated by Makefile. Do not edit.'; echo; \
+ $(top_srcdir)/missing --run git log --pretty=medium ) > ChangeLog.tmp \
+ && mv -f ChangeLog.tmp $(top_distdir)/ChangeLog \
+ || ( rm -f ChangeLog.tmp ; \
+ echo Failed to generate ChangeLog >&2 ); \
+ else \
+ echo A git clone is required to generate a ChangeLog >&2; \
+ fi
+
+doc-doxygen:
+ @echo "Building documentation by doxygen..."
+ @cd doc && doxygen doxygen.conf
+
+doc-sphinx:
+ @echo "Building documentation by sphinx..."
+ @sphinx-build -b html ./doc/ ./doc/_build
+
+doc: doc-doxygen doc-sphinx
+
diff --git a/Makefile.in b/Makefile.in
new file mode 100644
index 0000000..0b9117c
--- /dev/null
+++ b/Makefile.in
@@ -0,0 +1,1110 @@
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
+
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+VPATH = @srcdir@
+am__is_gnu_make = { \
+ if test -z '$(MAKELEVEL)'; then \
+ false; \
+ elif test -n '$(MAKE_HOST)'; then \
+ true; \
+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+ true; \
+ else \
+ false; \
+ fi; \
+}
+am__make_running_with_option = \
+ case $${target_option-} in \
+ ?) ;; \
+ *) echo "am__make_running_with_option: internal error: invalid" \
+ "target option '$${target_option-}' specified" >&2; \
+ exit 1;; \
+ esac; \
+ has_opt=no; \
+ sane_makeflags=$$MAKEFLAGS; \
+ if $(am__is_gnu_make); then \
+ sane_makeflags=$$MFLAGS; \
+ else \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ bs=\\; \
+ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
+ esac; \
+ fi; \
+ skip_next=no; \
+ strip_trailopt () \
+ { \
+ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+ }; \
+ for flg in $$sane_makeflags; do \
+ test $$skip_next = yes && { skip_next=no; continue; }; \
+ case $$flg in \
+ *=*|--*) continue;; \
+ -*I) strip_trailopt 'I'; skip_next=yes;; \
+ -*I?*) strip_trailopt 'I';; \
+ -*O) strip_trailopt 'O'; skip_next=yes;; \
+ -*O?*) strip_trailopt 'O';; \
+ -*l) strip_trailopt 'l'; skip_next=yes;; \
+ -*l?*) strip_trailopt 'l';; \
+ -[dEDm]) skip_next=yes;; \
+ -[JT]) skip_next=yes;; \
+ esac; \
+ case $$flg in \
+ *$$target_option*) has_opt=yes; break;; \
+ esac; \
+ done; \
+ test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = .
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/ax_cxx_compile_stdcxx.m4 \
+ $(top_srcdir)/m4/ax_cxx_compile_stdcxx_17.m4 \
+ $(top_srcdir)/m4/boost.m4 $(top_srcdir)/m4/libtool.m4 \
+ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
+ $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \
+ $(am__configure_deps) $(am__DIST_COMMON)
+am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
+ configure.lineno config.status.lineno
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = config.h
+CONFIG_CLEAN_FILES = bin/env.sh misc/libixion.spec
+CONFIG_CLEAN_VPATH_FILES =
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo " GEN " $@;
+am__v_GEN_1 =
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 =
+SOURCES =
+DIST_SOURCES =
+RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
+ ctags-recursive dvi-recursive html-recursive info-recursive \
+ install-data-recursive install-dvi-recursive \
+ install-exec-recursive install-html-recursive \
+ install-info-recursive install-pdf-recursive \
+ install-ps-recursive install-recursive installcheck-recursive \
+ installdirs-recursive pdf-recursive ps-recursive \
+ tags-recursive uninstall-recursive
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+ if (++n[$$2] == $(am__install_max)) \
+ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+ END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+ test -z "$$files" \
+ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+ $(am__cd) "$$dir" && rm -f $$files; }; \
+ }
+am__installdirs = "$(DESTDIR)$(pkgconfigdir)"
+DATA = $(pkgconfig_DATA)
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
+ distclean-recursive maintainer-clean-recursive
+am__recursive_targets = \
+ $(RECURSIVE_TARGETS) \
+ $(RECURSIVE_CLEAN_TARGETS) \
+ $(am__extra_recursive_targets)
+AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
+ cscope distdir distdir-am dist dist-all distcheck
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) \
+ config.h.in
+# Read a list of newline-separated strings from the standard input,
+# and print each of them once, without duplicates. Input order is
+# *not* preserved.
+am__uniquify_input = $(AWK) '\
+ BEGIN { nonempty = 0; } \
+ { items[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in items) print i; }; } \
+'
+# Make sure the list of sources is unique. This is necessary because,
+# e.g., the same source file might be shared among _SOURCES variables
+# for different programs/libraries.
+am__define_uniq_tagged_files = \
+ list='$(am__tagged_files)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | $(am__uniquify_input)`
+DIST_SUBDIRS = $(SUBDIRS)
+am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/config.h.in \
+ $(srcdir)/libixion.pc.in $(top_srcdir)/bin/env.sh.in \
+ $(top_srcdir)/misc/libixion.spec.in AUTHORS ChangeLog \
+ README.md compile config.guess config.sub depcomp install-sh \
+ ltmain.sh missing
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+distdir = $(PACKAGE)-$(VERSION)
+top_distdir = $(distdir)
+am__remove_distdir = \
+ if test -d "$(distdir)"; then \
+ find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
+ && rm -rf "$(distdir)" \
+ || { sleep 5 && rm -rf "$(distdir)"; }; \
+ else :; fi
+am__post_remove_distdir = $(am__remove_distdir)
+am__relativize = \
+ dir0=`pwd`; \
+ sed_first='s,^\([^/]*\)/.*$$,\1,'; \
+ sed_rest='s,^[^/]*/*,,'; \
+ sed_last='s,^.*/\([^/]*\)$$,\1,'; \
+ sed_butlast='s,/*[^/]*$$,,'; \
+ while test -n "$$dir1"; do \
+ first=`echo "$$dir1" | sed -e "$$sed_first"`; \
+ if test "$$first" != "."; then \
+ if test "$$first" = ".."; then \
+ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
+ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
+ else \
+ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
+ if test "$$first2" = "$$first"; then \
+ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
+ else \
+ dir2="../$$dir2"; \
+ fi; \
+ dir0="$$dir0"/"$$first"; \
+ fi; \
+ fi; \
+ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
+ done; \
+ reldir="$$dir2"
+DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.bz2 $(distdir).tar.xz
+GZIP_ENV = --best
+DIST_TARGETS = dist-xz dist-bzip2 dist-gzip
+# Exists only to be overridden by the user if desired.
+AM_DISTCHECK_DVI_TARGET = dvi
+distuninstallcheck_listfiles = find . -type f -print
+am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \
+ | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$'
+distcleancheck_listfiles = find . -type f -print
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AS = @AS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+BOOST_CPPFLAGS = @BOOST_CPPFLAGS@
+BOOST_FILESYSTEM_LDFLAGS = @BOOST_FILESYSTEM_LDFLAGS@
+BOOST_FILESYSTEM_LDPATH = @BOOST_FILESYSTEM_LDPATH@
+BOOST_FILESYSTEM_LIBS = @BOOST_FILESYSTEM_LIBS@
+BOOST_LDPATH = @BOOST_LDPATH@
+BOOST_PROGRAM_OPTIONS_LDFLAGS = @BOOST_PROGRAM_OPTIONS_LDFLAGS@
+BOOST_PROGRAM_OPTIONS_LDPATH = @BOOST_PROGRAM_OPTIONS_LDPATH@
+BOOST_PROGRAM_OPTIONS_LIBS = @BOOST_PROGRAM_OPTIONS_LIBS@
+BOOST_ROOT = @BOOST_ROOT@
+BOOST_SYSTEM_LDFLAGS = @BOOST_SYSTEM_LDFLAGS@
+BOOST_SYSTEM_LDPATH = @BOOST_SYSTEM_LDPATH@
+BOOST_SYSTEM_LIBS = @BOOST_SYSTEM_LIBS@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPPFLAGS = @CPPFLAGS@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DISTCHECK_CONFIGURE_FLAGS = @DISTCHECK_CONFIGURE_FLAGS@
+DLLTOOL = @DLLTOOL@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+ETAGS = @ETAGS@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+GREP = @GREP@
+HAVE_CXX17 = @HAVE_CXX17@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+IXION_API_VERSION = @IXION_API_VERSION@
+IXION_MAJOR_API_VERSION = @IXION_MAJOR_API_VERSION@
+IXION_MAJOR_VERSION = @IXION_MAJOR_VERSION@
+IXION_MICRO_VERSION = @IXION_MICRO_VERSION@
+IXION_MINOR_API_VERSION = @IXION_MINOR_API_VERSION@
+IXION_MINOR_VERSION = @IXION_MINOR_VERSION@
+IXION_VERSION = @IXION_VERSION@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
+MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MDDS_CFLAGS = @MDDS_CFLAGS@
+MDDS_LIBS = @MDDS_LIBS@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
+POW_LIB = @POW_LIB@
+PYTHON = @PYTHON@
+PYTHON_CFLAGS = @PYTHON_CFLAGS@
+PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
+PYTHON_LIBS = @PYTHON_LIBS@
+PYTHON_PLATFORM = @PYTHON_PLATFORM@
+PYTHON_PREFIX = @PYTHON_PREFIX@
+PYTHON_VERSION = @PYTHON_VERSION@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+VULKAN_CFLAGS = @VULKAN_CFLAGS@
+VULKAN_LIBS = @VULKAN_LIBS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+pkgpyexecdir = @pkgpyexecdir@
+pkgpythondir = @pkgpythondir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+pyexecdir = @pyexecdir@
+pythondir = @pythondir@
+runstatedir = @runstatedir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+SUBDIRS = src include doc_example
+ACLOCAL_AMFLAGS = -I m4
+pcfiles = libixion-@IXION_API_VERSION@.pc
+pkgconfig_DATA = $(pcfiles)
+pkgconfigdir = $(libdir)/pkgconfig
+bin_data = \
+ bin/gen-gfm-release-table.sh \
+ bin/gen-spirv-shader-arrays.py \
+ bin/run-python-test-osx.sh \
+ bin/run-python.sh
+
+test_data = \
+ test/00-command-exit.txt \
+ test/01-concat-operator.txt \
+ test/01-exponent-operator.txt \
+ test/01-inline-array-div.txt \
+ test/01-inline-array-exp.txt \
+ test/01-inline-array-mul.txt \
+ test/01-inline-array-op-lhs.txt \
+ test/01-inline-array-op-rhs.txt \
+ test/01-inline-array-string-concat.txt \
+ test/01-inline-array.txt \
+ test/01-ranged-definitions-dups.txt \
+ test/01-simple-arithmetic.txt \
+ test/02-circular-01.txt \
+ test/02-circular-02.txt \
+ test/03-expression.txt \
+ test/03-leading-signs.txt \
+ test/04-function-abs.txt \
+ test/04-function-and-boolean.txt \
+ test/04-function-and.txt \
+ test/04-function-average.txt \
+ test/04-function-column-row.txt \
+ test/04-function-columns-rows.txt \
+ test/04-function-concatenate.txt \
+ test/04-function-count-formula.txt \
+ test/04-function-count.txt \
+ test/04-function-counta-edit.txt \
+ test/04-function-counta-static-args.txt \
+ test/04-function-countblank.txt \
+ test/04-function-exact.txt \
+ test/04-function-find.txt \
+ test/04-function-invalid-name.txt \
+ test/04-function-isblank.txt \
+ test/04-function-iserror.txt \
+ test/04-function-iseven.txt \
+ test/04-function-isformula.txt \
+ test/04-function-islogical.txt \
+ test/04-function-isna.txt \
+ test/04-function-isnumber.txt \
+ test/04-function-isref.txt \
+ test/04-function-istext.txt \
+ test/04-function-left-utf8.txt \
+ test/04-function-left.txt \
+ test/04-function-len.txt \
+ test/04-function-logical.txt \
+ test/04-function-median.txt \
+ test/04-function-mid-utf8.txt \
+ test/04-function-mid.txt \
+ test/04-function-mmult-inline.txt \
+ test/04-function-mmult.txt \
+ test/04-function-mode.txt \
+ test/04-function-n.txt \
+ test/04-function-nested.txt \
+ test/04-function-or.txt \
+ test/04-function-pi-int.txt \
+ test/04-function-replace.txt \
+ test/04-function-rept.txt \
+ test/04-function-right-utf8.txt \
+ test/04-function-right.txt \
+ test/04-function-sheet.txt \
+ test/04-function-sheets.txt \
+ test/04-function-single.txt \
+ test/04-function-substitute.txt \
+ test/04-function-t.txt \
+ test/04-function-textjoin.txt \
+ test/04-function-trim.txt \
+ test/04-function-true-false.txt \
+ test/04-function-type.txt \
+ test/05-range-reference.txt \
+ test/06-range-reference-basic-01.txt \
+ test/06-range-reference-basic-02.txt \
+ test/06-range-reference-circular-01.txt \
+ test/06-range-reference-unordered.txt \
+ test/06-range-reference-whole-column.txt \
+ test/06-range-reference-whole-row.txt \
+ test/07-fraction-numbers.txt \
+ test/08-boolean-cells.txt \
+ test/08-numeric-cells.txt \
+ test/09-string-cells.txt \
+ test/10-shared-formulas-01.txt \
+ test/11-reference-to-numeric-cell-01.txt \
+ test/12-inline-string-01.txt \
+ test/13-relational-operators-01.txt \
+ test/13-relational-operators-02.txt \
+ test/13-relational-operators-03.txt \
+ test/20-table-reference-01.txt \
+ test/21-named-exp-workbook-01.txt \
+ test/21-named-exp-worksheet-01.txt \
+ test/22-formulas-with-cached-results.txt \
+ test/22-grouped-formulas-with-cached-results.txt \
+ test/parser-test-func.sh \
+ test/parser-test-t0.sh \
+ test/parser-test-t1.sh \
+ test/parser-test-t2.sh \
+ test/parser-test-t3.sh \
+ test/parser-test-t4.sh \
+ test/parser-test-t5.sh \
+ test/parser-test-t6.sh \
+ test/parser-test-t7.sh \
+ test/parser-test-t8.sh \
+ test/python/document.py \
+ test/python/module.py \
+ test/thread/function-parallel.txt \
+ test/thread/function-wait-simple.txt
+
+doc_data = \
+ doc/conf.py \
+ doc/cpp/data_store/cell_access.rst \
+ doc/cpp/data_store/dirty_cell_tracker.rst \
+ doc/cpp/data_store/document.rst \
+ doc/cpp/data_store/index.rst \
+ doc/cpp/data_store/model_context.rst \
+ doc/cpp/data_store/types.rst \
+ doc/cpp/formula/formula_cell.rst \
+ doc/cpp/formula/formula_engine.rst \
+ doc/cpp/formula/formula_name_resolver.rst \
+ doc/cpp/formula/formula_tokens.rst \
+ doc/cpp/formula/index.rst \
+ doc/cpp/formula/types.rst \
+ doc/cpp/index.rst \
+ doc/cpp/interface/index.rst \
+ doc/cpp/quickstart/index.rst \
+ doc/cpp/quickstart/using_document.rst \
+ doc/cpp/quickstart/using_model_context.rst \
+ doc/doxygen.conf \
+ doc/environment.yml \
+ doc/index.rst \
+ doc/overview/index.rst \
+ doc/python/document.rst \
+ doc/python/index.rst \
+ doc/python/quickstart.rst \
+ doc/python/sheet.rst \
+ doc/requirements.txt
+
+EXTRA_DIST = \
+ LICENSE \
+ libixion.pc.in \
+ autogen.sh \
+ $(bin_data) \
+ $(test_data) \
+ $(doc_data)
+
+all: config.h
+ $(MAKE) $(AM_MAKEFLAGS) all-recursive
+
+.SUFFIXES:
+am--refresh: Makefile
+ @:
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \
+ $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \
+ && exit 0; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --foreign Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ echo ' $(SHELL) ./config.status'; \
+ $(SHELL) ./config.status;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ $(SHELL) ./config.status --recheck
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ $(am__cd) $(srcdir) && $(AUTOCONF)
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
+$(am__aclocal_m4_deps):
+
+config.h: stamp-h1
+ @test -f $@ || rm -f stamp-h1
+ @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1
+
+stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
+ @rm -f stamp-h1
+ cd $(top_builddir) && $(SHELL) ./config.status config.h
+$(srcdir)/config.h.in: $(am__configure_deps)
+ ($(am__cd) $(top_srcdir) && $(AUTOHEADER))
+ rm -f stamp-h1
+ touch $@
+
+distclean-hdr:
+ -rm -f config.h stamp-h1
+bin/env.sh: $(top_builddir)/config.status $(top_srcdir)/bin/env.sh.in
+ cd $(top_builddir) && $(SHELL) ./config.status $@
+misc/libixion.spec: $(top_builddir)/config.status $(top_srcdir)/misc/libixion.spec.in
+ cd $(top_builddir) && $(SHELL) ./config.status $@
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+distclean-libtool:
+ -rm -f libtool config.lt
+install-pkgconfigDATA: $(pkgconfig_DATA)
+ @$(NORMAL_INSTALL)
+ @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(pkgconfigdir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" || exit 1; \
+ fi; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; \
+ done | $(am__base_list) | \
+ while read files; do \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgconfigdir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgconfigdir)" || exit $$?; \
+ done
+
+uninstall-pkgconfigDATA:
+ @$(NORMAL_UNINSTALL)
+ @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \
+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+ dir='$(DESTDIR)$(pkgconfigdir)'; $(am__uninstall_files_from_dir)
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run 'make' without going through this Makefile.
+# To change the values of 'make' variables: instead of editing Makefiles,
+# (1) if the variable is set in 'config.status', edit 'config.status'
+# (which will cause the Makefiles to be regenerated when you run 'make');
+# (2) otherwise, pass the desired values on the 'make' command line.
+$(am__recursive_targets):
+ @fail=; \
+ if $(am__make_keepgoing); then \
+ failcom='fail=yes'; \
+ else \
+ failcom='exit 1'; \
+ fi; \
+ dot_seen=no; \
+ target=`echo $@ | sed s/-recursive//`; \
+ case "$@" in \
+ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+ *) list='$(SUBDIRS)' ;; \
+ esac; \
+ for subdir in $$list; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ dot_seen=yes; \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || eval $$failcom; \
+ done; \
+ if test "$$dot_seen" = "no"; then \
+ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+ fi; test -z "$$fail"
+
+ID: $(am__tagged_files)
+ $(am__define_uniq_tagged_files); mkid -fID $$unique
+tags: tags-recursive
+TAGS: tags
+
+tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ set x; \
+ here=`pwd`; \
+ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
+ include_option=--etags-include; \
+ empty_fix=.; \
+ else \
+ include_option=--include; \
+ empty_fix=; \
+ fi; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ test ! -f $$subdir/TAGS || \
+ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
+ fi; \
+ done; \
+ $(am__define_uniq_tagged_files); \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: ctags-recursive
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ $(am__define_uniq_tagged_files); \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+cscope: cscope.files
+ test ! -s cscope.files \
+ || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS)
+clean-cscope:
+ -rm -f cscope.files
+cscope.files: clean-cscope cscopelist
+cscopelist: cscopelist-recursive
+
+cscopelist-am: $(am__tagged_files)
+ list='$(am__tagged_files)'; \
+ case "$(srcdir)" in \
+ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+ *) sdir=$(subdir)/$(srcdir) ;; \
+ esac; \
+ for i in $$list; do \
+ if test -f "$$i"; then \
+ echo "$(subdir)/$$i"; \
+ else \
+ echo "$$sdir/$$i"; \
+ fi; \
+ done >> $(top_builddir)/cscope.files
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+ -rm -f cscope.out cscope.in.out cscope.po.out cscope.files
+distdir: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) distdir-am
+
+distdir-am: $(DISTFILES)
+ $(am__remove_distdir)
+ test -d "$(distdir)" || mkdir "$(distdir)"
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+ @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ $(am__make_dryrun) \
+ || test -d "$(distdir)/$$subdir" \
+ || $(MKDIR_P) "$(distdir)/$$subdir" \
+ || exit 1; \
+ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
+ $(am__relativize); \
+ new_distdir=$$reldir; \
+ dir1=$$subdir; dir2="$(top_distdir)"; \
+ $(am__relativize); \
+ new_top_distdir=$$reldir; \
+ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
+ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
+ ($(am__cd) $$subdir && \
+ $(MAKE) $(AM_MAKEFLAGS) \
+ top_distdir="$$new_top_distdir" \
+ distdir="$$new_distdir" \
+ am__remove_distdir=: \
+ am__skip_length_check=: \
+ am__skip_mode_fix=: \
+ distdir) \
+ || exit 1; \
+ fi; \
+ done
+ $(MAKE) $(AM_MAKEFLAGS) \
+ top_distdir="$(top_distdir)" distdir="$(distdir)" \
+ dist-hook
+ -test -n "$(am__skip_mode_fix)" \
+ || find "$(distdir)" -type d ! -perm -755 \
+ -exec chmod u+rwx,go+rx {} \; -o \
+ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
+ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
+ ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
+ || chmod -R a+r "$(distdir)"
+dist-gzip: distdir
+ tardir=$(distdir) && $(am__tar) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).tar.gz
+ $(am__post_remove_distdir)
+dist-bzip2: distdir
+ tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2
+ $(am__post_remove_distdir)
+
+dist-lzip: distdir
+ tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz
+ $(am__post_remove_distdir)
+dist-xz: distdir
+ tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz
+ $(am__post_remove_distdir)
+
+dist-zstd: distdir
+ tardir=$(distdir) && $(am__tar) | zstd -c $${ZSTD_CLEVEL-$${ZSTD_OPT--19}} >$(distdir).tar.zst
+ $(am__post_remove_distdir)
+
+dist-tarZ: distdir
+ @echo WARNING: "Support for distribution archives compressed with" \
+ "legacy program 'compress' is deprecated." >&2
+ @echo WARNING: "It will be removed altogether in Automake 2.0" >&2
+ tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
+ $(am__post_remove_distdir)
+
+dist-shar: distdir
+ @echo WARNING: "Support for shar distribution archives is" \
+ "deprecated." >&2
+ @echo WARNING: "It will be removed altogether in Automake 2.0" >&2
+ shar $(distdir) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).shar.gz
+ $(am__post_remove_distdir)
+
+dist-zip: distdir
+ -rm -f $(distdir).zip
+ zip -rq $(distdir).zip $(distdir)
+ $(am__post_remove_distdir)
+
+dist dist-all:
+ $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:'
+ $(am__post_remove_distdir)
+
+# This target untars the dist file and tries a VPATH configuration. Then
+# it guarantees that the distribution is self-contained by making another
+# tarfile.
+distcheck: dist
+ case '$(DIST_ARCHIVES)' in \
+ *.tar.gz*) \
+ eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).tar.gz | $(am__untar) ;;\
+ *.tar.bz2*) \
+ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
+ *.tar.lz*) \
+ lzip -dc $(distdir).tar.lz | $(am__untar) ;;\
+ *.tar.xz*) \
+ xz -dc $(distdir).tar.xz | $(am__untar) ;;\
+ *.tar.Z*) \
+ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
+ *.shar.gz*) \
+ eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\
+ *.zip*) \
+ unzip $(distdir).zip ;;\
+ *.tar.zst*) \
+ zstd -dc $(distdir).tar.zst | $(am__untar) ;;\
+ esac
+ chmod -R a-w $(distdir)
+ chmod u+w $(distdir)
+ mkdir $(distdir)/_build $(distdir)/_build/sub $(distdir)/_inst
+ chmod a-w $(distdir)
+ test -d $(distdir)/_build || exit 0; \
+ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
+ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
+ && am__cwd=`pwd` \
+ && $(am__cd) $(distdir)/_build/sub \
+ && ../../configure \
+ $(AM_DISTCHECK_CONFIGURE_FLAGS) \
+ $(DISTCHECK_CONFIGURE_FLAGS) \
+ --srcdir=../.. --prefix="$$dc_install_base" \
+ && $(MAKE) $(AM_MAKEFLAGS) \
+ && $(MAKE) $(AM_MAKEFLAGS) $(AM_DISTCHECK_DVI_TARGET) \
+ && $(MAKE) $(AM_MAKEFLAGS) check \
+ && $(MAKE) $(AM_MAKEFLAGS) install \
+ && $(MAKE) $(AM_MAKEFLAGS) installcheck \
+ && $(MAKE) $(AM_MAKEFLAGS) uninstall \
+ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
+ distuninstallcheck \
+ && chmod -R a-w "$$dc_install_base" \
+ && ({ \
+ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \
+ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
+ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
+ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
+ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
+ } || { rm -rf "$$dc_destdir"; exit 1; }) \
+ && rm -rf "$$dc_destdir" \
+ && $(MAKE) $(AM_MAKEFLAGS) dist \
+ && rm -rf $(DIST_ARCHIVES) \
+ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \
+ && cd "$$am__cwd" \
+ || exit 1
+ $(am__post_remove_distdir)
+ @(echo "$(distdir) archives ready for distribution: "; \
+ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
+ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
+distuninstallcheck:
+ @test -n '$(distuninstallcheck_dir)' || { \
+ echo 'ERROR: trying to run $@ with an empty' \
+ '$$(distuninstallcheck_dir)' >&2; \
+ exit 1; \
+ }; \
+ $(am__cd) '$(distuninstallcheck_dir)' || { \
+ echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \
+ exit 1; \
+ }; \
+ test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \
+ || { echo "ERROR: files left after uninstall:" ; \
+ if test -n "$(DESTDIR)"; then \
+ echo " (check DESTDIR support)"; \
+ fi ; \
+ $(distuninstallcheck_listfiles) ; \
+ exit 1; } >&2
+distcleancheck: distclean
+ @if test '$(srcdir)' = . ; then \
+ echo "ERROR: distcleancheck can only run from a VPATH build" ; \
+ exit 1 ; \
+ fi
+ @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
+ || { echo "ERROR: files left in build directory after distclean:" ; \
+ $(distcleancheck_listfiles) ; \
+ exit 1; } >&2
+check-am: all-am
+check: check-recursive
+all-am: Makefile $(DATA) config.h
+installdirs: installdirs-recursive
+installdirs-am:
+ for dir in "$(DESTDIR)$(pkgconfigdir)"; do \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+ done
+install: install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-recursive
+install-strip:
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-recursive
+
+clean-am: clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-recursive
+ -rm -f $(am__CONFIG_DISTCLEAN_FILES)
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-hdr \
+ distclean-libtool distclean-local distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+html: html-recursive
+
+html-am:
+
+info: info-recursive
+
+info-am:
+
+install-data-am: install-pkgconfigDATA
+
+install-dvi: install-dvi-recursive
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-recursive
+
+install-html-am:
+
+install-info: install-info-recursive
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-recursive
+
+install-pdf-am:
+
+install-ps: install-ps-recursive
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-recursive
+ -rm -f $(am__CONFIG_DISTCLEAN_FILES)
+ -rm -rf $(top_srcdir)/autom4te.cache
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-recursive
+
+pdf-am:
+
+ps: ps-recursive
+
+ps-am:
+
+uninstall-am: uninstall-pkgconfigDATA
+
+.MAKE: $(am__recursive_targets) all install-am install-strip
+
+.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \
+ am--refresh check check-am clean clean-cscope clean-generic \
+ clean-libtool cscope cscopelist-am ctags ctags-am dist \
+ dist-all dist-bzip2 dist-gzip dist-hook dist-lzip dist-shar \
+ dist-tarZ dist-xz dist-zip dist-zstd distcheck distclean \
+ distclean-generic distclean-hdr distclean-libtool \
+ distclean-local distclean-tags distcleancheck distdir \
+ distuninstallcheck dvi dvi-am html html-am info info-am \
+ install install-am install-data install-data-am install-dvi \
+ install-dvi-am install-exec install-exec-am install-html \
+ install-html-am install-info install-info-am install-man \
+ install-pdf install-pdf-am install-pkgconfigDATA install-ps \
+ install-ps-am install-strip installcheck installcheck-am \
+ installdirs installdirs-am maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-generic \
+ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \
+ uninstall-am uninstall-pkgconfigDATA
+
+.PRECIOUS: Makefile
+
+
+.PHONY: distclean-local dist-hook doc-doxygen doc-sphinx doc
+
+distclean-local:
+ rm -rf *.pc
+
+dist-hook:
+ @if test -d "$(srcdir)/.git"; \
+ then \
+ echo Creating ChangeLog && \
+ ( cd "$(top_srcdir)" && \
+ echo '# Generated by Makefile. Do not edit.'; echo; \
+ $(top_srcdir)/missing --run git log --pretty=medium ) > ChangeLog.tmp \
+ && mv -f ChangeLog.tmp $(top_distdir)/ChangeLog \
+ || ( rm -f ChangeLog.tmp ; \
+ echo Failed to generate ChangeLog >&2 ); \
+ else \
+ echo A git clone is required to generate a ChangeLog >&2; \
+ fi
+
+doc-doxygen:
+ @echo "Building documentation by doxygen..."
+ @cd doc && doxygen doxygen.conf
+
+doc-sphinx:
+ @echo "Building documentation by sphinx..."
+ @sphinx-build -b html ./doc/ ./doc/_build
+
+doc: doc-doxygen doc-sphinx
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..5ad7183
--- /dev/null
+++ b/README.md
@@ -0,0 +1,66 @@
+Ixion is a general purpose formula parser, interpreter, formula cell dependency
+tracker and spreadsheet document model backend all in one package.
+
+## Overview
+The goal of this project is to create a library for calculating the
+results of formula expressions stored in multiple formula cells. The cells
+can be referenced by each other, and Ixion resolves their dependencies
+automatically upon calculation. The caller can run the calculation routine
+either in a single-threaded mode, or a multi-threaded mode. Ixion also supports
+re-calculations where the contents of one or more cells have been modified
+since the last calculation, and a partial calculation of only the affected
+cells need to be calculated.
+
+## Portability
+This library is written with portability in mind; platform specific calls
+are avoided as much as possible. It makes use of modern C++ features and the
+[boost library](http://boost.org) to achieve portability.
+
+## Performance
+Achieving good performance is one of the goals of this project. As much
+care is taken as humanly possible, to attain reasonable performance.
+
+## Threaded calculation
+Ixion can perform threaded calculation using arbitrary number of threads,
+for both full and partial calculation modes.
+
+## Supported features
+* Each calculation session is defined in a plain text file, which is parsed
+ and interpreted by the Ixion parser.
+* Fully threaded calculation.
+* Name resolution using A1- and R1C1-style references.
+* Support 2D cell references and named expressions.
+* Support range references.
+* Support table references.
+* 3D cell and range references.
+* Dependency tracking during both full calculation and partial re-calculation.
+* Inline strings.
+* Inline arrays.
+* Volatile functions. The framework for volatile functions is implemented. We
+ just need to implement more functions.
+* C++ API.
+* Python API.
+* Matrix support via grouped formulas.
+
+## Features known to be missing
+* More built-in functions.
+* Custom functions defined in the caller program.
+* External references.
+* Implicit intersection.
+
+## Documentation
+
+* [Official API documentation](https://ixion.readthedocs.io/en/latest/) for general users of the library.
+
+## Installation
+
+Please refer to the [CONTRIBUTING.md](CONTRIBUTING.md) file for build and
+installation instructions.
+
+
+## Download source packages
+
+Please refer to the [Releases](https://gitlab.com/ixion/ixion/-/releases) page.
+The source packages for the older versions are found [here](OLD-DOWNLOADS.md).
+
+
diff --git a/aclocal.m4 b/aclocal.m4
new file mode 100644
index 0000000..397d084
--- /dev/null
+++ b/aclocal.m4
@@ -0,0 +1,1793 @@
+# generated automatically by aclocal 1.16.5 -*- Autoconf -*-
+
+# Copyright (C) 1996-2021 Free Software Foundation, Inc.
+
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
+m4_ifndef([AC_AUTOCONF_VERSION],
+ [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
+m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.71],,
+[m4_warning([this file was generated for autoconf 2.71.
+You have another version of autoconf. It may work, but is not guaranteed to.
+If you have problems, you may need to regenerate the build system entirely.
+To do so, use the procedure documented by the package, typically 'autoreconf'.])])
+
+# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
+# serial 12 (pkg-config-0.29.2)
+
+dnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
+dnl Copyright © 2012-2015 Dan Nicholson <dbn.lists@gmail.com>
+dnl
+dnl This program is free software; you can redistribute it and/or modify
+dnl it under the terms of the GNU General Public License as published by
+dnl the Free Software Foundation; either version 2 of the License, or
+dnl (at your option) any later version.
+dnl
+dnl This program is distributed in the hope that it will be useful, but
+dnl WITHOUT ANY WARRANTY; without even the implied warranty of
+dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+dnl General Public License for more details.
+dnl
+dnl You should have received a copy of the GNU General Public License
+dnl along with this program; if not, write to the Free Software
+dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+dnl 02111-1307, USA.
+dnl
+dnl As a special exception to the GNU General Public License, if you
+dnl distribute this file as part of a program that contains a
+dnl configuration script generated by Autoconf, you may include it under
+dnl the same distribution terms that you use for the rest of that
+dnl program.
+
+dnl PKG_PREREQ(MIN-VERSION)
+dnl -----------------------
+dnl Since: 0.29
+dnl
+dnl Verify that the version of the pkg-config macros are at least
+dnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's
+dnl installed version of pkg-config, this checks the developer's version
+dnl of pkg.m4 when generating configure.
+dnl
+dnl To ensure that this macro is defined, also add:
+dnl m4_ifndef([PKG_PREREQ],
+dnl [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])])
+dnl
+dnl See the "Since" comment for each macro you use to see what version
+dnl of the macros you require.
+m4_defun([PKG_PREREQ],
+[m4_define([PKG_MACROS_VERSION], [0.29.2])
+m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1,
+ [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])])
+])dnl PKG_PREREQ
+
+dnl PKG_PROG_PKG_CONFIG([MIN-VERSION])
+dnl ----------------------------------
+dnl Since: 0.16
+dnl
+dnl Search for the pkg-config tool and set the PKG_CONFIG variable to
+dnl first found in the path. Checks that the version of pkg-config found
+dnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is
+dnl used since that's the first version where most current features of
+dnl pkg-config existed.
+AC_DEFUN([PKG_PROG_PKG_CONFIG],
+[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
+m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
+m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
+AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
+AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
+AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
+
+if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
+ AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
+fi
+if test -n "$PKG_CONFIG"; then
+ _pkg_min_version=m4_default([$1], [0.9.0])
+ AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
+ if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_RESULT([no])
+ PKG_CONFIG=""
+ fi
+fi[]dnl
+])dnl PKG_PROG_PKG_CONFIG
+
+dnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
+dnl -------------------------------------------------------------------
+dnl Since: 0.18
+dnl
+dnl Check to see whether a particular set of modules exists. Similar to
+dnl PKG_CHECK_MODULES(), but does not set variables or print errors.
+dnl
+dnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
+dnl only at the first occurence in configure.ac, so if the first place
+dnl it's called might be skipped (such as if it is within an "if", you
+dnl have to call PKG_CHECK_EXISTS manually
+AC_DEFUN([PKG_CHECK_EXISTS],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
+if test -n "$PKG_CONFIG" && \
+ AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
+ m4_default([$2], [:])
+m4_ifvaln([$3], [else
+ $3])dnl
+fi])
+
+dnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
+dnl ---------------------------------------------
+dnl Internal wrapper calling pkg-config via PKG_CONFIG and setting
+dnl pkg_failed based on the result.
+m4_define([_PKG_CONFIG],
+[if test -n "$$1"; then
+ pkg_cv_[]$1="$$1"
+ elif test -n "$PKG_CONFIG"; then
+ PKG_CHECK_EXISTS([$3],
+ [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes ],
+ [pkg_failed=yes])
+ else
+ pkg_failed=untried
+fi[]dnl
+])dnl _PKG_CONFIG
+
+dnl _PKG_SHORT_ERRORS_SUPPORTED
+dnl ---------------------------
+dnl Internal check to see if pkg-config supports short errors.
+AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+ _pkg_short_errors_supported=yes
+else
+ _pkg_short_errors_supported=no
+fi[]dnl
+])dnl _PKG_SHORT_ERRORS_SUPPORTED
+
+
+dnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
+dnl [ACTION-IF-NOT-FOUND])
+dnl --------------------------------------------------------------
+dnl Since: 0.4.0
+dnl
+dnl Note that if there is a possibility the first call to
+dnl PKG_CHECK_MODULES might not happen, you should be sure to include an
+dnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
+AC_DEFUN([PKG_CHECK_MODULES],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
+AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
+AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
+
+pkg_failed=no
+AC_MSG_CHECKING([for $2])
+
+_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
+_PKG_CONFIG([$1][_LIBS], [libs], [$2])
+
+m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
+and $1[]_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.])
+
+if test $pkg_failed = yes; then
+ AC_MSG_RESULT([no])
+ _PKG_SHORT_ERRORS_SUPPORTED
+ if test $_pkg_short_errors_supported = yes; then
+ $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
+ else
+ $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
+
+ m4_default([$4], [AC_MSG_ERROR(
+[Package requirements ($2) were not met:
+
+$$1_PKG_ERRORS
+
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
+
+_PKG_TEXT])[]dnl
+ ])
+elif test $pkg_failed = untried; then
+ AC_MSG_RESULT([no])
+ m4_default([$4], [AC_MSG_FAILURE(
+[The pkg-config script could not be found or is too old. Make sure it
+is in your PATH or set the PKG_CONFIG environment variable to the full
+path to pkg-config.
+
+_PKG_TEXT
+
+To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
+ ])
+else
+ $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
+ $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
+ AC_MSG_RESULT([yes])
+ $3
+fi[]dnl
+])dnl PKG_CHECK_MODULES
+
+
+dnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
+dnl [ACTION-IF-NOT-FOUND])
+dnl ---------------------------------------------------------------------
+dnl Since: 0.29
+dnl
+dnl Checks for existence of MODULES and gathers its build flags with
+dnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags
+dnl and VARIABLE-PREFIX_LIBS from --libs.
+dnl
+dnl Note that if there is a possibility the first call to
+dnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to
+dnl include an explicit call to PKG_PROG_PKG_CONFIG in your
+dnl configure.ac.
+AC_DEFUN([PKG_CHECK_MODULES_STATIC],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
+_save_PKG_CONFIG=$PKG_CONFIG
+PKG_CONFIG="$PKG_CONFIG --static"
+PKG_CHECK_MODULES($@)
+PKG_CONFIG=$_save_PKG_CONFIG[]dnl
+])dnl PKG_CHECK_MODULES_STATIC
+
+
+dnl PKG_INSTALLDIR([DIRECTORY])
+dnl -------------------------
+dnl Since: 0.27
+dnl
+dnl Substitutes the variable pkgconfigdir as the location where a module
+dnl should install pkg-config .pc files. By default the directory is
+dnl $libdir/pkgconfig, but the default can be changed by passing
+dnl DIRECTORY. The user can override through the --with-pkgconfigdir
+dnl parameter.
+AC_DEFUN([PKG_INSTALLDIR],
+[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])])
+m4_pushdef([pkg_description],
+ [pkg-config installation directory @<:@]pkg_default[@:>@])
+AC_ARG_WITH([pkgconfigdir],
+ [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],,
+ [with_pkgconfigdir=]pkg_default)
+AC_SUBST([pkgconfigdir], [$with_pkgconfigdir])
+m4_popdef([pkg_default])
+m4_popdef([pkg_description])
+])dnl PKG_INSTALLDIR
+
+
+dnl PKG_NOARCH_INSTALLDIR([DIRECTORY])
+dnl --------------------------------
+dnl Since: 0.27
+dnl
+dnl Substitutes the variable noarch_pkgconfigdir as the location where a
+dnl module should install arch-independent pkg-config .pc files. By
+dnl default the directory is $datadir/pkgconfig, but the default can be
+dnl changed by passing DIRECTORY. The user can override through the
+dnl --with-noarch-pkgconfigdir parameter.
+AC_DEFUN([PKG_NOARCH_INSTALLDIR],
+[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])])
+m4_pushdef([pkg_description],
+ [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@])
+AC_ARG_WITH([noarch-pkgconfigdir],
+ [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],,
+ [with_noarch_pkgconfigdir=]pkg_default)
+AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir])
+m4_popdef([pkg_default])
+m4_popdef([pkg_description])
+])dnl PKG_NOARCH_INSTALLDIR
+
+
+dnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE,
+dnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
+dnl -------------------------------------------
+dnl Since: 0.28
+dnl
+dnl Retrieves the value of the pkg-config variable for the given module.
+AC_DEFUN([PKG_CHECK_VAR],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
+AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl
+
+_PKG_CONFIG([$1], [variable="][$3]["], [$2])
+AS_VAR_COPY([$1], [pkg_cv_][$1])
+
+AS_VAR_IF([$1], [""], [$5], [$4])dnl
+])dnl PKG_CHECK_VAR
+
+# Copyright (C) 2002-2021 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_AUTOMAKE_VERSION(VERSION)
+# ----------------------------
+# Automake X.Y traces this macro to ensure aclocal.m4 has been
+# generated from the m4 files accompanying Automake X.Y.
+# (This private macro should not be called outside this file.)
+AC_DEFUN([AM_AUTOMAKE_VERSION],
+[am__api_version='1.16'
+dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
+dnl require some minimum version. Point them to the right macro.
+m4_if([$1], [1.16.5], [],
+ [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
+])
+
+# _AM_AUTOCONF_VERSION(VERSION)
+# -----------------------------
+# aclocal traces this macro to find the Autoconf version.
+# This is a private macro too. Using m4_define simplifies
+# the logic in aclocal, which can simply ignore this definition.
+m4_define([_AM_AUTOCONF_VERSION], [])
+
+# AM_SET_CURRENT_AUTOMAKE_VERSION
+# -------------------------------
+# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
+# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
+AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
+[AM_AUTOMAKE_VERSION([1.16.5])dnl
+m4_ifndef([AC_AUTOCONF_VERSION],
+ [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
+_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
+
+# AM_AUX_DIR_EXPAND -*- Autoconf -*-
+
+# Copyright (C) 2001-2021 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
+# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to
+# '$srcdir', '$srcdir/..', or '$srcdir/../..'.
+#
+# Of course, Automake must honor this variable whenever it calls a
+# tool from the auxiliary directory. The problem is that $srcdir (and
+# therefore $ac_aux_dir as well) can be either absolute or relative,
+# depending on how configure is run. This is pretty annoying, since
+# it makes $ac_aux_dir quite unusable in subdirectories: in the top
+# source directory, any form will work fine, but in subdirectories a
+# relative path needs to be adjusted first.
+#
+# $ac_aux_dir/missing
+# fails when called from a subdirectory if $ac_aux_dir is relative
+# $top_srcdir/$ac_aux_dir/missing
+# fails if $ac_aux_dir is absolute,
+# fails when called from a subdirectory in a VPATH build with
+# a relative $ac_aux_dir
+#
+# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
+# are both prefixed by $srcdir. In an in-source build this is usually
+# harmless because $srcdir is '.', but things will broke when you
+# start a VPATH build or use an absolute $srcdir.
+#
+# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
+# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
+# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
+# and then we would define $MISSING as
+# MISSING="\${SHELL} $am_aux_dir/missing"
+# This will work as long as MISSING is not called from configure, because
+# unfortunately $(top_srcdir) has no meaning in configure.
+# However there are other variables, like CC, which are often used in
+# configure, and could therefore not use this "fixed" $ac_aux_dir.
+#
+# Another solution, used here, is to always expand $ac_aux_dir to an
+# absolute PATH. The drawback is that using absolute paths prevent a
+# configured tree to be moved without reconfiguration.
+
+AC_DEFUN([AM_AUX_DIR_EXPAND],
+[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
+# Expand $ac_aux_dir to an absolute path.
+am_aux_dir=`cd "$ac_aux_dir" && pwd`
+])
+
+# AM_CONDITIONAL -*- Autoconf -*-
+
+# Copyright (C) 1997-2021 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_CONDITIONAL(NAME, SHELL-CONDITION)
+# -------------------------------------
+# Define a conditional.
+AC_DEFUN([AM_CONDITIONAL],
+[AC_PREREQ([2.52])dnl
+ m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
+ [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
+AC_SUBST([$1_TRUE])dnl
+AC_SUBST([$1_FALSE])dnl
+_AM_SUBST_NOTMAKE([$1_TRUE])dnl
+_AM_SUBST_NOTMAKE([$1_FALSE])dnl
+m4_define([_AM_COND_VALUE_$1], [$2])dnl
+if $2; then
+ $1_TRUE=
+ $1_FALSE='#'
+else
+ $1_TRUE='#'
+ $1_FALSE=
+fi
+AC_CONFIG_COMMANDS_PRE(
+[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
+ AC_MSG_ERROR([[conditional "$1" was never defined.
+Usually this means the macro was only invoked conditionally.]])
+fi])])
+
+# Copyright (C) 1999-2021 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+
+# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be
+# written in clear, in which case automake, when reading aclocal.m4,
+# will think it sees a *use*, and therefore will trigger all it's
+# C support machinery. Also note that it means that autoscan, seeing
+# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
+
+
+# _AM_DEPENDENCIES(NAME)
+# ----------------------
+# See how the compiler implements dependency checking.
+# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC".
+# We try a few techniques and use that to set a single cache variable.
+#
+# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
+# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
+# dependency, and given that the user is not expected to run this macro,
+# just rely on AC_PROG_CC.
+AC_DEFUN([_AM_DEPENDENCIES],
+[AC_REQUIRE([AM_SET_DEPDIR])dnl
+AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
+AC_REQUIRE([AM_MAKE_INCLUDE])dnl
+AC_REQUIRE([AM_DEP_TRACK])dnl
+
+m4_if([$1], [CC], [depcc="$CC" am_compiler_list=],
+ [$1], [CXX], [depcc="$CXX" am_compiler_list=],
+ [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
+ [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'],
+ [$1], [UPC], [depcc="$UPC" am_compiler_list=],
+ [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
+ [depcc="$$1" am_compiler_list=])
+
+AC_CACHE_CHECK([dependency style of $depcc],
+ [am_cv_$1_dependencies_compiler_type],
+[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+ # We make a subdir and do the tests there. Otherwise we can end up
+ # making bogus files that we don't know about and never remove. For
+ # instance it was reported that on HP-UX the gcc test will end up
+ # making a dummy file named 'D' -- because '-MD' means "put the output
+ # in D".
+ rm -rf conftest.dir
+ mkdir conftest.dir
+ # Copy depcomp to subdir because otherwise we won't find it if we're
+ # using a relative directory.
+ cp "$am_depcomp" conftest.dir
+ cd conftest.dir
+ # We will build objects and dependencies in a subdirectory because
+ # it helps to detect inapplicable dependency modes. For instance
+ # both Tru64's cc and ICC support -MD to output dependencies as a
+ # side effect of compilation, but ICC will put the dependencies in
+ # the current directory while Tru64 will put them in the object
+ # directory.
+ mkdir sub
+
+ am_cv_$1_dependencies_compiler_type=none
+ if test "$am_compiler_list" = ""; then
+ am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
+ fi
+ am__universal=false
+ m4_case([$1], [CC],
+ [case " $depcc " in #(
+ *\ -arch\ *\ -arch\ *) am__universal=true ;;
+ esac],
+ [CXX],
+ [case " $depcc " in #(
+ *\ -arch\ *\ -arch\ *) am__universal=true ;;
+ esac])
+
+ for depmode in $am_compiler_list; do
+ # Setup a source with many dependencies, because some compilers
+ # like to wrap large dependency lists on column 80 (with \), and
+ # we should not choose a depcomp mode which is confused by this.
+ #
+ # We need to recreate these files for each test, as the compiler may
+ # overwrite some of them when testing with obscure command lines.
+ # This happens at least with the AIX C compiler.
+ : > sub/conftest.c
+ for i in 1 2 3 4 5 6; do
+ echo '#include "conftst'$i'.h"' >> sub/conftest.c
+ # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
+ # Solaris 10 /bin/sh.
+ echo '/* dummy */' > sub/conftst$i.h
+ done
+ echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+ # We check with '-c' and '-o' for the sake of the "dashmstdout"
+ # mode. It turns out that the SunPro C++ compiler does not properly
+ # handle '-M -o', and we need to detect this. Also, some Intel
+ # versions had trouble with output in subdirs.
+ am__obj=sub/conftest.${OBJEXT-o}
+ am__minus_obj="-o $am__obj"
+ case $depmode in
+ gcc)
+ # This depmode causes a compiler race in universal mode.
+ test "$am__universal" = false || continue
+ ;;
+ nosideeffect)
+ # After this tag, mechanisms are not by side-effect, so they'll
+ # only be used when explicitly requested.
+ if test "x$enable_dependency_tracking" = xyes; then
+ continue
+ else
+ break
+ fi
+ ;;
+ msvc7 | msvc7msys | msvisualcpp | msvcmsys)
+ # This compiler won't grok '-c -o', but also, the minuso test has
+ # not run yet. These depmodes are late enough in the game, and
+ # so weak that their functioning should not be impacted.
+ am__obj=conftest.${OBJEXT-o}
+ am__minus_obj=
+ ;;
+ none) break ;;
+ esac
+ if depmode=$depmode \
+ source=sub/conftest.c object=$am__obj \
+ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
+ >/dev/null 2>conftest.err &&
+ grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
+ ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+ # icc doesn't choke on unknown options, it will just issue warnings
+ # or remarks (even with -Werror). So we grep stderr for any message
+ # that says an option was ignored or not supported.
+ # When given -MP, icc 7.0 and 7.1 complain thusly:
+ # icc: Command line warning: ignoring option '-M'; no argument required
+ # The diagnosis changed in icc 8.0:
+ # icc: Command line remark: option '-MP' not supported
+ if (grep 'ignoring option' conftest.err ||
+ grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+ am_cv_$1_dependencies_compiler_type=$depmode
+ break
+ fi
+ fi
+ done
+
+ cd ..
+ rm -rf conftest.dir
+else
+ am_cv_$1_dependencies_compiler_type=none
+fi
+])
+AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
+AM_CONDITIONAL([am__fastdep$1], [
+ test "x$enable_dependency_tracking" != xno \
+ && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
+])
+
+
+# AM_SET_DEPDIR
+# -------------
+# Choose a directory name for dependency files.
+# This macro is AC_REQUIREd in _AM_DEPENDENCIES.
+AC_DEFUN([AM_SET_DEPDIR],
+[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
+])
+
+
+# AM_DEP_TRACK
+# ------------
+AC_DEFUN([AM_DEP_TRACK],
+[AC_ARG_ENABLE([dependency-tracking], [dnl
+AS_HELP_STRING(
+ [--enable-dependency-tracking],
+ [do not reject slow dependency extractors])
+AS_HELP_STRING(
+ [--disable-dependency-tracking],
+ [speeds up one-time build])])
+if test "x$enable_dependency_tracking" != xno; then
+ am_depcomp="$ac_aux_dir/depcomp"
+ AMDEPBACKSLASH='\'
+ am__nodep='_no'
+fi
+AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
+AC_SUBST([AMDEPBACKSLASH])dnl
+_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
+AC_SUBST([am__nodep])dnl
+_AM_SUBST_NOTMAKE([am__nodep])dnl
+])
+
+# Generate code to set up dependency tracking. -*- Autoconf -*-
+
+# Copyright (C) 1999-2021 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# _AM_OUTPUT_DEPENDENCY_COMMANDS
+# ------------------------------
+AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
+[{
+ # Older Autoconf quotes --file arguments for eval, but not when files
+ # are listed without --file. Let's play safe and only enable the eval
+ # if we detect the quoting.
+ # TODO: see whether this extra hack can be removed once we start
+ # requiring Autoconf 2.70 or later.
+ AS_CASE([$CONFIG_FILES],
+ [*\'*], [eval set x "$CONFIG_FILES"],
+ [*], [set x $CONFIG_FILES])
+ shift
+ # Used to flag and report bootstrapping failures.
+ am_rc=0
+ for am_mf
+ do
+ # Strip MF so we end up with the name of the file.
+ am_mf=`AS_ECHO(["$am_mf"]) | sed -e 's/:.*$//'`
+ # Check whether this is an Automake generated Makefile which includes
+ # dependency-tracking related rules and includes.
+ # Grep'ing the whole file directly is not great: AIX grep has a line
+ # limit of 2048, but all sed's we know have understand at least 4000.
+ sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \
+ || continue
+ am_dirpart=`AS_DIRNAME(["$am_mf"])`
+ am_filepart=`AS_BASENAME(["$am_mf"])`
+ AM_RUN_LOG([cd "$am_dirpart" \
+ && sed -e '/# am--include-marker/d' "$am_filepart" \
+ | $MAKE -f - am--depfiles]) || am_rc=$?
+ done
+ if test $am_rc -ne 0; then
+ AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments
+ for automatic dependency tracking. If GNU make was not used, consider
+ re-running the configure script with MAKE="gmake" (or whatever is
+ necessary). You can also try re-running configure with the
+ '--disable-dependency-tracking' option to at least be able to build
+ the package (albeit without support for automatic dependency tracking).])
+ fi
+ AS_UNSET([am_dirpart])
+ AS_UNSET([am_filepart])
+ AS_UNSET([am_mf])
+ AS_UNSET([am_rc])
+ rm -f conftest-deps.mk
+}
+])# _AM_OUTPUT_DEPENDENCY_COMMANDS
+
+
+# AM_OUTPUT_DEPENDENCY_COMMANDS
+# -----------------------------
+# This macro should only be invoked once -- use via AC_REQUIRE.
+#
+# This code is only required when automatic dependency tracking is enabled.
+# This creates each '.Po' and '.Plo' makefile fragment that we'll need in
+# order to bootstrap the dependency handling code.
+AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
+[AC_CONFIG_COMMANDS([depfiles],
+ [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
+ [AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"])])
+
+# Do all the work for Automake. -*- Autoconf -*-
+
+# Copyright (C) 1996-2021 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This macro actually does too much. Some checks are only needed if
+# your package does certain things. But this isn't really a big deal.
+
+dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O.
+m4_define([AC_PROG_CC],
+m4_defn([AC_PROG_CC])
+[_AM_PROG_CC_C_O
+])
+
+# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
+# AM_INIT_AUTOMAKE([OPTIONS])
+# -----------------------------------------------
+# The call with PACKAGE and VERSION arguments is the old style
+# call (pre autoconf-2.50), which is being phased out. PACKAGE
+# and VERSION should now be passed to AC_INIT and removed from
+# the call to AM_INIT_AUTOMAKE.
+# We support both call styles for the transition. After
+# the next Automake release, Autoconf can make the AC_INIT
+# arguments mandatory, and then we can depend on a new Autoconf
+# release and drop the old call support.
+AC_DEFUN([AM_INIT_AUTOMAKE],
+[AC_PREREQ([2.65])dnl
+m4_ifdef([_$0_ALREADY_INIT],
+ [m4_fatal([$0 expanded multiple times
+]m4_defn([_$0_ALREADY_INIT]))],
+ [m4_define([_$0_ALREADY_INIT], m4_expansion_stack)])dnl
+dnl Autoconf wants to disallow AM_ names. We explicitly allow
+dnl the ones we care about.
+m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
+AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
+AC_REQUIRE([AC_PROG_INSTALL])dnl
+if test "`cd $srcdir && pwd`" != "`pwd`"; then
+ # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
+ # is not polluted with repeated "-I."
+ AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
+ # test to see if srcdir already configured
+ if test -f $srcdir/config.status; then
+ AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
+ fi
+fi
+
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+ if (cygpath --version) >/dev/null 2>/dev/null; then
+ CYGPATH_W='cygpath -w'
+ else
+ CYGPATH_W=echo
+ fi
+fi
+AC_SUBST([CYGPATH_W])
+
+# Define the identity of the package.
+dnl Distinguish between old-style and new-style calls.
+m4_ifval([$2],
+[AC_DIAGNOSE([obsolete],
+ [$0: two- and three-arguments forms are deprecated.])
+m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
+ AC_SUBST([PACKAGE], [$1])dnl
+ AC_SUBST([VERSION], [$2])],
+[_AM_SET_OPTIONS([$1])dnl
+dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
+m4_if(
+ m4_ifset([AC_PACKAGE_NAME], [ok]):m4_ifset([AC_PACKAGE_VERSION], [ok]),
+ [ok:ok],,
+ [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
+ AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
+ AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
+
+_AM_IF_OPTION([no-define],,
+[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package])
+ AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl
+
+# Some tools Automake needs.
+AC_REQUIRE([AM_SANITY_CHECK])dnl
+AC_REQUIRE([AC_ARG_PROGRAM])dnl
+AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])
+AM_MISSING_PROG([AUTOCONF], [autoconf])
+AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])
+AM_MISSING_PROG([AUTOHEADER], [autoheader])
+AM_MISSING_PROG([MAKEINFO], [makeinfo])
+AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
+AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
+AC_REQUIRE([AC_PROG_MKDIR_P])dnl
+# For better backward compatibility. To be removed once Automake 1.9.x
+# dies out for good. For more background, see:
+# <https://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
+# <https://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
+AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
+# We need awk for the "check" target (and possibly the TAP driver). The
+# system "awk" is bad on some platforms.
+AC_REQUIRE([AC_PROG_AWK])dnl
+AC_REQUIRE([AC_PROG_MAKE_SET])dnl
+AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
+ [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
+ [_AM_PROG_TAR([v7])])])
+_AM_IF_OPTION([no-dependencies],,
+[AC_PROVIDE_IFELSE([AC_PROG_CC],
+ [_AM_DEPENDENCIES([CC])],
+ [m4_define([AC_PROG_CC],
+ m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_CXX],
+ [_AM_DEPENDENCIES([CXX])],
+ [m4_define([AC_PROG_CXX],
+ m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_OBJC],
+ [_AM_DEPENDENCIES([OBJC])],
+ [m4_define([AC_PROG_OBJC],
+ m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
+ [_AM_DEPENDENCIES([OBJCXX])],
+ [m4_define([AC_PROG_OBJCXX],
+ m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
+])
+# Variables for tags utilities; see am/tags.am
+if test -z "$CTAGS"; then
+ CTAGS=ctags
+fi
+AC_SUBST([CTAGS])
+if test -z "$ETAGS"; then
+ ETAGS=etags
+fi
+AC_SUBST([ETAGS])
+if test -z "$CSCOPE"; then
+ CSCOPE=cscope
+fi
+AC_SUBST([CSCOPE])
+
+AC_REQUIRE([AM_SILENT_RULES])dnl
+dnl The testsuite driver may need to know about EXEEXT, so add the
+dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This
+dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below.
+AC_CONFIG_COMMANDS_PRE(dnl
+[m4_provide_if([_AM_COMPILER_EXEEXT],
+ [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
+
+# POSIX will say in a future version that running "rm -f" with no argument
+# is OK; and we want to be able to make that assumption in our Makefile
+# recipes. So use an aggressive probe to check that the usage we want is
+# actually supported "in the wild" to an acceptable degree.
+# See automake bug#10828.
+# To make any issue more visible, cause the running configure to be aborted
+# by default if the 'rm' program in use doesn't match our expectations; the
+# user can still override this though.
+if rm -f && rm -fr && rm -rf; then : OK; else
+ cat >&2 <<'END'
+Oops!
+
+Your 'rm' program seems unable to run without file operands specified
+on the command line, even when the '-f' option is present. This is contrary
+to the behaviour of most rm programs out there, and not conforming with
+the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
+
+Please tell bug-automake@gnu.org about your system, including the value
+of your $PATH and any error possibly output before this message. This
+can help us improve future automake versions.
+
+END
+ if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
+ echo 'Configuration will proceed anyway, since you have set the' >&2
+ echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
+ echo >&2
+ else
+ cat >&2 <<'END'
+Aborting the configuration process, to ensure you take notice of the issue.
+
+You can download and install GNU coreutils to get an 'rm' implementation
+that behaves properly: <https://www.gnu.org/software/coreutils/>.
+
+If you want to complete the configuration process using your problematic
+'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
+to "yes", and re-run configure.
+
+END
+ AC_MSG_ERROR([Your 'rm' program is bad, sorry.])
+ fi
+fi
+dnl The trailing newline in this macro's definition is deliberate, for
+dnl backward compatibility and to allow trailing 'dnl'-style comments
+dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841.
+])
+
+dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
+dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
+dnl mangled by Autoconf and run in a shell conditional statement.
+m4_define([_AC_COMPILER_EXEEXT],
+m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
+
+# When config.status generates a header, we must update the stamp-h file.
+# This file resides in the same directory as the config header
+# that is generated. The stamp files are numbered to have different names.
+
+# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
+# loop where config.status creates the headers, so we can generate
+# our stamp files there.
+AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
+[# Compute $1's index in $config_headers.
+_am_arg=$1
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+ case $_am_header in
+ $_am_arg | $_am_arg:* )
+ break ;;
+ * )
+ _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+ esac
+done
+echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
+
+# Copyright (C) 2001-2021 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_PROG_INSTALL_SH
+# ------------------
+# Define $install_sh.
+AC_DEFUN([AM_PROG_INSTALL_SH],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+if test x"${install_sh+set}" != xset; then
+ case $am_aux_dir in
+ *\ * | *\ *)
+ install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
+ *)
+ install_sh="\${SHELL} $am_aux_dir/install-sh"
+ esac
+fi
+AC_SUBST([install_sh])])
+
+# Copyright (C) 2003-2021 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# Check whether the underlying file-system supports filenames
+# with a leading dot. For instance MS-DOS doesn't.
+AC_DEFUN([AM_SET_LEADING_DOT],
+[rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+ am__leading_dot=.
+else
+ am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+AC_SUBST([am__leading_dot])])
+
+# Check to see how 'make' treats includes. -*- Autoconf -*-
+
+# Copyright (C) 2001-2021 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_MAKE_INCLUDE()
+# -----------------
+# Check whether make has an 'include' directive that can support all
+# the idioms we need for our automatic dependency tracking code.
+AC_DEFUN([AM_MAKE_INCLUDE],
+[AC_MSG_CHECKING([whether ${MAKE-make} supports the include directive])
+cat > confinc.mk << 'END'
+am__doit:
+ @echo this is the am__doit target >confinc.out
+.PHONY: am__doit
+END
+am__include="#"
+am__quote=
+# BSD make does it like this.
+echo '.include "confinc.mk" # ignored' > confmf.BSD
+# Other make implementations (GNU, Solaris 10, AIX) do it like this.
+echo 'include confinc.mk # ignored' > confmf.GNU
+_am_result=no
+for s in GNU BSD; do
+ AM_RUN_LOG([${MAKE-make} -f confmf.$s && cat confinc.out])
+ AS_CASE([$?:`cat confinc.out 2>/dev/null`],
+ ['0:this is the am__doit target'],
+ [AS_CASE([$s],
+ [BSD], [am__include='.include' am__quote='"'],
+ [am__include='include' am__quote=''])])
+ if test "$am__include" != "#"; then
+ _am_result="yes ($s style)"
+ break
+ fi
+done
+rm -f confinc.* confmf.*
+AC_MSG_RESULT([${_am_result}])
+AC_SUBST([am__include])])
+AC_SUBST([am__quote])])
+
+# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
+
+# Copyright (C) 1997-2021 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_MISSING_PROG(NAME, PROGRAM)
+# ------------------------------
+AC_DEFUN([AM_MISSING_PROG],
+[AC_REQUIRE([AM_MISSING_HAS_RUN])
+$1=${$1-"${am_missing_run}$2"}
+AC_SUBST($1)])
+
+# AM_MISSING_HAS_RUN
+# ------------------
+# Define MISSING if not defined so far and test if it is modern enough.
+# If it is, set am_missing_run to use it, otherwise, to nothing.
+AC_DEFUN([AM_MISSING_HAS_RUN],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+AC_REQUIRE_AUX_FILE([missing])dnl
+if test x"${MISSING+set}" != xset; then
+ MISSING="\${SHELL} '$am_aux_dir/missing'"
+fi
+# Use eval to expand $SHELL
+if eval "$MISSING --is-lightweight"; then
+ am_missing_run="$MISSING "
+else
+ am_missing_run=
+ AC_MSG_WARN(['missing' script is too old or missing])
+fi
+])
+
+# Helper functions for option handling. -*- Autoconf -*-
+
+# Copyright (C) 2001-2021 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# _AM_MANGLE_OPTION(NAME)
+# -----------------------
+AC_DEFUN([_AM_MANGLE_OPTION],
+[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
+
+# _AM_SET_OPTION(NAME)
+# --------------------
+# Set option NAME. Presently that only means defining a flag for this option.
+AC_DEFUN([_AM_SET_OPTION],
+[m4_define(_AM_MANGLE_OPTION([$1]), [1])])
+
+# _AM_SET_OPTIONS(OPTIONS)
+# ------------------------
+# OPTIONS is a space-separated list of Automake options.
+AC_DEFUN([_AM_SET_OPTIONS],
+[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
+
+# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
+# -------------------------------------------
+# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
+AC_DEFUN([_AM_IF_OPTION],
+[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
+
+# Copyright (C) 1999-2021 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# _AM_PROG_CC_C_O
+# ---------------
+# Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC
+# to automatically call this.
+AC_DEFUN([_AM_PROG_CC_C_O],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+AC_REQUIRE_AUX_FILE([compile])dnl
+AC_LANG_PUSH([C])dnl
+AC_CACHE_CHECK(
+ [whether $CC understands -c and -o together],
+ [am_cv_prog_cc_c_o],
+ [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])])
+ # Make sure it works both with $CC and with simple cc.
+ # Following AC_PROG_CC_C_O, we do the test twice because some
+ # compilers refuse to overwrite an existing .o file with -o,
+ # though they will create one.
+ am_cv_prog_cc_c_o=yes
+ for am_i in 1 2; do
+ if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \
+ && test -f conftest2.$ac_objext; then
+ : OK
+ else
+ am_cv_prog_cc_c_o=no
+ break
+ fi
+ done
+ rm -f core conftest*
+ unset am_i])
+if test "$am_cv_prog_cc_c_o" != yes; then
+ # Losing compiler, so override with the script.
+ # FIXME: It is wrong to rewrite CC.
+ # But if we don't then we get into trouble of one sort or another.
+ # A longer-term fix would be to have automake use am__CC in this case,
+ # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
+ CC="$am_aux_dir/compile $CC"
+fi
+AC_LANG_POP([C])])
+
+# For backward compatibility.
+AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
+
+# Copyright (C) 1999-2021 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+
+# AM_PATH_PYTHON([MINIMUM-VERSION], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
+# ---------------------------------------------------------------------------
+# Adds support for distributing Python modules and packages. To
+# install modules, copy them to $(pythondir), using the python_PYTHON
+# automake variable. To install a package with the same name as the
+# automake package, install to $(pkgpythondir), or use the
+# pkgpython_PYTHON automake variable.
+#
+# The variables $(pyexecdir) and $(pkgpyexecdir) are provided as
+# locations to install python extension modules (shared libraries).
+# Another macro is required to find the appropriate flags to compile
+# extension modules.
+#
+# If your package is configured with a different prefix to python,
+# users will have to add the install directory to the PYTHONPATH
+# environment variable, or create a .pth file (see the python
+# documentation for details).
+#
+# If the MINIMUM-VERSION argument is passed, AM_PATH_PYTHON will
+# cause an error if the version of python installed on the system
+# doesn't meet the requirement. MINIMUM-VERSION should consist of
+# numbers and dots only.
+AC_DEFUN([AM_PATH_PYTHON],
+ [
+ dnl Find a Python interpreter. Python versions prior to 2.0 are not
+ dnl supported. (2.0 was released on October 16, 2000).
+ m4_define_default([_AM_PYTHON_INTERPRETER_LIST],
+[python python2 python3 dnl
+ python3.11 python3.10 dnl
+ python3.9 python3.8 python3.7 python3.6 python3.5 python3.4 python3.3 dnl
+ python3.2 python3.1 python3.0 dnl
+ python2.7 python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 dnl
+ python2.0])
+
+ AC_ARG_VAR([PYTHON], [the Python interpreter])
+
+ m4_if([$1],[],[
+ dnl No version check is needed.
+ # Find any Python interpreter.
+ if test -z "$PYTHON"; then
+ AC_PATH_PROGS([PYTHON], _AM_PYTHON_INTERPRETER_LIST, :)
+ fi
+ am_display_PYTHON=python
+ ], [
+ dnl A version check is needed.
+ if test -n "$PYTHON"; then
+ # If the user set $PYTHON, use it and don't search something else.
+ AC_MSG_CHECKING([whether $PYTHON version is >= $1])
+ AM_PYTHON_CHECK_VERSION([$PYTHON], [$1],
+ [AC_MSG_RESULT([yes])],
+ [AC_MSG_RESULT([no])
+ AC_MSG_ERROR([Python interpreter is too old])])
+ am_display_PYTHON=$PYTHON
+ else
+ # Otherwise, try each interpreter until we find one that satisfies
+ # VERSION.
+ AC_CACHE_CHECK([for a Python interpreter with version >= $1],
+ [am_cv_pathless_PYTHON],[
+ for am_cv_pathless_PYTHON in _AM_PYTHON_INTERPRETER_LIST none; do
+ test "$am_cv_pathless_PYTHON" = none && break
+ AM_PYTHON_CHECK_VERSION([$am_cv_pathless_PYTHON], [$1], [break])
+ done])
+ # Set $PYTHON to the absolute path of $am_cv_pathless_PYTHON.
+ if test "$am_cv_pathless_PYTHON" = none; then
+ PYTHON=:
+ else
+ AC_PATH_PROG([PYTHON], [$am_cv_pathless_PYTHON])
+ fi
+ am_display_PYTHON=$am_cv_pathless_PYTHON
+ fi
+ ])
+
+ if test "$PYTHON" = :; then
+ dnl Run any user-specified action, or abort.
+ m4_default([$3], [AC_MSG_ERROR([no suitable Python interpreter found])])
+ else
+
+ dnl Query Python for its version number. Although site.py simply uses
+ dnl sys.version[:3], printing that failed with Python 3.10, since the
+ dnl trailing zero was eliminated. So now we output just the major
+ dnl and minor version numbers, as numbers. Apparently the tertiary
+ dnl version is not of interest.
+ dnl
+ AC_CACHE_CHECK([for $am_display_PYTHON version], [am_cv_python_version],
+ [am_cv_python_version=`$PYTHON -c "import sys; print ('%u.%u' % sys.version_info[[:2]])"`])
+ AC_SUBST([PYTHON_VERSION], [$am_cv_python_version])
+
+ dnl At times, e.g., when building shared libraries, you may want
+ dnl to know which OS platform Python thinks this is.
+ dnl
+ AC_CACHE_CHECK([for $am_display_PYTHON platform], [am_cv_python_platform],
+ [am_cv_python_platform=`$PYTHON -c "import sys; sys.stdout.write(sys.platform)"`])
+ AC_SUBST([PYTHON_PLATFORM], [$am_cv_python_platform])
+
+ dnl emacs-page
+ dnl If --with-python-sys-prefix is given, use the values of sys.prefix
+ dnl and sys.exec_prefix for the corresponding values of PYTHON_PREFIX
+ dnl and PYTHON_EXEC_PREFIX. Otherwise, use the GNU ${prefix} and
+ dnl ${exec_prefix} variables.
+ dnl
+ dnl The two are made distinct variables so they can be overridden if
+ dnl need be, although general consensus is that you shouldn't need
+ dnl this separation.
+ dnl
+ dnl Also allow directly setting the prefixes via configure options,
+ dnl overriding any default.
+ dnl
+ if test "x$prefix" = xNONE; then
+ am__usable_prefix=$ac_default_prefix
+ else
+ am__usable_prefix=$prefix
+ fi
+
+ # Allow user to request using sys.* values from Python,
+ # instead of the GNU $prefix values.
+ AC_ARG_WITH([python-sys-prefix],
+ [AS_HELP_STRING([--with-python-sys-prefix],
+ [use Python's sys.prefix and sys.exec_prefix values])],
+ [am_use_python_sys=:],
+ [am_use_python_sys=false])
+
+ # Allow user to override whatever the default Python prefix is.
+ AC_ARG_WITH([python_prefix],
+ [AS_HELP_STRING([--with-python_prefix],
+ [override the default PYTHON_PREFIX])],
+ [am_python_prefix_subst=$withval
+ am_cv_python_prefix=$withval
+ AC_MSG_CHECKING([for explicit $am_display_PYTHON prefix])
+ AC_MSG_RESULT([$am_cv_python_prefix])],
+ [
+ if $am_use_python_sys; then
+ # using python sys.prefix value, not GNU
+ AC_CACHE_CHECK([for python default $am_display_PYTHON prefix],
+ [am_cv_python_prefix],
+ [am_cv_python_prefix=`$PYTHON -c "import sys; sys.stdout.write(sys.prefix)"`])
+
+ dnl If sys.prefix is a subdir of $prefix, replace the literal value of
+ dnl $prefix with a variable reference so it can be overridden.
+ case $am_cv_python_prefix in
+ $am__usable_prefix*)
+ am__strip_prefix=`echo "$am__usable_prefix" | sed 's|.|.|g'`
+ am_python_prefix_subst=`echo "$am_cv_python_prefix" | sed "s,^$am__strip_prefix,\\${prefix},"`
+ ;;
+ *)
+ am_python_prefix_subst=$am_cv_python_prefix
+ ;;
+ esac
+ else # using GNU prefix value, not python sys.prefix
+ am_python_prefix_subst='${prefix}'
+ am_python_prefix=$am_python_prefix_subst
+ AC_MSG_CHECKING([for GNU default $am_display_PYTHON prefix])
+ AC_MSG_RESULT([$am_python_prefix])
+ fi])
+ # Substituting python_prefix_subst value.
+ AC_SUBST([PYTHON_PREFIX], [$am_python_prefix_subst])
+
+ # emacs-page Now do it all over again for Python exec_prefix, but with yet
+ # another conditional: fall back to regular prefix if that was specified.
+ AC_ARG_WITH([python_exec_prefix],
+ [AS_HELP_STRING([--with-python_exec_prefix],
+ [override the default PYTHON_EXEC_PREFIX])],
+ [am_python_exec_prefix_subst=$withval
+ am_cv_python_exec_prefix=$withval
+ AC_MSG_CHECKING([for explicit $am_display_PYTHON exec_prefix])
+ AC_MSG_RESULT([$am_cv_python_exec_prefix])],
+ [
+ # no explicit --with-python_exec_prefix, but if
+ # --with-python_prefix was given, use its value for python_exec_prefix too.
+ AS_IF([test -n "$with_python_prefix"],
+ [am_python_exec_prefix_subst=$with_python_prefix
+ am_cv_python_exec_prefix=$with_python_prefix
+ AC_MSG_CHECKING([for python_prefix-given $am_display_PYTHON exec_prefix])
+ AC_MSG_RESULT([$am_cv_python_exec_prefix])],
+ [
+ # Set am__usable_exec_prefix whether using GNU or Python values,
+ # since we use that variable for pyexecdir.
+ if test "x$exec_prefix" = xNONE; then
+ am__usable_exec_prefix=$am__usable_prefix
+ else
+ am__usable_exec_prefix=$exec_prefix
+ fi
+ #
+ if $am_use_python_sys; then # using python sys.exec_prefix, not GNU
+ AC_CACHE_CHECK([for python default $am_display_PYTHON exec_prefix],
+ [am_cv_python_exec_prefix],
+ [am_cv_python_exec_prefix=`$PYTHON -c "import sys; sys.stdout.write(sys.exec_prefix)"`])
+ dnl If sys.exec_prefix is a subdir of $exec_prefix, replace the
+ dnl literal value of $exec_prefix with a variable reference so it can
+ dnl be overridden.
+ case $am_cv_python_exec_prefix in
+ $am__usable_exec_prefix*)
+ am__strip_prefix=`echo "$am__usable_exec_prefix" | sed 's|.|.|g'`
+ am_python_exec_prefix_subst=`echo "$am_cv_python_exec_prefix" | sed "s,^$am__strip_prefix,\\${exec_prefix},"`
+ ;;
+ *)
+ am_python_exec_prefix_subst=$am_cv_python_exec_prefix
+ ;;
+ esac
+ else # using GNU $exec_prefix, not python sys.exec_prefix
+ am_python_exec_prefix_subst='${exec_prefix}'
+ am_python_exec_prefix=$am_python_exec_prefix_subst
+ AC_MSG_CHECKING([for GNU default $am_display_PYTHON exec_prefix])
+ AC_MSG_RESULT([$am_python_exec_prefix])
+ fi])])
+ # Substituting python_exec_prefix_subst.
+ AC_SUBST([PYTHON_EXEC_PREFIX], [$am_python_exec_prefix_subst])
+
+ # Factor out some code duplication into this shell variable.
+ am_python_setup_sysconfig="\
+import sys
+# Prefer sysconfig over distutils.sysconfig, for better compatibility
+# with python 3.x. See automake bug#10227.
+try:
+ import sysconfig
+except ImportError:
+ can_use_sysconfig = 0
+else:
+ can_use_sysconfig = 1
+# Can't use sysconfig in CPython 2.7, since it's broken in virtualenvs:
+# <https://github.com/pypa/virtualenv/issues/118>
+try:
+ from platform import python_implementation
+ if python_implementation() == 'CPython' and sys.version[[:3]] == '2.7':
+ can_use_sysconfig = 0
+except ImportError:
+ pass"
+
+ dnl emacs-page Set up 4 directories:
+
+ dnl 1. pythondir: where to install python scripts. This is the
+ dnl site-packages directory, not the python standard library
+ dnl directory like in previous automake betas. This behavior
+ dnl is more consistent with lispdir.m4 for example.
+ dnl Query distutils for this directory.
+ dnl
+ AC_CACHE_CHECK([for $am_display_PYTHON script directory (pythondir)],
+ [am_cv_python_pythondir],
+ [if test "x$am_cv_python_prefix" = x; then
+ am_py_prefix=$am__usable_prefix
+ else
+ am_py_prefix=$am_cv_python_prefix
+ fi
+ am_cv_python_pythondir=`$PYTHON -c "
+$am_python_setup_sysconfig
+if can_use_sysconfig:
+ if hasattr(sysconfig, 'get_default_scheme'):
+ scheme = sysconfig.get_default_scheme()
+ else:
+ scheme = sysconfig._get_default_scheme()
+ if scheme == 'posix_local':
+ # Debian's default scheme installs to /usr/local/ but we want to find headers in /usr/
+ scheme = 'posix_prefix'
+ sitedir = sysconfig.get_path('purelib', scheme, vars={'base':'$am_py_prefix'})
+else:
+ from distutils import sysconfig
+ sitedir = sysconfig.get_python_lib(0, 0, prefix='$am_py_prefix')
+sys.stdout.write(sitedir)"`
+ #
+ case $am_cv_python_pythondir in
+ $am_py_prefix*)
+ am__strip_prefix=`echo "$am_py_prefix" | sed 's|.|.|g'`
+ am_cv_python_pythondir=`echo "$am_cv_python_pythondir" | sed "s,^$am__strip_prefix,\\${PYTHON_PREFIX},"`
+ ;;
+ *)
+ case $am_py_prefix in
+ /usr|/System*) ;;
+ *) am_cv_python_pythondir="\${PYTHON_PREFIX}/lib/python$PYTHON_VERSION/site-packages"
+ ;;
+ esac
+ ;;
+ esac
+ ])
+ AC_SUBST([pythondir], [$am_cv_python_pythondir])
+
+ dnl 2. pkgpythondir: $PACKAGE directory under pythondir. Was
+ dnl PYTHON_SITE_PACKAGE in previous betas, but this naming is
+ dnl more consistent with the rest of automake.
+ dnl
+ AC_SUBST([pkgpythondir], [\${pythondir}/$PACKAGE])
+
+ dnl 3. pyexecdir: directory for installing python extension modules
+ dnl (shared libraries).
+ dnl Query distutils for this directory.
+ dnl
+ AC_CACHE_CHECK([for $am_display_PYTHON extension module directory (pyexecdir)],
+ [am_cv_python_pyexecdir],
+ [if test "x$am_cv_python_exec_prefix" = x; then
+ am_py_exec_prefix=$am__usable_exec_prefix
+ else
+ am_py_exec_prefix=$am_cv_python_exec_prefix
+ fi
+ am_cv_python_pyexecdir=`$PYTHON -c "
+$am_python_setup_sysconfig
+if can_use_sysconfig:
+ if hasattr(sysconfig, 'get_default_scheme'):
+ scheme = sysconfig.get_default_scheme()
+ else:
+ scheme = sysconfig._get_default_scheme()
+ if scheme == 'posix_local':
+ # Debian's default scheme installs to /usr/local/ but we want to find headers in /usr/
+ scheme = 'posix_prefix'
+ sitedir = sysconfig.get_path('platlib', scheme, vars={'platbase':'$am_py_exec_prefix'})
+else:
+ from distutils import sysconfig
+ sitedir = sysconfig.get_python_lib(1, 0, prefix='$am_py_exec_prefix')
+sys.stdout.write(sitedir)"`
+ #
+ case $am_cv_python_pyexecdir in
+ $am_py_exec_prefix*)
+ am__strip_prefix=`echo "$am_py_exec_prefix" | sed 's|.|.|g'`
+ am_cv_python_pyexecdir=`echo "$am_cv_python_pyexecdir" | sed "s,^$am__strip_prefix,\\${PYTHON_EXEC_PREFIX},"`
+ ;;
+ *)
+ case $am_py_exec_prefix in
+ /usr|/System*) ;;
+ *) am_cv_python_pyexecdir="\${PYTHON_EXEC_PREFIX}/lib/python$PYTHON_VERSION/site-packages"
+ ;;
+ esac
+ ;;
+ esac
+ ])
+ AC_SUBST([pyexecdir], [$am_cv_python_pyexecdir])
+
+ dnl 4. pkgpyexecdir: $(pyexecdir)/$(PACKAGE)
+ dnl
+ AC_SUBST([pkgpyexecdir], [\${pyexecdir}/$PACKAGE])
+
+ dnl Run any user-specified action.
+ $2
+ fi
+])
+
+
+# AM_PYTHON_CHECK_VERSION(PROG, VERSION, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
+# ---------------------------------------------------------------------------
+# Run ACTION-IF-TRUE if the Python interpreter PROG has version >= VERSION.
+# Run ACTION-IF-FALSE otherwise.
+# This test uses sys.hexversion instead of the string equivalent (first
+# word of sys.version), in order to cope with versions such as 2.2c1.
+# This supports Python 2.0 or higher. (2.0 was released on October 16, 2000).
+AC_DEFUN([AM_PYTHON_CHECK_VERSION],
+ [prog="import sys
+# split strings by '.' and convert to numeric. Append some zeros
+# because we need at least 4 digits for the hex conversion.
+# map returns an iterator in Python 3.0 and a list in 2.x
+minver = list(map(int, '$2'.split('.'))) + [[0, 0, 0]]
+minverhex = 0
+# xrange is not present in Python 3.0 and range returns an iterator
+for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[[i]]
+sys.exit(sys.hexversion < minverhex)"
+ AS_IF([AM_RUN_LOG([$1 -c "$prog"])], [$3], [$4])])
+
+# Copyright (C) 2001-2021 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_RUN_LOG(COMMAND)
+# -------------------
+# Run COMMAND, save the exit status in ac_status, and log it.
+# (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
+AC_DEFUN([AM_RUN_LOG],
+[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
+ ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
+ (exit $ac_status); }])
+
+# Check to make sure that the build environment is sane. -*- Autoconf -*-
+
+# Copyright (C) 1996-2021 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_SANITY_CHECK
+# ---------------
+AC_DEFUN([AM_SANITY_CHECK],
+[AC_MSG_CHECKING([whether build environment is sane])
+# Reject unsafe characters in $srcdir or the absolute working directory
+# name. Accept space and tab only in the latter.
+am_lf='
+'
+case `pwd` in
+ *[[\\\"\#\$\&\'\`$am_lf]]*)
+ AC_MSG_ERROR([unsafe absolute working directory name]);;
+esac
+case $srcdir in
+ *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
+ AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
+esac
+
+# Do 'set' in a subshell so we don't clobber the current shell's
+# arguments. Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+ am_has_slept=no
+ for am_try in 1 2; do
+ echo "timestamp, slept: $am_has_slept" > conftest.file
+ set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
+ if test "$[*]" = "X"; then
+ # -L didn't work.
+ set X `ls -t "$srcdir/configure" conftest.file`
+ fi
+ if test "$[*]" != "X $srcdir/configure conftest.file" \
+ && test "$[*]" != "X conftest.file $srcdir/configure"; then
+
+ # If neither matched, then we have a broken ls. This can happen
+ # if, for instance, CONFIG_SHELL is bash and it inherits a
+ # broken ls alias from the environment. This has actually
+ # happened. Such a system could not be considered "sane".
+ AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
+ alias in your environment])
+ fi
+ if test "$[2]" = conftest.file || test $am_try -eq 2; then
+ break
+ fi
+ # Just in case.
+ sleep 1
+ am_has_slept=yes
+ done
+ test "$[2]" = conftest.file
+ )
+then
+ # Ok.
+ :
+else
+ AC_MSG_ERROR([newly created file is older than distributed files!
+Check your system clock])
+fi
+AC_MSG_RESULT([yes])
+# If we didn't sleep, we still need to ensure time stamps of config.status and
+# generated files are strictly newer.
+am_sleep_pid=
+if grep 'slept: no' conftest.file >/dev/null 2>&1; then
+ ( sleep 1 ) &
+ am_sleep_pid=$!
+fi
+AC_CONFIG_COMMANDS_PRE(
+ [AC_MSG_CHECKING([that generated files are newer than configure])
+ if test -n "$am_sleep_pid"; then
+ # Hide warnings about reused PIDs.
+ wait $am_sleep_pid 2>/dev/null
+ fi
+ AC_MSG_RESULT([done])])
+rm -f conftest.file
+])
+
+# Copyright (C) 2009-2021 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_SILENT_RULES([DEFAULT])
+# --------------------------
+# Enable less verbose build rules; with the default set to DEFAULT
+# ("yes" being less verbose, "no" or empty being verbose).
+AC_DEFUN([AM_SILENT_RULES],
+[AC_ARG_ENABLE([silent-rules], [dnl
+AS_HELP_STRING(
+ [--enable-silent-rules],
+ [less verbose build output (undo: "make V=1")])
+AS_HELP_STRING(
+ [--disable-silent-rules],
+ [verbose build output (undo: "make V=0")])dnl
+])
+case $enable_silent_rules in @%:@ (((
+ yes) AM_DEFAULT_VERBOSITY=0;;
+ no) AM_DEFAULT_VERBOSITY=1;;
+ *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
+esac
+dnl
+dnl A few 'make' implementations (e.g., NonStop OS and NextStep)
+dnl do not support nested variable expansions.
+dnl See automake bug#9928 and bug#10237.
+am_make=${MAKE-make}
+AC_CACHE_CHECK([whether $am_make supports nested variables],
+ [am_cv_make_support_nested_variables],
+ [if AS_ECHO([['TRUE=$(BAR$(V))
+BAR0=false
+BAR1=true
+V=1
+am__doit:
+ @$(TRUE)
+.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
+ am_cv_make_support_nested_variables=yes
+else
+ am_cv_make_support_nested_variables=no
+fi])
+if test $am_cv_make_support_nested_variables = yes; then
+ dnl Using '$V' instead of '$(V)' breaks IRIX make.
+ AM_V='$(V)'
+ AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
+else
+ AM_V=$AM_DEFAULT_VERBOSITY
+ AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
+fi
+AC_SUBST([AM_V])dnl
+AM_SUBST_NOTMAKE([AM_V])dnl
+AC_SUBST([AM_DEFAULT_V])dnl
+AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
+AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
+AM_BACKSLASH='\'
+AC_SUBST([AM_BACKSLASH])dnl
+_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
+])
+
+# Copyright (C) 2001-2021 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_PROG_INSTALL_STRIP
+# ---------------------
+# One issue with vendor 'install' (even GNU) is that you can't
+# specify the program used to strip binaries. This is especially
+# annoying in cross-compiling environments, where the build's strip
+# is unlikely to handle the host's binaries.
+# Fortunately install-sh will honor a STRIPPROG variable, so we
+# always use install-sh in "make install-strip", and initialize
+# STRIPPROG with the value of the STRIP variable (set by the user).
+AC_DEFUN([AM_PROG_INSTALL_STRIP],
+[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
+# Installed binaries are usually stripped using 'strip' when the user
+# run "make install-strip". However 'strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the 'STRIP' environment variable to overrule this program.
+dnl Don't test for $cross_compiling = yes, because it might be 'maybe'.
+if test "$cross_compiling" != no; then
+ AC_CHECK_TOOL([STRIP], [strip], :)
+fi
+INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
+AC_SUBST([INSTALL_STRIP_PROGRAM])])
+
+# Copyright (C) 2006-2021 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# _AM_SUBST_NOTMAKE(VARIABLE)
+# ---------------------------
+# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
+# This macro is traced by Automake.
+AC_DEFUN([_AM_SUBST_NOTMAKE])
+
+# AM_SUBST_NOTMAKE(VARIABLE)
+# --------------------------
+# Public sister of _AM_SUBST_NOTMAKE.
+AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
+
+# Check how to create a tarball. -*- Autoconf -*-
+
+# Copyright (C) 2004-2021 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# _AM_PROG_TAR(FORMAT)
+# --------------------
+# Check how to create a tarball in format FORMAT.
+# FORMAT should be one of 'v7', 'ustar', or 'pax'.
+#
+# Substitute a variable $(am__tar) that is a command
+# writing to stdout a FORMAT-tarball containing the directory
+# $tardir.
+# tardir=directory && $(am__tar) > result.tar
+#
+# Substitute a variable $(am__untar) that extract such
+# a tarball read from stdin.
+# $(am__untar) < result.tar
+#
+AC_DEFUN([_AM_PROG_TAR],
+[# Always define AMTAR for backward compatibility. Yes, it's still used
+# in the wild :-( We should find a proper way to deprecate it ...
+AC_SUBST([AMTAR], ['$${TAR-tar}'])
+
+# We'll loop over all known methods to create a tar archive until one works.
+_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
+
+m4_if([$1], [v7],
+ [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
+
+ [m4_case([$1],
+ [ustar],
+ [# The POSIX 1988 'ustar' format is defined with fixed-size fields.
+ # There is notably a 21 bits limit for the UID and the GID. In fact,
+ # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
+ # and bug#13588).
+ am_max_uid=2097151 # 2^21 - 1
+ am_max_gid=$am_max_uid
+ # The $UID and $GID variables are not portable, so we need to resort
+ # to the POSIX-mandated id(1) utility. Errors in the 'id' calls
+ # below are definitely unexpected, so allow the users to see them
+ # (that is, avoid stderr redirection).
+ am_uid=`id -u || echo unknown`
+ am_gid=`id -g || echo unknown`
+ AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
+ if test $am_uid -le $am_max_uid; then
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_RESULT([no])
+ _am_tools=none
+ fi
+ AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
+ if test $am_gid -le $am_max_gid; then
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_RESULT([no])
+ _am_tools=none
+ fi],
+
+ [pax],
+ [],
+
+ [m4_fatal([Unknown tar format])])
+
+ AC_MSG_CHECKING([how to create a $1 tar archive])
+
+ # Go ahead even if we have the value already cached. We do so because we
+ # need to set the values for the 'am__tar' and 'am__untar' variables.
+ _am_tools=${am_cv_prog_tar_$1-$_am_tools}
+
+ for _am_tool in $_am_tools; do
+ case $_am_tool in
+ gnutar)
+ for _am_tar in tar gnutar gtar; do
+ AM_RUN_LOG([$_am_tar --version]) && break
+ done
+ am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
+ am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
+ am__untar="$_am_tar -xf -"
+ ;;
+ plaintar)
+ # Must skip GNU tar: if it does not support --format= it doesn't create
+ # ustar tarball either.
+ (tar --version) >/dev/null 2>&1 && continue
+ am__tar='tar chf - "$$tardir"'
+ am__tar_='tar chf - "$tardir"'
+ am__untar='tar xf -'
+ ;;
+ pax)
+ am__tar='pax -L -x $1 -w "$$tardir"'
+ am__tar_='pax -L -x $1 -w "$tardir"'
+ am__untar='pax -r'
+ ;;
+ cpio)
+ am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
+ am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
+ am__untar='cpio -i -H $1 -d'
+ ;;
+ none)
+ am__tar=false
+ am__tar_=false
+ am__untar=false
+ ;;
+ esac
+
+ # If the value was cached, stop now. We just wanted to have am__tar
+ # and am__untar set.
+ test -n "${am_cv_prog_tar_$1}" && break
+
+ # tar/untar a dummy directory, and stop if the command works.
+ rm -rf conftest.dir
+ mkdir conftest.dir
+ echo GrepMe > conftest.dir/file
+ AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
+ rm -rf conftest.dir
+ if test -s conftest.tar; then
+ AM_RUN_LOG([$am__untar <conftest.tar])
+ AM_RUN_LOG([cat conftest.dir/file])
+ grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
+ fi
+ done
+ rm -rf conftest.dir
+
+ AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
+ AC_MSG_RESULT([$am_cv_prog_tar_$1])])
+
+AC_SUBST([am__tar])
+AC_SUBST([am__untar])
+]) # _AM_PROG_TAR
+
+m4_include([m4/ax_cxx_compile_stdcxx.m4])
+m4_include([m4/ax_cxx_compile_stdcxx_17.m4])
+m4_include([m4/boost.m4])
+m4_include([m4/libtool.m4])
+m4_include([m4/ltoptions.m4])
+m4_include([m4/ltsugar.m4])
+m4_include([m4/ltversion.m4])
+m4_include([m4/lt~obsolete.m4])
diff --git a/autogen.sh b/autogen.sh
new file mode 100755
index 0000000..f31e951
--- /dev/null
+++ b/autogen.sh
@@ -0,0 +1,16 @@
+#!/bin/sh
+
+srcdir=`dirname $0`
+test -z "$srcdir" && srcdir=.
+
+olddir=`pwd`
+cd $srcdir
+
+autoreconf -i || {
+ echo "error: autoreconf failed"
+ exit 1
+}
+
+if test x$NOCONFIGURE = x; then
+ ./configure $@
+fi
diff --git a/bin/env.sh.in b/bin/env.sh.in
new file mode 100644
index 0000000..4b56d5f
--- /dev/null
+++ b/bin/env.sh.in
@@ -0,0 +1,2 @@
+export IXION_LIBNAME=libixion-@IXION_API_VERSION@.0
+export IXION_INSTLIBDIR=@prefix@`echo "@libdir@" | sed -e 's/{.*}//g'`
diff --git a/bin/gen-gfm-release-table.sh b/bin/gen-gfm-release-table.sh
new file mode 100755
index 0000000..f7ee681
--- /dev/null
+++ b/bin/gen-gfm-release-table.sh
@@ -0,0 +1,30 @@
+#!/usr/bin/env bash
+
+PROJ_PREFIX=ixion
+PKG_PREFIX=lib$PROJ_PREFIX
+
+# Pick up the version number string from configure.ac.
+VER_MAJOR=$(cat ./configure.ac | grep -E "ixion_major_version.*[0-9]" | sed -e "s/.*\[\([0-9][0-9]*\).*/\1/g")
+VER_MINOR=$(cat ./configure.ac | grep -E "ixion_minor_version.*[0-9]" | sed -e "s/.*\[\([0-9][0-9]*\).*/\1/g")
+VER_MICRO=$(cat ./configure.ac | grep -E "ixion_micro_version.*[0-9]" | sed -e "s/.*\[\([0-9][0-9]*\).*/\1/g")
+VER="$VER_MAJOR.$VER_MINOR.$VER_MICRO"
+
+PKGS=$(ls $PKG_PREFIX-$VER.tar.*)
+
+echo "## Release Notes"
+echo ""
+echo "* add item"
+echo ""
+echo "## Source packages for distribution"
+echo ""
+
+echo "| URL | sha256sum | size |"
+echo "|-----|-----------|------|"
+
+for _PKG in $PKGS; do
+ _URL="[$_PKG](https://kohei.us/files/$PROJ_PREFIX/src/$_PKG)"
+ _HASH=$(sha256sum $_PKG | sed -e "s/^\(.*\)$PKG_PREFIX.*/\1/g" | tr -d "[:space:]")
+ _SIZE=$(stat -c "%s" $_PKG)
+ echo "| $_URL | $_HASH | $_SIZE |"
+done
+
diff --git a/bin/gen-spirv-shader-arrays.py b/bin/gen-spirv-shader-arrays.py
new file mode 100755
index 0000000..33fcfc9
--- /dev/null
+++ b/bin/gen-spirv-shader-arrays.py
@@ -0,0 +1,87 @@
+#!/usr/bin/env python3
+"""Generate SPIR-V blob arrays as C++ inline file.
+
+Install shaderc from https://github.com/google/shaderc/, and run:
+
+./bin/gen-spirv-shader-arrays.py -d src/libixion/shaders -o src/libixion/vulkan_spirv_blobs.inl
+"""
+
+import argparse
+import os
+import shutil
+import sys
+import subprocess
+import tempfile
+from pathlib import Path
+
+
+def _write_cpp_byte_array(array_name, bytes, file):
+ print("// This file has been auto-generated. DO NOT EDIT THIS FILE BY HAND!", file=file)
+ print(file=file)
+ print(f"uint8_t {array_name}_spirv[] = {{", file=file)
+
+ bytes_per_line = 8
+
+ for i, b in enumerate(bytes):
+
+ if i % bytes_per_line == 0:
+ print(" ", end="", file=file)
+
+ print(f"0x{b:02X}, ", end="", file=file)
+
+ if (i + 1) % bytes_per_line == 0:
+ print(file=file)
+
+ print(file=file)
+ print("};", file=file)
+ print(file=file)
+
+
+def _scan_shader_dir(dirpath, output):
+ # Detect glslc command.
+ glslc_exec = shutil.which("glslc")
+
+ if not glslc_exec:
+ print("glslc command not found in your PATH.", file=sys.stderr)
+ sys.exit(1)
+
+ print(f"glslc command: {glslc_exec}")
+
+ temp = tempfile.NamedTemporaryFile(delete=False)
+ print(f"temp file name: {temp.name}")
+
+ for f in os.listdir(dirpath):
+ filepath = dirpath / f
+ if filepath.suffix != ".comp":
+ continue
+
+ print(f"parsing {filepath}")
+ cmd = [glslc_exec, filepath, "-o", temp.name]
+ subprocess.run(cmd)
+ spirv_file = Path(temp.name)
+ bs = spirv_file.read_bytes()
+ _write_cpp_byte_array(filepath.stem, bs, output)
+
+ os.unlink(temp.name)
+
+
+def main():
+ parser = argparse.ArgumentParser(
+ description="Generate C++ inline file containing SPIR-V representations of GLSL shaders.")
+ parser.add_argument(
+ "--shader-dir", "-d", type=Path,
+ required=True,
+ help="Path to directory where glsl shader files are.")
+ parser.add_argument(
+ "--output", "-o", type=Path,
+ required=True,
+ help="Path to output C++ inline file.")
+ args = parser.parse_args()
+
+ with args.output.open(mode="w") as output:
+ _scan_shader_dir(args.shader_dir, output)
+
+
+if __name__ == "__main__":
+ main()
+
diff --git a/bin/run-python-test-osx.sh b/bin/run-python-test-osx.sh
new file mode 100755
index 0000000..d2d40b8
--- /dev/null
+++ b/bin/run-python-test-osx.sh
@@ -0,0 +1,36 @@
+#!/usr/bin/env bash
+
+# I have to write this wrapper for OSX because ixion.so module is hardcoded to
+# find libixion-<version>.dylib to the installed location, and the only way to
+# have it use libixion-<version>.dylib in src/libixion/.libs is to physically
+# re-write the path in ixion.so.
+
+PROGDIR=$(dirname $0)
+source $PROGDIR/env.sh
+
+TESTPYTHONPATH=$PROGDIR/../src/python/.test
+PYTESTFILEDIR=$PROGDIR/../test/python
+
+# Copy ixion.so into the special test directory.
+mkdir -p $TESTPYTHONPATH
+cp $PROGDIR/../src/python/.libs/ixion.so $TESTPYTHONPATH/
+
+echo "library installation directory: $IXION_INSTLIBDIR"
+echo "library base name: $IXION_LIBNAME"
+
+# Re-write the path to libixion.dylib in ixion.so.
+install_name_tool -change \
+ $IXION_INSTLIBDIR/$IXION_LIBNAME.dylib \
+ $PROGDIR/../src/libixion/.libs/$IXION_LIBNAME.dylib \
+ $TESTPYTHONPATH/ixion.so
+
+# Use that ixion.so module to run the tests.
+export PYTHONPATH=$TESTPYTHONPATH
+
+TESTS=$(ls $PYTESTFILEDIR/*.py)
+
+for _file in $TESTS; do
+ echo running $_file...
+ $_file
+done
+
diff --git a/bin/run-python.sh b/bin/run-python.sh
new file mode 100755
index 0000000..ae8a53e
--- /dev/null
+++ b/bin/run-python.sh
@@ -0,0 +1,51 @@
+#!/usr/bin/env bash
+
+PYTHON=$(which python3)
+PROGDIR=`dirname $0`
+_PYTHONPATH="$PROGDIR/../src/python/.libs:$PROGDIR/../src/python"
+
+export PYTHONPATH=$_PYTHONPATH
+export LD_LIBRARY_PATH="$PROGDIR/../src/libixion/.libs"
+export DYLD_LIBRARY_PATH=$LD_LIBRARY_PATH
+
+if [ "$1" == "" ]; then
+ # No input file. Just invoke the interpreter.
+ $PYTHON
+ exit 0
+fi
+
+RUNMODE=
+
+if [ "$1" == "gdb" ]; then
+ RUNMODE=gdb
+ shift
+elif [ "$1" == "valgrind" ]; then
+ RUNMODE=valgrind
+ shift
+fi
+
+if [ ! -e "$1" ]; then
+ echo "file '$1' does not exist"
+ exit 1
+fi
+
+EXEC="$1"
+shift
+
+case $RUNMODE in
+ gdb)
+ gdb --args $PYTHON "$PWD/$EXEC" "$@"
+ ;;
+ valgrind)
+ valgrind --tool=memcheck --leak-check=full --show-leak-kinds=all --track-origins=yes $PYTHON "$PWD/$EXEC" "$@"
+ ;;
+ *)
+ exec "$PWD/$EXEC" "$@"
+ ;;
+esac
+
+#CMD="$1"
+#shift
+#exec $PWD/$CMD "$@"
+
+
diff --git a/compile b/compile
new file mode 100755
index 0000000..df363c8
--- /dev/null
+++ b/compile
@@ -0,0 +1,348 @@
+#! /bin/sh
+# Wrapper for compilers which do not understand '-c -o'.
+
+scriptversion=2018-03-07.03; # UTC
+
+# Copyright (C) 1999-2021 Free Software Foundation, Inc.
+# Written by Tom Tromey <tromey@cygnus.com>.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# This file is maintained in Automake, please report
+# bugs to <bug-automake@gnu.org> or send patches to
+# <automake-patches@gnu.org>.
+
+nl='
+'
+
+# We need space, tab and new line, in precisely that order. Quoting is
+# there to prevent tools from complaining about whitespace usage.
+IFS=" "" $nl"
+
+file_conv=
+
+# func_file_conv build_file lazy
+# Convert a $build file to $host form and store it in $file
+# Currently only supports Windows hosts. If the determined conversion
+# type is listed in (the comma separated) LAZY, no conversion will
+# take place.
+func_file_conv ()
+{
+ file=$1
+ case $file in
+ / | /[!/]*) # absolute file, and not a UNC file
+ if test -z "$file_conv"; then
+ # lazily determine how to convert abs files
+ case `uname -s` in
+ MINGW*)
+ file_conv=mingw
+ ;;
+ CYGWIN* | MSYS*)
+ file_conv=cygwin
+ ;;
+ *)
+ file_conv=wine
+ ;;
+ esac
+ fi
+ case $file_conv/,$2, in
+ *,$file_conv,*)
+ ;;
+ mingw/*)
+ file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
+ ;;
+ cygwin/* | msys/*)
+ file=`cygpath -m "$file" || echo "$file"`
+ ;;
+ wine/*)
+ file=`winepath -w "$file" || echo "$file"`
+ ;;
+ esac
+ ;;
+ esac
+}
+
+# func_cl_dashL linkdir
+# Make cl look for libraries in LINKDIR
+func_cl_dashL ()
+{
+ func_file_conv "$1"
+ if test -z "$lib_path"; then
+ lib_path=$file
+ else
+ lib_path="$lib_path;$file"
+ fi
+ linker_opts="$linker_opts -LIBPATH:$file"
+}
+
+# func_cl_dashl library
+# Do a library search-path lookup for cl
+func_cl_dashl ()
+{
+ lib=$1
+ found=no
+ save_IFS=$IFS
+ IFS=';'
+ for dir in $lib_path $LIB
+ do
+ IFS=$save_IFS
+ if $shared && test -f "$dir/$lib.dll.lib"; then
+ found=yes
+ lib=$dir/$lib.dll.lib
+ break
+ fi
+ if test -f "$dir/$lib.lib"; then
+ found=yes
+ lib=$dir/$lib.lib
+ break
+ fi
+ if test -f "$dir/lib$lib.a"; then
+ found=yes
+ lib=$dir/lib$lib.a
+ break
+ fi
+ done
+ IFS=$save_IFS
+
+ if test "$found" != yes; then
+ lib=$lib.lib
+ fi
+}
+
+# func_cl_wrapper cl arg...
+# Adjust compile command to suit cl
+func_cl_wrapper ()
+{
+ # Assume a capable shell
+ lib_path=
+ shared=:
+ linker_opts=
+ for arg
+ do
+ if test -n "$eat"; then
+ eat=
+ else
+ case $1 in
+ -o)
+ # configure might choose to run compile as 'compile cc -o foo foo.c'.
+ eat=1
+ case $2 in
+ *.o | *.[oO][bB][jJ])
+ func_file_conv "$2"
+ set x "$@" -Fo"$file"
+ shift
+ ;;
+ *)
+ func_file_conv "$2"
+ set x "$@" -Fe"$file"
+ shift
+ ;;
+ esac
+ ;;
+ -I)
+ eat=1
+ func_file_conv "$2" mingw
+ set x "$@" -I"$file"
+ shift
+ ;;
+ -I*)
+ func_file_conv "${1#-I}" mingw
+ set x "$@" -I"$file"
+ shift
+ ;;
+ -l)
+ eat=1
+ func_cl_dashl "$2"
+ set x "$@" "$lib"
+ shift
+ ;;
+ -l*)
+ func_cl_dashl "${1#-l}"
+ set x "$@" "$lib"
+ shift
+ ;;
+ -L)
+ eat=1
+ func_cl_dashL "$2"
+ ;;
+ -L*)
+ func_cl_dashL "${1#-L}"
+ ;;
+ -static)
+ shared=false
+ ;;
+ -Wl,*)
+ arg=${1#-Wl,}
+ save_ifs="$IFS"; IFS=','
+ for flag in $arg; do
+ IFS="$save_ifs"
+ linker_opts="$linker_opts $flag"
+ done
+ IFS="$save_ifs"
+ ;;
+ -Xlinker)
+ eat=1
+ linker_opts="$linker_opts $2"
+ ;;
+ -*)
+ set x "$@" "$1"
+ shift
+ ;;
+ *.cc | *.CC | *.cxx | *.CXX | *.[cC]++)
+ func_file_conv "$1"
+ set x "$@" -Tp"$file"
+ shift
+ ;;
+ *.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO])
+ func_file_conv "$1" mingw
+ set x "$@" "$file"
+ shift
+ ;;
+ *)
+ set x "$@" "$1"
+ shift
+ ;;
+ esac
+ fi
+ shift
+ done
+ if test -n "$linker_opts"; then
+ linker_opts="-link$linker_opts"
+ fi
+ exec "$@" $linker_opts
+ exit 1
+}
+
+eat=
+
+case $1 in
+ '')
+ echo "$0: No command. Try '$0 --help' for more information." 1>&2
+ exit 1;
+ ;;
+ -h | --h*)
+ cat <<\EOF
+Usage: compile [--help] [--version] PROGRAM [ARGS]
+
+Wrapper for compilers which do not understand '-c -o'.
+Remove '-o dest.o' from ARGS, run PROGRAM with the remaining
+arguments, and rename the output as expected.
+
+If you are trying to build a whole package this is not the
+right script to run: please start by reading the file 'INSTALL'.
+
+Report bugs to <bug-automake@gnu.org>.
+EOF
+ exit $?
+ ;;
+ -v | --v*)
+ echo "compile $scriptversion"
+ exit $?
+ ;;
+ cl | *[/\\]cl | cl.exe | *[/\\]cl.exe | \
+ icl | *[/\\]icl | icl.exe | *[/\\]icl.exe )
+ func_cl_wrapper "$@" # Doesn't return...
+ ;;
+esac
+
+ofile=
+cfile=
+
+for arg
+do
+ if test -n "$eat"; then
+ eat=
+ else
+ case $1 in
+ -o)
+ # configure might choose to run compile as 'compile cc -o foo foo.c'.
+ # So we strip '-o arg' only if arg is an object.
+ eat=1
+ case $2 in
+ *.o | *.obj)
+ ofile=$2
+ ;;
+ *)
+ set x "$@" -o "$2"
+ shift
+ ;;
+ esac
+ ;;
+ *.c)
+ cfile=$1
+ set x "$@" "$1"
+ shift
+ ;;
+ *)
+ set x "$@" "$1"
+ shift
+ ;;
+ esac
+ fi
+ shift
+done
+
+if test -z "$ofile" || test -z "$cfile"; then
+ # If no '-o' option was seen then we might have been invoked from a
+ # pattern rule where we don't need one. That is ok -- this is a
+ # normal compilation that the losing compiler can handle. If no
+ # '.c' file was seen then we are probably linking. That is also
+ # ok.
+ exec "$@"
+fi
+
+# Name of file we expect compiler to create.
+cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'`
+
+# Create the lock directory.
+# Note: use '[/\\:.-]' here to ensure that we don't use the same name
+# that we are using for the .o file. Also, base the name on the expected
+# object file name, since that is what matters with a parallel build.
+lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d
+while true; do
+ if mkdir "$lockdir" >/dev/null 2>&1; then
+ break
+ fi
+ sleep 1
+done
+# FIXME: race condition here if user kills between mkdir and trap.
+trap "rmdir '$lockdir'; exit 1" 1 2 15
+
+# Run the compile.
+"$@"
+ret=$?
+
+if test -f "$cofile"; then
+ test "$cofile" = "$ofile" || mv "$cofile" "$ofile"
+elif test -f "${cofile}bj"; then
+ test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile"
+fi
+
+rmdir "$lockdir"
+exit $ret
+
+# Local Variables:
+# mode: shell-script
+# sh-indentation: 2
+# eval: (add-hook 'before-save-hook 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-time-zone: "UTC0"
+# time-stamp-end: "; # UTC"
+# End:
diff --git a/config.guess b/config.guess
new file mode 100755
index 0000000..7f76b62
--- /dev/null
+++ b/config.guess
@@ -0,0 +1,1754 @@
+#! /bin/sh
+# Attempt to guess a canonical system name.
+# Copyright 1992-2022 Free Software Foundation, Inc.
+
+# shellcheck disable=SC2006,SC2268 # see below for rationale
+
+timestamp='2022-01-09'
+
+# This file is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, see <https://www.gnu.org/licenses/>.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that
+# program. This Exception is an additional permission under section 7
+# of the GNU General Public License, version 3 ("GPLv3").
+#
+# Originally written by Per Bothner; maintained since 2000 by Ben Elliston.
+#
+# You can get the latest version of this script from:
+# https://git.savannah.gnu.org/cgit/config.git/plain/config.guess
+#
+# Please send patches to <config-patches@gnu.org>.
+
+
+# The "shellcheck disable" line above the timestamp inhibits complaints
+# about features and limitations of the classic Bourne shell that were
+# superseded or lifted in POSIX. However, this script identifies a wide
+# variety of pre-POSIX systems that do not have POSIX shells at all, and
+# even some reasonably current systems (Solaris 10 as case-in-point) still
+# have a pre-POSIX /bin/sh.
+
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION]
+
+Output the configuration name of the system \`$me' is run on.
+
+Options:
+ -h, --help print this help, then exit
+ -t, --time-stamp print date of last modification, then exit
+ -v, --version print version number, then exit
+
+Report bugs and patches to <config-patches@gnu.org>."
+
+version="\
+GNU config.guess ($timestamp)
+
+Originally written by Per Bothner.
+Copyright 1992-2022 Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions. There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+ case $1 in
+ --time-stamp | --time* | -t )
+ echo "$timestamp" ; exit ;;
+ --version | -v )
+ echo "$version" ; exit ;;
+ --help | --h* | -h )
+ echo "$usage"; exit ;;
+ -- ) # Stop option processing
+ shift; break ;;
+ - ) # Use stdin as input.
+ break ;;
+ -* )
+ echo "$me: invalid option $1$help" >&2
+ exit 1 ;;
+ * )
+ break ;;
+ esac
+done
+
+if test $# != 0; then
+ echo "$me: too many arguments$help" >&2
+ exit 1
+fi
+
+# Just in case it came from the environment.
+GUESS=
+
+# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
+# compiler to aid in system detection is discouraged as it requires
+# temporary files to be created and, as you can see below, it is a
+# headache to deal with in a portable fashion.
+
+# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
+# use `HOST_CC' if defined, but it is deprecated.
+
+# Portable tmp directory creation inspired by the Autoconf team.
+
+tmp=
+# shellcheck disable=SC2172
+trap 'test -z "$tmp" || rm -fr "$tmp"' 0 1 2 13 15
+
+set_cc_for_build() {
+ # prevent multiple calls if $tmp is already set
+ test "$tmp" && return 0
+ : "${TMPDIR=/tmp}"
+ # shellcheck disable=SC2039,SC3028
+ { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
+ { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir "$tmp" 2>/dev/null) ; } ||
+ { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir "$tmp" 2>/dev/null) && echo "Warning: creating insecure temp directory" >&2 ; } ||
+ { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; }
+ dummy=$tmp/dummy
+ case ${CC_FOR_BUILD-},${HOST_CC-},${CC-} in
+ ,,) echo "int x;" > "$dummy.c"
+ for driver in cc gcc c89 c99 ; do
+ if ($driver -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then
+ CC_FOR_BUILD=$driver
+ break
+ fi
+ done
+ if test x"$CC_FOR_BUILD" = x ; then
+ CC_FOR_BUILD=no_compiler_found
+ fi
+ ;;
+ ,,*) CC_FOR_BUILD=$CC ;;
+ ,*,*) CC_FOR_BUILD=$HOST_CC ;;
+ esac
+}
+
+# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
+# (ghazi@noc.rutgers.edu 1994-08-24)
+if test -f /.attbin/uname ; then
+ PATH=$PATH:/.attbin ; export PATH
+fi
+
+UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
+UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
+UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
+UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
+
+case $UNAME_SYSTEM in
+Linux|GNU|GNU/*)
+ LIBC=unknown
+
+ set_cc_for_build
+ cat <<-EOF > "$dummy.c"
+ #include <features.h>
+ #if defined(__UCLIBC__)
+ LIBC=uclibc
+ #elif defined(__dietlibc__)
+ LIBC=dietlibc
+ #elif defined(__GLIBC__)
+ LIBC=gnu
+ #else
+ #include <stdarg.h>
+ /* First heuristic to detect musl libc. */
+ #ifdef __DEFINED_va_list
+ LIBC=musl
+ #endif
+ #endif
+ EOF
+ cc_set_libc=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`
+ eval "$cc_set_libc"
+
+ # Second heuristic to detect musl libc.
+ if [ "$LIBC" = unknown ] &&
+ command -v ldd >/dev/null &&
+ ldd --version 2>&1 | grep -q ^musl; then
+ LIBC=musl
+ fi
+
+ # If the system lacks a compiler, then just pick glibc.
+ # We could probably try harder.
+ if [ "$LIBC" = unknown ]; then
+ LIBC=gnu
+ fi
+ ;;
+esac
+
+# Note: order is significant - the case branches are not exclusive.
+
+case $UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION in
+ *:NetBSD:*:*)
+ # NetBSD (nbsd) targets should (where applicable) match one or
+ # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
+ # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
+ # switched to ELF, *-*-netbsd* would select the old
+ # object file format. This provides both forward
+ # compatibility and a consistent mechanism for selecting the
+ # object file format.
+ #
+ # Note: NetBSD doesn't particularly care about the vendor
+ # portion of the name. We always set it to "unknown".
+ UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \
+ /sbin/sysctl -n hw.machine_arch 2>/dev/null || \
+ /usr/sbin/sysctl -n hw.machine_arch 2>/dev/null || \
+ echo unknown)`
+ case $UNAME_MACHINE_ARCH in
+ aarch64eb) machine=aarch64_be-unknown ;;
+ armeb) machine=armeb-unknown ;;
+ arm*) machine=arm-unknown ;;
+ sh3el) machine=shl-unknown ;;
+ sh3eb) machine=sh-unknown ;;
+ sh5el) machine=sh5le-unknown ;;
+ earmv*)
+ arch=`echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,'`
+ endian=`echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p'`
+ machine=${arch}${endian}-unknown
+ ;;
+ *) machine=$UNAME_MACHINE_ARCH-unknown ;;
+ esac
+ # The Operating System including object format, if it has switched
+ # to ELF recently (or will in the future) and ABI.
+ case $UNAME_MACHINE_ARCH in
+ earm*)
+ os=netbsdelf
+ ;;
+ arm*|i386|m68k|ns32k|sh3*|sparc|vax)
+ set_cc_for_build
+ if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
+ | grep -q __ELF__
+ then
+ # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
+ # Return netbsd for either. FIX?
+ os=netbsd
+ else
+ os=netbsdelf
+ fi
+ ;;
+ *)
+ os=netbsd
+ ;;
+ esac
+ # Determine ABI tags.
+ case $UNAME_MACHINE_ARCH in
+ earm*)
+ expr='s/^earmv[0-9]/-eabi/;s/eb$//'
+ abi=`echo "$UNAME_MACHINE_ARCH" | sed -e "$expr"`
+ ;;
+ esac
+ # The OS release
+ # Debian GNU/NetBSD machines have a different userland, and
+ # thus, need a distinct triplet. However, they do not need
+ # kernel version information, so it can be replaced with a
+ # suitable tag, in the style of linux-gnu.
+ case $UNAME_VERSION in
+ Debian*)
+ release='-gnu'
+ ;;
+ *)
+ release=`echo "$UNAME_RELEASE" | sed -e 's/[-_].*//' | cut -d. -f1,2`
+ ;;
+ esac
+ # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
+ # contains redundant information, the shorter form:
+ # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
+ GUESS=$machine-${os}${release}${abi-}
+ ;;
+ *:Bitrig:*:*)
+ UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
+ GUESS=$UNAME_MACHINE_ARCH-unknown-bitrig$UNAME_RELEASE
+ ;;
+ *:OpenBSD:*:*)
+ UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
+ GUESS=$UNAME_MACHINE_ARCH-unknown-openbsd$UNAME_RELEASE
+ ;;
+ *:SecBSD:*:*)
+ UNAME_MACHINE_ARCH=`arch | sed 's/SecBSD.//'`
+ GUESS=$UNAME_MACHINE_ARCH-unknown-secbsd$UNAME_RELEASE
+ ;;
+ *:LibertyBSD:*:*)
+ UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'`
+ GUESS=$UNAME_MACHINE_ARCH-unknown-libertybsd$UNAME_RELEASE
+ ;;
+ *:MidnightBSD:*:*)
+ GUESS=$UNAME_MACHINE-unknown-midnightbsd$UNAME_RELEASE
+ ;;
+ *:ekkoBSD:*:*)
+ GUESS=$UNAME_MACHINE-unknown-ekkobsd$UNAME_RELEASE
+ ;;
+ *:SolidBSD:*:*)
+ GUESS=$UNAME_MACHINE-unknown-solidbsd$UNAME_RELEASE
+ ;;
+ *:OS108:*:*)
+ GUESS=$UNAME_MACHINE-unknown-os108_$UNAME_RELEASE
+ ;;
+ macppc:MirBSD:*:*)
+ GUESS=powerpc-unknown-mirbsd$UNAME_RELEASE
+ ;;
+ *:MirBSD:*:*)
+ GUESS=$UNAME_MACHINE-unknown-mirbsd$UNAME_RELEASE
+ ;;
+ *:Sortix:*:*)
+ GUESS=$UNAME_MACHINE-unknown-sortix
+ ;;
+ *:Twizzler:*:*)
+ GUESS=$UNAME_MACHINE-unknown-twizzler
+ ;;
+ *:Redox:*:*)
+ GUESS=$UNAME_MACHINE-unknown-redox
+ ;;
+ mips:OSF1:*.*)
+ GUESS=mips-dec-osf1
+ ;;
+ alpha:OSF1:*:*)
+ # Reset EXIT trap before exiting to avoid spurious non-zero exit code.
+ trap '' 0
+ case $UNAME_RELEASE in
+ *4.0)
+ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
+ ;;
+ *5.*)
+ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
+ ;;
+ esac
+ # According to Compaq, /usr/sbin/psrinfo has been available on
+ # OSF/1 and Tru64 systems produced since 1995. I hope that
+ # covers most systems running today. This code pipes the CPU
+ # types through head -n 1, so we only detect the type of CPU 0.
+ ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`
+ case $ALPHA_CPU_TYPE in
+ "EV4 (21064)")
+ UNAME_MACHINE=alpha ;;
+ "EV4.5 (21064)")
+ UNAME_MACHINE=alpha ;;
+ "LCA4 (21066/21068)")
+ UNAME_MACHINE=alpha ;;
+ "EV5 (21164)")
+ UNAME_MACHINE=alphaev5 ;;
+ "EV5.6 (21164A)")
+ UNAME_MACHINE=alphaev56 ;;
+ "EV5.6 (21164PC)")
+ UNAME_MACHINE=alphapca56 ;;
+ "EV5.7 (21164PC)")
+ UNAME_MACHINE=alphapca57 ;;
+ "EV6 (21264)")
+ UNAME_MACHINE=alphaev6 ;;
+ "EV6.7 (21264A)")
+ UNAME_MACHINE=alphaev67 ;;
+ "EV6.8CB (21264C)")
+ UNAME_MACHINE=alphaev68 ;;
+ "EV6.8AL (21264B)")
+ UNAME_MACHINE=alphaev68 ;;
+ "EV6.8CX (21264D)")
+ UNAME_MACHINE=alphaev68 ;;
+ "EV6.9A (21264/EV69A)")
+ UNAME_MACHINE=alphaev69 ;;
+ "EV7 (21364)")
+ UNAME_MACHINE=alphaev7 ;;
+ "EV7.9 (21364A)")
+ UNAME_MACHINE=alphaev79 ;;
+ esac
+ # A Pn.n version is a patched version.
+ # A Vn.n version is a released version.
+ # A Tn.n version is a released field test version.
+ # A Xn.n version is an unreleased experimental baselevel.
+ # 1.2 uses "1.2" for uname -r.
+ OSF_REL=`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
+ GUESS=$UNAME_MACHINE-dec-osf$OSF_REL
+ ;;
+ Amiga*:UNIX_System_V:4.0:*)
+ GUESS=m68k-unknown-sysv4
+ ;;
+ *:[Aa]miga[Oo][Ss]:*:*)
+ GUESS=$UNAME_MACHINE-unknown-amigaos
+ ;;
+ *:[Mm]orph[Oo][Ss]:*:*)
+ GUESS=$UNAME_MACHINE-unknown-morphos
+ ;;
+ *:OS/390:*:*)
+ GUESS=i370-ibm-openedition
+ ;;
+ *:z/VM:*:*)
+ GUESS=s390-ibm-zvmoe
+ ;;
+ *:OS400:*:*)
+ GUESS=powerpc-ibm-os400
+ ;;
+ arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
+ GUESS=arm-acorn-riscix$UNAME_RELEASE
+ ;;
+ arm*:riscos:*:*|arm*:RISCOS:*:*)
+ GUESS=arm-unknown-riscos
+ ;;
+ SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
+ GUESS=hppa1.1-hitachi-hiuxmpp
+ ;;
+ Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
+ # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
+ case `(/bin/universe) 2>/dev/null` in
+ att) GUESS=pyramid-pyramid-sysv3 ;;
+ *) GUESS=pyramid-pyramid-bsd ;;
+ esac
+ ;;
+ NILE*:*:*:dcosx)
+ GUESS=pyramid-pyramid-svr4
+ ;;
+ DRS?6000:unix:4.0:6*)
+ GUESS=sparc-icl-nx6
+ ;;
+ DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
+ case `/usr/bin/uname -p` in
+ sparc) GUESS=sparc-icl-nx7 ;;
+ esac
+ ;;
+ s390x:SunOS:*:*)
+ SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
+ GUESS=$UNAME_MACHINE-ibm-solaris2$SUN_REL
+ ;;
+ sun4H:SunOS:5.*:*)
+ SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
+ GUESS=sparc-hal-solaris2$SUN_REL
+ ;;
+ sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
+ SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
+ GUESS=sparc-sun-solaris2$SUN_REL
+ ;;
+ i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
+ GUESS=i386-pc-auroraux$UNAME_RELEASE
+ ;;
+ i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
+ set_cc_for_build
+ SUN_ARCH=i386
+ # If there is a compiler, see if it is configured for 64-bit objects.
+ # Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
+ # This test works for both compilers.
+ if test "$CC_FOR_BUILD" != no_compiler_found; then
+ if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
+ (CCOPTS="" $CC_FOR_BUILD -m64 -E - 2>/dev/null) | \
+ grep IS_64BIT_ARCH >/dev/null
+ then
+ SUN_ARCH=x86_64
+ fi
+ fi
+ SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
+ GUESS=$SUN_ARCH-pc-solaris2$SUN_REL
+ ;;
+ sun4*:SunOS:6*:*)
+ # According to config.sub, this is the proper way to canonicalize
+ # SunOS6. Hard to guess exactly what SunOS6 will be like, but
+ # it's likely to be more like Solaris than SunOS4.
+ SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
+ GUESS=sparc-sun-solaris3$SUN_REL
+ ;;
+ sun4*:SunOS:*:*)
+ case `/usr/bin/arch -k` in
+ Series*|S4*)
+ UNAME_RELEASE=`uname -v`
+ ;;
+ esac
+ # Japanese Language versions have a version number like `4.1.3-JL'.
+ SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/-/_/'`
+ GUESS=sparc-sun-sunos$SUN_REL
+ ;;
+ sun3*:SunOS:*:*)
+ GUESS=m68k-sun-sunos$UNAME_RELEASE
+ ;;
+ sun*:*:4.2BSD:*)
+ UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
+ test "x$UNAME_RELEASE" = x && UNAME_RELEASE=3
+ case `/bin/arch` in
+ sun3)
+ GUESS=m68k-sun-sunos$UNAME_RELEASE
+ ;;
+ sun4)
+ GUESS=sparc-sun-sunos$UNAME_RELEASE
+ ;;
+ esac
+ ;;
+ aushp:SunOS:*:*)
+ GUESS=sparc-auspex-sunos$UNAME_RELEASE
+ ;;
+ # The situation for MiNT is a little confusing. The machine name
+ # can be virtually everything (everything which is not
+ # "atarist" or "atariste" at least should have a processor
+ # > m68000). The system name ranges from "MiNT" over "FreeMiNT"
+ # to the lowercase version "mint" (or "freemint"). Finally
+ # the system name "TOS" denotes a system which is actually not
+ # MiNT. But MiNT is downward compatible to TOS, so this should
+ # be no problem.
+ atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
+ GUESS=m68k-atari-mint$UNAME_RELEASE
+ ;;
+ atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
+ GUESS=m68k-atari-mint$UNAME_RELEASE
+ ;;
+ *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
+ GUESS=m68k-atari-mint$UNAME_RELEASE
+ ;;
+ milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
+ GUESS=m68k-milan-mint$UNAME_RELEASE
+ ;;
+ hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
+ GUESS=m68k-hades-mint$UNAME_RELEASE
+ ;;
+ *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
+ GUESS=m68k-unknown-mint$UNAME_RELEASE
+ ;;
+ m68k:machten:*:*)
+ GUESS=m68k-apple-machten$UNAME_RELEASE
+ ;;
+ powerpc:machten:*:*)
+ GUESS=powerpc-apple-machten$UNAME_RELEASE
+ ;;
+ RISC*:Mach:*:*)
+ GUESS=mips-dec-mach_bsd4.3
+ ;;
+ RISC*:ULTRIX:*:*)
+ GUESS=mips-dec-ultrix$UNAME_RELEASE
+ ;;
+ VAX*:ULTRIX*:*:*)
+ GUESS=vax-dec-ultrix$UNAME_RELEASE
+ ;;
+ 2020:CLIX:*:* | 2430:CLIX:*:*)
+ GUESS=clipper-intergraph-clix$UNAME_RELEASE
+ ;;
+ mips:*:*:UMIPS | mips:*:*:RISCos)
+ set_cc_for_build
+ sed 's/^ //' << EOF > "$dummy.c"
+#ifdef __cplusplus
+#include <stdio.h> /* for printf() prototype */
+ int main (int argc, char *argv[]) {
+#else
+ int main (argc, argv) int argc; char *argv[]; {
+#endif
+ #if defined (host_mips) && defined (MIPSEB)
+ #if defined (SYSTYPE_SYSV)
+ printf ("mips-mips-riscos%ssysv\\n", argv[1]); exit (0);
+ #endif
+ #if defined (SYSTYPE_SVR4)
+ printf ("mips-mips-riscos%ssvr4\\n", argv[1]); exit (0);
+ #endif
+ #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
+ printf ("mips-mips-riscos%sbsd\\n", argv[1]); exit (0);
+ #endif
+ #endif
+ exit (-1);
+ }
+EOF
+ $CC_FOR_BUILD -o "$dummy" "$dummy.c" &&
+ dummyarg=`echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p'` &&
+ SYSTEM_NAME=`"$dummy" "$dummyarg"` &&
+ { echo "$SYSTEM_NAME"; exit; }
+ GUESS=mips-mips-riscos$UNAME_RELEASE
+ ;;
+ Motorola:PowerMAX_OS:*:*)
+ GUESS=powerpc-motorola-powermax
+ ;;
+ Motorola:*:4.3:PL8-*)
+ GUESS=powerpc-harris-powermax
+ ;;
+ Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
+ GUESS=powerpc-harris-powermax
+ ;;
+ Night_Hawk:Power_UNIX:*:*)
+ GUESS=powerpc-harris-powerunix
+ ;;
+ m88k:CX/UX:7*:*)
+ GUESS=m88k-harris-cxux7
+ ;;
+ m88k:*:4*:R4*)
+ GUESS=m88k-motorola-sysv4
+ ;;
+ m88k:*:3*:R3*)
+ GUESS=m88k-motorola-sysv3
+ ;;
+ AViiON:dgux:*:*)
+ # DG/UX returns AViiON for all architectures
+ UNAME_PROCESSOR=`/usr/bin/uname -p`
+ if test "$UNAME_PROCESSOR" = mc88100 || test "$UNAME_PROCESSOR" = mc88110
+ then
+ if test "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx || \
+ test "$TARGET_BINARY_INTERFACE"x = x
+ then
+ GUESS=m88k-dg-dgux$UNAME_RELEASE
+ else
+ GUESS=m88k-dg-dguxbcs$UNAME_RELEASE
+ fi
+ else
+ GUESS=i586-dg-dgux$UNAME_RELEASE
+ fi
+ ;;
+ M88*:DolphinOS:*:*) # DolphinOS (SVR3)
+ GUESS=m88k-dolphin-sysv3
+ ;;
+ M88*:*:R3*:*)
+ # Delta 88k system running SVR3
+ GUESS=m88k-motorola-sysv3
+ ;;
+ XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
+ GUESS=m88k-tektronix-sysv3
+ ;;
+ Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
+ GUESS=m68k-tektronix-bsd
+ ;;
+ *:IRIX*:*:*)
+ IRIX_REL=`echo "$UNAME_RELEASE" | sed -e 's/-/_/g'`
+ GUESS=mips-sgi-irix$IRIX_REL
+ ;;
+ ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
+ GUESS=romp-ibm-aix # uname -m gives an 8 hex-code CPU id
+ ;; # Note that: echo "'`uname -s`'" gives 'AIX '
+ i*86:AIX:*:*)
+ GUESS=i386-ibm-aix
+ ;;
+ ia64:AIX:*:*)
+ if test -x /usr/bin/oslevel ; then
+ IBM_REV=`/usr/bin/oslevel`
+ else
+ IBM_REV=$UNAME_VERSION.$UNAME_RELEASE
+ fi
+ GUESS=$UNAME_MACHINE-ibm-aix$IBM_REV
+ ;;
+ *:AIX:2:3)
+ if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
+ set_cc_for_build
+ sed 's/^ //' << EOF > "$dummy.c"
+ #include <sys/systemcfg.h>
+
+ main()
+ {
+ if (!__power_pc())
+ exit(1);
+ puts("powerpc-ibm-aix3.2.5");
+ exit(0);
+ }
+EOF
+ if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"`
+ then
+ GUESS=$SYSTEM_NAME
+ else
+ GUESS=rs6000-ibm-aix3.2.5
+ fi
+ elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
+ GUESS=rs6000-ibm-aix3.2.4
+ else
+ GUESS=rs6000-ibm-aix3.2
+ fi
+ ;;
+ *:AIX:*:[4567])
+ IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
+ if /usr/sbin/lsattr -El "$IBM_CPU_ID" | grep ' POWER' >/dev/null 2>&1; then
+ IBM_ARCH=rs6000
+ else
+ IBM_ARCH=powerpc
+ fi
+ if test -x /usr/bin/lslpp ; then
+ IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | \
+ awk -F: '{ print $3 }' | sed s/[0-9]*$/0/`
+ else
+ IBM_REV=$UNAME_VERSION.$UNAME_RELEASE
+ fi
+ GUESS=$IBM_ARCH-ibm-aix$IBM_REV
+ ;;
+ *:AIX:*:*)
+ GUESS=rs6000-ibm-aix
+ ;;
+ ibmrt:4.4BSD:*|romp-ibm:4.4BSD:*)
+ GUESS=romp-ibm-bsd4.4
+ ;;
+ ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and
+ GUESS=romp-ibm-bsd$UNAME_RELEASE # 4.3 with uname added to
+ ;; # report: romp-ibm BSD 4.3
+ *:BOSX:*:*)
+ GUESS=rs6000-bull-bosx
+ ;;
+ DPX/2?00:B.O.S.:*:*)
+ GUESS=m68k-bull-sysv3
+ ;;
+ 9000/[34]??:4.3bsd:1.*:*)
+ GUESS=m68k-hp-bsd
+ ;;
+ hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
+ GUESS=m68k-hp-bsd4.4
+ ;;
+ 9000/[34678]??:HP-UX:*:*)
+ HPUX_REV=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*.[0B]*//'`
+ case $UNAME_MACHINE in
+ 9000/31?) HP_ARCH=m68000 ;;
+ 9000/[34]??) HP_ARCH=m68k ;;
+ 9000/[678][0-9][0-9])
+ if test -x /usr/bin/getconf; then
+ sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
+ sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
+ case $sc_cpu_version in
+ 523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0
+ 528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1
+ 532) # CPU_PA_RISC2_0
+ case $sc_kernel_bits in
+ 32) HP_ARCH=hppa2.0n ;;
+ 64) HP_ARCH=hppa2.0w ;;
+ '') HP_ARCH=hppa2.0 ;; # HP-UX 10.20
+ esac ;;
+ esac
+ fi
+ if test "$HP_ARCH" = ""; then
+ set_cc_for_build
+ sed 's/^ //' << EOF > "$dummy.c"
+
+ #define _HPUX_SOURCE
+ #include <stdlib.h>
+ #include <unistd.h>
+
+ int main ()
+ {
+ #if defined(_SC_KERNEL_BITS)
+ long bits = sysconf(_SC_KERNEL_BITS);
+ #endif
+ long cpu = sysconf (_SC_CPU_VERSION);
+
+ switch (cpu)
+ {
+ case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
+ case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
+ case CPU_PA_RISC2_0:
+ #if defined(_SC_KERNEL_BITS)
+ switch (bits)
+ {
+ case 64: puts ("hppa2.0w"); break;
+ case 32: puts ("hppa2.0n"); break;
+ default: puts ("hppa2.0"); break;
+ } break;
+ #else /* !defined(_SC_KERNEL_BITS) */
+ puts ("hppa2.0"); break;
+ #endif
+ default: puts ("hppa1.0"); break;
+ }
+ exit (0);
+ }
+EOF
+ (CCOPTS="" $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null) && HP_ARCH=`"$dummy"`
+ test -z "$HP_ARCH" && HP_ARCH=hppa
+ fi ;;
+ esac
+ if test "$HP_ARCH" = hppa2.0w
+ then
+ set_cc_for_build
+
+ # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
+ # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler
+ # generating 64-bit code. GNU and HP use different nomenclature:
+ #
+ # $ CC_FOR_BUILD=cc ./config.guess
+ # => hppa2.0w-hp-hpux11.23
+ # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
+ # => hppa64-hp-hpux11.23
+
+ if echo __LP64__ | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) |
+ grep -q __LP64__
+ then
+ HP_ARCH=hppa2.0w
+ else
+ HP_ARCH=hppa64
+ fi
+ fi
+ GUESS=$HP_ARCH-hp-hpux$HPUX_REV
+ ;;
+ ia64:HP-UX:*:*)
+ HPUX_REV=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*.[0B]*//'`
+ GUESS=ia64-hp-hpux$HPUX_REV
+ ;;
+ 3050*:HI-UX:*:*)
+ set_cc_for_build
+ sed 's/^ //' << EOF > "$dummy.c"
+ #include <unistd.h>
+ int
+ main ()
+ {
+ long cpu = sysconf (_SC_CPU_VERSION);
+ /* The order matters, because CPU_IS_HP_MC68K erroneously returns
+ true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct
+ results, however. */
+ if (CPU_IS_PA_RISC (cpu))
+ {
+ switch (cpu)
+ {
+ case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
+ case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
+ case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
+ default: puts ("hppa-hitachi-hiuxwe2"); break;
+ }
+ }
+ else if (CPU_IS_HP_MC68K (cpu))
+ puts ("m68k-hitachi-hiuxwe2");
+ else puts ("unknown-hitachi-hiuxwe2");
+ exit (0);
+ }
+EOF
+ $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` &&
+ { echo "$SYSTEM_NAME"; exit; }
+ GUESS=unknown-hitachi-hiuxwe2
+ ;;
+ 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:*)
+ GUESS=hppa1.1-hp-bsd
+ ;;
+ 9000/8??:4.3bsd:*:*)
+ GUESS=hppa1.0-hp-bsd
+ ;;
+ *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
+ GUESS=hppa1.0-hp-mpeix
+ ;;
+ hp7??:OSF1:*:* | hp8?[79]:OSF1:*:*)
+ GUESS=hppa1.1-hp-osf
+ ;;
+ hp8??:OSF1:*:*)
+ GUESS=hppa1.0-hp-osf
+ ;;
+ i*86:OSF1:*:*)
+ if test -x /usr/sbin/sysversion ; then
+ GUESS=$UNAME_MACHINE-unknown-osf1mk
+ else
+ GUESS=$UNAME_MACHINE-unknown-osf1
+ fi
+ ;;
+ parisc*:Lites*:*:*)
+ GUESS=hppa1.1-hp-lites
+ ;;
+ C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
+ GUESS=c1-convex-bsd
+ ;;
+ C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
+ if getsysinfo -f scalar_acc
+ then echo c32-convex-bsd
+ else echo c2-convex-bsd
+ fi
+ exit ;;
+ C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
+ GUESS=c34-convex-bsd
+ ;;
+ C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
+ GUESS=c38-convex-bsd
+ ;;
+ C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
+ GUESS=c4-convex-bsd
+ ;;
+ CRAY*Y-MP:*:*:*)
+ CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'`
+ GUESS=ymp-cray-unicos$CRAY_REL
+ ;;
+ CRAY*[A-Z]90:*:*:*)
+ echo "$UNAME_MACHINE"-cray-unicos"$UNAME_RELEASE" \
+ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
+ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
+ -e 's/\.[^.]*$/.X/'
+ exit ;;
+ CRAY*TS:*:*:*)
+ CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'`
+ GUESS=t90-cray-unicos$CRAY_REL
+ ;;
+ CRAY*T3E:*:*:*)
+ CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'`
+ GUESS=alphaev5-cray-unicosmk$CRAY_REL
+ ;;
+ CRAY*SV1:*:*:*)
+ CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'`
+ GUESS=sv1-cray-unicos$CRAY_REL
+ ;;
+ *:UNICOS/mp:*:*)
+ CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'`
+ GUESS=craynv-cray-unicosmp$CRAY_REL
+ ;;
+ F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
+ FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
+ FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
+ FUJITSU_REL=`echo "$UNAME_RELEASE" | sed -e 's/ /_/'`
+ GUESS=${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}
+ ;;
+ 5000:UNIX_System_V:4.*:*)
+ FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
+ FUJITSU_REL=`echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'`
+ GUESS=sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}
+ ;;
+ i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
+ GUESS=$UNAME_MACHINE-pc-bsdi$UNAME_RELEASE
+ ;;
+ sparc*:BSD/OS:*:*)
+ GUESS=sparc-unknown-bsdi$UNAME_RELEASE
+ ;;
+ *:BSD/OS:*:*)
+ GUESS=$UNAME_MACHINE-unknown-bsdi$UNAME_RELEASE
+ ;;
+ arm:FreeBSD:*:*)
+ UNAME_PROCESSOR=`uname -p`
+ set_cc_for_build
+ if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
+ | grep -q __ARM_PCS_VFP
+ then
+ FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
+ GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL-gnueabi
+ else
+ FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
+ GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL-gnueabihf
+ fi
+ ;;
+ *:FreeBSD:*:*)
+ UNAME_PROCESSOR=`/usr/bin/uname -p`
+ case $UNAME_PROCESSOR in
+ amd64)
+ UNAME_PROCESSOR=x86_64 ;;
+ i386)
+ UNAME_PROCESSOR=i586 ;;
+ esac
+ FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
+ GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL
+ ;;
+ i*:CYGWIN*:*)
+ GUESS=$UNAME_MACHINE-pc-cygwin
+ ;;
+ *:MINGW64*:*)
+ GUESS=$UNAME_MACHINE-pc-mingw64
+ ;;
+ *:MINGW*:*)
+ GUESS=$UNAME_MACHINE-pc-mingw32
+ ;;
+ *:MSYS*:*)
+ GUESS=$UNAME_MACHINE-pc-msys
+ ;;
+ i*:PW*:*)
+ GUESS=$UNAME_MACHINE-pc-pw32
+ ;;
+ *:SerenityOS:*:*)
+ GUESS=$UNAME_MACHINE-pc-serenity
+ ;;
+ *:Interix*:*)
+ case $UNAME_MACHINE in
+ x86)
+ GUESS=i586-pc-interix$UNAME_RELEASE
+ ;;
+ authenticamd | genuineintel | EM64T)
+ GUESS=x86_64-unknown-interix$UNAME_RELEASE
+ ;;
+ IA64)
+ GUESS=ia64-unknown-interix$UNAME_RELEASE
+ ;;
+ esac ;;
+ i*:UWIN*:*)
+ GUESS=$UNAME_MACHINE-pc-uwin
+ ;;
+ amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
+ GUESS=x86_64-pc-cygwin
+ ;;
+ prep*:SunOS:5.*:*)
+ SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
+ GUESS=powerpcle-unknown-solaris2$SUN_REL
+ ;;
+ *:GNU:*:*)
+ # the GNU system
+ GNU_ARCH=`echo "$UNAME_MACHINE" | sed -e 's,[-/].*$,,'`
+ GNU_REL=`echo "$UNAME_RELEASE" | sed -e 's,/.*$,,'`
+ GUESS=$GNU_ARCH-unknown-$LIBC$GNU_REL
+ ;;
+ *:GNU/*:*:*)
+ # other systems with GNU libc and userland
+ GNU_SYS=`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"`
+ GNU_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
+ GUESS=$UNAME_MACHINE-unknown-$GNU_SYS$GNU_REL-$LIBC
+ ;;
+ *:Minix:*:*)
+ GUESS=$UNAME_MACHINE-unknown-minix
+ ;;
+ aarch64:Linux:*:*)
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+ ;;
+ aarch64_be:Linux:*:*)
+ UNAME_MACHINE=aarch64_be
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+ ;;
+ alpha:Linux:*:*)
+ case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' /proc/cpuinfo 2>/dev/null` in
+ EV5) UNAME_MACHINE=alphaev5 ;;
+ EV56) UNAME_MACHINE=alphaev56 ;;
+ PCA56) UNAME_MACHINE=alphapca56 ;;
+ PCA57) UNAME_MACHINE=alphapca56 ;;
+ EV6) UNAME_MACHINE=alphaev6 ;;
+ EV67) UNAME_MACHINE=alphaev67 ;;
+ EV68*) UNAME_MACHINE=alphaev68 ;;
+ esac
+ objdump --private-headers /bin/sh | grep -q ld.so.1
+ if test "$?" = 0 ; then LIBC=gnulibc1 ; fi
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+ ;;
+ arc:Linux:*:* | arceb:Linux:*:* | arc32:Linux:*:* | arc64:Linux:*:*)
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+ ;;
+ arm*:Linux:*:*)
+ set_cc_for_build
+ if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
+ | grep -q __ARM_EABI__
+ then
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+ else
+ if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
+ | grep -q __ARM_PCS_VFP
+ then
+ GUESS=$UNAME_MACHINE-unknown-linux-${LIBC}eabi
+ else
+ GUESS=$UNAME_MACHINE-unknown-linux-${LIBC}eabihf
+ fi
+ fi
+ ;;
+ avr32*:Linux:*:*)
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+ ;;
+ cris:Linux:*:*)
+ GUESS=$UNAME_MACHINE-axis-linux-$LIBC
+ ;;
+ crisv32:Linux:*:*)
+ GUESS=$UNAME_MACHINE-axis-linux-$LIBC
+ ;;
+ e2k:Linux:*:*)
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+ ;;
+ frv:Linux:*:*)
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+ ;;
+ hexagon:Linux:*:*)
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+ ;;
+ i*86:Linux:*:*)
+ GUESS=$UNAME_MACHINE-pc-linux-$LIBC
+ ;;
+ ia64:Linux:*:*)
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+ ;;
+ k1om:Linux:*:*)
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+ ;;
+ loongarch32:Linux:*:* | loongarch64:Linux:*:* | loongarchx32:Linux:*:*)
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+ ;;
+ m32r*:Linux:*:*)
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+ ;;
+ m68*:Linux:*:*)
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+ ;;
+ mips:Linux:*:* | mips64:Linux:*:*)
+ set_cc_for_build
+ IS_GLIBC=0
+ test x"${LIBC}" = xgnu && IS_GLIBC=1
+ sed 's/^ //' << EOF > "$dummy.c"
+ #undef CPU
+ #undef mips
+ #undef mipsel
+ #undef mips64
+ #undef mips64el
+ #if ${IS_GLIBC} && defined(_ABI64)
+ LIBCABI=gnuabi64
+ #else
+ #if ${IS_GLIBC} && defined(_ABIN32)
+ LIBCABI=gnuabin32
+ #else
+ LIBCABI=${LIBC}
+ #endif
+ #endif
+
+ #if ${IS_GLIBC} && defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6
+ CPU=mipsisa64r6
+ #else
+ #if ${IS_GLIBC} && !defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6
+ CPU=mipsisa32r6
+ #else
+ #if defined(__mips64)
+ CPU=mips64
+ #else
+ CPU=mips
+ #endif
+ #endif
+ #endif
+
+ #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
+ MIPS_ENDIAN=el
+ #else
+ #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
+ MIPS_ENDIAN=
+ #else
+ MIPS_ENDIAN=
+ #endif
+ #endif
+EOF
+ cc_set_vars=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU\|^MIPS_ENDIAN\|^LIBCABI'`
+ eval "$cc_set_vars"
+ test "x$CPU" != x && { echo "$CPU${MIPS_ENDIAN}-unknown-linux-$LIBCABI"; exit; }
+ ;;
+ mips64el:Linux:*:*)
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+ ;;
+ openrisc*:Linux:*:*)
+ GUESS=or1k-unknown-linux-$LIBC
+ ;;
+ or32:Linux:*:* | or1k*:Linux:*:*)
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+ ;;
+ padre:Linux:*:*)
+ GUESS=sparc-unknown-linux-$LIBC
+ ;;
+ parisc64:Linux:*:* | hppa64:Linux:*:*)
+ GUESS=hppa64-unknown-linux-$LIBC
+ ;;
+ parisc:Linux:*:* | hppa:Linux:*:*)
+ # Look for CPU level
+ case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
+ PA7*) GUESS=hppa1.1-unknown-linux-$LIBC ;;
+ PA8*) GUESS=hppa2.0-unknown-linux-$LIBC ;;
+ *) GUESS=hppa-unknown-linux-$LIBC ;;
+ esac
+ ;;
+ ppc64:Linux:*:*)
+ GUESS=powerpc64-unknown-linux-$LIBC
+ ;;
+ ppc:Linux:*:*)
+ GUESS=powerpc-unknown-linux-$LIBC
+ ;;
+ ppc64le:Linux:*:*)
+ GUESS=powerpc64le-unknown-linux-$LIBC
+ ;;
+ ppcle:Linux:*:*)
+ GUESS=powerpcle-unknown-linux-$LIBC
+ ;;
+ riscv32:Linux:*:* | riscv32be:Linux:*:* | riscv64:Linux:*:* | riscv64be:Linux:*:*)
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+ ;;
+ s390:Linux:*:* | s390x:Linux:*:*)
+ GUESS=$UNAME_MACHINE-ibm-linux-$LIBC
+ ;;
+ sh64*:Linux:*:*)
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+ ;;
+ sh*:Linux:*:*)
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+ ;;
+ sparc:Linux:*:* | sparc64:Linux:*:*)
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+ ;;
+ tile*:Linux:*:*)
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+ ;;
+ vax:Linux:*:*)
+ GUESS=$UNAME_MACHINE-dec-linux-$LIBC
+ ;;
+ x86_64:Linux:*:*)
+ set_cc_for_build
+ LIBCABI=$LIBC
+ if test "$CC_FOR_BUILD" != no_compiler_found; then
+ if (echo '#ifdef __ILP32__'; echo IS_X32; echo '#endif') | \
+ (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
+ grep IS_X32 >/dev/null
+ then
+ LIBCABI=${LIBC}x32
+ fi
+ fi
+ GUESS=$UNAME_MACHINE-pc-linux-$LIBCABI
+ ;;
+ xtensa*:Linux:*:*)
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+ ;;
+ i*86:DYNIX/ptx:4*:*)
+ # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
+ # earlier versions are messed up and put the nodename in both
+ # sysname and nodename.
+ GUESS=i386-sequent-sysv4
+ ;;
+ i*86:UNIX_SV:4.2MP:2.*)
+ # Unixware is an offshoot of SVR4, but it has its own version
+ # number series starting with 2...
+ # I am not positive that other SVR4 systems won't match this,
+ # I just have to hope. -- rms.
+ # Use sysv4.2uw... so that sysv4* matches it.
+ GUESS=$UNAME_MACHINE-pc-sysv4.2uw$UNAME_VERSION
+ ;;
+ i*86:OS/2:*:*)
+ # If we were able to find `uname', then EMX Unix compatibility
+ # is probably installed.
+ GUESS=$UNAME_MACHINE-pc-os2-emx
+ ;;
+ i*86:XTS-300:*:STOP)
+ GUESS=$UNAME_MACHINE-unknown-stop
+ ;;
+ i*86:atheos:*:*)
+ GUESS=$UNAME_MACHINE-unknown-atheos
+ ;;
+ i*86:syllable:*:*)
+ GUESS=$UNAME_MACHINE-pc-syllable
+ ;;
+ i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
+ GUESS=i386-unknown-lynxos$UNAME_RELEASE
+ ;;
+ i*86:*DOS:*:*)
+ GUESS=$UNAME_MACHINE-pc-msdosdjgpp
+ ;;
+ i*86:*:4.*:*)
+ UNAME_REL=`echo "$UNAME_RELEASE" | sed 's/\/MP$//'`
+ if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
+ GUESS=$UNAME_MACHINE-univel-sysv$UNAME_REL
+ else
+ GUESS=$UNAME_MACHINE-pc-sysv$UNAME_REL
+ fi
+ ;;
+ i*86:*:5:[678]*)
+ # UnixWare 7.x, OpenUNIX and OpenServer 6.
+ case `/bin/uname -X | grep "^Machine"` in
+ *486*) UNAME_MACHINE=i486 ;;
+ *Pentium) UNAME_MACHINE=i586 ;;
+ *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
+ esac
+ GUESS=$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
+ ;;
+ i*86:*:3.2:*)
+ if test -f /usr/options/cb.name; then
+ UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
+ GUESS=$UNAME_MACHINE-pc-isc$UNAME_REL
+ elif /bin/uname -X 2>/dev/null >/dev/null ; then
+ UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
+ (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
+ (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
+ && UNAME_MACHINE=i586
+ (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
+ && UNAME_MACHINE=i686
+ (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
+ && UNAME_MACHINE=i686
+ GUESS=$UNAME_MACHINE-pc-sco$UNAME_REL
+ else
+ GUESS=$UNAME_MACHINE-pc-sysv32
+ fi
+ ;;
+ pc:*:*:*)
+ # Left here for compatibility:
+ # uname -m prints for DJGPP always 'pc', but it prints nothing about
+ # the processor, so we play safe by assuming i586.
+ # Note: whatever this is, it MUST be the same as what config.sub
+ # prints for the "djgpp" host, or else GDB configure will decide that
+ # this is a cross-build.
+ GUESS=i586-pc-msdosdjgpp
+ ;;
+ Intel:Mach:3*:*)
+ GUESS=i386-pc-mach3
+ ;;
+ paragon:*:*:*)
+ GUESS=i860-intel-osf1
+ ;;
+ i860:*:4.*:*) # i860-SVR4
+ if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
+ GUESS=i860-stardent-sysv$UNAME_RELEASE # Stardent Vistra i860-SVR4
+ else # Add other i860-SVR4 vendors below as they are discovered.
+ GUESS=i860-unknown-sysv$UNAME_RELEASE # Unknown i860-SVR4
+ fi
+ ;;
+ mini*:CTIX:SYS*5:*)
+ # "miniframe"
+ GUESS=m68010-convergent-sysv
+ ;;
+ mc68k:UNIX:SYSTEM5:3.51m)
+ GUESS=m68k-convergent-sysv
+ ;;
+ M680?0:D-NIX:5.3:*)
+ GUESS=m68k-diab-dnix
+ ;;
+ M68*:*:R3V[5678]*:*)
+ test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
+ 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
+ OS_REL=''
+ test -r /etc/.relid \
+ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+ && { echo i486-ncr-sysv4.3"$OS_REL"; exit; }
+ /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+ && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;;
+ 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+ && { echo i486-ncr-sysv4; exit; } ;;
+ NCR*:*:4.2:* | MPRAS*:*:4.2:*)
+ OS_REL='.3'
+ test -r /etc/.relid \
+ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+ && { echo i486-ncr-sysv4.3"$OS_REL"; exit; }
+ /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+ && { echo i586-ncr-sysv4.3"$OS_REL"; exit; }
+ /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
+ && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;;
+ m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
+ GUESS=m68k-unknown-lynxos$UNAME_RELEASE
+ ;;
+ mc68030:UNIX_System_V:4.*:*)
+ GUESS=m68k-atari-sysv4
+ ;;
+ TSUNAMI:LynxOS:2.*:*)
+ GUESS=sparc-unknown-lynxos$UNAME_RELEASE
+ ;;
+ rs6000:LynxOS:2.*:*)
+ GUESS=rs6000-unknown-lynxos$UNAME_RELEASE
+ ;;
+ PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
+ GUESS=powerpc-unknown-lynxos$UNAME_RELEASE
+ ;;
+ SM[BE]S:UNIX_SV:*:*)
+ GUESS=mips-dde-sysv$UNAME_RELEASE
+ ;;
+ RM*:ReliantUNIX-*:*:*)
+ GUESS=mips-sni-sysv4
+ ;;
+ RM*:SINIX-*:*:*)
+ GUESS=mips-sni-sysv4
+ ;;
+ *:SINIX-*:*:*)
+ if uname -p 2>/dev/null >/dev/null ; then
+ UNAME_MACHINE=`(uname -p) 2>/dev/null`
+ GUESS=$UNAME_MACHINE-sni-sysv4
+ else
+ GUESS=ns32k-sni-sysv
+ fi
+ ;;
+ PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
+ # says <Richard.M.Bartel@ccMail.Census.GOV>
+ GUESS=i586-unisys-sysv4
+ ;;
+ *:UNIX_System_V:4*:FTX*)
+ # From Gerald Hewes <hewes@openmarket.com>.
+ # How about differentiating between stratus architectures? -djm
+ GUESS=hppa1.1-stratus-sysv4
+ ;;
+ *:*:*:FTX*)
+ # From seanf@swdc.stratus.com.
+ GUESS=i860-stratus-sysv4
+ ;;
+ i*86:VOS:*:*)
+ # From Paul.Green@stratus.com.
+ GUESS=$UNAME_MACHINE-stratus-vos
+ ;;
+ *:VOS:*:*)
+ # From Paul.Green@stratus.com.
+ GUESS=hppa1.1-stratus-vos
+ ;;
+ mc68*:A/UX:*:*)
+ GUESS=m68k-apple-aux$UNAME_RELEASE
+ ;;
+ news*:NEWS-OS:6*:*)
+ GUESS=mips-sony-newsos6
+ ;;
+ R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
+ if test -d /usr/nec; then
+ GUESS=mips-nec-sysv$UNAME_RELEASE
+ else
+ GUESS=mips-unknown-sysv$UNAME_RELEASE
+ fi
+ ;;
+ BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
+ GUESS=powerpc-be-beos
+ ;;
+ BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
+ GUESS=powerpc-apple-beos
+ ;;
+ BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
+ GUESS=i586-pc-beos
+ ;;
+ BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
+ GUESS=i586-pc-haiku
+ ;;
+ x86_64:Haiku:*:*)
+ GUESS=x86_64-unknown-haiku
+ ;;
+ SX-4:SUPER-UX:*:*)
+ GUESS=sx4-nec-superux$UNAME_RELEASE
+ ;;
+ SX-5:SUPER-UX:*:*)
+ GUESS=sx5-nec-superux$UNAME_RELEASE
+ ;;
+ SX-6:SUPER-UX:*:*)
+ GUESS=sx6-nec-superux$UNAME_RELEASE
+ ;;
+ SX-7:SUPER-UX:*:*)
+ GUESS=sx7-nec-superux$UNAME_RELEASE
+ ;;
+ SX-8:SUPER-UX:*:*)
+ GUESS=sx8-nec-superux$UNAME_RELEASE
+ ;;
+ SX-8R:SUPER-UX:*:*)
+ GUESS=sx8r-nec-superux$UNAME_RELEASE
+ ;;
+ SX-ACE:SUPER-UX:*:*)
+ GUESS=sxace-nec-superux$UNAME_RELEASE
+ ;;
+ Power*:Rhapsody:*:*)
+ GUESS=powerpc-apple-rhapsody$UNAME_RELEASE
+ ;;
+ *:Rhapsody:*:*)
+ GUESS=$UNAME_MACHINE-apple-rhapsody$UNAME_RELEASE
+ ;;
+ arm64:Darwin:*:*)
+ GUESS=aarch64-apple-darwin$UNAME_RELEASE
+ ;;
+ *:Darwin:*:*)
+ UNAME_PROCESSOR=`uname -p`
+ case $UNAME_PROCESSOR in
+ unknown) UNAME_PROCESSOR=powerpc ;;
+ esac
+ if command -v xcode-select > /dev/null 2> /dev/null && \
+ ! xcode-select --print-path > /dev/null 2> /dev/null ; then
+ # Avoid executing cc if there is no toolchain installed as
+ # cc will be a stub that puts up a graphical alert
+ # prompting the user to install developer tools.
+ CC_FOR_BUILD=no_compiler_found
+ else
+ set_cc_for_build
+ fi
+ if test "$CC_FOR_BUILD" != no_compiler_found; then
+ if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
+ (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
+ grep IS_64BIT_ARCH >/dev/null
+ then
+ case $UNAME_PROCESSOR in
+ i386) UNAME_PROCESSOR=x86_64 ;;
+ powerpc) UNAME_PROCESSOR=powerpc64 ;;
+ esac
+ fi
+ # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc
+ if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \
+ (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
+ grep IS_PPC >/dev/null
+ then
+ UNAME_PROCESSOR=powerpc
+ fi
+ elif test "$UNAME_PROCESSOR" = i386 ; then
+ # uname -m returns i386 or x86_64
+ UNAME_PROCESSOR=$UNAME_MACHINE
+ fi
+ GUESS=$UNAME_PROCESSOR-apple-darwin$UNAME_RELEASE
+ ;;
+ *:procnto*:*:* | *:QNX:[0123456789]*:*)
+ UNAME_PROCESSOR=`uname -p`
+ if test "$UNAME_PROCESSOR" = x86; then
+ UNAME_PROCESSOR=i386
+ UNAME_MACHINE=pc
+ fi
+ GUESS=$UNAME_PROCESSOR-$UNAME_MACHINE-nto-qnx$UNAME_RELEASE
+ ;;
+ *:QNX:*:4*)
+ GUESS=i386-pc-qnx
+ ;;
+ NEO-*:NONSTOP_KERNEL:*:*)
+ GUESS=neo-tandem-nsk$UNAME_RELEASE
+ ;;
+ NSE-*:NONSTOP_KERNEL:*:*)
+ GUESS=nse-tandem-nsk$UNAME_RELEASE
+ ;;
+ NSR-*:NONSTOP_KERNEL:*:*)
+ GUESS=nsr-tandem-nsk$UNAME_RELEASE
+ ;;
+ NSV-*:NONSTOP_KERNEL:*:*)
+ GUESS=nsv-tandem-nsk$UNAME_RELEASE
+ ;;
+ NSX-*:NONSTOP_KERNEL:*:*)
+ GUESS=nsx-tandem-nsk$UNAME_RELEASE
+ ;;
+ *:NonStop-UX:*:*)
+ GUESS=mips-compaq-nonstopux
+ ;;
+ BS2000:POSIX*:*:*)
+ GUESS=bs2000-siemens-sysv
+ ;;
+ DS/*:UNIX_System_V:*:*)
+ GUESS=$UNAME_MACHINE-$UNAME_SYSTEM-$UNAME_RELEASE
+ ;;
+ *:Plan9:*:*)
+ # "uname -m" is not consistent, so use $cputype instead. 386
+ # is converted to i386 for consistency with other x86
+ # operating systems.
+ if test "${cputype-}" = 386; then
+ UNAME_MACHINE=i386
+ elif test "x${cputype-}" != x; then
+ UNAME_MACHINE=$cputype
+ fi
+ GUESS=$UNAME_MACHINE-unknown-plan9
+ ;;
+ *:TOPS-10:*:*)
+ GUESS=pdp10-unknown-tops10
+ ;;
+ *:TENEX:*:*)
+ GUESS=pdp10-unknown-tenex
+ ;;
+ KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
+ GUESS=pdp10-dec-tops20
+ ;;
+ XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
+ GUESS=pdp10-xkl-tops20
+ ;;
+ *:TOPS-20:*:*)
+ GUESS=pdp10-unknown-tops20
+ ;;
+ *:ITS:*:*)
+ GUESS=pdp10-unknown-its
+ ;;
+ SEI:*:*:SEIUX)
+ GUESS=mips-sei-seiux$UNAME_RELEASE
+ ;;
+ *:DragonFly:*:*)
+ DRAGONFLY_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
+ GUESS=$UNAME_MACHINE-unknown-dragonfly$DRAGONFLY_REL
+ ;;
+ *:*VMS:*:*)
+ UNAME_MACHINE=`(uname -p) 2>/dev/null`
+ case $UNAME_MACHINE in
+ A*) GUESS=alpha-dec-vms ;;
+ I*) GUESS=ia64-dec-vms ;;
+ V*) GUESS=vax-dec-vms ;;
+ esac ;;
+ *:XENIX:*:SysV)
+ GUESS=i386-pc-xenix
+ ;;
+ i*86:skyos:*:*)
+ SKYOS_REL=`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'`
+ GUESS=$UNAME_MACHINE-pc-skyos$SKYOS_REL
+ ;;
+ i*86:rdos:*:*)
+ GUESS=$UNAME_MACHINE-pc-rdos
+ ;;
+ i*86:Fiwix:*:*)
+ GUESS=$UNAME_MACHINE-pc-fiwix
+ ;;
+ *:AROS:*:*)
+ GUESS=$UNAME_MACHINE-unknown-aros
+ ;;
+ x86_64:VMkernel:*:*)
+ GUESS=$UNAME_MACHINE-unknown-esx
+ ;;
+ amd64:Isilon\ OneFS:*:*)
+ GUESS=x86_64-unknown-onefs
+ ;;
+ *:Unleashed:*:*)
+ GUESS=$UNAME_MACHINE-unknown-unleashed$UNAME_RELEASE
+ ;;
+esac
+
+# Do we have a guess based on uname results?
+if test "x$GUESS" != x; then
+ echo "$GUESS"
+ exit
+fi
+
+# No uname command or uname output not recognized.
+set_cc_for_build
+cat > "$dummy.c" <<EOF
+#ifdef _SEQUENT_
+#include <sys/types.h>
+#include <sys/utsname.h>
+#endif
+#if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__)
+#if defined (vax) || defined (__vax) || defined (__vax__) || defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__)
+#include <signal.h>
+#if defined(_SIZE_T_) || defined(SIGLOST)
+#include <sys/utsname.h>
+#endif
+#endif
+#endif
+main ()
+{
+#if defined (sony)
+#if defined (MIPSEB)
+ /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,
+ I don't know.... */
+ printf ("mips-sony-bsd\n"); exit (0);
+#else
+#include <sys/param.h>
+ printf ("m68k-sony-newsos%s\n",
+#ifdef NEWSOS4
+ "4"
+#else
+ ""
+#endif
+ ); exit (0);
+#endif
+#endif
+
+#if defined (NeXT)
+#if !defined (__ARCHITECTURE__)
+#define __ARCHITECTURE__ "m68k"
+#endif
+ int version;
+ version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
+ if (version < 4)
+ printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
+ else
+ printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
+ exit (0);
+#endif
+
+#if defined (MULTIMAX) || defined (n16)
+#if defined (UMAXV)
+ printf ("ns32k-encore-sysv\n"); exit (0);
+#else
+#if defined (CMU)
+ printf ("ns32k-encore-mach\n"); exit (0);
+#else
+ printf ("ns32k-encore-bsd\n"); exit (0);
+#endif
+#endif
+#endif
+
+#if defined (__386BSD__)
+ printf ("i386-pc-bsd\n"); exit (0);
+#endif
+
+#if defined (sequent)
+#if defined (i386)
+ printf ("i386-sequent-dynix\n"); exit (0);
+#endif
+#if defined (ns32000)
+ printf ("ns32k-sequent-dynix\n"); exit (0);
+#endif
+#endif
+
+#if defined (_SEQUENT_)
+ struct utsname un;
+
+ uname(&un);
+ if (strncmp(un.version, "V2", 2) == 0) {
+ printf ("i386-sequent-ptx2\n"); exit (0);
+ }
+ if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
+ printf ("i386-sequent-ptx1\n"); exit (0);
+ }
+ printf ("i386-sequent-ptx\n"); exit (0);
+#endif
+
+#if defined (vax)
+#if !defined (ultrix)
+#include <sys/param.h>
+#if defined (BSD)
+#if BSD == 43
+ printf ("vax-dec-bsd4.3\n"); exit (0);
+#else
+#if BSD == 199006
+ printf ("vax-dec-bsd4.3reno\n"); exit (0);
+#else
+ printf ("vax-dec-bsd\n"); exit (0);
+#endif
+#endif
+#else
+ printf ("vax-dec-bsd\n"); exit (0);
+#endif
+#else
+#if defined(_SIZE_T_) || defined(SIGLOST)
+ struct utsname un;
+ uname (&un);
+ printf ("vax-dec-ultrix%s\n", un.release); exit (0);
+#else
+ printf ("vax-dec-ultrix\n"); exit (0);
+#endif
+#endif
+#endif
+#if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__)
+#if defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__)
+#if defined(_SIZE_T_) || defined(SIGLOST)
+ struct utsname *un;
+ uname (&un);
+ printf ("mips-dec-ultrix%s\n", un.release); exit (0);
+#else
+ printf ("mips-dec-ultrix\n"); exit (0);
+#endif
+#endif
+#endif
+
+#if defined (alliant) && defined (i860)
+ printf ("i860-alliant-bsd\n"); exit (0);
+#endif
+
+ exit (1);
+}
+EOF
+
+$CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null && SYSTEM_NAME=`"$dummy"` &&
+ { echo "$SYSTEM_NAME"; exit; }
+
+# Apollos put the system type in the environment.
+test -d /usr/apollo && { echo "$ISP-apollo-$SYSTYPE"; exit; }
+
+echo "$0: unable to guess system type" >&2
+
+case $UNAME_MACHINE:$UNAME_SYSTEM in
+ mips:Linux | mips64:Linux)
+ # If we got here on MIPS GNU/Linux, output extra information.
+ cat >&2 <<EOF
+
+NOTE: MIPS GNU/Linux systems require a C compiler to fully recognize
+the system type. Please install a C compiler and try again.
+EOF
+ ;;
+esac
+
+cat >&2 <<EOF
+
+This script (version $timestamp), has failed to recognize the
+operating system you are using. If your script is old, overwrite *all*
+copies of config.guess and config.sub with the latest versions from:
+
+ https://git.savannah.gnu.org/cgit/config.git/plain/config.guess
+and
+ https://git.savannah.gnu.org/cgit/config.git/plain/config.sub
+EOF
+
+our_year=`echo $timestamp | sed 's,-.*,,'`
+thisyear=`date +%Y`
+# shellcheck disable=SC2003
+script_age=`expr "$thisyear" - "$our_year"`
+if test "$script_age" -lt 3 ; then
+ cat >&2 <<EOF
+
+If $0 has already been updated, send the following data and any
+information you think might be pertinent to config-patches@gnu.org to
+provide the necessary information to handle your system.
+
+config.guess timestamp = $timestamp
+
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
+/bin/uname -X = `(/bin/uname -X) 2>/dev/null`
+
+hostinfo = `(hostinfo) 2>/dev/null`
+/bin/universe = `(/bin/universe) 2>/dev/null`
+/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null`
+/bin/arch = `(/bin/arch) 2>/dev/null`
+/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
+
+UNAME_MACHINE = "$UNAME_MACHINE"
+UNAME_RELEASE = "$UNAME_RELEASE"
+UNAME_SYSTEM = "$UNAME_SYSTEM"
+UNAME_VERSION = "$UNAME_VERSION"
+EOF
+fi
+
+exit 1
+
+# Local variables:
+# eval: (add-hook 'before-save-hook 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
diff --git a/config.h.in b/config.h.in
new file mode 100644
index 0000000..c91eb01
--- /dev/null
+++ b/config.h.in
@@ -0,0 +1,105 @@
+/* config.h.in. Generated from configure.ac by autoheader. */
+
+/* Defined if the requested minimum BOOST version is satisfied */
+#undef HAVE_BOOST
+
+/* Define to 1 if you have <boost/filesystem/path.hpp> */
+#undef HAVE_BOOST_FILESYSTEM_PATH_HPP
+
+/* Define to 1 if you have <boost/program_options.hpp> */
+#undef HAVE_BOOST_PROGRAM_OPTIONS_HPP
+
+/* Define to 1 if you have <boost/system/error_code.hpp> */
+#undef HAVE_BOOST_SYSTEM_ERROR_CODE_HPP
+
+/* define if the compiler supports basic C++17 syntax */
+#undef HAVE_CXX17
+
+/* Define to 1 if you have the <dlfcn.h> header file. */
+#undef HAVE_DLFCN_H
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#undef HAVE_INTTYPES_H
+
+/* Define to 1 if stdbool.h conforms to C99. */
+#undef HAVE_STDBOOL_H
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#undef HAVE_STDINT_H
+
+/* Define to 1 if you have the <stdio.h> header file. */
+#undef HAVE_STDIO_H
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#undef HAVE_STDLIB_H
+
+/* Define to 1 if you have the <strings.h> header file. */
+#undef HAVE_STRINGS_H
+
+/* Define to 1 if you have the <string.h> header file. */
+#undef HAVE_STRING_H
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#undef HAVE_SYS_STAT_H
+
+/* Define to 1 if you have the <sys/time.h> header file. */
+#undef HAVE_SYS_TIME_H
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#undef HAVE_SYS_TYPES_H
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#undef HAVE_UNISTD_H
+
+/* Define to 1 if the system has the type `_Bool'. */
+#undef HAVE__BOOL
+
+/* Define to the sub-directory where libtool stores uninstalled libraries. */
+#undef LT_OBJDIR
+
+/* Disable debugging information */
+#undef NDEBUG
+
+/* Name of package */
+#undef PACKAGE
+
+/* Define to the address where bug reports for this package should be sent. */
+#undef PACKAGE_BUGREPORT
+
+/* Define to the full name of this package. */
+#undef PACKAGE_NAME
+
+/* Define to the full name and version of this package. */
+#undef PACKAGE_STRING
+
+/* Define to the one symbol short name of this package. */
+#undef PACKAGE_TARNAME
+
+/* Define to the home page for this package. */
+#undef PACKAGE_URL
+
+/* Define to the version of this package. */
+#undef PACKAGE_VERSION
+
+/* The size of `void *', as computed by sizeof. */
+#undef SIZEOF_VOID_P
+
+/* Define to 1 if all of the C90 standard headers exist (not just the ones
+ required in a freestanding environment). This macro is provided for
+ backward compatibility; new code need not use it. */
+#undef STDC_HEADERS
+
+/* Version number of package */
+#undef VERSION
+
+/* Define to `__inline__' or `__inline' if that's what the C compiler
+ calls it, or to nothing if 'inline' is not supported under any name. */
+#ifndef __cplusplus
+#undef inline
+#endif
+
+/* Define to `int' if <sys/types.h> does not define. */
+#undef mode_t
+
+/* Define to `unsigned int' if <sys/types.h> does not define. */
+#undef size_t
diff --git a/config.sub b/config.sub
new file mode 100755
index 0000000..dba16e8
--- /dev/null
+++ b/config.sub
@@ -0,0 +1,1890 @@
+#! /bin/sh
+# Configuration validation subroutine script.
+# Copyright 1992-2022 Free Software Foundation, Inc.
+
+# shellcheck disable=SC2006,SC2268 # see below for rationale
+
+timestamp='2022-01-03'
+
+# This file is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, see <https://www.gnu.org/licenses/>.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that
+# program. This Exception is an additional permission under section 7
+# of the GNU General Public License, version 3 ("GPLv3").
+
+
+# Please send patches to <config-patches@gnu.org>.
+#
+# Configuration subroutine to validate and canonicalize a configuration type.
+# Supply the specified configuration type as an argument.
+# If it is invalid, we print an error message on stderr and exit with code 1.
+# Otherwise, we print the canonical config type on stdout and succeed.
+
+# You can get the latest version of this script from:
+# https://git.savannah.gnu.org/cgit/config.git/plain/config.sub
+
+# This file is supposed to be the same for all GNU packages
+# and recognize all the CPU types, system types and aliases
+# that are meaningful with *any* GNU software.
+# Each package is responsible for reporting which valid configurations
+# it does not support. The user should be able to distinguish
+# a failure to support a valid configuration from a meaningless
+# configuration.
+
+# The goal of this file is to map all the various variations of a given
+# machine specification into a single specification in the form:
+# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
+# or in some cases, the newer four-part form:
+# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
+# It is wrong to echo any other type of specification.
+
+# The "shellcheck disable" line above the timestamp inhibits complaints
+# about features and limitations of the classic Bourne shell that were
+# superseded or lifted in POSIX. However, this script identifies a wide
+# variety of pre-POSIX systems that do not have POSIX shells at all, and
+# even some reasonably current systems (Solaris 10 as case-in-point) still
+# have a pre-POSIX /bin/sh.
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS
+
+Canonicalize a configuration name.
+
+Options:
+ -h, --help print this help, then exit
+ -t, --time-stamp print date of last modification, then exit
+ -v, --version print version number, then exit
+
+Report bugs and patches to <config-patches@gnu.org>."
+
+version="\
+GNU config.sub ($timestamp)
+
+Copyright 1992-2022 Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions. There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+ case $1 in
+ --time-stamp | --time* | -t )
+ echo "$timestamp" ; exit ;;
+ --version | -v )
+ echo "$version" ; exit ;;
+ --help | --h* | -h )
+ echo "$usage"; exit ;;
+ -- ) # Stop option processing
+ shift; break ;;
+ - ) # Use stdin as input.
+ break ;;
+ -* )
+ echo "$me: invalid option $1$help" >&2
+ exit 1 ;;
+
+ *local*)
+ # First pass through any local machine types.
+ echo "$1"
+ exit ;;
+
+ * )
+ break ;;
+ esac
+done
+
+case $# in
+ 0) echo "$me: missing argument$help" >&2
+ exit 1;;
+ 1) ;;
+ *) echo "$me: too many arguments$help" >&2
+ exit 1;;
+esac
+
+# Split fields of configuration type
+# shellcheck disable=SC2162
+saved_IFS=$IFS
+IFS="-" read field1 field2 field3 field4 <<EOF
+$1
+EOF
+IFS=$saved_IFS
+
+# Separate into logical components for further validation
+case $1 in
+ *-*-*-*-*)
+ echo Invalid configuration \`"$1"\': more than four components >&2
+ exit 1
+ ;;
+ *-*-*-*)
+ basic_machine=$field1-$field2
+ basic_os=$field3-$field4
+ ;;
+ *-*-*)
+ # Ambiguous whether COMPANY is present, or skipped and KERNEL-OS is two
+ # parts
+ maybe_os=$field2-$field3
+ case $maybe_os in
+ nto-qnx* | linux-* | uclinux-uclibc* \
+ | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* \
+ | netbsd*-eabi* | kopensolaris*-gnu* | cloudabi*-eabi* \
+ | storm-chaos* | os2-emx* | rtmk-nova*)
+ basic_machine=$field1
+ basic_os=$maybe_os
+ ;;
+ android-linux)
+ basic_machine=$field1-unknown
+ basic_os=linux-android
+ ;;
+ *)
+ basic_machine=$field1-$field2
+ basic_os=$field3
+ ;;
+ esac
+ ;;
+ *-*)
+ # A lone config we happen to match not fitting any pattern
+ case $field1-$field2 in
+ decstation-3100)
+ basic_machine=mips-dec
+ basic_os=
+ ;;
+ *-*)
+ # Second component is usually, but not always the OS
+ case $field2 in
+ # Prevent following clause from handling this valid os
+ sun*os*)
+ basic_machine=$field1
+ basic_os=$field2
+ ;;
+ zephyr*)
+ basic_machine=$field1-unknown
+ basic_os=$field2
+ ;;
+ # Manufacturers
+ dec* | mips* | sequent* | encore* | pc533* | sgi* | sony* \
+ | att* | 7300* | 3300* | delta* | motorola* | sun[234]* \
+ | unicom* | ibm* | next | hp | isi* | apollo | altos* \
+ | convergent* | ncr* | news | 32* | 3600* | 3100* \
+ | hitachi* | c[123]* | convex* | sun | crds | omron* | dg \
+ | ultra | tti* | harris | dolphin | highlevel | gould \
+ | cbm | ns | masscomp | apple | axis | knuth | cray \
+ | microblaze* | sim | cisco \
+ | oki | wec | wrs | winbond)
+ basic_machine=$field1-$field2
+ basic_os=
+ ;;
+ *)
+ basic_machine=$field1
+ basic_os=$field2
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ *)
+ # Convert single-component short-hands not valid as part of
+ # multi-component configurations.
+ case $field1 in
+ 386bsd)
+ basic_machine=i386-pc
+ basic_os=bsd
+ ;;
+ a29khif)
+ basic_machine=a29k-amd
+ basic_os=udi
+ ;;
+ adobe68k)
+ basic_machine=m68010-adobe
+ basic_os=scout
+ ;;
+ alliant)
+ basic_machine=fx80-alliant
+ basic_os=
+ ;;
+ altos | altos3068)
+ basic_machine=m68k-altos
+ basic_os=
+ ;;
+ am29k)
+ basic_machine=a29k-none
+ basic_os=bsd
+ ;;
+ amdahl)
+ basic_machine=580-amdahl
+ basic_os=sysv
+ ;;
+ amiga)
+ basic_machine=m68k-unknown
+ basic_os=
+ ;;
+ amigaos | amigados)
+ basic_machine=m68k-unknown
+ basic_os=amigaos
+ ;;
+ amigaunix | amix)
+ basic_machine=m68k-unknown
+ basic_os=sysv4
+ ;;
+ apollo68)
+ basic_machine=m68k-apollo
+ basic_os=sysv
+ ;;
+ apollo68bsd)
+ basic_machine=m68k-apollo
+ basic_os=bsd
+ ;;
+ aros)
+ basic_machine=i386-pc
+ basic_os=aros
+ ;;
+ aux)
+ basic_machine=m68k-apple
+ basic_os=aux
+ ;;
+ balance)
+ basic_machine=ns32k-sequent
+ basic_os=dynix
+ ;;
+ blackfin)
+ basic_machine=bfin-unknown
+ basic_os=linux
+ ;;
+ cegcc)
+ basic_machine=arm-unknown
+ basic_os=cegcc
+ ;;
+ convex-c1)
+ basic_machine=c1-convex
+ basic_os=bsd
+ ;;
+ convex-c2)
+ basic_machine=c2-convex
+ basic_os=bsd
+ ;;
+ convex-c32)
+ basic_machine=c32-convex
+ basic_os=bsd
+ ;;
+ convex-c34)
+ basic_machine=c34-convex
+ basic_os=bsd
+ ;;
+ convex-c38)
+ basic_machine=c38-convex
+ basic_os=bsd
+ ;;
+ cray)
+ basic_machine=j90-cray
+ basic_os=unicos
+ ;;
+ crds | unos)
+ basic_machine=m68k-crds
+ basic_os=
+ ;;
+ da30)
+ basic_machine=m68k-da30
+ basic_os=
+ ;;
+ decstation | pmax | pmin | dec3100 | decstatn)
+ basic_machine=mips-dec
+ basic_os=
+ ;;
+ delta88)
+ basic_machine=m88k-motorola
+ basic_os=sysv3
+ ;;
+ dicos)
+ basic_machine=i686-pc
+ basic_os=dicos
+ ;;
+ djgpp)
+ basic_machine=i586-pc
+ basic_os=msdosdjgpp
+ ;;
+ ebmon29k)
+ basic_machine=a29k-amd
+ basic_os=ebmon
+ ;;
+ es1800 | OSE68k | ose68k | ose | OSE)
+ basic_machine=m68k-ericsson
+ basic_os=ose
+ ;;
+ gmicro)
+ basic_machine=tron-gmicro
+ basic_os=sysv
+ ;;
+ go32)
+ basic_machine=i386-pc
+ basic_os=go32
+ ;;
+ h8300hms)
+ basic_machine=h8300-hitachi
+ basic_os=hms
+ ;;
+ h8300xray)
+ basic_machine=h8300-hitachi
+ basic_os=xray
+ ;;
+ h8500hms)
+ basic_machine=h8500-hitachi
+ basic_os=hms
+ ;;
+ harris)
+ basic_machine=m88k-harris
+ basic_os=sysv3
+ ;;
+ hp300 | hp300hpux)
+ basic_machine=m68k-hp
+ basic_os=hpux
+ ;;
+ hp300bsd)
+ basic_machine=m68k-hp
+ basic_os=bsd
+ ;;
+ hppaosf)
+ basic_machine=hppa1.1-hp
+ basic_os=osf
+ ;;
+ hppro)
+ basic_machine=hppa1.1-hp
+ basic_os=proelf
+ ;;
+ i386mach)
+ basic_machine=i386-mach
+ basic_os=mach
+ ;;
+ isi68 | isi)
+ basic_machine=m68k-isi
+ basic_os=sysv
+ ;;
+ m68knommu)
+ basic_machine=m68k-unknown
+ basic_os=linux
+ ;;
+ magnum | m3230)
+ basic_machine=mips-mips
+ basic_os=sysv
+ ;;
+ merlin)
+ basic_machine=ns32k-utek
+ basic_os=sysv
+ ;;
+ mingw64)
+ basic_machine=x86_64-pc
+ basic_os=mingw64
+ ;;
+ mingw32)
+ basic_machine=i686-pc
+ basic_os=mingw32
+ ;;
+ mingw32ce)
+ basic_machine=arm-unknown
+ basic_os=mingw32ce
+ ;;
+ monitor)
+ basic_machine=m68k-rom68k
+ basic_os=coff
+ ;;
+ morphos)
+ basic_machine=powerpc-unknown
+ basic_os=morphos
+ ;;
+ moxiebox)
+ basic_machine=moxie-unknown
+ basic_os=moxiebox
+ ;;
+ msdos)
+ basic_machine=i386-pc
+ basic_os=msdos
+ ;;
+ msys)
+ basic_machine=i686-pc
+ basic_os=msys
+ ;;
+ mvs)
+ basic_machine=i370-ibm
+ basic_os=mvs
+ ;;
+ nacl)
+ basic_machine=le32-unknown
+ basic_os=nacl
+ ;;
+ ncr3000)
+ basic_machine=i486-ncr
+ basic_os=sysv4
+ ;;
+ netbsd386)
+ basic_machine=i386-pc
+ basic_os=netbsd
+ ;;
+ netwinder)
+ basic_machine=armv4l-rebel
+ basic_os=linux
+ ;;
+ news | news700 | news800 | news900)
+ basic_machine=m68k-sony
+ basic_os=newsos
+ ;;
+ news1000)
+ basic_machine=m68030-sony
+ basic_os=newsos
+ ;;
+ necv70)
+ basic_machine=v70-nec
+ basic_os=sysv
+ ;;
+ nh3000)
+ basic_machine=m68k-harris
+ basic_os=cxux
+ ;;
+ nh[45]000)
+ basic_machine=m88k-harris
+ basic_os=cxux
+ ;;
+ nindy960)
+ basic_machine=i960-intel
+ basic_os=nindy
+ ;;
+ mon960)
+ basic_machine=i960-intel
+ basic_os=mon960
+ ;;
+ nonstopux)
+ basic_machine=mips-compaq
+ basic_os=nonstopux
+ ;;
+ os400)
+ basic_machine=powerpc-ibm
+ basic_os=os400
+ ;;
+ OSE68000 | ose68000)
+ basic_machine=m68000-ericsson
+ basic_os=ose
+ ;;
+ os68k)
+ basic_machine=m68k-none
+ basic_os=os68k
+ ;;
+ paragon)
+ basic_machine=i860-intel
+ basic_os=osf
+ ;;
+ parisc)
+ basic_machine=hppa-unknown
+ basic_os=linux
+ ;;
+ psp)
+ basic_machine=mipsallegrexel-sony
+ basic_os=psp
+ ;;
+ pw32)
+ basic_machine=i586-unknown
+ basic_os=pw32
+ ;;
+ rdos | rdos64)
+ basic_machine=x86_64-pc
+ basic_os=rdos
+ ;;
+ rdos32)
+ basic_machine=i386-pc
+ basic_os=rdos
+ ;;
+ rom68k)
+ basic_machine=m68k-rom68k
+ basic_os=coff
+ ;;
+ sa29200)
+ basic_machine=a29k-amd
+ basic_os=udi
+ ;;
+ sei)
+ basic_machine=mips-sei
+ basic_os=seiux
+ ;;
+ sequent)
+ basic_machine=i386-sequent
+ basic_os=
+ ;;
+ sps7)
+ basic_machine=m68k-bull
+ basic_os=sysv2
+ ;;
+ st2000)
+ basic_machine=m68k-tandem
+ basic_os=
+ ;;
+ stratus)
+ basic_machine=i860-stratus
+ basic_os=sysv4
+ ;;
+ sun2)
+ basic_machine=m68000-sun
+ basic_os=
+ ;;
+ sun2os3)
+ basic_machine=m68000-sun
+ basic_os=sunos3
+ ;;
+ sun2os4)
+ basic_machine=m68000-sun
+ basic_os=sunos4
+ ;;
+ sun3)
+ basic_machine=m68k-sun
+ basic_os=
+ ;;
+ sun3os3)
+ basic_machine=m68k-sun
+ basic_os=sunos3
+ ;;
+ sun3os4)
+ basic_machine=m68k-sun
+ basic_os=sunos4
+ ;;
+ sun4)
+ basic_machine=sparc-sun
+ basic_os=
+ ;;
+ sun4os3)
+ basic_machine=sparc-sun
+ basic_os=sunos3
+ ;;
+ sun4os4)
+ basic_machine=sparc-sun
+ basic_os=sunos4
+ ;;
+ sun4sol2)
+ basic_machine=sparc-sun
+ basic_os=solaris2
+ ;;
+ sun386 | sun386i | roadrunner)
+ basic_machine=i386-sun
+ basic_os=
+ ;;
+ sv1)
+ basic_machine=sv1-cray
+ basic_os=unicos
+ ;;
+ symmetry)
+ basic_machine=i386-sequent
+ basic_os=dynix
+ ;;
+ t3e)
+ basic_machine=alphaev5-cray
+ basic_os=unicos
+ ;;
+ t90)
+ basic_machine=t90-cray
+ basic_os=unicos
+ ;;
+ toad1)
+ basic_machine=pdp10-xkl
+ basic_os=tops20
+ ;;
+ tpf)
+ basic_machine=s390x-ibm
+ basic_os=tpf
+ ;;
+ udi29k)
+ basic_machine=a29k-amd
+ basic_os=udi
+ ;;
+ ultra3)
+ basic_machine=a29k-nyu
+ basic_os=sym1
+ ;;
+ v810 | necv810)
+ basic_machine=v810-nec
+ basic_os=none
+ ;;
+ vaxv)
+ basic_machine=vax-dec
+ basic_os=sysv
+ ;;
+ vms)
+ basic_machine=vax-dec
+ basic_os=vms
+ ;;
+ vsta)
+ basic_machine=i386-pc
+ basic_os=vsta
+ ;;
+ vxworks960)
+ basic_machine=i960-wrs
+ basic_os=vxworks
+ ;;
+ vxworks68)
+ basic_machine=m68k-wrs
+ basic_os=vxworks
+ ;;
+ vxworks29k)
+ basic_machine=a29k-wrs
+ basic_os=vxworks
+ ;;
+ xbox)
+ basic_machine=i686-pc
+ basic_os=mingw32
+ ;;
+ ymp)
+ basic_machine=ymp-cray
+ basic_os=unicos
+ ;;
+ *)
+ basic_machine=$1
+ basic_os=
+ ;;
+ esac
+ ;;
+esac
+
+# Decode 1-component or ad-hoc basic machines
+case $basic_machine in
+ # Here we handle the default manufacturer of certain CPU types. It is in
+ # some cases the only manufacturer, in others, it is the most popular.
+ w89k)
+ cpu=hppa1.1
+ vendor=winbond
+ ;;
+ op50n)
+ cpu=hppa1.1
+ vendor=oki
+ ;;
+ op60c)
+ cpu=hppa1.1
+ vendor=oki
+ ;;
+ ibm*)
+ cpu=i370
+ vendor=ibm
+ ;;
+ orion105)
+ cpu=clipper
+ vendor=highlevel
+ ;;
+ mac | mpw | mac-mpw)
+ cpu=m68k
+ vendor=apple
+ ;;
+ pmac | pmac-mpw)
+ cpu=powerpc
+ vendor=apple
+ ;;
+
+ # Recognize the various machine names and aliases which stand
+ # for a CPU type and a company and sometimes even an OS.
+ 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
+ cpu=m68000
+ vendor=att
+ ;;
+ 3b*)
+ cpu=we32k
+ vendor=att
+ ;;
+ bluegene*)
+ cpu=powerpc
+ vendor=ibm
+ basic_os=cnk
+ ;;
+ decsystem10* | dec10*)
+ cpu=pdp10
+ vendor=dec
+ basic_os=tops10
+ ;;
+ decsystem20* | dec20*)
+ cpu=pdp10
+ vendor=dec
+ basic_os=tops20
+ ;;
+ delta | 3300 | motorola-3300 | motorola-delta \
+ | 3300-motorola | delta-motorola)
+ cpu=m68k
+ vendor=motorola
+ ;;
+ dpx2*)
+ cpu=m68k
+ vendor=bull
+ basic_os=sysv3
+ ;;
+ encore | umax | mmax)
+ cpu=ns32k
+ vendor=encore
+ ;;
+ elxsi)
+ cpu=elxsi
+ vendor=elxsi
+ basic_os=${basic_os:-bsd}
+ ;;
+ fx2800)
+ cpu=i860
+ vendor=alliant
+ ;;
+ genix)
+ cpu=ns32k
+ vendor=ns
+ ;;
+ h3050r* | hiux*)
+ cpu=hppa1.1
+ vendor=hitachi
+ basic_os=hiuxwe2
+ ;;
+ hp3k9[0-9][0-9] | hp9[0-9][0-9])
+ cpu=hppa1.0
+ vendor=hp
+ ;;
+ hp9k2[0-9][0-9] | hp9k31[0-9])
+ cpu=m68000
+ vendor=hp
+ ;;
+ hp9k3[2-9][0-9])
+ cpu=m68k
+ vendor=hp
+ ;;
+ hp9k6[0-9][0-9] | hp6[0-9][0-9])
+ cpu=hppa1.0
+ vendor=hp
+ ;;
+ hp9k7[0-79][0-9] | hp7[0-79][0-9])
+ cpu=hppa1.1
+ vendor=hp
+ ;;
+ hp9k78[0-9] | hp78[0-9])
+ # FIXME: really hppa2.0-hp
+ cpu=hppa1.1
+ vendor=hp
+ ;;
+ hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
+ # FIXME: really hppa2.0-hp
+ cpu=hppa1.1
+ vendor=hp
+ ;;
+ hp9k8[0-9][13679] | hp8[0-9][13679])
+ cpu=hppa1.1
+ vendor=hp
+ ;;
+ hp9k8[0-9][0-9] | hp8[0-9][0-9])
+ cpu=hppa1.0
+ vendor=hp
+ ;;
+ i*86v32)
+ cpu=`echo "$1" | sed -e 's/86.*/86/'`
+ vendor=pc
+ basic_os=sysv32
+ ;;
+ i*86v4*)
+ cpu=`echo "$1" | sed -e 's/86.*/86/'`
+ vendor=pc
+ basic_os=sysv4
+ ;;
+ i*86v)
+ cpu=`echo "$1" | sed -e 's/86.*/86/'`
+ vendor=pc
+ basic_os=sysv
+ ;;
+ i*86sol2)
+ cpu=`echo "$1" | sed -e 's/86.*/86/'`
+ vendor=pc
+ basic_os=solaris2
+ ;;
+ j90 | j90-cray)
+ cpu=j90
+ vendor=cray
+ basic_os=${basic_os:-unicos}
+ ;;
+ iris | iris4d)
+ cpu=mips
+ vendor=sgi
+ case $basic_os in
+ irix*)
+ ;;
+ *)
+ basic_os=irix4
+ ;;
+ esac
+ ;;
+ miniframe)
+ cpu=m68000
+ vendor=convergent
+ ;;
+ *mint | mint[0-9]* | *MiNT | *MiNT[0-9]*)
+ cpu=m68k
+ vendor=atari
+ basic_os=mint
+ ;;
+ news-3600 | risc-news)
+ cpu=mips
+ vendor=sony
+ basic_os=newsos
+ ;;
+ next | m*-next)
+ cpu=m68k
+ vendor=next
+ case $basic_os in
+ openstep*)
+ ;;
+ nextstep*)
+ ;;
+ ns2*)
+ basic_os=nextstep2
+ ;;
+ *)
+ basic_os=nextstep3
+ ;;
+ esac
+ ;;
+ np1)
+ cpu=np1
+ vendor=gould
+ ;;
+ op50n-* | op60c-*)
+ cpu=hppa1.1
+ vendor=oki
+ basic_os=proelf
+ ;;
+ pa-hitachi)
+ cpu=hppa1.1
+ vendor=hitachi
+ basic_os=hiuxwe2
+ ;;
+ pbd)
+ cpu=sparc
+ vendor=tti
+ ;;
+ pbb)
+ cpu=m68k
+ vendor=tti
+ ;;
+ pc532)
+ cpu=ns32k
+ vendor=pc532
+ ;;
+ pn)
+ cpu=pn
+ vendor=gould
+ ;;
+ power)
+ cpu=power
+ vendor=ibm
+ ;;
+ ps2)
+ cpu=i386
+ vendor=ibm
+ ;;
+ rm[46]00)
+ cpu=mips
+ vendor=siemens
+ ;;
+ rtpc | rtpc-*)
+ cpu=romp
+ vendor=ibm
+ ;;
+ sde)
+ cpu=mipsisa32
+ vendor=sde
+ basic_os=${basic_os:-elf}
+ ;;
+ simso-wrs)
+ cpu=sparclite
+ vendor=wrs
+ basic_os=vxworks
+ ;;
+ tower | tower-32)
+ cpu=m68k
+ vendor=ncr
+ ;;
+ vpp*|vx|vx-*)
+ cpu=f301
+ vendor=fujitsu
+ ;;
+ w65)
+ cpu=w65
+ vendor=wdc
+ ;;
+ w89k-*)
+ cpu=hppa1.1
+ vendor=winbond
+ basic_os=proelf
+ ;;
+ none)
+ cpu=none
+ vendor=none
+ ;;
+ leon|leon[3-9])
+ cpu=sparc
+ vendor=$basic_machine
+ ;;
+ leon-*|leon[3-9]-*)
+ cpu=sparc
+ vendor=`echo "$basic_machine" | sed 's/-.*//'`
+ ;;
+
+ *-*)
+ # shellcheck disable=SC2162
+ saved_IFS=$IFS
+ IFS="-" read cpu vendor <<EOF
+$basic_machine
+EOF
+ IFS=$saved_IFS
+ ;;
+ # We use `pc' rather than `unknown'
+ # because (1) that's what they normally are, and
+ # (2) the word "unknown" tends to confuse beginning users.
+ i*86 | x86_64)
+ cpu=$basic_machine
+ vendor=pc
+ ;;
+ # These rules are duplicated from below for sake of the special case above;
+ # i.e. things that normalized to x86 arches should also default to "pc"
+ pc98)
+ cpu=i386
+ vendor=pc
+ ;;
+ x64 | amd64)
+ cpu=x86_64
+ vendor=pc
+ ;;
+ # Recognize the basic CPU types without company name.
+ *)
+ cpu=$basic_machine
+ vendor=unknown
+ ;;
+esac
+
+unset -v basic_machine
+
+# Decode basic machines in the full and proper CPU-Company form.
+case $cpu-$vendor in
+ # Here we handle the default manufacturer of certain CPU types in canonical form. It is in
+ # some cases the only manufacturer, in others, it is the most popular.
+ craynv-unknown)
+ vendor=cray
+ basic_os=${basic_os:-unicosmp}
+ ;;
+ c90-unknown | c90-cray)
+ vendor=cray
+ basic_os=${Basic_os:-unicos}
+ ;;
+ fx80-unknown)
+ vendor=alliant
+ ;;
+ romp-unknown)
+ vendor=ibm
+ ;;
+ mmix-unknown)
+ vendor=knuth
+ ;;
+ microblaze-unknown | microblazeel-unknown)
+ vendor=xilinx
+ ;;
+ rs6000-unknown)
+ vendor=ibm
+ ;;
+ vax-unknown)
+ vendor=dec
+ ;;
+ pdp11-unknown)
+ vendor=dec
+ ;;
+ we32k-unknown)
+ vendor=att
+ ;;
+ cydra-unknown)
+ vendor=cydrome
+ ;;
+ i370-ibm*)
+ vendor=ibm
+ ;;
+ orion-unknown)
+ vendor=highlevel
+ ;;
+ xps-unknown | xps100-unknown)
+ cpu=xps100
+ vendor=honeywell
+ ;;
+
+ # Here we normalize CPU types with a missing or matching vendor
+ armh-unknown | armh-alt)
+ cpu=armv7l
+ vendor=alt
+ basic_os=${basic_os:-linux-gnueabihf}
+ ;;
+ dpx20-unknown | dpx20-bull)
+ cpu=rs6000
+ vendor=bull
+ basic_os=${basic_os:-bosx}
+ ;;
+
+ # Here we normalize CPU types irrespective of the vendor
+ amd64-*)
+ cpu=x86_64
+ ;;
+ blackfin-*)
+ cpu=bfin
+ basic_os=linux
+ ;;
+ c54x-*)
+ cpu=tic54x
+ ;;
+ c55x-*)
+ cpu=tic55x
+ ;;
+ c6x-*)
+ cpu=tic6x
+ ;;
+ e500v[12]-*)
+ cpu=powerpc
+ basic_os=${basic_os}"spe"
+ ;;
+ mips3*-*)
+ cpu=mips64
+ ;;
+ ms1-*)
+ cpu=mt
+ ;;
+ m68knommu-*)
+ cpu=m68k
+ basic_os=linux
+ ;;
+ m9s12z-* | m68hcs12z-* | hcs12z-* | s12z-*)
+ cpu=s12z
+ ;;
+ openrisc-*)
+ cpu=or32
+ ;;
+ parisc-*)
+ cpu=hppa
+ basic_os=linux
+ ;;
+ pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
+ cpu=i586
+ ;;
+ pentiumpro-* | p6-* | 6x86-* | athlon-* | athalon_*-*)
+ cpu=i686
+ ;;
+ pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
+ cpu=i686
+ ;;
+ pentium4-*)
+ cpu=i786
+ ;;
+ pc98-*)
+ cpu=i386
+ ;;
+ ppc-* | ppcbe-*)
+ cpu=powerpc
+ ;;
+ ppcle-* | powerpclittle-*)
+ cpu=powerpcle
+ ;;
+ ppc64-*)
+ cpu=powerpc64
+ ;;
+ ppc64le-* | powerpc64little-*)
+ cpu=powerpc64le
+ ;;
+ sb1-*)
+ cpu=mipsisa64sb1
+ ;;
+ sb1el-*)
+ cpu=mipsisa64sb1el
+ ;;
+ sh5e[lb]-*)
+ cpu=`echo "$cpu" | sed 's/^\(sh.\)e\(.\)$/\1\2e/'`
+ ;;
+ spur-*)
+ cpu=spur
+ ;;
+ strongarm-* | thumb-*)
+ cpu=arm
+ ;;
+ tx39-*)
+ cpu=mipstx39
+ ;;
+ tx39el-*)
+ cpu=mipstx39el
+ ;;
+ x64-*)
+ cpu=x86_64
+ ;;
+ xscale-* | xscalee[bl]-*)
+ cpu=`echo "$cpu" | sed 's/^xscale/arm/'`
+ ;;
+ arm64-* | aarch64le-*)
+ cpu=aarch64
+ ;;
+
+ # Recognize the canonical CPU Types that limit and/or modify the
+ # company names they are paired with.
+ cr16-*)
+ basic_os=${basic_os:-elf}
+ ;;
+ crisv32-* | etraxfs*-*)
+ cpu=crisv32
+ vendor=axis
+ ;;
+ cris-* | etrax*-*)
+ cpu=cris
+ vendor=axis
+ ;;
+ crx-*)
+ basic_os=${basic_os:-elf}
+ ;;
+ neo-tandem)
+ cpu=neo
+ vendor=tandem
+ ;;
+ nse-tandem)
+ cpu=nse
+ vendor=tandem
+ ;;
+ nsr-tandem)
+ cpu=nsr
+ vendor=tandem
+ ;;
+ nsv-tandem)
+ cpu=nsv
+ vendor=tandem
+ ;;
+ nsx-tandem)
+ cpu=nsx
+ vendor=tandem
+ ;;
+ mipsallegrexel-sony)
+ cpu=mipsallegrexel
+ vendor=sony
+ ;;
+ tile*-*)
+ basic_os=${basic_os:-linux-gnu}
+ ;;
+
+ *)
+ # Recognize the canonical CPU types that are allowed with any
+ # company name.
+ case $cpu in
+ 1750a | 580 \
+ | a29k \
+ | aarch64 | aarch64_be \
+ | abacus \
+ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] \
+ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] \
+ | alphapca5[67] | alpha64pca5[67] \
+ | am33_2.0 \
+ | amdgcn \
+ | arc | arceb | arc32 | arc64 \
+ | arm | arm[lb]e | arme[lb] | armv* \
+ | avr | avr32 \
+ | asmjs \
+ | ba \
+ | be32 | be64 \
+ | bfin | bpf | bs2000 \
+ | c[123]* | c30 | [cjt]90 | c4x \
+ | c8051 | clipper | craynv | csky | cydra \
+ | d10v | d30v | dlx | dsp16xx \
+ | e2k | elxsi | epiphany \
+ | f30[01] | f700 | fido | fr30 | frv | ft32 | fx80 \
+ | h8300 | h8500 \
+ | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
+ | hexagon \
+ | i370 | i*86 | i860 | i960 | ia16 | ia64 \
+ | ip2k | iq2000 \
+ | k1om \
+ | le32 | le64 \
+ | lm32 \
+ | loongarch32 | loongarch64 | loongarchx32 \
+ | m32c | m32r | m32rle \
+ | m5200 | m68000 | m680[012346]0 | m68360 | m683?2 | m68k \
+ | m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x \
+ | m88110 | m88k | maxq | mb | mcore | mep | metag \
+ | microblaze | microblazeel \
+ | mips | mipsbe | mipseb | mipsel | mipsle \
+ | mips16 \
+ | mips64 | mips64eb | mips64el \
+ | mips64octeon | mips64octeonel \
+ | mips64orion | mips64orionel \
+ | mips64r5900 | mips64r5900el \
+ | mips64vr | mips64vrel \
+ | mips64vr4100 | mips64vr4100el \
+ | mips64vr4300 | mips64vr4300el \
+ | mips64vr5000 | mips64vr5000el \
+ | mips64vr5900 | mips64vr5900el \
+ | mipsisa32 | mipsisa32el \
+ | mipsisa32r2 | mipsisa32r2el \
+ | mipsisa32r3 | mipsisa32r3el \
+ | mipsisa32r5 | mipsisa32r5el \
+ | mipsisa32r6 | mipsisa32r6el \
+ | mipsisa64 | mipsisa64el \
+ | mipsisa64r2 | mipsisa64r2el \
+ | mipsisa64r3 | mipsisa64r3el \
+ | mipsisa64r5 | mipsisa64r5el \
+ | mipsisa64r6 | mipsisa64r6el \
+ | mipsisa64sb1 | mipsisa64sb1el \
+ | mipsisa64sr71k | mipsisa64sr71kel \
+ | mipsr5900 | mipsr5900el \
+ | mipstx39 | mipstx39el \
+ | mmix \
+ | mn10200 | mn10300 \
+ | moxie \
+ | mt \
+ | msp430 \
+ | nds32 | nds32le | nds32be \
+ | nfp \
+ | nios | nios2 | nios2eb | nios2el \
+ | none | np1 | ns16k | ns32k | nvptx \
+ | open8 \
+ | or1k* \
+ | or32 \
+ | orion \
+ | picochip \
+ | pdp10 | pdp11 | pj | pjl | pn | power \
+ | powerpc | powerpc64 | powerpc64le | powerpcle | powerpcspe \
+ | pru \
+ | pyramid \
+ | riscv | riscv32 | riscv32be | riscv64 | riscv64be \
+ | rl78 | romp | rs6000 | rx \
+ | s390 | s390x \
+ | score \
+ | sh | shl \
+ | sh[1234] | sh[24]a | sh[24]ae[lb] | sh[23]e | she[lb] | sh[lb]e \
+ | sh[1234]e[lb] | sh[12345][lb]e | sh[23]ele | sh64 | sh64le \
+ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet \
+ | sparclite \
+ | sparcv8 | sparcv9 | sparcv9b | sparcv9v | sv1 | sx* \
+ | spu \
+ | tahoe \
+ | thumbv7* \
+ | tic30 | tic4x | tic54x | tic55x | tic6x | tic80 \
+ | tron \
+ | ubicom32 \
+ | v70 | v850 | v850e | v850e1 | v850es | v850e2 | v850e2v3 \
+ | vax \
+ | visium \
+ | w65 \
+ | wasm32 | wasm64 \
+ | we32k \
+ | x86 | x86_64 | xc16x | xgate | xps100 \
+ | xstormy16 | xtensa* \
+ | ymp \
+ | z8k | z80)
+ ;;
+
+ *)
+ echo Invalid configuration \`"$1"\': machine \`"$cpu-$vendor"\' not recognized 1>&2
+ exit 1
+ ;;
+ esac
+ ;;
+esac
+
+# Here we canonicalize certain aliases for manufacturers.
+case $vendor in
+ digital*)
+ vendor=dec
+ ;;
+ commodore*)
+ vendor=cbm
+ ;;
+ *)
+ ;;
+esac
+
+# Decode manufacturer-specific aliases for certain operating systems.
+
+if test x$basic_os != x
+then
+
+# First recognize some ad-hoc cases, or perhaps split kernel-os, or else just
+# set os.
+case $basic_os in
+ gnu/linux*)
+ kernel=linux
+ os=`echo "$basic_os" | sed -e 's|gnu/linux|gnu|'`
+ ;;
+ os2-emx)
+ kernel=os2
+ os=`echo "$basic_os" | sed -e 's|os2-emx|emx|'`
+ ;;
+ nto-qnx*)
+ kernel=nto
+ os=`echo "$basic_os" | sed -e 's|nto-qnx|qnx|'`
+ ;;
+ *-*)
+ # shellcheck disable=SC2162
+ saved_IFS=$IFS
+ IFS="-" read kernel os <<EOF
+$basic_os
+EOF
+ IFS=$saved_IFS
+ ;;
+ # Default OS when just kernel was specified
+ nto*)
+ kernel=nto
+ os=`echo "$basic_os" | sed -e 's|nto|qnx|'`
+ ;;
+ linux*)
+ kernel=linux
+ os=`echo "$basic_os" | sed -e 's|linux|gnu|'`
+ ;;
+ *)
+ kernel=
+ os=$basic_os
+ ;;
+esac
+
+# Now, normalize the OS (knowing we just have one component, it's not a kernel,
+# etc.)
+case $os in
+ # First match some system type aliases that might get confused
+ # with valid system types.
+ # solaris* is a basic system type, with this one exception.
+ auroraux)
+ os=auroraux
+ ;;
+ bluegene*)
+ os=cnk
+ ;;
+ solaris1 | solaris1.*)
+ os=`echo "$os" | sed -e 's|solaris1|sunos4|'`
+ ;;
+ solaris)
+ os=solaris2
+ ;;
+ unixware*)
+ os=sysv4.2uw
+ ;;
+ # es1800 is here to avoid being matched by es* (a different OS)
+ es1800*)
+ os=ose
+ ;;
+ # Some version numbers need modification
+ chorusos*)
+ os=chorusos
+ ;;
+ isc)
+ os=isc2.2
+ ;;
+ sco6)
+ os=sco5v6
+ ;;
+ sco5)
+ os=sco3.2v5
+ ;;
+ sco4)
+ os=sco3.2v4
+ ;;
+ sco3.2.[4-9]*)
+ os=`echo "$os" | sed -e 's/sco3.2./sco3.2v/'`
+ ;;
+ sco*v* | scout)
+ # Don't match below
+ ;;
+ sco*)
+ os=sco3.2v2
+ ;;
+ psos*)
+ os=psos
+ ;;
+ qnx*)
+ os=qnx
+ ;;
+ hiux*)
+ os=hiuxwe2
+ ;;
+ lynx*178)
+ os=lynxos178
+ ;;
+ lynx*5)
+ os=lynxos5
+ ;;
+ lynxos*)
+ # don't get caught up in next wildcard
+ ;;
+ lynx*)
+ os=lynxos
+ ;;
+ mac[0-9]*)
+ os=`echo "$os" | sed -e 's|mac|macos|'`
+ ;;
+ opened*)
+ os=openedition
+ ;;
+ os400*)
+ os=os400
+ ;;
+ sunos5*)
+ os=`echo "$os" | sed -e 's|sunos5|solaris2|'`
+ ;;
+ sunos6*)
+ os=`echo "$os" | sed -e 's|sunos6|solaris3|'`
+ ;;
+ wince*)
+ os=wince
+ ;;
+ utek*)
+ os=bsd
+ ;;
+ dynix*)
+ os=bsd
+ ;;
+ acis*)
+ os=aos
+ ;;
+ atheos*)
+ os=atheos
+ ;;
+ syllable*)
+ os=syllable
+ ;;
+ 386bsd)
+ os=bsd
+ ;;
+ ctix* | uts*)
+ os=sysv
+ ;;
+ nova*)
+ os=rtmk-nova
+ ;;
+ ns2)
+ os=nextstep2
+ ;;
+ # Preserve the version number of sinix5.
+ sinix5.*)
+ os=`echo "$os" | sed -e 's|sinix|sysv|'`
+ ;;
+ sinix*)
+ os=sysv4
+ ;;
+ tpf*)
+ os=tpf
+ ;;
+ triton*)
+ os=sysv3
+ ;;
+ oss*)
+ os=sysv3
+ ;;
+ svr4*)
+ os=sysv4
+ ;;
+ svr3)
+ os=sysv3
+ ;;
+ sysvr4)
+ os=sysv4
+ ;;
+ ose*)
+ os=ose
+ ;;
+ *mint | mint[0-9]* | *MiNT | MiNT[0-9]*)
+ os=mint
+ ;;
+ dicos*)
+ os=dicos
+ ;;
+ pikeos*)
+ # Until real need of OS specific support for
+ # particular features comes up, bare metal
+ # configurations are quite functional.
+ case $cpu in
+ arm*)
+ os=eabi
+ ;;
+ *)
+ os=elf
+ ;;
+ esac
+ ;;
+ *)
+ # No normalization, but not necessarily accepted, that comes below.
+ ;;
+esac
+
+else
+
+# Here we handle the default operating systems that come with various machines.
+# The value should be what the vendor currently ships out the door with their
+# machine or put another way, the most popular os provided with the machine.
+
+# Note that if you're going to try to match "-MANUFACTURER" here (say,
+# "-sun"), then you have to tell the case statement up towards the top
+# that MANUFACTURER isn't an operating system. Otherwise, code above
+# will signal an error saying that MANUFACTURER isn't an operating
+# system, and we'll never get to this point.
+
+kernel=
+case $cpu-$vendor in
+ score-*)
+ os=elf
+ ;;
+ spu-*)
+ os=elf
+ ;;
+ *-acorn)
+ os=riscix1.2
+ ;;
+ arm*-rebel)
+ kernel=linux
+ os=gnu
+ ;;
+ arm*-semi)
+ os=aout
+ ;;
+ c4x-* | tic4x-*)
+ os=coff
+ ;;
+ c8051-*)
+ os=elf
+ ;;
+ clipper-intergraph)
+ os=clix
+ ;;
+ hexagon-*)
+ os=elf
+ ;;
+ tic54x-*)
+ os=coff
+ ;;
+ tic55x-*)
+ os=coff
+ ;;
+ tic6x-*)
+ os=coff
+ ;;
+ # This must come before the *-dec entry.
+ pdp10-*)
+ os=tops20
+ ;;
+ pdp11-*)
+ os=none
+ ;;
+ *-dec | vax-*)
+ os=ultrix4.2
+ ;;
+ m68*-apollo)
+ os=domain
+ ;;
+ i386-sun)
+ os=sunos4.0.2
+ ;;
+ m68000-sun)
+ os=sunos3
+ ;;
+ m68*-cisco)
+ os=aout
+ ;;
+ mep-*)
+ os=elf
+ ;;
+ mips*-cisco)
+ os=elf
+ ;;
+ mips*-*)
+ os=elf
+ ;;
+ or32-*)
+ os=coff
+ ;;
+ *-tti) # must be before sparc entry or we get the wrong os.
+ os=sysv3
+ ;;
+ sparc-* | *-sun)
+ os=sunos4.1.1
+ ;;
+ pru-*)
+ os=elf
+ ;;
+ *-be)
+ os=beos
+ ;;
+ *-ibm)
+ os=aix
+ ;;
+ *-knuth)
+ os=mmixware
+ ;;
+ *-wec)
+ os=proelf
+ ;;
+ *-winbond)
+ os=proelf
+ ;;
+ *-oki)
+ os=proelf
+ ;;
+ *-hp)
+ os=hpux
+ ;;
+ *-hitachi)
+ os=hiux
+ ;;
+ i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
+ os=sysv
+ ;;
+ *-cbm)
+ os=amigaos
+ ;;
+ *-dg)
+ os=dgux
+ ;;
+ *-dolphin)
+ os=sysv3
+ ;;
+ m68k-ccur)
+ os=rtu
+ ;;
+ m88k-omron*)
+ os=luna
+ ;;
+ *-next)
+ os=nextstep
+ ;;
+ *-sequent)
+ os=ptx
+ ;;
+ *-crds)
+ os=unos
+ ;;
+ *-ns)
+ os=genix
+ ;;
+ i370-*)
+ os=mvs
+ ;;
+ *-gould)
+ os=sysv
+ ;;
+ *-highlevel)
+ os=bsd
+ ;;
+ *-encore)
+ os=bsd
+ ;;
+ *-sgi)
+ os=irix
+ ;;
+ *-siemens)
+ os=sysv4
+ ;;
+ *-masscomp)
+ os=rtu
+ ;;
+ f30[01]-fujitsu | f700-fujitsu)
+ os=uxpv
+ ;;
+ *-rom68k)
+ os=coff
+ ;;
+ *-*bug)
+ os=coff
+ ;;
+ *-apple)
+ os=macos
+ ;;
+ *-atari*)
+ os=mint
+ ;;
+ *-wrs)
+ os=vxworks
+ ;;
+ *)
+ os=none
+ ;;
+esac
+
+fi
+
+# Now, validate our (potentially fixed-up) OS.
+case $os in
+ # Sometimes we do "kernel-libc", so those need to count as OSes.
+ musl* | newlib* | relibc* | uclibc*)
+ ;;
+ # Likewise for "kernel-abi"
+ eabi* | gnueabi*)
+ ;;
+ # VxWorks passes extra cpu info in the 4th filed.
+ simlinux | simwindows | spe)
+ ;;
+ # Now accept the basic system types.
+ # The portable systems comes first.
+ # Each alternative MUST end in a * to match a version number.
+ gnu* | android* | bsd* | mach* | minix* | genix* | ultrix* | irix* \
+ | *vms* | esix* | aix* | cnk* | sunos | sunos[34]* \
+ | hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \
+ | sym* | plan9* | psp* | sim* | xray* | os68k* | v88r* \
+ | hiux* | abug | nacl* | netware* | windows* \
+ | os9* | macos* | osx* | ios* \
+ | mpw* | magic* | mmixware* | mon960* | lnews* \
+ | amigaos* | amigados* | msdos* | newsos* | unicos* | aof* \
+ | aos* | aros* | cloudabi* | sortix* | twizzler* \
+ | nindy* | vxsim* | vxworks* | ebmon* | hms* | mvs* \
+ | clix* | riscos* | uniplus* | iris* | isc* | rtu* | xenix* \
+ | mirbsd* | netbsd* | dicos* | openedition* | ose* \
+ | bitrig* | openbsd* | secbsd* | solidbsd* | libertybsd* | os108* \
+ | ekkobsd* | freebsd* | riscix* | lynxos* | os400* \
+ | bosx* | nextstep* | cxux* | aout* | elf* | oabi* \
+ | ptx* | coff* | ecoff* | winnt* | domain* | vsta* \
+ | udi* | lites* | ieee* | go32* | aux* | hcos* \
+ | chorusrdb* | cegcc* | glidix* | serenity* \
+ | cygwin* | msys* | pe* | moss* | proelf* | rtems* \
+ | midipix* | mingw32* | mingw64* | mint* \
+ | uxpv* | beos* | mpeix* | udk* | moxiebox* \
+ | interix* | uwin* | mks* | rhapsody* | darwin* \
+ | openstep* | oskit* | conix* | pw32* | nonstopux* \
+ | storm-chaos* | tops10* | tenex* | tops20* | its* \
+ | os2* | vos* | palmos* | uclinux* | nucleus* | morphos* \
+ | scout* | superux* | sysv* | rtmk* | tpf* | windiss* \
+ | powermax* | dnix* | nx6 | nx7 | sei* | dragonfly* \
+ | skyos* | haiku* | rdos* | toppers* | drops* | es* \
+ | onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \
+ | midnightbsd* | amdhsa* | unleashed* | emscripten* | wasi* \
+ | nsk* | powerunix* | genode* | zvmoe* | qnx* | emx* | zephyr* \
+ | fiwix* )
+ ;;
+ # This one is extra strict with allowed versions
+ sco3.2v2 | sco3.2v[4-9]* | sco5v6*)
+ # Don't forget version if it is 3.2v4 or newer.
+ ;;
+ none)
+ ;;
+ *)
+ echo Invalid configuration \`"$1"\': OS \`"$os"\' not recognized 1>&2
+ exit 1
+ ;;
+esac
+
+# As a final step for OS-related things, validate the OS-kernel combination
+# (given a valid OS), if there is a kernel.
+case $kernel-$os in
+ linux-gnu* | linux-dietlibc* | linux-android* | linux-newlib* \
+ | linux-musl* | linux-relibc* | linux-uclibc* )
+ ;;
+ uclinux-uclibc* )
+ ;;
+ -dietlibc* | -newlib* | -musl* | -relibc* | -uclibc* )
+ # These are just libc implementations, not actual OSes, and thus
+ # require a kernel.
+ echo "Invalid configuration \`$1': libc \`$os' needs explicit kernel." 1>&2
+ exit 1
+ ;;
+ kfreebsd*-gnu* | kopensolaris*-gnu*)
+ ;;
+ vxworks-simlinux | vxworks-simwindows | vxworks-spe)
+ ;;
+ nto-qnx*)
+ ;;
+ os2-emx)
+ ;;
+ *-eabi* | *-gnueabi*)
+ ;;
+ -*)
+ # Blank kernel with real OS is always fine.
+ ;;
+ *-*)
+ echo "Invalid configuration \`$1': Kernel \`$kernel' not known to work with OS \`$os'." 1>&2
+ exit 1
+ ;;
+esac
+
+# Here we handle the case where we know the os, and the CPU type, but not the
+# manufacturer. We pick the logical manufacturer.
+case $vendor in
+ unknown)
+ case $cpu-$os in
+ *-riscix*)
+ vendor=acorn
+ ;;
+ *-sunos*)
+ vendor=sun
+ ;;
+ *-cnk* | *-aix*)
+ vendor=ibm
+ ;;
+ *-beos*)
+ vendor=be
+ ;;
+ *-hpux*)
+ vendor=hp
+ ;;
+ *-mpeix*)
+ vendor=hp
+ ;;
+ *-hiux*)
+ vendor=hitachi
+ ;;
+ *-unos*)
+ vendor=crds
+ ;;
+ *-dgux*)
+ vendor=dg
+ ;;
+ *-luna*)
+ vendor=omron
+ ;;
+ *-genix*)
+ vendor=ns
+ ;;
+ *-clix*)
+ vendor=intergraph
+ ;;
+ *-mvs* | *-opened*)
+ vendor=ibm
+ ;;
+ *-os400*)
+ vendor=ibm
+ ;;
+ s390-* | s390x-*)
+ vendor=ibm
+ ;;
+ *-ptx*)
+ vendor=sequent
+ ;;
+ *-tpf*)
+ vendor=ibm
+ ;;
+ *-vxsim* | *-vxworks* | *-windiss*)
+ vendor=wrs
+ ;;
+ *-aux*)
+ vendor=apple
+ ;;
+ *-hms*)
+ vendor=hitachi
+ ;;
+ *-mpw* | *-macos*)
+ vendor=apple
+ ;;
+ *-*mint | *-mint[0-9]* | *-*MiNT | *-MiNT[0-9]*)
+ vendor=atari
+ ;;
+ *-vos*)
+ vendor=stratus
+ ;;
+ esac
+ ;;
+esac
+
+echo "$cpu-$vendor-${kernel:+$kernel-}$os"
+exit
+
+# Local variables:
+# eval: (add-hook 'before-save-hook 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
diff --git a/configure b/configure
new file mode 100755
index 0000000..716fe8b
--- /dev/null
+++ b/configure
@@ -0,0 +1,24120 @@
+#! /bin/sh
+# Guess values for system-dependent variables and create Makefiles.
+# Generated by GNU Autoconf 2.71 for libixion 0.19.0.
+#
+#
+# Copyright (C) 1992-1996, 1998-2017, 2020-2021 Free Software Foundation,
+# Inc.
+#
+#
+# This configure script is free software; the Free Software Foundation
+# gives unlimited permission to copy, distribute and modify it.
+## -------------------- ##
+## M4sh Initialization. ##
+## -------------------- ##
+
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+as_nop=:
+if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
+then :
+ emulate sh
+ NULLCMD=:
+ # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else $as_nop
+ case `(set -o) 2>/dev/null` in #(
+ *posix*) :
+ set -o posix ;; #(
+ *) :
+ ;;
+esac
+fi
+
+
+
+# Reset variables that may have inherited troublesome values from
+# the environment.
+
+# IFS needs to be set, to space, tab, and newline, in precisely that order.
+# (If _AS_PATH_WALK were called with IFS unset, it would have the
+# side effect of setting IFS to empty, thus disabling word splitting.)
+# Quoting is to prevent editors from complaining about space-tab.
+as_nl='
+'
+export as_nl
+IFS=" "" $as_nl"
+
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# Ensure predictable behavior from utilities with locale-dependent output.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# We cannot yet rely on "unset" to work, but we need these variables
+# to be unset--not just set to an empty or harmless value--now, to
+# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct
+# also avoids known problems related to "unset" and subshell syntax
+# in other old shells (e.g. bash 2.01 and pdksh 5.2.14).
+for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH
+do eval test \${$as_var+y} \
+ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
+done
+
+# Ensure that fds 0, 1, and 2 are open.
+if (exec 3>&0) 2>/dev/null; then :; else exec 0</dev/null; fi
+if (exec 3>&1) 2>/dev/null; then :; else exec 1>/dev/null; fi
+if (exec 3>&2) ; then :; else exec 2>/dev/null; fi
+
+# The user is always right.
+if ${PATH_SEPARATOR+false} :; then
+ PATH_SEPARATOR=:
+ (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+ (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+ PATH_SEPARATOR=';'
+ }
+fi
+
+
+# Find who we are. Look in the path if we contain no directory separator.
+as_myself=
+case $0 in #((
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ test -r "$as_dir$0" && as_myself=$as_dir$0 && break
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+ as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+ printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+ exit 1
+fi
+
+
+# Use a proper internal environment variable to ensure we don't fall
+ # into an infinite loop, continuously re-executing ourselves.
+ if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
+ _as_can_reexec=no; export _as_can_reexec;
+ # We cannot yet assume a decent shell, so we have to provide a
+# neutralization value for shells without unset; and this also
+# works around shells that cannot unset nonexistent variables.
+# Preserve -v and -x to the replacement shell.
+BASH_ENV=/dev/null
+ENV=/dev/null
+(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+case $- in # ((((
+ *v*x* | *x*v* ) as_opts=-vx ;;
+ *v* ) as_opts=-v ;;
+ *x* ) as_opts=-x ;;
+ * ) as_opts= ;;
+esac
+exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
+# Admittedly, this is quite paranoid, since all the known shells bail
+# out after a failed `exec'.
+printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2
+exit 255
+ fi
+ # We don't want this to propagate to other subprocesses.
+ { _as_can_reexec=; unset _as_can_reexec;}
+if test "x$CONFIG_SHELL" = x; then
+ as_bourne_compatible="as_nop=:
+if test \${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
+then :
+ emulate sh
+ NULLCMD=:
+ # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '\${1+\"\$@\"}'='\"\$@\"'
+ setopt NO_GLOB_SUBST
+else \$as_nop
+ case \`(set -o) 2>/dev/null\` in #(
+ *posix*) :
+ set -o posix ;; #(
+ *) :
+ ;;
+esac
+fi
+"
+ as_required="as_fn_return () { (exit \$1); }
+as_fn_success () { as_fn_return 0; }
+as_fn_failure () { as_fn_return 1; }
+as_fn_ret_success () { return 0; }
+as_fn_ret_failure () { return 1; }
+
+exitcode=0
+as_fn_success || { exitcode=1; echo as_fn_success failed.; }
+as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
+as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
+as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
+if ( set x; as_fn_ret_success y && test x = \"\$1\" )
+then :
+
+else \$as_nop
+ exitcode=1; echo positional parameters were not saved.
+fi
+test x\$exitcode = x0 || exit 1
+blah=\$(echo \$(echo blah))
+test x\"\$blah\" = xblah || exit 1
+test -x / || exit 1"
+ as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
+ as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
+ eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
+ test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
+
+ test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || (
+ ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+ ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO
+ ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO
+ PATH=/empty FPATH=/empty; export PATH FPATH
+ test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\
+ || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1
+test \$(( 1 + 1 )) = 2 || exit 1"
+ if (eval "$as_required") 2>/dev/null
+then :
+ as_have_required=yes
+else $as_nop
+ as_have_required=no
+fi
+ if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null
+then :
+
+else $as_nop
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+as_found=false
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ as_found=:
+ case $as_dir in #(
+ /*)
+ for as_base in sh bash ksh sh5; do
+ # Try only shells that exist, to save several forks.
+ as_shell=$as_dir$as_base
+ if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
+ as_run=a "$as_shell" -c "$as_bourne_compatible""$as_required" 2>/dev/null
+then :
+ CONFIG_SHELL=$as_shell as_have_required=yes
+ if as_run=a "$as_shell" -c "$as_bourne_compatible""$as_suggested" 2>/dev/null
+then :
+ break 2
+fi
+fi
+ done;;
+ esac
+ as_found=false
+done
+IFS=$as_save_IFS
+if $as_found
+then :
+
+else $as_nop
+ if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
+ as_run=a "$SHELL" -c "$as_bourne_compatible""$as_required" 2>/dev/null
+then :
+ CONFIG_SHELL=$SHELL as_have_required=yes
+fi
+fi
+
+
+ if test "x$CONFIG_SHELL" != x
+then :
+ export CONFIG_SHELL
+ # We cannot yet assume a decent shell, so we have to provide a
+# neutralization value for shells without unset; and this also
+# works around shells that cannot unset nonexistent variables.
+# Preserve -v and -x to the replacement shell.
+BASH_ENV=/dev/null
+ENV=/dev/null
+(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+case $- in # ((((
+ *v*x* | *x*v* ) as_opts=-vx ;;
+ *v* ) as_opts=-v ;;
+ *x* ) as_opts=-x ;;
+ * ) as_opts= ;;
+esac
+exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
+# Admittedly, this is quite paranoid, since all the known shells bail
+# out after a failed `exec'.
+printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2
+exit 255
+fi
+
+ if test x$as_have_required = xno
+then :
+ printf "%s\n" "$0: This script requires a shell more modern than all"
+ printf "%s\n" "$0: the shells that I found on your system."
+ if test ${ZSH_VERSION+y} ; then
+ printf "%s\n" "$0: In particular, zsh $ZSH_VERSION has bugs and should"
+ printf "%s\n" "$0: be upgraded to zsh 4.3.4 or later."
+ else
+ printf "%s\n" "$0: Please tell bug-autoconf@gnu.org about your system,
+$0: including any error possibly output before this
+$0: message. Then install a modern shell, or manually run
+$0: the script under such a shell if you do have one."
+ fi
+ exit 1
+fi
+fi
+fi
+SHELL=${CONFIG_SHELL-/bin/sh}
+export SHELL
+# Unset more variables known to interfere with behavior of common tools.
+CLICOLOR_FORCE= GREP_OPTIONS=
+unset CLICOLOR_FORCE GREP_OPTIONS
+
+## --------------------- ##
+## M4sh Shell Functions. ##
+## --------------------- ##
+# as_fn_unset VAR
+# ---------------
+# Portably unset VAR.
+as_fn_unset ()
+{
+ { eval $1=; unset $1;}
+}
+as_unset=as_fn_unset
+
+
+# as_fn_set_status STATUS
+# -----------------------
+# Set $? to STATUS, without forking.
+as_fn_set_status ()
+{
+ return $1
+} # as_fn_set_status
+
+# as_fn_exit STATUS
+# -----------------
+# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
+as_fn_exit ()
+{
+ set +e
+ as_fn_set_status $1
+ exit $1
+} # as_fn_exit
+# as_fn_nop
+# ---------
+# Do nothing but, unlike ":", preserve the value of $?.
+as_fn_nop ()
+{
+ return $?
+}
+as_nop=as_fn_nop
+
+# as_fn_mkdir_p
+# -------------
+# Create "$as_dir" as a directory, including parents if necessary.
+as_fn_mkdir_p ()
+{
+
+ case $as_dir in #(
+ -*) as_dir=./$as_dir;;
+ esac
+ test -d "$as_dir" || eval $as_mkdir_p || {
+ as_dirs=
+ while :; do
+ case $as_dir in #(
+ *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+ *) as_qdir=$as_dir;;
+ esac
+ as_dirs="'$as_qdir' $as_dirs"
+ as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+printf "%s\n" X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ test -d "$as_dir" && break
+ done
+ test -z "$as_dirs" || eval "mkdir $as_dirs"
+ } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
+
+
+} # as_fn_mkdir_p
+
+# as_fn_executable_p FILE
+# -----------------------
+# Test if FILE is an executable regular file.
+as_fn_executable_p ()
+{
+ test -f "$1" && test -x "$1"
+} # as_fn_executable_p
+# as_fn_append VAR VALUE
+# ----------------------
+# Append the text in VALUE to the end of the definition contained in VAR. Take
+# advantage of any shell optimizations that allow amortized linear growth over
+# repeated appends, instead of the typical quadratic growth present in naive
+# implementations.
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null
+then :
+ eval 'as_fn_append ()
+ {
+ eval $1+=\$2
+ }'
+else $as_nop
+ as_fn_append ()
+ {
+ eval $1=\$$1\$2
+ }
+fi # as_fn_append
+
+# as_fn_arith ARG...
+# ------------------
+# Perform arithmetic evaluation on the ARGs, and store the result in the
+# global $as_val. Take advantage of shells that can avoid forks. The arguments
+# must be portable across $(()) and expr.
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null
+then :
+ eval 'as_fn_arith ()
+ {
+ as_val=$(( $* ))
+ }'
+else $as_nop
+ as_fn_arith ()
+ {
+ as_val=`expr "$@" || test $? -eq 1`
+ }
+fi # as_fn_arith
+
+# as_fn_nop
+# ---------
+# Do nothing but, unlike ":", preserve the value of $?.
+as_fn_nop ()
+{
+ return $?
+}
+as_nop=as_fn_nop
+
+# as_fn_error STATUS ERROR [LINENO LOG_FD]
+# ----------------------------------------
+# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
+# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
+# script with STATUS, using 1 if that was 0.
+as_fn_error ()
+{
+ as_status=$1; test $as_status -eq 0 && as_status=1
+ if test "$4"; then
+ as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
+ fi
+ printf "%s\n" "$as_me: error: $2" >&2
+ as_fn_exit $as_status
+} # as_fn_error
+
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+ as_dirname=dirname
+else
+ as_dirname=false
+fi
+
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+printf "%s\n" X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+
+ as_lineno_1=$LINENO as_lineno_1a=$LINENO
+ as_lineno_2=$LINENO as_lineno_2a=$LINENO
+ eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
+ test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
+ # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
+ sed -n '
+ p
+ /[$]LINENO/=
+ ' <$as_myself |
+ sed '
+ s/[$]LINENO.*/&-/
+ t lineno
+ b
+ :lineno
+ N
+ :loop
+ s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
+ t loop
+ s/-\n.*//
+ ' >$as_me.lineno &&
+ chmod +x "$as_me.lineno" ||
+ { printf "%s\n" "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
+
+ # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
+ # already done that, so ensure we don't try to do so again and fall
+ # in an infinite loop. This has already happened in practice.
+ _as_can_reexec=no; export _as_can_reexec
+ # Don't try to exec as it changes $[0], causing all sort of problems
+ # (the dirname of $[0] is not the place where we might find the
+ # original and so on. Autoconf is especially sensitive to this).
+ . "./$as_me.lineno"
+ # Exit status is that of the last command.
+ exit
+}
+
+
+# Determine whether it's possible to make 'echo' print without a newline.
+# These variables are no longer used directly by Autoconf, but are AC_SUBSTed
+# for compatibility with existing Makefiles.
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in #(((((
+-n*)
+ case `echo 'xy\c'` in
+ *c*) ECHO_T=' ';; # ECHO_T is single tab character.
+ xy) ECHO_C='\c';;
+ *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
+ ECHO_T=' ';;
+ esac;;
+*)
+ ECHO_N='-n';;
+esac
+
+# For backward compatibility with old third-party macros, we provide
+# the shell variables $as_echo and $as_echo_n. New code should use
+# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively.
+as_echo='printf %s\n'
+as_echo_n='printf %s'
+
+
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+ rm -f conf$$.dir/conf$$.file
+else
+ rm -f conf$$.dir
+ mkdir conf$$.dir 2>/dev/null
+fi
+if (echo >conf$$.file) 2>/dev/null; then
+ if ln -s conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s='ln -s'
+ # ... but there are two gotchas:
+ # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+ # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+ # In both cases, we have to default to `cp -pR'.
+ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+ as_ln_s='cp -pR'
+ elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+ else
+ as_ln_s='cp -pR'
+ fi
+else
+ as_ln_s='cp -pR'
+fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p='mkdir -p "$as_dir"'
+else
+ test -d ./-p && rmdir ./-p
+ as_mkdir_p=false
+fi
+
+as_test_x='test -x'
+as_executable_p=as_fn_executable_p
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+SHELL=${CONFIG_SHELL-/bin/sh}
+
+
+test -n "$DJDIR" || exec 7<&0 </dev/null
+exec 6>&1
+
+# Name of the host.
+# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
+# so uname gets run too.
+ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
+
+#
+# Initializations.
+#
+ac_default_prefix=/usr/local
+ac_clean_files=
+ac_config_libobj_dir=.
+LIBOBJS=
+cross_compiling=no
+subdirs=
+MFLAGS=
+MAKEFLAGS=
+
+# Identity of this package.
+PACKAGE_NAME='libixion'
+PACKAGE_TARNAME='libixion'
+PACKAGE_VERSION='0.19.0'
+PACKAGE_STRING='libixion 0.19.0'
+PACKAGE_BUGREPORT=''
+PACKAGE_URL=''
+
+# Factoring default headers for most tests.
+ac_includes_default="\
+#include <stddef.h>
+#ifdef HAVE_STDIO_H
+# include <stdio.h>
+#endif
+#ifdef HAVE_STDLIB_H
+# include <stdlib.h>
+#endif
+#ifdef HAVE_STRING_H
+# include <string.h>
+#endif
+#ifdef HAVE_INTTYPES_H
+# include <inttypes.h>
+#endif
+#ifdef HAVE_STDINT_H
+# include <stdint.h>
+#endif
+#ifdef HAVE_STRINGS_H
+# include <strings.h>
+#endif
+#ifdef HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif"
+
+ac_header_c_list=
+ac_subst_vars='am__EXEEXT_FALSE
+am__EXEEXT_TRUE
+LTLIBOBJS
+BOOST_PROGRAM_OPTIONS_LIBS
+BOOST_PROGRAM_OPTIONS_LDPATH
+BOOST_PROGRAM_OPTIONS_LDFLAGS
+OSX_FALSE
+OSX_TRUE
+BUILD_VULKAN_FALSE
+BUILD_VULKAN_TRUE
+IXION_THREADS_FALSE
+IXION_THREADS_TRUE
+BUILD_PYTHON_FALSE
+BUILD_PYTHON_TRUE
+VULKAN_LIBS
+VULKAN_CFLAGS
+PYTHON_LIBS
+PYTHON_CFLAGS
+pkgpyexecdir
+pyexecdir
+pkgpythondir
+pythondir
+PYTHON_EXEC_PREFIX
+PYTHON_PREFIX
+PYTHON_PLATFORM
+PYTHON_VERSION
+PYTHON
+MDDS_LIBS
+MDDS_CFLAGS
+PKG_CONFIG_LIBDIR
+PKG_CONFIG_PATH
+PKG_CONFIG
+BOOST_FILESYSTEM_LIBS
+BOOST_FILESYSTEM_LDPATH
+BOOST_FILESYSTEM_LDFLAGS
+BOOST_SYSTEM_LIBS
+BOOST_LDPATH
+BOOST_SYSTEM_LDPATH
+BOOST_SYSTEM_LDFLAGS
+BOOST_CPPFLAGS
+DISTCHECK_CONFIGURE_FLAGS
+BOOST_ROOT
+LIBOBJS
+POW_LIB
+CXXCPP
+LT_SYS_LIBRARY_PATH
+OTOOL64
+OTOOL
+LIPO
+NMEDIT
+DSYMUTIL
+MANIFEST_TOOL
+RANLIB
+ac_ct_AR
+AR
+LN_S
+NM
+ac_ct_DUMPBIN
+DUMPBIN
+LD
+FGREP
+EGREP
+GREP
+SED
+am__fastdepCC_FALSE
+am__fastdepCC_TRUE
+CCDEPMODE
+ac_ct_CC
+CFLAGS
+CC
+LIBTOOL
+OBJDUMP
+DLLTOOL
+AS
+IXION_MINOR_API_VERSION
+IXION_MAJOR_API_VERSION
+IXION_MICRO_VERSION
+IXION_MINOR_VERSION
+IXION_MAJOR_VERSION
+IXION_API_VERSION
+IXION_VERSION
+host_os
+host_vendor
+host_cpu
+host
+build_os
+build_vendor
+build_cpu
+build
+HAVE_CXX17
+am__fastdepCXX_FALSE
+am__fastdepCXX_TRUE
+CXXDEPMODE
+am__nodep
+AMDEPBACKSLASH
+AMDEP_FALSE
+AMDEP_TRUE
+am__include
+DEPDIR
+OBJEXT
+EXEEXT
+ac_ct_CXX
+CPPFLAGS
+LDFLAGS
+CXXFLAGS
+CXX
+AM_BACKSLASH
+AM_DEFAULT_VERBOSITY
+AM_DEFAULT_V
+AM_V
+CSCOPE
+ETAGS
+CTAGS
+am__untar
+am__tar
+AMTAR
+am__leading_dot
+SET_MAKE
+AWK
+mkdir_p
+MKDIR_P
+INSTALL_STRIP_PROGRAM
+STRIP
+install_sh
+MAKEINFO
+AUTOHEADER
+AUTOMAKE
+AUTOCONF
+ACLOCAL
+VERSION
+PACKAGE
+CYGPATH_W
+am__isrc
+INSTALL_DATA
+INSTALL_SCRIPT
+INSTALL_PROGRAM
+target_alias
+host_alias
+build_alias
+LIBS
+ECHO_T
+ECHO_N
+ECHO_C
+DEFS
+mandir
+localedir
+libdir
+psdir
+pdfdir
+dvidir
+htmldir
+infodir
+docdir
+oldincludedir
+includedir
+runstatedir
+localstatedir
+sharedstatedir
+sysconfdir
+datadir
+datarootdir
+libexecdir
+sbindir
+bindir
+program_transform_name
+prefix
+exec_prefix
+PACKAGE_URL
+PACKAGE_BUGREPORT
+PACKAGE_STRING
+PACKAGE_VERSION
+PACKAGE_TARNAME
+PACKAGE_NAME
+PATH_SEPARATOR
+SHELL
+am__quote'
+ac_subst_files=''
+ac_user_opts='
+enable_option_checking
+enable_silent_rules
+enable_dependency_tracking
+enable_debug_utils
+enable_python
+enable_threads
+enable_vulkan
+enable_static
+with_pic
+enable_shared
+enable_fast_install
+with_aix_soname
+with_gnu_ld
+with_sysroot
+enable_libtool_lock
+with_boost
+enable_static_boost
+enable_debug
+enable_log_debug
+enable_log_trace
+with_python_sys_prefix
+with_python_prefix
+with_python_exec_prefix
+enable_werror
+'
+ ac_precious_vars='build_alias
+host_alias
+target_alias
+CXX
+CXXFLAGS
+LDFLAGS
+LIBS
+CPPFLAGS
+CCC
+CC
+CFLAGS
+LT_SYS_LIBRARY_PATH
+CXXCPP
+BOOST_ROOT
+PKG_CONFIG
+PKG_CONFIG_PATH
+PKG_CONFIG_LIBDIR
+MDDS_CFLAGS
+MDDS_LIBS
+PYTHON
+PYTHON_CFLAGS
+PYTHON_LIBS
+VULKAN_CFLAGS
+VULKAN_LIBS'
+
+
+# Initialize some variables set by options.
+ac_init_help=
+ac_init_version=false
+ac_unrecognized_opts=
+ac_unrecognized_sep=
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+cache_file=/dev/null
+exec_prefix=NONE
+no_create=
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+srcdir=
+verbose=
+x_includes=NONE
+x_libraries=NONE
+
+# Installation directory options.
+# These are left unexpanded so users can "make install exec_prefix=/foo"
+# and all the variables that are supposed to be based on exec_prefix
+# by default will actually change.
+# Use braces instead of parens because sh, perl, etc. also accept them.
+# (The list follows the same order as the GNU Coding Standards.)
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datarootdir='${prefix}/share'
+datadir='${datarootdir}'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+runstatedir='${localstatedir}/run'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
+infodir='${datarootdir}/info'
+htmldir='${docdir}'
+dvidir='${docdir}'
+pdfdir='${docdir}'
+psdir='${docdir}'
+libdir='${exec_prefix}/lib'
+localedir='${datarootdir}/locale'
+mandir='${datarootdir}/man'
+
+ac_prev=
+ac_dashdash=
+for ac_option
+do
+ # If the previous option needs an argument, assign it.
+ if test -n "$ac_prev"; then
+ eval $ac_prev=\$ac_option
+ ac_prev=
+ continue
+ fi
+
+ case $ac_option in
+ *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
+ *=) ac_optarg= ;;
+ *) ac_optarg=yes ;;
+ esac
+
+ case $ac_dashdash$ac_option in
+ --)
+ ac_dashdash=yes ;;
+
+ -bindir | --bindir | --bindi | --bind | --bin | --bi)
+ ac_prev=bindir ;;
+ -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
+ bindir=$ac_optarg ;;
+
+ -build | --build | --buil | --bui | --bu)
+ ac_prev=build_alias ;;
+ -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+ build_alias=$ac_optarg ;;
+
+ -cache-file | --cache-file | --cache-fil | --cache-fi \
+ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+ ac_prev=cache_file ;;
+ -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+ cache_file=$ac_optarg ;;
+
+ --config-cache | -C)
+ cache_file=config.cache ;;
+
+ -datadir | --datadir | --datadi | --datad)
+ ac_prev=datadir ;;
+ -datadir=* | --datadir=* | --datadi=* | --datad=*)
+ datadir=$ac_optarg ;;
+
+ -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
+ | --dataroo | --dataro | --datar)
+ ac_prev=datarootdir ;;
+ -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
+ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
+ datarootdir=$ac_optarg ;;
+
+ -disable-* | --disable-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid feature name: \`$ac_useropt'"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"enable_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval enable_$ac_useropt=no ;;
+
+ -docdir | --docdir | --docdi | --doc | --do)
+ ac_prev=docdir ;;
+ -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
+ docdir=$ac_optarg ;;
+
+ -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
+ ac_prev=dvidir ;;
+ -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
+ dvidir=$ac_optarg ;;
+
+ -enable-* | --enable-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid feature name: \`$ac_useropt'"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"enable_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval enable_$ac_useropt=\$ac_optarg ;;
+
+ -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+ | --exec | --exe | --ex)
+ ac_prev=exec_prefix ;;
+ -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
+ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
+ | --exec=* | --exe=* | --ex=*)
+ exec_prefix=$ac_optarg ;;
+
+ -gas | --gas | --ga | --g)
+ # Obsolete; use --with-gas.
+ with_gas=yes ;;
+
+ -help | --help | --hel | --he | -h)
+ ac_init_help=long ;;
+ -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
+ ac_init_help=recursive ;;
+ -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
+ ac_init_help=short ;;
+
+ -host | --host | --hos | --ho)
+ ac_prev=host_alias ;;
+ -host=* | --host=* | --hos=* | --ho=*)
+ host_alias=$ac_optarg ;;
+
+ -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
+ ac_prev=htmldir ;;
+ -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
+ | --ht=*)
+ htmldir=$ac_optarg ;;
+
+ -includedir | --includedir | --includedi | --included | --include \
+ | --includ | --inclu | --incl | --inc)
+ ac_prev=includedir ;;
+ -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
+ | --includ=* | --inclu=* | --incl=* | --inc=*)
+ includedir=$ac_optarg ;;
+
+ -infodir | --infodir | --infodi | --infod | --info | --inf)
+ ac_prev=infodir ;;
+ -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
+ infodir=$ac_optarg ;;
+
+ -libdir | --libdir | --libdi | --libd)
+ ac_prev=libdir ;;
+ -libdir=* | --libdir=* | --libdi=* | --libd=*)
+ libdir=$ac_optarg ;;
+
+ -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
+ | --libexe | --libex | --libe)
+ ac_prev=libexecdir ;;
+ -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
+ | --libexe=* | --libex=* | --libe=*)
+ libexecdir=$ac_optarg ;;
+
+ -localedir | --localedir | --localedi | --localed | --locale)
+ ac_prev=localedir ;;
+ -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
+ localedir=$ac_optarg ;;
+
+ -localstatedir | --localstatedir | --localstatedi | --localstated \
+ | --localstate | --localstat | --localsta | --localst | --locals)
+ ac_prev=localstatedir ;;
+ -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
+ localstatedir=$ac_optarg ;;
+
+ -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+ ac_prev=mandir ;;
+ -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
+ mandir=$ac_optarg ;;
+
+ -nfp | --nfp | --nf)
+ # Obsolete; use --without-fp.
+ with_fp=no ;;
+
+ -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+ | --no-cr | --no-c | -n)
+ no_create=yes ;;
+
+ -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+ no_recursion=yes ;;
+
+ -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
+ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
+ | --oldin | --oldi | --old | --ol | --o)
+ ac_prev=oldincludedir ;;
+ -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
+ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
+ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
+ oldincludedir=$ac_optarg ;;
+
+ -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+ ac_prev=prefix ;;
+ -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+ prefix=$ac_optarg ;;
+
+ -program-prefix | --program-prefix | --program-prefi | --program-pref \
+ | --program-pre | --program-pr | --program-p)
+ ac_prev=program_prefix ;;
+ -program-prefix=* | --program-prefix=* | --program-prefi=* \
+ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
+ program_prefix=$ac_optarg ;;
+
+ -program-suffix | --program-suffix | --program-suffi | --program-suff \
+ | --program-suf | --program-su | --program-s)
+ ac_prev=program_suffix ;;
+ -program-suffix=* | --program-suffix=* | --program-suffi=* \
+ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
+ program_suffix=$ac_optarg ;;
+
+ -program-transform-name | --program-transform-name \
+ | --program-transform-nam | --program-transform-na \
+ | --program-transform-n | --program-transform- \
+ | --program-transform | --program-transfor \
+ | --program-transfo | --program-transf \
+ | --program-trans | --program-tran \
+ | --progr-tra | --program-tr | --program-t)
+ ac_prev=program_transform_name ;;
+ -program-transform-name=* | --program-transform-name=* \
+ | --program-transform-nam=* | --program-transform-na=* \
+ | --program-transform-n=* | --program-transform-=* \
+ | --program-transform=* | --program-transfor=* \
+ | --program-transfo=* | --program-transf=* \
+ | --program-trans=* | --program-tran=* \
+ | --progr-tra=* | --program-tr=* | --program-t=*)
+ program_transform_name=$ac_optarg ;;
+
+ -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
+ ac_prev=pdfdir ;;
+ -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
+ pdfdir=$ac_optarg ;;
+
+ -psdir | --psdir | --psdi | --psd | --ps)
+ ac_prev=psdir ;;
+ -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
+ psdir=$ac_optarg ;;
+
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ silent=yes ;;
+
+ -runstatedir | --runstatedir | --runstatedi | --runstated \
+ | --runstate | --runstat | --runsta | --runst | --runs \
+ | --run | --ru | --r)
+ ac_prev=runstatedir ;;
+ -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
+ | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
+ | --run=* | --ru=* | --r=*)
+ runstatedir=$ac_optarg ;;
+
+ -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+ ac_prev=sbindir ;;
+ -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+ | --sbi=* | --sb=*)
+ sbindir=$ac_optarg ;;
+
+ -sharedstatedir | --sharedstatedir | --sharedstatedi \
+ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
+ | --sharedst | --shareds | --shared | --share | --shar \
+ | --sha | --sh)
+ ac_prev=sharedstatedir ;;
+ -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
+ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
+ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
+ | --sha=* | --sh=*)
+ sharedstatedir=$ac_optarg ;;
+
+ -site | --site | --sit)
+ ac_prev=site ;;
+ -site=* | --site=* | --sit=*)
+ site=$ac_optarg ;;
+
+ -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+ ac_prev=srcdir ;;
+ -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+ srcdir=$ac_optarg ;;
+
+ -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
+ | --syscon | --sysco | --sysc | --sys | --sy)
+ ac_prev=sysconfdir ;;
+ -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
+ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
+ sysconfdir=$ac_optarg ;;
+
+ -target | --target | --targe | --targ | --tar | --ta | --t)
+ ac_prev=target_alias ;;
+ -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+ target_alias=$ac_optarg ;;
+
+ -v | -verbose | --verbose | --verbos | --verbo | --verb)
+ verbose=yes ;;
+
+ -version | --version | --versio | --versi | --vers | -V)
+ ac_init_version=: ;;
+
+ -with-* | --with-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid package name: \`$ac_useropt'"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"with_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval with_$ac_useropt=\$ac_optarg ;;
+
+ -without-* | --without-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid package name: \`$ac_useropt'"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"with_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval with_$ac_useropt=no ;;
+
+ --x)
+ # Obsolete; use --with-x.
+ with_x=yes ;;
+
+ -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
+ | --x-incl | --x-inc | --x-in | --x-i)
+ ac_prev=x_includes ;;
+ -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
+ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
+ x_includes=$ac_optarg ;;
+
+ -x-libraries | --x-libraries | --x-librarie | --x-librari \
+ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
+ ac_prev=x_libraries ;;
+ -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
+ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
+ x_libraries=$ac_optarg ;;
+
+ -*) as_fn_error $? "unrecognized option: \`$ac_option'
+Try \`$0 --help' for more information"
+ ;;
+
+ *=*)
+ ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
+ # Reject names that are not valid shell variable names.
+ case $ac_envvar in #(
+ '' | [0-9]* | *[!_$as_cr_alnum]* )
+ as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
+ esac
+ eval $ac_envvar=\$ac_optarg
+ export $ac_envvar ;;
+
+ *)
+ # FIXME: should be removed in autoconf 3.0.
+ printf "%s\n" "$as_me: WARNING: you should use --build, --host, --target" >&2
+ expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+ printf "%s\n" "$as_me: WARNING: invalid host type: $ac_option" >&2
+ : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
+ ;;
+
+ esac
+done
+
+if test -n "$ac_prev"; then
+ ac_option=--`echo $ac_prev | sed 's/_/-/g'`
+ as_fn_error $? "missing argument to $ac_option"
+fi
+
+if test -n "$ac_unrecognized_opts"; then
+ case $enable_option_checking in
+ no) ;;
+ fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
+ *) printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
+ esac
+fi
+
+# Check all directory arguments for consistency.
+for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
+ datadir sysconfdir sharedstatedir localstatedir includedir \
+ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
+ libdir localedir mandir runstatedir
+do
+ eval ac_val=\$$ac_var
+ # Remove trailing slashes.
+ case $ac_val in
+ */ )
+ ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
+ eval $ac_var=\$ac_val;;
+ esac
+ # Be sure to have absolute directory names.
+ case $ac_val in
+ [\\/$]* | ?:[\\/]* ) continue;;
+ NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
+ esac
+ as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
+done
+
+# There might be people who depend on the old broken behavior: `$host'
+# used to hold the argument of --host etc.
+# FIXME: To remove some day.
+build=$build_alias
+host=$host_alias
+target=$target_alias
+
+# FIXME: To remove some day.
+if test "x$host_alias" != x; then
+ if test "x$build_alias" = x; then
+ cross_compiling=maybe
+ elif test "x$build_alias" != "x$host_alias"; then
+ cross_compiling=yes
+ fi
+fi
+
+ac_tool_prefix=
+test -n "$host_alias" && ac_tool_prefix=$host_alias-
+
+test "$silent" = yes && exec 6>/dev/null
+
+
+ac_pwd=`pwd` && test -n "$ac_pwd" &&
+ac_ls_di=`ls -di .` &&
+ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
+ as_fn_error $? "working directory cannot be determined"
+test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
+ as_fn_error $? "pwd does not report name of working directory"
+
+
+# Find the source files, if location was not specified.
+if test -z "$srcdir"; then
+ ac_srcdir_defaulted=yes
+ # Try the directory containing this script, then the parent directory.
+ ac_confdir=`$as_dirname -- "$as_myself" ||
+$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_myself" : 'X\(//\)[^/]' \| \
+ X"$as_myself" : 'X\(//\)$' \| \
+ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
+printf "%s\n" X"$as_myself" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ srcdir=$ac_confdir
+ if test ! -r "$srcdir/$ac_unique_file"; then
+ srcdir=..
+ fi
+else
+ ac_srcdir_defaulted=no
+fi
+if test ! -r "$srcdir/$ac_unique_file"; then
+ test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
+ as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
+fi
+ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
+ac_abs_confdir=`(
+ cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
+ pwd)`
+# When building in place, set srcdir=.
+if test "$ac_abs_confdir" = "$ac_pwd"; then
+ srcdir=.
+fi
+# Remove unnecessary trailing slashes from srcdir.
+# Double slashes in file names in object file debugging info
+# mess up M-x gdb in Emacs.
+case $srcdir in
+*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
+esac
+for ac_var in $ac_precious_vars; do
+ eval ac_env_${ac_var}_set=\${${ac_var}+set}
+ eval ac_env_${ac_var}_value=\$${ac_var}
+ eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
+ eval ac_cv_env_${ac_var}_value=\$${ac_var}
+done
+
+#
+# Report the --help message.
+#
+if test "$ac_init_help" = "long"; then
+ # Omit some internal or obsolete options to make the list less imposing.
+ # This message is too long to be a string in the A/UX 3.1 sh.
+ cat <<_ACEOF
+\`configure' configures libixion 0.19.0 to adapt to many kinds of systems.
+
+Usage: $0 [OPTION]... [VAR=VALUE]...
+
+To assign environment variables (e.g., CC, CFLAGS...), specify them as
+VAR=VALUE. See below for descriptions of some of the useful variables.
+
+Defaults for the options are specified in brackets.
+
+Configuration:
+ -h, --help display this help and exit
+ --help=short display options specific to this package
+ --help=recursive display the short help of all the included packages
+ -V, --version display version information and exit
+ -q, --quiet, --silent do not print \`checking ...' messages
+ --cache-file=FILE cache test results in FILE [disabled]
+ -C, --config-cache alias for \`--cache-file=config.cache'
+ -n, --no-create do not create output files
+ --srcdir=DIR find the sources in DIR [configure dir or \`..']
+
+Installation directories:
+ --prefix=PREFIX install architecture-independent files in PREFIX
+ [$ac_default_prefix]
+ --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
+ [PREFIX]
+
+By default, \`make install' will install all the files in
+\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
+an installation prefix other than \`$ac_default_prefix' using \`--prefix',
+for instance \`--prefix=\$HOME'.
+
+For better control, use the options below.
+
+Fine tuning of the installation directories:
+ --bindir=DIR user executables [EPREFIX/bin]
+ --sbindir=DIR system admin executables [EPREFIX/sbin]
+ --libexecdir=DIR program executables [EPREFIX/libexec]
+ --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
+ --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
+ --localstatedir=DIR modifiable single-machine data [PREFIX/var]
+ --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
+ --libdir=DIR object code libraries [EPREFIX/lib]
+ --includedir=DIR C header files [PREFIX/include]
+ --oldincludedir=DIR C header files for non-gcc [/usr/include]
+ --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
+ --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
+ --infodir=DIR info documentation [DATAROOTDIR/info]
+ --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
+ --mandir=DIR man documentation [DATAROOTDIR/man]
+ --docdir=DIR documentation root [DATAROOTDIR/doc/libixion]
+ --htmldir=DIR html documentation [DOCDIR]
+ --dvidir=DIR dvi documentation [DOCDIR]
+ --pdfdir=DIR pdf documentation [DOCDIR]
+ --psdir=DIR ps documentation [DOCDIR]
+_ACEOF
+
+ cat <<\_ACEOF
+
+Program names:
+ --program-prefix=PREFIX prepend PREFIX to installed program names
+ --program-suffix=SUFFIX append SUFFIX to installed program names
+ --program-transform-name=PROGRAM run sed PROGRAM on installed program names
+
+System types:
+ --build=BUILD configure for building on BUILD [guessed]
+ --host=HOST cross-compile to build programs to run on HOST [BUILD]
+_ACEOF
+fi
+
+if test -n "$ac_init_help"; then
+ case $ac_init_help in
+ short | recursive ) echo "Configuration of libixion 0.19.0:";;
+ esac
+ cat <<\_ACEOF
+
+Optional Features:
+ --disable-option-checking ignore unrecognized --enable/--with options
+ --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
+ --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
+ --enable-silent-rules less verbose build output (undo: "make V=1")
+ --disable-silent-rules verbose build output (undo: "make V=0")
+ --enable-dependency-tracking
+ do not reject slow dependency extractors
+ --disable-dependency-tracking
+ speeds up one-time build
+ --enable-debug-utils Build with extra checks useful during development.
+ --disable-python Disable python bindings
+ --disable-threads Disable threaded calculations
+ --enable-vulkan Enable vulkan compute engine
+ --enable-static[=PKGS] build static libraries [default=no]
+ --enable-shared[=PKGS] build shared libraries [default=yes]
+ --enable-fast-install[=PKGS]
+ optimize for fast installation [default=yes]
+ --disable-libtool-lock avoid locking (might break parallel builds)
+ --enable-static-boost Prefer the static boost libraries over the shared
+ ones [no]
+ --enable-debug Build with debug features in mind.]
+ --enable-log-debug Enable debug outputs.]
+ --enable-log-trace Enable trace outputs.]
+ --enable-werror Treat all warnings as errors, useful for development
+
+Optional Packages:
+ --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
+ --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
+ --with-pic[=PKGS] try to use only PIC/non-PIC objects [default=use
+ both]
+ --with-aix-soname=aix|svr4|both
+ shared library versioning (aka "SONAME") variant to
+ provide on AIX, [default=aix].
+ --with-gnu-ld assume the C compiler uses GNU ld [default=no]
+ --with-sysroot[=DIR] Search for dependent libraries within DIR (or the
+ compiler's sysroot if not specified).
+ --with-boost=DIR prefix of Boost 1.36 [guess]
+ --with-python-sys-prefix
+ use Python's sys.prefix and sys.exec_prefix values
+ --with-python_prefix override the default PYTHON_PREFIX
+ --with-python_exec_prefix
+ override the default PYTHON_EXEC_PREFIX
+
+Some influential environment variables:
+ CXX C++ compiler command
+ CXXFLAGS C++ compiler flags
+ LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
+ nonstandard directory <lib dir>
+ LIBS libraries to pass to the linker, e.g. -l<library>
+ CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
+ you have headers in a nonstandard directory <include dir>
+ CC C compiler command
+ CFLAGS C compiler flags
+ LT_SYS_LIBRARY_PATH
+ User-defined run-time library search path.
+ CXXCPP C++ preprocessor
+ BOOST_ROOT Location of Boost installation
+ PKG_CONFIG path to pkg-config utility
+ PKG_CONFIG_PATH
+ directories to add to pkg-config's search path
+ PKG_CONFIG_LIBDIR
+ path overriding pkg-config's built-in search path
+ MDDS_CFLAGS C compiler flags for MDDS, overriding pkg-config
+ MDDS_LIBS linker flags for MDDS, overriding pkg-config
+ PYTHON the Python interpreter
+ PYTHON_CFLAGS
+ C compiler flags for PYTHON, overriding pkg-config
+ PYTHON_LIBS linker flags for PYTHON, overriding pkg-config
+ VULKAN_CFLAGS
+ C compiler flags for VULKAN, overriding pkg-config
+ VULKAN_LIBS linker flags for VULKAN, overriding pkg-config
+
+Use these variables to override the choices made by `configure' or to help
+it to find libraries and programs with nonstandard names/locations.
+
+Report bugs to the package provider.
+_ACEOF
+ac_status=$?
+fi
+
+if test "$ac_init_help" = "recursive"; then
+ # If there are subdirs, report their specific --help.
+ for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
+ test -d "$ac_dir" ||
+ { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
+ continue
+ ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+ ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
+ # A ".." for each directory in $ac_dir_suffix.
+ ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+ case $ac_top_builddir_sub in
+ "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+ *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+ esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+ .) # We are building in place.
+ ac_srcdir=.
+ ac_top_srcdir=$ac_top_builddir_sub
+ ac_abs_top_srcdir=$ac_pwd ;;
+ [\\/]* | ?:[\\/]* ) # Absolute name.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir
+ ac_abs_top_srcdir=$srcdir ;;
+ *) # Relative name.
+ ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_build_prefix$srcdir
+ ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+ cd "$ac_dir" || { ac_status=$?; continue; }
+ # Check for configure.gnu first; this name is used for a wrapper for
+ # Metaconfig's "Configure" on case-insensitive file systems.
+ if test -f "$ac_srcdir/configure.gnu"; then
+ echo &&
+ $SHELL "$ac_srcdir/configure.gnu" --help=recursive
+ elif test -f "$ac_srcdir/configure"; then
+ echo &&
+ $SHELL "$ac_srcdir/configure" --help=recursive
+ else
+ printf "%s\n" "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+ fi || ac_status=$?
+ cd "$ac_pwd" || { ac_status=$?; break; }
+ done
+fi
+
+test -n "$ac_init_help" && exit $ac_status
+if $ac_init_version; then
+ cat <<\_ACEOF
+libixion configure 0.19.0
+generated by GNU Autoconf 2.71
+
+Copyright (C) 2021 Free Software Foundation, Inc.
+This configure script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it.
+_ACEOF
+ exit
+fi
+
+## ------------------------ ##
+## Autoconf initialization. ##
+## ------------------------ ##
+
+# ac_fn_cxx_try_compile LINENO
+# ----------------------------
+# Try to compile conftest.$ac_ext, and return whether this succeeded.
+ac_fn_cxx_try_compile ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ rm -f conftest.$ac_objext conftest.beam
+ if { { ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+printf "%s\n" "$ac_try_echo"; } >&5
+ (eval "$ac_compile") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ grep -v '^ *+' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ mv -f conftest.er1 conftest.err
+ fi
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && {
+ test -z "$ac_cxx_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext
+then :
+ ac_retval=0
+else $as_nop
+ printf "%s\n" "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=1
+fi
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+ as_fn_set_status $ac_retval
+
+} # ac_fn_cxx_try_compile
+
+# ac_fn_c_try_compile LINENO
+# --------------------------
+# Try to compile conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_compile ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ rm -f conftest.$ac_objext conftest.beam
+ if { { ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+printf "%s\n" "$ac_try_echo"; } >&5
+ (eval "$ac_compile") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ grep -v '^ *+' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ mv -f conftest.er1 conftest.err
+ fi
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext
+then :
+ ac_retval=0
+else $as_nop
+ printf "%s\n" "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=1
+fi
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+ as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_compile
+
+# ac_fn_c_try_link LINENO
+# -----------------------
+# Try to link conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_link ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ rm -f conftest.$ac_objext conftest.beam conftest$ac_exeext
+ if { { ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+printf "%s\n" "$ac_try_echo"; } >&5
+ (eval "$ac_link") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ grep -v '^ *+' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ mv -f conftest.er1 conftest.err
+ fi
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ test -x conftest$ac_exeext
+ }
+then :
+ ac_retval=0
+else $as_nop
+ printf "%s\n" "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=1
+fi
+ # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
+ # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
+ # interfere with the next link command; also delete a directory that is
+ # left behind by Apple's compiler. We do this before executing the actions.
+ rm -rf conftest.dSYM conftest_ipa8_conftest.oo
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+ as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_link
+
+# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
+# -------------------------------------------------------
+# Tests whether HEADER exists and can be compiled using the include files in
+# INCLUDES, setting the cache variable VAR accordingly.
+ac_fn_c_check_header_compile ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+printf %s "checking for $2... " >&6; }
+if eval test \${$3+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+#include <$2>
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ eval "$3=yes"
+else $as_nop
+ eval "$3=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+eval ac_res=\$$3
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+printf "%s\n" "$ac_res" >&6; }
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_c_check_header_compile
+
+# ac_fn_c_check_func LINENO FUNC VAR
+# ----------------------------------
+# Tests whether FUNC exists, setting the cache variable VAR accordingly
+ac_fn_c_check_func ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+printf %s "checking for $2... " >&6; }
+if eval test \${$3+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $2 innocuous_$2
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $2 (); below. */
+
+#include <limits.h>
+#undef $2
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char $2 ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined __stub_$2 || defined __stub___$2
+choke me
+#endif
+
+int
+main (void)
+{
+return $2 ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ eval "$3=yes"
+else $as_nop
+ eval "$3=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+eval ac_res=\$$3
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+printf "%s\n" "$ac_res" >&6; }
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_c_check_func
+
+# ac_fn_cxx_try_cpp LINENO
+# ------------------------
+# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
+ac_fn_cxx_try_cpp ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ if { { ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+printf "%s\n" "$ac_try_echo"; } >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ grep -v '^ *+' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ mv -f conftest.er1 conftest.err
+ fi
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } > conftest.i && {
+ test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
+ test ! -s conftest.err
+ }
+then :
+ ac_retval=0
+else $as_nop
+ printf "%s\n" "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=1
+fi
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+ as_fn_set_status $ac_retval
+
+} # ac_fn_cxx_try_cpp
+
+# ac_fn_cxx_try_link LINENO
+# -------------------------
+# Try to link conftest.$ac_ext, and return whether this succeeded.
+ac_fn_cxx_try_link ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ rm -f conftest.$ac_objext conftest.beam conftest$ac_exeext
+ if { { ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+printf "%s\n" "$ac_try_echo"; } >&5
+ (eval "$ac_link") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ grep -v '^ *+' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ mv -f conftest.er1 conftest.err
+ fi
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && {
+ test -z "$ac_cxx_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ test -x conftest$ac_exeext
+ }
+then :
+ ac_retval=0
+else $as_nop
+ printf "%s\n" "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=1
+fi
+ # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
+ # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
+ # interfere with the next link command; also delete a directory that is
+ # left behind by Apple's compiler. We do this before executing the actions.
+ rm -rf conftest.dSYM conftest_ipa8_conftest.oo
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+ as_fn_set_status $ac_retval
+
+} # ac_fn_cxx_try_link
+
+# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
+# -------------------------------------------
+# Tests whether TYPE exists after having included INCLUDES, setting cache
+# variable VAR accordingly.
+ac_fn_c_check_type ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+printf %s "checking for $2... " >&6; }
+if eval test \${$3+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ eval "$3=no"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+int
+main (void)
+{
+if (sizeof ($2))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+int
+main (void)
+{
+if (sizeof (($2)))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+
+else $as_nop
+ eval "$3=yes"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+eval ac_res=\$$3
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+printf "%s\n" "$ac_res" >&6; }
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_c_check_type
+
+# ac_fn_c_try_run LINENO
+# ----------------------
+# Try to run conftest.$ac_ext, and return whether this succeeded. Assumes that
+# executables *can* be run.
+ac_fn_c_try_run ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ if { { ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+printf "%s\n" "$ac_try_echo"; } >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
+ { { case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+printf "%s\n" "$ac_try_echo"; } >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; }
+then :
+ ac_retval=0
+else $as_nop
+ printf "%s\n" "$as_me: program exited with status $ac_status" >&5
+ printf "%s\n" "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=$ac_status
+fi
+ rm -rf conftest.dSYM conftest_ipa8_conftest.oo
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+ as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_run
+
+# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
+# --------------------------------------------
+# Tries to find the compile-time value of EXPR in a program that includes
+# INCLUDES, setting VAR accordingly. Returns whether the value could be
+# computed
+ac_fn_c_compute_int ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ if test "$cross_compiling" = yes; then
+ # Depending upon the size, compute the lo and hi bounds.
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+int
+main (void)
+{
+static int test_array [1 - 2 * !(($2) >= 0)];
+test_array [0] = 0;
+return test_array [0];
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ ac_lo=0 ac_mid=0
+ while :; do
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+int
+main (void)
+{
+static int test_array [1 - 2 * !(($2) <= $ac_mid)];
+test_array [0] = 0;
+return test_array [0];
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ ac_hi=$ac_mid; break
+else $as_nop
+ as_fn_arith $ac_mid + 1 && ac_lo=$as_val
+ if test $ac_lo -le $ac_mid; then
+ ac_lo= ac_hi=
+ break
+ fi
+ as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+ done
+else $as_nop
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+int
+main (void)
+{
+static int test_array [1 - 2 * !(($2) < 0)];
+test_array [0] = 0;
+return test_array [0];
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ ac_hi=-1 ac_mid=-1
+ while :; do
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+int
+main (void)
+{
+static int test_array [1 - 2 * !(($2) >= $ac_mid)];
+test_array [0] = 0;
+return test_array [0];
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ ac_lo=$ac_mid; break
+else $as_nop
+ as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
+ if test $ac_mid -le $ac_hi; then
+ ac_lo= ac_hi=
+ break
+ fi
+ as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+ done
+else $as_nop
+ ac_lo= ac_hi=
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+# Binary search between lo and hi bounds.
+while test "x$ac_lo" != "x$ac_hi"; do
+ as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+int
+main (void)
+{
+static int test_array [1 - 2 * !(($2) <= $ac_mid)];
+test_array [0] = 0;
+return test_array [0];
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ ac_hi=$ac_mid
+else $as_nop
+ as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+done
+case $ac_lo in #((
+?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
+'') ac_retval=1 ;;
+esac
+ else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+static long int longval (void) { return $2; }
+static unsigned long int ulongval (void) { return $2; }
+#include <stdio.h>
+#include <stdlib.h>
+int
+main (void)
+{
+
+ FILE *f = fopen ("conftest.val", "w");
+ if (! f)
+ return 1;
+ if (($2) < 0)
+ {
+ long int i = longval ();
+ if (i != ($2))
+ return 1;
+ fprintf (f, "%ld", i);
+ }
+ else
+ {
+ unsigned long int i = ulongval ();
+ if (i != ($2))
+ return 1;
+ fprintf (f, "%lu", i);
+ }
+ /* Do not output a trailing newline, as this causes \r\n confusion
+ on some platforms. */
+ return ferror (f) || fclose (f) != 0;
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"
+then :
+ echo >>conftest.val; read $3 <conftest.val; ac_retval=0
+else $as_nop
+ ac_retval=1
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+rm -f conftest.val
+
+ fi
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+ as_fn_set_status $ac_retval
+
+} # ac_fn_c_compute_int
+
+# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
+# ---------------------------------------------------------
+# Tests whether HEADER exists and can be compiled using the include files in
+# INCLUDES, setting the cache variable VAR accordingly.
+ac_fn_cxx_check_header_compile ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+printf %s "checking for $2... " >&6; }
+if eval test \${$3+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+#include <$2>
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"
+then :
+ eval "$3=yes"
+else $as_nop
+ eval "$3=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+eval ac_res=\$$3
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+printf "%s\n" "$ac_res" >&6; }
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_cxx_check_header_compile
+ac_configure_args_raw=
+for ac_arg
+do
+ case $ac_arg in
+ *\'*)
+ ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ as_fn_append ac_configure_args_raw " '$ac_arg'"
+done
+
+case $ac_configure_args_raw in
+ *$as_nl*)
+ ac_safe_unquote= ;;
+ *)
+ ac_unsafe_z='|&;<>()$`\\"*?[ '' ' # This string ends in space, tab.
+ ac_unsafe_a="$ac_unsafe_z#~"
+ ac_safe_unquote="s/ '\\([^$ac_unsafe_a][^$ac_unsafe_z]*\\)'/ \\1/g"
+ ac_configure_args_raw=` printf "%s\n" "$ac_configure_args_raw" | sed "$ac_safe_unquote"`;;
+esac
+
+cat >config.log <<_ACEOF
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+
+It was created by libixion $as_me 0.19.0, which was
+generated by GNU Autoconf 2.71. Invocation command line was
+
+ $ $0$ac_configure_args_raw
+
+_ACEOF
+exec 5>>config.log
+{
+cat <<_ASUNAME
+## --------- ##
+## Platform. ##
+## --------- ##
+
+hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
+/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
+
+/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
+/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
+/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
+/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
+/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
+/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
+
+_ASUNAME
+
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ printf "%s\n" "PATH: $as_dir"
+ done
+IFS=$as_save_IFS
+
+} >&5
+
+cat >&5 <<_ACEOF
+
+
+## ----------- ##
+## Core tests. ##
+## ----------- ##
+
+_ACEOF
+
+
+# Keep a trace of the command line.
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Strip out --silent because we don't want to record it for future runs.
+# Also quote any args containing shell meta-characters.
+# Make two passes to allow for proper duplicate-argument suppression.
+ac_configure_args=
+ac_configure_args0=
+ac_configure_args1=
+ac_must_keep_next=false
+for ac_pass in 1 2
+do
+ for ac_arg
+ do
+ case $ac_arg in
+ -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ continue ;;
+ *\'*)
+ ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ case $ac_pass in
+ 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
+ 2)
+ as_fn_append ac_configure_args1 " '$ac_arg'"
+ if test $ac_must_keep_next = true; then
+ ac_must_keep_next=false # Got value, back to normal.
+ else
+ case $ac_arg in
+ *=* | --config-cache | -C | -disable-* | --disable-* \
+ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
+ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
+ | -with-* | --with-* | -without-* | --without-* | --x)
+ case "$ac_configure_args0 " in
+ "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
+ esac
+ ;;
+ -* ) ac_must_keep_next=true ;;
+ esac
+ fi
+ as_fn_append ac_configure_args " '$ac_arg'"
+ ;;
+ esac
+ done
+done
+{ ac_configure_args0=; unset ac_configure_args0;}
+{ ac_configure_args1=; unset ac_configure_args1;}
+
+# When interrupted or exit'd, cleanup temporary files, and complete
+# config.log. We remove comments because anyway the quotes in there
+# would cause problems or look ugly.
+# WARNING: Use '\'' to represent an apostrophe within the trap.
+# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
+trap 'exit_status=$?
+ # Sanitize IFS.
+ IFS=" "" $as_nl"
+ # Save into config.log some information that might help in debugging.
+ {
+ echo
+
+ printf "%s\n" "## ---------------- ##
+## Cache variables. ##
+## ---------------- ##"
+ echo
+ # The following way of writing the cache mishandles newlines in values,
+(
+ for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
+ eval ac_val=\$$ac_var
+ case $ac_val in #(
+ *${as_nl}*)
+ case $ac_var in #(
+ *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+ esac
+ case $ac_var in #(
+ _ | IFS | as_nl) ;; #(
+ BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
+ *) { eval $ac_var=; unset $ac_var;} ;;
+ esac ;;
+ esac
+ done
+ (set) 2>&1 |
+ case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
+ *${as_nl}ac_space=\ *)
+ sed -n \
+ "s/'\''/'\''\\\\'\'''\''/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
+ ;; #(
+ *)
+ sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+ ;;
+ esac |
+ sort
+)
+ echo
+
+ printf "%s\n" "## ----------------- ##
+## Output variables. ##
+## ----------------- ##"
+ echo
+ for ac_var in $ac_subst_vars
+ do
+ eval ac_val=\$$ac_var
+ case $ac_val in
+ *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+ esac
+ printf "%s\n" "$ac_var='\''$ac_val'\''"
+ done | sort
+ echo
+
+ if test -n "$ac_subst_files"; then
+ printf "%s\n" "## ------------------- ##
+## File substitutions. ##
+## ------------------- ##"
+ echo
+ for ac_var in $ac_subst_files
+ do
+ eval ac_val=\$$ac_var
+ case $ac_val in
+ *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+ esac
+ printf "%s\n" "$ac_var='\''$ac_val'\''"
+ done | sort
+ echo
+ fi
+
+ if test -s confdefs.h; then
+ printf "%s\n" "## ----------- ##
+## confdefs.h. ##
+## ----------- ##"
+ echo
+ cat confdefs.h
+ echo
+ fi
+ test "$ac_signal" != 0 &&
+ printf "%s\n" "$as_me: caught signal $ac_signal"
+ printf "%s\n" "$as_me: exit $exit_status"
+ } >&5
+ rm -f core *.core core.conftest.* &&
+ rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
+ exit $exit_status
+' 0
+for ac_signal in 1 2 13 15; do
+ trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
+done
+ac_signal=0
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -f -r conftest* confdefs.h
+
+printf "%s\n" "/* confdefs.h */" > confdefs.h
+
+# Predefined preprocessor variables.
+
+printf "%s\n" "#define PACKAGE_NAME \"$PACKAGE_NAME\"" >>confdefs.h
+
+printf "%s\n" "#define PACKAGE_TARNAME \"$PACKAGE_TARNAME\"" >>confdefs.h
+
+printf "%s\n" "#define PACKAGE_VERSION \"$PACKAGE_VERSION\"" >>confdefs.h
+
+printf "%s\n" "#define PACKAGE_STRING \"$PACKAGE_STRING\"" >>confdefs.h
+
+printf "%s\n" "#define PACKAGE_BUGREPORT \"$PACKAGE_BUGREPORT\"" >>confdefs.h
+
+printf "%s\n" "#define PACKAGE_URL \"$PACKAGE_URL\"" >>confdefs.h
+
+
+# Let the site file select an alternate cache file if it wants to.
+# Prefer an explicitly selected file to automatically selected ones.
+if test -n "$CONFIG_SITE"; then
+ ac_site_files="$CONFIG_SITE"
+elif test "x$prefix" != xNONE; then
+ ac_site_files="$prefix/share/config.site $prefix/etc/config.site"
+else
+ ac_site_files="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
+fi
+
+for ac_site_file in $ac_site_files
+do
+ case $ac_site_file in #(
+ */*) :
+ ;; #(
+ *) :
+ ac_site_file=./$ac_site_file ;;
+esac
+ if test -f "$ac_site_file" && test -r "$ac_site_file"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
+printf "%s\n" "$as_me: loading site script $ac_site_file" >&6;}
+ sed 's/^/| /' "$ac_site_file" >&5
+ . "$ac_site_file" \
+ || { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "failed to load site script $ac_site_file
+See \`config.log' for more details" "$LINENO" 5; }
+ fi
+done
+
+if test -r "$cache_file"; then
+ # Some versions of bash will fail to source /dev/null (special files
+ # actually), so we avoid doing that. DJGPP emulates it as a regular file.
+ if test /dev/null != "$cache_file" && test -f "$cache_file"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
+printf "%s\n" "$as_me: loading cache $cache_file" >&6;}
+ case $cache_file in
+ [\\/]* | ?:[\\/]* ) . "$cache_file";;
+ *) . "./$cache_file";;
+ esac
+ fi
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
+printf "%s\n" "$as_me: creating cache $cache_file" >&6;}
+ >$cache_file
+fi
+
+# Test code for whether the C++ compiler supports C++98 (global declarations)
+ac_cxx_conftest_cxx98_globals='
+// Does the compiler advertise C++98 conformance?
+#if !defined __cplusplus || __cplusplus < 199711L
+# error "Compiler does not advertise C++98 conformance"
+#endif
+
+// These inclusions are to reject old compilers that
+// lack the unsuffixed header files.
+#include <cstdlib>
+#include <exception>
+
+// <cassert> and <cstring> are *not* freestanding headers in C++98.
+extern void assert (int);
+namespace std {
+ extern int strcmp (const char *, const char *);
+}
+
+// Namespaces, exceptions, and templates were all added after "C++ 2.0".
+using std::exception;
+using std::strcmp;
+
+namespace {
+
+void test_exception_syntax()
+{
+ try {
+ throw "test";
+ } catch (const char *s) {
+ // Extra parentheses suppress a warning when building autoconf itself,
+ // due to lint rules shared with more typical C programs.
+ assert (!(strcmp) (s, "test"));
+ }
+}
+
+template <typename T> struct test_template
+{
+ T const val;
+ explicit test_template(T t) : val(t) {}
+ template <typename U> T add(U u) { return static_cast<T>(u) + val; }
+};
+
+} // anonymous namespace
+'
+
+# Test code for whether the C++ compiler supports C++98 (body of main)
+ac_cxx_conftest_cxx98_main='
+ assert (argc);
+ assert (! argv[0]);
+{
+ test_exception_syntax ();
+ test_template<double> tt (2.0);
+ assert (tt.add (4) == 6.0);
+ assert (true && !false);
+}
+'
+
+# Test code for whether the C++ compiler supports C++11 (global declarations)
+ac_cxx_conftest_cxx11_globals='
+// Does the compiler advertise C++ 2011 conformance?
+#if !defined __cplusplus || __cplusplus < 201103L
+# error "Compiler does not advertise C++11 conformance"
+#endif
+
+namespace cxx11test
+{
+ constexpr int get_val() { return 20; }
+
+ struct testinit
+ {
+ int i;
+ double d;
+ };
+
+ class delegate
+ {
+ public:
+ delegate(int n) : n(n) {}
+ delegate(): delegate(2354) {}
+
+ virtual int getval() { return this->n; };
+ protected:
+ int n;
+ };
+
+ class overridden : public delegate
+ {
+ public:
+ overridden(int n): delegate(n) {}
+ virtual int getval() override final { return this->n * 2; }
+ };
+
+ class nocopy
+ {
+ public:
+ nocopy(int i): i(i) {}
+ nocopy() = default;
+ nocopy(const nocopy&) = delete;
+ nocopy & operator=(const nocopy&) = delete;
+ private:
+ int i;
+ };
+
+ // for testing lambda expressions
+ template <typename Ret, typename Fn> Ret eval(Fn f, Ret v)
+ {
+ return f(v);
+ }
+
+ // for testing variadic templates and trailing return types
+ template <typename V> auto sum(V first) -> V
+ {
+ return first;
+ }
+ template <typename V, typename... Args> auto sum(V first, Args... rest) -> V
+ {
+ return first + sum(rest...);
+ }
+}
+'
+
+# Test code for whether the C++ compiler supports C++11 (body of main)
+ac_cxx_conftest_cxx11_main='
+{
+ // Test auto and decltype
+ auto a1 = 6538;
+ auto a2 = 48573953.4;
+ auto a3 = "String literal";
+
+ int total = 0;
+ for (auto i = a3; *i; ++i) { total += *i; }
+
+ decltype(a2) a4 = 34895.034;
+}
+{
+ // Test constexpr
+ short sa[cxx11test::get_val()] = { 0 };
+}
+{
+ // Test initializer lists
+ cxx11test::testinit il = { 4323, 435234.23544 };
+}
+{
+ // Test range-based for
+ int array[] = {9, 7, 13, 15, 4, 18, 12, 10, 5, 3,
+ 14, 19, 17, 8, 6, 20, 16, 2, 11, 1};
+ for (auto &x : array) { x += 23; }
+}
+{
+ // Test lambda expressions
+ using cxx11test::eval;
+ assert (eval ([](int x) { return x*2; }, 21) == 42);
+ double d = 2.0;
+ assert (eval ([&](double x) { return d += x; }, 3.0) == 5.0);
+ assert (d == 5.0);
+ assert (eval ([=](double x) mutable { return d += x; }, 4.0) == 9.0);
+ assert (d == 5.0);
+}
+{
+ // Test use of variadic templates
+ using cxx11test::sum;
+ auto a = sum(1);
+ auto b = sum(1, 2);
+ auto c = sum(1.0, 2.0, 3.0);
+}
+{
+ // Test constructor delegation
+ cxx11test::delegate d1;
+ cxx11test::delegate d2();
+ cxx11test::delegate d3(45);
+}
+{
+ // Test override and final
+ cxx11test::overridden o1(55464);
+}
+{
+ // Test nullptr
+ char *c = nullptr;
+}
+{
+ // Test template brackets
+ test_template<::test_template<int>> v(test_template<int>(12));
+}
+{
+ // Unicode literals
+ char const *utf8 = u8"UTF-8 string \u2500";
+ char16_t const *utf16 = u"UTF-8 string \u2500";
+ char32_t const *utf32 = U"UTF-32 string \u2500";
+}
+'
+
+# Test code for whether the C compiler supports C++11 (complete).
+ac_cxx_conftest_cxx11_program="${ac_cxx_conftest_cxx98_globals}
+${ac_cxx_conftest_cxx11_globals}
+
+int
+main (int argc, char **argv)
+{
+ int ok = 0;
+ ${ac_cxx_conftest_cxx98_main}
+ ${ac_cxx_conftest_cxx11_main}
+ return ok;
+}
+"
+
+# Test code for whether the C compiler supports C++98 (complete).
+ac_cxx_conftest_cxx98_program="${ac_cxx_conftest_cxx98_globals}
+int
+main (int argc, char **argv)
+{
+ int ok = 0;
+ ${ac_cxx_conftest_cxx98_main}
+ return ok;
+}
+"
+
+# Test code for whether the C compiler supports C89 (global declarations)
+ac_c_conftest_c89_globals='
+/* Does the compiler advertise C89 conformance?
+ Do not test the value of __STDC__, because some compilers set it to 0
+ while being otherwise adequately conformant. */
+#if !defined __STDC__
+# error "Compiler does not advertise C89 conformance"
+#endif
+
+#include <stddef.h>
+#include <stdarg.h>
+struct stat;
+/* Most of the following tests are stolen from RCS 5.7 src/conf.sh. */
+struct buf { int x; };
+struct buf * (*rcsopen) (struct buf *, struct stat *, int);
+static char *e (p, i)
+ char **p;
+ int i;
+{
+ return p[i];
+}
+static char *f (char * (*g) (char **, int), char **p, ...)
+{
+ char *s;
+ va_list v;
+ va_start (v,p);
+ s = g (p, va_arg (v,int));
+ va_end (v);
+ return s;
+}
+
+/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
+ function prototypes and stuff, but not \xHH hex character constants.
+ These do not provoke an error unfortunately, instead are silently treated
+ as an "x". The following induces an error, until -std is added to get
+ proper ANSI mode. Curiously \x00 != x always comes out true, for an
+ array size at least. It is necessary to write \x00 == 0 to get something
+ that is true only with -std. */
+int osf4_cc_array ['\''\x00'\'' == 0 ? 1 : -1];
+
+/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
+ inside strings and character constants. */
+#define FOO(x) '\''x'\''
+int xlc6_cc_array[FOO(a) == '\''x'\'' ? 1 : -1];
+
+int test (int i, double x);
+struct s1 {int (*f) (int a);};
+struct s2 {int (*f) (double a);};
+int pairnames (int, char **, int *(*)(struct buf *, struct stat *, int),
+ int, int);'
+
+# Test code for whether the C compiler supports C89 (body of main).
+ac_c_conftest_c89_main='
+ok |= (argc == 0 || f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]);
+'
+
+# Test code for whether the C compiler supports C99 (global declarations)
+ac_c_conftest_c99_globals='
+// Does the compiler advertise C99 conformance?
+#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 199901L
+# error "Compiler does not advertise C99 conformance"
+#endif
+
+#include <stdbool.h>
+extern int puts (const char *);
+extern int printf (const char *, ...);
+extern int dprintf (int, const char *, ...);
+extern void *malloc (size_t);
+
+// Check varargs macros. These examples are taken from C99 6.10.3.5.
+// dprintf is used instead of fprintf to avoid needing to declare
+// FILE and stderr.
+#define debug(...) dprintf (2, __VA_ARGS__)
+#define showlist(...) puts (#__VA_ARGS__)
+#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
+static void
+test_varargs_macros (void)
+{
+ int x = 1234;
+ int y = 5678;
+ debug ("Flag");
+ debug ("X = %d\n", x);
+ showlist (The first, second, and third items.);
+ report (x>y, "x is %d but y is %d", x, y);
+}
+
+// Check long long types.
+#define BIG64 18446744073709551615ull
+#define BIG32 4294967295ul
+#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
+#if !BIG_OK
+ #error "your preprocessor is broken"
+#endif
+#if BIG_OK
+#else
+ #error "your preprocessor is broken"
+#endif
+static long long int bignum = -9223372036854775807LL;
+static unsigned long long int ubignum = BIG64;
+
+struct incomplete_array
+{
+ int datasize;
+ double data[];
+};
+
+struct named_init {
+ int number;
+ const wchar_t *name;
+ double average;
+};
+
+typedef const char *ccp;
+
+static inline int
+test_restrict (ccp restrict text)
+{
+ // See if C++-style comments work.
+ // Iterate through items via the restricted pointer.
+ // Also check for declarations in for loops.
+ for (unsigned int i = 0; *(text+i) != '\''\0'\''; ++i)
+ continue;
+ return 0;
+}
+
+// Check varargs and va_copy.
+static bool
+test_varargs (const char *format, ...)
+{
+ va_list args;
+ va_start (args, format);
+ va_list args_copy;
+ va_copy (args_copy, args);
+
+ const char *str = "";
+ int number = 0;
+ float fnumber = 0;
+
+ while (*format)
+ {
+ switch (*format++)
+ {
+ case '\''s'\'': // string
+ str = va_arg (args_copy, const char *);
+ break;
+ case '\''d'\'': // int
+ number = va_arg (args_copy, int);
+ break;
+ case '\''f'\'': // float
+ fnumber = va_arg (args_copy, double);
+ break;
+ default:
+ break;
+ }
+ }
+ va_end (args_copy);
+ va_end (args);
+
+ return *str && number && fnumber;
+}
+'
+
+# Test code for whether the C compiler supports C99 (body of main).
+ac_c_conftest_c99_main='
+ // Check bool.
+ _Bool success = false;
+ success |= (argc != 0);
+
+ // Check restrict.
+ if (test_restrict ("String literal") == 0)
+ success = true;
+ char *restrict newvar = "Another string";
+
+ // Check varargs.
+ success &= test_varargs ("s, d'\'' f .", "string", 65, 34.234);
+ test_varargs_macros ();
+
+ // Check flexible array members.
+ struct incomplete_array *ia =
+ malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
+ ia->datasize = 10;
+ for (int i = 0; i < ia->datasize; ++i)
+ ia->data[i] = i * 1.234;
+
+ // Check named initializers.
+ struct named_init ni = {
+ .number = 34,
+ .name = L"Test wide string",
+ .average = 543.34343,
+ };
+
+ ni.number = 58;
+
+ int dynamic_array[ni.number];
+ dynamic_array[0] = argv[0][0];
+ dynamic_array[ni.number - 1] = 543;
+
+ // work around unused variable warnings
+ ok |= (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == '\''x'\''
+ || dynamic_array[ni.number - 1] != 543);
+'
+
+# Test code for whether the C compiler supports C11 (global declarations)
+ac_c_conftest_c11_globals='
+// Does the compiler advertise C11 conformance?
+#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112L
+# error "Compiler does not advertise C11 conformance"
+#endif
+
+// Check _Alignas.
+char _Alignas (double) aligned_as_double;
+char _Alignas (0) no_special_alignment;
+extern char aligned_as_int;
+char _Alignas (0) _Alignas (int) aligned_as_int;
+
+// Check _Alignof.
+enum
+{
+ int_alignment = _Alignof (int),
+ int_array_alignment = _Alignof (int[100]),
+ char_alignment = _Alignof (char)
+};
+_Static_assert (0 < -_Alignof (int), "_Alignof is signed");
+
+// Check _Noreturn.
+int _Noreturn does_not_return (void) { for (;;) continue; }
+
+// Check _Static_assert.
+struct test_static_assert
+{
+ int x;
+ _Static_assert (sizeof (int) <= sizeof (long int),
+ "_Static_assert does not work in struct");
+ long int y;
+};
+
+// Check UTF-8 literals.
+#define u8 syntax error!
+char const utf8_literal[] = u8"happens to be ASCII" "another string";
+
+// Check duplicate typedefs.
+typedef long *long_ptr;
+typedef long int *long_ptr;
+typedef long_ptr long_ptr;
+
+// Anonymous structures and unions -- taken from C11 6.7.2.1 Example 1.
+struct anonymous
+{
+ union {
+ struct { int i; int j; };
+ struct { int k; long int l; } w;
+ };
+ int m;
+} v1;
+'
+
+# Test code for whether the C compiler supports C11 (body of main).
+ac_c_conftest_c11_main='
+ _Static_assert ((offsetof (struct anonymous, i)
+ == offsetof (struct anonymous, w.k)),
+ "Anonymous union alignment botch");
+ v1.i = 2;
+ v1.w.k = 5;
+ ok |= v1.i != 5;
+'
+
+# Test code for whether the C compiler supports C11 (complete).
+ac_c_conftest_c11_program="${ac_c_conftest_c89_globals}
+${ac_c_conftest_c99_globals}
+${ac_c_conftest_c11_globals}
+
+int
+main (int argc, char **argv)
+{
+ int ok = 0;
+ ${ac_c_conftest_c89_main}
+ ${ac_c_conftest_c99_main}
+ ${ac_c_conftest_c11_main}
+ return ok;
+}
+"
+
+# Test code for whether the C compiler supports C99 (complete).
+ac_c_conftest_c99_program="${ac_c_conftest_c89_globals}
+${ac_c_conftest_c99_globals}
+
+int
+main (int argc, char **argv)
+{
+ int ok = 0;
+ ${ac_c_conftest_c89_main}
+ ${ac_c_conftest_c99_main}
+ return ok;
+}
+"
+
+# Test code for whether the C compiler supports C89 (complete).
+ac_c_conftest_c89_program="${ac_c_conftest_c89_globals}
+
+int
+main (int argc, char **argv)
+{
+ int ok = 0;
+ ${ac_c_conftest_c89_main}
+ return ok;
+}
+"
+
+as_fn_append ac_header_c_list " stdio.h stdio_h HAVE_STDIO_H"
+as_fn_append ac_header_c_list " stdlib.h stdlib_h HAVE_STDLIB_H"
+as_fn_append ac_header_c_list " string.h string_h HAVE_STRING_H"
+as_fn_append ac_header_c_list " inttypes.h inttypes_h HAVE_INTTYPES_H"
+as_fn_append ac_header_c_list " stdint.h stdint_h HAVE_STDINT_H"
+as_fn_append ac_header_c_list " strings.h strings_h HAVE_STRINGS_H"
+as_fn_append ac_header_c_list " sys/stat.h sys_stat_h HAVE_SYS_STAT_H"
+as_fn_append ac_header_c_list " sys/types.h sys_types_h HAVE_SYS_TYPES_H"
+as_fn_append ac_header_c_list " unistd.h unistd_h HAVE_UNISTD_H"
+
+# Auxiliary files required by this configure script.
+ac_aux_files="compile ltmain.sh config.guess config.sub missing install-sh"
+
+# Locations in which to look for auxiliary files.
+ac_aux_dir_candidates="${srcdir}${PATH_SEPARATOR}${srcdir}/..${PATH_SEPARATOR}${srcdir}/../.."
+
+# Search for a directory containing all of the required auxiliary files,
+# $ac_aux_files, from the $PATH-style list $ac_aux_dir_candidates.
+# If we don't find one directory that contains all the files we need,
+# we report the set of missing files from the *first* directory in
+# $ac_aux_dir_candidates and give up.
+ac_missing_aux_files=""
+ac_first_candidate=:
+printf "%s\n" "$as_me:${as_lineno-$LINENO}: looking for aux files: $ac_aux_files" >&5
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+as_found=false
+for as_dir in $ac_aux_dir_candidates
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ as_found=:
+
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: trying $as_dir" >&5
+ ac_aux_dir_found=yes
+ ac_install_sh=
+ for ac_aux in $ac_aux_files
+ do
+ # As a special case, if "install-sh" is required, that requirement
+ # can be satisfied by any of "install-sh", "install.sh", or "shtool",
+ # and $ac_install_sh is set appropriately for whichever one is found.
+ if test x"$ac_aux" = x"install-sh"
+ then
+ if test -f "${as_dir}install-sh"; then
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}install-sh found" >&5
+ ac_install_sh="${as_dir}install-sh -c"
+ elif test -f "${as_dir}install.sh"; then
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}install.sh found" >&5
+ ac_install_sh="${as_dir}install.sh -c"
+ elif test -f "${as_dir}shtool"; then
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}shtool found" >&5
+ ac_install_sh="${as_dir}shtool install -c"
+ else
+ ac_aux_dir_found=no
+ if $ac_first_candidate; then
+ ac_missing_aux_files="${ac_missing_aux_files} install-sh"
+ else
+ break
+ fi
+ fi
+ else
+ if test -f "${as_dir}${ac_aux}"; then
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}${ac_aux} found" >&5
+ else
+ ac_aux_dir_found=no
+ if $ac_first_candidate; then
+ ac_missing_aux_files="${ac_missing_aux_files} ${ac_aux}"
+ else
+ break
+ fi
+ fi
+ fi
+ done
+ if test "$ac_aux_dir_found" = yes; then
+ ac_aux_dir="$as_dir"
+ break
+ fi
+ ac_first_candidate=false
+
+ as_found=false
+done
+IFS=$as_save_IFS
+if $as_found
+then :
+
+else $as_nop
+ as_fn_error $? "cannot find required auxiliary files:$ac_missing_aux_files" "$LINENO" 5
+fi
+
+
+# These three variables are undocumented and unsupported,
+# and are intended to be withdrawn in a future Autoconf release.
+# They can cause serious problems if a builder's source tree is in a directory
+# whose full name contains unusual characters.
+if test -f "${ac_aux_dir}config.guess"; then
+ ac_config_guess="$SHELL ${ac_aux_dir}config.guess"
+fi
+if test -f "${ac_aux_dir}config.sub"; then
+ ac_config_sub="$SHELL ${ac_aux_dir}config.sub"
+fi
+if test -f "$ac_aux_dir/configure"; then
+ ac_configure="$SHELL ${ac_aux_dir}configure"
+fi
+
+# Check that the precious variables saved in the cache have kept the same
+# value.
+ac_cache_corrupted=false
+for ac_var in $ac_precious_vars; do
+ eval ac_old_set=\$ac_cv_env_${ac_var}_set
+ eval ac_new_set=\$ac_env_${ac_var}_set
+ eval ac_old_val=\$ac_cv_env_${ac_var}_value
+ eval ac_new_val=\$ac_env_${ac_var}_value
+ case $ac_old_set,$ac_new_set in
+ set,)
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+printf "%s\n" "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,set)
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
+printf "%s\n" "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,);;
+ *)
+ if test "x$ac_old_val" != "x$ac_new_val"; then
+ # differences in whitespace do not lead to failure.
+ ac_old_val_w=`echo x $ac_old_val`
+ ac_new_val_w=`echo x $ac_new_val`
+ if test "$ac_old_val_w" != "$ac_new_val_w"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
+printf "%s\n" "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+ ac_cache_corrupted=:
+ else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
+printf "%s\n" "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
+ eval $ac_var=\$ac_old_val
+ fi
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
+printf "%s\n" "$as_me: former value: \`$ac_old_val'" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
+printf "%s\n" "$as_me: current value: \`$ac_new_val'" >&2;}
+ fi;;
+ esac
+ # Pass precious variables to config.status.
+ if test "$ac_new_set" = set; then
+ case $ac_new_val in
+ *\'*) ac_arg=$ac_var=`printf "%s\n" "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
+ *) ac_arg=$ac_var=$ac_new_val ;;
+ esac
+ case " $ac_configure_args " in
+ *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
+ *) as_fn_append ac_configure_args " '$ac_arg'" ;;
+ esac
+ fi
+done
+if $ac_cache_corrupted; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
+printf "%s\n" "$as_me: error: changes in the environment can compromise the build" >&2;}
+ as_fn_error $? "run \`${MAKE-make} distclean' and/or \`rm $cache_file'
+ and start over" "$LINENO" 5
+fi
+## -------------------- ##
+## Main body of script. ##
+## -------------------- ##
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+ac_config_headers="$ac_config_headers config.h"
+
+am__api_version='1.16'
+
+
+
+ # Find a good install program. We prefer a C program (faster),
+# so one script is as good as another. But avoid the broken or
+# incompatible versions:
+# SysV /etc/install, /usr/sbin/install
+# SunOS /usr/etc/install
+# IRIX /sbin/install
+# AIX /bin/install
+# AmigaOS /C/install, which installs bootblocks on floppy discs
+# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
+# AFS /usr/afsws/bin/install, which mishandles nonexistent args
+# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+# OS/2's system install, which has a completely different semantic
+# ./install, which can be erroneously created by make from ./install.sh.
+# Reject install programs that cannot install multiple files.
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
+printf %s "checking for a BSD-compatible install... " >&6; }
+if test -z "$INSTALL"; then
+if test ${ac_cv_path_install+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ # Account for fact that we put trailing slashes in our PATH walk.
+case $as_dir in #((
+ ./ | /[cC]/* | \
+ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
+ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
+ /usr/ucb/* ) ;;
+ *)
+ # OSF1 and SCO ODT 3.0 have their own names for install.
+ # Don't use installbsd from OSF since it installs stuff as root
+ # by default.
+ for ac_prog in ginstall scoinst install; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_prog$ac_exec_ext"; then
+ if test $ac_prog = install &&
+ grep dspmsg "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # AIX install. It has an incompatible calling convention.
+ :
+ elif test $ac_prog = install &&
+ grep pwplus "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # program-specific install script used by HP pwplus--don't use.
+ :
+ else
+ rm -rf conftest.one conftest.two conftest.dir
+ echo one > conftest.one
+ echo two > conftest.two
+ mkdir conftest.dir
+ if "$as_dir$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir/" &&
+ test -s conftest.one && test -s conftest.two &&
+ test -s conftest.dir/conftest.one &&
+ test -s conftest.dir/conftest.two
+ then
+ ac_cv_path_install="$as_dir$ac_prog$ac_exec_ext -c"
+ break 3
+ fi
+ fi
+ fi
+ done
+ done
+ ;;
+esac
+
+ done
+IFS=$as_save_IFS
+
+rm -rf conftest.one conftest.two conftest.dir
+
+fi
+ if test ${ac_cv_path_install+y}; then
+ INSTALL=$ac_cv_path_install
+ else
+ # As a last resort, use the slow shell script. Don't cache a
+ # value for INSTALL within a source directory, because that will
+ # break other packages using the cache if that directory is
+ # removed, or if the value is a relative name.
+ INSTALL=$ac_install_sh
+ fi
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
+printf "%s\n" "$INSTALL" >&6; }
+
+# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
+# It thinks the first close brace ends the variable substitution.
+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
+
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
+
+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
+printf %s "checking whether build environment is sane... " >&6; }
+# Reject unsafe characters in $srcdir or the absolute working directory
+# name. Accept space and tab only in the latter.
+am_lf='
+'
+case `pwd` in
+ *[\\\"\#\$\&\'\`$am_lf]*)
+ as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
+esac
+case $srcdir in
+ *[\\\"\#\$\&\'\`$am_lf\ \ ]*)
+ as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;;
+esac
+
+# Do 'set' in a subshell so we don't clobber the current shell's
+# arguments. Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+ am_has_slept=no
+ for am_try in 1 2; do
+ echo "timestamp, slept: $am_has_slept" > conftest.file
+ set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
+ if test "$*" = "X"; then
+ # -L didn't work.
+ set X `ls -t "$srcdir/configure" conftest.file`
+ fi
+ if test "$*" != "X $srcdir/configure conftest.file" \
+ && test "$*" != "X conftest.file $srcdir/configure"; then
+
+ # If neither matched, then we have a broken ls. This can happen
+ # if, for instance, CONFIG_SHELL is bash and it inherits a
+ # broken ls alias from the environment. This has actually
+ # happened. Such a system could not be considered "sane".
+ as_fn_error $? "ls -t appears to fail. Make sure there is not a broken
+ alias in your environment" "$LINENO" 5
+ fi
+ if test "$2" = conftest.file || test $am_try -eq 2; then
+ break
+ fi
+ # Just in case.
+ sleep 1
+ am_has_slept=yes
+ done
+ test "$2" = conftest.file
+ )
+then
+ # Ok.
+ :
+else
+ as_fn_error $? "newly created file is older than distributed files!
+Check your system clock" "$LINENO" 5
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+# If we didn't sleep, we still need to ensure time stamps of config.status and
+# generated files are strictly newer.
+am_sleep_pid=
+if grep 'slept: no' conftest.file >/dev/null 2>&1; then
+ ( sleep 1 ) &
+ am_sleep_pid=$!
+fi
+
+rm -f conftest.file
+
+test "$program_prefix" != NONE &&
+ program_transform_name="s&^&$program_prefix&;$program_transform_name"
+# Use a double $ so make ignores it.
+test "$program_suffix" != NONE &&
+ program_transform_name="s&\$&$program_suffix&;$program_transform_name"
+# Double any \ or $.
+# By default was `s,x,x', remove it if useless.
+ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
+program_transform_name=`printf "%s\n" "$program_transform_name" | sed "$ac_script"`
+
+
+# Expand $ac_aux_dir to an absolute path.
+am_aux_dir=`cd "$ac_aux_dir" && pwd`
+
+
+ if test x"${MISSING+set}" != xset; then
+ MISSING="\${SHELL} '$am_aux_dir/missing'"
+fi
+# Use eval to expand $SHELL
+if eval "$MISSING --is-lightweight"; then
+ am_missing_run="$MISSING "
+else
+ am_missing_run=
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5
+printf "%s\n" "$as_me: WARNING: 'missing' script is too old or missing" >&2;}
+fi
+
+if test x"${install_sh+set}" != xset; then
+ case $am_aux_dir in
+ *\ * | *\ *)
+ install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
+ *)
+ install_sh="\${SHELL} $am_aux_dir/install-sh"
+ esac
+fi
+
+# Installed binaries are usually stripped using 'strip' when the user
+# run "make install-strip". However 'strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the 'STRIP' environment variable to overrule this program.
+if test "$cross_compiling" != no; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
+set dummy ${ac_tool_prefix}strip; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_STRIP+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$STRIP"; then
+ ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_STRIP="${ac_tool_prefix}strip"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+STRIP=$ac_cv_prog_STRIP
+if test -n "$STRIP"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
+printf "%s\n" "$STRIP" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_STRIP"; then
+ ac_ct_STRIP=$STRIP
+ # Extract the first word of "strip", so it can be a program name with args.
+set dummy strip; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_STRIP+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$ac_ct_STRIP"; then
+ ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_STRIP="strip"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
+if test -n "$ac_ct_STRIP"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
+printf "%s\n" "$ac_ct_STRIP" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+ if test "x$ac_ct_STRIP" = x; then
+ STRIP=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ STRIP=$ac_ct_STRIP
+ fi
+else
+ STRIP="$ac_cv_prog_STRIP"
+fi
+
+fi
+INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
+
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a race-free mkdir -p" >&5
+printf %s "checking for a race-free mkdir -p... " >&6; }
+if test -z "$MKDIR_P"; then
+ if test ${ac_cv_path_mkdir+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_prog in mkdir gmkdir; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ as_fn_executable_p "$as_dir$ac_prog$ac_exec_ext" || continue
+ case `"$as_dir$ac_prog$ac_exec_ext" --version 2>&1` in #(
+ 'mkdir ('*'coreutils) '* | \
+ 'BusyBox '* | \
+ 'mkdir (fileutils) '4.1*)
+ ac_cv_path_mkdir=$as_dir$ac_prog$ac_exec_ext
+ break 3;;
+ esac
+ done
+ done
+ done
+IFS=$as_save_IFS
+
+fi
+
+ test -d ./--version && rmdir ./--version
+ if test ${ac_cv_path_mkdir+y}; then
+ MKDIR_P="$ac_cv_path_mkdir -p"
+ else
+ # As a last resort, use the slow shell script. Don't cache a
+ # value for MKDIR_P within a source directory, because that will
+ # break other packages using the cache if that directory is
+ # removed, or if the value is a relative name.
+ MKDIR_P="$ac_install_sh -d"
+ fi
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
+printf "%s\n" "$MKDIR_P" >&6; }
+
+for ac_prog in gawk mawk nawk awk
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_AWK+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$AWK"; then
+ ac_cv_prog_AWK="$AWK" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_AWK="$ac_prog"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+AWK=$ac_cv_prog_AWK
+if test -n "$AWK"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
+printf "%s\n" "$AWK" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+ test -n "$AWK" && break
+done
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+printf %s "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
+set x ${MAKE-make}
+ac_make=`printf "%s\n" "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
+if eval test \${ac_cv_prog_make_${ac_make}_set+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ cat >conftest.make <<\_ACEOF
+SHELL = /bin/sh
+all:
+ @echo '@@@%%%=$(MAKE)=@@@%%%'
+_ACEOF
+# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
+case `${MAKE-make} -f conftest.make 2>/dev/null` in
+ *@@@%%%=?*=@@@%%%*)
+ eval ac_cv_prog_make_${ac_make}_set=yes;;
+ *)
+ eval ac_cv_prog_make_${ac_make}_set=no;;
+esac
+rm -f conftest.make
+fi
+if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+ SET_MAKE=
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+ SET_MAKE="MAKE=${MAKE-make}"
+fi
+
+rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+ am__leading_dot=.
+else
+ am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+
+# Check whether --enable-silent-rules was given.
+if test ${enable_silent_rules+y}
+then :
+ enableval=$enable_silent_rules;
+fi
+
+case $enable_silent_rules in # (((
+ yes) AM_DEFAULT_VERBOSITY=0;;
+ no) AM_DEFAULT_VERBOSITY=1;;
+ *) AM_DEFAULT_VERBOSITY=1;;
+esac
+am_make=${MAKE-make}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
+printf %s "checking whether $am_make supports nested variables... " >&6; }
+if test ${am_cv_make_support_nested_variables+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if printf "%s\n" 'TRUE=$(BAR$(V))
+BAR0=false
+BAR1=true
+V=1
+am__doit:
+ @$(TRUE)
+.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
+ am_cv_make_support_nested_variables=yes
+else
+ am_cv_make_support_nested_variables=no
+fi
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
+printf "%s\n" "$am_cv_make_support_nested_variables" >&6; }
+if test $am_cv_make_support_nested_variables = yes; then
+ AM_V='$(V)'
+ AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
+else
+ AM_V=$AM_DEFAULT_VERBOSITY
+ AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
+fi
+AM_BACKSLASH='\'
+
+if test "`cd $srcdir && pwd`" != "`pwd`"; then
+ # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
+ # is not polluted with repeated "-I."
+ am__isrc=' -I$(srcdir)'
+ # test to see if srcdir already configured
+ if test -f $srcdir/config.status; then
+ as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
+ fi
+fi
+
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+ if (cygpath --version) >/dev/null 2>/dev/null; then
+ CYGPATH_W='cygpath -w'
+ else
+ CYGPATH_W=echo
+ fi
+fi
+
+
+# Define the identity of the package.
+ PACKAGE='libixion'
+ VERSION='0.19.0'
+
+
+printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h
+
+
+printf "%s\n" "#define VERSION \"$VERSION\"" >>confdefs.h
+
+# Some tools Automake needs.
+
+ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
+
+
+AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
+
+
+AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
+
+
+AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
+
+
+MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
+
+# For better backward compatibility. To be removed once Automake 1.9.x
+# dies out for good. For more background, see:
+# <https://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
+# <https://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
+mkdir_p='$(MKDIR_P)'
+
+# We need awk for the "check" target (and possibly the TAP driver). The
+# system "awk" is bad on some platforms.
+# Always define AMTAR for backward compatibility. Yes, it's still used
+# in the wild :-( We should find a proper way to deprecate it ...
+AMTAR='$${TAR-tar}'
+
+
+# We'll loop over all known methods to create a tar archive until one works.
+_am_tools='gnutar pax cpio none'
+
+am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
+
+
+
+
+
+# Variables for tags utilities; see am/tags.am
+if test -z "$CTAGS"; then
+ CTAGS=ctags
+fi
+
+if test -z "$ETAGS"; then
+ ETAGS=etags
+fi
+
+if test -z "$CSCOPE"; then
+ CSCOPE=cscope
+fi
+
+
+
+# POSIX will say in a future version that running "rm -f" with no argument
+# is OK; and we want to be able to make that assumption in our Makefile
+# recipes. So use an aggressive probe to check that the usage we want is
+# actually supported "in the wild" to an acceptable degree.
+# See automake bug#10828.
+# To make any issue more visible, cause the running configure to be aborted
+# by default if the 'rm' program in use doesn't match our expectations; the
+# user can still override this though.
+if rm -f && rm -fr && rm -rf; then : OK; else
+ cat >&2 <<'END'
+Oops!
+
+Your 'rm' program seems unable to run without file operands specified
+on the command line, even when the '-f' option is present. This is contrary
+to the behaviour of most rm programs out there, and not conforming with
+the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
+
+Please tell bug-automake@gnu.org about your system, including the value
+of your $PATH and any error possibly output before this message. This
+can help us improve future automake versions.
+
+END
+ if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
+ echo 'Configuration will proceed anyway, since you have set the' >&2
+ echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
+ echo >&2
+ else
+ cat >&2 <<'END'
+Aborting the configuration process, to ensure you take notice of the issue.
+
+You can download and install GNU coreutils to get an 'rm' implementation
+that behaves properly: <https://www.gnu.org/software/coreutils/>.
+
+If you want to complete the configuration process using your problematic
+'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
+to "yes", and re-run configure.
+
+END
+ as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5
+ fi
+fi
+
+# Check whether --enable-silent-rules was given.
+if test ${enable_silent_rules+y}
+then :
+ enableval=$enable_silent_rules;
+fi
+
+case $enable_silent_rules in # (((
+ yes) AM_DEFAULT_VERBOSITY=0;;
+ no) AM_DEFAULT_VERBOSITY=1;;
+ *) AM_DEFAULT_VERBOSITY=0;;
+esac
+am_make=${MAKE-make}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
+printf %s "checking whether $am_make supports nested variables... " >&6; }
+if test ${am_cv_make_support_nested_variables+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if printf "%s\n" 'TRUE=$(BAR$(V))
+BAR0=false
+BAR1=true
+V=1
+am__doit:
+ @$(TRUE)
+.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
+ am_cv_make_support_nested_variables=yes
+else
+ am_cv_make_support_nested_variables=no
+fi
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
+printf "%s\n" "$am_cv_make_support_nested_variables" >&6; }
+if test $am_cv_make_support_nested_variables = yes; then
+ AM_V='$(V)'
+ AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
+else
+ AM_V=$AM_DEFAULT_VERBOSITY
+ AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
+fi
+AM_BACKSLASH='\'
+
+
+
+
+
+
+
+DEPDIR="${am__leading_dot}deps"
+
+ac_config_commands="$ac_config_commands depfiles"
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} supports the include directive" >&5
+printf %s "checking whether ${MAKE-make} supports the include directive... " >&6; }
+cat > confinc.mk << 'END'
+am__doit:
+ @echo this is the am__doit target >confinc.out
+.PHONY: am__doit
+END
+am__include="#"
+am__quote=
+# BSD make does it like this.
+echo '.include "confinc.mk" # ignored' > confmf.BSD
+# Other make implementations (GNU, Solaris 10, AIX) do it like this.
+echo 'include confinc.mk # ignored' > confmf.GNU
+_am_result=no
+for s in GNU BSD; do
+ { echo "$as_me:$LINENO: ${MAKE-make} -f confmf.$s && cat confinc.out" >&5
+ (${MAKE-make} -f confmf.$s && cat confinc.out) >&5 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+ case $?:`cat confinc.out 2>/dev/null` in #(
+ '0:this is the am__doit target') :
+ case $s in #(
+ BSD) :
+ am__include='.include' am__quote='"' ;; #(
+ *) :
+ am__include='include' am__quote='' ;;
+esac ;; #(
+ *) :
+ ;;
+esac
+ if test "$am__include" != "#"; then
+ _am_result="yes ($s style)"
+ break
+ fi
+done
+rm -f confinc.* confmf.*
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${_am_result}" >&5
+printf "%s\n" "${_am_result}" >&6; }
+
+# Check whether --enable-dependency-tracking was given.
+if test ${enable_dependency_tracking+y}
+then :
+ enableval=$enable_dependency_tracking;
+fi
+
+if test "x$enable_dependency_tracking" != xno; then
+ am_depcomp="$ac_aux_dir/depcomp"
+ AMDEPBACKSLASH='\'
+ am__nodep='_no'
+fi
+ if test "x$enable_dependency_tracking" != xno; then
+ AMDEP_TRUE=
+ AMDEP_FALSE='#'
+else
+ AMDEP_TRUE='#'
+ AMDEP_FALSE=
+fi
+
+
+ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+if test -z "$CXX"; then
+ if test -n "$CCC"; then
+ CXX=$CCC
+ else
+ if test -n "$ac_tool_prefix"; then
+ for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC clang++
+ do
+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_CXX+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$CXX"; then
+ ac_cv_prog_CXX="$CXX" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+CXX=$ac_cv_prog_CXX
+if test -n "$CXX"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
+printf "%s\n" "$CXX" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+ test -n "$CXX" && break
+ done
+fi
+if test -z "$CXX"; then
+ ac_ct_CXX=$CXX
+ for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC clang++
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_CXX+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$ac_ct_CXX"; then
+ ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_CXX="$ac_prog"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
+if test -n "$ac_ct_CXX"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
+printf "%s\n" "$ac_ct_CXX" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+ test -n "$ac_ct_CXX" && break
+done
+
+ if test "x$ac_ct_CXX" = x; then
+ CXX="g++"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ CXX=$ac_ct_CXX
+ fi
+fi
+
+ fi
+fi
+# Provide some information about the compiler.
+printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
+set X $ac_compile
+ac_compiler=$2
+for ac_option in --version -v -V -qversion; do
+ { { ac_try="$ac_compiler $ac_option >&5"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+printf "%s\n" "$ac_try_echo"; } >&5
+ (eval "$ac_compiler $ac_option >&5") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ sed '10a\
+... rest of stderr output deleted ...
+ 10q' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ fi
+ rm -f conftest.er1 conftest.err
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+done
+
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
+# Try to create an executable without -o first, disregard a.out.
+# It will help us diagnose broken compilers, and finding out an intuition
+# of exeext.
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C++ compiler works" >&5
+printf %s "checking whether the C++ compiler works... " >&6; }
+ac_link_default=`printf "%s\n" "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
+
+# The possible output files:
+ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
+
+ac_rmfiles=
+for ac_file in $ac_files
+do
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
+ * ) ac_rmfiles="$ac_rmfiles $ac_file";;
+ esac
+done
+rm -f $ac_rmfiles
+
+if { { ac_try="$ac_link_default"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+printf "%s\n" "$ac_try_echo"; } >&5
+ (eval "$ac_link_default") 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+then :
+ # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
+# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
+# in a Makefile. We should not override ac_cv_exeext if it was cached,
+# so that the user can short-circuit this test for compilers unknown to
+# Autoconf.
+for ac_file in $ac_files ''
+do
+ test -f "$ac_file" || continue
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
+ ;;
+ [ab].out )
+ # We found the default executable, but exeext='' is most
+ # certainly right.
+ break;;
+ *.* )
+ if test ${ac_cv_exeext+y} && test "$ac_cv_exeext" != no;
+ then :; else
+ ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+ fi
+ # We set ac_cv_exeext here because the later test for it is not
+ # safe: cross compilers may not add the suffix if given an `-o'
+ # argument, so we may need to know it at that point already.
+ # Even if this section looks crufty: it has the advantage of
+ # actually working.
+ break;;
+ * )
+ break;;
+ esac
+done
+test "$ac_cv_exeext" = no && ac_cv_exeext=
+
+else $as_nop
+ ac_file=''
+fi
+if test -z "$ac_file"
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+printf "%s\n" "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "C++ compiler cannot create executables
+See \`config.log' for more details" "$LINENO" 5; }
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C++ compiler default output file name" >&5
+printf %s "checking for C++ compiler default output file name... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
+printf "%s\n" "$ac_file" >&6; }
+ac_exeext=$ac_cv_exeext
+
+rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
+ac_clean_files=$ac_clean_files_save
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
+printf %s "checking for suffix of executables... " >&6; }
+if { { ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+printf "%s\n" "$ac_try_echo"; } >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+then :
+ # If both `conftest.exe' and `conftest' are `present' (well, observable)
+# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
+# work properly (i.e., refer to `conftest.exe'), while it won't with
+# `rm'.
+for ac_file in conftest.exe conftest conftest.*; do
+ test -f "$ac_file" || continue
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
+ *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+ break;;
+ * ) break;;
+ esac
+done
+else $as_nop
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details" "$LINENO" 5; }
+fi
+rm -f conftest conftest$ac_cv_exeext
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
+printf "%s\n" "$ac_cv_exeext" >&6; }
+
+rm -f conftest.$ac_ext
+EXEEXT=$ac_cv_exeext
+ac_exeext=$EXEEXT
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdio.h>
+int
+main (void)
+{
+FILE *f = fopen ("conftest.out", "w");
+ return ferror (f) || fclose (f) != 0;
+
+ ;
+ return 0;
+}
+_ACEOF
+ac_clean_files="$ac_clean_files conftest.out"
+# Check that the compiler produces executables we can run. If not, either
+# the compiler is broken, or we cross compile.
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
+printf %s "checking whether we are cross compiling... " >&6; }
+if test "$cross_compiling" != yes; then
+ { { ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+printf "%s\n" "$ac_try_echo"; } >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+ if { ac_try='./conftest$ac_cv_exeext'
+ { { case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+printf "%s\n" "$ac_try_echo"; } >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; }; then
+ cross_compiling=no
+ else
+ if test "$cross_compiling" = maybe; then
+ cross_compiling=yes
+ else
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "cannot run C++ compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details" "$LINENO" 5; }
+ fi
+ fi
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
+printf "%s\n" "$cross_compiling" >&6; }
+
+rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
+ac_clean_files=$ac_clean_files_save
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
+printf %s "checking for suffix of object files... " >&6; }
+if test ${ac_cv_objext+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.o conftest.obj
+if { { ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+printf "%s\n" "$ac_try_echo"; } >&5
+ (eval "$ac_compile") 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+then :
+ for ac_file in conftest.o conftest.obj conftest.*; do
+ test -f "$ac_file" || continue;
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
+ *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
+ break;;
+ esac
+done
+else $as_nop
+ printf "%s\n" "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot compute suffix of object files: cannot compile
+See \`config.log' for more details" "$LINENO" 5; }
+fi
+rm -f conftest.$ac_cv_objext conftest.$ac_ext
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
+printf "%s\n" "$ac_cv_objext" >&6; }
+OBJEXT=$ac_cv_objext
+ac_objext=$OBJEXT
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C++" >&5
+printf %s "checking whether the compiler supports GNU C++... " >&6; }
+if test ${ac_cv_cxx_compiler_gnu+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main (void)
+{
+#ifndef __GNUC__
+ choke me
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"
+then :
+ ac_compiler_gnu=yes
+else $as_nop
+ ac_compiler_gnu=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
+printf "%s\n" "$ac_cv_cxx_compiler_gnu" >&6; }
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+if test $ac_compiler_gnu = yes; then
+ GXX=yes
+else
+ GXX=
+fi
+ac_test_CXXFLAGS=${CXXFLAGS+y}
+ac_save_CXXFLAGS=$CXXFLAGS
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
+printf %s "checking whether $CXX accepts -g... " >&6; }
+if test ${ac_cv_prog_cxx_g+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_save_cxx_werror_flag=$ac_cxx_werror_flag
+ ac_cxx_werror_flag=yes
+ ac_cv_prog_cxx_g=no
+ CXXFLAGS="-g"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"
+then :
+ ac_cv_prog_cxx_g=yes
+else $as_nop
+ CXXFLAGS=""
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"
+then :
+
+else $as_nop
+ ac_cxx_werror_flag=$ac_save_cxx_werror_flag
+ CXXFLAGS="-g"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"
+then :
+ ac_cv_prog_cxx_g=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+ ac_cxx_werror_flag=$ac_save_cxx_werror_flag
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
+printf "%s\n" "$ac_cv_prog_cxx_g" >&6; }
+if test $ac_test_CXXFLAGS; then
+ CXXFLAGS=$ac_save_CXXFLAGS
+elif test $ac_cv_prog_cxx_g = yes; then
+ if test "$GXX" = yes; then
+ CXXFLAGS="-g -O2"
+ else
+ CXXFLAGS="-g"
+ fi
+else
+ if test "$GXX" = yes; then
+ CXXFLAGS="-O2"
+ else
+ CXXFLAGS=
+ fi
+fi
+ac_prog_cxx_stdcxx=no
+if test x$ac_prog_cxx_stdcxx = xno
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CXX option to enable C++11 features" >&5
+printf %s "checking for $CXX option to enable C++11 features... " >&6; }
+if test ${ac_cv_prog_cxx_11+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_cv_prog_cxx_11=no
+ac_save_CXX=$CXX
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$ac_cxx_conftest_cxx11_program
+_ACEOF
+for ac_arg in '' -std=gnu++11 -std=gnu++0x -std=c++11 -std=c++0x -qlanglvl=extended0x -AA
+do
+ CXX="$ac_save_CXX $ac_arg"
+ if ac_fn_cxx_try_compile "$LINENO"
+then :
+ ac_cv_prog_cxx_cxx11=$ac_arg
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam
+ test "x$ac_cv_prog_cxx_cxx11" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CXX=$ac_save_CXX
+fi
+
+if test "x$ac_cv_prog_cxx_cxx11" = xno
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+printf "%s\n" "unsupported" >&6; }
+else $as_nop
+ if test "x$ac_cv_prog_cxx_cxx11" = x
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+printf "%s\n" "none needed" >&6; }
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_cxx11" >&5
+printf "%s\n" "$ac_cv_prog_cxx_cxx11" >&6; }
+ CXX="$CXX $ac_cv_prog_cxx_cxx11"
+fi
+ ac_cv_prog_cxx_stdcxx=$ac_cv_prog_cxx_cxx11
+ ac_prog_cxx_stdcxx=cxx11
+fi
+fi
+if test x$ac_prog_cxx_stdcxx = xno
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CXX option to enable C++98 features" >&5
+printf %s "checking for $CXX option to enable C++98 features... " >&6; }
+if test ${ac_cv_prog_cxx_98+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_cv_prog_cxx_98=no
+ac_save_CXX=$CXX
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$ac_cxx_conftest_cxx98_program
+_ACEOF
+for ac_arg in '' -std=gnu++98 -std=c++98 -qlanglvl=extended -AA
+do
+ CXX="$ac_save_CXX $ac_arg"
+ if ac_fn_cxx_try_compile "$LINENO"
+then :
+ ac_cv_prog_cxx_cxx98=$ac_arg
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam
+ test "x$ac_cv_prog_cxx_cxx98" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CXX=$ac_save_CXX
+fi
+
+if test "x$ac_cv_prog_cxx_cxx98" = xno
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+printf "%s\n" "unsupported" >&6; }
+else $as_nop
+ if test "x$ac_cv_prog_cxx_cxx98" = x
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+printf "%s\n" "none needed" >&6; }
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_cxx98" >&5
+printf "%s\n" "$ac_cv_prog_cxx_cxx98" >&6; }
+ CXX="$CXX $ac_cv_prog_cxx_cxx98"
+fi
+ ac_cv_prog_cxx_stdcxx=$ac_cv_prog_cxx_cxx98
+ ac_prog_cxx_stdcxx=cxx98
+fi
+fi
+
+ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+depcc="$CXX" am_compiler_list=
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
+printf %s "checking dependency style of $depcc... " >&6; }
+if test ${am_cv_CXX_dependencies_compiler_type+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+ # We make a subdir and do the tests there. Otherwise we can end up
+ # making bogus files that we don't know about and never remove. For
+ # instance it was reported that on HP-UX the gcc test will end up
+ # making a dummy file named 'D' -- because '-MD' means "put the output
+ # in D".
+ rm -rf conftest.dir
+ mkdir conftest.dir
+ # Copy depcomp to subdir because otherwise we won't find it if we're
+ # using a relative directory.
+ cp "$am_depcomp" conftest.dir
+ cd conftest.dir
+ # We will build objects and dependencies in a subdirectory because
+ # it helps to detect inapplicable dependency modes. For instance
+ # both Tru64's cc and ICC support -MD to output dependencies as a
+ # side effect of compilation, but ICC will put the dependencies in
+ # the current directory while Tru64 will put them in the object
+ # directory.
+ mkdir sub
+
+ am_cv_CXX_dependencies_compiler_type=none
+ if test "$am_compiler_list" = ""; then
+ am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
+ fi
+ am__universal=false
+ case " $depcc " in #(
+ *\ -arch\ *\ -arch\ *) am__universal=true ;;
+ esac
+
+ for depmode in $am_compiler_list; do
+ # Setup a source with many dependencies, because some compilers
+ # like to wrap large dependency lists on column 80 (with \), and
+ # we should not choose a depcomp mode which is confused by this.
+ #
+ # We need to recreate these files for each test, as the compiler may
+ # overwrite some of them when testing with obscure command lines.
+ # This happens at least with the AIX C compiler.
+ : > sub/conftest.c
+ for i in 1 2 3 4 5 6; do
+ echo '#include "conftst'$i'.h"' >> sub/conftest.c
+ # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
+ # Solaris 10 /bin/sh.
+ echo '/* dummy */' > sub/conftst$i.h
+ done
+ echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+ # We check with '-c' and '-o' for the sake of the "dashmstdout"
+ # mode. It turns out that the SunPro C++ compiler does not properly
+ # handle '-M -o', and we need to detect this. Also, some Intel
+ # versions had trouble with output in subdirs.
+ am__obj=sub/conftest.${OBJEXT-o}
+ am__minus_obj="-o $am__obj"
+ case $depmode in
+ gcc)
+ # This depmode causes a compiler race in universal mode.
+ test "$am__universal" = false || continue
+ ;;
+ nosideeffect)
+ # After this tag, mechanisms are not by side-effect, so they'll
+ # only be used when explicitly requested.
+ if test "x$enable_dependency_tracking" = xyes; then
+ continue
+ else
+ break
+ fi
+ ;;
+ msvc7 | msvc7msys | msvisualcpp | msvcmsys)
+ # This compiler won't grok '-c -o', but also, the minuso test has
+ # not run yet. These depmodes are late enough in the game, and
+ # so weak that their functioning should not be impacted.
+ am__obj=conftest.${OBJEXT-o}
+ am__minus_obj=
+ ;;
+ none) break ;;
+ esac
+ if depmode=$depmode \
+ source=sub/conftest.c object=$am__obj \
+ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
+ >/dev/null 2>conftest.err &&
+ grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
+ ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+ # icc doesn't choke on unknown options, it will just issue warnings
+ # or remarks (even with -Werror). So we grep stderr for any message
+ # that says an option was ignored or not supported.
+ # When given -MP, icc 7.0 and 7.1 complain thusly:
+ # icc: Command line warning: ignoring option '-M'; no argument required
+ # The diagnosis changed in icc 8.0:
+ # icc: Command line remark: option '-MP' not supported
+ if (grep 'ignoring option' conftest.err ||
+ grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+ am_cv_CXX_dependencies_compiler_type=$depmode
+ break
+ fi
+ fi
+ done
+
+ cd ..
+ rm -rf conftest.dir
+else
+ am_cv_CXX_dependencies_compiler_type=none
+fi
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5
+printf "%s\n" "$am_cv_CXX_dependencies_compiler_type" >&6; }
+CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type
+
+ if
+ test "x$enable_dependency_tracking" != xno \
+ && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then
+ am__fastdepCXX_TRUE=
+ am__fastdepCXX_FALSE='#'
+else
+ am__fastdepCXX_TRUE='#'
+ am__fastdepCXX_FALSE=
+fi
+
+
+
+ ax_cxx_compile_alternatives="17 1z" ax_cxx_compile_cxx17_required=true
+ ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+ ac_success=no
+
+
+
+ if test x$ac_success = xno; then
+ for alternative in ${ax_cxx_compile_alternatives}; do
+ for switch in -std=c++${alternative} +std=c++${alternative} "-h std=c++${alternative}"; do
+ cachevar=`printf "%s\n" "ax_cv_cxx_compile_cxx17_$switch" | $as_tr_sh`
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++17 features with $switch" >&5
+printf %s "checking whether $CXX supports C++17 features with $switch... " >&6; }
+if eval test \${$cachevar+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_save_CXX="$CXX"
+ CXX="$CXX $switch"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+
+// If the compiler admits that it is not ready for C++11, why torture it?
+// Hopefully, this will speed up the test.
+
+#ifndef __cplusplus
+
+#error "This is not a C++ compiler"
+
+#elif __cplusplus < 201103L
+
+#error "This is not a C++11 compiler"
+
+#else
+
+namespace cxx11
+{
+
+ namespace test_static_assert
+ {
+
+ template <typename T>
+ struct check
+ {
+ static_assert(sizeof(int) <= sizeof(T), "not big enough");
+ };
+
+ }
+
+ namespace test_final_override
+ {
+
+ struct Base
+ {
+ virtual ~Base() {}
+ virtual void f() {}
+ };
+
+ struct Derived : public Base
+ {
+ virtual ~Derived() override {}
+ virtual void f() override {}
+ };
+
+ }
+
+ namespace test_double_right_angle_brackets
+ {
+
+ template < typename T >
+ struct check {};
+
+ typedef check<void> single_type;
+ typedef check<check<void>> double_type;
+ typedef check<check<check<void>>> triple_type;
+ typedef check<check<check<check<void>>>> quadruple_type;
+
+ }
+
+ namespace test_decltype
+ {
+
+ int
+ f()
+ {
+ int a = 1;
+ decltype(a) b = 2;
+ return a + b;
+ }
+
+ }
+
+ namespace test_type_deduction
+ {
+
+ template < typename T1, typename T2 >
+ struct is_same
+ {
+ static const bool value = false;
+ };
+
+ template < typename T >
+ struct is_same<T, T>
+ {
+ static const bool value = true;
+ };
+
+ template < typename T1, typename T2 >
+ auto
+ add(T1 a1, T2 a2) -> decltype(a1 + a2)
+ {
+ return a1 + a2;
+ }
+
+ int
+ test(const int c, volatile int v)
+ {
+ static_assert(is_same<int, decltype(0)>::value == true, "");
+ static_assert(is_same<int, decltype(c)>::value == false, "");
+ static_assert(is_same<int, decltype(v)>::value == false, "");
+ auto ac = c;
+ auto av = v;
+ auto sumi = ac + av + 'x';
+ auto sumf = ac + av + 1.0;
+ static_assert(is_same<int, decltype(ac)>::value == true, "");
+ static_assert(is_same<int, decltype(av)>::value == true, "");
+ static_assert(is_same<int, decltype(sumi)>::value == true, "");
+ static_assert(is_same<int, decltype(sumf)>::value == false, "");
+ static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
+ return (sumf > 0.0) ? sumi : add(c, v);
+ }
+
+ }
+
+ namespace test_noexcept
+ {
+
+ int f() { return 0; }
+ int g() noexcept { return 0; }
+
+ static_assert(noexcept(f()) == false, "");
+ static_assert(noexcept(g()) == true, "");
+
+ }
+
+ namespace test_constexpr
+ {
+
+ template < typename CharT >
+ unsigned long constexpr
+ strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
+ {
+ return *s ? strlen_c_r(s + 1, acc + 1) : acc;
+ }
+
+ template < typename CharT >
+ unsigned long constexpr
+ strlen_c(const CharT *const s) noexcept
+ {
+ return strlen_c_r(s, 0UL);
+ }
+
+ static_assert(strlen_c("") == 0UL, "");
+ static_assert(strlen_c("1") == 1UL, "");
+ static_assert(strlen_c("example") == 7UL, "");
+ static_assert(strlen_c("another\0example") == 7UL, "");
+
+ }
+
+ namespace test_rvalue_references
+ {
+
+ template < int N >
+ struct answer
+ {
+ static constexpr int value = N;
+ };
+
+ answer<1> f(int&) { return answer<1>(); }
+ answer<2> f(const int&) { return answer<2>(); }
+ answer<3> f(int&&) { return answer<3>(); }
+
+ void
+ test()
+ {
+ int i = 0;
+ const int c = 0;
+ static_assert(decltype(f(i))::value == 1, "");
+ static_assert(decltype(f(c))::value == 2, "");
+ static_assert(decltype(f(0))::value == 3, "");
+ }
+
+ }
+
+ namespace test_uniform_initialization
+ {
+
+ struct test
+ {
+ static const int zero {};
+ static const int one {1};
+ };
+
+ static_assert(test::zero == 0, "");
+ static_assert(test::one == 1, "");
+
+ }
+
+ namespace test_lambdas
+ {
+
+ void
+ test1()
+ {
+ auto lambda1 = [](){};
+ auto lambda2 = lambda1;
+ lambda1();
+ lambda2();
+ }
+
+ int
+ test2()
+ {
+ auto a = [](int i, int j){ return i + j; }(1, 2);
+ auto b = []() -> int { return '0'; }();
+ auto c = [=](){ return a + b; }();
+ auto d = [&](){ return c; }();
+ auto e = [a, &b](int x) mutable {
+ const auto identity = [](int y){ return y; };
+ for (auto i = 0; i < a; ++i)
+ a += b--;
+ return x + identity(a + b);
+ }(0);
+ return a + b + c + d + e;
+ }
+
+ int
+ test3()
+ {
+ const auto nullary = [](){ return 0; };
+ const auto unary = [](int x){ return x; };
+ using nullary_t = decltype(nullary);
+ using unary_t = decltype(unary);
+ const auto higher1st = [](nullary_t f){ return f(); };
+ const auto higher2nd = [unary](nullary_t f1){
+ return [unary, f1](unary_t f2){ return f2(unary(f1())); };
+ };
+ return higher1st(nullary) + higher2nd(nullary)(unary);
+ }
+
+ }
+
+ namespace test_variadic_templates
+ {
+
+ template <int...>
+ struct sum;
+
+ template <int N0, int... N1toN>
+ struct sum<N0, N1toN...>
+ {
+ static constexpr auto value = N0 + sum<N1toN...>::value;
+ };
+
+ template <>
+ struct sum<>
+ {
+ static constexpr auto value = 0;
+ };
+
+ static_assert(sum<>::value == 0, "");
+ static_assert(sum<1>::value == 1, "");
+ static_assert(sum<23>::value == 23, "");
+ static_assert(sum<1, 2>::value == 3, "");
+ static_assert(sum<5, 5, 11>::value == 21, "");
+ static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
+
+ }
+
+ // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
+ // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
+ // because of this.
+ namespace test_template_alias_sfinae
+ {
+
+ struct foo {};
+
+ template<typename T>
+ using member = typename T::member_type;
+
+ template<typename T>
+ void func(...) {}
+
+ template<typename T>
+ void func(member<T>*) {}
+
+ void test();
+
+ void test() { func<foo>(0); }
+
+ }
+
+} // namespace cxx11
+
+#endif // __cplusplus >= 201103L
+
+
+
+
+// If the compiler admits that it is not ready for C++14, why torture it?
+// Hopefully, this will speed up the test.
+
+#ifndef __cplusplus
+
+#error "This is not a C++ compiler"
+
+#elif __cplusplus < 201402L
+
+#error "This is not a C++14 compiler"
+
+#else
+
+namespace cxx14
+{
+
+ namespace test_polymorphic_lambdas
+ {
+
+ int
+ test()
+ {
+ const auto lambda = [](auto&&... args){
+ const auto istiny = [](auto x){
+ return (sizeof(x) == 1UL) ? 1 : 0;
+ };
+ const int aretiny[] = { istiny(args)... };
+ return aretiny[0];
+ };
+ return lambda(1, 1L, 1.0f, '1');
+ }
+
+ }
+
+ namespace test_binary_literals
+ {
+
+ constexpr auto ivii = 0b0000000000101010;
+ static_assert(ivii == 42, "wrong value");
+
+ }
+
+ namespace test_generalized_constexpr
+ {
+
+ template < typename CharT >
+ constexpr unsigned long
+ strlen_c(const CharT *const s) noexcept
+ {
+ auto length = 0UL;
+ for (auto p = s; *p; ++p)
+ ++length;
+ return length;
+ }
+
+ static_assert(strlen_c("") == 0UL, "");
+ static_assert(strlen_c("x") == 1UL, "");
+ static_assert(strlen_c("test") == 4UL, "");
+ static_assert(strlen_c("another\0test") == 7UL, "");
+
+ }
+
+ namespace test_lambda_init_capture
+ {
+
+ int
+ test()
+ {
+ auto x = 0;
+ const auto lambda1 = [a = x](int b){ return a + b; };
+ const auto lambda2 = [a = lambda1(x)](){ return a; };
+ return lambda2();
+ }
+
+ }
+
+ namespace test_digit_separators
+ {
+
+ constexpr auto ten_million = 100'000'000;
+ static_assert(ten_million == 100000000, "");
+
+ }
+
+ namespace test_return_type_deduction
+ {
+
+ auto f(int& x) { return x; }
+ decltype(auto) g(int& x) { return x; }
+
+ template < typename T1, typename T2 >
+ struct is_same
+ {
+ static constexpr auto value = false;
+ };
+
+ template < typename T >
+ struct is_same<T, T>
+ {
+ static constexpr auto value = true;
+ };
+
+ int
+ test()
+ {
+ auto x = 0;
+ static_assert(is_same<int, decltype(f(x))>::value, "");
+ static_assert(is_same<int&, decltype(g(x))>::value, "");
+ return x;
+ }
+
+ }
+
+} // namespace cxx14
+
+#endif // __cplusplus >= 201402L
+
+
+
+
+// If the compiler admits that it is not ready for C++17, why torture it?
+// Hopefully, this will speed up the test.
+
+#ifndef __cplusplus
+
+#error "This is not a C++ compiler"
+
+#elif __cplusplus < 201703L
+
+#error "This is not a C++17 compiler"
+
+#else
+
+#include <initializer_list>
+#include <utility>
+#include <type_traits>
+
+namespace cxx17
+{
+
+ namespace test_constexpr_lambdas
+ {
+
+ constexpr int foo = [](){return 42;}();
+
+ }
+
+ namespace test::nested_namespace::definitions
+ {
+
+ }
+
+ namespace test_fold_expression
+ {
+
+ template<typename... Args>
+ int multiply(Args... args)
+ {
+ return (args * ... * 1);
+ }
+
+ template<typename... Args>
+ bool all(Args... args)
+ {
+ return (args && ...);
+ }
+
+ }
+
+ namespace test_extended_static_assert
+ {
+
+ static_assert (true);
+
+ }
+
+ namespace test_auto_brace_init_list
+ {
+
+ auto foo = {5};
+ auto bar {5};
+
+ static_assert(std::is_same<std::initializer_list<int>, decltype(foo)>::value);
+ static_assert(std::is_same<int, decltype(bar)>::value);
+ }
+
+ namespace test_typename_in_template_template_parameter
+ {
+
+ template<template<typename> typename X> struct D;
+
+ }
+
+ namespace test_fallthrough_nodiscard_maybe_unused_attributes
+ {
+
+ int f1()
+ {
+ return 42;
+ }
+
+ [[nodiscard]] int f2()
+ {
+ [[maybe_unused]] auto unused = f1();
+
+ switch (f1())
+ {
+ case 17:
+ f1();
+ [[fallthrough]];
+ case 42:
+ f1();
+ }
+ return f1();
+ }
+
+ }
+
+ namespace test_extended_aggregate_initialization
+ {
+
+ struct base1
+ {
+ int b1, b2 = 42;
+ };
+
+ struct base2
+ {
+ base2() {
+ b3 = 42;
+ }
+ int b3;
+ };
+
+ struct derived : base1, base2
+ {
+ int d;
+ };
+
+ derived d1 {{1, 2}, {}, 4}; // full initialization
+ derived d2 {{}, {}, 4}; // value-initialized bases
+
+ }
+
+ namespace test_general_range_based_for_loop
+ {
+
+ struct iter
+ {
+ int i;
+
+ int& operator* ()
+ {
+ return i;
+ }
+
+ const int& operator* () const
+ {
+ return i;
+ }
+
+ iter& operator++()
+ {
+ ++i;
+ return *this;
+ }
+ };
+
+ struct sentinel
+ {
+ int i;
+ };
+
+ bool operator== (const iter& i, const sentinel& s)
+ {
+ return i.i == s.i;
+ }
+
+ bool operator!= (const iter& i, const sentinel& s)
+ {
+ return !(i == s);
+ }
+
+ struct range
+ {
+ iter begin() const
+ {
+ return {0};
+ }
+
+ sentinel end() const
+ {
+ return {5};
+ }
+ };
+
+ void f()
+ {
+ range r {};
+
+ for (auto i : r)
+ {
+ [[maybe_unused]] auto v = i;
+ }
+ }
+
+ }
+
+ namespace test_lambda_capture_asterisk_this_by_value
+ {
+
+ struct t
+ {
+ int i;
+ int foo()
+ {
+ return [*this]()
+ {
+ return i;
+ }();
+ }
+ };
+
+ }
+
+ namespace test_enum_class_construction
+ {
+
+ enum class byte : unsigned char
+ {};
+
+ byte foo {42};
+
+ }
+
+ namespace test_constexpr_if
+ {
+
+ template <bool cond>
+ int f ()
+ {
+ if constexpr(cond)
+ {
+ return 13;
+ }
+ else
+ {
+ return 42;
+ }
+ }
+
+ }
+
+ namespace test_selection_statement_with_initializer
+ {
+
+ int f()
+ {
+ return 13;
+ }
+
+ int f2()
+ {
+ if (auto i = f(); i > 0)
+ {
+ return 3;
+ }
+
+ switch (auto i = f(); i + 4)
+ {
+ case 17:
+ return 2;
+
+ default:
+ return 1;
+ }
+ }
+
+ }
+
+ namespace test_template_argument_deduction_for_class_templates
+ {
+
+ template <typename T1, typename T2>
+ struct pair
+ {
+ pair (T1 p1, T2 p2)
+ : m1 {p1},
+ m2 {p2}
+ {}
+
+ T1 m1;
+ T2 m2;
+ };
+
+ void f()
+ {
+ [[maybe_unused]] auto p = pair{13, 42u};
+ }
+
+ }
+
+ namespace test_non_type_auto_template_parameters
+ {
+
+ template <auto n>
+ struct B
+ {};
+
+ B<5> b1;
+ B<'a'> b2;
+
+ }
+
+ namespace test_structured_bindings
+ {
+
+ int arr[2] = { 1, 2 };
+ std::pair<int, int> pr = { 1, 2 };
+
+ auto f1() -> int(&)[2]
+ {
+ return arr;
+ }
+
+ auto f2() -> std::pair<int, int>&
+ {
+ return pr;
+ }
+
+ struct S
+ {
+ int x1 : 2;
+ volatile double y1;
+ };
+
+ S f3()
+ {
+ return {};
+ }
+
+ auto [ x1, y1 ] = f1();
+ auto& [ xr1, yr1 ] = f1();
+ auto [ x2, y2 ] = f2();
+ auto& [ xr2, yr2 ] = f2();
+ const auto [ x3, y3 ] = f3();
+
+ }
+
+ namespace test_exception_spec_type_system
+ {
+
+ struct Good {};
+ struct Bad {};
+
+ void g1() noexcept;
+ void g2();
+
+ template<typename T>
+ Bad
+ f(T*, T*);
+
+ template<typename T1, typename T2>
+ Good
+ f(T1*, T2*);
+
+ static_assert (std::is_same_v<Good, decltype(f(g1, g2))>);
+
+ }
+
+ namespace test_inline_variables
+ {
+
+ template<class T> void f(T)
+ {}
+
+ template<class T> inline T g(T)
+ {
+ return T{};
+ }
+
+ template<> inline void f<>(int)
+ {}
+
+ template<> int g<>(int)
+ {
+ return 5;
+ }
+
+ }
+
+} // namespace cxx17
+
+#endif // __cplusplus < 201703L
+
+
+
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"
+then :
+ eval $cachevar=yes
+else $as_nop
+ eval $cachevar=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+ CXX="$ac_save_CXX"
+fi
+eval ac_res=\$$cachevar
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+printf "%s\n" "$ac_res" >&6; }
+ if eval test x\$$cachevar = xyes; then
+ CXX="$CXX $switch"
+ if test -n "$CXXCPP" ; then
+ CXXCPP="$CXXCPP $switch"
+ fi
+ ac_success=yes
+ break
+ fi
+ done
+ if test x$ac_success = xyes; then
+ break
+ fi
+ done
+ fi
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+ if test x$ax_cxx_compile_cxx17_required = xtrue; then
+ if test x$ac_success = xno; then
+ as_fn_error $? "*** A compiler with support for C++17 language features is required." "$LINENO" 5
+ fi
+ fi
+ if test x$ac_success = xno; then
+ HAVE_CXX17=0
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: No compiler with C++17 support was found" >&5
+printf "%s\n" "$as_me: No compiler with C++17 support was found" >&6;}
+ else
+ HAVE_CXX17=1
+
+printf "%s\n" "#define HAVE_CXX17 1" >>confdefs.h
+
+ fi
+
+
+CXXFLAGS="$CXXFLAGS -fvisibility=hidden -Wall -Wshadow -Wno-write-strings -pthread"
+
+
+
+ # Make sure we can run config.sub.
+$SHELL "${ac_aux_dir}config.sub" sun4 >/dev/null 2>&1 ||
+ as_fn_error $? "cannot run $SHELL ${ac_aux_dir}config.sub" "$LINENO" 5
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
+printf %s "checking build system type... " >&6; }
+if test ${ac_cv_build+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_build_alias=$build_alias
+test "x$ac_build_alias" = x &&
+ ac_build_alias=`$SHELL "${ac_aux_dir}config.guess"`
+test "x$ac_build_alias" = x &&
+ as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
+ac_cv_build=`$SHELL "${ac_aux_dir}config.sub" $ac_build_alias` ||
+ as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $ac_build_alias failed" "$LINENO" 5
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
+printf "%s\n" "$ac_cv_build" >&6; }
+case $ac_cv_build in
+*-*-*) ;;
+*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
+esac
+build=$ac_cv_build
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_build
+shift
+build_cpu=$1
+build_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+build_os=$*
+IFS=$ac_save_IFS
+case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
+
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
+printf %s "checking host system type... " >&6; }
+if test ${ac_cv_host+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test "x$host_alias" = x; then
+ ac_cv_host=$ac_cv_build
+else
+ ac_cv_host=`$SHELL "${ac_aux_dir}config.sub" $host_alias` ||
+ as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $host_alias failed" "$LINENO" 5
+fi
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
+printf "%s\n" "$ac_cv_host" >&6; }
+case $ac_cv_host in
+*-*-*) ;;
+*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
+esac
+host=$ac_cv_host
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_host
+shift
+host_cpu=$1
+host_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+host_os=$*
+IFS=$ac_save_IFS
+case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
+
+
+
+case $host_os in
+ darwin*)
+ _os=Darwin
+ LDFLAGS="$LDFLAGS -L/usr/local/lib"
+ ;;
+ *)
+ _os=
+ LDFLAGS="$LDFLAGS -Wl,--no-as-needed -pthread -ldl"
+ ;;
+esac
+
+# =====================
+# Development Utilities
+# =====================
+# Check whether --enable-debug-utils was given.
+if test ${enable_debug_utils+y}
+then :
+ enableval=$enable_debug_utils; enable_debug_utils="$enableval"
+else $as_nop
+ enable_debug_utils=no
+
+fi
+
+
+# Check whether --enable-python was given.
+if test ${enable_python+y}
+then :
+ enableval=$enable_python; enable_python="$enableval"
+else $as_nop
+ enable_python=yes
+
+fi
+
+
+# Check whether --enable-threads was given.
+if test ${enable_threads+y}
+then :
+ enableval=$enable_threads; enable_threads="$enableval"
+else $as_nop
+ enable_threads=yes
+
+fi
+
+
+# Check whether --enable-vulkan was given.
+if test ${enable_vulkan+y}
+then :
+ enableval=$enable_vulkan; enable_vulkan="$enableval"
+else $as_nop
+ enable_vulkan=no
+
+fi
+
+
+IXION_VERSION=0.19.0
+IXION_API_VERSION=0.18
+IXION_MAJOR_VERSION=0
+IXION_MINOR_VERSION=19
+IXION_MICRO_VERSION=0
+IXION_MAJOR_API_VERSION=0
+IXION_MINOR_API_VERSION=18
+
+
+
+
+
+
+
+
+
+
+
+
+for top_builddir in . .. ../.. $ac_auxdir $ac_auxdir/..; do
+ test -f $top_builddir/configure && break
+done
+
+
+# Checks for programs.
+ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+if test -z "$CXX"; then
+ if test -n "$CCC"; then
+ CXX=$CCC
+ else
+ if test -n "$ac_tool_prefix"; then
+ for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC clang++
+ do
+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_CXX+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$CXX"; then
+ ac_cv_prog_CXX="$CXX" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+CXX=$ac_cv_prog_CXX
+if test -n "$CXX"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
+printf "%s\n" "$CXX" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+ test -n "$CXX" && break
+ done
+fi
+if test -z "$CXX"; then
+ ac_ct_CXX=$CXX
+ for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC clang++
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_CXX+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$ac_ct_CXX"; then
+ ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_CXX="$ac_prog"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
+if test -n "$ac_ct_CXX"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
+printf "%s\n" "$ac_ct_CXX" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+ test -n "$ac_ct_CXX" && break
+done
+
+ if test "x$ac_ct_CXX" = x; then
+ CXX="g++"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ CXX=$ac_ct_CXX
+ fi
+fi
+
+ fi
+fi
+# Provide some information about the compiler.
+printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
+set X $ac_compile
+ac_compiler=$2
+for ac_option in --version -v -V -qversion; do
+ { { ac_try="$ac_compiler $ac_option >&5"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+printf "%s\n" "$ac_try_echo"; } >&5
+ (eval "$ac_compiler $ac_option >&5") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ sed '10a\
+... rest of stderr output deleted ...
+ 10q' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ fi
+ rm -f conftest.er1 conftest.err
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+done
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C++" >&5
+printf %s "checking whether the compiler supports GNU C++... " >&6; }
+if test ${ac_cv_cxx_compiler_gnu+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main (void)
+{
+#ifndef __GNUC__
+ choke me
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"
+then :
+ ac_compiler_gnu=yes
+else $as_nop
+ ac_compiler_gnu=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
+printf "%s\n" "$ac_cv_cxx_compiler_gnu" >&6; }
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+if test $ac_compiler_gnu = yes; then
+ GXX=yes
+else
+ GXX=
+fi
+ac_test_CXXFLAGS=${CXXFLAGS+y}
+ac_save_CXXFLAGS=$CXXFLAGS
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
+printf %s "checking whether $CXX accepts -g... " >&6; }
+if test ${ac_cv_prog_cxx_g+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_save_cxx_werror_flag=$ac_cxx_werror_flag
+ ac_cxx_werror_flag=yes
+ ac_cv_prog_cxx_g=no
+ CXXFLAGS="-g"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"
+then :
+ ac_cv_prog_cxx_g=yes
+else $as_nop
+ CXXFLAGS=""
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"
+then :
+
+else $as_nop
+ ac_cxx_werror_flag=$ac_save_cxx_werror_flag
+ CXXFLAGS="-g"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"
+then :
+ ac_cv_prog_cxx_g=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+ ac_cxx_werror_flag=$ac_save_cxx_werror_flag
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
+printf "%s\n" "$ac_cv_prog_cxx_g" >&6; }
+if test $ac_test_CXXFLAGS; then
+ CXXFLAGS=$ac_save_CXXFLAGS
+elif test $ac_cv_prog_cxx_g = yes; then
+ if test "$GXX" = yes; then
+ CXXFLAGS="-g -O2"
+ else
+ CXXFLAGS="-g"
+ fi
+else
+ if test "$GXX" = yes; then
+ CXXFLAGS="-O2"
+ else
+ CXXFLAGS=
+ fi
+fi
+ac_prog_cxx_stdcxx=no
+if test x$ac_prog_cxx_stdcxx = xno
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CXX option to enable C++11 features" >&5
+printf %s "checking for $CXX option to enable C++11 features... " >&6; }
+if test ${ac_cv_prog_cxx_11+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_cv_prog_cxx_11=no
+ac_save_CXX=$CXX
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$ac_cxx_conftest_cxx11_program
+_ACEOF
+for ac_arg in '' -std=gnu++11 -std=gnu++0x -std=c++11 -std=c++0x -qlanglvl=extended0x -AA
+do
+ CXX="$ac_save_CXX $ac_arg"
+ if ac_fn_cxx_try_compile "$LINENO"
+then :
+ ac_cv_prog_cxx_cxx11=$ac_arg
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam
+ test "x$ac_cv_prog_cxx_cxx11" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CXX=$ac_save_CXX
+fi
+
+if test "x$ac_cv_prog_cxx_cxx11" = xno
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+printf "%s\n" "unsupported" >&6; }
+else $as_nop
+ if test "x$ac_cv_prog_cxx_cxx11" = x
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+printf "%s\n" "none needed" >&6; }
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_cxx11" >&5
+printf "%s\n" "$ac_cv_prog_cxx_cxx11" >&6; }
+ CXX="$CXX $ac_cv_prog_cxx_cxx11"
+fi
+ ac_cv_prog_cxx_stdcxx=$ac_cv_prog_cxx_cxx11
+ ac_prog_cxx_stdcxx=cxx11
+fi
+fi
+if test x$ac_prog_cxx_stdcxx = xno
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CXX option to enable C++98 features" >&5
+printf %s "checking for $CXX option to enable C++98 features... " >&6; }
+if test ${ac_cv_prog_cxx_98+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_cv_prog_cxx_98=no
+ac_save_CXX=$CXX
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$ac_cxx_conftest_cxx98_program
+_ACEOF
+for ac_arg in '' -std=gnu++98 -std=c++98 -qlanglvl=extended -AA
+do
+ CXX="$ac_save_CXX $ac_arg"
+ if ac_fn_cxx_try_compile "$LINENO"
+then :
+ ac_cv_prog_cxx_cxx98=$ac_arg
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam
+ test "x$ac_cv_prog_cxx_cxx98" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CXX=$ac_save_CXX
+fi
+
+if test "x$ac_cv_prog_cxx_cxx98" = xno
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+printf "%s\n" "unsupported" >&6; }
+else $as_nop
+ if test "x$ac_cv_prog_cxx_cxx98" = x
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+printf "%s\n" "none needed" >&6; }
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_cxx98" >&5
+printf "%s\n" "$ac_cv_prog_cxx_cxx98" >&6; }
+ CXX="$CXX $ac_cv_prog_cxx_cxx98"
+fi
+ ac_cv_prog_cxx_stdcxx=$ac_cv_prog_cxx_cxx98
+ ac_prog_cxx_stdcxx=cxx98
+fi
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+depcc="$CXX" am_compiler_list=
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
+printf %s "checking dependency style of $depcc... " >&6; }
+if test ${am_cv_CXX_dependencies_compiler_type+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+ # We make a subdir and do the tests there. Otherwise we can end up
+ # making bogus files that we don't know about and never remove. For
+ # instance it was reported that on HP-UX the gcc test will end up
+ # making a dummy file named 'D' -- because '-MD' means "put the output
+ # in D".
+ rm -rf conftest.dir
+ mkdir conftest.dir
+ # Copy depcomp to subdir because otherwise we won't find it if we're
+ # using a relative directory.
+ cp "$am_depcomp" conftest.dir
+ cd conftest.dir
+ # We will build objects and dependencies in a subdirectory because
+ # it helps to detect inapplicable dependency modes. For instance
+ # both Tru64's cc and ICC support -MD to output dependencies as a
+ # side effect of compilation, but ICC will put the dependencies in
+ # the current directory while Tru64 will put them in the object
+ # directory.
+ mkdir sub
+
+ am_cv_CXX_dependencies_compiler_type=none
+ if test "$am_compiler_list" = ""; then
+ am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
+ fi
+ am__universal=false
+ case " $depcc " in #(
+ *\ -arch\ *\ -arch\ *) am__universal=true ;;
+ esac
+
+ for depmode in $am_compiler_list; do
+ # Setup a source with many dependencies, because some compilers
+ # like to wrap large dependency lists on column 80 (with \), and
+ # we should not choose a depcomp mode which is confused by this.
+ #
+ # We need to recreate these files for each test, as the compiler may
+ # overwrite some of them when testing with obscure command lines.
+ # This happens at least with the AIX C compiler.
+ : > sub/conftest.c
+ for i in 1 2 3 4 5 6; do
+ echo '#include "conftst'$i'.h"' >> sub/conftest.c
+ # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
+ # Solaris 10 /bin/sh.
+ echo '/* dummy */' > sub/conftst$i.h
+ done
+ echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+ # We check with '-c' and '-o' for the sake of the "dashmstdout"
+ # mode. It turns out that the SunPro C++ compiler does not properly
+ # handle '-M -o', and we need to detect this. Also, some Intel
+ # versions had trouble with output in subdirs.
+ am__obj=sub/conftest.${OBJEXT-o}
+ am__minus_obj="-o $am__obj"
+ case $depmode in
+ gcc)
+ # This depmode causes a compiler race in universal mode.
+ test "$am__universal" = false || continue
+ ;;
+ nosideeffect)
+ # After this tag, mechanisms are not by side-effect, so they'll
+ # only be used when explicitly requested.
+ if test "x$enable_dependency_tracking" = xyes; then
+ continue
+ else
+ break
+ fi
+ ;;
+ msvc7 | msvc7msys | msvisualcpp | msvcmsys)
+ # This compiler won't grok '-c -o', but also, the minuso test has
+ # not run yet. These depmodes are late enough in the game, and
+ # so weak that their functioning should not be impacted.
+ am__obj=conftest.${OBJEXT-o}
+ am__minus_obj=
+ ;;
+ none) break ;;
+ esac
+ if depmode=$depmode \
+ source=sub/conftest.c object=$am__obj \
+ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
+ >/dev/null 2>conftest.err &&
+ grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
+ ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+ # icc doesn't choke on unknown options, it will just issue warnings
+ # or remarks (even with -Werror). So we grep stderr for any message
+ # that says an option was ignored or not supported.
+ # When given -MP, icc 7.0 and 7.1 complain thusly:
+ # icc: Command line warning: ignoring option '-M'; no argument required
+ # The diagnosis changed in icc 8.0:
+ # icc: Command line remark: option '-MP' not supported
+ if (grep 'ignoring option' conftest.err ||
+ grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+ am_cv_CXX_dependencies_compiler_type=$depmode
+ break
+ fi
+ fi
+ done
+
+ cd ..
+ rm -rf conftest.dir
+else
+ am_cv_CXX_dependencies_compiler_type=none
+fi
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5
+printf "%s\n" "$am_cv_CXX_dependencies_compiler_type" >&6; }
+CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type
+
+ if
+ test "x$enable_dependency_tracking" != xno \
+ && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then
+ am__fastdepCXX_TRUE=
+ am__fastdepCXX_FALSE='#'
+else
+ am__fastdepCXX_TRUE='#'
+ am__fastdepCXX_FALSE=
+fi
+
+
+case `pwd` in
+ *\ * | *\ *)
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5
+printf "%s\n" "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;;
+esac
+
+
+
+macro_version='2.4.6'
+macro_revision='2.4.6'
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ltmain=$ac_aux_dir/ltmain.sh
+
+# Backslashify metacharacters that are still active within
+# double-quoted strings.
+sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
+
+# Same as above, but do not quote variable references.
+double_quote_subst='s/\(["`\\]\)/\\\1/g'
+
+# Sed substitution to delay expansion of an escaped shell variable in a
+# double_quote_subst'ed string.
+delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
+
+# Sed substitution to delay expansion of an escaped single quote.
+delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
+
+# Sed substitution to avoid accidental globbing in evaled expressions
+no_glob_subst='s/\*/\\\*/g'
+
+ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
+ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5
+printf %s "checking how to print strings... " >&6; }
+# Test print first, because it will be a builtin if present.
+if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
+ test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
+ ECHO='print -r --'
+elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
+ ECHO='printf %s\n'
+else
+ # Use this function as a fallback that always works.
+ func_fallback_echo ()
+ {
+ eval 'cat <<_LTECHO_EOF
+$1
+_LTECHO_EOF'
+ }
+ ECHO='func_fallback_echo'
+fi
+
+# func_echo_all arg...
+# Invoke $ECHO with all args, space-separated.
+func_echo_all ()
+{
+ $ECHO ""
+}
+
+case $ECHO in
+ printf*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: printf" >&5
+printf "%s\n" "printf" >&6; } ;;
+ print*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: print -r" >&5
+printf "%s\n" "print -r" >&6; } ;;
+ *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: cat" >&5
+printf "%s\n" "cat" >&6; } ;;
+esac
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}gcc; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_CC+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="${ac_tool_prefix}gcc"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+printf "%s\n" "$CC" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_CC"; then
+ ac_ct_CC=$CC
+ # Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_CC+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_CC="gcc"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+printf "%s\n" "$ac_ct_CC" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+ if test "x$ac_ct_CC" = x; then
+ CC=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ CC=$ac_ct_CC
+ fi
+else
+ CC="$ac_cv_prog_CC"
+fi
+
+if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}cc; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_CC+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="${ac_tool_prefix}cc"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+printf "%s\n" "$CC" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+ fi
+fi
+if test -z "$CC"; then
+ # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_CC+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+ ac_prog_rejected=no
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ if test "$as_dir$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
+ ac_prog_rejected=yes
+ continue
+ fi
+ ac_cv_prog_CC="cc"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+if test $ac_prog_rejected = yes; then
+ # We found a bogon in the path, so make sure we never use it.
+ set dummy $ac_cv_prog_CC
+ shift
+ if test $# != 0; then
+ # We chose a different compiler from the bogus one.
+ # However, it has the same basename, so the bogon will be chosen
+ # first if we set CC to just the basename; use the full file name.
+ shift
+ ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@"
+ fi
+fi
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+printf "%s\n" "$CC" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+fi
+if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+ for ac_prog in cl.exe
+ do
+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_CC+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+printf "%s\n" "$CC" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+ test -n "$CC" && break
+ done
+fi
+if test -z "$CC"; then
+ ac_ct_CC=$CC
+ for ac_prog in cl.exe
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_CC+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_CC="$ac_prog"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+printf "%s\n" "$ac_ct_CC" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+ test -n "$ac_ct_CC" && break
+done
+
+ if test "x$ac_ct_CC" = x; then
+ CC=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ CC=$ac_ct_CC
+ fi
+fi
+
+fi
+if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args.
+set dummy ${ac_tool_prefix}clang; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_CC+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="${ac_tool_prefix}clang"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+printf "%s\n" "$CC" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_CC"; then
+ ac_ct_CC=$CC
+ # Extract the first word of "clang", so it can be a program name with args.
+set dummy clang; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_CC+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_CC="clang"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+printf "%s\n" "$ac_ct_CC" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+ if test "x$ac_ct_CC" = x; then
+ CC=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ CC=$ac_ct_CC
+ fi
+else
+ CC="$ac_cv_prog_CC"
+fi
+
+fi
+
+
+test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "no acceptable C compiler found in \$PATH
+See \`config.log' for more details" "$LINENO" 5; }
+
+# Provide some information about the compiler.
+printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
+set X $ac_compile
+ac_compiler=$2
+for ac_option in --version -v -V -qversion -version; do
+ { { ac_try="$ac_compiler $ac_option >&5"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+printf "%s\n" "$ac_try_echo"; } >&5
+ (eval "$ac_compiler $ac_option >&5") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ sed '10a\
+... rest of stderr output deleted ...
+ 10q' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ fi
+ rm -f conftest.er1 conftest.err
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+done
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5
+printf %s "checking whether the compiler supports GNU C... " >&6; }
+if test ${ac_cv_c_compiler_gnu+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main (void)
+{
+#ifndef __GNUC__
+ choke me
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ ac_compiler_gnu=yes
+else $as_nop
+ ac_compiler_gnu=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+ac_cv_c_compiler_gnu=$ac_compiler_gnu
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
+printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; }
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+if test $ac_compiler_gnu = yes; then
+ GCC=yes
+else
+ GCC=
+fi
+ac_test_CFLAGS=${CFLAGS+y}
+ac_save_CFLAGS=$CFLAGS
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
+printf %s "checking whether $CC accepts -g... " >&6; }
+if test ${ac_cv_prog_cc_g+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_save_c_werror_flag=$ac_c_werror_flag
+ ac_c_werror_flag=yes
+ ac_cv_prog_cc_g=no
+ CFLAGS="-g"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ ac_cv_prog_cc_g=yes
+else $as_nop
+ CFLAGS=""
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+
+else $as_nop
+ ac_c_werror_flag=$ac_save_c_werror_flag
+ CFLAGS="-g"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ ac_cv_prog_cc_g=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+ ac_c_werror_flag=$ac_save_c_werror_flag
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
+printf "%s\n" "$ac_cv_prog_cc_g" >&6; }
+if test $ac_test_CFLAGS; then
+ CFLAGS=$ac_save_CFLAGS
+elif test $ac_cv_prog_cc_g = yes; then
+ if test "$GCC" = yes; then
+ CFLAGS="-g -O2"
+ else
+ CFLAGS="-g"
+ fi
+else
+ if test "$GCC" = yes; then
+ CFLAGS="-O2"
+ else
+ CFLAGS=
+ fi
+fi
+ac_prog_cc_stdc=no
+if test x$ac_prog_cc_stdc = xno
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5
+printf %s "checking for $CC option to enable C11 features... " >&6; }
+if test ${ac_cv_prog_cc_c11+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_cv_prog_cc_c11=no
+ac_save_CC=$CC
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$ac_c_conftest_c11_program
+_ACEOF
+for ac_arg in '' -std=gnu11
+do
+ CC="$ac_save_CC $ac_arg"
+ if ac_fn_c_try_compile "$LINENO"
+then :
+ ac_cv_prog_cc_c11=$ac_arg
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam
+ test "x$ac_cv_prog_cc_c11" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CC=$ac_save_CC
+fi
+
+if test "x$ac_cv_prog_cc_c11" = xno
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+printf "%s\n" "unsupported" >&6; }
+else $as_nop
+ if test "x$ac_cv_prog_cc_c11" = x
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+printf "%s\n" "none needed" >&6; }
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5
+printf "%s\n" "$ac_cv_prog_cc_c11" >&6; }
+ CC="$CC $ac_cv_prog_cc_c11"
+fi
+ ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11
+ ac_prog_cc_stdc=c11
+fi
+fi
+if test x$ac_prog_cc_stdc = xno
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5
+printf %s "checking for $CC option to enable C99 features... " >&6; }
+if test ${ac_cv_prog_cc_c99+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_cv_prog_cc_c99=no
+ac_save_CC=$CC
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$ac_c_conftest_c99_program
+_ACEOF
+for ac_arg in '' -std=gnu99 -std=c99 -c99 -qlanglvl=extc1x -qlanglvl=extc99 -AC99 -D_STDC_C99=
+do
+ CC="$ac_save_CC $ac_arg"
+ if ac_fn_c_try_compile "$LINENO"
+then :
+ ac_cv_prog_cc_c99=$ac_arg
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam
+ test "x$ac_cv_prog_cc_c99" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CC=$ac_save_CC
+fi
+
+if test "x$ac_cv_prog_cc_c99" = xno
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+printf "%s\n" "unsupported" >&6; }
+else $as_nop
+ if test "x$ac_cv_prog_cc_c99" = x
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+printf "%s\n" "none needed" >&6; }
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
+printf "%s\n" "$ac_cv_prog_cc_c99" >&6; }
+ CC="$CC $ac_cv_prog_cc_c99"
+fi
+ ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
+ ac_prog_cc_stdc=c99
+fi
+fi
+if test x$ac_prog_cc_stdc = xno
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5
+printf %s "checking for $CC option to enable C89 features... " >&6; }
+if test ${ac_cv_prog_cc_c89+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_cv_prog_cc_c89=no
+ac_save_CC=$CC
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$ac_c_conftest_c89_program
+_ACEOF
+for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+do
+ CC="$ac_save_CC $ac_arg"
+ if ac_fn_c_try_compile "$LINENO"
+then :
+ ac_cv_prog_cc_c89=$ac_arg
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam
+ test "x$ac_cv_prog_cc_c89" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CC=$ac_save_CC
+fi
+
+if test "x$ac_cv_prog_cc_c89" = xno
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+printf "%s\n" "unsupported" >&6; }
+else $as_nop
+ if test "x$ac_cv_prog_cc_c89" = x
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+printf "%s\n" "none needed" >&6; }
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
+printf "%s\n" "$ac_cv_prog_cc_c89" >&6; }
+ CC="$CC $ac_cv_prog_cc_c89"
+fi
+ ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
+ ac_prog_cc_stdc=c89
+fi
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5
+printf %s "checking whether $CC understands -c and -o together... " >&6; }
+if test ${am_cv_prog_cc_c_o+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+ # Make sure it works both with $CC and with simple cc.
+ # Following AC_PROG_CC_C_O, we do the test twice because some
+ # compilers refuse to overwrite an existing .o file with -o,
+ # though they will create one.
+ am_cv_prog_cc_c_o=yes
+ for am_i in 1 2; do
+ if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5
+ ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } \
+ && test -f conftest2.$ac_objext; then
+ : OK
+ else
+ am_cv_prog_cc_c_o=no
+ break
+ fi
+ done
+ rm -f core conftest*
+ unset am_i
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5
+printf "%s\n" "$am_cv_prog_cc_c_o" >&6; }
+if test "$am_cv_prog_cc_c_o" != yes; then
+ # Losing compiler, so override with the script.
+ # FIXME: It is wrong to rewrite CC.
+ # But if we don't then we get into trouble of one sort or another.
+ # A longer-term fix would be to have automake use am__CC in this case,
+ # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
+ CC="$am_aux_dir/compile $CC"
+fi
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+depcc="$CC" am_compiler_list=
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
+printf %s "checking dependency style of $depcc... " >&6; }
+if test ${am_cv_CC_dependencies_compiler_type+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+ # We make a subdir and do the tests there. Otherwise we can end up
+ # making bogus files that we don't know about and never remove. For
+ # instance it was reported that on HP-UX the gcc test will end up
+ # making a dummy file named 'D' -- because '-MD' means "put the output
+ # in D".
+ rm -rf conftest.dir
+ mkdir conftest.dir
+ # Copy depcomp to subdir because otherwise we won't find it if we're
+ # using a relative directory.
+ cp "$am_depcomp" conftest.dir
+ cd conftest.dir
+ # We will build objects and dependencies in a subdirectory because
+ # it helps to detect inapplicable dependency modes. For instance
+ # both Tru64's cc and ICC support -MD to output dependencies as a
+ # side effect of compilation, but ICC will put the dependencies in
+ # the current directory while Tru64 will put them in the object
+ # directory.
+ mkdir sub
+
+ am_cv_CC_dependencies_compiler_type=none
+ if test "$am_compiler_list" = ""; then
+ am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
+ fi
+ am__universal=false
+ case " $depcc " in #(
+ *\ -arch\ *\ -arch\ *) am__universal=true ;;
+ esac
+
+ for depmode in $am_compiler_list; do
+ # Setup a source with many dependencies, because some compilers
+ # like to wrap large dependency lists on column 80 (with \), and
+ # we should not choose a depcomp mode which is confused by this.
+ #
+ # We need to recreate these files for each test, as the compiler may
+ # overwrite some of them when testing with obscure command lines.
+ # This happens at least with the AIX C compiler.
+ : > sub/conftest.c
+ for i in 1 2 3 4 5 6; do
+ echo '#include "conftst'$i'.h"' >> sub/conftest.c
+ # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
+ # Solaris 10 /bin/sh.
+ echo '/* dummy */' > sub/conftst$i.h
+ done
+ echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+ # We check with '-c' and '-o' for the sake of the "dashmstdout"
+ # mode. It turns out that the SunPro C++ compiler does not properly
+ # handle '-M -o', and we need to detect this. Also, some Intel
+ # versions had trouble with output in subdirs.
+ am__obj=sub/conftest.${OBJEXT-o}
+ am__minus_obj="-o $am__obj"
+ case $depmode in
+ gcc)
+ # This depmode causes a compiler race in universal mode.
+ test "$am__universal" = false || continue
+ ;;
+ nosideeffect)
+ # After this tag, mechanisms are not by side-effect, so they'll
+ # only be used when explicitly requested.
+ if test "x$enable_dependency_tracking" = xyes; then
+ continue
+ else
+ break
+ fi
+ ;;
+ msvc7 | msvc7msys | msvisualcpp | msvcmsys)
+ # This compiler won't grok '-c -o', but also, the minuso test has
+ # not run yet. These depmodes are late enough in the game, and
+ # so weak that their functioning should not be impacted.
+ am__obj=conftest.${OBJEXT-o}
+ am__minus_obj=
+ ;;
+ none) break ;;
+ esac
+ if depmode=$depmode \
+ source=sub/conftest.c object=$am__obj \
+ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
+ >/dev/null 2>conftest.err &&
+ grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
+ ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+ # icc doesn't choke on unknown options, it will just issue warnings
+ # or remarks (even with -Werror). So we grep stderr for any message
+ # that says an option was ignored or not supported.
+ # When given -MP, icc 7.0 and 7.1 complain thusly:
+ # icc: Command line warning: ignoring option '-M'; no argument required
+ # The diagnosis changed in icc 8.0:
+ # icc: Command line remark: option '-MP' not supported
+ if (grep 'ignoring option' conftest.err ||
+ grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+ am_cv_CC_dependencies_compiler_type=$depmode
+ break
+ fi
+ fi
+ done
+
+ cd ..
+ rm -rf conftest.dir
+else
+ am_cv_CC_dependencies_compiler_type=none
+fi
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
+printf "%s\n" "$am_cv_CC_dependencies_compiler_type" >&6; }
+CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
+
+ if
+ test "x$enable_dependency_tracking" != xno \
+ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
+ am__fastdepCC_TRUE=
+ am__fastdepCC_FALSE='#'
+else
+ am__fastdepCC_TRUE='#'
+ am__fastdepCC_FALSE=
+fi
+
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
+printf %s "checking for a sed that does not truncate output... " >&6; }
+if test ${ac_cv_path_SED+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
+ for ac_i in 1 2 3 4 5 6 7; do
+ ac_script="$ac_script$as_nl$ac_script"
+ done
+ echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
+ { ac_script=; unset ac_script;}
+ if test -z "$SED"; then
+ ac_path_SED_found=false
+ # Loop through the user's path and test for each of PROGNAME-LIST
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_prog in sed gsed
+ do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_SED="$as_dir$ac_prog$ac_exec_ext"
+ as_fn_executable_p "$ac_path_SED" || continue
+# Check for GNU ac_path_SED and select it if it is found.
+ # Check for GNU $ac_path_SED
+case `"$ac_path_SED" --version 2>&1` in
+*GNU*)
+ ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
+*)
+ ac_count=0
+ printf %s 0123456789 >"conftest.in"
+ while :
+ do
+ cat "conftest.in" "conftest.in" >"conftest.tmp"
+ mv "conftest.tmp" "conftest.in"
+ cp "conftest.in" "conftest.nl"
+ printf "%s\n" '' >> "conftest.nl"
+ "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+ as_fn_arith $ac_count + 1 && ac_count=$as_val
+ if test $ac_count -gt ${ac_path_SED_max-0}; then
+ # Best one so far, save it but keep looking for a better one
+ ac_cv_path_SED="$ac_path_SED"
+ ac_path_SED_max=$ac_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test $ac_count -gt 10 && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+ $ac_path_SED_found && break 3
+ done
+ done
+ done
+IFS=$as_save_IFS
+ if test -z "$ac_cv_path_SED"; then
+ as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
+ fi
+else
+ ac_cv_path_SED=$SED
+fi
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
+printf "%s\n" "$ac_cv_path_SED" >&6; }
+ SED="$ac_cv_path_SED"
+ rm -f conftest.sed
+
+test -z "$SED" && SED=sed
+Xsed="$SED -e 1s/^X//"
+
+
+
+
+
+
+
+
+
+
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
+printf %s "checking for grep that handles long lines and -e... " >&6; }
+if test ${ac_cv_path_GREP+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -z "$GREP"; then
+ ac_path_GREP_found=false
+ # Loop through the user's path and test for each of PROGNAME-LIST
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_prog in grep ggrep
+ do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_GREP="$as_dir$ac_prog$ac_exec_ext"
+ as_fn_executable_p "$ac_path_GREP" || continue
+# Check for GNU ac_path_GREP and select it if it is found.
+ # Check for GNU $ac_path_GREP
+case `"$ac_path_GREP" --version 2>&1` in
+*GNU*)
+ ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
+*)
+ ac_count=0
+ printf %s 0123456789 >"conftest.in"
+ while :
+ do
+ cat "conftest.in" "conftest.in" >"conftest.tmp"
+ mv "conftest.tmp" "conftest.in"
+ cp "conftest.in" "conftest.nl"
+ printf "%s\n" 'GREP' >> "conftest.nl"
+ "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+ as_fn_arith $ac_count + 1 && ac_count=$as_val
+ if test $ac_count -gt ${ac_path_GREP_max-0}; then
+ # Best one so far, save it but keep looking for a better one
+ ac_cv_path_GREP="$ac_path_GREP"
+ ac_path_GREP_max=$ac_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test $ac_count -gt 10 && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+ $ac_path_GREP_found && break 3
+ done
+ done
+ done
+IFS=$as_save_IFS
+ if test -z "$ac_cv_path_GREP"; then
+ as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+ fi
+else
+ ac_cv_path_GREP=$GREP
+fi
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
+printf "%s\n" "$ac_cv_path_GREP" >&6; }
+ GREP="$ac_cv_path_GREP"
+
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
+printf %s "checking for egrep... " >&6; }
+if test ${ac_cv_path_EGREP+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
+ then ac_cv_path_EGREP="$GREP -E"
+ else
+ if test -z "$EGREP"; then
+ ac_path_EGREP_found=false
+ # Loop through the user's path and test for each of PROGNAME-LIST
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_prog in egrep
+ do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_EGREP="$as_dir$ac_prog$ac_exec_ext"
+ as_fn_executable_p "$ac_path_EGREP" || continue
+# Check for GNU ac_path_EGREP and select it if it is found.
+ # Check for GNU $ac_path_EGREP
+case `"$ac_path_EGREP" --version 2>&1` in
+*GNU*)
+ ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
+*)
+ ac_count=0
+ printf %s 0123456789 >"conftest.in"
+ while :
+ do
+ cat "conftest.in" "conftest.in" >"conftest.tmp"
+ mv "conftest.tmp" "conftest.in"
+ cp "conftest.in" "conftest.nl"
+ printf "%s\n" 'EGREP' >> "conftest.nl"
+ "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+ as_fn_arith $ac_count + 1 && ac_count=$as_val
+ if test $ac_count -gt ${ac_path_EGREP_max-0}; then
+ # Best one so far, save it but keep looking for a better one
+ ac_cv_path_EGREP="$ac_path_EGREP"
+ ac_path_EGREP_max=$ac_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test $ac_count -gt 10 && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+ $ac_path_EGREP_found && break 3
+ done
+ done
+ done
+IFS=$as_save_IFS
+ if test -z "$ac_cv_path_EGREP"; then
+ as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+ fi
+else
+ ac_cv_path_EGREP=$EGREP
+fi
+
+ fi
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
+printf "%s\n" "$ac_cv_path_EGREP" >&6; }
+ EGREP="$ac_cv_path_EGREP"
+
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
+printf %s "checking for fgrep... " >&6; }
+if test ${ac_cv_path_FGREP+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
+ then ac_cv_path_FGREP="$GREP -F"
+ else
+ if test -z "$FGREP"; then
+ ac_path_FGREP_found=false
+ # Loop through the user's path and test for each of PROGNAME-LIST
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_prog in fgrep
+ do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_FGREP="$as_dir$ac_prog$ac_exec_ext"
+ as_fn_executable_p "$ac_path_FGREP" || continue
+# Check for GNU ac_path_FGREP and select it if it is found.
+ # Check for GNU $ac_path_FGREP
+case `"$ac_path_FGREP" --version 2>&1` in
+*GNU*)
+ ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
+*)
+ ac_count=0
+ printf %s 0123456789 >"conftest.in"
+ while :
+ do
+ cat "conftest.in" "conftest.in" >"conftest.tmp"
+ mv "conftest.tmp" "conftest.in"
+ cp "conftest.in" "conftest.nl"
+ printf "%s\n" 'FGREP' >> "conftest.nl"
+ "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+ as_fn_arith $ac_count + 1 && ac_count=$as_val
+ if test $ac_count -gt ${ac_path_FGREP_max-0}; then
+ # Best one so far, save it but keep looking for a better one
+ ac_cv_path_FGREP="$ac_path_FGREP"
+ ac_path_FGREP_max=$ac_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test $ac_count -gt 10 && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+ $ac_path_FGREP_found && break 3
+ done
+ done
+ done
+IFS=$as_save_IFS
+ if test -z "$ac_cv_path_FGREP"; then
+ as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+ fi
+else
+ ac_cv_path_FGREP=$FGREP
+fi
+
+ fi
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
+printf "%s\n" "$ac_cv_path_FGREP" >&6; }
+ FGREP="$ac_cv_path_FGREP"
+
+
+test -z "$GREP" && GREP=grep
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+# Check whether --with-gnu-ld was given.
+if test ${with_gnu_ld+y}
+then :
+ withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes
+else $as_nop
+ with_gnu_ld=no
+fi
+
+ac_prog=ld
+if test yes = "$GCC"; then
+ # Check if gcc -print-prog-name=ld gives a path.
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
+printf %s "checking for ld used by $CC... " >&6; }
+ case $host in
+ *-*-mingw*)
+ # gcc leaves a trailing carriage return, which upsets mingw
+ ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
+ *)
+ ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
+ esac
+ case $ac_prog in
+ # Accept absolute paths.
+ [\\/]* | ?:[\\/]*)
+ re_direlt='/[^/][^/]*/\.\./'
+ # Canonicalize the pathname of ld
+ ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
+ while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
+ ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
+ done
+ test -z "$LD" && LD=$ac_prog
+ ;;
+ "")
+ # If it fails, then pretend we aren't using GCC.
+ ac_prog=ld
+ ;;
+ *)
+ # If it is relative, then search for the first ld in PATH.
+ with_gnu_ld=unknown
+ ;;
+ esac
+elif test yes = "$with_gnu_ld"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
+printf %s "checking for GNU ld... " >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
+printf %s "checking for non-GNU ld... " >&6; }
+fi
+if test ${lt_cv_path_LD+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -z "$LD"; then
+ lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
+ for ac_dir in $PATH; do
+ IFS=$lt_save_ifs
+ test -z "$ac_dir" && ac_dir=.
+ if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
+ lt_cv_path_LD=$ac_dir/$ac_prog
+ # Check to see if the program is GNU ld. I'd rather use --version,
+ # but apparently some variants of GNU ld only accept -v.
+ # Break only if it was the GNU/non-GNU ld that we prefer.
+ case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
+ *GNU* | *'with BFD'*)
+ test no != "$with_gnu_ld" && break
+ ;;
+ *)
+ test yes != "$with_gnu_ld" && break
+ ;;
+ esac
+ fi
+ done
+ IFS=$lt_save_ifs
+else
+ lt_cv_path_LD=$LD # Let the user override the test with a path.
+fi
+fi
+
+LD=$lt_cv_path_LD
+if test -n "$LD"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
+printf "%s\n" "$LD" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
+printf %s "checking if the linker ($LD) is GNU ld... " >&6; }
+if test ${lt_cv_prog_gnu_ld+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ # I'd rather use --version here, but apparently some GNU lds only accept -v.
+case `$LD -v 2>&1 </dev/null` in
+*GNU* | *'with BFD'*)
+ lt_cv_prog_gnu_ld=yes
+ ;;
+*)
+ lt_cv_prog_gnu_ld=no
+ ;;
+esac
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5
+printf "%s\n" "$lt_cv_prog_gnu_ld" >&6; }
+with_gnu_ld=$lt_cv_prog_gnu_ld
+
+
+
+
+
+
+
+
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5
+printf %s "checking for BSD- or MS-compatible name lister (nm)... " >&6; }
+if test ${lt_cv_path_NM+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$NM"; then
+ # Let the user override the test.
+ lt_cv_path_NM=$NM
+else
+ lt_nm_to_check=${ac_tool_prefix}nm
+ if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
+ lt_nm_to_check="$lt_nm_to_check nm"
+ fi
+ for lt_tmp_nm in $lt_nm_to_check; do
+ lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
+ for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
+ IFS=$lt_save_ifs
+ test -z "$ac_dir" && ac_dir=.
+ tmp_nm=$ac_dir/$lt_tmp_nm
+ if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then
+ # Check to see if the nm accepts a BSD-compat flag.
+ # Adding the 'sed 1q' prevents false positives on HP-UX, which says:
+ # nm: unknown option "B" ignored
+ # Tru64's nm complains that /dev/null is an invalid object file
+ # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty
+ case $build_os in
+ mingw*) lt_bad_file=conftest.nm/nofile ;;
+ *) lt_bad_file=/dev/null ;;
+ esac
+ case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in
+ *$lt_bad_file* | *'Invalid file or object type'*)
+ lt_cv_path_NM="$tmp_nm -B"
+ break 2
+ ;;
+ *)
+ case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
+ */dev/null*)
+ lt_cv_path_NM="$tmp_nm -p"
+ break 2
+ ;;
+ *)
+ lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
+ continue # so that we can try to find one that supports BSD flags
+ ;;
+ esac
+ ;;
+ esac
+ fi
+ done
+ IFS=$lt_save_ifs
+ done
+ : ${lt_cv_path_NM=no}
+fi
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5
+printf "%s\n" "$lt_cv_path_NM" >&6; }
+if test no != "$lt_cv_path_NM"; then
+ NM=$lt_cv_path_NM
+else
+ # Didn't find any BSD compatible name lister, look for dumpbin.
+ if test -n "$DUMPBIN"; then :
+ # Let the user override the test.
+ else
+ if test -n "$ac_tool_prefix"; then
+ for ac_prog in dumpbin "link -dump"
+ do
+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_DUMPBIN+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$DUMPBIN"; then
+ ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+DUMPBIN=$ac_cv_prog_DUMPBIN
+if test -n "$DUMPBIN"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
+printf "%s\n" "$DUMPBIN" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+ test -n "$DUMPBIN" && break
+ done
+fi
+if test -z "$DUMPBIN"; then
+ ac_ct_DUMPBIN=$DUMPBIN
+ for ac_prog in dumpbin "link -dump"
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_DUMPBIN+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$ac_ct_DUMPBIN"; then
+ ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_DUMPBIN="$ac_prog"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN
+if test -n "$ac_ct_DUMPBIN"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5
+printf "%s\n" "$ac_ct_DUMPBIN" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+ test -n "$ac_ct_DUMPBIN" && break
+done
+
+ if test "x$ac_ct_DUMPBIN" = x; then
+ DUMPBIN=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ DUMPBIN=$ac_ct_DUMPBIN
+ fi
+fi
+
+ case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in
+ *COFF*)
+ DUMPBIN="$DUMPBIN -symbols -headers"
+ ;;
+ *)
+ DUMPBIN=:
+ ;;
+ esac
+ fi
+
+ if test : != "$DUMPBIN"; then
+ NM=$DUMPBIN
+ fi
+fi
+test -z "$NM" && NM=nm
+
+
+
+
+
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5
+printf %s "checking the name lister ($NM) interface... " >&6; }
+if test ${lt_cv_nm_interface+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ lt_cv_nm_interface="BSD nm"
+ echo "int some_variable = 0;" > conftest.$ac_ext
+ (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5)
+ (eval "$ac_compile" 2>conftest.err)
+ cat conftest.err >&5
+ (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
+ (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
+ cat conftest.err >&5
+ (eval echo "\"\$as_me:$LINENO: output\"" >&5)
+ cat conftest.out >&5
+ if $GREP 'External.*some_variable' conftest.out > /dev/null; then
+ lt_cv_nm_interface="MS dumpbin"
+ fi
+ rm -f conftest*
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5
+printf "%s\n" "$lt_cv_nm_interface" >&6; }
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
+printf %s "checking whether ln -s works... " >&6; }
+LN_S=$as_ln_s
+if test "$LN_S" = "ln -s"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
+printf "%s\n" "no, using $LN_S" >&6; }
+fi
+
+# find the maximum length of command line arguments
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5
+printf %s "checking the maximum length of command line arguments... " >&6; }
+if test ${lt_cv_sys_max_cmd_len+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ i=0
+ teststring=ABCD
+
+ case $build_os in
+ msdosdjgpp*)
+ # On DJGPP, this test can blow up pretty badly due to problems in libc
+ # (any single argument exceeding 2000 bytes causes a buffer overrun
+ # during glob expansion). Even if it were fixed, the result of this
+ # check would be larger than it should be.
+ lt_cv_sys_max_cmd_len=12288; # 12K is about right
+ ;;
+
+ gnu*)
+ # Under GNU Hurd, this test is not required because there is
+ # no limit to the length of command line arguments.
+ # Libtool will interpret -1 as no limit whatsoever
+ lt_cv_sys_max_cmd_len=-1;
+ ;;
+
+ cygwin* | mingw* | cegcc*)
+ # On Win9x/ME, this test blows up -- it succeeds, but takes
+ # about 5 minutes as the teststring grows exponentially.
+ # Worse, since 9x/ME are not pre-emptively multitasking,
+ # you end up with a "frozen" computer, even though with patience
+ # the test eventually succeeds (with a max line length of 256k).
+ # Instead, let's just punt: use the minimum linelength reported by
+ # all of the supported platforms: 8192 (on NT/2K/XP).
+ lt_cv_sys_max_cmd_len=8192;
+ ;;
+
+ mint*)
+ # On MiNT this can take a long time and run out of memory.
+ lt_cv_sys_max_cmd_len=8192;
+ ;;
+
+ amigaos*)
+ # On AmigaOS with pdksh, this test takes hours, literally.
+ # So we just punt and use a minimum line length of 8192.
+ lt_cv_sys_max_cmd_len=8192;
+ ;;
+
+ bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*)
+ # This has been around since 386BSD, at least. Likely further.
+ if test -x /sbin/sysctl; then
+ lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
+ elif test -x /usr/sbin/sysctl; then
+ lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
+ else
+ lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
+ fi
+ # And add a safety zone
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
+ ;;
+
+ interix*)
+ # We know the value 262144 and hardcode it with a safety zone (like BSD)
+ lt_cv_sys_max_cmd_len=196608
+ ;;
+
+ os2*)
+ # The test takes a long time on OS/2.
+ lt_cv_sys_max_cmd_len=8192
+ ;;
+
+ osf*)
+ # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
+ # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
+ # nice to cause kernel panics so lets avoid the loop below.
+ # First set a reasonable default.
+ lt_cv_sys_max_cmd_len=16384
+ #
+ if test -x /sbin/sysconfig; then
+ case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
+ *1*) lt_cv_sys_max_cmd_len=-1 ;;
+ esac
+ fi
+ ;;
+ sco3.2v5*)
+ lt_cv_sys_max_cmd_len=102400
+ ;;
+ sysv5* | sco5v6* | sysv4.2uw2*)
+ kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
+ if test -n "$kargmax"; then
+ lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'`
+ else
+ lt_cv_sys_max_cmd_len=32768
+ fi
+ ;;
+ *)
+ lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
+ if test -n "$lt_cv_sys_max_cmd_len" && \
+ test undefined != "$lt_cv_sys_max_cmd_len"; then
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
+ else
+ # Make teststring a little bigger before we do anything with it.
+ # a 1K string should be a reasonable start.
+ for i in 1 2 3 4 5 6 7 8; do
+ teststring=$teststring$teststring
+ done
+ SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
+ # If test is not a shell built-in, we'll probably end up computing a
+ # maximum length that is only half of the actual maximum length, but
+ # we can't tell.
+ while { test X`env echo "$teststring$teststring" 2>/dev/null` \
+ = "X$teststring$teststring"; } >/dev/null 2>&1 &&
+ test 17 != "$i" # 1/2 MB should be enough
+ do
+ i=`expr $i + 1`
+ teststring=$teststring$teststring
+ done
+ # Only check the string length outside the loop.
+ lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
+ teststring=
+ # Add a significant safety factor because C++ compilers can tack on
+ # massive amounts of additional arguments before passing them to the
+ # linker. It appears as though 1/2 is a usable value.
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
+ fi
+ ;;
+ esac
+
+fi
+
+if test -n "$lt_cv_sys_max_cmd_len"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5
+printf "%s\n" "$lt_cv_sys_max_cmd_len" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none" >&5
+printf "%s\n" "none" >&6; }
+fi
+max_cmd_len=$lt_cv_sys_max_cmd_len
+
+
+
+
+
+
+: ${CP="cp -f"}
+: ${MV="mv -f"}
+: ${RM="rm -f"}
+
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+ lt_unset=unset
+else
+ lt_unset=false
+fi
+
+
+
+
+
+# test EBCDIC or ASCII
+case `echo X|tr X '\101'` in
+ A) # ASCII based system
+ # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
+ lt_SP2NL='tr \040 \012'
+ lt_NL2SP='tr \015\012 \040\040'
+ ;;
+ *) # EBCDIC based system
+ lt_SP2NL='tr \100 \n'
+ lt_NL2SP='tr \r\n \100\100'
+ ;;
+esac
+
+
+
+
+
+
+
+
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5
+printf %s "checking how to convert $build file names to $host format... " >&6; }
+if test ${lt_cv_to_host_file_cmd+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ case $host in
+ *-*-mingw* )
+ case $build in
+ *-*-mingw* ) # actually msys
+ lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
+ ;;
+ *-*-cygwin* )
+ lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
+ ;;
+ * ) # otherwise, assume *nix
+ lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
+ ;;
+ esac
+ ;;
+ *-*-cygwin* )
+ case $build in
+ *-*-mingw* ) # actually msys
+ lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
+ ;;
+ *-*-cygwin* )
+ lt_cv_to_host_file_cmd=func_convert_file_noop
+ ;;
+ * ) # otherwise, assume *nix
+ lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
+ ;;
+ esac
+ ;;
+ * ) # unhandled hosts (and "normal" native builds)
+ lt_cv_to_host_file_cmd=func_convert_file_noop
+ ;;
+esac
+
+fi
+
+to_host_file_cmd=$lt_cv_to_host_file_cmd
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5
+printf "%s\n" "$lt_cv_to_host_file_cmd" >&6; }
+
+
+
+
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5
+printf %s "checking how to convert $build file names to toolchain format... " >&6; }
+if test ${lt_cv_to_tool_file_cmd+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ #assume ordinary cross tools, or native build.
+lt_cv_to_tool_file_cmd=func_convert_file_noop
+case $host in
+ *-*-mingw* )
+ case $build in
+ *-*-mingw* ) # actually msys
+ lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
+ ;;
+ esac
+ ;;
+esac
+
+fi
+
+to_tool_file_cmd=$lt_cv_to_tool_file_cmd
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5
+printf "%s\n" "$lt_cv_to_tool_file_cmd" >&6; }
+
+
+
+
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5
+printf %s "checking for $LD option to reload object files... " >&6; }
+if test ${lt_cv_ld_reload_flag+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ lt_cv_ld_reload_flag='-r'
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5
+printf "%s\n" "$lt_cv_ld_reload_flag" >&6; }
+reload_flag=$lt_cv_ld_reload_flag
+case $reload_flag in
+"" | " "*) ;;
+*) reload_flag=" $reload_flag" ;;
+esac
+reload_cmds='$LD$reload_flag -o $output$reload_objs'
+case $host_os in
+ cygwin* | mingw* | pw32* | cegcc*)
+ if test yes != "$GCC"; then
+ reload_cmds=false
+ fi
+ ;;
+ darwin*)
+ if test yes = "$GCC"; then
+ reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs'
+ else
+ reload_cmds='$LD$reload_flag -o $output$reload_objs'
+ fi
+ ;;
+esac
+
+
+
+
+
+
+
+
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
+set dummy ${ac_tool_prefix}objdump; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_OBJDUMP+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$OBJDUMP"; then
+ ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+OBJDUMP=$ac_cv_prog_OBJDUMP
+if test -n "$OBJDUMP"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
+printf "%s\n" "$OBJDUMP" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_OBJDUMP"; then
+ ac_ct_OBJDUMP=$OBJDUMP
+ # Extract the first word of "objdump", so it can be a program name with args.
+set dummy objdump; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_OBJDUMP+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$ac_ct_OBJDUMP"; then
+ ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_OBJDUMP="objdump"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
+if test -n "$ac_ct_OBJDUMP"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
+printf "%s\n" "$ac_ct_OBJDUMP" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+ if test "x$ac_ct_OBJDUMP" = x; then
+ OBJDUMP="false"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ OBJDUMP=$ac_ct_OBJDUMP
+ fi
+else
+ OBJDUMP="$ac_cv_prog_OBJDUMP"
+fi
+
+test -z "$OBJDUMP" && OBJDUMP=objdump
+
+
+
+
+
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5
+printf %s "checking how to recognize dependent libraries... " >&6; }
+if test ${lt_cv_deplibs_check_method+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ lt_cv_file_magic_cmd='$MAGIC_CMD'
+lt_cv_file_magic_test_file=
+lt_cv_deplibs_check_method='unknown'
+# Need to set the preceding variable on all platforms that support
+# interlibrary dependencies.
+# 'none' -- dependencies not supported.
+# 'unknown' -- same as none, but documents that we really don't know.
+# 'pass_all' -- all dependencies passed with no checks.
+# 'test_compile' -- check by making test program.
+# 'file_magic [[regex]]' -- check by looking for files in library path
+# that responds to the $file_magic_cmd with a given extended regex.
+# If you have 'file' or equivalent on your system and you're not sure
+# whether 'pass_all' will *always* work, you probably want this one.
+
+case $host_os in
+aix[4-9]*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+beos*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+bsdi[45]*)
+ lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
+ lt_cv_file_magic_cmd='/usr/bin/file -L'
+ lt_cv_file_magic_test_file=/shlib/libc.so
+ ;;
+
+cygwin*)
+ # func_win32_libid is a shell function defined in ltmain.sh
+ lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
+ lt_cv_file_magic_cmd='func_win32_libid'
+ ;;
+
+mingw* | pw32*)
+ # Base MSYS/MinGW do not provide the 'file' command needed by
+ # func_win32_libid shell function, so use a weaker test based on 'objdump',
+ # unless we find 'file', for example because we are cross-compiling.
+ if ( file / ) >/dev/null 2>&1; then
+ lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
+ lt_cv_file_magic_cmd='func_win32_libid'
+ else
+ # Keep this pattern in sync with the one in func_win32_libid.
+ lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
+ lt_cv_file_magic_cmd='$OBJDUMP -f'
+ fi
+ ;;
+
+cegcc*)
+ # use the weaker test based on 'objdump'. See mingw*.
+ lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
+ lt_cv_file_magic_cmd='$OBJDUMP -f'
+ ;;
+
+darwin* | rhapsody*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+freebsd* | dragonfly*)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
+ case $host_cpu in
+ i*86 )
+ # Not sure whether the presence of OpenBSD here was a mistake.
+ # Let's accept both of them until this is cleared up.
+ lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library'
+ lt_cv_file_magic_cmd=/usr/bin/file
+ lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
+ ;;
+ esac
+ else
+ lt_cv_deplibs_check_method=pass_all
+ fi
+ ;;
+
+haiku*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+hpux10.20* | hpux11*)
+ lt_cv_file_magic_cmd=/usr/bin/file
+ case $host_cpu in
+ ia64*)
+ lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
+ lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
+ ;;
+ hppa*64*)
+ lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]'
+ lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
+ ;;
+ *)
+ lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library'
+ lt_cv_file_magic_test_file=/usr/lib/libc.sl
+ ;;
+ esac
+ ;;
+
+interix[3-9]*)
+ # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
+ lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$'
+ ;;
+
+irix5* | irix6* | nonstopux*)
+ case $LD in
+ *-32|*"-32 ") libmagic=32-bit;;
+ *-n32|*"-n32 ") libmagic=N32;;
+ *-64|*"-64 ") libmagic=64-bit;;
+ *) libmagic=never-match;;
+ esac
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+# This must be glibc/ELF.
+linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+netbsd* | netbsdelf*-gnu)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
+ lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
+ else
+ lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$'
+ fi
+ ;;
+
+newos6*)
+ lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
+ lt_cv_file_magic_cmd=/usr/bin/file
+ lt_cv_file_magic_test_file=/usr/lib/libnls.so
+ ;;
+
+*nto* | *qnx*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+openbsd* | bitrig*)
+ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
+ lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$'
+ else
+ lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
+ fi
+ ;;
+
+osf3* | osf4* | osf5*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+rdos*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+solaris*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+sysv4 | sysv4.3*)
+ case $host_vendor in
+ motorola)
+ lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]'
+ lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
+ ;;
+ ncr)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+ sequent)
+ lt_cv_file_magic_cmd='/bin/file'
+ lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
+ ;;
+ sni)
+ lt_cv_file_magic_cmd='/bin/file'
+ lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
+ lt_cv_file_magic_test_file=/lib/libc.so
+ ;;
+ siemens)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+ pc)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+ esac
+ ;;
+
+tpf*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+os2*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+esac
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5
+printf "%s\n" "$lt_cv_deplibs_check_method" >&6; }
+
+file_magic_glob=
+want_nocaseglob=no
+if test "$build" = "$host"; then
+ case $host_os in
+ mingw* | pw32*)
+ if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
+ want_nocaseglob=yes
+ else
+ file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"`
+ fi
+ ;;
+ esac
+fi
+
+file_magic_cmd=$lt_cv_file_magic_cmd
+deplibs_check_method=$lt_cv_deplibs_check_method
+test -z "$deplibs_check_method" && deplibs_check_method=unknown
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
+set dummy ${ac_tool_prefix}dlltool; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_DLLTOOL+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$DLLTOOL"; then
+ ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+DLLTOOL=$ac_cv_prog_DLLTOOL
+if test -n "$DLLTOOL"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
+printf "%s\n" "$DLLTOOL" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_DLLTOOL"; then
+ ac_ct_DLLTOOL=$DLLTOOL
+ # Extract the first word of "dlltool", so it can be a program name with args.
+set dummy dlltool; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_DLLTOOL+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$ac_ct_DLLTOOL"; then
+ ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_DLLTOOL="dlltool"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
+if test -n "$ac_ct_DLLTOOL"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
+printf "%s\n" "$ac_ct_DLLTOOL" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+ if test "x$ac_ct_DLLTOOL" = x; then
+ DLLTOOL="false"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ DLLTOOL=$ac_ct_DLLTOOL
+ fi
+else
+ DLLTOOL="$ac_cv_prog_DLLTOOL"
+fi
+
+test -z "$DLLTOOL" && DLLTOOL=dlltool
+
+
+
+
+
+
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5
+printf %s "checking how to associate runtime and link libraries... " >&6; }
+if test ${lt_cv_sharedlib_from_linklib_cmd+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ lt_cv_sharedlib_from_linklib_cmd='unknown'
+
+case $host_os in
+cygwin* | mingw* | pw32* | cegcc*)
+ # two different shell functions defined in ltmain.sh;
+ # decide which one to use based on capabilities of $DLLTOOL
+ case `$DLLTOOL --help 2>&1` in
+ *--identify-strict*)
+ lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
+ ;;
+ *)
+ lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
+ ;;
+ esac
+ ;;
+*)
+ # fallback: assume linklib IS sharedlib
+ lt_cv_sharedlib_from_linklib_cmd=$ECHO
+ ;;
+esac
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5
+printf "%s\n" "$lt_cv_sharedlib_from_linklib_cmd" >&6; }
+sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
+test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
+
+
+
+
+
+
+
+
+if test -n "$ac_tool_prefix"; then
+ for ac_prog in ar
+ do
+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_AR+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$AR"; then
+ ac_cv_prog_AR="$AR" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+AR=$ac_cv_prog_AR
+if test -n "$AR"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
+printf "%s\n" "$AR" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+ test -n "$AR" && break
+ done
+fi
+if test -z "$AR"; then
+ ac_ct_AR=$AR
+ for ac_prog in ar
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_AR+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$ac_ct_AR"; then
+ ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_AR="$ac_prog"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_AR=$ac_cv_prog_ac_ct_AR
+if test -n "$ac_ct_AR"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
+printf "%s\n" "$ac_ct_AR" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+ test -n "$ac_ct_AR" && break
+done
+
+ if test "x$ac_ct_AR" = x; then
+ AR="false"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ AR=$ac_ct_AR
+ fi
+fi
+
+: ${AR=ar}
+: ${AR_FLAGS=cr}
+
+
+
+
+
+
+
+
+
+
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5
+printf %s "checking for archiver @FILE support... " >&6; }
+if test ${lt_cv_ar_at_file+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ lt_cv_ar_at_file=no
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ echo conftest.$ac_objext > conftest.lst
+ lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5'
+ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
+ (eval $lt_ar_try) 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+ if test 0 -eq "$ac_status"; then
+ # Ensure the archiver fails upon bogus file names.
+ rm -f conftest.$ac_objext libconftest.a
+ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
+ (eval $lt_ar_try) 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+ if test 0 -ne "$ac_status"; then
+ lt_cv_ar_at_file=@
+ fi
+ fi
+ rm -f conftest.* libconftest.a
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5
+printf "%s\n" "$lt_cv_ar_at_file" >&6; }
+
+if test no = "$lt_cv_ar_at_file"; then
+ archiver_list_spec=
+else
+ archiver_list_spec=$lt_cv_ar_at_file
+fi
+
+
+
+
+
+
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
+set dummy ${ac_tool_prefix}strip; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_STRIP+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$STRIP"; then
+ ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_STRIP="${ac_tool_prefix}strip"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+STRIP=$ac_cv_prog_STRIP
+if test -n "$STRIP"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
+printf "%s\n" "$STRIP" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_STRIP"; then
+ ac_ct_STRIP=$STRIP
+ # Extract the first word of "strip", so it can be a program name with args.
+set dummy strip; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_STRIP+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$ac_ct_STRIP"; then
+ ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_STRIP="strip"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
+if test -n "$ac_ct_STRIP"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
+printf "%s\n" "$ac_ct_STRIP" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+ if test "x$ac_ct_STRIP" = x; then
+ STRIP=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ STRIP=$ac_ct_STRIP
+ fi
+else
+ STRIP="$ac_cv_prog_STRIP"
+fi
+
+test -z "$STRIP" && STRIP=:
+
+
+
+
+
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ranlib; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_RANLIB+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$RANLIB"; then
+ ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+RANLIB=$ac_cv_prog_RANLIB
+if test -n "$RANLIB"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
+printf "%s\n" "$RANLIB" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_RANLIB"; then
+ ac_ct_RANLIB=$RANLIB
+ # Extract the first word of "ranlib", so it can be a program name with args.
+set dummy ranlib; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_RANLIB+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$ac_ct_RANLIB"; then
+ ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_RANLIB="ranlib"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
+if test -n "$ac_ct_RANLIB"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
+printf "%s\n" "$ac_ct_RANLIB" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+ if test "x$ac_ct_RANLIB" = x; then
+ RANLIB=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ RANLIB=$ac_ct_RANLIB
+ fi
+else
+ RANLIB="$ac_cv_prog_RANLIB"
+fi
+
+test -z "$RANLIB" && RANLIB=:
+
+
+
+
+
+
+# Determine commands to create old-style static archives.
+old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
+old_postinstall_cmds='chmod 644 $oldlib'
+old_postuninstall_cmds=
+
+if test -n "$RANLIB"; then
+ case $host_os in
+ bitrig* | openbsd*)
+ old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
+ ;;
+ *)
+ old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
+ ;;
+ esac
+ old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
+fi
+
+case $host_os in
+ darwin*)
+ lock_old_archive_extraction=yes ;;
+ *)
+ lock_old_archive_extraction=no ;;
+esac
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
+
+# If no C compiler flags were specified, use CFLAGS.
+LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
+
+# Allow CC to be a program name with arguments.
+compiler=$CC
+
+
+# Check for command to grab the raw symbol name followed by C symbol from nm.
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5
+printf %s "checking command to parse $NM output from $compiler object... " >&6; }
+if test ${lt_cv_sys_global_symbol_pipe+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+
+# These are sane defaults that work on at least a few old systems.
+# [They come from Ultrix. What could be older than Ultrix?!! ;)]
+
+# Character class describing NM global symbol codes.
+symcode='[BCDEGRST]'
+
+# Regexp to match symbols that can be accessed directly from C.
+sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
+
+# Define system-specific variables.
+case $host_os in
+aix*)
+ symcode='[BCDT]'
+ ;;
+cygwin* | mingw* | pw32* | cegcc*)
+ symcode='[ABCDGISTW]'
+ ;;
+hpux*)
+ if test ia64 = "$host_cpu"; then
+ symcode='[ABCDEGRST]'
+ fi
+ ;;
+irix* | nonstopux*)
+ symcode='[BCDEGRST]'
+ ;;
+osf*)
+ symcode='[BCDEGQRST]'
+ ;;
+solaris*)
+ symcode='[BDRT]'
+ ;;
+sco3.2v5*)
+ symcode='[DT]'
+ ;;
+sysv4.2uw2*)
+ symcode='[DT]'
+ ;;
+sysv5* | sco5v6* | unixware* | OpenUNIX*)
+ symcode='[ABDT]'
+ ;;
+sysv4)
+ symcode='[DFNSTU]'
+ ;;
+esac
+
+# If we're using GNU nm, then use its standard symbol codes.
+case `$NM -V 2>&1` in
+*GNU* | *'with BFD'*)
+ symcode='[ABCDGIRSTW]' ;;
+esac
+
+if test "$lt_cv_nm_interface" = "MS dumpbin"; then
+ # Gets list of data symbols to import.
+ lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'"
+ # Adjust the below global symbol transforms to fixup imported variables.
+ lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'"
+ lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'"
+ lt_c_name_lib_hook="\
+ -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\
+ -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'"
+else
+ # Disable hooks by default.
+ lt_cv_sys_global_symbol_to_import=
+ lt_cdecl_hook=
+ lt_c_name_hook=
+ lt_c_name_lib_hook=
+fi
+
+# Transform an extracted symbol line into a proper C declaration.
+# Some systems (esp. on ia64) link data and code symbols differently,
+# so use this general approach.
+lt_cv_sys_global_symbol_to_cdecl="sed -n"\
+$lt_cdecl_hook\
+" -e 's/^T .* \(.*\)$/extern int \1();/p'"\
+" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'"
+
+# Transform an extracted symbol line into symbol name and symbol address
+lt_cv_sys_global_symbol_to_c_name_address="sed -n"\
+$lt_c_name_hook\
+" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\
+" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'"
+
+# Transform an extracted symbol line into symbol name with lib prefix and
+# symbol address.
+lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\
+$lt_c_name_lib_hook\
+" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\
+" -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\
+" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'"
+
+# Handle CRLF in mingw tool chain
+opt_cr=
+case $build_os in
+mingw*)
+ opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
+ ;;
+esac
+
+# Try without a prefix underscore, then with it.
+for ac_symprfx in "" "_"; do
+
+ # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
+ symxfrm="\\1 $ac_symprfx\\2 \\2"
+
+ # Write the raw and C identifiers.
+ if test "$lt_cv_nm_interface" = "MS dumpbin"; then
+ # Fake it for dumpbin and say T for any non-static function,
+ # D for any global variable and I for any imported variable.
+ # Also find C++ and __fastcall symbols from MSVC++,
+ # which start with @ or ?.
+ lt_cv_sys_global_symbol_pipe="$AWK '"\
+" {last_section=section; section=\$ 3};"\
+" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
+" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
+" /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\
+" /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\
+" /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\
+" \$ 0!~/External *\|/{next};"\
+" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
+" {if(hide[section]) next};"\
+" {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\
+" {split(\$ 0,a,/\||\r/); split(a[2],s)};"\
+" s[1]~/^[@?]/{print f,s[1],s[1]; next};"\
+" s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\
+" ' prfx=^$ac_symprfx"
+ else
+ lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
+ fi
+ lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
+
+ # Check to see that the pipe works correctly.
+ pipe_works=no
+
+ rm -f conftest*
+ cat > conftest.$ac_ext <<_LT_EOF
+#ifdef __cplusplus
+extern "C" {
+#endif
+char nm_test_var;
+void nm_test_func(void);
+void nm_test_func(void){}
+#ifdef __cplusplus
+}
+#endif
+int main(){nm_test_var='a';nm_test_func();return(0);}
+_LT_EOF
+
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ # Now try to grab the symbols.
+ nlist=conftest.nm
+ $ECHO "$as_me:$LINENO: $NM conftest.$ac_objext | $lt_cv_sys_global_symbol_pipe > $nlist" >&5
+ if eval "$NM" conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist 2>&5 && test -s "$nlist"; then
+ # Try sorting and uniquifying the output.
+ if sort "$nlist" | uniq > "$nlist"T; then
+ mv -f "$nlist"T "$nlist"
+ else
+ rm -f "$nlist"T
+ fi
+
+ # Make sure that we snagged all the symbols we need.
+ if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
+ if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
+ cat <<_LT_EOF > conftest.$ac_ext
+/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */
+#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE
+/* DATA imports from DLLs on WIN32 can't be const, because runtime
+ relocations are performed -- see ld's documentation on pseudo-relocs. */
+# define LT_DLSYM_CONST
+#elif defined __osf__
+/* This system does not cope well with relocations in const data. */
+# define LT_DLSYM_CONST
+#else
+# define LT_DLSYM_CONST const
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+_LT_EOF
+ # Now generate the symbol file.
+ eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
+
+ cat <<_LT_EOF >> conftest.$ac_ext
+
+/* The mapping between symbol names and symbols. */
+LT_DLSYM_CONST struct {
+ const char *name;
+ void *address;
+}
+lt__PROGRAM__LTX_preloaded_symbols[] =
+{
+ { "@PROGRAM@", (void *) 0 },
+_LT_EOF
+ $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
+ cat <<\_LT_EOF >> conftest.$ac_ext
+ {0, (void *) 0}
+};
+
+/* This works around a problem in FreeBSD linker */
+#ifdef FREEBSD_WORKAROUND
+static const void *lt_preloaded_setup() {
+ return lt__PROGRAM__LTX_preloaded_symbols;
+}
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+_LT_EOF
+ # Now try linking the two files.
+ mv conftest.$ac_objext conftstm.$ac_objext
+ lt_globsym_save_LIBS=$LIBS
+ lt_globsym_save_CFLAGS=$CFLAGS
+ LIBS=conftstm.$ac_objext
+ CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s conftest$ac_exeext; then
+ pipe_works=yes
+ fi
+ LIBS=$lt_globsym_save_LIBS
+ CFLAGS=$lt_globsym_save_CFLAGS
+ else
+ echo "cannot find nm_test_func in $nlist" >&5
+ fi
+ else
+ echo "cannot find nm_test_var in $nlist" >&5
+ fi
+ else
+ echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
+ fi
+ else
+ echo "$progname: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ fi
+ rm -rf conftest* conftst*
+
+ # Do not use the global_symbol_pipe unless it works.
+ if test yes = "$pipe_works"; then
+ break
+ else
+ lt_cv_sys_global_symbol_pipe=
+ fi
+done
+
+fi
+
+if test -z "$lt_cv_sys_global_symbol_pipe"; then
+ lt_cv_sys_global_symbol_to_cdecl=
+fi
+if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: failed" >&5
+printf "%s\n" "failed" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ok" >&5
+printf "%s\n" "ok" >&6; }
+fi
+
+# Response file support.
+if test "$lt_cv_nm_interface" = "MS dumpbin"; then
+ nm_file_list_spec='@'
+elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then
+ nm_file_list_spec='@'
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
+printf %s "checking for sysroot... " >&6; }
+
+# Check whether --with-sysroot was given.
+if test ${with_sysroot+y}
+then :
+ withval=$with_sysroot;
+else $as_nop
+ with_sysroot=no
+fi
+
+
+lt_sysroot=
+case $with_sysroot in #(
+ yes)
+ if test yes = "$GCC"; then
+ lt_sysroot=`$CC --print-sysroot 2>/dev/null`
+ fi
+ ;; #(
+ /*)
+ lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
+ ;; #(
+ no|'')
+ ;; #(
+ *)
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_sysroot" >&5
+printf "%s\n" "$with_sysroot" >&6; }
+ as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5
+ ;;
+esac
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5
+printf "%s\n" "${lt_sysroot:-no}" >&6; }
+
+
+
+
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a working dd" >&5
+printf %s "checking for a working dd... " >&6; }
+if test ${ac_cv_path_lt_DD+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ printf 0123456789abcdef0123456789abcdef >conftest.i
+cat conftest.i conftest.i >conftest2.i
+: ${lt_DD:=$DD}
+if test -z "$lt_DD"; then
+ ac_path_lt_DD_found=false
+ # Loop through the user's path and test for each of PROGNAME-LIST
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_prog in dd
+ do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_lt_DD="$as_dir$ac_prog$ac_exec_ext"
+ as_fn_executable_p "$ac_path_lt_DD" || continue
+if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
+ cmp -s conftest.i conftest.out \
+ && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=:
+fi
+ $ac_path_lt_DD_found && break 3
+ done
+ done
+ done
+IFS=$as_save_IFS
+ if test -z "$ac_cv_path_lt_DD"; then
+ :
+ fi
+else
+ ac_cv_path_lt_DD=$lt_DD
+fi
+
+rm -f conftest.i conftest2.i conftest.out
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_lt_DD" >&5
+printf "%s\n" "$ac_cv_path_lt_DD" >&6; }
+
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to truncate binary pipes" >&5
+printf %s "checking how to truncate binary pipes... " >&6; }
+if test ${lt_cv_truncate_bin+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ printf 0123456789abcdef0123456789abcdef >conftest.i
+cat conftest.i conftest.i >conftest2.i
+lt_cv_truncate_bin=
+if "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
+ cmp -s conftest.i conftest.out \
+ && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1"
+fi
+rm -f conftest.i conftest2.i conftest.out
+test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_truncate_bin" >&5
+printf "%s\n" "$lt_cv_truncate_bin" >&6; }
+
+
+
+
+
+
+
+# Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
+func_cc_basename ()
+{
+ for cc_temp in $*""; do
+ case $cc_temp in
+ compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
+ distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
+ \-*) ;;
+ *) break;;
+ esac
+ done
+ func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
+}
+
+# Check whether --enable-libtool-lock was given.
+if test ${enable_libtool_lock+y}
+then :
+ enableval=$enable_libtool_lock;
+fi
+
+test no = "$enable_libtool_lock" || enable_libtool_lock=yes
+
+# Some flags need to be propagated to the compiler or linker for good
+# libtool support.
+case $host in
+ia64-*-hpux*)
+ # Find out what ABI is being produced by ac_compile, and set mode
+ # options accordingly.
+ echo 'int i;' > conftest.$ac_ext
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ case `/usr/bin/file conftest.$ac_objext` in
+ *ELF-32*)
+ HPUX_IA64_MODE=32
+ ;;
+ *ELF-64*)
+ HPUX_IA64_MODE=64
+ ;;
+ esac
+ fi
+ rm -rf conftest*
+ ;;
+*-*-irix6*)
+ # Find out what ABI is being produced by ac_compile, and set linker
+ # options accordingly.
+ echo '#line '$LINENO' "configure"' > conftest.$ac_ext
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ if test yes = "$lt_cv_prog_gnu_ld"; then
+ case `/usr/bin/file conftest.$ac_objext` in
+ *32-bit*)
+ LD="${LD-ld} -melf32bsmip"
+ ;;
+ *N32*)
+ LD="${LD-ld} -melf32bmipn32"
+ ;;
+ *64-bit*)
+ LD="${LD-ld} -melf64bmip"
+ ;;
+ esac
+ else
+ case `/usr/bin/file conftest.$ac_objext` in
+ *32-bit*)
+ LD="${LD-ld} -32"
+ ;;
+ *N32*)
+ LD="${LD-ld} -n32"
+ ;;
+ *64-bit*)
+ LD="${LD-ld} -64"
+ ;;
+ esac
+ fi
+ fi
+ rm -rf conftest*
+ ;;
+
+mips64*-*linux*)
+ # Find out what ABI is being produced by ac_compile, and set linker
+ # options accordingly.
+ echo '#line '$LINENO' "configure"' > conftest.$ac_ext
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ emul=elf
+ case `/usr/bin/file conftest.$ac_objext` in
+ *32-bit*)
+ emul="${emul}32"
+ ;;
+ *64-bit*)
+ emul="${emul}64"
+ ;;
+ esac
+ case `/usr/bin/file conftest.$ac_objext` in
+ *MSB*)
+ emul="${emul}btsmip"
+ ;;
+ *LSB*)
+ emul="${emul}ltsmip"
+ ;;
+ esac
+ case `/usr/bin/file conftest.$ac_objext` in
+ *N32*)
+ emul="${emul}n32"
+ ;;
+ esac
+ LD="${LD-ld} -m $emul"
+ fi
+ rm -rf conftest*
+ ;;
+
+x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
+s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
+ # Find out what ABI is being produced by ac_compile, and set linker
+ # options accordingly. Note that the listed cases only cover the
+ # situations where additional linker options are needed (such as when
+ # doing 32-bit compilation for a host where ld defaults to 64-bit, or
+ # vice versa); the common cases where no linker options are needed do
+ # not appear in the list.
+ echo 'int i;' > conftest.$ac_ext
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ case `/usr/bin/file conftest.o` in
+ *32-bit*)
+ case $host in
+ x86_64-*kfreebsd*-gnu)
+ LD="${LD-ld} -m elf_i386_fbsd"
+ ;;
+ x86_64-*linux*)
+ case `/usr/bin/file conftest.o` in
+ *x86-64*)
+ LD="${LD-ld} -m elf32_x86_64"
+ ;;
+ *)
+ LD="${LD-ld} -m elf_i386"
+ ;;
+ esac
+ ;;
+ powerpc64le-*linux*)
+ LD="${LD-ld} -m elf32lppclinux"
+ ;;
+ powerpc64-*linux*)
+ LD="${LD-ld} -m elf32ppclinux"
+ ;;
+ s390x-*linux*)
+ LD="${LD-ld} -m elf_s390"
+ ;;
+ sparc64-*linux*)
+ LD="${LD-ld} -m elf32_sparc"
+ ;;
+ esac
+ ;;
+ *64-bit*)
+ case $host in
+ x86_64-*kfreebsd*-gnu)
+ LD="${LD-ld} -m elf_x86_64_fbsd"
+ ;;
+ x86_64-*linux*)
+ LD="${LD-ld} -m elf_x86_64"
+ ;;
+ powerpcle-*linux*)
+ LD="${LD-ld} -m elf64lppc"
+ ;;
+ powerpc-*linux*)
+ LD="${LD-ld} -m elf64ppc"
+ ;;
+ s390*-*linux*|s390*-*tpf*)
+ LD="${LD-ld} -m elf64_s390"
+ ;;
+ sparc*-*linux*)
+ LD="${LD-ld} -m elf64_sparc"
+ ;;
+ esac
+ ;;
+ esac
+ fi
+ rm -rf conftest*
+ ;;
+
+*-*-sco3.2v5*)
+ # On SCO OpenServer 5, we need -belf to get full-featured binaries.
+ SAVE_CFLAGS=$CFLAGS
+ CFLAGS="$CFLAGS -belf"
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5
+printf %s "checking whether the C compiler needs -belf... " >&6; }
+if test ${lt_cv_cc_needs_belf+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ lt_cv_cc_needs_belf=yes
+else $as_nop
+ lt_cv_cc_needs_belf=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5
+printf "%s\n" "$lt_cv_cc_needs_belf" >&6; }
+ if test yes != "$lt_cv_cc_needs_belf"; then
+ # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
+ CFLAGS=$SAVE_CFLAGS
+ fi
+ ;;
+*-*solaris*)
+ # Find out what ABI is being produced by ac_compile, and set linker
+ # options accordingly.
+ echo 'int i;' > conftest.$ac_ext
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ case `/usr/bin/file conftest.o` in
+ *64-bit*)
+ case $lt_cv_prog_gnu_ld in
+ yes*)
+ case $host in
+ i?86-*-solaris*|x86_64-*-solaris*)
+ LD="${LD-ld} -m elf_x86_64"
+ ;;
+ sparc*-*-solaris*)
+ LD="${LD-ld} -m elf64_sparc"
+ ;;
+ esac
+ # GNU ld 2.21 introduced _sol2 emulations. Use them if available.
+ if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
+ LD=${LD-ld}_sol2
+ fi
+ ;;
+ *)
+ if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
+ LD="${LD-ld} -64"
+ fi
+ ;;
+ esac
+ ;;
+ esac
+ fi
+ rm -rf conftest*
+ ;;
+esac
+
+need_locks=$enable_libtool_lock
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args.
+set dummy ${ac_tool_prefix}mt; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_MANIFEST_TOOL+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$MANIFEST_TOOL"; then
+ ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL
+if test -n "$MANIFEST_TOOL"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5
+printf "%s\n" "$MANIFEST_TOOL" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_MANIFEST_TOOL"; then
+ ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL
+ # Extract the first word of "mt", so it can be a program name with args.
+set dummy mt; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_MANIFEST_TOOL+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$ac_ct_MANIFEST_TOOL"; then
+ ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_MANIFEST_TOOL="mt"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL
+if test -n "$ac_ct_MANIFEST_TOOL"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5
+printf "%s\n" "$ac_ct_MANIFEST_TOOL" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+ if test "x$ac_ct_MANIFEST_TOOL" = x; then
+ MANIFEST_TOOL=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL
+ fi
+else
+ MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL"
+fi
+
+test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5
+printf %s "checking if $MANIFEST_TOOL is a manifest tool... " >&6; }
+if test ${lt_cv_path_mainfest_tool+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ lt_cv_path_mainfest_tool=no
+ echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5
+ $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
+ cat conftest.err >&5
+ if $GREP 'Manifest Tool' conftest.out > /dev/null; then
+ lt_cv_path_mainfest_tool=yes
+ fi
+ rm -f conftest*
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5
+printf "%s\n" "$lt_cv_path_mainfest_tool" >&6; }
+if test yes != "$lt_cv_path_mainfest_tool"; then
+ MANIFEST_TOOL=:
+fi
+
+
+
+
+
+
+ case $host_os in
+ rhapsody* | darwin*)
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args.
+set dummy ${ac_tool_prefix}dsymutil; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_DSYMUTIL+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$DSYMUTIL"; then
+ ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+DSYMUTIL=$ac_cv_prog_DSYMUTIL
+if test -n "$DSYMUTIL"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
+printf "%s\n" "$DSYMUTIL" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_DSYMUTIL"; then
+ ac_ct_DSYMUTIL=$DSYMUTIL
+ # Extract the first word of "dsymutil", so it can be a program name with args.
+set dummy dsymutil; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_DSYMUTIL+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$ac_ct_DSYMUTIL"; then
+ ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_DSYMUTIL="dsymutil"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL
+if test -n "$ac_ct_DSYMUTIL"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5
+printf "%s\n" "$ac_ct_DSYMUTIL" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+ if test "x$ac_ct_DSYMUTIL" = x; then
+ DSYMUTIL=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ DSYMUTIL=$ac_ct_DSYMUTIL
+ fi
+else
+ DSYMUTIL="$ac_cv_prog_DSYMUTIL"
+fi
+
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args.
+set dummy ${ac_tool_prefix}nmedit; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_NMEDIT+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$NMEDIT"; then
+ ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+NMEDIT=$ac_cv_prog_NMEDIT
+if test -n "$NMEDIT"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5
+printf "%s\n" "$NMEDIT" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_NMEDIT"; then
+ ac_ct_NMEDIT=$NMEDIT
+ # Extract the first word of "nmedit", so it can be a program name with args.
+set dummy nmedit; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_NMEDIT+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$ac_ct_NMEDIT"; then
+ ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_NMEDIT="nmedit"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT
+if test -n "$ac_ct_NMEDIT"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5
+printf "%s\n" "$ac_ct_NMEDIT" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+ if test "x$ac_ct_NMEDIT" = x; then
+ NMEDIT=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ NMEDIT=$ac_ct_NMEDIT
+ fi
+else
+ NMEDIT="$ac_cv_prog_NMEDIT"
+fi
+
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args.
+set dummy ${ac_tool_prefix}lipo; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_LIPO+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$LIPO"; then
+ ac_cv_prog_LIPO="$LIPO" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_LIPO="${ac_tool_prefix}lipo"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+LIPO=$ac_cv_prog_LIPO
+if test -n "$LIPO"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
+printf "%s\n" "$LIPO" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_LIPO"; then
+ ac_ct_LIPO=$LIPO
+ # Extract the first word of "lipo", so it can be a program name with args.
+set dummy lipo; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_LIPO+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$ac_ct_LIPO"; then
+ ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_LIPO="lipo"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO
+if test -n "$ac_ct_LIPO"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5
+printf "%s\n" "$ac_ct_LIPO" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+ if test "x$ac_ct_LIPO" = x; then
+ LIPO=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ LIPO=$ac_ct_LIPO
+ fi
+else
+ LIPO="$ac_cv_prog_LIPO"
+fi
+
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args.
+set dummy ${ac_tool_prefix}otool; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_OTOOL+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$OTOOL"; then
+ ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_OTOOL="${ac_tool_prefix}otool"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+OTOOL=$ac_cv_prog_OTOOL
+if test -n "$OTOOL"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
+printf "%s\n" "$OTOOL" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_OTOOL"; then
+ ac_ct_OTOOL=$OTOOL
+ # Extract the first word of "otool", so it can be a program name with args.
+set dummy otool; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_OTOOL+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$ac_ct_OTOOL"; then
+ ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_OTOOL="otool"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL
+if test -n "$ac_ct_OTOOL"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5
+printf "%s\n" "$ac_ct_OTOOL" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+ if test "x$ac_ct_OTOOL" = x; then
+ OTOOL=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ OTOOL=$ac_ct_OTOOL
+ fi
+else
+ OTOOL="$ac_cv_prog_OTOOL"
+fi
+
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args.
+set dummy ${ac_tool_prefix}otool64; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_OTOOL64+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$OTOOL64"; then
+ ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+OTOOL64=$ac_cv_prog_OTOOL64
+if test -n "$OTOOL64"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5
+printf "%s\n" "$OTOOL64" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_OTOOL64"; then
+ ac_ct_OTOOL64=$OTOOL64
+ # Extract the first word of "otool64", so it can be a program name with args.
+set dummy otool64; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_OTOOL64+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$ac_ct_OTOOL64"; then
+ ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_OTOOL64="otool64"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64
+if test -n "$ac_ct_OTOOL64"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5
+printf "%s\n" "$ac_ct_OTOOL64" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+ if test "x$ac_ct_OTOOL64" = x; then
+ OTOOL64=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ OTOOL64=$ac_ct_OTOOL64
+ fi
+else
+ OTOOL64="$ac_cv_prog_OTOOL64"
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5
+printf %s "checking for -single_module linker flag... " >&6; }
+if test ${lt_cv_apple_cc_single_mod+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ lt_cv_apple_cc_single_mod=no
+ if test -z "$LT_MULTI_MODULE"; then
+ # By default we will add the -single_module flag. You can override
+ # by either setting the environment variable LT_MULTI_MODULE
+ # non-empty at configure time, or by adding -multi_module to the
+ # link flags.
+ rm -rf libconftest.dylib*
+ echo "int foo(void){return 1;}" > conftest.c
+ echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
+-dynamiclib -Wl,-single_module conftest.c" >&5
+ $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
+ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
+ _lt_result=$?
+ # If there is a non-empty error log, and "single_module"
+ # appears in it, assume the flag caused a linker warning
+ if test -s conftest.err && $GREP single_module conftest.err; then
+ cat conftest.err >&5
+ # Otherwise, if the output was created with a 0 exit code from
+ # the compiler, it worked.
+ elif test -f libconftest.dylib && test 0 = "$_lt_result"; then
+ lt_cv_apple_cc_single_mod=yes
+ else
+ cat conftest.err >&5
+ fi
+ rm -rf libconftest.dylib*
+ rm -f conftest.*
+ fi
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5
+printf "%s\n" "$lt_cv_apple_cc_single_mod" >&6; }
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5
+printf %s "checking for -exported_symbols_list linker flag... " >&6; }
+if test ${lt_cv_ld_exported_symbols_list+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ lt_cv_ld_exported_symbols_list=no
+ save_LDFLAGS=$LDFLAGS
+ echo "_main" > conftest.sym
+ LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ lt_cv_ld_exported_symbols_list=yes
+else $as_nop
+ lt_cv_ld_exported_symbols_list=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+ LDFLAGS=$save_LDFLAGS
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5
+printf "%s\n" "$lt_cv_ld_exported_symbols_list" >&6; }
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5
+printf %s "checking for -force_load linker flag... " >&6; }
+if test ${lt_cv_ld_force_load+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ lt_cv_ld_force_load=no
+ cat > conftest.c << _LT_EOF
+int forced_loaded() { return 2;}
+_LT_EOF
+ echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5
+ $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5
+ echo "$AR cr libconftest.a conftest.o" >&5
+ $AR cr libconftest.a conftest.o 2>&5
+ echo "$RANLIB libconftest.a" >&5
+ $RANLIB libconftest.a 2>&5
+ cat > conftest.c << _LT_EOF
+int main() { return 0;}
+_LT_EOF
+ echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5
+ $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
+ _lt_result=$?
+ if test -s conftest.err && $GREP force_load conftest.err; then
+ cat conftest.err >&5
+ elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then
+ lt_cv_ld_force_load=yes
+ else
+ cat conftest.err >&5
+ fi
+ rm -f conftest.err libconftest.a conftest conftest.c
+ rm -rf conftest.dSYM
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5
+printf "%s\n" "$lt_cv_ld_force_load" >&6; }
+ case $host_os in
+ rhapsody* | darwin1.[012])
+ _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;;
+ darwin1.*)
+ _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
+ darwin*) # darwin 5.x on
+ # if running on 10.5 or later, the deployment target defaults
+ # to the OS version, if on x86, and 10.4, the deployment
+ # target defaults to 10.4. Don't you love it?
+ case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
+ 10.0,*86*-darwin8*|10.0,*-darwin[912]*)
+ _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
+ 10.[012][,.]*)
+ _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
+ 10.*|11.*)
+ _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
+ esac
+ ;;
+ esac
+ if test yes = "$lt_cv_apple_cc_single_mod"; then
+ _lt_dar_single_mod='$single_module'
+ fi
+ if test yes = "$lt_cv_ld_exported_symbols_list"; then
+ _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym'
+ else
+ _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib'
+ fi
+ if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then
+ _lt_dsymutil='~$DSYMUTIL $lib || :'
+ else
+ _lt_dsymutil=
+ fi
+ ;;
+ esac
+
+# func_munge_path_list VARIABLE PATH
+# -----------------------------------
+# VARIABLE is name of variable containing _space_ separated list of
+# directories to be munged by the contents of PATH, which is string
+# having a format:
+# "DIR[:DIR]:"
+# string "DIR[ DIR]" will be prepended to VARIABLE
+# ":DIR[:DIR]"
+# string "DIR[ DIR]" will be appended to VARIABLE
+# "DIRP[:DIRP]::[DIRA:]DIRA"
+# string "DIRP[ DIRP]" will be prepended to VARIABLE and string
+# "DIRA[ DIRA]" will be appended to VARIABLE
+# "DIR[:DIR]"
+# VARIABLE will be replaced by "DIR[ DIR]"
+func_munge_path_list ()
+{
+ case x$2 in
+ x)
+ ;;
+ *:)
+ eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\"
+ ;;
+ x:*)
+ eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\"
+ ;;
+ *::*)
+ eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
+ eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\"
+ ;;
+ *)
+ eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\"
+ ;;
+ esac
+}
+
+ac_header= ac_cache=
+for ac_item in $ac_header_c_list
+do
+ if test $ac_cache; then
+ ac_fn_c_check_header_compile "$LINENO" $ac_header ac_cv_header_$ac_cache "$ac_includes_default"
+ if eval test \"x\$ac_cv_header_$ac_cache\" = xyes; then
+ printf "%s\n" "#define $ac_item 1" >> confdefs.h
+ fi
+ ac_header= ac_cache=
+ elif test $ac_header; then
+ ac_cache=$ac_item
+ else
+ ac_header=$ac_item
+ fi
+done
+
+
+
+
+
+
+
+
+if test $ac_cv_header_stdlib_h = yes && test $ac_cv_header_string_h = yes
+then :
+
+printf "%s\n" "#define STDC_HEADERS 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
+"
+if test "x$ac_cv_header_dlfcn_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_DLFCN_H 1" >>confdefs.h
+
+fi
+
+
+
+func_stripname_cnf ()
+{
+ case $2 in
+ .*) func_stripname_result=`$ECHO "$3" | $SED "s%^$1%%; s%\\\\$2\$%%"`;;
+ *) func_stripname_result=`$ECHO "$3" | $SED "s%^$1%%; s%$2\$%%"`;;
+ esac
+} # func_stripname_cnf
+
+
+
+
+
+# Set options
+enable_win32_dll=yes
+
+case $host in
+*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
+set dummy ${ac_tool_prefix}as; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_AS+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$AS"; then
+ ac_cv_prog_AS="$AS" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_AS="${ac_tool_prefix}as"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+AS=$ac_cv_prog_AS
+if test -n "$AS"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
+printf "%s\n" "$AS" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_AS"; then
+ ac_ct_AS=$AS
+ # Extract the first word of "as", so it can be a program name with args.
+set dummy as; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_AS+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$ac_ct_AS"; then
+ ac_cv_prog_ac_ct_AS="$ac_ct_AS" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_AS="as"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_AS=$ac_cv_prog_ac_ct_AS
+if test -n "$ac_ct_AS"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AS" >&5
+printf "%s\n" "$ac_ct_AS" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+ if test "x$ac_ct_AS" = x; then
+ AS="false"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ AS=$ac_ct_AS
+ fi
+else
+ AS="$ac_cv_prog_AS"
+fi
+
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
+set dummy ${ac_tool_prefix}dlltool; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_DLLTOOL+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$DLLTOOL"; then
+ ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+DLLTOOL=$ac_cv_prog_DLLTOOL
+if test -n "$DLLTOOL"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
+printf "%s\n" "$DLLTOOL" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_DLLTOOL"; then
+ ac_ct_DLLTOOL=$DLLTOOL
+ # Extract the first word of "dlltool", so it can be a program name with args.
+set dummy dlltool; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_DLLTOOL+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$ac_ct_DLLTOOL"; then
+ ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_DLLTOOL="dlltool"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
+if test -n "$ac_ct_DLLTOOL"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
+printf "%s\n" "$ac_ct_DLLTOOL" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+ if test "x$ac_ct_DLLTOOL" = x; then
+ DLLTOOL="false"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ DLLTOOL=$ac_ct_DLLTOOL
+ fi
+else
+ DLLTOOL="$ac_cv_prog_DLLTOOL"
+fi
+
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
+set dummy ${ac_tool_prefix}objdump; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_OBJDUMP+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$OBJDUMP"; then
+ ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+OBJDUMP=$ac_cv_prog_OBJDUMP
+if test -n "$OBJDUMP"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
+printf "%s\n" "$OBJDUMP" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_OBJDUMP"; then
+ ac_ct_OBJDUMP=$OBJDUMP
+ # Extract the first word of "objdump", so it can be a program name with args.
+set dummy objdump; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_OBJDUMP+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$ac_ct_OBJDUMP"; then
+ ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_OBJDUMP="objdump"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
+if test -n "$ac_ct_OBJDUMP"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
+printf "%s\n" "$ac_ct_OBJDUMP" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+ if test "x$ac_ct_OBJDUMP" = x; then
+ OBJDUMP="false"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ OBJDUMP=$ac_ct_OBJDUMP
+ fi
+else
+ OBJDUMP="$ac_cv_prog_OBJDUMP"
+fi
+
+ ;;
+esac
+
+test -z "$AS" && AS=as
+
+
+
+
+
+test -z "$DLLTOOL" && DLLTOOL=dlltool
+
+
+
+
+
+test -z "$OBJDUMP" && OBJDUMP=objdump
+
+
+
+
+# Check whether --enable-static was given.
+if test ${enable_static+y}
+then :
+ enableval=$enable_static; p=${PACKAGE-default}
+ case $enableval in
+ yes) enable_static=yes ;;
+ no) enable_static=no ;;
+ *)
+ enable_static=no
+ # Look at the argument we got. We use all the common list separators.
+ lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
+ for pkg in $enableval; do
+ IFS=$lt_save_ifs
+ if test "X$pkg" = "X$p"; then
+ enable_static=yes
+ fi
+ done
+ IFS=$lt_save_ifs
+ ;;
+ esac
+else $as_nop
+ enable_static=no
+fi
+
+
+
+
+
+
+
+
+# Check whether --with-pic was given.
+if test ${with_pic+y}
+then :
+ withval=$with_pic; lt_p=${PACKAGE-default}
+ case $withval in
+ yes|no) pic_mode=$withval ;;
+ *)
+ pic_mode=default
+ # Look at the argument we got. We use all the common list separators.
+ lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
+ for lt_pkg in $withval; do
+ IFS=$lt_save_ifs
+ if test "X$lt_pkg" = "X$lt_p"; then
+ pic_mode=yes
+ fi
+ done
+ IFS=$lt_save_ifs
+ ;;
+ esac
+else $as_nop
+ pic_mode=yes
+fi
+
+
+
+
+
+
+
+
+
+ enable_dlopen=no
+
+
+
+ # Check whether --enable-shared was given.
+if test ${enable_shared+y}
+then :
+ enableval=$enable_shared; p=${PACKAGE-default}
+ case $enableval in
+ yes) enable_shared=yes ;;
+ no) enable_shared=no ;;
+ *)
+ enable_shared=no
+ # Look at the argument we got. We use all the common list separators.
+ lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
+ for pkg in $enableval; do
+ IFS=$lt_save_ifs
+ if test "X$pkg" = "X$p"; then
+ enable_shared=yes
+ fi
+ done
+ IFS=$lt_save_ifs
+ ;;
+ esac
+else $as_nop
+ enable_shared=yes
+fi
+
+
+
+
+
+
+
+
+
+
+
+ # Check whether --enable-fast-install was given.
+if test ${enable_fast_install+y}
+then :
+ enableval=$enable_fast_install; p=${PACKAGE-default}
+ case $enableval in
+ yes) enable_fast_install=yes ;;
+ no) enable_fast_install=no ;;
+ *)
+ enable_fast_install=no
+ # Look at the argument we got. We use all the common list separators.
+ lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
+ for pkg in $enableval; do
+ IFS=$lt_save_ifs
+ if test "X$pkg" = "X$p"; then
+ enable_fast_install=yes
+ fi
+ done
+ IFS=$lt_save_ifs
+ ;;
+ esac
+else $as_nop
+ enable_fast_install=yes
+fi
+
+
+
+
+
+
+
+
+ shared_archive_member_spec=
+case $host,$enable_shared in
+power*-*-aix[5-9]*,yes)
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking which variant of shared library versioning to provide" >&5
+printf %s "checking which variant of shared library versioning to provide... " >&6; }
+
+# Check whether --with-aix-soname was given.
+if test ${with_aix_soname+y}
+then :
+ withval=$with_aix_soname; case $withval in
+ aix|svr4|both)
+ ;;
+ *)
+ as_fn_error $? "Unknown argument to --with-aix-soname" "$LINENO" 5
+ ;;
+ esac
+ lt_cv_with_aix_soname=$with_aix_soname
+else $as_nop
+ if test ${lt_cv_with_aix_soname+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ lt_cv_with_aix_soname=aix
+fi
+
+ with_aix_soname=$lt_cv_with_aix_soname
+fi
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_aix_soname" >&5
+printf "%s\n" "$with_aix_soname" >&6; }
+ if test aix != "$with_aix_soname"; then
+ # For the AIX way of multilib, we name the shared archive member
+ # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o',
+ # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File.
+ # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag,
+ # the AIX toolchain works better with OBJECT_MODE set (default 32).
+ if test 64 = "${OBJECT_MODE-32}"; then
+ shared_archive_member_spec=shr_64
+ else
+ shared_archive_member_spec=shr
+ fi
+ fi
+ ;;
+*)
+ with_aix_soname=aix
+ ;;
+esac
+
+
+
+
+
+
+
+
+
+
+# This can be used to rebuild libtool when needed
+LIBTOOL_DEPS=$ltmain
+
+# Always use our own libtool.
+LIBTOOL='$(SHELL) $(top_builddir)/libtool'
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+test -z "$LN_S" && LN_S="ln -s"
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+if test -n "${ZSH_VERSION+set}"; then
+ setopt NO_GLOB_SUBST
+fi
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5
+printf %s "checking for objdir... " >&6; }
+if test ${lt_cv_objdir+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ rm -f .libs 2>/dev/null
+mkdir .libs 2>/dev/null
+if test -d .libs; then
+ lt_cv_objdir=.libs
+else
+ # MS-DOS does not allow filenames that begin with a dot.
+ lt_cv_objdir=_libs
+fi
+rmdir .libs 2>/dev/null
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5
+printf "%s\n" "$lt_cv_objdir" >&6; }
+objdir=$lt_cv_objdir
+
+
+
+
+
+printf "%s\n" "#define LT_OBJDIR \"$lt_cv_objdir/\"" >>confdefs.h
+
+
+
+
+case $host_os in
+aix3*)
+ # AIX sometimes has problems with the GCC collect2 program. For some
+ # reason, if we set the COLLECT_NAMES environment variable, the problems
+ # vanish in a puff of smoke.
+ if test set != "${COLLECT_NAMES+set}"; then
+ COLLECT_NAMES=
+ export COLLECT_NAMES
+ fi
+ ;;
+esac
+
+# Global variables:
+ofile=libtool
+can_build_shared=yes
+
+# All known linkers require a '.a' archive for static linking (except MSVC,
+# which needs '.lib').
+libext=a
+
+with_gnu_ld=$lt_cv_prog_gnu_ld
+
+old_CC=$CC
+old_CFLAGS=$CFLAGS
+
+# Set sane defaults for various variables
+test -z "$CC" && CC=cc
+test -z "$LTCC" && LTCC=$CC
+test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
+test -z "$LD" && LD=ld
+test -z "$ac_objext" && ac_objext=o
+
+func_cc_basename $compiler
+cc_basename=$func_cc_basename_result
+
+
+# Only perform the check for file, if the check method requires it
+test -z "$MAGIC_CMD" && MAGIC_CMD=file
+case $deplibs_check_method in
+file_magic*)
+ if test "$file_magic_cmd" = '$MAGIC_CMD'; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5
+printf %s "checking for ${ac_tool_prefix}file... " >&6; }
+if test ${lt_cv_path_MAGIC_CMD+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ case $MAGIC_CMD in
+[\\/*] | ?:[\\/]*)
+ lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
+ ;;
+*)
+ lt_save_MAGIC_CMD=$MAGIC_CMD
+ lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
+ ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
+ for ac_dir in $ac_dummy; do
+ IFS=$lt_save_ifs
+ test -z "$ac_dir" && ac_dir=.
+ if test -f "$ac_dir/${ac_tool_prefix}file"; then
+ lt_cv_path_MAGIC_CMD=$ac_dir/"${ac_tool_prefix}file"
+ if test -n "$file_magic_test_file"; then
+ case $deplibs_check_method in
+ "file_magic "*)
+ file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
+ MAGIC_CMD=$lt_cv_path_MAGIC_CMD
+ if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
+ $EGREP "$file_magic_regex" > /dev/null; then
+ :
+ else
+ cat <<_LT_EOF 1>&2
+
+*** Warning: the command libtool uses to detect shared libraries,
+*** $file_magic_cmd, produces output that libtool cannot recognize.
+*** The result is that libtool may fail to recognize shared libraries
+*** as such. This will affect the creation of libtool libraries that
+*** depend on shared libraries, but programs linked with such libtool
+*** libraries will work regardless of this problem. Nevertheless, you
+*** may want to report the problem to your system manager and/or to
+*** bug-libtool@gnu.org
+
+_LT_EOF
+ fi ;;
+ esac
+ fi
+ break
+ fi
+ done
+ IFS=$lt_save_ifs
+ MAGIC_CMD=$lt_save_MAGIC_CMD
+ ;;
+esac
+fi
+
+MAGIC_CMD=$lt_cv_path_MAGIC_CMD
+if test -n "$MAGIC_CMD"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
+printf "%s\n" "$MAGIC_CMD" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+
+
+
+if test -z "$lt_cv_path_MAGIC_CMD"; then
+ if test -n "$ac_tool_prefix"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for file" >&5
+printf %s "checking for file... " >&6; }
+if test ${lt_cv_path_MAGIC_CMD+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ case $MAGIC_CMD in
+[\\/*] | ?:[\\/]*)
+ lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
+ ;;
+*)
+ lt_save_MAGIC_CMD=$MAGIC_CMD
+ lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
+ ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
+ for ac_dir in $ac_dummy; do
+ IFS=$lt_save_ifs
+ test -z "$ac_dir" && ac_dir=.
+ if test -f "$ac_dir/file"; then
+ lt_cv_path_MAGIC_CMD=$ac_dir/"file"
+ if test -n "$file_magic_test_file"; then
+ case $deplibs_check_method in
+ "file_magic "*)
+ file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
+ MAGIC_CMD=$lt_cv_path_MAGIC_CMD
+ if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
+ $EGREP "$file_magic_regex" > /dev/null; then
+ :
+ else
+ cat <<_LT_EOF 1>&2
+
+*** Warning: the command libtool uses to detect shared libraries,
+*** $file_magic_cmd, produces output that libtool cannot recognize.
+*** The result is that libtool may fail to recognize shared libraries
+*** as such. This will affect the creation of libtool libraries that
+*** depend on shared libraries, but programs linked with such libtool
+*** libraries will work regardless of this problem. Nevertheless, you
+*** may want to report the problem to your system manager and/or to
+*** bug-libtool@gnu.org
+
+_LT_EOF
+ fi ;;
+ esac
+ fi
+ break
+ fi
+ done
+ IFS=$lt_save_ifs
+ MAGIC_CMD=$lt_save_MAGIC_CMD
+ ;;
+esac
+fi
+
+MAGIC_CMD=$lt_cv_path_MAGIC_CMD
+if test -n "$MAGIC_CMD"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
+printf "%s\n" "$MAGIC_CMD" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+ else
+ MAGIC_CMD=:
+ fi
+fi
+
+ fi
+ ;;
+esac
+
+# Use C for the default configuration in the libtool script
+
+lt_save_CC=$CC
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+# Source file extension for C test sources.
+ac_ext=c
+
+# Object file extension for compiled C test sources.
+objext=o
+objext=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="int some_variable = 0;"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='int main(){return(0);}'
+
+
+
+
+
+
+
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
+
+# If no C compiler flags were specified, use CFLAGS.
+LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
+
+# Allow CC to be a program name with arguments.
+compiler=$CC
+
+# Save the default compiler, since it gets overwritten when the other
+# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
+compiler_DEFAULT=$CC
+
+# save warnings/boilerplate of simple test code
+ac_outfile=conftest.$ac_objext
+echo "$lt_simple_compile_test_code" >conftest.$ac_ext
+eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_compiler_boilerplate=`cat conftest.err`
+$RM conftest*
+
+ac_outfile=conftest.$ac_objext
+echo "$lt_simple_link_test_code" >conftest.$ac_ext
+eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_linker_boilerplate=`cat conftest.err`
+$RM -r conftest*
+
+
+## CAVEAT EMPTOR:
+## There is no encapsulation within the following macros, do not change
+## the running order or otherwise move them around unless you know exactly
+## what you are doing...
+if test -n "$compiler"; then
+
+lt_prog_compiler_no_builtin_flag=
+
+if test yes = "$GCC"; then
+ case $cc_basename in
+ nvcc*)
+ lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;;
+ *)
+ lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;;
+ esac
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
+printf %s "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; }
+if test ${lt_cv_prog_compiler_rtti_exceptions+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ lt_cv_prog_compiler_rtti_exceptions=no
+ ac_outfile=conftest.$ac_objext
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+ lt_compiler_flag="-fno-rtti -fno-exceptions" ## exclude from sc_useless_quotes_in_assignment
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ # The option is referenced via a variable to avoid confusing sed.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>conftest.err)
+ ac_status=$?
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ if (exit $ac_status) && test -s "$ac_outfile"; then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings other than the usual output.
+ $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+ if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
+ lt_cv_prog_compiler_rtti_exceptions=yes
+ fi
+ fi
+ $RM conftest*
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
+printf "%s\n" "$lt_cv_prog_compiler_rtti_exceptions" >&6; }
+
+if test yes = "$lt_cv_prog_compiler_rtti_exceptions"; then
+ lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
+else
+ :
+fi
+
+fi
+
+
+
+
+
+
+ lt_prog_compiler_wl=
+lt_prog_compiler_pic=
+lt_prog_compiler_static=
+
+
+ if test yes = "$GCC"; then
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_static='-static'
+
+ case $host_os in
+ aix*)
+ # All AIX code is PIC.
+ if test ia64 = "$host_cpu"; then
+ # AIX 5 now supports IA64 processor
+ lt_prog_compiler_static='-Bstatic'
+ fi
+ lt_prog_compiler_pic='-fPIC'
+ ;;
+
+ amigaos*)
+ case $host_cpu in
+ powerpc)
+ # see comment about AmigaOS4 .so support
+ lt_prog_compiler_pic='-fPIC'
+ ;;
+ m68k)
+ # FIXME: we need at least 68020 code to build shared libraries, but
+ # adding the '-m68020' flag to GCC prevents building anything better,
+ # like '-m68040'.
+ lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
+ ;;
+ esac
+ ;;
+
+ beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+ # PIC is the default for these OSes.
+ ;;
+
+ mingw* | cygwin* | pw32* | os2* | cegcc*)
+ # This hack is so that the source file can tell whether it is being
+ # built for inclusion in a dll (and should export symbols for example).
+ # Although the cygwin gcc ignores -fPIC, still need this for old-style
+ # (--disable-auto-import) libraries
+ lt_prog_compiler_pic='-DDLL_EXPORT'
+ case $host_os in
+ os2*)
+ lt_prog_compiler_static='$wl-static'
+ ;;
+ esac
+ ;;
+
+ darwin* | rhapsody*)
+ # PIC is the default on this platform
+ # Common symbols not allowed in MH_DYLIB files
+ lt_prog_compiler_pic='-fno-common'
+ ;;
+
+ haiku*)
+ # PIC is the default for Haiku.
+ # The "-static" flag exists, but is broken.
+ lt_prog_compiler_static=
+ ;;
+
+ hpux*)
+ # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
+ # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
+ # sets the default TLS model and affects inlining.
+ case $host_cpu in
+ hppa*64*)
+ # +Z the default
+ ;;
+ *)
+ lt_prog_compiler_pic='-fPIC'
+ ;;
+ esac
+ ;;
+
+ interix[3-9]*)
+ # Interix 3.x gcc -fpic/-fPIC options generate broken code.
+ # Instead, we relocate shared libraries at runtime.
+ ;;
+
+ msdosdjgpp*)
+ # Just because we use GCC doesn't mean we suddenly get shared libraries
+ # on systems that don't support them.
+ lt_prog_compiler_can_build_shared=no
+ enable_shared=no
+ ;;
+
+ *nto* | *qnx*)
+ # QNX uses GNU C++, but need to define -shared option too, otherwise
+ # it will coredump.
+ lt_prog_compiler_pic='-fPIC -shared'
+ ;;
+
+ sysv4*MP*)
+ if test -d /usr/nec; then
+ lt_prog_compiler_pic=-Kconform_pic
+ fi
+ ;;
+
+ *)
+ lt_prog_compiler_pic='-fPIC'
+ ;;
+ esac
+
+ case $cc_basename in
+ nvcc*) # Cuda Compiler Driver 2.2
+ lt_prog_compiler_wl='-Xlinker '
+ if test -n "$lt_prog_compiler_pic"; then
+ lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic"
+ fi
+ ;;
+ esac
+ else
+ # PORTME Check for flag to pass linker flags through the system compiler.
+ case $host_os in
+ aix*)
+ lt_prog_compiler_wl='-Wl,'
+ if test ia64 = "$host_cpu"; then
+ # AIX 5 now supports IA64 processor
+ lt_prog_compiler_static='-Bstatic'
+ else
+ lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp'
+ fi
+ ;;
+
+ darwin* | rhapsody*)
+ # PIC is the default on this platform
+ # Common symbols not allowed in MH_DYLIB files
+ lt_prog_compiler_pic='-fno-common'
+ case $cc_basename in
+ nagfor*)
+ # NAG Fortran compiler
+ lt_prog_compiler_wl='-Wl,-Wl,,'
+ lt_prog_compiler_pic='-PIC'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+ esac
+ ;;
+
+ mingw* | cygwin* | pw32* | os2* | cegcc*)
+ # This hack is so that the source file can tell whether it is being
+ # built for inclusion in a dll (and should export symbols for example).
+ lt_prog_compiler_pic='-DDLL_EXPORT'
+ case $host_os in
+ os2*)
+ lt_prog_compiler_static='$wl-static'
+ ;;
+ esac
+ ;;
+
+ hpux9* | hpux10* | hpux11*)
+ lt_prog_compiler_wl='-Wl,'
+ # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+ # not for PA HP-UX.
+ case $host_cpu in
+ hppa*64*|ia64*)
+ # +Z the default
+ ;;
+ *)
+ lt_prog_compiler_pic='+Z'
+ ;;
+ esac
+ # Is there a better lt_prog_compiler_static that works with the bundled CC?
+ lt_prog_compiler_static='$wl-a ${wl}archive'
+ ;;
+
+ irix5* | irix6* | nonstopux*)
+ lt_prog_compiler_wl='-Wl,'
+ # PIC (with -KPIC) is the default.
+ lt_prog_compiler_static='-non_shared'
+ ;;
+
+ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
+ case $cc_basename in
+ # old Intel for x86_64, which still supported -KPIC.
+ ecc*)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-static'
+ ;;
+ # flang / f18. f95 an alias for gfortran or flang on Debian
+ flang* | f18* | f95*)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-fPIC'
+ lt_prog_compiler_static='-static'
+ ;;
+ # icc used to be incompatible with GCC.
+ # ICC 10 doesn't accept -KPIC any more.
+ icc* | ifort*)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-fPIC'
+ lt_prog_compiler_static='-static'
+ ;;
+ # Lahey Fortran 8.1.
+ lf95*)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='--shared'
+ lt_prog_compiler_static='--static'
+ ;;
+ nagfor*)
+ # NAG Fortran compiler
+ lt_prog_compiler_wl='-Wl,-Wl,,'
+ lt_prog_compiler_pic='-PIC'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+ tcc*)
+ # Fabrice Bellard et al's Tiny C Compiler
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-fPIC'
+ lt_prog_compiler_static='-static'
+ ;;
+ pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
+ # Portland Group compilers (*not* the Pentium gcc compiler,
+ # which looks to be a dead project)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-fpic'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+ ccc*)
+ lt_prog_compiler_wl='-Wl,'
+ # All Alpha code is PIC.
+ lt_prog_compiler_static='-non_shared'
+ ;;
+ xl* | bgxl* | bgf* | mpixl*)
+ # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-qpic'
+ lt_prog_compiler_static='-qstaticlink'
+ ;;
+ *)
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*)
+ # Sun Fortran 8.3 passes all unrecognized flags to the linker
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-Bstatic'
+ lt_prog_compiler_wl=''
+ ;;
+ *Sun\ F* | *Sun*Fortran*)
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-Bstatic'
+ lt_prog_compiler_wl='-Qoption ld '
+ ;;
+ *Sun\ C*)
+ # Sun C 5.9
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-Bstatic'
+ lt_prog_compiler_wl='-Wl,'
+ ;;
+ *Intel*\ [CF]*Compiler*)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-fPIC'
+ lt_prog_compiler_static='-static'
+ ;;
+ *Portland\ Group*)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-fpic'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+
+ newsos6)
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+
+ *nto* | *qnx*)
+ # QNX uses GNU C++, but need to define -shared option too, otherwise
+ # it will coredump.
+ lt_prog_compiler_pic='-fPIC -shared'
+ ;;
+
+ osf3* | osf4* | osf5*)
+ lt_prog_compiler_wl='-Wl,'
+ # All OSF/1 code is PIC.
+ lt_prog_compiler_static='-non_shared'
+ ;;
+
+ rdos*)
+ lt_prog_compiler_static='-non_shared'
+ ;;
+
+ solaris*)
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-Bstatic'
+ case $cc_basename in
+ f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
+ lt_prog_compiler_wl='-Qoption ld ';;
+ *)
+ lt_prog_compiler_wl='-Wl,';;
+ esac
+ ;;
+
+ sunos4*)
+ lt_prog_compiler_wl='-Qoption ld '
+ lt_prog_compiler_pic='-PIC'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+
+ sysv4 | sysv4.2uw2* | sysv4.3*)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+
+ sysv4*MP*)
+ if test -d /usr/nec; then
+ lt_prog_compiler_pic='-Kconform_pic'
+ lt_prog_compiler_static='-Bstatic'
+ fi
+ ;;
+
+ sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+
+ unicos*)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_can_build_shared=no
+ ;;
+
+ uts4*)
+ lt_prog_compiler_pic='-pic'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+
+ *)
+ lt_prog_compiler_can_build_shared=no
+ ;;
+ esac
+ fi
+
+case $host_os in
+ # For platforms that do not support PIC, -DPIC is meaningless:
+ *djgpp*)
+ lt_prog_compiler_pic=
+ ;;
+ *)
+ lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
+ ;;
+esac
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
+printf %s "checking for $compiler option to produce PIC... " >&6; }
+if test ${lt_cv_prog_compiler_pic+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ lt_cv_prog_compiler_pic=$lt_prog_compiler_pic
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5
+printf "%s\n" "$lt_cv_prog_compiler_pic" >&6; }
+lt_prog_compiler_pic=$lt_cv_prog_compiler_pic
+
+#
+# Check to make sure the PIC flag actually works.
+#
+if test -n "$lt_prog_compiler_pic"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
+printf %s "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; }
+if test ${lt_cv_prog_compiler_pic_works+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ lt_cv_prog_compiler_pic_works=no
+ ac_outfile=conftest.$ac_objext
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+ lt_compiler_flag="$lt_prog_compiler_pic -DPIC" ## exclude from sc_useless_quotes_in_assignment
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ # The option is referenced via a variable to avoid confusing sed.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>conftest.err)
+ ac_status=$?
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ if (exit $ac_status) && test -s "$ac_outfile"; then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings other than the usual output.
+ $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+ if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
+ lt_cv_prog_compiler_pic_works=yes
+ fi
+ fi
+ $RM conftest*
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5
+printf "%s\n" "$lt_cv_prog_compiler_pic_works" >&6; }
+
+if test yes = "$lt_cv_prog_compiler_pic_works"; then
+ case $lt_prog_compiler_pic in
+ "" | " "*) ;;
+ *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
+ esac
+else
+ lt_prog_compiler_pic=
+ lt_prog_compiler_can_build_shared=no
+fi
+
+fi
+
+
+
+
+
+
+
+
+
+
+
+#
+# Check to make sure the static flag actually works.
+#
+wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\"
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
+printf %s "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
+if test ${lt_cv_prog_compiler_static_works+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ lt_cv_prog_compiler_static_works=no
+ save_LDFLAGS=$LDFLAGS
+ LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
+ echo "$lt_simple_link_test_code" > conftest.$ac_ext
+ if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
+ # The linker can only warn and ignore the option if not recognized
+ # So say no if there are warnings
+ if test -s conftest.err; then
+ # Append any errors to the config.log.
+ cat conftest.err 1>&5
+ $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+ if diff conftest.exp conftest.er2 >/dev/null; then
+ lt_cv_prog_compiler_static_works=yes
+ fi
+ else
+ lt_cv_prog_compiler_static_works=yes
+ fi
+ fi
+ $RM -r conftest*
+ LDFLAGS=$save_LDFLAGS
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5
+printf "%s\n" "$lt_cv_prog_compiler_static_works" >&6; }
+
+if test yes = "$lt_cv_prog_compiler_static_works"; then
+ :
+else
+ lt_prog_compiler_static=
+fi
+
+
+
+
+
+
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
+printf %s "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
+if test ${lt_cv_prog_compiler_c_o+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ lt_cv_prog_compiler_c_o=no
+ $RM -r conftest 2>/dev/null
+ mkdir conftest
+ cd conftest
+ mkdir out
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+ lt_compiler_flag="-o out/conftest2.$ac_objext"
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>out/conftest.err)
+ ac_status=$?
+ cat out/conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ if (exit $ac_status) && test -s out/conftest2.$ac_objext
+ then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings
+ $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
+ $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
+ if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
+ lt_cv_prog_compiler_c_o=yes
+ fi
+ fi
+ chmod u+w . 2>&5
+ $RM conftest*
+ # SGI C++ compiler will create directory out/ii_files/ for
+ # template instantiation
+ test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
+ $RM out/* && rmdir out
+ cd ..
+ $RM -r conftest
+ $RM conftest*
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
+printf "%s\n" "$lt_cv_prog_compiler_c_o" >&6; }
+
+
+
+
+
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
+printf %s "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
+if test ${lt_cv_prog_compiler_c_o+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ lt_cv_prog_compiler_c_o=no
+ $RM -r conftest 2>/dev/null
+ mkdir conftest
+ cd conftest
+ mkdir out
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+ lt_compiler_flag="-o out/conftest2.$ac_objext"
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>out/conftest.err)
+ ac_status=$?
+ cat out/conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ if (exit $ac_status) && test -s out/conftest2.$ac_objext
+ then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings
+ $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
+ $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
+ if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
+ lt_cv_prog_compiler_c_o=yes
+ fi
+ fi
+ chmod u+w . 2>&5
+ $RM conftest*
+ # SGI C++ compiler will create directory out/ii_files/ for
+ # template instantiation
+ test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
+ $RM out/* && rmdir out
+ cd ..
+ $RM -r conftest
+ $RM conftest*
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
+printf "%s\n" "$lt_cv_prog_compiler_c_o" >&6; }
+
+
+
+
+hard_links=nottested
+if test no = "$lt_cv_prog_compiler_c_o" && test no != "$need_locks"; then
+ # do not overwrite the value of need_locks provided by the user
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
+printf %s "checking if we can lock with hard links... " >&6; }
+ hard_links=yes
+ $RM conftest*
+ ln conftest.a conftest.b 2>/dev/null && hard_links=no
+ touch conftest.a
+ ln conftest.a conftest.b 2>&5 || hard_links=no
+ ln conftest.a conftest.b 2>/dev/null && hard_links=no
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
+printf "%s\n" "$hard_links" >&6; }
+ if test no = "$hard_links"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5
+printf "%s\n" "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;}
+ need_locks=warn
+ fi
+else
+ need_locks=no
+fi
+
+
+
+
+
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
+printf %s "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
+
+ runpath_var=
+ allow_undefined_flag=
+ always_export_symbols=no
+ archive_cmds=
+ archive_expsym_cmds=
+ compiler_needs_object=no
+ enable_shared_with_static_runtimes=no
+ export_dynamic_flag_spec=
+ export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+ hardcode_automatic=no
+ hardcode_direct=no
+ hardcode_direct_absolute=no
+ hardcode_libdir_flag_spec=
+ hardcode_libdir_separator=
+ hardcode_minus_L=no
+ hardcode_shlibpath_var=unsupported
+ inherit_rpath=no
+ link_all_deplibs=unknown
+ module_cmds=
+ module_expsym_cmds=
+ old_archive_from_new_cmds=
+ old_archive_from_expsyms_cmds=
+ thread_safe_flag_spec=
+ whole_archive_flag_spec=
+ # include_expsyms should be a list of space-separated symbols to be *always*
+ # included in the symbol list
+ include_expsyms=
+ # exclude_expsyms can be an extended regexp of symbols to exclude
+ # it will be wrapped by ' (' and ')$', so one must not match beginning or
+ # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc',
+ # as well as any symbol that contains 'd'.
+ exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
+ # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
+ # platforms (ab)use it in PIC code, but their linkers get confused if
+ # the symbol is explicitly referenced. Since portable code cannot
+ # rely on this symbol name, it's probably fine to never include it in
+ # preloaded symbol tables.
+ # Exclude shared library initialization/finalization symbols.
+ extract_expsyms_cmds=
+
+ case $host_os in
+ cygwin* | mingw* | pw32* | cegcc*)
+ # FIXME: the MSVC++ port hasn't been tested in a loooong time
+ # When not using gcc, we currently assume that we are using
+ # Microsoft Visual C++.
+ if test yes != "$GCC"; then
+ with_gnu_ld=no
+ fi
+ ;;
+ interix*)
+ # we just hope/assume this is gcc and not c89 (= MSVC++)
+ with_gnu_ld=yes
+ ;;
+ openbsd* | bitrig*)
+ with_gnu_ld=no
+ ;;
+ linux* | k*bsd*-gnu | gnu*)
+ link_all_deplibs=no
+ ;;
+ esac
+
+ ld_shlibs=yes
+
+ # On some targets, GNU ld is compatible enough with the native linker
+ # that we're better off using the native interface for both.
+ lt_use_gnu_ld_interface=no
+ if test yes = "$with_gnu_ld"; then
+ case $host_os in
+ aix*)
+ # The AIX port of GNU ld has always aspired to compatibility
+ # with the native linker. However, as the warning in the GNU ld
+ # block says, versions before 2.19.5* couldn't really create working
+ # shared libraries, regardless of the interface used.
+ case `$LD -v 2>&1` in
+ *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
+ *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;;
+ *\ \(GNU\ Binutils\)\ [3-9]*) ;;
+ *)
+ lt_use_gnu_ld_interface=yes
+ ;;
+ esac
+ ;;
+ *)
+ lt_use_gnu_ld_interface=yes
+ ;;
+ esac
+ fi
+
+ if test yes = "$lt_use_gnu_ld_interface"; then
+ # If archive_cmds runs LD, not CC, wlarc should be empty
+ wlarc='$wl'
+
+ # Set some defaults for GNU ld with shared library support. These
+ # are reset later if shared libraries are not supported. Putting them
+ # here allows them to be overridden if necessary.
+ runpath_var=LD_RUN_PATH
+ hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
+ export_dynamic_flag_spec='$wl--export-dynamic'
+ # ancient GNU ld didn't support --whole-archive et. al.
+ if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
+ whole_archive_flag_spec=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
+ else
+ whole_archive_flag_spec=
+ fi
+ supports_anon_versioning=no
+ case `$LD -v | $SED -e 's/(^)\+)\s\+//' 2>&1` in
+ *GNU\ gold*) supports_anon_versioning=yes ;;
+ *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
+ *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
+ *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
+ *\ 2.11.*) ;; # other 2.11 versions
+ *) supports_anon_versioning=yes ;;
+ esac
+
+ # See if GNU ld supports shared libraries.
+ case $host_os in
+ aix[3-9]*)
+ # On AIX/PPC, the GNU linker is very broken
+ if test ia64 != "$host_cpu"; then
+ ld_shlibs=no
+ cat <<_LT_EOF 1>&2
+
+*** Warning: the GNU linker, at least up to release 2.19, is reported
+*** to be unable to reliably create shared libraries on AIX.
+*** Therefore, libtool is disabling shared libraries support. If you
+*** really care for shared libraries, you may want to install binutils
+*** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
+*** You will then need to restart the configuration process.
+
+_LT_EOF
+ fi
+ ;;
+
+ amigaos*)
+ case $host_cpu in
+ powerpc)
+ # see comment about AmigaOS4 .so support
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+ archive_expsym_cmds=''
+ ;;
+ m68k)
+ archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_minus_L=yes
+ ;;
+ esac
+ ;;
+
+ beos*)
+ if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ allow_undefined_flag=unsupported
+ # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
+ # support --undefined. This deserves some investigation. FIXME
+ archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+ else
+ ld_shlibs=no
+ fi
+ ;;
+
+ cygwin* | mingw* | pw32* | cegcc*)
+ # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
+ # as there is no search path for DLLs.
+ hardcode_libdir_flag_spec='-L$libdir'
+ export_dynamic_flag_spec='$wl--export-all-symbols'
+ allow_undefined_flag=unsupported
+ always_export_symbols=no
+ enable_shared_with_static_runtimes=yes
+ export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols'
+ exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'
+
+ if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+ # If the export-symbols file already is a .def file, use it as
+ # is; otherwise, prepend EXPORTS...
+ archive_expsym_cmds='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then
+ cp $export_symbols $output_objdir/$soname.def;
+ else
+ echo EXPORTS > $output_objdir/$soname.def;
+ cat $export_symbols >> $output_objdir/$soname.def;
+ fi~
+ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+ else
+ ld_shlibs=no
+ fi
+ ;;
+
+ haiku*)
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+ link_all_deplibs=yes
+ ;;
+
+ os2*)
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_minus_L=yes
+ allow_undefined_flag=unsupported
+ shrext_cmds=.dll
+ archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
+ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
+ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
+ $ECHO EXPORTS >> $output_objdir/$libname.def~
+ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
+ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
+ emximp -o $lib $output_objdir/$libname.def'
+ archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
+ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
+ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
+ $ECHO EXPORTS >> $output_objdir/$libname.def~
+ prefix_cmds="$SED"~
+ if test EXPORTS = "`$SED 1q $export_symbols`"; then
+ prefix_cmds="$prefix_cmds -e 1d";
+ fi~
+ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
+ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
+ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
+ emximp -o $lib $output_objdir/$libname.def'
+ old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
+ enable_shared_with_static_runtimes=yes
+ ;;
+
+ interix[3-9]*)
+ hardcode_direct=no
+ hardcode_shlibpath_var=no
+ hardcode_libdir_flag_spec='$wl-rpath,$libdir'
+ export_dynamic_flag_spec='$wl-E'
+ # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
+ # Instead, shared libraries are loaded at an image base (0x10000000 by
+ # default) and relocated if they conflict, which is a slow very memory
+ # consuming and fragmenting process. To avoid this, we pick a random,
+ # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
+ # time. Moving up from 0x10000000 also allows more sbrk(2) space.
+ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+ archive_expsym_cmds='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+ ;;
+
+ gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
+ tmp_diet=no
+ if test linux-dietlibc = "$host_os"; then
+ case $cc_basename in
+ diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
+ esac
+ fi
+ if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
+ && test no = "$tmp_diet"
+ then
+ tmp_addflag=' $pic_flag'
+ tmp_sharedflag='-shared'
+ case $cc_basename,$host_cpu in
+ pgcc*) # Portland Group C compiler
+ whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
+ tmp_addflag=' $pic_flag'
+ ;;
+ pgf77* | pgf90* | pgf95* | pgfortran*)
+ # Portland Group f77 and f90 compilers
+ whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
+ tmp_addflag=' $pic_flag -Mnomain' ;;
+ ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
+ tmp_addflag=' -i_dynamic' ;;
+ efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
+ tmp_addflag=' -i_dynamic -nofor_main' ;;
+ ifc* | ifort*) # Intel Fortran compiler
+ tmp_addflag=' -nofor_main' ;;
+ lf95*) # Lahey Fortran 8.1
+ whole_archive_flag_spec=
+ tmp_sharedflag='--shared' ;;
+ nagfor*) # NAGFOR 5.3
+ tmp_sharedflag='-Wl,-shared' ;;
+ xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below)
+ tmp_sharedflag='-qmkshrobj'
+ tmp_addflag= ;;
+ nvcc*) # Cuda Compiler Driver 2.2
+ whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
+ compiler_needs_object=yes
+ ;;
+ esac
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*) # Sun C 5.9
+ whole_archive_flag_spec='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
+ compiler_needs_object=yes
+ tmp_sharedflag='-G' ;;
+ *Sun\ F*) # Sun Fortran 8.3
+ tmp_sharedflag='-G' ;;
+ esac
+ archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+
+ if test yes = "$supports_anon_versioning"; then
+ archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
+ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+ echo "local: *; };" >> $output_objdir/$libname.ver~
+ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
+ fi
+
+ case $cc_basename in
+ tcc*)
+ export_dynamic_flag_spec='-rdynamic'
+ ;;
+ xlf* | bgf* | bgxlf* | mpixlf*)
+ # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
+ whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive'
+ hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
+ archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
+ if test yes = "$supports_anon_versioning"; then
+ archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
+ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+ echo "local: *; };" >> $output_objdir/$libname.ver~
+ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
+ fi
+ ;;
+ esac
+ else
+ ld_shlibs=no
+ fi
+ ;;
+
+ netbsd* | netbsdelf*-gnu)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+ archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
+ wlarc=
+ else
+ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
+ fi
+ ;;
+
+ solaris*)
+ if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
+ ld_shlibs=no
+ cat <<_LT_EOF 1>&2
+
+*** Warning: The releases 2.8.* of the GNU linker cannot reliably
+*** create shared libraries on Solaris systems. Therefore, libtool
+*** is disabling shared libraries support. We urge you to upgrade GNU
+*** binutils to release 2.9.1 or newer. Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
+
+_LT_EOF
+ elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
+ else
+ ld_shlibs=no
+ fi
+ ;;
+
+ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
+ case `$LD -v 2>&1` in
+ *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
+ ld_shlibs=no
+ cat <<_LT_EOF 1>&2
+
+*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot
+*** reliably create shared libraries on SCO systems. Therefore, libtool
+*** is disabling shared libraries support. We urge you to upgrade GNU
+*** binutils to release 2.16.91.0.3 or newer. Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
+
+_LT_EOF
+ ;;
+ *)
+ # For security reasons, it is highly recommended that you always
+ # use absolute paths for naming shared libraries, and exclude the
+ # DT_RUNPATH tag from executables and libraries. But doing so
+ # requires that you compile everything twice, which is a pain.
+ if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+ archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
+ else
+ ld_shlibs=no
+ fi
+ ;;
+ esac
+ ;;
+
+ sunos4*)
+ archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+ wlarc=
+ hardcode_direct=yes
+ hardcode_shlibpath_var=no
+ ;;
+
+ *)
+ if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
+ else
+ ld_shlibs=no
+ fi
+ ;;
+ esac
+
+ if test no = "$ld_shlibs"; then
+ runpath_var=
+ hardcode_libdir_flag_spec=
+ export_dynamic_flag_spec=
+ whole_archive_flag_spec=
+ fi
+ else
+ # PORTME fill in a description of your system's linker (not GNU ld)
+ case $host_os in
+ aix3*)
+ allow_undefined_flag=unsupported
+ always_export_symbols=yes
+ archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
+ # Note: this linker hardcodes the directories in LIBPATH if there
+ # are no directories specified by -L.
+ hardcode_minus_L=yes
+ if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then
+ # Neither direct hardcoding nor static linking is supported with a
+ # broken collect2.
+ hardcode_direct=unsupported
+ fi
+ ;;
+
+ aix[4-9]*)
+ if test ia64 = "$host_cpu"; then
+ # On IA64, the linker does run time linking by default, so we don't
+ # have to do anything special.
+ aix_use_runtimelinking=no
+ exp_sym_flag='-Bexport'
+ no_entry_flag=
+ else
+ # If we're using GNU nm, then we don't want the "-C" option.
+ # -C means demangle to GNU nm, but means don't demangle to AIX nm.
+ # Without the "-l" option, or with the "-B" option, AIX nm treats
+ # weak defined symbols like other global defined symbols, whereas
+ # GNU nm marks them as "W".
+ # While the 'weak' keyword is ignored in the Export File, we need
+ # it in the Import File for the 'aix-soname' feature, so we have
+ # to replace the "-B" option with "-P" for AIX nm.
+ if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
+ export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
+ else
+ export_symbols_cmds='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
+ fi
+ aix_use_runtimelinking=no
+
+ # Test if we are trying to use run time linking or normal
+ # AIX style linking. If -brtl is somewhere in LDFLAGS, we
+ # have runtime linking enabled, and use it for executables.
+ # For shared libraries, we enable/disable runtime linking
+ # depending on the kind of the shared library created -
+ # when "with_aix_soname,aix_use_runtimelinking" is:
+ # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables
+ # "aix,yes" lib.so shared, rtl:yes, for executables
+ # lib.a static archive
+ # "both,no" lib.so.V(shr.o) shared, rtl:yes
+ # lib.a(lib.so.V) shared, rtl:no, for executables
+ # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
+ # lib.a(lib.so.V) shared, rtl:no
+ # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables
+ # lib.a static archive
+ case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
+ for ld_flag in $LDFLAGS; do
+ if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then
+ aix_use_runtimelinking=yes
+ break
+ fi
+ done
+ if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
+ # With aix-soname=svr4, we create the lib.so.V shared archives only,
+ # so we don't have lib.a shared libs to link our executables.
+ # We have to force runtime linking in this case.
+ aix_use_runtimelinking=yes
+ LDFLAGS="$LDFLAGS -Wl,-brtl"
+ fi
+ ;;
+ esac
+
+ exp_sym_flag='-bexport'
+ no_entry_flag='-bnoentry'
+ fi
+
+ # When large executables or shared objects are built, AIX ld can
+ # have problems creating the table of contents. If linking a library
+ # or program results in "error TOC overflow" add -mminimal-toc to
+ # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
+ # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
+
+ archive_cmds=''
+ hardcode_direct=yes
+ hardcode_direct_absolute=yes
+ hardcode_libdir_separator=':'
+ link_all_deplibs=yes
+ file_list_spec='$wl-f,'
+ case $with_aix_soname,$aix_use_runtimelinking in
+ aix,*) ;; # traditional, no import file
+ svr4,* | *,yes) # use import file
+ # The Import File defines what to hardcode.
+ hardcode_direct=no
+ hardcode_direct_absolute=no
+ ;;
+ esac
+
+ if test yes = "$GCC"; then
+ case $host_os in aix4.[012]|aix4.[012].*)
+ # We only want to do this on AIX 4.2 and lower, the check
+ # below for broken collect2 doesn't work under 4.3+
+ collect2name=`$CC -print-prog-name=collect2`
+ if test -f "$collect2name" &&
+ strings "$collect2name" | $GREP resolve_lib_name >/dev/null
+ then
+ # We have reworked collect2
+ :
+ else
+ # We have old collect2
+ hardcode_direct=unsupported
+ # It fails to find uninstalled libraries when the uninstalled
+ # path is not listed in the libpath. Setting hardcode_minus_L
+ # to unsupported forces relinking
+ hardcode_minus_L=yes
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_libdir_separator=
+ fi
+ ;;
+ esac
+ shared_flag='-shared'
+ if test yes = "$aix_use_runtimelinking"; then
+ shared_flag="$shared_flag "'$wl-G'
+ fi
+ # Need to ensure runtime linking is disabled for the traditional
+ # shared library, or the linker may eventually find shared libraries
+ # /with/ Import File - we do not want to mix them.
+ shared_flag_aix='-shared'
+ shared_flag_svr4='-shared $wl-G'
+ else
+ # not using gcc
+ if test ia64 = "$host_cpu"; then
+ # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
+ # chokes on -Wl,-G. The following line is correct:
+ shared_flag='-G'
+ else
+ if test yes = "$aix_use_runtimelinking"; then
+ shared_flag='$wl-G'
+ else
+ shared_flag='$wl-bM:SRE'
+ fi
+ shared_flag_aix='$wl-bM:SRE'
+ shared_flag_svr4='$wl-G'
+ fi
+ fi
+
+ export_dynamic_flag_spec='$wl-bexpall'
+ # It seems that -bexpall does not export symbols beginning with
+ # underscore (_), so it is better to generate a list of symbols to export.
+ always_export_symbols=yes
+ if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
+ # Warning - without using the other runtime loading flags (-brtl),
+ # -berok will link without error, but may produce a broken library.
+ allow_undefined_flag='-berok'
+ # Determine the default libpath from the value encoded in an
+ # empty executable.
+ if test set = "${lt_cv_aix_libpath+set}"; then
+ aix_libpath=$lt_cv_aix_libpath
+else
+ if test ${lt_cv_aix_libpath_+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+
+ lt_aix_libpath_sed='
+ /Import File Strings/,/^$/ {
+ /^0/ {
+ s/^0 *\([^ ]*\) *$/\1/
+ p
+ }
+ }'
+ lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+ # Check for a 64-bit object if we didn't find anything.
+ if test -z "$lt_cv_aix_libpath_"; then
+ lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+ fi
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+ if test -z "$lt_cv_aix_libpath_"; then
+ lt_cv_aix_libpath_=/usr/lib:/lib
+ fi
+
+fi
+
+ aix_libpath=$lt_cv_aix_libpath_
+fi
+
+ hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath"
+ archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag
+ else
+ if test ia64 = "$host_cpu"; then
+ hardcode_libdir_flag_spec='$wl-R $libdir:/usr/lib:/lib'
+ allow_undefined_flag="-z nodefs"
+ archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols"
+ else
+ # Determine the default libpath from the value encoded in an
+ # empty executable.
+ if test set = "${lt_cv_aix_libpath+set}"; then
+ aix_libpath=$lt_cv_aix_libpath
+else
+ if test ${lt_cv_aix_libpath_+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+
+ lt_aix_libpath_sed='
+ /Import File Strings/,/^$/ {
+ /^0/ {
+ s/^0 *\([^ ]*\) *$/\1/
+ p
+ }
+ }'
+ lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+ # Check for a 64-bit object if we didn't find anything.
+ if test -z "$lt_cv_aix_libpath_"; then
+ lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+ fi
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+ if test -z "$lt_cv_aix_libpath_"; then
+ lt_cv_aix_libpath_=/usr/lib:/lib
+ fi
+
+fi
+
+ aix_libpath=$lt_cv_aix_libpath_
+fi
+
+ hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath"
+ # Warning - without using the other run time loading flags,
+ # -berok will link without error, but may produce a broken library.
+ no_undefined_flag=' $wl-bernotok'
+ allow_undefined_flag=' $wl-berok'
+ if test yes = "$with_gnu_ld"; then
+ # We only use this code for GNU lds that support --whole-archive.
+ whole_archive_flag_spec='$wl--whole-archive$convenience $wl--no-whole-archive'
+ else
+ # Exported symbols can be pulled into shared objects from archives
+ whole_archive_flag_spec='$convenience'
+ fi
+ archive_cmds_need_lc=yes
+ archive_expsym_cmds='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
+ # -brtl affects multiple linker settings, -berok does not and is overridden later
+ compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([, ]\\)%-berok\\1%g"`'
+ if test svr4 != "$with_aix_soname"; then
+ # This is similar to how AIX traditionally builds its shared libraries.
+ archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname'
+ fi
+ if test aix != "$with_aix_soname"; then
+ archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp'
+ else
+ # used by -dlpreopen to get the symbols
+ archive_expsym_cmds="$archive_expsym_cmds"'~$MV $output_objdir/$realname.d/$soname $output_objdir'
+ fi
+ archive_expsym_cmds="$archive_expsym_cmds"'~$RM -r $output_objdir/$realname.d'
+ fi
+ fi
+ ;;
+
+ amigaos*)
+ case $host_cpu in
+ powerpc)
+ # see comment about AmigaOS4 .so support
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+ archive_expsym_cmds=''
+ ;;
+ m68k)
+ archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_minus_L=yes
+ ;;
+ esac
+ ;;
+
+ bsdi[45]*)
+ export_dynamic_flag_spec=-rdynamic
+ ;;
+
+ cygwin* | mingw* | pw32* | cegcc*)
+ # When not using gcc, we currently assume that we are using
+ # Microsoft Visual C++.
+ # hardcode_libdir_flag_spec is actually meaningless, as there is
+ # no search path for DLLs.
+ case $cc_basename in
+ cl*)
+ # Native MSVC
+ hardcode_libdir_flag_spec=' '
+ allow_undefined_flag=unsupported
+ always_export_symbols=yes
+ file_list_spec='@'
+ # Tell ltmain to make .lib files, not .a files.
+ libext=lib
+ # Tell ltmain to make .dll files, not .so files.
+ shrext_cmds=.dll
+ # FIXME: Setting linknames here is a bad hack.
+ archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
+ archive_expsym_cmds='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then
+ cp "$export_symbols" "$output_objdir/$soname.def";
+ echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
+ else
+ $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
+ fi~
+ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
+ linknames='
+ # The linker will not automatically build a static lib if we build a DLL.
+ # _LT_TAGVAR(old_archive_from_new_cmds, )='true'
+ enable_shared_with_static_runtimes=yes
+ exclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
+ export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
+ # Don't use ranlib
+ old_postinstall_cmds='chmod 644 $oldlib'
+ postlink_cmds='lt_outputfile="@OUTPUT@"~
+ lt_tool_outputfile="@TOOL_OUTPUT@"~
+ case $lt_outputfile in
+ *.exe|*.EXE) ;;
+ *)
+ lt_outputfile=$lt_outputfile.exe
+ lt_tool_outputfile=$lt_tool_outputfile.exe
+ ;;
+ esac~
+ if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
+ $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
+ $RM "$lt_outputfile.manifest";
+ fi'
+ ;;
+ *)
+ # Assume MSVC wrapper
+ hardcode_libdir_flag_spec=' '
+ allow_undefined_flag=unsupported
+ # Tell ltmain to make .lib files, not .a files.
+ libext=lib
+ # Tell ltmain to make .dll files, not .so files.
+ shrext_cmds=.dll
+ # FIXME: Setting linknames here is a bad hack.
+ archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
+ # The linker will automatically build a .lib file if we build a DLL.
+ old_archive_from_new_cmds='true'
+ # FIXME: Should let the user specify the lib program.
+ old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs'
+ enable_shared_with_static_runtimes=yes
+ ;;
+ esac
+ ;;
+
+ darwin* | rhapsody*)
+
+
+ archive_cmds_need_lc=no
+ hardcode_direct=no
+ hardcode_automatic=yes
+ hardcode_shlibpath_var=unsupported
+ if test yes = "$lt_cv_ld_force_load"; then
+ whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
+
+ else
+ whole_archive_flag_spec=''
+ fi
+ link_all_deplibs=yes
+ allow_undefined_flag=$_lt_dar_allow_undefined
+ case $cc_basename in
+ ifort*|nagfor*) _lt_dar_can_shared=yes ;;
+ *) _lt_dar_can_shared=$GCC ;;
+ esac
+ if test yes = "$_lt_dar_can_shared"; then
+ output_verbose_link_cmd=func_echo_all
+ archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil"
+ module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
+ archive_expsym_cmds="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil"
+ module_expsym_cmds="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil"
+
+ else
+ ld_shlibs=no
+ fi
+
+ ;;
+
+ dgux*)
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_shlibpath_var=no
+ ;;
+
+ # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
+ # support. Future versions do this automatically, but an explicit c++rt0.o
+ # does not break anything, and helps significantly (at the cost of a little
+ # extra space).
+ freebsd2.2*)
+ archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
+ hardcode_libdir_flag_spec='-R$libdir'
+ hardcode_direct=yes
+ hardcode_shlibpath_var=no
+ ;;
+
+ # Unfortunately, older versions of FreeBSD 2 do not have this feature.
+ freebsd2.*)
+ archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_direct=yes
+ hardcode_minus_L=yes
+ hardcode_shlibpath_var=no
+ ;;
+
+ # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
+ freebsd* | dragonfly*)
+ archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+ hardcode_libdir_flag_spec='-R$libdir'
+ hardcode_direct=yes
+ hardcode_shlibpath_var=no
+ ;;
+
+ hpux9*)
+ if test yes = "$GCC"; then
+ archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
+ else
+ archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
+ fi
+ hardcode_libdir_flag_spec='$wl+b $wl$libdir'
+ hardcode_libdir_separator=:
+ hardcode_direct=yes
+
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ hardcode_minus_L=yes
+ export_dynamic_flag_spec='$wl-E'
+ ;;
+
+ hpux10*)
+ if test yes,no = "$GCC,$with_gnu_ld"; then
+ archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
+ fi
+ if test no = "$with_gnu_ld"; then
+ hardcode_libdir_flag_spec='$wl+b $wl$libdir'
+ hardcode_libdir_separator=:
+ hardcode_direct=yes
+ hardcode_direct_absolute=yes
+ export_dynamic_flag_spec='$wl-E'
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ hardcode_minus_L=yes
+ fi
+ ;;
+
+ hpux11*)
+ if test yes,no = "$GCC,$with_gnu_ld"; then
+ case $host_cpu in
+ hppa*64*)
+ archive_cmds='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ ia64*)
+ archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ *)
+ archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ esac
+ else
+ case $host_cpu in
+ hppa*64*)
+ archive_cmds='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ ia64*)
+ archive_cmds='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ *)
+
+ # Older versions of the 11.00 compiler do not understand -b yet
+ # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5
+printf %s "checking if $CC understands -b... " >&6; }
+if test ${lt_cv_prog_compiler__b+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ lt_cv_prog_compiler__b=no
+ save_LDFLAGS=$LDFLAGS
+ LDFLAGS="$LDFLAGS -b"
+ echo "$lt_simple_link_test_code" > conftest.$ac_ext
+ if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
+ # The linker can only warn and ignore the option if not recognized
+ # So say no if there are warnings
+ if test -s conftest.err; then
+ # Append any errors to the config.log.
+ cat conftest.err 1>&5
+ $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+ if diff conftest.exp conftest.er2 >/dev/null; then
+ lt_cv_prog_compiler__b=yes
+ fi
+ else
+ lt_cv_prog_compiler__b=yes
+ fi
+ fi
+ $RM -r conftest*
+ LDFLAGS=$save_LDFLAGS
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5
+printf "%s\n" "$lt_cv_prog_compiler__b" >&6; }
+
+if test yes = "$lt_cv_prog_compiler__b"; then
+ archive_cmds='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+else
+ archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
+fi
+
+ ;;
+ esac
+ fi
+ if test no = "$with_gnu_ld"; then
+ hardcode_libdir_flag_spec='$wl+b $wl$libdir'
+ hardcode_libdir_separator=:
+
+ case $host_cpu in
+ hppa*64*|ia64*)
+ hardcode_direct=no
+ hardcode_shlibpath_var=no
+ ;;
+ *)
+ hardcode_direct=yes
+ hardcode_direct_absolute=yes
+ export_dynamic_flag_spec='$wl-E'
+
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ hardcode_minus_L=yes
+ ;;
+ esac
+ fi
+ ;;
+
+ irix5* | irix6* | nonstopux*)
+ if test yes = "$GCC"; then
+ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
+ # Try to use the -exported_symbol ld option, if it does not
+ # work, assume that -exports_file does not work either and
+ # implicitly export all symbols.
+ # This should be the same for all languages, so no per-tag cache variable.
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5
+printf %s "checking whether the $host_os linker accepts -exported_symbol... " >&6; }
+if test ${lt_cv_irix_exported_symbol+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ save_LDFLAGS=$LDFLAGS
+ LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int foo (void) { return 0; }
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ lt_cv_irix_exported_symbol=yes
+else $as_nop
+ lt_cv_irix_exported_symbol=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+ LDFLAGS=$save_LDFLAGS
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5
+printf "%s\n" "$lt_cv_irix_exported_symbol" >&6; }
+ if test yes = "$lt_cv_irix_exported_symbol"; then
+ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib'
+ fi
+ link_all_deplibs=no
+ else
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
+ archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib'
+ fi
+ archive_cmds_need_lc='no'
+ hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
+ hardcode_libdir_separator=:
+ inherit_rpath=yes
+ link_all_deplibs=yes
+ ;;
+
+ linux*)
+ case $cc_basename in
+ tcc*)
+ # Fabrice Bellard et al's Tiny C Compiler
+ ld_shlibs=yes
+ archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ esac
+ ;;
+
+ netbsd* | netbsdelf*-gnu)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+ archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
+ else
+ archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
+ fi
+ hardcode_libdir_flag_spec='-R$libdir'
+ hardcode_direct=yes
+ hardcode_shlibpath_var=no
+ ;;
+
+ newsos6)
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_direct=yes
+ hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
+ hardcode_libdir_separator=:
+ hardcode_shlibpath_var=no
+ ;;
+
+ *nto* | *qnx*)
+ ;;
+
+ openbsd* | bitrig*)
+ if test -f /usr/libexec/ld.so; then
+ hardcode_direct=yes
+ hardcode_shlibpath_var=no
+ hardcode_direct_absolute=yes
+ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
+ archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols'
+ hardcode_libdir_flag_spec='$wl-rpath,$libdir'
+ export_dynamic_flag_spec='$wl-E'
+ else
+ archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+ hardcode_libdir_flag_spec='$wl-rpath,$libdir'
+ fi
+ else
+ ld_shlibs=no
+ fi
+ ;;
+
+ os2*)
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_minus_L=yes
+ allow_undefined_flag=unsupported
+ shrext_cmds=.dll
+ archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
+ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
+ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
+ $ECHO EXPORTS >> $output_objdir/$libname.def~
+ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
+ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
+ emximp -o $lib $output_objdir/$libname.def'
+ archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
+ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
+ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
+ $ECHO EXPORTS >> $output_objdir/$libname.def~
+ prefix_cmds="$SED"~
+ if test EXPORTS = "`$SED 1q $export_symbols`"; then
+ prefix_cmds="$prefix_cmds -e 1d";
+ fi~
+ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
+ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
+ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
+ emximp -o $lib $output_objdir/$libname.def'
+ old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
+ enable_shared_with_static_runtimes=yes
+ ;;
+
+ osf3*)
+ if test yes = "$GCC"; then
+ allow_undefined_flag=' $wl-expect_unresolved $wl\*'
+ archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
+ else
+ allow_undefined_flag=' -expect_unresolved \*'
+ archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
+ fi
+ archive_cmds_need_lc='no'
+ hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
+ hardcode_libdir_separator=:
+ ;;
+
+ osf4* | osf5*) # as osf3* with the addition of -msym flag
+ if test yes = "$GCC"; then
+ allow_undefined_flag=' $wl-expect_unresolved $wl\*'
+ archive_cmds='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
+ hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
+ else
+ allow_undefined_flag=' -expect_unresolved \*'
+ archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
+ archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
+ $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.exp'
+
+ # Both c and cxx compiler support -rpath directly
+ hardcode_libdir_flag_spec='-rpath $libdir'
+ fi
+ archive_cmds_need_lc='no'
+ hardcode_libdir_separator=:
+ ;;
+
+ solaris*)
+ no_undefined_flag=' -z defs'
+ if test yes = "$GCC"; then
+ wlarc='$wl'
+ archive_cmds='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
+ else
+ case `$CC -V 2>&1` in
+ *"Compilers 5.0"*)
+ wlarc=''
+ archive_cmds='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
+ ;;
+ *)
+ wlarc='$wl'
+ archive_cmds='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
+ ;;
+ esac
+ fi
+ hardcode_libdir_flag_spec='-R$libdir'
+ hardcode_shlibpath_var=no
+ case $host_os in
+ solaris2.[0-5] | solaris2.[0-5].*) ;;
+ *)
+ # The compiler driver will combine and reorder linker options,
+ # but understands '-z linker_flag'. GCC discards it without '$wl',
+ # but is careful enough not to reorder.
+ # Supported since Solaris 2.6 (maybe 2.5.1?)
+ if test yes = "$GCC"; then
+ whole_archive_flag_spec='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
+ else
+ whole_archive_flag_spec='-z allextract$convenience -z defaultextract'
+ fi
+ ;;
+ esac
+ link_all_deplibs=yes
+ ;;
+
+ sunos4*)
+ if test sequent = "$host_vendor"; then
+ # Use $CC to link under sequent, because it throws in some extra .o
+ # files that make .init and .fini sections work.
+ archive_cmds='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
+ fi
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_direct=yes
+ hardcode_minus_L=yes
+ hardcode_shlibpath_var=no
+ ;;
+
+ sysv4)
+ case $host_vendor in
+ sni)
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_direct=yes # is this really true???
+ ;;
+ siemens)
+ ## LD is ld it makes a PLAMLIB
+ ## CC just makes a GrossModule.
+ archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
+ reload_cmds='$CC -r -o $output$reload_objs'
+ hardcode_direct=no
+ ;;
+ motorola)
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_direct=no #Motorola manual says yes, but my tests say they lie
+ ;;
+ esac
+ runpath_var='LD_RUN_PATH'
+ hardcode_shlibpath_var=no
+ ;;
+
+ sysv4.3*)
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_shlibpath_var=no
+ export_dynamic_flag_spec='-Bexport'
+ ;;
+
+ sysv4*MP*)
+ if test -d /usr/nec; then
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_shlibpath_var=no
+ runpath_var=LD_RUN_PATH
+ hardcode_runpath_var=yes
+ ld_shlibs=yes
+ fi
+ ;;
+
+ sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
+ no_undefined_flag='$wl-z,text'
+ archive_cmds_need_lc=no
+ hardcode_shlibpath_var=no
+ runpath_var='LD_RUN_PATH'
+
+ if test yes = "$GCC"; then
+ archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ fi
+ ;;
+
+ sysv5* | sco3.2v5* | sco5v6*)
+ # Note: We CANNOT use -z defs as we might desire, because we do not
+ # link with -lc, and that would cause any symbols used from libc to
+ # always be unresolved, which means just about no library would
+ # ever link correctly. If we're not using GNU ld we use -z text
+ # though, which does catch some bad symbols but isn't as heavy-handed
+ # as -z defs.
+ no_undefined_flag='$wl-z,text'
+ allow_undefined_flag='$wl-z,nodefs'
+ archive_cmds_need_lc=no
+ hardcode_shlibpath_var=no
+ hardcode_libdir_flag_spec='$wl-R,$libdir'
+ hardcode_libdir_separator=':'
+ link_all_deplibs=yes
+ export_dynamic_flag_spec='$wl-Bexport'
+ runpath_var='LD_RUN_PATH'
+
+ if test yes = "$GCC"; then
+ archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ fi
+ ;;
+
+ uts4*)
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_shlibpath_var=no
+ ;;
+
+ *)
+ ld_shlibs=no
+ ;;
+ esac
+
+ if test sni = "$host_vendor"; then
+ case $host in
+ sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+ export_dynamic_flag_spec='$wl-Blargedynsym'
+ ;;
+ esac
+ fi
+ fi
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5
+printf "%s\n" "$ld_shlibs" >&6; }
+test no = "$ld_shlibs" && can_build_shared=no
+
+with_gnu_ld=$with_gnu_ld
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+#
+# Do we need to explicitly link libc?
+#
+case "x$archive_cmds_need_lc" in
+x|xyes)
+ # Assume -lc should be added
+ archive_cmds_need_lc=yes
+
+ if test yes,yes = "$GCC,$enable_shared"; then
+ case $archive_cmds in
+ *'~'*)
+ # FIXME: we may have to deal with multi-command sequences.
+ ;;
+ '$CC '*)
+ # Test whether the compiler implicitly links with -lc since on some
+ # systems, -lgcc has to come before -lc. If gcc already passes -lc
+ # to ld, don't add -lc before -lgcc.
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5
+printf %s "checking whether -lc should be explicitly linked in... " >&6; }
+if test ${lt_cv_archive_cmds_need_lc+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ $RM conftest*
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } 2>conftest.err; then
+ soname=conftest
+ lib=conftest
+ libobjs=conftest.$ac_objext
+ deplibs=
+ wl=$lt_prog_compiler_wl
+ pic_flag=$lt_prog_compiler_pic
+ compiler_flags=-v
+ linker_flags=-v
+ verstring=
+ output_objdir=.
+ libname=conftest
+ lt_save_allow_undefined_flag=$allow_undefined_flag
+ allow_undefined_flag=
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5
+ (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+ then
+ lt_cv_archive_cmds_need_lc=no
+ else
+ lt_cv_archive_cmds_need_lc=yes
+ fi
+ allow_undefined_flag=$lt_save_allow_undefined_flag
+ else
+ cat conftest.err 1>&5
+ fi
+ $RM conftest*
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5
+printf "%s\n" "$lt_cv_archive_cmds_need_lc" >&6; }
+ archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc
+ ;;
+ esac
+ fi
+ ;;
+esac
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
+printf %s "checking dynamic linker characteristics... " >&6; }
+
+if test yes = "$GCC"; then
+ case $host_os in
+ darwin*) lt_awk_arg='/^libraries:/,/LR/' ;;
+ *) lt_awk_arg='/^libraries:/' ;;
+ esac
+ case $host_os in
+ mingw* | cegcc*) lt_sed_strip_eq='s|=\([A-Za-z]:\)|\1|g' ;;
+ *) lt_sed_strip_eq='s|=/|/|g' ;;
+ esac
+ lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
+ case $lt_search_path_spec in
+ *\;*)
+ # if the path contains ";" then we assume it to be the separator
+ # otherwise default to the standard path separator (i.e. ":") - it is
+ # assumed that no part of a normal pathname contains ";" but that should
+ # okay in the real world where ";" in dirpaths is itself problematic.
+ lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
+ ;;
+ *)
+ lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
+ ;;
+ esac
+ # Ok, now we have the path, separated by spaces, we can step through it
+ # and add multilib dir if necessary...
+ lt_tmp_lt_search_path_spec=
+ lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
+ # ...but if some path component already ends with the multilib dir we assume
+ # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer).
+ case "$lt_multi_os_dir; $lt_search_path_spec " in
+ "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*)
+ lt_multi_os_dir=
+ ;;
+ esac
+ for lt_sys_path in $lt_search_path_spec; do
+ if test -d "$lt_sys_path$lt_multi_os_dir"; then
+ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir"
+ elif test -n "$lt_multi_os_dir"; then
+ test -d "$lt_sys_path" && \
+ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
+ fi
+ done
+ lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
+BEGIN {RS = " "; FS = "/|\n";} {
+ lt_foo = "";
+ lt_count = 0;
+ for (lt_i = NF; lt_i > 0; lt_i--) {
+ if ($lt_i != "" && $lt_i != ".") {
+ if ($lt_i == "..") {
+ lt_count++;
+ } else {
+ if (lt_count == 0) {
+ lt_foo = "/" $lt_i lt_foo;
+ } else {
+ lt_count--;
+ }
+ }
+ }
+ }
+ if (lt_foo != "") { lt_freq[lt_foo]++; }
+ if (lt_freq[lt_foo] == 1) { print lt_foo; }
+}'`
+ # AWK program above erroneously prepends '/' to C:/dos/paths
+ # for these hosts.
+ case $host_os in
+ mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
+ $SED 's|/\([A-Za-z]:\)|\1|g'` ;;
+ esac
+ sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
+else
+ sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
+fi
+library_names_spec=
+libname_spec='lib$name'
+soname_spec=
+shrext_cmds=.so
+postinstall_cmds=
+postuninstall_cmds=
+finish_cmds=
+finish_eval=
+shlibpath_var=
+shlibpath_overrides_runpath=unknown
+version_type=none
+dynamic_linker="$host_os ld.so"
+sys_lib_dlsearch_path_spec="/lib /usr/lib"
+need_lib_prefix=unknown
+hardcode_into_libs=no
+
+# when you set need_version to no, make sure it does not cause -set_version
+# flags to be left without arguments
+need_version=unknown
+
+
+
+case $host_os in
+aix3*)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ library_names_spec='$libname$release$shared_ext$versuffix $libname.a'
+ shlibpath_var=LIBPATH
+
+ # AIX 3 has no versioning support, so we append a major version to the name.
+ soname_spec='$libname$release$shared_ext$major'
+ ;;
+
+aix[4-9]*)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ need_lib_prefix=no
+ need_version=no
+ hardcode_into_libs=yes
+ if test ia64 = "$host_cpu"; then
+ # AIX 5 supports IA64
+ library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext'
+ shlibpath_var=LD_LIBRARY_PATH
+ else
+ # With GCC up to 2.95.x, collect2 would create an import file
+ # for dependence libraries. The import file would start with
+ # the line '#! .'. This would cause the generated library to
+ # depend on '.', always an invalid library. This was fixed in
+ # development snapshots of GCC prior to 3.0.
+ case $host_os in
+ aix4 | aix4.[01] | aix4.[01].*)
+ if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
+ echo ' yes '
+ echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then
+ :
+ else
+ can_build_shared=no
+ fi
+ ;;
+ esac
+ # Using Import Files as archive members, it is possible to support
+ # filename-based versioning of shared library archives on AIX. While
+ # this would work for both with and without runtime linking, it will
+ # prevent static linking of such archives. So we do filename-based
+ # shared library versioning with .so extension only, which is used
+ # when both runtime linking and shared linking is enabled.
+ # Unfortunately, runtime linking may impact performance, so we do
+ # not want this to be the default eventually. Also, we use the
+ # versioned .so libs for executables only if there is the -brtl
+ # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only.
+ # To allow for filename-based versioning support, we need to create
+ # libNAME.so.V as an archive file, containing:
+ # *) an Import File, referring to the versioned filename of the
+ # archive as well as the shared archive member, telling the
+ # bitwidth (32 or 64) of that shared object, and providing the
+ # list of exported symbols of that shared object, eventually
+ # decorated with the 'weak' keyword
+ # *) the shared object with the F_LOADONLY flag set, to really avoid
+ # it being seen by the linker.
+ # At run time we better use the real file rather than another symlink,
+ # but for link time we create the symlink libNAME.so -> libNAME.so.V
+
+ case $with_aix_soname,$aix_use_runtimelinking in
+ # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct
+ # soname into executable. Probably we can add versioning support to
+ # collect2, so additional links can be useful in future.
+ aix,yes) # traditional libtool
+ dynamic_linker='AIX unversionable lib.so'
+ # If using run time linking (on AIX 4.2 or later) use lib<name>.so
+ # instead of lib<name>.a to let people know that these are not
+ # typical AIX shared libraries.
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ ;;
+ aix,no) # traditional AIX only
+ dynamic_linker='AIX lib.a(lib.so.V)'
+ # We preserve .a as extension for shared libraries through AIX4.2
+ # and later when we are not doing run time linking.
+ library_names_spec='$libname$release.a $libname.a'
+ soname_spec='$libname$release$shared_ext$major'
+ ;;
+ svr4,*) # full svr4 only
+ dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o)"
+ library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
+ # We do not specify a path in Import Files, so LIBPATH fires.
+ shlibpath_overrides_runpath=yes
+ ;;
+ *,yes) # both, prefer svr4
+ dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o), lib.a(lib.so.V)"
+ library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
+ # unpreferred sharedlib libNAME.a needs extra handling
+ postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"'
+ postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"'
+ # We do not specify a path in Import Files, so LIBPATH fires.
+ shlibpath_overrides_runpath=yes
+ ;;
+ *,no) # both, prefer aix
+ dynamic_linker="AIX lib.a(lib.so.V), lib.so.V($shared_archive_member_spec.o)"
+ library_names_spec='$libname$release.a $libname.a'
+ soname_spec='$libname$release$shared_ext$major'
+ # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling
+ postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)'
+ postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"'
+ ;;
+ esac
+ shlibpath_var=LIBPATH
+ fi
+ ;;
+
+amigaos*)
+ case $host_cpu in
+ powerpc)
+ # Since July 2007 AmigaOS4 officially supports .so libraries.
+ # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ ;;
+ m68k)
+ library_names_spec='$libname.ixlibrary $libname.a'
+ # Create ${libname}_ixlibrary.a entries in /sys/libs.
+ finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
+ ;;
+ esac
+ ;;
+
+beos*)
+ library_names_spec='$libname$shared_ext'
+ dynamic_linker="$host_os ld.so"
+ shlibpath_var=LIBRARY_PATH
+ ;;
+
+bsdi[45]*)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ need_version=no
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
+ sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
+ # the default ld.so.conf also contains /usr/contrib/lib and
+ # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
+ # libtool to hard-code these into programs
+ ;;
+
+cygwin* | mingw* | pw32* | cegcc*)
+ version_type=windows
+ shrext_cmds=.dll
+ need_version=no
+ need_lib_prefix=no
+
+ case $GCC,$cc_basename in
+ yes,*)
+ # gcc
+ library_names_spec='$libname.dll.a'
+ # DLL is installed to $(libdir)/../bin by postinstall_cmds
+ postinstall_cmds='base_file=`basename \$file`~
+ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
+ dldir=$destdir/`dirname \$dlpath`~
+ test -d \$dldir || mkdir -p \$dldir~
+ $install_prog $dir/$dlname \$dldir/$dlname~
+ chmod a+x \$dldir/$dlname~
+ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
+ eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
+ fi'
+ postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
+ dlpath=$dir/\$dldll~
+ $RM \$dlpath'
+ shlibpath_overrides_runpath=yes
+
+ case $host_os in
+ cygwin*)
+ # Cygwin DLLs use 'cyg' prefix rather than 'lib'
+ soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
+
+ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"
+ ;;
+ mingw* | cegcc*)
+ # MinGW DLLs use traditional 'lib' prefix
+ soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
+ ;;
+ pw32*)
+ # pw32 DLLs use 'pw' prefix rather than 'lib'
+ library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
+ ;;
+ esac
+ dynamic_linker='Win32 ld.exe'
+ ;;
+
+ *,cl*)
+ # Native MSVC
+ libname_spec='$name'
+ soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
+ library_names_spec='$libname.dll.lib'
+
+ case $build_os in
+ mingw*)
+ sys_lib_search_path_spec=
+ lt_save_ifs=$IFS
+ IFS=';'
+ for lt_path in $LIB
+ do
+ IFS=$lt_save_ifs
+ # Let DOS variable expansion print the short 8.3 style file name.
+ lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
+ sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
+ done
+ IFS=$lt_save_ifs
+ # Convert to MSYS style.
+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'`
+ ;;
+ cygwin*)
+ # Convert to unix form, then to dos form, then back to unix form
+ # but this time dos style (no spaces!) so that the unix form looks
+ # like /cygdrive/c/PROGRA~1:/cygdr...
+ sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
+ sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
+ sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
+ ;;
+ *)
+ sys_lib_search_path_spec=$LIB
+ if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
+ # It is most probably a Windows format PATH.
+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+ else
+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
+ fi
+ # FIXME: find the short name or the path components, as spaces are
+ # common. (e.g. "Program Files" -> "PROGRA~1")
+ ;;
+ esac
+
+ # DLL is installed to $(libdir)/../bin by postinstall_cmds
+ postinstall_cmds='base_file=`basename \$file`~
+ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
+ dldir=$destdir/`dirname \$dlpath`~
+ test -d \$dldir || mkdir -p \$dldir~
+ $install_prog $dir/$dlname \$dldir/$dlname'
+ postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
+ dlpath=$dir/\$dldll~
+ $RM \$dlpath'
+ shlibpath_overrides_runpath=yes
+ dynamic_linker='Win32 link.exe'
+ ;;
+
+ *)
+ # Assume MSVC wrapper
+ library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib'
+ dynamic_linker='Win32 ld.exe'
+ ;;
+ esac
+ # FIXME: first we should search . and the directory the executable is in
+ shlibpath_var=PATH
+ ;;
+
+darwin* | rhapsody*)
+ dynamic_linker="$host_os dyld"
+ version_type=darwin
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='$libname$release$major$shared_ext $libname$shared_ext'
+ soname_spec='$libname$release$major$shared_ext'
+ shlibpath_overrides_runpath=yes
+ shlibpath_var=DYLD_LIBRARY_PATH
+ shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
+
+ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"
+ sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
+ ;;
+
+dgux*)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ ;;
+
+freebsd* | dragonfly*)
+ # DragonFly does not have aout. When/if they implement a new
+ # versioning mechanism, adjust this.
+ if test -x /usr/bin/objformat; then
+ objformat=`/usr/bin/objformat`
+ else
+ case $host_os in
+ freebsd[23].*) objformat=aout ;;
+ *) objformat=elf ;;
+ esac
+ fi
+ version_type=freebsd-$objformat
+ case $version_type in
+ freebsd-elf*)
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
+ need_version=no
+ need_lib_prefix=no
+ ;;
+ freebsd-*)
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
+ need_version=yes
+ ;;
+ esac
+ shlibpath_var=LD_LIBRARY_PATH
+ case $host_os in
+ freebsd2.*)
+ shlibpath_overrides_runpath=yes
+ ;;
+ freebsd3.[01]* | freebsdelf3.[01]*)
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ ;;
+ freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
+ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ ;;
+ *) # from 4.6 on, and DragonFly
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ ;;
+ esac
+ ;;
+
+haiku*)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ need_lib_prefix=no
+ need_version=no
+ dynamic_linker="$host_os runtime_loader"
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
+ shlibpath_var=LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
+ hardcode_into_libs=yes
+ ;;
+
+hpux9* | hpux10* | hpux11*)
+ # Give a soname corresponding to the major version so that dld.sl refuses to
+ # link against other versions.
+ version_type=sunos
+ need_lib_prefix=no
+ need_version=no
+ case $host_cpu in
+ ia64*)
+ shrext_cmds='.so'
+ hardcode_into_libs=yes
+ dynamic_linker="$host_os dld.so"
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
+ if test 32 = "$HPUX_IA64_MODE"; then
+ sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
+ sys_lib_dlsearch_path_spec=/usr/lib/hpux32
+ else
+ sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
+ sys_lib_dlsearch_path_spec=/usr/lib/hpux64
+ fi
+ ;;
+ hppa*64*)
+ shrext_cmds='.sl'
+ hardcode_into_libs=yes
+ dynamic_linker="$host_os dld.sl"
+ shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
+ shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
+ sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
+ sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+ ;;
+ *)
+ shrext_cmds='.sl'
+ dynamic_linker="$host_os dld.sl"
+ shlibpath_var=SHLIB_PATH
+ shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
+ ;;
+ esac
+ # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
+ postinstall_cmds='chmod 555 $lib'
+ # or fails outright, so override atomically:
+ install_override_mode=555
+ ;;
+
+interix[3-9]*)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
+ dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ ;;
+
+irix5* | irix6* | nonstopux*)
+ case $host_os in
+ nonstopux*) version_type=nonstopux ;;
+ *)
+ if test yes = "$lt_cv_prog_gnu_ld"; then
+ version_type=linux # correct to gnu/linux during the next big refactor
+ else
+ version_type=irix
+ fi ;;
+ esac
+ need_lib_prefix=no
+ need_version=no
+ soname_spec='$libname$release$shared_ext$major'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext'
+ case $host_os in
+ irix5* | nonstopux*)
+ libsuff= shlibsuff=
+ ;;
+ *)
+ case $LD in # libtool.m4 will add one of these switches to LD
+ *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
+ libsuff= shlibsuff= libmagic=32-bit;;
+ *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
+ libsuff=32 shlibsuff=N32 libmagic=N32;;
+ *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
+ libsuff=64 shlibsuff=64 libmagic=64-bit;;
+ *) libsuff= shlibsuff= libmagic=never-match;;
+ esac
+ ;;
+ esac
+ shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
+ shlibpath_overrides_runpath=no
+ sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff"
+ sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff"
+ hardcode_into_libs=yes
+ ;;
+
+# No shared lib support for Linux oldld, aout, or coff.
+linux*oldld* | linux*aout* | linux*coff*)
+ dynamic_linker=no
+ ;;
+
+linux*android*)
+ version_type=none # Android doesn't support versioned libraries.
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='$libname$release$shared_ext'
+ soname_spec='$libname$release$shared_ext'
+ finish_cmds=
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+
+ # This implies no fast_install, which is unacceptable.
+ # Some rework will be needed to allow for fast_install
+ # before this can be enabled.
+ hardcode_into_libs=yes
+
+ dynamic_linker='Android linker'
+ # Don't embed -rpath directories since the linker doesn't support them.
+ hardcode_libdir_flag_spec='-L$libdir'
+ ;;
+
+# This must be glibc/ELF.
+linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+
+ # Some binutils ld are patched to set DT_RUNPATH
+ if test ${lt_cv_shlibpath_overrides_runpath+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ lt_cv_shlibpath_overrides_runpath=no
+ save_LDFLAGS=$LDFLAGS
+ save_libdir=$libdir
+ eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \
+ LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\""
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null
+then :
+ lt_cv_shlibpath_overrides_runpath=yes
+fi
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+ LDFLAGS=$save_LDFLAGS
+ libdir=$save_libdir
+
+fi
+
+ shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
+
+ # This implies no fast_install, which is unacceptable.
+ # Some rework will be needed to allow for fast_install
+ # before this can be enabled.
+ hardcode_into_libs=yes
+
+ # Ideally, we could use ldconfig to report *all* directores which are
+ # searched for libraries, however this is still not possible. Aside from not
+ # being certain /sbin/ldconfig is available, command
+ # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64,
+ # even though it is searched at run-time. Try to do the best guess by
+ # appending ld.so.conf contents (and includes) to the search path.
+ if test -f /etc/ld.so.conf; then
+ lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
+ sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
+ fi
+
+ # We used to test for /lib/ld.so.1 and disable shared libraries on
+ # powerpc, because MkLinux only supported shared libraries with the
+ # GNU dynamic linker. Since this was broken with cross compilers,
+ # most powerpc-linux boxes support dynamic linking these days and
+ # people can always --disable-shared, the test was removed, and we
+ # assume the GNU/Linux dynamic linker is in use.
+ dynamic_linker='GNU/Linux ld.so'
+ ;;
+
+netbsdelf*-gnu)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ dynamic_linker='NetBSD ld.elf_so'
+ ;;
+
+netbsd*)
+ version_type=sunos
+ need_lib_prefix=no
+ need_version=no
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+ dynamic_linker='NetBSD (a.out) ld.so'
+ else
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
+ dynamic_linker='NetBSD ld.elf_so'
+ fi
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ ;;
+
+newsos6)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ ;;
+
+*nto* | *qnx*)
+ version_type=qnx
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ dynamic_linker='ldqnx.so'
+ ;;
+
+openbsd* | bitrig*)
+ version_type=sunos
+ sys_lib_dlsearch_path_spec=/usr/lib
+ need_lib_prefix=no
+ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
+ need_version=no
+ else
+ need_version=yes
+ fi
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ ;;
+
+os2*)
+ libname_spec='$name'
+ version_type=windows
+ shrext_cmds=.dll
+ need_version=no
+ need_lib_prefix=no
+ # OS/2 can only load a DLL with a base name of 8 characters or less.
+ soname_spec='`test -n "$os2dllname" && libname="$os2dllname";
+ v=$($ECHO $release$versuffix | tr -d .-);
+ n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _);
+ $ECHO $n$v`$shared_ext'
+ library_names_spec='${libname}_dll.$libext'
+ dynamic_linker='OS/2 ld.exe'
+ shlibpath_var=BEGINLIBPATH
+ sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
+ sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+ postinstall_cmds='base_file=`basename \$file`~
+ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~
+ dldir=$destdir/`dirname \$dlpath`~
+ test -d \$dldir || mkdir -p \$dldir~
+ $install_prog $dir/$dlname \$dldir/$dlname~
+ chmod a+x \$dldir/$dlname~
+ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
+ eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
+ fi'
+ postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~
+ dlpath=$dir/\$dldll~
+ $RM \$dlpath'
+ ;;
+
+osf3* | osf4* | osf5*)
+ version_type=osf
+ need_lib_prefix=no
+ need_version=no
+ soname_spec='$libname$release$shared_ext$major'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ shlibpath_var=LD_LIBRARY_PATH
+ sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
+ sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+ ;;
+
+rdos*)
+ dynamic_linker=no
+ ;;
+
+solaris*)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ # ldd complains unless libraries are executable
+ postinstall_cmds='chmod +x $lib'
+ ;;
+
+sunos4*)
+ version_type=sunos
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
+ finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ if test yes = "$with_gnu_ld"; then
+ need_lib_prefix=no
+ fi
+ need_version=yes
+ ;;
+
+sysv4 | sysv4.3*)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ case $host_vendor in
+ sni)
+ shlibpath_overrides_runpath=no
+ need_lib_prefix=no
+ runpath_var=LD_RUN_PATH
+ ;;
+ siemens)
+ need_lib_prefix=no
+ ;;
+ motorola)
+ need_lib_prefix=no
+ need_version=no
+ shlibpath_overrides_runpath=no
+ sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
+ ;;
+ esac
+ ;;
+
+sysv4*MP*)
+ if test -d /usr/nec; then
+ version_type=linux # correct to gnu/linux during the next big refactor
+ library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext'
+ soname_spec='$libname$shared_ext.$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ fi
+ ;;
+
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+ version_type=sco
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ if test yes = "$with_gnu_ld"; then
+ sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
+ else
+ sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
+ case $host_os in
+ sco3.2v5*)
+ sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
+ ;;
+ esac
+ fi
+ sys_lib_dlsearch_path_spec='/usr/lib'
+ ;;
+
+tpf*)
+ # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
+ version_type=linux # correct to gnu/linux during the next big refactor
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ ;;
+
+uts4*)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ ;;
+
+*)
+ dynamic_linker=no
+ ;;
+esac
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
+printf "%s\n" "$dynamic_linker" >&6; }
+test no = "$dynamic_linker" && can_build_shared=no
+
+variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
+if test yes = "$GCC"; then
+ variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
+fi
+
+if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then
+ sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec
+fi
+
+if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then
+ sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec
+fi
+
+# remember unaugmented sys_lib_dlsearch_path content for libtool script decls...
+configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec
+
+# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code
+func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH"
+
+# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool
+configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5
+printf %s "checking how to hardcode library paths into programs... " >&6; }
+hardcode_action=
+if test -n "$hardcode_libdir_flag_spec" ||
+ test -n "$runpath_var" ||
+ test yes = "$hardcode_automatic"; then
+
+ # We can hardcode non-existent directories.
+ if test no != "$hardcode_direct" &&
+ # If the only mechanism to avoid hardcoding is shlibpath_var, we
+ # have to relink, otherwise we might link with an installed library
+ # when we should be linking with a yet-to-be-installed one
+ ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, )" &&
+ test no != "$hardcode_minus_L"; then
+ # Linking always hardcodes the temporary library directory.
+ hardcode_action=relink
+ else
+ # We can link without hardcoding, and we can hardcode nonexisting dirs.
+ hardcode_action=immediate
+ fi
+else
+ # We cannot hardcode anything, or else we can only hardcode existing
+ # directories.
+ hardcode_action=unsupported
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5
+printf "%s\n" "$hardcode_action" >&6; }
+
+if test relink = "$hardcode_action" ||
+ test yes = "$inherit_rpath"; then
+ # Fast installation is not supported
+ enable_fast_install=no
+elif test yes = "$shlibpath_overrides_runpath" ||
+ test no = "$enable_shared"; then
+ # Fast installation is not necessary
+ enable_fast_install=needless
+fi
+
+
+
+
+
+
+ if test yes != "$enable_dlopen"; then
+ enable_dlopen=unknown
+ enable_dlopen_self=unknown
+ enable_dlopen_self_static=unknown
+else
+ lt_cv_dlopen=no
+ lt_cv_dlopen_libs=
+
+ case $host_os in
+ beos*)
+ lt_cv_dlopen=load_add_on
+ lt_cv_dlopen_libs=
+ lt_cv_dlopen_self=yes
+ ;;
+
+ mingw* | pw32* | cegcc*)
+ lt_cv_dlopen=LoadLibrary
+ lt_cv_dlopen_libs=
+ ;;
+
+ cygwin*)
+ lt_cv_dlopen=dlopen
+ lt_cv_dlopen_libs=
+ ;;
+
+ darwin*)
+ # if libdl is installed we need to link against it
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
+printf %s "checking for dlopen in -ldl... " >&6; }
+if test ${ac_cv_lib_dl_dlopen+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldl $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+char dlopen ();
+int
+main (void)
+{
+return dlopen ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ ac_cv_lib_dl_dlopen=yes
+else $as_nop
+ ac_cv_lib_dl_dlopen=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
+printf "%s\n" "$ac_cv_lib_dl_dlopen" >&6; }
+if test "x$ac_cv_lib_dl_dlopen" = xyes
+then :
+ lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl
+else $as_nop
+
+ lt_cv_dlopen=dyld
+ lt_cv_dlopen_libs=
+ lt_cv_dlopen_self=yes
+
+fi
+
+ ;;
+
+ tpf*)
+ # Don't try to run any link tests for TPF. We know it's impossible
+ # because TPF is a cross-compiler, and we know how we open DSOs.
+ lt_cv_dlopen=dlopen
+ lt_cv_dlopen_libs=
+ lt_cv_dlopen_self=no
+ ;;
+
+ *)
+ ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load"
+if test "x$ac_cv_func_shl_load" = xyes
+then :
+ lt_cv_dlopen=shl_load
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
+printf %s "checking for shl_load in -ldld... " >&6; }
+if test ${ac_cv_lib_dld_shl_load+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldld $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+char shl_load ();
+int
+main (void)
+{
+return shl_load ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ ac_cv_lib_dld_shl_load=yes
+else $as_nop
+ ac_cv_lib_dld_shl_load=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
+printf "%s\n" "$ac_cv_lib_dld_shl_load" >&6; }
+if test "x$ac_cv_lib_dld_shl_load" = xyes
+then :
+ lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld
+else $as_nop
+ ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
+if test "x$ac_cv_func_dlopen" = xyes
+then :
+ lt_cv_dlopen=dlopen
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
+printf %s "checking for dlopen in -ldl... " >&6; }
+if test ${ac_cv_lib_dl_dlopen+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldl $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+char dlopen ();
+int
+main (void)
+{
+return dlopen ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ ac_cv_lib_dl_dlopen=yes
+else $as_nop
+ ac_cv_lib_dl_dlopen=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
+printf "%s\n" "$ac_cv_lib_dl_dlopen" >&6; }
+if test "x$ac_cv_lib_dl_dlopen" = xyes
+then :
+ lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5
+printf %s "checking for dlopen in -lsvld... " >&6; }
+if test ${ac_cv_lib_svld_dlopen+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lsvld $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+char dlopen ();
+int
+main (void)
+{
+return dlopen ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ ac_cv_lib_svld_dlopen=yes
+else $as_nop
+ ac_cv_lib_svld_dlopen=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5
+printf "%s\n" "$ac_cv_lib_svld_dlopen" >&6; }
+if test "x$ac_cv_lib_svld_dlopen" = xyes
+then :
+ lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5
+printf %s "checking for dld_link in -ldld... " >&6; }
+if test ${ac_cv_lib_dld_dld_link+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldld $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+char dld_link ();
+int
+main (void)
+{
+return dld_link ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ ac_cv_lib_dld_dld_link=yes
+else $as_nop
+ ac_cv_lib_dld_dld_link=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5
+printf "%s\n" "$ac_cv_lib_dld_dld_link" >&6; }
+if test "x$ac_cv_lib_dld_dld_link" = xyes
+then :
+ lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld
+fi
+
+
+fi
+
+
+fi
+
+
+fi
+
+
+fi
+
+
+fi
+
+ ;;
+ esac
+
+ if test no = "$lt_cv_dlopen"; then
+ enable_dlopen=no
+ else
+ enable_dlopen=yes
+ fi
+
+ case $lt_cv_dlopen in
+ dlopen)
+ save_CPPFLAGS=$CPPFLAGS
+ test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
+
+ save_LDFLAGS=$LDFLAGS
+ wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
+
+ save_LIBS=$LIBS
+ LIBS="$lt_cv_dlopen_libs $LIBS"
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5
+printf %s "checking whether a program can dlopen itself... " >&6; }
+if test ${lt_cv_dlopen_self+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test yes = "$cross_compiling"; then :
+ lt_cv_dlopen_self=cross
+else
+ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+ lt_status=$lt_dlunknown
+ cat > conftest.$ac_ext <<_LT_EOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+#if HAVE_DLFCN_H
+#include <dlfcn.h>
+#endif
+
+#include <stdio.h>
+
+#ifdef RTLD_GLOBAL
+# define LT_DLGLOBAL RTLD_GLOBAL
+#else
+# ifdef DL_GLOBAL
+# define LT_DLGLOBAL DL_GLOBAL
+# else
+# define LT_DLGLOBAL 0
+# endif
+#endif
+
+/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
+ find out it does not work in some platform. */
+#ifndef LT_DLLAZY_OR_NOW
+# ifdef RTLD_LAZY
+# define LT_DLLAZY_OR_NOW RTLD_LAZY
+# else
+# ifdef DL_LAZY
+# define LT_DLLAZY_OR_NOW DL_LAZY
+# else
+# ifdef RTLD_NOW
+# define LT_DLLAZY_OR_NOW RTLD_NOW
+# else
+# ifdef DL_NOW
+# define LT_DLLAZY_OR_NOW DL_NOW
+# else
+# define LT_DLLAZY_OR_NOW 0
+# endif
+# endif
+# endif
+# endif
+#endif
+
+/* When -fvisibility=hidden is used, assume the code has been annotated
+ correspondingly for the symbols needed. */
+#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
+int fnord () __attribute__((visibility("default")));
+#endif
+
+int fnord () { return 42; }
+int main ()
+{
+ void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
+ int status = $lt_dlunknown;
+
+ if (self)
+ {
+ if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
+ else
+ {
+ if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
+ else puts (dlerror ());
+ }
+ /* dlclose (self); */
+ }
+ else
+ puts (dlerror ());
+
+ return status;
+}
+_LT_EOF
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then
+ (./conftest; exit; ) >&5 2>/dev/null
+ lt_status=$?
+ case x$lt_status in
+ x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
+ x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
+ x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;;
+ esac
+ else :
+ # compilation failed
+ lt_cv_dlopen_self=no
+ fi
+fi
+rm -fr conftest*
+
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5
+printf "%s\n" "$lt_cv_dlopen_self" >&6; }
+
+ if test yes = "$lt_cv_dlopen_self"; then
+ wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5
+printf %s "checking whether a statically linked program can dlopen itself... " >&6; }
+if test ${lt_cv_dlopen_self_static+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test yes = "$cross_compiling"; then :
+ lt_cv_dlopen_self_static=cross
+else
+ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+ lt_status=$lt_dlunknown
+ cat > conftest.$ac_ext <<_LT_EOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+#if HAVE_DLFCN_H
+#include <dlfcn.h>
+#endif
+
+#include <stdio.h>
+
+#ifdef RTLD_GLOBAL
+# define LT_DLGLOBAL RTLD_GLOBAL
+#else
+# ifdef DL_GLOBAL
+# define LT_DLGLOBAL DL_GLOBAL
+# else
+# define LT_DLGLOBAL 0
+# endif
+#endif
+
+/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
+ find out it does not work in some platform. */
+#ifndef LT_DLLAZY_OR_NOW
+# ifdef RTLD_LAZY
+# define LT_DLLAZY_OR_NOW RTLD_LAZY
+# else
+# ifdef DL_LAZY
+# define LT_DLLAZY_OR_NOW DL_LAZY
+# else
+# ifdef RTLD_NOW
+# define LT_DLLAZY_OR_NOW RTLD_NOW
+# else
+# ifdef DL_NOW
+# define LT_DLLAZY_OR_NOW DL_NOW
+# else
+# define LT_DLLAZY_OR_NOW 0
+# endif
+# endif
+# endif
+# endif
+#endif
+
+/* When -fvisibility=hidden is used, assume the code has been annotated
+ correspondingly for the symbols needed. */
+#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
+int fnord () __attribute__((visibility("default")));
+#endif
+
+int fnord () { return 42; }
+int main ()
+{
+ void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
+ int status = $lt_dlunknown;
+
+ if (self)
+ {
+ if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
+ else
+ {
+ if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
+ else puts (dlerror ());
+ }
+ /* dlclose (self); */
+ }
+ else
+ puts (dlerror ());
+
+ return status;
+}
+_LT_EOF
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then
+ (./conftest; exit; ) >&5 2>/dev/null
+ lt_status=$?
+ case x$lt_status in
+ x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
+ x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
+ x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;;
+ esac
+ else :
+ # compilation failed
+ lt_cv_dlopen_self_static=no
+ fi
+fi
+rm -fr conftest*
+
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5
+printf "%s\n" "$lt_cv_dlopen_self_static" >&6; }
+ fi
+
+ CPPFLAGS=$save_CPPFLAGS
+ LDFLAGS=$save_LDFLAGS
+ LIBS=$save_LIBS
+ ;;
+ esac
+
+ case $lt_cv_dlopen_self in
+ yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
+ *) enable_dlopen_self=unknown ;;
+ esac
+
+ case $lt_cv_dlopen_self_static in
+ yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
+ *) enable_dlopen_self_static=unknown ;;
+ esac
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+striplib=
+old_striplib=
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5
+printf %s "checking whether stripping libraries is possible... " >&6; }
+if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
+ test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
+ test -z "$striplib" && striplib="$STRIP --strip-unneeded"
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+else
+# FIXME - insert some real tests, host_os isn't really good enough
+ case $host_os in
+ darwin*)
+ if test -n "$STRIP"; then
+ striplib="$STRIP -x"
+ old_striplib="$STRIP -S"
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+ else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+ fi
+ ;;
+ *)
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+ ;;
+ esac
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+ # Report what library types will actually be built
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5
+printf %s "checking if libtool supports shared libraries... " >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5
+printf "%s\n" "$can_build_shared" >&6; }
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5
+printf %s "checking whether to build shared libraries... " >&6; }
+ test no = "$can_build_shared" && enable_shared=no
+
+ # On AIX, shared libraries and static libraries use the same namespace, and
+ # are all built from PIC.
+ case $host_os in
+ aix3*)
+ test yes = "$enable_shared" && enable_static=no
+ if test -n "$RANLIB"; then
+ archive_cmds="$archive_cmds~\$RANLIB \$lib"
+ postinstall_cmds='$RANLIB $lib'
+ fi
+ ;;
+
+ aix[4-9]*)
+ if test ia64 != "$host_cpu"; then
+ case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
+ yes,aix,yes) ;; # shared object as lib.so file only
+ yes,svr4,*) ;; # shared object as lib.so archive member only
+ yes,*) enable_static=no ;; # shared object in lib.a archive as well
+ esac
+ fi
+ ;;
+ esac
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
+printf "%s\n" "$enable_shared" >&6; }
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5
+printf %s "checking whether to build static libraries... " >&6; }
+ # Make sure either enable_shared or enable_static is yes.
+ test yes = "$enable_shared" || enable_static=yes
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5
+printf "%s\n" "$enable_static" >&6; }
+
+
+
+
+fi
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+CC=$lt_save_CC
+
+ if test -n "$CXX" && ( test no != "$CXX" &&
+ ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) ||
+ (test g++ != "$CXX"))); then
+ ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
+printf %s "checking how to run the C++ preprocessor... " >&6; }
+if test -z "$CXXCPP"; then
+ if test ${ac_cv_prog_CXXCPP+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ # Double quotes because $CXX needs to be expanded
+ for CXXCPP in "$CXX -E" cpp /lib/cpp
+ do
+ ac_preproc_ok=false
+for ac_cxx_preproc_warn_flag in '' yes
+do
+ # Use a header file that comes with gcc, so configuring glibc
+ # with a fresh cross-compiler works.
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp. "Syntax error" is here to catch this case.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <limits.h>
+ Syntax error
+_ACEOF
+if ac_fn_cxx_try_cpp "$LINENO"
+then :
+
+else $as_nop
+ # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether nonexistent headers
+ # can be detected and how.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <ac_nonexistent.h>
+_ACEOF
+if ac_fn_cxx_try_cpp "$LINENO"
+then :
+ # Broken: success on invalid input.
+continue
+else $as_nop
+ # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.i conftest.err conftest.$ac_ext
+if $ac_preproc_ok
+then :
+ break
+fi
+
+ done
+ ac_cv_prog_CXXCPP=$CXXCPP
+
+fi
+ CXXCPP=$ac_cv_prog_CXXCPP
+else
+ ac_cv_prog_CXXCPP=$CXXCPP
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
+printf "%s\n" "$CXXCPP" >&6; }
+ac_preproc_ok=false
+for ac_cxx_preproc_warn_flag in '' yes
+do
+ # Use a header file that comes with gcc, so configuring glibc
+ # with a fresh cross-compiler works.
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp. "Syntax error" is here to catch this case.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <limits.h>
+ Syntax error
+_ACEOF
+if ac_fn_cxx_try_cpp "$LINENO"
+then :
+
+else $as_nop
+ # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether nonexistent headers
+ # can be detected and how.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <ac_nonexistent.h>
+_ACEOF
+if ac_fn_cxx_try_cpp "$LINENO"
+then :
+ # Broken: success on invalid input.
+continue
+else $as_nop
+ # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.i conftest.err conftest.$ac_ext
+if $ac_preproc_ok
+then :
+
+else $as_nop
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
+See \`config.log' for more details" "$LINENO" 5; }
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+else
+ _lt_caught_CXX_error=yes
+fi
+
+ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+archive_cmds_need_lc_CXX=no
+allow_undefined_flag_CXX=
+always_export_symbols_CXX=no
+archive_expsym_cmds_CXX=
+compiler_needs_object_CXX=no
+export_dynamic_flag_spec_CXX=
+hardcode_direct_CXX=no
+hardcode_direct_absolute_CXX=no
+hardcode_libdir_flag_spec_CXX=
+hardcode_libdir_separator_CXX=
+hardcode_minus_L_CXX=no
+hardcode_shlibpath_var_CXX=unsupported
+hardcode_automatic_CXX=no
+inherit_rpath_CXX=no
+module_cmds_CXX=
+module_expsym_cmds_CXX=
+link_all_deplibs_CXX=unknown
+old_archive_cmds_CXX=$old_archive_cmds
+reload_flag_CXX=$reload_flag
+reload_cmds_CXX=$reload_cmds
+no_undefined_flag_CXX=
+whole_archive_flag_spec_CXX=
+enable_shared_with_static_runtimes_CXX=no
+
+# Source file extension for C++ test sources.
+ac_ext=cpp
+
+# Object file extension for compiled C++ test sources.
+objext=o
+objext_CXX=$objext
+
+# No sense in running all these tests if we already determined that
+# the CXX compiler isn't working. Some variables (like enable_shared)
+# are currently assumed to apply to all compilers on this platform,
+# and will be corrupted by setting them based on a non-working compiler.
+if test yes != "$_lt_caught_CXX_error"; then
+ # Code to be used in simple compile tests
+ lt_simple_compile_test_code="int some_variable = 0;"
+
+ # Code to be used in simple link tests
+ lt_simple_link_test_code='int main(int, char *[]) { return(0); }'
+
+ # ltmain only uses $CC for tagged configurations so make sure $CC is set.
+
+
+
+
+
+
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
+
+# If no C compiler flags were specified, use CFLAGS.
+LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
+
+# Allow CC to be a program name with arguments.
+compiler=$CC
+
+
+ # save warnings/boilerplate of simple test code
+ ac_outfile=conftest.$ac_objext
+echo "$lt_simple_compile_test_code" >conftest.$ac_ext
+eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_compiler_boilerplate=`cat conftest.err`
+$RM conftest*
+
+ ac_outfile=conftest.$ac_objext
+echo "$lt_simple_link_test_code" >conftest.$ac_ext
+eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_linker_boilerplate=`cat conftest.err`
+$RM -r conftest*
+
+
+ # Allow CC to be a program name with arguments.
+ lt_save_CC=$CC
+ lt_save_CFLAGS=$CFLAGS
+ lt_save_LD=$LD
+ lt_save_GCC=$GCC
+ GCC=$GXX
+ lt_save_with_gnu_ld=$with_gnu_ld
+ lt_save_path_LD=$lt_cv_path_LD
+ if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
+ lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
+ else
+ $as_unset lt_cv_prog_gnu_ld
+ fi
+ if test -n "${lt_cv_path_LDCXX+set}"; then
+ lt_cv_path_LD=$lt_cv_path_LDCXX
+ else
+ $as_unset lt_cv_path_LD
+ fi
+ test -z "${LDCXX+set}" || LD=$LDCXX
+ CC=${CXX-"c++"}
+ CFLAGS=$CXXFLAGS
+ compiler=$CC
+ compiler_CXX=$CC
+ func_cc_basename $compiler
+cc_basename=$func_cc_basename_result
+
+
+ if test -n "$compiler"; then
+ # We don't want -fno-exception when compiling C++ code, so set the
+ # no_builtin_flag separately
+ if test yes = "$GXX"; then
+ lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin'
+ else
+ lt_prog_compiler_no_builtin_flag_CXX=
+ fi
+
+ if test yes = "$GXX"; then
+ # Set up default GNU C++ configuration
+
+
+
+# Check whether --with-gnu-ld was given.
+if test ${with_gnu_ld+y}
+then :
+ withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes
+else $as_nop
+ with_gnu_ld=no
+fi
+
+ac_prog=ld
+if test yes = "$GCC"; then
+ # Check if gcc -print-prog-name=ld gives a path.
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
+printf %s "checking for ld used by $CC... " >&6; }
+ case $host in
+ *-*-mingw*)
+ # gcc leaves a trailing carriage return, which upsets mingw
+ ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
+ *)
+ ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
+ esac
+ case $ac_prog in
+ # Accept absolute paths.
+ [\\/]* | ?:[\\/]*)
+ re_direlt='/[^/][^/]*/\.\./'
+ # Canonicalize the pathname of ld
+ ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
+ while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
+ ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
+ done
+ test -z "$LD" && LD=$ac_prog
+ ;;
+ "")
+ # If it fails, then pretend we aren't using GCC.
+ ac_prog=ld
+ ;;
+ *)
+ # If it is relative, then search for the first ld in PATH.
+ with_gnu_ld=unknown
+ ;;
+ esac
+elif test yes = "$with_gnu_ld"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
+printf %s "checking for GNU ld... " >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
+printf %s "checking for non-GNU ld... " >&6; }
+fi
+if test ${lt_cv_path_LD+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -z "$LD"; then
+ lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
+ for ac_dir in $PATH; do
+ IFS=$lt_save_ifs
+ test -z "$ac_dir" && ac_dir=.
+ if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
+ lt_cv_path_LD=$ac_dir/$ac_prog
+ # Check to see if the program is GNU ld. I'd rather use --version,
+ # but apparently some variants of GNU ld only accept -v.
+ # Break only if it was the GNU/non-GNU ld that we prefer.
+ case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
+ *GNU* | *'with BFD'*)
+ test no != "$with_gnu_ld" && break
+ ;;
+ *)
+ test yes != "$with_gnu_ld" && break
+ ;;
+ esac
+ fi
+ done
+ IFS=$lt_save_ifs
+else
+ lt_cv_path_LD=$LD # Let the user override the test with a path.
+fi
+fi
+
+LD=$lt_cv_path_LD
+if test -n "$LD"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
+printf "%s\n" "$LD" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
+printf %s "checking if the linker ($LD) is GNU ld... " >&6; }
+if test ${lt_cv_prog_gnu_ld+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ # I'd rather use --version here, but apparently some GNU lds only accept -v.
+case `$LD -v 2>&1 </dev/null` in
+*GNU* | *'with BFD'*)
+ lt_cv_prog_gnu_ld=yes
+ ;;
+*)
+ lt_cv_prog_gnu_ld=no
+ ;;
+esac
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5
+printf "%s\n" "$lt_cv_prog_gnu_ld" >&6; }
+with_gnu_ld=$lt_cv_prog_gnu_ld
+
+
+
+
+
+
+
+ # Check if GNU C++ uses GNU ld as the underlying linker, since the
+ # archiving commands below assume that GNU ld is being used.
+ if test yes = "$with_gnu_ld"; then
+ archive_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
+ archive_expsym_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
+
+ hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir'
+ export_dynamic_flag_spec_CXX='$wl--export-dynamic'
+
+ # If archive_cmds runs LD, not CC, wlarc should be empty
+ # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
+ # investigate it a little bit more. (MM)
+ wlarc='$wl'
+
+ # ancient GNU ld didn't support --whole-archive et. al.
+ if eval "`$CC -print-prog-name=ld` --help 2>&1" |
+ $GREP 'no-whole-archive' > /dev/null; then
+ whole_archive_flag_spec_CXX=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
+ else
+ whole_archive_flag_spec_CXX=
+ fi
+ else
+ with_gnu_ld=no
+ wlarc=
+
+ # A generic and very simple default shared library creation
+ # command for GNU C++ for the case where it uses the native
+ # linker, instead of GNU ld. If possible, this setting should
+ # overridden to take advantage of the native linker features on
+ # the platform it is being used on.
+ archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
+ fi
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"'
+
+ else
+ GXX=no
+ with_gnu_ld=no
+ wlarc=
+ fi
+
+ # PORTME: fill in a description of your system's C++ link characteristics
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
+printf %s "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
+ ld_shlibs_CXX=yes
+ case $host_os in
+ aix3*)
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+ aix[4-9]*)
+ if test ia64 = "$host_cpu"; then
+ # On IA64, the linker does run time linking by default, so we don't
+ # have to do anything special.
+ aix_use_runtimelinking=no
+ exp_sym_flag='-Bexport'
+ no_entry_flag=
+ else
+ aix_use_runtimelinking=no
+
+ # Test if we are trying to use run time linking or normal
+ # AIX style linking. If -brtl is somewhere in LDFLAGS, we
+ # have runtime linking enabled, and use it for executables.
+ # For shared libraries, we enable/disable runtime linking
+ # depending on the kind of the shared library created -
+ # when "with_aix_soname,aix_use_runtimelinking" is:
+ # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables
+ # "aix,yes" lib.so shared, rtl:yes, for executables
+ # lib.a static archive
+ # "both,no" lib.so.V(shr.o) shared, rtl:yes
+ # lib.a(lib.so.V) shared, rtl:no, for executables
+ # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
+ # lib.a(lib.so.V) shared, rtl:no
+ # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables
+ # lib.a static archive
+ case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
+ for ld_flag in $LDFLAGS; do
+ case $ld_flag in
+ *-brtl*)
+ aix_use_runtimelinking=yes
+ break
+ ;;
+ esac
+ done
+ if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
+ # With aix-soname=svr4, we create the lib.so.V shared archives only,
+ # so we don't have lib.a shared libs to link our executables.
+ # We have to force runtime linking in this case.
+ aix_use_runtimelinking=yes
+ LDFLAGS="$LDFLAGS -Wl,-brtl"
+ fi
+ ;;
+ esac
+
+ exp_sym_flag='-bexport'
+ no_entry_flag='-bnoentry'
+ fi
+
+ # When large executables or shared objects are built, AIX ld can
+ # have problems creating the table of contents. If linking a library
+ # or program results in "error TOC overflow" add -mminimal-toc to
+ # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
+ # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
+
+ archive_cmds_CXX=''
+ hardcode_direct_CXX=yes
+ hardcode_direct_absolute_CXX=yes
+ hardcode_libdir_separator_CXX=':'
+ link_all_deplibs_CXX=yes
+ file_list_spec_CXX='$wl-f,'
+ case $with_aix_soname,$aix_use_runtimelinking in
+ aix,*) ;; # no import file
+ svr4,* | *,yes) # use import file
+ # The Import File defines what to hardcode.
+ hardcode_direct_CXX=no
+ hardcode_direct_absolute_CXX=no
+ ;;
+ esac
+
+ if test yes = "$GXX"; then
+ case $host_os in aix4.[012]|aix4.[012].*)
+ # We only want to do this on AIX 4.2 and lower, the check
+ # below for broken collect2 doesn't work under 4.3+
+ collect2name=`$CC -print-prog-name=collect2`
+ if test -f "$collect2name" &&
+ strings "$collect2name" | $GREP resolve_lib_name >/dev/null
+ then
+ # We have reworked collect2
+ :
+ else
+ # We have old collect2
+ hardcode_direct_CXX=unsupported
+ # It fails to find uninstalled libraries when the uninstalled
+ # path is not listed in the libpath. Setting hardcode_minus_L
+ # to unsupported forces relinking
+ hardcode_minus_L_CXX=yes
+ hardcode_libdir_flag_spec_CXX='-L$libdir'
+ hardcode_libdir_separator_CXX=
+ fi
+ esac
+ shared_flag='-shared'
+ if test yes = "$aix_use_runtimelinking"; then
+ shared_flag=$shared_flag' $wl-G'
+ fi
+ # Need to ensure runtime linking is disabled for the traditional
+ # shared library, or the linker may eventually find shared libraries
+ # /with/ Import File - we do not want to mix them.
+ shared_flag_aix='-shared'
+ shared_flag_svr4='-shared $wl-G'
+ else
+ # not using gcc
+ if test ia64 = "$host_cpu"; then
+ # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
+ # chokes on -Wl,-G. The following line is correct:
+ shared_flag='-G'
+ else
+ if test yes = "$aix_use_runtimelinking"; then
+ shared_flag='$wl-G'
+ else
+ shared_flag='$wl-bM:SRE'
+ fi
+ shared_flag_aix='$wl-bM:SRE'
+ shared_flag_svr4='$wl-G'
+ fi
+ fi
+
+ export_dynamic_flag_spec_CXX='$wl-bexpall'
+ # It seems that -bexpall does not export symbols beginning with
+ # underscore (_), so it is better to generate a list of symbols to
+ # export.
+ always_export_symbols_CXX=yes
+ if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
+ # Warning - without using the other runtime loading flags (-brtl),
+ # -berok will link without error, but may produce a broken library.
+ # The "-G" linker flag allows undefined symbols.
+ no_undefined_flag_CXX='-bernotok'
+ # Determine the default libpath from the value encoded in an empty
+ # executable.
+ if test set = "${lt_cv_aix_libpath+set}"; then
+ aix_libpath=$lt_cv_aix_libpath
+else
+ if test ${lt_cv_aix_libpath__CXX+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_link "$LINENO"
+then :
+
+ lt_aix_libpath_sed='
+ /Import File Strings/,/^$/ {
+ /^0/ {
+ s/^0 *\([^ ]*\) *$/\1/
+ p
+ }
+ }'
+ lt_cv_aix_libpath__CXX=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+ # Check for a 64-bit object if we didn't find anything.
+ if test -z "$lt_cv_aix_libpath__CXX"; then
+ lt_cv_aix_libpath__CXX=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+ fi
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+ if test -z "$lt_cv_aix_libpath__CXX"; then
+ lt_cv_aix_libpath__CXX=/usr/lib:/lib
+ fi
+
+fi
+
+ aix_libpath=$lt_cv_aix_libpath__CXX
+fi
+
+ hardcode_libdir_flag_spec_CXX='$wl-blibpath:$libdir:'"$aix_libpath"
+
+ archive_expsym_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag
+ else
+ if test ia64 = "$host_cpu"; then
+ hardcode_libdir_flag_spec_CXX='$wl-R $libdir:/usr/lib:/lib'
+ allow_undefined_flag_CXX="-z nodefs"
+ archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols"
+ else
+ # Determine the default libpath from the value encoded in an
+ # empty executable.
+ if test set = "${lt_cv_aix_libpath+set}"; then
+ aix_libpath=$lt_cv_aix_libpath
+else
+ if test ${lt_cv_aix_libpath__CXX+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_link "$LINENO"
+then :
+
+ lt_aix_libpath_sed='
+ /Import File Strings/,/^$/ {
+ /^0/ {
+ s/^0 *\([^ ]*\) *$/\1/
+ p
+ }
+ }'
+ lt_cv_aix_libpath__CXX=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+ # Check for a 64-bit object if we didn't find anything.
+ if test -z "$lt_cv_aix_libpath__CXX"; then
+ lt_cv_aix_libpath__CXX=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+ fi
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+ if test -z "$lt_cv_aix_libpath__CXX"; then
+ lt_cv_aix_libpath__CXX=/usr/lib:/lib
+ fi
+
+fi
+
+ aix_libpath=$lt_cv_aix_libpath__CXX
+fi
+
+ hardcode_libdir_flag_spec_CXX='$wl-blibpath:$libdir:'"$aix_libpath"
+ # Warning - without using the other run time loading flags,
+ # -berok will link without error, but may produce a broken library.
+ no_undefined_flag_CXX=' $wl-bernotok'
+ allow_undefined_flag_CXX=' $wl-berok'
+ if test yes = "$with_gnu_ld"; then
+ # We only use this code for GNU lds that support --whole-archive.
+ whole_archive_flag_spec_CXX='$wl--whole-archive$convenience $wl--no-whole-archive'
+ else
+ # Exported symbols can be pulled into shared objects from archives
+ whole_archive_flag_spec_CXX='$convenience'
+ fi
+ archive_cmds_need_lc_CXX=yes
+ archive_expsym_cmds_CXX='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
+ # -brtl affects multiple linker settings, -berok does not and is overridden later
+ compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([, ]\\)%-berok\\1%g"`'
+ if test svr4 != "$with_aix_soname"; then
+ # This is similar to how AIX traditionally builds its shared
+ # libraries. Need -bnortl late, we may have -brtl in LDFLAGS.
+ archive_expsym_cmds_CXX="$archive_expsym_cmds_CXX"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname'
+ fi
+ if test aix != "$with_aix_soname"; then
+ archive_expsym_cmds_CXX="$archive_expsym_cmds_CXX"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp'
+ else
+ # used by -dlpreopen to get the symbols
+ archive_expsym_cmds_CXX="$archive_expsym_cmds_CXX"'~$MV $output_objdir/$realname.d/$soname $output_objdir'
+ fi
+ archive_expsym_cmds_CXX="$archive_expsym_cmds_CXX"'~$RM -r $output_objdir/$realname.d'
+ fi
+ fi
+ ;;
+
+ beos*)
+ if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ allow_undefined_flag_CXX=unsupported
+ # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
+ # support --undefined. This deserves some investigation. FIXME
+ archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+ else
+ ld_shlibs_CXX=no
+ fi
+ ;;
+
+ chorus*)
+ case $cc_basename in
+ *)
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+ esac
+ ;;
+
+ cygwin* | mingw* | pw32* | cegcc*)
+ case $GXX,$cc_basename in
+ ,cl* | no,cl*)
+ # Native MSVC
+ # hardcode_libdir_flag_spec is actually meaningless, as there is
+ # no search path for DLLs.
+ hardcode_libdir_flag_spec_CXX=' '
+ allow_undefined_flag_CXX=unsupported
+ always_export_symbols_CXX=yes
+ file_list_spec_CXX='@'
+ # Tell ltmain to make .lib files, not .a files.
+ libext=lib
+ # Tell ltmain to make .dll files, not .so files.
+ shrext_cmds=.dll
+ # FIXME: Setting linknames here is a bad hack.
+ archive_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
+ archive_expsym_cmds_CXX='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then
+ cp "$export_symbols" "$output_objdir/$soname.def";
+ echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
+ else
+ $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
+ fi~
+ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
+ linknames='
+ # The linker will not automatically build a static lib if we build a DLL.
+ # _LT_TAGVAR(old_archive_from_new_cmds, CXX)='true'
+ enable_shared_with_static_runtimes_CXX=yes
+ # Don't use ranlib
+ old_postinstall_cmds_CXX='chmod 644 $oldlib'
+ postlink_cmds_CXX='lt_outputfile="@OUTPUT@"~
+ lt_tool_outputfile="@TOOL_OUTPUT@"~
+ case $lt_outputfile in
+ *.exe|*.EXE) ;;
+ *)
+ lt_outputfile=$lt_outputfile.exe
+ lt_tool_outputfile=$lt_tool_outputfile.exe
+ ;;
+ esac~
+ func_to_tool_file "$lt_outputfile"~
+ if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
+ $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
+ $RM "$lt_outputfile.manifest";
+ fi'
+ ;;
+ *)
+ # g++
+ # _LT_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless,
+ # as there is no search path for DLLs.
+ hardcode_libdir_flag_spec_CXX='-L$libdir'
+ export_dynamic_flag_spec_CXX='$wl--export-all-symbols'
+ allow_undefined_flag_CXX=unsupported
+ always_export_symbols_CXX=no
+ enable_shared_with_static_runtimes_CXX=yes
+
+ if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
+ archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+ # If the export-symbols file already is a .def file, use it as
+ # is; otherwise, prepend EXPORTS...
+ archive_expsym_cmds_CXX='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then
+ cp $export_symbols $output_objdir/$soname.def;
+ else
+ echo EXPORTS > $output_objdir/$soname.def;
+ cat $export_symbols >> $output_objdir/$soname.def;
+ fi~
+ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+ else
+ ld_shlibs_CXX=no
+ fi
+ ;;
+ esac
+ ;;
+ darwin* | rhapsody*)
+
+
+ archive_cmds_need_lc_CXX=no
+ hardcode_direct_CXX=no
+ hardcode_automatic_CXX=yes
+ hardcode_shlibpath_var_CXX=unsupported
+ if test yes = "$lt_cv_ld_force_load"; then
+ whole_archive_flag_spec_CXX='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
+
+ else
+ whole_archive_flag_spec_CXX=''
+ fi
+ link_all_deplibs_CXX=yes
+ allow_undefined_flag_CXX=$_lt_dar_allow_undefined
+ case $cc_basename in
+ ifort*|nagfor*) _lt_dar_can_shared=yes ;;
+ *) _lt_dar_can_shared=$GCC ;;
+ esac
+ if test yes = "$_lt_dar_can_shared"; then
+ output_verbose_link_cmd=func_echo_all
+ archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil"
+ module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
+ archive_expsym_cmds_CXX="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil"
+ module_expsym_cmds_CXX="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil"
+ if test yes != "$lt_cv_apple_cc_single_mod"; then
+ archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dsymutil"
+ archive_expsym_cmds_CXX="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil"
+ fi
+
+ else
+ ld_shlibs_CXX=no
+ fi
+
+ ;;
+
+ os2*)
+ hardcode_libdir_flag_spec_CXX='-L$libdir'
+ hardcode_minus_L_CXX=yes
+ allow_undefined_flag_CXX=unsupported
+ shrext_cmds=.dll
+ archive_cmds_CXX='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
+ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
+ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
+ $ECHO EXPORTS >> $output_objdir/$libname.def~
+ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
+ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
+ emximp -o $lib $output_objdir/$libname.def'
+ archive_expsym_cmds_CXX='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
+ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
+ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
+ $ECHO EXPORTS >> $output_objdir/$libname.def~
+ prefix_cmds="$SED"~
+ if test EXPORTS = "`$SED 1q $export_symbols`"; then
+ prefix_cmds="$prefix_cmds -e 1d";
+ fi~
+ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
+ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
+ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
+ emximp -o $lib $output_objdir/$libname.def'
+ old_archive_From_new_cmds_CXX='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
+ enable_shared_with_static_runtimes_CXX=yes
+ ;;
+
+ dgux*)
+ case $cc_basename in
+ ec++*)
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+ ghcx*)
+ # Green Hills C++ Compiler
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+ *)
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+ esac
+ ;;
+
+ freebsd2.*)
+ # C++ shared libraries reported to be fairly broken before
+ # switch to ELF
+ ld_shlibs_CXX=no
+ ;;
+
+ freebsd-elf*)
+ archive_cmds_need_lc_CXX=no
+ ;;
+
+ freebsd* | dragonfly*)
+ # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
+ # conventions
+ ld_shlibs_CXX=yes
+ ;;
+
+ haiku*)
+ archive_cmds_CXX='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+ link_all_deplibs_CXX=yes
+ ;;
+
+ hpux9*)
+ hardcode_libdir_flag_spec_CXX='$wl+b $wl$libdir'
+ hardcode_libdir_separator_CXX=:
+ export_dynamic_flag_spec_CXX='$wl-E'
+ hardcode_direct_CXX=yes
+ hardcode_minus_L_CXX=yes # Not in the search PATH,
+ # but as the default
+ # location of the library.
+
+ case $cc_basename in
+ CC*)
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+ aCC*)
+ archive_cmds_CXX='$RM $output_objdir/$soname~$CC -b $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ #
+ # There doesn't appear to be a way to prevent this compiler from
+ # explicitly linking system object files so we need to strip them
+ # from the output so that they don't get included in the library
+ # dependencies.
+ output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP " \-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
+ ;;
+ *)
+ if test yes = "$GXX"; then
+ archive_cmds_CXX='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
+ else
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ fi
+ ;;
+ esac
+ ;;
+
+ hpux10*|hpux11*)
+ if test no = "$with_gnu_ld"; then
+ hardcode_libdir_flag_spec_CXX='$wl+b $wl$libdir'
+ hardcode_libdir_separator_CXX=:
+
+ case $host_cpu in
+ hppa*64*|ia64*)
+ ;;
+ *)
+ export_dynamic_flag_spec_CXX='$wl-E'
+ ;;
+ esac
+ fi
+ case $host_cpu in
+ hppa*64*|ia64*)
+ hardcode_direct_CXX=no
+ hardcode_shlibpath_var_CXX=no
+ ;;
+ *)
+ hardcode_direct_CXX=yes
+ hardcode_direct_absolute_CXX=yes
+ hardcode_minus_L_CXX=yes # Not in the search PATH,
+ # but as the default
+ # location of the library.
+ ;;
+ esac
+
+ case $cc_basename in
+ CC*)
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+ aCC*)
+ case $host_cpu in
+ hppa*64*)
+ archive_cmds_CXX='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ ;;
+ ia64*)
+ archive_cmds_CXX='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ ;;
+ *)
+ archive_cmds_CXX='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ ;;
+ esac
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ #
+ # There doesn't appear to be a way to prevent this compiler from
+ # explicitly linking system object files so we need to strip them
+ # from the output so that they don't get included in the library
+ # dependencies.
+ output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP " \-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
+ ;;
+ *)
+ if test yes = "$GXX"; then
+ if test no = "$with_gnu_ld"; then
+ case $host_cpu in
+ hppa*64*)
+ archive_cmds_CXX='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ ;;
+ ia64*)
+ archive_cmds_CXX='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ ;;
+ *)
+ archive_cmds_CXX='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ ;;
+ esac
+ fi
+ else
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ fi
+ ;;
+ esac
+ ;;
+
+ interix[3-9]*)
+ hardcode_direct_CXX=no
+ hardcode_shlibpath_var_CXX=no
+ hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir'
+ export_dynamic_flag_spec_CXX='$wl-E'
+ # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
+ # Instead, shared libraries are loaded at an image base (0x10000000 by
+ # default) and relocated if they conflict, which is a slow very memory
+ # consuming and fragmenting process. To avoid this, we pick a random,
+ # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
+ # time. Moving up from 0x10000000 also allows more sbrk(2) space.
+ archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+ archive_expsym_cmds_CXX='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+ ;;
+ irix5* | irix6*)
+ case $cc_basename in
+ CC*)
+ # SGI C++
+ archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
+
+ # Archives containing C++ object files must be created using
+ # "CC -ar", where "CC" is the IRIX C++ compiler. This is
+ # necessary to make sure instantiated templates are included
+ # in the archive.
+ old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs'
+ ;;
+ *)
+ if test yes = "$GXX"; then
+ if test no = "$with_gnu_ld"; then
+ archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
+ else
+ archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` -o $lib'
+ fi
+ fi
+ link_all_deplibs_CXX=yes
+ ;;
+ esac
+ hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir'
+ hardcode_libdir_separator_CXX=:
+ inherit_rpath_CXX=yes
+ ;;
+
+ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
+ case $cc_basename in
+ KCC*)
+ # Kuck and Associates, Inc. (KAI) C++ Compiler
+
+ # KCC will only create a shared library if the output file
+ # ends with ".so" (or ".sl" for HP-UX), so rename the library
+ # to its proper name (with version) after linking.
+ archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+ archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib $wl-retain-symbols-file,$export_symbols; mv \$templib $lib'
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ #
+ # There doesn't appear to be a way to prevent this compiler from
+ # explicitly linking system object files so we need to strip them
+ # from the output so that they don't get included in the library
+ # dependencies.
+ output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
+
+ hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir'
+ export_dynamic_flag_spec_CXX='$wl--export-dynamic'
+
+ # Archives containing C++ object files must be created using
+ # "CC -Bstatic", where "CC" is the KAI C++ compiler.
+ old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs'
+ ;;
+ icpc* | ecpc* )
+ # Intel C++
+ with_gnu_ld=yes
+ # version 8.0 and above of icpc choke on multiply defined symbols
+ # if we add $predep_objects and $postdep_objects, however 7.1 and
+ # earlier do not add the objects themselves.
+ case `$CC -V 2>&1` in
+ *"Version 7."*)
+ archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
+ archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
+ ;;
+ *) # Version 8.0 or newer
+ tmp_idyn=
+ case $host_cpu in
+ ia64*) tmp_idyn=' -i_dynamic';;
+ esac
+ archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+ archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
+ ;;
+ esac
+ archive_cmds_need_lc_CXX=no
+ hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir'
+ export_dynamic_flag_spec_CXX='$wl--export-dynamic'
+ whole_archive_flag_spec_CXX='$wl--whole-archive$convenience $wl--no-whole-archive'
+ ;;
+ pgCC* | pgcpp*)
+ # Portland Group C++ compiler
+ case `$CC -V` in
+ *pgCC\ [1-5].* | *pgcpp\ [1-5].*)
+ prelink_cmds_CXX='tpldir=Template.dir~
+ rm -rf $tpldir~
+ $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
+ compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
+ old_archive_cmds_CXX='tpldir=Template.dir~
+ rm -rf $tpldir~
+ $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
+ $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
+ $RANLIB $oldlib'
+ archive_cmds_CXX='tpldir=Template.dir~
+ rm -rf $tpldir~
+ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
+ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
+ archive_expsym_cmds_CXX='tpldir=Template.dir~
+ rm -rf $tpldir~
+ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
+ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
+ ;;
+ *) # Version 6 and above use weak symbols
+ archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
+ archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
+ ;;
+ esac
+
+ hardcode_libdir_flag_spec_CXX='$wl--rpath $wl$libdir'
+ export_dynamic_flag_spec_CXX='$wl--export-dynamic'
+ whole_archive_flag_spec_CXX='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
+ ;;
+ cxx*)
+ # Compaq C++
+ archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
+ archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib $wl-retain-symbols-file $wl$export_symbols'
+
+ runpath_var=LD_RUN_PATH
+ hardcode_libdir_flag_spec_CXX='-rpath $libdir'
+ hardcode_libdir_separator_CXX=:
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ #
+ # There doesn't appear to be a way to prevent this compiler from
+ # explicitly linking system object files so we need to strip them
+ # from the output so that they don't get included in the library
+ # dependencies.
+ output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed'
+ ;;
+ xl* | mpixl* | bgxl*)
+ # IBM XL 8.0 on PPC, with GNU ld
+ hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir'
+ export_dynamic_flag_spec_CXX='$wl--export-dynamic'
+ archive_cmds_CXX='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+ if test yes = "$supports_anon_versioning"; then
+ archive_expsym_cmds_CXX='echo "{ global:" > $output_objdir/$libname.ver~
+ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+ echo "local: *; };" >> $output_objdir/$libname.ver~
+ $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
+ fi
+ ;;
+ *)
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*)
+ # Sun C++ 5.9
+ no_undefined_flag_CXX=' -zdefs'
+ archive_cmds_CXX='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ archive_expsym_cmds_CXX='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file $wl$export_symbols'
+ hardcode_libdir_flag_spec_CXX='-R$libdir'
+ whole_archive_flag_spec_CXX='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
+ compiler_needs_object_CXX=yes
+
+ # Not sure whether something based on
+ # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
+ # would be better.
+ output_verbose_link_cmd='func_echo_all'
+
+ # Archives containing C++ object files must be created using
+ # "CC -xar", where "CC" is the Sun C++ compiler. This is
+ # necessary to make sure instantiated templates are included
+ # in the archive.
+ old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs'
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+
+ lynxos*)
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+
+ m88k*)
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+
+ mvs*)
+ case $cc_basename in
+ cxx*)
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+ *)
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+ esac
+ ;;
+
+ netbsd*)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+ archive_cmds_CXX='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
+ wlarc=
+ hardcode_libdir_flag_spec_CXX='-R$libdir'
+ hardcode_direct_CXX=yes
+ hardcode_shlibpath_var_CXX=no
+ fi
+ # Workaround some broken pre-1.5 toolchains
+ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
+ ;;
+
+ *nto* | *qnx*)
+ ld_shlibs_CXX=yes
+ ;;
+
+ openbsd* | bitrig*)
+ if test -f /usr/libexec/ld.so; then
+ hardcode_direct_CXX=yes
+ hardcode_shlibpath_var_CXX=no
+ hardcode_direct_absolute_CXX=yes
+ archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
+ hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir'
+ if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then
+ archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file,$export_symbols -o $lib'
+ export_dynamic_flag_spec_CXX='$wl-E'
+ whole_archive_flag_spec_CXX=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
+ fi
+ output_verbose_link_cmd=func_echo_all
+ else
+ ld_shlibs_CXX=no
+ fi
+ ;;
+
+ osf3* | osf4* | osf5*)
+ case $cc_basename in
+ KCC*)
+ # Kuck and Associates, Inc. (KAI) C++ Compiler
+
+ # KCC will only create a shared library if the output file
+ # ends with ".so" (or ".sl" for HP-UX), so rename the library
+ # to its proper name (with version) after linking.
+ archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+
+ hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir'
+ hardcode_libdir_separator_CXX=:
+
+ # Archives containing C++ object files must be created using
+ # the KAI C++ compiler.
+ case $host in
+ osf3*) old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;;
+ *) old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' ;;
+ esac
+ ;;
+ RCC*)
+ # Rational C++ 2.4.1
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+ cxx*)
+ case $host in
+ osf3*)
+ allow_undefined_flag_CXX=' $wl-expect_unresolved $wl\*'
+ archive_cmds_CXX='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $soname `test -n "$verstring" && func_echo_all "$wl-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
+ hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir'
+ ;;
+ *)
+ allow_undefined_flag_CXX=' -expect_unresolved \*'
+ archive_cmds_CXX='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
+ archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
+ echo "-hidden">> $lib.exp~
+ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname $wl-input $wl$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~
+ $RM $lib.exp'
+ hardcode_libdir_flag_spec_CXX='-rpath $libdir'
+ ;;
+ esac
+
+ hardcode_libdir_separator_CXX=:
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ #
+ # There doesn't appear to be a way to prevent this compiler from
+ # explicitly linking system object files so we need to strip them
+ # from the output so that they don't get included in the library
+ # dependencies.
+ output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
+ ;;
+ *)
+ if test yes,no = "$GXX,$with_gnu_ld"; then
+ allow_undefined_flag_CXX=' $wl-expect_unresolved $wl\*'
+ case $host in
+ osf3*)
+ archive_cmds_CXX='$CC -shared -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
+ ;;
+ *)
+ archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
+ ;;
+ esac
+
+ hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir'
+ hardcode_libdir_separator_CXX=:
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"'
+
+ else
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ fi
+ ;;
+ esac
+ ;;
+
+ psos*)
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+
+ sunos4*)
+ case $cc_basename in
+ CC*)
+ # Sun C++ 4.x
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+ lcc*)
+ # Lucid
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+ *)
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+ esac
+ ;;
+
+ solaris*)
+ case $cc_basename in
+ CC* | sunCC*)
+ # Sun C++ 4.2, 5.x and Centerline C++
+ archive_cmds_need_lc_CXX=yes
+ no_undefined_flag_CXX=' -zdefs'
+ archive_cmds_CXX='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $CC -G$allow_undefined_flag $wl-M $wl$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
+
+ hardcode_libdir_flag_spec_CXX='-R$libdir'
+ hardcode_shlibpath_var_CXX=no
+ case $host_os in
+ solaris2.[0-5] | solaris2.[0-5].*) ;;
+ *)
+ # The compiler driver will combine and reorder linker options,
+ # but understands '-z linker_flag'.
+ # Supported since Solaris 2.6 (maybe 2.5.1?)
+ whole_archive_flag_spec_CXX='-z allextract$convenience -z defaultextract'
+ ;;
+ esac
+ link_all_deplibs_CXX=yes
+
+ output_verbose_link_cmd='func_echo_all'
+
+ # Archives containing C++ object files must be created using
+ # "CC -xar", where "CC" is the Sun C++ compiler. This is
+ # necessary to make sure instantiated templates are included
+ # in the archive.
+ old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs'
+ ;;
+ gcx*)
+ # Green Hills C++ Compiler
+ archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
+
+ # The C++ compiler must be used to create the archive.
+ old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
+ ;;
+ *)
+ # GNU C++ compiler with Solaris linker
+ if test yes,no = "$GXX,$with_gnu_ld"; then
+ no_undefined_flag_CXX=' $wl-z ${wl}defs'
+ if $CC --version | $GREP -v '^2\.7' > /dev/null; then
+ archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
+ archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $CC -shared $pic_flag -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"'
+ else
+ # g++ 2.7 appears to require '-G' NOT '-shared' on this
+ # platform.
+ archive_cmds_CXX='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
+ archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $CC -G -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"'
+ fi
+
+ hardcode_libdir_flag_spec_CXX='$wl-R $wl$libdir'
+ case $host_os in
+ solaris2.[0-5] | solaris2.[0-5].*) ;;
+ *)
+ whole_archive_flag_spec_CXX='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
+ ;;
+ esac
+ fi
+ ;;
+ esac
+ ;;
+
+ sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
+ no_undefined_flag_CXX='$wl-z,text'
+ archive_cmds_need_lc_CXX=no
+ hardcode_shlibpath_var_CXX=no
+ runpath_var='LD_RUN_PATH'
+
+ case $cc_basename in
+ CC*)
+ archive_cmds_CXX='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds_CXX='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ *)
+ archive_cmds_CXX='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds_CXX='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ esac
+ ;;
+
+ sysv5* | sco3.2v5* | sco5v6*)
+ # Note: We CANNOT use -z defs as we might desire, because we do not
+ # link with -lc, and that would cause any symbols used from libc to
+ # always be unresolved, which means just about no library would
+ # ever link correctly. If we're not using GNU ld we use -z text
+ # though, which does catch some bad symbols but isn't as heavy-handed
+ # as -z defs.
+ no_undefined_flag_CXX='$wl-z,text'
+ allow_undefined_flag_CXX='$wl-z,nodefs'
+ archive_cmds_need_lc_CXX=no
+ hardcode_shlibpath_var_CXX=no
+ hardcode_libdir_flag_spec_CXX='$wl-R,$libdir'
+ hardcode_libdir_separator_CXX=':'
+ link_all_deplibs_CXX=yes
+ export_dynamic_flag_spec_CXX='$wl-Bexport'
+ runpath_var='LD_RUN_PATH'
+
+ case $cc_basename in
+ CC*)
+ archive_cmds_CXX='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds_CXX='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ old_archive_cmds_CXX='$CC -Tprelink_objects $oldobjs~
+ '"$old_archive_cmds_CXX"
+ reload_cmds_CXX='$CC -Tprelink_objects $reload_objs~
+ '"$reload_cmds_CXX"
+ ;;
+ *)
+ archive_cmds_CXX='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds_CXX='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ esac
+ ;;
+
+ tandem*)
+ case $cc_basename in
+ NCC*)
+ # NonStop-UX NCC 3.20
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+ *)
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+ esac
+ ;;
+
+ vxworks*)
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+
+ *)
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+ esac
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5
+printf "%s\n" "$ld_shlibs_CXX" >&6; }
+ test no = "$ld_shlibs_CXX" && can_build_shared=no
+
+ GCC_CXX=$GXX
+ LD_CXX=$LD
+
+ ## CAVEAT EMPTOR:
+ ## There is no encapsulation within the following macros, do not change
+ ## the running order or otherwise move them around unless you know exactly
+ ## what you are doing...
+ # Dependencies to place before and after the object being linked:
+predep_objects_CXX=
+postdep_objects_CXX=
+predeps_CXX=
+postdeps_CXX=
+compiler_lib_search_path_CXX=
+
+cat > conftest.$ac_ext <<_LT_EOF
+class Foo
+{
+public:
+ Foo (void) { a = 0; }
+private:
+ int a;
+};
+_LT_EOF
+
+
+_lt_libdeps_save_CFLAGS=$CFLAGS
+case "$CC $CFLAGS " in #(
+*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
+*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
+*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;;
+esac
+
+if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ # Parse the compiler output and extract the necessary
+ # objects, libraries and library flags.
+
+ # Sentinel used to keep track of whether or not we are before
+ # the conftest object file.
+ pre_test_object_deps_done=no
+
+ for p in `eval "$output_verbose_link_cmd"`; do
+ case $prev$p in
+
+ -L* | -R* | -l*)
+ # Some compilers place space between "-{L,R}" and the path.
+ # Remove the space.
+ if test x-L = "$p" ||
+ test x-R = "$p"; then
+ prev=$p
+ continue
+ fi
+
+ # Expand the sysroot to ease extracting the directories later.
+ if test -z "$prev"; then
+ case $p in
+ -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
+ -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
+ -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
+ esac
+ fi
+ case $p in
+ =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
+ esac
+ if test no = "$pre_test_object_deps_done"; then
+ case $prev in
+ -L | -R)
+ # Internal compiler library paths should come after those
+ # provided the user. The postdeps already come after the
+ # user supplied libs so there is no need to process them.
+ if test -z "$compiler_lib_search_path_CXX"; then
+ compiler_lib_search_path_CXX=$prev$p
+ else
+ compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} $prev$p"
+ fi
+ ;;
+ # The "-l" case would never come before the object being
+ # linked, so don't bother handling this case.
+ esac
+ else
+ if test -z "$postdeps_CXX"; then
+ postdeps_CXX=$prev$p
+ else
+ postdeps_CXX="${postdeps_CXX} $prev$p"
+ fi
+ fi
+ prev=
+ ;;
+
+ *.lto.$objext) ;; # Ignore GCC LTO objects
+ *.$objext)
+ # This assumes that the test object file only shows up
+ # once in the compiler output.
+ if test "$p" = "conftest.$objext"; then
+ pre_test_object_deps_done=yes
+ continue
+ fi
+
+ if test no = "$pre_test_object_deps_done"; then
+ if test -z "$predep_objects_CXX"; then
+ predep_objects_CXX=$p
+ else
+ predep_objects_CXX="$predep_objects_CXX $p"
+ fi
+ else
+ if test -z "$postdep_objects_CXX"; then
+ postdep_objects_CXX=$p
+ else
+ postdep_objects_CXX="$postdep_objects_CXX $p"
+ fi
+ fi
+ ;;
+
+ *) ;; # Ignore the rest.
+
+ esac
+ done
+
+ # Clean up.
+ rm -f a.out a.exe
+else
+ echo "libtool.m4: error: problem compiling CXX test program"
+fi
+
+$RM -f confest.$objext
+CFLAGS=$_lt_libdeps_save_CFLAGS
+
+# PORTME: override above test on systems where it is broken
+case $host_os in
+interix[3-9]*)
+ # Interix 3.5 installs completely hosed .la files for C++, so rather than
+ # hack all around it, let's just trust "g++" to DTRT.
+ predep_objects_CXX=
+ postdep_objects_CXX=
+ postdeps_CXX=
+ ;;
+esac
+
+
+case " $postdeps_CXX " in
+*" -lc "*) archive_cmds_need_lc_CXX=no ;;
+esac
+ compiler_lib_search_dirs_CXX=
+if test -n "${compiler_lib_search_path_CXX}"; then
+ compiler_lib_search_dirs_CXX=`echo " ${compiler_lib_search_path_CXX}" | $SED -e 's! -L! !g' -e 's!^ !!'`
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ lt_prog_compiler_wl_CXX=
+lt_prog_compiler_pic_CXX=
+lt_prog_compiler_static_CXX=
+
+
+ # C++ specific cases for pic, static, wl, etc.
+ if test yes = "$GXX"; then
+ lt_prog_compiler_wl_CXX='-Wl,'
+ lt_prog_compiler_static_CXX='-static'
+
+ case $host_os in
+ aix*)
+ # All AIX code is PIC.
+ if test ia64 = "$host_cpu"; then
+ # AIX 5 now supports IA64 processor
+ lt_prog_compiler_static_CXX='-Bstatic'
+ fi
+ lt_prog_compiler_pic_CXX='-fPIC'
+ ;;
+
+ amigaos*)
+ case $host_cpu in
+ powerpc)
+ # see comment about AmigaOS4 .so support
+ lt_prog_compiler_pic_CXX='-fPIC'
+ ;;
+ m68k)
+ # FIXME: we need at least 68020 code to build shared libraries, but
+ # adding the '-m68020' flag to GCC prevents building anything better,
+ # like '-m68040'.
+ lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4'
+ ;;
+ esac
+ ;;
+
+ beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+ # PIC is the default for these OSes.
+ ;;
+ mingw* | cygwin* | os2* | pw32* | cegcc*)
+ # This hack is so that the source file can tell whether it is being
+ # built for inclusion in a dll (and should export symbols for example).
+ # Although the cygwin gcc ignores -fPIC, still need this for old-style
+ # (--disable-auto-import) libraries
+ lt_prog_compiler_pic_CXX='-DDLL_EXPORT'
+ case $host_os in
+ os2*)
+ lt_prog_compiler_static_CXX='$wl-static'
+ ;;
+ esac
+ ;;
+ darwin* | rhapsody*)
+ # PIC is the default on this platform
+ # Common symbols not allowed in MH_DYLIB files
+ lt_prog_compiler_pic_CXX='-fno-common'
+ ;;
+ *djgpp*)
+ # DJGPP does not support shared libraries at all
+ lt_prog_compiler_pic_CXX=
+ ;;
+ haiku*)
+ # PIC is the default for Haiku.
+ # The "-static" flag exists, but is broken.
+ lt_prog_compiler_static_CXX=
+ ;;
+ interix[3-9]*)
+ # Interix 3.x gcc -fpic/-fPIC options generate broken code.
+ # Instead, we relocate shared libraries at runtime.
+ ;;
+ sysv4*MP*)
+ if test -d /usr/nec; then
+ lt_prog_compiler_pic_CXX=-Kconform_pic
+ fi
+ ;;
+ hpux*)
+ # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
+ # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
+ # sets the default TLS model and affects inlining.
+ case $host_cpu in
+ hppa*64*)
+ ;;
+ *)
+ lt_prog_compiler_pic_CXX='-fPIC'
+ ;;
+ esac
+ ;;
+ *qnx* | *nto*)
+ # QNX uses GNU C++, but need to define -shared option too, otherwise
+ # it will coredump.
+ lt_prog_compiler_pic_CXX='-fPIC -shared'
+ ;;
+ *)
+ lt_prog_compiler_pic_CXX='-fPIC'
+ ;;
+ esac
+ else
+ case $host_os in
+ aix[4-9]*)
+ # All AIX code is PIC.
+ if test ia64 = "$host_cpu"; then
+ # AIX 5 now supports IA64 processor
+ lt_prog_compiler_static_CXX='-Bstatic'
+ else
+ lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp'
+ fi
+ ;;
+ chorus*)
+ case $cc_basename in
+ cxch68*)
+ # Green Hills C++ Compiler
+ # _LT_TAGVAR(lt_prog_compiler_static, CXX)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
+ ;;
+ esac
+ ;;
+ mingw* | cygwin* | os2* | pw32* | cegcc*)
+ # This hack is so that the source file can tell whether it is being
+ # built for inclusion in a dll (and should export symbols for example).
+ lt_prog_compiler_pic_CXX='-DDLL_EXPORT'
+ ;;
+ dgux*)
+ case $cc_basename in
+ ec++*)
+ lt_prog_compiler_pic_CXX='-KPIC'
+ ;;
+ ghcx*)
+ # Green Hills C++ Compiler
+ lt_prog_compiler_pic_CXX='-pic'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ freebsd* | dragonfly*)
+ # FreeBSD uses GNU C++
+ ;;
+ hpux9* | hpux10* | hpux11*)
+ case $cc_basename in
+ CC*)
+ lt_prog_compiler_wl_CXX='-Wl,'
+ lt_prog_compiler_static_CXX='$wl-a ${wl}archive'
+ if test ia64 != "$host_cpu"; then
+ lt_prog_compiler_pic_CXX='+Z'
+ fi
+ ;;
+ aCC*)
+ lt_prog_compiler_wl_CXX='-Wl,'
+ lt_prog_compiler_static_CXX='$wl-a ${wl}archive'
+ case $host_cpu in
+ hppa*64*|ia64*)
+ # +Z the default
+ ;;
+ *)
+ lt_prog_compiler_pic_CXX='+Z'
+ ;;
+ esac
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ interix*)
+ # This is c89, which is MS Visual C++ (no shared libs)
+ # Anyone wants to do a port?
+ ;;
+ irix5* | irix6* | nonstopux*)
+ case $cc_basename in
+ CC*)
+ lt_prog_compiler_wl_CXX='-Wl,'
+ lt_prog_compiler_static_CXX='-non_shared'
+ # CC pic flag -KPIC is the default.
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
+ case $cc_basename in
+ KCC*)
+ # KAI C++ Compiler
+ lt_prog_compiler_wl_CXX='--backend -Wl,'
+ lt_prog_compiler_pic_CXX='-fPIC'
+ ;;
+ ecpc* )
+ # old Intel C++ for x86_64, which still supported -KPIC.
+ lt_prog_compiler_wl_CXX='-Wl,'
+ lt_prog_compiler_pic_CXX='-KPIC'
+ lt_prog_compiler_static_CXX='-static'
+ ;;
+ icpc* )
+ # Intel C++, used to be incompatible with GCC.
+ # ICC 10 doesn't accept -KPIC any more.
+ lt_prog_compiler_wl_CXX='-Wl,'
+ lt_prog_compiler_pic_CXX='-fPIC'
+ lt_prog_compiler_static_CXX='-static'
+ ;;
+ pgCC* | pgcpp*)
+ # Portland Group C++ compiler
+ lt_prog_compiler_wl_CXX='-Wl,'
+ lt_prog_compiler_pic_CXX='-fpic'
+ lt_prog_compiler_static_CXX='-Bstatic'
+ ;;
+ cxx*)
+ # Compaq C++
+ # Make sure the PIC flag is empty. It appears that all Alpha
+ # Linux and Compaq Tru64 Unix objects are PIC.
+ lt_prog_compiler_pic_CXX=
+ lt_prog_compiler_static_CXX='-non_shared'
+ ;;
+ xlc* | xlC* | bgxl[cC]* | mpixl[cC]*)
+ # IBM XL 8.0, 9.0 on PPC and BlueGene
+ lt_prog_compiler_wl_CXX='-Wl,'
+ lt_prog_compiler_pic_CXX='-qpic'
+ lt_prog_compiler_static_CXX='-qstaticlink'
+ ;;
+ *)
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*)
+ # Sun C++ 5.9
+ lt_prog_compiler_pic_CXX='-KPIC'
+ lt_prog_compiler_static_CXX='-Bstatic'
+ lt_prog_compiler_wl_CXX='-Qoption ld '
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ lynxos*)
+ ;;
+ m88k*)
+ ;;
+ mvs*)
+ case $cc_basename in
+ cxx*)
+ lt_prog_compiler_pic_CXX='-W c,exportall'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ netbsd* | netbsdelf*-gnu)
+ ;;
+ *qnx* | *nto*)
+ # QNX uses GNU C++, but need to define -shared option too, otherwise
+ # it will coredump.
+ lt_prog_compiler_pic_CXX='-fPIC -shared'
+ ;;
+ osf3* | osf4* | osf5*)
+ case $cc_basename in
+ KCC*)
+ lt_prog_compiler_wl_CXX='--backend -Wl,'
+ ;;
+ RCC*)
+ # Rational C++ 2.4.1
+ lt_prog_compiler_pic_CXX='-pic'
+ ;;
+ cxx*)
+ # Digital/Compaq C++
+ lt_prog_compiler_wl_CXX='-Wl,'
+ # Make sure the PIC flag is empty. It appears that all Alpha
+ # Linux and Compaq Tru64 Unix objects are PIC.
+ lt_prog_compiler_pic_CXX=
+ lt_prog_compiler_static_CXX='-non_shared'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ psos*)
+ ;;
+ solaris*)
+ case $cc_basename in
+ CC* | sunCC*)
+ # Sun C++ 4.2, 5.x and Centerline C++
+ lt_prog_compiler_pic_CXX='-KPIC'
+ lt_prog_compiler_static_CXX='-Bstatic'
+ lt_prog_compiler_wl_CXX='-Qoption ld '
+ ;;
+ gcx*)
+ # Green Hills C++ Compiler
+ lt_prog_compiler_pic_CXX='-PIC'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ sunos4*)
+ case $cc_basename in
+ CC*)
+ # Sun C++ 4.x
+ lt_prog_compiler_pic_CXX='-pic'
+ lt_prog_compiler_static_CXX='-Bstatic'
+ ;;
+ lcc*)
+ # Lucid
+ lt_prog_compiler_pic_CXX='-pic'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+ case $cc_basename in
+ CC*)
+ lt_prog_compiler_wl_CXX='-Wl,'
+ lt_prog_compiler_pic_CXX='-KPIC'
+ lt_prog_compiler_static_CXX='-Bstatic'
+ ;;
+ esac
+ ;;
+ tandem*)
+ case $cc_basename in
+ NCC*)
+ # NonStop-UX NCC 3.20
+ lt_prog_compiler_pic_CXX='-KPIC'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ vxworks*)
+ ;;
+ *)
+ lt_prog_compiler_can_build_shared_CXX=no
+ ;;
+ esac
+ fi
+
+case $host_os in
+ # For platforms that do not support PIC, -DPIC is meaningless:
+ *djgpp*)
+ lt_prog_compiler_pic_CXX=
+ ;;
+ *)
+ lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC"
+ ;;
+esac
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
+printf %s "checking for $compiler option to produce PIC... " >&6; }
+if test ${lt_cv_prog_compiler_pic_CXX+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ lt_cv_prog_compiler_pic_CXX=$lt_prog_compiler_pic_CXX
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_CXX" >&5
+printf "%s\n" "$lt_cv_prog_compiler_pic_CXX" >&6; }
+lt_prog_compiler_pic_CXX=$lt_cv_prog_compiler_pic_CXX
+
+#
+# Check to make sure the PIC flag actually works.
+#
+if test -n "$lt_prog_compiler_pic_CXX"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5
+printf %s "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... " >&6; }
+if test ${lt_cv_prog_compiler_pic_works_CXX+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ lt_cv_prog_compiler_pic_works_CXX=no
+ ac_outfile=conftest.$ac_objext
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+ lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC" ## exclude from sc_useless_quotes_in_assignment
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ # The option is referenced via a variable to avoid confusing sed.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>conftest.err)
+ ac_status=$?
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ if (exit $ac_status) && test -s "$ac_outfile"; then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings other than the usual output.
+ $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+ if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
+ lt_cv_prog_compiler_pic_works_CXX=yes
+ fi
+ fi
+ $RM conftest*
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works_CXX" >&5
+printf "%s\n" "$lt_cv_prog_compiler_pic_works_CXX" >&6; }
+
+if test yes = "$lt_cv_prog_compiler_pic_works_CXX"; then
+ case $lt_prog_compiler_pic_CXX in
+ "" | " "*) ;;
+ *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;;
+ esac
+else
+ lt_prog_compiler_pic_CXX=
+ lt_prog_compiler_can_build_shared_CXX=no
+fi
+
+fi
+
+
+
+
+
+#
+# Check to make sure the static flag actually works.
+#
+wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\"
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
+printf %s "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
+if test ${lt_cv_prog_compiler_static_works_CXX+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ lt_cv_prog_compiler_static_works_CXX=no
+ save_LDFLAGS=$LDFLAGS
+ LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
+ echo "$lt_simple_link_test_code" > conftest.$ac_ext
+ if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
+ # The linker can only warn and ignore the option if not recognized
+ # So say no if there are warnings
+ if test -s conftest.err; then
+ # Append any errors to the config.log.
+ cat conftest.err 1>&5
+ $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+ if diff conftest.exp conftest.er2 >/dev/null; then
+ lt_cv_prog_compiler_static_works_CXX=yes
+ fi
+ else
+ lt_cv_prog_compiler_static_works_CXX=yes
+ fi
+ fi
+ $RM -r conftest*
+ LDFLAGS=$save_LDFLAGS
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works_CXX" >&5
+printf "%s\n" "$lt_cv_prog_compiler_static_works_CXX" >&6; }
+
+if test yes = "$lt_cv_prog_compiler_static_works_CXX"; then
+ :
+else
+ lt_prog_compiler_static_CXX=
+fi
+
+
+
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
+printf %s "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
+if test ${lt_cv_prog_compiler_c_o_CXX+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ lt_cv_prog_compiler_c_o_CXX=no
+ $RM -r conftest 2>/dev/null
+ mkdir conftest
+ cd conftest
+ mkdir out
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+ lt_compiler_flag="-o out/conftest2.$ac_objext"
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>out/conftest.err)
+ ac_status=$?
+ cat out/conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ if (exit $ac_status) && test -s out/conftest2.$ac_objext
+ then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings
+ $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
+ $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
+ if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
+ lt_cv_prog_compiler_c_o_CXX=yes
+ fi
+ fi
+ chmod u+w . 2>&5
+ $RM conftest*
+ # SGI C++ compiler will create directory out/ii_files/ for
+ # template instantiation
+ test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
+ $RM out/* && rmdir out
+ cd ..
+ $RM -r conftest
+ $RM conftest*
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5
+printf "%s\n" "$lt_cv_prog_compiler_c_o_CXX" >&6; }
+
+
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
+printf %s "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
+if test ${lt_cv_prog_compiler_c_o_CXX+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ lt_cv_prog_compiler_c_o_CXX=no
+ $RM -r conftest 2>/dev/null
+ mkdir conftest
+ cd conftest
+ mkdir out
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+ lt_compiler_flag="-o out/conftest2.$ac_objext"
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>out/conftest.err)
+ ac_status=$?
+ cat out/conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ if (exit $ac_status) && test -s out/conftest2.$ac_objext
+ then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings
+ $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
+ $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
+ if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
+ lt_cv_prog_compiler_c_o_CXX=yes
+ fi
+ fi
+ chmod u+w . 2>&5
+ $RM conftest*
+ # SGI C++ compiler will create directory out/ii_files/ for
+ # template instantiation
+ test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
+ $RM out/* && rmdir out
+ cd ..
+ $RM -r conftest
+ $RM conftest*
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5
+printf "%s\n" "$lt_cv_prog_compiler_c_o_CXX" >&6; }
+
+
+
+
+hard_links=nottested
+if test no = "$lt_cv_prog_compiler_c_o_CXX" && test no != "$need_locks"; then
+ # do not overwrite the value of need_locks provided by the user
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
+printf %s "checking if we can lock with hard links... " >&6; }
+ hard_links=yes
+ $RM conftest*
+ ln conftest.a conftest.b 2>/dev/null && hard_links=no
+ touch conftest.a
+ ln conftest.a conftest.b 2>&5 || hard_links=no
+ ln conftest.a conftest.b 2>/dev/null && hard_links=no
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
+printf "%s\n" "$hard_links" >&6; }
+ if test no = "$hard_links"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5
+printf "%s\n" "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;}
+ need_locks=warn
+ fi
+else
+ need_locks=no
+fi
+
+
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
+printf %s "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
+
+ export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+ exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
+ case $host_os in
+ aix[4-9]*)
+ # If we're using GNU nm, then we don't want the "-C" option.
+ # -C means demangle to GNU nm, but means don't demangle to AIX nm.
+ # Without the "-l" option, or with the "-B" option, AIX nm treats
+ # weak defined symbols like other global defined symbols, whereas
+ # GNU nm marks them as "W".
+ # While the 'weak' keyword is ignored in the Export File, we need
+ # it in the Import File for the 'aix-soname' feature, so we have
+ # to replace the "-B" option with "-P" for AIX nm.
+ if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
+ export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
+ else
+ export_symbols_cmds_CXX='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
+ fi
+ ;;
+ pw32*)
+ export_symbols_cmds_CXX=$ltdll_cmds
+ ;;
+ cygwin* | mingw* | cegcc*)
+ case $cc_basename in
+ cl*)
+ exclude_expsyms_CXX='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
+ ;;
+ *)
+ export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols'
+ exclude_expsyms_CXX='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'
+ ;;
+ esac
+ ;;
+ linux* | k*bsd*-gnu | gnu*)
+ link_all_deplibs_CXX=no
+ ;;
+ *)
+ export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+ ;;
+ esac
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5
+printf "%s\n" "$ld_shlibs_CXX" >&6; }
+test no = "$ld_shlibs_CXX" && can_build_shared=no
+
+with_gnu_ld_CXX=$with_gnu_ld
+
+
+
+
+
+
+#
+# Do we need to explicitly link libc?
+#
+case "x$archive_cmds_need_lc_CXX" in
+x|xyes)
+ # Assume -lc should be added
+ archive_cmds_need_lc_CXX=yes
+
+ if test yes,yes = "$GCC,$enable_shared"; then
+ case $archive_cmds_CXX in
+ *'~'*)
+ # FIXME: we may have to deal with multi-command sequences.
+ ;;
+ '$CC '*)
+ # Test whether the compiler implicitly links with -lc since on some
+ # systems, -lgcc has to come before -lc. If gcc already passes -lc
+ # to ld, don't add -lc before -lgcc.
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5
+printf %s "checking whether -lc should be explicitly linked in... " >&6; }
+if test ${lt_cv_archive_cmds_need_lc_CXX+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ $RM conftest*
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } 2>conftest.err; then
+ soname=conftest
+ lib=conftest
+ libobjs=conftest.$ac_objext
+ deplibs=
+ wl=$lt_prog_compiler_wl_CXX
+ pic_flag=$lt_prog_compiler_pic_CXX
+ compiler_flags=-v
+ linker_flags=-v
+ verstring=
+ output_objdir=.
+ libname=conftest
+ lt_save_allow_undefined_flag=$allow_undefined_flag_CXX
+ allow_undefined_flag_CXX=
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5
+ (eval $archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+ then
+ lt_cv_archive_cmds_need_lc_CXX=no
+ else
+ lt_cv_archive_cmds_need_lc_CXX=yes
+ fi
+ allow_undefined_flag_CXX=$lt_save_allow_undefined_flag
+ else
+ cat conftest.err 1>&5
+ fi
+ $RM conftest*
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc_CXX" >&5
+printf "%s\n" "$lt_cv_archive_cmds_need_lc_CXX" >&6; }
+ archive_cmds_need_lc_CXX=$lt_cv_archive_cmds_need_lc_CXX
+ ;;
+ esac
+ fi
+ ;;
+esac
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
+printf %s "checking dynamic linker characteristics... " >&6; }
+
+library_names_spec=
+libname_spec='lib$name'
+soname_spec=
+shrext_cmds=.so
+postinstall_cmds=
+postuninstall_cmds=
+finish_cmds=
+finish_eval=
+shlibpath_var=
+shlibpath_overrides_runpath=unknown
+version_type=none
+dynamic_linker="$host_os ld.so"
+sys_lib_dlsearch_path_spec="/lib /usr/lib"
+need_lib_prefix=unknown
+hardcode_into_libs=no
+
+# when you set need_version to no, make sure it does not cause -set_version
+# flags to be left without arguments
+need_version=unknown
+
+
+
+case $host_os in
+aix3*)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ library_names_spec='$libname$release$shared_ext$versuffix $libname.a'
+ shlibpath_var=LIBPATH
+
+ # AIX 3 has no versioning support, so we append a major version to the name.
+ soname_spec='$libname$release$shared_ext$major'
+ ;;
+
+aix[4-9]*)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ need_lib_prefix=no
+ need_version=no
+ hardcode_into_libs=yes
+ if test ia64 = "$host_cpu"; then
+ # AIX 5 supports IA64
+ library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext'
+ shlibpath_var=LD_LIBRARY_PATH
+ else
+ # With GCC up to 2.95.x, collect2 would create an import file
+ # for dependence libraries. The import file would start with
+ # the line '#! .'. This would cause the generated library to
+ # depend on '.', always an invalid library. This was fixed in
+ # development snapshots of GCC prior to 3.0.
+ case $host_os in
+ aix4 | aix4.[01] | aix4.[01].*)
+ if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
+ echo ' yes '
+ echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then
+ :
+ else
+ can_build_shared=no
+ fi
+ ;;
+ esac
+ # Using Import Files as archive members, it is possible to support
+ # filename-based versioning of shared library archives on AIX. While
+ # this would work for both with and without runtime linking, it will
+ # prevent static linking of such archives. So we do filename-based
+ # shared library versioning with .so extension only, which is used
+ # when both runtime linking and shared linking is enabled.
+ # Unfortunately, runtime linking may impact performance, so we do
+ # not want this to be the default eventually. Also, we use the
+ # versioned .so libs for executables only if there is the -brtl
+ # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only.
+ # To allow for filename-based versioning support, we need to create
+ # libNAME.so.V as an archive file, containing:
+ # *) an Import File, referring to the versioned filename of the
+ # archive as well as the shared archive member, telling the
+ # bitwidth (32 or 64) of that shared object, and providing the
+ # list of exported symbols of that shared object, eventually
+ # decorated with the 'weak' keyword
+ # *) the shared object with the F_LOADONLY flag set, to really avoid
+ # it being seen by the linker.
+ # At run time we better use the real file rather than another symlink,
+ # but for link time we create the symlink libNAME.so -> libNAME.so.V
+
+ case $with_aix_soname,$aix_use_runtimelinking in
+ # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct
+ # soname into executable. Probably we can add versioning support to
+ # collect2, so additional links can be useful in future.
+ aix,yes) # traditional libtool
+ dynamic_linker='AIX unversionable lib.so'
+ # If using run time linking (on AIX 4.2 or later) use lib<name>.so
+ # instead of lib<name>.a to let people know that these are not
+ # typical AIX shared libraries.
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ ;;
+ aix,no) # traditional AIX only
+ dynamic_linker='AIX lib.a(lib.so.V)'
+ # We preserve .a as extension for shared libraries through AIX4.2
+ # and later when we are not doing run time linking.
+ library_names_spec='$libname$release.a $libname.a'
+ soname_spec='$libname$release$shared_ext$major'
+ ;;
+ svr4,*) # full svr4 only
+ dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o)"
+ library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
+ # We do not specify a path in Import Files, so LIBPATH fires.
+ shlibpath_overrides_runpath=yes
+ ;;
+ *,yes) # both, prefer svr4
+ dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o), lib.a(lib.so.V)"
+ library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
+ # unpreferred sharedlib libNAME.a needs extra handling
+ postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"'
+ postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"'
+ # We do not specify a path in Import Files, so LIBPATH fires.
+ shlibpath_overrides_runpath=yes
+ ;;
+ *,no) # both, prefer aix
+ dynamic_linker="AIX lib.a(lib.so.V), lib.so.V($shared_archive_member_spec.o)"
+ library_names_spec='$libname$release.a $libname.a'
+ soname_spec='$libname$release$shared_ext$major'
+ # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling
+ postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)'
+ postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"'
+ ;;
+ esac
+ shlibpath_var=LIBPATH
+ fi
+ ;;
+
+amigaos*)
+ case $host_cpu in
+ powerpc)
+ # Since July 2007 AmigaOS4 officially supports .so libraries.
+ # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ ;;
+ m68k)
+ library_names_spec='$libname.ixlibrary $libname.a'
+ # Create ${libname}_ixlibrary.a entries in /sys/libs.
+ finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
+ ;;
+ esac
+ ;;
+
+beos*)
+ library_names_spec='$libname$shared_ext'
+ dynamic_linker="$host_os ld.so"
+ shlibpath_var=LIBRARY_PATH
+ ;;
+
+bsdi[45]*)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ need_version=no
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
+ sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
+ # the default ld.so.conf also contains /usr/contrib/lib and
+ # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
+ # libtool to hard-code these into programs
+ ;;
+
+cygwin* | mingw* | pw32* | cegcc*)
+ version_type=windows
+ shrext_cmds=.dll
+ need_version=no
+ need_lib_prefix=no
+
+ case $GCC,$cc_basename in
+ yes,*)
+ # gcc
+ library_names_spec='$libname.dll.a'
+ # DLL is installed to $(libdir)/../bin by postinstall_cmds
+ postinstall_cmds='base_file=`basename \$file`~
+ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
+ dldir=$destdir/`dirname \$dlpath`~
+ test -d \$dldir || mkdir -p \$dldir~
+ $install_prog $dir/$dlname \$dldir/$dlname~
+ chmod a+x \$dldir/$dlname~
+ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
+ eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
+ fi'
+ postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
+ dlpath=$dir/\$dldll~
+ $RM \$dlpath'
+ shlibpath_overrides_runpath=yes
+
+ case $host_os in
+ cygwin*)
+ # Cygwin DLLs use 'cyg' prefix rather than 'lib'
+ soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
+
+ ;;
+ mingw* | cegcc*)
+ # MinGW DLLs use traditional 'lib' prefix
+ soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
+ ;;
+ pw32*)
+ # pw32 DLLs use 'pw' prefix rather than 'lib'
+ library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
+ ;;
+ esac
+ dynamic_linker='Win32 ld.exe'
+ ;;
+
+ *,cl*)
+ # Native MSVC
+ libname_spec='$name'
+ soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
+ library_names_spec='$libname.dll.lib'
+
+ case $build_os in
+ mingw*)
+ sys_lib_search_path_spec=
+ lt_save_ifs=$IFS
+ IFS=';'
+ for lt_path in $LIB
+ do
+ IFS=$lt_save_ifs
+ # Let DOS variable expansion print the short 8.3 style file name.
+ lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
+ sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
+ done
+ IFS=$lt_save_ifs
+ # Convert to MSYS style.
+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'`
+ ;;
+ cygwin*)
+ # Convert to unix form, then to dos form, then back to unix form
+ # but this time dos style (no spaces!) so that the unix form looks
+ # like /cygdrive/c/PROGRA~1:/cygdr...
+ sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
+ sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
+ sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
+ ;;
+ *)
+ sys_lib_search_path_spec=$LIB
+ if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
+ # It is most probably a Windows format PATH.
+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+ else
+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
+ fi
+ # FIXME: find the short name or the path components, as spaces are
+ # common. (e.g. "Program Files" -> "PROGRA~1")
+ ;;
+ esac
+
+ # DLL is installed to $(libdir)/../bin by postinstall_cmds
+ postinstall_cmds='base_file=`basename \$file`~
+ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
+ dldir=$destdir/`dirname \$dlpath`~
+ test -d \$dldir || mkdir -p \$dldir~
+ $install_prog $dir/$dlname \$dldir/$dlname'
+ postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
+ dlpath=$dir/\$dldll~
+ $RM \$dlpath'
+ shlibpath_overrides_runpath=yes
+ dynamic_linker='Win32 link.exe'
+ ;;
+
+ *)
+ # Assume MSVC wrapper
+ library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib'
+ dynamic_linker='Win32 ld.exe'
+ ;;
+ esac
+ # FIXME: first we should search . and the directory the executable is in
+ shlibpath_var=PATH
+ ;;
+
+darwin* | rhapsody*)
+ dynamic_linker="$host_os dyld"
+ version_type=darwin
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='$libname$release$major$shared_ext $libname$shared_ext'
+ soname_spec='$libname$release$major$shared_ext'
+ shlibpath_overrides_runpath=yes
+ shlibpath_var=DYLD_LIBRARY_PATH
+ shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
+
+ sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
+ ;;
+
+dgux*)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ ;;
+
+freebsd* | dragonfly*)
+ # DragonFly does not have aout. When/if they implement a new
+ # versioning mechanism, adjust this.
+ if test -x /usr/bin/objformat; then
+ objformat=`/usr/bin/objformat`
+ else
+ case $host_os in
+ freebsd[23].*) objformat=aout ;;
+ *) objformat=elf ;;
+ esac
+ fi
+ version_type=freebsd-$objformat
+ case $version_type in
+ freebsd-elf*)
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
+ need_version=no
+ need_lib_prefix=no
+ ;;
+ freebsd-*)
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
+ need_version=yes
+ ;;
+ esac
+ shlibpath_var=LD_LIBRARY_PATH
+ case $host_os in
+ freebsd2.*)
+ shlibpath_overrides_runpath=yes
+ ;;
+ freebsd3.[01]* | freebsdelf3.[01]*)
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ ;;
+ freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
+ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ ;;
+ *) # from 4.6 on, and DragonFly
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ ;;
+ esac
+ ;;
+
+haiku*)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ need_lib_prefix=no
+ need_version=no
+ dynamic_linker="$host_os runtime_loader"
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
+ shlibpath_var=LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
+ hardcode_into_libs=yes
+ ;;
+
+hpux9* | hpux10* | hpux11*)
+ # Give a soname corresponding to the major version so that dld.sl refuses to
+ # link against other versions.
+ version_type=sunos
+ need_lib_prefix=no
+ need_version=no
+ case $host_cpu in
+ ia64*)
+ shrext_cmds='.so'
+ hardcode_into_libs=yes
+ dynamic_linker="$host_os dld.so"
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
+ if test 32 = "$HPUX_IA64_MODE"; then
+ sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
+ sys_lib_dlsearch_path_spec=/usr/lib/hpux32
+ else
+ sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
+ sys_lib_dlsearch_path_spec=/usr/lib/hpux64
+ fi
+ ;;
+ hppa*64*)
+ shrext_cmds='.sl'
+ hardcode_into_libs=yes
+ dynamic_linker="$host_os dld.sl"
+ shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
+ shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
+ sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
+ sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+ ;;
+ *)
+ shrext_cmds='.sl'
+ dynamic_linker="$host_os dld.sl"
+ shlibpath_var=SHLIB_PATH
+ shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
+ ;;
+ esac
+ # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
+ postinstall_cmds='chmod 555 $lib'
+ # or fails outright, so override atomically:
+ install_override_mode=555
+ ;;
+
+interix[3-9]*)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
+ dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ ;;
+
+irix5* | irix6* | nonstopux*)
+ case $host_os in
+ nonstopux*) version_type=nonstopux ;;
+ *)
+ if test yes = "$lt_cv_prog_gnu_ld"; then
+ version_type=linux # correct to gnu/linux during the next big refactor
+ else
+ version_type=irix
+ fi ;;
+ esac
+ need_lib_prefix=no
+ need_version=no
+ soname_spec='$libname$release$shared_ext$major'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext'
+ case $host_os in
+ irix5* | nonstopux*)
+ libsuff= shlibsuff=
+ ;;
+ *)
+ case $LD in # libtool.m4 will add one of these switches to LD
+ *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
+ libsuff= shlibsuff= libmagic=32-bit;;
+ *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
+ libsuff=32 shlibsuff=N32 libmagic=N32;;
+ *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
+ libsuff=64 shlibsuff=64 libmagic=64-bit;;
+ *) libsuff= shlibsuff= libmagic=never-match;;
+ esac
+ ;;
+ esac
+ shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
+ shlibpath_overrides_runpath=no
+ sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff"
+ sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff"
+ hardcode_into_libs=yes
+ ;;
+
+# No shared lib support for Linux oldld, aout, or coff.
+linux*oldld* | linux*aout* | linux*coff*)
+ dynamic_linker=no
+ ;;
+
+linux*android*)
+ version_type=none # Android doesn't support versioned libraries.
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='$libname$release$shared_ext'
+ soname_spec='$libname$release$shared_ext'
+ finish_cmds=
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+
+ # This implies no fast_install, which is unacceptable.
+ # Some rework will be needed to allow for fast_install
+ # before this can be enabled.
+ hardcode_into_libs=yes
+
+ dynamic_linker='Android linker'
+ # Don't embed -rpath directories since the linker doesn't support them.
+ hardcode_libdir_flag_spec_CXX='-L$libdir'
+ ;;
+
+# This must be glibc/ELF.
+linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+
+ # Some binutils ld are patched to set DT_RUNPATH
+ if test ${lt_cv_shlibpath_overrides_runpath+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ lt_cv_shlibpath_overrides_runpath=no
+ save_LDFLAGS=$LDFLAGS
+ save_libdir=$libdir
+ eval "libdir=/foo; wl=\"$lt_prog_compiler_wl_CXX\"; \
+ LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec_CXX\""
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_link "$LINENO"
+then :
+ if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null
+then :
+ lt_cv_shlibpath_overrides_runpath=yes
+fi
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+ LDFLAGS=$save_LDFLAGS
+ libdir=$save_libdir
+
+fi
+
+ shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
+
+ # This implies no fast_install, which is unacceptable.
+ # Some rework will be needed to allow for fast_install
+ # before this can be enabled.
+ hardcode_into_libs=yes
+
+ # Ideally, we could use ldconfig to report *all* directores which are
+ # searched for libraries, however this is still not possible. Aside from not
+ # being certain /sbin/ldconfig is available, command
+ # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64,
+ # even though it is searched at run-time. Try to do the best guess by
+ # appending ld.so.conf contents (and includes) to the search path.
+ if test -f /etc/ld.so.conf; then
+ lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
+ sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
+ fi
+
+ # We used to test for /lib/ld.so.1 and disable shared libraries on
+ # powerpc, because MkLinux only supported shared libraries with the
+ # GNU dynamic linker. Since this was broken with cross compilers,
+ # most powerpc-linux boxes support dynamic linking these days and
+ # people can always --disable-shared, the test was removed, and we
+ # assume the GNU/Linux dynamic linker is in use.
+ dynamic_linker='GNU/Linux ld.so'
+ ;;
+
+netbsdelf*-gnu)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ dynamic_linker='NetBSD ld.elf_so'
+ ;;
+
+netbsd*)
+ version_type=sunos
+ need_lib_prefix=no
+ need_version=no
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+ dynamic_linker='NetBSD (a.out) ld.so'
+ else
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
+ dynamic_linker='NetBSD ld.elf_so'
+ fi
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ ;;
+
+newsos6)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ ;;
+
+*nto* | *qnx*)
+ version_type=qnx
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ dynamic_linker='ldqnx.so'
+ ;;
+
+openbsd* | bitrig*)
+ version_type=sunos
+ sys_lib_dlsearch_path_spec=/usr/lib
+ need_lib_prefix=no
+ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
+ need_version=no
+ else
+ need_version=yes
+ fi
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ ;;
+
+os2*)
+ libname_spec='$name'
+ version_type=windows
+ shrext_cmds=.dll
+ need_version=no
+ need_lib_prefix=no
+ # OS/2 can only load a DLL with a base name of 8 characters or less.
+ soname_spec='`test -n "$os2dllname" && libname="$os2dllname";
+ v=$($ECHO $release$versuffix | tr -d .-);
+ n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _);
+ $ECHO $n$v`$shared_ext'
+ library_names_spec='${libname}_dll.$libext'
+ dynamic_linker='OS/2 ld.exe'
+ shlibpath_var=BEGINLIBPATH
+ sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
+ sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+ postinstall_cmds='base_file=`basename \$file`~
+ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~
+ dldir=$destdir/`dirname \$dlpath`~
+ test -d \$dldir || mkdir -p \$dldir~
+ $install_prog $dir/$dlname \$dldir/$dlname~
+ chmod a+x \$dldir/$dlname~
+ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
+ eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
+ fi'
+ postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~
+ dlpath=$dir/\$dldll~
+ $RM \$dlpath'
+ ;;
+
+osf3* | osf4* | osf5*)
+ version_type=osf
+ need_lib_prefix=no
+ need_version=no
+ soname_spec='$libname$release$shared_ext$major'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ shlibpath_var=LD_LIBRARY_PATH
+ sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
+ sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+ ;;
+
+rdos*)
+ dynamic_linker=no
+ ;;
+
+solaris*)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ # ldd complains unless libraries are executable
+ postinstall_cmds='chmod +x $lib'
+ ;;
+
+sunos4*)
+ version_type=sunos
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
+ finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ if test yes = "$with_gnu_ld"; then
+ need_lib_prefix=no
+ fi
+ need_version=yes
+ ;;
+
+sysv4 | sysv4.3*)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ case $host_vendor in
+ sni)
+ shlibpath_overrides_runpath=no
+ need_lib_prefix=no
+ runpath_var=LD_RUN_PATH
+ ;;
+ siemens)
+ need_lib_prefix=no
+ ;;
+ motorola)
+ need_lib_prefix=no
+ need_version=no
+ shlibpath_overrides_runpath=no
+ sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
+ ;;
+ esac
+ ;;
+
+sysv4*MP*)
+ if test -d /usr/nec; then
+ version_type=linux # correct to gnu/linux during the next big refactor
+ library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext'
+ soname_spec='$libname$shared_ext.$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ fi
+ ;;
+
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+ version_type=sco
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ if test yes = "$with_gnu_ld"; then
+ sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
+ else
+ sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
+ case $host_os in
+ sco3.2v5*)
+ sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
+ ;;
+ esac
+ fi
+ sys_lib_dlsearch_path_spec='/usr/lib'
+ ;;
+
+tpf*)
+ # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
+ version_type=linux # correct to gnu/linux during the next big refactor
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ ;;
+
+uts4*)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ ;;
+
+*)
+ dynamic_linker=no
+ ;;
+esac
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
+printf "%s\n" "$dynamic_linker" >&6; }
+test no = "$dynamic_linker" && can_build_shared=no
+
+variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
+if test yes = "$GCC"; then
+ variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
+fi
+
+if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then
+ sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec
+fi
+
+if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then
+ sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec
+fi
+
+# remember unaugmented sys_lib_dlsearch_path content for libtool script decls...
+configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec
+
+# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code
+func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH"
+
+# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool
+configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5
+printf %s "checking how to hardcode library paths into programs... " >&6; }
+hardcode_action_CXX=
+if test -n "$hardcode_libdir_flag_spec_CXX" ||
+ test -n "$runpath_var_CXX" ||
+ test yes = "$hardcode_automatic_CXX"; then
+
+ # We can hardcode non-existent directories.
+ if test no != "$hardcode_direct_CXX" &&
+ # If the only mechanism to avoid hardcoding is shlibpath_var, we
+ # have to relink, otherwise we might link with an installed library
+ # when we should be linking with a yet-to-be-installed one
+ ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, CXX)" &&
+ test no != "$hardcode_minus_L_CXX"; then
+ # Linking always hardcodes the temporary library directory.
+ hardcode_action_CXX=relink
+ else
+ # We can link without hardcoding, and we can hardcode nonexisting dirs.
+ hardcode_action_CXX=immediate
+ fi
+else
+ # We cannot hardcode anything, or else we can only hardcode existing
+ # directories.
+ hardcode_action_CXX=unsupported
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $hardcode_action_CXX" >&5
+printf "%s\n" "$hardcode_action_CXX" >&6; }
+
+if test relink = "$hardcode_action_CXX" ||
+ test yes = "$inherit_rpath_CXX"; then
+ # Fast installation is not supported
+ enable_fast_install=no
+elif test yes = "$shlibpath_overrides_runpath" ||
+ test no = "$enable_shared"; then
+ # Fast installation is not necessary
+ enable_fast_install=needless
+fi
+
+
+
+
+
+
+
+ fi # test -n "$compiler"
+
+ CC=$lt_save_CC
+ CFLAGS=$lt_save_CFLAGS
+ LDCXX=$LD
+ LD=$lt_save_LD
+ GCC=$lt_save_GCC
+ with_gnu_ld=$lt_save_with_gnu_ld
+ lt_cv_path_LDCXX=$lt_cv_path_LD
+ lt_cv_path_LD=$lt_save_path_LD
+ lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
+ lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
+fi # test yes != "$_lt_caught_CXX_error"
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ac_config_commands="$ac_config_commands libtool"
+
+
+
+
+# Only expand once:
+
+
+
+
+# Checks for libraries.
+
+# Checks for header files.
+ac_fn_c_check_header_compile "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
+if test "x$ac_cv_header_stdlib_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_STDLIB_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "sys/time.h" "ac_cv_header_sys_time_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_time_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYS_TIME_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default"
+if test "x$ac_cv_header_unistd_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_UNISTD_H 1" >>confdefs.h
+
+fi
+
+
+# Checks for typedefs, structures, and compiler characteristics.
+ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
+if test "x$ac_cv_type__Bool" = xyes
+then :
+
+printf "%s\n" "#define HAVE__BOOL 1" >>confdefs.h
+
+
+fi
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
+printf %s "checking for stdbool.h that conforms to C99... " >&6; }
+if test ${ac_cv_header_stdbool_h+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdbool.h>
+
+ #ifndef __bool_true_false_are_defined
+ #error "__bool_true_false_are_defined is not defined"
+ #endif
+ char a[__bool_true_false_are_defined == 1 ? 1 : -1];
+
+ /* Regardless of whether this is C++ or "_Bool" is a
+ valid type name, "true" and "false" should be usable
+ in #if expressions and integer constant expressions,
+ and "bool" should be a valid type name. */
+
+ #if !true
+ #error "'true' is not true"
+ #endif
+ #if true != 1
+ #error "'true' is not equal to 1"
+ #endif
+ char b[true == 1 ? 1 : -1];
+ char c[true];
+
+ #if false
+ #error "'false' is not false"
+ #endif
+ #if false != 0
+ #error "'false' is not equal to 0"
+ #endif
+ char d[false == 0 ? 1 : -1];
+
+ enum { e = false, f = true, g = false * true, h = true * 256 };
+
+ char i[(bool) 0.5 == true ? 1 : -1];
+ char j[(bool) 0.0 == false ? 1 : -1];
+ char k[sizeof (bool) > 0 ? 1 : -1];
+
+ struct sb { bool s: 1; bool t; } s;
+ char l[sizeof s.t > 0 ? 1 : -1];
+
+ /* The following fails for
+ HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
+ bool m[h];
+ char n[sizeof m == h * sizeof m[0] ? 1 : -1];
+ char o[-1 - (bool) 0 < 0 ? 1 : -1];
+ /* Catch a bug in an HP-UX C compiler. See
+ https://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
+ https://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
+ */
+ bool p = true;
+ bool *pp = &p;
+
+ /* C 1999 specifies that bool, true, and false are to be
+ macros, but C++ 2011 and later overrule this. */
+ #if __cplusplus < 201103
+ #ifndef bool
+ #error "bool is not defined"
+ #endif
+ #ifndef false
+ #error "false is not defined"
+ #endif
+ #ifndef true
+ #error "true is not defined"
+ #endif
+ #endif
+
+ /* If _Bool is available, repeat with it all the tests
+ above that used bool. */
+ #ifdef HAVE__BOOL
+ struct sB { _Bool s: 1; _Bool t; } t;
+
+ char q[(_Bool) 0.5 == true ? 1 : -1];
+ char r[(_Bool) 0.0 == false ? 1 : -1];
+ char u[sizeof (_Bool) > 0 ? 1 : -1];
+ char v[sizeof t.t > 0 ? 1 : -1];
+
+ _Bool w[h];
+ char x[sizeof m == h * sizeof m[0] ? 1 : -1];
+ char y[-1 - (_Bool) 0 < 0 ? 1 : -1];
+ _Bool z = true;
+ _Bool *pz = &p;
+ #endif
+
+int
+main (void)
+{
+
+ bool ps = &s;
+ *pp |= p;
+ *pp |= ! p;
+
+ #ifdef HAVE__BOOL
+ _Bool pt = &t;
+ *pz |= z;
+ *pz |= ! z;
+ #endif
+
+ /* Refer to every declared value, so they cannot be
+ discarded as unused. */
+ return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !j + !k
+ + !l + !m + !n + !o + !p + !pp + !ps
+ #ifdef HAVE__BOOL
+ + !q + !r + !u + !v + !w + !x + !y + !z + !pt
+ #endif
+ );
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ ac_cv_header_stdbool_h=yes
+else $as_nop
+ ac_cv_header_stdbool_h=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
+printf "%s\n" "$ac_cv_header_stdbool_h" >&6; }
+
+if test $ac_cv_header_stdbool_h = yes; then
+
+printf "%s\n" "#define HAVE_STDBOOL_H 1" >>confdefs.h
+
+fi
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
+printf %s "checking for inline... " >&6; }
+if test ${ac_cv_c_inline+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_cv_c_inline=no
+for ac_kw in inline __inline__ __inline; do
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#ifndef __cplusplus
+typedef int foo_t;
+static $ac_kw foo_t static_foo (void) {return 0; }
+$ac_kw foo_t foo (void) {return 0; }
+#endif
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ ac_cv_c_inline=$ac_kw
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+ test "$ac_cv_c_inline" != no && break
+done
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
+printf "%s\n" "$ac_cv_c_inline" >&6; }
+
+case $ac_cv_c_inline in
+ inline | yes) ;;
+ *)
+ case $ac_cv_c_inline in
+ no) ac_val=;;
+ *) ac_val=$ac_cv_c_inline;;
+ esac
+ cat >>confdefs.h <<_ACEOF
+#ifndef __cplusplus
+#define inline $ac_val
+#endif
+_ACEOF
+ ;;
+esac
+
+ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
+if test "x$ac_cv_type_mode_t" = xyes
+then :
+
+else $as_nop
+
+printf "%s\n" "#define mode_t int" >>confdefs.h
+
+fi
+
+ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
+if test "x$ac_cv_type_size_t" = xyes
+then :
+
+else $as_nop
+
+printf "%s\n" "#define size_t unsigned int" >>confdefs.h
+
+fi
+
+
+# Checks for library functions.
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working strtod" >&5
+printf %s "checking for working strtod... " >&6; }
+if test ${ac_cv_func_strtod+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test "$cross_compiling" = yes
+then :
+ ac_cv_func_strtod=no
+else $as_nop
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+$ac_includes_default
+#ifndef strtod
+double strtod ();
+#endif
+int
+main (void)
+{
+ {
+ /* Some versions of Linux strtod mis-parse strings with leading '+'. */
+ char *string = " +69";
+ char *term;
+ double value;
+ value = strtod (string, &term);
+ if (value != 69 || term != (string + 4))
+ return 1;
+ }
+
+ {
+ /* Under Solaris 2.4, strtod returns the wrong value for the
+ terminating character under some conditions. */
+ char *string = "NaN";
+ char *term;
+ strtod (string, &term);
+ if (term != string && *(term - 1) == 0)
+ return 1;
+ }
+ return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_run "$LINENO"
+then :
+ ac_cv_func_strtod=yes
+else $as_nop
+ ac_cv_func_strtod=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strtod" >&5
+printf "%s\n" "$ac_cv_func_strtod" >&6; }
+if test $ac_cv_func_strtod = no; then
+ case " $LIBOBJS " in
+ *" strtod.$ac_objext "* ) ;;
+ *) LIBOBJS="$LIBOBJS strtod.$ac_objext"
+ ;;
+esac
+
+ac_fn_c_check_func "$LINENO" "pow" "ac_cv_func_pow"
+if test "x$ac_cv_func_pow" = xyes
+then :
+
+fi
+
+if test $ac_cv_func_pow = no; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pow in -lm" >&5
+printf %s "checking for pow in -lm... " >&6; }
+if test ${ac_cv_lib_m_pow+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lm $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+char pow ();
+int
+main (void)
+{
+return pow ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ ac_cv_lib_m_pow=yes
+else $as_nop
+ ac_cv_lib_m_pow=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_pow" >&5
+printf "%s\n" "$ac_cv_lib_m_pow" >&6; }
+if test "x$ac_cv_lib_m_pow" = xyes
+then :
+ POW_LIB=-lm
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot find library containing definition of pow" >&5
+printf "%s\n" "$as_me: WARNING: cannot find library containing definition of pow" >&2;}
+fi
+
+fi
+
+fi
+
+
+# The cast to long int works around a bug in the HP C Compiler
+# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+# This bug is HP SR number 8606223364.
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
+printf %s "checking size of void *... " >&6; }
+if test ${ac_cv_sizeof_void_p+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p" "$ac_includes_default"
+then :
+
+else $as_nop
+ if test "$ac_cv_type_void_p" = yes; then
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "cannot compute sizeof (void *)
+See \`config.log' for more details" "$LINENO" 5; }
+ else
+ ac_cv_sizeof_void_p=0
+ fi
+fi
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
+printf "%s\n" "$ac_cv_sizeof_void_p" >&6; }
+
+
+
+printf "%s\n" "#define SIZEOF_VOID_P $ac_cv_sizeof_void_p" >>confdefs.h
+
+
+CXXFLAGS="$CXXFLAGS -DSIZEOF_VOID_P=$ac_cv_sizeof_void_p"
+
+
+echo "$as_me: this is boost.m4 serial 26" >&5
+boost_save_IFS=$IFS
+boost_version_req=1.36
+IFS=.
+set x $boost_version_req 0 0 0
+IFS=$boost_save_IFS
+shift
+boost_version_req=`expr "$1" '*' 100000 + "$2" '*' 100 + "$3"`
+boost_version_req_string=$1.$2.$3
+
+# Check whether --with-boost was given.
+if test ${with_boost+y}
+then :
+ withval=$with_boost;
+fi
+# If BOOST_ROOT is set and the user has not provided a value to
+# --with-boost, then treat BOOST_ROOT as if it the user supplied it.
+if test x"$BOOST_ROOT" != x; then
+ if test x"$with_boost" = x; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Detected BOOST_ROOT; continuing with --with-boost=$BOOST_ROOT" >&5
+printf "%s\n" "$as_me: Detected BOOST_ROOT; continuing with --with-boost=$BOOST_ROOT" >&6;}
+ with_boost=$BOOST_ROOT
+ else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Detected BOOST_ROOT=$BOOST_ROOT, but overridden by --with-boost=$with_boost" >&5
+printf "%s\n" "$as_me: Detected BOOST_ROOT=$BOOST_ROOT, but overridden by --with-boost=$with_boost" >&6;}
+ fi
+fi
+DISTCHECK_CONFIGURE_FLAGS="$DISTCHECK_CONFIGURE_FLAGS '--with-boost=$with_boost'"
+boost_save_CPPFLAGS=$CPPFLAGS
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Boost headers version >= $boost_version_req_string" >&5
+printf %s "checking for Boost headers version >= $boost_version_req_string... " >&6; }
+if test ${boost_cv_inc_path+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ boost_cv_inc_path=no
+ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <boost/version.hpp>
+#if !defined BOOST_VERSION
+# error BOOST_VERSION is not defined
+#elif BOOST_VERSION < $boost_version_req
+# error Boost headers version < $boost_version_req
+#endif
+
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+ # If the user provided a value to --with-boost, use it and only it.
+ case $with_boost in #(
+ ''|yes) set x '' /opt/local/include /usr/local/include /opt/include \
+ /usr/include C:/Boost/include;; #(
+ *) set x "$with_boost/include" "$with_boost";;
+ esac
+ shift
+ for boost_dir
+ do
+ # Without --layout=system, Boost (or at least some versions) installs
+ # itself in <prefix>/include/boost-<version>. This inner loop helps to
+ # find headers in such directories.
+ #
+ # Any ${boost_dir}/boost-x_xx directories are searched in reverse version
+ # order followed by ${boost_dir}. The final '.' is a sentinel for
+ # searching $boost_dir" itself. Entries are whitespace separated.
+ #
+ # I didn't indent this loop on purpose (to avoid over-indented code)
+ boost_layout_system_search_list=`cd "$boost_dir" 2>/dev/null \
+ && ls -1 | "${GREP}" '^boost-' | sort -rn -t- -k2 \
+ && echo .`
+ for boost_inc in $boost_layout_system_search_list
+ do
+ if test x"$boost_inc" != x.; then
+ boost_inc="$boost_dir/$boost_inc"
+ else
+ boost_inc="$boost_dir" # Uses sentinel in boost_layout_system_search_list
+ fi
+ if test x"$boost_inc" != x; then
+ # We are going to check whether the version of Boost installed
+ # in $boost_inc is usable by running a compilation that
+ # #includes it. But if we pass a -I/some/path in which Boost
+ # is not installed, the compiler will just skip this -I and
+ # use other locations (either from CPPFLAGS, or from its list
+ # of system include directories). As a result we would use
+ # header installed on the machine instead of the /some/path
+ # specified by the user. So in that precise case (trying
+ # $boost_inc), make sure the version.hpp exists.
+ #
+ # Use test -e as there can be symlinks.
+ test -e "$boost_inc/boost/version.hpp" || continue
+ CPPFLAGS="$CPPFLAGS -I$boost_inc"
+ fi
+ if ac_fn_cxx_try_compile "$LINENO"
+then :
+ boost_cv_inc_path=yes
+else $as_nop
+ boost_cv_version=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam
+ if test x"$boost_cv_inc_path" = xyes; then
+ if test x"$boost_inc" != x; then
+ boost_cv_inc_path=$boost_inc
+ fi
+ break 2
+ fi
+ done
+ done
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $boost_cv_inc_path" >&5
+printf "%s\n" "$boost_cv_inc_path" >&6; }
+ case $boost_cv_inc_path in #(
+ no)
+ boost_errmsg="cannot find Boost headers version >= $boost_version_req_string"
+ as_fn_error $? "$boost_errmsg" "$LINENO" 5
+
+ ;;#(
+ yes)
+ BOOST_CPPFLAGS=
+ ;;#(
+ *)
+ BOOST_CPPFLAGS="-I$boost_cv_inc_path"
+ ;;
+ esac
+ if test x"$boost_cv_inc_path" != xno; then
+
+printf "%s\n" "#define HAVE_BOOST 1" >>confdefs.h
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Boost's header version" >&5
+printf %s "checking for Boost's header version... " >&6; }
+if test ${boost_cv_lib_version+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <boost/version.hpp>
+boost-lib-version = BOOST_LIB_VERSION
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ grep -v '#' |
+ grep -v '^[[:space:]]*$' |
+ tr -d '\r' |
+ tr -s '\n' ' ' |
+ $SED -n -e "/^boost-lib-version = /{s///;s/[\" ]//g;p;q;}" >conftest.i 2>&1
+then :
+ boost_cv_lib_version=`cat conftest.i`
+fi
+rm -rf conftest*
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $boost_cv_lib_version" >&5
+printf "%s\n" "$boost_cv_lib_version" >&6; }
+ # e.g. "134" for 1_34_1 or "135" for 1_35
+ boost_major_version=`echo "$boost_cv_lib_version" | sed 's/_//;s/_.*//'`
+ case $boost_major_version in #(
+ '' | *[!0-9]*)
+ as_fn_error $? "invalid value: boost_major_version='$boost_major_version'" "$LINENO" 5
+ ;;
+ esac
+fi
+CPPFLAGS=$boost_save_CPPFLAGS
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the toolset name used by Boost for $CXX" >&5
+printf %s "checking for the toolset name used by Boost for $CXX... " >&6; }
+if test ${boost_cv_lib_tag+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ boost_cv_lib_tag=unknown
+if test x$boost_cv_inc_path != xno; then
+ ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+ # The following tests are mostly inspired by boost/config/auto_link.hpp
+ # The list is sorted to most recent/common to oldest compiler (in order
+ # to increase the likelihood of finding the right compiler with the
+ # least number of compilation attempt).
+ # Beware that some tests are sensible to the order (for instance, we must
+ # look for MinGW before looking for GCC3).
+ # I used one compilation test per compiler with a #error to recognize
+ # each compiler so that it works even when cross-compiling (let me know
+ # if you know a better approach).
+ # Known missing tags (known from Boost's tools/build/v2/tools/common.jam):
+ # como, edg, kcc, bck, mp, sw, tru, xlc
+ # I'm not sure about my test for `il' (be careful: Intel's ICC pre-defines
+ # the same defines as GCC's).
+ for i in \
+ "defined __GNUC__ && __GNUC__ == 6 && __GNUC_MINOR__ == 3 && !defined __ICC && \
+ (defined WIN32 || defined WINNT || defined _WIN32 || defined __WIN32 \
+ || defined __WIN32__ || defined __WINNT || defined __WINNT__) @ mgw63" \
+ "defined __GNUC__ && __GNUC__ == 6 && __GNUC_MINOR__ == 3 && !defined __ICC @ gcc63" \
+ "defined __GNUC__ && __GNUC__ == 6 && __GNUC_MINOR__ == 2 && !defined __ICC && \
+ (defined WIN32 || defined WINNT || defined _WIN32 || defined __WIN32 \
+ || defined __WIN32__ || defined __WINNT || defined __WINNT__) @ mgw62" \
+ "defined __GNUC__ && __GNUC__ == 6 && __GNUC_MINOR__ == 2 && !defined __ICC @ gcc62" \
+ "defined __GNUC__ && __GNUC__ == 6 && __GNUC_MINOR__ == 1 && !defined __ICC && \
+ (defined WIN32 || defined WINNT || defined _WIN32 || defined __WIN32 \
+ || defined __WIN32__ || defined __WINNT || defined __WINNT__) @ mgw61" \
+ "defined __GNUC__ && __GNUC__ == 6 && __GNUC_MINOR__ == 1 && !defined __ICC @ gcc61" \
+ "defined __GNUC__ && __GNUC__ == 6 && __GNUC_MINOR__ == 0 && !defined __ICC && \
+ (defined WIN32 || defined WINNT || defined _WIN32 || defined __WIN32 \
+ || defined __WIN32__ || defined __WINNT || defined __WINNT__) @ mgw60" \
+ "defined __GNUC__ && __GNUC__ == 6 && __GNUC_MINOR__ == 0 && !defined __ICC @ gcc60" \
+ "defined __GNUC__ && __GNUC__ == 5 && __GNUC_MINOR__ == 4 && !defined __ICC && \
+ (defined WIN32 || defined WINNT || defined _WIN32 || defined __WIN32 \
+ || defined __WIN32__ || defined __WINNT || defined __WINNT__) @ mgw54" \
+ "defined __GNUC__ && __GNUC__ == 5 && __GNUC_MINOR__ == 4 && !defined __ICC @ gcc54" \
+ "defined __GNUC__ && __GNUC__ == 5 && __GNUC_MINOR__ == 3 && !defined __ICC && \
+ (defined WIN32 || defined WINNT || defined _WIN32 || defined __WIN32 \
+ || defined __WIN32__ || defined __WINNT || defined __WINNT__) @ mgw53" \
+ "defined __GNUC__ && __GNUC__ == 5 && __GNUC_MINOR__ == 3 && !defined __ICC @ gcc53" \
+ "defined __GNUC__ && __GNUC__ == 5 && __GNUC_MINOR__ == 2 && !defined __ICC && \
+ (defined WIN32 || defined WINNT || defined _WIN32 || defined __WIN32 \
+ || defined __WIN32__ || defined __WINNT || defined __WINNT__) @ mgw52" \
+ "defined __GNUC__ && __GNUC__ == 5 && __GNUC_MINOR__ == 2 && !defined __ICC @ gcc52" \
+ "defined __GNUC__ && __GNUC__ == 5 && __GNUC_MINOR__ == 1 && !defined __ICC && \
+ (defined WIN32 || defined WINNT || defined _WIN32 || defined __WIN32 \
+ || defined __WIN32__ || defined __WINNT || defined __WINNT__) @ mgw51" \
+ "defined __GNUC__ && __GNUC__ == 5 && __GNUC_MINOR__ == 1 && !defined __ICC @ gcc51" \
+ "defined __GNUC__ && __GNUC__ == 5 && __GNUC_MINOR__ == 0 && !defined __ICC && \
+ (defined WIN32 || defined WINNT || defined _WIN32 || defined __WIN32 \
+ || defined __WIN32__ || defined __WINNT || defined __WINNT__) @ mgw50" \
+ "defined __GNUC__ && __GNUC__ == 5 && __GNUC_MINOR__ == 0 && !defined __ICC @ gcc50" \
+ "defined __GNUC__ && __GNUC__ == 4 && __GNUC_MINOR__ == 10 && !defined __ICC && \
+ (defined WIN32 || defined WINNT || defined _WIN32 || defined __WIN32 \
+ || defined __WIN32__ || defined __WINNT || defined __WINNT__) @ mgw410" \
+ "defined __GNUC__ && __GNUC__ == 4 && __GNUC_MINOR__ == 10 && !defined __ICC @ gcc410" \
+ "defined __GNUC__ && __GNUC__ == 4 && __GNUC_MINOR__ == 9 && !defined __ICC && \
+ (defined WIN32 || defined WINNT || defined _WIN32 || defined __WIN32 \
+ || defined __WIN32__ || defined __WINNT || defined __WINNT__) @ mgw49" \
+ "defined __GNUC__ && __GNUC__ == 4 && __GNUC_MINOR__ == 9 && !defined __ICC @ gcc49" \
+ "defined __GNUC__ && __GNUC__ == 4 && __GNUC_MINOR__ == 8 && !defined __ICC && \
+ (defined WIN32 || defined WINNT || defined _WIN32 || defined __WIN32 \
+ || defined __WIN32__ || defined __WINNT || defined __WINNT__) @ mgw48" \
+ "defined __GNUC__ && __GNUC__ == 4 && __GNUC_MINOR__ == 8 && !defined __ICC @ gcc48" \
+ "defined __GNUC__ && __GNUC__ == 4 && __GNUC_MINOR__ == 7 && !defined __ICC && \
+ (defined WIN32 || defined WINNT || defined _WIN32 || defined __WIN32 \
+ || defined __WIN32__ || defined __WINNT || defined __WINNT__) @ mgw47" \
+ "defined __GNUC__ && __GNUC__ == 4 && __GNUC_MINOR__ == 7 && !defined __ICC @ gcc47" \
+ "defined __GNUC__ && __GNUC__ == 4 && __GNUC_MINOR__ == 6 && !defined __ICC && \
+ (defined WIN32 || defined WINNT || defined _WIN32 || defined __WIN32 \
+ || defined __WIN32__ || defined __WINNT || defined __WINNT__) @ mgw46" \
+ "defined __GNUC__ && __GNUC__ == 4 && __GNUC_MINOR__ == 6 && !defined __ICC @ gcc46" \
+ "defined __GNUC__ && __GNUC__ == 4 && __GNUC_MINOR__ == 5 && !defined __ICC && \
+ (defined WIN32 || defined WINNT || defined _WIN32 || defined __WIN32 \
+ || defined __WIN32__ || defined __WINNT || defined __WINNT__) @ mgw45" \
+ "defined __GNUC__ && __GNUC__ == 4 && __GNUC_MINOR__ == 5 && !defined __ICC @ gcc45" \
+ "defined __GNUC__ && __GNUC__ == 4 && __GNUC_MINOR__ == 4 && !defined __ICC && \
+ (defined WIN32 || defined WINNT || defined _WIN32 || defined __WIN32 \
+ || defined __WIN32__ || defined __WINNT || defined __WINNT__) @ mgw44" \
+ "defined __GNUC__ && __GNUC__ == 4 && __GNUC_MINOR__ == 4 && !defined __ICC @ gcc44" \
+ "defined __GNUC__ && __GNUC__ == 4 && __GNUC_MINOR__ == 3 && !defined __ICC && \
+ (defined WIN32 || defined WINNT || defined _WIN32 || defined __WIN32 \
+ || defined __WIN32__ || defined __WINNT || defined __WINNT__) @ mgw43" \
+ "defined __GNUC__ && __GNUC__ == 4 && __GNUC_MINOR__ == 3 && !defined __ICC @ gcc43" \
+ "defined __GNUC__ && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && !defined __ICC && \
+ (defined WIN32 || defined WINNT || defined _WIN32 || defined __WIN32 \
+ || defined __WIN32__ || defined __WINNT || defined __WINNT__) @ mgw42" \
+ "defined __GNUC__ && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && !defined __ICC @ gcc42" \
+ "defined __GNUC__ && __GNUC__ == 4 && __GNUC_MINOR__ == 1 && !defined __ICC && \
+ (defined WIN32 || defined WINNT || defined _WIN32 || defined __WIN32 \
+ || defined __WIN32__ || defined __WINNT || defined __WINNT__) @ mgw41" \
+ "defined __GNUC__ && __GNUC__ == 4 && __GNUC_MINOR__ == 1 && !defined __ICC @ gcc41" \
+ "defined __GNUC__ && __GNUC__ == 4 && __GNUC_MINOR__ == 0 && !defined __ICC && \
+ (defined WIN32 || defined WINNT || defined _WIN32 || defined __WIN32 \
+ || defined __WIN32__ || defined __WINNT || defined __WINNT__) @ mgw40" \
+ "defined __GNUC__ && __GNUC__ == 4 && __GNUC_MINOR__ == 0 && !defined __ICC @ gcc40" \
+ "defined __GNUC__ && __GNUC__ == 3 && !defined __ICC \
+ && (defined WIN32 || defined WINNT || defined _WIN32 || defined __WIN32 \
+ || defined __WIN32__ || defined __WINNT || defined __WINNT__) @ mgw" \
+ "defined __GNUC__ && __GNUC__ == 3 && __GNUC_MINOR__ == 4 && !defined __ICC @ gcc34" \
+ "defined __GNUC__ && __GNUC__ == 3 && __GNUC_MINOR__ == 3 && !defined __ICC @ gcc33" \
+ "defined _MSC_VER && _MSC_VER >= 1500 @ vc90" \
+ "defined _MSC_VER && _MSC_VER == 1400 @ vc80" \
+ "defined __GNUC__ && __GNUC__ == 3 && __GNUC_MINOR__ == 2 && !defined __ICC @ gcc32" \
+ "defined _MSC_VER && _MSC_VER == 1310 @ vc71" \
+ "defined __GNUC__ && __GNUC__ == 3 && __GNUC_MINOR__ == 1 && !defined __ICC @ gcc31" \
+ "defined __GNUC__ && __GNUC__ == 3 && __GNUC_MINOR__ == 0 && !defined __ICC @ gcc30" \
+ "defined __BORLANDC__ @ bcb" \
+ "defined __ICC && (defined __unix || defined ) @ il" \
+ "defined __ICL @ iw" \
+ "defined _MSC_VER && _MSC_VER == 1300 @ vc7" \
+ "defined __GNUC__ && __GNUC__ == 2 && __GNUC_MINOR__ == 95 && !defined __ICC @ gcc295" \
+ "defined __MWERKS__ && __MWERKS__ <= 0x32FF @ cw9" \
+ "defined _MSC_VER && _MSC_VER < 1300 && !defined UNDER_CE @ vc6" \
+ "defined _MSC_VER && _MSC_VER < 1300 && defined UNDER_CE @ evc4" \
+ "defined __MWERKS__ && __MWERKS__ <= 0x31FF @ cw8"
+ do
+ boost_tag_test=`expr "X$i" : 'X\([^@]*\) @ '`
+ boost_tag=`expr "X$i" : 'X[^@]* @ \(.*\)'`
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#if $boost_tag_test
+/* OK */
+#else
+# error $boost_tag_test
+#endif
+
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"
+then :
+ boost_cv_lib_tag=$boost_tag; break
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+ done
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+ case $boost_cv_lib_tag in #(
+ # Some newer (>= 1.35?) versions of Boost seem to only use "gcc" as opposed
+ # to "gcc41" for instance.
+ *-gcc | *'-gcc ') :;; #( Don't re-add -gcc: it's already in there.
+ gcc*)
+ boost_tag_x=
+ case $host_os in #(
+ darwin*)
+ if test $boost_major_version -ge 136; then
+ # The `x' added in r46793 of Boost.
+ boost_tag_x=x
+ fi;;
+ esac
+ # We can specify multiple tags in this variable because it's used by
+ # BOOST_FIND_LIB that does a `for tag in -$boost_cv_lib_tag' ...
+ boost_cv_lib_tag="$boost_tag_x$boost_cv_lib_tag -${boost_tag_x}gcc"
+ ;; #(
+ unknown)
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: could not figure out which toolset name to use for $CXX" >&5
+printf "%s\n" "$as_me: WARNING: could not figure out which toolset name to use for $CXX" >&2;}
+ boost_cv_lib_tag=
+ ;;
+ esac
+fi
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $boost_cv_lib_tag" >&5
+printf "%s\n" "$boost_cv_lib_tag" >&6; }
+# Check whether --enable-static-boost was given.
+if test ${enable_static_boost+y}
+then :
+ enableval=$enable_static_boost; enable_static_boost=yes
+else $as_nop
+ enable_static_boost=no
+fi
+
+# Check whether we do better use `mt' even though we weren't ask to.
+ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#if defined _REENTRANT || defined _MT || defined __MT__
+/* use -mt */
+#else
+# error MT not needed
+#endif
+
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"
+then :
+ boost_guess_use_mt=:
+else $as_nop
+ boost_guess_use_mt=false
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+# Do we have to check for Boost.System? This link-time dependency was
+# added as of 1.35.0. If we have a version <1.35, we must not attempt to
+# find Boost.System as it didn't exist by then.
+if test $boost_major_version -ge 135; then
+ if test x"$boost_cv_inc_path" = xno; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Boost not available, not searching for the Boost system library" >&5
+printf "%s\n" "$as_me: Boost not available, not searching for the Boost system library" >&6;}
+else
+ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+if test x"$boost_cv_inc_path" = xno; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Boost not available, not searching for boost/system/error_code.hpp" >&5
+printf "%s\n" "$as_me: Boost not available, not searching for boost/system/error_code.hpp" >&6;}
+else
+ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+boost_save_CPPFLAGS=$CPPFLAGS
+CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
+ac_fn_cxx_check_header_compile "$LINENO" "boost/system/error_code.hpp" "ac_cv_header_boost_system_error_code_hpp" "$ac_includes_default"
+if test "x$ac_cv_header_boost_system_error_code_hpp" = xyes
+then :
+
+printf "%s\n" "#define HAVE_BOOST_SYSTEM_ERROR_CODE_HPP 1" >>confdefs.h
+
+else $as_nop
+ as_fn_error $? "cannot find boost/system/error_code.hpp" "$LINENO" 5
+fi
+
+CPPFLAGS=$boost_save_CPPFLAGS
+ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+fi
+
+boost_save_CPPFLAGS=$CPPFLAGS
+CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the Boost system library" >&5
+printf %s "checking for the Boost system library... " >&6; }
+if test ${boost_cv_lib_system+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ boost_cv_lib_system=no
+ case "" in #(
+ (mt | mt-) boost_mt=-mt; boost_rtopt=;; #(
+ (mt* | mt-*) boost_mt=-mt; boost_rtopt=`expr "X" : 'Xmt-*\(.*\)'`;; #(
+ (*) boost_mt=; boost_rtopt=;;
+ esac
+ if test $enable_static_boost = yes; then
+ boost_rtopt="s$boost_rtopt"
+ fi
+ # Find the proper debug variant depending on what we've been asked to find.
+ case $boost_rtopt in #(
+ (*d*) boost_rt_d=$boost_rtopt;; #(
+ (*[sgpn]*) # Insert the `d' at the right place (in between `sg' and `pn')
+ boost_rt_d=`echo "$boost_rtopt" | sed 's/\(s*g*\)\(p*n*\)/\1\2/'`;; #(
+ (*) boost_rt_d='-d';;
+ esac
+ # If the PREFERRED-RT-OPT are not empty, prepend a `-'.
+ test -n "$boost_rtopt" && boost_rtopt="-$boost_rtopt"
+ $boost_guess_use_mt && boost_mt=-mt
+ # Look for the abs path the static archive.
+ # $libext is computed by Libtool but let's make sure it's non empty.
+ test -z "$libext" &&
+ as_fn_error $? "the libext variable is empty, did you invoke Libtool?" "$LINENO" 5
+ boost_save_ac_objext=$ac_objext
+ # Generate the test file.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <boost/system/error_code.hpp>
+
+int
+main (void)
+{
+boost::system::error_code e; e.clear();
+ ;
+ return 0;
+}
+_ACEOF
+ if ac_fn_cxx_try_compile "$LINENO"
+then :
+ ac_objext=do_not_rm_me_plz
+else $as_nop
+ as_fn_error $? "cannot compile a test that uses Boost system" "$LINENO" 5
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam
+ ac_objext=$boost_save_ac_objext
+ boost_failed_libs=
+# Don't bother to ident the following nested for loops, only the 2
+# innermost ones matter.
+for boost_lib_ in system; do
+for boost_tag_ in -$boost_cv_lib_tag ''; do
+for boost_ver_ in -$boost_cv_lib_version ''; do
+for boost_mt_ in $boost_mt -mt ''; do
+for boost_rtopt_ in $boost_rtopt '' -d; do
+ for boost_lib in \
+ boost_$boost_lib_$boost_tag_$boost_mt_$boost_rtopt_$boost_ver_ \
+ boost_$boost_lib_$boost_tag_$boost_rtopt_$boost_ver_ \
+ boost_$boost_lib_$boost_tag_$boost_mt_$boost_ver_ \
+ boost_$boost_lib_$boost_tag_$boost_ver_
+ do
+ # Avoid testing twice the same lib
+ case $boost_failed_libs in #(
+ (*@$boost_lib@*) continue;;
+ esac
+ # If with_boost is empty, we'll search in /lib first, which is not quite
+ # right so instead we'll try to a location based on where the headers are.
+ boost_tmp_lib=$with_boost
+ test x"$with_boost" = x && boost_tmp_lib=${boost_cv_inc_path%/include}
+ for boost_ldpath in "$boost_tmp_lib/lib" '' \
+ /opt/local/lib* /usr/local/lib* /opt/lib* /usr/lib* \
+ "$with_boost" C:/Boost/lib /lib*
+ do
+ # Don't waste time with directories that don't exist.
+ if test x"$boost_ldpath" != x && test ! -e "$boost_ldpath"; then
+ continue
+ fi
+ boost_save_LDFLAGS=$LDFLAGS
+ # Are we looking for a static library?
+ case $boost_ldpath:$boost_rtopt_ in #(
+ (*?*:*s*) # Yes (Non empty boost_ldpath + s in rt opt)
+ boost_cv_lib_system_LIBS="$boost_ldpath/lib$boost_lib.$libext"
+ test -e "$boost_cv_lib_system_LIBS" || continue;; #(
+ (*) # No: use -lboost_foo to find the shared library.
+ boost_cv_lib_system_LIBS="-l$boost_lib";;
+ esac
+ boost_save_LIBS=$LIBS
+ LIBS="$boost_cv_lib_system_LIBS $LIBS"
+ test x"$boost_ldpath" != x && LDFLAGS="$LDFLAGS -L$boost_ldpath"
+ rm -f conftest$ac_exeext
+boost_save_ac_ext=$ac_ext
+boost_use_source=:
+# If we already have a .o, re-use it. We change $ac_ext so that $ac_link
+# tries to link the existing object file instead of compiling from source.
+test -f conftest.$ac_objext && ac_ext=$ac_objext && boost_use_source=false &&
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: re-using the existing conftest.$ac_objext" >&5
+if { { ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+printf "%s\n" "$ac_try_echo"; } >&5
+ (eval "$ac_link") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ grep -v '^ *+' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ mv -f conftest.er1 conftest.err
+ fi
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && {
+ test -z "$ac_cxx_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_executable_p conftest$ac_exeext
+ }
+then :
+ boost_cv_lib_system=yes
+else $as_nop
+ if $boost_use_source; then
+ printf "%s\n" "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ fi
+ boost_cv_lib_system=no
+fi
+ac_objext=$boost_save_ac_objext
+ac_ext=$boost_save_ac_ext
+rm -f core conftest.err conftest_ipa8_conftest.oo \
+ conftest$ac_exeext
+ ac_objext=$boost_save_ac_objext
+ LDFLAGS=$boost_save_LDFLAGS
+ LIBS=$boost_save_LIBS
+ if test x"$boost_cv_lib_system" = xyes; then
+ # Check or used cached result of whether or not using -R or
+ # -rpath makes sense. Some implementations of ld, such as for
+ # Mac OSX, require -rpath but -R is the flag known to work on
+ # other systems. https://github.com/tsuna/boost.m4/issues/19
+ if test ${boost_cv_rpath_link_ldflag+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ case $boost_ldpath in
+ '') # Nothing to do.
+ boost_cv_rpath_link_ldflag=
+ boost_rpath_link_ldflag_found=yes;;
+ *)
+ for boost_cv_rpath_link_ldflag in -Wl,-R, -Wl,-rpath,; do
+ LDFLAGS="$boost_save_LDFLAGS -L$boost_ldpath $boost_cv_rpath_link_ldflag$boost_ldpath"
+ LIBS="$boost_save_LIBS $boost_cv_lib_system_LIBS"
+ rm -f conftest$ac_exeext
+boost_save_ac_ext=$ac_ext
+boost_use_source=:
+# If we already have a .o, re-use it. We change $ac_ext so that $ac_link
+# tries to link the existing object file instead of compiling from source.
+test -f conftest.$ac_objext && ac_ext=$ac_objext && boost_use_source=false &&
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: re-using the existing conftest.$ac_objext" >&5
+if { { ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+printf "%s\n" "$ac_try_echo"; } >&5
+ (eval "$ac_link") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ grep -v '^ *+' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ mv -f conftest.er1 conftest.err
+ fi
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && {
+ test -z "$ac_cxx_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_executable_p conftest$ac_exeext
+ }
+then :
+ boost_rpath_link_ldflag_found=yes
+ break
+else $as_nop
+ if $boost_use_source; then
+ printf "%s\n" "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ fi
+ boost_rpath_link_ldflag_found=no
+fi
+ac_objext=$boost_save_ac_objext
+ac_ext=$boost_save_ac_ext
+rm -f core conftest.err conftest_ipa8_conftest.oo \
+ conftest$ac_exeext
+ done
+ ;;
+ esac
+ if test "x$boost_rpath_link_ldflag_found" != "xyes"
+then :
+ as_fn_error $? "Unable to determine whether to use -R or -rpath" "$LINENO" 5
+fi
+ LDFLAGS=$boost_save_LDFLAGS
+ LIBS=$boost_save_LIBS
+
+fi
+
+ test x"$boost_ldpath" != x &&
+ boost_cv_lib_system_LDFLAGS="-L$boost_ldpath $boost_cv_rpath_link_ldflag$boost_ldpath"
+ boost_cv_lib_system_LDPATH="$boost_ldpath"
+ break 7
+ else
+ boost_failed_libs="$boost_failed_libs@$boost_lib@"
+ fi
+ done
+ done
+done
+done
+done
+done
+done # boost_lib_
+rm -f conftest.$ac_objext
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $boost_cv_lib_system" >&5
+printf "%s\n" "$boost_cv_lib_system" >&6; }
+case $boost_cv_lib_system in #(
+ (no) printf "%s\n" "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ as_fn_error $? "cannot find the flags to link with Boost system" "$LINENO" 5
+ ;;
+esac
+BOOST_SYSTEM_LDFLAGS=$boost_cv_lib_system_LDFLAGS
+BOOST_SYSTEM_LDPATH=$boost_cv_lib_system_LDPATH
+BOOST_LDPATH=$boost_cv_lib_system_LDPATH
+BOOST_SYSTEM_LIBS=$boost_cv_lib_system_LIBS
+CPPFLAGS=$boost_save_CPPFLAGS
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+fi
+
+
+
+fi # end of the Boost.System check.
+boost_filesystem_save_LIBS=$LIBS
+boost_filesystem_save_LDFLAGS=$LDFLAGS
+LIBS="$LIBS $BOOST_SYSTEM_LIBS"
+LDFLAGS="$LDFLAGS $BOOST_SYSTEM_LDFLAGS"
+if test x"$boost_cv_inc_path" = xno; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Boost not available, not searching for the Boost filesystem library" >&5
+printf "%s\n" "$as_me: Boost not available, not searching for the Boost filesystem library" >&6;}
+else
+ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+if test x"$boost_cv_inc_path" = xno; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Boost not available, not searching for boost/filesystem/path.hpp" >&5
+printf "%s\n" "$as_me: Boost not available, not searching for boost/filesystem/path.hpp" >&6;}
+else
+ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+boost_save_CPPFLAGS=$CPPFLAGS
+CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
+ac_fn_cxx_check_header_compile "$LINENO" "boost/filesystem/path.hpp" "ac_cv_header_boost_filesystem_path_hpp" "$ac_includes_default"
+if test "x$ac_cv_header_boost_filesystem_path_hpp" = xyes
+then :
+
+printf "%s\n" "#define HAVE_BOOST_FILESYSTEM_PATH_HPP 1" >>confdefs.h
+
+else $as_nop
+ as_fn_error $? "cannot find boost/filesystem/path.hpp" "$LINENO" 5
+fi
+
+CPPFLAGS=$boost_save_CPPFLAGS
+ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+fi
+
+boost_save_CPPFLAGS=$CPPFLAGS
+CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the Boost filesystem library" >&5
+printf %s "checking for the Boost filesystem library... " >&6; }
+if test ${boost_cv_lib_filesystem+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ boost_cv_lib_filesystem=no
+ case "" in #(
+ (mt | mt-) boost_mt=-mt; boost_rtopt=;; #(
+ (mt* | mt-*) boost_mt=-mt; boost_rtopt=`expr "X" : 'Xmt-*\(.*\)'`;; #(
+ (*) boost_mt=; boost_rtopt=;;
+ esac
+ if test $enable_static_boost = yes; then
+ boost_rtopt="s$boost_rtopt"
+ fi
+ # Find the proper debug variant depending on what we've been asked to find.
+ case $boost_rtopt in #(
+ (*d*) boost_rt_d=$boost_rtopt;; #(
+ (*[sgpn]*) # Insert the `d' at the right place (in between `sg' and `pn')
+ boost_rt_d=`echo "$boost_rtopt" | sed 's/\(s*g*\)\(p*n*\)/\1\2/'`;; #(
+ (*) boost_rt_d='-d';;
+ esac
+ # If the PREFERRED-RT-OPT are not empty, prepend a `-'.
+ test -n "$boost_rtopt" && boost_rtopt="-$boost_rtopt"
+ $boost_guess_use_mt && boost_mt=-mt
+ # Look for the abs path the static archive.
+ # $libext is computed by Libtool but let's make sure it's non empty.
+ test -z "$libext" &&
+ as_fn_error $? "the libext variable is empty, did you invoke Libtool?" "$LINENO" 5
+ boost_save_ac_objext=$ac_objext
+ # Generate the test file.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <boost/filesystem/path.hpp>
+
+int
+main (void)
+{
+boost::filesystem::path p;
+ ;
+ return 0;
+}
+_ACEOF
+ if ac_fn_cxx_try_compile "$LINENO"
+then :
+ ac_objext=do_not_rm_me_plz
+else $as_nop
+ as_fn_error $? "cannot compile a test that uses Boost filesystem" "$LINENO" 5
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam
+ ac_objext=$boost_save_ac_objext
+ boost_failed_libs=
+# Don't bother to ident the following nested for loops, only the 2
+# innermost ones matter.
+for boost_lib_ in filesystem; do
+for boost_tag_ in -$boost_cv_lib_tag ''; do
+for boost_ver_ in -$boost_cv_lib_version ''; do
+for boost_mt_ in $boost_mt -mt ''; do
+for boost_rtopt_ in $boost_rtopt '' -d; do
+ for boost_lib in \
+ boost_$boost_lib_$boost_tag_$boost_mt_$boost_rtopt_$boost_ver_ \
+ boost_$boost_lib_$boost_tag_$boost_rtopt_$boost_ver_ \
+ boost_$boost_lib_$boost_tag_$boost_mt_$boost_ver_ \
+ boost_$boost_lib_$boost_tag_$boost_ver_
+ do
+ # Avoid testing twice the same lib
+ case $boost_failed_libs in #(
+ (*@$boost_lib@*) continue;;
+ esac
+ # If with_boost is empty, we'll search in /lib first, which is not quite
+ # right so instead we'll try to a location based on where the headers are.
+ boost_tmp_lib=$with_boost
+ test x"$with_boost" = x && boost_tmp_lib=${boost_cv_inc_path%/include}
+ for boost_ldpath in "$boost_tmp_lib/lib" '' \
+ /opt/local/lib* /usr/local/lib* /opt/lib* /usr/lib* \
+ "$with_boost" C:/Boost/lib /lib*
+ do
+ # Don't waste time with directories that don't exist.
+ if test x"$boost_ldpath" != x && test ! -e "$boost_ldpath"; then
+ continue
+ fi
+ boost_save_LDFLAGS=$LDFLAGS
+ # Are we looking for a static library?
+ case $boost_ldpath:$boost_rtopt_ in #(
+ (*?*:*s*) # Yes (Non empty boost_ldpath + s in rt opt)
+ boost_cv_lib_filesystem_LIBS="$boost_ldpath/lib$boost_lib.$libext"
+ test -e "$boost_cv_lib_filesystem_LIBS" || continue;; #(
+ (*) # No: use -lboost_foo to find the shared library.
+ boost_cv_lib_filesystem_LIBS="-l$boost_lib";;
+ esac
+ boost_save_LIBS=$LIBS
+ LIBS="$boost_cv_lib_filesystem_LIBS $LIBS"
+ test x"$boost_ldpath" != x && LDFLAGS="$LDFLAGS -L$boost_ldpath"
+ rm -f conftest$ac_exeext
+boost_save_ac_ext=$ac_ext
+boost_use_source=:
+# If we already have a .o, re-use it. We change $ac_ext so that $ac_link
+# tries to link the existing object file instead of compiling from source.
+test -f conftest.$ac_objext && ac_ext=$ac_objext && boost_use_source=false &&
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: re-using the existing conftest.$ac_objext" >&5
+if { { ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+printf "%s\n" "$ac_try_echo"; } >&5
+ (eval "$ac_link") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ grep -v '^ *+' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ mv -f conftest.er1 conftest.err
+ fi
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && {
+ test -z "$ac_cxx_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_executable_p conftest$ac_exeext
+ }
+then :
+ boost_cv_lib_filesystem=yes
+else $as_nop
+ if $boost_use_source; then
+ printf "%s\n" "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ fi
+ boost_cv_lib_filesystem=no
+fi
+ac_objext=$boost_save_ac_objext
+ac_ext=$boost_save_ac_ext
+rm -f core conftest.err conftest_ipa8_conftest.oo \
+ conftest$ac_exeext
+ ac_objext=$boost_save_ac_objext
+ LDFLAGS=$boost_save_LDFLAGS
+ LIBS=$boost_save_LIBS
+ if test x"$boost_cv_lib_filesystem" = xyes; then
+ # Check or used cached result of whether or not using -R or
+ # -rpath makes sense. Some implementations of ld, such as for
+ # Mac OSX, require -rpath but -R is the flag known to work on
+ # other systems. https://github.com/tsuna/boost.m4/issues/19
+ if test ${boost_cv_rpath_link_ldflag+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ case $boost_ldpath in
+ '') # Nothing to do.
+ boost_cv_rpath_link_ldflag=
+ boost_rpath_link_ldflag_found=yes;;
+ *)
+ for boost_cv_rpath_link_ldflag in -Wl,-R, -Wl,-rpath,; do
+ LDFLAGS="$boost_save_LDFLAGS -L$boost_ldpath $boost_cv_rpath_link_ldflag$boost_ldpath"
+ LIBS="$boost_save_LIBS $boost_cv_lib_filesystem_LIBS"
+ rm -f conftest$ac_exeext
+boost_save_ac_ext=$ac_ext
+boost_use_source=:
+# If we already have a .o, re-use it. We change $ac_ext so that $ac_link
+# tries to link the existing object file instead of compiling from source.
+test -f conftest.$ac_objext && ac_ext=$ac_objext && boost_use_source=false &&
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: re-using the existing conftest.$ac_objext" >&5
+if { { ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+printf "%s\n" "$ac_try_echo"; } >&5
+ (eval "$ac_link") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ grep -v '^ *+' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ mv -f conftest.er1 conftest.err
+ fi
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && {
+ test -z "$ac_cxx_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_executable_p conftest$ac_exeext
+ }
+then :
+ boost_rpath_link_ldflag_found=yes
+ break
+else $as_nop
+ if $boost_use_source; then
+ printf "%s\n" "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ fi
+ boost_rpath_link_ldflag_found=no
+fi
+ac_objext=$boost_save_ac_objext
+ac_ext=$boost_save_ac_ext
+rm -f core conftest.err conftest_ipa8_conftest.oo \
+ conftest$ac_exeext
+ done
+ ;;
+ esac
+ if test "x$boost_rpath_link_ldflag_found" != "xyes"
+then :
+ as_fn_error $? "Unable to determine whether to use -R or -rpath" "$LINENO" 5
+fi
+ LDFLAGS=$boost_save_LDFLAGS
+ LIBS=$boost_save_LIBS
+
+fi
+
+ test x"$boost_ldpath" != x &&
+ boost_cv_lib_filesystem_LDFLAGS="-L$boost_ldpath $boost_cv_rpath_link_ldflag$boost_ldpath"
+ boost_cv_lib_filesystem_LDPATH="$boost_ldpath"
+ break 7
+ else
+ boost_failed_libs="$boost_failed_libs@$boost_lib@"
+ fi
+ done
+ done
+done
+done
+done
+done
+done # boost_lib_
+rm -f conftest.$ac_objext
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $boost_cv_lib_filesystem" >&5
+printf "%s\n" "$boost_cv_lib_filesystem" >&6; }
+case $boost_cv_lib_filesystem in #(
+ (no) printf "%s\n" "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ as_fn_error $? "cannot find the flags to link with Boost filesystem" "$LINENO" 5
+ ;;
+esac
+BOOST_FILESYSTEM_LDFLAGS=$boost_cv_lib_filesystem_LDFLAGS
+BOOST_FILESYSTEM_LDPATH=$boost_cv_lib_filesystem_LDPATH
+BOOST_LDPATH=$boost_cv_lib_filesystem_LDPATH
+BOOST_FILESYSTEM_LIBS=$boost_cv_lib_filesystem_LIBS
+CPPFLAGS=$boost_save_CPPFLAGS
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+fi
+
+if test $enable_static_boost = yes && test $boost_major_version -ge 135; then
+ BOOST_FILESYSTEM_LIBS="$BOOST_FILESYSTEM_LIBS $BOOST_SYSTEM_LIBS"
+fi
+LIBS=$boost_filesystem_save_LIBS
+LDFLAGS=$boost_filesystem_save_LDFLAGS
+
+
+
+# =====
+# Debug
+# =====
+# Check whether --enable-debug was given.
+if test ${enable_debug+y}
+then :
+ enableval=$enable_debug; enable_debug="$enableval"
+else $as_nop
+ enable_debug=no
+
+fi
+
+if test "x$enable_debug" != "xno"
+then :
+
+ CXXFLAGS="$CXXFLAGS -g -O0"
+
+else $as_nop
+
+ CXXFLAGS="$CXXFLAGS -O2"
+
+printf "%s\n" "#define NDEBUG /**/" >>confdefs.h
+
+
+fi
+
+
+
+
+
+
+
+
+if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
+set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_path_PKG_CONFIG+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ case $PKG_CONFIG in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_path_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+PKG_CONFIG=$ac_cv_path_PKG_CONFIG
+if test -n "$PKG_CONFIG"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
+printf "%s\n" "$PKG_CONFIG" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_path_PKG_CONFIG"; then
+ ac_pt_PKG_CONFIG=$PKG_CONFIG
+ # Extract the first word of "pkg-config", so it can be a program name with args.
+set dummy pkg-config; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_path_ac_pt_PKG_CONFIG+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ case $ac_pt_PKG_CONFIG in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_path_ac_pt_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
+if test -n "$ac_pt_PKG_CONFIG"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
+printf "%s\n" "$ac_pt_PKG_CONFIG" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+ if test "x$ac_pt_PKG_CONFIG" = x; then
+ PKG_CONFIG=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ PKG_CONFIG=$ac_pt_PKG_CONFIG
+ fi
+else
+ PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
+fi
+
+fi
+if test -n "$PKG_CONFIG"; then
+ _pkg_min_version=0.9.0
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
+printf %s "checking pkg-config is at least version $_pkg_min_version... " >&6; }
+ if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+ else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+ PKG_CONFIG=""
+ fi
+fi
+
+pkg_failed=no
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for mdds-2.1 >= 2.0.99" >&5
+printf %s "checking for mdds-2.1 >= 2.0.99... " >&6; }
+
+if test -n "$MDDS_CFLAGS"; then
+ pkg_cv_MDDS_CFLAGS="$MDDS_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"mdds-2.1 >= 2.0.99\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "mdds-2.1 >= 2.0.99") 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_MDDS_CFLAGS=`$PKG_CONFIG --cflags "mdds-2.1 >= 2.0.99" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
+else
+ pkg_failed=yes
+fi
+ else
+ pkg_failed=untried
+fi
+if test -n "$MDDS_LIBS"; then
+ pkg_cv_MDDS_LIBS="$MDDS_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"mdds-2.1 >= 2.0.99\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "mdds-2.1 >= 2.0.99") 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_MDDS_LIBS=`$PKG_CONFIG --libs "mdds-2.1 >= 2.0.99" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
+else
+ pkg_failed=yes
+fi
+ else
+ pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+ _pkg_short_errors_supported=yes
+else
+ _pkg_short_errors_supported=no
+fi
+ if test $_pkg_short_errors_supported = yes; then
+ MDDS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "mdds-2.1 >= 2.0.99" 2>&1`
+ else
+ MDDS_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "mdds-2.1 >= 2.0.99" 2>&1`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$MDDS_PKG_ERRORS" >&5
+
+ as_fn_error $? "Package requirements (mdds-2.1 >= 2.0.99) were not met:
+
+$MDDS_PKG_ERRORS
+
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
+
+Alternatively, you may set the environment variables MDDS_CFLAGS
+and MDDS_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details." "$LINENO" 5
+elif test $pkg_failed = untried; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it
+is in your PATH or set the PKG_CONFIG environment variable to the full
+path to pkg-config.
+
+Alternatively, you may set the environment variables MDDS_CFLAGS
+and MDDS_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+
+To get pkg-config, see <http://pkg-config.freedesktop.org/>.
+See \`config.log' for more details" "$LINENO" 5; }
+else
+ MDDS_CFLAGS=$pkg_cv_MDDS_CFLAGS
+ MDDS_LIBS=$pkg_cv_MDDS_LIBS
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+
+fi
+
+# Check whether --enable-log-debug was given.
+if test ${enable_log_debug+y}
+then :
+ enableval=$enable_log_debug; enable_log_debug="$enableval"
+else $as_nop
+ enable_log_debug=no
+
+fi
+
+
+if test "x$enable_log_debug" != "xno"
+then :
+
+ CXXFLAGS="$CXXFLAGS -DIXION_DEBUG_ON"
+
+fi
+
+# Check whether --enable-log-trace was given.
+if test ${enable_log_trace+y}
+then :
+ enableval=$enable_log_trace; enable_log_trace="$enableval"
+else $as_nop
+ enable_log_trace=no
+
+fi
+
+
+if test "x$enable_log_trace" != "xno"
+then :
+
+ CXXFLAGS="$CXXFLAGS -DIXION_TRACE_ON"
+
+fi
+
+# Check for python.
+if test "x$enable_python" != "xno"
+then :
+
+
+
+
+
+
+
+ if test -n "$PYTHON"; then
+ # If the user set $PYTHON, use it and don't search something else.
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $PYTHON version is >= 3" >&5
+printf %s "checking whether $PYTHON version is >= 3... " >&6; }
+ prog="import sys
+# split strings by '.' and convert to numeric. Append some zeros
+# because we need at least 4 digits for the hex conversion.
+# map returns an iterator in Python 3.0 and a list in 2.x
+minver = list(map(int, '3'.split('.'))) + [0, 0, 0]
+minverhex = 0
+# xrange is not present in Python 3.0 and range returns an iterator
+for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[i]
+sys.exit(sys.hexversion < minverhex)"
+ if { echo "$as_me:$LINENO: $PYTHON -c "$prog"" >&5
+ ($PYTHON -c "$prog") >&5 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+ as_fn_error $? "Python interpreter is too old" "$LINENO" 5
+fi
+ am_display_PYTHON=$PYTHON
+ else
+ # Otherwise, try each interpreter until we find one that satisfies
+ # VERSION.
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a Python interpreter with version >= 3" >&5
+printf %s "checking for a Python interpreter with version >= 3... " >&6; }
+if test ${am_cv_pathless_PYTHON+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+
+ for am_cv_pathless_PYTHON in python python2 python3 python3.11 python3.10 python3.9 python3.8 python3.7 python3.6 python3.5 python3.4 python3.3 python3.2 python3.1 python3.0 python2.7 python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 none; do
+ test "$am_cv_pathless_PYTHON" = none && break
+ prog="import sys
+# split strings by '.' and convert to numeric. Append some zeros
+# because we need at least 4 digits for the hex conversion.
+# map returns an iterator in Python 3.0 and a list in 2.x
+minver = list(map(int, '3'.split('.'))) + [0, 0, 0]
+minverhex = 0
+# xrange is not present in Python 3.0 and range returns an iterator
+for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[i]
+sys.exit(sys.hexversion < minverhex)"
+ if { echo "$as_me:$LINENO: $am_cv_pathless_PYTHON -c "$prog"" >&5
+ ($am_cv_pathless_PYTHON -c "$prog") >&5 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+then :
+ break
+fi
+ done
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_pathless_PYTHON" >&5
+printf "%s\n" "$am_cv_pathless_PYTHON" >&6; }
+ # Set $PYTHON to the absolute path of $am_cv_pathless_PYTHON.
+ if test "$am_cv_pathless_PYTHON" = none; then
+ PYTHON=:
+ else
+ # Extract the first word of "$am_cv_pathless_PYTHON", so it can be a program name with args.
+set dummy $am_cv_pathless_PYTHON; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_path_PYTHON+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ case $PYTHON in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_path_PYTHON="$as_dir$ac_word$ac_exec_ext"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+PYTHON=$ac_cv_path_PYTHON
+if test -n "$PYTHON"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
+printf "%s\n" "$PYTHON" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+ fi
+ am_display_PYTHON=$am_cv_pathless_PYTHON
+ fi
+
+
+ if test "$PYTHON" = :; then
+ as_fn_error $? "no suitable Python interpreter found" "$LINENO" 5
+ else
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON version" >&5
+printf %s "checking for $am_display_PYTHON version... " >&6; }
+if test ${am_cv_python_version+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ am_cv_python_version=`$PYTHON -c "import sys; print ('%u.%u' % sys.version_info[:2])"`
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_version" >&5
+printf "%s\n" "$am_cv_python_version" >&6; }
+ PYTHON_VERSION=$am_cv_python_version
+
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON platform" >&5
+printf %s "checking for $am_display_PYTHON platform... " >&6; }
+if test ${am_cv_python_platform+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ am_cv_python_platform=`$PYTHON -c "import sys; sys.stdout.write(sys.platform)"`
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_platform" >&5
+printf "%s\n" "$am_cv_python_platform" >&6; }
+ PYTHON_PLATFORM=$am_cv_python_platform
+
+
+ if test "x$prefix" = xNONE; then
+ am__usable_prefix=$ac_default_prefix
+ else
+ am__usable_prefix=$prefix
+ fi
+
+ # Allow user to request using sys.* values from Python,
+ # instead of the GNU $prefix values.
+
+# Check whether --with-python-sys-prefix was given.
+if test ${with_python_sys_prefix+y}
+then :
+ withval=$with_python_sys_prefix; am_use_python_sys=:
+else $as_nop
+ am_use_python_sys=false
+fi
+
+
+ # Allow user to override whatever the default Python prefix is.
+
+# Check whether --with-python_prefix was given.
+if test ${with_python_prefix+y}
+then :
+ withval=$with_python_prefix; am_python_prefix_subst=$withval
+ am_cv_python_prefix=$withval
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for explicit $am_display_PYTHON prefix" >&5
+printf %s "checking for explicit $am_display_PYTHON prefix... " >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_prefix" >&5
+printf "%s\n" "$am_cv_python_prefix" >&6; }
+else $as_nop
+
+ if $am_use_python_sys; then
+ # using python sys.prefix value, not GNU
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for python default $am_display_PYTHON prefix" >&5
+printf %s "checking for python default $am_display_PYTHON prefix... " >&6; }
+if test ${am_cv_python_prefix+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ am_cv_python_prefix=`$PYTHON -c "import sys; sys.stdout.write(sys.prefix)"`
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_prefix" >&5
+printf "%s\n" "$am_cv_python_prefix" >&6; }
+
+ case $am_cv_python_prefix in
+ $am__usable_prefix*)
+ am__strip_prefix=`echo "$am__usable_prefix" | sed 's|.|.|g'`
+ am_python_prefix_subst=`echo "$am_cv_python_prefix" | sed "s,^$am__strip_prefix,\\${prefix},"`
+ ;;
+ *)
+ am_python_prefix_subst=$am_cv_python_prefix
+ ;;
+ esac
+ else # using GNU prefix value, not python sys.prefix
+ am_python_prefix_subst='${prefix}'
+ am_python_prefix=$am_python_prefix_subst
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU default $am_display_PYTHON prefix" >&5
+printf %s "checking for GNU default $am_display_PYTHON prefix... " >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_python_prefix" >&5
+printf "%s\n" "$am_python_prefix" >&6; }
+ fi
+fi
+
+ # Substituting python_prefix_subst value.
+ PYTHON_PREFIX=$am_python_prefix_subst
+
+
+ # emacs-page Now do it all over again for Python exec_prefix, but with yet
+ # another conditional: fall back to regular prefix if that was specified.
+
+# Check whether --with-python_exec_prefix was given.
+if test ${with_python_exec_prefix+y}
+then :
+ withval=$with_python_exec_prefix; am_python_exec_prefix_subst=$withval
+ am_cv_python_exec_prefix=$withval
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for explicit $am_display_PYTHON exec_prefix" >&5
+printf %s "checking for explicit $am_display_PYTHON exec_prefix... " >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_exec_prefix" >&5
+printf "%s\n" "$am_cv_python_exec_prefix" >&6; }
+else $as_nop
+
+ # no explicit --with-python_exec_prefix, but if
+ # --with-python_prefix was given, use its value for python_exec_prefix too.
+ if test -n "$with_python_prefix"
+then :
+ am_python_exec_prefix_subst=$with_python_prefix
+ am_cv_python_exec_prefix=$with_python_prefix
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for python_prefix-given $am_display_PYTHON exec_prefix" >&5
+printf %s "checking for python_prefix-given $am_display_PYTHON exec_prefix... " >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_exec_prefix" >&5
+printf "%s\n" "$am_cv_python_exec_prefix" >&6; }
+else $as_nop
+
+ # Set am__usable_exec_prefix whether using GNU or Python values,
+ # since we use that variable for pyexecdir.
+ if test "x$exec_prefix" = xNONE; then
+ am__usable_exec_prefix=$am__usable_prefix
+ else
+ am__usable_exec_prefix=$exec_prefix
+ fi
+ #
+ if $am_use_python_sys; then # using python sys.exec_prefix, not GNU
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for python default $am_display_PYTHON exec_prefix" >&5
+printf %s "checking for python default $am_display_PYTHON exec_prefix... " >&6; }
+if test ${am_cv_python_exec_prefix+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ am_cv_python_exec_prefix=`$PYTHON -c "import sys; sys.stdout.write(sys.exec_prefix)"`
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_exec_prefix" >&5
+printf "%s\n" "$am_cv_python_exec_prefix" >&6; }
+ case $am_cv_python_exec_prefix in
+ $am__usable_exec_prefix*)
+ am__strip_prefix=`echo "$am__usable_exec_prefix" | sed 's|.|.|g'`
+ am_python_exec_prefix_subst=`echo "$am_cv_python_exec_prefix" | sed "s,^$am__strip_prefix,\\${exec_prefix},"`
+ ;;
+ *)
+ am_python_exec_prefix_subst=$am_cv_python_exec_prefix
+ ;;
+ esac
+ else # using GNU $exec_prefix, not python sys.exec_prefix
+ am_python_exec_prefix_subst='${exec_prefix}'
+ am_python_exec_prefix=$am_python_exec_prefix_subst
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU default $am_display_PYTHON exec_prefix" >&5
+printf %s "checking for GNU default $am_display_PYTHON exec_prefix... " >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_python_exec_prefix" >&5
+printf "%s\n" "$am_python_exec_prefix" >&6; }
+ fi
+fi
+fi
+
+ # Substituting python_exec_prefix_subst.
+ PYTHON_EXEC_PREFIX=$am_python_exec_prefix_subst
+
+
+ # Factor out some code duplication into this shell variable.
+ am_python_setup_sysconfig="\
+import sys
+# Prefer sysconfig over distutils.sysconfig, for better compatibility
+# with python 3.x. See automake bug#10227.
+try:
+ import sysconfig
+except ImportError:
+ can_use_sysconfig = 0
+else:
+ can_use_sysconfig = 1
+# Can't use sysconfig in CPython 2.7, since it's broken in virtualenvs:
+# <https://github.com/pypa/virtualenv/issues/118>
+try:
+ from platform import python_implementation
+ if python_implementation() == 'CPython' and sys.version[:3] == '2.7':
+ can_use_sysconfig = 0
+except ImportError:
+ pass"
+
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON script directory (pythondir)" >&5
+printf %s "checking for $am_display_PYTHON script directory (pythondir)... " >&6; }
+if test ${am_cv_python_pythondir+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test "x$am_cv_python_prefix" = x; then
+ am_py_prefix=$am__usable_prefix
+ else
+ am_py_prefix=$am_cv_python_prefix
+ fi
+ am_cv_python_pythondir=`$PYTHON -c "
+$am_python_setup_sysconfig
+if can_use_sysconfig:
+ if hasattr(sysconfig, 'get_default_scheme'):
+ scheme = sysconfig.get_default_scheme()
+ else:
+ scheme = sysconfig._get_default_scheme()
+ if scheme == 'posix_local':
+ # Debian's default scheme installs to /usr/local/ but we want to find headers in /usr/
+ scheme = 'posix_prefix'
+ sitedir = sysconfig.get_path('purelib', scheme, vars={'base':'$am_py_prefix'})
+else:
+ from distutils import sysconfig
+ sitedir = sysconfig.get_python_lib(0, 0, prefix='$am_py_prefix')
+sys.stdout.write(sitedir)"`
+ #
+ case $am_cv_python_pythondir in
+ $am_py_prefix*)
+ am__strip_prefix=`echo "$am_py_prefix" | sed 's|.|.|g'`
+ am_cv_python_pythondir=`echo "$am_cv_python_pythondir" | sed "s,^$am__strip_prefix,\\${PYTHON_PREFIX},"`
+ ;;
+ *)
+ case $am_py_prefix in
+ /usr|/System*) ;;
+ *) am_cv_python_pythondir="\${PYTHON_PREFIX}/lib/python$PYTHON_VERSION/site-packages"
+ ;;
+ esac
+ ;;
+ esac
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_pythondir" >&5
+printf "%s\n" "$am_cv_python_pythondir" >&6; }
+ pythondir=$am_cv_python_pythondir
+
+
+ pkgpythondir=\${pythondir}/$PACKAGE
+
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON extension module directory (pyexecdir)" >&5
+printf %s "checking for $am_display_PYTHON extension module directory (pyexecdir)... " >&6; }
+if test ${am_cv_python_pyexecdir+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test "x$am_cv_python_exec_prefix" = x; then
+ am_py_exec_prefix=$am__usable_exec_prefix
+ else
+ am_py_exec_prefix=$am_cv_python_exec_prefix
+ fi
+ am_cv_python_pyexecdir=`$PYTHON -c "
+$am_python_setup_sysconfig
+if can_use_sysconfig:
+ if hasattr(sysconfig, 'get_default_scheme'):
+ scheme = sysconfig.get_default_scheme()
+ else:
+ scheme = sysconfig._get_default_scheme()
+ if scheme == 'posix_local':
+ # Debian's default scheme installs to /usr/local/ but we want to find headers in /usr/
+ scheme = 'posix_prefix'
+ sitedir = sysconfig.get_path('platlib', scheme, vars={'platbase':'$am_py_exec_prefix'})
+else:
+ from distutils import sysconfig
+ sitedir = sysconfig.get_python_lib(1, 0, prefix='$am_py_exec_prefix')
+sys.stdout.write(sitedir)"`
+ #
+ case $am_cv_python_pyexecdir in
+ $am_py_exec_prefix*)
+ am__strip_prefix=`echo "$am_py_exec_prefix" | sed 's|.|.|g'`
+ am_cv_python_pyexecdir=`echo "$am_cv_python_pyexecdir" | sed "s,^$am__strip_prefix,\\${PYTHON_EXEC_PREFIX},"`
+ ;;
+ *)
+ case $am_py_exec_prefix in
+ /usr|/System*) ;;
+ *) am_cv_python_pyexecdir="\${PYTHON_EXEC_PREFIX}/lib/python$PYTHON_VERSION/site-packages"
+ ;;
+ esac
+ ;;
+ esac
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_pyexecdir" >&5
+printf "%s\n" "$am_cv_python_pyexecdir" >&6; }
+ pyexecdir=$am_cv_python_pyexecdir
+
+
+ pkgpyexecdir=\${pyexecdir}/$PACKAGE
+
+
+
+ fi
+
+
+pkg_failed=no
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for python3 >= 3.4" >&5
+printf %s "checking for python3 >= 3.4... " >&6; }
+
+if test -n "$PYTHON_CFLAGS"; then
+ pkg_cv_PYTHON_CFLAGS="$PYTHON_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"python3 >= 3.4\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "python3 >= 3.4") 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_PYTHON_CFLAGS=`$PKG_CONFIG --cflags "python3 >= 3.4" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
+else
+ pkg_failed=yes
+fi
+ else
+ pkg_failed=untried
+fi
+if test -n "$PYTHON_LIBS"; then
+ pkg_cv_PYTHON_LIBS="$PYTHON_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"python3 >= 3.4\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "python3 >= 3.4") 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_PYTHON_LIBS=`$PKG_CONFIG --libs "python3 >= 3.4" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
+else
+ pkg_failed=yes
+fi
+ else
+ pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+ _pkg_short_errors_supported=yes
+else
+ _pkg_short_errors_supported=no
+fi
+ if test $_pkg_short_errors_supported = yes; then
+ PYTHON_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "python3 >= 3.4" 2>&1`
+ else
+ PYTHON_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "python3 >= 3.4" 2>&1`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$PYTHON_PKG_ERRORS" >&5
+
+ as_fn_error $? "Package requirements (python3 >= 3.4) were not met:
+
+$PYTHON_PKG_ERRORS
+
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
+
+Alternatively, you may set the environment variables PYTHON_CFLAGS
+and PYTHON_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details." "$LINENO" 5
+elif test $pkg_failed = untried; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it
+is in your PATH or set the PKG_CONFIG environment variable to the full
+path to pkg-config.
+
+Alternatively, you may set the environment variables PYTHON_CFLAGS
+and PYTHON_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+
+To get pkg-config, see <http://pkg-config.freedesktop.org/>.
+See \`config.log' for more details" "$LINENO" 5; }
+else
+ PYTHON_CFLAGS=$pkg_cv_PYTHON_CFLAGS
+ PYTHON_LIBS=$pkg_cv_PYTHON_LIBS
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+
+fi
+
+fi
+
+if test "x$enable_threads" != "xno"
+then :
+
+ CXXFLAGS="$CXXFLAGS -DIXION_THREADS=1"
+
+else $as_nop
+
+ CXXFLAGS="$CXXFLAGS -DIXION_THREADS=0"
+
+fi
+
+if test "x$enable_debug_utils" != "xno"
+then :
+
+ CXXFLAGS="$CXXFLAGS -DIXION_DEBUG_UTILS"
+
+fi
+
+if test "x$enable_vulkan" != "xno"
+then :
+
+
+pkg_failed=no
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for vulkan >= 1.2.0" >&5
+printf %s "checking for vulkan >= 1.2.0... " >&6; }
+
+if test -n "$VULKAN_CFLAGS"; then
+ pkg_cv_VULKAN_CFLAGS="$VULKAN_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"vulkan >= 1.2.0\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "vulkan >= 1.2.0") 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_VULKAN_CFLAGS=`$PKG_CONFIG --cflags "vulkan >= 1.2.0" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
+else
+ pkg_failed=yes
+fi
+ else
+ pkg_failed=untried
+fi
+if test -n "$VULKAN_LIBS"; then
+ pkg_cv_VULKAN_LIBS="$VULKAN_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"vulkan >= 1.2.0\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "vulkan >= 1.2.0") 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_VULKAN_LIBS=`$PKG_CONFIG --libs "vulkan >= 1.2.0" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
+else
+ pkg_failed=yes
+fi
+ else
+ pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+ _pkg_short_errors_supported=yes
+else
+ _pkg_short_errors_supported=no
+fi
+ if test $_pkg_short_errors_supported = yes; then
+ VULKAN_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "vulkan >= 1.2.0" 2>&1`
+ else
+ VULKAN_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "vulkan >= 1.2.0" 2>&1`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$VULKAN_PKG_ERRORS" >&5
+
+ as_fn_error $? "Package requirements (vulkan >= 1.2.0) were not met:
+
+$VULKAN_PKG_ERRORS
+
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
+
+Alternatively, you may set the environment variables VULKAN_CFLAGS
+and VULKAN_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details." "$LINENO" 5
+elif test $pkg_failed = untried; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it
+is in your PATH or set the PKG_CONFIG environment variable to the full
+path to pkg-config.
+
+Alternatively, you may set the environment variables VULKAN_CFLAGS
+and VULKAN_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+
+To get pkg-config, see <http://pkg-config.freedesktop.org/>.
+See \`config.log' for more details" "$LINENO" 5; }
+else
+ VULKAN_CFLAGS=$pkg_cv_VULKAN_CFLAGS
+ VULKAN_LIBS=$pkg_cv_VULKAN_LIBS
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+
+fi
+
+fi
+
+ if test "x$enable_python" != "xno"; then
+ BUILD_PYTHON_TRUE=
+ BUILD_PYTHON_FALSE='#'
+else
+ BUILD_PYTHON_TRUE='#'
+ BUILD_PYTHON_FALSE=
+fi
+
+ if test "x$enable_threads" != "xno"; then
+ IXION_THREADS_TRUE=
+ IXION_THREADS_FALSE='#'
+else
+ IXION_THREADS_TRUE='#'
+ IXION_THREADS_FALSE=
+fi
+
+ if test "x$enable_vulkan" != "xno"; then
+ BUILD_VULKAN_TRUE=
+ BUILD_VULKAN_FALSE='#'
+else
+ BUILD_VULKAN_TRUE='#'
+ BUILD_VULKAN_FALSE=
+fi
+
+ if test "x$_os" = "xDarwin"; then
+ OSX_TRUE=
+ OSX_FALSE='#'
+else
+ OSX_TRUE='#'
+ OSX_FALSE=
+fi
+
+
+if test x"$boost_cv_inc_path" = xno; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Boost not available, not searching for the Boost program_options library" >&5
+printf "%s\n" "$as_me: Boost not available, not searching for the Boost program_options library" >&6;}
+else
+ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+if test x"$boost_cv_inc_path" = xno; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Boost not available, not searching for boost/program_options.hpp" >&5
+printf "%s\n" "$as_me: Boost not available, not searching for boost/program_options.hpp" >&6;}
+else
+ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+boost_save_CPPFLAGS=$CPPFLAGS
+CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
+ac_fn_cxx_check_header_compile "$LINENO" "boost/program_options.hpp" "ac_cv_header_boost_program_options_hpp" "$ac_includes_default"
+if test "x$ac_cv_header_boost_program_options_hpp" = xyes
+then :
+
+printf "%s\n" "#define HAVE_BOOST_PROGRAM_OPTIONS_HPP 1" >>confdefs.h
+
+else $as_nop
+ as_fn_error $? "cannot find boost/program_options.hpp" "$LINENO" 5
+fi
+
+CPPFLAGS=$boost_save_CPPFLAGS
+ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+fi
+
+boost_save_CPPFLAGS=$CPPFLAGS
+CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the Boost program_options library" >&5
+printf %s "checking for the Boost program_options library... " >&6; }
+if test ${boost_cv_lib_program_options+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ boost_cv_lib_program_options=no
+ case "" in #(
+ (mt | mt-) boost_mt=-mt; boost_rtopt=;; #(
+ (mt* | mt-*) boost_mt=-mt; boost_rtopt=`expr "X" : 'Xmt-*\(.*\)'`;; #(
+ (*) boost_mt=; boost_rtopt=;;
+ esac
+ if test $enable_static_boost = yes; then
+ boost_rtopt="s$boost_rtopt"
+ fi
+ # Find the proper debug variant depending on what we've been asked to find.
+ case $boost_rtopt in #(
+ (*d*) boost_rt_d=$boost_rtopt;; #(
+ (*[sgpn]*) # Insert the `d' at the right place (in between `sg' and `pn')
+ boost_rt_d=`echo "$boost_rtopt" | sed 's/\(s*g*\)\(p*n*\)/\1\2/'`;; #(
+ (*) boost_rt_d='-d';;
+ esac
+ # If the PREFERRED-RT-OPT are not empty, prepend a `-'.
+ test -n "$boost_rtopt" && boost_rtopt="-$boost_rtopt"
+ $boost_guess_use_mt && boost_mt=-mt
+ # Look for the abs path the static archive.
+ # $libext is computed by Libtool but let's make sure it's non empty.
+ test -z "$libext" &&
+ as_fn_error $? "the libext variable is empty, did you invoke Libtool?" "$LINENO" 5
+ boost_save_ac_objext=$ac_objext
+ # Generate the test file.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <boost/program_options.hpp>
+
+int
+main (void)
+{
+boost::program_options::options_description d("test");
+ ;
+ return 0;
+}
+_ACEOF
+ if ac_fn_cxx_try_compile "$LINENO"
+then :
+ ac_objext=do_not_rm_me_plz
+else $as_nop
+ as_fn_error $? "cannot compile a test that uses Boost program_options" "$LINENO" 5
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam
+ ac_objext=$boost_save_ac_objext
+ boost_failed_libs=
+# Don't bother to ident the following nested for loops, only the 2
+# innermost ones matter.
+for boost_lib_ in program_options; do
+for boost_tag_ in -$boost_cv_lib_tag ''; do
+for boost_ver_ in -$boost_cv_lib_version ''; do
+for boost_mt_ in $boost_mt -mt ''; do
+for boost_rtopt_ in $boost_rtopt '' -d; do
+ for boost_lib in \
+ boost_$boost_lib_$boost_tag_$boost_mt_$boost_rtopt_$boost_ver_ \
+ boost_$boost_lib_$boost_tag_$boost_rtopt_$boost_ver_ \
+ boost_$boost_lib_$boost_tag_$boost_mt_$boost_ver_ \
+ boost_$boost_lib_$boost_tag_$boost_ver_
+ do
+ # Avoid testing twice the same lib
+ case $boost_failed_libs in #(
+ (*@$boost_lib@*) continue;;
+ esac
+ # If with_boost is empty, we'll search in /lib first, which is not quite
+ # right so instead we'll try to a location based on where the headers are.
+ boost_tmp_lib=$with_boost
+ test x"$with_boost" = x && boost_tmp_lib=${boost_cv_inc_path%/include}
+ for boost_ldpath in "$boost_tmp_lib/lib" '' \
+ /opt/local/lib* /usr/local/lib* /opt/lib* /usr/lib* \
+ "$with_boost" C:/Boost/lib /lib*
+ do
+ # Don't waste time with directories that don't exist.
+ if test x"$boost_ldpath" != x && test ! -e "$boost_ldpath"; then
+ continue
+ fi
+ boost_save_LDFLAGS=$LDFLAGS
+ # Are we looking for a static library?
+ case $boost_ldpath:$boost_rtopt_ in #(
+ (*?*:*s*) # Yes (Non empty boost_ldpath + s in rt opt)
+ boost_cv_lib_program_options_LIBS="$boost_ldpath/lib$boost_lib.$libext"
+ test -e "$boost_cv_lib_program_options_LIBS" || continue;; #(
+ (*) # No: use -lboost_foo to find the shared library.
+ boost_cv_lib_program_options_LIBS="-l$boost_lib";;
+ esac
+ boost_save_LIBS=$LIBS
+ LIBS="$boost_cv_lib_program_options_LIBS $LIBS"
+ test x"$boost_ldpath" != x && LDFLAGS="$LDFLAGS -L$boost_ldpath"
+ rm -f conftest$ac_exeext
+boost_save_ac_ext=$ac_ext
+boost_use_source=:
+# If we already have a .o, re-use it. We change $ac_ext so that $ac_link
+# tries to link the existing object file instead of compiling from source.
+test -f conftest.$ac_objext && ac_ext=$ac_objext && boost_use_source=false &&
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: re-using the existing conftest.$ac_objext" >&5
+if { { ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+printf "%s\n" "$ac_try_echo"; } >&5
+ (eval "$ac_link") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ grep -v '^ *+' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ mv -f conftest.er1 conftest.err
+ fi
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && {
+ test -z "$ac_cxx_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_executable_p conftest$ac_exeext
+ }
+then :
+ boost_cv_lib_program_options=yes
+else $as_nop
+ if $boost_use_source; then
+ printf "%s\n" "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ fi
+ boost_cv_lib_program_options=no
+fi
+ac_objext=$boost_save_ac_objext
+ac_ext=$boost_save_ac_ext
+rm -f core conftest.err conftest_ipa8_conftest.oo \
+ conftest$ac_exeext
+ ac_objext=$boost_save_ac_objext
+ LDFLAGS=$boost_save_LDFLAGS
+ LIBS=$boost_save_LIBS
+ if test x"$boost_cv_lib_program_options" = xyes; then
+ # Check or used cached result of whether or not using -R or
+ # -rpath makes sense. Some implementations of ld, such as for
+ # Mac OSX, require -rpath but -R is the flag known to work on
+ # other systems. https://github.com/tsuna/boost.m4/issues/19
+ if test ${boost_cv_rpath_link_ldflag+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ case $boost_ldpath in
+ '') # Nothing to do.
+ boost_cv_rpath_link_ldflag=
+ boost_rpath_link_ldflag_found=yes;;
+ *)
+ for boost_cv_rpath_link_ldflag in -Wl,-R, -Wl,-rpath,; do
+ LDFLAGS="$boost_save_LDFLAGS -L$boost_ldpath $boost_cv_rpath_link_ldflag$boost_ldpath"
+ LIBS="$boost_save_LIBS $boost_cv_lib_program_options_LIBS"
+ rm -f conftest$ac_exeext
+boost_save_ac_ext=$ac_ext
+boost_use_source=:
+# If we already have a .o, re-use it. We change $ac_ext so that $ac_link
+# tries to link the existing object file instead of compiling from source.
+test -f conftest.$ac_objext && ac_ext=$ac_objext && boost_use_source=false &&
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: re-using the existing conftest.$ac_objext" >&5
+if { { ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+printf "%s\n" "$ac_try_echo"; } >&5
+ (eval "$ac_link") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ grep -v '^ *+' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ mv -f conftest.er1 conftest.err
+ fi
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && {
+ test -z "$ac_cxx_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_executable_p conftest$ac_exeext
+ }
+then :
+ boost_rpath_link_ldflag_found=yes
+ break
+else $as_nop
+ if $boost_use_source; then
+ printf "%s\n" "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ fi
+ boost_rpath_link_ldflag_found=no
+fi
+ac_objext=$boost_save_ac_objext
+ac_ext=$boost_save_ac_ext
+rm -f core conftest.err conftest_ipa8_conftest.oo \
+ conftest$ac_exeext
+ done
+ ;;
+ esac
+ if test "x$boost_rpath_link_ldflag_found" != "xyes"
+then :
+ as_fn_error $? "Unable to determine whether to use -R or -rpath" "$LINENO" 5
+fi
+ LDFLAGS=$boost_save_LDFLAGS
+ LIBS=$boost_save_LIBS
+
+fi
+
+ test x"$boost_ldpath" != x &&
+ boost_cv_lib_program_options_LDFLAGS="-L$boost_ldpath $boost_cv_rpath_link_ldflag$boost_ldpath"
+ boost_cv_lib_program_options_LDPATH="$boost_ldpath"
+ break 7
+ else
+ boost_failed_libs="$boost_failed_libs@$boost_lib@"
+ fi
+ done
+ done
+done
+done
+done
+done
+done # boost_lib_
+rm -f conftest.$ac_objext
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $boost_cv_lib_program_options" >&5
+printf "%s\n" "$boost_cv_lib_program_options" >&6; }
+case $boost_cv_lib_program_options in #(
+ (no) printf "%s\n" "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ as_fn_error $? "cannot find the flags to link with Boost program_options" "$LINENO" 5
+ ;;
+esac
+BOOST_PROGRAM_OPTIONS_LDFLAGS=$boost_cv_lib_program_options_LDFLAGS
+BOOST_PROGRAM_OPTIONS_LDPATH=$boost_cv_lib_program_options_LDPATH
+BOOST_LDPATH=$boost_cv_lib_program_options_LDPATH
+BOOST_PROGRAM_OPTIONS_LIBS=$boost_cv_lib_program_options_LIBS
+CPPFLAGS=$boost_save_CPPFLAGS
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+fi
+
+
+
+
+# ==============
+# Werror support
+# ==============
+
+# NB: This must come at the end of all the other header detections, as enabling
+# it may cause some header detections to fail.
+
+# Check whether --enable-werror was given.
+if test ${enable_werror+y}
+then :
+ enableval=$enable_werror; enable_werror="$enableval"
+else $as_nop
+ enable_werror=no
+
+fi
+
+if test x"$enable_werror" = "xyes"
+then :
+
+ CXXFLAGS="$CXXFLAGS -Werror"
+
+fi
+
+ac_config_files="$ac_config_files Makefile libixion-$IXION_API_VERSION.pc:libixion.pc.in bin/env.sh doc_example/Makefile doc_example/section_examples/Makefile include/Makefile include/ixion/Makefile include/ixion/interface/Makefile misc/libixion.spec src/Makefile src/include/Makefile src/libixion/Makefile src/libixion/constants.inl src/python/Makefile src/test/Makefile"
+
+cat >confcache <<\_ACEOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs, see configure's option --config-cache.
+# It is not useful on other systems. If it contains results you don't
+# want to keep, you may remove or edit it.
+#
+# config.status only pays attention to the cache file if you give it
+# the --recheck option to rerun configure.
+#
+# `ac_cv_env_foo' variables (set or unset) will be overridden when
+# loading this file, other *unset* `ac_cv_foo' will be assigned the
+# following values.
+
+_ACEOF
+
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, we kill variables containing newlines.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+(
+ for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
+ eval ac_val=\$$ac_var
+ case $ac_val in #(
+ *${as_nl}*)
+ case $ac_var in #(
+ *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+ esac
+ case $ac_var in #(
+ _ | IFS | as_nl) ;; #(
+ BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
+ *) { eval $ac_var=; unset $ac_var;} ;;
+ esac ;;
+ esac
+ done
+
+ (set) 2>&1 |
+ case $as_nl`(ac_space=' '; set) 2>&1` in #(
+ *${as_nl}ac_space=\ *)
+ # `set' does not quote correctly, so add quotes: double-quote
+ # substitution turns \\\\ into \\, and sed turns \\ into \.
+ sed -n \
+ "s/'/'\\\\''/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
+ ;; #(
+ *)
+ # `set' quotes correctly as required by POSIX, so do not add quotes.
+ sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+ ;;
+ esac |
+ sort
+) |
+ sed '
+ /^ac_cv_env_/b end
+ t clear
+ :clear
+ s/^\([^=]*\)=\(.*[{}].*\)$/test ${\1+y} || &/
+ t end
+ s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+ :end' >>confcache
+if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
+ if test -w "$cache_file"; then
+ if test "x$cache_file" != "x/dev/null"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
+printf "%s\n" "$as_me: updating cache $cache_file" >&6;}
+ if test ! -f "$cache_file" || test -h "$cache_file"; then
+ cat confcache >"$cache_file"
+ else
+ case $cache_file in #(
+ */* | ?:*)
+ mv -f confcache "$cache_file"$$ &&
+ mv -f "$cache_file"$$ "$cache_file" ;; #(
+ *)
+ mv -f confcache "$cache_file" ;;
+ esac
+ fi
+ fi
+ else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
+printf "%s\n" "$as_me: not updating unwritable cache $cache_file" >&6;}
+ fi
+fi
+rm -f confcache
+
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+DEFS=-DHAVE_CONFIG_H
+
+ac_libobjs=
+ac_ltlibobjs=
+U=
+for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
+ # 1. Remove the extension, and $U if already installed.
+ ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
+ ac_i=`printf "%s\n" "$ac_i" | sed "$ac_script"`
+ # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
+ # will be set to the directory where LIBOBJS objects are built.
+ as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
+ as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
+done
+LIBOBJS=$ac_libobjs
+
+LTLIBOBJS=$ac_ltlibobjs
+
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5
+printf %s "checking that generated files are newer than configure... " >&6; }
+ if test -n "$am_sleep_pid"; then
+ # Hide warnings about reused PIDs.
+ wait $am_sleep_pid 2>/dev/null
+ fi
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: done" >&5
+printf "%s\n" "done" >&6; }
+ if test -n "$EXEEXT"; then
+ am__EXEEXT_TRUE=
+ am__EXEEXT_FALSE='#'
+else
+ am__EXEEXT_TRUE='#'
+ am__EXEEXT_FALSE=
+fi
+
+if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
+ as_fn_error $? "conditional \"AMDEP\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then
+ as_fn_error $? "conditional \"am__fastdepCXX\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then
+ as_fn_error $? "conditional \"am__fastdepCXX\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
+ as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${BUILD_PYTHON_TRUE}" && test -z "${BUILD_PYTHON_FALSE}"; then
+ as_fn_error $? "conditional \"BUILD_PYTHON\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${IXION_THREADS_TRUE}" && test -z "${IXION_THREADS_FALSE}"; then
+ as_fn_error $? "conditional \"IXION_THREADS\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${BUILD_VULKAN_TRUE}" && test -z "${BUILD_VULKAN_FALSE}"; then
+ as_fn_error $? "conditional \"BUILD_VULKAN\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${OSX_TRUE}" && test -z "${OSX_FALSE}"; then
+ as_fn_error $? "conditional \"OSX\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+
+: "${CONFIG_STATUS=./config.status}"
+ac_write_fail=0
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files $CONFIG_STATUS"
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
+printf "%s\n" "$as_me: creating $CONFIG_STATUS" >&6;}
+as_write_fail=0
+cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
+#! $SHELL
+# Generated by $as_me.
+# Run this file to recreate the current configuration.
+# Compiler output produced by configure, useful for debugging
+# configure, is in config.log if it exists.
+
+debug=false
+ac_cs_recheck=false
+ac_cs_silent=false
+
+SHELL=\${CONFIG_SHELL-$SHELL}
+export SHELL
+_ASEOF
+cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
+## -------------------- ##
+## M4sh Initialization. ##
+## -------------------- ##
+
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+as_nop=:
+if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
+then :
+ emulate sh
+ NULLCMD=:
+ # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else $as_nop
+ case `(set -o) 2>/dev/null` in #(
+ *posix*) :
+ set -o posix ;; #(
+ *) :
+ ;;
+esac
+fi
+
+
+
+# Reset variables that may have inherited troublesome values from
+# the environment.
+
+# IFS needs to be set, to space, tab, and newline, in precisely that order.
+# (If _AS_PATH_WALK were called with IFS unset, it would have the
+# side effect of setting IFS to empty, thus disabling word splitting.)
+# Quoting is to prevent editors from complaining about space-tab.
+as_nl='
+'
+export as_nl
+IFS=" "" $as_nl"
+
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# Ensure predictable behavior from utilities with locale-dependent output.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# We cannot yet rely on "unset" to work, but we need these variables
+# to be unset--not just set to an empty or harmless value--now, to
+# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct
+# also avoids known problems related to "unset" and subshell syntax
+# in other old shells (e.g. bash 2.01 and pdksh 5.2.14).
+for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH
+do eval test \${$as_var+y} \
+ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
+done
+
+# Ensure that fds 0, 1, and 2 are open.
+if (exec 3>&0) 2>/dev/null; then :; else exec 0</dev/null; fi
+if (exec 3>&1) 2>/dev/null; then :; else exec 1>/dev/null; fi
+if (exec 3>&2) ; then :; else exec 2>/dev/null; fi
+
+# The user is always right.
+if ${PATH_SEPARATOR+false} :; then
+ PATH_SEPARATOR=:
+ (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+ (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+ PATH_SEPARATOR=';'
+ }
+fi
+
+
+# Find who we are. Look in the path if we contain no directory separator.
+as_myself=
+case $0 in #((
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ test -r "$as_dir$0" && as_myself=$as_dir$0 && break
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+ as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+ printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+ exit 1
+fi
+
+
+
+# as_fn_error STATUS ERROR [LINENO LOG_FD]
+# ----------------------------------------
+# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
+# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
+# script with STATUS, using 1 if that was 0.
+as_fn_error ()
+{
+ as_status=$1; test $as_status -eq 0 && as_status=1
+ if test "$4"; then
+ as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
+ fi
+ printf "%s\n" "$as_me: error: $2" >&2
+ as_fn_exit $as_status
+} # as_fn_error
+
+
+
+# as_fn_set_status STATUS
+# -----------------------
+# Set $? to STATUS, without forking.
+as_fn_set_status ()
+{
+ return $1
+} # as_fn_set_status
+
+# as_fn_exit STATUS
+# -----------------
+# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
+as_fn_exit ()
+{
+ set +e
+ as_fn_set_status $1
+ exit $1
+} # as_fn_exit
+
+# as_fn_unset VAR
+# ---------------
+# Portably unset VAR.
+as_fn_unset ()
+{
+ { eval $1=; unset $1;}
+}
+as_unset=as_fn_unset
+
+# as_fn_append VAR VALUE
+# ----------------------
+# Append the text in VALUE to the end of the definition contained in VAR. Take
+# advantage of any shell optimizations that allow amortized linear growth over
+# repeated appends, instead of the typical quadratic growth present in naive
+# implementations.
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null
+then :
+ eval 'as_fn_append ()
+ {
+ eval $1+=\$2
+ }'
+else $as_nop
+ as_fn_append ()
+ {
+ eval $1=\$$1\$2
+ }
+fi # as_fn_append
+
+# as_fn_arith ARG...
+# ------------------
+# Perform arithmetic evaluation on the ARGs, and store the result in the
+# global $as_val. Take advantage of shells that can avoid forks. The arguments
+# must be portable across $(()) and expr.
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null
+then :
+ eval 'as_fn_arith ()
+ {
+ as_val=$(( $* ))
+ }'
+else $as_nop
+ as_fn_arith ()
+ {
+ as_val=`expr "$@" || test $? -eq 1`
+ }
+fi # as_fn_arith
+
+
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+ as_dirname=dirname
+else
+ as_dirname=false
+fi
+
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+printf "%s\n" X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+
+# Determine whether it's possible to make 'echo' print without a newline.
+# These variables are no longer used directly by Autoconf, but are AC_SUBSTed
+# for compatibility with existing Makefiles.
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in #(((((
+-n*)
+ case `echo 'xy\c'` in
+ *c*) ECHO_T=' ';; # ECHO_T is single tab character.
+ xy) ECHO_C='\c';;
+ *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
+ ECHO_T=' ';;
+ esac;;
+*)
+ ECHO_N='-n';;
+esac
+
+# For backward compatibility with old third-party macros, we provide
+# the shell variables $as_echo and $as_echo_n. New code should use
+# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively.
+as_echo='printf %s\n'
+as_echo_n='printf %s'
+
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+ rm -f conf$$.dir/conf$$.file
+else
+ rm -f conf$$.dir
+ mkdir conf$$.dir 2>/dev/null
+fi
+if (echo >conf$$.file) 2>/dev/null; then
+ if ln -s conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s='ln -s'
+ # ... but there are two gotchas:
+ # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+ # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+ # In both cases, we have to default to `cp -pR'.
+ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+ as_ln_s='cp -pR'
+ elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+ else
+ as_ln_s='cp -pR'
+ fi
+else
+ as_ln_s='cp -pR'
+fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+
+# as_fn_mkdir_p
+# -------------
+# Create "$as_dir" as a directory, including parents if necessary.
+as_fn_mkdir_p ()
+{
+
+ case $as_dir in #(
+ -*) as_dir=./$as_dir;;
+ esac
+ test -d "$as_dir" || eval $as_mkdir_p || {
+ as_dirs=
+ while :; do
+ case $as_dir in #(
+ *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+ *) as_qdir=$as_dir;;
+ esac
+ as_dirs="'$as_qdir' $as_dirs"
+ as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+printf "%s\n" X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ test -d "$as_dir" && break
+ done
+ test -z "$as_dirs" || eval "mkdir $as_dirs"
+ } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
+
+
+} # as_fn_mkdir_p
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p='mkdir -p "$as_dir"'
+else
+ test -d ./-p && rmdir ./-p
+ as_mkdir_p=false
+fi
+
+
+# as_fn_executable_p FILE
+# -----------------------
+# Test if FILE is an executable regular file.
+as_fn_executable_p ()
+{
+ test -f "$1" && test -x "$1"
+} # as_fn_executable_p
+as_test_x='test -x'
+as_executable_p=as_fn_executable_p
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+exec 6>&1
+## ----------------------------------- ##
+## Main body of $CONFIG_STATUS script. ##
+## ----------------------------------- ##
+_ASEOF
+test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# Save the log message, to keep $0 and so on meaningful, and to
+# report actual input values of CONFIG_FILES etc. instead of their
+# values after options handling.
+ac_log="
+This file was extended by libixion $as_me 0.19.0, which was
+generated by GNU Autoconf 2.71. Invocation command line was
+
+ CONFIG_FILES = $CONFIG_FILES
+ CONFIG_HEADERS = $CONFIG_HEADERS
+ CONFIG_LINKS = $CONFIG_LINKS
+ CONFIG_COMMANDS = $CONFIG_COMMANDS
+ $ $0 $@
+
+on `(hostname || uname -n) 2>/dev/null | sed 1q`
+"
+
+_ACEOF
+
+case $ac_config_files in *"
+"*) set x $ac_config_files; shift; ac_config_files=$*;;
+esac
+
+case $ac_config_headers in *"
+"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
+esac
+
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+# Files that config.status was made for.
+config_files="$ac_config_files"
+config_headers="$ac_config_headers"
+config_commands="$ac_config_commands"
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+ac_cs_usage="\
+\`$as_me' instantiates files and other configuration actions
+from templates according to the current configuration. Unless the files
+and actions are specified as TAGs, all are instantiated by default.
+
+Usage: $0 [OPTION]... [TAG]...
+
+ -h, --help print this help, then exit
+ -V, --version print version number and configuration settings, then exit
+ --config print configuration, then exit
+ -q, --quiet, --silent
+ do not print progress messages
+ -d, --debug don't remove temporary files
+ --recheck update $as_me by reconfiguring in the same conditions
+ --file=FILE[:TEMPLATE]
+ instantiate the configuration file FILE
+ --header=FILE[:TEMPLATE]
+ instantiate the configuration header FILE
+
+Configuration files:
+$config_files
+
+Configuration headers:
+$config_headers
+
+Configuration commands:
+$config_commands
+
+Report bugs to the package provider."
+
+_ACEOF
+ac_cs_config=`printf "%s\n" "$ac_configure_args" | sed "$ac_safe_unquote"`
+ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\''/g"`
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_cs_config='$ac_cs_config_escaped'
+ac_cs_version="\\
+libixion config.status 0.19.0
+configured by $0, generated by GNU Autoconf 2.71,
+ with options \\"\$ac_cs_config\\"
+
+Copyright (C) 2021 Free Software Foundation, Inc.
+This config.status script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it."
+
+ac_pwd='$ac_pwd'
+srcdir='$srcdir'
+INSTALL='$INSTALL'
+MKDIR_P='$MKDIR_P'
+AWK='$AWK'
+test -n "\$AWK" || AWK=awk
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# The default lists apply if the user does not specify any file.
+ac_need_defaults=:
+while test $# != 0
+do
+ case $1 in
+ --*=?*)
+ ac_option=`expr "X$1" : 'X\([^=]*\)='`
+ ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
+ ac_shift=:
+ ;;
+ --*=)
+ ac_option=`expr "X$1" : 'X\([^=]*\)='`
+ ac_optarg=
+ ac_shift=:
+ ;;
+ *)
+ ac_option=$1
+ ac_optarg=$2
+ ac_shift=shift
+ ;;
+ esac
+
+ case $ac_option in
+ # Handling of the options.
+ -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+ ac_cs_recheck=: ;;
+ --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
+ printf "%s\n" "$ac_cs_version"; exit ;;
+ --config | --confi | --conf | --con | --co | --c )
+ printf "%s\n" "$ac_cs_config"; exit ;;
+ --debug | --debu | --deb | --de | --d | -d )
+ debug=: ;;
+ --file | --fil | --fi | --f )
+ $ac_shift
+ case $ac_optarg in
+ *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ '') as_fn_error $? "missing file argument" ;;
+ esac
+ as_fn_append CONFIG_FILES " '$ac_optarg'"
+ ac_need_defaults=false;;
+ --header | --heade | --head | --hea )
+ $ac_shift
+ case $ac_optarg in
+ *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ as_fn_append CONFIG_HEADERS " '$ac_optarg'"
+ ac_need_defaults=false;;
+ --he | --h)
+ # Conflict between --help and --header
+ as_fn_error $? "ambiguous option: \`$1'
+Try \`$0 --help' for more information.";;
+ --help | --hel | -h )
+ printf "%s\n" "$ac_cs_usage"; exit ;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil | --si | --s)
+ ac_cs_silent=: ;;
+
+ # This is an error.
+ -*) as_fn_error $? "unrecognized option: \`$1'
+Try \`$0 --help' for more information." ;;
+
+ *) as_fn_append ac_config_targets " $1"
+ ac_need_defaults=false ;;
+
+ esac
+ shift
+done
+
+ac_configure_extra_args=
+
+if $ac_cs_silent; then
+ exec 6>/dev/null
+ ac_configure_extra_args="$ac_configure_extra_args --silent"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+if \$ac_cs_recheck; then
+ set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+ shift
+ \printf "%s\n" "running CONFIG_SHELL=$SHELL \$*" >&6
+ CONFIG_SHELL='$SHELL'
+ export CONFIG_SHELL
+ exec "\$@"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+exec 5>>config.log
+{
+ echo
+ sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+## Running $as_me. ##
+_ASBOX
+ printf "%s\n" "$ac_log"
+} >&5
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+#
+# INIT-COMMANDS
+#
+AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"
+
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+sed_quote_subst='$sed_quote_subst'
+double_quote_subst='$double_quote_subst'
+delay_variable_subst='$delay_variable_subst'
+macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`'
+macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`'
+AS='`$ECHO "$AS" | $SED "$delay_single_quote_subst"`'
+DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`'
+OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`'
+enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`'
+pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`'
+enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`'
+enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`'
+shared_archive_member_spec='`$ECHO "$shared_archive_member_spec" | $SED "$delay_single_quote_subst"`'
+SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`'
+ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`'
+PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`'
+host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`'
+host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`'
+host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`'
+build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`'
+build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`'
+build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`'
+SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`'
+Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`'
+GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`'
+EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`'
+FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`'
+LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`'
+NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`'
+LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`'
+max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`'
+ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`'
+exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`'
+lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`'
+lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`'
+lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`'
+lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`'
+lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`'
+reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`'
+reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`'
+deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`'
+file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`'
+file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`'
+want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`'
+sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`'
+AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`'
+AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`'
+archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`'
+STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`'
+RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`'
+old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`'
+old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`'
+old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`'
+lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`'
+CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`'
+CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`'
+compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`'
+GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`'
+lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`'
+lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`'
+lt_cv_sys_global_symbol_to_import='`$ECHO "$lt_cv_sys_global_symbol_to_import" | $SED "$delay_single_quote_subst"`'
+lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`'
+lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`'
+lt_cv_nm_interface='`$ECHO "$lt_cv_nm_interface" | $SED "$delay_single_quote_subst"`'
+nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`'
+lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`'
+lt_cv_truncate_bin='`$ECHO "$lt_cv_truncate_bin" | $SED "$delay_single_quote_subst"`'
+objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`'
+MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`'
+lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`'
+lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`'
+lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`'
+lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`'
+lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`'
+need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`'
+MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`'
+DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`'
+NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`'
+LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`'
+OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`'
+OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`'
+libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`'
+shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`'
+extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`'
+archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`'
+enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`'
+export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`'
+whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`'
+compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`'
+old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`'
+old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`'
+archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`'
+archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`'
+module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`'
+module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`'
+with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`'
+allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`'
+no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`'
+hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`'
+hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`'
+hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`'
+hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`'
+hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`'
+hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`'
+hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`'
+inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`'
+link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`'
+always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`'
+export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`'
+exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`'
+include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`'
+prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`'
+postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`'
+file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`'
+variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`'
+need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`'
+need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`'
+version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`'
+runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`'
+shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`'
+shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`'
+libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`'
+library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`'
+soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`'
+install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`'
+postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`'
+postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`'
+finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`'
+finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`'
+hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`'
+sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`'
+configure_time_dlsearch_path='`$ECHO "$configure_time_dlsearch_path" | $SED "$delay_single_quote_subst"`'
+configure_time_lt_sys_library_path='`$ECHO "$configure_time_lt_sys_library_path" | $SED "$delay_single_quote_subst"`'
+hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`'
+enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`'
+enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`'
+enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`'
+old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`'
+striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`'
+compiler_lib_search_dirs='`$ECHO "$compiler_lib_search_dirs" | $SED "$delay_single_quote_subst"`'
+predep_objects='`$ECHO "$predep_objects" | $SED "$delay_single_quote_subst"`'
+postdep_objects='`$ECHO "$postdep_objects" | $SED "$delay_single_quote_subst"`'
+predeps='`$ECHO "$predeps" | $SED "$delay_single_quote_subst"`'
+postdeps='`$ECHO "$postdeps" | $SED "$delay_single_quote_subst"`'
+compiler_lib_search_path='`$ECHO "$compiler_lib_search_path" | $SED "$delay_single_quote_subst"`'
+LD_CXX='`$ECHO "$LD_CXX" | $SED "$delay_single_quote_subst"`'
+reload_flag_CXX='`$ECHO "$reload_flag_CXX" | $SED "$delay_single_quote_subst"`'
+reload_cmds_CXX='`$ECHO "$reload_cmds_CXX" | $SED "$delay_single_quote_subst"`'
+old_archive_cmds_CXX='`$ECHO "$old_archive_cmds_CXX" | $SED "$delay_single_quote_subst"`'
+compiler_CXX='`$ECHO "$compiler_CXX" | $SED "$delay_single_quote_subst"`'
+GCC_CXX='`$ECHO "$GCC_CXX" | $SED "$delay_single_quote_subst"`'
+lt_prog_compiler_no_builtin_flag_CXX='`$ECHO "$lt_prog_compiler_no_builtin_flag_CXX" | $SED "$delay_single_quote_subst"`'
+lt_prog_compiler_pic_CXX='`$ECHO "$lt_prog_compiler_pic_CXX" | $SED "$delay_single_quote_subst"`'
+lt_prog_compiler_wl_CXX='`$ECHO "$lt_prog_compiler_wl_CXX" | $SED "$delay_single_quote_subst"`'
+lt_prog_compiler_static_CXX='`$ECHO "$lt_prog_compiler_static_CXX" | $SED "$delay_single_quote_subst"`'
+lt_cv_prog_compiler_c_o_CXX='`$ECHO "$lt_cv_prog_compiler_c_o_CXX" | $SED "$delay_single_quote_subst"`'
+archive_cmds_need_lc_CXX='`$ECHO "$archive_cmds_need_lc_CXX" | $SED "$delay_single_quote_subst"`'
+enable_shared_with_static_runtimes_CXX='`$ECHO "$enable_shared_with_static_runtimes_CXX" | $SED "$delay_single_quote_subst"`'
+export_dynamic_flag_spec_CXX='`$ECHO "$export_dynamic_flag_spec_CXX" | $SED "$delay_single_quote_subst"`'
+whole_archive_flag_spec_CXX='`$ECHO "$whole_archive_flag_spec_CXX" | $SED "$delay_single_quote_subst"`'
+compiler_needs_object_CXX='`$ECHO "$compiler_needs_object_CXX" | $SED "$delay_single_quote_subst"`'
+old_archive_from_new_cmds_CXX='`$ECHO "$old_archive_from_new_cmds_CXX" | $SED "$delay_single_quote_subst"`'
+old_archive_from_expsyms_cmds_CXX='`$ECHO "$old_archive_from_expsyms_cmds_CXX" | $SED "$delay_single_quote_subst"`'
+archive_cmds_CXX='`$ECHO "$archive_cmds_CXX" | $SED "$delay_single_quote_subst"`'
+archive_expsym_cmds_CXX='`$ECHO "$archive_expsym_cmds_CXX" | $SED "$delay_single_quote_subst"`'
+module_cmds_CXX='`$ECHO "$module_cmds_CXX" | $SED "$delay_single_quote_subst"`'
+module_expsym_cmds_CXX='`$ECHO "$module_expsym_cmds_CXX" | $SED "$delay_single_quote_subst"`'
+with_gnu_ld_CXX='`$ECHO "$with_gnu_ld_CXX" | $SED "$delay_single_quote_subst"`'
+allow_undefined_flag_CXX='`$ECHO "$allow_undefined_flag_CXX" | $SED "$delay_single_quote_subst"`'
+no_undefined_flag_CXX='`$ECHO "$no_undefined_flag_CXX" | $SED "$delay_single_quote_subst"`'
+hardcode_libdir_flag_spec_CXX='`$ECHO "$hardcode_libdir_flag_spec_CXX" | $SED "$delay_single_quote_subst"`'
+hardcode_libdir_separator_CXX='`$ECHO "$hardcode_libdir_separator_CXX" | $SED "$delay_single_quote_subst"`'
+hardcode_direct_CXX='`$ECHO "$hardcode_direct_CXX" | $SED "$delay_single_quote_subst"`'
+hardcode_direct_absolute_CXX='`$ECHO "$hardcode_direct_absolute_CXX" | $SED "$delay_single_quote_subst"`'
+hardcode_minus_L_CXX='`$ECHO "$hardcode_minus_L_CXX" | $SED "$delay_single_quote_subst"`'
+hardcode_shlibpath_var_CXX='`$ECHO "$hardcode_shlibpath_var_CXX" | $SED "$delay_single_quote_subst"`'
+hardcode_automatic_CXX='`$ECHO "$hardcode_automatic_CXX" | $SED "$delay_single_quote_subst"`'
+inherit_rpath_CXX='`$ECHO "$inherit_rpath_CXX" | $SED "$delay_single_quote_subst"`'
+link_all_deplibs_CXX='`$ECHO "$link_all_deplibs_CXX" | $SED "$delay_single_quote_subst"`'
+always_export_symbols_CXX='`$ECHO "$always_export_symbols_CXX" | $SED "$delay_single_quote_subst"`'
+export_symbols_cmds_CXX='`$ECHO "$export_symbols_cmds_CXX" | $SED "$delay_single_quote_subst"`'
+exclude_expsyms_CXX='`$ECHO "$exclude_expsyms_CXX" | $SED "$delay_single_quote_subst"`'
+include_expsyms_CXX='`$ECHO "$include_expsyms_CXX" | $SED "$delay_single_quote_subst"`'
+prelink_cmds_CXX='`$ECHO "$prelink_cmds_CXX" | $SED "$delay_single_quote_subst"`'
+postlink_cmds_CXX='`$ECHO "$postlink_cmds_CXX" | $SED "$delay_single_quote_subst"`'
+file_list_spec_CXX='`$ECHO "$file_list_spec_CXX" | $SED "$delay_single_quote_subst"`'
+hardcode_action_CXX='`$ECHO "$hardcode_action_CXX" | $SED "$delay_single_quote_subst"`'
+compiler_lib_search_dirs_CXX='`$ECHO "$compiler_lib_search_dirs_CXX" | $SED "$delay_single_quote_subst"`'
+predep_objects_CXX='`$ECHO "$predep_objects_CXX" | $SED "$delay_single_quote_subst"`'
+postdep_objects_CXX='`$ECHO "$postdep_objects_CXX" | $SED "$delay_single_quote_subst"`'
+predeps_CXX='`$ECHO "$predeps_CXX" | $SED "$delay_single_quote_subst"`'
+postdeps_CXX='`$ECHO "$postdeps_CXX" | $SED "$delay_single_quote_subst"`'
+compiler_lib_search_path_CXX='`$ECHO "$compiler_lib_search_path_CXX" | $SED "$delay_single_quote_subst"`'
+
+LTCC='$LTCC'
+LTCFLAGS='$LTCFLAGS'
+compiler='$compiler_DEFAULT'
+
+# A function that is used when there is no print builtin or printf.
+func_fallback_echo ()
+{
+ eval 'cat <<_LTECHO_EOF
+\$1
+_LTECHO_EOF'
+}
+
+# Quote evaled strings.
+for var in AS \
+DLLTOOL \
+OBJDUMP \
+SHELL \
+ECHO \
+PATH_SEPARATOR \
+SED \
+GREP \
+EGREP \
+FGREP \
+LD \
+NM \
+LN_S \
+lt_SP2NL \
+lt_NL2SP \
+reload_flag \
+deplibs_check_method \
+file_magic_cmd \
+file_magic_glob \
+want_nocaseglob \
+sharedlib_from_linklib_cmd \
+AR \
+AR_FLAGS \
+archiver_list_spec \
+STRIP \
+RANLIB \
+CC \
+CFLAGS \
+compiler \
+lt_cv_sys_global_symbol_pipe \
+lt_cv_sys_global_symbol_to_cdecl \
+lt_cv_sys_global_symbol_to_import \
+lt_cv_sys_global_symbol_to_c_name_address \
+lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \
+lt_cv_nm_interface \
+nm_file_list_spec \
+lt_cv_truncate_bin \
+lt_prog_compiler_no_builtin_flag \
+lt_prog_compiler_pic \
+lt_prog_compiler_wl \
+lt_prog_compiler_static \
+lt_cv_prog_compiler_c_o \
+need_locks \
+MANIFEST_TOOL \
+DSYMUTIL \
+NMEDIT \
+LIPO \
+OTOOL \
+OTOOL64 \
+shrext_cmds \
+export_dynamic_flag_spec \
+whole_archive_flag_spec \
+compiler_needs_object \
+with_gnu_ld \
+allow_undefined_flag \
+no_undefined_flag \
+hardcode_libdir_flag_spec \
+hardcode_libdir_separator \
+exclude_expsyms \
+include_expsyms \
+file_list_spec \
+variables_saved_for_relink \
+libname_spec \
+library_names_spec \
+soname_spec \
+install_override_mode \
+finish_eval \
+old_striplib \
+striplib \
+compiler_lib_search_dirs \
+predep_objects \
+postdep_objects \
+predeps \
+postdeps \
+compiler_lib_search_path \
+LD_CXX \
+reload_flag_CXX \
+compiler_CXX \
+lt_prog_compiler_no_builtin_flag_CXX \
+lt_prog_compiler_pic_CXX \
+lt_prog_compiler_wl_CXX \
+lt_prog_compiler_static_CXX \
+lt_cv_prog_compiler_c_o_CXX \
+export_dynamic_flag_spec_CXX \
+whole_archive_flag_spec_CXX \
+compiler_needs_object_CXX \
+with_gnu_ld_CXX \
+allow_undefined_flag_CXX \
+no_undefined_flag_CXX \
+hardcode_libdir_flag_spec_CXX \
+hardcode_libdir_separator_CXX \
+exclude_expsyms_CXX \
+include_expsyms_CXX \
+file_list_spec_CXX \
+compiler_lib_search_dirs_CXX \
+predep_objects_CXX \
+postdep_objects_CXX \
+predeps_CXX \
+postdeps_CXX \
+compiler_lib_search_path_CXX; do
+ case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
+ *[\\\\\\\`\\"\\\$]*)
+ eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
+ ;;
+ *)
+ eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
+ ;;
+ esac
+done
+
+# Double-quote double-evaled strings.
+for var in reload_cmds \
+old_postinstall_cmds \
+old_postuninstall_cmds \
+old_archive_cmds \
+extract_expsyms_cmds \
+old_archive_from_new_cmds \
+old_archive_from_expsyms_cmds \
+archive_cmds \
+archive_expsym_cmds \
+module_cmds \
+module_expsym_cmds \
+export_symbols_cmds \
+prelink_cmds \
+postlink_cmds \
+postinstall_cmds \
+postuninstall_cmds \
+finish_cmds \
+sys_lib_search_path_spec \
+configure_time_dlsearch_path \
+configure_time_lt_sys_library_path \
+reload_cmds_CXX \
+old_archive_cmds_CXX \
+old_archive_from_new_cmds_CXX \
+old_archive_from_expsyms_cmds_CXX \
+archive_cmds_CXX \
+archive_expsym_cmds_CXX \
+module_cmds_CXX \
+module_expsym_cmds_CXX \
+export_symbols_cmds_CXX \
+prelink_cmds_CXX \
+postlink_cmds_CXX; do
+ case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
+ *[\\\\\\\`\\"\\\$]*)
+ eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
+ ;;
+ *)
+ eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
+ ;;
+ esac
+done
+
+ac_aux_dir='$ac_aux_dir'
+
+# See if we are running on zsh, and set the options that allow our
+# commands through without removal of \ escapes INIT.
+if test -n "\${ZSH_VERSION+set}"; then
+ setopt NO_GLOB_SUBST
+fi
+
+
+ PACKAGE='$PACKAGE'
+ VERSION='$VERSION'
+ RM='$RM'
+ ofile='$ofile'
+
+
+
+
+
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+
+# Handling of arguments.
+for ac_config_target in $ac_config_targets
+do
+ case $ac_config_target in
+ "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
+ "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
+ "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
+ "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+ "libixion-$IXION_API_VERSION.pc") CONFIG_FILES="$CONFIG_FILES libixion-$IXION_API_VERSION.pc:libixion.pc.in" ;;
+ "bin/env.sh") CONFIG_FILES="$CONFIG_FILES bin/env.sh" ;;
+ "doc_example/Makefile") CONFIG_FILES="$CONFIG_FILES doc_example/Makefile" ;;
+ "doc_example/section_examples/Makefile") CONFIG_FILES="$CONFIG_FILES doc_example/section_examples/Makefile" ;;
+ "include/Makefile") CONFIG_FILES="$CONFIG_FILES include/Makefile" ;;
+ "include/ixion/Makefile") CONFIG_FILES="$CONFIG_FILES include/ixion/Makefile" ;;
+ "include/ixion/interface/Makefile") CONFIG_FILES="$CONFIG_FILES include/ixion/interface/Makefile" ;;
+ "misc/libixion.spec") CONFIG_FILES="$CONFIG_FILES misc/libixion.spec" ;;
+ "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
+ "src/include/Makefile") CONFIG_FILES="$CONFIG_FILES src/include/Makefile" ;;
+ "src/libixion/Makefile") CONFIG_FILES="$CONFIG_FILES src/libixion/Makefile" ;;
+ "src/libixion/constants.inl") CONFIG_FILES="$CONFIG_FILES src/libixion/constants.inl" ;;
+ "src/python/Makefile") CONFIG_FILES="$CONFIG_FILES src/python/Makefile" ;;
+ "src/test/Makefile") CONFIG_FILES="$CONFIG_FILES src/test/Makefile" ;;
+
+ *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
+ esac
+done
+
+
+# If the user did not use the arguments to specify the items to instantiate,
+# then the envvar interface is used. Set only those that are not.
+# We use the long form for the default assignment because of an extremely
+# bizarre bug on SunOS 4.1.3.
+if $ac_need_defaults; then
+ test ${CONFIG_FILES+y} || CONFIG_FILES=$config_files
+ test ${CONFIG_HEADERS+y} || CONFIG_HEADERS=$config_headers
+ test ${CONFIG_COMMANDS+y} || CONFIG_COMMANDS=$config_commands
+fi
+
+# Have a temporary directory for convenience. Make it in the build tree
+# simply because there is no reason against having it here, and in addition,
+# creating and moving files from /tmp can sometimes cause problems.
+# Hook for its removal unless debugging.
+# Note that there is a small window in which the directory will not be cleaned:
+# after its creation but before its name has been assigned to `$tmp'.
+$debug ||
+{
+ tmp= ac_tmp=
+ trap 'exit_status=$?
+ : "${ac_tmp:=$tmp}"
+ { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
+' 0
+ trap 'as_fn_exit 1' 1 2 13 15
+}
+# Create a (secure) tmp directory for tmp files.
+
+{
+ tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
+ test -d "$tmp"
+} ||
+{
+ tmp=./conf$$-$RANDOM
+ (umask 077 && mkdir "$tmp")
+} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
+ac_tmp=$tmp
+
+# Set up the scripts for CONFIG_FILES section.
+# No need to generate them if there are no CONFIG_FILES.
+# This happens for instance with `./config.status config.h'.
+if test -n "$CONFIG_FILES"; then
+
+
+ac_cr=`echo X | tr X '\015'`
+# On cygwin, bash can eat \r inside `` if the user requested igncr.
+# But we know of no other shell where ac_cr would be empty at this
+# point, so we can use a bashism as a fallback.
+if test "x$ac_cr" = x; then
+ eval ac_cr=\$\'\\r\'
+fi
+ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
+if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
+ ac_cs_awk_cr='\\r'
+else
+ ac_cs_awk_cr=$ac_cr
+fi
+
+echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
+_ACEOF
+
+
+{
+ echo "cat >conf$$subs.awk <<_ACEOF" &&
+ echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
+ echo "_ACEOF"
+} >conf$$subs.sh ||
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
+ac_delim='%!_!# '
+for ac_last_try in false false false false false :; do
+ . ./conf$$subs.sh ||
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+
+ ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
+ if test $ac_delim_n = $ac_delim_num; then
+ break
+ elif $ac_last_try; then
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+ else
+ ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+ fi
+done
+rm -f conf$$subs.sh
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
+_ACEOF
+sed -n '
+h
+s/^/S["/; s/!.*/"]=/
+p
+g
+s/^[^!]*!//
+:repl
+t repl
+s/'"$ac_delim"'$//
+t delim
+:nl
+h
+s/\(.\{148\}\)..*/\1/
+t more1
+s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
+p
+n
+b repl
+:more1
+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+p
+g
+s/.\{148\}//
+t nl
+:delim
+h
+s/\(.\{148\}\)..*/\1/
+t more2
+s/["\\]/\\&/g; s/^/"/; s/$/"/
+p
+b
+:more2
+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+p
+g
+s/.\{148\}//
+t delim
+' <conf$$subs.awk | sed '
+/^[^""]/{
+ N
+ s/\n//
+}
+' >>$CONFIG_STATUS || ac_write_fail=1
+rm -f conf$$subs.awk
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+_ACAWK
+cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
+ for (key in S) S_is_set[key] = 1
+ FS = ""
+
+}
+{
+ line = $ 0
+ nfields = split(line, field, "@")
+ substed = 0
+ len = length(field[1])
+ for (i = 2; i < nfields; i++) {
+ key = field[i]
+ keylen = length(key)
+ if (S_is_set[key]) {
+ value = S[key]
+ line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
+ len += length(value) + length(field[++i])
+ substed = 1
+ } else
+ len += 1 + keylen
+ }
+
+ print line
+}
+
+_ACAWK
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
+ sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
+else
+ cat
+fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
+ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
+_ACEOF
+
+# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
+# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
+# trailing colons and then remove the whole line if VPATH becomes empty
+# (actually we leave an empty line to preserve line numbers).
+if test "x$srcdir" = x.; then
+ ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
+h
+s///
+s/^/:/
+s/[ ]*$/:/
+s/:\$(srcdir):/:/g
+s/:\${srcdir}:/:/g
+s/:@srcdir@:/:/g
+s/^:*//
+s/:*$//
+x
+s/\(=[ ]*\).*/\1/
+G
+s/\n//
+s/^[^=]*=[ ]*$//
+}'
+fi
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+fi # test -n "$CONFIG_FILES"
+
+# Set up the scripts for CONFIG_HEADERS section.
+# No need to generate them if there are no CONFIG_HEADERS.
+# This happens for instance with `./config.status Makefile'.
+if test -n "$CONFIG_HEADERS"; then
+cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
+BEGIN {
+_ACEOF
+
+# Transform confdefs.h into an awk script `defines.awk', embedded as
+# here-document in config.status, that substitutes the proper values into
+# config.h.in to produce config.h.
+
+# Create a delimiter string that does not exist in confdefs.h, to ease
+# handling of long lines.
+ac_delim='%!_!# '
+for ac_last_try in false false :; do
+ ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
+ if test -z "$ac_tt"; then
+ break
+ elif $ac_last_try; then
+ as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
+ else
+ ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+ fi
+done
+
+# For the awk script, D is an array of macro values keyed by name,
+# likewise P contains macro parameters if any. Preserve backslash
+# newline sequences.
+
+ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
+sed -n '
+s/.\{148\}/&'"$ac_delim"'/g
+t rset
+:rset
+s/^[ ]*#[ ]*define[ ][ ]*/ /
+t def
+d
+:def
+s/\\$//
+t bsnl
+s/["\\]/\\&/g
+s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
+D["\1"]=" \3"/p
+s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
+d
+:bsnl
+s/["\\]/\\&/g
+s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
+D["\1"]=" \3\\\\\\n"\\/p
+t cont
+s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
+t cont
+d
+:cont
+n
+s/.\{148\}/&'"$ac_delim"'/g
+t clear
+:clear
+s/\\$//
+t bsnlc
+s/["\\]/\\&/g; s/^/"/; s/$/"/p
+d
+:bsnlc
+s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
+b cont
+' <confdefs.h | sed '
+s/'"$ac_delim"'/"\\\
+"/g' >>$CONFIG_STATUS || ac_write_fail=1
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ for (key in D) D_is_set[key] = 1
+ FS = ""
+}
+/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
+ line = \$ 0
+ split(line, arg, " ")
+ if (arg[1] == "#") {
+ defundef = arg[2]
+ mac1 = arg[3]
+ } else {
+ defundef = substr(arg[1], 2)
+ mac1 = arg[2]
+ }
+ split(mac1, mac2, "(") #)
+ macro = mac2[1]
+ prefix = substr(line, 1, index(line, defundef) - 1)
+ if (D_is_set[macro]) {
+ # Preserve the white space surrounding the "#".
+ print prefix "define", macro P[macro] D[macro]
+ next
+ } else {
+ # Replace #undef with comments. This is necessary, for example,
+ # in the case of _POSIX_SOURCE, which is predefined and required
+ # on some systems where configure will not decide to define it.
+ if (defundef == "undef") {
+ print "/*", prefix defundef, macro, "*/"
+ next
+ }
+ }
+}
+{ print }
+_ACAWK
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+ as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
+fi # test -n "$CONFIG_HEADERS"
+
+
+eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS"
+shift
+for ac_tag
+do
+ case $ac_tag in
+ :[FHLC]) ac_mode=$ac_tag; continue;;
+ esac
+ case $ac_mode$ac_tag in
+ :[FHL]*:*);;
+ :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
+ :[FH]-) ac_tag=-:-;;
+ :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
+ esac
+ ac_save_IFS=$IFS
+ IFS=:
+ set x $ac_tag
+ IFS=$ac_save_IFS
+ shift
+ ac_file=$1
+ shift
+
+ case $ac_mode in
+ :L) ac_source=$1;;
+ :[FH])
+ ac_file_inputs=
+ for ac_f
+ do
+ case $ac_f in
+ -) ac_f="$ac_tmp/stdin";;
+ *) # Look for the file first in the build tree, then in the source tree
+ # (if the path is not absolute). The absolute path cannot be DOS-style,
+ # because $ac_f cannot contain `:'.
+ test -f "$ac_f" ||
+ case $ac_f in
+ [\\/$]*) false;;
+ *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
+ esac ||
+ as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
+ esac
+ case $ac_f in *\'*) ac_f=`printf "%s\n" "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
+ as_fn_append ac_file_inputs " '$ac_f'"
+ done
+
+ # Let's still pretend it is `configure' which instantiates (i.e., don't
+ # use $as_me), people would be surprised to read:
+ # /* config.h. Generated by config.status. */
+ configure_input='Generated from '`
+ printf "%s\n" "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
+ `' by configure.'
+ if test x"$ac_file" != x-; then
+ configure_input="$ac_file. $configure_input"
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
+printf "%s\n" "$as_me: creating $ac_file" >&6;}
+ fi
+ # Neutralize special characters interpreted by sed in replacement strings.
+ case $configure_input in #(
+ *\&* | *\|* | *\\* )
+ ac_sed_conf_input=`printf "%s\n" "$configure_input" |
+ sed 's/[\\\\&|]/\\\\&/g'`;; #(
+ *) ac_sed_conf_input=$configure_input;;
+ esac
+
+ case $ac_tag in
+ *:-:* | *:-) cat >"$ac_tmp/stdin" \
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
+ esac
+ ;;
+ esac
+
+ ac_dir=`$as_dirname -- "$ac_file" ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$ac_file" : 'X\(//\)[^/]' \| \
+ X"$ac_file" : 'X\(//\)$' \| \
+ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
+printf "%s\n" X"$ac_file" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ as_dir="$ac_dir"; as_fn_mkdir_p
+ ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+ ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
+ # A ".." for each directory in $ac_dir_suffix.
+ ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+ case $ac_top_builddir_sub in
+ "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+ *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+ esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+ .) # We are building in place.
+ ac_srcdir=.
+ ac_top_srcdir=$ac_top_builddir_sub
+ ac_abs_top_srcdir=$ac_pwd ;;
+ [\\/]* | ?:[\\/]* ) # Absolute name.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir
+ ac_abs_top_srcdir=$srcdir ;;
+ *) # Relative name.
+ ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_build_prefix$srcdir
+ ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+
+ case $ac_mode in
+ :F)
+ #
+ # CONFIG_FILE
+ #
+
+ case $INSTALL in
+ [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
+ *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
+ esac
+ ac_MKDIR_P=$MKDIR_P
+ case $MKDIR_P in
+ [\\/$]* | ?:[\\/]* ) ;;
+ */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
+ esac
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# If the template does not know about datarootdir, expand it.
+# FIXME: This hack should be removed a few years after 2.60.
+ac_datarootdir_hack=; ac_datarootdir_seen=
+ac_sed_dataroot='
+/datarootdir/ {
+ p
+ q
+}
+/@datadir@/p
+/@docdir@/p
+/@infodir@/p
+/@localedir@/p
+/@mandir@/p'
+case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
+*datarootdir*) ac_datarootdir_seen=yes;;
+*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
+printf "%s\n" "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ ac_datarootdir_hack='
+ s&@datadir@&$datadir&g
+ s&@docdir@&$docdir&g
+ s&@infodir@&$infodir&g
+ s&@localedir@&$localedir&g
+ s&@mandir@&$mandir&g
+ s&\\\${datarootdir}&$datarootdir&g' ;;
+esac
+_ACEOF
+
+# Neutralize VPATH when `$srcdir' = `.'.
+# Shell code in configure.ac might set extrasub.
+# FIXME: do we really want to maintain this feature?
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_sed_extra="$ac_vpsub
+$extrasub
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+:t
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+s|@configure_input@|$ac_sed_conf_input|;t t
+s&@top_builddir@&$ac_top_builddir_sub&;t t
+s&@top_build_prefix@&$ac_top_build_prefix&;t t
+s&@srcdir@&$ac_srcdir&;t t
+s&@abs_srcdir@&$ac_abs_srcdir&;t t
+s&@top_srcdir@&$ac_top_srcdir&;t t
+s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
+s&@builddir@&$ac_builddir&;t t
+s&@abs_builddir@&$ac_abs_builddir&;t t
+s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
+s&@INSTALL@&$ac_INSTALL&;t t
+s&@MKDIR_P@&$ac_MKDIR_P&;t t
+$ac_datarootdir_hack
+"
+eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
+ >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+
+test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
+ { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
+ { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
+ "$ac_tmp/out"`; test -z "$ac_out"; } &&
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined. Please make sure it is defined" >&5
+printf "%s\n" "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined. Please make sure it is defined" >&2;}
+
+ rm -f "$ac_tmp/stdin"
+ case $ac_file in
+ -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
+ *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
+ esac \
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+ ;;
+ :H)
+ #
+ # CONFIG_HEADER
+ #
+ if test x"$ac_file" != x-; then
+ {
+ printf "%s\n" "/* $configure_input */" >&1 \
+ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
+ } >"$ac_tmp/config.h" \
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+ if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
+printf "%s\n" "$as_me: $ac_file is unchanged" >&6;}
+ else
+ rm -f "$ac_file"
+ mv "$ac_tmp/config.h" "$ac_file" \
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+ fi
+ else
+ printf "%s\n" "/* $configure_input */" >&1 \
+ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
+ || as_fn_error $? "could not create -" "$LINENO" 5
+ fi
+# Compute "$ac_file"'s index in $config_headers.
+_am_arg="$ac_file"
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+ case $_am_header in
+ $_am_arg | $_am_arg:* )
+ break ;;
+ * )
+ _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+ esac
+done
+echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
+$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$_am_arg" : 'X\(//\)[^/]' \| \
+ X"$_am_arg" : 'X\(//\)$' \| \
+ X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
+printf "%s\n" X"$_am_arg" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`/stamp-h$_am_stamp_count
+ ;;
+
+ :C) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
+printf "%s\n" "$as_me: executing $ac_file commands" >&6;}
+ ;;
+ esac
+
+
+ case $ac_file$ac_mode in
+ "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
+ # Older Autoconf quotes --file arguments for eval, but not when files
+ # are listed without --file. Let's play safe and only enable the eval
+ # if we detect the quoting.
+ # TODO: see whether this extra hack can be removed once we start
+ # requiring Autoconf 2.70 or later.
+ case $CONFIG_FILES in #(
+ *\'*) :
+ eval set x "$CONFIG_FILES" ;; #(
+ *) :
+ set x $CONFIG_FILES ;; #(
+ *) :
+ ;;
+esac
+ shift
+ # Used to flag and report bootstrapping failures.
+ am_rc=0
+ for am_mf
+ do
+ # Strip MF so we end up with the name of the file.
+ am_mf=`printf "%s\n" "$am_mf" | sed -e 's/:.*$//'`
+ # Check whether this is an Automake generated Makefile which includes
+ # dependency-tracking related rules and includes.
+ # Grep'ing the whole file directly is not great: AIX grep has a line
+ # limit of 2048, but all sed's we know have understand at least 4000.
+ sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \
+ || continue
+ am_dirpart=`$as_dirname -- "$am_mf" ||
+$as_expr X"$am_mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$am_mf" : 'X\(//\)[^/]' \| \
+ X"$am_mf" : 'X\(//\)$' \| \
+ X"$am_mf" : 'X\(/\)' \| . 2>/dev/null ||
+printf "%s\n" X"$am_mf" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ am_filepart=`$as_basename -- "$am_mf" ||
+$as_expr X/"$am_mf" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$am_mf" : 'X\(//\)$' \| \
+ X"$am_mf" : 'X\(/\)' \| . 2>/dev/null ||
+printf "%s\n" X/"$am_mf" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ { echo "$as_me:$LINENO: cd "$am_dirpart" \
+ && sed -e '/# am--include-marker/d' "$am_filepart" \
+ | $MAKE -f - am--depfiles" >&5
+ (cd "$am_dirpart" \
+ && sed -e '/# am--include-marker/d' "$am_filepart" \
+ | $MAKE -f - am--depfiles) >&5 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } || am_rc=$?
+ done
+ if test $am_rc -ne 0; then
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "Something went wrong bootstrapping makefile fragments
+ for automatic dependency tracking. If GNU make was not used, consider
+ re-running the configure script with MAKE=\"gmake\" (or whatever is
+ necessary). You can also try re-running configure with the
+ '--disable-dependency-tracking' option to at least be able to build
+ the package (albeit without support for automatic dependency tracking).
+See \`config.log' for more details" "$LINENO" 5; }
+ fi
+ { am_dirpart=; unset am_dirpart;}
+ { am_filepart=; unset am_filepart;}
+ { am_mf=; unset am_mf;}
+ { am_rc=; unset am_rc;}
+ rm -f conftest-deps.mk
+}
+ ;;
+ "libtool":C)
+
+ # See if we are running on zsh, and set the options that allow our
+ # commands through without removal of \ escapes.
+ if test -n "${ZSH_VERSION+set}"; then
+ setopt NO_GLOB_SUBST
+ fi
+
+ cfgfile=${ofile}T
+ trap "$RM \"$cfgfile\"; exit 1" 1 2 15
+ $RM "$cfgfile"
+
+ cat <<_LT_EOF >> "$cfgfile"
+#! $SHELL
+# Generated automatically by $as_me ($PACKAGE) $VERSION
+# NOTE: Changes made to this file will be lost: look at ltmain.sh.
+
+# Provide generalized library-building support services.
+# Written by Gordon Matzigkeit, 1996
+
+# Copyright (C) 2014 Free Software Foundation, Inc.
+# This is free software; see the source for copying conditions. There is NO
+# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+# GNU Libtool is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of of the License, or
+# (at your option) any later version.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program or library that is built
+# using GNU Libtool, you may include this file under the same
+# distribution terms that you use for the rest of that program.
+#
+# GNU Libtool is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+
+# The names of the tagged configurations supported by this script.
+available_tags='CXX '
+
+# Configured defaults for sys_lib_dlsearch_path munging.
+: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"}
+
+# ### BEGIN LIBTOOL CONFIG
+
+# Which release of libtool.m4 was used?
+macro_version=$macro_version
+macro_revision=$macro_revision
+
+# Assembler program.
+AS=$lt_AS
+
+# DLL creation program.
+DLLTOOL=$lt_DLLTOOL
+
+# Object dumper program.
+OBJDUMP=$lt_OBJDUMP
+
+# Whether or not to build static libraries.
+build_old_libs=$enable_static
+
+# What type of objects to build.
+pic_mode=$pic_mode
+
+# Whether or not to build shared libraries.
+build_libtool_libs=$enable_shared
+
+# Whether or not to optimize for fast installation.
+fast_install=$enable_fast_install
+
+# Shared archive member basename,for filename based shared library versioning on AIX.
+shared_archive_member_spec=$shared_archive_member_spec
+
+# Shell to use when invoking shell scripts.
+SHELL=$lt_SHELL
+
+# An echo program that protects backslashes.
+ECHO=$lt_ECHO
+
+# The PATH separator for the build system.
+PATH_SEPARATOR=$lt_PATH_SEPARATOR
+
+# The host system.
+host_alias=$host_alias
+host=$host
+host_os=$host_os
+
+# The build system.
+build_alias=$build_alias
+build=$build
+build_os=$build_os
+
+# A sed program that does not truncate output.
+SED=$lt_SED
+
+# Sed that helps us avoid accidentally triggering echo(1) options like -n.
+Xsed="\$SED -e 1s/^X//"
+
+# A grep program that handles long lines.
+GREP=$lt_GREP
+
+# An ERE matcher.
+EGREP=$lt_EGREP
+
+# A literal string matcher.
+FGREP=$lt_FGREP
+
+# A BSD- or MS-compatible name lister.
+NM=$lt_NM
+
+# Whether we need soft or hard links.
+LN_S=$lt_LN_S
+
+# What is the maximum length of a command?
+max_cmd_len=$max_cmd_len
+
+# Object file suffix (normally "o").
+objext=$ac_objext
+
+# Executable file suffix (normally "").
+exeext=$exeext
+
+# whether the shell understands "unset".
+lt_unset=$lt_unset
+
+# turn spaces into newlines.
+SP2NL=$lt_lt_SP2NL
+
+# turn newlines into spaces.
+NL2SP=$lt_lt_NL2SP
+
+# convert \$build file names to \$host format.
+to_host_file_cmd=$lt_cv_to_host_file_cmd
+
+# convert \$build files to toolchain format.
+to_tool_file_cmd=$lt_cv_to_tool_file_cmd
+
+# Method to check whether dependent libraries are shared objects.
+deplibs_check_method=$lt_deplibs_check_method
+
+# Command to use when deplibs_check_method = "file_magic".
+file_magic_cmd=$lt_file_magic_cmd
+
+# How to find potential files when deplibs_check_method = "file_magic".
+file_magic_glob=$lt_file_magic_glob
+
+# Find potential files using nocaseglob when deplibs_check_method = "file_magic".
+want_nocaseglob=$lt_want_nocaseglob
+
+# Command to associate shared and link libraries.
+sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd
+
+# The archiver.
+AR=$lt_AR
+
+# Flags to create an archive.
+AR_FLAGS=$lt_AR_FLAGS
+
+# How to feed a file listing to the archiver.
+archiver_list_spec=$lt_archiver_list_spec
+
+# A symbol stripping program.
+STRIP=$lt_STRIP
+
+# Commands used to install an old-style archive.
+RANLIB=$lt_RANLIB
+old_postinstall_cmds=$lt_old_postinstall_cmds
+old_postuninstall_cmds=$lt_old_postuninstall_cmds
+
+# Whether to use a lock for old archive extraction.
+lock_old_archive_extraction=$lock_old_archive_extraction
+
+# A C compiler.
+LTCC=$lt_CC
+
+# LTCC compiler flags.
+LTCFLAGS=$lt_CFLAGS
+
+# Take the output of nm and produce a listing of raw symbols and C names.
+global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
+
+# Transform the output of nm in a proper C declaration.
+global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
+
+# Transform the output of nm into a list of symbols to manually relocate.
+global_symbol_to_import=$lt_lt_cv_sys_global_symbol_to_import
+
+# Transform the output of nm in a C name address pair.
+global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
+
+# Transform the output of nm in a C name address pair when lib prefix is needed.
+global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix
+
+# The name lister interface.
+nm_interface=$lt_lt_cv_nm_interface
+
+# Specify filename containing input files for \$NM.
+nm_file_list_spec=$lt_nm_file_list_spec
+
+# The root where to search for dependent libraries,and where our libraries should be installed.
+lt_sysroot=$lt_sysroot
+
+# Command to truncate a binary pipe.
+lt_truncate_bin=$lt_lt_cv_truncate_bin
+
+# The name of the directory that contains temporary libtool files.
+objdir=$objdir
+
+# Used to examine libraries when file_magic_cmd begins with "file".
+MAGIC_CMD=$MAGIC_CMD
+
+# Must we lock files when doing compilation?
+need_locks=$lt_need_locks
+
+# Manifest tool.
+MANIFEST_TOOL=$lt_MANIFEST_TOOL
+
+# Tool to manipulate archived DWARF debug symbol files on Mac OS X.
+DSYMUTIL=$lt_DSYMUTIL
+
+# Tool to change global to local symbols on Mac OS X.
+NMEDIT=$lt_NMEDIT
+
+# Tool to manipulate fat objects and archives on Mac OS X.
+LIPO=$lt_LIPO
+
+# ldd/readelf like tool for Mach-O binaries on Mac OS X.
+OTOOL=$lt_OTOOL
+
+# ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4.
+OTOOL64=$lt_OTOOL64
+
+# Old archive suffix (normally "a").
+libext=$libext
+
+# Shared library suffix (normally ".so").
+shrext_cmds=$lt_shrext_cmds
+
+# The commands to extract the exported symbol list from a shared archive.
+extract_expsyms_cmds=$lt_extract_expsyms_cmds
+
+# Variables whose values should be saved in libtool wrapper scripts and
+# restored at link time.
+variables_saved_for_relink=$lt_variables_saved_for_relink
+
+# Do we need the "lib" prefix for modules?
+need_lib_prefix=$need_lib_prefix
+
+# Do we need a version for libraries?
+need_version=$need_version
+
+# Library versioning type.
+version_type=$version_type
+
+# Shared library runtime path variable.
+runpath_var=$runpath_var
+
+# Shared library path variable.
+shlibpath_var=$shlibpath_var
+
+# Is shlibpath searched before the hard-coded library search path?
+shlibpath_overrides_runpath=$shlibpath_overrides_runpath
+
+# Format of library name prefix.
+libname_spec=$lt_libname_spec
+
+# List of archive names. First name is the real one, the rest are links.
+# The last name is the one that the linker finds with -lNAME
+library_names_spec=$lt_library_names_spec
+
+# The coded name of the library, if different from the real name.
+soname_spec=$lt_soname_spec
+
+# Permission mode override for installation of shared libraries.
+install_override_mode=$lt_install_override_mode
+
+# Command to use after installation of a shared archive.
+postinstall_cmds=$lt_postinstall_cmds
+
+# Command to use after uninstallation of a shared archive.
+postuninstall_cmds=$lt_postuninstall_cmds
+
+# Commands used to finish a libtool library installation in a directory.
+finish_cmds=$lt_finish_cmds
+
+# As "finish_cmds", except a single script fragment to be evaled but
+# not shown.
+finish_eval=$lt_finish_eval
+
+# Whether we should hardcode library paths into libraries.
+hardcode_into_libs=$hardcode_into_libs
+
+# Compile-time system search path for libraries.
+sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
+
+# Detected run-time system search path for libraries.
+sys_lib_dlsearch_path_spec=$lt_configure_time_dlsearch_path
+
+# Explicit LT_SYS_LIBRARY_PATH set during ./configure time.
+configure_time_lt_sys_library_path=$lt_configure_time_lt_sys_library_path
+
+# Whether dlopen is supported.
+dlopen_support=$enable_dlopen
+
+# Whether dlopen of programs is supported.
+dlopen_self=$enable_dlopen_self
+
+# Whether dlopen of statically linked programs is supported.
+dlopen_self_static=$enable_dlopen_self_static
+
+# Commands to strip libraries.
+old_striplib=$lt_old_striplib
+striplib=$lt_striplib
+
+
+# The linker used to build libraries.
+LD=$lt_LD
+
+# How to create reloadable object files.
+reload_flag=$lt_reload_flag
+reload_cmds=$lt_reload_cmds
+
+# Commands used to build an old-style archive.
+old_archive_cmds=$lt_old_archive_cmds
+
+# A language specific compiler.
+CC=$lt_compiler
+
+# Is the compiler the GNU compiler?
+with_gcc=$GCC
+
+# Compiler flag to turn off builtin functions.
+no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
+
+# Additional compiler flags for building library objects.
+pic_flag=$lt_lt_prog_compiler_pic
+
+# How to pass a linker flag through the compiler.
+wl=$lt_lt_prog_compiler_wl
+
+# Compiler flag to prevent dynamic linking.
+link_static_flag=$lt_lt_prog_compiler_static
+
+# Does compiler simultaneously support -c and -o options?
+compiler_c_o=$lt_lt_cv_prog_compiler_c_o
+
+# Whether or not to add -lc for building shared libraries.
+build_libtool_need_lc=$archive_cmds_need_lc
+
+# Whether or not to disallow shared libs when runtime libs are static.
+allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes
+
+# Compiler flag to allow reflexive dlopens.
+export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
+
+# Compiler flag to generate shared objects directly from archives.
+whole_archive_flag_spec=$lt_whole_archive_flag_spec
+
+# Whether the compiler copes with passing no objects directly.
+compiler_needs_object=$lt_compiler_needs_object
+
+# Create an old-style archive from a shared archive.
+old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
+
+# Create a temporary old-style archive to link instead of a shared archive.
+old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
+
+# Commands used to build a shared archive.
+archive_cmds=$lt_archive_cmds
+archive_expsym_cmds=$lt_archive_expsym_cmds
+
+# Commands used to build a loadable module if different from building
+# a shared archive.
+module_cmds=$lt_module_cmds
+module_expsym_cmds=$lt_module_expsym_cmds
+
+# Whether we are building with GNU ld or not.
+with_gnu_ld=$lt_with_gnu_ld
+
+# Flag that allows shared libraries with undefined symbols to be built.
+allow_undefined_flag=$lt_allow_undefined_flag
+
+# Flag that enforces no undefined symbols.
+no_undefined_flag=$lt_no_undefined_flag
+
+# Flag to hardcode \$libdir into a binary during linking.
+# This must work even if \$libdir does not exist
+hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
+
+# Whether we need a single "-rpath" flag with a separated argument.
+hardcode_libdir_separator=$lt_hardcode_libdir_separator
+
+# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
+# DIR into the resulting binary.
+hardcode_direct=$hardcode_direct
+
+# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
+# DIR into the resulting binary and the resulting library dependency is
+# "absolute",i.e impossible to change by setting \$shlibpath_var if the
+# library is relocated.
+hardcode_direct_absolute=$hardcode_direct_absolute
+
+# Set to "yes" if using the -LDIR flag during linking hardcodes DIR
+# into the resulting binary.
+hardcode_minus_L=$hardcode_minus_L
+
+# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
+# into the resulting binary.
+hardcode_shlibpath_var=$hardcode_shlibpath_var
+
+# Set to "yes" if building a shared library automatically hardcodes DIR
+# into the library and all subsequent libraries and executables linked
+# against it.
+hardcode_automatic=$hardcode_automatic
+
+# Set to yes if linker adds runtime paths of dependent libraries
+# to runtime path list.
+inherit_rpath=$inherit_rpath
+
+# Whether libtool must link a program against all its dependency libraries.
+link_all_deplibs=$link_all_deplibs
+
+# Set to "yes" if exported symbols are required.
+always_export_symbols=$always_export_symbols
+
+# The commands to list exported symbols.
+export_symbols_cmds=$lt_export_symbols_cmds
+
+# Symbols that should not be listed in the preloaded symbols.
+exclude_expsyms=$lt_exclude_expsyms
+
+# Symbols that must always be exported.
+include_expsyms=$lt_include_expsyms
+
+# Commands necessary for linking programs (against libraries) with templates.
+prelink_cmds=$lt_prelink_cmds
+
+# Commands necessary for finishing linking programs.
+postlink_cmds=$lt_postlink_cmds
+
+# Specify filename containing input files.
+file_list_spec=$lt_file_list_spec
+
+# How to hardcode a shared library path into an executable.
+hardcode_action=$hardcode_action
+
+# The directories searched by this compiler when creating a shared library.
+compiler_lib_search_dirs=$lt_compiler_lib_search_dirs
+
+# Dependencies to place before and after the objects being linked to
+# create a shared library.
+predep_objects=$lt_predep_objects
+postdep_objects=$lt_postdep_objects
+predeps=$lt_predeps
+postdeps=$lt_postdeps
+
+# The library search path used internally by the compiler when linking
+# a shared library.
+compiler_lib_search_path=$lt_compiler_lib_search_path
+
+# ### END LIBTOOL CONFIG
+
+_LT_EOF
+
+ cat <<'_LT_EOF' >> "$cfgfile"
+
+# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE
+
+# func_munge_path_list VARIABLE PATH
+# -----------------------------------
+# VARIABLE is name of variable containing _space_ separated list of
+# directories to be munged by the contents of PATH, which is string
+# having a format:
+# "DIR[:DIR]:"
+# string "DIR[ DIR]" will be prepended to VARIABLE
+# ":DIR[:DIR]"
+# string "DIR[ DIR]" will be appended to VARIABLE
+# "DIRP[:DIRP]::[DIRA:]DIRA"
+# string "DIRP[ DIRP]" will be prepended to VARIABLE and string
+# "DIRA[ DIRA]" will be appended to VARIABLE
+# "DIR[:DIR]"
+# VARIABLE will be replaced by "DIR[ DIR]"
+func_munge_path_list ()
+{
+ case x$2 in
+ x)
+ ;;
+ *:)
+ eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\"
+ ;;
+ x:*)
+ eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\"
+ ;;
+ *::*)
+ eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
+ eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\"
+ ;;
+ *)
+ eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\"
+ ;;
+ esac
+}
+
+
+# Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
+func_cc_basename ()
+{
+ for cc_temp in $*""; do
+ case $cc_temp in
+ compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
+ distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
+ \-*) ;;
+ *) break;;
+ esac
+ done
+ func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
+}
+
+
+# ### END FUNCTIONS SHARED WITH CONFIGURE
+
+_LT_EOF
+
+ case $host_os in
+ aix3*)
+ cat <<\_LT_EOF >> "$cfgfile"
+# AIX sometimes has problems with the GCC collect2 program. For some
+# reason, if we set the COLLECT_NAMES environment variable, the problems
+# vanish in a puff of smoke.
+if test set != "${COLLECT_NAMES+set}"; then
+ COLLECT_NAMES=
+ export COLLECT_NAMES
+fi
+_LT_EOF
+ ;;
+ esac
+
+
+
+ltmain=$ac_aux_dir/ltmain.sh
+
+
+ # We use sed instead of cat because bash on DJGPP gets confused if
+ # if finds mixed CR/LF and LF-only lines. Since sed operates in
+ # text mode, it properly converts lines to CR/LF. This bash problem
+ # is reportedly fixed, but why not run on old versions too?
+ sed '$q' "$ltmain" >> "$cfgfile" \
+ || (rm -f "$cfgfile"; exit 1)
+
+ mv -f "$cfgfile" "$ofile" ||
+ (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
+ chmod +x "$ofile"
+
+
+ cat <<_LT_EOF >> "$ofile"
+
+# ### BEGIN LIBTOOL TAG CONFIG: CXX
+
+# The linker used to build libraries.
+LD=$lt_LD_CXX
+
+# How to create reloadable object files.
+reload_flag=$lt_reload_flag_CXX
+reload_cmds=$lt_reload_cmds_CXX
+
+# Commands used to build an old-style archive.
+old_archive_cmds=$lt_old_archive_cmds_CXX
+
+# A language specific compiler.
+CC=$lt_compiler_CXX
+
+# Is the compiler the GNU compiler?
+with_gcc=$GCC_CXX
+
+# Compiler flag to turn off builtin functions.
+no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX
+
+# Additional compiler flags for building library objects.
+pic_flag=$lt_lt_prog_compiler_pic_CXX
+
+# How to pass a linker flag through the compiler.
+wl=$lt_lt_prog_compiler_wl_CXX
+
+# Compiler flag to prevent dynamic linking.
+link_static_flag=$lt_lt_prog_compiler_static_CXX
+
+# Does compiler simultaneously support -c and -o options?
+compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX
+
+# Whether or not to add -lc for building shared libraries.
+build_libtool_need_lc=$archive_cmds_need_lc_CXX
+
+# Whether or not to disallow shared libs when runtime libs are static.
+allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX
+
+# Compiler flag to allow reflexive dlopens.
+export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX
+
+# Compiler flag to generate shared objects directly from archives.
+whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX
+
+# Whether the compiler copes with passing no objects directly.
+compiler_needs_object=$lt_compiler_needs_object_CXX
+
+# Create an old-style archive from a shared archive.
+old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX
+
+# Create a temporary old-style archive to link instead of a shared archive.
+old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX
+
+# Commands used to build a shared archive.
+archive_cmds=$lt_archive_cmds_CXX
+archive_expsym_cmds=$lt_archive_expsym_cmds_CXX
+
+# Commands used to build a loadable module if different from building
+# a shared archive.
+module_cmds=$lt_module_cmds_CXX
+module_expsym_cmds=$lt_module_expsym_cmds_CXX
+
+# Whether we are building with GNU ld or not.
+with_gnu_ld=$lt_with_gnu_ld_CXX
+
+# Flag that allows shared libraries with undefined symbols to be built.
+allow_undefined_flag=$lt_allow_undefined_flag_CXX
+
+# Flag that enforces no undefined symbols.
+no_undefined_flag=$lt_no_undefined_flag_CXX
+
+# Flag to hardcode \$libdir into a binary during linking.
+# This must work even if \$libdir does not exist
+hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX
+
+# Whether we need a single "-rpath" flag with a separated argument.
+hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX
+
+# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
+# DIR into the resulting binary.
+hardcode_direct=$hardcode_direct_CXX
+
+# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
+# DIR into the resulting binary and the resulting library dependency is
+# "absolute",i.e impossible to change by setting \$shlibpath_var if the
+# library is relocated.
+hardcode_direct_absolute=$hardcode_direct_absolute_CXX
+
+# Set to "yes" if using the -LDIR flag during linking hardcodes DIR
+# into the resulting binary.
+hardcode_minus_L=$hardcode_minus_L_CXX
+
+# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
+# into the resulting binary.
+hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX
+
+# Set to "yes" if building a shared library automatically hardcodes DIR
+# into the library and all subsequent libraries and executables linked
+# against it.
+hardcode_automatic=$hardcode_automatic_CXX
+
+# Set to yes if linker adds runtime paths of dependent libraries
+# to runtime path list.
+inherit_rpath=$inherit_rpath_CXX
+
+# Whether libtool must link a program against all its dependency libraries.
+link_all_deplibs=$link_all_deplibs_CXX
+
+# Set to "yes" if exported symbols are required.
+always_export_symbols=$always_export_symbols_CXX
+
+# The commands to list exported symbols.
+export_symbols_cmds=$lt_export_symbols_cmds_CXX
+
+# Symbols that should not be listed in the preloaded symbols.
+exclude_expsyms=$lt_exclude_expsyms_CXX
+
+# Symbols that must always be exported.
+include_expsyms=$lt_include_expsyms_CXX
+
+# Commands necessary for linking programs (against libraries) with templates.
+prelink_cmds=$lt_prelink_cmds_CXX
+
+# Commands necessary for finishing linking programs.
+postlink_cmds=$lt_postlink_cmds_CXX
+
+# Specify filename containing input files.
+file_list_spec=$lt_file_list_spec_CXX
+
+# How to hardcode a shared library path into an executable.
+hardcode_action=$hardcode_action_CXX
+
+# The directories searched by this compiler when creating a shared library.
+compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_CXX
+
+# Dependencies to place before and after the objects being linked to
+# create a shared library.
+predep_objects=$lt_predep_objects_CXX
+postdep_objects=$lt_postdep_objects_CXX
+predeps=$lt_predeps_CXX
+postdeps=$lt_postdeps_CXX
+
+# The library search path used internally by the compiler when linking
+# a shared library.
+compiler_lib_search_path=$lt_compiler_lib_search_path_CXX
+
+# ### END LIBTOOL TAG CONFIG: CXX
+_LT_EOF
+
+ ;;
+
+ esac
+done # for ac_tag
+
+
+as_fn_exit 0
+_ACEOF
+ac_clean_files=$ac_clean_files_save
+
+test $ac_write_fail = 0 ||
+ as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
+
+
+# configure is writing to config.log, and then calls config.status.
+# config.status does its own redirection, appending to config.log.
+# Unfortunately, on DOS this fails, as config.log is still kept open
+# by configure, so config.status won't be able to write to it; its
+# output is simply discarded. So we exec the FD to /dev/null,
+# effectively closing config.log, so it can be properly (re)opened and
+# appended to by config.status. When coming back to configure, we
+# need to make the FD available again.
+if test "$no_create" != yes; then
+ ac_cs_success=:
+ ac_config_status_args=
+ test "$silent" = yes &&
+ ac_config_status_args="$ac_config_status_args --quiet"
+ exec 5>/dev/null
+ $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
+ exec 5>>config.log
+ # Use ||, not &&, to avoid exiting from the if with $? = 1, which
+ # would make configure fail if this is the last instruction.
+ $ac_cs_success || as_fn_exit 1
+fi
+if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
+printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
+fi
+
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}:
+==============================================================================
+Build configuration:
+ debug-utils $enable_debug_utils
+ host os: $host_os
+ python: $enable_python
+ threads: $enable_threads
+ vulkan: $enable_vulkan
+ log (debug) $enable_log_debug
+ log (trace) $enable_log_trace
+==============================================================================
+" >&5
+printf "%s\n" "$as_me:
+==============================================================================
+Build configuration:
+ debug-utils $enable_debug_utils
+ host os: $host_os
+ python: $enable_python
+ threads: $enable_threads
+ vulkan: $enable_vulkan
+ log (debug) $enable_log_debug
+ log (trace) $enable_log_trace
+==============================================================================
+" >&6;}
+
diff --git a/configure.ac b/configure.ac
new file mode 100644
index 0000000..fa54eb2
--- /dev/null
+++ b/configure.ac
@@ -0,0 +1,223 @@
+# -*- Autoconf -*-
+# Process this file with autoconf to produce a configure script.
+
+m4_define([ixion_major_version], [0])
+m4_define([ixion_minor_version], [19])
+m4_define([ixion_micro_version], [0])
+
+m4_define([ixion_major_api_version], [0])
+m4_define([ixion_minor_api_version], [18])
+
+m4_define([ixion_version],
+ [ixion_major_version.ixion_minor_version.ixion_micro_version])
+
+m4_define([ixion_api_version],
+ [ixion_major_api_version.ixion_minor_api_version])
+
+
+AC_INIT([libixion],[ixion_version])
+AC_CONFIG_HEADERS([config.h])
+AM_INIT_AUTOMAKE([1.11 foreign dist-bzip2 dist-xz])
+m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
+AX_CXX_COMPILE_STDCXX_17([noext], [mandatory])
+CXXFLAGS="$CXXFLAGS -fvisibility=hidden -Wall -Wshadow -Wno-write-strings -pthread"
+
+AC_CANONICAL_HOST
+
+case $host_os in
+ darwin*)
+ _os=Darwin
+ LDFLAGS="$LDFLAGS -L/usr/local/lib"
+ ;;
+ *)
+ _os=
+ LDFLAGS="$LDFLAGS -Wl,--no-as-needed -pthread -ldl"
+ ;;
+esac
+
+# =====================
+# Development Utilities
+# =====================
+AC_ARG_ENABLE(debug-utils,
+ AS_HELP_STRING([--enable-debug-utils],[Build with extra checks useful during development.]),
+ [enable_debug_utils="$enableval"],
+ [enable_debug_utils=no]
+)
+
+AC_ARG_ENABLE([python],
+ [AS_HELP_STRING([--disable-python], [Disable python bindings])],
+ [enable_python="$enableval"],
+ [enable_python=yes]
+)
+
+AC_ARG_ENABLE([threads],
+ [AS_HELP_STRING([--disable-threads], [Disable threaded calculations])],
+ [enable_threads="$enableval"],
+ [enable_threads=yes]
+)
+
+AC_ARG_ENABLE([vulkan],
+ [AS_HELP_STRING([--enable-vulkan], [Enable vulkan compute engine])],
+ [enable_vulkan="$enableval"],
+ [enable_vulkan=no]
+)
+
+IXION_VERSION=ixion_version
+IXION_API_VERSION=ixion_api_version
+IXION_MAJOR_VERSION=ixion_major_version
+IXION_MINOR_VERSION=ixion_minor_version
+IXION_MICRO_VERSION=ixion_micro_version
+IXION_MAJOR_API_VERSION=ixion_major_api_version
+IXION_MINOR_API_VERSION=ixion_minor_api_version
+AC_SUBST(IXION_VERSION)
+AC_SUBST(IXION_API_VERSION)
+AC_SUBST(IXION_MAJOR_VERSION)
+AC_SUBST(IXION_MINOR_VERSION)
+AC_SUBST(IXION_MICRO_VERSION)
+AC_SUBST(IXION_MAJOR_API_VERSION)
+AC_SUBST(IXION_MINOR_API_VERSION)
+
+AC_CONFIG_MACRO_DIR([m4])
+
+m4_pattern_allow([^BOOST_])
+
+for top_builddir in . .. ../.. $ac_auxdir $ac_auxdir/..; do
+ test -f $top_builddir/configure && break
+done
+
+
+# Checks for programs.
+AC_PROG_CXX
+LT_INIT([win32-dll disable-static pic-only])
+AC_CANONICAL_HOST
+
+# Checks for libraries.
+
+# Checks for header files.
+AC_CHECK_HEADERS([stdlib.h sys/time.h unistd.h])
+
+# Checks for typedefs, structures, and compiler characteristics.
+AC_HEADER_STDBOOL
+AC_C_INLINE
+AC_TYPE_MODE_T
+AC_TYPE_SIZE_T
+
+# Checks for library functions.
+AC_FUNC_STRTOD
+
+AC_CHECK_SIZEOF([void *])
+CXXFLAGS="$CXXFLAGS -DSIZEOF_VOID_P=$ac_cv_sizeof_void_p"
+
+BOOST_REQUIRE([1.36])
+BOOST_FILESYSTEM
+
+# =====
+# Debug
+# =====
+AC_ARG_ENABLE(debug,
+ AS_HELP_STRING([--enable-debug], [Build with debug features in mind.])],
+ [enable_debug="$enableval"],
+ [enable_debug=no]
+)
+AS_IF([test "x$enable_debug" != "xno"], [
+ CXXFLAGS="$CXXFLAGS -g -O0"
+], [
+ CXXFLAGS="$CXXFLAGS -O2"
+ AC_DEFINE([NDEBUG], [], [Disable debugging information])
+])
+
+PKG_CHECK_MODULES([MDDS],[mdds-2.1 >= 2.0.99])
+
+AC_ARG_ENABLE(log-debug,
+ AS_HELP_STRING([--enable-log-debug], [Enable debug outputs.])],
+ [enable_log_debug="$enableval"],
+ [enable_log_debug=no ]
+)
+
+AS_IF([test "x$enable_log_debug" != "xno"], [
+ CXXFLAGS="$CXXFLAGS -DIXION_DEBUG_ON"
+],)
+
+AC_ARG_ENABLE(log-trace,
+ AS_HELP_STRING([--enable-log-trace], [Enable trace outputs.])],
+ [enable_log_trace="$enableval"],
+ [enable_log_trace=no]
+)
+
+AS_IF([test "x$enable_log_trace" != "xno"], [
+ CXXFLAGS="$CXXFLAGS -DIXION_TRACE_ON"
+],)
+
+# Check for python.
+AS_IF([test "x$enable_python" != "xno"], [
+ AM_PATH_PYTHON(3)
+ PKG_CHECK_MODULES([PYTHON], [python3 >= 3.4])
+])
+
+AS_IF([test "x$enable_threads" != "xno"], [
+ CXXFLAGS="$CXXFLAGS -DIXION_THREADS=1"
+], [
+ CXXFLAGS="$CXXFLAGS -DIXION_THREADS=0"
+])
+
+AS_IF([test "x$enable_debug_utils" != "xno"], [
+ CXXFLAGS="$CXXFLAGS -DIXION_DEBUG_UTILS"
+])
+
+AS_IF([test "x$enable_vulkan" != "xno"], [
+ PKG_CHECK_MODULES([VULKAN],[vulkan >= 1.2.0])
+])
+
+AM_CONDITIONAL([BUILD_PYTHON], [test "x$enable_python" != "xno"])
+AM_CONDITIONAL([IXION_THREADS], [test "x$enable_threads" != "xno"])
+AM_CONDITIONAL([BUILD_VULKAN], [test "x$enable_vulkan" != "xno"])
+AM_CONDITIONAL([OSX], [test "x$_os" = "xDarwin"])
+
+BOOST_PROGRAM_OPTIONS
+
+# ==============
+# Werror support
+# ==============
+
+# NB: This must come at the end of all the other header detections, as enabling
+# it may cause some header detections to fail.
+
+AC_ARG_ENABLE([werror],
+ [AS_HELP_STRING([--enable-werror], [Treat all warnings as errors, useful for development])],
+ [enable_werror="$enableval"],
+ [enable_werror=no]
+)
+AS_IF([test x"$enable_werror" = "xyes"], [
+ CXXFLAGS="$CXXFLAGS -Werror"
+])
+
+AC_CONFIG_FILES([Makefile
+ libixion-$IXION_API_VERSION.pc:libixion.pc.in
+ bin/env.sh
+ doc_example/Makefile
+ doc_example/section_examples/Makefile
+ include/Makefile
+ include/ixion/Makefile
+ include/ixion/interface/Makefile
+ misc/libixion.spec
+ src/Makefile
+ src/include/Makefile
+ src/libixion/Makefile
+ src/libixion/constants.inl
+ src/python/Makefile
+ src/test/Makefile
+])
+AC_OUTPUT
+
+AC_MSG_NOTICE([
+==============================================================================
+Build configuration:
+ debug-utils $enable_debug_utils
+ host os: $host_os
+ python: $enable_python
+ threads: $enable_threads
+ vulkan: $enable_vulkan
+ log (debug) $enable_log_debug
+ log (trace) $enable_log_trace
+==============================================================================
+])
diff --git a/depcomp b/depcomp
new file mode 100755
index 0000000..715e343
--- /dev/null
+++ b/depcomp
@@ -0,0 +1,791 @@
+#! /bin/sh
+# depcomp - compile a program generating dependencies as side-effects
+
+scriptversion=2018-03-07.03; # UTC
+
+# Copyright (C) 1999-2021 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
+
+case $1 in
+ '')
+ echo "$0: No command. Try '$0 --help' for more information." 1>&2
+ exit 1;
+ ;;
+ -h | --h*)
+ cat <<\EOF
+Usage: depcomp [--help] [--version] PROGRAM [ARGS]
+
+Run PROGRAMS ARGS to compile a file, generating dependencies
+as side-effects.
+
+Environment variables:
+ depmode Dependency tracking mode.
+ source Source file read by 'PROGRAMS ARGS'.
+ object Object file output by 'PROGRAMS ARGS'.
+ DEPDIR directory where to store dependencies.
+ depfile Dependency file to output.
+ tmpdepfile Temporary file to use when outputting dependencies.
+ libtool Whether libtool is used (yes/no).
+
+Report bugs to <bug-automake@gnu.org>.
+EOF
+ exit $?
+ ;;
+ -v | --v*)
+ echo "depcomp $scriptversion"
+ exit $?
+ ;;
+esac
+
+# Get the directory component of the given path, and save it in the
+# global variables '$dir'. Note that this directory component will
+# be either empty or ending with a '/' character. This is deliberate.
+set_dir_from ()
+{
+ case $1 in
+ */*) dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`;;
+ *) dir=;;
+ esac
+}
+
+# Get the suffix-stripped basename of the given path, and save it the
+# global variable '$base'.
+set_base_from ()
+{
+ base=`echo "$1" | sed -e 's|^.*/||' -e 's/\.[^.]*$//'`
+}
+
+# If no dependency file was actually created by the compiler invocation,
+# we still have to create a dummy depfile, to avoid errors with the
+# Makefile "include basename.Plo" scheme.
+make_dummy_depfile ()
+{
+ echo "#dummy" > "$depfile"
+}
+
+# Factor out some common post-processing of the generated depfile.
+# Requires the auxiliary global variable '$tmpdepfile' to be set.
+aix_post_process_depfile ()
+{
+ # If the compiler actually managed to produce a dependency file,
+ # post-process it.
+ if test -f "$tmpdepfile"; then
+ # Each line is of the form 'foo.o: dependency.h'.
+ # Do two passes, one to just change these to
+ # $object: dependency.h
+ # and one to simply output
+ # dependency.h:
+ # which is needed to avoid the deleted-header problem.
+ { sed -e "s,^.*\.[$lower]*:,$object:," < "$tmpdepfile"
+ sed -e "s,^.*\.[$lower]*:[$tab ]*,," -e 's,$,:,' < "$tmpdepfile"
+ } > "$depfile"
+ rm -f "$tmpdepfile"
+ else
+ make_dummy_depfile
+ fi
+}
+
+# A tabulation character.
+tab=' '
+# A newline character.
+nl='
+'
+# Character ranges might be problematic outside the C locale.
+# These definitions help.
+upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ
+lower=abcdefghijklmnopqrstuvwxyz
+digits=0123456789
+alpha=${upper}${lower}
+
+if test -z "$depmode" || test -z "$source" || test -z "$object"; then
+ echo "depcomp: Variables source, object and depmode must be set" 1>&2
+ exit 1
+fi
+
+# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po.
+depfile=${depfile-`echo "$object" |
+ sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`}
+tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
+
+rm -f "$tmpdepfile"
+
+# Avoid interferences from the environment.
+gccflag= dashmflag=
+
+# Some modes work just like other modes, but use different flags. We
+# parameterize here, but still list the modes in the big case below,
+# to make depend.m4 easier to write. Note that we *cannot* use a case
+# here, because this file can only contain one case statement.
+if test "$depmode" = hp; then
+ # HP compiler uses -M and no extra arg.
+ gccflag=-M
+ depmode=gcc
+fi
+
+if test "$depmode" = dashXmstdout; then
+ # This is just like dashmstdout with a different argument.
+ dashmflag=-xM
+ depmode=dashmstdout
+fi
+
+cygpath_u="cygpath -u -f -"
+if test "$depmode" = msvcmsys; then
+ # This is just like msvisualcpp but w/o cygpath translation.
+ # Just convert the backslash-escaped backslashes to single forward
+ # slashes to satisfy depend.m4
+ cygpath_u='sed s,\\\\,/,g'
+ depmode=msvisualcpp
+fi
+
+if test "$depmode" = msvc7msys; then
+ # This is just like msvc7 but w/o cygpath translation.
+ # Just convert the backslash-escaped backslashes to single forward
+ # slashes to satisfy depend.m4
+ cygpath_u='sed s,\\\\,/,g'
+ depmode=msvc7
+fi
+
+if test "$depmode" = xlc; then
+ # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information.
+ gccflag=-qmakedep=gcc,-MF
+ depmode=gcc
+fi
+
+case "$depmode" in
+gcc3)
+## gcc 3 implements dependency tracking that does exactly what
+## we want. Yay! Note: for some reason libtool 1.4 doesn't like
+## it if -MD -MP comes after the -MF stuff. Hmm.
+## Unfortunately, FreeBSD c89 acceptance of flags depends upon
+## the command line argument order; so add the flags where they
+## appear in depend2.am. Note that the slowdown incurred here
+## affects only configure: in makefiles, %FASTDEP% shortcuts this.
+ for arg
+ do
+ case $arg in
+ -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;;
+ *) set fnord "$@" "$arg" ;;
+ esac
+ shift # fnord
+ shift # $arg
+ done
+ "$@"
+ stat=$?
+ if test $stat -ne 0; then
+ rm -f "$tmpdepfile"
+ exit $stat
+ fi
+ mv "$tmpdepfile" "$depfile"
+ ;;
+
+gcc)
+## Note that this doesn't just cater to obsosete pre-3.x GCC compilers.
+## but also to in-use compilers like IMB xlc/xlC and the HP C compiler.
+## (see the conditional assignment to $gccflag above).
+## There are various ways to get dependency output from gcc. Here's
+## why we pick this rather obscure method:
+## - Don't want to use -MD because we'd like the dependencies to end
+## up in a subdir. Having to rename by hand is ugly.
+## (We might end up doing this anyway to support other compilers.)
+## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
+## -MM, not -M (despite what the docs say). Also, it might not be
+## supported by the other compilers which use the 'gcc' depmode.
+## - Using -M directly means running the compiler twice (even worse
+## than renaming).
+ if test -z "$gccflag"; then
+ gccflag=-MD,
+ fi
+ "$@" -Wp,"$gccflag$tmpdepfile"
+ stat=$?
+ if test $stat -ne 0; then
+ rm -f "$tmpdepfile"
+ exit $stat
+ fi
+ rm -f "$depfile"
+ echo "$object : \\" > "$depfile"
+ # The second -e expression handles DOS-style file names with drive
+ # letters.
+ sed -e 's/^[^:]*: / /' \
+ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
+## This next piece of magic avoids the "deleted header file" problem.
+## The problem is that when a header file which appears in a .P file
+## is deleted, the dependency causes make to die (because there is
+## typically no way to rebuild the header). We avoid this by adding
+## dummy dependencies for each header file. Too bad gcc doesn't do
+## this for us directly.
+## Some versions of gcc put a space before the ':'. On the theory
+## that the space means something, we add a space to the output as
+## well. hp depmode also adds that space, but also prefixes the VPATH
+## to the object. Take care to not repeat it in the output.
+## Some versions of the HPUX 10.20 sed can't process this invocation
+## correctly. Breaking it into two sed invocations is a workaround.
+ tr ' ' "$nl" < "$tmpdepfile" \
+ | sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \
+ | sed -e 's/$/ :/' >> "$depfile"
+ rm -f "$tmpdepfile"
+ ;;
+
+hp)
+ # This case exists only to let depend.m4 do its work. It works by
+ # looking at the text of this script. This case will never be run,
+ # since it is checked for above.
+ exit 1
+ ;;
+
+sgi)
+ if test "$libtool" = yes; then
+ "$@" "-Wp,-MDupdate,$tmpdepfile"
+ else
+ "$@" -MDupdate "$tmpdepfile"
+ fi
+ stat=$?
+ if test $stat -ne 0; then
+ rm -f "$tmpdepfile"
+ exit $stat
+ fi
+ rm -f "$depfile"
+
+ if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files
+ echo "$object : \\" > "$depfile"
+ # Clip off the initial element (the dependent). Don't try to be
+ # clever and replace this with sed code, as IRIX sed won't handle
+ # lines with more than a fixed number of characters (4096 in
+ # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines;
+ # the IRIX cc adds comments like '#:fec' to the end of the
+ # dependency line.
+ tr ' ' "$nl" < "$tmpdepfile" \
+ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' \
+ | tr "$nl" ' ' >> "$depfile"
+ echo >> "$depfile"
+ # The second pass generates a dummy entry for each header file.
+ tr ' ' "$nl" < "$tmpdepfile" \
+ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
+ >> "$depfile"
+ else
+ make_dummy_depfile
+ fi
+ rm -f "$tmpdepfile"
+ ;;
+
+xlc)
+ # This case exists only to let depend.m4 do its work. It works by
+ # looking at the text of this script. This case will never be run,
+ # since it is checked for above.
+ exit 1
+ ;;
+
+aix)
+ # The C for AIX Compiler uses -M and outputs the dependencies
+ # in a .u file. In older versions, this file always lives in the
+ # current directory. Also, the AIX compiler puts '$object:' at the
+ # start of each line; $object doesn't have directory information.
+ # Version 6 uses the directory in both cases.
+ set_dir_from "$object"
+ set_base_from "$object"
+ if test "$libtool" = yes; then
+ tmpdepfile1=$dir$base.u
+ tmpdepfile2=$base.u
+ tmpdepfile3=$dir.libs/$base.u
+ "$@" -Wc,-M
+ else
+ tmpdepfile1=$dir$base.u
+ tmpdepfile2=$dir$base.u
+ tmpdepfile3=$dir$base.u
+ "$@" -M
+ fi
+ stat=$?
+ if test $stat -ne 0; then
+ rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
+ exit $stat
+ fi
+
+ for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
+ do
+ test -f "$tmpdepfile" && break
+ done
+ aix_post_process_depfile
+ ;;
+
+tcc)
+ # tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26
+ # FIXME: That version still under development at the moment of writing.
+ # Make that this statement remains true also for stable, released
+ # versions.
+ # It will wrap lines (doesn't matter whether long or short) with a
+ # trailing '\', as in:
+ #
+ # foo.o : \
+ # foo.c \
+ # foo.h \
+ #
+ # It will put a trailing '\' even on the last line, and will use leading
+ # spaces rather than leading tabs (at least since its commit 0394caf7
+ # "Emit spaces for -MD").
+ "$@" -MD -MF "$tmpdepfile"
+ stat=$?
+ if test $stat -ne 0; then
+ rm -f "$tmpdepfile"
+ exit $stat
+ fi
+ rm -f "$depfile"
+ # Each non-empty line is of the form 'foo.o : \' or ' dep.h \'.
+ # We have to change lines of the first kind to '$object: \'.
+ sed -e "s|.*:|$object :|" < "$tmpdepfile" > "$depfile"
+ # And for each line of the second kind, we have to emit a 'dep.h:'
+ # dummy dependency, to avoid the deleted-header problem.
+ sed -n -e 's|^ *\(.*\) *\\$|\1:|p' < "$tmpdepfile" >> "$depfile"
+ rm -f "$tmpdepfile"
+ ;;
+
+## The order of this option in the case statement is important, since the
+## shell code in configure will try each of these formats in the order
+## listed in this file. A plain '-MD' option would be understood by many
+## compilers, so we must ensure this comes after the gcc and icc options.
+pgcc)
+ # Portland's C compiler understands '-MD'.
+ # Will always output deps to 'file.d' where file is the root name of the
+ # source file under compilation, even if file resides in a subdirectory.
+ # The object file name does not affect the name of the '.d' file.
+ # pgcc 10.2 will output
+ # foo.o: sub/foo.c sub/foo.h
+ # and will wrap long lines using '\' :
+ # foo.o: sub/foo.c ... \
+ # sub/foo.h ... \
+ # ...
+ set_dir_from "$object"
+ # Use the source, not the object, to determine the base name, since
+ # that's sadly what pgcc will do too.
+ set_base_from "$source"
+ tmpdepfile=$base.d
+
+ # For projects that build the same source file twice into different object
+ # files, the pgcc approach of using the *source* file root name can cause
+ # problems in parallel builds. Use a locking strategy to avoid stomping on
+ # the same $tmpdepfile.
+ lockdir=$base.d-lock
+ trap "
+ echo '$0: caught signal, cleaning up...' >&2
+ rmdir '$lockdir'
+ exit 1
+ " 1 2 13 15
+ numtries=100
+ i=$numtries
+ while test $i -gt 0; do
+ # mkdir is a portable test-and-set.
+ if mkdir "$lockdir" 2>/dev/null; then
+ # This process acquired the lock.
+ "$@" -MD
+ stat=$?
+ # Release the lock.
+ rmdir "$lockdir"
+ break
+ else
+ # If the lock is being held by a different process, wait
+ # until the winning process is done or we timeout.
+ while test -d "$lockdir" && test $i -gt 0; do
+ sleep 1
+ i=`expr $i - 1`
+ done
+ fi
+ i=`expr $i - 1`
+ done
+ trap - 1 2 13 15
+ if test $i -le 0; then
+ echo "$0: failed to acquire lock after $numtries attempts" >&2
+ echo "$0: check lockdir '$lockdir'" >&2
+ exit 1
+ fi
+
+ if test $stat -ne 0; then
+ rm -f "$tmpdepfile"
+ exit $stat
+ fi
+ rm -f "$depfile"
+ # Each line is of the form `foo.o: dependent.h',
+ # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
+ # Do two passes, one to just change these to
+ # `$object: dependent.h' and one to simply `dependent.h:'.
+ sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
+ # Some versions of the HPUX 10.20 sed can't process this invocation
+ # correctly. Breaking it into two sed invocations is a workaround.
+ sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" \
+ | sed -e 's/$/ :/' >> "$depfile"
+ rm -f "$tmpdepfile"
+ ;;
+
+hp2)
+ # The "hp" stanza above does not work with aCC (C++) and HP's ia64
+ # compilers, which have integrated preprocessors. The correct option
+ # to use with these is +Maked; it writes dependencies to a file named
+ # 'foo.d', which lands next to the object file, wherever that
+ # happens to be.
+ # Much of this is similar to the tru64 case; see comments there.
+ set_dir_from "$object"
+ set_base_from "$object"
+ if test "$libtool" = yes; then
+ tmpdepfile1=$dir$base.d
+ tmpdepfile2=$dir.libs/$base.d
+ "$@" -Wc,+Maked
+ else
+ tmpdepfile1=$dir$base.d
+ tmpdepfile2=$dir$base.d
+ "$@" +Maked
+ fi
+ stat=$?
+ if test $stat -ne 0; then
+ rm -f "$tmpdepfile1" "$tmpdepfile2"
+ exit $stat
+ fi
+
+ for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2"
+ do
+ test -f "$tmpdepfile" && break
+ done
+ if test -f "$tmpdepfile"; then
+ sed -e "s,^.*\.[$lower]*:,$object:," "$tmpdepfile" > "$depfile"
+ # Add 'dependent.h:' lines.
+ sed -ne '2,${
+ s/^ *//
+ s/ \\*$//
+ s/$/:/
+ p
+ }' "$tmpdepfile" >> "$depfile"
+ else
+ make_dummy_depfile
+ fi
+ rm -f "$tmpdepfile" "$tmpdepfile2"
+ ;;
+
+tru64)
+ # The Tru64 compiler uses -MD to generate dependencies as a side
+ # effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'.
+ # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
+ # dependencies in 'foo.d' instead, so we check for that too.
+ # Subdirectories are respected.
+ set_dir_from "$object"
+ set_base_from "$object"
+
+ if test "$libtool" = yes; then
+ # Libtool generates 2 separate objects for the 2 libraries. These
+ # two compilations output dependencies in $dir.libs/$base.o.d and
+ # in $dir$base.o.d. We have to check for both files, because
+ # one of the two compilations can be disabled. We should prefer
+ # $dir$base.o.d over $dir.libs/$base.o.d because the latter is
+ # automatically cleaned when .libs/ is deleted, while ignoring
+ # the former would cause a distcleancheck panic.
+ tmpdepfile1=$dir$base.o.d # libtool 1.5
+ tmpdepfile2=$dir.libs/$base.o.d # Likewise.
+ tmpdepfile3=$dir.libs/$base.d # Compaq CCC V6.2-504
+ "$@" -Wc,-MD
+ else
+ tmpdepfile1=$dir$base.d
+ tmpdepfile2=$dir$base.d
+ tmpdepfile3=$dir$base.d
+ "$@" -MD
+ fi
+
+ stat=$?
+ if test $stat -ne 0; then
+ rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
+ exit $stat
+ fi
+
+ for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
+ do
+ test -f "$tmpdepfile" && break
+ done
+ # Same post-processing that is required for AIX mode.
+ aix_post_process_depfile
+ ;;
+
+msvc7)
+ if test "$libtool" = yes; then
+ showIncludes=-Wc,-showIncludes
+ else
+ showIncludes=-showIncludes
+ fi
+ "$@" $showIncludes > "$tmpdepfile"
+ stat=$?
+ grep -v '^Note: including file: ' "$tmpdepfile"
+ if test $stat -ne 0; then
+ rm -f "$tmpdepfile"
+ exit $stat
+ fi
+ rm -f "$depfile"
+ echo "$object : \\" > "$depfile"
+ # The first sed program below extracts the file names and escapes
+ # backslashes for cygpath. The second sed program outputs the file
+ # name when reading, but also accumulates all include files in the
+ # hold buffer in order to output them again at the end. This only
+ # works with sed implementations that can handle large buffers.
+ sed < "$tmpdepfile" -n '
+/^Note: including file: *\(.*\)/ {
+ s//\1/
+ s/\\/\\\\/g
+ p
+}' | $cygpath_u | sort -u | sed -n '
+s/ /\\ /g
+s/\(.*\)/'"$tab"'\1 \\/p
+s/.\(.*\) \\/\1:/
+H
+$ {
+ s/.*/'"$tab"'/
+ G
+ p
+}' >> "$depfile"
+ echo >> "$depfile" # make sure the fragment doesn't end with a backslash
+ rm -f "$tmpdepfile"
+ ;;
+
+msvc7msys)
+ # This case exists only to let depend.m4 do its work. It works by
+ # looking at the text of this script. This case will never be run,
+ # since it is checked for above.
+ exit 1
+ ;;
+
+#nosideeffect)
+ # This comment above is used by automake to tell side-effect
+ # dependency tracking mechanisms from slower ones.
+
+dashmstdout)
+ # Important note: in order to support this mode, a compiler *must*
+ # always write the preprocessed file to stdout, regardless of -o.
+ "$@" || exit $?
+
+ # Remove the call to Libtool.
+ if test "$libtool" = yes; then
+ while test "X$1" != 'X--mode=compile'; do
+ shift
+ done
+ shift
+ fi
+
+ # Remove '-o $object'.
+ IFS=" "
+ for arg
+ do
+ case $arg in
+ -o)
+ shift
+ ;;
+ $object)
+ shift
+ ;;
+ *)
+ set fnord "$@" "$arg"
+ shift # fnord
+ shift # $arg
+ ;;
+ esac
+ done
+
+ test -z "$dashmflag" && dashmflag=-M
+ # Require at least two characters before searching for ':'
+ # in the target name. This is to cope with DOS-style filenames:
+ # a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise.
+ "$@" $dashmflag |
+ sed "s|^[$tab ]*[^:$tab ][^:][^:]*:[$tab ]*|$object: |" > "$tmpdepfile"
+ rm -f "$depfile"
+ cat < "$tmpdepfile" > "$depfile"
+ # Some versions of the HPUX 10.20 sed can't process this sed invocation
+ # correctly. Breaking it into two sed invocations is a workaround.
+ tr ' ' "$nl" < "$tmpdepfile" \
+ | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \
+ | sed -e 's/$/ :/' >> "$depfile"
+ rm -f "$tmpdepfile"
+ ;;
+
+dashXmstdout)
+ # This case only exists to satisfy depend.m4. It is never actually
+ # run, as this mode is specially recognized in the preamble.
+ exit 1
+ ;;
+
+makedepend)
+ "$@" || exit $?
+ # Remove any Libtool call
+ if test "$libtool" = yes; then
+ while test "X$1" != 'X--mode=compile'; do
+ shift
+ done
+ shift
+ fi
+ # X makedepend
+ shift
+ cleared=no eat=no
+ for arg
+ do
+ case $cleared in
+ no)
+ set ""; shift
+ cleared=yes ;;
+ esac
+ if test $eat = yes; then
+ eat=no
+ continue
+ fi
+ case "$arg" in
+ -D*|-I*)
+ set fnord "$@" "$arg"; shift ;;
+ # Strip any option that makedepend may not understand. Remove
+ # the object too, otherwise makedepend will parse it as a source file.
+ -arch)
+ eat=yes ;;
+ -*|$object)
+ ;;
+ *)
+ set fnord "$@" "$arg"; shift ;;
+ esac
+ done
+ obj_suffix=`echo "$object" | sed 's/^.*\././'`
+ touch "$tmpdepfile"
+ ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
+ rm -f "$depfile"
+ # makedepend may prepend the VPATH from the source file name to the object.
+ # No need to regex-escape $object, excess matching of '.' is harmless.
+ sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile"
+ # Some versions of the HPUX 10.20 sed can't process the last invocation
+ # correctly. Breaking it into two sed invocations is a workaround.
+ sed '1,2d' "$tmpdepfile" \
+ | tr ' ' "$nl" \
+ | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \
+ | sed -e 's/$/ :/' >> "$depfile"
+ rm -f "$tmpdepfile" "$tmpdepfile".bak
+ ;;
+
+cpp)
+ # Important note: in order to support this mode, a compiler *must*
+ # always write the preprocessed file to stdout.
+ "$@" || exit $?
+
+ # Remove the call to Libtool.
+ if test "$libtool" = yes; then
+ while test "X$1" != 'X--mode=compile'; do
+ shift
+ done
+ shift
+ fi
+
+ # Remove '-o $object'.
+ IFS=" "
+ for arg
+ do
+ case $arg in
+ -o)
+ shift
+ ;;
+ $object)
+ shift
+ ;;
+ *)
+ set fnord "$@" "$arg"
+ shift # fnord
+ shift # $arg
+ ;;
+ esac
+ done
+
+ "$@" -E \
+ | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
+ -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
+ | sed '$ s: \\$::' > "$tmpdepfile"
+ rm -f "$depfile"
+ echo "$object : \\" > "$depfile"
+ cat < "$tmpdepfile" >> "$depfile"
+ sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
+ rm -f "$tmpdepfile"
+ ;;
+
+msvisualcpp)
+ # Important note: in order to support this mode, a compiler *must*
+ # always write the preprocessed file to stdout.
+ "$@" || exit $?
+
+ # Remove the call to Libtool.
+ if test "$libtool" = yes; then
+ while test "X$1" != 'X--mode=compile'; do
+ shift
+ done
+ shift
+ fi
+
+ IFS=" "
+ for arg
+ do
+ case "$arg" in
+ -o)
+ shift
+ ;;
+ $object)
+ shift
+ ;;
+ "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
+ set fnord "$@"
+ shift
+ shift
+ ;;
+ *)
+ set fnord "$@" "$arg"
+ shift
+ shift
+ ;;
+ esac
+ done
+ "$@" -E 2>/dev/null |
+ sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile"
+ rm -f "$depfile"
+ echo "$object : \\" > "$depfile"
+ sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile"
+ echo "$tab" >> "$depfile"
+ sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile"
+ rm -f "$tmpdepfile"
+ ;;
+
+msvcmsys)
+ # This case exists only to let depend.m4 do its work. It works by
+ # looking at the text of this script. This case will never be run,
+ # since it is checked for above.
+ exit 1
+ ;;
+
+none)
+ exec "$@"
+ ;;
+
+*)
+ echo "Unknown depmode $depmode" 1>&2
+ exit 1
+ ;;
+esac
+
+exit 0
+
+# Local Variables:
+# mode: shell-script
+# sh-indentation: 2
+# eval: (add-hook 'before-save-hook 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-time-zone: "UTC0"
+# time-stamp-end: "; # UTC"
+# End:
diff --git a/doc/conf.py b/doc/conf.py
new file mode 100644
index 0000000..594d322
--- /dev/null
+++ b/doc/conf.py
@@ -0,0 +1,271 @@
+#!/usr/bin/env python3
+# -*- coding: utf-8 -*-
+#
+# ixion documentation build configuration file, created by
+# sphinx-quickstart on Tue Sep 22 20:54:14 2015.
+#
+# This file is execfile()d with the current directory set to its
+# containing dir.
+#
+# Note that not all possible configuration values are present in this
+# autogenerated file.
+#
+# All configuration values have a default; values that are commented out
+# serve to show the default.
+
+import sys
+import os
+import subprocess
+
+rtd_build = os.environ.get('READTHEDOCS', None) == 'True'
+
+if rtd_build:
+ subprocess.call("doxygen --version; doxygen doxygen.conf", shell=True)
+
+# If extensions (or modules to document with autodoc) are in another directory,
+# add these directories to sys.path here. If the directory is relative to the
+# documentation root, use os.path.abspath to make it absolute, like shown here.
+#sys.path.insert(0, os.path.abspath('.'))
+
+# -- General configuration ------------------------------------------------
+
+# If your documentation needs a minimal Sphinx version, state it here.
+#needs_sphinx = '1.0'
+
+# Add any Sphinx extension module names here, as strings. They can be
+# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
+# ones.
+extensions = ['breathe']
+
+# Add any paths that contain templates here, relative to this directory.
+templates_path = ['_templates']
+
+# The suffix of source filenames.
+source_suffix = '.rst'
+
+# The encoding of source files.
+#source_encoding = 'utf-8-sig'
+
+# The master toctree document.
+master_doc = 'index'
+
+# General information about the project.
+project = 'Ixion'
+copyright = '2021, Kohei Yoshida'
+
+# The version info for the project you're documenting, acts as replacement for
+# |version| and |release|, also used in various other places throughout the
+# built documents.
+#
+# The short X.Y version.
+version = '0.19'
+# The full version, including alpha/beta/rc tags.
+release = '0.19.0'
+
+# The language for content autogenerated by Sphinx. Refer to documentation
+# for a list of supported languages.
+#language = None
+
+# There are two options for replacing |today|: either, you set today to some
+# non-false value, then it is used:
+#today = ''
+# Else, today_fmt is used as the format for a strftime call.
+#today_fmt = '%B %d, %Y'
+
+# List of patterns, relative to source directory, that match files and
+# directories to ignore when looking for source files.
+exclude_patterns = ['_build']
+
+# The reST default role (used for this markup: `text`) to use for all
+# documents.
+#default_role = None
+
+# If true, '()' will be appended to :func: etc. cross-reference text.
+#add_function_parentheses = True
+
+# If true, the current module name will be prepended to all description
+# unit titles (such as .. function::).
+#add_module_names = True
+
+# If true, sectionauthor and moduleauthor directives will be shown in the
+# output. They are ignored by default.
+#show_authors = False
+
+# The name of the Pygments (syntax highlighting) style to use.
+pygments_style = 'sphinx'
+
+# A list of ignored prefixes for module index sorting.
+#modindex_common_prefix = []
+
+# If true, keep warnings as "system message" paragraphs in the built documents.
+#keep_warnings = False
+
+
+# -- Options for HTML output ----------------------------------------------
+
+# The theme to use for HTML and HTML Help pages. See the documentation for
+# a list of builtin themes.
+html_theme = 'sphinx_rtd_theme'
+
+# Theme options are theme-specific and customize the look and feel of a theme
+# further. For a list of options available for each theme, see the
+# documentation.
+html_theme_options = {}
+
+# Add any paths that contain custom themes here, relative to this directory.
+#html_theme_path = []
+
+# The name for this set of Sphinx documents. If None, it defaults to
+# "<project> v<release> documentation".
+#html_title = None
+
+# A shorter title for the navigation bar. Default is the same as html_title.
+#html_short_title = None
+
+# The name of an image file (relative to this directory) to place at the top
+# of the sidebar.
+#html_logo = None
+
+# The name of an image file (within the static path) to use as favicon of the
+# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
+# pixels large.
+#html_favicon = None
+
+# Add any paths that contain custom static files (such as style sheets) here,
+# relative to this directory. They are copied after the builtin static files,
+# so a file named "default.css" will overwrite the builtin "default.css".
+html_static_path = ['_static']
+
+# Add any extra paths that contain custom files (such as robots.txt or
+# .htaccess) here, relative to this directory. These files are copied
+# directly to the root of the documentation.
+#html_extra_path = []
+
+# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
+# using the given strftime format.
+#html_last_updated_fmt = '%b %d, %Y'
+
+# If true, SmartyPants will be used to convert quotes and dashes to
+# typographically correct entities.
+#html_use_smartypants = True
+
+# Custom sidebar templates, maps document names to template names.
+#html_sidebars = {}
+
+# Additional templates that should be rendered to pages, maps page names to
+# template names.
+#html_additional_pages = {}
+
+# If false, no module index is generated.
+#html_domain_indices = True
+
+# If false, no index is generated.
+#html_use_index = True
+
+# If true, the index is split into individual pages for each letter.
+#html_split_index = False
+
+# If true, links to the reST sources are added to the pages.
+#html_show_sourcelink = True
+
+# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
+#html_show_sphinx = True
+
+# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
+#html_show_copyright = True
+
+# If true, an OpenSearch description file will be output, and all pages will
+# contain a <link> tag referring to it. The value of this option must be the
+# base URL from which the finished HTML is served.
+#html_use_opensearch = ''
+
+# This is the file name suffix for HTML files (e.g. ".xhtml").
+#html_file_suffix = None
+
+# Output file base name for HTML help builder.
+htmlhelp_basename = 'ixiondoc'
+
+
+# -- Options for LaTeX output ---------------------------------------------
+
+latex_elements = {
+# The paper size ('letterpaper' or 'a4paper').
+#'papersize': 'letterpaper',
+
+# The font size ('10pt', '11pt' or '12pt').
+#'pointsize': '10pt',
+
+# Additional stuff for the LaTeX preamble.
+#'preamble': '',
+}
+
+# Grouping the document tree into LaTeX files. List of tuples
+# (source start file, target name, title,
+# author, documentclass [howto, manual, or own class]).
+latex_documents = [
+ ('index', 'ixion.tex', 'Ixion Documentation',
+ 'Kohei Yoshida', 'manual'),
+]
+
+# The name of an image file (relative to this directory) to place at the top of
+# the title page.
+#latex_logo = None
+
+# For "manual" documents, if this is true, then toplevel headings are parts,
+# not chapters.
+#latex_use_parts = False
+
+# If true, show page references after internal links.
+#latex_show_pagerefs = False
+
+# If true, show URL addresses after external links.
+#latex_show_urls = False
+
+# Documents to append as an appendix to all manuals.
+#latex_appendices = []
+
+# If false, no module index is generated.
+#latex_domain_indices = True
+
+
+# -- Options for manual page output ---------------------------------------
+
+# One entry per manual page. List of tuples
+# (source start file, name, description, authors, manual section).
+man_pages = [
+ ('index', 'ixion', 'Ixion Documentation',
+ ['Kohei Yoshida'], 1)
+]
+
+# If true, show URL addresses after external links.
+#man_show_urls = False
+
+
+# -- Options for Texinfo output -------------------------------------------
+
+# Grouping the document tree into Texinfo files. List of tuples
+# (source start file, target name, title, author,
+# dir menu entry, description, category)
+texinfo_documents = [
+ ('index', 'ixion', 'Ixion Documentation',
+ 'Kohei Yoshida', 'Ixion', 'One line description of project.',
+ 'Miscellaneous'),
+]
+
+# Documents to append as an appendix to all manuals.
+#texinfo_appendices = []
+
+# If false, no module index is generated.
+#texinfo_domain_indices = True
+
+# How to display URL addresses: 'footnote', 'no', or 'inline'.
+#texinfo_show_urls = 'footnote'
+
+# If true, do not generate a @detailmenu in the "Top" node's menu.
+#texinfo_no_detailmenu = False
+
+breathe_projects = {"ixion": "./_doxygen/xml"}
+
+breathe_default_project = "ixion"
+
+breathe_default_members = ('members', 'undoc-members')
diff --git a/doc/cpp/data_store/cell_access.rst b/doc/cpp/data_store/cell_access.rst
new file mode 100644
index 0000000..a63a14f
--- /dev/null
+++ b/doc/cpp/data_store/cell_access.rst
@@ -0,0 +1,79 @@
+
+.. highlight:: cpp
+
+Cell Access
+===========
+
+Examples
+--------
+
+You can obtain a :cpp:class:`~ixion::cell_access` instance either from
+:cpp:class:`~ixion::model_context` or :cpp:class:`~ixion::document` class.
+
+Here is an example of how to obtain it from a :cpp:class:`~ixion::model_context` instance::
+
+ ixion::model_context cxt;
+ cxt.append_sheet("Sheet");
+
+ // fill this model context
+
+ ixion::abs_address_t A1(0, 0, 0);
+ ixion::cell_access ca = cxt.get_cell_access(A1);
+
+
+Here is an example of how to obtain it from a :cpp:class:`~ixion::document` instance::
+
+ ixion::document doc;
+ doc.append_sheet("Sheet");
+
+ // fill this document
+
+ ixion::cell_access ca = doc.get_cell_access("A1");
+
+
+Once you have your :cpp:class:`~ixion::cell_access` instance, you can, for instance,
+print the value of the cell as follows::
+
+ switch (ca.get_value_type())
+ {
+ case ixion::cell_value_t::numeric:
+ {
+ double v = ca.get_numeric_value();
+ cout << "numeric value: " << v << endl;
+ break;
+ }
+ case ixion::cell_value_t::string:
+ {
+ std::string_view s = ca.get_string_value();
+ cout << "string value: " << s << endl;
+ break;
+ }
+ case ixion::cell_value_t::boolean:
+ {
+ cout << "boolean value: " << ca.get_boolean_value() << endl;
+ break;
+ }
+ case ixion::cell_value_t::error:
+ {
+ ixion::formula_error_t err = ca.get_error_value();
+ cout << "error value: " << ixion::get_formula_error_name(err) << endl;
+ break;
+ }
+ case ixion::cell_value_t::empty:
+ {
+ cout << "empty cell" << endl;
+ break;
+ }
+ default:
+ cout << "???" << endl;
+ }
+
+The complete source code of this example is avaiable
+`here <https://gitlab.com/ixion/ixion/-/blob/master/doc_example/section_examples/cell_access.cpp>`_.
+
+
+API Reference
+-------------
+
+.. doxygenclass:: ixion::cell_access
+ :members:
diff --git a/doc/cpp/data_store/dirty_cell_tracker.rst b/doc/cpp/data_store/dirty_cell_tracker.rst
new file mode 100644
index 0000000..bf4e20a
--- /dev/null
+++ b/doc/cpp/data_store/dirty_cell_tracker.rst
@@ -0,0 +1,8 @@
+
+.. highlight:: cpp
+
+Dirty Cell Tracker
+==================
+
+.. doxygenclass:: ixion::dirty_cell_tracker
+ :members:
diff --git a/doc/cpp/data_store/document.rst b/doc/cpp/data_store/document.rst
new file mode 100644
index 0000000..3578d57
--- /dev/null
+++ b/doc/cpp/data_store/document.rst
@@ -0,0 +1,18 @@
+
+.. highlight:: cpp
+
+Document
+========
+
+Examples
+--------
+
+Refer to the :ref:`quickstart-document` section for code examples on how to
+use the :cpp:class:`~ixion::document` class.
+
+API Reference
+-------------
+
+.. doxygenclass:: ixion::document
+ :members:
+
diff --git a/doc/cpp/data_store/index.rst b/doc/cpp/data_store/index.rst
new file mode 100644
index 0000000..dd4749c
--- /dev/null
+++ b/doc/cpp/data_store/index.rst
@@ -0,0 +1,13 @@
+
+Data Store
+==========
+
+.. toctree::
+ :maxdepth: 2
+
+ model_context.rst
+ document.rst
+ cell_access.rst
+ dirty_cell_tracker.rst
+ types.rst
+
diff --git a/doc/cpp/data_store/model_context.rst b/doc/cpp/data_store/model_context.rst
new file mode 100644
index 0000000..d0b131d
--- /dev/null
+++ b/doc/cpp/data_store/model_context.rst
@@ -0,0 +1,24 @@
+
+.. highlight:: cpp
+
+Model Context
+=============
+
+Examples
+--------
+
+Refer to the :ref:`quickstart-model-context` section for code examples on how
+to use the :cpp:class:`~ixion::model_context` class.
+
+API Reference
+-------------
+
+.. doxygenclass:: ixion::model_context
+ :members:
+
+.. doxygenstruct:: ixion::config
+ :members:
+
+.. doxygenclass:: ixion::model_iterator
+ :members:
+
diff --git a/doc/cpp/data_store/types.rst b/doc/cpp/data_store/types.rst
new file mode 100644
index 0000000..20bb2ac
--- /dev/null
+++ b/doc/cpp/data_store/types.rst
@@ -0,0 +1,89 @@
+
+Types
+=====
+
+Macros
+------
+
+.. doxygendefine:: IXION_ASCII
+
+
+Primitive Types
+---------------
+
+.. doxygenenum:: ixion::celltype_t
+.. doxygenenum:: ixion::cell_value_t
+.. doxygenenum:: ixion::value_t
+.. doxygenenum:: ixion::table_area_t
+.. doxygenenum:: ixion::formula_name_resolver_t
+.. doxygenenum:: ixion::formula_error_t
+.. doxygenenum:: ixion::formula_result_wait_policy_t
+.. doxygenenum:: ixion::formula_event_t
+.. doxygenenum:: ixion::rc_direction_t
+
+.. doxygentypedef:: ixion::col_t
+.. doxygentypedef:: ixion::row_t
+.. doxygentypedef:: ixion::sheet_t
+.. doxygentypedef:: ixion::rc_t
+.. doxygentypedef:: ixion::string_id_t
+.. doxygentypedef:: ixion::table_areas_t
+.. doxygentypedef:: ixion::formula_tokens_t
+
+.. doxygenvariable:: ixion::empty_string_id
+.. doxygenvariable:: ixion::global_scope
+.. doxygenvariable:: ixion::invalid_sheet
+
+.. doxygenstruct:: ixion::rc_size_t
+.. doxygenstruct:: ixion::formula_group_t
+
+
+Cell Addresses
+--------------
+
+.. doxygenstruct:: ixion::address_t
+ :members:
+
+.. doxygenstruct:: ixion::rc_address_t
+ :members:
+
+.. doxygenstruct:: ixion::abs_address_t
+ :members:
+
+.. doxygenstruct:: ixion::abs_rc_address_t
+ :members:
+
+.. doxygenstruct:: ixion::range_t
+ :members:
+
+.. doxygenstruct:: ixion::abs_range_t
+ :members:
+
+.. doxygenstruct:: ixion::abs_rc_range_t
+ :members:
+
+.. doxygenstruct:: ixion::table_t
+ :members:
+
+.. doxygentypedef:: ixion::abs_address_set_t
+
+.. doxygentypedef:: ixion::abs_range_set_t
+
+.. doxygentypedef:: ixion::abs_rc_range_set_t
+
+
+Column Blocks
+-------------
+
+.. doxygentypedef:: ixion::column_block_handle
+.. doxygentypedef:: ixion::column_block_callback_t
+.. doxygenenum:: ixion::column_block_t
+
+.. doxygenstruct:: ixion::column_block_shape_t
+ :members:
+
+Utility Functions
+-----------------
+
+.. doxygenfunction:: ixion::get_formula_error_name
+
+.. doxygenfunction:: ixion::to_formula_error_type
diff --git a/doc/cpp/formula/formula_cell.rst b/doc/cpp/formula/formula_cell.rst
new file mode 100644
index 0000000..882edaf
--- /dev/null
+++ b/doc/cpp/formula/formula_cell.rst
@@ -0,0 +1,10 @@
+
+Formula Cell
+============
+
+.. doxygenclass:: ixion::formula_cell
+ :members:
+
+.. doxygenclass:: ixion::formula_result
+ :members:
+
diff --git a/doc/cpp/formula/formula_engine.rst b/doc/cpp/formula/formula_engine.rst
new file mode 100644
index 0000000..3e8fda8
--- /dev/null
+++ b/doc/cpp/formula/formula_engine.rst
@@ -0,0 +1,19 @@
+
+Formula Engine
+==============
+
+.. doxygenfunction:: ixion::parse_formula_string
+.. doxygenfunction:: ixion::print_formula_tokens
+.. doxygenfunction:: ixion::register_formula_cell
+.. doxygenfunction:: ixion::unregister_formula_cell
+.. doxygenfunction:: ixion::query_dirty_cells
+.. doxygenfunction:: ixion::query_and_sort_dirty_cells
+.. doxygenfunction:: ixion::calculate_sorted_cells
+
+
+Formula Functions
+=================
+
+.. doxygenenum:: ixion::formula_function_t
+.. doxygenfunction:: ixion::get_formula_function_name
+.. doxygenfunction:: ixion::get_formula_function_opcode
diff --git a/doc/cpp/formula/formula_name_resolver.rst b/doc/cpp/formula/formula_name_resolver.rst
new file mode 100644
index 0000000..ea9f988
--- /dev/null
+++ b/doc/cpp/formula/formula_name_resolver.rst
@@ -0,0 +1,10 @@
+
+Formula Name Resolver
+=====================
+
+.. doxygenclass:: ixion::formula_name_resolver
+ :members:
+
+.. doxygenstruct:: ixion::formula_name_t
+ :members:
+
diff --git a/doc/cpp/formula/formula_tokens.rst b/doc/cpp/formula/formula_tokens.rst
new file mode 100644
index 0000000..06d33a0
--- /dev/null
+++ b/doc/cpp/formula/formula_tokens.rst
@@ -0,0 +1,19 @@
+
+Formula Tokens
+==============
+
+.. doxygenstruct:: ixion::formula_token
+ :members:
+
+.. doxygenclass:: ixion::formula_tokens_store
+ :members:
+
+.. doxygenstruct:: ixion::named_expression_t
+ :members:
+
+Utility Functions
+-----------------
+
+.. doxygenfunction:: ixion::get_opcode_name
+
+.. doxygenfunction:: ixion::get_formula_opcode_string
diff --git a/doc/cpp/formula/index.rst b/doc/cpp/formula/index.rst
new file mode 100644
index 0000000..976405a
--- /dev/null
+++ b/doc/cpp/formula/index.rst
@@ -0,0 +1,12 @@
+
+Formula
+=======
+
+.. toctree::
+ :maxdepth: 2
+
+ formula_engine.rst
+ formula_cell.rst
+ formula_tokens.rst
+ formula_name_resolver.rst
+ types.rst
diff --git a/doc/cpp/formula/types.rst b/doc/cpp/formula/types.rst
new file mode 100644
index 0000000..9885512
--- /dev/null
+++ b/doc/cpp/formula/types.rst
@@ -0,0 +1,14 @@
+
+Types
+=====
+
+.. doxygenenum:: ixion::fopcode_t
+
+Matrix
+------
+
+.. doxygenclass:: ixion::matrix
+ :members:
+
+.. doxygenclass:: ixion::numeric_matrix
+ :members:
diff --git a/doc/cpp/index.rst b/doc/cpp/index.rst
new file mode 100644
index 0000000..65e970d
--- /dev/null
+++ b/doc/cpp/index.rst
@@ -0,0 +1,16 @@
+.. highlight:: cpp
+
+.. _index:
+
+C++ API
+=======
+
+.. toctree::
+ :maxdepth: 2
+
+ quickstart/index.rst
+ formula/index.rst
+ data_store/index.rst
+ interface/index.rst
+
+
diff --git a/doc/cpp/interface/index.rst b/doc/cpp/interface/index.rst
new file mode 100644
index 0000000..10fc539
--- /dev/null
+++ b/doc/cpp/interface/index.rst
@@ -0,0 +1,10 @@
+
+Interfaces
+==========
+
+.. doxygenclass:: ixion::iface::session_handler
+ :members:
+
+.. doxygenclass:: ixion::iface::table_handler
+ :members:
+
diff --git a/doc/cpp/quickstart/index.rst b/doc/cpp/quickstart/index.rst
new file mode 100644
index 0000000..5097e02
--- /dev/null
+++ b/doc/cpp/quickstart/index.rst
@@ -0,0 +1,13 @@
+
+.. highlight:: cpp
+
+Quickstart
+==========
+
+.. toctree::
+ :maxdepth: 1
+
+ using_model_context.rst
+ using_document.rst
+
+
diff --git a/doc/cpp/quickstart/using_document.rst b/doc/cpp/quickstart/using_document.rst
new file mode 100644
index 0000000..8c6b779
--- /dev/null
+++ b/doc/cpp/quickstart/using_document.rst
@@ -0,0 +1,143 @@
+
+.. highlight:: cpp
+
+.. _quickstart-document:
+
+Using document class
+====================
+
+In the :ref:`quickstart-model-context` section, we saw an example of how to
+set up a cell value store and run some simple calculations using the
+:cpp:class:`~ixion::model_context` class. While that approach certainly works
+fine, one large drawback is that you do need to manually handle formula tokenization,
+formula cell registration (and un-registration), as well as to trace which cells
+have their values changed and which formula cells have been created or modified.
+This is because the :cpp:class:`~ixion::model_context` class is designed to only
+handle cell value storage, and all other operations related to formula expressions
+and formula cell (re-)calculations have to be done outside of it.
+
+Luckily, Ixion also provides a higher level document class called
+:cpp:class:`~ixion::document` which internally uses :cpp:class:`~ixion::model_context`
+and handles all the formula cell related operations internally. This section
+provides an overview of how to use the :cpp:class:`~ixion::document` class to
+do more or less similar things we did in the :ref:`quickstart-model-context`
+section.
+
+First, we need to instantiate the :cpp:class:`~ixion::document` instance and
+insert a sheet named ``MySheet``.
+
+::
+
+ ixion::document doc;
+ doc.append_sheet("MySheet");
+
+Next, like we did in the previous section, we will insert numbers 1 through 10
+in cells A1 through A10::
+
+ for (ixion::abs_address_t pos(0, 0, 0); pos.row <= 9; ++pos.row)
+ {
+ double value = pos.row + 1.0; // Set the row position + 1 as the cell value.
+ doc.set_numeric_cell(pos, value);
+ }
+
+So far we don't see much of a difference from model_context. Let's now insert
+string values into cells B2 and B3::
+
+ // Insert string values.
+ std::string s = "This cell contains a string value.";
+ doc.set_string_cell("B2", s);
+ doc.set_string_cell("B3", "This too contains a string value.");
+
+Here we see the first difference. When using :cpp:class:`~ixion::document`,
+You can specify the cell position either by :cpp:struct:`~ixion::abs_address_t`
+as with :cpp:class:`~ixion::model_context`, or by a string whose value is the
+name of the cell address. The default address syntax for the string cell address
+is "Excel A1" syntax. You can pick a different syntax by passing a value of type
+:cpp:enum:`~ixion::formula_name_resolver_t` to the constructor.
+
+It's worth noting that, when specifying the cell position as a string value and
+the sheet name is omitted, the first sheet is implied. You can also specify
+the sheet name explicitly as in the following::
+
+ doc.set_string_cell("MySheet!B4", "Yet another string value.");
+
+For a document with only one sheet, it makes no difference whether to include
+the sheet name or leave it out, but if you have more than one sheet, you need to
+specify the sheet name when specifying a cell position on sheets other than the
+first one.
+
+Now, let's insert a a formula into A11 to sum up values in A1:A10, and calculate
+it afterward::
+
+ doc.set_formula_cell("A11", "SUM(A1:A10)");
+ doc.calculate(0);
+
+And fetch the calculated value in A11 and see what the result is::
+
+ double value = doc.get_numeric_value("A11");
+ cout << "value of A11: " << value << endl;
+
+You should see the following output:
+
+.. code-block:: text
+
+ value of A11: 55
+
+It looks about right. The :cpp:func:`~ixion::document::calculate` method takes one
+argument that is the number of threads to use for the calculation. We pass 0 here to
+run the calculation using only the main thread.
+
+Now, let's re-write the formula in cell A11 to take the average of A1:A10 instead,
+run the calculation again, and check the value of A11::
+
+ // Insert a new formula to A11.
+ doc.set_formula_cell("A11", "AVERAGE(A1:A10)");
+ doc.calculate(0);
+
+ value = doc.get_numeric_value("A11");
+ cout << "value of A11: " << value << endl;
+
+The output says:
+
+.. code-block:: text
+
+ value of A11: 5.5
+
+which looks right. Note that, unlike the previous example, there is no need to un-register
+and register cell A11 before and after the edit.
+
+Lastly, let's insert into cell A10 a new formula that contains no references to other cells.
+As this will trigger a re-calculation of cell A11, we will check the values of both A10
+and A11::
+
+ // Overwrite A10 with a formula cell with no references.
+ doc.set_formula_cell("A10", "(100+50)/2");
+ doc.calculate(0);
+
+ value = doc.get_numeric_value("A10");
+ cout << "value of A10: " << value << endl;
+
+ value = doc.get_numeric_value("A11");
+ cout << "value of A11: " << value << endl;
+
+The output will be:
+
+.. code-block:: text
+
+ value of A10: 75
+ value of A11: 12
+
+Notice once again that there is no need to do formula cell registration nor manual tracking
+of dirty formula cells.
+
+
+Conclusion
+----------
+
+In this section, we have performed the same thing we did in the :ref:`quickstart-model-context`
+section, but with much less code, and without the complexity of low-level formula expression
+tokenization, formula cell registration, or manual tracking of modified cells. If you are
+looking to leverage the functionality of Ixion but don't want to deal with lower-level formula
+API, using the :cpp:class:`~ixion::document` class may be just the ticket.
+
+The complete source code of this example is avaiable `here <https://gitlab.com/ixion/ixion/-/blob/master/doc_example/document_simple.cpp>`_.
diff --git a/doc/cpp/quickstart/using_model_context.rst b/doc/cpp/quickstart/using_model_context.rst
new file mode 100644
index 0000000..f37bd5f
--- /dev/null
+++ b/doc/cpp/quickstart/using_model_context.rst
@@ -0,0 +1,318 @@
+
+.. highlight:: cpp
+
+.. _quickstart-model-context:
+
+Using model_context class
+=========================
+
+Create a model context instance
+-------------------------------
+
+When using ixion, the very first step is to create a :cpp:class:`~ixion::model_context`
+instance::
+
+ ixion::model_context cxt;
+
+The :cpp:class:`~ixion::model_context` class represents a document model data
+store that stores cell values spreading over one or more sheets. At the time of construction,
+the model contains no sheets. So the obvious next step is to insert a sheet::
+
+ // First and foremost, insert a sheet.
+ cxt.append_sheet("MySheet");
+
+The :cpp:func:`~ixion::model_context::append_sheet` method will append a new sheet to
+the model. You need to give a name when appending a sheet, and the name must be unique
+for each sheet.
+
+.. note::
+
+ Each sheet has a fixed size which cannot be changed once the :cpp:class:`~ixion::model_context`
+ object is instantiated. The default sheet size is 1048576 rows by 16384 columns. You can
+ specify a custom sheet size by passing a desired sheet size value to the
+ :cpp:class:`~ixion::model_context` constructor at the time of instantiation.
+
+
+Populate model context with values
+----------------------------------
+
+Now that you have your first sheet inserted, let's put in some numeric values. In this example,
+we'll insert into A1:A10 their respective row positions. To insert a numeric value, you use
+:cpp:func:`~ixion::model_context::set_numeric_cell` which takes the position of the cell as its
+first argument and the value to set as its second argument. You need to use :cpp:class:`~ixion::abs_address_t`
+to specify a cell position.
+
+::
+
+ // Now, populate it with some numeric values in A1:A10.
+ for (ixion::abs_address_t pos(0, 0, 0); pos.row <= 9; ++pos.row)
+ {
+ double value = pos.row + 1.0; // Set the row position + 1 as the cell value.
+ cxt.set_numeric_cell(pos, value);
+ }
+
+Note that, since row and column positions are internally 0-based, we add one to emulate how the row
+positions are presented in typical spreadsheet program.
+
+Inserting a string value can be done via :cpp:func:`~ixion::model_context::set_string_cell` in one
+of two ways. The first way is to store the value to a type that decays to ``std::string_view``, such
+as ``std::string``, char array, or string literal, and pass it to the method directly::
+
+ // Insert a string value into B2.
+ ixion::abs_address_t B2(0, 1, 1);
+ std::string s = "This cell contains a string value.";
+ cxt.set_string_cell(B2, s);
+
+ // Insert a literal string value into B3.
+ ixion::abs_address_t B3(0, 2, 1);
+ cxt.set_string_cell(B3, "This too contains a string value.");
+
+The second way is to add your string to the model_context's internal string pool first which will return its
+string ID, and pass that ID to the method::
+
+ // Insert a string value into B4 via string identifier.
+ ixion::string_id_t sid = cxt.add_string("Yet another string value.");
+ ixion::abs_address_t B4(0, 3, 1);
+ cxt.set_string_cell(B4, sid);
+
+The model_context class has two methods for inserting a string to the string pool:
+:cpp:func:`~ixion::model_context::add_string` and :cpp:func:`~ixion::model_context::append_string`. The
+:cpp:func:`~ixion::model_context::add_string` method checks for an existing entry with the same string value
+upon each insertion attempt, and it will not insert the new value if the value already exists in the pool.
+The :cpp:func:`~ixion::model_context::append_string` method, on the other hand, does not check the pool for
+an existing value and always inserts the value. The :cpp:func:`~ixion::model_context::append_string` method
+is appropriate if you know all your string entries ahead of time and wish to bulk-insert them. Otherwise
+using :cpp:func:`~ixion::model_context::add_string` is appropriate in most cases.
+
+
+Insert a formula cell into model context
+----------------------------------------
+
+Inserting a formula cell requires a few extra steps. First, you need to tokenize your formula string, and
+to do that, you need to create an instance of :cpp:class:`~ixion::formula_name_resolver`. The
+formula_name_resolver class is responsible for resolving "names" into references, functions, and named
+expressions names. Ixion provides multiple types of name resolvers, and you specify its type when passing
+an enum value of type :cpp:enum:`~ixion::formula_name_resolver_t` when calling its static
+:cpp:func:`ixion::formula_name_resolver::get` function. In this example, we'll be using the Excel A1
+syntax::
+
+ // Tokenize formula string first.
+ std::unique_ptr<ixion::formula_name_resolver> resolver =
+ ixion::formula_name_resolver::get(ixion::formula_name_resolver_t::excel_a1, &cxt);
+
+You can also optionally pass a memory address of your :cpp:class:`~ixion::model_context` instance which is
+required for resolving sheet names. You can pass a ``nullptr`` if you don't need to resolve sheet names.
+
+Next, let's create a formula string we want to tokenize. Here, we are inserting a formula expression
+**SUM(A1:A10)** into cell A11::
+
+ ixion::abs_address_t A11(0, 10, 0);
+ ixion::formula_tokens_t tokens = ixion::parse_formula_string(cxt, A11, *resolver, "SUM(A1:A10)");
+
+To tokenize a formula string, you call the :cpp:func:`ixion::parse_formula_string` function and pass
+
+* a model_context instance
+* the position of the cell to insert the formula into,
+* a formula_name_resolver instance, and
+* the formula string to tokenize.
+
+The function will then return a sequence of tokens representing the original formula string. Once you
+have the tokens, you can finally pass them to your model_context instance via
+:cpp:func:`~ixion::model_context::set_formula_cell`::
+
+ // Set the tokens into the model.
+ const ixion::formula_cell* cell = cxt.set_formula_cell(A11, std::move(tokens));
+
+There is a few things to note. First, you need to *move* your tokens to the method since instances of
+type :cpp:type:`ixion::formula_tokens_t` are non-copyable and only movable. Second, the method returns
+a pointer to the formula cell instance that just got inserted into the model. We are saving it here
+to use it in the next step below.
+
+When inserting a formula cell, you need to "register" it so that the model can record its reference
+dependencies via :cpp:func:`~ixion::register_formula_cell`::
+
+ // Register this formula cell for automatic dependency tracking.
+ ixion::register_formula_cell(cxt, A11, cell);
+
+Without registering formula cells, you won't be able to determine which formula cells to re-calculate
+for given modified cells. Here we are passing the pointer to the formula cell returned from the previous
+call. This is optional, and you can pass a ``nullptr`` instead. But by passing it you will avoid the
+overhead of searching for the cell instance from the model.
+
+
+Calculate formula cell
+----------------------
+
+Now that we have the formula cell in, let's run our first calculation. To calcualte formula cells, you
+need to first specify a range of modified cells in order to query for all formula cells affected by it
+either directly or indirectly, which we refer to as "dirty" formula cells. Since this is our initial
+calculation, we can simply specify the entire sheet to be "modified" which will effectively trigger all
+formula cells::
+
+ ixion::rc_size_t sheet_size = cxt.get_sheet_size();
+ ixion::abs_range_t entire_sheet(0, 0, 0, sheet_size.row, sheet_size.column); // sheet, row, column, row span, column span
+ ixion::abs_range_set_t modified_cells{entire_sheet};
+
+We will then pass it to :cpp:func:`~ixion::query_and_sort_dirty_cells` to get a sequence of formula cell
+addresses to calculate::
+
+ // Determine formula cells that need re-calculation given the modified cells.
+ // There should be only one formula cell in this example.
+ std::vector<ixion::abs_range_t> dirty_cells = ixion::query_and_sort_dirty_cells(cxt, modified_cells);
+ cout << "number of dirty cells: " << dirty_cells.size() << endl;
+
+Since so far we only have one formula cell, this should only return one range with the size of one row and one column. You
+will see the following output:
+
+.. code-block:: text
+
+ number of dirty cells: 1
+
+Let's inspect which cell it actually refers to::
+
+ cout << "dirty cell: " << dirty_cells[0] << endl;
+
+which will print:
+
+.. code-block:: text
+
+ dirty cell: (sheet:0; row:10; column:0)-(sheet:0; row:10; column:0)
+
+confirming that it certainly points to cell A11. Finally, pass this to :cpp:func:`~ixion::calculate_sorted_cells`::
+
+ // Now perform calculation.
+ ixion::calculate_sorted_cells(cxt, dirty_cells, 0);
+
+to calculate cell A11. After that, you can retrieve the result of the calculation by calling
+:cpp:func:`~ixion::model_context::get_numeric_value` for A11::
+
+ double value = cxt.get_numeric_value(A11);
+ cout << "value of A11: " << value << endl;
+
+You will see the following output:
+
+.. code-block:: text
+
+ value of A11: 55
+
+
+Modify formula cell
+-------------------
+
+Let's say you need to overwrite the formula in A11 to something else. The steps you need to take
+are very similar to the steps for inserting a brand-new formula cell, the only difference being
+that you need to "unregister" the old formula cell before overwriting it.
+
+Let's go through this step by step. First, create new tokens to insert::
+
+ // Insert a new formula to A11.
+ tokens = ixion::parse_formula_string(cxt, A11, *resolver, "AVERAGE(A1:A10)");
+
+This time we are inserting the formula **AVERAGE(A1:A10)** in A11 to overwrite the previous one
+**SUM(A1:A10)**. Before inserting these tokens, first unregister the current formula cell::
+
+ // Before overwriting, make sure to UN-register the old cell.
+ ixion::unregister_formula_cell(cxt, A11);
+
+This will remove the dependency information of the old formula from the model's internal tracker.
+Once that's done, the rest is the same as inserting a new formula::
+
+ // Set and register the new formula cell.
+ cell = cxt.set_formula_cell(A11, std::move(tokens));
+ ixion::register_formula_cell(cxt, A11, cell);
+
+Let's re-calculate the new formula cell. The re-calculation steps are also very similar to the initial
+calculation steps. The first step is to query for all dirty formula cells. This time, however, we don't
+query based on which formula cells are affected by modified cells, which we'll specify as none. Instead,
+we query based on which formula cells have been modified, which in this case is A11::
+
+ // This time, we know that none of the cell values have changed, but the
+ // formula A11 is updated & needs recalculation.
+ ixion::abs_range_set_t modified_formula_cells{A11};
+ dirty_cells = ixion::query_and_sort_dirty_cells(cxt, ixion::abs_range_set_t(), &modified_formula_cells);
+ cout << "number of dirty cells: " << dirty_cells.size() << endl;
+
+As is the first calculation, you should only get one dirty cell address from the :cpp:func:`~ixion::query_and_sort_dirty_cells`
+call. Running the above code should produce:
+
+.. code-block:: text
+
+ number of dirty cells: 1
+
+The rest should be familiar::
+
+ // Perform calculation again.
+ ixion::calculate_sorted_cells(cxt, dirty_cells, 0);
+
+ value = cxt.get_numeric_value(A11);
+ cout << "value of A11: " << value << endl;
+
+You should see the following output when finished:
+
+.. code-block:: text
+
+ value of A11: 5.5
+
+
+Formula cell with no references
+-------------------------------
+
+Next example shows a scenario where you want to overwrite a cell in A10, which
+currently stores a numeric value, with a formula cell that references no other
+cells. Let's add the new formula cell first::
+
+ // Overwrite A10 with a formula cell with no references.
+ ixion::abs_address_t A10(0, 9, 0);
+ tokens = ixion::parse_formula_string(cxt, A10, *resolver, "(100+50)/2");
+ cxt.set_formula_cell(A10, std::move(tokens));
+
+Here, we are not registering this cell since it contains no references hence it
+does not need to be tracked by dependency tracker. Also, since the previous
+cell in A10 is not a formula cell, there is no cell to unregister.
+
+.. warning::
+
+ Technically speaking, every formula cell that contains references to other
+ cells or contains at least one volatile function needs to be registered.
+ Since registering a formula cell that doesn't need to be registered is
+ entirely harmless (albeit a slight overhead), it's generally a good idea to
+ register every new formula cell regardless of its content.
+
+ Likewise, unregistering a formula cell that didn't need to be registered
+ (or wasn't registered) is entirely harmless. Even unregistering a cell
+ that didn't contain a formula cell is harmless, and essentially does
+ nothing. As such, it's probably a good idea to unregister a cell whenever
+ a new cell value is being placed.
+
+Let's obtain all formula cells in need to re-calculation::
+
+ modified_formula_cells = { A10 };
+ dirty_cells = ixion::query_and_sort_dirty_cells(cxt, ixion::abs_range_set_t(), &modified_formula_cells);
+ cout << "number of dirty cells: " << dirty_cells.size() << endl;
+
+Here, we are only passing one modified formula cell which is A10, and no other
+cells being modified. Since cell A11 references ``A1:A10`` and A10's value has
+changed, this should also trigger A11 for re-calculation. Running this code
+should produce the following output:
+
+.. code-block:: text
+
+ number of dirty cells: 2
+
+Let's calculate all affected formula cells and check the results of A10 and A11::
+
+ ixion::calculate_sorted_cells(cxt, dirty_cells, 0);
+ value = cxt.get_numeric_value(A10);
+ cout << "value of A10: " << value << endl;
+ value = cxt.get_numeric_value(A11);
+ cout << "value of A11: " << value << endl;
+
+Running this code should produce the following output:
+
+.. code-block:: text
+
+ value of A10: 75
+ value of A11: 12
+
+The complete source code of this example is avaiable `here <https://gitlab.com/ixion/ixion/-/blob/master/doc_example/model_context_simple.cpp>`_.
+
diff --git a/doc/doxygen.conf b/doc/doxygen.conf
new file mode 100644
index 0000000..ee4cd24
--- /dev/null
+++ b/doc/doxygen.conf
@@ -0,0 +1,2276 @@
+# Doxyfile 1.8.6
+
+# This file describes the settings to be used by the documentation system
+# doxygen (www.doxygen.org) for a project.
+#
+# All text after a double hash (##) is considered a comment and is placed in
+# front of the TAG it is preceding.
+#
+# All text after a single hash (#) is considered a comment and will be ignored.
+# The format is:
+# TAG = value [value, ...]
+# For lists, items can also be appended using:
+# TAG += value [value, ...]
+# Values that contain spaces should be placed between quotes (\" \").
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+
+# This tag specifies the encoding used for all characters in the config file
+# that follow. The default is UTF-8 which is also the encoding used for all text
+# before the first occurrence of this tag. Doxygen uses libiconv (or the iconv
+# built into libc) for the transcoding. See http://www.gnu.org/software/libiconv
+# for the list of possible encodings.
+# The default value is: UTF-8.
+
+DOXYFILE_ENCODING = UTF-8
+
+# The PROJECT_NAME tag is a single word (or a sequence of words surrounded by
+# double-quotes, unless you are using Doxywizard) that should identify the
+# project for which the documentation is generated. This name is used in the
+# title of most generated pages and in a few other places.
+# The default value is: My Project.
+
+PROJECT_NAME = "Ixion"
+
+# The PROJECT_NUMBER tag can be used to enter a project or revision number. This
+# could be handy for archiving the generated documentation or if some version
+# control system is used.
+
+PROJECT_NUMBER =
+
+# Using the PROJECT_BRIEF tag one can provide an optional one line description
+# for a project that appears at the top of each page and should give viewer a
+# quick idea about the purpose of the project. Keep the description short.
+
+PROJECT_BRIEF =
+
+# With the PROJECT_LOGO tag one can specify an logo or icon that is included in
+# the documentation. The maximum height of the logo should not exceed 55 pixels
+# and the maximum width should not exceed 200 pixels. Doxygen will copy the logo
+# to the output directory.
+
+PROJECT_LOGO =
+
+# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path
+# into which the generated documentation will be written. If a relative path is
+# entered, it will be relative to the location where doxygen was started. If
+# left blank the current directory will be used.
+
+OUTPUT_DIRECTORY = _doxygen
+
+# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create 4096 sub-
+# directories (in 2 levels) under the output directory of each output format and
+# will distribute the generated files over these directories. Enabling this
+# option can be useful when feeding doxygen a huge amount of source files, where
+# putting all generated files in the same directory would otherwise causes
+# performance problems for the file system.
+# The default value is: NO.
+
+CREATE_SUBDIRS = NO
+
+# The OUTPUT_LANGUAGE tag is used to specify the language in which all
+# documentation generated by doxygen is written. Doxygen will use this
+# information to generate all constant output in the proper language.
+# Possible values are: Afrikaans, Arabic, Armenian, Brazilian, Catalan, Chinese,
+# Chinese-Traditional, Croatian, Czech, Danish, Dutch, English (United States),
+# Esperanto, Farsi (Persian), Finnish, French, German, Greek, Hungarian,
+# Indonesian, Italian, Japanese, Japanese-en (Japanese with English messages),
+# Korean, Korean-en (Korean with English messages), Latvian, Lithuanian,
+# Macedonian, Norwegian, Persian (Farsi), Polish, Portuguese, Romanian, Russian,
+# Serbian, Serbian-Cyrillic, Slovak, Slovene, Spanish, Swedish, Turkish,
+# Ukrainian and Vietnamese.
+# The default value is: English.
+
+OUTPUT_LANGUAGE = English
+
+# If the BRIEF_MEMBER_DESC tag is set to YES doxygen will include brief member
+# descriptions after the members that are listed in the file and class
+# documentation (similar to Javadoc). Set to NO to disable this.
+# The default value is: YES.
+
+BRIEF_MEMBER_DESC = YES
+
+# If the REPEAT_BRIEF tag is set to YES doxygen will prepend the brief
+# description of a member or function before the detailed description
+#
+# Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the
+# brief descriptions will be completely suppressed.
+# The default value is: YES.
+
+REPEAT_BRIEF = YES
+
+# This tag implements a quasi-intelligent brief description abbreviator that is
+# used to form the text in various listings. Each string in this list, if found
+# as the leading text of the brief description, will be stripped from the text
+# and the result, after processing the whole list, is used as the annotated
+# text. Otherwise, the brief description is used as-is. If left blank, the
+# following values are used ($name is automatically replaced with the name of
+# the entity):The $name class, The $name widget, The $name file, is, provides,
+# specifies, contains, represents, a, an and the.
+
+ABBREVIATE_BRIEF =
+
+# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then
+# doxygen will generate a detailed section even if there is only a brief
+# description.
+# The default value is: NO.
+
+ALWAYS_DETAILED_SEC = NO
+
+# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all
+# inherited members of a class in the documentation of that class as if those
+# members were ordinary class members. Constructors, destructors and assignment
+# operators of the base classes will not be shown.
+# The default value is: NO.
+
+INLINE_INHERITED_MEMB = NO
+
+# If the FULL_PATH_NAMES tag is set to YES doxygen will prepend the full path
+# before files name in the file list and in the header files. If set to NO the
+# shortest path that makes the file name unique will be used
+# The default value is: YES.
+
+FULL_PATH_NAMES = YES
+
+# The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path.
+# Stripping is only done if one of the specified strings matches the left-hand
+# part of the path. The tag can be used to show relative paths in the file list.
+# If left blank the directory from which doxygen is run is used as the path to
+# strip.
+#
+# Note that you can specify absolute paths here, but also relative paths, which
+# will be relative from the directory where doxygen is started.
+# This tag requires that the tag FULL_PATH_NAMES is set to YES.
+
+STRIP_FROM_PATH =
+
+# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the
+# path mentioned in the documentation of a class, which tells the reader which
+# header file to include in order to use a class. If left blank only the name of
+# the header file containing the class definition is used. Otherwise one should
+# specify the list of include paths that are normally passed to the compiler
+# using the -I flag.
+
+STRIP_FROM_INC_PATH =
+
+# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but
+# less readable) file names. This can be useful is your file systems doesn't
+# support long names like on DOS, Mac, or CD-ROM.
+# The default value is: NO.
+
+SHORT_NAMES = NO
+
+# If the JAVADOC_AUTOBRIEF tag is set to YES then doxygen will interpret the
+# first line (until the first dot) of a Javadoc-style comment as the brief
+# description. If set to NO, the Javadoc-style will behave just like regular Qt-
+# style comments (thus requiring an explicit @brief command for a brief
+# description.)
+# The default value is: NO.
+
+JAVADOC_AUTOBRIEF = NO
+
+# If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first
+# line (until the first dot) of a Qt-style comment as the brief description. If
+# set to NO, the Qt-style will behave just like regular Qt-style comments (thus
+# requiring an explicit \brief command for a brief description.)
+# The default value is: NO.
+
+QT_AUTOBRIEF = NO
+
+# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make doxygen treat a
+# multi-line C++ special comment block (i.e. a block of //! or /// comments) as
+# a brief description. This used to be the default behavior. The new default is
+# to treat a multi-line C++ comment block as a detailed description. Set this
+# tag to YES if you prefer the old behavior instead.
+#
+# Note that setting this tag to YES also means that rational rose comments are
+# not recognized any more.
+# The default value is: NO.
+
+MULTILINE_CPP_IS_BRIEF = NO
+
+# If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the
+# documentation from any documented member that it re-implements.
+# The default value is: YES.
+
+INHERIT_DOCS = YES
+
+# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce a
+# new page for each member. If set to NO, the documentation of a member will be
+# part of the file/class/namespace that contains it.
+# The default value is: NO.
+
+SEPARATE_MEMBER_PAGES = NO
+
+# The TAB_SIZE tag can be used to set the number of spaces in a tab. Doxygen
+# uses this value to replace tabs by spaces in code fragments.
+# Minimum value: 1, maximum value: 16, default value: 4.
+
+TAB_SIZE = 4
+
+# This tag can be used to specify a number of aliases that act as commands in
+# the documentation. An alias has the form:
+# name=value
+# For example adding
+# "sideeffect=@par Side Effects:\n"
+# will allow you to put the command \sideeffect (or @sideeffect) in the
+# documentation, which will result in a user-defined paragraph with heading
+# "Side Effects:". You can put \n's in the value part of an alias to insert
+# newlines.
+
+ALIASES =
+
+# This tag can be used to specify a number of word-keyword mappings (TCL only).
+# A mapping has the form "name=value". For example adding "class=itcl::class"
+# will allow you to use the command class in the itcl::class meaning.
+
+TCL_SUBST =
+
+# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources
+# only. Doxygen will then generate output that is more tailored for C. For
+# instance, some of the names that are used will be different. The list of all
+# members will be omitted, etc.
+# The default value is: NO.
+
+OPTIMIZE_OUTPUT_FOR_C = NO
+
+# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or
+# Python sources only. Doxygen will then generate output that is more tailored
+# for that language. For instance, namespaces will be presented as packages,
+# qualified scopes will look different, etc.
+# The default value is: NO.
+
+OPTIMIZE_OUTPUT_JAVA = NO
+
+# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran
+# sources. Doxygen will then generate output that is tailored for Fortran.
+# The default value is: NO.
+
+OPTIMIZE_FOR_FORTRAN = NO
+
+# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL
+# sources. Doxygen will then generate output that is tailored for VHDL.
+# The default value is: NO.
+
+OPTIMIZE_OUTPUT_VHDL = NO
+
+# Doxygen selects the parser to use depending on the extension of the files it
+# parses. With this tag you can assign which parser to use for a given
+# extension. Doxygen has a built-in mapping, but you can override or extend it
+# using this tag. The format is ext=language, where ext is a file extension, and
+# language is one of the parsers supported by doxygen: IDL, Java, Javascript,
+# C#, C, C++, D, PHP, Objective-C, Python, Fortran, VHDL. For instance to make
+# doxygen treat .inc files as Fortran files (default is PHP), and .f files as C
+# (default is Fortran), use: inc=Fortran f=C.
+#
+# Note For files without extension you can use no_extension as a placeholder.
+#
+# Note that for custom extensions you also need to set FILE_PATTERNS otherwise
+# the files are not read by doxygen.
+
+EXTENSION_MAPPING =
+
+# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments
+# according to the Markdown format, which allows for more readable
+# documentation. See http://daringfireball.net/projects/markdown/ for details.
+# The output of markdown processing is further processed by doxygen, so you can
+# mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in
+# case of backward compatibilities issues.
+# The default value is: YES.
+
+MARKDOWN_SUPPORT = YES
+
+# When enabled doxygen tries to link words that correspond to documented
+# classes, or namespaces to their corresponding documentation. Such a link can
+# be prevented in individual cases by by putting a % sign in front of the word
+# or globally by setting AUTOLINK_SUPPORT to NO.
+# The default value is: YES.
+
+AUTOLINK_SUPPORT = YES
+
+# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want
+# to include (a tag file for) the STL sources as input, then you should set this
+# tag to YES in order to let doxygen match functions declarations and
+# definitions whose arguments contain STL classes (e.g. func(std::string);
+# versus func(std::string) {}). This also make the inheritance and collaboration
+# diagrams that involve STL classes more complete and accurate.
+# The default value is: NO.
+
+BUILTIN_STL_SUPPORT = NO
+
+# If you use Microsoft's C++/CLI language, you should set this option to YES to
+# enable parsing support.
+# The default value is: NO.
+
+CPP_CLI_SUPPORT = NO
+
+# Set the SIP_SUPPORT tag to YES if your project consists of sip (see:
+# http://www.riverbankcomputing.co.uk/software/sip/intro) sources only. Doxygen
+# will parse them like normal C++ but will assume all classes use public instead
+# of private inheritance when no explicit protection keyword is present.
+# The default value is: NO.
+
+SIP_SUPPORT = NO
+
+# For Microsoft's IDL there are propget and propput attributes to indicate
+# getter and setter methods for a property. Setting this option to YES will make
+# doxygen to replace the get and set methods by a property in the documentation.
+# This will only work if the methods are indeed getting or setting a simple
+# type. If this is not the case, or you want to show the methods anyway, you
+# should set this option to NO.
+# The default value is: YES.
+
+IDL_PROPERTY_SUPPORT = YES
+
+# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC
+# tag is set to YES, then doxygen will reuse the documentation of the first
+# member in the group (if any) for the other members of the group. By default
+# all members of a group must be documented explicitly.
+# The default value is: NO.
+
+DISTRIBUTE_GROUP_DOC = NO
+
+# Set the SUBGROUPING tag to YES to allow class member groups of the same type
+# (for instance a group of public functions) to be put as a subgroup of that
+# type (e.g. under the Public Functions section). Set it to NO to prevent
+# subgrouping. Alternatively, this can be done per class using the
+# \nosubgrouping command.
+# The default value is: YES.
+
+SUBGROUPING = YES
+
+# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and unions
+# are shown inside the group in which they are included (e.g. using \ingroup)
+# instead of on a separate page (for HTML and Man pages) or section (for LaTeX
+# and RTF).
+#
+# Note that this feature does not work in combination with
+# SEPARATE_MEMBER_PAGES.
+# The default value is: NO.
+
+INLINE_GROUPED_CLASSES = NO
+
+# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and unions
+# with only public data fields or simple typedef fields will be shown inline in
+# the documentation of the scope in which they are defined (i.e. file,
+# namespace, or group documentation), provided this scope is documented. If set
+# to NO, structs, classes, and unions are shown on a separate page (for HTML and
+# Man pages) or section (for LaTeX and RTF).
+# The default value is: NO.
+
+INLINE_SIMPLE_STRUCTS = NO
+
+# When TYPEDEF_HIDES_STRUCT tag is enabled, a typedef of a struct, union, or
+# enum is documented as struct, union, or enum with the name of the typedef. So
+# typedef struct TypeS {} TypeT, will appear in the documentation as a struct
+# with name TypeT. When disabled the typedef will appear as a member of a file,
+# namespace, or class. And the struct will be named TypeS. This can typically be
+# useful for C code in case the coding convention dictates that all compound
+# types are typedef'ed and only the typedef is referenced, never the tag name.
+# The default value is: NO.
+
+TYPEDEF_HIDES_STRUCT = NO
+
+# The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This
+# cache is used to resolve symbols given their name and scope. Since this can be
+# an expensive process and often the same symbol appears multiple times in the
+# code, doxygen keeps a cache of pre-resolved symbols. If the cache is too small
+# doxygen will become slower. If the cache is too large, memory is wasted. The
+# cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range
+# is 0..9, the default is 0, corresponding to a cache size of 2^16=65536
+# symbols. At the end of a run doxygen will report the cache usage and suggest
+# the optimal cache size from a speed point of view.
+# Minimum value: 0, maximum value: 9, default value: 0.
+
+LOOKUP_CACHE_SIZE = 0
+
+#---------------------------------------------------------------------------
+# Build related configuration options
+#---------------------------------------------------------------------------
+
+# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in
+# documentation are documented, even if no documentation was available. Private
+# class members and static file members will be hidden unless the
+# EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES.
+# Note: This will also disable the warnings about undocumented members that are
+# normally produced when WARNINGS is set to YES.
+# The default value is: NO.
+
+EXTRACT_ALL = NO
+
+# If the EXTRACT_PRIVATE tag is set to YES all private members of a class will
+# be included in the documentation.
+# The default value is: NO.
+
+EXTRACT_PRIVATE = NO
+
+# If the EXTRACT_PACKAGE tag is set to YES all members with package or internal
+# scope will be included in the documentation.
+# The default value is: NO.
+
+EXTRACT_PACKAGE = NO
+
+# If the EXTRACT_STATIC tag is set to YES all static members of a file will be
+# included in the documentation.
+# The default value is: NO.
+
+EXTRACT_STATIC = NO
+
+# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) defined
+# locally in source files will be included in the documentation. If set to NO
+# only classes defined in header files are included. Does not have any effect
+# for Java sources.
+# The default value is: YES.
+
+EXTRACT_LOCAL_CLASSES = YES
+
+# This flag is only useful for Objective-C code. When set to YES local methods,
+# which are defined in the implementation section but not in the interface are
+# included in the documentation. If set to NO only methods in the interface are
+# included.
+# The default value is: NO.
+
+EXTRACT_LOCAL_METHODS = NO
+
+# If this flag is set to YES, the members of anonymous namespaces will be
+# extracted and appear in the documentation as a namespace called
+# 'anonymous_namespace{file}', where file will be replaced with the base name of
+# the file that contains the anonymous namespace. By default anonymous namespace
+# are hidden.
+# The default value is: NO.
+
+EXTRACT_ANON_NSPACES = NO
+
+# If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all
+# undocumented members inside documented classes or files. If set to NO these
+# members will be included in the various overviews, but no documentation
+# section is generated. This option has no effect if EXTRACT_ALL is enabled.
+# The default value is: NO.
+
+HIDE_UNDOC_MEMBERS = NO
+
+# If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all
+# undocumented classes that are normally visible in the class hierarchy. If set
+# to NO these classes will be included in the various overviews. This option has
+# no effect if EXTRACT_ALL is enabled.
+# The default value is: NO.
+
+HIDE_UNDOC_CLASSES = NO
+
+# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend
+# (class|struct|union) declarations. If set to NO these declarations will be
+# included in the documentation.
+# The default value is: NO.
+
+HIDE_FRIEND_COMPOUNDS = NO
+
+# If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any
+# documentation blocks found inside the body of a function. If set to NO these
+# blocks will be appended to the function's detailed documentation block.
+# The default value is: NO.
+
+HIDE_IN_BODY_DOCS = NO
+
+# The INTERNAL_DOCS tag determines if documentation that is typed after a
+# \internal command is included. If the tag is set to NO then the documentation
+# will be excluded. Set it to YES to include the internal documentation.
+# The default value is: NO.
+
+INTERNAL_DOCS = NO
+
+# If the CASE_SENSE_NAMES tag is set to NO then doxygen will only generate file
+# names in lower-case letters. If set to YES upper-case letters are also
+# allowed. This is useful if you have classes or files whose names only differ
+# in case and if your file system supports case sensitive file names. Windows
+# and Mac users are advised to set this option to NO.
+# The default value is: system dependent.
+
+CASE_SENSE_NAMES = YES
+
+# If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with
+# their full class and namespace scopes in the documentation. If set to YES the
+# scope will be hidden.
+# The default value is: NO.
+
+HIDE_SCOPE_NAMES = NO
+
+# If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of
+# the files that are included by a file in the documentation of that file.
+# The default value is: YES.
+
+SHOW_INCLUDE_FILES = YES
+
+# If the SHOW_GROUPED_MEMB_INC tag is set to YES then Doxygen will add for each
+# grouped member an include statement to the documentation, telling the reader
+# which file to include in order to use the member.
+# The default value is: NO.
+
+SHOW_GROUPED_MEMB_INC = NO
+
+# If the FORCE_LOCAL_INCLUDES tag is set to YES then doxygen will list include
+# files with double quotes in the documentation rather than with sharp brackets.
+# The default value is: NO.
+
+FORCE_LOCAL_INCLUDES = NO
+
+# If the INLINE_INFO tag is set to YES then a tag [inline] is inserted in the
+# documentation for inline members.
+# The default value is: YES.
+
+INLINE_INFO = YES
+
+# If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the
+# (detailed) documentation of file and class members alphabetically by member
+# name. If set to NO the members will appear in declaration order.
+# The default value is: YES.
+
+SORT_MEMBER_DOCS = YES
+
+# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief
+# descriptions of file, namespace and class members alphabetically by member
+# name. If set to NO the members will appear in declaration order. Note that
+# this will also influence the order of the classes in the class list.
+# The default value is: NO.
+
+SORT_BRIEF_DOCS = NO
+
+# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the
+# (brief and detailed) documentation of class members so that constructors and
+# destructors are listed first. If set to NO the constructors will appear in the
+# respective orders defined by SORT_BRIEF_DOCS and SORT_MEMBER_DOCS.
+# Note: If SORT_BRIEF_DOCS is set to NO this option is ignored for sorting brief
+# member documentation.
+# Note: If SORT_MEMBER_DOCS is set to NO this option is ignored for sorting
+# detailed member documentation.
+# The default value is: NO.
+
+SORT_MEMBERS_CTORS_1ST = NO
+
+# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the hierarchy
+# of group names into alphabetical order. If set to NO the group names will
+# appear in their defined order.
+# The default value is: NO.
+
+SORT_GROUP_NAMES = NO
+
+# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be sorted by
+# fully-qualified names, including namespaces. If set to NO, the class list will
+# be sorted only by class name, not including the namespace part.
+# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.
+# Note: This option applies only to the class list, not to the alphabetical
+# list.
+# The default value is: NO.
+
+SORT_BY_SCOPE_NAME = NO
+
+# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to do proper
+# type resolution of all parameters of a function it will reject a match between
+# the prototype and the implementation of a member function even if there is
+# only one candidate or it is obvious which candidate to choose by doing a
+# simple string match. By disabling STRICT_PROTO_MATCHING doxygen will still
+# accept a match between prototype and implementation in such cases.
+# The default value is: NO.
+
+STRICT_PROTO_MATCHING = NO
+
+# The GENERATE_TODOLIST tag can be used to enable ( YES) or disable ( NO) the
+# todo list. This list is created by putting \todo commands in the
+# documentation.
+# The default value is: YES.
+
+GENERATE_TODOLIST = YES
+
+# The GENERATE_TESTLIST tag can be used to enable ( YES) or disable ( NO) the
+# test list. This list is created by putting \test commands in the
+# documentation.
+# The default value is: YES.
+
+GENERATE_TESTLIST = YES
+
+# The GENERATE_BUGLIST tag can be used to enable ( YES) or disable ( NO) the bug
+# list. This list is created by putting \bug commands in the documentation.
+# The default value is: YES.
+
+GENERATE_BUGLIST = YES
+
+# The GENERATE_DEPRECATEDLIST tag can be used to enable ( YES) or disable ( NO)
+# the deprecated list. This list is created by putting \deprecated commands in
+# the documentation.
+# The default value is: YES.
+
+GENERATE_DEPRECATEDLIST= YES
+
+# The ENABLED_SECTIONS tag can be used to enable conditional documentation
+# sections, marked by \if <section_label> ... \endif and \cond <section_label>
+# ... \endcond blocks.
+
+ENABLED_SECTIONS =
+
+# The MAX_INITIALIZER_LINES tag determines the maximum number of lines that the
+# initial value of a variable or macro / define can have for it to appear in the
+# documentation. If the initializer consists of more lines than specified here
+# it will be hidden. Use a value of 0 to hide initializers completely. The
+# appearance of the value of individual variables and macros / defines can be
+# controlled using \showinitializer or \hideinitializer command in the
+# documentation regardless of this setting.
+# Minimum value: 0, maximum value: 10000, default value: 30.
+
+MAX_INITIALIZER_LINES = 30
+
+# Set the SHOW_USED_FILES tag to NO to disable the list of files generated at
+# the bottom of the documentation of classes and structs. If set to YES the list
+# will mention the files that were used to generate the documentation.
+# The default value is: YES.
+
+SHOW_USED_FILES = NO
+
+# Set the SHOW_FILES tag to NO to disable the generation of the Files page. This
+# will remove the Files entry from the Quick Index and from the Folder Tree View
+# (if specified).
+# The default value is: YES.
+
+SHOW_FILES = YES
+
+# Set the SHOW_NAMESPACES tag to NO to disable the generation of the Namespaces
+# page. This will remove the Namespaces entry from the Quick Index and from the
+# Folder Tree View (if specified).
+# The default value is: YES.
+
+SHOW_NAMESPACES = YES
+
+# The FILE_VERSION_FILTER tag can be used to specify a program or script that
+# doxygen should invoke to get the current version for each file (typically from
+# the version control system). Doxygen will invoke the program by executing (via
+# popen()) the command command input-file, where command is the value of the
+# FILE_VERSION_FILTER tag, and input-file is the name of an input file provided
+# by doxygen. Whatever the program writes to standard output is used as the file
+# version. For an example see the documentation.
+
+FILE_VERSION_FILTER =
+
+# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed
+# by doxygen. The layout file controls the global structure of the generated
+# output files in an output format independent way. To create the layout file
+# that represents doxygen's defaults, run doxygen with the -l option. You can
+# optionally specify a file name after the option, if omitted DoxygenLayout.xml
+# will be used as the name of the layout file.
+#
+# Note that if you run doxygen from a directory containing a file called
+# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE
+# tag is left empty.
+
+LAYOUT_FILE =
+
+# The CITE_BIB_FILES tag can be used to specify one or more bib files containing
+# the reference definitions. This must be a list of .bib files. The .bib
+# extension is automatically appended if omitted. This requires the bibtex tool
+# to be installed. See also http://en.wikipedia.org/wiki/BibTeX for more info.
+# For LaTeX the style of the bibliography can be controlled using
+# LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the
+# search path. Do not use file names with spaces, bibtex cannot handle them. See
+# also \cite for info how to create references.
+
+CITE_BIB_FILES =
+
+#---------------------------------------------------------------------------
+# Configuration options related to warning and progress messages
+#---------------------------------------------------------------------------
+
+# The QUIET tag can be used to turn on/off the messages that are generated to
+# standard output by doxygen. If QUIET is set to YES this implies that the
+# messages are off.
+# The default value is: NO.
+
+QUIET = NO
+
+# The WARNINGS tag can be used to turn on/off the warning messages that are
+# generated to standard error ( stderr) by doxygen. If WARNINGS is set to YES
+# this implies that the warnings are on.
+#
+# Tip: Turn warnings on while writing the documentation.
+# The default value is: YES.
+
+WARNINGS = YES
+
+# If the WARN_IF_UNDOCUMENTED tag is set to YES, then doxygen will generate
+# warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag
+# will automatically be disabled.
+# The default value is: YES.
+
+WARN_IF_UNDOCUMENTED = NO
+
+# If the WARN_IF_DOC_ERROR tag is set to YES, doxygen will generate warnings for
+# potential errors in the documentation, such as not documenting some parameters
+# in a documented function, or documenting parameters that don't exist or using
+# markup commands wrongly.
+# The default value is: YES.
+
+WARN_IF_DOC_ERROR = YES
+
+# This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that
+# are documented, but have no documentation for their parameters or return
+# value. If set to NO doxygen will only warn about wrong or incomplete parameter
+# documentation, but not about the absence of documentation.
+# The default value is: NO.
+
+WARN_NO_PARAMDOC = NO
+
+# The WARN_FORMAT tag determines the format of the warning messages that doxygen
+# can produce. The string should contain the $file, $line, and $text tags, which
+# will be replaced by the file and line number from which the warning originated
+# and the warning text. Optionally the format may contain $version, which will
+# be replaced by the version of the file (if it could be obtained via
+# FILE_VERSION_FILTER)
+# The default value is: $file:$line: $text.
+
+WARN_FORMAT = "$file:$line: $text"
+
+# The WARN_LOGFILE tag can be used to specify a file to which warning and error
+# messages should be written. If left blank the output is written to standard
+# error (stderr).
+
+WARN_LOGFILE =
+
+#---------------------------------------------------------------------------
+# Configuration options related to the input files
+#---------------------------------------------------------------------------
+
+# The INPUT tag is used to specify the files and/or directories that contain
+# documented source files. You may enter file names like myfile.cpp or
+# directories like /usr/src/myproject. Separate the files or directories with
+# spaces.
+# Note: If this tag is empty the current directory is searched.
+
+INPUT = ../include
+
+# This tag can be used to specify the character encoding of the source files
+# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
+# libiconv (or the iconv built into libc) for the transcoding. See the libiconv
+# documentation (see: http://www.gnu.org/software/libiconv) for the list of
+# possible encodings.
+# The default value is: UTF-8.
+
+INPUT_ENCODING = UTF-8
+
+# If the value of the INPUT tag contains directories, you can use the
+# FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and
+# *.h) to filter out the source-files in the directories. If left blank the
+# following patterns are tested:*.c, *.cc, *.cxx, *.cpp, *.c++, *.java, *.ii,
+# *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h, *.hh, *.hxx, *.hpp,
+# *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc, *.m, *.markdown,
+# *.md, *.mm, *.dox, *.py, *.f90, *.f, *.for, *.tcl, *.vhd, *.vhdl, *.ucf,
+# *.qsf, *.as and *.js.
+
+FILE_PATTERNS = *.hpp
+
+# The RECURSIVE tag can be used to specify whether or not subdirectories should
+# be searched for input files as well.
+# The default value is: NO.
+
+RECURSIVE = YES
+
+# The EXCLUDE tag can be used to specify files and/or directories that should be
+# excluded from the INPUT source files. This way you can easily exclude a
+# subdirectory from a directory tree whose root is specified with the INPUT tag.
+#
+# Note that relative paths are relative to the directory from which doxygen is
+# run.
+
+EXCLUDE =
+
+# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or
+# directories that are symbolic links (a Unix file system feature) are excluded
+# from the input.
+# The default value is: NO.
+
+EXCLUDE_SYMLINKS = NO
+
+# If the value of the INPUT tag contains directories, you can use the
+# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude
+# certain files from those directories.
+#
+# Note that the wildcards are matched against the file with absolute path, so to
+# exclude all test directories for example use the pattern */test/*
+
+EXCLUDE_PATTERNS =
+
+# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
+# (namespaces, classes, functions, etc.) that should be excluded from the
+# output. The symbol name can be a fully qualified name, a word, or if the
+# wildcard * is used, a substring. Examples: ANamespace, AClass,
+# AClass::ANamespace, ANamespace::*Test
+#
+# Note that the wildcards are matched against the file with absolute path, so to
+# exclude all test directories use the pattern */test/*
+
+EXCLUDE_SYMBOLS =
+
+# The EXAMPLE_PATH tag can be used to specify one or more files or directories
+# that contain example code fragments that are included (see the \include
+# command).
+
+EXAMPLE_PATH =
+
+# If the value of the EXAMPLE_PATH tag contains directories, you can use the
+# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and
+# *.h) to filter out the source-files in the directories. If left blank all
+# files are included.
+
+EXAMPLE_PATTERNS =
+
+# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be
+# searched for input files to be used with the \include or \dontinclude commands
+# irrespective of the value of the RECURSIVE tag.
+# The default value is: NO.
+
+EXAMPLE_RECURSIVE = NO
+
+# The IMAGE_PATH tag can be used to specify one or more files or directories
+# that contain images that are to be included in the documentation (see the
+# \image command).
+
+IMAGE_PATH =
+
+# The INPUT_FILTER tag can be used to specify a program that doxygen should
+# invoke to filter for each input file. Doxygen will invoke the filter program
+# by executing (via popen()) the command:
+#
+# <filter> <input-file>
+#
+# where <filter> is the value of the INPUT_FILTER tag, and <input-file> is the
+# name of an input file. Doxygen will then use the output that the filter
+# program writes to standard output. If FILTER_PATTERNS is specified, this tag
+# will be ignored.
+#
+# Note that the filter must not add or remove lines; it is applied before the
+# code is scanned, but not when the output code is generated. If lines are added
+# or removed, the anchors will not be placed correctly.
+
+INPUT_FILTER =
+
+# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern
+# basis. Doxygen will compare the file name with each pattern and apply the
+# filter if there is a match. The filters are a list of the form: pattern=filter
+# (like *.cpp=my_cpp_filter). See INPUT_FILTER for further information on how
+# filters are used. If the FILTER_PATTERNS tag is empty or if none of the
+# patterns match the file name, INPUT_FILTER is applied.
+
+FILTER_PATTERNS =
+
+# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using
+# INPUT_FILTER ) will also be used to filter the input files that are used for
+# producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES).
+# The default value is: NO.
+
+FILTER_SOURCE_FILES = NO
+
+# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file
+# pattern. A pattern will override the setting for FILTER_PATTERN (if any) and
+# it is also possible to disable source filtering for a specific pattern using
+# *.ext= (so without naming a filter).
+# This tag requires that the tag FILTER_SOURCE_FILES is set to YES.
+
+FILTER_SOURCE_PATTERNS =
+
+# If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that
+# is part of the input, its contents will be placed on the main page
+# (index.html). This can be useful if you have a project on for instance GitHub
+# and want to reuse the introduction page also for the doxygen output.
+
+USE_MDFILE_AS_MAINPAGE =
+
+#---------------------------------------------------------------------------
+# Configuration options related to source browsing
+#---------------------------------------------------------------------------
+
+# If the SOURCE_BROWSER tag is set to YES then a list of source files will be
+# generated. Documented entities will be cross-referenced with these sources.
+#
+# Note: To get rid of all source code in the generated output, make sure that
+# also VERBATIM_HEADERS is set to NO.
+# The default value is: NO.
+
+SOURCE_BROWSER = NO
+
+# Setting the INLINE_SOURCES tag to YES will include the body of functions,
+# classes and enums directly into the documentation.
+# The default value is: NO.
+
+INLINE_SOURCES = NO
+
+# Setting the STRIP_CODE_COMMENTS tag to YES will instruct doxygen to hide any
+# special comment blocks from generated source code fragments. Normal C, C++ and
+# Fortran comments will always remain visible.
+# The default value is: YES.
+
+STRIP_CODE_COMMENTS = YES
+
+# If the REFERENCED_BY_RELATION tag is set to YES then for each documented
+# function all documented functions referencing it will be listed.
+# The default value is: NO.
+
+REFERENCED_BY_RELATION = NO
+
+# If the REFERENCES_RELATION tag is set to YES then for each documented function
+# all documented entities called/used by that function will be listed.
+# The default value is: NO.
+
+REFERENCES_RELATION = NO
+
+# If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set
+# to YES, then the hyperlinks from functions in REFERENCES_RELATION and
+# REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will
+# link to the documentation.
+# The default value is: YES.
+
+REFERENCES_LINK_SOURCE = YES
+
+# If SOURCE_TOOLTIPS is enabled (the default) then hovering a hyperlink in the
+# source code will show a tooltip with additional information such as prototype,
+# brief description and links to the definition and documentation. Since this
+# will make the HTML file larger and loading of large files a bit slower, you
+# can opt to disable this feature.
+# The default value is: YES.
+# This tag requires that the tag SOURCE_BROWSER is set to YES.
+
+SOURCE_TOOLTIPS = YES
+
+# If the USE_HTAGS tag is set to YES then the references to source code will
+# point to the HTML generated by the htags(1) tool instead of doxygen built-in
+# source browser. The htags tool is part of GNU's global source tagging system
+# (see http://www.gnu.org/software/global/global.html). You will need version
+# 4.8.6 or higher.
+#
+# To use it do the following:
+# - Install the latest version of global
+# - Enable SOURCE_BROWSER and USE_HTAGS in the config file
+# - Make sure the INPUT points to the root of the source tree
+# - Run doxygen as normal
+#
+# Doxygen will invoke htags (and that will in turn invoke gtags), so these
+# tools must be available from the command line (i.e. in the search path).
+#
+# The result: instead of the source browser generated by doxygen, the links to
+# source code will now point to the output of htags.
+# The default value is: NO.
+# This tag requires that the tag SOURCE_BROWSER is set to YES.
+
+USE_HTAGS = NO
+
+# If the VERBATIM_HEADERS tag is set the YES then doxygen will generate a
+# verbatim copy of the header file for each class for which an include is
+# specified. Set to NO to disable this.
+# See also: Section \class.
+# The default value is: YES.
+
+VERBATIM_HEADERS = YES
+
+#---------------------------------------------------------------------------
+# Configuration options related to the alphabetical class index
+#---------------------------------------------------------------------------
+
+# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index of all
+# compounds will be generated. Enable this if the project contains a lot of
+# classes, structs, unions or interfaces.
+# The default value is: YES.
+
+ALPHABETICAL_INDEX = YES
+
+# The COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns in
+# which the alphabetical index list will be split.
+# Minimum value: 1, maximum value: 20, default value: 5.
+# This tag requires that the tag ALPHABETICAL_INDEX is set to YES.
+
+COLS_IN_ALPHA_INDEX = 5
+
+# In case all classes in a project start with a common prefix, all classes will
+# be put under the same header in the alphabetical index. The IGNORE_PREFIX tag
+# can be used to specify a prefix (or a list of prefixes) that should be ignored
+# while generating the index headers.
+# This tag requires that the tag ALPHABETICAL_INDEX is set to YES.
+
+IGNORE_PREFIX =
+
+#---------------------------------------------------------------------------
+# Configuration options related to the HTML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_HTML tag is set to YES doxygen will generate HTML output
+# The default value is: YES.
+
+GENERATE_HTML = YES
+
+# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. If a
+# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
+# it.
+# The default directory is: html.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_OUTPUT = html
+
+# The HTML_FILE_EXTENSION tag can be used to specify the file extension for each
+# generated HTML page (for example: .htm, .php, .asp).
+# The default value is: .html.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_FILE_EXTENSION = .html
+
+# The HTML_HEADER tag can be used to specify a user-defined HTML header file for
+# each generated HTML page. If the tag is left blank doxygen will generate a
+# standard header.
+#
+# To get valid HTML the header file that includes any scripts and style sheets
+# that doxygen needs, which is dependent on the configuration options used (e.g.
+# the setting GENERATE_TREEVIEW). It is highly recommended to start with a
+# default header using
+# doxygen -w html new_header.html new_footer.html new_stylesheet.css
+# YourConfigFile
+# and then modify the file new_header.html. See also section "Doxygen usage"
+# for information on how to generate the default header that doxygen normally
+# uses.
+# Note: The header is subject to change so you typically have to regenerate the
+# default header when upgrading to a newer version of doxygen. For a description
+# of the possible markers and block names see the documentation.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_HEADER =
+
+# The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each
+# generated HTML page. If the tag is left blank doxygen will generate a standard
+# footer. See HTML_HEADER for more information on how to generate a default
+# footer and what special commands can be used inside the footer. See also
+# section "Doxygen usage" for information on how to generate the default footer
+# that doxygen normally uses.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_FOOTER =
+
+# The HTML_STYLESHEET tag can be used to specify a user-defined cascading style
+# sheet that is used by each HTML page. It can be used to fine-tune the look of
+# the HTML output. If left blank doxygen will generate a default style sheet.
+# See also section "Doxygen usage" for information on how to generate the style
+# sheet that doxygen normally uses.
+# Note: It is recommended to use HTML_EXTRA_STYLESHEET instead of this tag, as
+# it is more robust and this tag (HTML_STYLESHEET) will in the future become
+# obsolete.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_STYLESHEET =
+
+# The HTML_EXTRA_STYLESHEET tag can be used to specify an additional user-
+# defined cascading style sheet that is included after the standard style sheets
+# created by doxygen. Using this option one can overrule certain style aspects.
+# This is preferred over using HTML_STYLESHEET since it does not replace the
+# standard style sheet and is therefor more robust against future updates.
+# Doxygen will copy the style sheet file to the output directory. For an example
+# see the documentation.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_EXTRA_STYLESHEET =
+
+# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or
+# other source files which should be copied to the HTML output directory. Note
+# that these files will be copied to the base HTML output directory. Use the
+# $relpath^ marker in the HTML_HEADER and/or HTML_FOOTER files to load these
+# files. In the HTML_STYLESHEET file, use the file name only. Also note that the
+# files will be copied as-is; there are no commands or markers available.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_EXTRA_FILES =
+
+# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen
+# will adjust the colors in the stylesheet and background images according to
+# this color. Hue is specified as an angle on a colorwheel, see
+# http://en.wikipedia.org/wiki/Hue for more information. For instance the value
+# 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300
+# purple, and 360 is red again.
+# Minimum value: 0, maximum value: 359, default value: 220.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_COLORSTYLE_HUE = 220
+
+# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of the colors
+# in the HTML output. For a value of 0 the output will use grayscales only. A
+# value of 255 will produce the most vivid colors.
+# Minimum value: 0, maximum value: 255, default value: 100.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_COLORSTYLE_SAT = 100
+
+# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to the
+# luminance component of the colors in the HTML output. Values below 100
+# gradually make the output lighter, whereas values above 100 make the output
+# darker. The value divided by 100 is the actual gamma applied, so 80 represents
+# a gamma of 0.8, The value 220 represents a gamma of 2.2, and 100 does not
+# change the gamma.
+# Minimum value: 40, maximum value: 240, default value: 80.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_COLORSTYLE_GAMMA = 80
+
+# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML
+# page will contain the date and time when the page was generated. Setting this
+# to NO can help when comparing the output of multiple runs.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_TIMESTAMP = YES
+
+# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML
+# documentation will contain sections that can be hidden and shown after the
+# page has loaded.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_DYNAMIC_SECTIONS = NO
+
+# With HTML_INDEX_NUM_ENTRIES one can control the preferred number of entries
+# shown in the various tree structured indices initially; the user can expand
+# and collapse entries dynamically later on. Doxygen will expand the tree to
+# such a level that at most the specified number of entries are visible (unless
+# a fully collapsed tree already exceeds this amount). So setting the number of
+# entries 1 will produce a full collapsed tree by default. 0 is a special value
+# representing an infinite number of entries and will result in a full expanded
+# tree by default.
+# Minimum value: 0, maximum value: 9999, default value: 100.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_INDEX_NUM_ENTRIES = 100
+
+# If the GENERATE_DOCSET tag is set to YES, additional index files will be
+# generated that can be used as input for Apple's Xcode 3 integrated development
+# environment (see: http://developer.apple.com/tools/xcode/), introduced with
+# OSX 10.5 (Leopard). To create a documentation set, doxygen will generate a
+# Makefile in the HTML output directory. Running make will produce the docset in
+# that directory and running make install will install the docset in
+# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at
+# startup. See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html
+# for more information.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+GENERATE_DOCSET = NO
+
+# This tag determines the name of the docset feed. A documentation feed provides
+# an umbrella under which multiple documentation sets from a single provider
+# (such as a company or product suite) can be grouped.
+# The default value is: Doxygen generated docs.
+# This tag requires that the tag GENERATE_DOCSET is set to YES.
+
+DOCSET_FEEDNAME = "Doxygen generated docs"
+
+# This tag specifies a string that should uniquely identify the documentation
+# set bundle. This should be a reverse domain-name style string, e.g.
+# com.mycompany.MyDocSet. Doxygen will append .docset to the name.
+# The default value is: org.doxygen.Project.
+# This tag requires that the tag GENERATE_DOCSET is set to YES.
+
+DOCSET_BUNDLE_ID = org.doxygen.Project
+
+# The DOCSET_PUBLISHER_ID tag specifies a string that should uniquely identify
+# the documentation publisher. This should be a reverse domain-name style
+# string, e.g. com.mycompany.MyDocSet.documentation.
+# The default value is: org.doxygen.Publisher.
+# This tag requires that the tag GENERATE_DOCSET is set to YES.
+
+DOCSET_PUBLISHER_ID = org.doxygen.Publisher
+
+# The DOCSET_PUBLISHER_NAME tag identifies the documentation publisher.
+# The default value is: Publisher.
+# This tag requires that the tag GENERATE_DOCSET is set to YES.
+
+DOCSET_PUBLISHER_NAME = Publisher
+
+# If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three
+# additional HTML index files: index.hhp, index.hhc, and index.hhk. The
+# index.hhp is a project file that can be read by Microsoft's HTML Help Workshop
+# (see: http://www.microsoft.com/en-us/download/details.aspx?id=21138) on
+# Windows.
+#
+# The HTML Help Workshop contains a compiler that can convert all HTML output
+# generated by doxygen into a single compiled HTML file (.chm). Compiled HTML
+# files are now used as the Windows 98 help format, and will replace the old
+# Windows help format (.hlp) on all Windows platforms in the future. Compressed
+# HTML files also contain an index, a table of contents, and you can search for
+# words in the documentation. The HTML workshop also contains a viewer for
+# compressed HTML files.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+GENERATE_HTMLHELP = NO
+
+# The CHM_FILE tag can be used to specify the file name of the resulting .chm
+# file. You can add a path in front of the file if the result should not be
+# written to the html output directory.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
+
+CHM_FILE =
+
+# The HHC_LOCATION tag can be used to specify the location (absolute path
+# including file name) of the HTML help compiler ( hhc.exe). If non-empty
+# doxygen will try to run the HTML help compiler on the generated index.hhp.
+# The file has to be specified with full path.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
+
+HHC_LOCATION =
+
+# The GENERATE_CHI flag controls if a separate .chi index file is generated (
+# YES) or that it should be included in the master .chm file ( NO).
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
+
+GENERATE_CHI = NO
+
+# The CHM_INDEX_ENCODING is used to encode HtmlHelp index ( hhk), content ( hhc)
+# and project file content.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
+
+CHM_INDEX_ENCODING =
+
+# The BINARY_TOC flag controls whether a binary table of contents is generated (
+# YES) or a normal table of contents ( NO) in the .chm file.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
+
+BINARY_TOC = NO
+
+# The TOC_EXPAND flag can be set to YES to add extra items for group members to
+# the table of contents of the HTML help documentation and to the tree view.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
+
+TOC_EXPAND = NO
+
+# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and
+# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated that
+# can be used as input for Qt's qhelpgenerator to generate a Qt Compressed Help
+# (.qch) of the generated HTML documentation.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+GENERATE_QHP = NO
+
+# If the QHG_LOCATION tag is specified, the QCH_FILE tag can be used to specify
+# the file name of the resulting .qch file. The path specified is relative to
+# the HTML output folder.
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QCH_FILE =
+
+# The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help
+# Project output. For more information please see Qt Help Project / Namespace
+# (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#namespace).
+# The default value is: org.doxygen.Project.
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QHP_NAMESPACE = org.doxygen.Project
+
+# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt
+# Help Project output. For more information please see Qt Help Project / Virtual
+# Folders (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#virtual-
+# folders).
+# The default value is: doc.
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QHP_VIRTUAL_FOLDER = doc
+
+# If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom
+# filter to add. For more information please see Qt Help Project / Custom
+# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom-
+# filters).
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QHP_CUST_FILTER_NAME =
+
+# The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the
+# custom filter to add. For more information please see Qt Help Project / Custom
+# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom-
+# filters).
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QHP_CUST_FILTER_ATTRS =
+
+# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this
+# project's filter section matches. Qt Help Project / Filter Attributes (see:
+# http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes).
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QHP_SECT_FILTER_ATTRS =
+
+# The QHG_LOCATION tag can be used to specify the location of Qt's
+# qhelpgenerator. If non-empty doxygen will try to run qhelpgenerator on the
+# generated .qhp file.
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QHG_LOCATION =
+
+# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be
+# generated, together with the HTML files, they form an Eclipse help plugin. To
+# install this plugin and make it available under the help contents menu in
+# Eclipse, the contents of the directory containing the HTML and XML files needs
+# to be copied into the plugins directory of eclipse. The name of the directory
+# within the plugins directory should be the same as the ECLIPSE_DOC_ID value.
+# After copying Eclipse needs to be restarted before the help appears.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+GENERATE_ECLIPSEHELP = NO
+
+# A unique identifier for the Eclipse help plugin. When installing the plugin
+# the directory name containing the HTML and XML files should also have this
+# name. Each documentation set should have its own identifier.
+# The default value is: org.doxygen.Project.
+# This tag requires that the tag GENERATE_ECLIPSEHELP is set to YES.
+
+ECLIPSE_DOC_ID = org.doxygen.Project
+
+# If you want full control over the layout of the generated HTML pages it might
+# be necessary to disable the index and replace it with your own. The
+# DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) at top
+# of each HTML page. A value of NO enables the index and the value YES disables
+# it. Since the tabs in the index contain the same information as the navigation
+# tree, you can set this option to YES if you also set GENERATE_TREEVIEW to YES.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+DISABLE_INDEX = NO
+
+# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index
+# structure should be generated to display hierarchical information. If the tag
+# value is set to YES, a side panel will be generated containing a tree-like
+# index structure (just like the one that is generated for HTML Help). For this
+# to work a browser that supports JavaScript, DHTML, CSS and frames is required
+# (i.e. any modern browser). Windows users are probably better off using the
+# HTML help feature. Via custom stylesheets (see HTML_EXTRA_STYLESHEET) one can
+# further fine-tune the look of the index. As an example, the default style
+# sheet generated by doxygen has an example that shows how to put an image at
+# the root of the tree instead of the PROJECT_NAME. Since the tree basically has
+# the same information as the tab index, you could consider setting
+# DISABLE_INDEX to YES when enabling this option.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+GENERATE_TREEVIEW = NO
+
+# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that
+# doxygen will group on one line in the generated HTML documentation.
+#
+# Note that a value of 0 will completely suppress the enum values from appearing
+# in the overview section.
+# Minimum value: 0, maximum value: 20, default value: 4.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+ENUM_VALUES_PER_LINE = 4
+
+# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be used
+# to set the initial width (in pixels) of the frame in which the tree is shown.
+# Minimum value: 0, maximum value: 1500, default value: 250.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+TREEVIEW_WIDTH = 250
+
+# When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open links to
+# external symbols imported via tag files in a separate window.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+EXT_LINKS_IN_WINDOW = NO
+
+# Use this tag to change the font size of LaTeX formulas included as images in
+# the HTML documentation. When you change the font size after a successful
+# doxygen run you need to manually remove any form_*.png images from the HTML
+# output directory to force them to be regenerated.
+# Minimum value: 8, maximum value: 50, default value: 10.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+FORMULA_FONTSIZE = 10
+
+# Use the FORMULA_TRANPARENT tag to determine whether or not the images
+# generated for formulas are transparent PNGs. Transparent PNGs are not
+# supported properly for IE 6.0, but are supported on all modern browsers.
+#
+# Note that when changing this option you need to delete any form_*.png files in
+# the HTML output directory before the changes have effect.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+FORMULA_TRANSPARENT = YES
+
+# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see
+# http://www.mathjax.org) which uses client side Javascript for the rendering
+# instead of using prerendered bitmaps. Use this if you do not have LaTeX
+# installed or if you want to formulas look prettier in the HTML output. When
+# enabled you may also need to install MathJax separately and configure the path
+# to it using the MATHJAX_RELPATH option.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+USE_MATHJAX = NO
+
+# When MathJax is enabled you can set the default output format to be used for
+# the MathJax output. See the MathJax site (see:
+# http://docs.mathjax.org/en/latest/output.html) for more details.
+# Possible values are: HTML-CSS (which is slower, but has the best
+# compatibility), NativeMML (i.e. MathML) and SVG.
+# The default value is: HTML-CSS.
+# This tag requires that the tag USE_MATHJAX is set to YES.
+
+MATHJAX_FORMAT = HTML-CSS
+
+# When MathJax is enabled you need to specify the location relative to the HTML
+# output directory using the MATHJAX_RELPATH option. The destination directory
+# should contain the MathJax.js script. For instance, if the mathjax directory
+# is located at the same level as the HTML output directory, then
+# MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax
+# Content Delivery Network so you can quickly see the result without installing
+# MathJax. However, it is strongly recommended to install a local copy of
+# MathJax from http://www.mathjax.org before deployment.
+# The default value is: http://cdn.mathjax.org/mathjax/latest.
+# This tag requires that the tag USE_MATHJAX is set to YES.
+
+MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest
+
+# The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax
+# extension names that should be enabled during MathJax rendering. For example
+# MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols
+# This tag requires that the tag USE_MATHJAX is set to YES.
+
+MATHJAX_EXTENSIONS =
+
+# The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces
+# of code that will be used on startup of the MathJax code. See the MathJax site
+# (see: http://docs.mathjax.org/en/latest/output.html) for more details. For an
+# example see the documentation.
+# This tag requires that the tag USE_MATHJAX is set to YES.
+
+MATHJAX_CODEFILE =
+
+# When the SEARCHENGINE tag is enabled doxygen will generate a search box for
+# the HTML output. The underlying search engine uses javascript and DHTML and
+# should work on any modern browser. Note that when using HTML help
+# (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET)
+# there is already a search function so this one should typically be disabled.
+# For large projects the javascript based search engine can be slow, then
+# enabling SERVER_BASED_SEARCH may provide a better solution. It is possible to
+# search using the keyboard; to jump to the search box use <access key> + S
+# (what the <access key> is depends on the OS and browser, but it is typically
+# <CTRL>, <ALT>/<option>, or both). Inside the search box use the <cursor down
+# key> to jump into the search results window, the results can be navigated
+# using the <cursor keys>. Press <Enter> to select an item or <escape> to cancel
+# the search. The filter options can be selected when the cursor is inside the
+# search box by pressing <Shift>+<cursor down>. Also here use the <cursor keys>
+# to select a filter and <Enter> or <escape> to activate or cancel the filter
+# option.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+SEARCHENGINE = YES
+
+# When the SERVER_BASED_SEARCH tag is enabled the search engine will be
+# implemented using a web server instead of a web client using Javascript. There
+# are two flavours of web server based searching depending on the
+# EXTERNAL_SEARCH setting. When disabled, doxygen will generate a PHP script for
+# searching and an index file used by the script. When EXTERNAL_SEARCH is
+# enabled the indexing and searching needs to be provided by external tools. See
+# the section "External Indexing and Searching" for details.
+# The default value is: NO.
+# This tag requires that the tag SEARCHENGINE is set to YES.
+
+SERVER_BASED_SEARCH = NO
+
+# When EXTERNAL_SEARCH tag is enabled doxygen will no longer generate the PHP
+# script for searching. Instead the search results are written to an XML file
+# which needs to be processed by an external indexer. Doxygen will invoke an
+# external search engine pointed to by the SEARCHENGINE_URL option to obtain the
+# search results.
+#
+# Doxygen ships with an example indexer ( doxyindexer) and search engine
+# (doxysearch.cgi) which are based on the open source search engine library
+# Xapian (see: http://xapian.org/).
+#
+# See the section "External Indexing and Searching" for details.
+# The default value is: NO.
+# This tag requires that the tag SEARCHENGINE is set to YES.
+
+EXTERNAL_SEARCH = NO
+
+# The SEARCHENGINE_URL should point to a search engine hosted by a web server
+# which will return the search results when EXTERNAL_SEARCH is enabled.
+#
+# Doxygen ships with an example indexer ( doxyindexer) and search engine
+# (doxysearch.cgi) which are based on the open source search engine library
+# Xapian (see: http://xapian.org/). See the section "External Indexing and
+# Searching" for details.
+# This tag requires that the tag SEARCHENGINE is set to YES.
+
+SEARCHENGINE_URL =
+
+# When SERVER_BASED_SEARCH and EXTERNAL_SEARCH are both enabled the unindexed
+# search data is written to a file for indexing by an external tool. With the
+# SEARCHDATA_FILE tag the name of this file can be specified.
+# The default file is: searchdata.xml.
+# This tag requires that the tag SEARCHENGINE is set to YES.
+
+SEARCHDATA_FILE = searchdata.xml
+
+# When SERVER_BASED_SEARCH and EXTERNAL_SEARCH are both enabled the
+# EXTERNAL_SEARCH_ID tag can be used as an identifier for the project. This is
+# useful in combination with EXTRA_SEARCH_MAPPINGS to search through multiple
+# projects and redirect the results back to the right project.
+# This tag requires that the tag SEARCHENGINE is set to YES.
+
+EXTERNAL_SEARCH_ID =
+
+# The EXTRA_SEARCH_MAPPINGS tag can be used to enable searching through doxygen
+# projects other than the one defined by this configuration file, but that are
+# all added to the same external search index. Each project needs to have a
+# unique id set via EXTERNAL_SEARCH_ID. The search mapping then maps the id of
+# to a relative location where the documentation can be found. The format is:
+# EXTRA_SEARCH_MAPPINGS = tagname1=loc1 tagname2=loc2 ...
+# This tag requires that the tag SEARCHENGINE is set to YES.
+
+EXTRA_SEARCH_MAPPINGS =
+
+#---------------------------------------------------------------------------
+# Configuration options related to the LaTeX output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_LATEX tag is set to YES doxygen will generate LaTeX output.
+# The default value is: YES.
+
+GENERATE_LATEX = NO
+
+# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. If a
+# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
+# it.
+# The default directory is: latex.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_OUTPUT = latex
+
+# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be
+# invoked.
+#
+# Note that when enabling USE_PDFLATEX this option is only used for generating
+# bitmaps for formulas in the HTML output, but not in the Makefile that is
+# written to the output directory.
+# The default file is: latex.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_CMD_NAME = latex
+
+# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to generate
+# index for LaTeX.
+# The default file is: makeindex.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+MAKEINDEX_CMD_NAME = makeindex
+
+# If the COMPACT_LATEX tag is set to YES doxygen generates more compact LaTeX
+# documents. This may be useful for small projects and may help to save some
+# trees in general.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+COMPACT_LATEX = NO
+
+# The PAPER_TYPE tag can be used to set the paper type that is used by the
+# printer.
+# Possible values are: a4 (210 x 297 mm), letter (8.5 x 11 inches), legal (8.5 x
+# 14 inches) and executive (7.25 x 10.5 inches).
+# The default value is: a4.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+PAPER_TYPE = a4
+
+# The EXTRA_PACKAGES tag can be used to specify one or more LaTeX package names
+# that should be included in the LaTeX output. To get the times font for
+# instance you can specify
+# EXTRA_PACKAGES=times
+# If left blank no extra packages will be included.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+EXTRA_PACKAGES =
+
+# The LATEX_HEADER tag can be used to specify a personal LaTeX header for the
+# generated LaTeX document. The header should contain everything until the first
+# chapter. If it is left blank doxygen will generate a standard header. See
+# section "Doxygen usage" for information on how to let doxygen write the
+# default header to a separate file.
+#
+# Note: Only use a user-defined header if you know what you are doing! The
+# following commands have a special meaning inside the header: $title,
+# $datetime, $date, $doxygenversion, $projectname, $projectnumber. Doxygen will
+# replace them by respectively the title of the page, the current date and time,
+# only the current date, the version number of doxygen, the project name (see
+# PROJECT_NAME), or the project number (see PROJECT_NUMBER).
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_HEADER =
+
+# The LATEX_FOOTER tag can be used to specify a personal LaTeX footer for the
+# generated LaTeX document. The footer should contain everything after the last
+# chapter. If it is left blank doxygen will generate a standard footer.
+#
+# Note: Only use a user-defined footer if you know what you are doing!
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_FOOTER =
+
+# The LATEX_EXTRA_FILES tag can be used to specify one or more extra images or
+# other source files which should be copied to the LATEX_OUTPUT output
+# directory. Note that the files will be copied as-is; there are no commands or
+# markers available.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_EXTRA_FILES =
+
+# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated is
+# prepared for conversion to PDF (using ps2pdf or pdflatex). The PDF file will
+# contain links (just like the HTML output) instead of page references. This
+# makes the output suitable for online browsing using a PDF viewer.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+PDF_HYPERLINKS = YES
+
+# If the LATEX_PDFLATEX tag is set to YES, doxygen will use pdflatex to generate
+# the PDF file directly from the LaTeX files. Set this option to YES to get a
+# higher quality PDF documentation.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+USE_PDFLATEX = YES
+
+# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \batchmode
+# command to the generated LaTeX files. This will instruct LaTeX to keep running
+# if errors occur, instead of asking the user for help. This option is also used
+# when generating formulas in HTML.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_BATCHMODE = NO
+
+# If the LATEX_HIDE_INDICES tag is set to YES then doxygen will not include the
+# index chapters (such as File Index, Compound Index, etc.) in the output.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_HIDE_INDICES = NO
+
+# If the LATEX_SOURCE_CODE tag is set to YES then doxygen will include source
+# code with syntax highlighting in the LaTeX output.
+#
+# Note that which sources are shown also depends on other settings such as
+# SOURCE_BROWSER.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_SOURCE_CODE = NO
+
+# The LATEX_BIB_STYLE tag can be used to specify the style to use for the
+# bibliography, e.g. plainnat, or ieeetr. See
+# http://en.wikipedia.org/wiki/BibTeX and \cite for more info.
+# The default value is: plain.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_BIB_STYLE = plain
+
+#---------------------------------------------------------------------------
+# Configuration options related to the RTF output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_RTF tag is set to YES doxygen will generate RTF output. The
+# RTF output is optimized for Word 97 and may not look too pretty with other RTF
+# readers/editors.
+# The default value is: NO.
+
+GENERATE_RTF = NO
+
+# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. If a
+# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
+# it.
+# The default directory is: rtf.
+# This tag requires that the tag GENERATE_RTF is set to YES.
+
+RTF_OUTPUT = rtf
+
+# If the COMPACT_RTF tag is set to YES doxygen generates more compact RTF
+# documents. This may be useful for small projects and may help to save some
+# trees in general.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_RTF is set to YES.
+
+COMPACT_RTF = NO
+
+# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated will
+# contain hyperlink fields. The RTF file will contain links (just like the HTML
+# output) instead of page references. This makes the output suitable for online
+# browsing using Word or some other Word compatible readers that support those
+# fields.
+#
+# Note: WordPad (write) and others do not support links.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_RTF is set to YES.
+
+RTF_HYPERLINKS = NO
+
+# Load stylesheet definitions from file. Syntax is similar to doxygen's config
+# file, i.e. a series of assignments. You only have to provide replacements,
+# missing definitions are set to their default value.
+#
+# See also section "Doxygen usage" for information on how to generate the
+# default style sheet that doxygen normally uses.
+# This tag requires that the tag GENERATE_RTF is set to YES.
+
+RTF_STYLESHEET_FILE =
+
+# Set optional variables used in the generation of an RTF document. Syntax is
+# similar to doxygen's config file. A template extensions file can be generated
+# using doxygen -e rtf extensionFile.
+# This tag requires that the tag GENERATE_RTF is set to YES.
+
+RTF_EXTENSIONS_FILE =
+
+#---------------------------------------------------------------------------
+# Configuration options related to the man page output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_MAN tag is set to YES doxygen will generate man pages for
+# classes and files.
+# The default value is: NO.
+
+GENERATE_MAN = NO
+
+# The MAN_OUTPUT tag is used to specify where the man pages will be put. If a
+# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
+# it. A directory man3 will be created inside the directory specified by
+# MAN_OUTPUT.
+# The default directory is: man.
+# This tag requires that the tag GENERATE_MAN is set to YES.
+
+MAN_OUTPUT = man
+
+# The MAN_EXTENSION tag determines the extension that is added to the generated
+# man pages. In case the manual section does not start with a number, the number
+# 3 is prepended. The dot (.) at the beginning of the MAN_EXTENSION tag is
+# optional.
+# The default value is: .3.
+# This tag requires that the tag GENERATE_MAN is set to YES.
+
+MAN_EXTENSION = .3
+
+# If the MAN_LINKS tag is set to YES and doxygen generates man output, then it
+# will generate one additional man file for each entity documented in the real
+# man page(s). These additional files only source the real man page, but without
+# them the man command would be unable to find the correct page.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_MAN is set to YES.
+
+MAN_LINKS = NO
+
+#---------------------------------------------------------------------------
+# Configuration options related to the XML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_XML tag is set to YES doxygen will generate an XML file that
+# captures the structure of the code including all documentation.
+# The default value is: NO.
+
+GENERATE_XML = YES
+
+# The XML_OUTPUT tag is used to specify where the XML pages will be put. If a
+# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
+# it.
+# The default directory is: xml.
+# This tag requires that the tag GENERATE_XML is set to YES.
+
+XML_OUTPUT = xml
+
+# If the XML_PROGRAMLISTING tag is set to YES doxygen will dump the program
+# listings (including syntax highlighting and cross-referencing information) to
+# the XML output. Note that enabling this will significantly increase the size
+# of the XML output.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_XML is set to YES.
+
+XML_PROGRAMLISTING = YES
+
+#---------------------------------------------------------------------------
+# Configuration options related to the DOCBOOK output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_DOCBOOK tag is set to YES doxygen will generate Docbook files
+# that can be used to generate PDF.
+# The default value is: NO.
+
+GENERATE_DOCBOOK = NO
+
+# The DOCBOOK_OUTPUT tag is used to specify where the Docbook pages will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be put in
+# front of it.
+# The default directory is: docbook.
+# This tag requires that the tag GENERATE_DOCBOOK is set to YES.
+
+DOCBOOK_OUTPUT = docbook
+
+#---------------------------------------------------------------------------
+# Configuration options for the AutoGen Definitions output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_AUTOGEN_DEF tag is set to YES doxygen will generate an AutoGen
+# Definitions (see http://autogen.sf.net) file that captures the structure of
+# the code including all documentation. Note that this feature is still
+# experimental and incomplete at the moment.
+# The default value is: NO.
+
+GENERATE_AUTOGEN_DEF = NO
+
+#---------------------------------------------------------------------------
+# Configuration options related to the Perl module output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_PERLMOD tag is set to YES doxygen will generate a Perl module
+# file that captures the structure of the code including all documentation.
+#
+# Note that this feature is still experimental and incomplete at the moment.
+# The default value is: NO.
+
+GENERATE_PERLMOD = NO
+
+# If the PERLMOD_LATEX tag is set to YES doxygen will generate the necessary
+# Makefile rules, Perl scripts and LaTeX code to be able to generate PDF and DVI
+# output from the Perl module output.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_PERLMOD is set to YES.
+
+PERLMOD_LATEX = NO
+
+# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be nicely
+# formatted so it can be parsed by a human reader. This is useful if you want to
+# understand what is going on. On the other hand, if this tag is set to NO the
+# size of the Perl module output will be much smaller and Perl will parse it
+# just the same.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_PERLMOD is set to YES.
+
+PERLMOD_PRETTY = YES
+
+# The names of the make variables in the generated doxyrules.make file are
+# prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. This is useful
+# so different doxyrules.make files included by the same Makefile don't
+# overwrite each other's variables.
+# This tag requires that the tag GENERATE_PERLMOD is set to YES.
+
+PERLMOD_MAKEVAR_PREFIX =
+
+#---------------------------------------------------------------------------
+# Configuration options related to the preprocessor
+#---------------------------------------------------------------------------
+
+# If the ENABLE_PREPROCESSING tag is set to YES doxygen will evaluate all
+# C-preprocessor directives found in the sources and include files.
+# The default value is: YES.
+
+ENABLE_PREPROCESSING = YES
+
+# If the MACRO_EXPANSION tag is set to YES doxygen will expand all macro names
+# in the source code. If set to NO only conditional compilation will be
+# performed. Macro expansion can be done in a controlled way by setting
+# EXPAND_ONLY_PREDEF to YES.
+# The default value is: NO.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
+MACRO_EXPANSION = YES
+
+# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES then
+# the macro expansion is limited to the macros specified with the PREDEFINED and
+# EXPAND_AS_DEFINED tags.
+# The default value is: NO.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
+EXPAND_ONLY_PREDEF = NO
+
+# If the SEARCH_INCLUDES tag is set to YES the includes files in the
+# INCLUDE_PATH will be searched if a #include is found.
+# The default value is: YES.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
+SEARCH_INCLUDES = YES
+
+# The INCLUDE_PATH tag can be used to specify one or more directories that
+# contain include files that are not input files but should be processed by the
+# preprocessor.
+# This tag requires that the tag SEARCH_INCLUDES is set to YES.
+
+INCLUDE_PATH =
+
+# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
+# patterns (like *.h and *.hpp) to filter out the header-files in the
+# directories. If left blank, the patterns specified with FILE_PATTERNS will be
+# used.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
+INCLUDE_FILE_PATTERNS =
+
+# The PREDEFINED tag can be used to specify one or more macro names that are
+# defined before the preprocessor is started (similar to the -D option of e.g.
+# gcc). The argument of the tag is a list of macros of the form: name or
+# name=definition (no spaces). If the definition and the "=" are omitted, "=1"
+# is assumed. To prevent a macro definition from being undefined via #undef or
+# recursively expanded use the := operator instead of the = operator.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
+PREDEFINED = IXION_DLLPUBLIC IXION_DLLPUBLIC_VAR IXION_DEPRECATED
+
+# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this
+# tag can be used to specify a list of macro names that should be expanded. The
+# macro definition that is found in the sources will be used. Use the PREDEFINED
+# tag if you want to use a different macro definition that overrules the
+# definition found in the source code.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
+EXPAND_AS_DEFINED =
+
+# If the SKIP_FUNCTION_MACROS tag is set to YES then doxygen's preprocessor will
+# remove all refrences to function-like macros that are alone on a line, have an
+# all uppercase name, and do not end with a semicolon. Such function macros are
+# typically used for boiler-plate code, and will confuse the parser if not
+# removed.
+# The default value is: YES.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
+SKIP_FUNCTION_MACROS = YES
+
+#---------------------------------------------------------------------------
+# Configuration options related to external references
+#---------------------------------------------------------------------------
+
+# The TAGFILES tag can be used to specify one or more tag files. For each tag
+# file the location of the external documentation should be added. The format of
+# a tag file without this location is as follows:
+# TAGFILES = file1 file2 ...
+# Adding location for the tag files is done as follows:
+# TAGFILES = file1=loc1 "file2 = loc2" ...
+# where loc1 and loc2 can be relative or absolute paths or URLs. See the
+# section "Linking to external documentation" for more information about the use
+# of tag files.
+# Note: Each tag file must have an unique name (where the name does NOT include
+# the path). If a tag file is not located in the directory in which doxygen is
+# run, you must also specify the path to the tagfile here.
+
+TAGFILES =
+
+# When a file name is specified after GENERATE_TAGFILE, doxygen will create a
+# tag file that is based on the input files it reads. See section "Linking to
+# external documentation" for more information about the usage of tag files.
+
+GENERATE_TAGFILE =
+
+# If the ALLEXTERNALS tag is set to YES all external class will be listed in the
+# class index. If set to NO only the inherited external classes will be listed.
+# The default value is: NO.
+
+ALLEXTERNALS = NO
+
+# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed in
+# the modules index. If set to NO, only the current project's groups will be
+# listed.
+# The default value is: YES.
+
+EXTERNAL_GROUPS = YES
+
+# If the EXTERNAL_PAGES tag is set to YES all external pages will be listed in
+# the related pages index. If set to NO, only the current project's pages will
+# be listed.
+# The default value is: YES.
+
+EXTERNAL_PAGES = YES
+
+#---------------------------------------------------------------------------
+# Configuration options related to the dot tool
+#---------------------------------------------------------------------------
+
+# If the CLASS_DIAGRAMS tag is set to YES doxygen will generate a class diagram
+# (in HTML and LaTeX) for classes with base or super classes. Setting the tag to
+# NO turns the diagrams off. Note that this option also works with HAVE_DOT
+# disabled, but it is recommended to install and use dot, since it yields more
+# powerful graphs.
+# The default value is: YES.
+
+CLASS_DIAGRAMS = YES
+
+# You can include diagrams made with dia in doxygen documentation. Doxygen will
+# then run dia to produce the diagram and insert it in the documentation. The
+# DIA_PATH tag allows you to specify the directory where the dia binary resides.
+# If left empty dia is assumed to be found in the default search path.
+
+DIA_PATH =
+
+# If set to YES, the inheritance and collaboration graphs will hide inheritance
+# and usage relations if the target is undocumented or is not a class.
+# The default value is: YES.
+
+HIDE_UNDOC_RELATIONS = YES
+
+# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is
+# available from the path. This tool is part of Graphviz (see:
+# http://www.graphviz.org/), a graph visualization toolkit from AT&T and Lucent
+# Bell Labs. The other options in this section have no effect if this option is
+# set to NO
+# The default value is: NO.
+
+HAVE_DOT = NO
+
+# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is allowed
+# to run in parallel. When set to 0 doxygen will base this on the number of
+# processors available in the system. You can set it explicitly to a value
+# larger than 0 to get control over the balance between CPU load and processing
+# speed.
+# Minimum value: 0, maximum value: 32, default value: 0.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_NUM_THREADS = 0
+
+# When you want a differently looking font n the dot files that doxygen
+# generates you can specify the font name using DOT_FONTNAME. You need to make
+# sure dot is able to find the font, which can be done by putting it in a
+# standard location or by setting the DOTFONTPATH environment variable or by
+# setting DOT_FONTPATH to the directory containing the font.
+# The default value is: Helvetica.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_FONTNAME = Helvetica
+
+# The DOT_FONTSIZE tag can be used to set the size (in points) of the font of
+# dot graphs.
+# Minimum value: 4, maximum value: 24, default value: 10.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_FONTSIZE = 10
+
+# By default doxygen will tell dot to use the default font as specified with
+# DOT_FONTNAME. If you specify a different font using DOT_FONTNAME you can set
+# the path where dot can find it using this tag.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_FONTPATH =
+
+# If the CLASS_GRAPH tag is set to YES then doxygen will generate a graph for
+# each documented class showing the direct and indirect inheritance relations.
+# Setting this tag to YES will force the CLASS_DIAGRAMS tag to NO.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+CLASS_GRAPH = YES
+
+# If the COLLABORATION_GRAPH tag is set to YES then doxygen will generate a
+# graph for each documented class showing the direct and indirect implementation
+# dependencies (inheritance, containment, and class references variables) of the
+# class with other documented classes.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+COLLABORATION_GRAPH = YES
+
+# If the GROUP_GRAPHS tag is set to YES then doxygen will generate a graph for
+# groups, showing the direct groups dependencies.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+GROUP_GRAPHS = YES
+
+# If the UML_LOOK tag is set to YES doxygen will generate inheritance and
+# collaboration diagrams in a style similar to the OMG's Unified Modeling
+# Language.
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+UML_LOOK = NO
+
+# If the UML_LOOK tag is enabled, the fields and methods are shown inside the
+# class node. If there are many fields or methods and many nodes the graph may
+# become too big to be useful. The UML_LIMIT_NUM_FIELDS threshold limits the
+# number of items for each type to make the size more manageable. Set this to 0
+# for no limit. Note that the threshold may be exceeded by 50% before the limit
+# is enforced. So when you set the threshold to 10, up to 15 fields may appear,
+# but if the number exceeds 15, the total amount of fields shown is limited to
+# 10.
+# Minimum value: 0, maximum value: 100, default value: 10.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+UML_LIMIT_NUM_FIELDS = 10
+
+# If the TEMPLATE_RELATIONS tag is set to YES then the inheritance and
+# collaboration graphs will show the relations between templates and their
+# instances.
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+TEMPLATE_RELATIONS = NO
+
+# If the INCLUDE_GRAPH, ENABLE_PREPROCESSING and SEARCH_INCLUDES tags are set to
+# YES then doxygen will generate a graph for each documented file showing the
+# direct and indirect include dependencies of the file with other documented
+# files.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+INCLUDE_GRAPH = YES
+
+# If the INCLUDED_BY_GRAPH, ENABLE_PREPROCESSING and SEARCH_INCLUDES tags are
+# set to YES then doxygen will generate a graph for each documented file showing
+# the direct and indirect include dependencies of the file with other documented
+# files.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+INCLUDED_BY_GRAPH = YES
+
+# If the CALL_GRAPH tag is set to YES then doxygen will generate a call
+# dependency graph for every global function or class method.
+#
+# Note that enabling this option will significantly increase the time of a run.
+# So in most cases it will be better to enable call graphs for selected
+# functions only using the \callgraph command.
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+CALL_GRAPH = NO
+
+# If the CALLER_GRAPH tag is set to YES then doxygen will generate a caller
+# dependency graph for every global function or class method.
+#
+# Note that enabling this option will significantly increase the time of a run.
+# So in most cases it will be better to enable caller graphs for selected
+# functions only using the \callergraph command.
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+CALLER_GRAPH = NO
+
+# If the GRAPHICAL_HIERARCHY tag is set to YES then doxygen will graphical
+# hierarchy of all classes instead of a textual one.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+GRAPHICAL_HIERARCHY = YES
+
+# If the DIRECTORY_GRAPH tag is set to YES then doxygen will show the
+# dependencies a directory has on other directories in a graphical way. The
+# dependency relations are determined by the #include relations between the
+# files in the directories.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DIRECTORY_GRAPH = YES
+
+# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images
+# generated by dot.
+# Note: If you choose svg you need to set HTML_FILE_EXTENSION to xhtml in order
+# to make the SVG files visible in IE 9+ (other browsers do not have this
+# requirement).
+# Possible values are: png, jpg, gif and svg.
+# The default value is: png.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_IMAGE_FORMAT = png
+
+# If DOT_IMAGE_FORMAT is set to svg, then this option can be set to YES to
+# enable generation of interactive SVG images that allow zooming and panning.
+#
+# Note that this requires a modern browser other than Internet Explorer. Tested
+# and working are Firefox, Chrome, Safari, and Opera.
+# Note: For IE 9+ you need to set HTML_FILE_EXTENSION to xhtml in order to make
+# the SVG files visible. Older versions of IE do not have SVG support.
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+INTERACTIVE_SVG = NO
+
+# The DOT_PATH tag can be used to specify the path where the dot tool can be
+# found. If left blank, it is assumed the dot tool can be found in the path.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_PATH =
+
+# The DOTFILE_DIRS tag can be used to specify one or more directories that
+# contain dot files that are included in the documentation (see the \dotfile
+# command).
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOTFILE_DIRS =
+
+# The MSCFILE_DIRS tag can be used to specify one or more directories that
+# contain msc files that are included in the documentation (see the \mscfile
+# command).
+
+MSCFILE_DIRS =
+
+# The DIAFILE_DIRS tag can be used to specify one or more directories that
+# contain dia files that are included in the documentation (see the \diafile
+# command).
+
+DIAFILE_DIRS =
+
+# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of nodes
+# that will be shown in the graph. If the number of nodes in a graph becomes
+# larger than this value, doxygen will truncate the graph, which is visualized
+# by representing a node as a red box. Note that doxygen if the number of direct
+# children of the root node in a graph is already larger than
+# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note that
+# the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH.
+# Minimum value: 0, maximum value: 10000, default value: 50.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_GRAPH_MAX_NODES = 50
+
+# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the graphs
+# generated by dot. A depth value of 3 means that only nodes reachable from the
+# root by following a path via at most 3 edges will be shown. Nodes that lay
+# further from the root node will be omitted. Note that setting this option to 1
+# or 2 may greatly reduce the computation time needed for large code bases. Also
+# note that the size of a graph can be further restricted by
+# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction.
+# Minimum value: 0, maximum value: 1000, default value: 0.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+MAX_DOT_GRAPH_DEPTH = 0
+
+# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent
+# background. This is disabled by default, because dot on Windows does not seem
+# to support this out of the box.
+#
+# Warning: Depending on the platform used, enabling this option may lead to
+# badly anti-aliased labels on the edges of a graph (i.e. they become hard to
+# read).
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_TRANSPARENT = NO
+
+# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output
+# files in one run (i.e. multiple -o and -T options on the command line). This
+# makes dot run faster, but since only newer versions of dot (>1.8.10) support
+# this, this feature is disabled by default.
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_MULTI_TARGETS = YES
+
+# If the GENERATE_LEGEND tag is set to YES doxygen will generate a legend page
+# explaining the meaning of the various boxes and arrows in the dot generated
+# graphs.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+GENERATE_LEGEND = YES
+
+# If the DOT_CLEANUP tag is set to YES doxygen will remove the intermediate dot
+# files that are used to generate the various graphs.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_CLEANUP = YES
diff --git a/doc/environment.yml b/doc/environment.yml
new file mode 100644
index 0000000..0c2722c
--- /dev/null
+++ b/doc/environment.yml
@@ -0,0 +1,8 @@
+name: RTD
+channels:
+ - conda-forge
+ - defaults
+dependencies:
+ - python=3.8
+ - doxygen>=1.9.1
+ - breathe
diff --git a/doc/index.rst b/doc/index.rst
new file mode 100644
index 0000000..b8cfafc
--- /dev/null
+++ b/doc/index.rst
@@ -0,0 +1,29 @@
+.. Ixion documentation master file, created by
+ sphinx-quickstart on Wed Feb 11 21:33:47 2015.
+ You can adapt this file completely to your liking, but it should at least
+ contain the root `toctree` directive.
+
+Ixion library documentation
+===========================
+
+Ixion is a general purpose formula parser, interpreter, formula cell dependency
+tracker and spreadsheet document model backend all in one package. You can use
+Ixion to build a formula engine backend with spreadsheet-like multi-sheet cell
+storage management, or simply use to handle parsing and tokenization of formula
+expressions.
+
+Contents:
+
+.. toctree::
+ :maxdepth: 2
+
+ overview/index.rst
+ cpp/index.rst
+ python/index.rst
+
+Indices and tables
+==================
+
+* :ref:`genindex`
+* :ref:`search`
+
diff --git a/doc/overview/index.rst b/doc/overview/index.rst
new file mode 100644
index 0000000..aee0737
--- /dev/null
+++ b/doc/overview/index.rst
@@ -0,0 +1,19 @@
+
+Overview
+========
+
+Project repository
+------------------
+
+Ixion project's main repository is hosted in GitLab: https://gitlab.com/ixion/ixion.
+
+
+Installation
+------------
+
+From the repository
+^^^^^^^^^^^^^^^^^^^
+
+Please follow the instructions found on the project repository page to build
+and install directly from the repository.
+
diff --git a/doc/python/document.rst b/doc/python/document.rst
new file mode 100644
index 0000000..7171f2c
--- /dev/null
+++ b/doc/python/document.rst
@@ -0,0 +1,58 @@
+
+.. py:currentmodule:: ixion
+
+Document
+========
+
+.. class:: Document()
+
+ Class :class:`~ixion.Document` represents an entire document which consists
+ of one or more :class:`~ixion.Sheet` objects.
+
+.. attribute:: Document.sheet_names
+
+ A read-only attribute that provides a tuple of the names of the sheets that
+ belong to the document. The order of the sheet names signifies the order
+ of the sheets in the document.
+
+.. method:: Document.append_sheet(sheet_name)
+
+ Append a new sheet to the document object and return the newly created
+ :class:`~ixion.Sheet` object. The *sheet name* will become the name of the
+ sheet object being appended. Each :class:`Sheet` object must have a name,
+ and the name must be unique within the document.
+
+ :param str sheet_name: name of the sheet to be appended to the document.
+ :rtype: :class:`ixion.Sheet`
+ :return: appended sheet object.
+
+.. method:: Document.get_sheet(arg)
+
+ Get a sheet object either by the position or by the name. When the ``arg``
+ is an integer, it returns the sheet object at specified position (0-based).
+ When the ``arg`` is a string, it returns the sheet object whose name
+ matches the specified string.
+
+ :param arg: either the name of a sheet if it's of type ``str``, or the
+ index of a sheet if it's of type ``int``.
+ :rtype: :class:`ixion.Sheet`
+ :return: sheet object representing the specified sheet.
+
+.. warning:: Prefer passing a sheet index to :meth:`~ixion.Document.get_sheet`
+ than passing a sheet name. When passing a sheet name as an
+ argument, the current :meth:`~ixion.Document.get_sheet`
+ implementation has to iterate through the sheet objects in the
+ document to find a matching one.
+
+.. method:: Document.calculate([threads])
+
+ Calculate all formula cells within the document that are marked "dirty" i.e.
+ either those formula cells whose direct or indirect references have changed
+ their values, or those formula cells that have been entered into the
+ document.
+
+ :param int threads: (optional) number of threads to use for the calculation
+ besides the main thread. Set this to 0 if you want the calculation to
+ be performed on the main thread only. The value of 0 is assumed if this
+ value is not specified.
+
diff --git a/doc/python/index.rst b/doc/python/index.rst
new file mode 100644
index 0000000..9efcad2
--- /dev/null
+++ b/doc/python/index.rst
@@ -0,0 +1,11 @@
+
+Python API
+==========
+
+.. toctree::
+ :maxdepth: 2
+
+ quickstart.rst
+ document.rst
+ sheet.rst
+
diff --git a/doc/python/quickstart.rst b/doc/python/quickstart.rst
new file mode 100644
index 0000000..6b44e0f
--- /dev/null
+++ b/doc/python/quickstart.rst
@@ -0,0 +1,85 @@
+
+.. py:currentmodule:: ixion
+
+Quickstart
+==========
+
+Let's go over very quickly how to create a document and populate some cells inside spreadsheet.
+
+First, you need to import ixion module and create a new :class:`Document` object.
+
+::
+
+ >>> import ixion
+ >>> doc = ixion.Document()
+
+Since your newly-created document has no sheet at all, you need to insert one.
+
+::
+
+ >>> sheet1 = doc.append_sheet("MySheet1")
+
+The :meth:`Document.append_sheet` method takes a sheet name string as an argument (which in
+this case is "MySheet1") and returns an object representing the sheet that has
+just been inserted. This sheet object allows access to the sheet
+name via the :attr:`Sheet.name` attribute.
+
+::
+
+ >>> print(sheet1.name)
+ 'MySheet1'
+
+.. note:: This attribute is read-only; you'll get a :exc:`TypeError` if you
+ attempt to assign a new value to it.
+
+Now that you have a sheet object, let's go over how to put new cell values into
+the sheet. The sheet object provides several methods to set new cell values
+and also to retrieve them afterward.
+
+::
+
+ >>> sheet1.set_numeric_cell(0, 0, 12.3) # Set 12.3 to cell A1.
+ >>> sheet1.get_numeric_value(0, 0)
+ 12.3
+ >>> sheet1.set_string_cell(1, 0, "My string") # Set "My string" to cell A2.
+ >>> sheet1.get_string_value(1, 0)
+ 'My string'
+
+The setters take 3 arguments: the first one is a 0-based row index, the second
+one is a column index (also 0-based), and the third one is the new cell value.
+You can also pass these arguments by name as follows:
+
+::
+
+ >>> sheet1.set_string_cell(row=1, column=0, value="My string")
+
+Let's insert a formula expression next.
+
+::
+
+ >>> sheet1.set_formula_cell(0, 1, "A1*100") # B1
+ >>> sheet1.set_formula_cell(1, 1, "A2") # B2
+
+.. note:: When setting a formula expression to a cell, you don't need to start
+ your formula expression with a '=' like you would when you are
+ entering a formula in a spreadsheet application.
+
+The formula cells don't get calculated automatically as you enter them;
+you need to explicitly tell the document to calculate the formula cells via
+the :meth:`Document.calculate` method.
+
+::
+
+ >>> doc.calculate()
+
+Now all the formula cells in this document have been calculated. Let's retrieve
+the results of the formula cells.
+
+::
+
+ >>> sheet1.get_numeric_value(0, 1)
+ 1230.0
+ >>> sheet1.get_string_value(1, 1)
+ 'My string'
+
+That's all there is to it!
diff --git a/doc/python/sheet.rst b/doc/python/sheet.rst
new file mode 100644
index 0000000..74f4ab4
--- /dev/null
+++ b/doc/python/sheet.rst
@@ -0,0 +1,83 @@
+
+.. py:currentmodule:: ixion
+
+Sheet
+=====
+
+.. class:: ixion.Sheet()
+
+ Class :class:`~ixion.Sheet` represents a single sheet that stores cells in
+ a 2-dimensional grid address space. Rows and columns are used to specify a
+ position in the grid, and both rows and columns are 0-based, with the
+ top-left-most cell having the address of row 0 and column 0.
+
+.. attribute:: Sheet.name
+
+ A string representing the name of the sheet object. This is a read-only
+ attribute.
+
+.. method:: Sheet.set_numeric_cell(row, column, value)
+
+ Set a numeric *value* to a cell at specified *row* and *column* position.
+
+ :param int row: row position.
+ :param int column: column position.
+ :param float value: numeric value to set to the specified position.
+
+.. method:: Sheet.set_string_cell(row, column, value)
+
+ Set a string *value* to a cell at specified *row* and *column* position.
+
+ :param int row: row position.
+ :param int column: column position.
+ :param str value: string value to set to the specified position.
+
+.. method:: Sheet.set_formula_cell(row, column, value)
+
+ Set a formula expression (*value*) to a cell at specified *row* and *column* position.
+
+ :param int row: row position.
+ :param int column: column position.
+ :param str value: formula expression to set to the specified position.
+
+.. method:: Sheet.get_numeric_value(row, column)
+
+ Get a numeric value representing the content of a cell at specified *row*
+ and *column* position. If the cell is of numeric type, its value is
+ returned. If it's a formula cell, the result of the calculated formula
+ result is returned if the result is of numeric type.
+
+ :param int row: row position.
+ :param int column: column position.
+ :rtype: float
+ :return: numeric value of the cell at specified position.
+
+.. method:: Sheet.get_string_value(row, column)
+
+ Get a string value representing the content of a cell at specified *row*
+ and *column* position. If the cell is of string type, its value is
+ returned as-is. If it's a formula cell, the result of the calculated
+ formula result is returned if the result is of string type.
+
+ :param int row: row position.
+ :param int column: column position.
+ :rtype: str
+ :return: string value of the cell at specified position.
+
+.. method:: Sheet.get_formula_expression(row, column)
+
+ Given a formula cell at specified *row* and *column* position, get the
+ formula expression stored in that cell.
+
+ :param int row: row position.
+ :param int column: column position.
+ :rtype: str
+ :return: formula expression stored in the cell at specified position.
+
+.. method:: Sheet.erase_cell(row, column)
+
+ Erase the cell at specified *row* and *column* position. The slot at the
+ specified position becomes empty afterward.
+
+ :param int row: row position.
+ :param int column: column position.
diff --git a/doc/requirements.txt b/doc/requirements.txt
new file mode 100644
index 0000000..cd6467e
--- /dev/null
+++ b/doc/requirements.txt
@@ -0,0 +1 @@
+breathe
diff --git a/doc_example/Makefile.am b/doc_example/Makefile.am
new file mode 100644
index 0000000..d93e7a7
--- /dev/null
+++ b/doc_example/Makefile.am
@@ -0,0 +1,25 @@
+SUBDIRS = section_examples
+
+AM_CPPFLAGS = \
+ -I$(top_srcdir)/include \
+ $(MDDS_CFLAGS) $(LIBIXION_CFLAGS) \
+ -DSRCDIR=\""$(top_srcdir)"\"
+
+bin_PROGRAMS =
+
+EXTRA_PROGRAMS = \
+ document-simple \
+ model-context-simple
+
+document_simple_SOURCES = document_simple.cpp
+document_simple_LDADD = ../src/libixion/libixion-@IXION_API_VERSION@.la
+
+model_context_simple_SOURCES = model_context_simple.cpp
+model_context_simple_LDADD = ../src/libixion/libixion-@IXION_API_VERSION@.la
+
+TESTS = \
+ document-simple \
+ model-context-simple
+
+distclean-local:
+ rm -rf $(TESTS)
diff --git a/doc_example/Makefile.in b/doc_example/Makefile.in
new file mode 100644
index 0000000..1428176
--- /dev/null
+++ b/doc_example/Makefile.in
@@ -0,0 +1,1207 @@
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
+
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+VPATH = @srcdir@
+am__is_gnu_make = { \
+ if test -z '$(MAKELEVEL)'; then \
+ false; \
+ elif test -n '$(MAKE_HOST)'; then \
+ true; \
+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+ true; \
+ else \
+ false; \
+ fi; \
+}
+am__make_running_with_option = \
+ case $${target_option-} in \
+ ?) ;; \
+ *) echo "am__make_running_with_option: internal error: invalid" \
+ "target option '$${target_option-}' specified" >&2; \
+ exit 1;; \
+ esac; \
+ has_opt=no; \
+ sane_makeflags=$$MAKEFLAGS; \
+ if $(am__is_gnu_make); then \
+ sane_makeflags=$$MFLAGS; \
+ else \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ bs=\\; \
+ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
+ esac; \
+ fi; \
+ skip_next=no; \
+ strip_trailopt () \
+ { \
+ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+ }; \
+ for flg in $$sane_makeflags; do \
+ test $$skip_next = yes && { skip_next=no; continue; }; \
+ case $$flg in \
+ *=*|--*) continue;; \
+ -*I) strip_trailopt 'I'; skip_next=yes;; \
+ -*I?*) strip_trailopt 'I';; \
+ -*O) strip_trailopt 'O'; skip_next=yes;; \
+ -*O?*) strip_trailopt 'O';; \
+ -*l) strip_trailopt 'l'; skip_next=yes;; \
+ -*l?*) strip_trailopt 'l';; \
+ -[dEDm]) skip_next=yes;; \
+ -[JT]) skip_next=yes;; \
+ esac; \
+ case $$flg in \
+ *$$target_option*) has_opt=yes; break;; \
+ esac; \
+ done; \
+ test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+bin_PROGRAMS =
+EXTRA_PROGRAMS = document-simple$(EXEEXT) \
+ model-context-simple$(EXEEXT)
+TESTS = document-simple$(EXEEXT) model-context-simple$(EXEEXT)
+subdir = doc_example
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/ax_cxx_compile_stdcxx.m4 \
+ $(top_srcdir)/m4/ax_cxx_compile_stdcxx_17.m4 \
+ $(top_srcdir)/m4/boost.m4 $(top_srcdir)/m4/libtool.m4 \
+ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
+ $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+am__installdirs = "$(DESTDIR)$(bindir)"
+PROGRAMS = $(bin_PROGRAMS)
+am_document_simple_OBJECTS = document_simple.$(OBJEXT)
+document_simple_OBJECTS = $(am_document_simple_OBJECTS)
+document_simple_DEPENDENCIES = \
+ ../src/libixion/libixion-@IXION_API_VERSION@.la
+AM_V_lt = $(am__v_lt_@AM_V@)
+am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
+am__v_lt_0 = --silent
+am__v_lt_1 =
+am_model_context_simple_OBJECTS = model_context_simple.$(OBJEXT)
+model_context_simple_OBJECTS = $(am_model_context_simple_OBJECTS)
+model_context_simple_DEPENDENCIES = \
+ ../src/libixion/libixion-@IXION_API_VERSION@.la
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo " GEN " $@;
+am__v_GEN_1 =
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 =
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__maybe_remake_depfiles = depfiles
+am__depfiles_remade = ./$(DEPDIR)/document_simple.Po \
+ ./$(DEPDIR)/model_context_simple.Po
+am__mv = mv -f
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CXXFLAGS) $(CXXFLAGS)
+AM_V_CXX = $(am__v_CXX_@AM_V@)
+am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@)
+am__v_CXX_0 = @echo " CXX " $@;
+am__v_CXX_1 =
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CXXLD = $(am__v_CXXLD_@AM_V@)
+am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@)
+am__v_CXXLD_0 = @echo " CXXLD " $@;
+am__v_CXXLD_1 =
+SOURCES = $(document_simple_SOURCES) $(model_context_simple_SOURCES)
+DIST_SOURCES = $(document_simple_SOURCES) \
+ $(model_context_simple_SOURCES)
+RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
+ ctags-recursive dvi-recursive html-recursive info-recursive \
+ install-data-recursive install-dvi-recursive \
+ install-exec-recursive install-html-recursive \
+ install-info-recursive install-pdf-recursive \
+ install-ps-recursive install-recursive installcheck-recursive \
+ installdirs-recursive pdf-recursive ps-recursive \
+ tags-recursive uninstall-recursive
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
+ distclean-recursive maintainer-clean-recursive
+am__recursive_targets = \
+ $(RECURSIVE_TARGETS) \
+ $(RECURSIVE_CLEAN_TARGETS) \
+ $(am__extra_recursive_targets)
+AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
+ check recheck distdir distdir-am
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+# Read a list of newline-separated strings from the standard input,
+# and print each of them once, without duplicates. Input order is
+# *not* preserved.
+am__uniquify_input = $(AWK) '\
+ BEGIN { nonempty = 0; } \
+ { items[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in items) print i; }; } \
+'
+# Make sure the list of sources is unique. This is necessary because,
+# e.g., the same source file might be shared among _SOURCES variables
+# for different programs/libraries.
+am__define_uniq_tagged_files = \
+ list='$(am__tagged_files)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | $(am__uniquify_input)`
+am__tty_colors_dummy = \
+ mgn= red= grn= lgn= blu= brg= std=; \
+ am__color_tests=no
+am__tty_colors = { \
+ $(am__tty_colors_dummy); \
+ if test "X$(AM_COLOR_TESTS)" = Xno; then \
+ am__color_tests=no; \
+ elif test "X$(AM_COLOR_TESTS)" = Xalways; then \
+ am__color_tests=yes; \
+ elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \
+ am__color_tests=yes; \
+ fi; \
+ if test $$am__color_tests = yes; then \
+ red=''; \
+ grn=''; \
+ lgn=''; \
+ blu=''; \
+ mgn=''; \
+ brg=''; \
+ std=''; \
+ fi; \
+}
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+ if (++n[$$2] == $(am__install_max)) \
+ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+ END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+ test -z "$$files" \
+ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+ $(am__cd) "$$dir" && rm -f $$files; }; \
+ }
+am__recheck_rx = ^[ ]*:recheck:[ ]*
+am__global_test_result_rx = ^[ ]*:global-test-result:[ ]*
+am__copy_in_global_log_rx = ^[ ]*:copy-in-global-log:[ ]*
+# A command that, given a newline-separated list of test names on the
+# standard input, print the name of the tests that are to be re-run
+# upon "make recheck".
+am__list_recheck_tests = $(AWK) '{ \
+ recheck = 1; \
+ while ((rc = (getline line < ($$0 ".trs"))) != 0) \
+ { \
+ if (rc < 0) \
+ { \
+ if ((getline line2 < ($$0 ".log")) < 0) \
+ recheck = 0; \
+ break; \
+ } \
+ else if (line ~ /$(am__recheck_rx)[nN][Oo]/) \
+ { \
+ recheck = 0; \
+ break; \
+ } \
+ else if (line ~ /$(am__recheck_rx)[yY][eE][sS]/) \
+ { \
+ break; \
+ } \
+ }; \
+ if (recheck) \
+ print $$0; \
+ close ($$0 ".trs"); \
+ close ($$0 ".log"); \
+}'
+# A command that, given a newline-separated list of test names on the
+# standard input, create the global log from their .trs and .log files.
+am__create_global_log = $(AWK) ' \
+function fatal(msg) \
+{ \
+ print "fatal: making $@: " msg | "cat >&2"; \
+ exit 1; \
+} \
+function rst_section(header) \
+{ \
+ print header; \
+ len = length(header); \
+ for (i = 1; i <= len; i = i + 1) \
+ printf "="; \
+ printf "\n\n"; \
+} \
+{ \
+ copy_in_global_log = 1; \
+ global_test_result = "RUN"; \
+ while ((rc = (getline line < ($$0 ".trs"))) != 0) \
+ { \
+ if (rc < 0) \
+ fatal("failed to read from " $$0 ".trs"); \
+ if (line ~ /$(am__global_test_result_rx)/) \
+ { \
+ sub("$(am__global_test_result_rx)", "", line); \
+ sub("[ ]*$$", "", line); \
+ global_test_result = line; \
+ } \
+ else if (line ~ /$(am__copy_in_global_log_rx)[nN][oO]/) \
+ copy_in_global_log = 0; \
+ }; \
+ if (copy_in_global_log) \
+ { \
+ rst_section(global_test_result ": " $$0); \
+ while ((rc = (getline line < ($$0 ".log"))) != 0) \
+ { \
+ if (rc < 0) \
+ fatal("failed to read from " $$0 ".log"); \
+ print line; \
+ }; \
+ printf "\n"; \
+ }; \
+ close ($$0 ".trs"); \
+ close ($$0 ".log"); \
+}'
+# Restructured Text title.
+am__rst_title = { sed 's/.*/ & /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; }
+# Solaris 10 'make', and several other traditional 'make' implementations,
+# pass "-e" to $(SHELL), and POSIX 2008 even requires this. Work around it
+# by disabling -e (using the XSI extension "set +e") if it's set.
+am__sh_e_setup = case $$- in *e*) set +e;; esac
+# Default flags passed to test drivers.
+am__common_driver_flags = \
+ --color-tests "$$am__color_tests" \
+ --enable-hard-errors "$$am__enable_hard_errors" \
+ --expect-failure "$$am__expect_failure"
+# To be inserted before the command running the test. Creates the
+# directory for the log if needed. Stores in $dir the directory
+# containing $f, in $tst the test, in $log the log. Executes the
+# developer- defined test setup AM_TESTS_ENVIRONMENT (if any), and
+# passes TESTS_ENVIRONMENT. Set up options for the wrapper that
+# will run the test scripts (or their associated LOG_COMPILER, if
+# thy have one).
+am__check_pre = \
+$(am__sh_e_setup); \
+$(am__vpath_adj_setup) $(am__vpath_adj) \
+$(am__tty_colors); \
+srcdir=$(srcdir); export srcdir; \
+case "$@" in \
+ */*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;; \
+ *) am__odir=.;; \
+esac; \
+test "x$$am__odir" = x"." || test -d "$$am__odir" \
+ || $(MKDIR_P) "$$am__odir" || exit $$?; \
+if test -f "./$$f"; then dir=./; \
+elif test -f "$$f"; then dir=; \
+else dir="$(srcdir)/"; fi; \
+tst=$$dir$$f; log='$@'; \
+if test -n '$(DISABLE_HARD_ERRORS)'; then \
+ am__enable_hard_errors=no; \
+else \
+ am__enable_hard_errors=yes; \
+fi; \
+case " $(XFAIL_TESTS) " in \
+ *[\ \ ]$$f[\ \ ]* | *[\ \ ]$$dir$$f[\ \ ]*) \
+ am__expect_failure=yes;; \
+ *) \
+ am__expect_failure=no;; \
+esac; \
+$(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT)
+# A shell command to get the names of the tests scripts with any registered
+# extension removed (i.e., equivalently, the names of the test logs, with
+# the '.log' extension removed). The result is saved in the shell variable
+# '$bases'. This honors runtime overriding of TESTS and TEST_LOGS. Sadly,
+# we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)",
+# since that might cause problem with VPATH rewrites for suffix-less tests.
+# See also 'test-harness-vpath-rewrite.sh' and 'test-trs-basic.sh'.
+am__set_TESTS_bases = \
+ bases='$(TEST_LOGS)'; \
+ bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \
+ bases=`echo $$bases`
+AM_TESTSUITE_SUMMARY_HEADER = ' for $(PACKAGE_STRING)'
+RECHECK_LOGS = $(TEST_LOGS)
+TEST_SUITE_LOG = test-suite.log
+TEST_EXTENSIONS = @EXEEXT@ .test
+LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver
+LOG_COMPILE = $(LOG_COMPILER) $(AM_LOG_FLAGS) $(LOG_FLAGS)
+am__set_b = \
+ case '$@' in \
+ */*) \
+ case '$*' in \
+ */*) b='$*';; \
+ *) b=`echo '$@' | sed 's/\.log$$//'`; \
+ esac;; \
+ *) \
+ b='$*';; \
+ esac
+am__test_logs1 = $(TESTS:=.log)
+am__test_logs2 = $(am__test_logs1:@EXEEXT@.log=.log)
+TEST_LOGS = $(am__test_logs2:.test.log=.log)
+TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver
+TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \
+ $(TEST_LOG_FLAGS)
+DIST_SUBDIRS = $(SUBDIRS)
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp \
+ $(top_srcdir)/test-driver
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+am__relativize = \
+ dir0=`pwd`; \
+ sed_first='s,^\([^/]*\)/.*$$,\1,'; \
+ sed_rest='s,^[^/]*/*,,'; \
+ sed_last='s,^.*/\([^/]*\)$$,\1,'; \
+ sed_butlast='s,/*[^/]*$$,,'; \
+ while test -n "$$dir1"; do \
+ first=`echo "$$dir1" | sed -e "$$sed_first"`; \
+ if test "$$first" != "."; then \
+ if test "$$first" = ".."; then \
+ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
+ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
+ else \
+ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
+ if test "$$first2" = "$$first"; then \
+ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
+ else \
+ dir2="../$$dir2"; \
+ fi; \
+ dir0="$$dir0"/"$$first"; \
+ fi; \
+ fi; \
+ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
+ done; \
+ reldir="$$dir2"
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AS = @AS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+BOOST_CPPFLAGS = @BOOST_CPPFLAGS@
+BOOST_FILESYSTEM_LDFLAGS = @BOOST_FILESYSTEM_LDFLAGS@
+BOOST_FILESYSTEM_LDPATH = @BOOST_FILESYSTEM_LDPATH@
+BOOST_FILESYSTEM_LIBS = @BOOST_FILESYSTEM_LIBS@
+BOOST_LDPATH = @BOOST_LDPATH@
+BOOST_PROGRAM_OPTIONS_LDFLAGS = @BOOST_PROGRAM_OPTIONS_LDFLAGS@
+BOOST_PROGRAM_OPTIONS_LDPATH = @BOOST_PROGRAM_OPTIONS_LDPATH@
+BOOST_PROGRAM_OPTIONS_LIBS = @BOOST_PROGRAM_OPTIONS_LIBS@
+BOOST_ROOT = @BOOST_ROOT@
+BOOST_SYSTEM_LDFLAGS = @BOOST_SYSTEM_LDFLAGS@
+BOOST_SYSTEM_LDPATH = @BOOST_SYSTEM_LDPATH@
+BOOST_SYSTEM_LIBS = @BOOST_SYSTEM_LIBS@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPPFLAGS = @CPPFLAGS@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DISTCHECK_CONFIGURE_FLAGS = @DISTCHECK_CONFIGURE_FLAGS@
+DLLTOOL = @DLLTOOL@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+ETAGS = @ETAGS@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+GREP = @GREP@
+HAVE_CXX17 = @HAVE_CXX17@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+IXION_API_VERSION = @IXION_API_VERSION@
+IXION_MAJOR_API_VERSION = @IXION_MAJOR_API_VERSION@
+IXION_MAJOR_VERSION = @IXION_MAJOR_VERSION@
+IXION_MICRO_VERSION = @IXION_MICRO_VERSION@
+IXION_MINOR_API_VERSION = @IXION_MINOR_API_VERSION@
+IXION_MINOR_VERSION = @IXION_MINOR_VERSION@
+IXION_VERSION = @IXION_VERSION@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
+MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MDDS_CFLAGS = @MDDS_CFLAGS@
+MDDS_LIBS = @MDDS_LIBS@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
+POW_LIB = @POW_LIB@
+PYTHON = @PYTHON@
+PYTHON_CFLAGS = @PYTHON_CFLAGS@
+PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
+PYTHON_LIBS = @PYTHON_LIBS@
+PYTHON_PLATFORM = @PYTHON_PLATFORM@
+PYTHON_PREFIX = @PYTHON_PREFIX@
+PYTHON_VERSION = @PYTHON_VERSION@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+VULKAN_CFLAGS = @VULKAN_CFLAGS@
+VULKAN_LIBS = @VULKAN_LIBS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+pkgpyexecdir = @pkgpyexecdir@
+pkgpythondir = @pkgpythondir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+pyexecdir = @pyexecdir@
+pythondir = @pythondir@
+runstatedir = @runstatedir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+SUBDIRS = section_examples
+AM_CPPFLAGS = \
+ -I$(top_srcdir)/include \
+ $(MDDS_CFLAGS) $(LIBIXION_CFLAGS) \
+ -DSRCDIR=\""$(top_srcdir)"\"
+
+document_simple_SOURCES = document_simple.cpp
+document_simple_LDADD = ../src/libixion/libixion-@IXION_API_VERSION@.la
+model_context_simple_SOURCES = model_context_simple.cpp
+model_context_simple_LDADD = ../src/libixion/libixion-@IXION_API_VERSION@.la
+all: all-recursive
+
+.SUFFIXES:
+.SUFFIXES: .cpp .lo .log .o .obj .test .test$(EXEEXT) .trs
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign doc_example/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --foreign doc_example/Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+install-binPROGRAMS: $(bin_PROGRAMS)
+ @$(NORMAL_INSTALL)
+ @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \
+ fi; \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed 's/$(EXEEXT)$$//' | \
+ while read p p1; do if test -f $$p \
+ || test -f $$p1 \
+ ; then echo "$$p"; echo "$$p"; else :; fi; \
+ done | \
+ sed -e 'p;s,.*/,,;n;h' \
+ -e 's|.*|.|' \
+ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
+ sed 'N;N;N;s,\n, ,g' | \
+ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
+ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+ if ($$2 == $$4) files[d] = files[d] " " $$1; \
+ else { print "f", $$3 "/" $$4, $$1; } } \
+ END { for (d in files) print "f", d, files[d] }' | \
+ while read type dir files; do \
+ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+ test -z "$$files" || { \
+ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
+ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
+ } \
+ ; done
+
+uninstall-binPROGRAMS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+ files=`for p in $$list; do echo "$$p"; done | \
+ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
+ -e 's/$$/$(EXEEXT)/' \
+ `; \
+ test -n "$$list" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(bindir)" && rm -f $$files
+
+clean-binPROGRAMS:
+ @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \
+ echo " rm -f" $$list; \
+ rm -f $$list || exit $$?; \
+ test -n "$(EXEEXT)" || exit 0; \
+ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+ echo " rm -f" $$list; \
+ rm -f $$list
+
+document-simple$(EXEEXT): $(document_simple_OBJECTS) $(document_simple_DEPENDENCIES) $(EXTRA_document_simple_DEPENDENCIES)
+ @rm -f document-simple$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(document_simple_OBJECTS) $(document_simple_LDADD) $(LIBS)
+
+model-context-simple$(EXEEXT): $(model_context_simple_OBJECTS) $(model_context_simple_DEPENDENCIES) $(EXTRA_model_context_simple_DEPENDENCIES)
+ @rm -f model-context-simple$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(model_context_simple_OBJECTS) $(model_context_simple_LDADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/document_simple.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/model_context_simple.Po@am__quote@ # am--include-marker
+
+$(am__depfiles_remade):
+ @$(MKDIR_P) $(@D)
+ @echo '# dummy' >$@-t && $(am__mv) $@-t $@
+
+am--depfiles: $(am__depfiles_remade)
+
+.cpp.o:
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $<
+
+.cpp.obj:
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cpp.lo:
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run 'make' without going through this Makefile.
+# To change the values of 'make' variables: instead of editing Makefiles,
+# (1) if the variable is set in 'config.status', edit 'config.status'
+# (which will cause the Makefiles to be regenerated when you run 'make');
+# (2) otherwise, pass the desired values on the 'make' command line.
+$(am__recursive_targets):
+ @fail=; \
+ if $(am__make_keepgoing); then \
+ failcom='fail=yes'; \
+ else \
+ failcom='exit 1'; \
+ fi; \
+ dot_seen=no; \
+ target=`echo $@ | sed s/-recursive//`; \
+ case "$@" in \
+ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+ *) list='$(SUBDIRS)' ;; \
+ esac; \
+ for subdir in $$list; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ dot_seen=yes; \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || eval $$failcom; \
+ done; \
+ if test "$$dot_seen" = "no"; then \
+ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+ fi; test -z "$$fail"
+
+ID: $(am__tagged_files)
+ $(am__define_uniq_tagged_files); mkid -fID $$unique
+tags: tags-recursive
+TAGS: tags
+
+tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ set x; \
+ here=`pwd`; \
+ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
+ include_option=--etags-include; \
+ empty_fix=.; \
+ else \
+ include_option=--include; \
+ empty_fix=; \
+ fi; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ test ! -f $$subdir/TAGS || \
+ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
+ fi; \
+ done; \
+ $(am__define_uniq_tagged_files); \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: ctags-recursive
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ $(am__define_uniq_tagged_files); \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+cscopelist: cscopelist-recursive
+
+cscopelist-am: $(am__tagged_files)
+ list='$(am__tagged_files)'; \
+ case "$(srcdir)" in \
+ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+ *) sdir=$(subdir)/$(srcdir) ;; \
+ esac; \
+ for i in $$list; do \
+ if test -f "$$i"; then \
+ echo "$(subdir)/$$i"; \
+ else \
+ echo "$$sdir/$$i"; \
+ fi; \
+ done >> $(top_builddir)/cscope.files
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+# Recover from deleted '.trs' file; this should ensure that
+# "rm -f foo.log; make foo.trs" re-run 'foo.test', and re-create
+# both 'foo.log' and 'foo.trs'. Break the recipe in two subshells
+# to avoid problems with "make -n".
+.log.trs:
+ rm -f $< $@
+ $(MAKE) $(AM_MAKEFLAGS) $<
+
+# Leading 'am--fnord' is there to ensure the list of targets does not
+# expand to empty, as could happen e.g. with make check TESTS=''.
+am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck)
+am--force-recheck:
+ @:
+
+$(TEST_SUITE_LOG): $(TEST_LOGS)
+ @$(am__set_TESTS_bases); \
+ am__f_ok () { test -f "$$1" && test -r "$$1"; }; \
+ redo_bases=`for i in $$bases; do \
+ am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \
+ done`; \
+ if test -n "$$redo_bases"; then \
+ redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \
+ redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \
+ if $(am__make_dryrun); then :; else \
+ rm -f $$redo_logs && rm -f $$redo_results || exit 1; \
+ fi; \
+ fi; \
+ if test -n "$$am__remaking_logs"; then \
+ echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \
+ "recursion detected" >&2; \
+ elif test -n "$$redo_logs"; then \
+ am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \
+ fi; \
+ if $(am__make_dryrun); then :; else \
+ st=0; \
+ errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \
+ for i in $$redo_bases; do \
+ test -f $$i.trs && test -r $$i.trs \
+ || { echo "$$errmsg $$i.trs" >&2; st=1; }; \
+ test -f $$i.log && test -r $$i.log \
+ || { echo "$$errmsg $$i.log" >&2; st=1; }; \
+ done; \
+ test $$st -eq 0 || exit 1; \
+ fi
+ @$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \
+ ws='[ ]'; \
+ results=`for b in $$bases; do echo $$b.trs; done`; \
+ test -n "$$results" || results=/dev/null; \
+ all=` grep "^$$ws*:test-result:" $$results | wc -l`; \
+ pass=` grep "^$$ws*:test-result:$$ws*PASS" $$results | wc -l`; \
+ fail=` grep "^$$ws*:test-result:$$ws*FAIL" $$results | wc -l`; \
+ skip=` grep "^$$ws*:test-result:$$ws*SKIP" $$results | wc -l`; \
+ xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \
+ xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \
+ error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \
+ if test `expr $$fail + $$xpass + $$error` -eq 0; then \
+ success=true; \
+ else \
+ success=false; \
+ fi; \
+ br='==================='; br=$$br$$br$$br$$br; \
+ result_count () \
+ { \
+ if test x"$$1" = x"--maybe-color"; then \
+ maybe_colorize=yes; \
+ elif test x"$$1" = x"--no-color"; then \
+ maybe_colorize=no; \
+ else \
+ echo "$@: invalid 'result_count' usage" >&2; exit 4; \
+ fi; \
+ shift; \
+ desc=$$1 count=$$2; \
+ if test $$maybe_colorize = yes && test $$count -gt 0; then \
+ color_start=$$3 color_end=$$std; \
+ else \
+ color_start= color_end=; \
+ fi; \
+ echo "$${color_start}# $$desc $$count$${color_end}"; \
+ }; \
+ create_testsuite_report () \
+ { \
+ result_count $$1 "TOTAL:" $$all "$$brg"; \
+ result_count $$1 "PASS: " $$pass "$$grn"; \
+ result_count $$1 "SKIP: " $$skip "$$blu"; \
+ result_count $$1 "XFAIL:" $$xfail "$$lgn"; \
+ result_count $$1 "FAIL: " $$fail "$$red"; \
+ result_count $$1 "XPASS:" $$xpass "$$red"; \
+ result_count $$1 "ERROR:" $$error "$$mgn"; \
+ }; \
+ { \
+ echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \
+ $(am__rst_title); \
+ create_testsuite_report --no-color; \
+ echo; \
+ echo ".. contents:: :depth: 2"; \
+ echo; \
+ for b in $$bases; do echo $$b; done \
+ | $(am__create_global_log); \
+ } >$(TEST_SUITE_LOG).tmp || exit 1; \
+ mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \
+ if $$success; then \
+ col="$$grn"; \
+ else \
+ col="$$red"; \
+ test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \
+ fi; \
+ echo "$${col}$$br$${std}"; \
+ echo "$${col}Testsuite summary"$(AM_TESTSUITE_SUMMARY_HEADER)"$${std}"; \
+ echo "$${col}$$br$${std}"; \
+ create_testsuite_report --maybe-color; \
+ echo "$$col$$br$$std"; \
+ if $$success; then :; else \
+ echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}"; \
+ if test -n "$(PACKAGE_BUGREPORT)"; then \
+ echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}"; \
+ fi; \
+ echo "$$col$$br$$std"; \
+ fi; \
+ $$success || exit 1
+
+check-TESTS:
+ @list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list
+ @list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list
+ @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
+ @set +e; $(am__set_TESTS_bases); \
+ log_list=`for i in $$bases; do echo $$i.log; done`; \
+ trs_list=`for i in $$bases; do echo $$i.trs; done`; \
+ log_list=`echo $$log_list`; trs_list=`echo $$trs_list`; \
+ $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \
+ exit $$?;
+recheck: all
+ @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
+ @set +e; $(am__set_TESTS_bases); \
+ bases=`for i in $$bases; do echo $$i; done \
+ | $(am__list_recheck_tests)` || exit 1; \
+ log_list=`for i in $$bases; do echo $$i.log; done`; \
+ log_list=`echo $$log_list`; \
+ $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) \
+ am__force_recheck=am--force-recheck \
+ TEST_LOGS="$$log_list"; \
+ exit $$?
+document-simple.log: document-simple$(EXEEXT)
+ @p='document-simple$(EXEEXT)'; \
+ b='document-simple'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+model-context-simple.log: model-context-simple$(EXEEXT)
+ @p='model-context-simple$(EXEEXT)'; \
+ b='model-context-simple'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+.test.log:
+ @p='$<'; \
+ $(am__set_b); \
+ $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+@am__EXEEXT_TRUE@.test$(EXEEXT).log:
+@am__EXEEXT_TRUE@ @p='$<'; \
+@am__EXEEXT_TRUE@ $(am__set_b); \
+@am__EXEEXT_TRUE@ $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \
+@am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \
+@am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \
+@am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT)
+distdir: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) distdir-am
+
+distdir-am: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+ @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ $(am__make_dryrun) \
+ || test -d "$(distdir)/$$subdir" \
+ || $(MKDIR_P) "$(distdir)/$$subdir" \
+ || exit 1; \
+ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
+ $(am__relativize); \
+ new_distdir=$$reldir; \
+ dir1=$$subdir; dir2="$(top_distdir)"; \
+ $(am__relativize); \
+ new_top_distdir=$$reldir; \
+ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
+ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
+ ($(am__cd) $$subdir && \
+ $(MAKE) $(AM_MAKEFLAGS) \
+ top_distdir="$$new_top_distdir" \
+ distdir="$$new_distdir" \
+ am__remove_distdir=: \
+ am__skip_length_check=: \
+ am__skip_mode_fix=: \
+ distdir) \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+ $(MAKE) $(AM_MAKEFLAGS) check-TESTS
+check: check-recursive
+all-am: Makefile $(PROGRAMS)
+installdirs: installdirs-recursive
+installdirs-am:
+ for dir in "$(DESTDIR)$(bindir)"; do \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+ done
+install: install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-recursive
+install-strip:
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
+mostlyclean-generic:
+ -test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS)
+ -test -z "$(TEST_LOGS:.log=.trs)" || rm -f $(TEST_LOGS:.log=.trs)
+ -test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-recursive
+
+clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-recursive
+ -rm -f ./$(DEPDIR)/document_simple.Po
+ -rm -f ./$(DEPDIR)/model_context_simple.Po
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-local distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+html: html-recursive
+
+html-am:
+
+info: info-recursive
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-recursive
+
+install-dvi-am:
+
+install-exec-am: install-binPROGRAMS
+
+install-html: install-html-recursive
+
+install-html-am:
+
+install-info: install-info-recursive
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-recursive
+
+install-pdf-am:
+
+install-ps: install-ps-recursive
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-recursive
+ -rm -f ./$(DEPDIR)/document_simple.Po
+ -rm -f ./$(DEPDIR)/model_context_simple.Po
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool
+
+pdf: pdf-recursive
+
+pdf-am:
+
+ps: ps-recursive
+
+ps-am:
+
+uninstall-am: uninstall-binPROGRAMS
+
+.MAKE: $(am__recursive_targets) check-am install-am install-strip
+
+.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \
+ am--depfiles check check-TESTS check-am clean \
+ clean-binPROGRAMS clean-generic clean-libtool cscopelist-am \
+ ctags ctags-am distclean distclean-compile distclean-generic \
+ distclean-libtool distclean-local distclean-tags distdir dvi \
+ dvi-am html html-am info info-am install install-am \
+ install-binPROGRAMS install-data install-data-am install-dvi \
+ install-dvi-am install-exec install-exec-am install-html \
+ install-html-am install-info install-info-am install-man \
+ install-pdf install-pdf-am install-ps install-ps-am \
+ install-strip installcheck installcheck-am installdirs \
+ installdirs-am maintainer-clean maintainer-clean-generic \
+ mostlyclean mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool pdf pdf-am ps ps-am recheck tags tags-am \
+ uninstall uninstall-am uninstall-binPROGRAMS
+
+.PRECIOUS: Makefile
+
+
+distclean-local:
+ rm -rf $(TESTS)
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/doc_example/document_simple.cpp b/doc_example/document_simple.cpp
new file mode 100644
index 0000000..499a9a0
--- /dev/null
+++ b/doc_example/document_simple.cpp
@@ -0,0 +1,82 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * Copyright (c) 2020 Kohei Yoshida
+ *
+ * Permission is hereby granted, free of charge, to any person
+ * obtaining a copy of this software and associated documentation
+ * files (the "Software"), to deal in the Software without
+ * restriction, including without limitation the rights to use,
+ * copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following
+ * conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ *
+ ************************************************************************/
+
+#include <ixion/document.hpp>
+#include <ixion/address.hpp>
+#include <ixion/macros.hpp>
+#include <iostream>
+
+using namespace std;
+
+int main(int argc, char** argv)
+{
+ ixion::document doc;
+ doc.append_sheet("MySheet");
+
+ // Now, populate it with some numeric values in A1:A10.
+ for (ixion::abs_address_t pos(0, 0, 0); pos.row <= 9; ++pos.row)
+ {
+ double value = pos.row + 1.0; // Set the row position + 1 as the cell value.
+ doc.set_numeric_cell(pos, value);
+ }
+
+ // Insert string values.
+ std::string s = "This cell contains a string value.";
+ doc.set_string_cell("B2", s);
+ doc.set_string_cell("B3", "This too contains a string value.");
+
+ doc.set_string_cell("MySheet!B4", "Yet another string value.");
+
+ // Now, let's insert a formula into A11 to sum up values in A1:A10, and calculate it afterward.
+ doc.set_formula_cell("A11", "SUM(A1:A10)");
+ doc.calculate(0);
+
+ double value = doc.get_numeric_value("A11");
+ cout << "value of A11: " << value << endl;
+
+ // Insert a new formula to A11.
+ doc.set_formula_cell("A11", "AVERAGE(A1:A10)");
+ doc.calculate(0);
+
+ value = doc.get_numeric_value("A11");
+ cout << "value of A11: " << value << endl;
+
+ // Overwrite A10 with a formula cell with no references.
+ doc.set_formula_cell("A10", "(100+50)/2");
+ doc.calculate(0);
+
+ value = doc.get_numeric_value("A10");
+ cout << "value of A10: " << value << endl;
+
+ value = doc.get_numeric_value("A11");
+ cout << "value of A11: " << value << endl;
+
+ return EXIT_SUCCESS;
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/doc_example/model_context_simple.cpp b/doc_example/model_context_simple.cpp
new file mode 100644
index 0000000..082ff7e
--- /dev/null
+++ b/doc_example/model_context_simple.cpp
@@ -0,0 +1,142 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * Copyright (c) 2020 Kohei Yoshida
+ *
+ * Permission is hereby granted, free of charge, to any person
+ * obtaining a copy of this software and associated documentation
+ * files (the "Software"), to deal in the Software without
+ * restriction, including without limitation the rights to use,
+ * copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following
+ * conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ *
+ ************************************************************************/
+
+#include <ixion/model_context.hpp>
+#include <ixion/macros.hpp>
+#include <ixion/formula_name_resolver.hpp>
+#include <ixion/formula.hpp>
+#include <iostream>
+
+using namespace std;
+
+int main(int argc, char** argv)
+{
+ ixion::model_context cxt;
+
+ // First and foremost, insert a sheet.
+ cxt.append_sheet("MySheet");
+
+ // Now, populate it with some numeric values in A1:A10.
+ for (ixion::abs_address_t pos(0, 0, 0); pos.row <= 9; ++pos.row)
+ {
+ double value = pos.row + 1.0; // Set the row position + 1 as the cell value.
+ cxt.set_numeric_cell(pos, value);
+ }
+
+ // Insert a string value into B2.
+ ixion::abs_address_t B2(0, 1, 1);
+ std::string s = "This cell contains a string value.";
+ cxt.set_string_cell(B2, s);
+
+ // Insert a literal string value into B3.
+ ixion::abs_address_t B3(0, 2, 1);
+ cxt.set_string_cell(B3, "This too contains a string value.");
+
+ // Insert a string value into B4 via string identifier.
+ ixion::string_id_t sid = cxt.add_string("Yet another string value.");
+ ixion::abs_address_t B4(0, 3, 1);
+ cxt.set_string_cell(B4, sid);
+
+ // Now, let's insert a formula into A11 to sum up values in A1:A10.
+
+ // Tokenize formula string first.
+ std::unique_ptr<ixion::formula_name_resolver> resolver =
+ ixion::formula_name_resolver::get(ixion::formula_name_resolver_t::excel_a1, &cxt);
+
+ ixion::abs_address_t A11(0, 10, 0);
+ ixion::formula_tokens_t tokens = ixion::parse_formula_string(cxt, A11, *resolver, "SUM(A1:A10)");
+
+ // Set the tokens into the model.
+ const ixion::formula_cell* cell = cxt.set_formula_cell(A11, std::move(tokens));
+
+ // Register this formula cell for automatic dependency tracking.
+ ixion::register_formula_cell(cxt, A11, cell);
+
+ // Build a set of modified cells, to determine which formula cells depend
+ // on them eithe directly or indirectly. Since we are performing initial
+ // calculation, we can flag the entire sheet to be "modified" to trigger
+ // all formula cells to be calculated.
+
+ ixion::rc_size_t sheet_size = cxt.get_sheet_size();
+ ixion::abs_range_t entire_sheet(0, 0, 0, sheet_size.row, sheet_size.column); // sheet, row, column, row span, column span
+ ixion::abs_range_set_t modified_cells{entire_sheet};
+
+ // Determine formula cells that need re-calculation given the modified cells.
+ // There should be only one formula cell in this example.
+ std::vector<ixion::abs_range_t> dirty_cells = ixion::query_and_sort_dirty_cells(cxt, modified_cells);
+ cout << "number of dirty cells: " << dirty_cells.size() << endl;
+ cout << "dirty cell: " << dirty_cells[0] << endl;
+
+ // Now perform calculation.
+ ixion::calculate_sorted_cells(cxt, dirty_cells, 0);
+
+ double value = cxt.get_numeric_value(A11);
+ cout << "value of A11: " << value << endl;
+
+ // Insert a new formula to A11.
+ tokens = ixion::parse_formula_string(cxt, A11, *resolver, "AVERAGE(A1:A10)");
+
+ // Before overwriting, make sure to UN-register the old cell.
+ ixion::unregister_formula_cell(cxt, A11);
+
+ // Set and register the new formula cell.
+ cell = cxt.set_formula_cell(A11, std::move(tokens));
+ ixion::register_formula_cell(cxt, A11, cell);
+
+ // This time, we know that none of the cell values have changed, but the
+ // formula A11 is updated & needs recalculation.
+ ixion::abs_range_set_t modified_formula_cells{A11};
+ dirty_cells = ixion::query_and_sort_dirty_cells(cxt, ixion::abs_range_set_t(), &modified_formula_cells);
+ cout << "number of dirty cells: " << dirty_cells.size() << endl;
+
+ // Perform calculation again.
+ ixion::calculate_sorted_cells(cxt, dirty_cells, 0);
+
+ value = cxt.get_numeric_value(A11);
+ cout << "value of A11: " << value << endl;
+
+ // Overwrite A10 with a formula cell with no references.
+ ixion::abs_address_t A10(0, 9, 0);
+ tokens = ixion::parse_formula_string(cxt, A10, *resolver, "(100+50)/2");
+ cxt.set_formula_cell(A10, std::move(tokens));
+ // No need to register this cell since it does not reference any other cells.
+
+ modified_formula_cells = { A10 };
+ dirty_cells = ixion::query_and_sort_dirty_cells(cxt, ixion::abs_range_set_t(), &modified_formula_cells);
+ cout << "number of dirty cells: " << dirty_cells.size() << endl;
+
+ ixion::calculate_sorted_cells(cxt, dirty_cells, 0);
+ value = cxt.get_numeric_value(A10);
+ cout << "value of A10: " << value << endl;
+ value = cxt.get_numeric_value(A11);
+ cout << "value of A11: " << value << endl;
+
+ return EXIT_SUCCESS;
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/doc_example/section_examples/Makefile.am b/doc_example/section_examples/Makefile.am
new file mode 100644
index 0000000..eeb2993
--- /dev/null
+++ b/doc_example/section_examples/Makefile.am
@@ -0,0 +1,19 @@
+
+AM_CPPFLAGS = \
+ -I$(top_srcdir)/include \
+ $(MDDS_CFLAGS) $(LIBIXION_CFLAGS) \
+ -DSRCDIR=\""$(top_srcdir)"\"
+
+bin_PROGRAMS =
+
+EXTRA_PROGRAMS = \
+ cell-access
+
+cell_access_SOURCES = cell_access.cpp
+cell_access_LDADD = ../../src/libixion/libixion-@IXION_API_VERSION@.la
+
+TESTS = \
+ cell-access
+
+distclean-local:
+ rm -rf $(TESTS)
diff --git a/doc_example/section_examples/Makefile.in b/doc_example/section_examples/Makefile.in
new file mode 100644
index 0000000..ad4d0cb
--- /dev/null
+++ b/doc_example/section_examples/Makefile.in
@@ -0,0 +1,1069 @@
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
+
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+VPATH = @srcdir@
+am__is_gnu_make = { \
+ if test -z '$(MAKELEVEL)'; then \
+ false; \
+ elif test -n '$(MAKE_HOST)'; then \
+ true; \
+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+ true; \
+ else \
+ false; \
+ fi; \
+}
+am__make_running_with_option = \
+ case $${target_option-} in \
+ ?) ;; \
+ *) echo "am__make_running_with_option: internal error: invalid" \
+ "target option '$${target_option-}' specified" >&2; \
+ exit 1;; \
+ esac; \
+ has_opt=no; \
+ sane_makeflags=$$MAKEFLAGS; \
+ if $(am__is_gnu_make); then \
+ sane_makeflags=$$MFLAGS; \
+ else \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ bs=\\; \
+ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
+ esac; \
+ fi; \
+ skip_next=no; \
+ strip_trailopt () \
+ { \
+ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+ }; \
+ for flg in $$sane_makeflags; do \
+ test $$skip_next = yes && { skip_next=no; continue; }; \
+ case $$flg in \
+ *=*|--*) continue;; \
+ -*I) strip_trailopt 'I'; skip_next=yes;; \
+ -*I?*) strip_trailopt 'I';; \
+ -*O) strip_trailopt 'O'; skip_next=yes;; \
+ -*O?*) strip_trailopt 'O';; \
+ -*l) strip_trailopt 'l'; skip_next=yes;; \
+ -*l?*) strip_trailopt 'l';; \
+ -[dEDm]) skip_next=yes;; \
+ -[JT]) skip_next=yes;; \
+ esac; \
+ case $$flg in \
+ *$$target_option*) has_opt=yes; break;; \
+ esac; \
+ done; \
+ test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+bin_PROGRAMS =
+EXTRA_PROGRAMS = cell-access$(EXEEXT)
+TESTS = cell-access$(EXEEXT)
+subdir = doc_example/section_examples
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/ax_cxx_compile_stdcxx.m4 \
+ $(top_srcdir)/m4/ax_cxx_compile_stdcxx_17.m4 \
+ $(top_srcdir)/m4/boost.m4 $(top_srcdir)/m4/libtool.m4 \
+ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
+ $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+am__installdirs = "$(DESTDIR)$(bindir)"
+PROGRAMS = $(bin_PROGRAMS)
+am_cell_access_OBJECTS = cell_access.$(OBJEXT)
+cell_access_OBJECTS = $(am_cell_access_OBJECTS)
+cell_access_DEPENDENCIES = \
+ ../../src/libixion/libixion-@IXION_API_VERSION@.la
+AM_V_lt = $(am__v_lt_@AM_V@)
+am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
+am__v_lt_0 = --silent
+am__v_lt_1 =
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo " GEN " $@;
+am__v_GEN_1 =
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 =
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__maybe_remake_depfiles = depfiles
+am__depfiles_remade = ./$(DEPDIR)/cell_access.Po
+am__mv = mv -f
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CXXFLAGS) $(CXXFLAGS)
+AM_V_CXX = $(am__v_CXX_@AM_V@)
+am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@)
+am__v_CXX_0 = @echo " CXX " $@;
+am__v_CXX_1 =
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CXXLD = $(am__v_CXXLD_@AM_V@)
+am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@)
+am__v_CXXLD_0 = @echo " CXXLD " $@;
+am__v_CXXLD_1 =
+SOURCES = $(cell_access_SOURCES)
+DIST_SOURCES = $(cell_access_SOURCES)
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+# Read a list of newline-separated strings from the standard input,
+# and print each of them once, without duplicates. Input order is
+# *not* preserved.
+am__uniquify_input = $(AWK) '\
+ BEGIN { nonempty = 0; } \
+ { items[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in items) print i; }; } \
+'
+# Make sure the list of sources is unique. This is necessary because,
+# e.g., the same source file might be shared among _SOURCES variables
+# for different programs/libraries.
+am__define_uniq_tagged_files = \
+ list='$(am__tagged_files)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | $(am__uniquify_input)`
+am__tty_colors_dummy = \
+ mgn= red= grn= lgn= blu= brg= std=; \
+ am__color_tests=no
+am__tty_colors = { \
+ $(am__tty_colors_dummy); \
+ if test "X$(AM_COLOR_TESTS)" = Xno; then \
+ am__color_tests=no; \
+ elif test "X$(AM_COLOR_TESTS)" = Xalways; then \
+ am__color_tests=yes; \
+ elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \
+ am__color_tests=yes; \
+ fi; \
+ if test $$am__color_tests = yes; then \
+ red=''; \
+ grn=''; \
+ lgn=''; \
+ blu=''; \
+ mgn=''; \
+ brg=''; \
+ std=''; \
+ fi; \
+}
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+ if (++n[$$2] == $(am__install_max)) \
+ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+ END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+ test -z "$$files" \
+ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+ $(am__cd) "$$dir" && rm -f $$files; }; \
+ }
+am__recheck_rx = ^[ ]*:recheck:[ ]*
+am__global_test_result_rx = ^[ ]*:global-test-result:[ ]*
+am__copy_in_global_log_rx = ^[ ]*:copy-in-global-log:[ ]*
+# A command that, given a newline-separated list of test names on the
+# standard input, print the name of the tests that are to be re-run
+# upon "make recheck".
+am__list_recheck_tests = $(AWK) '{ \
+ recheck = 1; \
+ while ((rc = (getline line < ($$0 ".trs"))) != 0) \
+ { \
+ if (rc < 0) \
+ { \
+ if ((getline line2 < ($$0 ".log")) < 0) \
+ recheck = 0; \
+ break; \
+ } \
+ else if (line ~ /$(am__recheck_rx)[nN][Oo]/) \
+ { \
+ recheck = 0; \
+ break; \
+ } \
+ else if (line ~ /$(am__recheck_rx)[yY][eE][sS]/) \
+ { \
+ break; \
+ } \
+ }; \
+ if (recheck) \
+ print $$0; \
+ close ($$0 ".trs"); \
+ close ($$0 ".log"); \
+}'
+# A command that, given a newline-separated list of test names on the
+# standard input, create the global log from their .trs and .log files.
+am__create_global_log = $(AWK) ' \
+function fatal(msg) \
+{ \
+ print "fatal: making $@: " msg | "cat >&2"; \
+ exit 1; \
+} \
+function rst_section(header) \
+{ \
+ print header; \
+ len = length(header); \
+ for (i = 1; i <= len; i = i + 1) \
+ printf "="; \
+ printf "\n\n"; \
+} \
+{ \
+ copy_in_global_log = 1; \
+ global_test_result = "RUN"; \
+ while ((rc = (getline line < ($$0 ".trs"))) != 0) \
+ { \
+ if (rc < 0) \
+ fatal("failed to read from " $$0 ".trs"); \
+ if (line ~ /$(am__global_test_result_rx)/) \
+ { \
+ sub("$(am__global_test_result_rx)", "", line); \
+ sub("[ ]*$$", "", line); \
+ global_test_result = line; \
+ } \
+ else if (line ~ /$(am__copy_in_global_log_rx)[nN][oO]/) \
+ copy_in_global_log = 0; \
+ }; \
+ if (copy_in_global_log) \
+ { \
+ rst_section(global_test_result ": " $$0); \
+ while ((rc = (getline line < ($$0 ".log"))) != 0) \
+ { \
+ if (rc < 0) \
+ fatal("failed to read from " $$0 ".log"); \
+ print line; \
+ }; \
+ printf "\n"; \
+ }; \
+ close ($$0 ".trs"); \
+ close ($$0 ".log"); \
+}'
+# Restructured Text title.
+am__rst_title = { sed 's/.*/ & /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; }
+# Solaris 10 'make', and several other traditional 'make' implementations,
+# pass "-e" to $(SHELL), and POSIX 2008 even requires this. Work around it
+# by disabling -e (using the XSI extension "set +e") if it's set.
+am__sh_e_setup = case $$- in *e*) set +e;; esac
+# Default flags passed to test drivers.
+am__common_driver_flags = \
+ --color-tests "$$am__color_tests" \
+ --enable-hard-errors "$$am__enable_hard_errors" \
+ --expect-failure "$$am__expect_failure"
+# To be inserted before the command running the test. Creates the
+# directory for the log if needed. Stores in $dir the directory
+# containing $f, in $tst the test, in $log the log. Executes the
+# developer- defined test setup AM_TESTS_ENVIRONMENT (if any), and
+# passes TESTS_ENVIRONMENT. Set up options for the wrapper that
+# will run the test scripts (or their associated LOG_COMPILER, if
+# thy have one).
+am__check_pre = \
+$(am__sh_e_setup); \
+$(am__vpath_adj_setup) $(am__vpath_adj) \
+$(am__tty_colors); \
+srcdir=$(srcdir); export srcdir; \
+case "$@" in \
+ */*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;; \
+ *) am__odir=.;; \
+esac; \
+test "x$$am__odir" = x"." || test -d "$$am__odir" \
+ || $(MKDIR_P) "$$am__odir" || exit $$?; \
+if test -f "./$$f"; then dir=./; \
+elif test -f "$$f"; then dir=; \
+else dir="$(srcdir)/"; fi; \
+tst=$$dir$$f; log='$@'; \
+if test -n '$(DISABLE_HARD_ERRORS)'; then \
+ am__enable_hard_errors=no; \
+else \
+ am__enable_hard_errors=yes; \
+fi; \
+case " $(XFAIL_TESTS) " in \
+ *[\ \ ]$$f[\ \ ]* | *[\ \ ]$$dir$$f[\ \ ]*) \
+ am__expect_failure=yes;; \
+ *) \
+ am__expect_failure=no;; \
+esac; \
+$(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT)
+# A shell command to get the names of the tests scripts with any registered
+# extension removed (i.e., equivalently, the names of the test logs, with
+# the '.log' extension removed). The result is saved in the shell variable
+# '$bases'. This honors runtime overriding of TESTS and TEST_LOGS. Sadly,
+# we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)",
+# since that might cause problem with VPATH rewrites for suffix-less tests.
+# See also 'test-harness-vpath-rewrite.sh' and 'test-trs-basic.sh'.
+am__set_TESTS_bases = \
+ bases='$(TEST_LOGS)'; \
+ bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \
+ bases=`echo $$bases`
+AM_TESTSUITE_SUMMARY_HEADER = ' for $(PACKAGE_STRING)'
+RECHECK_LOGS = $(TEST_LOGS)
+AM_RECURSIVE_TARGETS = check recheck
+TEST_SUITE_LOG = test-suite.log
+TEST_EXTENSIONS = @EXEEXT@ .test
+LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver
+LOG_COMPILE = $(LOG_COMPILER) $(AM_LOG_FLAGS) $(LOG_FLAGS)
+am__set_b = \
+ case '$@' in \
+ */*) \
+ case '$*' in \
+ */*) b='$*';; \
+ *) b=`echo '$@' | sed 's/\.log$$//'`; \
+ esac;; \
+ *) \
+ b='$*';; \
+ esac
+am__test_logs1 = $(TESTS:=.log)
+am__test_logs2 = $(am__test_logs1:@EXEEXT@.log=.log)
+TEST_LOGS = $(am__test_logs2:.test.log=.log)
+TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver
+TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \
+ $(TEST_LOG_FLAGS)
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp \
+ $(top_srcdir)/test-driver
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AS = @AS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+BOOST_CPPFLAGS = @BOOST_CPPFLAGS@
+BOOST_FILESYSTEM_LDFLAGS = @BOOST_FILESYSTEM_LDFLAGS@
+BOOST_FILESYSTEM_LDPATH = @BOOST_FILESYSTEM_LDPATH@
+BOOST_FILESYSTEM_LIBS = @BOOST_FILESYSTEM_LIBS@
+BOOST_LDPATH = @BOOST_LDPATH@
+BOOST_PROGRAM_OPTIONS_LDFLAGS = @BOOST_PROGRAM_OPTIONS_LDFLAGS@
+BOOST_PROGRAM_OPTIONS_LDPATH = @BOOST_PROGRAM_OPTIONS_LDPATH@
+BOOST_PROGRAM_OPTIONS_LIBS = @BOOST_PROGRAM_OPTIONS_LIBS@
+BOOST_ROOT = @BOOST_ROOT@
+BOOST_SYSTEM_LDFLAGS = @BOOST_SYSTEM_LDFLAGS@
+BOOST_SYSTEM_LDPATH = @BOOST_SYSTEM_LDPATH@
+BOOST_SYSTEM_LIBS = @BOOST_SYSTEM_LIBS@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPPFLAGS = @CPPFLAGS@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DISTCHECK_CONFIGURE_FLAGS = @DISTCHECK_CONFIGURE_FLAGS@
+DLLTOOL = @DLLTOOL@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+ETAGS = @ETAGS@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+GREP = @GREP@
+HAVE_CXX17 = @HAVE_CXX17@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+IXION_API_VERSION = @IXION_API_VERSION@
+IXION_MAJOR_API_VERSION = @IXION_MAJOR_API_VERSION@
+IXION_MAJOR_VERSION = @IXION_MAJOR_VERSION@
+IXION_MICRO_VERSION = @IXION_MICRO_VERSION@
+IXION_MINOR_API_VERSION = @IXION_MINOR_API_VERSION@
+IXION_MINOR_VERSION = @IXION_MINOR_VERSION@
+IXION_VERSION = @IXION_VERSION@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
+MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MDDS_CFLAGS = @MDDS_CFLAGS@
+MDDS_LIBS = @MDDS_LIBS@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
+POW_LIB = @POW_LIB@
+PYTHON = @PYTHON@
+PYTHON_CFLAGS = @PYTHON_CFLAGS@
+PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
+PYTHON_LIBS = @PYTHON_LIBS@
+PYTHON_PLATFORM = @PYTHON_PLATFORM@
+PYTHON_PREFIX = @PYTHON_PREFIX@
+PYTHON_VERSION = @PYTHON_VERSION@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+VULKAN_CFLAGS = @VULKAN_CFLAGS@
+VULKAN_LIBS = @VULKAN_LIBS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+pkgpyexecdir = @pkgpyexecdir@
+pkgpythondir = @pkgpythondir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+pyexecdir = @pyexecdir@
+pythondir = @pythondir@
+runstatedir = @runstatedir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+AM_CPPFLAGS = \
+ -I$(top_srcdir)/include \
+ $(MDDS_CFLAGS) $(LIBIXION_CFLAGS) \
+ -DSRCDIR=\""$(top_srcdir)"\"
+
+cell_access_SOURCES = cell_access.cpp
+cell_access_LDADD = ../../src/libixion/libixion-@IXION_API_VERSION@.la
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .cpp .lo .log .o .obj .test .test$(EXEEXT) .trs
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign doc_example/section_examples/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --foreign doc_example/section_examples/Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+install-binPROGRAMS: $(bin_PROGRAMS)
+ @$(NORMAL_INSTALL)
+ @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \
+ fi; \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed 's/$(EXEEXT)$$//' | \
+ while read p p1; do if test -f $$p \
+ || test -f $$p1 \
+ ; then echo "$$p"; echo "$$p"; else :; fi; \
+ done | \
+ sed -e 'p;s,.*/,,;n;h' \
+ -e 's|.*|.|' \
+ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
+ sed 'N;N;N;s,\n, ,g' | \
+ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
+ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+ if ($$2 == $$4) files[d] = files[d] " " $$1; \
+ else { print "f", $$3 "/" $$4, $$1; } } \
+ END { for (d in files) print "f", d, files[d] }' | \
+ while read type dir files; do \
+ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+ test -z "$$files" || { \
+ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
+ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
+ } \
+ ; done
+
+uninstall-binPROGRAMS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+ files=`for p in $$list; do echo "$$p"; done | \
+ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
+ -e 's/$$/$(EXEEXT)/' \
+ `; \
+ test -n "$$list" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(bindir)" && rm -f $$files
+
+clean-binPROGRAMS:
+ @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \
+ echo " rm -f" $$list; \
+ rm -f $$list || exit $$?; \
+ test -n "$(EXEEXT)" || exit 0; \
+ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+ echo " rm -f" $$list; \
+ rm -f $$list
+
+cell-access$(EXEEXT): $(cell_access_OBJECTS) $(cell_access_DEPENDENCIES) $(EXTRA_cell_access_DEPENDENCIES)
+ @rm -f cell-access$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cell_access_OBJECTS) $(cell_access_LDADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cell_access.Po@am__quote@ # am--include-marker
+
+$(am__depfiles_remade):
+ @$(MKDIR_P) $(@D)
+ @echo '# dummy' >$@-t && $(am__mv) $@-t $@
+
+am--depfiles: $(am__depfiles_remade)
+
+.cpp.o:
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $<
+
+.cpp.obj:
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cpp.lo:
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+ID: $(am__tagged_files)
+ $(am__define_uniq_tagged_files); mkid -fID $$unique
+tags: tags-am
+TAGS: tags
+
+tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ set x; \
+ here=`pwd`; \
+ $(am__define_uniq_tagged_files); \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: ctags-am
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ $(am__define_uniq_tagged_files); \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+cscopelist: cscopelist-am
+
+cscopelist-am: $(am__tagged_files)
+ list='$(am__tagged_files)'; \
+ case "$(srcdir)" in \
+ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+ *) sdir=$(subdir)/$(srcdir) ;; \
+ esac; \
+ for i in $$list; do \
+ if test -f "$$i"; then \
+ echo "$(subdir)/$$i"; \
+ else \
+ echo "$$sdir/$$i"; \
+ fi; \
+ done >> $(top_builddir)/cscope.files
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+# Recover from deleted '.trs' file; this should ensure that
+# "rm -f foo.log; make foo.trs" re-run 'foo.test', and re-create
+# both 'foo.log' and 'foo.trs'. Break the recipe in two subshells
+# to avoid problems with "make -n".
+.log.trs:
+ rm -f $< $@
+ $(MAKE) $(AM_MAKEFLAGS) $<
+
+# Leading 'am--fnord' is there to ensure the list of targets does not
+# expand to empty, as could happen e.g. with make check TESTS=''.
+am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck)
+am--force-recheck:
+ @:
+
+$(TEST_SUITE_LOG): $(TEST_LOGS)
+ @$(am__set_TESTS_bases); \
+ am__f_ok () { test -f "$$1" && test -r "$$1"; }; \
+ redo_bases=`for i in $$bases; do \
+ am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \
+ done`; \
+ if test -n "$$redo_bases"; then \
+ redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \
+ redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \
+ if $(am__make_dryrun); then :; else \
+ rm -f $$redo_logs && rm -f $$redo_results || exit 1; \
+ fi; \
+ fi; \
+ if test -n "$$am__remaking_logs"; then \
+ echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \
+ "recursion detected" >&2; \
+ elif test -n "$$redo_logs"; then \
+ am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \
+ fi; \
+ if $(am__make_dryrun); then :; else \
+ st=0; \
+ errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \
+ for i in $$redo_bases; do \
+ test -f $$i.trs && test -r $$i.trs \
+ || { echo "$$errmsg $$i.trs" >&2; st=1; }; \
+ test -f $$i.log && test -r $$i.log \
+ || { echo "$$errmsg $$i.log" >&2; st=1; }; \
+ done; \
+ test $$st -eq 0 || exit 1; \
+ fi
+ @$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \
+ ws='[ ]'; \
+ results=`for b in $$bases; do echo $$b.trs; done`; \
+ test -n "$$results" || results=/dev/null; \
+ all=` grep "^$$ws*:test-result:" $$results | wc -l`; \
+ pass=` grep "^$$ws*:test-result:$$ws*PASS" $$results | wc -l`; \
+ fail=` grep "^$$ws*:test-result:$$ws*FAIL" $$results | wc -l`; \
+ skip=` grep "^$$ws*:test-result:$$ws*SKIP" $$results | wc -l`; \
+ xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \
+ xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \
+ error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \
+ if test `expr $$fail + $$xpass + $$error` -eq 0; then \
+ success=true; \
+ else \
+ success=false; \
+ fi; \
+ br='==================='; br=$$br$$br$$br$$br; \
+ result_count () \
+ { \
+ if test x"$$1" = x"--maybe-color"; then \
+ maybe_colorize=yes; \
+ elif test x"$$1" = x"--no-color"; then \
+ maybe_colorize=no; \
+ else \
+ echo "$@: invalid 'result_count' usage" >&2; exit 4; \
+ fi; \
+ shift; \
+ desc=$$1 count=$$2; \
+ if test $$maybe_colorize = yes && test $$count -gt 0; then \
+ color_start=$$3 color_end=$$std; \
+ else \
+ color_start= color_end=; \
+ fi; \
+ echo "$${color_start}# $$desc $$count$${color_end}"; \
+ }; \
+ create_testsuite_report () \
+ { \
+ result_count $$1 "TOTAL:" $$all "$$brg"; \
+ result_count $$1 "PASS: " $$pass "$$grn"; \
+ result_count $$1 "SKIP: " $$skip "$$blu"; \
+ result_count $$1 "XFAIL:" $$xfail "$$lgn"; \
+ result_count $$1 "FAIL: " $$fail "$$red"; \
+ result_count $$1 "XPASS:" $$xpass "$$red"; \
+ result_count $$1 "ERROR:" $$error "$$mgn"; \
+ }; \
+ { \
+ echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \
+ $(am__rst_title); \
+ create_testsuite_report --no-color; \
+ echo; \
+ echo ".. contents:: :depth: 2"; \
+ echo; \
+ for b in $$bases; do echo $$b; done \
+ | $(am__create_global_log); \
+ } >$(TEST_SUITE_LOG).tmp || exit 1; \
+ mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \
+ if $$success; then \
+ col="$$grn"; \
+ else \
+ col="$$red"; \
+ test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \
+ fi; \
+ echo "$${col}$$br$${std}"; \
+ echo "$${col}Testsuite summary"$(AM_TESTSUITE_SUMMARY_HEADER)"$${std}"; \
+ echo "$${col}$$br$${std}"; \
+ create_testsuite_report --maybe-color; \
+ echo "$$col$$br$$std"; \
+ if $$success; then :; else \
+ echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}"; \
+ if test -n "$(PACKAGE_BUGREPORT)"; then \
+ echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}"; \
+ fi; \
+ echo "$$col$$br$$std"; \
+ fi; \
+ $$success || exit 1
+
+check-TESTS:
+ @list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list
+ @list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list
+ @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
+ @set +e; $(am__set_TESTS_bases); \
+ log_list=`for i in $$bases; do echo $$i.log; done`; \
+ trs_list=`for i in $$bases; do echo $$i.trs; done`; \
+ log_list=`echo $$log_list`; trs_list=`echo $$trs_list`; \
+ $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \
+ exit $$?;
+recheck: all
+ @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
+ @set +e; $(am__set_TESTS_bases); \
+ bases=`for i in $$bases; do echo $$i; done \
+ | $(am__list_recheck_tests)` || exit 1; \
+ log_list=`for i in $$bases; do echo $$i.log; done`; \
+ log_list=`echo $$log_list`; \
+ $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) \
+ am__force_recheck=am--force-recheck \
+ TEST_LOGS="$$log_list"; \
+ exit $$?
+cell-access.log: cell-access$(EXEEXT)
+ @p='cell-access$(EXEEXT)'; \
+ b='cell-access'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+.test.log:
+ @p='$<'; \
+ $(am__set_b); \
+ $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+@am__EXEEXT_TRUE@.test$(EXEEXT).log:
+@am__EXEEXT_TRUE@ @p='$<'; \
+@am__EXEEXT_TRUE@ $(am__set_b); \
+@am__EXEEXT_TRUE@ $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \
+@am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \
+@am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \
+@am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT)
+distdir: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) distdir-am
+
+distdir-am: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+ $(MAKE) $(AM_MAKEFLAGS) check-TESTS
+check: check-am
+all-am: Makefile $(PROGRAMS)
+installdirs:
+ for dir in "$(DESTDIR)$(bindir)"; do \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+ done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
+mostlyclean-generic:
+ -test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS)
+ -test -z "$(TEST_LOGS:.log=.trs)" || rm -f $(TEST_LOGS:.log=.trs)
+ -test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+ -rm -f ./$(DEPDIR)/cell_access.Po
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-local distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am: install-binPROGRAMS
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -f ./$(DEPDIR)/cell_access.Po
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-binPROGRAMS
+
+.MAKE: check-am install-am install-strip
+
+.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-TESTS \
+ check-am clean clean-binPROGRAMS clean-generic clean-libtool \
+ cscopelist-am ctags ctags-am distclean distclean-compile \
+ distclean-generic distclean-libtool distclean-local \
+ distclean-tags distdir dvi dvi-am html html-am info info-am \
+ install install-am install-binPROGRAMS install-data \
+ install-data-am install-dvi install-dvi-am install-exec \
+ install-exec-am install-html install-html-am install-info \
+ install-info-am install-man install-pdf install-pdf-am \
+ install-ps install-ps-am install-strip installcheck \
+ installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-compile \
+ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+ recheck tags tags-am uninstall uninstall-am \
+ uninstall-binPROGRAMS
+
+.PRECIOUS: Makefile
+
+
+distclean-local:
+ rm -rf $(TESTS)
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/doc_example/section_examples/cell_access.cpp b/doc_example/section_examples/cell_access.cpp
new file mode 100644
index 0000000..06c4a78
--- /dev/null
+++ b/doc_example/section_examples/cell_access.cpp
@@ -0,0 +1,77 @@
+#include <iostream>
+#include <ixion/document.hpp>
+#include <ixion/model_context.hpp>
+#include <ixion/cell_access.hpp>
+#include <ixion/address.hpp>
+
+using namespace std;
+
+void access(const ixion::cell_access& ca)
+{
+ switch (ca.get_value_type())
+ {
+ case ixion::cell_value_t::numeric:
+ {
+ double v = ca.get_numeric_value();
+ cout << "numeric value: " << v << endl;
+ break;
+ }
+ case ixion::cell_value_t::string:
+ {
+ std::string_view s = ca.get_string_value();
+ cout << "string value: " << s << endl;
+ break;
+ }
+ case ixion::cell_value_t::boolean:
+ {
+ cout << "boolean value: " << ca.get_boolean_value() << endl;
+ break;
+ }
+ case ixion::cell_value_t::error:
+ {
+ ixion::formula_error_t err = ca.get_error_value();
+ cout << "error value: " << ixion::get_formula_error_name(err) << endl;
+ break;
+ }
+ case ixion::cell_value_t::empty:
+ {
+ cout << "empty cell" << endl;
+ break;
+ }
+ default:
+ cout << "???" << endl;
+ }
+}
+
+void from_document()
+{
+ ixion::document doc;
+ doc.append_sheet("Sheet");
+
+ // fill this document
+
+ ixion::cell_access ca = doc.get_cell_access("A1");
+
+ access(ca);
+}
+
+void from_model_context()
+{
+ ixion::model_context cxt;
+ cxt.append_sheet("Sheet");
+
+ // fill this model context
+
+ ixion::abs_address_t A1(0, 0, 0);
+ ixion::cell_access ca = cxt.get_cell_access(A1);
+
+ access(ca);
+}
+
+int main(int argc, char** argv)
+{
+ from_document();
+ from_model_context();
+
+ return EXIT_SUCCESS;
+}
diff --git a/include/Makefile.am b/include/Makefile.am
new file mode 100644
index 0000000..242b83d
--- /dev/null
+++ b/include/Makefile.am
@@ -0,0 +1,2 @@
+SUBDIRS = ixion
+
diff --git a/include/Makefile.in b/include/Makefile.in
new file mode 100644
index 0000000..7797335
--- /dev/null
+++ b/include/Makefile.in
@@ -0,0 +1,666 @@
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
+
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+VPATH = @srcdir@
+am__is_gnu_make = { \
+ if test -z '$(MAKELEVEL)'; then \
+ false; \
+ elif test -n '$(MAKE_HOST)'; then \
+ true; \
+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+ true; \
+ else \
+ false; \
+ fi; \
+}
+am__make_running_with_option = \
+ case $${target_option-} in \
+ ?) ;; \
+ *) echo "am__make_running_with_option: internal error: invalid" \
+ "target option '$${target_option-}' specified" >&2; \
+ exit 1;; \
+ esac; \
+ has_opt=no; \
+ sane_makeflags=$$MAKEFLAGS; \
+ if $(am__is_gnu_make); then \
+ sane_makeflags=$$MFLAGS; \
+ else \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ bs=\\; \
+ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
+ esac; \
+ fi; \
+ skip_next=no; \
+ strip_trailopt () \
+ { \
+ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+ }; \
+ for flg in $$sane_makeflags; do \
+ test $$skip_next = yes && { skip_next=no; continue; }; \
+ case $$flg in \
+ *=*|--*) continue;; \
+ -*I) strip_trailopt 'I'; skip_next=yes;; \
+ -*I?*) strip_trailopt 'I';; \
+ -*O) strip_trailopt 'O'; skip_next=yes;; \
+ -*O?*) strip_trailopt 'O';; \
+ -*l) strip_trailopt 'l'; skip_next=yes;; \
+ -*l?*) strip_trailopt 'l';; \
+ -[dEDm]) skip_next=yes;; \
+ -[JT]) skip_next=yes;; \
+ esac; \
+ case $$flg in \
+ *$$target_option*) has_opt=yes; break;; \
+ esac; \
+ done; \
+ test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = include
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/ax_cxx_compile_stdcxx.m4 \
+ $(top_srcdir)/m4/ax_cxx_compile_stdcxx_17.m4 \
+ $(top_srcdir)/m4/boost.m4 $(top_srcdir)/m4/libtool.m4 \
+ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
+ $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo " GEN " $@;
+am__v_GEN_1 =
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 =
+SOURCES =
+DIST_SOURCES =
+RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
+ ctags-recursive dvi-recursive html-recursive info-recursive \
+ install-data-recursive install-dvi-recursive \
+ install-exec-recursive install-html-recursive \
+ install-info-recursive install-pdf-recursive \
+ install-ps-recursive install-recursive installcheck-recursive \
+ installdirs-recursive pdf-recursive ps-recursive \
+ tags-recursive uninstall-recursive
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
+ distclean-recursive maintainer-clean-recursive
+am__recursive_targets = \
+ $(RECURSIVE_TARGETS) \
+ $(RECURSIVE_CLEAN_TARGETS) \
+ $(am__extra_recursive_targets)
+AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
+ distdir distdir-am
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+# Read a list of newline-separated strings from the standard input,
+# and print each of them once, without duplicates. Input order is
+# *not* preserved.
+am__uniquify_input = $(AWK) '\
+ BEGIN { nonempty = 0; } \
+ { items[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in items) print i; }; } \
+'
+# Make sure the list of sources is unique. This is necessary because,
+# e.g., the same source file might be shared among _SOURCES variables
+# for different programs/libraries.
+am__define_uniq_tagged_files = \
+ list='$(am__tagged_files)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | $(am__uniquify_input)`
+DIST_SUBDIRS = $(SUBDIRS)
+am__DIST_COMMON = $(srcdir)/Makefile.in
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+am__relativize = \
+ dir0=`pwd`; \
+ sed_first='s,^\([^/]*\)/.*$$,\1,'; \
+ sed_rest='s,^[^/]*/*,,'; \
+ sed_last='s,^.*/\([^/]*\)$$,\1,'; \
+ sed_butlast='s,/*[^/]*$$,,'; \
+ while test -n "$$dir1"; do \
+ first=`echo "$$dir1" | sed -e "$$sed_first"`; \
+ if test "$$first" != "."; then \
+ if test "$$first" = ".."; then \
+ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
+ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
+ else \
+ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
+ if test "$$first2" = "$$first"; then \
+ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
+ else \
+ dir2="../$$dir2"; \
+ fi; \
+ dir0="$$dir0"/"$$first"; \
+ fi; \
+ fi; \
+ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
+ done; \
+ reldir="$$dir2"
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AS = @AS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+BOOST_CPPFLAGS = @BOOST_CPPFLAGS@
+BOOST_FILESYSTEM_LDFLAGS = @BOOST_FILESYSTEM_LDFLAGS@
+BOOST_FILESYSTEM_LDPATH = @BOOST_FILESYSTEM_LDPATH@
+BOOST_FILESYSTEM_LIBS = @BOOST_FILESYSTEM_LIBS@
+BOOST_LDPATH = @BOOST_LDPATH@
+BOOST_PROGRAM_OPTIONS_LDFLAGS = @BOOST_PROGRAM_OPTIONS_LDFLAGS@
+BOOST_PROGRAM_OPTIONS_LDPATH = @BOOST_PROGRAM_OPTIONS_LDPATH@
+BOOST_PROGRAM_OPTIONS_LIBS = @BOOST_PROGRAM_OPTIONS_LIBS@
+BOOST_ROOT = @BOOST_ROOT@
+BOOST_SYSTEM_LDFLAGS = @BOOST_SYSTEM_LDFLAGS@
+BOOST_SYSTEM_LDPATH = @BOOST_SYSTEM_LDPATH@
+BOOST_SYSTEM_LIBS = @BOOST_SYSTEM_LIBS@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPPFLAGS = @CPPFLAGS@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DISTCHECK_CONFIGURE_FLAGS = @DISTCHECK_CONFIGURE_FLAGS@
+DLLTOOL = @DLLTOOL@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+ETAGS = @ETAGS@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+GREP = @GREP@
+HAVE_CXX17 = @HAVE_CXX17@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+IXION_API_VERSION = @IXION_API_VERSION@
+IXION_MAJOR_API_VERSION = @IXION_MAJOR_API_VERSION@
+IXION_MAJOR_VERSION = @IXION_MAJOR_VERSION@
+IXION_MICRO_VERSION = @IXION_MICRO_VERSION@
+IXION_MINOR_API_VERSION = @IXION_MINOR_API_VERSION@
+IXION_MINOR_VERSION = @IXION_MINOR_VERSION@
+IXION_VERSION = @IXION_VERSION@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
+MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MDDS_CFLAGS = @MDDS_CFLAGS@
+MDDS_LIBS = @MDDS_LIBS@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
+POW_LIB = @POW_LIB@
+PYTHON = @PYTHON@
+PYTHON_CFLAGS = @PYTHON_CFLAGS@
+PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
+PYTHON_LIBS = @PYTHON_LIBS@
+PYTHON_PLATFORM = @PYTHON_PLATFORM@
+PYTHON_PREFIX = @PYTHON_PREFIX@
+PYTHON_VERSION = @PYTHON_VERSION@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+VULKAN_CFLAGS = @VULKAN_CFLAGS@
+VULKAN_LIBS = @VULKAN_LIBS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+pkgpyexecdir = @pkgpyexecdir@
+pkgpythondir = @pkgpythondir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+pyexecdir = @pyexecdir@
+pythondir = @pythondir@
+runstatedir = @runstatedir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+SUBDIRS = ixion
+all: all-recursive
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign include/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --foreign include/Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run 'make' without going through this Makefile.
+# To change the values of 'make' variables: instead of editing Makefiles,
+# (1) if the variable is set in 'config.status', edit 'config.status'
+# (which will cause the Makefiles to be regenerated when you run 'make');
+# (2) otherwise, pass the desired values on the 'make' command line.
+$(am__recursive_targets):
+ @fail=; \
+ if $(am__make_keepgoing); then \
+ failcom='fail=yes'; \
+ else \
+ failcom='exit 1'; \
+ fi; \
+ dot_seen=no; \
+ target=`echo $@ | sed s/-recursive//`; \
+ case "$@" in \
+ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+ *) list='$(SUBDIRS)' ;; \
+ esac; \
+ for subdir in $$list; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ dot_seen=yes; \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || eval $$failcom; \
+ done; \
+ if test "$$dot_seen" = "no"; then \
+ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+ fi; test -z "$$fail"
+
+ID: $(am__tagged_files)
+ $(am__define_uniq_tagged_files); mkid -fID $$unique
+tags: tags-recursive
+TAGS: tags
+
+tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ set x; \
+ here=`pwd`; \
+ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
+ include_option=--etags-include; \
+ empty_fix=.; \
+ else \
+ include_option=--include; \
+ empty_fix=; \
+ fi; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ test ! -f $$subdir/TAGS || \
+ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
+ fi; \
+ done; \
+ $(am__define_uniq_tagged_files); \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: ctags-recursive
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ $(am__define_uniq_tagged_files); \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+cscopelist: cscopelist-recursive
+
+cscopelist-am: $(am__tagged_files)
+ list='$(am__tagged_files)'; \
+ case "$(srcdir)" in \
+ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+ *) sdir=$(subdir)/$(srcdir) ;; \
+ esac; \
+ for i in $$list; do \
+ if test -f "$$i"; then \
+ echo "$(subdir)/$$i"; \
+ else \
+ echo "$$sdir/$$i"; \
+ fi; \
+ done >> $(top_builddir)/cscope.files
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+distdir: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) distdir-am
+
+distdir-am: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+ @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ $(am__make_dryrun) \
+ || test -d "$(distdir)/$$subdir" \
+ || $(MKDIR_P) "$(distdir)/$$subdir" \
+ || exit 1; \
+ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
+ $(am__relativize); \
+ new_distdir=$$reldir; \
+ dir1=$$subdir; dir2="$(top_distdir)"; \
+ $(am__relativize); \
+ new_top_distdir=$$reldir; \
+ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
+ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
+ ($(am__cd) $$subdir && \
+ $(MAKE) $(AM_MAKEFLAGS) \
+ top_distdir="$$new_top_distdir" \
+ distdir="$$new_distdir" \
+ am__remove_distdir=: \
+ am__skip_length_check=: \
+ am__skip_mode_fix=: \
+ distdir) \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-recursive
+all-am: Makefile
+installdirs: installdirs-recursive
+installdirs-am:
+install: install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-recursive
+install-strip:
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-recursive
+
+clean-am: clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-recursive
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+html: html-recursive
+
+html-am:
+
+info: info-recursive
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-recursive
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-recursive
+
+install-html-am:
+
+install-info: install-info-recursive
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-recursive
+
+install-pdf-am:
+
+install-ps: install-ps-recursive
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-recursive
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-recursive
+
+pdf-am:
+
+ps: ps-recursive
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: $(am__recursive_targets) install-am install-strip
+
+.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \
+ check-am clean clean-generic clean-libtool cscopelist-am ctags \
+ ctags-am distclean distclean-generic distclean-libtool \
+ distclean-tags distdir dvi dvi-am html html-am info info-am \
+ install install-am install-data install-data-am install-dvi \
+ install-dvi-am install-exec install-exec-am install-html \
+ install-html-am install-info install-info-am install-man \
+ install-pdf install-pdf-am install-ps install-ps-am \
+ install-strip installcheck installcheck-am installdirs \
+ installdirs-am maintainer-clean maintainer-clean-generic \
+ mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
+ ps ps-am tags tags-am uninstall uninstall-am
+
+.PRECIOUS: Makefile
+
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/include/ixion/Makefile.am b/include/ixion/Makefile.am
new file mode 100644
index 0000000..364bd6a
--- /dev/null
+++ b/include/ixion/Makefile.am
@@ -0,0 +1,31 @@
+SUBDIRS = interface
+
+libixiondir = $(includedir)/libixion-@IXION_API_VERSION@/ixion
+libixion_HEADERS = \
+ address.hpp \
+ address_iterator.hpp \
+ cell.hpp \
+ cell_access.hpp \
+ compute_engine.hpp \
+ config.hpp \
+ dirty_cell_tracker.hpp \
+ document.hpp \
+ env.hpp \
+ exceptions.hpp \
+ formula_function_opcode.hpp \
+ formula.hpp \
+ formula_name_resolver.hpp \
+ formula_opcode.hpp \
+ formula_result.hpp \
+ formula_tokens.hpp \
+ formula_tokens_fwd.hpp \
+ global.hpp \
+ info.hpp \
+ macros.hpp \
+ matrix.hpp \
+ model_context.hpp \
+ model_iterator.hpp \
+ module.hpp \
+ named_expressions_iterator.hpp \
+ table.hpp \
+ types.hpp
diff --git a/include/ixion/Makefile.in b/include/ixion/Makefile.in
new file mode 100644
index 0000000..faab7a8
--- /dev/null
+++ b/include/ixion/Makefile.in
@@ -0,0 +1,752 @@
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
+
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+VPATH = @srcdir@
+am__is_gnu_make = { \
+ if test -z '$(MAKELEVEL)'; then \
+ false; \
+ elif test -n '$(MAKE_HOST)'; then \
+ true; \
+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+ true; \
+ else \
+ false; \
+ fi; \
+}
+am__make_running_with_option = \
+ case $${target_option-} in \
+ ?) ;; \
+ *) echo "am__make_running_with_option: internal error: invalid" \
+ "target option '$${target_option-}' specified" >&2; \
+ exit 1;; \
+ esac; \
+ has_opt=no; \
+ sane_makeflags=$$MAKEFLAGS; \
+ if $(am__is_gnu_make); then \
+ sane_makeflags=$$MFLAGS; \
+ else \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ bs=\\; \
+ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
+ esac; \
+ fi; \
+ skip_next=no; \
+ strip_trailopt () \
+ { \
+ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+ }; \
+ for flg in $$sane_makeflags; do \
+ test $$skip_next = yes && { skip_next=no; continue; }; \
+ case $$flg in \
+ *=*|--*) continue;; \
+ -*I) strip_trailopt 'I'; skip_next=yes;; \
+ -*I?*) strip_trailopt 'I';; \
+ -*O) strip_trailopt 'O'; skip_next=yes;; \
+ -*O?*) strip_trailopt 'O';; \
+ -*l) strip_trailopt 'l'; skip_next=yes;; \
+ -*l?*) strip_trailopt 'l';; \
+ -[dEDm]) skip_next=yes;; \
+ -[JT]) skip_next=yes;; \
+ esac; \
+ case $$flg in \
+ *$$target_option*) has_opt=yes; break;; \
+ esac; \
+ done; \
+ test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = include/ixion
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/ax_cxx_compile_stdcxx.m4 \
+ $(top_srcdir)/m4/ax_cxx_compile_stdcxx_17.m4 \
+ $(top_srcdir)/m4/boost.m4 $(top_srcdir)/m4/libtool.m4 \
+ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
+ $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(libixion_HEADERS) \
+ $(am__DIST_COMMON)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo " GEN " $@;
+am__v_GEN_1 =
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 =
+SOURCES =
+DIST_SOURCES =
+RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
+ ctags-recursive dvi-recursive html-recursive info-recursive \
+ install-data-recursive install-dvi-recursive \
+ install-exec-recursive install-html-recursive \
+ install-info-recursive install-pdf-recursive \
+ install-ps-recursive install-recursive installcheck-recursive \
+ installdirs-recursive pdf-recursive ps-recursive \
+ tags-recursive uninstall-recursive
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+ if (++n[$$2] == $(am__install_max)) \
+ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+ END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+ test -z "$$files" \
+ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+ $(am__cd) "$$dir" && rm -f $$files; }; \
+ }
+am__installdirs = "$(DESTDIR)$(libixiondir)"
+HEADERS = $(libixion_HEADERS)
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
+ distclean-recursive maintainer-clean-recursive
+am__recursive_targets = \
+ $(RECURSIVE_TARGETS) \
+ $(RECURSIVE_CLEAN_TARGETS) \
+ $(am__extra_recursive_targets)
+AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
+ distdir distdir-am
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+# Read a list of newline-separated strings from the standard input,
+# and print each of them once, without duplicates. Input order is
+# *not* preserved.
+am__uniquify_input = $(AWK) '\
+ BEGIN { nonempty = 0; } \
+ { items[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in items) print i; }; } \
+'
+# Make sure the list of sources is unique. This is necessary because,
+# e.g., the same source file might be shared among _SOURCES variables
+# for different programs/libraries.
+am__define_uniq_tagged_files = \
+ list='$(am__tagged_files)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | $(am__uniquify_input)`
+DIST_SUBDIRS = $(SUBDIRS)
+am__DIST_COMMON = $(srcdir)/Makefile.in
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+am__relativize = \
+ dir0=`pwd`; \
+ sed_first='s,^\([^/]*\)/.*$$,\1,'; \
+ sed_rest='s,^[^/]*/*,,'; \
+ sed_last='s,^.*/\([^/]*\)$$,\1,'; \
+ sed_butlast='s,/*[^/]*$$,,'; \
+ while test -n "$$dir1"; do \
+ first=`echo "$$dir1" | sed -e "$$sed_first"`; \
+ if test "$$first" != "."; then \
+ if test "$$first" = ".."; then \
+ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
+ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
+ else \
+ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
+ if test "$$first2" = "$$first"; then \
+ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
+ else \
+ dir2="../$$dir2"; \
+ fi; \
+ dir0="$$dir0"/"$$first"; \
+ fi; \
+ fi; \
+ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
+ done; \
+ reldir="$$dir2"
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AS = @AS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+BOOST_CPPFLAGS = @BOOST_CPPFLAGS@
+BOOST_FILESYSTEM_LDFLAGS = @BOOST_FILESYSTEM_LDFLAGS@
+BOOST_FILESYSTEM_LDPATH = @BOOST_FILESYSTEM_LDPATH@
+BOOST_FILESYSTEM_LIBS = @BOOST_FILESYSTEM_LIBS@
+BOOST_LDPATH = @BOOST_LDPATH@
+BOOST_PROGRAM_OPTIONS_LDFLAGS = @BOOST_PROGRAM_OPTIONS_LDFLAGS@
+BOOST_PROGRAM_OPTIONS_LDPATH = @BOOST_PROGRAM_OPTIONS_LDPATH@
+BOOST_PROGRAM_OPTIONS_LIBS = @BOOST_PROGRAM_OPTIONS_LIBS@
+BOOST_ROOT = @BOOST_ROOT@
+BOOST_SYSTEM_LDFLAGS = @BOOST_SYSTEM_LDFLAGS@
+BOOST_SYSTEM_LDPATH = @BOOST_SYSTEM_LDPATH@
+BOOST_SYSTEM_LIBS = @BOOST_SYSTEM_LIBS@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPPFLAGS = @CPPFLAGS@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DISTCHECK_CONFIGURE_FLAGS = @DISTCHECK_CONFIGURE_FLAGS@
+DLLTOOL = @DLLTOOL@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+ETAGS = @ETAGS@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+GREP = @GREP@
+HAVE_CXX17 = @HAVE_CXX17@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+IXION_API_VERSION = @IXION_API_VERSION@
+IXION_MAJOR_API_VERSION = @IXION_MAJOR_API_VERSION@
+IXION_MAJOR_VERSION = @IXION_MAJOR_VERSION@
+IXION_MICRO_VERSION = @IXION_MICRO_VERSION@
+IXION_MINOR_API_VERSION = @IXION_MINOR_API_VERSION@
+IXION_MINOR_VERSION = @IXION_MINOR_VERSION@
+IXION_VERSION = @IXION_VERSION@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
+MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MDDS_CFLAGS = @MDDS_CFLAGS@
+MDDS_LIBS = @MDDS_LIBS@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
+POW_LIB = @POW_LIB@
+PYTHON = @PYTHON@
+PYTHON_CFLAGS = @PYTHON_CFLAGS@
+PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
+PYTHON_LIBS = @PYTHON_LIBS@
+PYTHON_PLATFORM = @PYTHON_PLATFORM@
+PYTHON_PREFIX = @PYTHON_PREFIX@
+PYTHON_VERSION = @PYTHON_VERSION@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+VULKAN_CFLAGS = @VULKAN_CFLAGS@
+VULKAN_LIBS = @VULKAN_LIBS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+pkgpyexecdir = @pkgpyexecdir@
+pkgpythondir = @pkgpythondir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+pyexecdir = @pyexecdir@
+pythondir = @pythondir@
+runstatedir = @runstatedir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+SUBDIRS = interface
+libixiondir = $(includedir)/libixion-@IXION_API_VERSION@/ixion
+libixion_HEADERS = \
+ address.hpp \
+ address_iterator.hpp \
+ cell.hpp \
+ cell_access.hpp \
+ compute_engine.hpp \
+ config.hpp \
+ dirty_cell_tracker.hpp \
+ document.hpp \
+ env.hpp \
+ exceptions.hpp \
+ formula_function_opcode.hpp \
+ formula.hpp \
+ formula_name_resolver.hpp \
+ formula_opcode.hpp \
+ formula_result.hpp \
+ formula_tokens.hpp \
+ formula_tokens_fwd.hpp \
+ global.hpp \
+ info.hpp \
+ macros.hpp \
+ matrix.hpp \
+ model_context.hpp \
+ model_iterator.hpp \
+ module.hpp \
+ named_expressions_iterator.hpp \
+ table.hpp \
+ types.hpp
+
+all: all-recursive
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign include/ixion/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --foreign include/ixion/Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+install-libixionHEADERS: $(libixion_HEADERS)
+ @$(NORMAL_INSTALL)
+ @list='$(libixion_HEADERS)'; test -n "$(libixiondir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(libixiondir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(libixiondir)" || exit 1; \
+ fi; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; \
+ done | $(am__base_list) | \
+ while read files; do \
+ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(libixiondir)'"; \
+ $(INSTALL_HEADER) $$files "$(DESTDIR)$(libixiondir)" || exit $$?; \
+ done
+
+uninstall-libixionHEADERS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(libixion_HEADERS)'; test -n "$(libixiondir)" || list=; \
+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+ dir='$(DESTDIR)$(libixiondir)'; $(am__uninstall_files_from_dir)
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run 'make' without going through this Makefile.
+# To change the values of 'make' variables: instead of editing Makefiles,
+# (1) if the variable is set in 'config.status', edit 'config.status'
+# (which will cause the Makefiles to be regenerated when you run 'make');
+# (2) otherwise, pass the desired values on the 'make' command line.
+$(am__recursive_targets):
+ @fail=; \
+ if $(am__make_keepgoing); then \
+ failcom='fail=yes'; \
+ else \
+ failcom='exit 1'; \
+ fi; \
+ dot_seen=no; \
+ target=`echo $@ | sed s/-recursive//`; \
+ case "$@" in \
+ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+ *) list='$(SUBDIRS)' ;; \
+ esac; \
+ for subdir in $$list; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ dot_seen=yes; \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || eval $$failcom; \
+ done; \
+ if test "$$dot_seen" = "no"; then \
+ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+ fi; test -z "$$fail"
+
+ID: $(am__tagged_files)
+ $(am__define_uniq_tagged_files); mkid -fID $$unique
+tags: tags-recursive
+TAGS: tags
+
+tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ set x; \
+ here=`pwd`; \
+ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
+ include_option=--etags-include; \
+ empty_fix=.; \
+ else \
+ include_option=--include; \
+ empty_fix=; \
+ fi; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ test ! -f $$subdir/TAGS || \
+ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
+ fi; \
+ done; \
+ $(am__define_uniq_tagged_files); \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: ctags-recursive
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ $(am__define_uniq_tagged_files); \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+cscopelist: cscopelist-recursive
+
+cscopelist-am: $(am__tagged_files)
+ list='$(am__tagged_files)'; \
+ case "$(srcdir)" in \
+ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+ *) sdir=$(subdir)/$(srcdir) ;; \
+ esac; \
+ for i in $$list; do \
+ if test -f "$$i"; then \
+ echo "$(subdir)/$$i"; \
+ else \
+ echo "$$sdir/$$i"; \
+ fi; \
+ done >> $(top_builddir)/cscope.files
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+distdir: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) distdir-am
+
+distdir-am: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+ @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ $(am__make_dryrun) \
+ || test -d "$(distdir)/$$subdir" \
+ || $(MKDIR_P) "$(distdir)/$$subdir" \
+ || exit 1; \
+ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
+ $(am__relativize); \
+ new_distdir=$$reldir; \
+ dir1=$$subdir; dir2="$(top_distdir)"; \
+ $(am__relativize); \
+ new_top_distdir=$$reldir; \
+ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
+ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
+ ($(am__cd) $$subdir && \
+ $(MAKE) $(AM_MAKEFLAGS) \
+ top_distdir="$$new_top_distdir" \
+ distdir="$$new_distdir" \
+ am__remove_distdir=: \
+ am__skip_length_check=: \
+ am__skip_mode_fix=: \
+ distdir) \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-recursive
+all-am: Makefile $(HEADERS)
+installdirs: installdirs-recursive
+installdirs-am:
+ for dir in "$(DESTDIR)$(libixiondir)"; do \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+ done
+install: install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-recursive
+install-strip:
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-recursive
+
+clean-am: clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-recursive
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+html: html-recursive
+
+html-am:
+
+info: info-recursive
+
+info-am:
+
+install-data-am: install-libixionHEADERS
+
+install-dvi: install-dvi-recursive
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-recursive
+
+install-html-am:
+
+install-info: install-info-recursive
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-recursive
+
+install-pdf-am:
+
+install-ps: install-ps-recursive
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-recursive
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-recursive
+
+pdf-am:
+
+ps: ps-recursive
+
+ps-am:
+
+uninstall-am: uninstall-libixionHEADERS
+
+.MAKE: $(am__recursive_targets) install-am install-strip
+
+.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \
+ check-am clean clean-generic clean-libtool cscopelist-am ctags \
+ ctags-am distclean distclean-generic distclean-libtool \
+ distclean-tags distdir dvi dvi-am html html-am info info-am \
+ install install-am install-data install-data-am install-dvi \
+ install-dvi-am install-exec install-exec-am install-html \
+ install-html-am install-info install-info-am \
+ install-libixionHEADERS install-man install-pdf install-pdf-am \
+ install-ps install-ps-am install-strip installcheck \
+ installcheck-am installdirs installdirs-am maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-generic \
+ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \
+ uninstall-am uninstall-libixionHEADERS
+
+.PRECIOUS: Makefile
+
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/include/ixion/address.hpp b/include/ixion/address.hpp
new file mode 100644
index 0000000..aed09a2
--- /dev/null
+++ b/include/ixion/address.hpp
@@ -0,0 +1,347 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef INCLUDED_IXION_ADDRESS_HPP
+#define INCLUDED_IXION_ADDRESS_HPP
+
+#include "types.hpp"
+
+#include <string>
+#include <vector>
+#include <ostream>
+#include <unordered_set>
+
+namespace ixion {
+
+/**
+ * Row address not specified. This is used to reference an entire column
+ * when a specific column address is given.
+ */
+IXION_DLLPUBLIC_VAR const row_t row_unset;
+
+/**
+ * Highest number that can be used to reference a row address. Numbers
+ * higher than this number are all used as special indices.
+ */
+IXION_DLLPUBLIC_VAR const row_t row_upper_bound;
+
+/**
+ * Column address not specified. This is used to reference an entire row
+ * when a specific row address is given.
+ */
+IXION_DLLPUBLIC_VAR const col_t column_unset;
+
+/**
+ * Highest number that can be used to reference a column address. Numbers
+ * higher than this number are all used as special indices.
+ */
+IXION_DLLPUBLIC_VAR const col_t column_upper_bound;
+
+/**
+ * Stores absolute address, and absolute address only.
+ */
+struct IXION_DLLPUBLIC abs_address_t
+{
+ enum init_invalid { invalid };
+
+ sheet_t sheet;
+ row_t row;
+ col_t column;
+
+ abs_address_t();
+ abs_address_t(init_invalid);
+ abs_address_t(sheet_t _sheet, row_t _row, col_t _column);
+ abs_address_t(const abs_address_t& r);
+
+ bool valid() const;
+ ::std::string get_name() const;
+
+ struct hash
+ {
+ IXION_DLLPUBLIC size_t operator() (const abs_address_t& addr) const;
+ };
+};
+
+IXION_DLLPUBLIC bool operator==(const abs_address_t& left, const abs_address_t& right);
+IXION_DLLPUBLIC bool operator!=(const abs_address_t& left, const abs_address_t& right);
+IXION_DLLPUBLIC bool operator<(const abs_address_t& left, const abs_address_t& right);
+
+/**
+ * Stores either absolute or relative address.
+ */
+struct IXION_DLLPUBLIC address_t
+{
+ sheet_t sheet;
+ row_t row;
+ col_t column;
+ bool abs_sheet:1;
+ bool abs_row:1;
+ bool abs_column:1;
+
+ address_t();
+ address_t(sheet_t _sheet, row_t _row, col_t _column,
+ bool _abs_sheet=true, bool _abs_row=true, bool _abs_column=true);
+ address_t(const address_t& r);
+ address_t(const abs_address_t& r);
+
+ bool valid() const;
+ abs_address_t to_abs(const abs_address_t& origin) const;
+ ::std::string get_name() const;
+
+ void set_absolute(bool abs);
+
+ struct hash
+ {
+ IXION_DLLPUBLIC size_t operator() (const address_t& addr) const;
+ };
+};
+
+IXION_DLLPUBLIC bool operator==(const address_t& left, const address_t& right);
+IXION_DLLPUBLIC bool operator!=(const address_t& left, const address_t& right);
+IXION_DLLPUBLIC bool operator<(const address_t& left, const address_t& right);
+
+struct IXION_DLLPUBLIC abs_rc_address_t
+{
+ enum init_invalid { invalid };
+
+ row_t row;
+ col_t column;
+
+ abs_rc_address_t();
+ abs_rc_address_t(init_invalid);
+ abs_rc_address_t(row_t _row, col_t _column);
+ abs_rc_address_t(const abs_rc_address_t& r);
+ abs_rc_address_t(const abs_address_t& r);
+
+ bool valid() const;
+
+ struct hash
+ {
+ IXION_DLLPUBLIC size_t operator() (const abs_rc_address_t& addr) const;
+ };
+};
+
+IXION_DLLPUBLIC bool operator==(const abs_rc_address_t& left, const abs_rc_address_t& right);
+IXION_DLLPUBLIC bool operator!=(const abs_rc_address_t& left, const abs_rc_address_t& right);
+IXION_DLLPUBLIC bool operator<(const abs_rc_address_t& left, const abs_rc_address_t& right);
+
+/**
+ * Stores either absolute or relative address, but unlike the address_t
+ * counterpart, this struct only stores row and column positions.
+ */
+struct IXION_DLLPUBLIC rc_address_t
+{
+ row_t row;
+ col_t column;
+ bool abs_row:1;
+ bool abs_column:1;
+
+ rc_address_t();
+ rc_address_t(row_t _row, col_t _column, bool _abs_row=true, bool _abs_column=true);
+ rc_address_t(const rc_address_t& r);
+
+ struct hash
+ {
+ IXION_DLLPUBLIC size_t operator() (const rc_address_t& addr) const;
+ };
+};
+
+/**
+ * Stores absolute range address.
+ */
+struct IXION_DLLPUBLIC abs_range_t
+{
+ enum init_invalid { invalid };
+
+ abs_address_t first;
+ abs_address_t last;
+
+ abs_range_t();
+ abs_range_t(init_invalid);
+ abs_range_t(sheet_t _sheet, row_t _row, col_t _col);
+
+ /**
+ * @param _sheet 0-based sheet index.
+ * @param _row 0-based row position of the top-left cell of the range.
+ * @param _col 0-based column position of the top-left cell of the range.
+ * @param _row_span row length of the range. It must be 1 or greater.
+ * @param _col_span column length of the range. It must be 1 or greater.
+ */
+ abs_range_t(sheet_t _sheet, row_t _row, col_t _col, row_t _row_span, col_t _col_span);
+ abs_range_t(const abs_address_t& addr);
+ abs_range_t(const abs_address_t& addr, row_t row_span, col_t col_span);
+
+ struct hash
+ {
+ IXION_DLLPUBLIC size_t operator() (const abs_range_t& range) const;
+ };
+
+ bool valid() const;
+
+ /**
+ * Expand the range horizontally to include all columns. The row range
+ * will remain unchanged.
+ */
+ void set_all_columns();
+
+ /**
+ * Expand the range vertically to include all rows. The column range will
+ * remain unchanged.
+ */
+ void set_all_rows();
+
+ /**
+ * @return true if the range is unspecified in the horizontal direction
+ * i.e. all columns are selected, false otherwise.
+ */
+ bool all_columns() const;
+
+ /**
+ * @return true if the range is unspecified in the vertical direction i.e.
+ * all rows are selected, false otherwise.
+ */
+ bool all_rows() const;
+
+ /**
+ * Check whether or not a given address is contained within this range.
+ */
+ bool contains(const abs_address_t& addr) const;
+
+ /**
+ * Reorder range values as needed to ensure the range is valid.
+ */
+ void reorder();
+};
+
+IXION_DLLPUBLIC bool operator==(const abs_range_t& left, const abs_range_t& right);
+IXION_DLLPUBLIC bool operator!=(const abs_range_t& left, const abs_range_t& right);
+IXION_DLLPUBLIC bool operator<(const abs_range_t& left, const abs_range_t& right);
+
+struct IXION_DLLPUBLIC abs_rc_range_t
+{
+ enum init_invalid { invalid };
+
+ abs_rc_address_t first;
+ abs_rc_address_t last;
+
+ abs_rc_range_t();
+ abs_rc_range_t(init_invalid);
+ abs_rc_range_t(const abs_rc_range_t& other);
+ abs_rc_range_t(const abs_range_t& other);
+
+ struct hash
+ {
+ IXION_DLLPUBLIC size_t operator() (const abs_rc_range_t& range) const;
+ };
+
+ bool valid() const;
+
+ /**
+ * Expand the range horizontally to include all columns. The row range
+ * will remain unchanged.
+ */
+ void set_all_columns();
+
+ /**
+ * Expand the range vertically to include all rows. The column range will
+ * remain unchanged.
+ */
+ void set_all_rows();
+
+ /**
+ * @return true if the range is unspecified in the horizontal direction
+ * i.e. all columns are selected, false otherwise.
+ */
+ bool all_columns() const;
+
+ /**
+ * @return true if the range is unspecified in the vertical direction i.e.
+ * all rows are selected, false otherwise.
+ */
+ bool all_rows() const;
+
+ /**
+ * Check whether or not a given address is contained within this range.
+ */
+ bool contains(const abs_rc_address_t& addr) const;
+};
+
+IXION_DLLPUBLIC bool operator==(const abs_rc_range_t& left, const abs_rc_range_t& right);
+IXION_DLLPUBLIC bool operator!=(const abs_rc_range_t& left, const abs_rc_range_t& right);
+IXION_DLLPUBLIC bool operator<(const abs_rc_range_t& left, const abs_rc_range_t& right);
+
+/**
+ * Stores range whose component may be relative or absolute.
+ */
+struct IXION_DLLPUBLIC range_t
+{
+ address_t first;
+ address_t last;
+
+ range_t();
+ range_t(const address_t& _first, const address_t& _last);
+ range_t(const range_t& r);
+ range_t(const abs_range_t& r);
+
+ bool valid() const;
+
+ /**
+ * Expand the range horizontally to include all columns. The row range
+ * will remain unchanged.
+ */
+ void set_all_columns();
+
+ /**
+ * Expand the range vertically to include all rows. The column range will
+ * remain unchanged.
+ */
+ void set_all_rows();
+
+ /**
+ * @return true if the range is unspecified in the horizontal direction
+ * i.e. all columns are selected, false otherwise.
+ */
+ bool all_columns() const;
+
+ /**
+ * @return true if the range is unspecified in the vertical direction i.e.
+ * all rows are selected, false otherwise.
+ */
+ bool all_rows() const;
+
+ abs_range_t to_abs(const abs_address_t& origin) const;
+
+ void set_absolute(bool abs);
+
+ struct hash
+ {
+ IXION_DLLPUBLIC size_t operator() (const range_t& range) const;
+ };
+};
+
+IXION_DLLPUBLIC bool operator==(const range_t& left, const range_t& right);
+IXION_DLLPUBLIC bool operator!=(const range_t& left, const range_t& right);
+
+IXION_DLLPUBLIC std::ostream& operator<<(std::ostream& os, const abs_address_t& addr);
+IXION_DLLPUBLIC std::ostream& operator<<(std::ostream& os, const abs_rc_address_t& addr);
+IXION_DLLPUBLIC std::ostream& operator<<(std::ostream& os, const address_t& addr);
+IXION_DLLPUBLIC std::ostream& operator<<(std::ostream& os, const abs_range_t& range);
+IXION_DLLPUBLIC std::ostream& operator<<(std::ostream& os, const abs_rc_range_t& range);
+IXION_DLLPUBLIC std::ostream& operator<<(std::ostream& os, const range_t& range);
+
+/**
+ * Type that represents a collection of multiple absolute cell addresses.
+ */
+using abs_address_set_t = std::unordered_set<abs_address_t, abs_address_t::hash>;
+using abs_range_set_t = std::unordered_set<abs_range_t, abs_range_t::hash>;
+using abs_rc_range_set_t = std::unordered_set<abs_rc_range_t, abs_rc_range_t::hash>;
+
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/ixion/address_iterator.hpp b/include/ixion/address_iterator.hpp
new file mode 100644
index 0000000..9250444
--- /dev/null
+++ b/include/ixion/address_iterator.hpp
@@ -0,0 +1,67 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef INCLUDED_IXION_ADDRESS_ITERATOR_HPP
+#define INCLUDED_IXION_ADDRESS_ITERATOR_HPP
+
+#include "types.hpp"
+
+#include <memory>
+
+namespace ixion {
+
+struct abs_range_t;
+struct abs_address_t;
+
+class IXION_DLLPUBLIC abs_address_iterator
+{
+ struct impl;
+ std::unique_ptr<impl> mp_impl;
+
+public:
+ class IXION_DLLPUBLIC const_iterator
+ {
+ friend class abs_address_iterator;
+
+ struct impl_node;
+ std::unique_ptr<impl_node> mp_impl;
+
+ const_iterator(const abs_range_t& range, rc_direction_t dir, bool end);
+ public:
+ using value_type = abs_address_t;
+
+ const_iterator();
+ const_iterator(const const_iterator& r);
+ const_iterator(const_iterator&& r);
+ ~const_iterator();
+
+ const_iterator& operator++();
+ const_iterator operator++(int);
+ const_iterator& operator--();
+ const_iterator operator--(int);
+
+ const value_type& operator*() const;
+ const value_type* operator->() const;
+
+ bool operator== (const const_iterator& r) const;
+ bool operator!= (const const_iterator& r) const;
+ };
+
+ abs_address_iterator(const abs_range_t& range, rc_direction_t dir);
+ ~abs_address_iterator();
+
+ const_iterator begin() const;
+ const_iterator end() const;
+ const_iterator cbegin() const;
+ const_iterator cend() const;
+};
+
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/ixion/cell.hpp b/include/ixion/cell.hpp
new file mode 100644
index 0000000..59f09bb
--- /dev/null
+++ b/include/ixion/cell.hpp
@@ -0,0 +1,132 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef INCLUDED_IXION_CELL_HPP
+#define INCLUDED_IXION_CELL_HPP
+
+#include "types.hpp"
+#include "formula_tokens_fwd.hpp"
+
+#include <memory>
+#include <vector>
+#include <string>
+
+namespace ixion {
+
+class formula_result;
+class formula_cell;
+class model_context;
+struct abs_address_t;
+struct rc_address_t;
+
+// calc_status is internal.
+struct calc_status;
+using calc_status_ptr_t = boost::intrusive_ptr<calc_status>;
+
+class IXION_DLLPUBLIC formula_cell
+{
+ struct impl;
+ std::unique_ptr<impl> mp_impl;
+
+public:
+ formula_cell(const formula_cell&) = delete;
+ formula_cell& operator= (formula_cell) = delete;
+
+ formula_cell();
+ formula_cell(const formula_tokens_store_ptr_t& tokens);
+
+ formula_cell(
+ row_t group_row, col_t group_col,
+ const calc_status_ptr_t& cs,
+ const formula_tokens_store_ptr_t& tokens);
+
+ ~formula_cell();
+
+ const formula_tokens_store_ptr_t& get_tokens() const;
+ void set_tokens(const formula_tokens_store_ptr_t& tokens);
+
+ double get_value(formula_result_wait_policy_t policy) const;
+ std::string_view get_string(formula_result_wait_policy_t policy) const;
+
+ void interpret(model_context& context, const abs_address_t& pos);
+
+ /**
+ * Determine if this cell contains circular reference by walking through
+ * all its reference tokens.
+ */
+ void check_circular(const model_context& cxt, const abs_address_t& pos);
+
+ /**
+ * Reset cell's internal state.
+ */
+ void reset();
+
+ /**
+ * Get a series of all reference tokens included in the formula
+ * expression stored in this cell.
+ *
+ * @param cxt model context instance.
+ * @param pos position of the cell.
+ *
+ * @return an array of reference formula tokens. Each element is a
+ * pointer to the actual token instance stored in the cell object.
+ * Be aware that the pointer is valid only as long as the actual
+ * token instance is alive.
+ */
+ std::vector<const formula_token*> get_ref_tokens(
+ const model_context& cxt, const abs_address_t& pos) const;
+
+ /**
+ * Get the cached result without post-processing in case of a grouped
+ * formula cell.
+ *
+ * @param policy action to take in case the result is not yet available.
+ *
+ * @return formula result.
+ */
+ const formula_result& get_raw_result_cache(formula_result_wait_policy_t policy) const;
+
+ /**
+ * Get the cached result as a single cell. For a non-grouped formula
+ * cell, it should be identical to the value from the get_raw_result_cache()
+ * call. For a grouped formula cell, you'll get a single value assigned to
+ * the position of the cell in case the original result is a matrix value.
+ *
+ * @param policy action to take in case the result is not yet available.
+ *
+ * @return formula result.
+ */
+ formula_result get_result_cache(formula_result_wait_policy_t policy) const;
+
+ /**
+ * Set a cached result to this formula cell instance.
+ *
+ *
+ * @param result cached result.
+ */
+ void set_result_cache(formula_result result);
+
+ formula_group_t get_group_properties() const;
+
+ /**
+ * Get the absolute parent position of a grouped formula cell. If the
+ * cell is not grouped, it simply returns the original position passed to
+ * this method.
+ *
+ * @param pos original position from which to calculate the parent
+ * position.
+ *
+ * @return parent position of the grouped formula cell.
+ */
+ abs_address_t get_parent_position(const abs_address_t& pos) const;
+};
+
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/ixion/cell_access.hpp b/include/ixion/cell_access.hpp
new file mode 100644
index 0000000..63c5323
--- /dev/null
+++ b/include/ixion/cell_access.hpp
@@ -0,0 +1,67 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef INCLUDED_IXION_CELL_ACCESS_HPP
+#define INCLUDED_IXION_CELL_ACCESS_HPP
+
+#include "types.hpp"
+
+#include <memory>
+#include <string>
+
+namespace ixion {
+
+class model_context;
+class formula_cell;
+class formula_result;
+struct abs_address_t;
+
+/**
+ * This class provides a read-only access to a single cell. It's more
+ * efficient to use this class if you need to make multiple successive
+ * queries to the same cell.
+ *
+ * Note that an instance of this class will get invalidated when the content
+ * of ixion::model_context is modified.
+ */
+class IXION_DLLPUBLIC cell_access
+{
+ friend class model_context;
+
+ struct impl;
+ std::unique_ptr<impl> mp_impl;
+
+ cell_access(const model_context& cxt, const abs_address_t& addr);
+public:
+ cell_access(cell_access&& other);
+ cell_access& operator= (cell_access&& other);
+ ~cell_access();
+
+ celltype_t get_type() const;
+
+ cell_value_t get_value_type() const;
+
+ const formula_cell* get_formula_cell() const;
+
+ formula_result get_formula_result() const;
+
+ double get_numeric_value() const;
+
+ bool get_boolean_value() const;
+
+ std::string_view get_string_value() const;
+
+ string_id_t get_string_identifier() const;
+
+ formula_error_t get_error_value() const;
+};
+
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/ixion/compute_engine.hpp b/include/ixion/compute_engine.hpp
new file mode 100644
index 0000000..6e5bbd7
--- /dev/null
+++ b/include/ixion/compute_engine.hpp
@@ -0,0 +1,89 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef INCLUDED_IXION_COMPUTE_ENGINE_HPP
+#define INCLUDED_IXION_COMPUTE_ENGINE_HPP
+
+#include "env.hpp"
+#include "module.hpp"
+
+#include <memory>
+#include <string>
+
+namespace ixion { namespace draft {
+
+enum class array_type { unknown, float32, float64, uint32 };
+
+struct array
+{
+ union
+ {
+ float* float32;
+ double* float64;
+ uint32_t* uint32;
+ void* data;
+ };
+
+ array_type type = array_type::unknown;
+ std::size_t size = 0u;
+};
+
+/**
+ * Default compute engine class that uses CPU for all its computations.
+ *
+ * <p>This class also serves as the fallback for its child classes in case
+ * they don't support the function being requested or the function doesn't
+ * meet the criteria that it requires.</p>
+ *
+ * <p>Each function of this class should not modify the state of the class
+ * instance.</p>
+ */
+class IXION_DLLPUBLIC compute_engine
+{
+ struct impl;
+ std::unique_ptr<impl> mp_impl;
+
+public:
+ /**
+ * Create a compute engine instance.
+ *
+ * @param name name of the compute engine, or an empty name for the default
+ * one.
+ *
+ * @return compute engine instance associted with the specified name. Note
+ * that if no compute engine is registered with the specified
+ * name, the default one is created.
+ */
+ static std::shared_ptr<compute_engine> create(std::string_view name = std::string_view());
+
+ /**
+ * Add a new compute engine class.
+ *
+ * @param hdl handler for the dynamically-loaded module in which the
+ * compute engine being registered resides.
+ * @param name name of the compute engine.
+ * @param func_create function that creates a new instance of this compute
+ * engine class.
+ * @param func_destroy function that destroyes the instance of this
+ * compute engine class.
+ */
+ static void add_class(
+ void* hdl, std::string_view name, create_compute_engine_t func_create, destroy_compute_engine_t func_destroy);
+
+ compute_engine();
+ virtual ~compute_engine();
+
+ virtual std::string_view get_name() const;
+
+ virtual void compute_fibonacci(array& io);
+};
+
+}}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/ixion/config.hpp b/include/ixion/config.hpp
new file mode 100644
index 0000000..9575ac3
--- /dev/null
+++ b/include/ixion/config.hpp
@@ -0,0 +1,50 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef INCLUDED_IXION_CONFIG_HPP
+#define INCLUDED_IXION_CONFIG_HPP
+
+#include "types.hpp"
+
+namespace ixion {
+
+/**
+ * This structure store parameters that influence various aspects of the
+ * ixion formula engine.
+ */
+struct IXION_DLLPUBLIC config
+{
+ /**
+ * Function argument separator. By default it's ','.
+ */
+ char sep_function_arg;
+
+ /**
+ * Matrix column separator.
+ */
+ char sep_matrix_column;
+
+ /**
+ * Matrix row separator.
+ */
+ char sep_matrix_row;
+
+ /**
+ * Precision to use when converting a numeric value to a string
+ * representation. A negative value indicates an unspecified precision.
+ */
+ int8_t output_precision;
+
+ config();
+ config(const config& r);
+};
+
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/ixion/dirty_cell_tracker.hpp b/include/ixion/dirty_cell_tracker.hpp
new file mode 100644
index 0000000..b701044
--- /dev/null
+++ b/include/ixion/dirty_cell_tracker.hpp
@@ -0,0 +1,97 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef INCLUDED_IXION_DIRTY_CELL_TRACKER_HPP
+#define INCLUDED_IXION_DIRTY_CELL_TRACKER_HPP
+
+#include "address.hpp"
+
+#include <memory>
+
+namespace ixion {
+
+/**
+ * This class is designed to track in-direct dependencies of dirty formula
+ * cells. A "dirty" formula cell is a formula cell whose result needs to be
+ * re-calculated because at least one of its references have their values
+ * updated.
+ *
+ * This class also takes volatile functions into account when determining
+ * the status of the formula cel result. A volatile function is a cell
+ * function whose value needs to get re-calculated unconditionally on every
+ * re-calculation. One example of a volatile function is NOW(), which
+ * returns the current time at the time of calculation.
+ */
+class IXION_DLLPUBLIC dirty_cell_tracker
+{
+ struct impl;
+ std::unique_ptr<impl> mp_impl;
+
+public:
+ dirty_cell_tracker(const dirty_cell_tracker&) = delete;
+ dirty_cell_tracker& operator= (const dirty_cell_tracker&) = delete;
+
+ dirty_cell_tracker();
+ ~dirty_cell_tracker();
+
+ /**
+ * Add a tracking relationship from a source cell or cell range to a
+ * destination cell or cell range.
+ *
+ * @param src source cell or cell range that includes reference to
+ * (therefore listens to) the range.
+ * @param dest destination cell or range referenced tracked by the source
+ * cell.
+ */
+ void add(const abs_range_t& src, const abs_range_t& dest);
+
+ /**
+ * Remove an existing tracking relationship from a source cell or cell
+ * range to a destination cell or cell range. If no such relationship
+ * exists, it does nothing.
+ *
+ * @param src cell or cell range that includes reference to the range.
+ * @param dest cell or range referenced by the cell.
+ */
+ void remove(const abs_range_t& src, const abs_range_t& dest);
+
+ /**
+ * Register a formula cell located at the specified position as volatile.
+ * Note that the caller should ensure that the cell at the specified
+ * position is indeed a formula cell.
+ *
+ * @param pos position of the cell to register as a volatile cell.
+ */
+ void add_volatile(const abs_range_t& pos);
+
+ /**
+ * Remove the specified cell position from the internal set of registered
+ * volatile formula cells.
+ *
+ * @param pos position of the cell to unregister as a volatile cell.
+ */
+ void remove_volatile(const abs_range_t& pos);
+
+ abs_range_set_t query_dirty_cells(const abs_range_t& modified_cell) const;
+
+ abs_range_set_t query_dirty_cells(const abs_range_set_t& modified_cells) const;
+
+ std::vector<abs_range_t> query_and_sort_dirty_cells(const abs_range_t& modified_cell) const;
+
+ std::vector<abs_range_t> query_and_sort_dirty_cells(
+ const abs_range_set_t& modified_cells, const abs_range_set_t* dirty_formula_cells = nullptr) const;
+
+ std::string to_string() const;
+
+ bool empty() const;
+};
+
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/ixion/document.hpp b/include/ixion/document.hpp
new file mode 100644
index 0000000..a612898
--- /dev/null
+++ b/include/ixion/document.hpp
@@ -0,0 +1,94 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef INCLUDED_IXION_DOCUMENT_HPP
+#define INCLUDED_IXION_DOCUMENT_HPP
+
+#include "types.hpp"
+#include "address.hpp"
+
+#include <memory>
+#include <string>
+#include <variant>
+
+namespace ixion {
+
+class cell_access;
+
+/**
+ * Higher level document representation designed to handle both cell value
+ * storage as well as formula cell calculations.
+ */
+class IXION_DLLPUBLIC document
+{
+ struct impl;
+ std::unique_ptr<impl> mp_impl;
+public:
+ document();
+
+ /**
+ * Constructor with custom cell address type.
+ *
+ * @param cell_address_type cell address type to use for cell addresses
+ * represented by string values.
+ */
+ document(formula_name_resolver_t cell_address_type);
+ ~document();
+
+ struct IXION_DLLPUBLIC cell_pos
+ {
+ enum class cp_type { string, address };
+ cp_type type;
+
+ std::variant<std::string_view, ixion::abs_address_t> value;
+
+ cell_pos(const char* p);
+ cell_pos(const char* p, size_t n);
+ cell_pos(const std::string& s);
+ cell_pos(const abs_address_t& addr);
+ };
+
+ void append_sheet(std::string name);
+
+ /**
+ * Set a new name to an existing sheet.
+ *
+ * @param sheet 0-based sheet index.
+ * @param name New name of a sheet.
+ */
+ void set_sheet_name(sheet_t sheet, std::string name);
+
+ cell_access get_cell_access(cell_pos pos) const;
+
+ void set_numeric_cell(cell_pos pos, double val);
+
+ void set_string_cell(cell_pos pos, std::string_view s);
+
+ void set_boolean_cell(cell_pos pos, bool val);
+
+ void empty_cell(cell_pos pos);
+
+ double get_numeric_value(cell_pos pos) const;
+
+ std::string_view get_string_value(cell_pos pos) const;
+
+ void set_formula_cell(cell_pos pos, std::string_view formula);
+
+ /**
+ * Calculate all the "dirty" formula cells in the document.
+ *
+ * @param thread_count number of threads to use to perform calculation.
+ * When 0 is specified, it only uses the main thread.
+ */
+ void calculate(size_t thread_count);
+};
+
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/ixion/env.hpp b/include/ixion/env.hpp
new file mode 100644
index 0000000..c164a1d
--- /dev/null
+++ b/include/ixion/env.hpp
@@ -0,0 +1,61 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef INCLUDED_IXION_ENV_HPP
+#define INCLUDED_IXION_ENV_HPP
+
+#if defined _WIN32 || defined __CYGWIN__
+ #if defined __MINGW32__
+ #define IXION_DLLPUBLIC
+ #define IXION_DLLPUBLIC_VAR extern
+ #elif defined IXION_BUILD
+ #ifdef DLL_EXPORT
+ #define IXION_DLLPUBLIC __declspec(dllexport)
+ #define IXION_DLLPUBLIC_VAR extern __declspec(dllexport)
+ #else
+ #define IXION_DLLPUBLIC
+ #define IXION_DLLPUBLIC_VAR extern
+ #endif
+ #else
+ #define IXION_DLLPUBLIC __declspec(dllimport)
+ #define IXION_DLLPUBLIC_VAR extern __declspec(dllimport)
+ #endif
+ #define IXION_DLLLOCAL
+#else
+ #if defined __GNUC__ && __GNUC__ >= 4
+ #define IXION_DLLPUBLIC __attribute__ ((visibility ("default")))
+ #define IXION_DLLLOCAL __attribute__ ((visibility ("hidden")))
+ #else
+ #define IXION_DLLPUBLIC
+ #define IXION_DLLLOCAL
+ #endif
+ #define IXION_DLLPUBLIC_VAR IXION_DLLPUBLIC extern
+#endif
+
+#if _WIN32
+#define IXION_MOD_EXPORT __declspec(dllexport)
+#else
+#define IXION_MOD_EXPORT __attribute__ ((visibility ("default")))
+#endif
+
+#if defined(IXION_TRACE_ON) || defined(IXION_DEBUG_ON)
+#define IXION_LOGGING 1
+#else
+#define IXION_LOGGING 0
+#endif
+
+#ifdef __GNUC__
+ #define IXION_DEPRECATED __attribute__ ((deprecated))
+#elif defined(_MSC_VER)
+ #define IXION_DEPRECATED __declspec(deprecated)
+#else
+ #define IXION_DEPRECATED
+#endif
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/ixion/exceptions.hpp b/include/ixion/exceptions.hpp
new file mode 100644
index 0000000..bccceb1
--- /dev/null
+++ b/include/ixion/exceptions.hpp
@@ -0,0 +1,98 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef INCLUDED_IXION_EXCEPTIONS_HPP
+#define INCLUDED_IXION_EXCEPTIONS_HPP
+
+#include "env.hpp"
+#include "types.hpp"
+
+#include <exception>
+#include <string>
+#include <memory>
+
+namespace ixion {
+
+class IXION_DLLPUBLIC general_error : public std::exception
+{
+public:
+ general_error();
+ explicit general_error(const std::string& msg);
+ virtual ~general_error();
+ virtual const char* what() const noexcept override;
+
+protected:
+ void set_message(const std::string& msg);
+
+private:
+ std::string m_msg;
+};
+
+class IXION_DLLPUBLIC formula_error : public std::exception
+{
+ struct impl;
+ std::unique_ptr<impl> mp_impl;
+public:
+ explicit formula_error(formula_error_t fe);
+ explicit formula_error(formula_error_t fe, std::string msg);
+ formula_error(formula_error&& other);
+
+ virtual ~formula_error();
+ virtual const char* what() const noexcept override;
+
+ formula_error_t get_error() const;
+};
+
+class IXION_DLLPUBLIC file_not_found : public general_error
+{
+public:
+ explicit file_not_found(const std::string& fpath);
+ virtual ~file_not_found() override;
+};
+
+class IXION_DLLPUBLIC formula_registration_error : public general_error
+{
+public:
+ explicit formula_registration_error(const std::string& msg);
+ virtual ~formula_registration_error() override;
+};
+
+/**
+ * This exception is thrown typically from the ixion::model_context class.
+ */
+class IXION_DLLPUBLIC model_context_error: public general_error
+{
+public:
+ enum error_type
+ {
+ circular_dependency,
+ invalid_named_expression,
+ sheet_name_conflict,
+ sheet_size_locked,
+ not_implemented
+ };
+
+ explicit model_context_error(const std::string& msg, error_type type);
+ virtual ~model_context_error() override;
+
+ error_type get_error_type() const;
+
+private:
+ error_type m_type;
+};
+
+class IXION_DLLPUBLIC not_implemented_error : public general_error
+{
+public:
+ explicit not_implemented_error(const std::string& msg);
+ virtual ~not_implemented_error() override;
+};
+
+}
+
+#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/ixion/formula.hpp b/include/ixion/formula.hpp
new file mode 100644
index 0000000..f15c72d
--- /dev/null
+++ b/include/ixion/formula.hpp
@@ -0,0 +1,217 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef INCLUDED_IXION_FORMULA_HPP
+#define INCLUDED_IXION_FORMULA_HPP
+
+#include "formula_tokens.hpp"
+#include "types.hpp"
+#include "env.hpp"
+
+#include <string>
+
+namespace ixion {
+
+class formula_cell;
+class formula_name_resolver;
+class model_context;
+
+/**
+ * Parse a raw formula expression string into formula tokens.
+ *
+ * @param cxt model context.
+ * @param pos address of the cell that has the formula expression.
+ * @param resolver name resolver object used to resolve name tokens.
+ * @param formula raw formula expression string to parse.
+ *
+ * @return formula tokens representing the parsed formula expression.
+ */
+IXION_DLLPUBLIC formula_tokens_t parse_formula_string(
+ model_context& cxt, const abs_address_t& pos,
+ const formula_name_resolver& resolver, std::string_view formula);
+
+/**
+ * Create a set of tokens that represent an invalid formula.
+ *
+ * This can be used for a cell containing an invalid formula expression, and
+ * the error information needs to be preserved.
+ *
+ * @param cxt model context.
+ * @param src_formula original formula string.
+ * @param error error string.
+ *
+ * @return a set of tokens, the first of which is a token of type fop_error,
+ * followed by two string tokens. The second token stores the
+ * original formula string, whereas the third one stores the error
+ * string. The first token stores the number of tokens that follows
+ * as its value of type std::size_t, which is always 2 in the current
+ * implementation.
+ */
+IXION_DLLPUBLIC formula_tokens_t create_formula_error_tokens(
+ model_context& cxt, std::string_view src_formula,
+ std::string_view error);
+
+/**
+ * Convert formula tokens into a human-readable string representation.
+ *
+ * @param cxt model context.
+ * @param pos address of the cell that has the formula tokens.
+ * @param resolver name resolver object used to print name tokens.
+ * @param tokens formula tokens.
+ *
+ * @return string representation of the formula tokens.
+ */
+IXION_DLLPUBLIC std::string print_formula_tokens(
+ const model_context& cxt, const abs_address_t& pos,
+ const formula_name_resolver& resolver, const formula_tokens_t& tokens);
+
+/**
+ * Convert formula tokens into a human-readable string representation.
+ *
+ * @param config Configuration options for printing preferences.
+ * @param cxt Model context.
+ * @param pos Address of the cell that has the formula tokens.
+ * @param resolver Name resolver object used to print name tokens.
+ * @param tokens Formula tokens to print.
+ *
+ * @return string representation of the formula tokens.
+ */
+IXION_DLLPUBLIC std::string print_formula_tokens(
+ const print_config& config, const model_context& cxt, const abs_address_t& pos,
+ const formula_name_resolver& resolver, const formula_tokens_t& tokens);
+
+/**
+ * Convert an individual formula token into a human-readable string
+ * representation.
+ *
+ * @param cxt model context.
+ * @param pos address of the cell that has the formula tokens.
+ * @param resolver name resolver object used to print name tokens.
+ * @param token formula token to convert.
+ *
+ * @return string representation of the formula token.
+ */
+IXION_DLLPUBLIC std::string print_formula_token(
+ const model_context& cxt, const abs_address_t& pos,
+ const formula_name_resolver& resolver, const formula_token& token);
+
+/**
+ * Convert an individual formula token into a human-readable string
+ * representation.
+ *
+ * @param config Configuration options for printing preferences.
+ * @param cxt Model context.
+ * @param pos Address of the cell that has the formula tokens.
+ * @param resolver Name resolver object used to print name tokens.
+ * @param token Formula token to convert.
+ *
+ * @return string representation of the formula token.
+ */
+IXION_DLLPUBLIC std::string print_formula_token(
+ const print_config& config, const model_context& cxt, const abs_address_t& pos,
+ const formula_name_resolver& resolver, const formula_token& token);
+
+/**
+ * Regisiter a formula cell with cell dependency tracker.
+ *
+ * @param cxt model context.
+ * @param pos address of the cell being registered. In case of grouped
+ * cells, the position must be that of teh top-left cell of that
+ * group.
+ * @param cell (optional) pointer to the formula cell object to register.
+ * You can skip this parameter, in which case the formula cell
+ * object will be fetched from the address of the cell. But
+ * passing a pointer will save the overhead of fetching.
+ */
+void IXION_DLLPUBLIC register_formula_cell(
+ model_context& cxt, const abs_address_t& pos, const formula_cell* cell = nullptr);
+
+/**
+ * Unregister a formula cell with cell dependency tracker if a formula cell
+ * exists at specified cell address. If there is no existing cell at the
+ * specified address, or the cell is not a formula cell, this function is a
+ * no-op.
+ *
+ * @param cxt model context.
+ * @param pos address of the cell being unregistered.
+ */
+void IXION_DLLPUBLIC unregister_formula_cell(
+ model_context& cxt, const abs_address_t& pos);
+
+/**
+ * Get the positions of those formula cells that directly or indirectly
+ * depend on the specified source cells.
+ *
+ * @param cxt model context.
+ * @param modified_cells collection of the postiions of cells that have been
+ * modified.
+ *
+ * @return collection of the positions of formula cells that directly or
+ * indirectly depend on at least one of the specified source cells.
+ */
+IXION_DLLPUBLIC abs_address_set_t query_dirty_cells(
+ model_context& cxt, const abs_address_set_t& modified_cells);
+
+/**
+ * Get a sequence of the positions of all formula cells that track at least
+ * one of the specified modified cells either directly or indirectly. Such
+ * formula cells are referred to as "dirty" formula cells. The sequence
+ * returned from this function is already sorted in topological order based
+ * on the dependency relationships between the affected formula cells. Note
+ * that if the model contains volatile formula cells, they will be included
+ * in the returned sequence each and every time.
+ *
+ * Use query_dirty_cells() instead if you don't need the results to be sorted
+ * in order of dependency, to avoid the extra overhead incurred by the
+ * sorting.
+ *
+ * @param cxt model context.
+ * @param modified_cells a collection of non-formula cells whose values have
+ * been updated. You can specify one or more ranges
+ * of cells rather than individual cell positions.
+ * @param dirty_formula_cells (optional) a collection of formula cells that
+ * are already known to be dirty. These formula
+ * cells will be added to the list of the
+ * affected formula cells returned from this
+ * function. Note that even though this
+ * parameter is a set of cell ranges, regular
+ * formula cell positions must be given as single
+ * cell addresses. Only the positions of grouped
+ * formula cells must be given as ranges.
+ *
+ * @return an sequence containing the positions of the formula cells that
+ * track at least one of the modified cells, as well as those
+ * formula cells that are already known to be dirty.
+ */
+IXION_DLLPUBLIC std::vector<abs_range_t> query_and_sort_dirty_cells(
+ model_context& cxt, const abs_range_set_t& modified_cells,
+ const abs_range_set_t* dirty_formula_cells = nullptr);
+
+/**
+ * Calculate all specified formula cells in the order they occur in the
+ * sequence.
+ *
+ * @param cxt model context.
+ * @param formula_cells formula cells to be calculated. The cells will be
+ * calculated in the order they appear in the sequence.
+ * In a typical use case, this will be the returned
+ * value from query_and_sort_dirty_cells.
+ * @param thread_count number of calculation threads to use. Note that
+ * passing 0 will make the process use the main thread
+ * only, while passing any number greater than 0 will
+ * make the process spawn specified number of
+ * calculation threads plus one additional thread to
+ * manage the calculation threads.
+ */
+void IXION_DLLPUBLIC calculate_sorted_cells(
+ model_context& cxt, const std::vector<abs_range_t>& formula_cells, size_t thread_count);
+
+} // namespace ixion
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/ixion/formula_function_opcode.hpp b/include/ixion/formula_function_opcode.hpp
new file mode 100644
index 0000000..ddfabc3
--- /dev/null
+++ b/include/ixion/formula_function_opcode.hpp
@@ -0,0 +1,370 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef INCLUDED_IXION_FORMULA_FUNCTION_OPCODE_HPP
+#define INCLUDED_IXION_FORMULA_FUNCTION_OPCODE_HPP
+
+#include "env.hpp"
+
+#include <cstdint>
+#include <string_view>
+
+namespace ixion {
+
+/**
+ * Enum that represents built-in formula functions.
+ */
+enum class formula_function_t : uint16_t
+{
+ func_unknown = 0,
+ func_abs,
+ func_acos,
+ func_acosh,
+ func_acot,
+ func_acoth,
+ func_address,
+ func_aggregate,
+ func_and,
+ func_arabic,
+ func_areas,
+ func_asc,
+ func_asin,
+ func_asinh,
+ func_atan,
+ func_atan2,
+ func_atanh,
+ func_avedev,
+ func_average,
+ func_averagea,
+ func_averageif,
+ func_averageifs,
+ func_b,
+ func_bahttext,
+ func_base,
+ func_betadist,
+ func_betainv,
+ func_binomdist,
+ func_bitand,
+ func_bitlshift,
+ func_bitor,
+ func_bitrshift,
+ func_bitxor,
+ func_ceiling,
+ func_cell,
+ func_char,
+ func_chidist,
+ func_chiinv,
+ func_chisqdist,
+ func_chisqinv,
+ func_chitest,
+ func_choose,
+ func_clean,
+ func_code,
+ func_color,
+ func_column,
+ func_columns,
+ func_combin,
+ func_combina,
+ func_concat,
+ func_concatenate,
+ func_confidence,
+ func_correl,
+ func_cos,
+ func_cosh,
+ func_cot,
+ func_coth,
+ func_count,
+ func_counta,
+ func_countblank,
+ func_countif,
+ func_countifs,
+ func_covar,
+ func_critbinom,
+ func_csc,
+ func_csch,
+ func_cumipmt,
+ func_cumprinc,
+ func_current,
+ func_date,
+ func_datedif,
+ func_datevalue,
+ func_daverage,
+ func_day,
+ func_days,
+ func_days360,
+ func_db,
+ func_dcount,
+ func_dcounta,
+ func_ddb,
+ func_dde,
+ func_decimal,
+ func_degrees,
+ func_devsq,
+ func_dget,
+ func_dmax,
+ func_dmin,
+ func_dollar,
+ func_dproduct,
+ func_dstdev,
+ func_dstdevp,
+ func_dsum,
+ func_dvar,
+ func_dvarp,
+ func_eastersunday,
+ func_effect,
+ func_encodeurl,
+ func_errortype,
+ func_euroconvert,
+ func_even,
+ func_exact,
+ func_exp,
+ func_expondist,
+ func_fact,
+ func_false,
+ func_fdist,
+ func_filterxml,
+ func_find,
+ func_findb,
+ func_finv,
+ func_fisher,
+ func_fisherinv,
+ func_fixed,
+ func_floor,
+ func_forecast,
+ func_formula,
+ func_fourier,
+ func_frequency,
+ func_ftest,
+ func_fv,
+ func_gamma,
+ func_gammadist,
+ func_gammainv,
+ func_gammaln,
+ func_gauss,
+ func_gcd,
+ func_geomean,
+ func_getpivotdata,
+ func_goalseek,
+ func_growth,
+ func_harmean,
+ func_hlookup,
+ func_hour,
+ func_hyperlink,
+ func_hypgeomdist,
+ func_if,
+ func_iferror,
+ func_ifna,
+ func_ifs,
+ func_index,
+ func_indirect,
+ func_info,
+ func_int,
+ func_intercept,
+ func_ipmt,
+ func_irr,
+ func_isblank,
+ func_iserr,
+ func_iserror,
+ func_iseven,
+ func_isformula,
+ func_islogical,
+ func_isna,
+ func_isnontext,
+ func_isnumber,
+ func_isodd,
+ func_isoweeknum,
+ func_ispmt,
+ func_isref,
+ func_istext,
+ func_jis,
+ func_kurt,
+ func_large,
+ func_lcm,
+ func_left,
+ func_leftb,
+ func_len,
+ func_lenb,
+ func_linest,
+ func_ln,
+ func_log,
+ func_log10,
+ func_logest,
+ func_loginv,
+ func_lognormdist,
+ func_lookup,
+ func_lower,
+ func_match,
+ func_max,
+ func_maxa,
+ func_maxifs,
+ func_mdeterm,
+ func_median,
+ func_mid,
+ func_midb,
+ func_min,
+ func_mina,
+ func_minifs,
+ func_minute,
+ func_minverse,
+ func_mirr,
+ func_mmult,
+ func_mod,
+ func_mode,
+ func_month,
+ func_multirange,
+ func_munit,
+ func_mvalue,
+ func_n,
+ func_na,
+ func_neg,
+ func_negbinomdist,
+ func_networkdays,
+ func_nominal,
+ func_normdist,
+ func_norminv,
+ func_normsdist,
+ func_normsinv,
+ func_not,
+ func_now,
+ func_nper,
+ func_npv,
+ func_numbervalue,
+ func_odd,
+ func_offset,
+ func_or,
+ func_pduration,
+ func_pearson,
+ func_percentile,
+ func_percentrank,
+ func_permut,
+ func_permutationa,
+ func_phi,
+ func_pi,
+ func_pmt,
+ func_poisson,
+ func_power,
+ func_ppmt,
+ func_prob,
+ func_product,
+ func_proper,
+ func_pv,
+ func_quartile,
+ func_radians,
+ func_rand,
+ func_rank,
+ func_rate,
+ func_rawsubtract,
+ func_regex,
+ func_replace,
+ func_replaceb,
+ func_rept,
+ func_right,
+ func_rightb,
+ func_roman,
+ func_round,
+ func_rounddown,
+ func_roundsig,
+ func_roundup,
+ func_row,
+ func_rows,
+ func_rri,
+ func_rsq,
+ func_search,
+ func_searchb,
+ func_sec,
+ func_sech,
+ func_second,
+ func_sheet,
+ func_sheets,
+ func_sign,
+ func_sin,
+ func_sinh,
+ func_skew,
+ func_skewp,
+ func_sln,
+ func_slope,
+ func_small,
+ func_sqrt,
+ func_standardize,
+ func_stdev,
+ func_stdeva,
+ func_stdevp,
+ func_stdevpa,
+ func_steyx,
+ func_style,
+ func_substitute,
+ func_subtotal,
+ func_sum,
+ func_sumif,
+ func_sumifs,
+ func_sumproduct,
+ func_sumsq,
+ func_sumx2my2,
+ func_sumx2py2,
+ func_sumxmy2,
+ func_switch,
+ func_syd,
+ func_t,
+ func_tan,
+ func_tanh,
+ func_tdist,
+ func_text,
+ func_textjoin,
+ func_time,
+ func_timevalue,
+ func_tinv,
+ func_today,
+ func_transpose,
+ func_trend,
+ func_trim,
+ func_trimmean,
+ func_true,
+ func_trunc,
+ func_ttest,
+ func_type,
+ func_unichar,
+ func_unicode,
+ func_upper,
+ func_value,
+ func_var,
+ func_vara,
+ func_varp,
+ func_varpa,
+ func_vdb,
+ func_vlookup,
+ func_wait,
+ func_webservice,
+ func_weekday,
+ func_weeknum,
+ func_weibull,
+ func_xor,
+ func_year,
+ func_ztest,
+};
+
+/**
+ * Get a string representation of a formula function opcode.
+ *
+ * @param func formula function opcode.
+ *
+ * @return string representation of the opcode.
+ */
+IXION_DLLPUBLIC std::string_view get_formula_function_name(formula_function_t func);
+
+/**
+ * Get a formula function opcode from a formula function name.
+ *
+ * @param s formula function name.
+ *
+ * @return formula function opcode representing the specified name.
+ */
+IXION_DLLPUBLIC formula_function_t get_formula_function_opcode(std::string_view s);
+
+}
+
+#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/ixion/formula_name_resolver.hpp b/include/ixion/formula_name_resolver.hpp
new file mode 100644
index 0000000..eb2a8a9
--- /dev/null
+++ b/include/ixion/formula_name_resolver.hpp
@@ -0,0 +1,129 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef INCLUDED_IXION_FORMULA_NAME_RESOLVER_HPP
+#define INCLUDED_IXION_FORMULA_NAME_RESOLVER_HPP
+
+#include "address.hpp"
+#include "formula_function_opcode.hpp"
+
+#include <string>
+#include <memory>
+#include <variant>
+
+namespace ixion {
+
+class model_context;
+struct table_t;
+
+/**
+ * Structure that represents the type of a 'name' in a formula expression.
+ *
+ * A name can be either one of:
+ * <ul>
+ * <li>cell reference</li>
+ * <li>range reference</li>
+ * <li>table reference</li>
+ * <li>named expression</li>
+ * <li>function</li>
+ * </ul>
+ */
+struct IXION_DLLPUBLIC formula_name_t
+{
+ enum name_type
+ {
+ invalid = 0,
+ cell_reference,
+ range_reference,
+ table_reference,
+ named_expression,
+ function
+ };
+
+ /**
+ * Table information for a table reference name. Unlike the ixion::table_t
+ * counterpart, we store strings as string views as the resolver doesn't
+ * have access to the string pool.
+ */
+ struct table_type
+ {
+ std::string_view name;
+ std::string_view column_first;
+ std::string_view column_last;
+ table_areas_t areas;
+ };
+
+ using value_type = std::variant<address_t, range_t, table_type, formula_function_t>;
+
+ name_type type;
+ value_type value;
+
+ formula_name_t();
+
+ /**
+ * Return a string that represents the data stored internally. Useful for
+ * debugging.
+ */
+ std::string to_string() const;
+};
+
+/**
+ * Formula name resolvers resolves a name in a formula expression to a more
+ * concrete name type.
+ */
+class formula_name_resolver
+{
+public:
+ formula_name_resolver();
+ virtual ~formula_name_resolver() = 0;
+
+ /**
+ * Parse and resolve a reference string.
+ *
+ * @param s reference string to be parsed.
+ * @param pos base cell position, which influences the resolved reference
+ * position(s) containing relative address(es). When the
+ * reference string does not contain an explicit sheet name,
+ * the sheet address of the base cell position is used.
+ *
+ * @return result of the resovled reference.
+ */
+ virtual formula_name_t resolve(std::string_view s, const abs_address_t& pos) const = 0;
+ virtual std::string get_name(const address_t& addr, const abs_address_t& pos, bool sheet_name) const = 0;
+ virtual std::string get_name(const range_t& range, const abs_address_t& pos, bool sheet_name) const = 0;
+ virtual std::string get_name(const table_t& table) const = 0;
+
+ /**
+ * Given a numerical representation of column position, return its
+ * textural representation.
+ *
+ * @param col numerical column position.
+ *
+ * @return textural representation of column position.
+ */
+ virtual std::string get_column_name(col_t col) const = 0;
+
+ /**
+ * Create a formula name resolver instance according to the requested
+ * type.
+ *
+ * @param type type formula name resolver being requested.
+ * @param cxt document model context for resolving sheet names, or nullptr
+ * in case names being resolved don't contain sheet names.
+ *
+ * @return formula name resolver instance created on the heap. The caller
+ * is responsible for managing its life cycle.
+ */
+ IXION_DLLPUBLIC static std::unique_ptr<formula_name_resolver>
+ get(formula_name_resolver_t type, const model_context* cxt);
+};
+
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/ixion/formula_opcode.hpp b/include/ixion/formula_opcode.hpp
new file mode 100644
index 0000000..1f3d71b
--- /dev/null
+++ b/include/ixion/formula_opcode.hpp
@@ -0,0 +1,61 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef INCLUDED_IXION_FORMULA_OPCODE_HPP
+#define INCLUDED_IXION_FORMULA_OPCODE_HPP
+
+namespace ixion {
+
+/** formula opcode type */
+enum fopcode_t
+{
+ fop_unknown = 0,
+
+ // data types
+ fop_single_ref,
+ fop_range_ref,
+ fop_table_ref,
+ fop_named_expression,
+ fop_string,
+ fop_value,
+ fop_function,
+
+ // arithmetic operators
+ fop_plus,
+ fop_minus,
+ fop_divide,
+ fop_multiply,
+ fop_exponent,
+
+ // string operators
+ fop_concat,
+
+ // relational operators
+ fop_equal,
+ fop_not_equal,
+ fop_less,
+ fop_greater,
+ fop_less_equal,
+ fop_greater_equal,
+
+ // parentheses, separators
+ fop_open,
+ fop_close,
+ fop_sep,
+ fop_array_row_sep,
+ fop_array_open,
+ fop_array_close,
+
+ // special conditions
+ fop_error, //< used to signify a special set of tokens representing formula cell with error.
+};
+
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/ixion/formula_result.hpp b/include/ixion/formula_result.hpp
new file mode 100644
index 0000000..551af18
--- /dev/null
+++ b/include/ixion/formula_result.hpp
@@ -0,0 +1,136 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef INCLUDED_IXION_FORMULA_RESULT_HPP
+#define INCLUDED_IXION_FORMULA_RESULT_HPP
+
+#include "global.hpp"
+
+#include <string>
+#include <memory>
+#include <iosfwd>
+
+namespace ixion {
+
+class matrix;
+class model_context;
+
+/**
+ * Store formula result which may be either numeric, textural, or error. In
+ * case the result is textural, it owns the instance of the string.
+ */
+class IXION_DLLPUBLIC formula_result
+{
+ struct impl;
+ std::unique_ptr<impl> mp_impl;
+
+public:
+ enum class result_type { boolean, value, string, error, matrix };
+
+ formula_result();
+ formula_result(const formula_result& r);
+ formula_result(formula_result&& r);
+ formula_result(bool b);
+ formula_result(double v);
+ formula_result(std::string str);
+ formula_result(formula_error_t e);
+ formula_result(matrix mtx);
+ ~formula_result();
+
+ void reset();
+ void set_boolean(bool b);
+ void set_value(double v);
+ void set_string_value(std::string str);
+ void set_error(formula_error_t e);
+ void set_matrix(matrix mtx);
+
+ /**
+ * Get a boolean result value. The caller must make sure the result is of
+ * boolean type, else the behavior is undefined.
+ *
+ * @return boolean result value.
+ */
+ bool get_boolean() const;
+
+ /**
+ * Get a numeric result value. The caller must make sure the result is of
+ * numeric type, else the behavior is undefined.
+ *
+ * @return numeric result value.
+ */
+ double get_value() const;
+
+ /**
+ * Get a string value for textural result. The caller must make
+ * sure the result is of textural type, else the behavior is undefined.
+ *
+ * @return string value.
+ */
+ const std::string& get_string() const;
+
+ /**
+ * Get an error value of the result. The caller must make sure that the
+ * result is of error type, else the behavior is undefined.
+ *
+ * @return enum value representing the error.
+ * @see ixion::get_formula_error_name
+ */
+ formula_error_t get_error() const;
+
+ /**
+ * Get a matrix value of the result. The caller must make sure that the
+ * result is of matrix type, else the behavior is undefined.
+ *
+ * @return matrix result value.
+ */
+ const matrix& get_matrix() const;
+
+ /**
+ * Get a matrix value of the result. The caller must make sure that the
+ * result is of matrix type, else the behavior is undefined.
+ *
+ * @return matrix result value.
+ */
+ matrix& get_matrix();
+
+ /**
+ * Get the type of result.
+ *
+ * @return enum value representing the result type.
+ */
+ result_type get_type() const;
+
+ /**
+ * Get a string representation of the result value no matter what the
+ * result type is.
+ *
+ * @param cxt model context object.
+ *
+ * @return string representation of the result value.
+ */
+ std::string str(const model_context& cxt) const;
+
+ /**
+ * Parse a textural representation of a formula result, and set result
+ * value of appropriate type.
+ *
+ * @param s formula result as a string.
+ */
+ void parse(std::string_view s);
+
+ formula_result& operator= (formula_result r);
+ bool operator== (const formula_result& r) const;
+ bool operator!= (const formula_result& r) const;
+};
+
+IXION_DLLPUBLIC std::ostream& operator<< (std::ostream& os, formula_result::result_type v);
+
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/ixion/formula_tokens.hpp b/include/ixion/formula_tokens.hpp
new file mode 100644
index 0000000..d843dbd
--- /dev/null
+++ b/include/ixion/formula_tokens.hpp
@@ -0,0 +1,215 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef INCLUDED_FORMULA_TOKENS_HPP
+#define INCLUDED_FORMULA_TOKENS_HPP
+
+#include "address.hpp"
+#include "table.hpp"
+#include "formula_opcode.hpp"
+#include "formula_function_opcode.hpp"
+#include "formula_tokens_fwd.hpp"
+
+#include <string>
+#include <variant>
+
+namespace ixion {
+
+/**
+ * Get a printable name for a formula opcode. The printable name is to be
+ * used only for informational purposes.
+ *
+ * @param oc formula opcode
+ *
+ * @return printable name for a formula opcode.
+ */
+IXION_DLLPUBLIC std::string_view get_opcode_name(fopcode_t oc);
+
+/**
+ * Get the string representation of a simple formula opcode. This function
+ * will return a non-empty string only for operator opcodes.
+ *
+ * @param oc formula opcode
+ *
+ * @return string representation of a formula opcode.
+ */
+IXION_DLLPUBLIC std::string_view get_formula_opcode_string(fopcode_t oc);
+
+/**
+ * Represents a single formula token.
+ */
+struct IXION_DLLPUBLIC formula_token final
+{
+ using value_type = std::variant<
+ address_t, range_t, table_t, formula_function_t,
+ double, string_id_t, std::string>;
+
+ /**
+ * Opcode that specifies the type of token. The value of this data member
+ * should <i>not</i> be modified after construction.
+ */
+ const fopcode_t opcode;
+
+ /**
+ * Value stored in the token. The type of this value varies depending on the
+ * token opcode value.
+ */
+ value_type value;
+
+ formula_token() = delete;
+
+ /**
+ * Constructor for opcode-only token.
+ *
+ * @param op formula opcode.
+ */
+ formula_token(fopcode_t op);
+
+ /**
+ * Constructor for a single-cell reference token. The opcode will be
+ * implicitly set to fop_single_ref.
+ *
+ * @param addr single-cell reference.
+ */
+ formula_token(const address_t& addr);
+
+ /**
+ * Constructor for a range reference token. The opcode will be
+ * implicitly set to fop_range_ref.
+ *
+ * @param range range reference.
+ */
+ formula_token(const range_t& range);
+
+ /**
+ * Constructor for a table reference token. The opcode will be implicitly
+ * set to fop_table_ref.
+ *
+ * @param table table reference.
+ */
+ formula_token(const table_t& table);
+
+ /**
+ * Constructor for a formula function token. The opcode will be implicitly
+ * set to fop_function.
+ *
+ * @param func function name enum value.
+ */
+ formula_token(formula_function_t func);
+
+ /**
+ * Constructor for a numeric value token. The opcode will be implicitly set
+ * to fop_value.
+ *
+ * @param v numeric value to be stored in the token.
+ */
+ formula_token(double v);
+
+ /**
+ * Constructor for a string value token. The opcode will be implicitly
+ * set to fop_string.
+ *
+ * @param sid string ID to be stored in the token.
+ */
+ formula_token(string_id_t sid);
+
+ /**
+ * Constructor for a named-expression token. The opcode will be implicitly
+ * set to fop_named_expression.
+ *
+ * @param name named expression to be stored in the token.
+ */
+ formula_token(std::string name);
+
+ /**
+ * Copy constructor.
+ */
+ formula_token(const formula_token& r);
+
+ /**
+ * Move constructor.
+ *
+ * @note This will be the same as the copy constructor if the stored value
+ * is not movable.
+ */
+ formula_token(formula_token&& r);
+
+ ~formula_token();
+
+ bool operator== (const formula_token& r) const;
+ bool operator!= (const formula_token& r) const;
+};
+
+/**
+ * Storage for a series of formula tokens.
+ */
+class IXION_DLLPUBLIC formula_tokens_store
+{
+ friend void intrusive_ptr_add_ref(formula_tokens_store*);
+ friend void intrusive_ptr_release(formula_tokens_store*);
+
+ struct impl;
+ std::unique_ptr<impl> mp_impl;
+
+ void add_ref();
+ void release_ref();
+
+ formula_tokens_store();
+
+public:
+
+ static formula_tokens_store_ptr_t create();
+
+ ~formula_tokens_store();
+
+ formula_tokens_store(const formula_tokens_store&) = delete;
+ formula_tokens_store& operator= (const formula_tokens_store&) = delete;
+
+ size_t get_reference_count() const;
+
+ formula_tokens_t& get();
+ const formula_tokens_t& get() const;
+};
+
+inline void intrusive_ptr_add_ref(formula_tokens_store* p)
+{
+ p->add_ref();
+}
+
+inline void intrusive_ptr_release(formula_tokens_store* p)
+{
+ p->release_ref();
+}
+
+/**
+ * Represents a named expression which stores a series of formula tokens.
+ */
+struct IXION_DLLPUBLIC named_expression_t
+{
+ /**
+ * Origin cell position which affects any relative references stored in
+ * the named expression.
+ */
+ abs_address_t origin;
+
+ /** Formula tokens. */
+ formula_tokens_t tokens;
+
+ named_expression_t();
+ named_expression_t(const abs_address_t& _origin, formula_tokens_t _tokens);
+ named_expression_t(const named_expression_t&) = delete;
+ named_expression_t(named_expression_t&& other);
+ ~named_expression_t();
+};
+
+IXION_DLLPUBLIC std::ostream& operator<< (std::ostream& os, const formula_token& ft);
+
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/ixion/formula_tokens_fwd.hpp b/include/ixion/formula_tokens_fwd.hpp
new file mode 100644
index 0000000..4e8dd50
--- /dev/null
+++ b/include/ixion/formula_tokens_fwd.hpp
@@ -0,0 +1,27 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef INCLUDED_IXION_FORMULA_TOKENS_FWD_HPP
+#define INCLUDED_IXION_FORMULA_TOKENS_FWD_HPP
+
+#include <boost/intrusive_ptr.hpp>
+#include <vector>
+#include <memory>
+
+namespace ixion {
+
+struct formula_token;
+class formula_tokens_store;
+using formula_tokens_store_ptr_t = boost::intrusive_ptr<formula_tokens_store>;
+using formula_tokens_t = std::vector<formula_token>;
+struct named_expression_t;
+
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/ixion/global.hpp b/include/ixion/global.hpp
new file mode 100644
index 0000000..4f8aa46
--- /dev/null
+++ b/include/ixion/global.hpp
@@ -0,0 +1,35 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef INCLUDED_IXION_GLOBAL_HPP
+#define INCLUDED_IXION_GLOBAL_HPP
+
+#include "types.hpp"
+#include "env.hpp"
+
+#include <memory>
+#include <string>
+
+namespace ixion {
+
+/**
+ * Get current time in seconds since epoch. Note that the value
+ * representing a time may differ from platform to platform. Use this
+ * value only to measure relative time.
+ *
+ * @return current time in seconds since epoch.
+ */
+IXION_DLLPUBLIC double get_current_time();
+
+IXION_DLLPUBLIC double to_double(std::string_view s);
+
+IXION_DLLPUBLIC bool to_bool(std::string_view s);
+
+}
+
+#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/ixion/info.hpp b/include/ixion/info.hpp
new file mode 100644
index 0000000..1d7a41f
--- /dev/null
+++ b/include/ixion/info.hpp
@@ -0,0 +1,26 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef INCLUDED_IXION_INFO_HPP
+#define INCLUDED_IXION_INFO_HPP
+
+#include "env.hpp"
+
+namespace ixion {
+
+IXION_DLLPUBLIC int get_version_major();
+IXION_DLLPUBLIC int get_version_minor();
+IXION_DLLPUBLIC int get_version_micro();
+
+IXION_DLLPUBLIC int get_api_version_major();
+IXION_DLLPUBLIC int get_api_version_minor();
+
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/ixion/interface/Makefile.am b/include/ixion/interface/Makefile.am
new file mode 100644
index 0000000..8b3fdc3
--- /dev/null
+++ b/include/ixion/interface/Makefile.am
@@ -0,0 +1,6 @@
+
+libixiondir = $(includedir)/libixion-@IXION_API_VERSION@/ixion/interface
+
+libixion_HEADERS = \
+ session_handler.hpp \
+ table_handler.hpp
diff --git a/include/ixion/interface/Makefile.in b/include/ixion/interface/Makefile.in
new file mode 100644
index 0000000..f17c341
--- /dev/null
+++ b/include/ixion/interface/Makefile.in
@@ -0,0 +1,611 @@
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
+
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+VPATH = @srcdir@
+am__is_gnu_make = { \
+ if test -z '$(MAKELEVEL)'; then \
+ false; \
+ elif test -n '$(MAKE_HOST)'; then \
+ true; \
+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+ true; \
+ else \
+ false; \
+ fi; \
+}
+am__make_running_with_option = \
+ case $${target_option-} in \
+ ?) ;; \
+ *) echo "am__make_running_with_option: internal error: invalid" \
+ "target option '$${target_option-}' specified" >&2; \
+ exit 1;; \
+ esac; \
+ has_opt=no; \
+ sane_makeflags=$$MAKEFLAGS; \
+ if $(am__is_gnu_make); then \
+ sane_makeflags=$$MFLAGS; \
+ else \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ bs=\\; \
+ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
+ esac; \
+ fi; \
+ skip_next=no; \
+ strip_trailopt () \
+ { \
+ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+ }; \
+ for flg in $$sane_makeflags; do \
+ test $$skip_next = yes && { skip_next=no; continue; }; \
+ case $$flg in \
+ *=*|--*) continue;; \
+ -*I) strip_trailopt 'I'; skip_next=yes;; \
+ -*I?*) strip_trailopt 'I';; \
+ -*O) strip_trailopt 'O'; skip_next=yes;; \
+ -*O?*) strip_trailopt 'O';; \
+ -*l) strip_trailopt 'l'; skip_next=yes;; \
+ -*l?*) strip_trailopt 'l';; \
+ -[dEDm]) skip_next=yes;; \
+ -[JT]) skip_next=yes;; \
+ esac; \
+ case $$flg in \
+ *$$target_option*) has_opt=yes; break;; \
+ esac; \
+ done; \
+ test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = include/ixion/interface
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/ax_cxx_compile_stdcxx.m4 \
+ $(top_srcdir)/m4/ax_cxx_compile_stdcxx_17.m4 \
+ $(top_srcdir)/m4/boost.m4 $(top_srcdir)/m4/libtool.m4 \
+ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
+ $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(libixion_HEADERS) \
+ $(am__DIST_COMMON)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo " GEN " $@;
+am__v_GEN_1 =
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 =
+SOURCES =
+DIST_SOURCES =
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+ if (++n[$$2] == $(am__install_max)) \
+ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+ END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+ test -z "$$files" \
+ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+ $(am__cd) "$$dir" && rm -f $$files; }; \
+ }
+am__installdirs = "$(DESTDIR)$(libixiondir)"
+HEADERS = $(libixion_HEADERS)
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+# Read a list of newline-separated strings from the standard input,
+# and print each of them once, without duplicates. Input order is
+# *not* preserved.
+am__uniquify_input = $(AWK) '\
+ BEGIN { nonempty = 0; } \
+ { items[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in items) print i; }; } \
+'
+# Make sure the list of sources is unique. This is necessary because,
+# e.g., the same source file might be shared among _SOURCES variables
+# for different programs/libraries.
+am__define_uniq_tagged_files = \
+ list='$(am__tagged_files)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | $(am__uniquify_input)`
+am__DIST_COMMON = $(srcdir)/Makefile.in
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AS = @AS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+BOOST_CPPFLAGS = @BOOST_CPPFLAGS@
+BOOST_FILESYSTEM_LDFLAGS = @BOOST_FILESYSTEM_LDFLAGS@
+BOOST_FILESYSTEM_LDPATH = @BOOST_FILESYSTEM_LDPATH@
+BOOST_FILESYSTEM_LIBS = @BOOST_FILESYSTEM_LIBS@
+BOOST_LDPATH = @BOOST_LDPATH@
+BOOST_PROGRAM_OPTIONS_LDFLAGS = @BOOST_PROGRAM_OPTIONS_LDFLAGS@
+BOOST_PROGRAM_OPTIONS_LDPATH = @BOOST_PROGRAM_OPTIONS_LDPATH@
+BOOST_PROGRAM_OPTIONS_LIBS = @BOOST_PROGRAM_OPTIONS_LIBS@
+BOOST_ROOT = @BOOST_ROOT@
+BOOST_SYSTEM_LDFLAGS = @BOOST_SYSTEM_LDFLAGS@
+BOOST_SYSTEM_LDPATH = @BOOST_SYSTEM_LDPATH@
+BOOST_SYSTEM_LIBS = @BOOST_SYSTEM_LIBS@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPPFLAGS = @CPPFLAGS@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DISTCHECK_CONFIGURE_FLAGS = @DISTCHECK_CONFIGURE_FLAGS@
+DLLTOOL = @DLLTOOL@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+ETAGS = @ETAGS@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+GREP = @GREP@
+HAVE_CXX17 = @HAVE_CXX17@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+IXION_API_VERSION = @IXION_API_VERSION@
+IXION_MAJOR_API_VERSION = @IXION_MAJOR_API_VERSION@
+IXION_MAJOR_VERSION = @IXION_MAJOR_VERSION@
+IXION_MICRO_VERSION = @IXION_MICRO_VERSION@
+IXION_MINOR_API_VERSION = @IXION_MINOR_API_VERSION@
+IXION_MINOR_VERSION = @IXION_MINOR_VERSION@
+IXION_VERSION = @IXION_VERSION@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
+MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MDDS_CFLAGS = @MDDS_CFLAGS@
+MDDS_LIBS = @MDDS_LIBS@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
+POW_LIB = @POW_LIB@
+PYTHON = @PYTHON@
+PYTHON_CFLAGS = @PYTHON_CFLAGS@
+PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
+PYTHON_LIBS = @PYTHON_LIBS@
+PYTHON_PLATFORM = @PYTHON_PLATFORM@
+PYTHON_PREFIX = @PYTHON_PREFIX@
+PYTHON_VERSION = @PYTHON_VERSION@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+VULKAN_CFLAGS = @VULKAN_CFLAGS@
+VULKAN_LIBS = @VULKAN_LIBS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+pkgpyexecdir = @pkgpyexecdir@
+pkgpythondir = @pkgpythondir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+pyexecdir = @pyexecdir@
+pythondir = @pythondir@
+runstatedir = @runstatedir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+libixiondir = $(includedir)/libixion-@IXION_API_VERSION@/ixion/interface
+libixion_HEADERS = \
+ session_handler.hpp \
+ table_handler.hpp
+
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign include/ixion/interface/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --foreign include/ixion/interface/Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+install-libixionHEADERS: $(libixion_HEADERS)
+ @$(NORMAL_INSTALL)
+ @list='$(libixion_HEADERS)'; test -n "$(libixiondir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(libixiondir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(libixiondir)" || exit 1; \
+ fi; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; \
+ done | $(am__base_list) | \
+ while read files; do \
+ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(libixiondir)'"; \
+ $(INSTALL_HEADER) $$files "$(DESTDIR)$(libixiondir)" || exit $$?; \
+ done
+
+uninstall-libixionHEADERS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(libixion_HEADERS)'; test -n "$(libixiondir)" || list=; \
+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+ dir='$(DESTDIR)$(libixiondir)'; $(am__uninstall_files_from_dir)
+
+ID: $(am__tagged_files)
+ $(am__define_uniq_tagged_files); mkid -fID $$unique
+tags: tags-am
+TAGS: tags
+
+tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ set x; \
+ here=`pwd`; \
+ $(am__define_uniq_tagged_files); \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: ctags-am
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ $(am__define_uniq_tagged_files); \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+cscopelist: cscopelist-am
+
+cscopelist-am: $(am__tagged_files)
+ list='$(am__tagged_files)'; \
+ case "$(srcdir)" in \
+ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+ *) sdir=$(subdir)/$(srcdir) ;; \
+ esac; \
+ for i in $$list; do \
+ if test -f "$$i"; then \
+ echo "$(subdir)/$$i"; \
+ else \
+ echo "$$sdir/$$i"; \
+ fi; \
+ done >> $(top_builddir)/cscope.files
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+distdir: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) distdir-am
+
+distdir-am: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile $(HEADERS)
+installdirs:
+ for dir in "$(DESTDIR)$(libixiondir)"; do \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+ done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-libixionHEADERS
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-libixionHEADERS
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \
+ clean-libtool cscopelist-am ctags ctags-am distclean \
+ distclean-generic distclean-libtool distclean-tags distdir dvi \
+ dvi-am html html-am info info-am install install-am \
+ install-data install-data-am install-dvi install-dvi-am \
+ install-exec install-exec-am install-html install-html-am \
+ install-info install-info-am install-libixionHEADERS \
+ install-man install-pdf install-pdf-am install-ps \
+ install-ps-am install-strip installcheck installcheck-am \
+ installdirs maintainer-clean maintainer-clean-generic \
+ mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
+ ps ps-am tags tags-am uninstall uninstall-am \
+ uninstall-libixionHEADERS
+
+.PRECIOUS: Makefile
+
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/include/ixion/interface/session_handler.hpp b/include/ixion/interface/session_handler.hpp
new file mode 100644
index 0000000..7ed2a8e
--- /dev/null
+++ b/include/ixion/interface/session_handler.hpp
@@ -0,0 +1,50 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef __IXION_INTERFACE_SESSION_HANDLER_HPP__
+#define __IXION_INTERFACE_SESSION_HANDLER_HPP__
+
+#include "../formula_opcode.hpp"
+#include "../formula_function_opcode.hpp"
+#include "../env.hpp"
+
+#include <cstdlib>
+
+namespace ixion {
+
+class formula_cell;
+class formula_result;
+struct address_t;
+struct range_t;
+struct abs_address_t;
+struct table_t;
+
+namespace iface {
+
+class IXION_DLLPUBLIC session_handler
+{
+public:
+ virtual ~session_handler();
+
+ virtual void begin_cell_interpret(const abs_address_t& pos) = 0;
+ virtual void end_cell_interpret() = 0;
+ virtual void set_result(const formula_result& result) = 0;
+ virtual void set_invalid_expression(std::string_view msg) = 0;
+ virtual void set_formula_error(std::string_view msg) = 0;
+ virtual void push_token(fopcode_t fop) = 0;
+ virtual void push_value(double val) = 0;
+ virtual void push_string(size_t sid) = 0;
+ virtual void push_single_ref(const address_t& addr, const abs_address_t& pos) = 0;
+ virtual void push_range_ref(const range_t& range, const abs_address_t& pos) = 0;
+ virtual void push_table_ref(const table_t& table) = 0;
+ virtual void push_function(formula_function_t foc) = 0;
+};
+
+}}
+
+#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/ixion/interface/table_handler.hpp b/include/ixion/interface/table_handler.hpp
new file mode 100644
index 0000000..0971d2e
--- /dev/null
+++ b/include/ixion/interface/table_handler.hpp
@@ -0,0 +1,63 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef IXION_INTERFACE_TABLE_HANDLER_HPP
+#define IXION_INTERFACE_TABLE_HANDLER_HPP
+
+#include "../types.hpp"
+
+namespace ixion {
+
+struct abs_address_t;
+struct abs_range_t;
+
+namespace iface {
+
+class IXION_DLLPUBLIC table_handler
+{
+public:
+ virtual ~table_handler();
+
+ /**
+ * Get the data range associated with a given column name. The current
+ * position is used to infer which table to use.
+ *
+ * @param pos current cell position.
+ * @param column_first name of the starting column within the table.
+ * @param column_last name of the ending column within the table, or
+ * empty_string_id if it's a single column.
+ * @param areas area specifiter value, which may consist of one or more
+ * values of table_area_t.
+ *
+ * @return referenced data range.
+ */
+ virtual abs_range_t get_range(
+ const abs_address_t& pos, string_id_t column_first, string_id_t column_last,
+ table_areas_t areas) const = 0;
+
+ /**
+ * Get the data range associated with given table and column names.
+ *
+ * @param table string identifier representing the table name.
+ * @param column_first name of the starting column within the table.
+ * @param column_last name of the ending column within the table, or
+ * empty_string_id if it's a single column.
+ * @param areas area specifiter value, which may consist of one or more
+ * values of table_area_t.
+ *
+ * @return referenced data range.
+ */
+ virtual abs_range_t get_range(
+ string_id_t table, string_id_t column_first, string_id_t column_last,
+ table_areas_t areas) const = 0;
+};
+
+}}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/ixion/macros.hpp b/include/ixion/macros.hpp
new file mode 100644
index 0000000..1ac84c1
--- /dev/null
+++ b/include/ixion/macros.hpp
@@ -0,0 +1,18 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef __IXION_MACROS_HPP__
+#define __IXION_MACROS_HPP__
+
+/**
+ * Use this macro with a literal string and it returns the literal string
+ * followed by its length.
+ */
+#define IXION_ASCII(literal) literal, sizeof(literal)-1
+
+#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/ixion/matrix.hpp b/include/ixion/matrix.hpp
new file mode 100644
index 0000000..d001f92
--- /dev/null
+++ b/include/ixion/matrix.hpp
@@ -0,0 +1,122 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef INCLUDED_IXION_MATRIX_HPP
+#define INCLUDED_IXION_MATRIX_HPP
+
+#include "types.hpp"
+
+#include <memory>
+#include <vector>
+#include <string>
+#include <variant>
+
+namespace ixion {
+
+class numeric_matrix;
+
+/**
+ * 2-dimensional matrix consisting of elements of variable types. Each
+ * element can be numeric, string, or empty. This class is used to
+ * represent range values or in-line matrices.
+ */
+class IXION_DLLPUBLIC matrix
+{
+ struct impl;
+ std::unique_ptr<impl> mp_impl;
+
+public:
+
+ enum class element_type { numeric, string, boolean, error, empty };
+
+ struct element
+ {
+ using value_type = std::variant<double, bool, std::string_view, formula_error_t>;
+
+ element_type type;
+ value_type value;
+ };
+
+ matrix();
+ matrix(size_t rows, size_t cols);
+ matrix(size_t rows, size_t cols, double numeric);
+ matrix(size_t rows, size_t cols, bool boolean);
+ matrix(size_t rows, size_t cols, const std::string& str);
+ matrix(size_t rows, size_t cols, formula_error_t error);
+ matrix(const matrix& other);
+ matrix(matrix&& other);
+ matrix(const numeric_matrix& other);
+ ~matrix();
+
+ matrix& operator= (matrix other);
+
+ /**
+ * Determine if the entire matrix consists only of numeric value elements.
+ *
+ * @return true if the entire matrix consits only of numeric value
+ * elements, false otherwise.
+ */
+ bool is_numeric() const;
+
+ bool get_boolean(size_t row, size_t col) const;
+ bool is_numeric(size_t row, size_t col) const;
+ double get_numeric(size_t row, size_t col) const;
+ void set(size_t row, size_t col, double val);
+ void set(size_t row, size_t col, bool val);
+ void set(size_t row, size_t col, const std::string& str);
+ void set(size_t row, size_t col, formula_error_t val);
+
+ element get(size_t row, size_t col) const;
+
+ size_t row_size() const;
+ size_t col_size() const;
+
+ void swap(matrix& r);
+
+ numeric_matrix as_numeric() const;
+
+ bool operator== (const matrix& r) const;
+ bool operator!= (const matrix& r) const;
+};
+
+class IXION_DLLPUBLIC numeric_matrix
+{
+ friend class matrix;
+
+ struct impl;
+ std::unique_ptr<impl> mp_impl;
+
+public:
+ numeric_matrix();
+ numeric_matrix(size_t rows, size_t cols);
+
+ /**
+ * Constructor with initial values.
+ *
+ * @param array Array of initial values stored in column-major order.
+ * @param rows Number of rows.
+ * @param cols Number of columns.
+ */
+ numeric_matrix(std::vector<double> array, size_t rows, size_t cols);
+ numeric_matrix(numeric_matrix&& r);
+ ~numeric_matrix();
+
+ numeric_matrix& operator= (numeric_matrix other);
+
+ double& operator() (size_t row, size_t col);
+ const double& operator() (size_t row, size_t col) const;
+
+ void swap(numeric_matrix& r);
+
+ size_t row_size() const;
+ size_t col_size() const;
+};
+
+}
+
+#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/ixion/model_context.hpp b/include/ixion/model_context.hpp
new file mode 100644
index 0000000..b9d0987
--- /dev/null
+++ b/include/ixion/model_context.hpp
@@ -0,0 +1,446 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef INCLUDED_IXION_MODEL_CONTEXT_HPP
+#define INCLUDED_IXION_MODEL_CONTEXT_HPP
+
+#include "env.hpp"
+#include "formula_tokens_fwd.hpp"
+#include "types.hpp"
+
+#include <string>
+#include <memory>
+#include <variant>
+
+namespace ixion {
+
+class cell_access;
+class dirty_cell_tracker;
+class formula_cell;
+class formula_name_resolver;
+class formula_result;
+class matrix;
+class model_iterator;
+class named_expressions_iterator;
+struct abs_address_t;
+struct abs_range_t;
+struct abs_rc_range_t;
+struct config;
+struct named_expression_t;
+
+namespace iface {
+
+class session_handler;
+class table_handler;
+
+}
+
+namespace detail {
+
+class model_context_impl;
+
+}
+
+/**
+ * This class stores all data relevant to current session. You can think of
+ * this like a document model for each formula calculation run. Note that
+ * only those methods called from the formula interpreter are specified in
+ * the interface; this explains why accessors for the most part only have
+ * the 'get' method not paired with its 'set' counterpart.
+ */
+class IXION_DLLPUBLIC model_context final
+{
+ friend class named_expressions_iterator;
+ friend class cell_access;
+
+ std::unique_ptr<detail::model_context_impl> mp_impl;
+
+public:
+ class IXION_DLLPUBLIC session_handler_factory
+ {
+ public:
+ virtual std::unique_ptr<iface::session_handler> create();
+ virtual ~session_handler_factory();
+ };
+
+ /**
+ * Cell value only to be used to input a collection of cells to sheet.
+ * Formula cells are not supported.
+ */
+ struct IXION_DLLPUBLIC input_cell
+ {
+ using value_type = std::variant<bool, double, std::string_view>;
+
+ celltype_t type;
+ value_type value;
+
+ /** Initializes the cell to be empty. */
+ input_cell(std::nullptr_t);
+ /** Boolean cell value. */
+ input_cell(bool b);
+ /** The char array must be null-terminated. */
+ input_cell(const char* s);
+ /** Numeric cell value. */
+ input_cell(double v);
+
+ input_cell(const input_cell& other);
+ };
+
+ class IXION_DLLPUBLIC input_row
+ {
+ std::initializer_list<input_cell> m_cells;
+ public:
+ input_row(std::initializer_list<input_cell> cells);
+
+ const std::initializer_list<input_cell>& cells() const;
+ };
+
+ model_context();
+ model_context(const rc_size_t& sheet_size);
+ ~model_context();
+
+ /**
+ * Query the current policy on what to do when a formula cell result is
+ * being requested while the result has not yet been computed.
+ */
+ formula_result_wait_policy_t get_formula_result_wait_policy() const;
+
+ /**
+ * This method is used to notify the model access implementer of formula
+ * events.
+ *
+ * @param event event type.
+ */
+ void notify(formula_event_t event);
+
+ const config& get_config() const;
+ dirty_cell_tracker& get_cell_tracker();
+ const dirty_cell_tracker& get_cell_tracker() const;
+
+ bool is_empty(const abs_address_t& addr) const;
+ bool is_empty(const abs_range_t& range) const;
+ celltype_t get_celltype(const abs_address_t& addr) const;
+ cell_value_t get_cell_value_type(const abs_address_t& addr) const;
+
+ /**
+ * Get a numeric representation of the cell value at specified position.
+ * If the cell at the specified position is a formula cell and its result
+ * has not yet been computed, it will block until the result becomes
+ * available.
+ *
+ * @param addr position of the cell.
+ *
+ * @return numeric representation of the cell value.
+ */
+ double get_numeric_value(const abs_address_t& addr) const;
+ bool get_boolean_value(const abs_address_t& addr) const;
+ string_id_t get_string_identifier(const abs_address_t& addr) const;
+
+ /**
+ * Get a string value associated with the cell at the specified position.
+ * It returns a valid string value only when the cell is a string cell, or
+ * is a formula cell containing a string result. Otherwise, it returns a
+ * nullptr.
+ *
+ * @param addr position of the cell.
+ *
+ * @return pointer to a string value if the cell stores a valid string
+ * value, else nullptr.
+ */
+ std::string_view get_string_value(const abs_address_t& addr) const;
+ const formula_cell* get_formula_cell(const abs_address_t& addr) const;
+ formula_cell* get_formula_cell(const abs_address_t& addr);
+
+ formula_result get_formula_result(const abs_address_t& addr) const;
+
+ /**
+ * Get a named expression token set associated with specified name if
+ * present. It first searches the local sheet scope for the name, then if
+ * it's not present, it searches the global scope.
+ *
+ * @param sheet index of the sheet scope to search in.
+ * @param name name of the expression.
+ *
+ * @return const pointer to the token set if exists, nullptr otherwise.
+ */
+ const named_expression_t* get_named_expression(sheet_t sheet, std::string_view name) const;
+
+ double count_range(const abs_range_t& range, values_t values_type) const;
+
+ /**
+ * Obtain range value in matrix form. Multi-sheet ranges are not
+ * supported. If the specified range consists of multiple sheets, it
+ * throws an exception.
+ *
+ * @param range absolute, single-sheet range address. Multi-sheet ranges
+ * are not allowed.
+ *
+ * @return range value represented as matrix.
+ */
+ matrix get_range_value(const abs_range_t& range) const;
+
+ /**
+ * Session handler instance receives various events from the formula
+ * interpretation run, in order to respond to those events. This is
+ * optional; the model context implementation is not required to provide a
+ * handler.
+ *
+ * @return a new session handler instance. It may be nullptr.
+ */
+ std::unique_ptr<iface::session_handler> create_session_handler();
+
+ /**
+ * Table interface provides access to all table ranges stored in the
+ * document model. A table is a 2-dimensional range of cells that include
+ * named columns. It is used when resolving a table reference that refers
+ * to a cell or a range of cells by the table name and/or column name.
+ *
+ * @return non-null pointer to the table storage inside the model, or
+ * nullptr if no table is present or supported by the model
+ * implementation.
+ */
+ iface::table_handler* get_table_handler();
+ const iface::table_handler* get_table_handler() const;
+
+ /**
+ * Try to add a new string to the string pool. If the same string already
+ * exists in the pool, the new string won't be added to the pool.
+ *
+ * @param s string to try to add to the pool.
+ *
+ * @return string_id_t integer value representing the string.
+ */
+ string_id_t add_string(std::string_view s);
+ const std::string* get_string(string_id_t identifier) const;
+
+ /**
+ * Get the index of sheet from sheet name. If the sheet name doesn't exist,
+ * it returns a value equal to <code>ixion::invalid_sheet</code>.
+ *
+ * @param name sheet name.
+ *
+ * @return 0-based sheet index, or <code>ixion::invalid_sheet</code> in case
+ * the document doesn't have a sheet by the specified name.
+ */
+ sheet_t get_sheet_index(std::string_view name) const;
+ std::string get_sheet_name(sheet_t sheet) const;
+
+ /**
+ * Set a new name to an existing sheet.
+ *
+ * @param sheet 0-based sheet index.
+ * @param name New name of a sheet.
+ */
+ void set_sheet_name(sheet_t sheet, std::string name);
+
+ /**
+ * Get the size of a sheet.
+ *
+ * @return sheet size.
+ */
+ rc_size_t get_sheet_size() const;
+
+ /**
+ * Return the number of sheets.
+ *
+ * @return number of sheets.
+ */
+ size_t get_sheet_count() const;
+
+ string_id_t append_string(std::string_view s);
+
+ void set_sheet_size(const rc_size_t& sheet_size);
+ void set_config(const config& cfg);
+
+ void empty_cell(const abs_address_t& addr);
+
+ void set_numeric_cell(const abs_address_t& addr, double val);
+ void set_boolean_cell(const abs_address_t& adr, bool val);
+ void set_string_cell(const abs_address_t& addr, std::string_view s);
+ void set_string_cell(const abs_address_t& addr, string_id_t identifier);
+
+ cell_access get_cell_access(const abs_address_t& addr) const;
+
+ /**
+ * Duplicate the value of the source cell to one or more cells located
+ * immediately below it.
+ *
+ * @param src position of the source cell to copy the value from.
+ * @param n_dst number of cells below to copy the value to. It must be at
+ * least one.
+ */
+ void fill_down_cells(const abs_address_t& src, size_t n_dst);
+
+ /**
+ * Set a formula cell at a specified address.
+ *
+ * @param addr address at which to set a formula cell.
+ * @param tokens formula tokens to put into the formula cell.
+ *
+ * @return pointer to the formula cell instance inserted into the model.
+ */
+ formula_cell* set_formula_cell(const abs_address_t& addr, formula_tokens_t tokens);
+
+ /**
+ * Set a formula cell at a specified address. This variant takes a
+ * formula tokens store that can be shared between multiple formula cell
+ * instances.
+ *
+ * @param addr address at which to set a formula cell.
+ * @param tokens formula tokens to put into the formula cell.
+ *
+ * @return pointer to the formula cell instance inserted into the model.
+ */
+ formula_cell* set_formula_cell(const abs_address_t& addr, const formula_tokens_store_ptr_t& tokens);
+
+ /**
+ * Set a formula cell at a specified address. This variant takes a
+ * formula tokens store that can be shared between multiple formula cell
+ * instances.
+ *
+ * @param addr address at which to set a formula cell.
+ * @param tokens formula tokens to put into the formula cell.
+ * @param result cached result of this formula cell.
+ *
+ * @return pointer to the formula cell instance inserted into the model.
+ */
+ formula_cell* set_formula_cell(const abs_address_t& addr, const formula_tokens_store_ptr_t& tokens, formula_result result);
+
+ void set_grouped_formula_cells(const abs_range_t& group_range, formula_tokens_t tokens);
+
+ void set_grouped_formula_cells(const abs_range_t& group_range, formula_tokens_t tokens, formula_result result);
+
+ abs_range_t get_data_range(sheet_t sheet) const;
+
+ /**
+ * Set a named expression associated with a string name in the global
+ * scope.
+ *
+ * @param name name of the expression.
+ * @param expr formula tokens to use for the named expression.
+ */
+ void set_named_expression(std::string name, formula_tokens_t expr);
+
+ /**
+ * Set a named expression associated with a string name in the global
+ * scope.
+ *
+ * @param name name of the expression.
+ * @param origin position of the origin cell. Origin cell is relevant
+ * only when you need to convert the tokens into a string
+ * representation.
+ * @param expr formula tokens to use for the named expression.
+ */
+ void set_named_expression(std::string name, const abs_address_t& origin, formula_tokens_t expr);
+
+ /**
+ * Set a named expression associated with a string name in a sheet-local
+ * scope.
+ *
+ * @param sheet 0-based index of the sheet to register this expression
+ * with.
+ * @param name name of the expression.
+ * @param expr formula tokens to use for the named expression.
+ */
+ void set_named_expression(sheet_t sheet, std::string name, formula_tokens_t expr);
+
+ /**
+ * Set a named expression associated with a string name in a sheet-local
+ * scope.
+ *
+ * @param sheet 0-based index of the sheet to register this expression
+ * with.
+ * @param name name of the expression.
+ * @param origin position of the origin cell. Origin cell is relevant
+ * only when you need to convert the tokens into a string
+ * representation.
+ * @param expr formula tokens to use for the named expression.
+ */
+ void set_named_expression(sheet_t sheet, std::string name, const abs_address_t& origin, formula_tokens_t expr);
+
+ /**
+ * Append a new sheet to the model. The caller must ensure that the name
+ * of the new sheet is unique within the model context. When the name
+ * being used for the new sheet already exists, it throws a
+ * model_context_error exception.
+ *
+ * @param name name of the sheet to be inserted.
+ *
+ * @return sheet index of the inserted sheet.
+ *
+ * @throw model_context_error
+ */
+ sheet_t append_sheet(std::string name);
+
+ /**
+ * A convenient way to mass-insert a range of cell values. You can
+ * use a nested initializet list representing a range of cell values. The
+ * outer list represents rows.
+ *
+ * @param sheet sheet index.
+ * @param rows nested list of cell values. The outer list represents
+ * rows.
+ */
+ void set_cell_values(sheet_t sheet, std::initializer_list<input_row> rows);
+
+ void set_session_handler_factory(session_handler_factory* factory);
+
+ void set_table_handler(iface::table_handler* handler);
+
+ size_t get_string_count() const;
+
+ void dump_strings() const;
+
+ /**
+ * Get an integer string ID from a string value. If the string value
+ * doesn't exist in the pool, the value equal to empty_string_id gets
+ * returned.
+ *
+ * @param s string value.
+ *
+ * @return string_id_t integer string ID associated with the string value
+ * given.
+ */
+ string_id_t get_identifier_from_string(std::string_view s) const;
+
+ /**
+ * Get an immutable iterator that lets you iterate cell values in one
+ * sheet one at a time. <i>The caller has to ensure that the model
+ * content does not change for the duration of the iteration.</i>
+ *
+ * @param sheet sheet index.
+ * @param dir direction of the iteration.
+ * @param range range on the specified sheet to iterate over.
+ *
+ * @return model iterator instance.
+ */
+ model_iterator get_model_iterator(
+ sheet_t sheet, rc_direction_t dir, const abs_rc_range_t& range) const;
+
+ /**
+ * Get an iterator for global named expressions.
+ */
+ named_expressions_iterator get_named_expressions_iterator() const;
+
+ /**
+ * Get an interator for sheet-local named expressions.
+ *
+ * @param sheet 0-based index of the sheet where the named expressions are
+ * stored.
+ */
+ named_expressions_iterator get_named_expressions_iterator(sheet_t sheet) const;
+
+ void walk(
+ sheet_t sheet, const abs_rc_range_t& range, column_block_callback_t cb) const;
+
+ bool empty() const;
+};
+
+}
+
+#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/ixion/model_iterator.hpp b/include/ixion/model_iterator.hpp
new file mode 100644
index 0000000..dcebc8c
--- /dev/null
+++ b/include/ixion/model_iterator.hpp
@@ -0,0 +1,76 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef INCLUDED_IXION_MODEL_ITERATOR_HPP
+#define INCLUDED_IXION_MODEL_ITERATOR_HPP
+
+#include "types.hpp"
+
+#include <memory>
+#include <iosfwd>
+#include <variant>
+
+namespace ixion {
+
+namespace detail { class model_context_impl; }
+class formula_cell;
+struct abs_rc_range_t;
+
+class IXION_DLLPUBLIC model_iterator
+{
+public:
+ class impl;
+
+private:
+ friend class detail::model_context_impl;
+ std::unique_ptr<model_iterator::impl> mp_impl;
+
+ model_iterator(const detail::model_context_impl& cxt, sheet_t sheet, const abs_rc_range_t& range, rc_direction_t dir);
+public:
+
+ struct IXION_DLLPUBLIC cell
+ {
+ using value_type = std::variant<bool, double, string_id_t, const formula_cell*>;
+
+ row_t row;
+ col_t col;
+ celltype_t type;
+ value_type value;
+
+ cell();
+ cell(row_t _row, col_t _col);
+ cell(row_t _row, col_t _col, bool _b);
+ cell(row_t _row, col_t _col, string_id_t _s);
+ cell(row_t _row, col_t _col, double _v);
+ cell(row_t _row, col_t _col, const formula_cell* _f);
+
+ bool operator== (const cell& other) const;
+ bool operator!= (const cell& other) const;
+ };
+
+ model_iterator();
+ model_iterator(const model_iterator&) = delete;
+ model_iterator(model_iterator&& other);
+ ~model_iterator();
+
+ model_iterator& operator= (const model_iterator&) = delete;
+ model_iterator& operator= (model_iterator&& other);
+
+ bool has() const;
+
+ void next();
+
+ const cell& get() const;
+};
+
+IXION_DLLPUBLIC std::ostream& operator<< (std::ostream& os, const model_iterator::cell& c);
+
+} // namespace ixion
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/ixion/module.hpp b/include/ixion/module.hpp
new file mode 100644
index 0000000..3f0fbc2
--- /dev/null
+++ b/include/ixion/module.hpp
@@ -0,0 +1,37 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef INCLUDED_IXION_MODULE_HPP
+#define INCLUDED_IXION_MODULE_HPP
+
+#include "env.hpp"
+
+namespace ixion { namespace draft {
+
+/**
+ * Initialize modules if exists.
+ */
+IXION_DLLPUBLIC void init_modules();
+
+IXION_DLLPUBLIC void unload_module(void* handler);
+
+class compute_engine;
+
+using create_compute_engine_t = compute_engine* (*)();
+using destroy_compute_engine_t = void (*)(const compute_engine*);
+
+struct module_def
+{
+ create_compute_engine_t create_compute_engine;
+ destroy_compute_engine_t destroy_compute_engine;
+};
+
+}}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/ixion/named_expressions_iterator.hpp b/include/ixion/named_expressions_iterator.hpp
new file mode 100644
index 0000000..7511fef
--- /dev/null
+++ b/include/ixion/named_expressions_iterator.hpp
@@ -0,0 +1,57 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef INCLUDED_IXION_NAMED_EXPRESSIONS_ITERATOR_HPP
+#define INCLUDED_IXION_NAMED_EXPRESSIONS_ITERATOR_HPP
+
+#include "types.hpp"
+#include "formula_tokens_fwd.hpp"
+
+#include <memory>
+#include <iosfwd>
+#include <string>
+
+namespace ixion {
+
+class model_context;
+struct abs_address_t;
+
+class IXION_DLLPUBLIC named_expressions_iterator
+{
+ friend class model_context;
+
+ struct impl;
+ std::unique_ptr<impl> mp_impl;
+
+ named_expressions_iterator(const model_context& cxt, sheet_t scope);
+
+public:
+ named_expressions_iterator();
+ named_expressions_iterator(const named_expressions_iterator& other);
+ named_expressions_iterator(named_expressions_iterator&& other);
+ ~named_expressions_iterator();
+
+ struct named_expression
+ {
+ const std::string* name;
+ const named_expression_t* expression;
+ };
+
+ size_t size() const;
+ bool has() const;
+ void next();
+
+ named_expression get() const;
+
+ named_expressions_iterator& operator= (const named_expressions_iterator& other);
+};
+
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/ixion/table.hpp b/include/ixion/table.hpp
new file mode 100644
index 0000000..c0e556e
--- /dev/null
+++ b/include/ixion/table.hpp
@@ -0,0 +1,34 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef INCLUDED_IXION_TABLE_HPP
+#define INCLUDED_IXION_TABLE_HPP
+
+#include "types.hpp"
+
+namespace ixion {
+
+struct IXION_DLLPUBLIC table_t
+{
+ string_id_t name;
+ string_id_t column_first;
+ string_id_t column_last;
+ table_areas_t areas;
+
+ table_t();
+
+ bool operator== (const table_t& r) const;
+ bool operator!= (const table_t& r) const;
+};
+
+IXION_DLLPUBLIC std::ostream& operator<<(std::ostream& os, const table_t& table);
+
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/ixion/types.hpp b/include/ixion/types.hpp
new file mode 100644
index 0000000..5933646
--- /dev/null
+++ b/include/ixion/types.hpp
@@ -0,0 +1,373 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef INCLUDED_IXION_TYPES_HPP
+#define INCLUDED_IXION_TYPES_HPP
+
+#include "env.hpp"
+
+#include <cstdlib>
+#include <cstdint>
+#include <string_view>
+#include <functional>
+
+namespace ixion {
+
+/** Column index type. */
+using col_t = int32_t;
+
+/** Row index type. */
+using row_t = int32_t;
+
+/** Sheet index type.*/
+using sheet_t = int32_t;
+
+/**
+ * Integer type that is large enough to store either a row or a column
+ * index.
+ */
+using rc_t = row_t;
+
+/**
+ * String ID type.
+ *
+ * All string values are converted into integer tokens. You need to call the
+ * get_string() method of ixion::model_context to get the
+ * actual string value.
+ */
+using string_id_t = uint32_t;
+
+/**
+ * Special sheet ID that represents a global scope, as opposed to a
+ * sheet-local scope.
+ */
+IXION_DLLPUBLIC_VAR const sheet_t global_scope;
+
+/**
+ * Special sheet ID that represents an invalid sheet.
+ */
+IXION_DLLPUBLIC_VAR const sheet_t invalid_sheet;
+
+/**
+ * Determine whether or not a given sheet index is valid.
+ *
+ * @param sheet sheet index to test.
+ *
+ * @return true if the sheet index is valid, false otherwise.
+ */
+IXION_DLLPUBLIC bool is_valid_sheet(sheet_t sheet);
+
+/** Global string ID representing an empty string. */
+IXION_DLLPUBLIC_VAR const string_id_t empty_string_id;
+
+/**
+ * This type represents a raw cell type as stored in ixion::model_context.
+ */
+enum class celltype_t : uint8_t
+{
+ /** unknown cell type.*/
+ unknown = 0,
+ /** cell contains a raw string value.*/
+ string,
+ /** cell contains a raw numeric value.*/
+ numeric,
+ /** cell contains a formula object. */
+ formula,
+ /** cell contains a raw boolean value. */
+ boolean,
+ /** cell is empty and contains absolutely nothing. */
+ empty
+};
+
+/**
+ * Similar to celltype_t, except that it does not include a formula type.
+ * Instead it uses the formula result type to classify its type. The error
+ * type refers to an error value in formula cell.
+ */
+enum class cell_value_t : uint8_t
+{
+ /** unknown cell value type. */
+ unknown = 0,
+ /**
+ * either the cell contains a raw string value, or a calculated formula
+ * cell whose result is of string type.
+ */
+ string,
+ /**
+ * either the cell contains a raw numeric value, or a calculated formula
+ * cell whose result is of numeric type.
+ */
+ numeric,
+ /**
+ * this type corresponds with a formula cell whose result contains an
+ * error.
+ */
+ error,
+ /**
+ * either the cell contains a raw boolean value type, or a calculated
+ * formula cell whose result is of boolean type.
+ */
+ boolean,
+ /**
+ * the cell is empty and contains nothing whatsoever.
+ */
+ empty
+};
+
+enum value_t
+{
+ value_none = 0x00,
+ value_string = 0x01,
+ value_numeric = 0x02,
+ value_boolean = 0x04,
+ value_empty = 0x08
+};
+
+/** type that stores a mixture of value_t values. */
+class values_t
+{
+ int m_val;
+public:
+ values_t(int val) : m_val(val) {}
+ bool is_numeric() const { return (m_val & value_numeric) == value_numeric; }
+ bool is_boolean() const { return (m_val & value_boolean) == value_boolean; }
+ bool is_string() const { return (m_val & value_string) == value_string; }
+ bool is_empty() const { return (m_val & value_empty) == value_empty; }
+};
+
+/** Value that specifies the area inside a table. */
+enum table_area_t
+{
+ table_area_none = 0x00,
+ table_area_data = 0x01,
+ table_area_headers = 0x02,
+ table_area_totals = 0x04,
+ table_area_all = 0x07
+};
+
+/** type that stores a mixture of ixion::table_area_t values. */
+using table_areas_t = int32_t;
+
+/**
+ * Formula name resolver type specifies how name tokens are resolved.
+ */
+enum class formula_name_resolver_t
+{
+ /** Unknown syntax. */
+ unknown = 0,
+ /** Default A1 syntax used in Excel */
+ excel_a1 = 1,
+ /** R1C1 syntax available in Excel */
+ excel_r1c1 = 2,
+ /** Default A1 syntax used in Calc */
+ calc_a1 = 3,
+ /** OpenFormula syntax */
+ odff = 4,
+ /** ODF cell-range-address syntax */
+ odf_cra = 5,
+};
+
+/**
+ * Formula error types. Note that only the official (i.e. non-internal)
+ * error types have their corresponding error strings. Use the
+ * get_formula_error_name() function to convert an enum member value of this
+ * type to its string representation.
+ */
+enum class formula_error_t : uint8_t
+{
+ no_error = 0,
+ ref_result_not_available = 1,
+ division_by_zero = 2,
+ invalid_expression = 3,
+ name_not_found = 4,
+ no_range_intersection = 5,
+ invalid_value_type = 6,
+ no_value_available = 7,
+
+ no_result_error = 253, // internal only error
+ stack_error = 254, // internal only error
+ general_error = 255, // internal only error
+};
+
+/**
+ * Type of policy on what to do when querying for the result of a formula
+ * cell whose result has not yet been calculated.
+ */
+enum class formula_result_wait_policy_t
+{
+ /**
+ * Querying for the result of a formula cell will block until the
+ * calculation is complete.
+ */
+ block_until_done,
+
+ /**
+ * Querying for the result of a formula cell that has not yet been
+ * calculated will throw an exception.
+ */
+ throw_exception,
+};
+
+/**
+ * Formula event type used for event notification during calculation of
+ * formula cells.
+ *
+ * @see ixion::model_context::notify
+ */
+enum class formula_event_t
+{
+ /** Start of the calculations of formula cells. */
+ calculation_begins,
+ /** End of the calculations of formula cells. */
+ calculation_ends,
+};
+
+/**
+ * Specifies iterator direction of a ixion::model_context.
+ */
+enum class rc_direction_t
+{
+ /** Flows left to right first then top to bottom. */
+ horizontal,
+ /** Flows top to bottom first then left to right. */
+ vertical
+};
+
+/**
+ * This structure stores a 2-dimensional size information.
+ */
+struct IXION_DLLPUBLIC rc_size_t
+{
+ row_t row;
+ col_t column;
+
+ rc_size_t();
+ rc_size_t(const rc_size_t& other);
+ rc_size_t(row_t _row, col_t _column);
+ ~rc_size_t();
+
+ rc_size_t& operator= (const rc_size_t& other);
+};
+
+/**
+ * This strcuture stores information about grouped formula cells. All
+ * formula cells belonging to the same group shares the same set of values.
+ */
+struct IXION_DLLPUBLIC formula_group_t
+{
+ /** Size of the formula group. */
+ rc_size_t size;
+ /**
+ * Unique value identifying the group a cell belongs to. Cells belonging
+ * to the same formula group should have the same value.
+ */
+ uintptr_t identity;
+ /** Boolean value indicating whether or not a cell is grouped. */
+ bool grouped;
+
+ formula_group_t();
+ formula_group_t(const formula_group_t& r);
+ formula_group_t(const rc_size_t& _group_size, uintptr_t _identity, bool _grouped);
+ ~formula_group_t();
+
+ formula_group_t& operator= (const formula_group_t& other);
+};
+
+/**
+ * Get a string representation of a formula error type.
+ *
+ * @param fe enum value representing a formula error type.
+ * @return null-terminated string representation of the formula error type.
+ */
+IXION_DLLPUBLIC std::string_view get_formula_error_name(formula_error_t fe);
+
+/**
+ * Parse a formula error string and convert it to a corresponding enum value.
+ *
+ * @param s string representation of a formula error type.
+ * @return enum value for a formula error type.
+ */
+IXION_DLLPUBLIC formula_error_t to_formula_error_type(std::string_view s);
+
+using column_block_handle = void*;
+
+/**
+ * Type of a column block that stores a series of adjacent cell values of the
+ * same type.
+ */
+enum class column_block_t : int
+{
+ unknown = 0,
+ empty,
+ boolean,
+ numeric,
+ string,
+ formula
+};
+
+/**
+ * Data that represents the shape of a column block.
+ */
+struct IXION_DLLPUBLIC column_block_shape_t
+{
+ std::size_t position;
+ std::size_t size;
+ std::size_t offset;
+ column_block_t type;
+ column_block_handle data;
+
+ column_block_shape_t();
+
+ column_block_shape_t(
+ std::size_t _position, std::size_t _size, std::size_t _offset,
+ column_block_t _type, column_block_handle _data);
+
+ column_block_shape_t(const column_block_shape_t& other);
+
+ column_block_shape_t& operator=(const column_block_shape_t& other);
+};
+
+/**
+ * Callback function type to be used during traversal of column data.
+ */
+using column_block_callback_t = std::function<bool(col_t, row_t, row_t, const column_block_shape_t&)>;
+
+IXION_DLLPUBLIC std::ostream& operator<< (std::ostream& os, const column_block_shape_t& v);
+
+/**
+ * Specifies how to determine whether or not to display a sheet name of a cell
+ * or range reference.
+ */
+enum class display_sheet_t
+{
+ /** Sheet name display preference is not specified. */
+ unspecified,
+ /** Sheet name should be always displayed. */
+ always,
+ /** Sheet name should never be displayed. */
+ never,
+ /**
+ * Sheet name should be displayed only when the sheet index of a reference
+ * is different from that of the position of a referencing cell.
+ */
+ only_if_different,
+};
+
+struct IXION_DLLPUBLIC print_config
+{
+ display_sheet_t display_sheet = display_sheet_t::only_if_different;
+
+ print_config();
+ print_config(const print_config& other);
+ ~print_config();
+};
+
+} // namespace ixion
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/install-sh b/install-sh
new file mode 100755
index 0000000..ec298b5
--- /dev/null
+++ b/install-sh
@@ -0,0 +1,541 @@
+#!/bin/sh
+# install - install a program, script, or datafile
+
+scriptversion=2020-11-14.01; # UTC
+
+# This originates from X11R5 (mit/util/scripts/install.sh), which was
+# later released in X11R6 (xc/config/util/install.sh) with the
+# following copyright and license.
+#
+# Copyright (C) 1994 X Consortium
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to
+# deal in the Software without restriction, including without limitation the
+# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+# sell copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
+# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+#
+# Except as contained in this notice, the name of the X Consortium shall not
+# be used in advertising or otherwise to promote the sale, use or other deal-
+# ings in this Software without prior written authorization from the X Consor-
+# tium.
+#
+#
+# FSF changes to this file are in the public domain.
+#
+# Calling this script install-sh is preferred over install.sh, to prevent
+# 'make' implicit rules from creating a file called install from it
+# when there is no Makefile.
+#
+# This script is compatible with the BSD install script, but was written
+# from scratch.
+
+tab=' '
+nl='
+'
+IFS=" $tab$nl"
+
+# Set DOITPROG to "echo" to test this script.
+
+doit=${DOITPROG-}
+doit_exec=${doit:-exec}
+
+# Put in absolute file names if you don't have them in your path;
+# or use environment vars.
+
+chgrpprog=${CHGRPPROG-chgrp}
+chmodprog=${CHMODPROG-chmod}
+chownprog=${CHOWNPROG-chown}
+cmpprog=${CMPPROG-cmp}
+cpprog=${CPPROG-cp}
+mkdirprog=${MKDIRPROG-mkdir}
+mvprog=${MVPROG-mv}
+rmprog=${RMPROG-rm}
+stripprog=${STRIPPROG-strip}
+
+posix_mkdir=
+
+# Desired mode of installed file.
+mode=0755
+
+# Create dirs (including intermediate dirs) using mode 755.
+# This is like GNU 'install' as of coreutils 8.32 (2020).
+mkdir_umask=22
+
+backupsuffix=
+chgrpcmd=
+chmodcmd=$chmodprog
+chowncmd=
+mvcmd=$mvprog
+rmcmd="$rmprog -f"
+stripcmd=
+
+src=
+dst=
+dir_arg=
+dst_arg=
+
+copy_on_change=false
+is_target_a_directory=possibly
+
+usage="\
+Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
+ or: $0 [OPTION]... SRCFILES... DIRECTORY
+ or: $0 [OPTION]... -t DIRECTORY SRCFILES...
+ or: $0 [OPTION]... -d DIRECTORIES...
+
+In the 1st form, copy SRCFILE to DSTFILE.
+In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
+In the 4th, create DIRECTORIES.
+
+Options:
+ --help display this help and exit.
+ --version display version info and exit.
+
+ -c (ignored)
+ -C install only if different (preserve data modification time)
+ -d create directories instead of installing files.
+ -g GROUP $chgrpprog installed files to GROUP.
+ -m MODE $chmodprog installed files to MODE.
+ -o USER $chownprog installed files to USER.
+ -p pass -p to $cpprog.
+ -s $stripprog installed files.
+ -S SUFFIX attempt to back up existing files, with suffix SUFFIX.
+ -t DIRECTORY install into DIRECTORY.
+ -T report an error if DSTFILE is a directory.
+
+Environment variables override the default commands:
+ CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
+ RMPROG STRIPPROG
+
+By default, rm is invoked with -f; when overridden with RMPROG,
+it's up to you to specify -f if you want it.
+
+If -S is not specified, no backups are attempted.
+
+Email bug reports to bug-automake@gnu.org.
+Automake home page: https://www.gnu.org/software/automake/
+"
+
+while test $# -ne 0; do
+ case $1 in
+ -c) ;;
+
+ -C) copy_on_change=true;;
+
+ -d) dir_arg=true;;
+
+ -g) chgrpcmd="$chgrpprog $2"
+ shift;;
+
+ --help) echo "$usage"; exit $?;;
+
+ -m) mode=$2
+ case $mode in
+ *' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*)
+ echo "$0: invalid mode: $mode" >&2
+ exit 1;;
+ esac
+ shift;;
+
+ -o) chowncmd="$chownprog $2"
+ shift;;
+
+ -p) cpprog="$cpprog -p";;
+
+ -s) stripcmd=$stripprog;;
+
+ -S) backupsuffix="$2"
+ shift;;
+
+ -t)
+ is_target_a_directory=always
+ dst_arg=$2
+ # Protect names problematic for 'test' and other utilities.
+ case $dst_arg in
+ -* | [=\(\)!]) dst_arg=./$dst_arg;;
+ esac
+ shift;;
+
+ -T) is_target_a_directory=never;;
+
+ --version) echo "$0 $scriptversion"; exit $?;;
+
+ --) shift
+ break;;
+
+ -*) echo "$0: invalid option: $1" >&2
+ exit 1;;
+
+ *) break;;
+ esac
+ shift
+done
+
+# We allow the use of options -d and -T together, by making -d
+# take the precedence; this is for compatibility with GNU install.
+
+if test -n "$dir_arg"; then
+ if test -n "$dst_arg"; then
+ echo "$0: target directory not allowed when installing a directory." >&2
+ exit 1
+ fi
+fi
+
+if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
+ # When -d is used, all remaining arguments are directories to create.
+ # When -t is used, the destination is already specified.
+ # Otherwise, the last argument is the destination. Remove it from $@.
+ for arg
+ do
+ if test -n "$dst_arg"; then
+ # $@ is not empty: it contains at least $arg.
+ set fnord "$@" "$dst_arg"
+ shift # fnord
+ fi
+ shift # arg
+ dst_arg=$arg
+ # Protect names problematic for 'test' and other utilities.
+ case $dst_arg in
+ -* | [=\(\)!]) dst_arg=./$dst_arg;;
+ esac
+ done
+fi
+
+if test $# -eq 0; then
+ if test -z "$dir_arg"; then
+ echo "$0: no input file specified." >&2
+ exit 1
+ fi
+ # It's OK to call 'install-sh -d' without argument.
+ # This can happen when creating conditional directories.
+ exit 0
+fi
+
+if test -z "$dir_arg"; then
+ if test $# -gt 1 || test "$is_target_a_directory" = always; then
+ if test ! -d "$dst_arg"; then
+ echo "$0: $dst_arg: Is not a directory." >&2
+ exit 1
+ fi
+ fi
+fi
+
+if test -z "$dir_arg"; then
+ do_exit='(exit $ret); exit $ret'
+ trap "ret=129; $do_exit" 1
+ trap "ret=130; $do_exit" 2
+ trap "ret=141; $do_exit" 13
+ trap "ret=143; $do_exit" 15
+
+ # Set umask so as not to create temps with too-generous modes.
+ # However, 'strip' requires both read and write access to temps.
+ case $mode in
+ # Optimize common cases.
+ *644) cp_umask=133;;
+ *755) cp_umask=22;;
+
+ *[0-7])
+ if test -z "$stripcmd"; then
+ u_plus_rw=
+ else
+ u_plus_rw='% 200'
+ fi
+ cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
+ *)
+ if test -z "$stripcmd"; then
+ u_plus_rw=
+ else
+ u_plus_rw=,u+rw
+ fi
+ cp_umask=$mode$u_plus_rw;;
+ esac
+fi
+
+for src
+do
+ # Protect names problematic for 'test' and other utilities.
+ case $src in
+ -* | [=\(\)!]) src=./$src;;
+ esac
+
+ if test -n "$dir_arg"; then
+ dst=$src
+ dstdir=$dst
+ test -d "$dstdir"
+ dstdir_status=$?
+ # Don't chown directories that already exist.
+ if test $dstdir_status = 0; then
+ chowncmd=""
+ fi
+ else
+
+ # Waiting for this to be detected by the "$cpprog $src $dsttmp" command
+ # might cause directories to be created, which would be especially bad
+ # if $src (and thus $dsttmp) contains '*'.
+ if test ! -f "$src" && test ! -d "$src"; then
+ echo "$0: $src does not exist." >&2
+ exit 1
+ fi
+
+ if test -z "$dst_arg"; then
+ echo "$0: no destination specified." >&2
+ exit 1
+ fi
+ dst=$dst_arg
+
+ # If destination is a directory, append the input filename.
+ if test -d "$dst"; then
+ if test "$is_target_a_directory" = never; then
+ echo "$0: $dst_arg: Is a directory" >&2
+ exit 1
+ fi
+ dstdir=$dst
+ dstbase=`basename "$src"`
+ case $dst in
+ */) dst=$dst$dstbase;;
+ *) dst=$dst/$dstbase;;
+ esac
+ dstdir_status=0
+ else
+ dstdir=`dirname "$dst"`
+ test -d "$dstdir"
+ dstdir_status=$?
+ fi
+ fi
+
+ case $dstdir in
+ */) dstdirslash=$dstdir;;
+ *) dstdirslash=$dstdir/;;
+ esac
+
+ obsolete_mkdir_used=false
+
+ if test $dstdir_status != 0; then
+ case $posix_mkdir in
+ '')
+ # With -d, create the new directory with the user-specified mode.
+ # Otherwise, rely on $mkdir_umask.
+ if test -n "$dir_arg"; then
+ mkdir_mode=-m$mode
+ else
+ mkdir_mode=
+ fi
+
+ posix_mkdir=false
+ # The $RANDOM variable is not portable (e.g., dash). Use it
+ # here however when possible just to lower collision chance.
+ tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
+
+ trap '
+ ret=$?
+ rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null
+ exit $ret
+ ' 0
+
+ # Because "mkdir -p" follows existing symlinks and we likely work
+ # directly in world-writeable /tmp, make sure that the '$tmpdir'
+ # directory is successfully created first before we actually test
+ # 'mkdir -p'.
+ if (umask $mkdir_umask &&
+ $mkdirprog $mkdir_mode "$tmpdir" &&
+ exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1
+ then
+ if test -z "$dir_arg" || {
+ # Check for POSIX incompatibilities with -m.
+ # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
+ # other-writable bit of parent directory when it shouldn't.
+ # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
+ test_tmpdir="$tmpdir/a"
+ ls_ld_tmpdir=`ls -ld "$test_tmpdir"`
+ case $ls_ld_tmpdir in
+ d????-?r-*) different_mode=700;;
+ d????-?--*) different_mode=755;;
+ *) false;;
+ esac &&
+ $mkdirprog -m$different_mode -p -- "$test_tmpdir" && {
+ ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"`
+ test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
+ }
+ }
+ then posix_mkdir=:
+ fi
+ rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir"
+ else
+ # Remove any dirs left behind by ancient mkdir implementations.
+ rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null
+ fi
+ trap '' 0;;
+ esac
+
+ if
+ $posix_mkdir && (
+ umask $mkdir_umask &&
+ $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
+ )
+ then :
+ else
+
+ # mkdir does not conform to POSIX,
+ # or it failed possibly due to a race condition. Create the
+ # directory the slow way, step by step, checking for races as we go.
+
+ case $dstdir in
+ /*) prefix='/';;
+ [-=\(\)!]*) prefix='./';;
+ *) prefix='';;
+ esac
+
+ oIFS=$IFS
+ IFS=/
+ set -f
+ set fnord $dstdir
+ shift
+ set +f
+ IFS=$oIFS
+
+ prefixes=
+
+ for d
+ do
+ test X"$d" = X && continue
+
+ prefix=$prefix$d
+ if test -d "$prefix"; then
+ prefixes=
+ else
+ if $posix_mkdir; then
+ (umask $mkdir_umask &&
+ $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
+ # Don't fail if two instances are running concurrently.
+ test -d "$prefix" || exit 1
+ else
+ case $prefix in
+ *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
+ *) qprefix=$prefix;;
+ esac
+ prefixes="$prefixes '$qprefix'"
+ fi
+ fi
+ prefix=$prefix/
+ done
+
+ if test -n "$prefixes"; then
+ # Don't fail if two instances are running concurrently.
+ (umask $mkdir_umask &&
+ eval "\$doit_exec \$mkdirprog $prefixes") ||
+ test -d "$dstdir" || exit 1
+ obsolete_mkdir_used=true
+ fi
+ fi
+ fi
+
+ if test -n "$dir_arg"; then
+ { test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
+ { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
+ { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
+ test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
+ else
+
+ # Make a couple of temp file names in the proper directory.
+ dsttmp=${dstdirslash}_inst.$$_
+ rmtmp=${dstdirslash}_rm.$$_
+
+ # Trap to clean up those temp files at exit.
+ trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
+
+ # Copy the file name to the temp name.
+ (umask $cp_umask &&
+ { test -z "$stripcmd" || {
+ # Create $dsttmp read-write so that cp doesn't create it read-only,
+ # which would cause strip to fail.
+ if test -z "$doit"; then
+ : >"$dsttmp" # No need to fork-exec 'touch'.
+ else
+ $doit touch "$dsttmp"
+ fi
+ }
+ } &&
+ $doit_exec $cpprog "$src" "$dsttmp") &&
+
+ # and set any options; do chmod last to preserve setuid bits.
+ #
+ # If any of these fail, we abort the whole thing. If we want to
+ # ignore errors from any of these, just make sure not to ignore
+ # errors from the above "$doit $cpprog $src $dsttmp" command.
+ #
+ { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
+ { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
+ { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
+ { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
+
+ # If -C, don't bother to copy if it wouldn't change the file.
+ if $copy_on_change &&
+ old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
+ new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
+ set -f &&
+ set X $old && old=:$2:$4:$5:$6 &&
+ set X $new && new=:$2:$4:$5:$6 &&
+ set +f &&
+ test "$old" = "$new" &&
+ $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
+ then
+ rm -f "$dsttmp"
+ else
+ # If $backupsuffix is set, and the file being installed
+ # already exists, attempt a backup. Don't worry if it fails,
+ # e.g., if mv doesn't support -f.
+ if test -n "$backupsuffix" && test -f "$dst"; then
+ $doit $mvcmd -f "$dst" "$dst$backupsuffix" 2>/dev/null
+ fi
+
+ # Rename the file to the real destination.
+ $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
+
+ # The rename failed, perhaps because mv can't rename something else
+ # to itself, or perhaps because mv is so ancient that it does not
+ # support -f.
+ {
+ # Now remove or move aside any old file at destination location.
+ # We try this two ways since rm can't unlink itself on some
+ # systems and the destination file might be busy for other
+ # reasons. In this case, the final cleanup might fail but the new
+ # file should still install successfully.
+ {
+ test ! -f "$dst" ||
+ $doit $rmcmd "$dst" 2>/dev/null ||
+ { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
+ { $doit $rmcmd "$rmtmp" 2>/dev/null; :; }
+ } ||
+ { echo "$0: cannot unlink or rename $dst" >&2
+ (exit 1); exit 1
+ }
+ } &&
+
+ # Now rename the file to the real destination.
+ $doit $mvcmd "$dsttmp" "$dst"
+ }
+ fi || exit 1
+
+ trap '' 0
+ fi
+done
+
+# Local variables:
+# eval: (add-hook 'before-save-hook 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-time-zone: "UTC0"
+# time-stamp-end: "; # UTC"
+# End:
diff --git a/libixion.pc.in b/libixion.pc.in
new file mode 100644
index 0000000..047eac1
--- /dev/null
+++ b/libixion.pc.in
@@ -0,0 +1,11 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: libixion-@IXION_API_VERSION@
+Description: Generic formula computation library
+Version: @VERSION@
+Libs: -L${libdir} -lixion-@IXION_API_VERSION@
+Cflags: -I${includedir}/libixion-@IXION_API_VERSION@
+
diff --git a/ltmain.sh b/ltmain.sh
new file mode 100755
index 0000000..540a92a
--- /dev/null
+++ b/ltmain.sh
@@ -0,0 +1,11251 @@
+#! /bin/sh
+## DO NOT EDIT - This file generated from ./build-aux/ltmain.in
+## by inline-source v2014-01-03.01
+
+# libtool (GNU libtool) 2.4.6
+# Provide generalized library-building support services.
+# Written by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
+
+# Copyright (C) 1996-2015 Free Software Foundation, Inc.
+# This is free software; see the source for copying conditions. There is NO
+# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+# GNU Libtool is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# As a special exception to the GNU General Public License,
+# if you distribute this file as part of a program or library that
+# is built using GNU Libtool, you may include this file under the
+# same distribution terms that you use for the rest of that program.
+#
+# GNU Libtool is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+
+PROGRAM=libtool
+PACKAGE=libtool
+VERSION="2.4.6 Debian-2.4.6-15build2"
+package_revision=2.4.6
+
+
+## ------ ##
+## Usage. ##
+## ------ ##
+
+# Run './libtool --help' for help with using this script from the
+# command line.
+
+
+## ------------------------------- ##
+## User overridable command paths. ##
+## ------------------------------- ##
+
+# After configure completes, it has a better idea of some of the
+# shell tools we need than the defaults used by the functions shared
+# with bootstrap, so set those here where they can still be over-
+# ridden by the user, but otherwise take precedence.
+
+: ${AUTOCONF="autoconf"}
+: ${AUTOMAKE="automake"}
+
+
+## -------------------------- ##
+## Source external libraries. ##
+## -------------------------- ##
+
+# Much of our low-level functionality needs to be sourced from external
+# libraries, which are installed to $pkgauxdir.
+
+# Set a version string for this script.
+scriptversion=2015-01-20.17; # UTC
+
+# General shell script boiler plate, and helper functions.
+# Written by Gary V. Vaughan, 2004
+
+# Copyright (C) 2004-2015 Free Software Foundation, Inc.
+# This is free software; see the source for copying conditions. There is NO
+# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# As a special exception to the GNU General Public License, if you distribute
+# this file as part of a program or library that is built using GNU Libtool,
+# you may include this file under the same distribution terms that you use
+# for the rest of that program.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNES FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Please report bugs or propose patches to gary@gnu.org.
+
+
+## ------ ##
+## Usage. ##
+## ------ ##
+
+# Evaluate this file near the top of your script to gain access to
+# the functions and variables defined here:
+#
+# . `echo "$0" | ${SED-sed} 's|[^/]*$||'`/build-aux/funclib.sh
+#
+# If you need to override any of the default environment variable
+# settings, do that before evaluating this file.
+
+
+## -------------------- ##
+## Shell normalisation. ##
+## -------------------- ##
+
+# Some shells need a little help to be as Bourne compatible as possible.
+# Before doing anything else, make sure all that help has been provided!
+
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
+ emulate sh
+ NULLCMD=:
+ # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac
+fi
+
+# NLS nuisances: We save the old values in case they are required later.
+_G_user_locale=
+_G_safe_locale=
+for _G_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
+do
+ eval "if test set = \"\${$_G_var+set}\"; then
+ save_$_G_var=\$$_G_var
+ $_G_var=C
+ export $_G_var
+ _G_user_locale=\"$_G_var=\\\$save_\$_G_var; \$_G_user_locale\"
+ _G_safe_locale=\"$_G_var=C; \$_G_safe_locale\"
+ fi"
+done
+
+# CDPATH.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+# Make sure IFS has a sensible default
+sp=' '
+nl='
+'
+IFS="$sp $nl"
+
+# There are apparently some retarded systems that use ';' as a PATH separator!
+if test "${PATH_SEPARATOR+set}" != set; then
+ PATH_SEPARATOR=:
+ (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+ (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+ PATH_SEPARATOR=';'
+ }
+fi
+
+
+
+## ------------------------- ##
+## Locate command utilities. ##
+## ------------------------- ##
+
+
+# func_executable_p FILE
+# ----------------------
+# Check that FILE is an executable regular file.
+func_executable_p ()
+{
+ test -f "$1" && test -x "$1"
+}
+
+
+# func_path_progs PROGS_LIST CHECK_FUNC [PATH]
+# --------------------------------------------
+# Search for either a program that responds to --version with output
+# containing "GNU", or else returned by CHECK_FUNC otherwise, by
+# trying all the directories in PATH with each of the elements of
+# PROGS_LIST.
+#
+# CHECK_FUNC should accept the path to a candidate program, and
+# set $func_check_prog_result if it truncates its output less than
+# $_G_path_prog_max characters.
+func_path_progs ()
+{
+ _G_progs_list=$1
+ _G_check_func=$2
+ _G_PATH=${3-"$PATH"}
+
+ _G_path_prog_max=0
+ _G_path_prog_found=false
+ _G_save_IFS=$IFS; IFS=${PATH_SEPARATOR-:}
+ for _G_dir in $_G_PATH; do
+ IFS=$_G_save_IFS
+ test -z "$_G_dir" && _G_dir=.
+ for _G_prog_name in $_G_progs_list; do
+ for _exeext in '' .EXE; do
+ _G_path_prog=$_G_dir/$_G_prog_name$_exeext
+ func_executable_p "$_G_path_prog" || continue
+ case `"$_G_path_prog" --version 2>&1` in
+ *GNU*) func_path_progs_result=$_G_path_prog _G_path_prog_found=: ;;
+ *) $_G_check_func $_G_path_prog
+ func_path_progs_result=$func_check_prog_result
+ ;;
+ esac
+ $_G_path_prog_found && break 3
+ done
+ done
+ done
+ IFS=$_G_save_IFS
+ test -z "$func_path_progs_result" && {
+ echo "no acceptable sed could be found in \$PATH" >&2
+ exit 1
+ }
+}
+
+
+# We want to be able to use the functions in this file before configure
+# has figured out where the best binaries are kept, which means we have
+# to search for them ourselves - except when the results are already set
+# where we skip the searches.
+
+# Unless the user overrides by setting SED, search the path for either GNU
+# sed, or the sed that truncates its output the least.
+test -z "$SED" && {
+ _G_sed_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
+ for _G_i in 1 2 3 4 5 6 7; do
+ _G_sed_script=$_G_sed_script$nl$_G_sed_script
+ done
+ echo "$_G_sed_script" 2>/dev/null | sed 99q >conftest.sed
+ _G_sed_script=
+
+ func_check_prog_sed ()
+ {
+ _G_path_prog=$1
+
+ _G_count=0
+ printf 0123456789 >conftest.in
+ while :
+ do
+ cat conftest.in conftest.in >conftest.tmp
+ mv conftest.tmp conftest.in
+ cp conftest.in conftest.nl
+ echo '' >> conftest.nl
+ "$_G_path_prog" -f conftest.sed <conftest.nl >conftest.out 2>/dev/null || break
+ diff conftest.out conftest.nl >/dev/null 2>&1 || break
+ _G_count=`expr $_G_count + 1`
+ if test "$_G_count" -gt "$_G_path_prog_max"; then
+ # Best one so far, save it but keep looking for a better one
+ func_check_prog_result=$_G_path_prog
+ _G_path_prog_max=$_G_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test 10 -lt "$_G_count" && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out
+ }
+
+ func_path_progs "sed gsed" func_check_prog_sed $PATH:/usr/xpg4/bin
+ rm -f conftest.sed
+ SED=$func_path_progs_result
+}
+
+
+# Unless the user overrides by setting GREP, search the path for either GNU
+# grep, or the grep that truncates its output the least.
+test -z "$GREP" && {
+ func_check_prog_grep ()
+ {
+ _G_path_prog=$1
+
+ _G_count=0
+ _G_path_prog_max=0
+ printf 0123456789 >conftest.in
+ while :
+ do
+ cat conftest.in conftest.in >conftest.tmp
+ mv conftest.tmp conftest.in
+ cp conftest.in conftest.nl
+ echo 'GREP' >> conftest.nl
+ "$_G_path_prog" -e 'GREP$' -e '-(cannot match)-' <conftest.nl >conftest.out 2>/dev/null || break
+ diff conftest.out conftest.nl >/dev/null 2>&1 || break
+ _G_count=`expr $_G_count + 1`
+ if test "$_G_count" -gt "$_G_path_prog_max"; then
+ # Best one so far, save it but keep looking for a better one
+ func_check_prog_result=$_G_path_prog
+ _G_path_prog_max=$_G_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test 10 -lt "$_G_count" && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out
+ }
+
+ func_path_progs "grep ggrep" func_check_prog_grep $PATH:/usr/xpg4/bin
+ GREP=$func_path_progs_result
+}
+
+
+## ------------------------------- ##
+## User overridable command paths. ##
+## ------------------------------- ##
+
+# All uppercase variable names are used for environment variables. These
+# variables can be overridden by the user before calling a script that
+# uses them if a suitable command of that name is not already available
+# in the command search PATH.
+
+: ${CP="cp -f"}
+: ${ECHO="printf %s\n"}
+: ${EGREP="$GREP -E"}
+: ${FGREP="$GREP -F"}
+: ${LN_S="ln -s"}
+: ${MAKE="make"}
+: ${MKDIR="mkdir"}
+: ${MV="mv -f"}
+: ${RM="rm -f"}
+: ${SHELL="${CONFIG_SHELL-/bin/sh}"}
+
+
+## -------------------- ##
+## Useful sed snippets. ##
+## -------------------- ##
+
+sed_dirname='s|/[^/]*$||'
+sed_basename='s|^.*/||'
+
+# Sed substitution that helps us do robust quoting. It backslashifies
+# metacharacters that are still active within double-quoted strings.
+sed_quote_subst='s|\([`"$\\]\)|\\\1|g'
+
+# Same as above, but do not quote variable references.
+sed_double_quote_subst='s/\(["`\\]\)/\\\1/g'
+
+# Sed substitution that turns a string into a regex matching for the
+# string literally.
+sed_make_literal_regex='s|[].[^$\\*\/]|\\&|g'
+
+# Sed substitution that converts a w32 file name or path
+# that contains forward slashes, into one that contains
+# (escaped) backslashes. A very naive implementation.
+sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g'
+
+# Re-'\' parameter expansions in output of sed_double_quote_subst that
+# were '\'-ed in input to the same. If an odd number of '\' preceded a
+# '$' in input to sed_double_quote_subst, that '$' was protected from
+# expansion. Since each input '\' is now two '\'s, look for any number
+# of runs of four '\'s followed by two '\'s and then a '$'. '\' that '$'.
+_G_bs='\\'
+_G_bs2='\\\\'
+_G_bs4='\\\\\\\\'
+_G_dollar='\$'
+sed_double_backslash="\
+ s/$_G_bs4/&\\
+/g
+ s/^$_G_bs2$_G_dollar/$_G_bs&/
+ s/\\([^$_G_bs]\\)$_G_bs2$_G_dollar/\\1$_G_bs2$_G_bs$_G_dollar/g
+ s/\n//g"
+
+
+## ----------------- ##
+## Global variables. ##
+## ----------------- ##
+
+# Except for the global variables explicitly listed below, the following
+# functions in the '^func_' namespace, and the '^require_' namespace
+# variables initialised in the 'Resource management' section, sourcing
+# this file will not pollute your global namespace with anything
+# else. There's no portable way to scope variables in Bourne shell
+# though, so actually running these functions will sometimes place
+# results into a variable named after the function, and often use
+# temporary variables in the '^_G_' namespace. If you are careful to
+# avoid using those namespaces casually in your sourcing script, things
+# should continue to work as you expect. And, of course, you can freely
+# overwrite any of the functions or variables defined here before
+# calling anything to customize them.
+
+EXIT_SUCCESS=0
+EXIT_FAILURE=1
+EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing.
+EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake.
+
+# Allow overriding, eg assuming that you follow the convention of
+# putting '$debug_cmd' at the start of all your functions, you can get
+# bash to show function call trace with:
+#
+# debug_cmd='echo "${FUNCNAME[0]} $*" >&2' bash your-script-name
+debug_cmd=${debug_cmd-":"}
+exit_cmd=:
+
+# By convention, finish your script with:
+#
+# exit $exit_status
+#
+# so that you can set exit_status to non-zero if you want to indicate
+# something went wrong during execution without actually bailing out at
+# the point of failure.
+exit_status=$EXIT_SUCCESS
+
+# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
+# is ksh but when the shell is invoked as "sh" and the current value of
+# the _XPG environment variable is not equal to 1 (one), the special
+# positional parameter $0, within a function call, is the name of the
+# function.
+progpath=$0
+
+# The name of this program.
+progname=`$ECHO "$progpath" |$SED "$sed_basename"`
+
+# Make sure we have an absolute progpath for reexecution:
+case $progpath in
+ [\\/]*|[A-Za-z]:\\*) ;;
+ *[\\/]*)
+ progdir=`$ECHO "$progpath" |$SED "$sed_dirname"`
+ progdir=`cd "$progdir" && pwd`
+ progpath=$progdir/$progname
+ ;;
+ *)
+ _G_IFS=$IFS
+ IFS=${PATH_SEPARATOR-:}
+ for progdir in $PATH; do
+ IFS=$_G_IFS
+ test -x "$progdir/$progname" && break
+ done
+ IFS=$_G_IFS
+ test -n "$progdir" || progdir=`pwd`
+ progpath=$progdir/$progname
+ ;;
+esac
+
+
+## ----------------- ##
+## Standard options. ##
+## ----------------- ##
+
+# The following options affect the operation of the functions defined
+# below, and should be set appropriately depending on run-time para-
+# meters passed on the command line.
+
+opt_dry_run=false
+opt_quiet=false
+opt_verbose=false
+
+# Categories 'all' and 'none' are always available. Append any others
+# you will pass as the first argument to func_warning from your own
+# code.
+warning_categories=
+
+# By default, display warnings according to 'opt_warning_types'. Set
+# 'warning_func' to ':' to elide all warnings, or func_fatal_error to
+# treat the next displayed warning as a fatal error.
+warning_func=func_warn_and_continue
+
+# Set to 'all' to display all warnings, 'none' to suppress all
+# warnings, or a space delimited list of some subset of
+# 'warning_categories' to display only the listed warnings.
+opt_warning_types=all
+
+
+## -------------------- ##
+## Resource management. ##
+## -------------------- ##
+
+# This section contains definitions for functions that each ensure a
+# particular resource (a file, or a non-empty configuration variable for
+# example) is available, and if appropriate to extract default values
+# from pertinent package files. Call them using their associated
+# 'require_*' variable to ensure that they are executed, at most, once.
+#
+# It's entirely deliberate that calling these functions can set
+# variables that don't obey the namespace limitations obeyed by the rest
+# of this file, in order that that they be as useful as possible to
+# callers.
+
+
+# require_term_colors
+# -------------------
+# Allow display of bold text on terminals that support it.
+require_term_colors=func_require_term_colors
+func_require_term_colors ()
+{
+ $debug_cmd
+
+ test -t 1 && {
+ # COLORTERM and USE_ANSI_COLORS environment variables take
+ # precedence, because most terminfo databases neglect to describe
+ # whether color sequences are supported.
+ test -n "${COLORTERM+set}" && : ${USE_ANSI_COLORS="1"}
+
+ if test 1 = "$USE_ANSI_COLORS"; then
+ # Standard ANSI escape sequences
+ tc_reset=''
+ tc_bold=''; tc_standout=''
+ tc_red=''; tc_green=''
+ tc_blue=''; tc_cyan=''
+ else
+ # Otherwise trust the terminfo database after all.
+ test -n "`tput sgr0 2>/dev/null`" && {
+ tc_reset=`tput sgr0`
+ test -n "`tput bold 2>/dev/null`" && tc_bold=`tput bold`
+ tc_standout=$tc_bold
+ test -n "`tput smso 2>/dev/null`" && tc_standout=`tput smso`
+ test -n "`tput setaf 1 2>/dev/null`" && tc_red=`tput setaf 1`
+ test -n "`tput setaf 2 2>/dev/null`" && tc_green=`tput setaf 2`
+ test -n "`tput setaf 4 2>/dev/null`" && tc_blue=`tput setaf 4`
+ test -n "`tput setaf 5 2>/dev/null`" && tc_cyan=`tput setaf 5`
+ }
+ fi
+ }
+
+ require_term_colors=:
+}
+
+
+## ----------------- ##
+## Function library. ##
+## ----------------- ##
+
+# This section contains a variety of useful functions to call in your
+# scripts. Take note of the portable wrappers for features provided by
+# some modern shells, which will fall back to slower equivalents on
+# less featureful shells.
+
+
+# func_append VAR VALUE
+# ---------------------
+# Append VALUE onto the existing contents of VAR.
+
+ # We should try to minimise forks, especially on Windows where they are
+ # unreasonably slow, so skip the feature probes when bash or zsh are
+ # being used:
+ if test set = "${BASH_VERSION+set}${ZSH_VERSION+set}"; then
+ : ${_G_HAVE_ARITH_OP="yes"}
+ : ${_G_HAVE_XSI_OPS="yes"}
+ # The += operator was introduced in bash 3.1
+ case $BASH_VERSION in
+ [12].* | 3.0 | 3.0*) ;;
+ *)
+ : ${_G_HAVE_PLUSEQ_OP="yes"}
+ ;;
+ esac
+ fi
+
+ # _G_HAVE_PLUSEQ_OP
+ # Can be empty, in which case the shell is probed, "yes" if += is
+ # useable or anything else if it does not work.
+ test -z "$_G_HAVE_PLUSEQ_OP" \
+ && (eval 'x=a; x+=" b"; test "a b" = "$x"') 2>/dev/null \
+ && _G_HAVE_PLUSEQ_OP=yes
+
+if test yes = "$_G_HAVE_PLUSEQ_OP"
+then
+ # This is an XSI compatible shell, allowing a faster implementation...
+ eval 'func_append ()
+ {
+ $debug_cmd
+
+ eval "$1+=\$2"
+ }'
+else
+ # ...otherwise fall back to using expr, which is often a shell builtin.
+ func_append ()
+ {
+ $debug_cmd
+
+ eval "$1=\$$1\$2"
+ }
+fi
+
+
+# func_append_quoted VAR VALUE
+# ----------------------------
+# Quote VALUE and append to the end of shell variable VAR, separated
+# by a space.
+if test yes = "$_G_HAVE_PLUSEQ_OP"; then
+ eval 'func_append_quoted ()
+ {
+ $debug_cmd
+
+ func_quote_for_eval "$2"
+ eval "$1+=\\ \$func_quote_for_eval_result"
+ }'
+else
+ func_append_quoted ()
+ {
+ $debug_cmd
+
+ func_quote_for_eval "$2"
+ eval "$1=\$$1\\ \$func_quote_for_eval_result"
+ }
+fi
+
+
+# func_append_uniq VAR VALUE
+# --------------------------
+# Append unique VALUE onto the existing contents of VAR, assuming
+# entries are delimited by the first character of VALUE. For example:
+#
+# func_append_uniq options " --another-option option-argument"
+#
+# will only append to $options if " --another-option option-argument "
+# is not already present somewhere in $options already (note spaces at
+# each end implied by leading space in second argument).
+func_append_uniq ()
+{
+ $debug_cmd
+
+ eval _G_current_value='`$ECHO $'$1'`'
+ _G_delim=`expr "$2" : '\(.\)'`
+
+ case $_G_delim$_G_current_value$_G_delim in
+ *"$2$_G_delim"*) ;;
+ *) func_append "$@" ;;
+ esac
+}
+
+
+# func_arith TERM...
+# ------------------
+# Set func_arith_result to the result of evaluating TERMs.
+ test -z "$_G_HAVE_ARITH_OP" \
+ && (eval 'test 2 = $(( 1 + 1 ))') 2>/dev/null \
+ && _G_HAVE_ARITH_OP=yes
+
+if test yes = "$_G_HAVE_ARITH_OP"; then
+ eval 'func_arith ()
+ {
+ $debug_cmd
+
+ func_arith_result=$(( $* ))
+ }'
+else
+ func_arith ()
+ {
+ $debug_cmd
+
+ func_arith_result=`expr "$@"`
+ }
+fi
+
+
+# func_basename FILE
+# ------------------
+# Set func_basename_result to FILE with everything up to and including
+# the last / stripped.
+if test yes = "$_G_HAVE_XSI_OPS"; then
+ # If this shell supports suffix pattern removal, then use it to avoid
+ # forking. Hide the definitions single quotes in case the shell chokes
+ # on unsupported syntax...
+ _b='func_basename_result=${1##*/}'
+ _d='case $1 in
+ */*) func_dirname_result=${1%/*}$2 ;;
+ * ) func_dirname_result=$3 ;;
+ esac'
+
+else
+ # ...otherwise fall back to using sed.
+ _b='func_basename_result=`$ECHO "$1" |$SED "$sed_basename"`'
+ _d='func_dirname_result=`$ECHO "$1" |$SED "$sed_dirname"`
+ if test "X$func_dirname_result" = "X$1"; then
+ func_dirname_result=$3
+ else
+ func_append func_dirname_result "$2"
+ fi'
+fi
+
+eval 'func_basename ()
+{
+ $debug_cmd
+
+ '"$_b"'
+}'
+
+
+# func_dirname FILE APPEND NONDIR_REPLACEMENT
+# -------------------------------------------
+# Compute the dirname of FILE. If nonempty, add APPEND to the result,
+# otherwise set result to NONDIR_REPLACEMENT.
+eval 'func_dirname ()
+{
+ $debug_cmd
+
+ '"$_d"'
+}'
+
+
+# func_dirname_and_basename FILE APPEND NONDIR_REPLACEMENT
+# --------------------------------------------------------
+# Perform func_basename and func_dirname in a single function
+# call:
+# dirname: Compute the dirname of FILE. If nonempty,
+# add APPEND to the result, otherwise set result
+# to NONDIR_REPLACEMENT.
+# value returned in "$func_dirname_result"
+# basename: Compute filename of FILE.
+# value retuned in "$func_basename_result"
+# For efficiency, we do not delegate to the functions above but instead
+# duplicate the functionality here.
+eval 'func_dirname_and_basename ()
+{
+ $debug_cmd
+
+ '"$_b"'
+ '"$_d"'
+}'
+
+
+# func_echo ARG...
+# ----------------
+# Echo program name prefixed message.
+func_echo ()
+{
+ $debug_cmd
+
+ _G_message=$*
+
+ func_echo_IFS=$IFS
+ IFS=$nl
+ for _G_line in $_G_message; do
+ IFS=$func_echo_IFS
+ $ECHO "$progname: $_G_line"
+ done
+ IFS=$func_echo_IFS
+}
+
+
+# func_echo_all ARG...
+# --------------------
+# Invoke $ECHO with all args, space-separated.
+func_echo_all ()
+{
+ $ECHO "$*"
+}
+
+
+# func_echo_infix_1 INFIX ARG...
+# ------------------------------
+# Echo program name, followed by INFIX on the first line, with any
+# additional lines not showing INFIX.
+func_echo_infix_1 ()
+{
+ $debug_cmd
+
+ $require_term_colors
+
+ _G_infix=$1; shift
+ _G_indent=$_G_infix
+ _G_prefix="$progname: $_G_infix: "
+ _G_message=$*
+
+ # Strip color escape sequences before counting printable length
+ for _G_tc in "$tc_reset" "$tc_bold" "$tc_standout" "$tc_red" "$tc_green" "$tc_blue" "$tc_cyan"
+ do
+ test -n "$_G_tc" && {
+ _G_esc_tc=`$ECHO "$_G_tc" | $SED "$sed_make_literal_regex"`
+ _G_indent=`$ECHO "$_G_indent" | $SED "s|$_G_esc_tc||g"`
+ }
+ done
+ _G_indent="$progname: "`echo "$_G_indent" | $SED 's|.| |g'`" " ## exclude from sc_prohibit_nested_quotes
+
+ func_echo_infix_1_IFS=$IFS
+ IFS=$nl
+ for _G_line in $_G_message; do
+ IFS=$func_echo_infix_1_IFS
+ $ECHO "$_G_prefix$tc_bold$_G_line$tc_reset" >&2
+ _G_prefix=$_G_indent
+ done
+ IFS=$func_echo_infix_1_IFS
+}
+
+
+# func_error ARG...
+# -----------------
+# Echo program name prefixed message to standard error.
+func_error ()
+{
+ $debug_cmd
+
+ $require_term_colors
+
+ func_echo_infix_1 " $tc_standout${tc_red}error$tc_reset" "$*" >&2
+}
+
+
+# func_fatal_error ARG...
+# -----------------------
+# Echo program name prefixed message to standard error, and exit.
+func_fatal_error ()
+{
+ $debug_cmd
+
+ func_error "$*"
+ exit $EXIT_FAILURE
+}
+
+
+# func_grep EXPRESSION FILENAME
+# -----------------------------
+# Check whether EXPRESSION matches any line of FILENAME, without output.
+func_grep ()
+{
+ $debug_cmd
+
+ $GREP "$1" "$2" >/dev/null 2>&1
+}
+
+
+# func_len STRING
+# ---------------
+# Set func_len_result to the length of STRING. STRING may not
+# start with a hyphen.
+ test -z "$_G_HAVE_XSI_OPS" \
+ && (eval 'x=a/b/c;
+ test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \
+ && _G_HAVE_XSI_OPS=yes
+
+if test yes = "$_G_HAVE_XSI_OPS"; then
+ eval 'func_len ()
+ {
+ $debug_cmd
+
+ func_len_result=${#1}
+ }'
+else
+ func_len ()
+ {
+ $debug_cmd
+
+ func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len`
+ }
+fi
+
+
+# func_mkdir_p DIRECTORY-PATH
+# ---------------------------
+# Make sure the entire path to DIRECTORY-PATH is available.
+func_mkdir_p ()
+{
+ $debug_cmd
+
+ _G_directory_path=$1
+ _G_dir_list=
+
+ if test -n "$_G_directory_path" && test : != "$opt_dry_run"; then
+
+ # Protect directory names starting with '-'
+ case $_G_directory_path in
+ -*) _G_directory_path=./$_G_directory_path ;;
+ esac
+
+ # While some portion of DIR does not yet exist...
+ while test ! -d "$_G_directory_path"; do
+ # ...make a list in topmost first order. Use a colon delimited
+ # list incase some portion of path contains whitespace.
+ _G_dir_list=$_G_directory_path:$_G_dir_list
+
+ # If the last portion added has no slash in it, the list is done
+ case $_G_directory_path in */*) ;; *) break ;; esac
+
+ # ...otherwise throw away the child directory and loop
+ _G_directory_path=`$ECHO "$_G_directory_path" | $SED -e "$sed_dirname"`
+ done
+ _G_dir_list=`$ECHO "$_G_dir_list" | $SED 's|:*$||'`
+
+ func_mkdir_p_IFS=$IFS; IFS=:
+ for _G_dir in $_G_dir_list; do
+ IFS=$func_mkdir_p_IFS
+ # mkdir can fail with a 'File exist' error if two processes
+ # try to create one of the directories concurrently. Don't
+ # stop in that case!
+ $MKDIR "$_G_dir" 2>/dev/null || :
+ done
+ IFS=$func_mkdir_p_IFS
+
+ # Bail out if we (or some other process) failed to create a directory.
+ test -d "$_G_directory_path" || \
+ func_fatal_error "Failed to create '$1'"
+ fi
+}
+
+
+# func_mktempdir [BASENAME]
+# -------------------------
+# Make a temporary directory that won't clash with other running
+# libtool processes, and avoids race conditions if possible. If
+# given, BASENAME is the basename for that directory.
+func_mktempdir ()
+{
+ $debug_cmd
+
+ _G_template=${TMPDIR-/tmp}/${1-$progname}
+
+ if test : = "$opt_dry_run"; then
+ # Return a directory name, but don't create it in dry-run mode
+ _G_tmpdir=$_G_template-$$
+ else
+
+ # If mktemp works, use that first and foremost
+ _G_tmpdir=`mktemp -d "$_G_template-XXXXXXXX" 2>/dev/null`
+
+ if test ! -d "$_G_tmpdir"; then
+ # Failing that, at least try and use $RANDOM to avoid a race
+ _G_tmpdir=$_G_template-${RANDOM-0}$$
+
+ func_mktempdir_umask=`umask`
+ umask 0077
+ $MKDIR "$_G_tmpdir"
+ umask $func_mktempdir_umask
+ fi
+
+ # If we're not in dry-run mode, bomb out on failure
+ test -d "$_G_tmpdir" || \
+ func_fatal_error "cannot create temporary directory '$_G_tmpdir'"
+ fi
+
+ $ECHO "$_G_tmpdir"
+}
+
+
+# func_normal_abspath PATH
+# ------------------------
+# Remove doubled-up and trailing slashes, "." path components,
+# and cancel out any ".." path components in PATH after making
+# it an absolute path.
+func_normal_abspath ()
+{
+ $debug_cmd
+
+ # These SED scripts presuppose an absolute path with a trailing slash.
+ _G_pathcar='s|^/\([^/]*\).*$|\1|'
+ _G_pathcdr='s|^/[^/]*||'
+ _G_removedotparts=':dotsl
+ s|/\./|/|g
+ t dotsl
+ s|/\.$|/|'
+ _G_collapseslashes='s|/\{1,\}|/|g'
+ _G_finalslash='s|/*$|/|'
+
+ # Start from root dir and reassemble the path.
+ func_normal_abspath_result=
+ func_normal_abspath_tpath=$1
+ func_normal_abspath_altnamespace=
+ case $func_normal_abspath_tpath in
+ "")
+ # Empty path, that just means $cwd.
+ func_stripname '' '/' "`pwd`"
+ func_normal_abspath_result=$func_stripname_result
+ return
+ ;;
+ # The next three entries are used to spot a run of precisely
+ # two leading slashes without using negated character classes;
+ # we take advantage of case's first-match behaviour.
+ ///*)
+ # Unusual form of absolute path, do nothing.
+ ;;
+ //*)
+ # Not necessarily an ordinary path; POSIX reserves leading '//'
+ # and for example Cygwin uses it to access remote file shares
+ # over CIFS/SMB, so we conserve a leading double slash if found.
+ func_normal_abspath_altnamespace=/
+ ;;
+ /*)
+ # Absolute path, do nothing.
+ ;;
+ *)
+ # Relative path, prepend $cwd.
+ func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath
+ ;;
+ esac
+
+ # Cancel out all the simple stuff to save iterations. We also want
+ # the path to end with a slash for ease of parsing, so make sure
+ # there is one (and only one) here.
+ func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \
+ -e "$_G_removedotparts" -e "$_G_collapseslashes" -e "$_G_finalslash"`
+ while :; do
+ # Processed it all yet?
+ if test / = "$func_normal_abspath_tpath"; then
+ # If we ascended to the root using ".." the result may be empty now.
+ if test -z "$func_normal_abspath_result"; then
+ func_normal_abspath_result=/
+ fi
+ break
+ fi
+ func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \
+ -e "$_G_pathcar"`
+ func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \
+ -e "$_G_pathcdr"`
+ # Figure out what to do with it
+ case $func_normal_abspath_tcomponent in
+ "")
+ # Trailing empty path component, ignore it.
+ ;;
+ ..)
+ # Parent dir; strip last assembled component from result.
+ func_dirname "$func_normal_abspath_result"
+ func_normal_abspath_result=$func_dirname_result
+ ;;
+ *)
+ # Actual path component, append it.
+ func_append func_normal_abspath_result "/$func_normal_abspath_tcomponent"
+ ;;
+ esac
+ done
+ # Restore leading double-slash if one was found on entry.
+ func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result
+}
+
+
+# func_notquiet ARG...
+# --------------------
+# Echo program name prefixed message only when not in quiet mode.
+func_notquiet ()
+{
+ $debug_cmd
+
+ $opt_quiet || func_echo ${1+"$@"}
+
+ # A bug in bash halts the script if the last line of a function
+ # fails when set -e is in force, so we need another command to
+ # work around that:
+ :
+}
+
+
+# func_relative_path SRCDIR DSTDIR
+# --------------------------------
+# Set func_relative_path_result to the relative path from SRCDIR to DSTDIR.
+func_relative_path ()
+{
+ $debug_cmd
+
+ func_relative_path_result=
+ func_normal_abspath "$1"
+ func_relative_path_tlibdir=$func_normal_abspath_result
+ func_normal_abspath "$2"
+ func_relative_path_tbindir=$func_normal_abspath_result
+
+ # Ascend the tree starting from libdir
+ while :; do
+ # check if we have found a prefix of bindir
+ case $func_relative_path_tbindir in
+ $func_relative_path_tlibdir)
+ # found an exact match
+ func_relative_path_tcancelled=
+ break
+ ;;
+ $func_relative_path_tlibdir*)
+ # found a matching prefix
+ func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir"
+ func_relative_path_tcancelled=$func_stripname_result
+ if test -z "$func_relative_path_result"; then
+ func_relative_path_result=.
+ fi
+ break
+ ;;
+ *)
+ func_dirname $func_relative_path_tlibdir
+ func_relative_path_tlibdir=$func_dirname_result
+ if test -z "$func_relative_path_tlibdir"; then
+ # Have to descend all the way to the root!
+ func_relative_path_result=../$func_relative_path_result
+ func_relative_path_tcancelled=$func_relative_path_tbindir
+ break
+ fi
+ func_relative_path_result=../$func_relative_path_result
+ ;;
+ esac
+ done
+
+ # Now calculate path; take care to avoid doubling-up slashes.
+ func_stripname '' '/' "$func_relative_path_result"
+ func_relative_path_result=$func_stripname_result
+ func_stripname '/' '/' "$func_relative_path_tcancelled"
+ if test -n "$func_stripname_result"; then
+ func_append func_relative_path_result "/$func_stripname_result"
+ fi
+
+ # Normalisation. If bindir is libdir, return '.' else relative path.
+ if test -n "$func_relative_path_result"; then
+ func_stripname './' '' "$func_relative_path_result"
+ func_relative_path_result=$func_stripname_result
+ fi
+
+ test -n "$func_relative_path_result" || func_relative_path_result=.
+
+ :
+}
+
+
+# func_quote_for_eval ARG...
+# --------------------------
+# Aesthetically quote ARGs to be evaled later.
+# This function returns two values:
+# i) func_quote_for_eval_result
+# double-quoted, suitable for a subsequent eval
+# ii) func_quote_for_eval_unquoted_result
+# has all characters that are still active within double
+# quotes backslashified.
+func_quote_for_eval ()
+{
+ $debug_cmd
+
+ func_quote_for_eval_unquoted_result=
+ func_quote_for_eval_result=
+ while test 0 -lt $#; do
+ case $1 in
+ *[\\\`\"\$]*)
+ _G_unquoted_arg=`printf '%s\n' "$1" |$SED "$sed_quote_subst"` ;;
+ *)
+ _G_unquoted_arg=$1 ;;
+ esac
+ if test -n "$func_quote_for_eval_unquoted_result"; then
+ func_append func_quote_for_eval_unquoted_result " $_G_unquoted_arg"
+ else
+ func_append func_quote_for_eval_unquoted_result "$_G_unquoted_arg"
+ fi
+
+ case $_G_unquoted_arg in
+ # Double-quote args containing shell metacharacters to delay
+ # word splitting, command substitution and variable expansion
+ # for a subsequent eval.
+ # Many Bourne shells cannot handle close brackets correctly
+ # in scan sets, so we specify it separately.
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
+ _G_quoted_arg=\"$_G_unquoted_arg\"
+ ;;
+ *)
+ _G_quoted_arg=$_G_unquoted_arg
+ ;;
+ esac
+
+ if test -n "$func_quote_for_eval_result"; then
+ func_append func_quote_for_eval_result " $_G_quoted_arg"
+ else
+ func_append func_quote_for_eval_result "$_G_quoted_arg"
+ fi
+ shift
+ done
+}
+
+
+# func_quote_for_expand ARG
+# -------------------------
+# Aesthetically quote ARG to be evaled later; same as above,
+# but do not quote variable references.
+func_quote_for_expand ()
+{
+ $debug_cmd
+
+ case $1 in
+ *[\\\`\"]*)
+ _G_arg=`$ECHO "$1" | $SED \
+ -e "$sed_double_quote_subst" -e "$sed_double_backslash"` ;;
+ *)
+ _G_arg=$1 ;;
+ esac
+
+ case $_G_arg in
+ # Double-quote args containing shell metacharacters to delay
+ # word splitting and command substitution for a subsequent eval.
+ # Many Bourne shells cannot handle close brackets correctly
+ # in scan sets, so we specify it separately.
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
+ _G_arg=\"$_G_arg\"
+ ;;
+ esac
+
+ func_quote_for_expand_result=$_G_arg
+}
+
+
+# func_stripname PREFIX SUFFIX NAME
+# ---------------------------------
+# strip PREFIX and SUFFIX from NAME, and store in func_stripname_result.
+# PREFIX and SUFFIX must not contain globbing or regex special
+# characters, hashes, percent signs, but SUFFIX may contain a leading
+# dot (in which case that matches only a dot).
+if test yes = "$_G_HAVE_XSI_OPS"; then
+ eval 'func_stripname ()
+ {
+ $debug_cmd
+
+ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
+ # positional parameters, so assign one to ordinary variable first.
+ func_stripname_result=$3
+ func_stripname_result=${func_stripname_result#"$1"}
+ func_stripname_result=${func_stripname_result%"$2"}
+ }'
+else
+ func_stripname ()
+ {
+ $debug_cmd
+
+ case $2 in
+ .*) func_stripname_result=`$ECHO "$3" | $SED -e "s%^$1%%" -e "s%\\\\$2\$%%"`;;
+ *) func_stripname_result=`$ECHO "$3" | $SED -e "s%^$1%%" -e "s%$2\$%%"`;;
+ esac
+ }
+fi
+
+
+# func_show_eval CMD [FAIL_EXP]
+# -----------------------------
+# Unless opt_quiet is true, then output CMD. Then, if opt_dryrun is
+# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP
+# is given, then evaluate it.
+func_show_eval ()
+{
+ $debug_cmd
+
+ _G_cmd=$1
+ _G_fail_exp=${2-':'}
+
+ func_quote_for_expand "$_G_cmd"
+ eval "func_notquiet $func_quote_for_expand_result"
+
+ $opt_dry_run || {
+ eval "$_G_cmd"
+ _G_status=$?
+ if test 0 -ne "$_G_status"; then
+ eval "(exit $_G_status); $_G_fail_exp"
+ fi
+ }
+}
+
+
+# func_show_eval_locale CMD [FAIL_EXP]
+# ------------------------------------
+# Unless opt_quiet is true, then output CMD. Then, if opt_dryrun is
+# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP
+# is given, then evaluate it. Use the saved locale for evaluation.
+func_show_eval_locale ()
+{
+ $debug_cmd
+
+ _G_cmd=$1
+ _G_fail_exp=${2-':'}
+
+ $opt_quiet || {
+ func_quote_for_expand "$_G_cmd"
+ eval "func_echo $func_quote_for_expand_result"
+ }
+
+ $opt_dry_run || {
+ eval "$_G_user_locale
+ $_G_cmd"
+ _G_status=$?
+ eval "$_G_safe_locale"
+ if test 0 -ne "$_G_status"; then
+ eval "(exit $_G_status); $_G_fail_exp"
+ fi
+ }
+}
+
+
+# func_tr_sh
+# ----------
+# Turn $1 into a string suitable for a shell variable name.
+# Result is stored in $func_tr_sh_result. All characters
+# not in the set a-zA-Z0-9_ are replaced with '_'. Further,
+# if $1 begins with a digit, a '_' is prepended as well.
+func_tr_sh ()
+{
+ $debug_cmd
+
+ case $1 in
+ [0-9]* | *[!a-zA-Z0-9_]*)
+ func_tr_sh_result=`$ECHO "$1" | $SED -e 's/^\([0-9]\)/_\1/' -e 's/[^a-zA-Z0-9_]/_/g'`
+ ;;
+ * )
+ func_tr_sh_result=$1
+ ;;
+ esac
+}
+
+
+# func_verbose ARG...
+# -------------------
+# Echo program name prefixed message in verbose mode only.
+func_verbose ()
+{
+ $debug_cmd
+
+ $opt_verbose && func_echo "$*"
+
+ :
+}
+
+
+# func_warn_and_continue ARG...
+# -----------------------------
+# Echo program name prefixed warning message to standard error.
+func_warn_and_continue ()
+{
+ $debug_cmd
+
+ $require_term_colors
+
+ func_echo_infix_1 "${tc_red}warning$tc_reset" "$*" >&2
+}
+
+
+# func_warning CATEGORY ARG...
+# ----------------------------
+# Echo program name prefixed warning message to standard error. Warning
+# messages can be filtered according to CATEGORY, where this function
+# elides messages where CATEGORY is not listed in the global variable
+# 'opt_warning_types'.
+func_warning ()
+{
+ $debug_cmd
+
+ # CATEGORY must be in the warning_categories list!
+ case " $warning_categories " in
+ *" $1 "*) ;;
+ *) func_internal_error "invalid warning category '$1'" ;;
+ esac
+
+ _G_category=$1
+ shift
+
+ case " $opt_warning_types " in
+ *" $_G_category "*) $warning_func ${1+"$@"} ;;
+ esac
+}
+
+
+# func_sort_ver VER1 VER2
+# -----------------------
+# 'sort -V' is not generally available.
+# Note this deviates from the version comparison in automake
+# in that it treats 1.5 < 1.5.0, and treats 1.4.4a < 1.4-p3a
+# but this should suffice as we won't be specifying old
+# version formats or redundant trailing .0 in bootstrap.conf.
+# If we did want full compatibility then we should probably
+# use m4_version_compare from autoconf.
+func_sort_ver ()
+{
+ $debug_cmd
+
+ printf '%s\n%s\n' "$1" "$2" \
+ | sort -t. -k 1,1n -k 2,2n -k 3,3n -k 4,4n -k 5,5n -k 6,6n -k 7,7n -k 8,8n -k 9,9n
+}
+
+# func_lt_ver PREV CURR
+# ---------------------
+# Return true if PREV and CURR are in the correct order according to
+# func_sort_ver, otherwise false. Use it like this:
+#
+# func_lt_ver "$prev_ver" "$proposed_ver" || func_fatal_error "..."
+func_lt_ver ()
+{
+ $debug_cmd
+
+ test "x$1" = x`func_sort_ver "$1" "$2" | $SED 1q`
+}
+
+
+# Local variables:
+# mode: shell-script
+# sh-indentation: 2
+# eval: (add-hook 'before-save-hook 'time-stamp)
+# time-stamp-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC"
+# time-stamp-time-zone: "UTC"
+# End:
+#! /bin/sh
+
+# Set a version string for this script.
+scriptversion=2015-10-07.11; # UTC
+
+# A portable, pluggable option parser for Bourne shell.
+# Written by Gary V. Vaughan, 2010
+
+# Copyright (C) 2010-2015 Free Software Foundation, Inc.
+# This is free software; see the source for copying conditions. There is NO
+# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Please report bugs or propose patches to gary@gnu.org.
+
+
+## ------ ##
+## Usage. ##
+## ------ ##
+
+# This file is a library for parsing options in your shell scripts along
+# with assorted other useful supporting features that you can make use
+# of too.
+#
+# For the simplest scripts you might need only:
+#
+# #!/bin/sh
+# . relative/path/to/funclib.sh
+# . relative/path/to/options-parser
+# scriptversion=1.0
+# func_options ${1+"$@"}
+# eval set dummy "$func_options_result"; shift
+# ...rest of your script...
+#
+# In order for the '--version' option to work, you will need to have a
+# suitably formatted comment like the one at the top of this file
+# starting with '# Written by ' and ending with '# warranty; '.
+#
+# For '-h' and '--help' to work, you will also need a one line
+# description of your script's purpose in a comment directly above the
+# '# Written by ' line, like the one at the top of this file.
+#
+# The default options also support '--debug', which will turn on shell
+# execution tracing (see the comment above debug_cmd below for another
+# use), and '--verbose' and the func_verbose function to allow your script
+# to display verbose messages only when your user has specified
+# '--verbose'.
+#
+# After sourcing this file, you can plug processing for additional
+# options by amending the variables from the 'Configuration' section
+# below, and following the instructions in the 'Option parsing'
+# section further down.
+
+## -------------- ##
+## Configuration. ##
+## -------------- ##
+
+# You should override these variables in your script after sourcing this
+# file so that they reflect the customisations you have added to the
+# option parser.
+
+# The usage line for option parsing errors and the start of '-h' and
+# '--help' output messages. You can embed shell variables for delayed
+# expansion at the time the message is displayed, but you will need to
+# quote other shell meta-characters carefully to prevent them being
+# expanded when the contents are evaled.
+usage='$progpath [OPTION]...'
+
+# Short help message in response to '-h' and '--help'. Add to this or
+# override it after sourcing this library to reflect the full set of
+# options your script accepts.
+usage_message="\
+ --debug enable verbose shell tracing
+ -W, --warnings=CATEGORY
+ report the warnings falling in CATEGORY [all]
+ -v, --verbose verbosely report processing
+ --version print version information and exit
+ -h, --help print short or long help message and exit
+"
+
+# Additional text appended to 'usage_message' in response to '--help'.
+long_help_message="
+Warning categories include:
+ 'all' show all warnings
+ 'none' turn off all the warnings
+ 'error' warnings are treated as fatal errors"
+
+# Help message printed before fatal option parsing errors.
+fatal_help="Try '\$progname --help' for more information."
+
+
+
+## ------------------------- ##
+## Hook function management. ##
+## ------------------------- ##
+
+# This section contains functions for adding, removing, and running hooks
+# to the main code. A hook is just a named list of of function, that can
+# be run in order later on.
+
+# func_hookable FUNC_NAME
+# -----------------------
+# Declare that FUNC_NAME will run hooks added with
+# 'func_add_hook FUNC_NAME ...'.
+func_hookable ()
+{
+ $debug_cmd
+
+ func_append hookable_fns " $1"
+}
+
+
+# func_add_hook FUNC_NAME HOOK_FUNC
+# ---------------------------------
+# Request that FUNC_NAME call HOOK_FUNC before it returns. FUNC_NAME must
+# first have been declared "hookable" by a call to 'func_hookable'.
+func_add_hook ()
+{
+ $debug_cmd
+
+ case " $hookable_fns " in
+ *" $1 "*) ;;
+ *) func_fatal_error "'$1' does not accept hook functions." ;;
+ esac
+
+ eval func_append ${1}_hooks '" $2"'
+}
+
+
+# func_remove_hook FUNC_NAME HOOK_FUNC
+# ------------------------------------
+# Remove HOOK_FUNC from the list of functions called by FUNC_NAME.
+func_remove_hook ()
+{
+ $debug_cmd
+
+ eval ${1}_hooks='`$ECHO "\$'$1'_hooks" |$SED "s| '$2'||"`'
+}
+
+
+# func_run_hooks FUNC_NAME [ARG]...
+# ---------------------------------
+# Run all hook functions registered to FUNC_NAME.
+# It is assumed that the list of hook functions contains nothing more
+# than a whitespace-delimited list of legal shell function names, and
+# no effort is wasted trying to catch shell meta-characters or preserve
+# whitespace.
+func_run_hooks ()
+{
+ $debug_cmd
+
+ _G_rc_run_hooks=false
+
+ case " $hookable_fns " in
+ *" $1 "*) ;;
+ *) func_fatal_error "'$1' does not support hook funcions.n" ;;
+ esac
+
+ eval _G_hook_fns=\$$1_hooks; shift
+
+ for _G_hook in $_G_hook_fns; do
+ if eval $_G_hook '"$@"'; then
+ # store returned options list back into positional
+ # parameters for next 'cmd' execution.
+ eval _G_hook_result=\$${_G_hook}_result
+ eval set dummy "$_G_hook_result"; shift
+ _G_rc_run_hooks=:
+ fi
+ done
+
+ $_G_rc_run_hooks && func_run_hooks_result=$_G_hook_result
+}
+
+
+
+## --------------- ##
+## Option parsing. ##
+## --------------- ##
+
+# In order to add your own option parsing hooks, you must accept the
+# full positional parameter list in your hook function, you may remove/edit
+# any options that you action, and then pass back the remaining unprocessed
+# options in '<hooked_function_name>_result', escaped suitably for
+# 'eval'. In this case you also must return $EXIT_SUCCESS to let the
+# hook's caller know that it should pay attention to
+# '<hooked_function_name>_result'. Returning $EXIT_FAILURE signalizes that
+# arguments are left untouched by the hook and therefore caller will ignore the
+# result variable.
+#
+# Like this:
+#
+# my_options_prep ()
+# {
+# $debug_cmd
+#
+# # Extend the existing usage message.
+# usage_message=$usage_message'
+# -s, --silent don'\''t print informational messages
+# '
+# # No change in '$@' (ignored completely by this hook). There is
+# # no need to do the equivalent (but slower) action:
+# # func_quote_for_eval ${1+"$@"}
+# # my_options_prep_result=$func_quote_for_eval_result
+# false
+# }
+# func_add_hook func_options_prep my_options_prep
+#
+#
+# my_silent_option ()
+# {
+# $debug_cmd
+#
+# args_changed=false
+#
+# # Note that for efficiency, we parse as many options as we can
+# # recognise in a loop before passing the remainder back to the
+# # caller on the first unrecognised argument we encounter.
+# while test $# -gt 0; do
+# opt=$1; shift
+# case $opt in
+# --silent|-s) opt_silent=:
+# args_changed=:
+# ;;
+# # Separate non-argument short options:
+# -s*) func_split_short_opt "$_G_opt"
+# set dummy "$func_split_short_opt_name" \
+# "-$func_split_short_opt_arg" ${1+"$@"}
+# shift
+# args_changed=:
+# ;;
+# *) # Make sure the first unrecognised option "$_G_opt"
+# # is added back to "$@", we could need that later
+# # if $args_changed is true.
+# set dummy "$_G_opt" ${1+"$@"}; shift; break ;;
+# esac
+# done
+#
+# if $args_changed; then
+# func_quote_for_eval ${1+"$@"}
+# my_silent_option_result=$func_quote_for_eval_result
+# fi
+#
+# $args_changed
+# }
+# func_add_hook func_parse_options my_silent_option
+#
+#
+# my_option_validation ()
+# {
+# $debug_cmd
+#
+# $opt_silent && $opt_verbose && func_fatal_help "\
+# '--silent' and '--verbose' options are mutually exclusive."
+#
+# false
+# }
+# func_add_hook func_validate_options my_option_validation
+#
+# You'll also need to manually amend $usage_message to reflect the extra
+# options you parse. It's preferable to append if you can, so that
+# multiple option parsing hooks can be added safely.
+
+
+# func_options_finish [ARG]...
+# ----------------------------
+# Finishing the option parse loop (call 'func_options' hooks ATM).
+func_options_finish ()
+{
+ $debug_cmd
+
+ _G_func_options_finish_exit=false
+ if func_run_hooks func_options ${1+"$@"}; then
+ func_options_finish_result=$func_run_hooks_result
+ _G_func_options_finish_exit=:
+ fi
+
+ $_G_func_options_finish_exit
+}
+
+
+# func_options [ARG]...
+# ---------------------
+# All the functions called inside func_options are hookable. See the
+# individual implementations for details.
+func_hookable func_options
+func_options ()
+{
+ $debug_cmd
+
+ _G_rc_options=false
+
+ for my_func in options_prep parse_options validate_options options_finish
+ do
+ if eval func_$my_func '${1+"$@"}'; then
+ eval _G_res_var='$'"func_${my_func}_result"
+ eval set dummy "$_G_res_var" ; shift
+ _G_rc_options=:
+ fi
+ done
+
+ # Save modified positional parameters for caller. As a top-level
+ # options-parser function we always need to set the 'func_options_result'
+ # variable (regardless the $_G_rc_options value).
+ if $_G_rc_options; then
+ func_options_result=$_G_res_var
+ else
+ func_quote_for_eval ${1+"$@"}
+ func_options_result=$func_quote_for_eval_result
+ fi
+
+ $_G_rc_options
+}
+
+
+# func_options_prep [ARG]...
+# --------------------------
+# All initialisations required before starting the option parse loop.
+# Note that when calling hook functions, we pass through the list of
+# positional parameters. If a hook function modifies that list, and
+# needs to propagate that back to rest of this script, then the complete
+# modified list must be put in 'func_run_hooks_result' before
+# returning $EXIT_SUCCESS (otherwise $EXIT_FAILURE is returned).
+func_hookable func_options_prep
+func_options_prep ()
+{
+ $debug_cmd
+
+ # Option defaults:
+ opt_verbose=false
+ opt_warning_types=
+
+ _G_rc_options_prep=false
+ if func_run_hooks func_options_prep ${1+"$@"}; then
+ _G_rc_options_prep=:
+ # save modified positional parameters for caller
+ func_options_prep_result=$func_run_hooks_result
+ fi
+
+ $_G_rc_options_prep
+}
+
+
+# func_parse_options [ARG]...
+# ---------------------------
+# The main option parsing loop.
+func_hookable func_parse_options
+func_parse_options ()
+{
+ $debug_cmd
+
+ func_parse_options_result=
+
+ _G_rc_parse_options=false
+ # this just eases exit handling
+ while test $# -gt 0; do
+ # Defer to hook functions for initial option parsing, so they
+ # get priority in the event of reusing an option name.
+ if func_run_hooks func_parse_options ${1+"$@"}; then
+ eval set dummy "$func_run_hooks_result"; shift
+ _G_rc_parse_options=:
+ fi
+
+ # Break out of the loop if we already parsed every option.
+ test $# -gt 0 || break
+
+ _G_match_parse_options=:
+ _G_opt=$1
+ shift
+ case $_G_opt in
+ --debug|-x) debug_cmd='set -x'
+ func_echo "enabling shell trace mode"
+ $debug_cmd
+ ;;
+
+ --no-warnings|--no-warning|--no-warn)
+ set dummy --warnings none ${1+"$@"}
+ shift
+ ;;
+
+ --warnings|--warning|-W)
+ if test $# = 0 && func_missing_arg $_G_opt; then
+ _G_rc_parse_options=:
+ break
+ fi
+ case " $warning_categories $1" in
+ *" $1 "*)
+ # trailing space prevents matching last $1 above
+ func_append_uniq opt_warning_types " $1"
+ ;;
+ *all)
+ opt_warning_types=$warning_categories
+ ;;
+ *none)
+ opt_warning_types=none
+ warning_func=:
+ ;;
+ *error)
+ opt_warning_types=$warning_categories
+ warning_func=func_fatal_error
+ ;;
+ *)
+ func_fatal_error \
+ "unsupported warning category: '$1'"
+ ;;
+ esac
+ shift
+ ;;
+
+ --verbose|-v) opt_verbose=: ;;
+ --version) func_version ;;
+ -\?|-h) func_usage ;;
+ --help) func_help ;;
+
+ # Separate optargs to long options (plugins may need this):
+ --*=*) func_split_equals "$_G_opt"
+ set dummy "$func_split_equals_lhs" \
+ "$func_split_equals_rhs" ${1+"$@"}
+ shift
+ ;;
+
+ # Separate optargs to short options:
+ -W*)
+ func_split_short_opt "$_G_opt"
+ set dummy "$func_split_short_opt_name" \
+ "$func_split_short_opt_arg" ${1+"$@"}
+ shift
+ ;;
+
+ # Separate non-argument short options:
+ -\?*|-h*|-v*|-x*)
+ func_split_short_opt "$_G_opt"
+ set dummy "$func_split_short_opt_name" \
+ "-$func_split_short_opt_arg" ${1+"$@"}
+ shift
+ ;;
+
+ --) _G_rc_parse_options=: ; break ;;
+ -*) func_fatal_help "unrecognised option: '$_G_opt'" ;;
+ *) set dummy "$_G_opt" ${1+"$@"}; shift
+ _G_match_parse_options=false
+ break
+ ;;
+ esac
+
+ $_G_match_parse_options && _G_rc_parse_options=:
+ done
+
+
+ if $_G_rc_parse_options; then
+ # save modified positional parameters for caller
+ func_quote_for_eval ${1+"$@"}
+ func_parse_options_result=$func_quote_for_eval_result
+ fi
+
+ $_G_rc_parse_options
+}
+
+
+# func_validate_options [ARG]...
+# ------------------------------
+# Perform any sanity checks on option settings and/or unconsumed
+# arguments.
+func_hookable func_validate_options
+func_validate_options ()
+{
+ $debug_cmd
+
+ _G_rc_validate_options=false
+
+ # Display all warnings if -W was not given.
+ test -n "$opt_warning_types" || opt_warning_types=" $warning_categories"
+
+ if func_run_hooks func_validate_options ${1+"$@"}; then
+ # save modified positional parameters for caller
+ func_validate_options_result=$func_run_hooks_result
+ _G_rc_validate_options=:
+ fi
+
+ # Bail if the options were screwed!
+ $exit_cmd $EXIT_FAILURE
+
+ $_G_rc_validate_options
+}
+
+
+
+## ----------------- ##
+## Helper functions. ##
+## ----------------- ##
+
+# This section contains the helper functions used by the rest of the
+# hookable option parser framework in ascii-betical order.
+
+
+# func_fatal_help ARG...
+# ----------------------
+# Echo program name prefixed message to standard error, followed by
+# a help hint, and exit.
+func_fatal_help ()
+{
+ $debug_cmd
+
+ eval \$ECHO \""Usage: $usage"\"
+ eval \$ECHO \""$fatal_help"\"
+ func_error ${1+"$@"}
+ exit $EXIT_FAILURE
+}
+
+
+# func_help
+# ---------
+# Echo long help message to standard output and exit.
+func_help ()
+{
+ $debug_cmd
+
+ func_usage_message
+ $ECHO "$long_help_message"
+ exit 0
+}
+
+
+# func_missing_arg ARGNAME
+# ------------------------
+# Echo program name prefixed message to standard error and set global
+# exit_cmd.
+func_missing_arg ()
+{
+ $debug_cmd
+
+ func_error "Missing argument for '$1'."
+ exit_cmd=exit
+}
+
+
+# func_split_equals STRING
+# ------------------------
+# Set func_split_equals_lhs and func_split_equals_rhs shell variables after
+# splitting STRING at the '=' sign.
+test -z "$_G_HAVE_XSI_OPS" \
+ && (eval 'x=a/b/c;
+ test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \
+ && _G_HAVE_XSI_OPS=yes
+
+if test yes = "$_G_HAVE_XSI_OPS"
+then
+ # This is an XSI compatible shell, allowing a faster implementation...
+ eval 'func_split_equals ()
+ {
+ $debug_cmd
+
+ func_split_equals_lhs=${1%%=*}
+ func_split_equals_rhs=${1#*=}
+ test "x$func_split_equals_lhs" = "x$1" \
+ && func_split_equals_rhs=
+ }'
+else
+ # ...otherwise fall back to using expr, which is often a shell builtin.
+ func_split_equals ()
+ {
+ $debug_cmd
+
+ func_split_equals_lhs=`expr "x$1" : 'x\([^=]*\)'`
+ func_split_equals_rhs=
+ test "x$func_split_equals_lhs" = "x$1" \
+ || func_split_equals_rhs=`expr "x$1" : 'x[^=]*=\(.*\)$'`
+ }
+fi #func_split_equals
+
+
+# func_split_short_opt SHORTOPT
+# -----------------------------
+# Set func_split_short_opt_name and func_split_short_opt_arg shell
+# variables after splitting SHORTOPT after the 2nd character.
+if test yes = "$_G_HAVE_XSI_OPS"
+then
+ # This is an XSI compatible shell, allowing a faster implementation...
+ eval 'func_split_short_opt ()
+ {
+ $debug_cmd
+
+ func_split_short_opt_arg=${1#??}
+ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}
+ }'
+else
+ # ...otherwise fall back to using expr, which is often a shell builtin.
+ func_split_short_opt ()
+ {
+ $debug_cmd
+
+ func_split_short_opt_name=`expr "x$1" : 'x-\(.\)'`
+ func_split_short_opt_arg=`expr "x$1" : 'x-.\(.*\)$'`
+ }
+fi #func_split_short_opt
+
+
+# func_usage
+# ----------
+# Echo short help message to standard output and exit.
+func_usage ()
+{
+ $debug_cmd
+
+ func_usage_message
+ $ECHO "Run '$progname --help |${PAGER-more}' for full usage"
+ exit 0
+}
+
+
+# func_usage_message
+# ------------------
+# Echo short help message to standard output.
+func_usage_message ()
+{
+ $debug_cmd
+
+ eval \$ECHO \""Usage: $usage"\"
+ echo
+ $SED -n 's|^# ||
+ /^Written by/{
+ x;p;x
+ }
+ h
+ /^Written by/q' < "$progpath"
+ echo
+ eval \$ECHO \""$usage_message"\"
+}
+
+
+# func_version
+# ------------
+# Echo version message to standard output and exit.
+func_version ()
+{
+ $debug_cmd
+
+ printf '%s\n' "$progname $scriptversion"
+ $SED -n '
+ /(C)/!b go
+ :more
+ /\./!{
+ N
+ s|\n# | |
+ b more
+ }
+ :go
+ /^# Written by /,/# warranty; / {
+ s|^# ||
+ s|^# *$||
+ s|\((C)\)[ 0-9,-]*[ ,-]\([1-9][0-9]* \)|\1 \2|
+ p
+ }
+ /^# Written by / {
+ s|^# ||
+ p
+ }
+ /^warranty; /q' < "$progpath"
+
+ exit $?
+}
+
+
+# Local variables:
+# mode: shell-script
+# sh-indentation: 2
+# eval: (add-hook 'before-save-hook 'time-stamp)
+# time-stamp-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC"
+# time-stamp-time-zone: "UTC"
+# End:
+
+# Set a version string.
+scriptversion='(GNU libtool) 2.4.6'
+
+
+# func_echo ARG...
+# ----------------
+# Libtool also displays the current mode in messages, so override
+# funclib.sh func_echo with this custom definition.
+func_echo ()
+{
+ $debug_cmd
+
+ _G_message=$*
+
+ func_echo_IFS=$IFS
+ IFS=$nl
+ for _G_line in $_G_message; do
+ IFS=$func_echo_IFS
+ $ECHO "$progname${opt_mode+: $opt_mode}: $_G_line"
+ done
+ IFS=$func_echo_IFS
+}
+
+
+# func_warning ARG...
+# -------------------
+# Libtool warnings are not categorized, so override funclib.sh
+# func_warning with this simpler definition.
+func_warning ()
+{
+ $debug_cmd
+
+ $warning_func ${1+"$@"}
+}
+
+
+## ---------------- ##
+## Options parsing. ##
+## ---------------- ##
+
+# Hook in the functions to make sure our own options are parsed during
+# the option parsing loop.
+
+usage='$progpath [OPTION]... [MODE-ARG]...'
+
+# Short help message in response to '-h'.
+usage_message="Options:
+ --config show all configuration variables
+ --debug enable verbose shell tracing
+ -n, --dry-run display commands without modifying any files
+ --features display basic configuration information and exit
+ --mode=MODE use operation mode MODE
+ --no-warnings equivalent to '-Wnone'
+ --preserve-dup-deps don't remove duplicate dependency libraries
+ --quiet, --silent don't print informational messages
+ --tag=TAG use configuration variables from tag TAG
+ -v, --verbose print more informational messages than default
+ --version print version information
+ -W, --warnings=CATEGORY report the warnings falling in CATEGORY [all]
+ -h, --help, --help-all print short, long, or detailed help message
+"
+
+# Additional text appended to 'usage_message' in response to '--help'.
+func_help ()
+{
+ $debug_cmd
+
+ func_usage_message
+ $ECHO "$long_help_message
+
+MODE must be one of the following:
+
+ clean remove files from the build directory
+ compile compile a source file into a libtool object
+ execute automatically set library path, then run a program
+ finish complete the installation of libtool libraries
+ install install libraries or executables
+ link create a library or an executable
+ uninstall remove libraries from an installed directory
+
+MODE-ARGS vary depending on the MODE. When passed as first option,
+'--mode=MODE' may be abbreviated as 'MODE' or a unique abbreviation of that.
+Try '$progname --help --mode=MODE' for a more detailed description of MODE.
+
+When reporting a bug, please describe a test case to reproduce it and
+include the following information:
+
+ host-triplet: $host
+ shell: $SHELL
+ compiler: $LTCC
+ compiler flags: $LTCFLAGS
+ linker: $LD (gnu? $with_gnu_ld)
+ version: $progname $scriptversion Debian-2.4.6-15build2
+ automake: `($AUTOMAKE --version) 2>/dev/null |$SED 1q`
+ autoconf: `($AUTOCONF --version) 2>/dev/null |$SED 1q`
+
+Report bugs to <bug-libtool@gnu.org>.
+GNU libtool home page: <http://www.gnu.org/s/libtool/>.
+General help using GNU software: <http://www.gnu.org/gethelp/>."
+ exit 0
+}
+
+
+# func_lo2o OBJECT-NAME
+# ---------------------
+# Transform OBJECT-NAME from a '.lo' suffix to the platform specific
+# object suffix.
+
+lo2o=s/\\.lo\$/.$objext/
+o2lo=s/\\.$objext\$/.lo/
+
+if test yes = "$_G_HAVE_XSI_OPS"; then
+ eval 'func_lo2o ()
+ {
+ case $1 in
+ *.lo) func_lo2o_result=${1%.lo}.$objext ;;
+ * ) func_lo2o_result=$1 ;;
+ esac
+ }'
+
+ # func_xform LIBOBJ-OR-SOURCE
+ # ---------------------------
+ # Transform LIBOBJ-OR-SOURCE from a '.o' or '.c' (or otherwise)
+ # suffix to a '.lo' libtool-object suffix.
+ eval 'func_xform ()
+ {
+ func_xform_result=${1%.*}.lo
+ }'
+else
+ # ...otherwise fall back to using sed.
+ func_lo2o ()
+ {
+ func_lo2o_result=`$ECHO "$1" | $SED "$lo2o"`
+ }
+
+ func_xform ()
+ {
+ func_xform_result=`$ECHO "$1" | $SED 's|\.[^.]*$|.lo|'`
+ }
+fi
+
+
+# func_fatal_configuration ARG...
+# -------------------------------
+# Echo program name prefixed message to standard error, followed by
+# a configuration failure hint, and exit.
+func_fatal_configuration ()
+{
+ func__fatal_error ${1+"$@"} \
+ "See the $PACKAGE documentation for more information." \
+ "Fatal configuration error."
+}
+
+
+# func_config
+# -----------
+# Display the configuration for all the tags in this script.
+func_config ()
+{
+ re_begincf='^# ### BEGIN LIBTOOL'
+ re_endcf='^# ### END LIBTOOL'
+
+ # Default configuration.
+ $SED "1,/$re_begincf CONFIG/d;/$re_endcf CONFIG/,\$d" < "$progpath"
+
+ # Now print the configurations for the tags.
+ for tagname in $taglist; do
+ $SED -n "/$re_begincf TAG CONFIG: $tagname\$/,/$re_endcf TAG CONFIG: $tagname\$/p" < "$progpath"
+ done
+
+ exit $?
+}
+
+
+# func_features
+# -------------
+# Display the features supported by this script.
+func_features ()
+{
+ echo "host: $host"
+ if test yes = "$build_libtool_libs"; then
+ echo "enable shared libraries"
+ else
+ echo "disable shared libraries"
+ fi
+ if test yes = "$build_old_libs"; then
+ echo "enable static libraries"
+ else
+ echo "disable static libraries"
+ fi
+
+ exit $?
+}
+
+
+# func_enable_tag TAGNAME
+# -----------------------
+# Verify that TAGNAME is valid, and either flag an error and exit, or
+# enable the TAGNAME tag. We also add TAGNAME to the global $taglist
+# variable here.
+func_enable_tag ()
+{
+ # Global variable:
+ tagname=$1
+
+ re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$"
+ re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$"
+ sed_extractcf=/$re_begincf/,/$re_endcf/p
+
+ # Validate tagname.
+ case $tagname in
+ *[!-_A-Za-z0-9,/]*)
+ func_fatal_error "invalid tag name: $tagname"
+ ;;
+ esac
+
+ # Don't test for the "default" C tag, as we know it's
+ # there but not specially marked.
+ case $tagname in
+ CC) ;;
+ *)
+ if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then
+ taglist="$taglist $tagname"
+
+ # Evaluate the configuration. Be careful to quote the path
+ # and the sed script, to avoid splitting on whitespace, but
+ # also don't use non-portable quotes within backquotes within
+ # quotes we have to do it in 2 steps:
+ extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"`
+ eval "$extractedcf"
+ else
+ func_error "ignoring unknown tag $tagname"
+ fi
+ ;;
+ esac
+}
+
+
+# func_check_version_match
+# ------------------------
+# Ensure that we are using m4 macros, and libtool script from the same
+# release of libtool.
+func_check_version_match ()
+{
+ if test "$package_revision" != "$macro_revision"; then
+ if test "$VERSION" != "$macro_version"; then
+ if test -z "$macro_version"; then
+ cat >&2 <<_LT_EOF
+$progname: Version mismatch error. This is $PACKAGE $VERSION, but the
+$progname: definition of this LT_INIT comes from an older release.
+$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION
+$progname: and run autoconf again.
+_LT_EOF
+ else
+ cat >&2 <<_LT_EOF
+$progname: Version mismatch error. This is $PACKAGE $VERSION, but the
+$progname: definition of this LT_INIT comes from $PACKAGE $macro_version.
+$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION
+$progname: and run autoconf again.
+_LT_EOF
+ fi
+ else
+ cat >&2 <<_LT_EOF
+$progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision,
+$progname: but the definition of this LT_INIT comes from revision $macro_revision.
+$progname: You should recreate aclocal.m4 with macros from revision $package_revision
+$progname: of $PACKAGE $VERSION and run autoconf again.
+_LT_EOF
+ fi
+
+ exit $EXIT_MISMATCH
+ fi
+}
+
+
+# libtool_options_prep [ARG]...
+# -----------------------------
+# Preparation for options parsed by libtool.
+libtool_options_prep ()
+{
+ $debug_mode
+
+ # Option defaults:
+ opt_config=false
+ opt_dlopen=
+ opt_dry_run=false
+ opt_help=false
+ opt_mode=
+ opt_preserve_dup_deps=false
+ opt_quiet=false
+
+ nonopt=
+ preserve_args=
+
+ _G_rc_lt_options_prep=:
+
+ # Shorthand for --mode=foo, only valid as the first argument
+ case $1 in
+ clean|clea|cle|cl)
+ shift; set dummy --mode clean ${1+"$@"}; shift
+ ;;
+ compile|compil|compi|comp|com|co|c)
+ shift; set dummy --mode compile ${1+"$@"}; shift
+ ;;
+ execute|execut|execu|exec|exe|ex|e)
+ shift; set dummy --mode execute ${1+"$@"}; shift
+ ;;
+ finish|finis|fini|fin|fi|f)
+ shift; set dummy --mode finish ${1+"$@"}; shift
+ ;;
+ install|instal|insta|inst|ins|in|i)
+ shift; set dummy --mode install ${1+"$@"}; shift
+ ;;
+ link|lin|li|l)
+ shift; set dummy --mode link ${1+"$@"}; shift
+ ;;
+ uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u)
+ shift; set dummy --mode uninstall ${1+"$@"}; shift
+ ;;
+ *)
+ _G_rc_lt_options_prep=false
+ ;;
+ esac
+
+ if $_G_rc_lt_options_prep; then
+ # Pass back the list of options.
+ func_quote_for_eval ${1+"$@"}
+ libtool_options_prep_result=$func_quote_for_eval_result
+ fi
+
+ $_G_rc_lt_options_prep
+}
+func_add_hook func_options_prep libtool_options_prep
+
+
+# libtool_parse_options [ARG]...
+# ---------------------------------
+# Provide handling for libtool specific options.
+libtool_parse_options ()
+{
+ $debug_cmd
+
+ _G_rc_lt_parse_options=false
+
+ # Perform our own loop to consume as many options as possible in
+ # each iteration.
+ while test $# -gt 0; do
+ _G_match_lt_parse_options=:
+ _G_opt=$1
+ shift
+ case $_G_opt in
+ --dry-run|--dryrun|-n)
+ opt_dry_run=:
+ ;;
+
+ --config) func_config ;;
+
+ --dlopen|-dlopen)
+ opt_dlopen="${opt_dlopen+$opt_dlopen
+}$1"
+ shift
+ ;;
+
+ --preserve-dup-deps)
+ opt_preserve_dup_deps=: ;;
+
+ --features) func_features ;;
+
+ --finish) set dummy --mode finish ${1+"$@"}; shift ;;
+
+ --help) opt_help=: ;;
+
+ --help-all) opt_help=': help-all' ;;
+
+ --mode) test $# = 0 && func_missing_arg $_G_opt && break
+ opt_mode=$1
+ case $1 in
+ # Valid mode arguments:
+ clean|compile|execute|finish|install|link|relink|uninstall) ;;
+
+ # Catch anything else as an error
+ *) func_error "invalid argument for $_G_opt"
+ exit_cmd=exit
+ break
+ ;;
+ esac
+ shift
+ ;;
+
+ --no-silent|--no-quiet)
+ opt_quiet=false
+ func_append preserve_args " $_G_opt"
+ ;;
+
+ --no-warnings|--no-warning|--no-warn)
+ opt_warning=false
+ func_append preserve_args " $_G_opt"
+ ;;
+
+ --no-verbose)
+ opt_verbose=false
+ func_append preserve_args " $_G_opt"
+ ;;
+
+ --silent|--quiet)
+ opt_quiet=:
+ opt_verbose=false
+ func_append preserve_args " $_G_opt"
+ ;;
+
+ --tag) test $# = 0 && func_missing_arg $_G_opt && break
+ opt_tag=$1
+ func_append preserve_args " $_G_opt $1"
+ func_enable_tag "$1"
+ shift
+ ;;
+
+ --verbose|-v) opt_quiet=false
+ opt_verbose=:
+ func_append preserve_args " $_G_opt"
+ ;;
+
+ # An option not handled by this hook function:
+ *) set dummy "$_G_opt" ${1+"$@"} ; shift
+ _G_match_lt_parse_options=false
+ break
+ ;;
+ esac
+ $_G_match_lt_parse_options && _G_rc_lt_parse_options=:
+ done
+
+ if $_G_rc_lt_parse_options; then
+ # save modified positional parameters for caller
+ func_quote_for_eval ${1+"$@"}
+ libtool_parse_options_result=$func_quote_for_eval_result
+ fi
+
+ $_G_rc_lt_parse_options
+}
+func_add_hook func_parse_options libtool_parse_options
+
+
+
+# libtool_validate_options [ARG]...
+# ---------------------------------
+# Perform any sanity checks on option settings and/or unconsumed
+# arguments.
+libtool_validate_options ()
+{
+ # save first non-option argument
+ if test 0 -lt $#; then
+ nonopt=$1
+ shift
+ fi
+
+ # preserve --debug
+ test : = "$debug_cmd" || func_append preserve_args " --debug"
+
+ case $host in
+ # Solaris2 added to fix http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16452
+ # see also: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59788
+ *cygwin* | *mingw* | *pw32* | *cegcc* | *solaris2* | *os2*)
+ # don't eliminate duplications in $postdeps and $predeps
+ opt_duplicate_compiler_generated_deps=:
+ ;;
+ *)
+ opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps
+ ;;
+ esac
+
+ $opt_help || {
+ # Sanity checks first:
+ func_check_version_match
+
+ test yes != "$build_libtool_libs" \
+ && test yes != "$build_old_libs" \
+ && func_fatal_configuration "not configured to build any kind of library"
+
+ # Darwin sucks
+ eval std_shrext=\"$shrext_cmds\"
+
+ # Only execute mode is allowed to have -dlopen flags.
+ if test -n "$opt_dlopen" && test execute != "$opt_mode"; then
+ func_error "unrecognized option '-dlopen'"
+ $ECHO "$help" 1>&2
+ exit $EXIT_FAILURE
+ fi
+
+ # Change the help message to a mode-specific one.
+ generic_help=$help
+ help="Try '$progname --help --mode=$opt_mode' for more information."
+ }
+
+ # Pass back the unparsed argument list
+ func_quote_for_eval ${1+"$@"}
+ libtool_validate_options_result=$func_quote_for_eval_result
+}
+func_add_hook func_validate_options libtool_validate_options
+
+
+# Process options as early as possible so that --help and --version
+# can return quickly.
+func_options ${1+"$@"}
+eval set dummy "$func_options_result"; shift
+
+
+
+## ----------- ##
+## Main. ##
+## ----------- ##
+
+magic='%%%MAGIC variable%%%'
+magic_exe='%%%MAGIC EXE variable%%%'
+
+# Global variables.
+extracted_archives=
+extracted_serial=0
+
+# If this variable is set in any of the actions, the command in it
+# will be execed at the end. This prevents here-documents from being
+# left over by shells.
+exec_cmd=
+
+
+# A function that is used when there is no print builtin or printf.
+func_fallback_echo ()
+{
+ eval 'cat <<_LTECHO_EOF
+$1
+_LTECHO_EOF'
+}
+
+# func_generated_by_libtool
+# True iff stdin has been generated by Libtool. This function is only
+# a basic sanity check; it will hardly flush out determined imposters.
+func_generated_by_libtool_p ()
+{
+ $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1
+}
+
+# func_lalib_p file
+# True iff FILE is a libtool '.la' library or '.lo' object file.
+# This function is only a basic sanity check; it will hardly flush out
+# determined imposters.
+func_lalib_p ()
+{
+ test -f "$1" &&
+ $SED -e 4q "$1" 2>/dev/null | func_generated_by_libtool_p
+}
+
+# func_lalib_unsafe_p file
+# True iff FILE is a libtool '.la' library or '.lo' object file.
+# This function implements the same check as func_lalib_p without
+# resorting to external programs. To this end, it redirects stdin and
+# closes it afterwards, without saving the original file descriptor.
+# As a safety measure, use it only where a negative result would be
+# fatal anyway. Works if 'file' does not exist.
+func_lalib_unsafe_p ()
+{
+ lalib_p=no
+ if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then
+ for lalib_p_l in 1 2 3 4
+ do
+ read lalib_p_line
+ case $lalib_p_line in
+ \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;;
+ esac
+ done
+ exec 0<&5 5<&-
+ fi
+ test yes = "$lalib_p"
+}
+
+# func_ltwrapper_script_p file
+# True iff FILE is a libtool wrapper script
+# This function is only a basic sanity check; it will hardly flush out
+# determined imposters.
+func_ltwrapper_script_p ()
+{
+ test -f "$1" &&
+ $lt_truncate_bin < "$1" 2>/dev/null | func_generated_by_libtool_p
+}
+
+# func_ltwrapper_executable_p file
+# True iff FILE is a libtool wrapper executable
+# This function is only a basic sanity check; it will hardly flush out
+# determined imposters.
+func_ltwrapper_executable_p ()
+{
+ func_ltwrapper_exec_suffix=
+ case $1 in
+ *.exe) ;;
+ *) func_ltwrapper_exec_suffix=.exe ;;
+ esac
+ $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1
+}
+
+# func_ltwrapper_scriptname file
+# Assumes file is an ltwrapper_executable
+# uses $file to determine the appropriate filename for a
+# temporary ltwrapper_script.
+func_ltwrapper_scriptname ()
+{
+ func_dirname_and_basename "$1" "" "."
+ func_stripname '' '.exe' "$func_basename_result"
+ func_ltwrapper_scriptname_result=$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper
+}
+
+# func_ltwrapper_p file
+# True iff FILE is a libtool wrapper script or wrapper executable
+# This function is only a basic sanity check; it will hardly flush out
+# determined imposters.
+func_ltwrapper_p ()
+{
+ func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1"
+}
+
+
+# func_execute_cmds commands fail_cmd
+# Execute tilde-delimited COMMANDS.
+# If FAIL_CMD is given, eval that upon failure.
+# FAIL_CMD may read-access the current command in variable CMD!
+func_execute_cmds ()
+{
+ $debug_cmd
+
+ save_ifs=$IFS; IFS='~'
+ for cmd in $1; do
+ IFS=$sp$nl
+ eval cmd=\"$cmd\"
+ IFS=$save_ifs
+ func_show_eval "$cmd" "${2-:}"
+ done
+ IFS=$save_ifs
+}
+
+
+# func_source file
+# Source FILE, adding directory component if necessary.
+# Note that it is not necessary on cygwin/mingw to append a dot to
+# FILE even if both FILE and FILE.exe exist: automatic-append-.exe
+# behavior happens only for exec(3), not for open(2)! Also, sourcing
+# 'FILE.' does not work on cygwin managed mounts.
+func_source ()
+{
+ $debug_cmd
+
+ case $1 in
+ */* | *\\*) . "$1" ;;
+ *) . "./$1" ;;
+ esac
+}
+
+
+# func_resolve_sysroot PATH
+# Replace a leading = in PATH with a sysroot. Store the result into
+# func_resolve_sysroot_result
+func_resolve_sysroot ()
+{
+ func_resolve_sysroot_result=$1
+ case $func_resolve_sysroot_result in
+ =*)
+ func_stripname '=' '' "$func_resolve_sysroot_result"
+ func_resolve_sysroot_result=$lt_sysroot$func_stripname_result
+ ;;
+ esac
+}
+
+# func_replace_sysroot PATH
+# If PATH begins with the sysroot, replace it with = and
+# store the result into func_replace_sysroot_result.
+func_replace_sysroot ()
+{
+ case $lt_sysroot:$1 in
+ ?*:"$lt_sysroot"*)
+ func_stripname "$lt_sysroot" '' "$1"
+ func_replace_sysroot_result='='$func_stripname_result
+ ;;
+ *)
+ # Including no sysroot.
+ func_replace_sysroot_result=$1
+ ;;
+ esac
+}
+
+# func_infer_tag arg
+# Infer tagged configuration to use if any are available and
+# if one wasn't chosen via the "--tag" command line option.
+# Only attempt this if the compiler in the base compile
+# command doesn't match the default compiler.
+# arg is usually of the form 'gcc ...'
+func_infer_tag ()
+{
+ $debug_cmd
+
+ if test -n "$available_tags" && test -z "$tagname"; then
+ CC_quoted=
+ for arg in $CC; do
+ func_append_quoted CC_quoted "$arg"
+ done
+ CC_expanded=`func_echo_all $CC`
+ CC_quoted_expanded=`func_echo_all $CC_quoted`
+ case $@ in
+ # Blanks in the command may have been stripped by the calling shell,
+ # but not from the CC environment variable when configure was run.
+ " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \
+ " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) ;;
+ # Blanks at the start of $base_compile will cause this to fail
+ # if we don't check for them as well.
+ *)
+ for z in $available_tags; do
+ if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then
+ # Evaluate the configuration.
+ eval "`$SED -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`"
+ CC_quoted=
+ for arg in $CC; do
+ # Double-quote args containing other shell metacharacters.
+ func_append_quoted CC_quoted "$arg"
+ done
+ CC_expanded=`func_echo_all $CC`
+ CC_quoted_expanded=`func_echo_all $CC_quoted`
+ case "$@ " in
+ " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \
+ " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*)
+ # The compiler in the base compile command matches
+ # the one in the tagged configuration.
+ # Assume this is the tagged configuration we want.
+ tagname=$z
+ break
+ ;;
+ esac
+ fi
+ done
+ # If $tagname still isn't set, then no tagged configuration
+ # was found and let the user know that the "--tag" command
+ # line option must be used.
+ if test -z "$tagname"; then
+ func_echo "unable to infer tagged configuration"
+ func_fatal_error "specify a tag with '--tag'"
+# else
+# func_verbose "using $tagname tagged configuration"
+ fi
+ ;;
+ esac
+ fi
+}
+
+
+
+# func_write_libtool_object output_name pic_name nonpic_name
+# Create a libtool object file (analogous to a ".la" file),
+# but don't create it if we're doing a dry run.
+func_write_libtool_object ()
+{
+ write_libobj=$1
+ if test yes = "$build_libtool_libs"; then
+ write_lobj=\'$2\'
+ else
+ write_lobj=none
+ fi
+
+ if test yes = "$build_old_libs"; then
+ write_oldobj=\'$3\'
+ else
+ write_oldobj=none
+ fi
+
+ $opt_dry_run || {
+ cat >${write_libobj}T <<EOF
+# $write_libobj - a libtool object file
+# Generated by $PROGRAM (GNU $PACKAGE) $VERSION
+#
+# Please DO NOT delete this file!
+# It is necessary for linking the library.
+
+# Name of the PIC object.
+pic_object=$write_lobj
+
+# Name of the non-PIC object
+non_pic_object=$write_oldobj
+
+EOF
+ $MV "${write_libobj}T" "$write_libobj"
+ }
+}
+
+
+##################################################
+# FILE NAME AND PATH CONVERSION HELPER FUNCTIONS #
+##################################################
+
+# func_convert_core_file_wine_to_w32 ARG
+# Helper function used by file name conversion functions when $build is *nix,
+# and $host is mingw, cygwin, or some other w32 environment. Relies on a
+# correctly configured wine environment available, with the winepath program
+# in $build's $PATH.
+#
+# ARG is the $build file name to be converted to w32 format.
+# Result is available in $func_convert_core_file_wine_to_w32_result, and will
+# be empty on error (or when ARG is empty)
+func_convert_core_file_wine_to_w32 ()
+{
+ $debug_cmd
+
+ func_convert_core_file_wine_to_w32_result=$1
+ if test -n "$1"; then
+ # Unfortunately, winepath does not exit with a non-zero error code, so we
+ # are forced to check the contents of stdout. On the other hand, if the
+ # command is not found, the shell will set an exit code of 127 and print
+ # *an error message* to stdout. So we must check for both error code of
+ # zero AND non-empty stdout, which explains the odd construction:
+ func_convert_core_file_wine_to_w32_tmp=`winepath -w "$1" 2>/dev/null`
+ if test "$?" -eq 0 && test -n "$func_convert_core_file_wine_to_w32_tmp"; then
+ func_convert_core_file_wine_to_w32_result=`$ECHO "$func_convert_core_file_wine_to_w32_tmp" |
+ $SED -e "$sed_naive_backslashify"`
+ else
+ func_convert_core_file_wine_to_w32_result=
+ fi
+ fi
+}
+# end: func_convert_core_file_wine_to_w32
+
+
+# func_convert_core_path_wine_to_w32 ARG
+# Helper function used by path conversion functions when $build is *nix, and
+# $host is mingw, cygwin, or some other w32 environment. Relies on a correctly
+# configured wine environment available, with the winepath program in $build's
+# $PATH. Assumes ARG has no leading or trailing path separator characters.
+#
+# ARG is path to be converted from $build format to win32.
+# Result is available in $func_convert_core_path_wine_to_w32_result.
+# Unconvertible file (directory) names in ARG are skipped; if no directory names
+# are convertible, then the result may be empty.
+func_convert_core_path_wine_to_w32 ()
+{
+ $debug_cmd
+
+ # unfortunately, winepath doesn't convert paths, only file names
+ func_convert_core_path_wine_to_w32_result=
+ if test -n "$1"; then
+ oldIFS=$IFS
+ IFS=:
+ for func_convert_core_path_wine_to_w32_f in $1; do
+ IFS=$oldIFS
+ func_convert_core_file_wine_to_w32 "$func_convert_core_path_wine_to_w32_f"
+ if test -n "$func_convert_core_file_wine_to_w32_result"; then
+ if test -z "$func_convert_core_path_wine_to_w32_result"; then
+ func_convert_core_path_wine_to_w32_result=$func_convert_core_file_wine_to_w32_result
+ else
+ func_append func_convert_core_path_wine_to_w32_result ";$func_convert_core_file_wine_to_w32_result"
+ fi
+ fi
+ done
+ IFS=$oldIFS
+ fi
+}
+# end: func_convert_core_path_wine_to_w32
+
+
+# func_cygpath ARGS...
+# Wrapper around calling the cygpath program via LT_CYGPATH. This is used when
+# when (1) $build is *nix and Cygwin is hosted via a wine environment; or (2)
+# $build is MSYS and $host is Cygwin, or (3) $build is Cygwin. In case (1) or
+# (2), returns the Cygwin file name or path in func_cygpath_result (input
+# file name or path is assumed to be in w32 format, as previously converted
+# from $build's *nix or MSYS format). In case (3), returns the w32 file name
+# or path in func_cygpath_result (input file name or path is assumed to be in
+# Cygwin format). Returns an empty string on error.
+#
+# ARGS are passed to cygpath, with the last one being the file name or path to
+# be converted.
+#
+# Specify the absolute *nix (or w32) name to cygpath in the LT_CYGPATH
+# environment variable; do not put it in $PATH.
+func_cygpath ()
+{
+ $debug_cmd
+
+ if test -n "$LT_CYGPATH" && test -f "$LT_CYGPATH"; then
+ func_cygpath_result=`$LT_CYGPATH "$@" 2>/dev/null`
+ if test "$?" -ne 0; then
+ # on failure, ensure result is empty
+ func_cygpath_result=
+ fi
+ else
+ func_cygpath_result=
+ func_error "LT_CYGPATH is empty or specifies non-existent file: '$LT_CYGPATH'"
+ fi
+}
+#end: func_cygpath
+
+
+# func_convert_core_msys_to_w32 ARG
+# Convert file name or path ARG from MSYS format to w32 format. Return
+# result in func_convert_core_msys_to_w32_result.
+func_convert_core_msys_to_w32 ()
+{
+ $debug_cmd
+
+ # awkward: cmd appends spaces to result
+ func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null |
+ $SED -e 's/[ ]*$//' -e "$sed_naive_backslashify"`
+}
+#end: func_convert_core_msys_to_w32
+
+
+# func_convert_file_check ARG1 ARG2
+# Verify that ARG1 (a file name in $build format) was converted to $host
+# format in ARG2. Otherwise, emit an error message, but continue (resetting
+# func_to_host_file_result to ARG1).
+func_convert_file_check ()
+{
+ $debug_cmd
+
+ if test -z "$2" && test -n "$1"; then
+ func_error "Could not determine host file name corresponding to"
+ func_error " '$1'"
+ func_error "Continuing, but uninstalled executables may not work."
+ # Fallback:
+ func_to_host_file_result=$1
+ fi
+}
+# end func_convert_file_check
+
+
+# func_convert_path_check FROM_PATHSEP TO_PATHSEP FROM_PATH TO_PATH
+# Verify that FROM_PATH (a path in $build format) was converted to $host
+# format in TO_PATH. Otherwise, emit an error message, but continue, resetting
+# func_to_host_file_result to a simplistic fallback value (see below).
+func_convert_path_check ()
+{
+ $debug_cmd
+
+ if test -z "$4" && test -n "$3"; then
+ func_error "Could not determine the host path corresponding to"
+ func_error " '$3'"
+ func_error "Continuing, but uninstalled executables may not work."
+ # Fallback. This is a deliberately simplistic "conversion" and
+ # should not be "improved". See libtool.info.
+ if test "x$1" != "x$2"; then
+ lt_replace_pathsep_chars="s|$1|$2|g"
+ func_to_host_path_result=`echo "$3" |
+ $SED -e "$lt_replace_pathsep_chars"`
+ else
+ func_to_host_path_result=$3
+ fi
+ fi
+}
+# end func_convert_path_check
+
+
+# func_convert_path_front_back_pathsep FRONTPAT BACKPAT REPL ORIG
+# Modifies func_to_host_path_result by prepending REPL if ORIG matches FRONTPAT
+# and appending REPL if ORIG matches BACKPAT.
+func_convert_path_front_back_pathsep ()
+{
+ $debug_cmd
+
+ case $4 in
+ $1 ) func_to_host_path_result=$3$func_to_host_path_result
+ ;;
+ esac
+ case $4 in
+ $2 ) func_append func_to_host_path_result "$3"
+ ;;
+ esac
+}
+# end func_convert_path_front_back_pathsep
+
+
+##################################################
+# $build to $host FILE NAME CONVERSION FUNCTIONS #
+##################################################
+# invoked via '$to_host_file_cmd ARG'
+#
+# In each case, ARG is the path to be converted from $build to $host format.
+# Result will be available in $func_to_host_file_result.
+
+
+# func_to_host_file ARG
+# Converts the file name ARG from $build format to $host format. Return result
+# in func_to_host_file_result.
+func_to_host_file ()
+{
+ $debug_cmd
+
+ $to_host_file_cmd "$1"
+}
+# end func_to_host_file
+
+
+# func_to_tool_file ARG LAZY
+# converts the file name ARG from $build format to toolchain format. Return
+# result in func_to_tool_file_result. If the conversion in use is listed
+# in (the comma separated) LAZY, no conversion takes place.
+func_to_tool_file ()
+{
+ $debug_cmd
+
+ case ,$2, in
+ *,"$to_tool_file_cmd",*)
+ func_to_tool_file_result=$1
+ ;;
+ *)
+ $to_tool_file_cmd "$1"
+ func_to_tool_file_result=$func_to_host_file_result
+ ;;
+ esac
+}
+# end func_to_tool_file
+
+
+# func_convert_file_noop ARG
+# Copy ARG to func_to_host_file_result.
+func_convert_file_noop ()
+{
+ func_to_host_file_result=$1
+}
+# end func_convert_file_noop
+
+
+# func_convert_file_msys_to_w32 ARG
+# Convert file name ARG from (mingw) MSYS to (mingw) w32 format; automatic
+# conversion to w32 is not available inside the cwrapper. Returns result in
+# func_to_host_file_result.
+func_convert_file_msys_to_w32 ()
+{
+ $debug_cmd
+
+ func_to_host_file_result=$1
+ if test -n "$1"; then
+ func_convert_core_msys_to_w32 "$1"
+ func_to_host_file_result=$func_convert_core_msys_to_w32_result
+ fi
+ func_convert_file_check "$1" "$func_to_host_file_result"
+}
+# end func_convert_file_msys_to_w32
+
+
+# func_convert_file_cygwin_to_w32 ARG
+# Convert file name ARG from Cygwin to w32 format. Returns result in
+# func_to_host_file_result.
+func_convert_file_cygwin_to_w32 ()
+{
+ $debug_cmd
+
+ func_to_host_file_result=$1
+ if test -n "$1"; then
+ # because $build is cygwin, we call "the" cygpath in $PATH; no need to use
+ # LT_CYGPATH in this case.
+ func_to_host_file_result=`cygpath -m "$1"`
+ fi
+ func_convert_file_check "$1" "$func_to_host_file_result"
+}
+# end func_convert_file_cygwin_to_w32
+
+
+# func_convert_file_nix_to_w32 ARG
+# Convert file name ARG from *nix to w32 format. Requires a wine environment
+# and a working winepath. Returns result in func_to_host_file_result.
+func_convert_file_nix_to_w32 ()
+{
+ $debug_cmd
+
+ func_to_host_file_result=$1
+ if test -n "$1"; then
+ func_convert_core_file_wine_to_w32 "$1"
+ func_to_host_file_result=$func_convert_core_file_wine_to_w32_result
+ fi
+ func_convert_file_check "$1" "$func_to_host_file_result"
+}
+# end func_convert_file_nix_to_w32
+
+
+# func_convert_file_msys_to_cygwin ARG
+# Convert file name ARG from MSYS to Cygwin format. Requires LT_CYGPATH set.
+# Returns result in func_to_host_file_result.
+func_convert_file_msys_to_cygwin ()
+{
+ $debug_cmd
+
+ func_to_host_file_result=$1
+ if test -n "$1"; then
+ func_convert_core_msys_to_w32 "$1"
+ func_cygpath -u "$func_convert_core_msys_to_w32_result"
+ func_to_host_file_result=$func_cygpath_result
+ fi
+ func_convert_file_check "$1" "$func_to_host_file_result"
+}
+# end func_convert_file_msys_to_cygwin
+
+
+# func_convert_file_nix_to_cygwin ARG
+# Convert file name ARG from *nix to Cygwin format. Requires Cygwin installed
+# in a wine environment, working winepath, and LT_CYGPATH set. Returns result
+# in func_to_host_file_result.
+func_convert_file_nix_to_cygwin ()
+{
+ $debug_cmd
+
+ func_to_host_file_result=$1
+ if test -n "$1"; then
+ # convert from *nix to w32, then use cygpath to convert from w32 to cygwin.
+ func_convert_core_file_wine_to_w32 "$1"
+ func_cygpath -u "$func_convert_core_file_wine_to_w32_result"
+ func_to_host_file_result=$func_cygpath_result
+ fi
+ func_convert_file_check "$1" "$func_to_host_file_result"
+}
+# end func_convert_file_nix_to_cygwin
+
+
+#############################################
+# $build to $host PATH CONVERSION FUNCTIONS #
+#############################################
+# invoked via '$to_host_path_cmd ARG'
+#
+# In each case, ARG is the path to be converted from $build to $host format.
+# The result will be available in $func_to_host_path_result.
+#
+# Path separators are also converted from $build format to $host format. If
+# ARG begins or ends with a path separator character, it is preserved (but
+# converted to $host format) on output.
+#
+# All path conversion functions are named using the following convention:
+# file name conversion function : func_convert_file_X_to_Y ()
+# path conversion function : func_convert_path_X_to_Y ()
+# where, for any given $build/$host combination the 'X_to_Y' value is the
+# same. If conversion functions are added for new $build/$host combinations,
+# the two new functions must follow this pattern, or func_init_to_host_path_cmd
+# will break.
+
+
+# func_init_to_host_path_cmd
+# Ensures that function "pointer" variable $to_host_path_cmd is set to the
+# appropriate value, based on the value of $to_host_file_cmd.
+to_host_path_cmd=
+func_init_to_host_path_cmd ()
+{
+ $debug_cmd
+
+ if test -z "$to_host_path_cmd"; then
+ func_stripname 'func_convert_file_' '' "$to_host_file_cmd"
+ to_host_path_cmd=func_convert_path_$func_stripname_result
+ fi
+}
+
+
+# func_to_host_path ARG
+# Converts the path ARG from $build format to $host format. Return result
+# in func_to_host_path_result.
+func_to_host_path ()
+{
+ $debug_cmd
+
+ func_init_to_host_path_cmd
+ $to_host_path_cmd "$1"
+}
+# end func_to_host_path
+
+
+# func_convert_path_noop ARG
+# Copy ARG to func_to_host_path_result.
+func_convert_path_noop ()
+{
+ func_to_host_path_result=$1
+}
+# end func_convert_path_noop
+
+
+# func_convert_path_msys_to_w32 ARG
+# Convert path ARG from (mingw) MSYS to (mingw) w32 format; automatic
+# conversion to w32 is not available inside the cwrapper. Returns result in
+# func_to_host_path_result.
+func_convert_path_msys_to_w32 ()
+{
+ $debug_cmd
+
+ func_to_host_path_result=$1
+ if test -n "$1"; then
+ # Remove leading and trailing path separator characters from ARG. MSYS
+ # behavior is inconsistent here; cygpath turns them into '.;' and ';.';
+ # and winepath ignores them completely.
+ func_stripname : : "$1"
+ func_to_host_path_tmp1=$func_stripname_result
+ func_convert_core_msys_to_w32 "$func_to_host_path_tmp1"
+ func_to_host_path_result=$func_convert_core_msys_to_w32_result
+ func_convert_path_check : ";" \
+ "$func_to_host_path_tmp1" "$func_to_host_path_result"
+ func_convert_path_front_back_pathsep ":*" "*:" ";" "$1"
+ fi
+}
+# end func_convert_path_msys_to_w32
+
+
+# func_convert_path_cygwin_to_w32 ARG
+# Convert path ARG from Cygwin to w32 format. Returns result in
+# func_to_host_file_result.
+func_convert_path_cygwin_to_w32 ()
+{
+ $debug_cmd
+
+ func_to_host_path_result=$1
+ if test -n "$1"; then
+ # See func_convert_path_msys_to_w32:
+ func_stripname : : "$1"
+ func_to_host_path_tmp1=$func_stripname_result
+ func_to_host_path_result=`cygpath -m -p "$func_to_host_path_tmp1"`
+ func_convert_path_check : ";" \
+ "$func_to_host_path_tmp1" "$func_to_host_path_result"
+ func_convert_path_front_back_pathsep ":*" "*:" ";" "$1"
+ fi
+}
+# end func_convert_path_cygwin_to_w32
+
+
+# func_convert_path_nix_to_w32 ARG
+# Convert path ARG from *nix to w32 format. Requires a wine environment and
+# a working winepath. Returns result in func_to_host_file_result.
+func_convert_path_nix_to_w32 ()
+{
+ $debug_cmd
+
+ func_to_host_path_result=$1
+ if test -n "$1"; then
+ # See func_convert_path_msys_to_w32:
+ func_stripname : : "$1"
+ func_to_host_path_tmp1=$func_stripname_result
+ func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1"
+ func_to_host_path_result=$func_convert_core_path_wine_to_w32_result
+ func_convert_path_check : ";" \
+ "$func_to_host_path_tmp1" "$func_to_host_path_result"
+ func_convert_path_front_back_pathsep ":*" "*:" ";" "$1"
+ fi
+}
+# end func_convert_path_nix_to_w32
+
+
+# func_convert_path_msys_to_cygwin ARG
+# Convert path ARG from MSYS to Cygwin format. Requires LT_CYGPATH set.
+# Returns result in func_to_host_file_result.
+func_convert_path_msys_to_cygwin ()
+{
+ $debug_cmd
+
+ func_to_host_path_result=$1
+ if test -n "$1"; then
+ # See func_convert_path_msys_to_w32:
+ func_stripname : : "$1"
+ func_to_host_path_tmp1=$func_stripname_result
+ func_convert_core_msys_to_w32 "$func_to_host_path_tmp1"
+ func_cygpath -u -p "$func_convert_core_msys_to_w32_result"
+ func_to_host_path_result=$func_cygpath_result
+ func_convert_path_check : : \
+ "$func_to_host_path_tmp1" "$func_to_host_path_result"
+ func_convert_path_front_back_pathsep ":*" "*:" : "$1"
+ fi
+}
+# end func_convert_path_msys_to_cygwin
+
+
+# func_convert_path_nix_to_cygwin ARG
+# Convert path ARG from *nix to Cygwin format. Requires Cygwin installed in a
+# a wine environment, working winepath, and LT_CYGPATH set. Returns result in
+# func_to_host_file_result.
+func_convert_path_nix_to_cygwin ()
+{
+ $debug_cmd
+
+ func_to_host_path_result=$1
+ if test -n "$1"; then
+ # Remove leading and trailing path separator characters from
+ # ARG. msys behavior is inconsistent here, cygpath turns them
+ # into '.;' and ';.', and winepath ignores them completely.
+ func_stripname : : "$1"
+ func_to_host_path_tmp1=$func_stripname_result
+ func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1"
+ func_cygpath -u -p "$func_convert_core_path_wine_to_w32_result"
+ func_to_host_path_result=$func_cygpath_result
+ func_convert_path_check : : \
+ "$func_to_host_path_tmp1" "$func_to_host_path_result"
+ func_convert_path_front_back_pathsep ":*" "*:" : "$1"
+ fi
+}
+# end func_convert_path_nix_to_cygwin
+
+
+# func_dll_def_p FILE
+# True iff FILE is a Windows DLL '.def' file.
+# Keep in sync with _LT_DLL_DEF_P in libtool.m4
+func_dll_def_p ()
+{
+ $debug_cmd
+
+ func_dll_def_p_tmp=`$SED -n \
+ -e 's/^[ ]*//' \
+ -e '/^\(;.*\)*$/d' \
+ -e 's/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p' \
+ -e q \
+ "$1"`
+ test DEF = "$func_dll_def_p_tmp"
+}
+
+
+# func_mode_compile arg...
+func_mode_compile ()
+{
+ $debug_cmd
+
+ # Get the compilation command and the source file.
+ base_compile=
+ srcfile=$nonopt # always keep a non-empty value in "srcfile"
+ suppress_opt=yes
+ suppress_output=
+ arg_mode=normal
+ libobj=
+ later=
+ pie_flag=
+
+ for arg
+ do
+ case $arg_mode in
+ arg )
+ # do not "continue". Instead, add this to base_compile
+ lastarg=$arg
+ arg_mode=normal
+ ;;
+
+ target )
+ libobj=$arg
+ arg_mode=normal
+ continue
+ ;;
+
+ normal )
+ # Accept any command-line options.
+ case $arg in
+ -o)
+ test -n "$libobj" && \
+ func_fatal_error "you cannot specify '-o' more than once"
+ arg_mode=target
+ continue
+ ;;
+
+ -pie | -fpie | -fPIE)
+ func_append pie_flag " $arg"
+ continue
+ ;;
+
+ -shared | -static | -prefer-pic | -prefer-non-pic)
+ func_append later " $arg"
+ continue
+ ;;
+
+ -no-suppress)
+ suppress_opt=no
+ continue
+ ;;
+
+ -Xcompiler)
+ arg_mode=arg # the next one goes into the "base_compile" arg list
+ continue # The current "srcfile" will either be retained or
+ ;; # replaced later. I would guess that would be a bug.
+
+ -Wc,*)
+ func_stripname '-Wc,' '' "$arg"
+ args=$func_stripname_result
+ lastarg=
+ save_ifs=$IFS; IFS=,
+ for arg in $args; do
+ IFS=$save_ifs
+ func_append_quoted lastarg "$arg"
+ done
+ IFS=$save_ifs
+ func_stripname ' ' '' "$lastarg"
+ lastarg=$func_stripname_result
+
+ # Add the arguments to base_compile.
+ func_append base_compile " $lastarg"
+ continue
+ ;;
+
+ *)
+ # Accept the current argument as the source file.
+ # The previous "srcfile" becomes the current argument.
+ #
+ lastarg=$srcfile
+ srcfile=$arg
+ ;;
+ esac # case $arg
+ ;;
+ esac # case $arg_mode
+
+ # Aesthetically quote the previous argument.
+ func_append_quoted base_compile "$lastarg"
+ done # for arg
+
+ case $arg_mode in
+ arg)
+ func_fatal_error "you must specify an argument for -Xcompile"
+ ;;
+ target)
+ func_fatal_error "you must specify a target with '-o'"
+ ;;
+ *)
+ # Get the name of the library object.
+ test -z "$libobj" && {
+ func_basename "$srcfile"
+ libobj=$func_basename_result
+ }
+ ;;
+ esac
+
+ # Recognize several different file suffixes.
+ # If the user specifies -o file.o, it is replaced with file.lo
+ case $libobj in
+ *.[cCFSifmso] | \
+ *.ada | *.adb | *.ads | *.asm | \
+ *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \
+ *.[fF][09]? | *.for | *.java | *.go | *.obj | *.sx | *.cu | *.cup)
+ func_xform "$libobj"
+ libobj=$func_xform_result
+ ;;
+ esac
+
+ case $libobj in
+ *.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;;
+ *)
+ func_fatal_error "cannot determine name of library object from '$libobj'"
+ ;;
+ esac
+
+ func_infer_tag $base_compile
+
+ for arg in $later; do
+ case $arg in
+ -shared)
+ test yes = "$build_libtool_libs" \
+ || func_fatal_configuration "cannot build a shared library"
+ build_old_libs=no
+ continue
+ ;;
+
+ -static)
+ build_libtool_libs=no
+ build_old_libs=yes
+ continue
+ ;;
+
+ -prefer-pic)
+ pic_mode=yes
+ continue
+ ;;
+
+ -prefer-non-pic)
+ pic_mode=no
+ continue
+ ;;
+ esac
+ done
+
+ func_quote_for_eval "$libobj"
+ test "X$libobj" != "X$func_quote_for_eval_result" \
+ && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"' &()|`$[]' \
+ && func_warning "libobj name '$libobj' may not contain shell special characters."
+ func_dirname_and_basename "$obj" "/" ""
+ objname=$func_basename_result
+ xdir=$func_dirname_result
+ lobj=$xdir$objdir/$objname
+
+ test -z "$base_compile" && \
+ func_fatal_help "you must specify a compilation command"
+
+ # Delete any leftover library objects.
+ if test yes = "$build_old_libs"; then
+ removelist="$obj $lobj $libobj ${libobj}T"
+ else
+ removelist="$lobj $libobj ${libobj}T"
+ fi
+
+ # On Cygwin there's no "real" PIC flag so we must build both object types
+ case $host_os in
+ cygwin* | mingw* | pw32* | os2* | cegcc*)
+ pic_mode=default
+ ;;
+ esac
+ if test no = "$pic_mode" && test pass_all != "$deplibs_check_method"; then
+ # non-PIC code in shared libraries is not supported
+ pic_mode=default
+ fi
+
+ # Calculate the filename of the output object if compiler does
+ # not support -o with -c
+ if test no = "$compiler_c_o"; then
+ output_obj=`$ECHO "$srcfile" | $SED 's%^.*/%%; s%\.[^.]*$%%'`.$objext
+ lockfile=$output_obj.lock
+ else
+ output_obj=
+ need_locks=no
+ lockfile=
+ fi
+
+ # Lock this critical section if it is needed
+ # We use this script file to make the link, it avoids creating a new file
+ if test yes = "$need_locks"; then
+ until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do
+ func_echo "Waiting for $lockfile to be removed"
+ sleep 2
+ done
+ elif test warn = "$need_locks"; then
+ if test -f "$lockfile"; then
+ $ECHO "\
+*** ERROR, $lockfile exists and contains:
+`cat $lockfile 2>/dev/null`
+
+This indicates that another process is trying to use the same
+temporary object file, and libtool could not work around it because
+your compiler does not support '-c' and '-o' together. If you
+repeat this compilation, it may succeed, by chance, but you had better
+avoid parallel builds (make -j) in this platform, or get a better
+compiler."
+
+ $opt_dry_run || $RM $removelist
+ exit $EXIT_FAILURE
+ fi
+ func_append removelist " $output_obj"
+ $ECHO "$srcfile" > "$lockfile"
+ fi
+
+ $opt_dry_run || $RM $removelist
+ func_append removelist " $lockfile"
+ trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15
+
+ func_to_tool_file "$srcfile" func_convert_file_msys_to_w32
+ srcfile=$func_to_tool_file_result
+ func_quote_for_eval "$srcfile"
+ qsrcfile=$func_quote_for_eval_result
+
+ # Only build a PIC object if we are building libtool libraries.
+ if test yes = "$build_libtool_libs"; then
+ # Without this assignment, base_compile gets emptied.
+ fbsd_hideous_sh_bug=$base_compile
+
+ if test no != "$pic_mode"; then
+ command="$base_compile $qsrcfile $pic_flag"
+ else
+ # Don't build PIC code
+ command="$base_compile $qsrcfile"
+ fi
+
+ func_mkdir_p "$xdir$objdir"
+
+ if test -z "$output_obj"; then
+ # Place PIC objects in $objdir
+ func_append command " -o $lobj"
+ fi
+
+ func_show_eval_locale "$command" \
+ 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE'
+
+ if test warn = "$need_locks" &&
+ test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
+ $ECHO "\
+*** ERROR, $lockfile contains:
+`cat $lockfile 2>/dev/null`
+
+but it should contain:
+$srcfile
+
+This indicates that another process is trying to use the same
+temporary object file, and libtool could not work around it because
+your compiler does not support '-c' and '-o' together. If you
+repeat this compilation, it may succeed, by chance, but you had better
+avoid parallel builds (make -j) in this platform, or get a better
+compiler."
+
+ $opt_dry_run || $RM $removelist
+ exit $EXIT_FAILURE
+ fi
+
+ # Just move the object if needed, then go on to compile the next one
+ if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then
+ func_show_eval '$MV "$output_obj" "$lobj"' \
+ 'error=$?; $opt_dry_run || $RM $removelist; exit $error'
+ fi
+
+ # Allow error messages only from the first compilation.
+ if test yes = "$suppress_opt"; then
+ suppress_output=' >/dev/null 2>&1'
+ fi
+ fi
+
+ # Only build a position-dependent object if we build old libraries.
+ if test yes = "$build_old_libs"; then
+ if test yes != "$pic_mode"; then
+ # Don't build PIC code
+ command="$base_compile $qsrcfile$pie_flag"
+ else
+ command="$base_compile $qsrcfile $pic_flag"
+ fi
+ if test yes = "$compiler_c_o"; then
+ func_append command " -o $obj"
+ fi
+
+ # Suppress compiler output if we already did a PIC compilation.
+ func_append command "$suppress_output"
+ func_show_eval_locale "$command" \
+ '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE'
+
+ if test warn = "$need_locks" &&
+ test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
+ $ECHO "\
+*** ERROR, $lockfile contains:
+`cat $lockfile 2>/dev/null`
+
+but it should contain:
+$srcfile
+
+This indicates that another process is trying to use the same
+temporary object file, and libtool could not work around it because
+your compiler does not support '-c' and '-o' together. If you
+repeat this compilation, it may succeed, by chance, but you had better
+avoid parallel builds (make -j) in this platform, or get a better
+compiler."
+
+ $opt_dry_run || $RM $removelist
+ exit $EXIT_FAILURE
+ fi
+
+ # Just move the object if needed
+ if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then
+ func_show_eval '$MV "$output_obj" "$obj"' \
+ 'error=$?; $opt_dry_run || $RM $removelist; exit $error'
+ fi
+ fi
+
+ $opt_dry_run || {
+ func_write_libtool_object "$libobj" "$objdir/$objname" "$objname"
+
+ # Unlock the critical section if it was locked
+ if test no != "$need_locks"; then
+ removelist=$lockfile
+ $RM "$lockfile"
+ fi
+ }
+
+ exit $EXIT_SUCCESS
+}
+
+$opt_help || {
+ test compile = "$opt_mode" && func_mode_compile ${1+"$@"}
+}
+
+func_mode_help ()
+{
+ # We need to display help for each of the modes.
+ case $opt_mode in
+ "")
+ # Generic help is extracted from the usage comments
+ # at the start of this file.
+ func_help
+ ;;
+
+ clean)
+ $ECHO \
+"Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE...
+
+Remove files from the build directory.
+
+RM is the name of the program to use to delete files associated with each FILE
+(typically '/bin/rm'). RM-OPTIONS are options (such as '-f') to be passed
+to RM.
+
+If FILE is a libtool library, object or program, all the files associated
+with it are deleted. Otherwise, only FILE itself is deleted using RM."
+ ;;
+
+ compile)
+ $ECHO \
+"Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE
+
+Compile a source file into a libtool library object.
+
+This mode accepts the following additional options:
+
+ -o OUTPUT-FILE set the output file name to OUTPUT-FILE
+ -no-suppress do not suppress compiler output for multiple passes
+ -prefer-pic try to build PIC objects only
+ -prefer-non-pic try to build non-PIC objects only
+ -shared do not build a '.o' file suitable for static linking
+ -static only build a '.o' file suitable for static linking
+ -Wc,FLAG pass FLAG directly to the compiler
+
+COMPILE-COMMAND is a command to be used in creating a 'standard' object file
+from the given SOURCEFILE.
+
+The output file name is determined by removing the directory component from
+SOURCEFILE, then substituting the C source code suffix '.c' with the
+library object suffix, '.lo'."
+ ;;
+
+ execute)
+ $ECHO \
+"Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]...
+
+Automatically set library path, then run a program.
+
+This mode accepts the following additional options:
+
+ -dlopen FILE add the directory containing FILE to the library path
+
+This mode sets the library path environment variable according to '-dlopen'
+flags.
+
+If any of the ARGS are libtool executable wrappers, then they are translated
+into their corresponding uninstalled binary, and any of their required library
+directories are added to the library path.
+
+Then, COMMAND is executed, with ARGS as arguments."
+ ;;
+
+ finish)
+ $ECHO \
+"Usage: $progname [OPTION]... --mode=finish [LIBDIR]...
+
+Complete the installation of libtool libraries.
+
+Each LIBDIR is a directory that contains libtool libraries.
+
+The commands that this mode executes may require superuser privileges. Use
+the '--dry-run' option if you just want to see what would be executed."
+ ;;
+
+ install)
+ $ECHO \
+"Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND...
+
+Install executables or libraries.
+
+INSTALL-COMMAND is the installation command. The first component should be
+either the 'install' or 'cp' program.
+
+The following components of INSTALL-COMMAND are treated specially:
+
+ -inst-prefix-dir PREFIX-DIR Use PREFIX-DIR as a staging area for installation
+
+The rest of the components are interpreted as arguments to that command (only
+BSD-compatible install options are recognized)."
+ ;;
+
+ link)
+ $ECHO \
+"Usage: $progname [OPTION]... --mode=link LINK-COMMAND...
+
+Link object files or libraries together to form another library, or to
+create an executable program.
+
+LINK-COMMAND is a command using the C compiler that you would use to create
+a program from several object files.
+
+The following components of LINK-COMMAND are treated specially:
+
+ -all-static do not do any dynamic linking at all
+ -avoid-version do not add a version suffix if possible
+ -bindir BINDIR specify path to binaries directory (for systems where
+ libraries must be found in the PATH setting at runtime)
+ -dlopen FILE '-dlpreopen' FILE if it cannot be dlopened at runtime
+ -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols
+ -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
+ -export-symbols SYMFILE
+ try to export only the symbols listed in SYMFILE
+ -export-symbols-regex REGEX
+ try to export only the symbols matching REGEX
+ -LLIBDIR search LIBDIR for required installed libraries
+ -lNAME OUTPUT-FILE requires the installed library libNAME
+ -module build a library that can dlopened
+ -no-fast-install disable the fast-install mode
+ -no-install link a not-installable executable
+ -no-undefined declare that a library does not refer to external symbols
+ -o OUTPUT-FILE create OUTPUT-FILE from the specified objects
+ -objectlist FILE use a list of object files found in FILE to specify objects
+ -os2dllname NAME force a short DLL name on OS/2 (no effect on other OSes)
+ -precious-files-regex REGEX
+ don't remove output files matching REGEX
+ -release RELEASE specify package release information
+ -rpath LIBDIR the created library will eventually be installed in LIBDIR
+ -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries
+ -shared only do dynamic linking of libtool libraries
+ -shrext SUFFIX override the standard shared library file extension
+ -static do not do any dynamic linking of uninstalled libtool libraries
+ -static-libtool-libs
+ do not do any dynamic linking of libtool libraries
+ -version-info CURRENT[:REVISION[:AGE]]
+ specify library version info [each variable defaults to 0]
+ -weak LIBNAME declare that the target provides the LIBNAME interface
+ -Wc,FLAG
+ -Xcompiler FLAG pass linker-specific FLAG directly to the compiler
+ -Wl,FLAG
+ -Xlinker FLAG pass linker-specific FLAG directly to the linker
+ -XCClinker FLAG pass link-specific FLAG to the compiler driver (CC)
+
+All other options (arguments beginning with '-') are ignored.
+
+Every other argument is treated as a filename. Files ending in '.la' are
+treated as uninstalled libtool libraries, other files are standard or library
+object files.
+
+If the OUTPUT-FILE ends in '.la', then a libtool library is created,
+only library objects ('.lo' files) may be specified, and '-rpath' is
+required, except when creating a convenience library.
+
+If OUTPUT-FILE ends in '.a' or '.lib', then a standard library is created
+using 'ar' and 'ranlib', or on Windows using 'lib'.
+
+If OUTPUT-FILE ends in '.lo' or '.$objext', then a reloadable object file
+is created, otherwise an executable program is created."
+ ;;
+
+ uninstall)
+ $ECHO \
+"Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE...
+
+Remove libraries from an installation directory.
+
+RM is the name of the program to use to delete files associated with each FILE
+(typically '/bin/rm'). RM-OPTIONS are options (such as '-f') to be passed
+to RM.
+
+If FILE is a libtool library, all the files associated with it are deleted.
+Otherwise, only FILE itself is deleted using RM."
+ ;;
+
+ *)
+ func_fatal_help "invalid operation mode '$opt_mode'"
+ ;;
+ esac
+
+ echo
+ $ECHO "Try '$progname --help' for more information about other modes."
+}
+
+# Now that we've collected a possible --mode arg, show help if necessary
+if $opt_help; then
+ if test : = "$opt_help"; then
+ func_mode_help
+ else
+ {
+ func_help noexit
+ for opt_mode in compile link execute install finish uninstall clean; do
+ func_mode_help
+ done
+ } | $SED -n '1p; 2,$s/^Usage:/ or: /p'
+ {
+ func_help noexit
+ for opt_mode in compile link execute install finish uninstall clean; do
+ echo
+ func_mode_help
+ done
+ } |
+ $SED '1d
+ /^When reporting/,/^Report/{
+ H
+ d
+ }
+ $x
+ /information about other modes/d
+ /more detailed .*MODE/d
+ s/^Usage:.*--mode=\([^ ]*\) .*/Description of \1 mode:/'
+ fi
+ exit $?
+fi
+
+
+# func_mode_execute arg...
+func_mode_execute ()
+{
+ $debug_cmd
+
+ # The first argument is the command name.
+ cmd=$nonopt
+ test -z "$cmd" && \
+ func_fatal_help "you must specify a COMMAND"
+
+ # Handle -dlopen flags immediately.
+ for file in $opt_dlopen; do
+ test -f "$file" \
+ || func_fatal_help "'$file' is not a file"
+
+ dir=
+ case $file in
+ *.la)
+ func_resolve_sysroot "$file"
+ file=$func_resolve_sysroot_result
+
+ # Check to see that this really is a libtool archive.
+ func_lalib_unsafe_p "$file" \
+ || func_fatal_help "'$lib' is not a valid libtool archive"
+
+ # Read the libtool library.
+ dlname=
+ library_names=
+ func_source "$file"
+
+ # Skip this library if it cannot be dlopened.
+ if test -z "$dlname"; then
+ # Warn if it was a shared library.
+ test -n "$library_names" && \
+ func_warning "'$file' was not linked with '-export-dynamic'"
+ continue
+ fi
+
+ func_dirname "$file" "" "."
+ dir=$func_dirname_result
+
+ if test -f "$dir/$objdir/$dlname"; then
+ func_append dir "/$objdir"
+ else
+ if test ! -f "$dir/$dlname"; then
+ func_fatal_error "cannot find '$dlname' in '$dir' or '$dir/$objdir'"
+ fi
+ fi
+ ;;
+
+ *.lo)
+ # Just add the directory containing the .lo file.
+ func_dirname "$file" "" "."
+ dir=$func_dirname_result
+ ;;
+
+ *)
+ func_warning "'-dlopen' is ignored for non-libtool libraries and objects"
+ continue
+ ;;
+ esac
+
+ # Get the absolute pathname.
+ absdir=`cd "$dir" && pwd`
+ test -n "$absdir" && dir=$absdir
+
+ # Now add the directory to shlibpath_var.
+ if eval "test -z \"\$$shlibpath_var\""; then
+ eval "$shlibpath_var=\"\$dir\""
+ else
+ eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\""
+ fi
+ done
+
+ # This variable tells wrapper scripts just to set shlibpath_var
+ # rather than running their programs.
+ libtool_execute_magic=$magic
+
+ # Check if any of the arguments is a wrapper script.
+ args=
+ for file
+ do
+ case $file in
+ -* | *.la | *.lo ) ;;
+ *)
+ # Do a test to see if this is really a libtool program.
+ if func_ltwrapper_script_p "$file"; then
+ func_source "$file"
+ # Transform arg to wrapped name.
+ file=$progdir/$program
+ elif func_ltwrapper_executable_p "$file"; then
+ func_ltwrapper_scriptname "$file"
+ func_source "$func_ltwrapper_scriptname_result"
+ # Transform arg to wrapped name.
+ file=$progdir/$program
+ fi
+ ;;
+ esac
+ # Quote arguments (to preserve shell metacharacters).
+ func_append_quoted args "$file"
+ done
+
+ if $opt_dry_run; then
+ # Display what would be done.
+ if test -n "$shlibpath_var"; then
+ eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\""
+ echo "export $shlibpath_var"
+ fi
+ $ECHO "$cmd$args"
+ exit $EXIT_SUCCESS
+ else
+ if test -n "$shlibpath_var"; then
+ # Export the shlibpath_var.
+ eval "export $shlibpath_var"
+ fi
+
+ # Restore saved environment variables
+ for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
+ do
+ eval "if test \"\${save_$lt_var+set}\" = set; then
+ $lt_var=\$save_$lt_var; export $lt_var
+ else
+ $lt_unset $lt_var
+ fi"
+ done
+
+ # Now prepare to actually exec the command.
+ exec_cmd=\$cmd$args
+ fi
+}
+
+test execute = "$opt_mode" && func_mode_execute ${1+"$@"}
+
+
+# func_mode_finish arg...
+func_mode_finish ()
+{
+ $debug_cmd
+
+ libs=
+ libdirs=
+ admincmds=
+
+ for opt in "$nonopt" ${1+"$@"}
+ do
+ if test -d "$opt"; then
+ func_append libdirs " $opt"
+
+ elif test -f "$opt"; then
+ if func_lalib_unsafe_p "$opt"; then
+ func_append libs " $opt"
+ else
+ func_warning "'$opt' is not a valid libtool archive"
+ fi
+
+ else
+ func_fatal_error "invalid argument '$opt'"
+ fi
+ done
+
+ if test -n "$libs"; then
+ if test -n "$lt_sysroot"; then
+ sysroot_regex=`$ECHO "$lt_sysroot" | $SED "$sed_make_literal_regex"`
+ sysroot_cmd="s/\([ ']\)$sysroot_regex/\1/g;"
+ else
+ sysroot_cmd=
+ fi
+
+ # Remove sysroot references
+ if $opt_dry_run; then
+ for lib in $libs; do
+ echo "removing references to $lt_sysroot and '=' prefixes from $lib"
+ done
+ else
+ tmpdir=`func_mktempdir`
+ for lib in $libs; do
+ $SED -e "$sysroot_cmd s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \
+ > $tmpdir/tmp-la
+ mv -f $tmpdir/tmp-la $lib
+ done
+ ${RM}r "$tmpdir"
+ fi
+ fi
+
+ if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
+ for libdir in $libdirs; do
+ if test -n "$finish_cmds"; then
+ # Do each command in the finish commands.
+ func_execute_cmds "$finish_cmds" 'admincmds="$admincmds
+'"$cmd"'"'
+ fi
+ if test -n "$finish_eval"; then
+ # Do the single finish_eval.
+ eval cmds=\"$finish_eval\"
+ $opt_dry_run || eval "$cmds" || func_append admincmds "
+ $cmds"
+ fi
+ done
+ fi
+
+ # Exit here if they wanted silent mode.
+ $opt_quiet && exit $EXIT_SUCCESS
+
+ if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
+ echo "----------------------------------------------------------------------"
+ echo "Libraries have been installed in:"
+ for libdir in $libdirs; do
+ $ECHO " $libdir"
+ done
+ echo
+ echo "If you ever happen to want to link against installed libraries"
+ echo "in a given directory, LIBDIR, you must either use libtool, and"
+ echo "specify the full pathname of the library, or use the '-LLIBDIR'"
+ echo "flag during linking and do at least one of the following:"
+ if test -n "$shlibpath_var"; then
+ echo " - add LIBDIR to the '$shlibpath_var' environment variable"
+ echo " during execution"
+ fi
+ if test -n "$runpath_var"; then
+ echo " - add LIBDIR to the '$runpath_var' environment variable"
+ echo " during linking"
+ fi
+ if test -n "$hardcode_libdir_flag_spec"; then
+ libdir=LIBDIR
+ eval flag=\"$hardcode_libdir_flag_spec\"
+
+ $ECHO " - use the '$flag' linker flag"
+ fi
+ if test -n "$admincmds"; then
+ $ECHO " - have your system administrator run these commands:$admincmds"
+ fi
+ if test -f /etc/ld.so.conf; then
+ echo " - have your system administrator add LIBDIR to '/etc/ld.so.conf'"
+ fi
+ echo
+
+ echo "See any operating system documentation about shared libraries for"
+ case $host in
+ solaris2.[6789]|solaris2.1[0-9])
+ echo "more information, such as the ld(1), crle(1) and ld.so(8) manual"
+ echo "pages."
+ ;;
+ *)
+ echo "more information, such as the ld(1) and ld.so(8) manual pages."
+ ;;
+ esac
+ echo "----------------------------------------------------------------------"
+ fi
+ exit $EXIT_SUCCESS
+}
+
+test finish = "$opt_mode" && func_mode_finish ${1+"$@"}
+
+
+# func_mode_install arg...
+func_mode_install ()
+{
+ $debug_cmd
+
+ # There may be an optional sh(1) argument at the beginning of
+ # install_prog (especially on Windows NT).
+ if test "$SHELL" = "$nonopt" || test /bin/sh = "$nonopt" ||
+ # Allow the use of GNU shtool's install command.
+ case $nonopt in *shtool*) :;; *) false;; esac
+ then
+ # Aesthetically quote it.
+ func_quote_for_eval "$nonopt"
+ install_prog="$func_quote_for_eval_result "
+ arg=$1
+ shift
+ else
+ install_prog=
+ arg=$nonopt
+ fi
+
+ # The real first argument should be the name of the installation program.
+ # Aesthetically quote it.
+ func_quote_for_eval "$arg"
+ func_append install_prog "$func_quote_for_eval_result"
+ install_shared_prog=$install_prog
+ case " $install_prog " in
+ *[\\\ /]cp\ *) install_cp=: ;;
+ *) install_cp=false ;;
+ esac
+
+ # We need to accept at least all the BSD install flags.
+ dest=
+ files=
+ opts=
+ prev=
+ install_type=
+ isdir=false
+ stripme=
+ no_mode=:
+ for arg
+ do
+ arg2=
+ if test -n "$dest"; then
+ func_append files " $dest"
+ dest=$arg
+ continue
+ fi
+
+ case $arg in
+ -d) isdir=: ;;
+ -f)
+ if $install_cp; then :; else
+ prev=$arg
+ fi
+ ;;
+ -g | -m | -o)
+ prev=$arg
+ ;;
+ -s)
+ stripme=" -s"
+ continue
+ ;;
+ -*)
+ ;;
+ *)
+ # If the previous option needed an argument, then skip it.
+ if test -n "$prev"; then
+ if test X-m = "X$prev" && test -n "$install_override_mode"; then
+ arg2=$install_override_mode
+ no_mode=false
+ fi
+ prev=
+ else
+ dest=$arg
+ continue
+ fi
+ ;;
+ esac
+
+ # Aesthetically quote the argument.
+ func_quote_for_eval "$arg"
+ func_append install_prog " $func_quote_for_eval_result"
+ if test -n "$arg2"; then
+ func_quote_for_eval "$arg2"
+ fi
+ func_append install_shared_prog " $func_quote_for_eval_result"
+ done
+
+ test -z "$install_prog" && \
+ func_fatal_help "you must specify an install program"
+
+ test -n "$prev" && \
+ func_fatal_help "the '$prev' option requires an argument"
+
+ if test -n "$install_override_mode" && $no_mode; then
+ if $install_cp; then :; else
+ func_quote_for_eval "$install_override_mode"
+ func_append install_shared_prog " -m $func_quote_for_eval_result"
+ fi
+ fi
+
+ if test -z "$files"; then
+ if test -z "$dest"; then
+ func_fatal_help "no file or destination specified"
+ else
+ func_fatal_help "you must specify a destination"
+ fi
+ fi
+
+ # Strip any trailing slash from the destination.
+ func_stripname '' '/' "$dest"
+ dest=$func_stripname_result
+
+ # Check to see that the destination is a directory.
+ test -d "$dest" && isdir=:
+ if $isdir; then
+ destdir=$dest
+ destname=
+ else
+ func_dirname_and_basename "$dest" "" "."
+ destdir=$func_dirname_result
+ destname=$func_basename_result
+
+ # Not a directory, so check to see that there is only one file specified.
+ set dummy $files; shift
+ test "$#" -gt 1 && \
+ func_fatal_help "'$dest' is not a directory"
+ fi
+ case $destdir in
+ [\\/]* | [A-Za-z]:[\\/]*) ;;
+ *)
+ for file in $files; do
+ case $file in
+ *.lo) ;;
+ *)
+ func_fatal_help "'$destdir' must be an absolute directory name"
+ ;;
+ esac
+ done
+ ;;
+ esac
+
+ # This variable tells wrapper scripts just to set variables rather
+ # than running their programs.
+ libtool_install_magic=$magic
+
+ staticlibs=
+ future_libdirs=
+ current_libdirs=
+ for file in $files; do
+
+ # Do each installation.
+ case $file in
+ *.$libext)
+ # Do the static libraries later.
+ func_append staticlibs " $file"
+ ;;
+
+ *.la)
+ func_resolve_sysroot "$file"
+ file=$func_resolve_sysroot_result
+
+ # Check to see that this really is a libtool archive.
+ func_lalib_unsafe_p "$file" \
+ || func_fatal_help "'$file' is not a valid libtool archive"
+
+ library_names=
+ old_library=
+ relink_command=
+ func_source "$file"
+
+ # Add the libdir to current_libdirs if it is the destination.
+ if test "X$destdir" = "X$libdir"; then
+ case "$current_libdirs " in
+ *" $libdir "*) ;;
+ *) func_append current_libdirs " $libdir" ;;
+ esac
+ else
+ # Note the libdir as a future libdir.
+ case "$future_libdirs " in
+ *" $libdir "*) ;;
+ *) func_append future_libdirs " $libdir" ;;
+ esac
+ fi
+
+ func_dirname "$file" "/" ""
+ dir=$func_dirname_result
+ func_append dir "$objdir"
+
+ if test -n "$relink_command"; then
+ # Determine the prefix the user has applied to our future dir.
+ inst_prefix_dir=`$ECHO "$destdir" | $SED -e "s%$libdir\$%%"`
+
+ # Don't allow the user to place us outside of our expected
+ # location b/c this prevents finding dependent libraries that
+ # are installed to the same prefix.
+ # At present, this check doesn't affect windows .dll's that
+ # are installed into $libdir/../bin (currently, that works fine)
+ # but it's something to keep an eye on.
+ test "$inst_prefix_dir" = "$destdir" && \
+ func_fatal_error "error: cannot install '$file' to a directory not ending in $libdir"
+
+ if test -n "$inst_prefix_dir"; then
+ # Stick the inst_prefix_dir data into the link command.
+ relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"`
+ else
+ relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%%"`
+ fi
+
+ func_warning "relinking '$file'"
+ func_show_eval "$relink_command" \
+ 'func_fatal_error "error: relink '\''$file'\'' with the above command before installing it"'
+ fi
+
+ # See the names of the shared library.
+ set dummy $library_names; shift
+ if test -n "$1"; then
+ realname=$1
+ shift
+
+ srcname=$realname
+ test -n "$relink_command" && srcname=${realname}T
+
+ # Install the shared library and build the symlinks.
+ func_show_eval "$install_shared_prog $dir/$srcname $destdir/$realname" \
+ 'exit $?'
+ tstripme=$stripme
+ case $host_os in
+ cygwin* | mingw* | pw32* | cegcc*)
+ case $realname in
+ *.dll.a)
+ tstripme=
+ ;;
+ esac
+ ;;
+ os2*)
+ case $realname in
+ *_dll.a)
+ tstripme=
+ ;;
+ esac
+ ;;
+ esac
+ if test -n "$tstripme" && test -n "$striplib"; then
+ func_show_eval "$striplib $destdir/$realname" 'exit $?'
+ fi
+
+ if test "$#" -gt 0; then
+ # Delete the old symlinks, and create new ones.
+ # Try 'ln -sf' first, because the 'ln' binary might depend on
+ # the symlink we replace! Solaris /bin/ln does not understand -f,
+ # so we also need to try rm && ln -s.
+ for linkname
+ do
+ test "$linkname" != "$realname" \
+ && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })"
+ done
+ fi
+
+ # Do each command in the postinstall commands.
+ lib=$destdir/$realname
+ func_execute_cmds "$postinstall_cmds" 'exit $?'
+ fi
+
+ # Install the pseudo-library for information purposes.
+ func_basename "$file"
+ name=$func_basename_result
+ instname=$dir/${name}i
+ func_show_eval "$install_prog $instname $destdir/$name" 'exit $?'
+
+ # Maybe install the static library, too.
+ test -n "$old_library" && func_append staticlibs " $dir/$old_library"
+ ;;
+
+ *.lo)
+ # Install (i.e. copy) a libtool object.
+
+ # Figure out destination file name, if it wasn't already specified.
+ if test -n "$destname"; then
+ destfile=$destdir/$destname
+ else
+ func_basename "$file"
+ destfile=$func_basename_result
+ destfile=$destdir/$destfile
+ fi
+
+ # Deduce the name of the destination old-style object file.
+ case $destfile in
+ *.lo)
+ func_lo2o "$destfile"
+ staticdest=$func_lo2o_result
+ ;;
+ *.$objext)
+ staticdest=$destfile
+ destfile=
+ ;;
+ *)
+ func_fatal_help "cannot copy a libtool object to '$destfile'"
+ ;;
+ esac
+
+ # Install the libtool object if requested.
+ test -n "$destfile" && \
+ func_show_eval "$install_prog $file $destfile" 'exit $?'
+
+ # Install the old object if enabled.
+ if test yes = "$build_old_libs"; then
+ # Deduce the name of the old-style object file.
+ func_lo2o "$file"
+ staticobj=$func_lo2o_result
+ func_show_eval "$install_prog \$staticobj \$staticdest" 'exit $?'
+ fi
+ exit $EXIT_SUCCESS
+ ;;
+
+ *)
+ # Figure out destination file name, if it wasn't already specified.
+ if test -n "$destname"; then
+ destfile=$destdir/$destname
+ else
+ func_basename "$file"
+ destfile=$func_basename_result
+ destfile=$destdir/$destfile
+ fi
+
+ # If the file is missing, and there is a .exe on the end, strip it
+ # because it is most likely a libtool script we actually want to
+ # install
+ stripped_ext=
+ case $file in
+ *.exe)
+ if test ! -f "$file"; then
+ func_stripname '' '.exe' "$file"
+ file=$func_stripname_result
+ stripped_ext=.exe
+ fi
+ ;;
+ esac
+
+ # Do a test to see if this is really a libtool program.
+ case $host in
+ *cygwin* | *mingw*)
+ if func_ltwrapper_executable_p "$file"; then
+ func_ltwrapper_scriptname "$file"
+ wrapper=$func_ltwrapper_scriptname_result
+ else
+ func_stripname '' '.exe' "$file"
+ wrapper=$func_stripname_result
+ fi
+ ;;
+ *)
+ wrapper=$file
+ ;;
+ esac
+ if func_ltwrapper_script_p "$wrapper"; then
+ notinst_deplibs=
+ relink_command=
+
+ func_source "$wrapper"
+
+ # Check the variables that should have been set.
+ test -z "$generated_by_libtool_version" && \
+ func_fatal_error "invalid libtool wrapper script '$wrapper'"
+
+ finalize=:
+ for lib in $notinst_deplibs; do
+ # Check to see that each library is installed.
+ libdir=
+ if test -f "$lib"; then
+ func_source "$lib"
+ fi
+ libfile=$libdir/`$ECHO "$lib" | $SED 's%^.*/%%g'`
+ if test -n "$libdir" && test ! -f "$libfile"; then
+ func_warning "'$lib' has not been installed in '$libdir'"
+ finalize=false
+ fi
+ done
+
+ relink_command=
+ func_source "$wrapper"
+
+ outputname=
+ if test no = "$fast_install" && test -n "$relink_command"; then
+ $opt_dry_run || {
+ if $finalize; then
+ tmpdir=`func_mktempdir`
+ func_basename "$file$stripped_ext"
+ file=$func_basename_result
+ outputname=$tmpdir/$file
+ # Replace the output file specification.
+ relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'`
+
+ $opt_quiet || {
+ func_quote_for_expand "$relink_command"
+ eval "func_echo $func_quote_for_expand_result"
+ }
+ if eval "$relink_command"; then :
+ else
+ func_error "error: relink '$file' with the above command before installing it"
+ $opt_dry_run || ${RM}r "$tmpdir"
+ continue
+ fi
+ file=$outputname
+ else
+ func_warning "cannot relink '$file'"
+ fi
+ }
+ else
+ # Install the binary that we compiled earlier.
+ file=`$ECHO "$file$stripped_ext" | $SED "s%\([^/]*\)$%$objdir/\1%"`
+ fi
+ fi
+
+ # remove .exe since cygwin /usr/bin/install will append another
+ # one anyway
+ case $install_prog,$host in
+ */usr/bin/install*,*cygwin*)
+ case $file:$destfile in
+ *.exe:*.exe)
+ # this is ok
+ ;;
+ *.exe:*)
+ destfile=$destfile.exe
+ ;;
+ *:*.exe)
+ func_stripname '' '.exe' "$destfile"
+ destfile=$func_stripname_result
+ ;;
+ esac
+ ;;
+ esac
+ func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?'
+ $opt_dry_run || if test -n "$outputname"; then
+ ${RM}r "$tmpdir"
+ fi
+ ;;
+ esac
+ done
+
+ for file in $staticlibs; do
+ func_basename "$file"
+ name=$func_basename_result
+
+ # Set up the ranlib parameters.
+ oldlib=$destdir/$name
+ func_to_tool_file "$oldlib" func_convert_file_msys_to_w32
+ tool_oldlib=$func_to_tool_file_result
+
+ func_show_eval "$install_prog \$file \$oldlib" 'exit $?'
+
+ if test -n "$stripme" && test -n "$old_striplib"; then
+ func_show_eval "$old_striplib $tool_oldlib" 'exit $?'
+ fi
+
+ # Do each command in the postinstall commands.
+ func_execute_cmds "$old_postinstall_cmds" 'exit $?'
+ done
+
+ test -n "$future_libdirs" && \
+ func_warning "remember to run '$progname --finish$future_libdirs'"
+
+ if test -n "$current_libdirs"; then
+ # Maybe just do a dry run.
+ $opt_dry_run && current_libdirs=" -n$current_libdirs"
+ exec_cmd='$SHELL "$progpath" $preserve_args --finish$current_libdirs'
+ else
+ exit $EXIT_SUCCESS
+ fi
+}
+
+test install = "$opt_mode" && func_mode_install ${1+"$@"}
+
+
+# func_generate_dlsyms outputname originator pic_p
+# Extract symbols from dlprefiles and create ${outputname}S.o with
+# a dlpreopen symbol table.
+func_generate_dlsyms ()
+{
+ $debug_cmd
+
+ my_outputname=$1
+ my_originator=$2
+ my_pic_p=${3-false}
+ my_prefix=`$ECHO "$my_originator" | $SED 's%[^a-zA-Z0-9]%_%g'`
+ my_dlsyms=
+
+ if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then
+ if test -n "$NM" && test -n "$global_symbol_pipe"; then
+ my_dlsyms=${my_outputname}S.c
+ else
+ func_error "not configured to extract global symbols from dlpreopened files"
+ fi
+ fi
+
+ if test -n "$my_dlsyms"; then
+ case $my_dlsyms in
+ "") ;;
+ *.c)
+ # Discover the nlist of each of the dlfiles.
+ nlist=$output_objdir/$my_outputname.nm
+
+ func_show_eval "$RM $nlist ${nlist}S ${nlist}T"
+
+ # Parse the name list into a source file.
+ func_verbose "creating $output_objdir/$my_dlsyms"
+
+ $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\
+/* $my_dlsyms - symbol resolution table for '$my_outputname' dlsym emulation. */
+/* Generated by $PROGRAM (GNU $PACKAGE) $VERSION */
+
+#ifdef __cplusplus
+extern \"C\" {
+#endif
+
+#if defined __GNUC__ && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4))
+#pragma GCC diagnostic ignored \"-Wstrict-prototypes\"
+#endif
+
+/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */
+#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE
+/* DATA imports from DLLs on WIN32 can't be const, because runtime
+ relocations are performed -- see ld's documentation on pseudo-relocs. */
+# define LT_DLSYM_CONST
+#elif defined __osf__
+/* This system does not cope well with relocations in const data. */
+# define LT_DLSYM_CONST
+#else
+# define LT_DLSYM_CONST const
+#endif
+
+#define STREQ(s1, s2) (strcmp ((s1), (s2)) == 0)
+
+/* External symbol declarations for the compiler. */\
+"
+
+ if test yes = "$dlself"; then
+ func_verbose "generating symbol list for '$output'"
+
+ $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist"
+
+ # Add our own program objects to the symbol list.
+ progfiles=`$ECHO "$objs$old_deplibs" | $SP2NL | $SED "$lo2o" | $NL2SP`
+ for progfile in $progfiles; do
+ func_to_tool_file "$progfile" func_convert_file_msys_to_w32
+ func_verbose "extracting global C symbols from '$func_to_tool_file_result'"
+ $opt_dry_run || eval "$NM $func_to_tool_file_result | $global_symbol_pipe >> '$nlist'"
+ done
+
+ if test -n "$exclude_expsyms"; then
+ $opt_dry_run || {
+ eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T'
+ eval '$MV "$nlist"T "$nlist"'
+ }
+ fi
+
+ if test -n "$export_symbols_regex"; then
+ $opt_dry_run || {
+ eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T'
+ eval '$MV "$nlist"T "$nlist"'
+ }
+ fi
+
+ # Prepare the list of exported symbols
+ if test -z "$export_symbols"; then
+ export_symbols=$output_objdir/$outputname.exp
+ $opt_dry_run || {
+ $RM $export_symbols
+ eval "$SED -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
+ case $host in
+ *cygwin* | *mingw* | *cegcc* )
+ eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
+ eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"'
+ ;;
+ esac
+ }
+ else
+ $opt_dry_run || {
+ eval "$SED -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"'
+ eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T'
+ eval '$MV "$nlist"T "$nlist"'
+ case $host in
+ *cygwin* | *mingw* | *cegcc* )
+ eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
+ eval 'cat "$nlist" >> "$output_objdir/$outputname.def"'
+ ;;
+ esac
+ }
+ fi
+ fi
+
+ for dlprefile in $dlprefiles; do
+ func_verbose "extracting global C symbols from '$dlprefile'"
+ func_basename "$dlprefile"
+ name=$func_basename_result
+ case $host in
+ *cygwin* | *mingw* | *cegcc* )
+ # if an import library, we need to obtain dlname
+ if func_win32_import_lib_p "$dlprefile"; then
+ func_tr_sh "$dlprefile"
+ eval "curr_lafile=\$libfile_$func_tr_sh_result"
+ dlprefile_dlbasename=
+ if test -n "$curr_lafile" && func_lalib_p "$curr_lafile"; then
+ # Use subshell, to avoid clobbering current variable values
+ dlprefile_dlname=`source "$curr_lafile" && echo "$dlname"`
+ if test -n "$dlprefile_dlname"; then
+ func_basename "$dlprefile_dlname"
+ dlprefile_dlbasename=$func_basename_result
+ else
+ # no lafile. user explicitly requested -dlpreopen <import library>.
+ $sharedlib_from_linklib_cmd "$dlprefile"
+ dlprefile_dlbasename=$sharedlib_from_linklib_result
+ fi
+ fi
+ $opt_dry_run || {
+ if test -n "$dlprefile_dlbasename"; then
+ eval '$ECHO ": $dlprefile_dlbasename" >> "$nlist"'
+ else
+ func_warning "Could not compute DLL name from $name"
+ eval '$ECHO ": $name " >> "$nlist"'
+ fi
+ func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32
+ eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe |
+ $SED -e '/I __imp/d' -e 's/I __nm_/D /;s/_nm__//' >> '$nlist'"
+ }
+ else # not an import lib
+ $opt_dry_run || {
+ eval '$ECHO ": $name " >> "$nlist"'
+ func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32
+ eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'"
+ }
+ fi
+ ;;
+ *)
+ $opt_dry_run || {
+ eval '$ECHO ": $name " >> "$nlist"'
+ func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32
+ eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'"
+ }
+ ;;
+ esac
+ done
+
+ $opt_dry_run || {
+ # Make sure we have at least an empty file.
+ test -f "$nlist" || : > "$nlist"
+
+ if test -n "$exclude_expsyms"; then
+ $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T
+ $MV "$nlist"T "$nlist"
+ fi
+
+ # Try sorting and uniquifying the output.
+ if $GREP -v "^: " < "$nlist" |
+ if sort -k 3 </dev/null >/dev/null 2>&1; then
+ sort -k 3
+ else
+ sort +2
+ fi |
+ uniq > "$nlist"S; then
+ :
+ else
+ $GREP -v "^: " < "$nlist" > "$nlist"S
+ fi
+
+ if test -f "$nlist"S; then
+ eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"'
+ else
+ echo '/* NONE */' >> "$output_objdir/$my_dlsyms"
+ fi
+
+ func_show_eval '$RM "${nlist}I"'
+ if test -n "$global_symbol_to_import"; then
+ eval "$global_symbol_to_import"' < "$nlist"S > "$nlist"I'
+ fi
+
+ echo >> "$output_objdir/$my_dlsyms" "\
+
+/* The mapping between symbol names and symbols. */
+typedef struct {
+ const char *name;
+ void *address;
+} lt_dlsymlist;
+extern LT_DLSYM_CONST lt_dlsymlist
+lt_${my_prefix}_LTX_preloaded_symbols[];\
+"
+
+ if test -s "$nlist"I; then
+ echo >> "$output_objdir/$my_dlsyms" "\
+static void lt_syminit(void)
+{
+ LT_DLSYM_CONST lt_dlsymlist *symbol = lt_${my_prefix}_LTX_preloaded_symbols;
+ for (; symbol->name; ++symbol)
+ {"
+ $SED 's/.*/ if (STREQ (symbol->name, \"&\")) symbol->address = (void *) \&&;/' < "$nlist"I >> "$output_objdir/$my_dlsyms"
+ echo >> "$output_objdir/$my_dlsyms" "\
+ }
+}"
+ fi
+ echo >> "$output_objdir/$my_dlsyms" "\
+LT_DLSYM_CONST lt_dlsymlist
+lt_${my_prefix}_LTX_preloaded_symbols[] =
+{ {\"$my_originator\", (void *) 0},"
+
+ if test -s "$nlist"I; then
+ echo >> "$output_objdir/$my_dlsyms" "\
+ {\"@INIT@\", (void *) &lt_syminit},"
+ fi
+
+ case $need_lib_prefix in
+ no)
+ eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms"
+ ;;
+ *)
+ eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms"
+ ;;
+ esac
+ echo >> "$output_objdir/$my_dlsyms" "\
+ {0, (void *) 0}
+};
+
+/* This works around a problem in FreeBSD linker */
+#ifdef FREEBSD_WORKAROUND
+static const void *lt_preloaded_setup() {
+ return lt_${my_prefix}_LTX_preloaded_symbols;
+}
+#endif
+
+#ifdef __cplusplus
+}
+#endif\
+"
+ } # !$opt_dry_run
+
+ pic_flag_for_symtable=
+ case "$compile_command " in
+ *" -static "*) ;;
+ *)
+ case $host in
+ # compiling the symbol table file with pic_flag works around
+ # a FreeBSD bug that causes programs to crash when -lm is
+ # linked before any other PIC object. But we must not use
+ # pic_flag when linking with -static. The problem exists in
+ # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1.
+ *-*-freebsd2.*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
+ pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;;
+ *-*-hpux*)
+ pic_flag_for_symtable=" $pic_flag" ;;
+ *)
+ $my_pic_p && pic_flag_for_symtable=" $pic_flag"
+ ;;
+ esac
+ ;;
+ esac
+ symtab_cflags=
+ for arg in $LTCFLAGS; do
+ case $arg in
+ -pie | -fpie | -fPIE) ;;
+ *) func_append symtab_cflags " $arg" ;;
+ esac
+ done
+
+ # Now compile the dynamic symbol file.
+ func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?'
+
+ # Clean up the generated files.
+ func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T" "${nlist}I"'
+
+ # Transform the symbol file into the correct name.
+ symfileobj=$output_objdir/${my_outputname}S.$objext
+ case $host in
+ *cygwin* | *mingw* | *cegcc* )
+ if test -f "$output_objdir/$my_outputname.def"; then
+ compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
+ finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
+ else
+ compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"`
+ finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"`
+ fi
+ ;;
+ *)
+ compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"`
+ finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"`
+ ;;
+ esac
+ ;;
+ *)
+ func_fatal_error "unknown suffix for '$my_dlsyms'"
+ ;;
+ esac
+ else
+ # We keep going just in case the user didn't refer to
+ # lt_preloaded_symbols. The linker will fail if global_symbol_pipe
+ # really was required.
+
+ # Nullify the symbol file.
+ compile_command=`$ECHO "$compile_command" | $SED "s% @SYMFILE@%%"`
+ finalize_command=`$ECHO "$finalize_command" | $SED "s% @SYMFILE@%%"`
+ fi
+}
+
+# func_cygming_gnu_implib_p ARG
+# This predicate returns with zero status (TRUE) if
+# ARG is a GNU/binutils-style import library. Returns
+# with nonzero status (FALSE) otherwise.
+func_cygming_gnu_implib_p ()
+{
+ $debug_cmd
+
+ func_to_tool_file "$1" func_convert_file_msys_to_w32
+ func_cygming_gnu_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $EGREP ' (_head_[A-Za-z0-9_]+_[ad]l*|[A-Za-z0-9_]+_[ad]l*_iname)$'`
+ test -n "$func_cygming_gnu_implib_tmp"
+}
+
+# func_cygming_ms_implib_p ARG
+# This predicate returns with zero status (TRUE) if
+# ARG is an MS-style import library. Returns
+# with nonzero status (FALSE) otherwise.
+func_cygming_ms_implib_p ()
+{
+ $debug_cmd
+
+ func_to_tool_file "$1" func_convert_file_msys_to_w32
+ func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'`
+ test -n "$func_cygming_ms_implib_tmp"
+}
+
+# func_win32_libid arg
+# return the library type of file 'arg'
+#
+# Need a lot of goo to handle *both* DLLs and import libs
+# Has to be a shell function in order to 'eat' the argument
+# that is supplied when $file_magic_command is called.
+# Despite the name, also deal with 64 bit binaries.
+func_win32_libid ()
+{
+ $debug_cmd
+
+ win32_libid_type=unknown
+ win32_fileres=`file -L $1 2>/dev/null`
+ case $win32_fileres in
+ *ar\ archive\ import\ library*) # definitely import
+ win32_libid_type="x86 archive import"
+ ;;
+ *ar\ archive*) # could be an import, or static
+ # Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD.
+ if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null |
+ $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then
+ case $nm_interface in
+ "MS dumpbin")
+ if func_cygming_ms_implib_p "$1" ||
+ func_cygming_gnu_implib_p "$1"
+ then
+ win32_nmres=import
+ else
+ win32_nmres=
+ fi
+ ;;
+ *)
+ func_to_tool_file "$1" func_convert_file_msys_to_w32
+ win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" |
+ $SED -n -e '
+ 1,100{
+ / I /{
+ s|.*|import|
+ p
+ q
+ }
+ }'`
+ ;;
+ esac
+ case $win32_nmres in
+ import*) win32_libid_type="x86 archive import";;
+ *) win32_libid_type="x86 archive static";;
+ esac
+ fi
+ ;;
+ *DLL*)
+ win32_libid_type="x86 DLL"
+ ;;
+ *executable*) # but shell scripts are "executable" too...
+ case $win32_fileres in
+ *MS\ Windows\ PE\ Intel*)
+ win32_libid_type="x86 DLL"
+ ;;
+ esac
+ ;;
+ esac
+ $ECHO "$win32_libid_type"
+}
+
+# func_cygming_dll_for_implib ARG
+#
+# Platform-specific function to extract the
+# name of the DLL associated with the specified
+# import library ARG.
+# Invoked by eval'ing the libtool variable
+# $sharedlib_from_linklib_cmd
+# Result is available in the variable
+# $sharedlib_from_linklib_result
+func_cygming_dll_for_implib ()
+{
+ $debug_cmd
+
+ sharedlib_from_linklib_result=`$DLLTOOL --identify-strict --identify "$1"`
+}
+
+# func_cygming_dll_for_implib_fallback_core SECTION_NAME LIBNAMEs
+#
+# The is the core of a fallback implementation of a
+# platform-specific function to extract the name of the
+# DLL associated with the specified import library LIBNAME.
+#
+# SECTION_NAME is either .idata$6 or .idata$7, depending
+# on the platform and compiler that created the implib.
+#
+# Echos the name of the DLL associated with the
+# specified import library.
+func_cygming_dll_for_implib_fallback_core ()
+{
+ $debug_cmd
+
+ match_literal=`$ECHO "$1" | $SED "$sed_make_literal_regex"`
+ $OBJDUMP -s --section "$1" "$2" 2>/dev/null |
+ $SED '/^Contents of section '"$match_literal"':/{
+ # Place marker at beginning of archive member dllname section
+ s/.*/====MARK====/
+ p
+ d
+ }
+ # These lines can sometimes be longer than 43 characters, but
+ # are always uninteresting
+ /:[ ]*file format pe[i]\{,1\}-/d
+ /^In archive [^:]*:/d
+ # Ensure marker is printed
+ /^====MARK====/p
+ # Remove all lines with less than 43 characters
+ /^.\{43\}/!d
+ # From remaining lines, remove first 43 characters
+ s/^.\{43\}//' |
+ $SED -n '
+ # Join marker and all lines until next marker into a single line
+ /^====MARK====/ b para
+ H
+ $ b para
+ b
+ :para
+ x
+ s/\n//g
+ # Remove the marker
+ s/^====MARK====//
+ # Remove trailing dots and whitespace
+ s/[\. \t]*$//
+ # Print
+ /./p' |
+ # we now have a list, one entry per line, of the stringified
+ # contents of the appropriate section of all members of the
+ # archive that possess that section. Heuristic: eliminate
+ # all those that have a first or second character that is
+ # a '.' (that is, objdump's representation of an unprintable
+ # character.) This should work for all archives with less than
+ # 0x302f exports -- but will fail for DLLs whose name actually
+ # begins with a literal '.' or a single character followed by
+ # a '.'.
+ #
+ # Of those that remain, print the first one.
+ $SED -e '/^\./d;/^.\./d;q'
+}
+
+# func_cygming_dll_for_implib_fallback ARG
+# Platform-specific function to extract the
+# name of the DLL associated with the specified
+# import library ARG.
+#
+# This fallback implementation is for use when $DLLTOOL
+# does not support the --identify-strict option.
+# Invoked by eval'ing the libtool variable
+# $sharedlib_from_linklib_cmd
+# Result is available in the variable
+# $sharedlib_from_linklib_result
+func_cygming_dll_for_implib_fallback ()
+{
+ $debug_cmd
+
+ if func_cygming_gnu_implib_p "$1"; then
+ # binutils import library
+ sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$7' "$1"`
+ elif func_cygming_ms_implib_p "$1"; then
+ # ms-generated import library
+ sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$6' "$1"`
+ else
+ # unknown
+ sharedlib_from_linklib_result=
+ fi
+}
+
+
+# func_extract_an_archive dir oldlib
+func_extract_an_archive ()
+{
+ $debug_cmd
+
+ f_ex_an_ar_dir=$1; shift
+ f_ex_an_ar_oldlib=$1
+ if test yes = "$lock_old_archive_extraction"; then
+ lockfile=$f_ex_an_ar_oldlib.lock
+ until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do
+ func_echo "Waiting for $lockfile to be removed"
+ sleep 2
+ done
+ fi
+ func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" \
+ 'stat=$?; rm -f "$lockfile"; exit $stat'
+ if test yes = "$lock_old_archive_extraction"; then
+ $opt_dry_run || rm -f "$lockfile"
+ fi
+ if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then
+ :
+ else
+ func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib"
+ fi
+}
+
+
+# func_extract_archives gentop oldlib ...
+func_extract_archives ()
+{
+ $debug_cmd
+
+ my_gentop=$1; shift
+ my_oldlibs=${1+"$@"}
+ my_oldobjs=
+ my_xlib=
+ my_xabs=
+ my_xdir=
+
+ for my_xlib in $my_oldlibs; do
+ # Extract the objects.
+ case $my_xlib in
+ [\\/]* | [A-Za-z]:[\\/]*) my_xabs=$my_xlib ;;
+ *) my_xabs=`pwd`"/$my_xlib" ;;
+ esac
+ func_basename "$my_xlib"
+ my_xlib=$func_basename_result
+ my_xlib_u=$my_xlib
+ while :; do
+ case " $extracted_archives " in
+ *" $my_xlib_u "*)
+ func_arith $extracted_serial + 1
+ extracted_serial=$func_arith_result
+ my_xlib_u=lt$extracted_serial-$my_xlib ;;
+ *) break ;;
+ esac
+ done
+ extracted_archives="$extracted_archives $my_xlib_u"
+ my_xdir=$my_gentop/$my_xlib_u
+
+ func_mkdir_p "$my_xdir"
+
+ case $host in
+ *-darwin*)
+ func_verbose "Extracting $my_xabs"
+ # Do not bother doing anything if just a dry run
+ $opt_dry_run || {
+ darwin_orig_dir=`pwd`
+ cd $my_xdir || exit $?
+ darwin_archive=$my_xabs
+ darwin_curdir=`pwd`
+ func_basename "$darwin_archive"
+ darwin_base_archive=$func_basename_result
+ darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true`
+ if test -n "$darwin_arches"; then
+ darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'`
+ darwin_arch=
+ func_verbose "$darwin_base_archive has multiple architectures $darwin_arches"
+ for darwin_arch in $darwin_arches; do
+ func_mkdir_p "unfat-$$/$darwin_base_archive-$darwin_arch"
+ $LIPO -thin $darwin_arch -output "unfat-$$/$darwin_base_archive-$darwin_arch/$darwin_base_archive" "$darwin_archive"
+ cd "unfat-$$/$darwin_base_archive-$darwin_arch"
+ func_extract_an_archive "`pwd`" "$darwin_base_archive"
+ cd "$darwin_curdir"
+ $RM "unfat-$$/$darwin_base_archive-$darwin_arch/$darwin_base_archive"
+ done # $darwin_arches
+ ## Okay now we've a bunch of thin objects, gotta fatten them up :)
+ darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$sed_basename" | sort -u`
+ darwin_file=
+ darwin_files=
+ for darwin_file in $darwin_filelist; do
+ darwin_files=`find unfat-$$ -name $darwin_file -print | sort | $NL2SP`
+ $LIPO -create -output "$darwin_file" $darwin_files
+ done # $darwin_filelist
+ $RM -rf unfat-$$
+ cd "$darwin_orig_dir"
+ else
+ cd $darwin_orig_dir
+ func_extract_an_archive "$my_xdir" "$my_xabs"
+ fi # $darwin_arches
+ } # !$opt_dry_run
+ ;;
+ *)
+ func_extract_an_archive "$my_xdir" "$my_xabs"
+ ;;
+ esac
+ my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | sort | $NL2SP`
+ done
+
+ func_extract_archives_result=$my_oldobjs
+}
+
+
+# func_emit_wrapper [arg=no]
+#
+# Emit a libtool wrapper script on stdout.
+# Don't directly open a file because we may want to
+# incorporate the script contents within a cygwin/mingw
+# wrapper executable. Must ONLY be called from within
+# func_mode_link because it depends on a number of variables
+# set therein.
+#
+# ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR
+# variable will take. If 'yes', then the emitted script
+# will assume that the directory where it is stored is
+# the $objdir directory. This is a cygwin/mingw-specific
+# behavior.
+func_emit_wrapper ()
+{
+ func_emit_wrapper_arg1=${1-no}
+
+ $ECHO "\
+#! $SHELL
+
+# $output - temporary wrapper script for $objdir/$outputname
+# Generated by $PROGRAM (GNU $PACKAGE) $VERSION
+#
+# The $output program cannot be directly executed until all the libtool
+# libraries that it depends on are installed.
+#
+# This wrapper script should never be moved out of the build directory.
+# If it is, it will not operate correctly.
+
+# Sed substitution that helps us do robust quoting. It backslashifies
+# metacharacters that are still active within double-quoted strings.
+sed_quote_subst='$sed_quote_subst'
+
+# Be Bourne compatible
+if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '\${1+\"\$@\"}'='\"\$@\"'
+ setopt NO_GLOB_SUBST
+else
+ case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac
+fi
+BIN_SH=xpg4; export BIN_SH # for Tru64
+DUALCASE=1; export DUALCASE # for MKS sh
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+relink_command=\"$relink_command\"
+
+# This environment variable determines our operation mode.
+if test \"\$libtool_install_magic\" = \"$magic\"; then
+ # install mode needs the following variables:
+ generated_by_libtool_version='$macro_version'
+ notinst_deplibs='$notinst_deplibs'
+else
+ # When we are sourced in execute mode, \$file and \$ECHO are already set.
+ if test \"\$libtool_execute_magic\" != \"$magic\"; then
+ file=\"\$0\""
+
+ qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"`
+ $ECHO "\
+
+# A function that is used when there is no print builtin or printf.
+func_fallback_echo ()
+{
+ eval 'cat <<_LTECHO_EOF
+\$1
+_LTECHO_EOF'
+}
+ ECHO=\"$qECHO\"
+ fi
+
+# Very basic option parsing. These options are (a) specific to
+# the libtool wrapper, (b) are identical between the wrapper
+# /script/ and the wrapper /executable/ that is used only on
+# windows platforms, and (c) all begin with the string "--lt-"
+# (application programs are unlikely to have options that match
+# this pattern).
+#
+# There are only two supported options: --lt-debug and
+# --lt-dump-script. There is, deliberately, no --lt-help.
+#
+# The first argument to this parsing function should be the
+# script's $0 value, followed by "$@".
+lt_option_debug=
+func_parse_lt_options ()
+{
+ lt_script_arg0=\$0
+ shift
+ for lt_opt
+ do
+ case \"\$lt_opt\" in
+ --lt-debug) lt_option_debug=1 ;;
+ --lt-dump-script)
+ lt_dump_D=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%/[^/]*$%%'\`
+ test \"X\$lt_dump_D\" = \"X\$lt_script_arg0\" && lt_dump_D=.
+ lt_dump_F=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%^.*/%%'\`
+ cat \"\$lt_dump_D/\$lt_dump_F\"
+ exit 0
+ ;;
+ --lt-*)
+ \$ECHO \"Unrecognized --lt- option: '\$lt_opt'\" 1>&2
+ exit 1
+ ;;
+ esac
+ done
+
+ # Print the debug banner immediately:
+ if test -n \"\$lt_option_debug\"; then
+ echo \"$outputname:$output:\$LINENO: libtool wrapper (GNU $PACKAGE) $VERSION\" 1>&2
+ fi
+}
+
+# Used when --lt-debug. Prints its arguments to stdout
+# (redirection is the responsibility of the caller)
+func_lt_dump_args ()
+{
+ lt_dump_args_N=1;
+ for lt_arg
+ do
+ \$ECHO \"$outputname:$output:\$LINENO: newargv[\$lt_dump_args_N]: \$lt_arg\"
+ lt_dump_args_N=\`expr \$lt_dump_args_N + 1\`
+ done
+}
+
+# Core function for launching the target application
+func_exec_program_core ()
+{
+"
+ case $host in
+ # Backslashes separate directories on plain windows
+ *-*-mingw | *-*-os2* | *-cegcc*)
+ $ECHO "\
+ if test -n \"\$lt_option_debug\"; then
+ \$ECHO \"$outputname:$output:\$LINENO: newargv[0]: \$progdir\\\\\$program\" 1>&2
+ func_lt_dump_args \${1+\"\$@\"} 1>&2
+ fi
+ exec \"\$progdir\\\\\$program\" \${1+\"\$@\"}
+"
+ ;;
+
+ *)
+ $ECHO "\
+ if test -n \"\$lt_option_debug\"; then
+ \$ECHO \"$outputname:$output:\$LINENO: newargv[0]: \$progdir/\$program\" 1>&2
+ func_lt_dump_args \${1+\"\$@\"} 1>&2
+ fi
+ exec \"\$progdir/\$program\" \${1+\"\$@\"}
+"
+ ;;
+ esac
+ $ECHO "\
+ \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2
+ exit 1
+}
+
+# A function to encapsulate launching the target application
+# Strips options in the --lt-* namespace from \$@ and
+# launches target application with the remaining arguments.
+func_exec_program ()
+{
+ case \" \$* \" in
+ *\\ --lt-*)
+ for lt_wr_arg
+ do
+ case \$lt_wr_arg in
+ --lt-*) ;;
+ *) set x \"\$@\" \"\$lt_wr_arg\"; shift;;
+ esac
+ shift
+ done ;;
+ esac
+ func_exec_program_core \${1+\"\$@\"}
+}
+
+ # Parse options
+ func_parse_lt_options \"\$0\" \${1+\"\$@\"}
+
+ # Find the directory that this script lives in.
+ thisdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*$%%'\`
+ test \"x\$thisdir\" = \"x\$file\" && thisdir=.
+
+ # Follow symbolic links until we get to the real thisdir.
+ file=\`ls -ld \"\$file\" | $SED -n 's/.*-> //p'\`
+ while test -n \"\$file\"; do
+ destdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*\$%%'\`
+
+ # If there was a directory component, then change thisdir.
+ if test \"x\$destdir\" != \"x\$file\"; then
+ case \"\$destdir\" in
+ [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;;
+ *) thisdir=\"\$thisdir/\$destdir\" ;;
+ esac
+ fi
+
+ file=\`\$ECHO \"\$file\" | $SED 's%^.*/%%'\`
+ file=\`ls -ld \"\$thisdir/\$file\" | $SED -n 's/.*-> //p'\`
+ done
+
+ # Usually 'no', except on cygwin/mingw when embedded into
+ # the cwrapper.
+ WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_arg1
+ if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then
+ # special case for '.'
+ if test \"\$thisdir\" = \".\"; then
+ thisdir=\`pwd\`
+ fi
+ # remove .libs from thisdir
+ case \"\$thisdir\" in
+ *[\\\\/]$objdir ) thisdir=\`\$ECHO \"\$thisdir\" | $SED 's%[\\\\/][^\\\\/]*$%%'\` ;;
+ $objdir ) thisdir=. ;;
+ esac
+ fi
+
+ # Try to get the absolute directory name.
+ absdir=\`cd \"\$thisdir\" && pwd\`
+ test -n \"\$absdir\" && thisdir=\"\$absdir\"
+"
+
+ if test yes = "$fast_install"; then
+ $ECHO "\
+ program=lt-'$outputname'$exeext
+ progdir=\"\$thisdir/$objdir\"
+
+ if test ! -f \"\$progdir/\$program\" ||
+ { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | $SED 1q\`; \\
+ test \"X\$file\" != \"X\$progdir/\$program\"; }; then
+
+ file=\"\$\$-\$program\"
+
+ if test ! -d \"\$progdir\"; then
+ $MKDIR \"\$progdir\"
+ else
+ $RM \"\$progdir/\$file\"
+ fi"
+
+ $ECHO "\
+
+ # relink executable if necessary
+ if test -n \"\$relink_command\"; then
+ if relink_command_output=\`eval \$relink_command 2>&1\`; then :
+ else
+ \$ECHO \"\$relink_command_output\" >&2
+ $RM \"\$progdir/\$file\"
+ exit 1
+ fi
+ fi
+
+ $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null ||
+ { $RM \"\$progdir/\$program\";
+ $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; }
+ $RM \"\$progdir/\$file\"
+ fi"
+ else
+ $ECHO "\
+ program='$outputname'
+ progdir=\"\$thisdir/$objdir\"
+"
+ fi
+
+ $ECHO "\
+
+ if test -f \"\$progdir/\$program\"; then"
+
+ # fixup the dll searchpath if we need to.
+ #
+ # Fix the DLL searchpath if we need to. Do this before prepending
+ # to shlibpath, because on Windows, both are PATH and uninstalled
+ # libraries must come first.
+ if test -n "$dllsearchpath"; then
+ $ECHO "\
+ # Add the dll search path components to the executable PATH
+ PATH=$dllsearchpath:\$PATH
+"
+ fi
+
+ # Export our shlibpath_var if we have one.
+ if test yes = "$shlibpath_overrides_runpath" && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
+ $ECHO "\
+ # Add our own library path to $shlibpath_var
+ $shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
+
+ # Some systems cannot cope with colon-terminated $shlibpath_var
+ # The second colon is a workaround for a bug in BeOS R4 sed
+ $shlibpath_var=\`\$ECHO \"\$$shlibpath_var\" | $SED 's/::*\$//'\`
+
+ export $shlibpath_var
+"
+ fi
+
+ $ECHO "\
+ if test \"\$libtool_execute_magic\" != \"$magic\"; then
+ # Run the actual program with our arguments.
+ func_exec_program \${1+\"\$@\"}
+ fi
+ else
+ # The program doesn't exist.
+ \$ECHO \"\$0: error: '\$progdir/\$program' does not exist\" 1>&2
+ \$ECHO \"This script is just a wrapper for \$program.\" 1>&2
+ \$ECHO \"See the $PACKAGE documentation for more information.\" 1>&2
+ exit 1
+ fi
+fi\
+"
+}
+
+
+# func_emit_cwrapperexe_src
+# emit the source code for a wrapper executable on stdout
+# Must ONLY be called from within func_mode_link because
+# it depends on a number of variable set therein.
+func_emit_cwrapperexe_src ()
+{
+ cat <<EOF
+
+/* $cwrappersource - temporary wrapper executable for $objdir/$outputname
+ Generated by $PROGRAM (GNU $PACKAGE) $VERSION
+
+ The $output program cannot be directly executed until all the libtool
+ libraries that it depends on are installed.
+
+ This wrapper executable should never be moved out of the build directory.
+ If it is, it will not operate correctly.
+*/
+EOF
+ cat <<"EOF"
+#ifdef _MSC_VER
+# define _CRT_SECURE_NO_DEPRECATE 1
+#endif
+#include <stdio.h>
+#include <stdlib.h>
+#ifdef _MSC_VER
+# include <direct.h>
+# include <process.h>
+# include <io.h>
+#else
+# include <unistd.h>
+# include <stdint.h>
+# ifdef __CYGWIN__
+# include <io.h>
+# endif
+#endif
+#include <malloc.h>
+#include <stdarg.h>
+#include <assert.h>
+#include <string.h>
+#include <ctype.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <sys/stat.h>
+
+#define STREQ(s1, s2) (strcmp ((s1), (s2)) == 0)
+
+/* declarations of non-ANSI functions */
+#if defined __MINGW32__
+# ifdef __STRICT_ANSI__
+int _putenv (const char *);
+# endif
+#elif defined __CYGWIN__
+# ifdef __STRICT_ANSI__
+char *realpath (const char *, char *);
+int putenv (char *);
+int setenv (const char *, const char *, int);
+# endif
+/* #elif defined other_platform || defined ... */
+#endif
+
+/* portability defines, excluding path handling macros */
+#if defined _MSC_VER
+# define setmode _setmode
+# define stat _stat
+# define chmod _chmod
+# define getcwd _getcwd
+# define putenv _putenv
+# define S_IXUSR _S_IEXEC
+#elif defined __MINGW32__
+# define setmode _setmode
+# define stat _stat
+# define chmod _chmod
+# define getcwd _getcwd
+# define putenv _putenv
+#elif defined __CYGWIN__
+# define HAVE_SETENV
+# define FOPEN_WB "wb"
+/* #elif defined other platforms ... */
+#endif
+
+#if defined PATH_MAX
+# define LT_PATHMAX PATH_MAX
+#elif defined MAXPATHLEN
+# define LT_PATHMAX MAXPATHLEN
+#else
+# define LT_PATHMAX 1024
+#endif
+
+#ifndef S_IXOTH
+# define S_IXOTH 0
+#endif
+#ifndef S_IXGRP
+# define S_IXGRP 0
+#endif
+
+/* path handling portability macros */
+#ifndef DIR_SEPARATOR
+# define DIR_SEPARATOR '/'
+# define PATH_SEPARATOR ':'
+#endif
+
+#if defined _WIN32 || defined __MSDOS__ || defined __DJGPP__ || \
+ defined __OS2__
+# define HAVE_DOS_BASED_FILE_SYSTEM
+# define FOPEN_WB "wb"
+# ifndef DIR_SEPARATOR_2
+# define DIR_SEPARATOR_2 '\\'
+# endif
+# ifndef PATH_SEPARATOR_2
+# define PATH_SEPARATOR_2 ';'
+# endif
+#endif
+
+#ifndef DIR_SEPARATOR_2
+# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR)
+#else /* DIR_SEPARATOR_2 */
+# define IS_DIR_SEPARATOR(ch) \
+ (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2))
+#endif /* DIR_SEPARATOR_2 */
+
+#ifndef PATH_SEPARATOR_2
+# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR)
+#else /* PATH_SEPARATOR_2 */
+# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2)
+#endif /* PATH_SEPARATOR_2 */
+
+#ifndef FOPEN_WB
+# define FOPEN_WB "w"
+#endif
+#ifndef _O_BINARY
+# define _O_BINARY 0
+#endif
+
+#define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type)))
+#define XFREE(stale) do { \
+ if (stale) { free (stale); stale = 0; } \
+} while (0)
+
+#if defined LT_DEBUGWRAPPER
+static int lt_debug = 1;
+#else
+static int lt_debug = 0;
+#endif
+
+const char *program_name = "libtool-wrapper"; /* in case xstrdup fails */
+
+void *xmalloc (size_t num);
+char *xstrdup (const char *string);
+const char *base_name (const char *name);
+char *find_executable (const char *wrapper);
+char *chase_symlinks (const char *pathspec);
+int make_executable (const char *path);
+int check_executable (const char *path);
+char *strendzap (char *str, const char *pat);
+void lt_debugprintf (const char *file, int line, const char *fmt, ...);
+void lt_fatal (const char *file, int line, const char *message, ...);
+static const char *nonnull (const char *s);
+static const char *nonempty (const char *s);
+void lt_setenv (const char *name, const char *value);
+char *lt_extend_str (const char *orig_value, const char *add, int to_end);
+void lt_update_exe_path (const char *name, const char *value);
+void lt_update_lib_path (const char *name, const char *value);
+char **prepare_spawn (char **argv);
+void lt_dump_script (FILE *f);
+EOF
+
+ cat <<EOF
+#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 5)
+# define externally_visible volatile
+#else
+# define externally_visible __attribute__((externally_visible)) volatile
+#endif
+externally_visible const char * MAGIC_EXE = "$magic_exe";
+const char * LIB_PATH_VARNAME = "$shlibpath_var";
+EOF
+
+ if test yes = "$shlibpath_overrides_runpath" && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
+ func_to_host_path "$temp_rpath"
+ cat <<EOF
+const char * LIB_PATH_VALUE = "$func_to_host_path_result";
+EOF
+ else
+ cat <<"EOF"
+const char * LIB_PATH_VALUE = "";
+EOF
+ fi
+
+ if test -n "$dllsearchpath"; then
+ func_to_host_path "$dllsearchpath:"
+ cat <<EOF
+const char * EXE_PATH_VARNAME = "PATH";
+const char * EXE_PATH_VALUE = "$func_to_host_path_result";
+EOF
+ else
+ cat <<"EOF"
+const char * EXE_PATH_VARNAME = "";
+const char * EXE_PATH_VALUE = "";
+EOF
+ fi
+
+ if test yes = "$fast_install"; then
+ cat <<EOF
+const char * TARGET_PROGRAM_NAME = "lt-$outputname"; /* hopefully, no .exe */
+EOF
+ else
+ cat <<EOF
+const char * TARGET_PROGRAM_NAME = "$outputname"; /* hopefully, no .exe */
+EOF
+ fi
+
+
+ cat <<"EOF"
+
+#define LTWRAPPER_OPTION_PREFIX "--lt-"
+
+static const char *ltwrapper_option_prefix = LTWRAPPER_OPTION_PREFIX;
+static const char *dumpscript_opt = LTWRAPPER_OPTION_PREFIX "dump-script";
+static const char *debug_opt = LTWRAPPER_OPTION_PREFIX "debug";
+
+int
+main (int argc, char *argv[])
+{
+ char **newargz;
+ int newargc;
+ char *tmp_pathspec;
+ char *actual_cwrapper_path;
+ char *actual_cwrapper_name;
+ char *target_name;
+ char *lt_argv_zero;
+ int rval = 127;
+
+ int i;
+
+ program_name = (char *) xstrdup (base_name (argv[0]));
+ newargz = XMALLOC (char *, (size_t) argc + 1);
+
+ /* very simple arg parsing; don't want to rely on getopt
+ * also, copy all non cwrapper options to newargz, except
+ * argz[0], which is handled differently
+ */
+ newargc=0;
+ for (i = 1; i < argc; i++)
+ {
+ if (STREQ (argv[i], dumpscript_opt))
+ {
+EOF
+ case $host in
+ *mingw* | *cygwin* )
+ # make stdout use "unix" line endings
+ echo " setmode(1,_O_BINARY);"
+ ;;
+ esac
+
+ cat <<"EOF"
+ lt_dump_script (stdout);
+ return 0;
+ }
+ if (STREQ (argv[i], debug_opt))
+ {
+ lt_debug = 1;
+ continue;
+ }
+ if (STREQ (argv[i], ltwrapper_option_prefix))
+ {
+ /* however, if there is an option in the LTWRAPPER_OPTION_PREFIX
+ namespace, but it is not one of the ones we know about and
+ have already dealt with, above (inluding dump-script), then
+ report an error. Otherwise, targets might begin to believe
+ they are allowed to use options in the LTWRAPPER_OPTION_PREFIX
+ namespace. The first time any user complains about this, we'll
+ need to make LTWRAPPER_OPTION_PREFIX a configure-time option
+ or a configure.ac-settable value.
+ */
+ lt_fatal (__FILE__, __LINE__,
+ "unrecognized %s option: '%s'",
+ ltwrapper_option_prefix, argv[i]);
+ }
+ /* otherwise ... */
+ newargz[++newargc] = xstrdup (argv[i]);
+ }
+ newargz[++newargc] = NULL;
+
+EOF
+ cat <<EOF
+ /* The GNU banner must be the first non-error debug message */
+ lt_debugprintf (__FILE__, __LINE__, "libtool wrapper (GNU $PACKAGE) $VERSION\n");
+EOF
+ cat <<"EOF"
+ lt_debugprintf (__FILE__, __LINE__, "(main) argv[0]: %s\n", argv[0]);
+ lt_debugprintf (__FILE__, __LINE__, "(main) program_name: %s\n", program_name);
+
+ tmp_pathspec = find_executable (argv[0]);
+ if (tmp_pathspec == NULL)
+ lt_fatal (__FILE__, __LINE__, "couldn't find %s", argv[0]);
+ lt_debugprintf (__FILE__, __LINE__,
+ "(main) found exe (before symlink chase) at: %s\n",
+ tmp_pathspec);
+
+ actual_cwrapper_path = chase_symlinks (tmp_pathspec);
+ lt_debugprintf (__FILE__, __LINE__,
+ "(main) found exe (after symlink chase) at: %s\n",
+ actual_cwrapper_path);
+ XFREE (tmp_pathspec);
+
+ actual_cwrapper_name = xstrdup (base_name (actual_cwrapper_path));
+ strendzap (actual_cwrapper_path, actual_cwrapper_name);
+
+ /* wrapper name transforms */
+ strendzap (actual_cwrapper_name, ".exe");
+ tmp_pathspec = lt_extend_str (actual_cwrapper_name, ".exe", 1);
+ XFREE (actual_cwrapper_name);
+ actual_cwrapper_name = tmp_pathspec;
+ tmp_pathspec = 0;
+
+ /* target_name transforms -- use actual target program name; might have lt- prefix */
+ target_name = xstrdup (base_name (TARGET_PROGRAM_NAME));
+ strendzap (target_name, ".exe");
+ tmp_pathspec = lt_extend_str (target_name, ".exe", 1);
+ XFREE (target_name);
+ target_name = tmp_pathspec;
+ tmp_pathspec = 0;
+
+ lt_debugprintf (__FILE__, __LINE__,
+ "(main) libtool target name: %s\n",
+ target_name);
+EOF
+
+ cat <<EOF
+ newargz[0] =
+ XMALLOC (char, (strlen (actual_cwrapper_path) +
+ strlen ("$objdir") + 1 + strlen (actual_cwrapper_name) + 1));
+ strcpy (newargz[0], actual_cwrapper_path);
+ strcat (newargz[0], "$objdir");
+ strcat (newargz[0], "/");
+EOF
+
+ cat <<"EOF"
+ /* stop here, and copy so we don't have to do this twice */
+ tmp_pathspec = xstrdup (newargz[0]);
+
+ /* do NOT want the lt- prefix here, so use actual_cwrapper_name */
+ strcat (newargz[0], actual_cwrapper_name);
+
+ /* DO want the lt- prefix here if it exists, so use target_name */
+ lt_argv_zero = lt_extend_str (tmp_pathspec, target_name, 1);
+ XFREE (tmp_pathspec);
+ tmp_pathspec = NULL;
+EOF
+
+ case $host_os in
+ mingw*)
+ cat <<"EOF"
+ {
+ char* p;
+ while ((p = strchr (newargz[0], '\\')) != NULL)
+ {
+ *p = '/';
+ }
+ while ((p = strchr (lt_argv_zero, '\\')) != NULL)
+ {
+ *p = '/';
+ }
+ }
+EOF
+ ;;
+ esac
+
+ cat <<"EOF"
+ XFREE (target_name);
+ XFREE (actual_cwrapper_path);
+ XFREE (actual_cwrapper_name);
+
+ lt_setenv ("BIN_SH", "xpg4"); /* for Tru64 */
+ lt_setenv ("DUALCASE", "1"); /* for MSK sh */
+ /* Update the DLL searchpath. EXE_PATH_VALUE ($dllsearchpath) must
+ be prepended before (that is, appear after) LIB_PATH_VALUE ($temp_rpath)
+ because on Windows, both *_VARNAMEs are PATH but uninstalled
+ libraries must come first. */
+ lt_update_exe_path (EXE_PATH_VARNAME, EXE_PATH_VALUE);
+ lt_update_lib_path (LIB_PATH_VARNAME, LIB_PATH_VALUE);
+
+ lt_debugprintf (__FILE__, __LINE__, "(main) lt_argv_zero: %s\n",
+ nonnull (lt_argv_zero));
+ for (i = 0; i < newargc; i++)
+ {
+ lt_debugprintf (__FILE__, __LINE__, "(main) newargz[%d]: %s\n",
+ i, nonnull (newargz[i]));
+ }
+
+EOF
+
+ case $host_os in
+ mingw*)
+ cat <<"EOF"
+ /* execv doesn't actually work on mingw as expected on unix */
+ newargz = prepare_spawn (newargz);
+ rval = (int) _spawnv (_P_WAIT, lt_argv_zero, (const char * const *) newargz);
+ if (rval == -1)
+ {
+ /* failed to start process */
+ lt_debugprintf (__FILE__, __LINE__,
+ "(main) failed to launch target \"%s\": %s\n",
+ lt_argv_zero, nonnull (strerror (errno)));
+ return 127;
+ }
+ return rval;
+EOF
+ ;;
+ *)
+ cat <<"EOF"
+ execv (lt_argv_zero, newargz);
+ return rval; /* =127, but avoids unused variable warning */
+EOF
+ ;;
+ esac
+
+ cat <<"EOF"
+}
+
+void *
+xmalloc (size_t num)
+{
+ void *p = (void *) malloc (num);
+ if (!p)
+ lt_fatal (__FILE__, __LINE__, "memory exhausted");
+
+ return p;
+}
+
+char *
+xstrdup (const char *string)
+{
+ return string ? strcpy ((char *) xmalloc (strlen (string) + 1),
+ string) : NULL;
+}
+
+const char *
+base_name (const char *name)
+{
+ const char *base;
+
+#if defined HAVE_DOS_BASED_FILE_SYSTEM
+ /* Skip over the disk name in MSDOS pathnames. */
+ if (isalpha ((unsigned char) name[0]) && name[1] == ':')
+ name += 2;
+#endif
+
+ for (base = name; *name; name++)
+ if (IS_DIR_SEPARATOR (*name))
+ base = name + 1;
+ return base;
+}
+
+int
+check_executable (const char *path)
+{
+ struct stat st;
+
+ lt_debugprintf (__FILE__, __LINE__, "(check_executable): %s\n",
+ nonempty (path));
+ if ((!path) || (!*path))
+ return 0;
+
+ if ((stat (path, &st) >= 0)
+ && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH)))
+ return 1;
+ else
+ return 0;
+}
+
+int
+make_executable (const char *path)
+{
+ int rval = 0;
+ struct stat st;
+
+ lt_debugprintf (__FILE__, __LINE__, "(make_executable): %s\n",
+ nonempty (path));
+ if ((!path) || (!*path))
+ return 0;
+
+ if (stat (path, &st) >= 0)
+ {
+ rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR);
+ }
+ return rval;
+}
+
+/* Searches for the full path of the wrapper. Returns
+ newly allocated full path name if found, NULL otherwise
+ Does not chase symlinks, even on platforms that support them.
+*/
+char *
+find_executable (const char *wrapper)
+{
+ int has_slash = 0;
+ const char *p;
+ const char *p_next;
+ /* static buffer for getcwd */
+ char tmp[LT_PATHMAX + 1];
+ size_t tmp_len;
+ char *concat_name;
+
+ lt_debugprintf (__FILE__, __LINE__, "(find_executable): %s\n",
+ nonempty (wrapper));
+
+ if ((wrapper == NULL) || (*wrapper == '\0'))
+ return NULL;
+
+ /* Absolute path? */
+#if defined HAVE_DOS_BASED_FILE_SYSTEM
+ if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':')
+ {
+ concat_name = xstrdup (wrapper);
+ if (check_executable (concat_name))
+ return concat_name;
+ XFREE (concat_name);
+ }
+ else
+ {
+#endif
+ if (IS_DIR_SEPARATOR (wrapper[0]))
+ {
+ concat_name = xstrdup (wrapper);
+ if (check_executable (concat_name))
+ return concat_name;
+ XFREE (concat_name);
+ }
+#if defined HAVE_DOS_BASED_FILE_SYSTEM
+ }
+#endif
+
+ for (p = wrapper; *p; p++)
+ if (*p == '/')
+ {
+ has_slash = 1;
+ break;
+ }
+ if (!has_slash)
+ {
+ /* no slashes; search PATH */
+ const char *path = getenv ("PATH");
+ if (path != NULL)
+ {
+ for (p = path; *p; p = p_next)
+ {
+ const char *q;
+ size_t p_len;
+ for (q = p; *q; q++)
+ if (IS_PATH_SEPARATOR (*q))
+ break;
+ p_len = (size_t) (q - p);
+ p_next = (*q == '\0' ? q : q + 1);
+ if (p_len == 0)
+ {
+ /* empty path: current directory */
+ if (getcwd (tmp, LT_PATHMAX) == NULL)
+ lt_fatal (__FILE__, __LINE__, "getcwd failed: %s",
+ nonnull (strerror (errno)));
+ tmp_len = strlen (tmp);
+ concat_name =
+ XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1);
+ memcpy (concat_name, tmp, tmp_len);
+ concat_name[tmp_len] = '/';
+ strcpy (concat_name + tmp_len + 1, wrapper);
+ }
+ else
+ {
+ concat_name =
+ XMALLOC (char, p_len + 1 + strlen (wrapper) + 1);
+ memcpy (concat_name, p, p_len);
+ concat_name[p_len] = '/';
+ strcpy (concat_name + p_len + 1, wrapper);
+ }
+ if (check_executable (concat_name))
+ return concat_name;
+ XFREE (concat_name);
+ }
+ }
+ /* not found in PATH; assume curdir */
+ }
+ /* Relative path | not found in path: prepend cwd */
+ if (getcwd (tmp, LT_PATHMAX) == NULL)
+ lt_fatal (__FILE__, __LINE__, "getcwd failed: %s",
+ nonnull (strerror (errno)));
+ tmp_len = strlen (tmp);
+ concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1);
+ memcpy (concat_name, tmp, tmp_len);
+ concat_name[tmp_len] = '/';
+ strcpy (concat_name + tmp_len + 1, wrapper);
+
+ if (check_executable (concat_name))
+ return concat_name;
+ XFREE (concat_name);
+ return NULL;
+}
+
+char *
+chase_symlinks (const char *pathspec)
+{
+#ifndef S_ISLNK
+ return xstrdup (pathspec);
+#else
+ char buf[LT_PATHMAX];
+ struct stat s;
+ char *tmp_pathspec = xstrdup (pathspec);
+ char *p;
+ int has_symlinks = 0;
+ while (strlen (tmp_pathspec) && !has_symlinks)
+ {
+ lt_debugprintf (__FILE__, __LINE__,
+ "checking path component for symlinks: %s\n",
+ tmp_pathspec);
+ if (lstat (tmp_pathspec, &s) == 0)
+ {
+ if (S_ISLNK (s.st_mode) != 0)
+ {
+ has_symlinks = 1;
+ break;
+ }
+
+ /* search backwards for last DIR_SEPARATOR */
+ p = tmp_pathspec + strlen (tmp_pathspec) - 1;
+ while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p)))
+ p--;
+ if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p)))
+ {
+ /* no more DIR_SEPARATORS left */
+ break;
+ }
+ *p = '\0';
+ }
+ else
+ {
+ lt_fatal (__FILE__, __LINE__,
+ "error accessing file \"%s\": %s",
+ tmp_pathspec, nonnull (strerror (errno)));
+ }
+ }
+ XFREE (tmp_pathspec);
+
+ if (!has_symlinks)
+ {
+ return xstrdup (pathspec);
+ }
+
+ tmp_pathspec = realpath (pathspec, buf);
+ if (tmp_pathspec == 0)
+ {
+ lt_fatal (__FILE__, __LINE__,
+ "could not follow symlinks for %s", pathspec);
+ }
+ return xstrdup (tmp_pathspec);
+#endif
+}
+
+char *
+strendzap (char *str, const char *pat)
+{
+ size_t len, patlen;
+
+ assert (str != NULL);
+ assert (pat != NULL);
+
+ len = strlen (str);
+ patlen = strlen (pat);
+
+ if (patlen <= len)
+ {
+ str += len - patlen;
+ if (STREQ (str, pat))
+ *str = '\0';
+ }
+ return str;
+}
+
+void
+lt_debugprintf (const char *file, int line, const char *fmt, ...)
+{
+ va_list args;
+ if (lt_debug)
+ {
+ (void) fprintf (stderr, "%s:%s:%d: ", program_name, file, line);
+ va_start (args, fmt);
+ (void) vfprintf (stderr, fmt, args);
+ va_end (args);
+ }
+}
+
+static void
+lt_error_core (int exit_status, const char *file,
+ int line, const char *mode,
+ const char *message, va_list ap)
+{
+ fprintf (stderr, "%s:%s:%d: %s: ", program_name, file, line, mode);
+ vfprintf (stderr, message, ap);
+ fprintf (stderr, ".\n");
+
+ if (exit_status >= 0)
+ exit (exit_status);
+}
+
+void
+lt_fatal (const char *file, int line, const char *message, ...)
+{
+ va_list ap;
+ va_start (ap, message);
+ lt_error_core (EXIT_FAILURE, file, line, "FATAL", message, ap);
+ va_end (ap);
+}
+
+static const char *
+nonnull (const char *s)
+{
+ return s ? s : "(null)";
+}
+
+static const char *
+nonempty (const char *s)
+{
+ return (s && !*s) ? "(empty)" : nonnull (s);
+}
+
+void
+lt_setenv (const char *name, const char *value)
+{
+ lt_debugprintf (__FILE__, __LINE__,
+ "(lt_setenv) setting '%s' to '%s'\n",
+ nonnull (name), nonnull (value));
+ {
+#ifdef HAVE_SETENV
+ /* always make a copy, for consistency with !HAVE_SETENV */
+ char *str = xstrdup (value);
+ setenv (name, str, 1);
+#else
+ size_t len = strlen (name) + 1 + strlen (value) + 1;
+ char *str = XMALLOC (char, len);
+ sprintf (str, "%s=%s", name, value);
+ if (putenv (str) != EXIT_SUCCESS)
+ {
+ XFREE (str);
+ }
+#endif
+ }
+}
+
+char *
+lt_extend_str (const char *orig_value, const char *add, int to_end)
+{
+ char *new_value;
+ if (orig_value && *orig_value)
+ {
+ size_t orig_value_len = strlen (orig_value);
+ size_t add_len = strlen (add);
+ new_value = XMALLOC (char, add_len + orig_value_len + 1);
+ if (to_end)
+ {
+ strcpy (new_value, orig_value);
+ strcpy (new_value + orig_value_len, add);
+ }
+ else
+ {
+ strcpy (new_value, add);
+ strcpy (new_value + add_len, orig_value);
+ }
+ }
+ else
+ {
+ new_value = xstrdup (add);
+ }
+ return new_value;
+}
+
+void
+lt_update_exe_path (const char *name, const char *value)
+{
+ lt_debugprintf (__FILE__, __LINE__,
+ "(lt_update_exe_path) modifying '%s' by prepending '%s'\n",
+ nonnull (name), nonnull (value));
+
+ if (name && *name && value && *value)
+ {
+ char *new_value = lt_extend_str (getenv (name), value, 0);
+ /* some systems can't cope with a ':'-terminated path #' */
+ size_t len = strlen (new_value);
+ while ((len > 0) && IS_PATH_SEPARATOR (new_value[len-1]))
+ {
+ new_value[--len] = '\0';
+ }
+ lt_setenv (name, new_value);
+ XFREE (new_value);
+ }
+}
+
+void
+lt_update_lib_path (const char *name, const char *value)
+{
+ lt_debugprintf (__FILE__, __LINE__,
+ "(lt_update_lib_path) modifying '%s' by prepending '%s'\n",
+ nonnull (name), nonnull (value));
+
+ if (name && *name && value && *value)
+ {
+ char *new_value = lt_extend_str (getenv (name), value, 0);
+ lt_setenv (name, new_value);
+ XFREE (new_value);
+ }
+}
+
+EOF
+ case $host_os in
+ mingw*)
+ cat <<"EOF"
+
+/* Prepares an argument vector before calling spawn().
+ Note that spawn() does not by itself call the command interpreter
+ (getenv ("COMSPEC") != NULL ? getenv ("COMSPEC") :
+ ({ OSVERSIONINFO v; v.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
+ GetVersionEx(&v);
+ v.dwPlatformId == VER_PLATFORM_WIN32_NT;
+ }) ? "cmd.exe" : "command.com").
+ Instead it simply concatenates the arguments, separated by ' ', and calls
+ CreateProcess(). We must quote the arguments since Win32 CreateProcess()
+ interprets characters like ' ', '\t', '\\', '"' (but not '<' and '>') in a
+ special way:
+ - Space and tab are interpreted as delimiters. They are not treated as
+ delimiters if they are surrounded by double quotes: "...".
+ - Unescaped double quotes are removed from the input. Their only effect is
+ that within double quotes, space and tab are treated like normal
+ characters.
+ - Backslashes not followed by double quotes are not special.
+ - But 2*n+1 backslashes followed by a double quote become
+ n backslashes followed by a double quote (n >= 0):
+ \" -> "
+ \\\" -> \"
+ \\\\\" -> \\"
+ */
+#define SHELL_SPECIAL_CHARS "\"\\ \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037"
+#define SHELL_SPACE_CHARS " \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037"
+char **
+prepare_spawn (char **argv)
+{
+ size_t argc;
+ char **new_argv;
+ size_t i;
+
+ /* Count number of arguments. */
+ for (argc = 0; argv[argc] != NULL; argc++)
+ ;
+
+ /* Allocate new argument vector. */
+ new_argv = XMALLOC (char *, argc + 1);
+
+ /* Put quoted arguments into the new argument vector. */
+ for (i = 0; i < argc; i++)
+ {
+ const char *string = argv[i];
+
+ if (string[0] == '\0')
+ new_argv[i] = xstrdup ("\"\"");
+ else if (strpbrk (string, SHELL_SPECIAL_CHARS) != NULL)
+ {
+ int quote_around = (strpbrk (string, SHELL_SPACE_CHARS) != NULL);
+ size_t length;
+ unsigned int backslashes;
+ const char *s;
+ char *quoted_string;
+ char *p;
+
+ length = 0;
+ backslashes = 0;
+ if (quote_around)
+ length++;
+ for (s = string; *s != '\0'; s++)
+ {
+ char c = *s;
+ if (c == '"')
+ length += backslashes + 1;
+ length++;
+ if (c == '\\')
+ backslashes++;
+ else
+ backslashes = 0;
+ }
+ if (quote_around)
+ length += backslashes + 1;
+
+ quoted_string = XMALLOC (char, length + 1);
+
+ p = quoted_string;
+ backslashes = 0;
+ if (quote_around)
+ *p++ = '"';
+ for (s = string; *s != '\0'; s++)
+ {
+ char c = *s;
+ if (c == '"')
+ {
+ unsigned int j;
+ for (j = backslashes + 1; j > 0; j--)
+ *p++ = '\\';
+ }
+ *p++ = c;
+ if (c == '\\')
+ backslashes++;
+ else
+ backslashes = 0;
+ }
+ if (quote_around)
+ {
+ unsigned int j;
+ for (j = backslashes; j > 0; j--)
+ *p++ = '\\';
+ *p++ = '"';
+ }
+ *p = '\0';
+
+ new_argv[i] = quoted_string;
+ }
+ else
+ new_argv[i] = (char *) string;
+ }
+ new_argv[argc] = NULL;
+
+ return new_argv;
+}
+EOF
+ ;;
+ esac
+
+ cat <<"EOF"
+void lt_dump_script (FILE* f)
+{
+EOF
+ func_emit_wrapper yes |
+ $SED -n -e '
+s/^\(.\{79\}\)\(..*\)/\1\
+\2/
+h
+s/\([\\"]\)/\\\1/g
+s/$/\\n/
+s/\([^\n]*\).*/ fputs ("\1", f);/p
+g
+D'
+ cat <<"EOF"
+}
+EOF
+}
+# end: func_emit_cwrapperexe_src
+
+# func_win32_import_lib_p ARG
+# True if ARG is an import lib, as indicated by $file_magic_cmd
+func_win32_import_lib_p ()
+{
+ $debug_cmd
+
+ case `eval $file_magic_cmd \"\$1\" 2>/dev/null | $SED -e 10q` in
+ *import*) : ;;
+ *) false ;;
+ esac
+}
+
+# func_suncc_cstd_abi
+# !!ONLY CALL THIS FOR SUN CC AFTER $compile_command IS FULLY EXPANDED!!
+# Several compiler flags select an ABI that is incompatible with the
+# Cstd library. Avoid specifying it if any are in CXXFLAGS.
+func_suncc_cstd_abi ()
+{
+ $debug_cmd
+
+ case " $compile_command " in
+ *" -compat=g "*|*\ -std=c++[0-9][0-9]\ *|*" -library=stdcxx4 "*|*" -library=stlport4 "*)
+ suncc_use_cstd_abi=no
+ ;;
+ *)
+ suncc_use_cstd_abi=yes
+ ;;
+ esac
+}
+
+# func_mode_link arg...
+func_mode_link ()
+{
+ $debug_cmd
+
+ case $host in
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
+ # It is impossible to link a dll without this setting, and
+ # we shouldn't force the makefile maintainer to figure out
+ # what system we are compiling for in order to pass an extra
+ # flag for every libtool invocation.
+ # allow_undefined=no
+
+ # FIXME: Unfortunately, there are problems with the above when trying
+ # to make a dll that has undefined symbols, in which case not
+ # even a static library is built. For now, we need to specify
+ # -no-undefined on the libtool link line when we can be certain
+ # that all symbols are satisfied, otherwise we get a static library.
+ allow_undefined=yes
+ ;;
+ *)
+ allow_undefined=yes
+ ;;
+ esac
+ libtool_args=$nonopt
+ base_compile="$nonopt $@"
+ compile_command=$nonopt
+ finalize_command=$nonopt
+
+ compile_rpath=
+ finalize_rpath=
+ compile_shlibpath=
+ finalize_shlibpath=
+ convenience=
+ old_convenience=
+ deplibs=
+ old_deplibs=
+ compiler_flags=
+ linker_flags=
+ dllsearchpath=
+ lib_search_path=`pwd`
+ inst_prefix_dir=
+ new_inherited_linker_flags=
+
+ avoid_version=no
+ bindir=
+ dlfiles=
+ dlprefiles=
+ dlself=no
+ export_dynamic=no
+ export_symbols=
+ export_symbols_regex=
+ generated=
+ libobjs=
+ ltlibs=
+ module=no
+ no_install=no
+ objs=
+ os2dllname=
+ non_pic_objects=
+ precious_files_regex=
+ prefer_static_libs=no
+ preload=false
+ prev=
+ prevarg=
+ release=
+ rpath=
+ xrpath=
+ perm_rpath=
+ temp_rpath=
+ thread_safe=no
+ vinfo=
+ vinfo_number=no
+ weak_libs=
+ single_module=$wl-single_module
+ func_infer_tag $base_compile
+
+ # We need to know -static, to get the right output filenames.
+ for arg
+ do
+ case $arg in
+ -shared)
+ test yes != "$build_libtool_libs" \
+ && func_fatal_configuration "cannot build a shared library"
+ build_old_libs=no
+ break
+ ;;
+ -all-static | -static | -static-libtool-libs)
+ case $arg in
+ -all-static)
+ if test yes = "$build_libtool_libs" && test -z "$link_static_flag"; then
+ func_warning "complete static linking is impossible in this configuration"
+ fi
+ if test -n "$link_static_flag"; then
+ dlopen_self=$dlopen_self_static
+ fi
+ prefer_static_libs=yes
+ ;;
+ -static)
+ if test -z "$pic_flag" && test -n "$link_static_flag"; then
+ dlopen_self=$dlopen_self_static
+ fi
+ prefer_static_libs=built
+ ;;
+ -static-libtool-libs)
+ if test -z "$pic_flag" && test -n "$link_static_flag"; then
+ dlopen_self=$dlopen_self_static
+ fi
+ prefer_static_libs=yes
+ ;;
+ esac
+ build_libtool_libs=no
+ build_old_libs=yes
+ break
+ ;;
+ esac
+ done
+
+ # See if our shared archives depend on static archives.
+ test -n "$old_archive_from_new_cmds" && build_old_libs=yes
+
+ # Go through the arguments, transforming them on the way.
+ while test "$#" -gt 0; do
+ arg=$1
+ shift
+ func_quote_for_eval "$arg"
+ qarg=$func_quote_for_eval_unquoted_result
+ func_append libtool_args " $func_quote_for_eval_result"
+
+ # If the previous option needs an argument, assign it.
+ if test -n "$prev"; then
+ case $prev in
+ output)
+ func_append compile_command " @OUTPUT@"
+ func_append finalize_command " @OUTPUT@"
+ ;;
+ esac
+
+ case $prev in
+ bindir)
+ bindir=$arg
+ prev=
+ continue
+ ;;
+ dlfiles|dlprefiles)
+ $preload || {
+ # Add the symbol object into the linking commands.
+ func_append compile_command " @SYMFILE@"
+ func_append finalize_command " @SYMFILE@"
+ preload=:
+ }
+ case $arg in
+ *.la | *.lo) ;; # We handle these cases below.
+ force)
+ if test no = "$dlself"; then
+ dlself=needless
+ export_dynamic=yes
+ fi
+ prev=
+ continue
+ ;;
+ self)
+ if test dlprefiles = "$prev"; then
+ dlself=yes
+ elif test dlfiles = "$prev" && test yes != "$dlopen_self"; then
+ dlself=yes
+ else
+ dlself=needless
+ export_dynamic=yes
+ fi
+ prev=
+ continue
+ ;;
+ *)
+ if test dlfiles = "$prev"; then
+ func_append dlfiles " $arg"
+ else
+ func_append dlprefiles " $arg"
+ fi
+ prev=
+ continue
+ ;;
+ esac
+ ;;
+ expsyms)
+ export_symbols=$arg
+ test -f "$arg" \
+ || func_fatal_error "symbol file '$arg' does not exist"
+ prev=
+ continue
+ ;;
+ expsyms_regex)
+ export_symbols_regex=$arg
+ prev=
+ continue
+ ;;
+ framework)
+ case $host in
+ *-*-darwin*)
+ case "$deplibs " in
+ *" $qarg.ltframework "*) ;;
+ *) func_append deplibs " $qarg.ltframework" # this is fixed later
+ ;;
+ esac
+ ;;
+ esac
+ prev=
+ continue
+ ;;
+ inst_prefix)
+ inst_prefix_dir=$arg
+ prev=
+ continue
+ ;;
+ mllvm)
+ # Clang does not use LLVM to link, so we can simply discard any
+ # '-mllvm $arg' options when doing the link step.
+ prev=
+ continue
+ ;;
+ objectlist)
+ if test -f "$arg"; then
+ save_arg=$arg
+ moreargs=
+ for fil in `cat "$save_arg"`
+ do
+# func_append moreargs " $fil"
+ arg=$fil
+ # A libtool-controlled object.
+
+ # Check to see that this really is a libtool object.
+ if func_lalib_unsafe_p "$arg"; then
+ pic_object=
+ non_pic_object=
+
+ # Read the .lo file
+ func_source "$arg"
+
+ if test -z "$pic_object" ||
+ test -z "$non_pic_object" ||
+ test none = "$pic_object" &&
+ test none = "$non_pic_object"; then
+ func_fatal_error "cannot find name of object for '$arg'"
+ fi
+
+ # Extract subdirectory from the argument.
+ func_dirname "$arg" "/" ""
+ xdir=$func_dirname_result
+
+ if test none != "$pic_object"; then
+ # Prepend the subdirectory the object is found in.
+ pic_object=$xdir$pic_object
+
+ if test dlfiles = "$prev"; then
+ if test yes = "$build_libtool_libs" && test yes = "$dlopen_support"; then
+ func_append dlfiles " $pic_object"
+ prev=
+ continue
+ else
+ # If libtool objects are unsupported, then we need to preload.
+ prev=dlprefiles
+ fi
+ fi
+
+ # CHECK ME: I think I busted this. -Ossama
+ if test dlprefiles = "$prev"; then
+ # Preload the old-style object.
+ func_append dlprefiles " $pic_object"
+ prev=
+ fi
+
+ # A PIC object.
+ func_append libobjs " $pic_object"
+ arg=$pic_object
+ fi
+
+ # Non-PIC object.
+ if test none != "$non_pic_object"; then
+ # Prepend the subdirectory the object is found in.
+ non_pic_object=$xdir$non_pic_object
+
+ # A standard non-PIC object
+ func_append non_pic_objects " $non_pic_object"
+ if test -z "$pic_object" || test none = "$pic_object"; then
+ arg=$non_pic_object
+ fi
+ else
+ # If the PIC object exists, use it instead.
+ # $xdir was prepended to $pic_object above.
+ non_pic_object=$pic_object
+ func_append non_pic_objects " $non_pic_object"
+ fi
+ else
+ # Only an error if not doing a dry-run.
+ if $opt_dry_run; then
+ # Extract subdirectory from the argument.
+ func_dirname "$arg" "/" ""
+ xdir=$func_dirname_result
+
+ func_lo2o "$arg"
+ pic_object=$xdir$objdir/$func_lo2o_result
+ non_pic_object=$xdir$func_lo2o_result
+ func_append libobjs " $pic_object"
+ func_append non_pic_objects " $non_pic_object"
+ else
+ func_fatal_error "'$arg' is not a valid libtool object"
+ fi
+ fi
+ done
+ else
+ func_fatal_error "link input file '$arg' does not exist"
+ fi
+ arg=$save_arg
+ prev=
+ continue
+ ;;
+ os2dllname)
+ os2dllname=$arg
+ prev=
+ continue
+ ;;
+ precious_regex)
+ precious_files_regex=$arg
+ prev=
+ continue
+ ;;
+ release)
+ release=-$arg
+ prev=
+ continue
+ ;;
+ rpath | xrpath)
+ # We need an absolute path.
+ case $arg in
+ [\\/]* | [A-Za-z]:[\\/]*) ;;
+ *)
+ func_fatal_error "only absolute run-paths are allowed"
+ ;;
+ esac
+ if test rpath = "$prev"; then
+ case "$rpath " in
+ *" $arg "*) ;;
+ *) func_append rpath " $arg" ;;
+ esac
+ else
+ case "$xrpath " in
+ *" $arg "*) ;;
+ *) func_append xrpath " $arg" ;;
+ esac
+ fi
+ prev=
+ continue
+ ;;
+ shrext)
+ shrext_cmds=$arg
+ prev=
+ continue
+ ;;
+ weak)
+ func_append weak_libs " $arg"
+ prev=
+ continue
+ ;;
+ xcclinker)
+ func_append linker_flags " $qarg"
+ func_append compiler_flags " $qarg"
+ prev=
+ func_append compile_command " $qarg"
+ func_append finalize_command " $qarg"
+ continue
+ ;;
+ xcompiler)
+ func_append compiler_flags " $qarg"
+ prev=
+ func_append compile_command " $qarg"
+ func_append finalize_command " $qarg"
+ continue
+ ;;
+ xlinker)
+ func_append linker_flags " $qarg"
+ func_append compiler_flags " $wl$qarg"
+ prev=
+ func_append compile_command " $wl$qarg"
+ func_append finalize_command " $wl$qarg"
+ continue
+ ;;
+ *)
+ eval "$prev=\"\$arg\""
+ prev=
+ continue
+ ;;
+ esac
+ fi # test -n "$prev"
+
+ prevarg=$arg
+
+ case $arg in
+ -all-static)
+ if test -n "$link_static_flag"; then
+ # See comment for -static flag below, for more details.
+ func_append compile_command " $link_static_flag"
+ func_append finalize_command " $link_static_flag"
+ fi
+ continue
+ ;;
+
+ -allow-undefined)
+ # FIXME: remove this flag sometime in the future.
+ func_fatal_error "'-allow-undefined' must not be used because it is the default"
+ ;;
+
+ -avoid-version)
+ avoid_version=yes
+ continue
+ ;;
+
+ -bindir)
+ prev=bindir
+ continue
+ ;;
+
+ -dlopen)
+ prev=dlfiles
+ continue
+ ;;
+
+ -dlpreopen)
+ prev=dlprefiles
+ continue
+ ;;
+
+ -export-dynamic)
+ export_dynamic=yes
+ continue
+ ;;
+
+ -export-symbols | -export-symbols-regex)
+ if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
+ func_fatal_error "more than one -exported-symbols argument is not allowed"
+ fi
+ if test X-export-symbols = "X$arg"; then
+ prev=expsyms
+ else
+ prev=expsyms_regex
+ fi
+ continue
+ ;;
+
+ -framework)
+ prev=framework
+ continue
+ ;;
+
+ -inst-prefix-dir)
+ prev=inst_prefix
+ continue
+ ;;
+
+ # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:*
+ # so, if we see these flags be careful not to treat them like -L
+ -L[A-Z][A-Z]*:*)
+ case $with_gcc/$host in
+ no/*-*-irix* | /*-*-irix*)
+ func_append compile_command " $arg"
+ func_append finalize_command " $arg"
+ ;;
+ esac
+ continue
+ ;;
+
+ -L*)
+ func_stripname "-L" '' "$arg"
+ if test -z "$func_stripname_result"; then
+ if test "$#" -gt 0; then
+ func_fatal_error "require no space between '-L' and '$1'"
+ else
+ func_fatal_error "need path for '-L' option"
+ fi
+ fi
+ func_resolve_sysroot "$func_stripname_result"
+ dir=$func_resolve_sysroot_result
+ # We need an absolute path.
+ case $dir in
+ [\\/]* | [A-Za-z]:[\\/]*) ;;
+ *)
+ absdir=`cd "$dir" && pwd`
+ test -z "$absdir" && \
+ func_fatal_error "cannot determine absolute directory name of '$dir'"
+ dir=$absdir
+ ;;
+ esac
+ case "$deplibs " in
+ *" -L$dir "* | *" $arg "*)
+ # Will only happen for absolute or sysroot arguments
+ ;;
+ *)
+ # Preserve sysroot, but never include relative directories
+ case $dir in
+ [\\/]* | [A-Za-z]:[\\/]* | =*) func_append deplibs " $arg" ;;
+ *) func_append deplibs " -L$dir" ;;
+ esac
+ func_append lib_search_path " $dir"
+ ;;
+ esac
+ case $host in
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
+ testbindir=`$ECHO "$dir" | $SED 's*/lib$*/bin*'`
+ case :$dllsearchpath: in
+ *":$dir:"*) ;;
+ ::) dllsearchpath=$dir;;
+ *) func_append dllsearchpath ":$dir";;
+ esac
+ case :$dllsearchpath: in
+ *":$testbindir:"*) ;;
+ ::) dllsearchpath=$testbindir;;
+ *) func_append dllsearchpath ":$testbindir";;
+ esac
+ ;;
+ esac
+ continue
+ ;;
+
+ -l*)
+ if test X-lc = "X$arg" || test X-lm = "X$arg"; then
+ case $host in
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*)
+ # These systems don't actually have a C or math library (as such)
+ continue
+ ;;
+ *-*-os2*)
+ # These systems don't actually have a C library (as such)
+ test X-lc = "X$arg" && continue
+ ;;
+ *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*)
+ # Do not include libc due to us having libc/libc_r.
+ test X-lc = "X$arg" && continue
+ ;;
+ *-*-rhapsody* | *-*-darwin1.[012])
+ # Rhapsody C and math libraries are in the System framework
+ func_append deplibs " System.ltframework"
+ continue
+ ;;
+ *-*-sco3.2v5* | *-*-sco5v6*)
+ # Causes problems with __ctype
+ test X-lc = "X$arg" && continue
+ ;;
+ *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
+ # Compiler inserts libc in the correct place for threads to work
+ test X-lc = "X$arg" && continue
+ ;;
+ esac
+ elif test X-lc_r = "X$arg"; then
+ case $host in
+ *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*)
+ # Do not include libc_r directly, use -pthread flag.
+ continue
+ ;;
+ esac
+ fi
+ func_append deplibs " $arg"
+ continue
+ ;;
+
+ -mllvm)
+ prev=mllvm
+ continue
+ ;;
+
+ -module)
+ module=yes
+ continue
+ ;;
+
+ # Tru64 UNIX uses -model [arg] to determine the layout of C++
+ # classes, name mangling, and exception handling.
+ # Darwin uses the -arch flag to determine output architecture.
+ -model|-arch|-isysroot|--sysroot)
+ func_append compiler_flags " $arg"
+ func_append compile_command " $arg"
+ func_append finalize_command " $arg"
+ prev=xcompiler
+ continue
+ ;;
+
+ -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \
+ |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*)
+ func_append compiler_flags " $arg"
+ func_append compile_command " $arg"
+ func_append finalize_command " $arg"
+ case "$new_inherited_linker_flags " in
+ *" $arg "*) ;;
+ * ) func_append new_inherited_linker_flags " $arg" ;;
+ esac
+ continue
+ ;;
+
+ -multi_module)
+ single_module=$wl-multi_module
+ continue
+ ;;
+
+ -no-fast-install)
+ fast_install=no
+ continue
+ ;;
+
+ -no-install)
+ case $host in
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*)
+ # The PATH hackery in wrapper scripts is required on Windows
+ # and Darwin in order for the loader to find any dlls it needs.
+ func_warning "'-no-install' is ignored for $host"
+ func_warning "assuming '-no-fast-install' instead"
+ fast_install=no
+ ;;
+ *) no_install=yes ;;
+ esac
+ continue
+ ;;
+
+ -no-undefined)
+ allow_undefined=no
+ continue
+ ;;
+
+ -objectlist)
+ prev=objectlist
+ continue
+ ;;
+
+ -os2dllname)
+ prev=os2dllname
+ continue
+ ;;
+
+ -o) prev=output ;;
+
+ -precious-files-regex)
+ prev=precious_regex
+ continue
+ ;;
+
+ -release)
+ prev=release
+ continue
+ ;;
+
+ -rpath)
+ prev=rpath
+ continue
+ ;;
+
+ -R)
+ prev=xrpath
+ continue
+ ;;
+
+ -R*)
+ func_stripname '-R' '' "$arg"
+ dir=$func_stripname_result
+ # We need an absolute path.
+ case $dir in
+ [\\/]* | [A-Za-z]:[\\/]*) ;;
+ =*)
+ func_stripname '=' '' "$dir"
+ dir=$lt_sysroot$func_stripname_result
+ ;;
+ *)
+ func_fatal_error "only absolute run-paths are allowed"
+ ;;
+ esac
+ case "$xrpath " in
+ *" $dir "*) ;;
+ *) func_append xrpath " $dir" ;;
+ esac
+ continue
+ ;;
+
+ -shared)
+ # The effects of -shared are defined in a previous loop.
+ continue
+ ;;
+
+ -shrext)
+ prev=shrext
+ continue
+ ;;
+
+ -static | -static-libtool-libs)
+ # The effects of -static are defined in a previous loop.
+ # We used to do the same as -all-static on platforms that
+ # didn't have a PIC flag, but the assumption that the effects
+ # would be equivalent was wrong. It would break on at least
+ # Digital Unix and AIX.
+ continue
+ ;;
+
+ -thread-safe)
+ thread_safe=yes
+ continue
+ ;;
+
+ -version-info)
+ prev=vinfo
+ continue
+ ;;
+
+ -version-number)
+ prev=vinfo
+ vinfo_number=yes
+ continue
+ ;;
+
+ -weak)
+ prev=weak
+ continue
+ ;;
+
+ -Wc,*)
+ func_stripname '-Wc,' '' "$arg"
+ args=$func_stripname_result
+ arg=
+ save_ifs=$IFS; IFS=,
+ for flag in $args; do
+ IFS=$save_ifs
+ func_quote_for_eval "$flag"
+ func_append arg " $func_quote_for_eval_result"
+ func_append compiler_flags " $func_quote_for_eval_result"
+ done
+ IFS=$save_ifs
+ func_stripname ' ' '' "$arg"
+ arg=$func_stripname_result
+ ;;
+
+ -Wl,*)
+ func_stripname '-Wl,' '' "$arg"
+ args=$func_stripname_result
+ arg=
+ save_ifs=$IFS; IFS=,
+ for flag in $args; do
+ IFS=$save_ifs
+ func_quote_for_eval "$flag"
+ func_append arg " $wl$func_quote_for_eval_result"
+ func_append compiler_flags " $wl$func_quote_for_eval_result"
+ func_append linker_flags " $func_quote_for_eval_result"
+ done
+ IFS=$save_ifs
+ func_stripname ' ' '' "$arg"
+ arg=$func_stripname_result
+ ;;
+
+ -Xcompiler)
+ prev=xcompiler
+ continue
+ ;;
+
+ -Xlinker)
+ prev=xlinker
+ continue
+ ;;
+
+ -XCClinker)
+ prev=xcclinker
+ continue
+ ;;
+
+ # -msg_* for osf cc
+ -msg_*)
+ func_quote_for_eval "$arg"
+ arg=$func_quote_for_eval_result
+ ;;
+
+ # Flags to be passed through unchanged, with rationale:
+ # -64, -mips[0-9] enable 64-bit mode for the SGI compiler
+ # -r[0-9][0-9]* specify processor for the SGI compiler
+ # -xarch=*, -xtarget=* enable 64-bit mode for the Sun compiler
+ # +DA*, +DD* enable 64-bit mode for the HP compiler
+ # -q* compiler args for the IBM compiler
+ # -m*, -t[45]*, -txscale* architecture-specific flags for GCC
+ # -F/path path to uninstalled frameworks, gcc on darwin
+ # -p, -pg, --coverage, -fprofile-* profiling flags for GCC
+ # -fstack-protector* stack protector flags for GCC
+ # @file GCC response files
+ # -tp=* Portland pgcc target processor selection
+ # --sysroot=* for sysroot support
+ # -O*, -g*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization
+ # -specs=* GCC specs files
+ # -stdlib=* select c++ std lib with clang
+ # -fsanitize=* Clang/GCC memory and address sanitizer
+ # -fuse-ld=* Linker select flags for GCC
+ # -static-* direct GCC to link specific libraries statically
+ # -fcilkplus Cilk Plus language extension features for C/C++
+ -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
+ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \
+ -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \
+ -specs=*|-fsanitize=*|-fuse-ld=*|-static-*|-fcilkplus)
+ func_quote_for_eval "$arg"
+ arg=$func_quote_for_eval_result
+ func_append compile_command " $arg"
+ func_append finalize_command " $arg"
+ func_append compiler_flags " $arg"
+ continue
+ ;;
+
+ -Z*)
+ if test os2 = "`expr $host : '.*\(os2\)'`"; then
+ # OS/2 uses -Zxxx to specify OS/2-specific options
+ compiler_flags="$compiler_flags $arg"
+ func_append compile_command " $arg"
+ func_append finalize_command " $arg"
+ case $arg in
+ -Zlinker | -Zstack)
+ prev=xcompiler
+ ;;
+ esac
+ continue
+ else
+ # Otherwise treat like 'Some other compiler flag' below
+ func_quote_for_eval "$arg"
+ arg=$func_quote_for_eval_result
+ fi
+ ;;
+
+ # Some other compiler flag.
+ -* | +*)
+ func_quote_for_eval "$arg"
+ arg=$func_quote_for_eval_result
+ ;;
+
+ *.$objext)
+ # A standard object.
+ func_append objs " $arg"
+ ;;
+
+ *.lo)
+ # A libtool-controlled object.
+
+ # Check to see that this really is a libtool object.
+ if func_lalib_unsafe_p "$arg"; then
+ pic_object=
+ non_pic_object=
+
+ # Read the .lo file
+ func_source "$arg"
+
+ if test -z "$pic_object" ||
+ test -z "$non_pic_object" ||
+ test none = "$pic_object" &&
+ test none = "$non_pic_object"; then
+ func_fatal_error "cannot find name of object for '$arg'"
+ fi
+
+ # Extract subdirectory from the argument.
+ func_dirname "$arg" "/" ""
+ xdir=$func_dirname_result
+
+ test none = "$pic_object" || {
+ # Prepend the subdirectory the object is found in.
+ pic_object=$xdir$pic_object
+
+ if test dlfiles = "$prev"; then
+ if test yes = "$build_libtool_libs" && test yes = "$dlopen_support"; then
+ func_append dlfiles " $pic_object"
+ prev=
+ continue
+ else
+ # If libtool objects are unsupported, then we need to preload.
+ prev=dlprefiles
+ fi
+ fi
+
+ # CHECK ME: I think I busted this. -Ossama
+ if test dlprefiles = "$prev"; then
+ # Preload the old-style object.
+ func_append dlprefiles " $pic_object"
+ prev=
+ fi
+
+ # A PIC object.
+ func_append libobjs " $pic_object"
+ arg=$pic_object
+ }
+
+ # Non-PIC object.
+ if test none != "$non_pic_object"; then
+ # Prepend the subdirectory the object is found in.
+ non_pic_object=$xdir$non_pic_object
+
+ # A standard non-PIC object
+ func_append non_pic_objects " $non_pic_object"
+ if test -z "$pic_object" || test none = "$pic_object"; then
+ arg=$non_pic_object
+ fi
+ else
+ # If the PIC object exists, use it instead.
+ # $xdir was prepended to $pic_object above.
+ non_pic_object=$pic_object
+ func_append non_pic_objects " $non_pic_object"
+ fi
+ else
+ # Only an error if not doing a dry-run.
+ if $opt_dry_run; then
+ # Extract subdirectory from the argument.
+ func_dirname "$arg" "/" ""
+ xdir=$func_dirname_result
+
+ func_lo2o "$arg"
+ pic_object=$xdir$objdir/$func_lo2o_result
+ non_pic_object=$xdir$func_lo2o_result
+ func_append libobjs " $pic_object"
+ func_append non_pic_objects " $non_pic_object"
+ else
+ func_fatal_error "'$arg' is not a valid libtool object"
+ fi
+ fi
+ ;;
+
+ *.$libext)
+ # An archive.
+ func_append deplibs " $arg"
+ func_append old_deplibs " $arg"
+ continue
+ ;;
+
+ *.la)
+ # A libtool-controlled library.
+
+ func_resolve_sysroot "$arg"
+ if test dlfiles = "$prev"; then
+ # This library was specified with -dlopen.
+ func_append dlfiles " $func_resolve_sysroot_result"
+ prev=
+ elif test dlprefiles = "$prev"; then
+ # The library was specified with -dlpreopen.
+ func_append dlprefiles " $func_resolve_sysroot_result"
+ prev=
+ else
+ func_append deplibs " $func_resolve_sysroot_result"
+ fi
+ continue
+ ;;
+
+ # Some other compiler argument.
+ *)
+ # Unknown arguments in both finalize_command and compile_command need
+ # to be aesthetically quoted because they are evaled later.
+ func_quote_for_eval "$arg"
+ arg=$func_quote_for_eval_result
+ ;;
+ esac # arg
+
+ # Now actually substitute the argument into the commands.
+ if test -n "$arg"; then
+ func_append compile_command " $arg"
+ func_append finalize_command " $arg"
+ fi
+ done # argument parsing loop
+
+ test -n "$prev" && \
+ func_fatal_help "the '$prevarg' option requires an argument"
+
+ if test yes = "$export_dynamic" && test -n "$export_dynamic_flag_spec"; then
+ eval arg=\"$export_dynamic_flag_spec\"
+ func_append compile_command " $arg"
+ func_append finalize_command " $arg"
+ fi
+
+ oldlibs=
+ # calculate the name of the file, without its directory
+ func_basename "$output"
+ outputname=$func_basename_result
+ libobjs_save=$libobjs
+
+ if test -n "$shlibpath_var"; then
+ # get the directories listed in $shlibpath_var
+ eval shlib_search_path=\`\$ECHO \"\$$shlibpath_var\" \| \$SED \'s/:/ /g\'\`
+ else
+ shlib_search_path=
+ fi
+ eval sys_lib_search_path=\"$sys_lib_search_path_spec\"
+ eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\"
+
+ # Definition is injected by LT_CONFIG during libtool generation.
+ func_munge_path_list sys_lib_dlsearch_path "$LT_SYS_LIBRARY_PATH"
+
+ func_dirname "$output" "/" ""
+ output_objdir=$func_dirname_result$objdir
+ func_to_tool_file "$output_objdir/"
+ tool_output_objdir=$func_to_tool_file_result
+ # Create the object directory.
+ func_mkdir_p "$output_objdir"
+
+ # Determine the type of output
+ case $output in
+ "")
+ func_fatal_help "you must specify an output file"
+ ;;
+ *.$libext) linkmode=oldlib ;;
+ *.lo | *.$objext) linkmode=obj ;;
+ *.la) linkmode=lib ;;
+ *) linkmode=prog ;; # Anything else should be a program.
+ esac
+
+ specialdeplibs=
+
+ libs=
+ # Find all interdependent deplibs by searching for libraries
+ # that are linked more than once (e.g. -la -lb -la)
+ for deplib in $deplibs; do
+ if $opt_preserve_dup_deps; then
+ case "$libs " in
+ *" $deplib "*) func_append specialdeplibs " $deplib" ;;
+ esac
+ fi
+ func_append libs " $deplib"
+ done
+
+ if test lib = "$linkmode"; then
+ libs="$predeps $libs $compiler_lib_search_path $postdeps"
+
+ # Compute libraries that are listed more than once in $predeps
+ # $postdeps and mark them as special (i.e., whose duplicates are
+ # not to be eliminated).
+ pre_post_deps=
+ if $opt_duplicate_compiler_generated_deps; then
+ for pre_post_dep in $predeps $postdeps; do
+ case "$pre_post_deps " in
+ *" $pre_post_dep "*) func_append specialdeplibs " $pre_post_deps" ;;
+ esac
+ func_append pre_post_deps " $pre_post_dep"
+ done
+ fi
+ pre_post_deps=
+ fi
+
+ deplibs=
+ newdependency_libs=
+ newlib_search_path=
+ need_relink=no # whether we're linking any uninstalled libtool libraries
+ notinst_deplibs= # not-installed libtool libraries
+ notinst_path= # paths that contain not-installed libtool libraries
+
+ case $linkmode in
+ lib)
+ passes="conv dlpreopen link"
+ for file in $dlfiles $dlprefiles; do
+ case $file in
+ *.la) ;;
+ *)
+ func_fatal_help "libraries can '-dlopen' only libtool libraries: $file"
+ ;;
+ esac
+ done
+ ;;
+ prog)
+ compile_deplibs=
+ finalize_deplibs=
+ alldeplibs=false
+ newdlfiles=
+ newdlprefiles=
+ passes="conv scan dlopen dlpreopen link"
+ ;;
+ *) passes="conv"
+ ;;
+ esac
+
+ for pass in $passes; do
+ # The preopen pass in lib mode reverses $deplibs; put it back here
+ # so that -L comes before libs that need it for instance...
+ if test lib,link = "$linkmode,$pass"; then
+ ## FIXME: Find the place where the list is rebuilt in the wrong
+ ## order, and fix it there properly
+ tmp_deplibs=
+ for deplib in $deplibs; do
+ tmp_deplibs="$deplib $tmp_deplibs"
+ done
+ deplibs=$tmp_deplibs
+ fi
+
+ if test lib,link = "$linkmode,$pass" ||
+ test prog,scan = "$linkmode,$pass"; then
+ libs=$deplibs
+ deplibs=
+ fi
+ if test prog = "$linkmode"; then
+ case $pass in
+ dlopen) libs=$dlfiles ;;
+ dlpreopen) libs=$dlprefiles ;;
+ link)
+ libs="$deplibs %DEPLIBS%"
+ test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs"
+ ;;
+ esac
+ fi
+ if test lib,dlpreopen = "$linkmode,$pass"; then
+ # Collect and forward deplibs of preopened libtool libs
+ for lib in $dlprefiles; do
+ # Ignore non-libtool-libs
+ dependency_libs=
+ func_resolve_sysroot "$lib"
+ case $lib in
+ *.la) func_source "$func_resolve_sysroot_result" ;;
+ esac
+
+ # Collect preopened libtool deplibs, except any this library
+ # has declared as weak libs
+ for deplib in $dependency_libs; do
+ func_basename "$deplib"
+ deplib_base=$func_basename_result
+ case " $weak_libs " in
+ *" $deplib_base "*) ;;
+ *) func_append deplibs " $deplib" ;;
+ esac
+ done
+ done
+ libs=$dlprefiles
+ fi
+ if test dlopen = "$pass"; then
+ # Collect dlpreopened libraries
+ save_deplibs=$deplibs
+ deplibs=
+ fi
+
+ for deplib in $libs; do
+ lib=
+ found=false
+ case $deplib in
+ -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \
+ |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*)
+ if test prog,link = "$linkmode,$pass"; then
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ else
+ func_append compiler_flags " $deplib"
+ if test lib = "$linkmode"; then
+ case "$new_inherited_linker_flags " in
+ *" $deplib "*) ;;
+ * ) func_append new_inherited_linker_flags " $deplib" ;;
+ esac
+ fi
+ fi
+ continue
+ ;;
+ -l*)
+ if test lib != "$linkmode" && test prog != "$linkmode"; then
+ func_warning "'-l' is ignored for archives/objects"
+ continue
+ fi
+ func_stripname '-l' '' "$deplib"
+ name=$func_stripname_result
+ if test lib = "$linkmode"; then
+ searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path"
+ else
+ searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path"
+ fi
+ for searchdir in $searchdirs; do
+ for search_ext in .la $std_shrext .so .a; do
+ # Search the libtool library
+ lib=$searchdir/lib$name$search_ext
+ if test -f "$lib"; then
+ if test .la = "$search_ext"; then
+ found=:
+ else
+ found=false
+ fi
+ break 2
+ fi
+ done
+ done
+ if $found; then
+ # deplib is a libtool library
+ # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib,
+ # We need to do some special things here, and not later.
+ if test yes = "$allow_libtool_libs_with_static_runtimes"; then
+ case " $predeps $postdeps " in
+ *" $deplib "*)
+ if func_lalib_p "$lib"; then
+ library_names=
+ old_library=
+ func_source "$lib"
+ for l in $old_library $library_names; do
+ ll=$l
+ done
+ if test "X$ll" = "X$old_library"; then # only static version available
+ found=false
+ func_dirname "$lib" "" "."
+ ladir=$func_dirname_result
+ lib=$ladir/$old_library
+ if test prog,link = "$linkmode,$pass"; then
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ else
+ deplibs="$deplib $deplibs"
+ test lib = "$linkmode" && newdependency_libs="$deplib $newdependency_libs"
+ fi
+ continue
+ fi
+ fi
+ ;;
+ *) ;;
+ esac
+ fi
+ else
+ # deplib doesn't seem to be a libtool library
+ if test prog,link = "$linkmode,$pass"; then
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ else
+ deplibs="$deplib $deplibs"
+ test lib = "$linkmode" && newdependency_libs="$deplib $newdependency_libs"
+ fi
+ continue
+ fi
+ ;; # -l
+ *.ltframework)
+ if test prog,link = "$linkmode,$pass"; then
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ else
+ deplibs="$deplib $deplibs"
+ if test lib = "$linkmode"; then
+ case "$new_inherited_linker_flags " in
+ *" $deplib "*) ;;
+ * ) func_append new_inherited_linker_flags " $deplib" ;;
+ esac
+ fi
+ fi
+ continue
+ ;;
+ -L*)
+ case $linkmode in
+ lib)
+ deplibs="$deplib $deplibs"
+ test conv = "$pass" && continue
+ newdependency_libs="$deplib $newdependency_libs"
+ func_stripname '-L' '' "$deplib"
+ func_resolve_sysroot "$func_stripname_result"
+ func_append newlib_search_path " $func_resolve_sysroot_result"
+ ;;
+ prog)
+ if test conv = "$pass"; then
+ deplibs="$deplib $deplibs"
+ continue
+ fi
+ if test scan = "$pass"; then
+ deplibs="$deplib $deplibs"
+ else
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ fi
+ func_stripname '-L' '' "$deplib"
+ func_resolve_sysroot "$func_stripname_result"
+ func_append newlib_search_path " $func_resolve_sysroot_result"
+ ;;
+ *)
+ func_warning "'-L' is ignored for archives/objects"
+ ;;
+ esac # linkmode
+ continue
+ ;; # -L
+ -R*)
+ if test link = "$pass"; then
+ func_stripname '-R' '' "$deplib"
+ func_resolve_sysroot "$func_stripname_result"
+ dir=$func_resolve_sysroot_result
+ # Make sure the xrpath contains only unique directories.
+ case "$xrpath " in
+ *" $dir "*) ;;
+ *) func_append xrpath " $dir" ;;
+ esac
+ fi
+ deplibs="$deplib $deplibs"
+ continue
+ ;;
+ *.la)
+ func_resolve_sysroot "$deplib"
+ lib=$func_resolve_sysroot_result
+ ;;
+ *.$libext)
+ if test conv = "$pass"; then
+ deplibs="$deplib $deplibs"
+ continue
+ fi
+ case $linkmode in
+ lib)
+ # Linking convenience modules into shared libraries is allowed,
+ # but linking other static libraries is non-portable.
+ case " $dlpreconveniencelibs " in
+ *" $deplib "*) ;;
+ *)
+ valid_a_lib=false
+ case $deplibs_check_method in
+ match_pattern*)
+ set dummy $deplibs_check_method; shift
+ match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
+ if eval "\$ECHO \"$deplib\"" 2>/dev/null | $SED 10q \
+ | $EGREP "$match_pattern_regex" > /dev/null; then
+ valid_a_lib=:
+ fi
+ ;;
+ pass_all)
+ valid_a_lib=:
+ ;;
+ esac
+ if $valid_a_lib; then
+ echo
+ $ECHO "*** Warning: Linking the shared library $output against the"
+ $ECHO "*** static library $deplib is not portable!"
+ deplibs="$deplib $deplibs"
+ else
+ echo
+ $ECHO "*** Warning: Trying to link with static lib archive $deplib."
+ echo "*** I have the capability to make that library automatically link in when"
+ echo "*** you link to this library. But I can only do this if you have a"
+ echo "*** shared version of the library, which you do not appear to have"
+ echo "*** because the file extensions .$libext of this argument makes me believe"
+ echo "*** that it is just a static archive that I should not use here."
+ fi
+ ;;
+ esac
+ continue
+ ;;
+ prog)
+ if test link != "$pass"; then
+ deplibs="$deplib $deplibs"
+ else
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ fi
+ continue
+ ;;
+ esac # linkmode
+ ;; # *.$libext
+ *.lo | *.$objext)
+ if test conv = "$pass"; then
+ deplibs="$deplib $deplibs"
+ elif test prog = "$linkmode"; then
+ if test dlpreopen = "$pass" || test yes != "$dlopen_support" || test no = "$build_libtool_libs"; then
+ # If there is no dlopen support or we're linking statically,
+ # we need to preload.
+ func_append newdlprefiles " $deplib"
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ else
+ func_append newdlfiles " $deplib"
+ fi
+ fi
+ continue
+ ;;
+ %DEPLIBS%)
+ alldeplibs=:
+ continue
+ ;;
+ esac # case $deplib
+
+ $found || test -f "$lib" \
+ || func_fatal_error "cannot find the library '$lib' or unhandled argument '$deplib'"
+
+ # Check to see that this really is a libtool archive.
+ func_lalib_unsafe_p "$lib" \
+ || func_fatal_error "'$lib' is not a valid libtool archive"
+
+ func_dirname "$lib" "" "."
+ ladir=$func_dirname_result
+
+ dlname=
+ dlopen=
+ dlpreopen=
+ libdir=
+ library_names=
+ old_library=
+ inherited_linker_flags=
+ # If the library was installed with an old release of libtool,
+ # it will not redefine variables installed, or shouldnotlink
+ installed=yes
+ shouldnotlink=no
+ avoidtemprpath=
+
+
+ # Read the .la file
+ func_source "$lib"
+
+ # Convert "-framework foo" to "foo.ltframework"
+ if test -n "$inherited_linker_flags"; then
+ tmp_inherited_linker_flags=`$ECHO "$inherited_linker_flags" | $SED 's/-framework \([^ $]*\)/\1.ltframework/g'`
+ for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do
+ case " $new_inherited_linker_flags " in
+ *" $tmp_inherited_linker_flag "*) ;;
+ *) func_append new_inherited_linker_flags " $tmp_inherited_linker_flag";;
+ esac
+ done
+ fi
+ dependency_libs=`$ECHO " $dependency_libs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
+ if test lib,link = "$linkmode,$pass" ||
+ test prog,scan = "$linkmode,$pass" ||
+ { test prog != "$linkmode" && test lib != "$linkmode"; }; then
+ test -n "$dlopen" && func_append dlfiles " $dlopen"
+ test -n "$dlpreopen" && func_append dlprefiles " $dlpreopen"
+ fi
+
+ if test conv = "$pass"; then
+ # Only check for convenience libraries
+ deplibs="$lib $deplibs"
+ if test -z "$libdir"; then
+ if test -z "$old_library"; then
+ func_fatal_error "cannot find name of link library for '$lib'"
+ fi
+ # It is a libtool convenience library, so add in its objects.
+ func_append convenience " $ladir/$objdir/$old_library"
+ func_append old_convenience " $ladir/$objdir/$old_library"
+ tmp_libs=
+ for deplib in $dependency_libs; do
+ deplibs="$deplib $deplibs"
+ if $opt_preserve_dup_deps; then
+ case "$tmp_libs " in
+ *" $deplib "*) func_append specialdeplibs " $deplib" ;;
+ esac
+ fi
+ func_append tmp_libs " $deplib"
+ done
+ elif test prog != "$linkmode" && test lib != "$linkmode"; then
+ func_fatal_error "'$lib' is not a convenience library"
+ fi
+ continue
+ fi # $pass = conv
+
+
+ # Get the name of the library we link against.
+ linklib=
+ if test -n "$old_library" &&
+ { test yes = "$prefer_static_libs" ||
+ test built,no = "$prefer_static_libs,$installed"; }; then
+ linklib=$old_library
+ else
+ for l in $old_library $library_names; do
+ linklib=$l
+ done
+ fi
+ if test -z "$linklib"; then
+ func_fatal_error "cannot find name of link library for '$lib'"
+ fi
+
+ # This library was specified with -dlopen.
+ if test dlopen = "$pass"; then
+ test -z "$libdir" \
+ && func_fatal_error "cannot -dlopen a convenience library: '$lib'"
+ if test -z "$dlname" ||
+ test yes != "$dlopen_support" ||
+ test no = "$build_libtool_libs"
+ then
+ # If there is no dlname, no dlopen support or we're linking
+ # statically, we need to preload. We also need to preload any
+ # dependent libraries so libltdl's deplib preloader doesn't
+ # bomb out in the load deplibs phase.
+ func_append dlprefiles " $lib $dependency_libs"
+ else
+ func_append newdlfiles " $lib"
+ fi
+ continue
+ fi # $pass = dlopen
+
+ # We need an absolute path.
+ case $ladir in
+ [\\/]* | [A-Za-z]:[\\/]*) abs_ladir=$ladir ;;
+ *)
+ abs_ladir=`cd "$ladir" && pwd`
+ if test -z "$abs_ladir"; then
+ func_warning "cannot determine absolute directory name of '$ladir'"
+ func_warning "passing it literally to the linker, although it might fail"
+ abs_ladir=$ladir
+ fi
+ ;;
+ esac
+ func_basename "$lib"
+ laname=$func_basename_result
+
+ # Find the relevant object directory and library name.
+ if test yes = "$installed"; then
+ if test ! -f "$lt_sysroot$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then
+ func_warning "library '$lib' was moved."
+ dir=$ladir
+ absdir=$abs_ladir
+ libdir=$abs_ladir
+ else
+ dir=$lt_sysroot$libdir
+ absdir=$lt_sysroot$libdir
+ fi
+ test yes = "$hardcode_automatic" && avoidtemprpath=yes
+ else
+ if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then
+ dir=$ladir
+ absdir=$abs_ladir
+ # Remove this search path later
+ func_append notinst_path " $abs_ladir"
+ else
+ dir=$ladir/$objdir
+ absdir=$abs_ladir/$objdir
+ # Remove this search path later
+ func_append notinst_path " $abs_ladir"
+ fi
+ fi # $installed = yes
+ func_stripname 'lib' '.la' "$laname"
+ name=$func_stripname_result
+
+ # This library was specified with -dlpreopen.
+ if test dlpreopen = "$pass"; then
+ if test -z "$libdir" && test prog = "$linkmode"; then
+ func_fatal_error "only libraries may -dlpreopen a convenience library: '$lib'"
+ fi
+ case $host in
+ # special handling for platforms with PE-DLLs.
+ *cygwin* | *mingw* | *cegcc* )
+ # Linker will automatically link against shared library if both
+ # static and shared are present. Therefore, ensure we extract
+ # symbols from the import library if a shared library is present
+ # (otherwise, the dlopen module name will be incorrect). We do
+ # this by putting the import library name into $newdlprefiles.
+ # We recover the dlopen module name by 'saving' the la file
+ # name in a special purpose variable, and (later) extracting the
+ # dlname from the la file.
+ if test -n "$dlname"; then
+ func_tr_sh "$dir/$linklib"
+ eval "libfile_$func_tr_sh_result=\$abs_ladir/\$laname"
+ func_append newdlprefiles " $dir/$linklib"
+ else
+ func_append newdlprefiles " $dir/$old_library"
+ # Keep a list of preopened convenience libraries to check
+ # that they are being used correctly in the link pass.
+ test -z "$libdir" && \
+ func_append dlpreconveniencelibs " $dir/$old_library"
+ fi
+ ;;
+ * )
+ # Prefer using a static library (so that no silly _DYNAMIC symbols
+ # are required to link).
+ if test -n "$old_library"; then
+ func_append newdlprefiles " $dir/$old_library"
+ # Keep a list of preopened convenience libraries to check
+ # that they are being used correctly in the link pass.
+ test -z "$libdir" && \
+ func_append dlpreconveniencelibs " $dir/$old_library"
+ # Otherwise, use the dlname, so that lt_dlopen finds it.
+ elif test -n "$dlname"; then
+ func_append newdlprefiles " $dir/$dlname"
+ else
+ func_append newdlprefiles " $dir/$linklib"
+ fi
+ ;;
+ esac
+ fi # $pass = dlpreopen
+
+ if test -z "$libdir"; then
+ # Link the convenience library
+ if test lib = "$linkmode"; then
+ deplibs="$dir/$old_library $deplibs"
+ elif test prog,link = "$linkmode,$pass"; then
+ compile_deplibs="$dir/$old_library $compile_deplibs"
+ finalize_deplibs="$dir/$old_library $finalize_deplibs"
+ else
+ deplibs="$lib $deplibs" # used for prog,scan pass
+ fi
+ continue
+ fi
+
+
+ if test prog = "$linkmode" && test link != "$pass"; then
+ func_append newlib_search_path " $ladir"
+ deplibs="$lib $deplibs"
+
+ linkalldeplibs=false
+ if test no != "$link_all_deplibs" || test -z "$library_names" ||
+ test no = "$build_libtool_libs"; then
+ linkalldeplibs=:
+ fi
+
+ tmp_libs=
+ for deplib in $dependency_libs; do
+ case $deplib in
+ -L*) func_stripname '-L' '' "$deplib"
+ func_resolve_sysroot "$func_stripname_result"
+ func_append newlib_search_path " $func_resolve_sysroot_result"
+ ;;
+ esac
+ # Need to link against all dependency_libs?
+ if $linkalldeplibs; then
+ deplibs="$deplib $deplibs"
+ else
+ # Need to hardcode shared library paths
+ # or/and link against static libraries
+ newdependency_libs="$deplib $newdependency_libs"
+ fi
+ if $opt_preserve_dup_deps; then
+ case "$tmp_libs " in
+ *" $deplib "*) func_append specialdeplibs " $deplib" ;;
+ esac
+ fi
+ func_append tmp_libs " $deplib"
+ done # for deplib
+ continue
+ fi # $linkmode = prog...
+
+ if test prog,link = "$linkmode,$pass"; then
+ if test -n "$library_names" &&
+ { { test no = "$prefer_static_libs" ||
+ test built,yes = "$prefer_static_libs,$installed"; } ||
+ test -z "$old_library"; }; then
+ # We need to hardcode the library path
+ if test -n "$shlibpath_var" && test -z "$avoidtemprpath"; then
+ # Make sure the rpath contains only unique directories.
+ case $temp_rpath: in
+ *"$absdir:"*) ;;
+ *) func_append temp_rpath "$absdir:" ;;
+ esac
+ fi
+
+ # Hardcode the library path.
+ # Skip directories that are in the system default run-time
+ # search path.
+ case " $sys_lib_dlsearch_path " in
+ *" $absdir "*) ;;
+ *)
+ case "$compile_rpath " in
+ *" $absdir "*) ;;
+ *) func_append compile_rpath " $absdir" ;;
+ esac
+ ;;
+ esac
+ case " $sys_lib_dlsearch_path " in
+ *" $libdir "*) ;;
+ *)
+ case "$finalize_rpath " in
+ *" $libdir "*) ;;
+ *) func_append finalize_rpath " $libdir" ;;
+ esac
+ ;;
+ esac
+ fi # $linkmode,$pass = prog,link...
+
+ if $alldeplibs &&
+ { test pass_all = "$deplibs_check_method" ||
+ { test yes = "$build_libtool_libs" &&
+ test -n "$library_names"; }; }; then
+ # We only need to search for static libraries
+ continue
+ fi
+ fi
+
+ link_static=no # Whether the deplib will be linked statically
+ use_static_libs=$prefer_static_libs
+ if test built = "$use_static_libs" && test yes = "$installed"; then
+ use_static_libs=no
+ fi
+ if test -n "$library_names" &&
+ { test no = "$use_static_libs" || test -z "$old_library"; }; then
+ case $host in
+ *cygwin* | *mingw* | *cegcc* | *os2*)
+ # No point in relinking DLLs because paths are not encoded
+ func_append notinst_deplibs " $lib"
+ need_relink=no
+ ;;
+ *)
+ if test no = "$installed"; then
+ func_append notinst_deplibs " $lib"
+ need_relink=yes
+ fi
+ ;;
+ esac
+ # This is a shared library
+
+ # Warn about portability, can't link against -module's on some
+ # systems (darwin). Don't bleat about dlopened modules though!
+ dlopenmodule=
+ for dlpremoduletest in $dlprefiles; do
+ if test "X$dlpremoduletest" = "X$lib"; then
+ dlopenmodule=$dlpremoduletest
+ break
+ fi
+ done
+ if test -z "$dlopenmodule" && test yes = "$shouldnotlink" && test link = "$pass"; then
+ echo
+ if test prog = "$linkmode"; then
+ $ECHO "*** Warning: Linking the executable $output against the loadable module"
+ else
+ $ECHO "*** Warning: Linking the shared library $output against the loadable module"
+ fi
+ $ECHO "*** $linklib is not portable!"
+ fi
+ if test lib = "$linkmode" &&
+ test yes = "$hardcode_into_libs"; then
+ # Hardcode the library path.
+ # Skip directories that are in the system default run-time
+ # search path.
+ case " $sys_lib_dlsearch_path " in
+ *" $absdir "*) ;;
+ *)
+ case "$compile_rpath " in
+ *" $absdir "*) ;;
+ *) func_append compile_rpath " $absdir" ;;
+ esac
+ ;;
+ esac
+ case " $sys_lib_dlsearch_path " in
+ *" $libdir "*) ;;
+ *)
+ case "$finalize_rpath " in
+ *" $libdir "*) ;;
+ *) func_append finalize_rpath " $libdir" ;;
+ esac
+ ;;
+ esac
+ fi
+
+ if test -n "$old_archive_from_expsyms_cmds"; then
+ # figure out the soname
+ set dummy $library_names
+ shift
+ realname=$1
+ shift
+ libname=`eval "\\$ECHO \"$libname_spec\""`
+ # use dlname if we got it. it's perfectly good, no?
+ if test -n "$dlname"; then
+ soname=$dlname
+ elif test -n "$soname_spec"; then
+ # bleh windows
+ case $host in
+ *cygwin* | mingw* | *cegcc* | *os2*)
+ func_arith $current - $age
+ major=$func_arith_result
+ versuffix=-$major
+ ;;
+ esac
+ eval soname=\"$soname_spec\"
+ else
+ soname=$realname
+ fi
+
+ # Make a new name for the extract_expsyms_cmds to use
+ soroot=$soname
+ func_basename "$soroot"
+ soname=$func_basename_result
+ func_stripname 'lib' '.dll' "$soname"
+ newlib=libimp-$func_stripname_result.a
+
+ # If the library has no export list, then create one now
+ if test -f "$output_objdir/$soname-def"; then :
+ else
+ func_verbose "extracting exported symbol list from '$soname'"
+ func_execute_cmds "$extract_expsyms_cmds" 'exit $?'
+ fi
+
+ # Create $newlib
+ if test -f "$output_objdir/$newlib"; then :; else
+ func_verbose "generating import library for '$soname'"
+ func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?'
+ fi
+ # make sure the library variables are pointing to the new library
+ dir=$output_objdir
+ linklib=$newlib
+ fi # test -n "$old_archive_from_expsyms_cmds"
+
+ if test prog = "$linkmode" || test relink != "$opt_mode"; then
+ add_shlibpath=
+ add_dir=
+ add=
+ lib_linked=yes
+ case $hardcode_action in
+ immediate | unsupported)
+ if test no = "$hardcode_direct"; then
+ add=$dir/$linklib
+ case $host in
+ *-*-sco3.2v5.0.[024]*) add_dir=-L$dir ;;
+ *-*-sysv4*uw2*) add_dir=-L$dir ;;
+ *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \
+ *-*-unixware7*) add_dir=-L$dir ;;
+ *-*-darwin* )
+ # if the lib is a (non-dlopened) module then we cannot
+ # link against it, someone is ignoring the earlier warnings
+ if /usr/bin/file -L $add 2> /dev/null |
+ $GREP ": [^:]* bundle" >/dev/null; then
+ if test "X$dlopenmodule" != "X$lib"; then
+ $ECHO "*** Warning: lib $linklib is a module, not a shared library"
+ if test -z "$old_library"; then
+ echo
+ echo "*** And there doesn't seem to be a static archive available"
+ echo "*** The link will probably fail, sorry"
+ else
+ add=$dir/$old_library
+ fi
+ elif test -n "$old_library"; then
+ add=$dir/$old_library
+ fi
+ fi
+ esac
+ elif test no = "$hardcode_minus_L"; then
+ case $host in
+ *-*-sunos*) add_shlibpath=$dir ;;
+ esac
+ add_dir=-L$dir
+ add=-l$name
+ elif test no = "$hardcode_shlibpath_var"; then
+ add_shlibpath=$dir
+ add=-l$name
+ else
+ lib_linked=no
+ fi
+ ;;
+ relink)
+ if test yes = "$hardcode_direct" &&
+ test no = "$hardcode_direct_absolute"; then
+ add=$dir/$linklib
+ elif test yes = "$hardcode_minus_L"; then
+ add_dir=-L$absdir
+ # Try looking first in the location we're being installed to.
+ if test -n "$inst_prefix_dir"; then
+ case $libdir in
+ [\\/]*)
+ func_append add_dir " -L$inst_prefix_dir$libdir"
+ ;;
+ esac
+ fi
+ add=-l$name
+ elif test yes = "$hardcode_shlibpath_var"; then
+ add_shlibpath=$dir
+ add=-l$name
+ else
+ lib_linked=no
+ fi
+ ;;
+ *) lib_linked=no ;;
+ esac
+
+ if test yes != "$lib_linked"; then
+ func_fatal_configuration "unsupported hardcode properties"
+ fi
+
+ if test -n "$add_shlibpath"; then
+ case :$compile_shlibpath: in
+ *":$add_shlibpath:"*) ;;
+ *) func_append compile_shlibpath "$add_shlibpath:" ;;
+ esac
+ fi
+ if test prog = "$linkmode"; then
+ test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs"
+ test -n "$add" && compile_deplibs="$add $compile_deplibs"
+ else
+ test -n "$add_dir" && deplibs="$add_dir $deplibs"
+ test -n "$add" && deplibs="$add $deplibs"
+ if test yes != "$hardcode_direct" &&
+ test yes != "$hardcode_minus_L" &&
+ test yes = "$hardcode_shlibpath_var"; then
+ case :$finalize_shlibpath: in
+ *":$libdir:"*) ;;
+ *) func_append finalize_shlibpath "$libdir:" ;;
+ esac
+ fi
+ fi
+ fi
+
+ if test prog = "$linkmode" || test relink = "$opt_mode"; then
+ add_shlibpath=
+ add_dir=
+ add=
+ # Finalize command for both is simple: just hardcode it.
+ if test yes = "$hardcode_direct" &&
+ test no = "$hardcode_direct_absolute"; then
+ add=$libdir/$linklib
+ elif test yes = "$hardcode_minus_L"; then
+ add_dir=-L$libdir
+ add=-l$name
+ elif test yes = "$hardcode_shlibpath_var"; then
+ case :$finalize_shlibpath: in
+ *":$libdir:"*) ;;
+ *) func_append finalize_shlibpath "$libdir:" ;;
+ esac
+ add=-l$name
+ elif test yes = "$hardcode_automatic"; then
+ if test -n "$inst_prefix_dir" &&
+ test -f "$inst_prefix_dir$libdir/$linklib"; then
+ add=$inst_prefix_dir$libdir/$linklib
+ else
+ add=$libdir/$linklib
+ fi
+ else
+ # We cannot seem to hardcode it, guess we'll fake it.
+ add_dir=-L$libdir
+ # Try looking first in the location we're being installed to.
+ if test -n "$inst_prefix_dir"; then
+ case $libdir in
+ [\\/]*)
+ func_append add_dir " -L$inst_prefix_dir$libdir"
+ ;;
+ esac
+ fi
+ add=-l$name
+ fi
+
+ if test prog = "$linkmode"; then
+ test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs"
+ test -n "$add" && finalize_deplibs="$add $finalize_deplibs"
+ else
+ test -n "$add_dir" && deplibs="$add_dir $deplibs"
+ test -n "$add" && deplibs="$add $deplibs"
+ fi
+ fi
+ elif test prog = "$linkmode"; then
+ # Here we assume that one of hardcode_direct or hardcode_minus_L
+ # is not unsupported. This is valid on all known static and
+ # shared platforms.
+ if test unsupported != "$hardcode_direct"; then
+ test -n "$old_library" && linklib=$old_library
+ compile_deplibs="$dir/$linklib $compile_deplibs"
+ finalize_deplibs="$dir/$linklib $finalize_deplibs"
+ else
+ compile_deplibs="-l$name -L$dir $compile_deplibs"
+ finalize_deplibs="-l$name -L$dir $finalize_deplibs"
+ fi
+ elif test yes = "$build_libtool_libs"; then
+ # Not a shared library
+ if test pass_all != "$deplibs_check_method"; then
+ # We're trying link a shared library against a static one
+ # but the system doesn't support it.
+
+ # Just print a warning and add the library to dependency_libs so
+ # that the program can be linked against the static library.
+ echo
+ $ECHO "*** Warning: This system cannot link to static lib archive $lib."
+ echo "*** I have the capability to make that library automatically link in when"
+ echo "*** you link to this library. But I can only do this if you have a"
+ echo "*** shared version of the library, which you do not appear to have."
+ if test yes = "$module"; then
+ echo "*** But as you try to build a module library, libtool will still create "
+ echo "*** a static module, that should work as long as the dlopening application"
+ echo "*** is linked with the -dlopen flag to resolve symbols at runtime."
+ if test -z "$global_symbol_pipe"; then
+ echo
+ echo "*** However, this would only work if libtool was able to extract symbol"
+ echo "*** lists from a program, using 'nm' or equivalent, but libtool could"
+ echo "*** not find such a program. So, this module is probably useless."
+ echo "*** 'nm' from GNU binutils and a full rebuild may help."
+ fi
+ if test no = "$build_old_libs"; then
+ build_libtool_libs=module
+ build_old_libs=yes
+ else
+ build_libtool_libs=no
+ fi
+ fi
+ else
+ deplibs="$dir/$old_library $deplibs"
+ link_static=yes
+ fi
+ fi # link shared/static library?
+
+ if test lib = "$linkmode"; then
+ if test -n "$dependency_libs" &&
+ { test yes != "$hardcode_into_libs" ||
+ test yes = "$build_old_libs" ||
+ test yes = "$link_static"; }; then
+ # Extract -R from dependency_libs
+ temp_deplibs=
+ for libdir in $dependency_libs; do
+ case $libdir in
+ -R*) func_stripname '-R' '' "$libdir"
+ temp_xrpath=$func_stripname_result
+ case " $xrpath " in
+ *" $temp_xrpath "*) ;;
+ *) func_append xrpath " $temp_xrpath";;
+ esac;;
+ *) func_append temp_deplibs " $libdir";;
+ esac
+ done
+ dependency_libs=$temp_deplibs
+ fi
+
+ func_append newlib_search_path " $absdir"
+ # Link against this library
+ test no = "$link_static" && newdependency_libs="$abs_ladir/$laname $newdependency_libs"
+ # ... and its dependency_libs
+ tmp_libs=
+ for deplib in $dependency_libs; do
+ newdependency_libs="$deplib $newdependency_libs"
+ case $deplib in
+ -L*) func_stripname '-L' '' "$deplib"
+ func_resolve_sysroot "$func_stripname_result";;
+ *) func_resolve_sysroot "$deplib" ;;
+ esac
+ if $opt_preserve_dup_deps; then
+ case "$tmp_libs " in
+ *" $func_resolve_sysroot_result "*)
+ func_append specialdeplibs " $func_resolve_sysroot_result" ;;
+ esac
+ fi
+ func_append tmp_libs " $func_resolve_sysroot_result"
+ done
+
+ if test no != "$link_all_deplibs"; then
+ # Add the search paths of all dependency libraries
+ for deplib in $dependency_libs; do
+ path=
+ case $deplib in
+ -L*) path=$deplib ;;
+ *.la)
+ func_resolve_sysroot "$deplib"
+ deplib=$func_resolve_sysroot_result
+ func_dirname "$deplib" "" "."
+ dir=$func_dirname_result
+ # We need an absolute path.
+ case $dir in
+ [\\/]* | [A-Za-z]:[\\/]*) absdir=$dir ;;
+ *)
+ absdir=`cd "$dir" && pwd`
+ if test -z "$absdir"; then
+ func_warning "cannot determine absolute directory name of '$dir'"
+ absdir=$dir
+ fi
+ ;;
+ esac
+ if $GREP "^installed=no" $deplib > /dev/null; then
+ case $host in
+ *-*-darwin*)
+ depdepl=
+ eval deplibrary_names=`$SED -n -e 's/^library_names=\(.*\)$/\1/p' $deplib`
+ if test -n "$deplibrary_names"; then
+ for tmp in $deplibrary_names; do
+ depdepl=$tmp
+ done
+ if test -f "$absdir/$objdir/$depdepl"; then
+ depdepl=$absdir/$objdir/$depdepl
+ darwin_install_name=`$OTOOL -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'`
+ if test -z "$darwin_install_name"; then
+ darwin_install_name=`$OTOOL64 -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'`
+ fi
+ func_append compiler_flags " $wl-dylib_file $wl$darwin_install_name:$depdepl"
+ func_append linker_flags " -dylib_file $darwin_install_name:$depdepl"
+ path=
+ fi
+ fi
+ ;;
+ *)
+ path=-L$absdir/$objdir
+ ;;
+ esac
+ else
+ eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
+ test -z "$libdir" && \
+ func_fatal_error "'$deplib' is not a valid libtool archive"
+ test "$absdir" != "$libdir" && \
+ func_warning "'$deplib' seems to be moved"
+
+ path=-L$absdir
+ fi
+ ;;
+ esac
+ case " $deplibs " in
+ *" $path "*) ;;
+ *) deplibs="$path $deplibs" ;;
+ esac
+ done
+ fi # link_all_deplibs != no
+ fi # linkmode = lib
+ done # for deplib in $libs
+ if test link = "$pass"; then
+ if test prog = "$linkmode"; then
+ compile_deplibs="$new_inherited_linker_flags $compile_deplibs"
+ finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs"
+ else
+ compiler_flags="$compiler_flags "`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
+ fi
+ fi
+ dependency_libs=$newdependency_libs
+ if test dlpreopen = "$pass"; then
+ # Link the dlpreopened libraries before other libraries
+ for deplib in $save_deplibs; do
+ deplibs="$deplib $deplibs"
+ done
+ fi
+ if test dlopen != "$pass"; then
+ test conv = "$pass" || {
+ # Make sure lib_search_path contains only unique directories.
+ lib_search_path=
+ for dir in $newlib_search_path; do
+ case "$lib_search_path " in
+ *" $dir "*) ;;
+ *) func_append lib_search_path " $dir" ;;
+ esac
+ done
+ newlib_search_path=
+ }
+
+ if test prog,link = "$linkmode,$pass"; then
+ vars="compile_deplibs finalize_deplibs"
+ else
+ vars=deplibs
+ fi
+ for var in $vars dependency_libs; do
+ # Add libraries to $var in reverse order
+ eval tmp_libs=\"\$$var\"
+ new_libs=
+ for deplib in $tmp_libs; do
+ # FIXME: Pedantically, this is the right thing to do, so
+ # that some nasty dependency loop isn't accidentally
+ # broken:
+ #new_libs="$deplib $new_libs"
+ # Pragmatically, this seems to cause very few problems in
+ # practice:
+ case $deplib in
+ -L*) new_libs="$deplib $new_libs" ;;
+ -R*) ;;
+ *)
+ # And here is the reason: when a library appears more
+ # than once as an explicit dependence of a library, or
+ # is implicitly linked in more than once by the
+ # compiler, it is considered special, and multiple
+ # occurrences thereof are not removed. Compare this
+ # with having the same library being listed as a
+ # dependency of multiple other libraries: in this case,
+ # we know (pedantically, we assume) the library does not
+ # need to be listed more than once, so we keep only the
+ # last copy. This is not always right, but it is rare
+ # enough that we require users that really mean to play
+ # such unportable linking tricks to link the library
+ # using -Wl,-lname, so that libtool does not consider it
+ # for duplicate removal.
+ case " $specialdeplibs " in
+ *" $deplib "*) new_libs="$deplib $new_libs" ;;
+ *)
+ case " $new_libs " in
+ *" $deplib "*) ;;
+ *) new_libs="$deplib $new_libs" ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ done
+ tmp_libs=
+ for deplib in $new_libs; do
+ case $deplib in
+ -L*)
+ case " $tmp_libs " in
+ *" $deplib "*) ;;
+ *) func_append tmp_libs " $deplib" ;;
+ esac
+ ;;
+ *) func_append tmp_libs " $deplib" ;;
+ esac
+ done
+ eval $var=\"$tmp_libs\"
+ done # for var
+ fi
+
+ # Add Sun CC postdeps if required:
+ test CXX = "$tagname" && {
+ case $host_os in
+ linux*)
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*) # Sun C++ 5.9
+ func_suncc_cstd_abi
+
+ if test no != "$suncc_use_cstd_abi"; then
+ func_append postdeps ' -library=Cstd -library=Crun'
+ fi
+ ;;
+ esac
+ ;;
+
+ solaris*)
+ func_cc_basename "$CC"
+ case $func_cc_basename_result in
+ CC* | sunCC*)
+ func_suncc_cstd_abi
+
+ if test no != "$suncc_use_cstd_abi"; then
+ func_append postdeps ' -library=Cstd -library=Crun'
+ fi
+ ;;
+ esac
+ ;;
+ esac
+ }
+
+ # Last step: remove runtime libs from dependency_libs
+ # (they stay in deplibs)
+ tmp_libs=
+ for i in $dependency_libs; do
+ case " $predeps $postdeps $compiler_lib_search_path " in
+ *" $i "*)
+ i=
+ ;;
+ esac
+ if test -n "$i"; then
+ func_append tmp_libs " $i"
+ fi
+ done
+ dependency_libs=$tmp_libs
+ done # for pass
+ if test prog = "$linkmode"; then
+ dlfiles=$newdlfiles
+ fi
+ if test prog = "$linkmode" || test lib = "$linkmode"; then
+ dlprefiles=$newdlprefiles
+ fi
+
+ case $linkmode in
+ oldlib)
+ if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then
+ func_warning "'-dlopen' is ignored for archives"
+ fi
+
+ case " $deplibs" in
+ *\ -l* | *\ -L*)
+ func_warning "'-l' and '-L' are ignored for archives" ;;
+ esac
+
+ test -n "$rpath" && \
+ func_warning "'-rpath' is ignored for archives"
+
+ test -n "$xrpath" && \
+ func_warning "'-R' is ignored for archives"
+
+ test -n "$vinfo" && \
+ func_warning "'-version-info/-version-number' is ignored for archives"
+
+ test -n "$release" && \
+ func_warning "'-release' is ignored for archives"
+
+ test -n "$export_symbols$export_symbols_regex" && \
+ func_warning "'-export-symbols' is ignored for archives"
+
+ # Now set the variables for building old libraries.
+ build_libtool_libs=no
+ oldlibs=$output
+ func_append objs "$old_deplibs"
+ ;;
+
+ lib)
+ # Make sure we only generate libraries of the form 'libNAME.la'.
+ case $outputname in
+ lib*)
+ func_stripname 'lib' '.la' "$outputname"
+ name=$func_stripname_result
+ eval shared_ext=\"$shrext_cmds\"
+ eval libname=\"$libname_spec\"
+ ;;
+ *)
+ test no = "$module" \
+ && func_fatal_help "libtool library '$output' must begin with 'lib'"
+
+ if test no != "$need_lib_prefix"; then
+ # Add the "lib" prefix for modules if required
+ func_stripname '' '.la' "$outputname"
+ name=$func_stripname_result
+ eval shared_ext=\"$shrext_cmds\"
+ eval libname=\"$libname_spec\"
+ else
+ func_stripname '' '.la' "$outputname"
+ libname=$func_stripname_result
+ fi
+ ;;
+ esac
+
+ if test -n "$objs"; then
+ if test pass_all != "$deplibs_check_method"; then
+ func_fatal_error "cannot build libtool library '$output' from non-libtool objects on this host:$objs"
+ else
+ echo
+ $ECHO "*** Warning: Linking the shared library $output against the non-libtool"
+ $ECHO "*** objects $objs is not portable!"
+ func_append libobjs " $objs"
+ fi
+ fi
+
+ test no = "$dlself" \
+ || func_warning "'-dlopen self' is ignored for libtool libraries"
+
+ set dummy $rpath
+ shift
+ test 1 -lt "$#" \
+ && func_warning "ignoring multiple '-rpath's for a libtool library"
+
+ install_libdir=$1
+
+ oldlibs=
+ if test -z "$rpath"; then
+ if test yes = "$build_libtool_libs"; then
+ # Building a libtool convenience library.
+ # Some compilers have problems with a '.al' extension so
+ # convenience libraries should have the same extension an
+ # archive normally would.
+ oldlibs="$output_objdir/$libname.$libext $oldlibs"
+ build_libtool_libs=convenience
+ build_old_libs=yes
+ fi
+
+ test -n "$vinfo" && \
+ func_warning "'-version-info/-version-number' is ignored for convenience libraries"
+
+ test -n "$release" && \
+ func_warning "'-release' is ignored for convenience libraries"
+ else
+
+ # Parse the version information argument.
+ save_ifs=$IFS; IFS=:
+ set dummy $vinfo 0 0 0
+ shift
+ IFS=$save_ifs
+
+ test -n "$7" && \
+ func_fatal_help "too many parameters to '-version-info'"
+
+ # convert absolute version numbers to libtool ages
+ # this retains compatibility with .la files and attempts
+ # to make the code below a bit more comprehensible
+
+ case $vinfo_number in
+ yes)
+ number_major=$1
+ number_minor=$2
+ number_revision=$3
+ #
+ # There are really only two kinds -- those that
+ # use the current revision as the major version
+ # and those that subtract age and use age as
+ # a minor version. But, then there is irix
+ # that has an extra 1 added just for fun
+ #
+ case $version_type in
+ # correct linux to gnu/linux during the next big refactor
+ darwin|freebsd-elf|linux|osf|windows|none)
+ func_arith $number_major + $number_minor
+ current=$func_arith_result
+ age=$number_minor
+ revision=$number_revision
+ ;;
+ freebsd-aout|qnx|sunos)
+ current=$number_major
+ revision=$number_minor
+ age=0
+ ;;
+ irix|nonstopux)
+ func_arith $number_major + $number_minor
+ current=$func_arith_result
+ age=$number_minor
+ revision=$number_minor
+ lt_irix_increment=no
+ ;;
+ *)
+ func_fatal_configuration "$modename: unknown library version type '$version_type'"
+ ;;
+ esac
+ ;;
+ no)
+ current=$1
+ revision=$2
+ age=$3
+ ;;
+ esac
+
+ # Check that each of the things are valid numbers.
+ case $current in
+ 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
+ *)
+ func_error "CURRENT '$current' must be a nonnegative integer"
+ func_fatal_error "'$vinfo' is not valid version information"
+ ;;
+ esac
+
+ case $revision in
+ 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
+ *)
+ func_error "REVISION '$revision' must be a nonnegative integer"
+ func_fatal_error "'$vinfo' is not valid version information"
+ ;;
+ esac
+
+ case $age in
+ 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
+ *)
+ func_error "AGE '$age' must be a nonnegative integer"
+ func_fatal_error "'$vinfo' is not valid version information"
+ ;;
+ esac
+
+ if test "$age" -gt "$current"; then
+ func_error "AGE '$age' is greater than the current interface number '$current'"
+ func_fatal_error "'$vinfo' is not valid version information"
+ fi
+
+ # Calculate the version variables.
+ major=
+ versuffix=
+ verstring=
+ case $version_type in
+ none) ;;
+
+ darwin)
+ # Like Linux, but with the current version available in
+ # verstring for coding it into the library header
+ func_arith $current - $age
+ major=.$func_arith_result
+ versuffix=$major.$age.$revision
+ # Darwin ld doesn't like 0 for these options...
+ func_arith $current + 1
+ minor_current=$func_arith_result
+ xlcverstring="$wl-compatibility_version $wl$minor_current $wl-current_version $wl$minor_current.$revision"
+ verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
+ # On Darwin other compilers
+ case $CC in
+ nagfor*)
+ verstring="$wl-compatibility_version $wl$minor_current $wl-current_version $wl$minor_current.$revision"
+ ;;
+ *)
+ verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
+ ;;
+ esac
+ ;;
+
+ freebsd-aout)
+ major=.$current
+ versuffix=.$current.$revision
+ ;;
+
+ freebsd-elf)
+ func_arith $current - $age
+ major=.$func_arith_result
+ versuffix=$major.$age.$revision
+ ;;
+
+ irix | nonstopux)
+ if test no = "$lt_irix_increment"; then
+ func_arith $current - $age
+ else
+ func_arith $current - $age + 1
+ fi
+ major=$func_arith_result
+
+ case $version_type in
+ nonstopux) verstring_prefix=nonstopux ;;
+ *) verstring_prefix=sgi ;;
+ esac
+ verstring=$verstring_prefix$major.$revision
+
+ # Add in all the interfaces that we are compatible with.
+ loop=$revision
+ while test 0 -ne "$loop"; do
+ func_arith $revision - $loop
+ iface=$func_arith_result
+ func_arith $loop - 1
+ loop=$func_arith_result
+ verstring=$verstring_prefix$major.$iface:$verstring
+ done
+
+ # Before this point, $major must not contain '.'.
+ major=.$major
+ versuffix=$major.$revision
+ ;;
+
+ linux) # correct to gnu/linux during the next big refactor
+ func_arith $current - $age
+ major=.$func_arith_result
+ versuffix=$major.$age.$revision
+ ;;
+
+ osf)
+ func_arith $current - $age
+ major=.$func_arith_result
+ versuffix=.$current.$age.$revision
+ verstring=$current.$age.$revision
+
+ # Add in all the interfaces that we are compatible with.
+ loop=$age
+ while test 0 -ne "$loop"; do
+ func_arith $current - $loop
+ iface=$func_arith_result
+ func_arith $loop - 1
+ loop=$func_arith_result
+ verstring=$verstring:$iface.0
+ done
+
+ # Make executables depend on our current version.
+ func_append verstring ":$current.0"
+ ;;
+
+ qnx)
+ major=.$current
+ versuffix=.$current
+ ;;
+
+ sco)
+ major=.$current
+ versuffix=.$current
+ ;;
+
+ sunos)
+ major=.$current
+ versuffix=.$current.$revision
+ ;;
+
+ windows)
+ # Use '-' rather than '.', since we only want one
+ # extension on DOS 8.3 file systems.
+ func_arith $current - $age
+ major=$func_arith_result
+ versuffix=-$major
+ ;;
+
+ *)
+ func_fatal_configuration "unknown library version type '$version_type'"
+ ;;
+ esac
+
+ # Clear the version info if we defaulted, and they specified a release.
+ if test -z "$vinfo" && test -n "$release"; then
+ major=
+ case $version_type in
+ darwin)
+ # we can't check for "0.0" in archive_cmds due to quoting
+ # problems, so we reset it completely
+ verstring=
+ ;;
+ *)
+ verstring=0.0
+ ;;
+ esac
+ if test no = "$need_version"; then
+ versuffix=
+ else
+ versuffix=.0.0
+ fi
+ fi
+
+ # Remove version info from name if versioning should be avoided
+ if test yes,no = "$avoid_version,$need_version"; then
+ major=
+ versuffix=
+ verstring=
+ fi
+
+ # Check to see if the archive will have undefined symbols.
+ if test yes = "$allow_undefined"; then
+ if test unsupported = "$allow_undefined_flag"; then
+ if test yes = "$build_old_libs"; then
+ func_warning "undefined symbols not allowed in $host shared libraries; building static only"
+ build_libtool_libs=no
+ else
+ func_fatal_error "can't build $host shared library unless -no-undefined is specified"
+ fi
+ fi
+ else
+ # Don't allow undefined symbols.
+ allow_undefined_flag=$no_undefined_flag
+ fi
+
+ fi
+
+ func_generate_dlsyms "$libname" "$libname" :
+ func_append libobjs " $symfileobj"
+ test " " = "$libobjs" && libobjs=
+
+ if test relink != "$opt_mode"; then
+ # Remove our outputs, but don't remove object files since they
+ # may have been created when compiling PIC objects.
+ removelist=
+ tempremovelist=`$ECHO "$output_objdir/*"`
+ for p in $tempremovelist; do
+ case $p in
+ *.$objext | *.gcno)
+ ;;
+ $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/$libname$release.*)
+ if test -n "$precious_files_regex"; then
+ if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1
+ then
+ continue
+ fi
+ fi
+ func_append removelist " $p"
+ ;;
+ *) ;;
+ esac
+ done
+ test -n "$removelist" && \
+ func_show_eval "${RM}r \$removelist"
+ fi
+
+ # Now set the variables for building old libraries.
+ if test yes = "$build_old_libs" && test convenience != "$build_libtool_libs"; then
+ func_append oldlibs " $output_objdir/$libname.$libext"
+
+ # Transform .lo files to .o files.
+ oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.$libext$/d; $lo2o" | $NL2SP`
+ fi
+
+ # Eliminate all temporary directories.
+ #for path in $notinst_path; do
+ # lib_search_path=`$ECHO "$lib_search_path " | $SED "s% $path % %g"`
+ # deplibs=`$ECHO "$deplibs " | $SED "s% -L$path % %g"`
+ # dependency_libs=`$ECHO "$dependency_libs " | $SED "s% -L$path % %g"`
+ #done
+
+ if test -n "$xrpath"; then
+ # If the user specified any rpath flags, then add them.
+ temp_xrpath=
+ for libdir in $xrpath; do
+ func_replace_sysroot "$libdir"
+ func_append temp_xrpath " -R$func_replace_sysroot_result"
+ case "$finalize_rpath " in
+ *" $libdir "*) ;;
+ *) func_append finalize_rpath " $libdir" ;;
+ esac
+ done
+ if test yes != "$hardcode_into_libs" || test yes = "$build_old_libs"; then
+ dependency_libs="$temp_xrpath $dependency_libs"
+ fi
+ fi
+
+ # Make sure dlfiles contains only unique files that won't be dlpreopened
+ old_dlfiles=$dlfiles
+ dlfiles=
+ for lib in $old_dlfiles; do
+ case " $dlprefiles $dlfiles " in
+ *" $lib "*) ;;
+ *) func_append dlfiles " $lib" ;;
+ esac
+ done
+
+ # Make sure dlprefiles contains only unique files
+ old_dlprefiles=$dlprefiles
+ dlprefiles=
+ for lib in $old_dlprefiles; do
+ case "$dlprefiles " in
+ *" $lib "*) ;;
+ *) func_append dlprefiles " $lib" ;;
+ esac
+ done
+
+ if test yes = "$build_libtool_libs"; then
+ if test -n "$rpath"; then
+ case $host in
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*)
+ # these systems don't actually have a c library (as such)!
+ ;;
+ *-*-rhapsody* | *-*-darwin1.[012])
+ # Rhapsody C library is in the System framework
+ func_append deplibs " System.ltframework"
+ ;;
+ *-*-netbsd*)
+ # Don't link with libc until the a.out ld.so is fixed.
+ ;;
+ *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
+ # Do not include libc due to us having libc/libc_r.
+ ;;
+ *-*-sco3.2v5* | *-*-sco5v6*)
+ # Causes problems with __ctype
+ ;;
+ *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
+ # Compiler inserts libc in the correct place for threads to work
+ ;;
+ *)
+ # Add libc to deplibs on all other systems if necessary.
+ if test yes = "$build_libtool_need_lc"; then
+ func_append deplibs " -lc"
+ fi
+ ;;
+ esac
+ fi
+
+ # Transform deplibs into only deplibs that can be linked in shared.
+ name_save=$name
+ libname_save=$libname
+ release_save=$release
+ versuffix_save=$versuffix
+ major_save=$major
+ # I'm not sure if I'm treating the release correctly. I think
+ # release should show up in the -l (ie -lgmp5) so we don't want to
+ # add it in twice. Is that correct?
+ release=
+ versuffix=
+ major=
+ newdeplibs=
+ droppeddeps=no
+ case $deplibs_check_method in
+ pass_all)
+ # Don't check for shared/static. Everything works.
+ # This might be a little naive. We might want to check
+ # whether the library exists or not. But this is on
+ # osf3 & osf4 and I'm not really sure... Just
+ # implementing what was already the behavior.
+ newdeplibs=$deplibs
+ ;;
+ test_compile)
+ # This code stresses the "libraries are programs" paradigm to its
+ # limits. Maybe even breaks it. We compile a program, linking it
+ # against the deplibs as a proxy for the library. Then we can check
+ # whether they linked in statically or dynamically with ldd.
+ $opt_dry_run || $RM conftest.c
+ cat > conftest.c <<EOF
+ int main() { return 0; }
+EOF
+ $opt_dry_run || $RM conftest
+ if $LTCC $LTCFLAGS -o conftest conftest.c $deplibs; then
+ ldd_output=`ldd conftest`
+ for i in $deplibs; do
+ case $i in
+ -l*)
+ func_stripname -l '' "$i"
+ name=$func_stripname_result
+ if test yes = "$allow_libtool_libs_with_static_runtimes"; then
+ case " $predeps $postdeps " in
+ *" $i "*)
+ func_append newdeplibs " $i"
+ i=
+ ;;
+ esac
+ fi
+ if test -n "$i"; then
+ libname=`eval "\\$ECHO \"$libname_spec\""`
+ deplib_matches=`eval "\\$ECHO \"$library_names_spec\""`
+ set dummy $deplib_matches; shift
+ deplib_match=$1
+ if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0; then
+ func_append newdeplibs " $i"
+ else
+ droppeddeps=yes
+ echo
+ $ECHO "*** Warning: dynamic linker does not accept needed library $i."
+ echo "*** I have the capability to make that library automatically link in when"
+ echo "*** you link to this library. But I can only do this if you have a"
+ echo "*** shared version of the library, which I believe you do not have"
+ echo "*** because a test_compile did reveal that the linker did not use it for"
+ echo "*** its dynamic dependency list that programs get resolved with at runtime."
+ fi
+ fi
+ ;;
+ *)
+ func_append newdeplibs " $i"
+ ;;
+ esac
+ done
+ else
+ # Error occurred in the first compile. Let's try to salvage
+ # the situation: Compile a separate program for each library.
+ for i in $deplibs; do
+ case $i in
+ -l*)
+ func_stripname -l '' "$i"
+ name=$func_stripname_result
+ $opt_dry_run || $RM conftest
+ if $LTCC $LTCFLAGS -o conftest conftest.c $i; then
+ ldd_output=`ldd conftest`
+ if test yes = "$allow_libtool_libs_with_static_runtimes"; then
+ case " $predeps $postdeps " in
+ *" $i "*)
+ func_append newdeplibs " $i"
+ i=
+ ;;
+ esac
+ fi
+ if test -n "$i"; then
+ libname=`eval "\\$ECHO \"$libname_spec\""`
+ deplib_matches=`eval "\\$ECHO \"$library_names_spec\""`
+ set dummy $deplib_matches; shift
+ deplib_match=$1
+ if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0; then
+ func_append newdeplibs " $i"
+ else
+ droppeddeps=yes
+ echo
+ $ECHO "*** Warning: dynamic linker does not accept needed library $i."
+ echo "*** I have the capability to make that library automatically link in when"
+ echo "*** you link to this library. But I can only do this if you have a"
+ echo "*** shared version of the library, which you do not appear to have"
+ echo "*** because a test_compile did reveal that the linker did not use this one"
+ echo "*** as a dynamic dependency that programs can get resolved with at runtime."
+ fi
+ fi
+ else
+ droppeddeps=yes
+ echo
+ $ECHO "*** Warning! Library $i is needed by this library but I was not able to"
+ echo "*** make it link in! You will probably need to install it or some"
+ echo "*** library that it depends on before this library will be fully"
+ echo "*** functional. Installing it before continuing would be even better."
+ fi
+ ;;
+ *)
+ func_append newdeplibs " $i"
+ ;;
+ esac
+ done
+ fi
+ ;;
+ file_magic*)
+ set dummy $deplibs_check_method; shift
+ file_magic_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
+ for a_deplib in $deplibs; do
+ case $a_deplib in
+ -l*)
+ func_stripname -l '' "$a_deplib"
+ name=$func_stripname_result
+ if test yes = "$allow_libtool_libs_with_static_runtimes"; then
+ case " $predeps $postdeps " in
+ *" $a_deplib "*)
+ func_append newdeplibs " $a_deplib"
+ a_deplib=
+ ;;
+ esac
+ fi
+ if test -n "$a_deplib"; then
+ libname=`eval "\\$ECHO \"$libname_spec\""`
+ if test -n "$file_magic_glob"; then
+ libnameglob=`func_echo_all "$libname" | $SED -e $file_magic_glob`
+ else
+ libnameglob=$libname
+ fi
+ test yes = "$want_nocaseglob" && nocaseglob=`shopt -p nocaseglob`
+ for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
+ if test yes = "$want_nocaseglob"; then
+ shopt -s nocaseglob
+ potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null`
+ $nocaseglob
+ else
+ potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null`
+ fi
+ for potent_lib in $potential_libs; do
+ # Follow soft links.
+ if ls -lLd "$potent_lib" 2>/dev/null |
+ $GREP " -> " >/dev/null; then
+ continue
+ fi
+ # The statement above tries to avoid entering an
+ # endless loop below, in case of cyclic links.
+ # We might still enter an endless loop, since a link
+ # loop can be closed while we follow links,
+ # but so what?
+ potlib=$potent_lib
+ while test -h "$potlib" 2>/dev/null; do
+ potliblink=`ls -ld $potlib | $SED 's/.* -> //'`
+ case $potliblink in
+ [\\/]* | [A-Za-z]:[\\/]*) potlib=$potliblink;;
+ *) potlib=`$ECHO "$potlib" | $SED 's|[^/]*$||'`"$potliblink";;
+ esac
+ done
+ if eval $file_magic_cmd \"\$potlib\" 2>/dev/null |
+ $SED -e 10q |
+ $EGREP "$file_magic_regex" > /dev/null; then
+ func_append newdeplibs " $a_deplib"
+ a_deplib=
+ break 2
+ fi
+ done
+ done
+ fi
+ if test -n "$a_deplib"; then
+ droppeddeps=yes
+ echo
+ $ECHO "*** Warning: linker path does not have real file for library $a_deplib."
+ echo "*** I have the capability to make that library automatically link in when"
+ echo "*** you link to this library. But I can only do this if you have a"
+ echo "*** shared version of the library, which you do not appear to have"
+ echo "*** because I did check the linker path looking for a file starting"
+ if test -z "$potlib"; then
+ $ECHO "*** with $libname but no candidates were found. (...for file magic test)"
+ else
+ $ECHO "*** with $libname and none of the candidates passed a file format test"
+ $ECHO "*** using a file magic. Last file checked: $potlib"
+ fi
+ fi
+ ;;
+ *)
+ # Add a -L argument.
+ func_append newdeplibs " $a_deplib"
+ ;;
+ esac
+ done # Gone through all deplibs.
+ ;;
+ match_pattern*)
+ set dummy $deplibs_check_method; shift
+ match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
+ for a_deplib in $deplibs; do
+ case $a_deplib in
+ -l*)
+ func_stripname -l '' "$a_deplib"
+ name=$func_stripname_result
+ if test yes = "$allow_libtool_libs_with_static_runtimes"; then
+ case " $predeps $postdeps " in
+ *" $a_deplib "*)
+ func_append newdeplibs " $a_deplib"
+ a_deplib=
+ ;;
+ esac
+ fi
+ if test -n "$a_deplib"; then
+ libname=`eval "\\$ECHO \"$libname_spec\""`
+ for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
+ potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
+ for potent_lib in $potential_libs; do
+ potlib=$potent_lib # see symlink-check above in file_magic test
+ if eval "\$ECHO \"$potent_lib\"" 2>/dev/null | $SED 10q | \
+ $EGREP "$match_pattern_regex" > /dev/null; then
+ func_append newdeplibs " $a_deplib"
+ a_deplib=
+ break 2
+ fi
+ done
+ done
+ fi
+ if test -n "$a_deplib"; then
+ droppeddeps=yes
+ echo
+ $ECHO "*** Warning: linker path does not have real file for library $a_deplib."
+ echo "*** I have the capability to make that library automatically link in when"
+ echo "*** you link to this library. But I can only do this if you have a"
+ echo "*** shared version of the library, which you do not appear to have"
+ echo "*** because I did check the linker path looking for a file starting"
+ if test -z "$potlib"; then
+ $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)"
+ else
+ $ECHO "*** with $libname and none of the candidates passed a file format test"
+ $ECHO "*** using a regex pattern. Last file checked: $potlib"
+ fi
+ fi
+ ;;
+ *)
+ # Add a -L argument.
+ func_append newdeplibs " $a_deplib"
+ ;;
+ esac
+ done # Gone through all deplibs.
+ ;;
+ none | unknown | *)
+ newdeplibs=
+ tmp_deplibs=`$ECHO " $deplibs" | $SED 's/ -lc$//; s/ -[LR][^ ]*//g'`
+ if test yes = "$allow_libtool_libs_with_static_runtimes"; then
+ for i in $predeps $postdeps; do
+ # can't use Xsed below, because $i might contain '/'
+ tmp_deplibs=`$ECHO " $tmp_deplibs" | $SED "s|$i||"`
+ done
+ fi
+ case $tmp_deplibs in
+ *[!\ \ ]*)
+ echo
+ if test none = "$deplibs_check_method"; then
+ echo "*** Warning: inter-library dependencies are not supported in this platform."
+ else
+ echo "*** Warning: inter-library dependencies are not known to be supported."
+ fi
+ echo "*** All declared inter-library dependencies are being dropped."
+ droppeddeps=yes
+ ;;
+ esac
+ ;;
+ esac
+ versuffix=$versuffix_save
+ major=$major_save
+ release=$release_save
+ libname=$libname_save
+ name=$name_save
+
+ case $host in
+ *-*-rhapsody* | *-*-darwin1.[012])
+ # On Rhapsody replace the C library with the System framework
+ newdeplibs=`$ECHO " $newdeplibs" | $SED 's/ -lc / System.ltframework /'`
+ ;;
+ esac
+
+ if test yes = "$droppeddeps"; then
+ if test yes = "$module"; then
+ echo
+ echo "*** Warning: libtool could not satisfy all declared inter-library"
+ $ECHO "*** dependencies of module $libname. Therefore, libtool will create"
+ echo "*** a static module, that should work as long as the dlopening"
+ echo "*** application is linked with the -dlopen flag."
+ if test -z "$global_symbol_pipe"; then
+ echo
+ echo "*** However, this would only work if libtool was able to extract symbol"
+ echo "*** lists from a program, using 'nm' or equivalent, but libtool could"
+ echo "*** not find such a program. So, this module is probably useless."
+ echo "*** 'nm' from GNU binutils and a full rebuild may help."
+ fi
+ if test no = "$build_old_libs"; then
+ oldlibs=$output_objdir/$libname.$libext
+ build_libtool_libs=module
+ build_old_libs=yes
+ else
+ build_libtool_libs=no
+ fi
+ else
+ echo "*** The inter-library dependencies that have been dropped here will be"
+ echo "*** automatically added whenever a program is linked with this library"
+ echo "*** or is declared to -dlopen it."
+
+ if test no = "$allow_undefined"; then
+ echo
+ echo "*** Since this library must not contain undefined symbols,"
+ echo "*** because either the platform does not support them or"
+ echo "*** it was explicitly requested with -no-undefined,"
+ echo "*** libtool will only create a static version of it."
+ if test no = "$build_old_libs"; then
+ oldlibs=$output_objdir/$libname.$libext
+ build_libtool_libs=module
+ build_old_libs=yes
+ else
+ build_libtool_libs=no
+ fi
+ fi
+ fi
+ fi
+ # Done checking deplibs!
+ deplibs=$newdeplibs
+ fi
+ # Time to change all our "foo.ltframework" stuff back to "-framework foo"
+ case $host in
+ *-*-darwin*)
+ newdeplibs=`$ECHO " $newdeplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
+ new_inherited_linker_flags=`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
+ deplibs=`$ECHO " $deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
+ ;;
+ esac
+
+ # move library search paths that coincide with paths to not yet
+ # installed libraries to the beginning of the library search list
+ new_libs=
+ for path in $notinst_path; do
+ case " $new_libs " in
+ *" -L$path/$objdir "*) ;;
+ *)
+ case " $deplibs " in
+ *" -L$path/$objdir "*)
+ func_append new_libs " -L$path/$objdir" ;;
+ esac
+ ;;
+ esac
+ done
+ for deplib in $deplibs; do
+ case $deplib in
+ -L*)
+ case " $new_libs " in
+ *" $deplib "*) ;;
+ *) func_append new_libs " $deplib" ;;
+ esac
+ ;;
+ *) func_append new_libs " $deplib" ;;
+ esac
+ done
+ deplibs=$new_libs
+
+ # All the library-specific variables (install_libdir is set above).
+ library_names=
+ old_library=
+ dlname=
+
+ # Test again, we may have decided not to build it any more
+ if test yes = "$build_libtool_libs"; then
+ # Remove $wl instances when linking with ld.
+ # FIXME: should test the right _cmds variable.
+ case $archive_cmds in
+ *\$LD\ *) wl= ;;
+ esac
+ if test yes = "$hardcode_into_libs"; then
+ # Hardcode the library paths
+ hardcode_libdirs=
+ dep_rpath=
+ rpath=$finalize_rpath
+ test relink = "$opt_mode" || rpath=$compile_rpath$rpath
+ for libdir in $rpath; do
+ if test -n "$hardcode_libdir_flag_spec"; then
+ if test -n "$hardcode_libdir_separator"; then
+ func_replace_sysroot "$libdir"
+ libdir=$func_replace_sysroot_result
+ if test -z "$hardcode_libdirs"; then
+ hardcode_libdirs=$libdir
+ else
+ # Just accumulate the unique libdirs.
+ case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
+ *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
+ ;;
+ *)
+ func_append hardcode_libdirs "$hardcode_libdir_separator$libdir"
+ ;;
+ esac
+ fi
+ else
+ eval flag=\"$hardcode_libdir_flag_spec\"
+ func_append dep_rpath " $flag"
+ fi
+ elif test -n "$runpath_var"; then
+ case "$perm_rpath " in
+ *" $libdir "*) ;;
+ *) func_append perm_rpath " $libdir" ;;
+ esac
+ fi
+ done
+ # Substitute the hardcoded libdirs into the rpath.
+ if test -n "$hardcode_libdir_separator" &&
+ test -n "$hardcode_libdirs"; then
+ libdir=$hardcode_libdirs
+ eval "dep_rpath=\"$hardcode_libdir_flag_spec\""
+ fi
+ if test -n "$runpath_var" && test -n "$perm_rpath"; then
+ # We should set the runpath_var.
+ rpath=
+ for dir in $perm_rpath; do
+ func_append rpath "$dir:"
+ done
+ eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var"
+ fi
+ test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs"
+ fi
+
+ shlibpath=$finalize_shlibpath
+ test relink = "$opt_mode" || shlibpath=$compile_shlibpath$shlibpath
+ if test -n "$shlibpath"; then
+ eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var"
+ fi
+
+ # Get the real and link names of the library.
+ eval shared_ext=\"$shrext_cmds\"
+ eval library_names=\"$library_names_spec\"
+ set dummy $library_names
+ shift
+ realname=$1
+ shift
+
+ if test -n "$soname_spec"; then
+ eval soname=\"$soname_spec\"
+ else
+ soname=$realname
+ fi
+ if test -z "$dlname"; then
+ dlname=$soname
+ fi
+
+ lib=$output_objdir/$realname
+ linknames=
+ for link
+ do
+ func_append linknames " $link"
+ done
+
+ # Use standard objects if they are pic
+ test -z "$pic_flag" && libobjs=`$ECHO "$libobjs" | $SP2NL | $SED "$lo2o" | $NL2SP`
+ test "X$libobjs" = "X " && libobjs=
+
+ delfiles=
+ if test -n "$export_symbols" && test -n "$include_expsyms"; then
+ $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp"
+ export_symbols=$output_objdir/$libname.uexp
+ func_append delfiles " $export_symbols"
+ fi
+
+ orig_export_symbols=
+ case $host_os in
+ cygwin* | mingw* | cegcc*)
+ if test -n "$export_symbols" && test -z "$export_symbols_regex"; then
+ # exporting using user supplied symfile
+ func_dll_def_p "$export_symbols" || {
+ # and it's NOT already a .def file. Must figure out
+ # which of the given symbols are data symbols and tag
+ # them as such. So, trigger use of export_symbols_cmds.
+ # export_symbols gets reassigned inside the "prepare
+ # the list of exported symbols" if statement, so the
+ # include_expsyms logic still works.
+ orig_export_symbols=$export_symbols
+ export_symbols=
+ always_export_symbols=yes
+ }
+ fi
+ ;;
+ esac
+
+ # Prepare the list of exported symbols
+ if test -z "$export_symbols"; then
+ if test yes = "$always_export_symbols" || test -n "$export_symbols_regex"; then
+ func_verbose "generating symbol list for '$libname.la'"
+ export_symbols=$output_objdir/$libname.exp
+ $opt_dry_run || $RM $export_symbols
+ cmds=$export_symbols_cmds
+ save_ifs=$IFS; IFS='~'
+ for cmd1 in $cmds; do
+ IFS=$save_ifs
+ # Take the normal branch if the nm_file_list_spec branch
+ # doesn't work or if tool conversion is not needed.
+ case $nm_file_list_spec~$to_tool_file_cmd in
+ *~func_convert_file_noop | *~func_convert_file_msys_to_w32 | ~*)
+ try_normal_branch=yes
+ eval cmd=\"$cmd1\"
+ func_len " $cmd"
+ len=$func_len_result
+ ;;
+ *)
+ try_normal_branch=no
+ ;;
+ esac
+ if test yes = "$try_normal_branch" \
+ && { test "$len" -lt "$max_cmd_len" \
+ || test "$max_cmd_len" -le -1; }
+ then
+ func_show_eval "$cmd" 'exit $?'
+ skipped_export=false
+ elif test -n "$nm_file_list_spec"; then
+ func_basename "$output"
+ output_la=$func_basename_result
+ save_libobjs=$libobjs
+ save_output=$output
+ output=$output_objdir/$output_la.nm
+ func_to_tool_file "$output"
+ libobjs=$nm_file_list_spec$func_to_tool_file_result
+ func_append delfiles " $output"
+ func_verbose "creating $NM input file list: $output"
+ for obj in $save_libobjs; do
+ func_to_tool_file "$obj"
+ $ECHO "$func_to_tool_file_result"
+ done > "$output"
+ eval cmd=\"$cmd1\"
+ func_show_eval "$cmd" 'exit $?'
+ output=$save_output
+ libobjs=$save_libobjs
+ skipped_export=false
+ else
+ # The command line is too long to execute in one step.
+ func_verbose "using reloadable object file for export list..."
+ skipped_export=:
+ # Break out early, otherwise skipped_export may be
+ # set to false by a later but shorter cmd.
+ break
+ fi
+ done
+ IFS=$save_ifs
+ if test -n "$export_symbols_regex" && test : != "$skipped_export"; then
+ func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
+ func_show_eval '$MV "${export_symbols}T" "$export_symbols"'
+ fi
+ fi
+ fi
+
+ if test -n "$export_symbols" && test -n "$include_expsyms"; then
+ tmp_export_symbols=$export_symbols
+ test -n "$orig_export_symbols" && tmp_export_symbols=$orig_export_symbols
+ $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"'
+ fi
+
+ if test : != "$skipped_export" && test -n "$orig_export_symbols"; then
+ # The given exports_symbols file has to be filtered, so filter it.
+ func_verbose "filter symbol list for '$libname.la' to tag DATA exports"
+ # FIXME: $output_objdir/$libname.filter potentially contains lots of
+ # 's' commands, which not all seds can handle. GNU sed should be fine
+ # though. Also, the filter scales superlinearly with the number of
+ # global variables. join(1) would be nice here, but unfortunately
+ # isn't a blessed tool.
+ $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter
+ func_append delfiles " $export_symbols $output_objdir/$libname.filter"
+ export_symbols=$output_objdir/$libname.def
+ $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols
+ fi
+
+ tmp_deplibs=
+ for test_deplib in $deplibs; do
+ case " $convenience " in
+ *" $test_deplib "*) ;;
+ *)
+ func_append tmp_deplibs " $test_deplib"
+ ;;
+ esac
+ done
+ deplibs=$tmp_deplibs
+
+ if test -n "$convenience"; then
+ if test -n "$whole_archive_flag_spec" &&
+ test yes = "$compiler_needs_object" &&
+ test -z "$libobjs"; then
+ # extract the archives, so we have objects to list.
+ # TODO: could optimize this to just extract one archive.
+ whole_archive_flag_spec=
+ fi
+ if test -n "$whole_archive_flag_spec"; then
+ save_libobjs=$libobjs
+ eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
+ test "X$libobjs" = "X " && libobjs=
+ else
+ gentop=$output_objdir/${outputname}x
+ func_append generated " $gentop"
+
+ func_extract_archives $gentop $convenience
+ func_append libobjs " $func_extract_archives_result"
+ test "X$libobjs" = "X " && libobjs=
+ fi
+ fi
+
+ if test yes = "$thread_safe" && test -n "$thread_safe_flag_spec"; then
+ eval flag=\"$thread_safe_flag_spec\"
+ func_append linker_flags " $flag"
+ fi
+
+ # Make a backup of the uninstalled library when relinking
+ if test relink = "$opt_mode"; then
+ $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $?
+ fi
+
+ # Do each of the archive commands.
+ if test yes = "$module" && test -n "$module_cmds"; then
+ if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
+ eval test_cmds=\"$module_expsym_cmds\"
+ cmds=$module_expsym_cmds
+ else
+ eval test_cmds=\"$module_cmds\"
+ cmds=$module_cmds
+ fi
+ else
+ if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
+ eval test_cmds=\"$archive_expsym_cmds\"
+ cmds=$archive_expsym_cmds
+ else
+ eval test_cmds=\"$archive_cmds\"
+ cmds=$archive_cmds
+ fi
+ fi
+
+ if test : != "$skipped_export" &&
+ func_len " $test_cmds" &&
+ len=$func_len_result &&
+ test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then
+ :
+ else
+ # The command line is too long to link in one step, link piecewise
+ # or, if using GNU ld and skipped_export is not :, use a linker
+ # script.
+
+ # Save the value of $output and $libobjs because we want to
+ # use them later. If we have whole_archive_flag_spec, we
+ # want to use save_libobjs as it was before
+ # whole_archive_flag_spec was expanded, because we can't
+ # assume the linker understands whole_archive_flag_spec.
+ # This may have to be revisited, in case too many
+ # convenience libraries get linked in and end up exceeding
+ # the spec.
+ if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then
+ save_libobjs=$libobjs
+ fi
+ save_output=$output
+ func_basename "$output"
+ output_la=$func_basename_result
+
+ # Clear the reloadable object creation command queue and
+ # initialize k to one.
+ test_cmds=
+ concat_cmds=
+ objlist=
+ last_robj=
+ k=1
+
+ if test -n "$save_libobjs" && test : != "$skipped_export" && test yes = "$with_gnu_ld"; then
+ output=$output_objdir/$output_la.lnkscript
+ func_verbose "creating GNU ld script: $output"
+ echo 'INPUT (' > $output
+ for obj in $save_libobjs
+ do
+ func_to_tool_file "$obj"
+ $ECHO "$func_to_tool_file_result" >> $output
+ done
+ echo ')' >> $output
+ func_append delfiles " $output"
+ func_to_tool_file "$output"
+ output=$func_to_tool_file_result
+ elif test -n "$save_libobjs" && test : != "$skipped_export" && test -n "$file_list_spec"; then
+ output=$output_objdir/$output_la.lnk
+ func_verbose "creating linker input file list: $output"
+ : > $output
+ set x $save_libobjs
+ shift
+ firstobj=
+ if test yes = "$compiler_needs_object"; then
+ firstobj="$1 "
+ shift
+ fi
+ for obj
+ do
+ func_to_tool_file "$obj"
+ $ECHO "$func_to_tool_file_result" >> $output
+ done
+ func_append delfiles " $output"
+ func_to_tool_file "$output"
+ output=$firstobj\"$file_list_spec$func_to_tool_file_result\"
+ else
+ if test -n "$save_libobjs"; then
+ func_verbose "creating reloadable object files..."
+ output=$output_objdir/$output_la-$k.$objext
+ eval test_cmds=\"$reload_cmds\"
+ func_len " $test_cmds"
+ len0=$func_len_result
+ len=$len0
+
+ # Loop over the list of objects to be linked.
+ for obj in $save_libobjs
+ do
+ func_len " $obj"
+ func_arith $len + $func_len_result
+ len=$func_arith_result
+ if test -z "$objlist" ||
+ test "$len" -lt "$max_cmd_len"; then
+ func_append objlist " $obj"
+ else
+ # The command $test_cmds is almost too long, add a
+ # command to the queue.
+ if test 1 -eq "$k"; then
+ # The first file doesn't have a previous command to add.
+ reload_objs=$objlist
+ eval concat_cmds=\"$reload_cmds\"
+ else
+ # All subsequent reloadable object files will link in
+ # the last one created.
+ reload_objs="$objlist $last_robj"
+ eval concat_cmds=\"\$concat_cmds~$reload_cmds~\$RM $last_robj\"
+ fi
+ last_robj=$output_objdir/$output_la-$k.$objext
+ func_arith $k + 1
+ k=$func_arith_result
+ output=$output_objdir/$output_la-$k.$objext
+ objlist=" $obj"
+ func_len " $last_robj"
+ func_arith $len0 + $func_len_result
+ len=$func_arith_result
+ fi
+ done
+ # Handle the remaining objects by creating one last
+ # reloadable object file. All subsequent reloadable object
+ # files will link in the last one created.
+ test -z "$concat_cmds" || concat_cmds=$concat_cmds~
+ reload_objs="$objlist $last_robj"
+ eval concat_cmds=\"\$concat_cmds$reload_cmds\"
+ if test -n "$last_robj"; then
+ eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\"
+ fi
+ func_append delfiles " $output"
+
+ else
+ output=
+ fi
+
+ ${skipped_export-false} && {
+ func_verbose "generating symbol list for '$libname.la'"
+ export_symbols=$output_objdir/$libname.exp
+ $opt_dry_run || $RM $export_symbols
+ libobjs=$output
+ # Append the command to create the export file.
+ test -z "$concat_cmds" || concat_cmds=$concat_cmds~
+ eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\"
+ if test -n "$last_robj"; then
+ eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\"
+ fi
+ }
+
+ test -n "$save_libobjs" &&
+ func_verbose "creating a temporary reloadable object file: $output"
+
+ # Loop through the commands generated above and execute them.
+ save_ifs=$IFS; IFS='~'
+ for cmd in $concat_cmds; do
+ IFS=$save_ifs
+ $opt_quiet || {
+ func_quote_for_expand "$cmd"
+ eval "func_echo $func_quote_for_expand_result"
+ }
+ $opt_dry_run || eval "$cmd" || {
+ lt_exit=$?
+
+ # Restore the uninstalled library and exit
+ if test relink = "$opt_mode"; then
+ ( cd "$output_objdir" && \
+ $RM "${realname}T" && \
+ $MV "${realname}U" "$realname" )
+ fi
+
+ exit $lt_exit
+ }
+ done
+ IFS=$save_ifs
+
+ if test -n "$export_symbols_regex" && ${skipped_export-false}; then
+ func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
+ func_show_eval '$MV "${export_symbols}T" "$export_symbols"'
+ fi
+ fi
+
+ ${skipped_export-false} && {
+ if test -n "$export_symbols" && test -n "$include_expsyms"; then
+ tmp_export_symbols=$export_symbols
+ test -n "$orig_export_symbols" && tmp_export_symbols=$orig_export_symbols
+ $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"'
+ fi
+
+ if test -n "$orig_export_symbols"; then
+ # The given exports_symbols file has to be filtered, so filter it.
+ func_verbose "filter symbol list for '$libname.la' to tag DATA exports"
+ # FIXME: $output_objdir/$libname.filter potentially contains lots of
+ # 's' commands, which not all seds can handle. GNU sed should be fine
+ # though. Also, the filter scales superlinearly with the number of
+ # global variables. join(1) would be nice here, but unfortunately
+ # isn't a blessed tool.
+ $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter
+ func_append delfiles " $export_symbols $output_objdir/$libname.filter"
+ export_symbols=$output_objdir/$libname.def
+ $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols
+ fi
+ }
+
+ libobjs=$output
+ # Restore the value of output.
+ output=$save_output
+
+ if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then
+ eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
+ test "X$libobjs" = "X " && libobjs=
+ fi
+ # Expand the library linking commands again to reset the
+ # value of $libobjs for piecewise linking.
+
+ # Do each of the archive commands.
+ if test yes = "$module" && test -n "$module_cmds"; then
+ if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
+ cmds=$module_expsym_cmds
+ else
+ cmds=$module_cmds
+ fi
+ else
+ if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
+ cmds=$archive_expsym_cmds
+ else
+ cmds=$archive_cmds
+ fi
+ fi
+ fi
+
+ if test -n "$delfiles"; then
+ # Append the command to remove temporary files to $cmds.
+ eval cmds=\"\$cmds~\$RM $delfiles\"
+ fi
+
+ # Add any objects from preloaded convenience libraries
+ if test -n "$dlprefiles"; then
+ gentop=$output_objdir/${outputname}x
+ func_append generated " $gentop"
+
+ func_extract_archives $gentop $dlprefiles
+ func_append libobjs " $func_extract_archives_result"
+ test "X$libobjs" = "X " && libobjs=
+ fi
+
+ save_ifs=$IFS; IFS='~'
+ for cmd in $cmds; do
+ IFS=$sp$nl
+ eval cmd=\"$cmd\"
+ IFS=$save_ifs
+ $opt_quiet || {
+ func_quote_for_expand "$cmd"
+ eval "func_echo $func_quote_for_expand_result"
+ }
+ $opt_dry_run || eval "$cmd" || {
+ lt_exit=$?
+
+ # Restore the uninstalled library and exit
+ if test relink = "$opt_mode"; then
+ ( cd "$output_objdir" && \
+ $RM "${realname}T" && \
+ $MV "${realname}U" "$realname" )
+ fi
+
+ exit $lt_exit
+ }
+ done
+ IFS=$save_ifs
+
+ # Restore the uninstalled library and exit
+ if test relink = "$opt_mode"; then
+ $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $?
+
+ if test -n "$convenience"; then
+ if test -z "$whole_archive_flag_spec"; then
+ func_show_eval '${RM}r "$gentop"'
+ fi
+ fi
+
+ exit $EXIT_SUCCESS
+ fi
+
+ # Create links to the real library.
+ for linkname in $linknames; do
+ if test "$realname" != "$linkname"; then
+ func_show_eval '(cd "$output_objdir" && $RM "$linkname" && $LN_S "$realname" "$linkname")' 'exit $?'
+ fi
+ done
+
+ # If -module or -export-dynamic was specified, set the dlname.
+ if test yes = "$module" || test yes = "$export_dynamic"; then
+ # On all known operating systems, these are identical.
+ dlname=$soname
+ fi
+ fi
+ ;;
+
+ obj)
+ if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then
+ func_warning "'-dlopen' is ignored for objects"
+ fi
+
+ case " $deplibs" in
+ *\ -l* | *\ -L*)
+ func_warning "'-l' and '-L' are ignored for objects" ;;
+ esac
+
+ test -n "$rpath" && \
+ func_warning "'-rpath' is ignored for objects"
+
+ test -n "$xrpath" && \
+ func_warning "'-R' is ignored for objects"
+
+ test -n "$vinfo" && \
+ func_warning "'-version-info' is ignored for objects"
+
+ test -n "$release" && \
+ func_warning "'-release' is ignored for objects"
+
+ case $output in
+ *.lo)
+ test -n "$objs$old_deplibs" && \
+ func_fatal_error "cannot build library object '$output' from non-libtool objects"
+
+ libobj=$output
+ func_lo2o "$libobj"
+ obj=$func_lo2o_result
+ ;;
+ *)
+ libobj=
+ obj=$output
+ ;;
+ esac
+
+ # Delete the old objects.
+ $opt_dry_run || $RM $obj $libobj
+
+ # Objects from convenience libraries. This assumes
+ # single-version convenience libraries. Whenever we create
+ # different ones for PIC/non-PIC, this we'll have to duplicate
+ # the extraction.
+ reload_conv_objs=
+ gentop=
+ # if reload_cmds runs $LD directly, get rid of -Wl from
+ # whole_archive_flag_spec and hope we can get by with turning comma
+ # into space.
+ case $reload_cmds in
+ *\$LD[\ \$]*) wl= ;;
+ esac
+ if test -n "$convenience"; then
+ if test -n "$whole_archive_flag_spec"; then
+ eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\"
+ test -n "$wl" || tmp_whole_archive_flags=`$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'`
+ reload_conv_objs=$reload_objs\ $tmp_whole_archive_flags
+ else
+ gentop=$output_objdir/${obj}x
+ func_append generated " $gentop"
+
+ func_extract_archives $gentop $convenience
+ reload_conv_objs="$reload_objs $func_extract_archives_result"
+ fi
+ fi
+
+ # If we're not building shared, we need to use non_pic_objs
+ test yes = "$build_libtool_libs" || libobjs=$non_pic_objects
+
+ # Create the old-style object.
+ reload_objs=$objs$old_deplibs' '`$ECHO "$libobjs" | $SP2NL | $SED "/\.$libext$/d; /\.lib$/d; $lo2o" | $NL2SP`' '$reload_conv_objs
+
+ output=$obj
+ func_execute_cmds "$reload_cmds" 'exit $?'
+
+ # Exit if we aren't doing a library object file.
+ if test -z "$libobj"; then
+ if test -n "$gentop"; then
+ func_show_eval '${RM}r "$gentop"'
+ fi
+
+ exit $EXIT_SUCCESS
+ fi
+
+ test yes = "$build_libtool_libs" || {
+ if test -n "$gentop"; then
+ func_show_eval '${RM}r "$gentop"'
+ fi
+
+ # Create an invalid libtool object if no PIC, so that we don't
+ # accidentally link it into a program.
+ # $show "echo timestamp > $libobj"
+ # $opt_dry_run || eval "echo timestamp > $libobj" || exit $?
+ exit $EXIT_SUCCESS
+ }
+
+ if test -n "$pic_flag" || test default != "$pic_mode"; then
+ # Only do commands if we really have different PIC objects.
+ reload_objs="$libobjs $reload_conv_objs"
+ output=$libobj
+ func_execute_cmds "$reload_cmds" 'exit $?'
+ fi
+
+ if test -n "$gentop"; then
+ func_show_eval '${RM}r "$gentop"'
+ fi
+
+ exit $EXIT_SUCCESS
+ ;;
+
+ prog)
+ case $host in
+ *cygwin*) func_stripname '' '.exe' "$output"
+ output=$func_stripname_result.exe;;
+ esac
+ test -n "$vinfo" && \
+ func_warning "'-version-info' is ignored for programs"
+
+ test -n "$release" && \
+ func_warning "'-release' is ignored for programs"
+
+ $preload \
+ && test unknown,unknown,unknown = "$dlopen_support,$dlopen_self,$dlopen_self_static" \
+ && func_warning "'LT_INIT([dlopen])' not used. Assuming no dlopen support."
+
+ case $host in
+ *-*-rhapsody* | *-*-darwin1.[012])
+ # On Rhapsody replace the C library is the System framework
+ compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's/ -lc / System.ltframework /'`
+ finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's/ -lc / System.ltframework /'`
+ ;;
+ esac
+
+ case $host in
+ *-*-darwin*)
+ # Don't allow lazy linking, it breaks C++ global constructors
+ # But is supposedly fixed on 10.4 or later (yay!).
+ if test CXX = "$tagname"; then
+ case ${MACOSX_DEPLOYMENT_TARGET-10.0} in
+ 10.[0123])
+ func_append compile_command " $wl-bind_at_load"
+ func_append finalize_command " $wl-bind_at_load"
+ ;;
+ esac
+ fi
+ # Time to change all our "foo.ltframework" stuff back to "-framework foo"
+ compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
+ finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
+ ;;
+ esac
+
+
+ # move library search paths that coincide with paths to not yet
+ # installed libraries to the beginning of the library search list
+ new_libs=
+ for path in $notinst_path; do
+ case " $new_libs " in
+ *" -L$path/$objdir "*) ;;
+ *)
+ case " $compile_deplibs " in
+ *" -L$path/$objdir "*)
+ func_append new_libs " -L$path/$objdir" ;;
+ esac
+ ;;
+ esac
+ done
+ for deplib in $compile_deplibs; do
+ case $deplib in
+ -L*)
+ case " $new_libs " in
+ *" $deplib "*) ;;
+ *) func_append new_libs " $deplib" ;;
+ esac
+ ;;
+ *) func_append new_libs " $deplib" ;;
+ esac
+ done
+ compile_deplibs=$new_libs
+
+
+ func_append compile_command " $compile_deplibs"
+ func_append finalize_command " $finalize_deplibs"
+
+ if test -n "$rpath$xrpath"; then
+ # If the user specified any rpath flags, then add them.
+ for libdir in $rpath $xrpath; do
+ # This is the magic to use -rpath.
+ case "$finalize_rpath " in
+ *" $libdir "*) ;;
+ *) func_append finalize_rpath " $libdir" ;;
+ esac
+ done
+ fi
+
+ # Now hardcode the library paths
+ rpath=
+ hardcode_libdirs=
+ for libdir in $compile_rpath $finalize_rpath; do
+ if test -n "$hardcode_libdir_flag_spec"; then
+ if test -n "$hardcode_libdir_separator"; then
+ if test -z "$hardcode_libdirs"; then
+ hardcode_libdirs=$libdir
+ else
+ # Just accumulate the unique libdirs.
+ case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
+ *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
+ ;;
+ *)
+ func_append hardcode_libdirs "$hardcode_libdir_separator$libdir"
+ ;;
+ esac
+ fi
+ else
+ eval flag=\"$hardcode_libdir_flag_spec\"
+ func_append rpath " $flag"
+ fi
+ elif test -n "$runpath_var"; then
+ case "$perm_rpath " in
+ *" $libdir "*) ;;
+ *) func_append perm_rpath " $libdir" ;;
+ esac
+ fi
+ case $host in
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
+ testbindir=`$ECHO "$libdir" | $SED -e 's*/lib$*/bin*'`
+ case :$dllsearchpath: in
+ *":$libdir:"*) ;;
+ ::) dllsearchpath=$libdir;;
+ *) func_append dllsearchpath ":$libdir";;
+ esac
+ case :$dllsearchpath: in
+ *":$testbindir:"*) ;;
+ ::) dllsearchpath=$testbindir;;
+ *) func_append dllsearchpath ":$testbindir";;
+ esac
+ ;;
+ esac
+ done
+ # Substitute the hardcoded libdirs into the rpath.
+ if test -n "$hardcode_libdir_separator" &&
+ test -n "$hardcode_libdirs"; then
+ libdir=$hardcode_libdirs
+ eval rpath=\" $hardcode_libdir_flag_spec\"
+ fi
+ compile_rpath=$rpath
+
+ rpath=
+ hardcode_libdirs=
+ for libdir in $finalize_rpath; do
+ if test -n "$hardcode_libdir_flag_spec"; then
+ if test -n "$hardcode_libdir_separator"; then
+ if test -z "$hardcode_libdirs"; then
+ hardcode_libdirs=$libdir
+ else
+ # Just accumulate the unique libdirs.
+ case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
+ *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
+ ;;
+ *)
+ func_append hardcode_libdirs "$hardcode_libdir_separator$libdir"
+ ;;
+ esac
+ fi
+ else
+ eval flag=\"$hardcode_libdir_flag_spec\"
+ func_append rpath " $flag"
+ fi
+ elif test -n "$runpath_var"; then
+ case "$finalize_perm_rpath " in
+ *" $libdir "*) ;;
+ *) func_append finalize_perm_rpath " $libdir" ;;
+ esac
+ fi
+ done
+ # Substitute the hardcoded libdirs into the rpath.
+ if test -n "$hardcode_libdir_separator" &&
+ test -n "$hardcode_libdirs"; then
+ libdir=$hardcode_libdirs
+ eval rpath=\" $hardcode_libdir_flag_spec\"
+ fi
+ finalize_rpath=$rpath
+
+ if test -n "$libobjs" && test yes = "$build_old_libs"; then
+ # Transform all the library objects into standard objects.
+ compile_command=`$ECHO "$compile_command" | $SP2NL | $SED "$lo2o" | $NL2SP`
+ finalize_command=`$ECHO "$finalize_command" | $SP2NL | $SED "$lo2o" | $NL2SP`
+ fi
+
+ func_generate_dlsyms "$outputname" "@PROGRAM@" false
+
+ # template prelinking step
+ if test -n "$prelink_cmds"; then
+ func_execute_cmds "$prelink_cmds" 'exit $?'
+ fi
+
+ wrappers_required=:
+ case $host in
+ *cegcc* | *mingw32ce*)
+ # Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway.
+ wrappers_required=false
+ ;;
+ *cygwin* | *mingw* )
+ test yes = "$build_libtool_libs" || wrappers_required=false
+ ;;
+ *)
+ if test no = "$need_relink" || test yes != "$build_libtool_libs"; then
+ wrappers_required=false
+ fi
+ ;;
+ esac
+ $wrappers_required || {
+ # Replace the output file specification.
+ compile_command=`$ECHO "$compile_command" | $SED 's%@OUTPUT@%'"$output"'%g'`
+ link_command=$compile_command$compile_rpath
+
+ # We have no uninstalled library dependencies, so finalize right now.
+ exit_status=0
+ func_show_eval "$link_command" 'exit_status=$?'
+
+ if test -n "$postlink_cmds"; then
+ func_to_tool_file "$output"
+ postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'`
+ func_execute_cmds "$postlink_cmds" 'exit $?'
+ fi
+
+ # Delete the generated files.
+ if test -f "$output_objdir/${outputname}S.$objext"; then
+ func_show_eval '$RM "$output_objdir/${outputname}S.$objext"'
+ fi
+
+ exit $exit_status
+ }
+
+ if test -n "$compile_shlibpath$finalize_shlibpath"; then
+ compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command"
+ fi
+ if test -n "$finalize_shlibpath"; then
+ finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command"
+ fi
+
+ compile_var=
+ finalize_var=
+ if test -n "$runpath_var"; then
+ if test -n "$perm_rpath"; then
+ # We should set the runpath_var.
+ rpath=
+ for dir in $perm_rpath; do
+ func_append rpath "$dir:"
+ done
+ compile_var="$runpath_var=\"$rpath\$$runpath_var\" "
+ fi
+ if test -n "$finalize_perm_rpath"; then
+ # We should set the runpath_var.
+ rpath=
+ for dir in $finalize_perm_rpath; do
+ func_append rpath "$dir:"
+ done
+ finalize_var="$runpath_var=\"$rpath\$$runpath_var\" "
+ fi
+ fi
+
+ if test yes = "$no_install"; then
+ # We don't need to create a wrapper script.
+ link_command=$compile_var$compile_command$compile_rpath
+ # Replace the output file specification.
+ link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output"'%g'`
+ # Delete the old output file.
+ $opt_dry_run || $RM $output
+ # Link the executable and exit
+ func_show_eval "$link_command" 'exit $?'
+
+ if test -n "$postlink_cmds"; then
+ func_to_tool_file "$output"
+ postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'`
+ func_execute_cmds "$postlink_cmds" 'exit $?'
+ fi
+
+ exit $EXIT_SUCCESS
+ fi
+
+ case $hardcode_action,$fast_install in
+ relink,*)
+ # Fast installation is not supported
+ link_command=$compile_var$compile_command$compile_rpath
+ relink_command=$finalize_var$finalize_command$finalize_rpath
+
+ func_warning "this platform does not like uninstalled shared libraries"
+ func_warning "'$output' will be relinked during installation"
+ ;;
+ *,yes)
+ link_command=$finalize_var$compile_command$finalize_rpath
+ relink_command=`$ECHO "$compile_var$compile_command$compile_rpath" | $SED 's%@OUTPUT@%\$progdir/\$file%g'`
+ ;;
+ *,no)
+ link_command=$compile_var$compile_command$compile_rpath
+ relink_command=$finalize_var$finalize_command$finalize_rpath
+ ;;
+ *,needless)
+ link_command=$finalize_var$compile_command$finalize_rpath
+ relink_command=
+ ;;
+ esac
+
+ # Replace the output file specification.
+ link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
+
+ # Delete the old output files.
+ $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname
+
+ func_show_eval "$link_command" 'exit $?'
+
+ if test -n "$postlink_cmds"; then
+ func_to_tool_file "$output_objdir/$outputname"
+ postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'`
+ func_execute_cmds "$postlink_cmds" 'exit $?'
+ fi
+
+ # Now create the wrapper script.
+ func_verbose "creating $output"
+
+ # Quote the relink command for shipping.
+ if test -n "$relink_command"; then
+ # Preserve any variables that may affect compiler behavior
+ for var in $variables_saved_for_relink; do
+ if eval test -z \"\${$var+set}\"; then
+ relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command"
+ elif eval var_value=\$$var; test -z "$var_value"; then
+ relink_command="$var=; export $var; $relink_command"
+ else
+ func_quote_for_eval "$var_value"
+ relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command"
+ fi
+ done
+ relink_command="(cd `pwd`; $relink_command)"
+ relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"`
+ fi
+
+ # Only actually do things if not in dry run mode.
+ $opt_dry_run || {
+ # win32 will think the script is a binary if it has
+ # a .exe suffix, so we strip it off here.
+ case $output in
+ *.exe) func_stripname '' '.exe' "$output"
+ output=$func_stripname_result ;;
+ esac
+ # test for cygwin because mv fails w/o .exe extensions
+ case $host in
+ *cygwin*)
+ exeext=.exe
+ func_stripname '' '.exe' "$outputname"
+ outputname=$func_stripname_result ;;
+ *) exeext= ;;
+ esac
+ case $host in
+ *cygwin* | *mingw* )
+ func_dirname_and_basename "$output" "" "."
+ output_name=$func_basename_result
+ output_path=$func_dirname_result
+ cwrappersource=$output_path/$objdir/lt-$output_name.c
+ cwrapper=$output_path/$output_name.exe
+ $RM $cwrappersource $cwrapper
+ trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15
+
+ func_emit_cwrapperexe_src > $cwrappersource
+
+ # The wrapper executable is built using the $host compiler,
+ # because it contains $host paths and files. If cross-
+ # compiling, it, like the target executable, must be
+ # executed on the $host or under an emulation environment.
+ $opt_dry_run || {
+ $LTCC $LTCFLAGS -o $cwrapper $cwrappersource
+ $STRIP $cwrapper
+ }
+
+ # Now, create the wrapper script for func_source use:
+ func_ltwrapper_scriptname $cwrapper
+ $RM $func_ltwrapper_scriptname_result
+ trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15
+ $opt_dry_run || {
+ # note: this script will not be executed, so do not chmod.
+ if test "x$build" = "x$host"; then
+ $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result
+ else
+ func_emit_wrapper no > $func_ltwrapper_scriptname_result
+ fi
+ }
+ ;;
+ * )
+ $RM $output
+ trap "$RM $output; exit $EXIT_FAILURE" 1 2 15
+
+ func_emit_wrapper no > $output
+ chmod +x $output
+ ;;
+ esac
+ }
+ exit $EXIT_SUCCESS
+ ;;
+ esac
+
+ # See if we need to build an old-fashioned archive.
+ for oldlib in $oldlibs; do
+
+ case $build_libtool_libs in
+ convenience)
+ oldobjs="$libobjs_save $symfileobj"
+ addlibs=$convenience
+ build_libtool_libs=no
+ ;;
+ module)
+ oldobjs=$libobjs_save
+ addlibs=$old_convenience
+ build_libtool_libs=no
+ ;;
+ *)
+ oldobjs="$old_deplibs $non_pic_objects"
+ $preload && test -f "$symfileobj" \
+ && func_append oldobjs " $symfileobj"
+ addlibs=$old_convenience
+ ;;
+ esac
+
+ if test -n "$addlibs"; then
+ gentop=$output_objdir/${outputname}x
+ func_append generated " $gentop"
+
+ func_extract_archives $gentop $addlibs
+ func_append oldobjs " $func_extract_archives_result"
+ fi
+
+ # Do each command in the archive commands.
+ if test -n "$old_archive_from_new_cmds" && test yes = "$build_libtool_libs"; then
+ cmds=$old_archive_from_new_cmds
+ else
+
+ # Add any objects from preloaded convenience libraries
+ if test -n "$dlprefiles"; then
+ gentop=$output_objdir/${outputname}x
+ func_append generated " $gentop"
+
+ func_extract_archives $gentop $dlprefiles
+ func_append oldobjs " $func_extract_archives_result"
+ fi
+
+ # POSIX demands no paths to be encoded in archives. We have
+ # to avoid creating archives with duplicate basenames if we
+ # might have to extract them afterwards, e.g., when creating a
+ # static archive out of a convenience library, or when linking
+ # the entirety of a libtool archive into another (currently
+ # not supported by libtool).
+ if (for obj in $oldobjs
+ do
+ func_basename "$obj"
+ $ECHO "$func_basename_result"
+ done | sort | sort -uc >/dev/null 2>&1); then
+ :
+ else
+ echo "copying selected object files to avoid basename conflicts..."
+ gentop=$output_objdir/${outputname}x
+ func_append generated " $gentop"
+ func_mkdir_p "$gentop"
+ save_oldobjs=$oldobjs
+ oldobjs=
+ counter=1
+ for obj in $save_oldobjs
+ do
+ func_basename "$obj"
+ objbase=$func_basename_result
+ case " $oldobjs " in
+ " ") oldobjs=$obj ;;
+ *[\ /]"$objbase "*)
+ while :; do
+ # Make sure we don't pick an alternate name that also
+ # overlaps.
+ newobj=lt$counter-$objbase
+ func_arith $counter + 1
+ counter=$func_arith_result
+ case " $oldobjs " in
+ *[\ /]"$newobj "*) ;;
+ *) if test ! -f "$gentop/$newobj"; then break; fi ;;
+ esac
+ done
+ func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj"
+ func_append oldobjs " $gentop/$newobj"
+ ;;
+ *) func_append oldobjs " $obj" ;;
+ esac
+ done
+ fi
+ func_to_tool_file "$oldlib" func_convert_file_msys_to_w32
+ tool_oldlib=$func_to_tool_file_result
+ eval cmds=\"$old_archive_cmds\"
+
+ func_len " $cmds"
+ len=$func_len_result
+ if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then
+ cmds=$old_archive_cmds
+ elif test -n "$archiver_list_spec"; then
+ func_verbose "using command file archive linking..."
+ for obj in $oldobjs
+ do
+ func_to_tool_file "$obj"
+ $ECHO "$func_to_tool_file_result"
+ done > $output_objdir/$libname.libcmd
+ func_to_tool_file "$output_objdir/$libname.libcmd"
+ oldobjs=" $archiver_list_spec$func_to_tool_file_result"
+ cmds=$old_archive_cmds
+ else
+ # the command line is too long to link in one step, link in parts
+ func_verbose "using piecewise archive linking..."
+ save_RANLIB=$RANLIB
+ RANLIB=:
+ objlist=
+ concat_cmds=
+ save_oldobjs=$oldobjs
+ oldobjs=
+ # Is there a better way of finding the last object in the list?
+ for obj in $save_oldobjs
+ do
+ last_oldobj=$obj
+ done
+ eval test_cmds=\"$old_archive_cmds\"
+ func_len " $test_cmds"
+ len0=$func_len_result
+ len=$len0
+ for obj in $save_oldobjs
+ do
+ func_len " $obj"
+ func_arith $len + $func_len_result
+ len=$func_arith_result
+ func_append objlist " $obj"
+ if test "$len" -lt "$max_cmd_len"; then
+ :
+ else
+ # the above command should be used before it gets too long
+ oldobjs=$objlist
+ if test "$obj" = "$last_oldobj"; then
+ RANLIB=$save_RANLIB
+ fi
+ test -z "$concat_cmds" || concat_cmds=$concat_cmds~
+ eval concat_cmds=\"\$concat_cmds$old_archive_cmds\"
+ objlist=
+ len=$len0
+ fi
+ done
+ RANLIB=$save_RANLIB
+ oldobjs=$objlist
+ if test -z "$oldobjs"; then
+ eval cmds=\"\$concat_cmds\"
+ else
+ eval cmds=\"\$concat_cmds~\$old_archive_cmds\"
+ fi
+ fi
+ fi
+ func_execute_cmds "$cmds" 'exit $?'
+ done
+
+ test -n "$generated" && \
+ func_show_eval "${RM}r$generated"
+
+ # Now create the libtool archive.
+ case $output in
+ *.la)
+ old_library=
+ test yes = "$build_old_libs" && old_library=$libname.$libext
+ func_verbose "creating $output"
+
+ # Preserve any variables that may affect compiler behavior
+ for var in $variables_saved_for_relink; do
+ if eval test -z \"\${$var+set}\"; then
+ relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command"
+ elif eval var_value=\$$var; test -z "$var_value"; then
+ relink_command="$var=; export $var; $relink_command"
+ else
+ func_quote_for_eval "$var_value"
+ relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command"
+ fi
+ done
+ # Quote the link command for shipping.
+ relink_command="(cd `pwd`; $SHELL \"$progpath\" $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
+ relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"`
+ if test yes = "$hardcode_automatic"; then
+ relink_command=
+ fi
+
+ # Only create the output if not a dry run.
+ $opt_dry_run || {
+ for installed in no yes; do
+ if test yes = "$installed"; then
+ if test -z "$install_libdir"; then
+ break
+ fi
+ output=$output_objdir/${outputname}i
+ # Replace all uninstalled libtool libraries with the installed ones
+ newdependency_libs=
+ for deplib in $dependency_libs; do
+ case $deplib in
+ *.la)
+ func_basename "$deplib"
+ name=$func_basename_result
+ func_resolve_sysroot "$deplib"
+ eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result`
+ test -z "$libdir" && \
+ func_fatal_error "'$deplib' is not a valid libtool archive"
+ func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name"
+ ;;
+ -L*)
+ func_stripname -L '' "$deplib"
+ func_replace_sysroot "$func_stripname_result"
+ func_append newdependency_libs " -L$func_replace_sysroot_result"
+ ;;
+ -R*)
+ func_stripname -R '' "$deplib"
+ func_replace_sysroot "$func_stripname_result"
+ func_append newdependency_libs " -R$func_replace_sysroot_result"
+ ;;
+ *) func_append newdependency_libs " $deplib" ;;
+ esac
+ done
+ dependency_libs=$newdependency_libs
+ newdlfiles=
+
+ for lib in $dlfiles; do
+ case $lib in
+ *.la)
+ func_basename "$lib"
+ name=$func_basename_result
+ eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
+ test -z "$libdir" && \
+ func_fatal_error "'$lib' is not a valid libtool archive"
+ func_append newdlfiles " ${lt_sysroot:+=}$libdir/$name"
+ ;;
+ *) func_append newdlfiles " $lib" ;;
+ esac
+ done
+ dlfiles=$newdlfiles
+ newdlprefiles=
+ for lib in $dlprefiles; do
+ case $lib in
+ *.la)
+ # Only pass preopened files to the pseudo-archive (for
+ # eventual linking with the app. that links it) if we
+ # didn't already link the preopened objects directly into
+ # the library:
+ func_basename "$lib"
+ name=$func_basename_result
+ eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
+ test -z "$libdir" && \
+ func_fatal_error "'$lib' is not a valid libtool archive"
+ func_append newdlprefiles " ${lt_sysroot:+=}$libdir/$name"
+ ;;
+ esac
+ done
+ dlprefiles=$newdlprefiles
+ else
+ newdlfiles=
+ for lib in $dlfiles; do
+ case $lib in
+ [\\/]* | [A-Za-z]:[\\/]*) abs=$lib ;;
+ *) abs=`pwd`"/$lib" ;;
+ esac
+ func_append newdlfiles " $abs"
+ done
+ dlfiles=$newdlfiles
+ newdlprefiles=
+ for lib in $dlprefiles; do
+ case $lib in
+ [\\/]* | [A-Za-z]:[\\/]*) abs=$lib ;;
+ *) abs=`pwd`"/$lib" ;;
+ esac
+ func_append newdlprefiles " $abs"
+ done
+ dlprefiles=$newdlprefiles
+ fi
+ $RM $output
+ # place dlname in correct position for cygwin
+ # In fact, it would be nice if we could use this code for all target
+ # systems that can't hard-code library paths into their executables
+ # and that have no shared library path variable independent of PATH,
+ # but it turns out we can't easily determine that from inspecting
+ # libtool variables, so we have to hard-code the OSs to which it
+ # applies here; at the moment, that means platforms that use the PE
+ # object format with DLL files. See the long comment at the top of
+ # tests/bindir.at for full details.
+ tdlname=$dlname
+ case $host,$output,$installed,$module,$dlname in
+ *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll)
+ # If a -bindir argument was supplied, place the dll there.
+ if test -n "$bindir"; then
+ func_relative_path "$install_libdir" "$bindir"
+ tdlname=$func_relative_path_result/$dlname
+ else
+ # Otherwise fall back on heuristic.
+ tdlname=../bin/$dlname
+ fi
+ ;;
+ esac
+ $ECHO > $output "\
+# $outputname - a libtool library file
+# Generated by $PROGRAM (GNU $PACKAGE) $VERSION
+#
+# Please DO NOT delete this file!
+# It is necessary for linking the library.
+
+# The name that we can dlopen(3).
+dlname='$tdlname'
+
+# Names of this library.
+library_names='$library_names'
+
+# The name of the static archive.
+old_library='$old_library'
+
+# Linker flags that cannot go in dependency_libs.
+inherited_linker_flags='$new_inherited_linker_flags'
+
+# Libraries that this one depends upon.
+dependency_libs='$dependency_libs'
+
+# Names of additional weak libraries provided by this library
+weak_library_names='$weak_libs'
+
+# Version information for $libname.
+current=$current
+age=$age
+revision=$revision
+
+# Is this an already installed library?
+installed=$installed
+
+# Should we warn about portability when linking against -modules?
+shouldnotlink=$module
+
+# Files to dlopen/dlpreopen
+dlopen='$dlfiles'
+dlpreopen='$dlprefiles'
+
+# Directory that this library needs to be installed in:
+libdir='$install_libdir'"
+ if test no,yes = "$installed,$need_relink"; then
+ $ECHO >> $output "\
+relink_command=\"$relink_command\""
+ fi
+ done
+ }
+
+ # Do a symbolic link so that the libtool archive can be found in
+ # LD_LIBRARY_PATH before the program is installed.
+ func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?'
+ ;;
+ esac
+ exit $EXIT_SUCCESS
+}
+
+if test link = "$opt_mode" || test relink = "$opt_mode"; then
+ func_mode_link ${1+"$@"}
+fi
+
+
+# func_mode_uninstall arg...
+func_mode_uninstall ()
+{
+ $debug_cmd
+
+ RM=$nonopt
+ files=
+ rmforce=false
+ exit_status=0
+
+ # This variable tells wrapper scripts just to set variables rather
+ # than running their programs.
+ libtool_install_magic=$magic
+
+ for arg
+ do
+ case $arg in
+ -f) func_append RM " $arg"; rmforce=: ;;
+ -*) func_append RM " $arg" ;;
+ *) func_append files " $arg" ;;
+ esac
+ done
+
+ test -z "$RM" && \
+ func_fatal_help "you must specify an RM program"
+
+ rmdirs=
+
+ for file in $files; do
+ func_dirname "$file" "" "."
+ dir=$func_dirname_result
+ if test . = "$dir"; then
+ odir=$objdir
+ else
+ odir=$dir/$objdir
+ fi
+ func_basename "$file"
+ name=$func_basename_result
+ test uninstall = "$opt_mode" && odir=$dir
+
+ # Remember odir for removal later, being careful to avoid duplicates
+ if test clean = "$opt_mode"; then
+ case " $rmdirs " in
+ *" $odir "*) ;;
+ *) func_append rmdirs " $odir" ;;
+ esac
+ fi
+
+ # Don't error if the file doesn't exist and rm -f was used.
+ if { test -L "$file"; } >/dev/null 2>&1 ||
+ { test -h "$file"; } >/dev/null 2>&1 ||
+ test -f "$file"; then
+ :
+ elif test -d "$file"; then
+ exit_status=1
+ continue
+ elif $rmforce; then
+ continue
+ fi
+
+ rmfiles=$file
+
+ case $name in
+ *.la)
+ # Possibly a libtool archive, so verify it.
+ if func_lalib_p "$file"; then
+ func_source $dir/$name
+
+ # Delete the libtool libraries and symlinks.
+ for n in $library_names; do
+ func_append rmfiles " $odir/$n"
+ done
+ test -n "$old_library" && func_append rmfiles " $odir/$old_library"
+
+ case $opt_mode in
+ clean)
+ case " $library_names " in
+ *" $dlname "*) ;;
+ *) test -n "$dlname" && func_append rmfiles " $odir/$dlname" ;;
+ esac
+ test -n "$libdir" && func_append rmfiles " $odir/$name $odir/${name}i"
+ ;;
+ uninstall)
+ if test -n "$library_names"; then
+ # Do each command in the postuninstall commands.
+ func_execute_cmds "$postuninstall_cmds" '$rmforce || exit_status=1'
+ fi
+
+ if test -n "$old_library"; then
+ # Do each command in the old_postuninstall commands.
+ func_execute_cmds "$old_postuninstall_cmds" '$rmforce || exit_status=1'
+ fi
+ # FIXME: should reinstall the best remaining shared library.
+ ;;
+ esac
+ fi
+ ;;
+
+ *.lo)
+ # Possibly a libtool object, so verify it.
+ if func_lalib_p "$file"; then
+
+ # Read the .lo file
+ func_source $dir/$name
+
+ # Add PIC object to the list of files to remove.
+ if test -n "$pic_object" && test none != "$pic_object"; then
+ func_append rmfiles " $dir/$pic_object"
+ fi
+
+ # Add non-PIC object to the list of files to remove.
+ if test -n "$non_pic_object" && test none != "$non_pic_object"; then
+ func_append rmfiles " $dir/$non_pic_object"
+ fi
+ fi
+ ;;
+
+ *)
+ if test clean = "$opt_mode"; then
+ noexename=$name
+ case $file in
+ *.exe)
+ func_stripname '' '.exe' "$file"
+ file=$func_stripname_result
+ func_stripname '' '.exe' "$name"
+ noexename=$func_stripname_result
+ # $file with .exe has already been added to rmfiles,
+ # add $file without .exe
+ func_append rmfiles " $file"
+ ;;
+ esac
+ # Do a test to see if this is a libtool program.
+ if func_ltwrapper_p "$file"; then
+ if func_ltwrapper_executable_p "$file"; then
+ func_ltwrapper_scriptname "$file"
+ relink_command=
+ func_source $func_ltwrapper_scriptname_result
+ func_append rmfiles " $func_ltwrapper_scriptname_result"
+ else
+ relink_command=
+ func_source $dir/$noexename
+ fi
+
+ # note $name still contains .exe if it was in $file originally
+ # as does the version of $file that was added into $rmfiles
+ func_append rmfiles " $odir/$name $odir/${name}S.$objext"
+ if test yes = "$fast_install" && test -n "$relink_command"; then
+ func_append rmfiles " $odir/lt-$name"
+ fi
+ if test "X$noexename" != "X$name"; then
+ func_append rmfiles " $odir/lt-$noexename.c"
+ fi
+ fi
+ fi
+ ;;
+ esac
+ func_show_eval "$RM $rmfiles" 'exit_status=1'
+ done
+
+ # Try to remove the $objdir's in the directories where we deleted files
+ for dir in $rmdirs; do
+ if test -d "$dir"; then
+ func_show_eval "rmdir $dir >/dev/null 2>&1"
+ fi
+ done
+
+ exit $exit_status
+}
+
+if test uninstall = "$opt_mode" || test clean = "$opt_mode"; then
+ func_mode_uninstall ${1+"$@"}
+fi
+
+test -z "$opt_mode" && {
+ help=$generic_help
+ func_fatal_help "you must specify a MODE"
+}
+
+test -z "$exec_cmd" && \
+ func_fatal_help "invalid operation mode '$opt_mode'"
+
+if test -n "$exec_cmd"; then
+ eval exec "$exec_cmd"
+ exit $EXIT_FAILURE
+fi
+
+exit $exit_status
+
+
+# The TAGs below are defined such that we never get into a situation
+# where we disable both kinds of libraries. Given conflicting
+# choices, we go for a static library, that is the most portable,
+# since we can't tell whether shared libraries were disabled because
+# the user asked for that or because the platform doesn't support
+# them. This is particularly important on AIX, because we don't
+# support having both static and shared libraries enabled at the same
+# time on that platform, so we default to a shared-only configuration.
+# If a disable-shared tag is given, we'll fallback to a static-only
+# configuration. But we'll never go from static-only to shared-only.
+
+# ### BEGIN LIBTOOL TAG CONFIG: disable-shared
+build_libtool_libs=no
+build_old_libs=yes
+# ### END LIBTOOL TAG CONFIG: disable-shared
+
+# ### BEGIN LIBTOOL TAG CONFIG: disable-static
+build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac`
+# ### END LIBTOOL TAG CONFIG: disable-static
+
+# Local Variables:
+# mode:shell-script
+# sh-indentation:2
+# End:
diff --git a/m4/ax_cxx_compile_stdcxx.m4 b/m4/ax_cxx_compile_stdcxx.m4
new file mode 100644
index 0000000..43087b2
--- /dev/null
+++ b/m4/ax_cxx_compile_stdcxx.m4
@@ -0,0 +1,951 @@
+# ===========================================================================
+# https://www.gnu.org/software/autoconf-archive/ax_cxx_compile_stdcxx.html
+# ===========================================================================
+#
+# SYNOPSIS
+#
+# AX_CXX_COMPILE_STDCXX(VERSION, [ext|noext], [mandatory|optional])
+#
+# DESCRIPTION
+#
+# Check for baseline language coverage in the compiler for the specified
+# version of the C++ standard. If necessary, add switches to CXX and
+# CXXCPP to enable support. VERSION may be '11' (for the C++11 standard)
+# or '14' (for the C++14 standard).
+#
+# The second argument, if specified, indicates whether you insist on an
+# extended mode (e.g. -std=gnu++11) or a strict conformance mode (e.g.
+# -std=c++11). If neither is specified, you get whatever works, with
+# preference for an extended mode.
+#
+# The third argument, if specified 'mandatory' or if left unspecified,
+# indicates that baseline support for the specified C++ standard is
+# required and that the macro should error out if no mode with that
+# support is found. If specified 'optional', then configuration proceeds
+# regardless, after defining HAVE_CXX${VERSION} if and only if a
+# supporting mode is found.
+#
+# LICENSE
+#
+# Copyright (c) 2008 Benjamin Kosnik <bkoz@redhat.com>
+# Copyright (c) 2012 Zack Weinberg <zackw@panix.com>
+# Copyright (c) 2013 Roy Stogner <roystgnr@ices.utexas.edu>
+# Copyright (c) 2014, 2015 Google Inc.; contributed by Alexey Sokolov <sokolov@google.com>
+# Copyright (c) 2015 Paul Norman <penorman@mac.com>
+# Copyright (c) 2015 Moritz Klammler <moritz@klammler.eu>
+# Copyright (c) 2016, 2018 Krzesimir Nowak <qdlacz@gmail.com>
+# Copyright (c) 2019 Enji Cooper <yaneurabeya@gmail.com>
+#
+# Copying and distribution of this file, with or without modification, are
+# permitted in any medium without royalty provided the copyright notice
+# and this notice are preserved. This file is offered as-is, without any
+# warranty.
+
+#serial 11
+
+dnl This macro is based on the code from the AX_CXX_COMPILE_STDCXX_11 macro
+dnl (serial version number 13).
+
+AC_DEFUN([AX_CXX_COMPILE_STDCXX], [dnl
+ m4_if([$1], [11], [ax_cxx_compile_alternatives="11 0x"],
+ [$1], [14], [ax_cxx_compile_alternatives="14 1y"],
+ [$1], [17], [ax_cxx_compile_alternatives="17 1z"],
+ [m4_fatal([invalid first argument `$1' to AX_CXX_COMPILE_STDCXX])])dnl
+ m4_if([$2], [], [],
+ [$2], [ext], [],
+ [$2], [noext], [],
+ [m4_fatal([invalid second argument `$2' to AX_CXX_COMPILE_STDCXX])])dnl
+ m4_if([$3], [], [ax_cxx_compile_cxx$1_required=true],
+ [$3], [mandatory], [ax_cxx_compile_cxx$1_required=true],
+ [$3], [optional], [ax_cxx_compile_cxx$1_required=false],
+ [m4_fatal([invalid third argument `$3' to AX_CXX_COMPILE_STDCXX])])
+ AC_LANG_PUSH([C++])dnl
+ ac_success=no
+
+ m4_if([$2], [noext], [], [dnl
+ if test x$ac_success = xno; then
+ for alternative in ${ax_cxx_compile_alternatives}; do
+ switch="-std=gnu++${alternative}"
+ cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx$1_$switch])
+ AC_CACHE_CHECK(whether $CXX supports C++$1 features with $switch,
+ $cachevar,
+ [ac_save_CXX="$CXX"
+ CXX="$CXX $switch"
+ AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_testbody_$1])],
+ [eval $cachevar=yes],
+ [eval $cachevar=no])
+ CXX="$ac_save_CXX"])
+ if eval test x\$$cachevar = xyes; then
+ CXX="$CXX $switch"
+ if test -n "$CXXCPP" ; then
+ CXXCPP="$CXXCPP $switch"
+ fi
+ ac_success=yes
+ break
+ fi
+ done
+ fi])
+
+ m4_if([$2], [ext], [], [dnl
+ if test x$ac_success = xno; then
+ dnl HP's aCC needs +std=c++11 according to:
+ dnl http://h21007.www2.hp.com/portal/download/files/unprot/aCxx/PDF_Release_Notes/769149-001.pdf
+ dnl Cray's crayCC needs "-h std=c++11"
+ for alternative in ${ax_cxx_compile_alternatives}; do
+ for switch in -std=c++${alternative} +std=c++${alternative} "-h std=c++${alternative}"; do
+ cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx$1_$switch])
+ AC_CACHE_CHECK(whether $CXX supports C++$1 features with $switch,
+ $cachevar,
+ [ac_save_CXX="$CXX"
+ CXX="$CXX $switch"
+ AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_testbody_$1])],
+ [eval $cachevar=yes],
+ [eval $cachevar=no])
+ CXX="$ac_save_CXX"])
+ if eval test x\$$cachevar = xyes; then
+ CXX="$CXX $switch"
+ if test -n "$CXXCPP" ; then
+ CXXCPP="$CXXCPP $switch"
+ fi
+ ac_success=yes
+ break
+ fi
+ done
+ if test x$ac_success = xyes; then
+ break
+ fi
+ done
+ fi])
+ AC_LANG_POP([C++])
+ if test x$ax_cxx_compile_cxx$1_required = xtrue; then
+ if test x$ac_success = xno; then
+ AC_MSG_ERROR([*** A compiler with support for C++$1 language features is required.])
+ fi
+ fi
+ if test x$ac_success = xno; then
+ HAVE_CXX$1=0
+ AC_MSG_NOTICE([No compiler with C++$1 support was found])
+ else
+ HAVE_CXX$1=1
+ AC_DEFINE(HAVE_CXX$1,1,
+ [define if the compiler supports basic C++$1 syntax])
+ fi
+ AC_SUBST(HAVE_CXX$1)
+])
+
+
+dnl Test body for checking C++11 support
+
+m4_define([_AX_CXX_COMPILE_STDCXX_testbody_11],
+ _AX_CXX_COMPILE_STDCXX_testbody_new_in_11
+)
+
+
+dnl Test body for checking C++14 support
+
+m4_define([_AX_CXX_COMPILE_STDCXX_testbody_14],
+ _AX_CXX_COMPILE_STDCXX_testbody_new_in_11
+ _AX_CXX_COMPILE_STDCXX_testbody_new_in_14
+)
+
+m4_define([_AX_CXX_COMPILE_STDCXX_testbody_17],
+ _AX_CXX_COMPILE_STDCXX_testbody_new_in_11
+ _AX_CXX_COMPILE_STDCXX_testbody_new_in_14
+ _AX_CXX_COMPILE_STDCXX_testbody_new_in_17
+)
+
+dnl Tests for new features in C++11
+
+m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_11], [[
+
+// If the compiler admits that it is not ready for C++11, why torture it?
+// Hopefully, this will speed up the test.
+
+#ifndef __cplusplus
+
+#error "This is not a C++ compiler"
+
+#elif __cplusplus < 201103L
+
+#error "This is not a C++11 compiler"
+
+#else
+
+namespace cxx11
+{
+
+ namespace test_static_assert
+ {
+
+ template <typename T>
+ struct check
+ {
+ static_assert(sizeof(int) <= sizeof(T), "not big enough");
+ };
+
+ }
+
+ namespace test_final_override
+ {
+
+ struct Base
+ {
+ virtual ~Base() {}
+ virtual void f() {}
+ };
+
+ struct Derived : public Base
+ {
+ virtual ~Derived() override {}
+ virtual void f() override {}
+ };
+
+ }
+
+ namespace test_double_right_angle_brackets
+ {
+
+ template < typename T >
+ struct check {};
+
+ typedef check<void> single_type;
+ typedef check<check<void>> double_type;
+ typedef check<check<check<void>>> triple_type;
+ typedef check<check<check<check<void>>>> quadruple_type;
+
+ }
+
+ namespace test_decltype
+ {
+
+ int
+ f()
+ {
+ int a = 1;
+ decltype(a) b = 2;
+ return a + b;
+ }
+
+ }
+
+ namespace test_type_deduction
+ {
+
+ template < typename T1, typename T2 >
+ struct is_same
+ {
+ static const bool value = false;
+ };
+
+ template < typename T >
+ struct is_same<T, T>
+ {
+ static const bool value = true;
+ };
+
+ template < typename T1, typename T2 >
+ auto
+ add(T1 a1, T2 a2) -> decltype(a1 + a2)
+ {
+ return a1 + a2;
+ }
+
+ int
+ test(const int c, volatile int v)
+ {
+ static_assert(is_same<int, decltype(0)>::value == true, "");
+ static_assert(is_same<int, decltype(c)>::value == false, "");
+ static_assert(is_same<int, decltype(v)>::value == false, "");
+ auto ac = c;
+ auto av = v;
+ auto sumi = ac + av + 'x';
+ auto sumf = ac + av + 1.0;
+ static_assert(is_same<int, decltype(ac)>::value == true, "");
+ static_assert(is_same<int, decltype(av)>::value == true, "");
+ static_assert(is_same<int, decltype(sumi)>::value == true, "");
+ static_assert(is_same<int, decltype(sumf)>::value == false, "");
+ static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
+ return (sumf > 0.0) ? sumi : add(c, v);
+ }
+
+ }
+
+ namespace test_noexcept
+ {
+
+ int f() { return 0; }
+ int g() noexcept { return 0; }
+
+ static_assert(noexcept(f()) == false, "");
+ static_assert(noexcept(g()) == true, "");
+
+ }
+
+ namespace test_constexpr
+ {
+
+ template < typename CharT >
+ unsigned long constexpr
+ strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
+ {
+ return *s ? strlen_c_r(s + 1, acc + 1) : acc;
+ }
+
+ template < typename CharT >
+ unsigned long constexpr
+ strlen_c(const CharT *const s) noexcept
+ {
+ return strlen_c_r(s, 0UL);
+ }
+
+ static_assert(strlen_c("") == 0UL, "");
+ static_assert(strlen_c("1") == 1UL, "");
+ static_assert(strlen_c("example") == 7UL, "");
+ static_assert(strlen_c("another\0example") == 7UL, "");
+
+ }
+
+ namespace test_rvalue_references
+ {
+
+ template < int N >
+ struct answer
+ {
+ static constexpr int value = N;
+ };
+
+ answer<1> f(int&) { return answer<1>(); }
+ answer<2> f(const int&) { return answer<2>(); }
+ answer<3> f(int&&) { return answer<3>(); }
+
+ void
+ test()
+ {
+ int i = 0;
+ const int c = 0;
+ static_assert(decltype(f(i))::value == 1, "");
+ static_assert(decltype(f(c))::value == 2, "");
+ static_assert(decltype(f(0))::value == 3, "");
+ }
+
+ }
+
+ namespace test_uniform_initialization
+ {
+
+ struct test
+ {
+ static const int zero {};
+ static const int one {1};
+ };
+
+ static_assert(test::zero == 0, "");
+ static_assert(test::one == 1, "");
+
+ }
+
+ namespace test_lambdas
+ {
+
+ void
+ test1()
+ {
+ auto lambda1 = [](){};
+ auto lambda2 = lambda1;
+ lambda1();
+ lambda2();
+ }
+
+ int
+ test2()
+ {
+ auto a = [](int i, int j){ return i + j; }(1, 2);
+ auto b = []() -> int { return '0'; }();
+ auto c = [=](){ return a + b; }();
+ auto d = [&](){ return c; }();
+ auto e = [a, &b](int x) mutable {
+ const auto identity = [](int y){ return y; };
+ for (auto i = 0; i < a; ++i)
+ a += b--;
+ return x + identity(a + b);
+ }(0);
+ return a + b + c + d + e;
+ }
+
+ int
+ test3()
+ {
+ const auto nullary = [](){ return 0; };
+ const auto unary = [](int x){ return x; };
+ using nullary_t = decltype(nullary);
+ using unary_t = decltype(unary);
+ const auto higher1st = [](nullary_t f){ return f(); };
+ const auto higher2nd = [unary](nullary_t f1){
+ return [unary, f1](unary_t f2){ return f2(unary(f1())); };
+ };
+ return higher1st(nullary) + higher2nd(nullary)(unary);
+ }
+
+ }
+
+ namespace test_variadic_templates
+ {
+
+ template <int...>
+ struct sum;
+
+ template <int N0, int... N1toN>
+ struct sum<N0, N1toN...>
+ {
+ static constexpr auto value = N0 + sum<N1toN...>::value;
+ };
+
+ template <>
+ struct sum<>
+ {
+ static constexpr auto value = 0;
+ };
+
+ static_assert(sum<>::value == 0, "");
+ static_assert(sum<1>::value == 1, "");
+ static_assert(sum<23>::value == 23, "");
+ static_assert(sum<1, 2>::value == 3, "");
+ static_assert(sum<5, 5, 11>::value == 21, "");
+ static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
+
+ }
+
+ // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
+ // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
+ // because of this.
+ namespace test_template_alias_sfinae
+ {
+
+ struct foo {};
+
+ template<typename T>
+ using member = typename T::member_type;
+
+ template<typename T>
+ void func(...) {}
+
+ template<typename T>
+ void func(member<T>*) {}
+
+ void test();
+
+ void test() { func<foo>(0); }
+
+ }
+
+} // namespace cxx11
+
+#endif // __cplusplus >= 201103L
+
+]])
+
+
+dnl Tests for new features in C++14
+
+m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_14], [[
+
+// If the compiler admits that it is not ready for C++14, why torture it?
+// Hopefully, this will speed up the test.
+
+#ifndef __cplusplus
+
+#error "This is not a C++ compiler"
+
+#elif __cplusplus < 201402L
+
+#error "This is not a C++14 compiler"
+
+#else
+
+namespace cxx14
+{
+
+ namespace test_polymorphic_lambdas
+ {
+
+ int
+ test()
+ {
+ const auto lambda = [](auto&&... args){
+ const auto istiny = [](auto x){
+ return (sizeof(x) == 1UL) ? 1 : 0;
+ };
+ const int aretiny[] = { istiny(args)... };
+ return aretiny[0];
+ };
+ return lambda(1, 1L, 1.0f, '1');
+ }
+
+ }
+
+ namespace test_binary_literals
+ {
+
+ constexpr auto ivii = 0b0000000000101010;
+ static_assert(ivii == 42, "wrong value");
+
+ }
+
+ namespace test_generalized_constexpr
+ {
+
+ template < typename CharT >
+ constexpr unsigned long
+ strlen_c(const CharT *const s) noexcept
+ {
+ auto length = 0UL;
+ for (auto p = s; *p; ++p)
+ ++length;
+ return length;
+ }
+
+ static_assert(strlen_c("") == 0UL, "");
+ static_assert(strlen_c("x") == 1UL, "");
+ static_assert(strlen_c("test") == 4UL, "");
+ static_assert(strlen_c("another\0test") == 7UL, "");
+
+ }
+
+ namespace test_lambda_init_capture
+ {
+
+ int
+ test()
+ {
+ auto x = 0;
+ const auto lambda1 = [a = x](int b){ return a + b; };
+ const auto lambda2 = [a = lambda1(x)](){ return a; };
+ return lambda2();
+ }
+
+ }
+
+ namespace test_digit_separators
+ {
+
+ constexpr auto ten_million = 100'000'000;
+ static_assert(ten_million == 100000000, "");
+
+ }
+
+ namespace test_return_type_deduction
+ {
+
+ auto f(int& x) { return x; }
+ decltype(auto) g(int& x) { return x; }
+
+ template < typename T1, typename T2 >
+ struct is_same
+ {
+ static constexpr auto value = false;
+ };
+
+ template < typename T >
+ struct is_same<T, T>
+ {
+ static constexpr auto value = true;
+ };
+
+ int
+ test()
+ {
+ auto x = 0;
+ static_assert(is_same<int, decltype(f(x))>::value, "");
+ static_assert(is_same<int&, decltype(g(x))>::value, "");
+ return x;
+ }
+
+ }
+
+} // namespace cxx14
+
+#endif // __cplusplus >= 201402L
+
+]])
+
+
+dnl Tests for new features in C++17
+
+m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_17], [[
+
+// If the compiler admits that it is not ready for C++17, why torture it?
+// Hopefully, this will speed up the test.
+
+#ifndef __cplusplus
+
+#error "This is not a C++ compiler"
+
+#elif __cplusplus < 201703L
+
+#error "This is not a C++17 compiler"
+
+#else
+
+#include <initializer_list>
+#include <utility>
+#include <type_traits>
+
+namespace cxx17
+{
+
+ namespace test_constexpr_lambdas
+ {
+
+ constexpr int foo = [](){return 42;}();
+
+ }
+
+ namespace test::nested_namespace::definitions
+ {
+
+ }
+
+ namespace test_fold_expression
+ {
+
+ template<typename... Args>
+ int multiply(Args... args)
+ {
+ return (args * ... * 1);
+ }
+
+ template<typename... Args>
+ bool all(Args... args)
+ {
+ return (args && ...);
+ }
+
+ }
+
+ namespace test_extended_static_assert
+ {
+
+ static_assert (true);
+
+ }
+
+ namespace test_auto_brace_init_list
+ {
+
+ auto foo = {5};
+ auto bar {5};
+
+ static_assert(std::is_same<std::initializer_list<int>, decltype(foo)>::value);
+ static_assert(std::is_same<int, decltype(bar)>::value);
+ }
+
+ namespace test_typename_in_template_template_parameter
+ {
+
+ template<template<typename> typename X> struct D;
+
+ }
+
+ namespace test_fallthrough_nodiscard_maybe_unused_attributes
+ {
+
+ int f1()
+ {
+ return 42;
+ }
+
+ [[nodiscard]] int f2()
+ {
+ [[maybe_unused]] auto unused = f1();
+
+ switch (f1())
+ {
+ case 17:
+ f1();
+ [[fallthrough]];
+ case 42:
+ f1();
+ }
+ return f1();
+ }
+
+ }
+
+ namespace test_extended_aggregate_initialization
+ {
+
+ struct base1
+ {
+ int b1, b2 = 42;
+ };
+
+ struct base2
+ {
+ base2() {
+ b3 = 42;
+ }
+ int b3;
+ };
+
+ struct derived : base1, base2
+ {
+ int d;
+ };
+
+ derived d1 {{1, 2}, {}, 4}; // full initialization
+ derived d2 {{}, {}, 4}; // value-initialized bases
+
+ }
+
+ namespace test_general_range_based_for_loop
+ {
+
+ struct iter
+ {
+ int i;
+
+ int& operator* ()
+ {
+ return i;
+ }
+
+ const int& operator* () const
+ {
+ return i;
+ }
+
+ iter& operator++()
+ {
+ ++i;
+ return *this;
+ }
+ };
+
+ struct sentinel
+ {
+ int i;
+ };
+
+ bool operator== (const iter& i, const sentinel& s)
+ {
+ return i.i == s.i;
+ }
+
+ bool operator!= (const iter& i, const sentinel& s)
+ {
+ return !(i == s);
+ }
+
+ struct range
+ {
+ iter begin() const
+ {
+ return {0};
+ }
+
+ sentinel end() const
+ {
+ return {5};
+ }
+ };
+
+ void f()
+ {
+ range r {};
+
+ for (auto i : r)
+ {
+ [[maybe_unused]] auto v = i;
+ }
+ }
+
+ }
+
+ namespace test_lambda_capture_asterisk_this_by_value
+ {
+
+ struct t
+ {
+ int i;
+ int foo()
+ {
+ return [*this]()
+ {
+ return i;
+ }();
+ }
+ };
+
+ }
+
+ namespace test_enum_class_construction
+ {
+
+ enum class byte : unsigned char
+ {};
+
+ byte foo {42};
+
+ }
+
+ namespace test_constexpr_if
+ {
+
+ template <bool cond>
+ int f ()
+ {
+ if constexpr(cond)
+ {
+ return 13;
+ }
+ else
+ {
+ return 42;
+ }
+ }
+
+ }
+
+ namespace test_selection_statement_with_initializer
+ {
+
+ int f()
+ {
+ return 13;
+ }
+
+ int f2()
+ {
+ if (auto i = f(); i > 0)
+ {
+ return 3;
+ }
+
+ switch (auto i = f(); i + 4)
+ {
+ case 17:
+ return 2;
+
+ default:
+ return 1;
+ }
+ }
+
+ }
+
+ namespace test_template_argument_deduction_for_class_templates
+ {
+
+ template <typename T1, typename T2>
+ struct pair
+ {
+ pair (T1 p1, T2 p2)
+ : m1 {p1},
+ m2 {p2}
+ {}
+
+ T1 m1;
+ T2 m2;
+ };
+
+ void f()
+ {
+ [[maybe_unused]] auto p = pair{13, 42u};
+ }
+
+ }
+
+ namespace test_non_type_auto_template_parameters
+ {
+
+ template <auto n>
+ struct B
+ {};
+
+ B<5> b1;
+ B<'a'> b2;
+
+ }
+
+ namespace test_structured_bindings
+ {
+
+ int arr[2] = { 1, 2 };
+ std::pair<int, int> pr = { 1, 2 };
+
+ auto f1() -> int(&)[2]
+ {
+ return arr;
+ }
+
+ auto f2() -> std::pair<int, int>&
+ {
+ return pr;
+ }
+
+ struct S
+ {
+ int x1 : 2;
+ volatile double y1;
+ };
+
+ S f3()
+ {
+ return {};
+ }
+
+ auto [ x1, y1 ] = f1();
+ auto& [ xr1, yr1 ] = f1();
+ auto [ x2, y2 ] = f2();
+ auto& [ xr2, yr2 ] = f2();
+ const auto [ x3, y3 ] = f3();
+
+ }
+
+ namespace test_exception_spec_type_system
+ {
+
+ struct Good {};
+ struct Bad {};
+
+ void g1() noexcept;
+ void g2();
+
+ template<typename T>
+ Bad
+ f(T*, T*);
+
+ template<typename T1, typename T2>
+ Good
+ f(T1*, T2*);
+
+ static_assert (std::is_same_v<Good, decltype(f(g1, g2))>);
+
+ }
+
+ namespace test_inline_variables
+ {
+
+ template<class T> void f(T)
+ {}
+
+ template<class T> inline T g(T)
+ {
+ return T{};
+ }
+
+ template<> inline void f<>(int)
+ {}
+
+ template<> int g<>(int)
+ {
+ return 5;
+ }
+
+ }
+
+} // namespace cxx17
+
+#endif // __cplusplus < 201703L
+
+]])
diff --git a/m4/ax_cxx_compile_stdcxx_17.m4 b/m4/ax_cxx_compile_stdcxx_17.m4
new file mode 100644
index 0000000..a683417
--- /dev/null
+++ b/m4/ax_cxx_compile_stdcxx_17.m4
@@ -0,0 +1,35 @@
+# =============================================================================
+# https://www.gnu.org/software/autoconf-archive/ax_cxx_compile_stdcxx_17.html
+# =============================================================================
+#
+# SYNOPSIS
+#
+# AX_CXX_COMPILE_STDCXX_17([ext|noext], [mandatory|optional])
+#
+# DESCRIPTION
+#
+# Check for baseline language coverage in the compiler for the C++17
+# standard; if necessary, add switches to CXX and CXXCPP to enable
+# support.
+#
+# This macro is a convenience alias for calling the AX_CXX_COMPILE_STDCXX
+# macro with the version set to C++17. The two optional arguments are
+# forwarded literally as the second and third argument respectively.
+# Please see the documentation for the AX_CXX_COMPILE_STDCXX macro for
+# more information. If you want to use this macro, you also need to
+# download the ax_cxx_compile_stdcxx.m4 file.
+#
+# LICENSE
+#
+# Copyright (c) 2015 Moritz Klammler <moritz@klammler.eu>
+# Copyright (c) 2016 Krzesimir Nowak <qdlacz@gmail.com>
+#
+# Copying and distribution of this file, with or without modification, are
+# permitted in any medium without royalty provided the copyright notice
+# and this notice are preserved. This file is offered as-is, without any
+# warranty.
+
+#serial 2
+
+AX_REQUIRE_DEFINED([AX_CXX_COMPILE_STDCXX])
+AC_DEFUN([AX_CXX_COMPILE_STDCXX_17], [AX_CXX_COMPILE_STDCXX([17], [$1], [$2])])
diff --git a/m4/boost.m4 b/m4/boost.m4
new file mode 100644
index 0000000..e01d159
--- /dev/null
+++ b/m4/boost.m4
@@ -0,0 +1,1578 @@
+# boost.m4: Locate Boost headers and libraries for autoconf-based projects.
+# Copyright (C) 2007-2011, 2014 Benoit Sigoure <tsuna@lrde.epita.fr>
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Additional permission under section 7 of the GNU General Public
+# License, version 3 ("GPLv3"):
+#
+# If you convey this file as part of a work that contains a
+# configuration script generated by Autoconf, you may do so under
+# terms of your choice.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+m4_define([_BOOST_SERIAL], [m4_translit([
+# serial 26
+], [#
+], [])])
+
+# Original sources can be found at http://github.com/tsuna/boost.m4
+# You can fetch the latest version of the script by doing:
+# wget http://github.com/tsuna/boost.m4/raw/master/build-aux/boost.m4
+
+# ------ #
+# README #
+# ------ #
+
+# This file provides several macros to use the various Boost libraries.
+# The first macro is BOOST_REQUIRE. It will simply check if it's possible to
+# find the Boost headers of a given (optional) minimum version and it will
+# define BOOST_CPPFLAGS accordingly. It will add an option --with-boost to
+# your configure so that users can specify non standard locations.
+# If the user's environment contains BOOST_ROOT and --with-boost was not
+# specified, --with-boost=$BOOST_ROOT is implicitly used.
+# For more README and documentation, go to http://github.com/tsuna/boost.m4
+# Note: THESE MACROS ASSUME THAT YOU USE LIBTOOL. If you don't, don't worry,
+# simply read the README, it will show you what to do step by step.
+
+m4_pattern_forbid([^_?(BOOST|Boost)_])
+
+
+# _BOOST_SED_CPP(SED-PROGRAM, PROGRAM,
+# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
+# --------------------------------------------------------
+# Same as AC_EGREP_CPP, but leave the result in conftest.i.
+#
+# SED-PROGRAM is *not* overquoted, as in AC_EGREP_CPP. It is expanded
+# in double-quotes, so escape your double quotes.
+#
+# It could be useful to turn this into a macro which extracts the
+# value of any macro.
+m4_define([_BOOST_SED_CPP],
+[AC_LANG_PUSH([C++])dnl
+AC_LANG_PREPROC_REQUIRE()dnl
+AC_REQUIRE([AC_PROG_SED])dnl
+AC_LANG_CONFTEST([AC_LANG_SOURCE([[$2]])])
+AS_IF([dnl eval is necessary to expand ac_cpp.
+dnl Ultrix and Pyramid sh refuse to redirect output of eval, so use subshell.
+dnl Beware of Windows end-of-lines, for instance if we are running
+dnl some Windows programs under Wine. In that case, boost/version.hpp
+dnl is certainly using "\r\n", but the regular Unix shell will only
+dnl strip `\n' with backquotes, not the `\r'. This results in
+dnl boost_cv_lib_version='1_37\r' for instance, which breaks
+dnl everything else.
+dnl Cannot use 'dnl' after [$4] because a trailing dnl may break AC_CACHE_CHECK
+dnl
+dnl Beware that GCC 5, when expanding macros, may embed # line directives
+dnl a within single line:
+dnl
+dnl # 1 "conftest.cc"
+dnl # 1 "<built-in>"
+dnl # 1 "<command-line>"
+dnl # 1 "conftest.cc"
+dnl # 1 "/opt/local/include/boost/version.hpp" 1 3
+dnl # 2 "conftest.cc" 2
+dnl boost-lib-version =
+dnl # 2 "conftest.cc" 3
+dnl "1_56"
+dnl
+dnl So get rid of the # and empty lines, and glue the remaining ones together.
+(eval "$ac_cpp conftest.$ac_ext") 2>&AS_MESSAGE_LOG_FD |
+ grep -v '#' |
+ grep -v '^[[[:space:]]]*$' |
+ tr -d '\r' |
+ tr -s '\n' ' ' |
+ $SED -n -e "$1" >conftest.i 2>&1],
+ [$3],
+ [$4])
+rm -rf conftest*
+AC_LANG_POP([C++])dnl
+])# _BOOST_SED_CPP
+
+
+
+# BOOST_REQUIRE([VERSION], [ACTION-IF-NOT-FOUND])
+# -----------------------------------------------
+# Look for Boost. If version is given, it must either be a literal of the form
+# "X.Y.Z" where X, Y and Z are integers (the ".Z" part being optional) or a
+# variable "$var".
+# Defines the value BOOST_CPPFLAGS. This macro only checks for headers with
+# the required version, it does not check for any of the Boost libraries.
+# On # success, defines HAVE_BOOST. On failure, calls the optional
+# ACTION-IF-NOT-FOUND action if one was supplied.
+# Otherwise aborts with an error message.
+AC_DEFUN_ONCE([BOOST_REQUIRE],
+[AC_REQUIRE([AC_PROG_CXX])dnl
+AC_REQUIRE([AC_PROG_GREP])dnl
+echo "$as_me: this is boost.m4[]_BOOST_SERIAL" >&AS_MESSAGE_LOG_FD
+boost_save_IFS=$IFS
+boost_version_req=$1
+IFS=.
+set x $boost_version_req 0 0 0
+IFS=$boost_save_IFS
+shift
+boost_version_req=`expr "$[1]" '*' 100000 + "$[2]" '*' 100 + "$[3]"`
+boost_version_req_string=$[1].$[2].$[3]
+AC_ARG_WITH([boost],
+ [AS_HELP_STRING([--with-boost=DIR],
+ [prefix of Boost $1 @<:@guess@:>@])])dnl
+AC_ARG_VAR([BOOST_ROOT],[Location of Boost installation])dnl
+# If BOOST_ROOT is set and the user has not provided a value to
+# --with-boost, then treat BOOST_ROOT as if it the user supplied it.
+if test x"$BOOST_ROOT" != x; then
+ if test x"$with_boost" = x; then
+ AC_MSG_NOTICE([Detected BOOST_ROOT; continuing with --with-boost=$BOOST_ROOT])
+ with_boost=$BOOST_ROOT
+ else
+ AC_MSG_NOTICE([Detected BOOST_ROOT=$BOOST_ROOT, but overridden by --with-boost=$with_boost])
+ fi
+fi
+AC_SUBST([DISTCHECK_CONFIGURE_FLAGS],
+ ["$DISTCHECK_CONFIGURE_FLAGS '--with-boost=$with_boost'"])dnl
+boost_save_CPPFLAGS=$CPPFLAGS
+ AC_CACHE_CHECK([for Boost headers version >= $boost_version_req_string],
+ [boost_cv_inc_path],
+ [boost_cv_inc_path=no
+AC_LANG_PUSH([C++])dnl
+m4_pattern_allow([^BOOST_VERSION$])dnl
+ AC_LANG_CONFTEST([AC_LANG_PROGRAM([[#include <boost/version.hpp>
+#if !defined BOOST_VERSION
+# error BOOST_VERSION is not defined
+#elif BOOST_VERSION < $boost_version_req
+# error Boost headers version < $boost_version_req
+#endif
+]])])
+ # If the user provided a value to --with-boost, use it and only it.
+ case $with_boost in #(
+ ''|yes) set x '' /opt/local/include /usr/local/include /opt/include \
+ /usr/include C:/Boost/include;; #(
+ *) set x "$with_boost/include" "$with_boost";;
+ esac
+ shift
+ for boost_dir
+ do
+ # Without --layout=system, Boost (or at least some versions) installs
+ # itself in <prefix>/include/boost-<version>. This inner loop helps to
+ # find headers in such directories.
+ #
+ # Any ${boost_dir}/boost-x_xx directories are searched in reverse version
+ # order followed by ${boost_dir}. The final '.' is a sentinel for
+ # searching $boost_dir" itself. Entries are whitespace separated.
+ #
+ # I didn't indent this loop on purpose (to avoid over-indented code)
+ boost_layout_system_search_list=`cd "$boost_dir" 2>/dev/null \
+ && ls -1 | "${GREP}" '^boost-' | sort -rn -t- -k2 \
+ && echo .`
+ for boost_inc in $boost_layout_system_search_list
+ do
+ if test x"$boost_inc" != x.; then
+ boost_inc="$boost_dir/$boost_inc"
+ else
+ boost_inc="$boost_dir" # Uses sentinel in boost_layout_system_search_list
+ fi
+ if test x"$boost_inc" != x; then
+ # We are going to check whether the version of Boost installed
+ # in $boost_inc is usable by running a compilation that
+ # #includes it. But if we pass a -I/some/path in which Boost
+ # is not installed, the compiler will just skip this -I and
+ # use other locations (either from CPPFLAGS, or from its list
+ # of system include directories). As a result we would use
+ # header installed on the machine instead of the /some/path
+ # specified by the user. So in that precise case (trying
+ # $boost_inc), make sure the version.hpp exists.
+ #
+ # Use test -e as there can be symlinks.
+ test -e "$boost_inc/boost/version.hpp" || continue
+ CPPFLAGS="$CPPFLAGS -I$boost_inc"
+ fi
+ AC_COMPILE_IFELSE([], [boost_cv_inc_path=yes], [boost_cv_version=no])
+ if test x"$boost_cv_inc_path" = xyes; then
+ if test x"$boost_inc" != x; then
+ boost_cv_inc_path=$boost_inc
+ fi
+ break 2
+ fi
+ done
+ done
+AC_LANG_POP([C++])dnl
+ ])
+ case $boost_cv_inc_path in #(
+ no)
+ boost_errmsg="cannot find Boost headers version >= $boost_version_req_string"
+ m4_if([$2], [], [AC_MSG_ERROR([$boost_errmsg])],
+ [AC_MSG_NOTICE([$boost_errmsg])])
+ $2
+ ;;#(
+ yes)
+ BOOST_CPPFLAGS=
+ ;;#(
+ *)
+ AC_SUBST([BOOST_CPPFLAGS], ["-I$boost_cv_inc_path"])dnl
+ ;;
+ esac
+ if test x"$boost_cv_inc_path" != xno; then
+ AC_DEFINE([HAVE_BOOST], [1],
+ [Defined if the requested minimum BOOST version is satisfied])
+ AC_CACHE_CHECK([for Boost's header version],
+ [boost_cv_lib_version],
+ [m4_pattern_allow([^BOOST_LIB_VERSION$])dnl
+ _BOOST_SED_CPP([[/^boost-lib-version = /{s///;s/[\" ]//g;p;q;}]],
+ [#include <boost/version.hpp>
+boost-lib-version = BOOST_LIB_VERSION],
+ [boost_cv_lib_version=`cat conftest.i`])])
+ # e.g. "134" for 1_34_1 or "135" for 1_35
+ boost_major_version=`echo "$boost_cv_lib_version" | sed 's/_//;s/_.*//'`
+ case $boost_major_version in #(
+ '' | *[[!0-9]]*)
+ AC_MSG_ERROR([invalid value: boost_major_version='$boost_major_version'])
+ ;;
+ esac
+fi
+CPPFLAGS=$boost_save_CPPFLAGS
+])# BOOST_REQUIRE
+
+
+# BOOST_STATIC()
+# --------------
+# Add the "--enable-static-boost" configure argument. If this argument is given
+# on the command line, static versions of the libraries will be looked up.
+AC_DEFUN([BOOST_STATIC],
+ [AC_ARG_ENABLE([static-boost],
+ [AS_HELP_STRING([--enable-static-boost],
+ [Prefer the static boost libraries over the shared ones [no]])],
+ [enable_static_boost=yes],
+ [enable_static_boost=no])])# BOOST_STATIC
+
+
+# BOOST_FIND_HEADER([HEADER-NAME], [ACTION-IF-NOT-FOUND], [ACTION-IF-FOUND])
+# --------------------------------------------------------------------------
+# Wrapper around AC_CHECK_HEADER for Boost headers. Useful to check for
+# some parts of the Boost library which are only made of headers and don't
+# require linking (such as Boost.Foreach).
+#
+# Default ACTION-IF-NOT-FOUND: Fail with a fatal error unless Boost couldn't be
+# found in the first place, in which case by default a notice is issued to the
+# user. Presumably if we haven't died already it's because it's OK to not have
+# Boost, which is why only a notice is issued instead of a hard error.
+#
+# Default ACTION-IF-FOUND: define the preprocessor symbol HAVE_<HEADER-NAME> in
+# case of success # (where HEADER-NAME is written LIKE_THIS, e.g.,
+# HAVE_BOOST_FOREACH_HPP).
+AC_DEFUN([BOOST_FIND_HEADER],
+[AC_REQUIRE([BOOST_REQUIRE])dnl
+if test x"$boost_cv_inc_path" = xno; then
+ m4_default([$2], [AC_MSG_NOTICE([Boost not available, not searching for $1])])
+else
+AC_LANG_PUSH([C++])dnl
+boost_save_CPPFLAGS=$CPPFLAGS
+CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
+AC_CHECK_HEADER([$1],
+ [m4_default([$3], [AC_DEFINE(AS_TR_CPP([HAVE_$1]), [1],
+ [Define to 1 if you have <$1>])])],
+ [m4_default([$2], [AC_MSG_ERROR([cannot find $1])])])
+CPPFLAGS=$boost_save_CPPFLAGS
+AC_LANG_POP([C++])dnl
+fi
+])# BOOST_FIND_HEADER
+
+
+# BOOST_FIND_LIBS([COMPONENT-NAME], [CANDIDATE-LIB-NAMES],
+# [PREFERRED-RT-OPT], [HEADER-NAME], [CXX-TEST],
+# [CXX-PROLOGUE])
+# --------------------------------------------------------------
+# Look for the Boost library COMPONENT-NAME (e.g., `thread', for
+# libboost_thread) under the possible CANDIDATE-LIB-NAMES (e.g.,
+# "thread_win32 thread"). Check that HEADER-NAME works and check that
+# libboost_LIB-NAME can link with the code CXX-TEST. The optional
+# argument CXX-PROLOGUE can be used to include some C++ code before
+# the `main' function.
+#
+# Invokes BOOST_FIND_HEADER([HEADER-NAME]) (see above).
+#
+# Boost libraries typically come compiled with several flavors (with different
+# runtime options) so PREFERRED-RT-OPT is the preferred suffix. A suffix is one
+# or more of the following letters: sgdpn (in that order). s = static
+# runtime, d = debug build, g = debug/diagnostic runtime, p = STLPort build,
+# n = (unsure) STLPort build without iostreams from STLPort (it looks like `n'
+# must always be used along with `p'). Additionally, PREFERRED-RT-OPT can
+# start with `mt-' to indicate that there is a preference for multi-thread
+# builds. Some sample values for PREFERRED-RT-OPT: (nothing), mt, d, mt-d, gdp
+# ... If you want to make sure you have a specific version of Boost
+# (eg, >= 1.33) you *must* invoke BOOST_REQUIRE before this macro.
+AC_DEFUN([BOOST_FIND_LIBS],
+[AC_REQUIRE([BOOST_REQUIRE])dnl
+AC_REQUIRE([_BOOST_FIND_COMPILER_TAG])dnl
+AC_REQUIRE([BOOST_STATIC])dnl
+AC_REQUIRE([_BOOST_GUESS_WHETHER_TO_USE_MT])dnl
+if test x"$boost_cv_inc_path" = xno; then
+ AC_MSG_NOTICE([Boost not available, not searching for the Boost $1 library])
+else
+dnl The else branch is huge and wasn't intended on purpose.
+AC_LANG_PUSH([C++])dnl
+AS_VAR_PUSHDEF([Boost_lib], [boost_cv_lib_$1])dnl
+AS_VAR_PUSHDEF([Boost_lib_LDFLAGS], [boost_cv_lib_$1_LDFLAGS])dnl
+AS_VAR_PUSHDEF([Boost_lib_LDPATH], [boost_cv_lib_$1_LDPATH])dnl
+AS_VAR_PUSHDEF([Boost_lib_LIBS], [boost_cv_lib_$1_LIBS])dnl
+BOOST_FIND_HEADER([$4])
+boost_save_CPPFLAGS=$CPPFLAGS
+CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
+AC_CACHE_CHECK([for the Boost $1 library], [Boost_lib],
+ [_BOOST_FIND_LIBS($@)])
+case $Boost_lib in #(
+ (no) _AC_MSG_LOG_CONFTEST
+ AC_MSG_ERROR([cannot find the flags to link with Boost $1])
+ ;;
+esac
+AC_SUBST(AS_TR_CPP([BOOST_$1_LDFLAGS]), [$Boost_lib_LDFLAGS])dnl
+AC_SUBST(AS_TR_CPP([BOOST_$1_LDPATH]), [$Boost_lib_LDPATH])dnl
+AC_SUBST([BOOST_LDPATH], [$Boost_lib_LDPATH])dnl
+AC_SUBST(AS_TR_CPP([BOOST_$1_LIBS]), [$Boost_lib_LIBS])dnl
+CPPFLAGS=$boost_save_CPPFLAGS
+AS_VAR_POPDEF([Boost_lib])dnl
+AS_VAR_POPDEF([Boost_lib_LDFLAGS])dnl
+AS_VAR_POPDEF([Boost_lib_LDPATH])dnl
+AS_VAR_POPDEF([Boost_lib_LIBS])dnl
+AC_LANG_POP([C++])dnl
+fi
+])
+
+
+# BOOST_FIND_LIB([LIB-NAME],
+# [PREFERRED-RT-OPT], [HEADER-NAME], [CXX-TEST],
+# [CXX-PROLOGUE])
+# --------------------------------------------------------------
+# Backward compatibility wrapper for BOOST_FIND_LIBS.
+AC_DEFUN([BOOST_FIND_LIB],
+[BOOST_FIND_LIBS([$1], $@)])
+
+
+# _BOOST_FIND_LIBS([LIB-NAME], [CANDIDATE-LIB-NAMES],
+# [PREFERRED-RT-OPT], [HEADER-NAME], [CXX-TEST],
+# [CXX-PROLOGUE])
+# --------------------------------------------------------------
+# Real implementation of BOOST_FIND_LIBS: rely on these local macros:
+# Boost_lib, Boost_lib_LDFLAGS, Boost_lib_LDPATH, Boost_lib_LIBS
+#
+# The algorithm is as follows: first look for a given library name
+# according to the user's PREFERRED-RT-OPT. For each library name, we
+# prefer to use the ones that carry the tag (toolset name). Each
+# library is searched through the various standard paths were Boost is
+# usually installed. If we can't find the standard variants, we try
+# to enforce -mt (for instance on MacOSX, libboost_thread.dylib
+# doesn't exist but there's -obviously- libboost_thread-mt.dylib).
+AC_DEFUN([_BOOST_FIND_LIBS],
+[Boost_lib=no
+ case "$3" in #(
+ (mt | mt-) boost_mt=-mt; boost_rtopt=;; #(
+ (mt* | mt-*) boost_mt=-mt; boost_rtopt=`expr "X$3" : 'Xmt-*\(.*\)'`;; #(
+ (*) boost_mt=; boost_rtopt=$3;;
+ esac
+ if test $enable_static_boost = yes; then
+ boost_rtopt="s$boost_rtopt"
+ fi
+ # Find the proper debug variant depending on what we've been asked to find.
+ case $boost_rtopt in #(
+ (*d*) boost_rt_d=$boost_rtopt;; #(
+ (*[[sgpn]]*) # Insert the `d' at the right place (in between `sg' and `pn')
+ boost_rt_d=`echo "$boost_rtopt" | sed 's/\(s*g*\)\(p*n*\)/\1\2/'`;; #(
+ (*) boost_rt_d='-d';;
+ esac
+ # If the PREFERRED-RT-OPT are not empty, prepend a `-'.
+ test -n "$boost_rtopt" && boost_rtopt="-$boost_rtopt"
+ $boost_guess_use_mt && boost_mt=-mt
+ # Look for the abs path the static archive.
+ # $libext is computed by Libtool but let's make sure it's non empty.
+ test -z "$libext" &&
+ AC_MSG_ERROR([the libext variable is empty, did you invoke Libtool?])
+ boost_save_ac_objext=$ac_objext
+ # Generate the test file.
+ AC_LANG_CONFTEST([AC_LANG_PROGRAM([#include <$4>
+$6], [$5])])
+dnl Optimization hacks: compiling C++ is slow, especially with Boost. What
+dnl we're trying to do here is guess the right combination of link flags
+dnl (LIBS / LDFLAGS) to use a given library. This can take several
+dnl iterations before it succeeds and is thus *very* slow. So what we do
+dnl instead is that we compile the code first (and thus get an object file,
+dnl typically conftest.o). Then we try various combinations of link flags
+dnl until we succeed to link conftest.o in an executable. The problem is
+dnl that the various TRY_LINK / COMPILE_IFELSE macros of Autoconf always
+dnl remove all the temporary files including conftest.o. So the trick here
+dnl is to temporarily change the value of ac_objext so that conftest.o is
+dnl preserved accross tests. This is obviously fragile and I will burn in
+dnl hell for not respecting Autoconf's documented interfaces, but in the
+dnl mean time, it optimizes the macro by a factor of 5 to 30.
+dnl Another small optimization: the first argument of AC_COMPILE_IFELSE left
+dnl empty because the test file is generated only once above (before we
+dnl start the for loops).
+ AC_COMPILE_IFELSE([],
+ [ac_objext=do_not_rm_me_plz],
+ [AC_MSG_ERROR([cannot compile a test that uses Boost $1])])
+ ac_objext=$boost_save_ac_objext
+ boost_failed_libs=
+# Don't bother to ident the following nested for loops, only the 2
+# innermost ones matter.
+for boost_lib_ in $2; do
+for boost_tag_ in -$boost_cv_lib_tag ''; do
+for boost_ver_ in -$boost_cv_lib_version ''; do
+for boost_mt_ in $boost_mt -mt ''; do
+for boost_rtopt_ in $boost_rtopt '' -d; do
+ for boost_lib in \
+ boost_$boost_lib_$boost_tag_$boost_mt_$boost_rtopt_$boost_ver_ \
+ boost_$boost_lib_$boost_tag_$boost_rtopt_$boost_ver_ \
+ boost_$boost_lib_$boost_tag_$boost_mt_$boost_ver_ \
+ boost_$boost_lib_$boost_tag_$boost_ver_
+ do
+ # Avoid testing twice the same lib
+ case $boost_failed_libs in #(
+ (*@$boost_lib@*) continue;;
+ esac
+ # If with_boost is empty, we'll search in /lib first, which is not quite
+ # right so instead we'll try to a location based on where the headers are.
+ boost_tmp_lib=$with_boost
+ test x"$with_boost" = x && boost_tmp_lib=${boost_cv_inc_path%/include}
+ for boost_ldpath in "$boost_tmp_lib/lib" '' \
+ /opt/local/lib* /usr/local/lib* /opt/lib* /usr/lib* \
+ "$with_boost" C:/Boost/lib /lib*
+ do
+ # Don't waste time with directories that don't exist.
+ if test x"$boost_ldpath" != x && test ! -e "$boost_ldpath"; then
+ continue
+ fi
+ boost_save_LDFLAGS=$LDFLAGS
+ # Are we looking for a static library?
+ case $boost_ldpath:$boost_rtopt_ in #(
+ (*?*:*s*) # Yes (Non empty boost_ldpath + s in rt opt)
+ Boost_lib_LIBS="$boost_ldpath/lib$boost_lib.$libext"
+ test -e "$Boost_lib_LIBS" || continue;; #(
+ (*) # No: use -lboost_foo to find the shared library.
+ Boost_lib_LIBS="-l$boost_lib";;
+ esac
+ boost_save_LIBS=$LIBS
+ LIBS="$Boost_lib_LIBS $LIBS"
+ test x"$boost_ldpath" != x && LDFLAGS="$LDFLAGS -L$boost_ldpath"
+dnl First argument of AC_LINK_IFELSE left empty because the test file is
+dnl generated only once above (before we start the for loops).
+ _BOOST_AC_LINK_IFELSE([],
+ [Boost_lib=yes], [Boost_lib=no])
+ ac_objext=$boost_save_ac_objext
+ LDFLAGS=$boost_save_LDFLAGS
+ LIBS=$boost_save_LIBS
+ if test x"$Boost_lib" = xyes; then
+ # Check or used cached result of whether or not using -R or
+ # -rpath makes sense. Some implementations of ld, such as for
+ # Mac OSX, require -rpath but -R is the flag known to work on
+ # other systems. https://github.com/tsuna/boost.m4/issues/19
+ AC_CACHE_VAL([boost_cv_rpath_link_ldflag],
+ [case $boost_ldpath in
+ '') # Nothing to do.
+ boost_cv_rpath_link_ldflag=
+ boost_rpath_link_ldflag_found=yes;;
+ *)
+ for boost_cv_rpath_link_ldflag in -Wl,-R, -Wl,-rpath,; do
+ LDFLAGS="$boost_save_LDFLAGS -L$boost_ldpath $boost_cv_rpath_link_ldflag$boost_ldpath"
+ LIBS="$boost_save_LIBS $Boost_lib_LIBS"
+ _BOOST_AC_LINK_IFELSE([],
+ [boost_rpath_link_ldflag_found=yes
+ break],
+ [boost_rpath_link_ldflag_found=no])
+ done
+ ;;
+ esac
+ AS_IF([test "x$boost_rpath_link_ldflag_found" != "xyes"],
+ [AC_MSG_ERROR([Unable to determine whether to use -R or -rpath])])
+ LDFLAGS=$boost_save_LDFLAGS
+ LIBS=$boost_save_LIBS
+ ])
+ test x"$boost_ldpath" != x &&
+ Boost_lib_LDFLAGS="-L$boost_ldpath $boost_cv_rpath_link_ldflag$boost_ldpath"
+ Boost_lib_LDPATH="$boost_ldpath"
+ break 7
+ else
+ boost_failed_libs="$boost_failed_libs@$boost_lib@"
+ fi
+ done
+ done
+done
+done
+done
+done
+done # boost_lib_
+rm -f conftest.$ac_objext
+])
+
+
+
+# --------------------------------------- #
+# Checks for the various Boost libraries. #
+# --------------------------------------- #
+
+# List of boost libraries: http://www.boost.org/libs/libraries.htm
+# The page http://beta.boost.org/doc/libs is useful: it gives the first release
+# version of each library (among other things).
+
+# BOOST_DEFUN(LIBRARY, CODE)
+# --------------------------
+# Define BOOST_<LIBRARY-UPPERCASE> as a macro that runs CODE.
+#
+# Use indir to avoid the warning on underquoted macro name given to AC_DEFUN.
+m4_define([BOOST_DEFUN],
+[m4_indir([AC_DEFUN],
+ m4_toupper([BOOST_$1]),
+[m4_pushdef([BOOST_Library], [$1])dnl
+$2
+m4_popdef([BOOST_Library])dnl
+])
+])
+
+# BOOST_ARRAY()
+# -------------
+# Look for Boost.Array
+BOOST_DEFUN([Array],
+[BOOST_FIND_HEADER([boost/array.hpp])])
+
+
+# BOOST_ASIO()
+# ------------
+# Look for Boost.Asio (new in Boost 1.35).
+BOOST_DEFUN([Asio],
+[AC_REQUIRE([BOOST_SYSTEM])dnl
+BOOST_FIND_HEADER([boost/asio.hpp])])
+
+
+# BOOST_ASSIGN()
+# -------------
+# Look for Boost.Assign
+BOOST_DEFUN([Assign],
+[BOOST_FIND_HEADER([boost/assign.hpp])])
+
+
+# BOOST_BIND()
+# ------------
+# Look for Boost.Bind.
+BOOST_DEFUN([Bind],
+[BOOST_FIND_HEADER([boost/bind.hpp])])
+
+
+# BOOST_CHRONO()
+# --------------
+# Look for Boost.Chrono.
+BOOST_DEFUN([Chrono],
+[# Do we have to check for Boost.System? This link-time dependency was
+# added as of 1.35.0. If we have a version <1.35, we must not attempt to
+# find Boost.System as it didn't exist by then.
+if test $boost_major_version -ge 135; then
+ BOOST_SYSTEM([$1])
+fi # end of the Boost.System check.
+boost_filesystem_save_LIBS=$LIBS
+boost_filesystem_save_LDFLAGS=$LDFLAGS
+m4_pattern_allow([^BOOST_SYSTEM_(LIBS|LDFLAGS)$])dnl
+LIBS="$LIBS $BOOST_SYSTEM_LIBS"
+LDFLAGS="$LDFLAGS $BOOST_SYSTEM_LDFLAGS"
+BOOST_FIND_LIB([chrono], [$1],
+ [boost/chrono.hpp],
+ [boost::chrono::thread_clock d;])
+if test $enable_static_boost = yes && test $boost_major_version -ge 135; then
+ BOOST_CHRONO_LIBS="$BOOST_CHRONO_LIBS $BOOST_SYSTEM_LIBS"
+fi
+LIBS=$boost_filesystem_save_LIBS
+LDFLAGS=$boost_filesystem_save_LDFLAGS
+])# BOOST_CHRONO
+
+
+# BOOST_CONTEXT([PREFERRED-RT-OPT])
+# -----------------------------------
+# Look for Boost.Context. For the documentation of PREFERRED-RT-OPT, see the
+# documentation of BOOST_FIND_LIB above.
+#
+# * This library was introduced in Boost 1.51.0
+# * The signatures of make_fcontext() and jump_fcontext were changed in 1.56.0
+# * A dependency on boost_thread appears in 1.57.0
+BOOST_DEFUN([Context],
+[boost_context_save_LIBS=$LIBS
+ boost_context_save_LDFLAGS=$LDFLAGS
+if test $boost_major_version -ge 157; then
+ BOOST_THREAD([$1])
+ m4_pattern_allow([^BOOST_THREAD_(LIBS|LDFLAGS)$])dnl
+ LIBS="$LIBS $BOOST_THREAD_LIBS"
+ LDFLAGS="$LDFLAGS $BOOST_THREAD_LDFLAGS"
+fi
+BOOST_FIND_LIB([context], [$1],
+ [boost/context/all.hpp],[[
+
+// creates a stack
+void * stack_pointer = new void*[4096];
+std::size_t const size = sizeof(void*[4096]);
+
+#if BOOST_VERSION <= 105100
+ctx::make_fcontext(&fc, f);
+return ctx::jump_fcontext(&fcm, &fc, 3) == 6;
+
+#else
+
+fc = ctx::make_fcontext(stack_pointer, size, f);
+return ctx::jump_fcontext(&fcm, fc, 3) == 6;
+
+#endif
+
+
+]],[dnl
+
+#include <boost/version.hpp>
+#if BOOST_VERSION <= 105100
+
+namespace ctx = boost::ctx;
+
+static ctx::fcontext_t fcm, fc;
+
+static void f(intptr_t i) {
+ ctx::jump_fcontext(&fc, &fcm, i * 2);
+}
+
+#elif BOOST_VERSION <= 105500
+
+namespace ctx = boost::context;
+
+// context
+static ctx::fcontext_t fcm, *fc;
+
+// context-function
+static void f(intptr_t i) {
+ ctx::jump_fcontext(fc, &fcm, i * 2);
+}
+
+#else
+
+namespace ctx = boost::context;
+
+// context
+static ctx::fcontext_t fcm, fc;
+
+// context-function
+static void f(intptr_t i) {
+ ctx::jump_fcontext(&fc, fcm, i * 2);
+}
+#endif
+])
+LIBS=$boost_context_save_LIBS
+LDFLAGS=$boost_context_save_LDFLAGS
+])# BOOST_CONTEXT
+
+
+# BOOST_CONVERSION()
+# ------------------
+# Look for Boost.Conversion (cast / lexical_cast)
+BOOST_DEFUN([Conversion],
+[BOOST_FIND_HEADER([boost/cast.hpp])
+BOOST_FIND_HEADER([boost/lexical_cast.hpp])
+])# BOOST_CONVERSION
+
+
+# BOOST_COROUTINE([PREFERRED-RT-OPT])
+# -----------------------------------
+# Look for Boost.Coroutine. For the documentation of PREFERRED-RT-OPT, see the
+# documentation of BOOST_FIND_LIB above. This library was introduced in Boost
+# 1.53.0
+BOOST_DEFUN([Coroutine],
+[
+boost_coroutine_save_LIBS=$LIBS
+boost_coroutine_save_LDFLAGS=$LDFLAGS
+# Link-time dependency from coroutine to context
+BOOST_CONTEXT([$1])
+# Starting from Boost 1.55 a dependency on Boost.System is added
+if test $boost_major_version -ge 155; then
+ BOOST_SYSTEM([$1])
+fi
+m4_pattern_allow([^BOOST_(CONTEXT|SYSTEM)_(LIBS|LDFLAGS)])
+LIBS="$LIBS $BOOST_CONTEXT_LIBS $BOOST_SYSTEM_LIBS"
+LDFLAGS="$LDFLAGS $BOOST_CONTEXT_LDFLAGS"
+
+# in 1.53 coroutine was a header only library
+if test $boost_major_version -eq 153; then
+ BOOST_FIND_HEADER([boost/coroutine/coroutine.hpp])
+else
+ BOOST_FIND_LIB([coroutine], [$1],
+ [boost/coroutine/coroutine.hpp],
+ [
+ #include <boost/version.hpp>
+ #if BOOST_VERSION <= 105500
+ boost::coroutines::coroutine<int(int)> coro; coro.get();
+ #else
+ boost::coroutines::asymmetric_coroutine<int>::pull_type coro; coro.get();
+ #endif
+ ])
+fi
+# Link-time dependency from coroutine to context, existed only in 1.53, in 1.54
+# coroutine doesn't use context from its headers but from its library.
+if test $boost_major_version -eq 153 || test $enable_static_boost = yes && test $boost_major_version -ge 154; then
+ BOOST_COROUTINE_LIBS="$BOOST_COROUTINE_LIBS $BOOST_CONTEXT_LIBS"
+ BOOST_COROUTINE_LDFLAGS="$BOOST_COROUTINE_LDFLAGS $BOOST_CONTEXT_LDFLAGS"
+fi
+if test $enable_static_boost = yes && test $boost_major_version -ge 155; then
+ BOOST_COROUTINE_LIBS="$BOOST_COROUTINE_LIBS $BOOST_SYSTEM_LIBS"
+ BOOST_COROUTINE_LDFLAGS="$BOOST_COROUTINE_LDFLAGS $BOOST_SYSTEM_LDFLAGS"
+fi
+LIBS=$boost_coroutine_save_LIBS
+LDFLAGS=$boost_coroutine_save_LDFLAGS
+])# BOOST_COROUTINE
+
+
+# BOOST_CRC()
+# -----------
+# Look for Boost.CRC
+BOOST_DEFUN([CRC],
+[BOOST_FIND_HEADER([boost/crc.hpp])
+])# BOOST_CRC
+
+
+# BOOST_DATE_TIME([PREFERRED-RT-OPT])
+# -----------------------------------
+# Look for Boost.Date_Time. For the documentation of PREFERRED-RT-OPT, see the
+# documentation of BOOST_FIND_LIB above.
+BOOST_DEFUN([Date_Time],
+[BOOST_FIND_LIB([date_time], [$1],
+ [boost/date_time/posix_time/posix_time.hpp],
+ [boost::posix_time::ptime t;])
+])# BOOST_DATE_TIME
+
+
+# BOOST_FILESYSTEM([PREFERRED-RT-OPT])
+# ------------------------------------
+# Look for Boost.Filesystem. For the documentation of PREFERRED-RT-OPT, see
+# the documentation of BOOST_FIND_LIB above.
+# Do not check for boost/filesystem.hpp because this file was introduced in
+# 1.34.
+BOOST_DEFUN([Filesystem],
+[# Do we have to check for Boost.System? This link-time dependency was
+# added as of 1.35.0. If we have a version <1.35, we must not attempt to
+# find Boost.System as it didn't exist by then.
+if test $boost_major_version -ge 135; then
+ BOOST_SYSTEM([$1])
+fi # end of the Boost.System check.
+boost_filesystem_save_LIBS=$LIBS
+boost_filesystem_save_LDFLAGS=$LDFLAGS
+m4_pattern_allow([^BOOST_SYSTEM_(LIBS|LDFLAGS)$])dnl
+LIBS="$LIBS $BOOST_SYSTEM_LIBS"
+LDFLAGS="$LDFLAGS $BOOST_SYSTEM_LDFLAGS"
+BOOST_FIND_LIB([filesystem], [$1],
+ [boost/filesystem/path.hpp], [boost::filesystem::path p;])
+if test $enable_static_boost = yes && test $boost_major_version -ge 135; then
+ BOOST_FILESYSTEM_LIBS="$BOOST_FILESYSTEM_LIBS $BOOST_SYSTEM_LIBS"
+fi
+LIBS=$boost_filesystem_save_LIBS
+LDFLAGS=$boost_filesystem_save_LDFLAGS
+])# BOOST_FILESYSTEM
+
+
+# BOOST_FLYWEIGHT()
+# -----------------
+# Look for Boost.Flyweight.
+BOOST_DEFUN([Flyweight],
+[dnl There's a hidden dependency on pthreads.
+AC_REQUIRE([_BOOST_PTHREAD_FLAG])dnl
+BOOST_FIND_HEADER([boost/flyweight.hpp])
+AC_SUBST([BOOST_FLYWEIGHT_LIBS], [$boost_cv_pthread_flag])
+])
+
+
+# BOOST_FOREACH()
+# ---------------
+# Look for Boost.Foreach.
+BOOST_DEFUN([Foreach],
+[BOOST_FIND_HEADER([boost/foreach.hpp])])
+
+
+# BOOST_FORMAT()
+# --------------
+# Look for Boost.Format.
+# Note: we can't check for boost/format/format_fwd.hpp because the header isn't
+# standalone. It can't be compiled because it triggers the following error:
+# boost/format/detail/config_macros.hpp:88: error: 'locale' in namespace 'std'
+# does not name a type
+BOOST_DEFUN([Format],
+[BOOST_FIND_HEADER([boost/format.hpp])])
+
+
+# BOOST_FUNCTION()
+# ----------------
+# Look for Boost.Function
+BOOST_DEFUN([Function],
+[BOOST_FIND_HEADER([boost/function.hpp])])
+
+
+# BOOST_GEOMETRY()
+# ----------------
+# Look for Boost.Geometry (new since 1.47.0).
+BOOST_DEFUN([Geometry],
+[BOOST_FIND_HEADER([boost/geometry.hpp])
+])# BOOST_GEOMETRY
+
+
+# BOOST_GRAPH([PREFERRED-RT-OPT])
+# -------------------------------
+# Look for Boost.Graphs. For the documentation of PREFERRED-RT-OPT, see the
+# documentation of BOOST_FIND_LIB above.
+BOOST_DEFUN([Graph],
+[boost_graph_save_LIBS=$LIBS
+boost_graph_save_LDFLAGS=$LDFLAGS
+# Link-time dependency from graph to regex was added as of 1.40.0.
+if test $boost_major_version -ge 140; then
+ BOOST_REGEX([$1])
+ m4_pattern_allow([^BOOST_REGEX_(LIBS|LDFLAGS)$])dnl
+ LIBS="$LIBS $BOOST_REGEX_LIBS"
+ LDFLAGS="$LDFLAGS $BOOST_REGEX_LDFLAGS"
+fi
+BOOST_FIND_LIB([graph], [$1],
+ [boost/graph/adjacency_list.hpp], [boost::adjacency_list<> g;])
+LIBS=$boost_graph_save_LIBS
+LDFLAGS=$boost_graph_save_LDFLAGS
+])# BOOST_GRAPH
+
+
+# BOOST_IOSTREAMS([PREFERRED-RT-OPT])
+# -----------------------------------
+# Look for Boost.IOStreams. For the documentation of PREFERRED-RT-OPT, see the
+# documentation of BOOST_FIND_LIB above.
+BOOST_DEFUN([IOStreams],
+[BOOST_FIND_LIB([iostreams], [$1],
+ [boost/iostreams/device/file_descriptor.hpp],
+ [boost::iostreams::file_descriptor fd; fd.close();])
+])# BOOST_IOSTREAMS
+
+
+# BOOST_HASH()
+# ------------
+# Look for Boost.Functional/Hash
+BOOST_DEFUN([Hash],
+[BOOST_FIND_HEADER([boost/functional/hash.hpp])])
+
+
+# BOOST_LAMBDA()
+# --------------
+# Look for Boost.Lambda
+BOOST_DEFUN([Lambda],
+[BOOST_FIND_HEADER([boost/lambda/lambda.hpp])])
+
+
+# BOOST_LOCALE()
+# --------------
+# Look for Boost.Locale
+BOOST_DEFUN([Locale],
+[
+boost_locale_save_LIBS=$LIBS
+boost_locale_save_LDFLAGS=$LDFLAGS
+# require SYSTEM for boost-1.50.0 and up
+if test $boost_major_version -ge 150; then
+ BOOST_SYSTEM([$1])
+ m4_pattern_allow([^BOOST_SYSTEM_(LIBS|LDFLAGS)$])dnl
+ LIBS="$LIBS $BOOST_SYSTEM_LIBS"
+ LDFLAGS="$LDFLAGS $BOOST_SYSTEM_LDFLAGS"
+fi # end of the Boost.System check.
+BOOST_FIND_LIB([locale], [$1],
+ [boost/locale.hpp],
+ [[boost::locale::generator gen; std::locale::global(gen(""));]])
+LIBS=$boost_locale_save_LIBS
+LDFLAGS=$boost_locale_save_LDFLAGS
+])# BOOST_LOCALE
+
+# BOOST_LOG([PREFERRED-RT-OPT])
+# -----------------------------
+# Look for Boost.Log. For the documentation of PREFERRED-RT-OPT, see the
+# documentation of BOOST_FIND_LIB above.
+BOOST_DEFUN([Log],
+[boost_log_save_LIBS=$LIBS
+boost_log_save_LDFLAGS=$LDFLAGS
+BOOST_SYSTEM([$1])
+BOOST_FILESYSTEM([$1])
+BOOST_DATE_TIME([$1])
+m4_pattern_allow([^BOOST_(SYSTEM|FILESYSTEM|DATE_TIME)_(LIBS|LDFLAGS)$])dnl
+LIBS="$LIBS $BOOST_DATE_TIME_LIBS $BOOST_FILESYSTEM_LIBS $BOOST_SYSTEM_LIBS"
+LDFLAGS="$LDFLAGS $BOOST_DATE_TIME_LDFLAGS $BOOST_FILESYSTEM_LDFLAGS $BOOST_SYSTEM_LDFLAGS"
+BOOST_FIND_LIB([log], [$1],
+ [boost/log/core/core.hpp],
+ [boost::log::attribute a; a.get_value();])
+LIBS=$boost_log_save_LIBS
+LDFLAGS=$boost_log_save_LDFLAGS
+])# BOOST_LOG
+
+
+# BOOST_LOG_SETUP([PREFERRED-RT-OPT])
+# -----------------------------------
+# Look for Boost.Log. For the documentation of PREFERRED-RT-OPT, see the
+# documentation of BOOST_FIND_LIB above.
+BOOST_DEFUN([Log_Setup],
+[boost_log_setup_save_LIBS=$LIBS
+boost_log_setup_save_LDFLAGS=$LDFLAGS
+BOOST_LOG([$1])
+m4_pattern_allow([^BOOST_LOG_(LIBS|LDFLAGS)$])dnl
+LIBS="$LIBS $BOOST_LOG_LIBS"
+LDFLAGS="$LDFLAGS $BOOST_LOG_LDFLAGS"
+BOOST_FIND_LIB([log_setup], [$1],
+ [boost/log/utility/setup/from_settings.hpp],
+ [boost::log::basic_settings<char> bs; bs.empty();])
+LIBS=$boost_log_setup_save_LIBS
+LDFLAGS=$boost_log_setup_save_LDFLAGS
+])# BOOST_LOG_SETUP
+
+
+# BOOST_MATH()
+# ------------
+# Look for Boost.Math
+# TODO: This library isn't header-only but it comes in multiple different
+# flavors that don't play well with BOOST_FIND_LIB (e.g, libboost_math_c99,
+# libboost_math_c99f, libboost_math_c99l, libboost_math_tr1,
+# libboost_math_tr1f, libboost_math_tr1l). This macro must be fixed to do the
+# right thing anyway.
+BOOST_DEFUN([Math],
+[BOOST_FIND_HEADER([boost/math/special_functions.hpp])])
+
+
+# BOOST_MPI([PREFERRED-RT-OPT])
+# -------------------------------
+# Look for Boost MPI. For the documentation of PREFERRED-RT-OPT, see the
+# documentation of BOOST_FIND_LIB above. Uses MPICXX variable if it is
+# set, otherwise tries CXX
+#
+BOOST_DEFUN([MPI],
+[boost_save_CXX=${CXX}
+boost_save_CXXCPP=${CXXCPP}
+if test x"${MPICXX}" != x; then
+ CXX=${MPICXX}
+ CXXCPP="${MPICXX} -E"
+fi
+BOOST_FIND_LIB([mpi], [$1],
+ [boost/mpi.hpp],
+ [int argc = 0;
+ char **argv = 0;
+ boost::mpi::environment env(argc,argv);])
+CXX=${boost_save_CXX}
+CXXCPP=${boost_save_CXXCPP}
+])# BOOST_MPI
+
+
+# BOOST_MULTIARRAY()
+# ------------------
+# Look for Boost.MultiArray
+BOOST_DEFUN([MultiArray],
+[BOOST_FIND_HEADER([boost/multi_array.hpp])])
+
+
+# BOOST_NUMERIC_UBLAS()
+# --------------------------
+# Look for Boost.NumericUblas (Basic Linear Algebra)
+BOOST_DEFUN([Numeric_Ublas],
+[BOOST_FIND_HEADER([boost/numeric/ublas/vector.hpp])
+])# BOOST_NUMERIC_UBLAS
+
+
+# BOOST_NUMERIC_CONVERSION()
+# --------------------------
+# Look for Boost.NumericConversion (policy-based numeric conversion)
+BOOST_DEFUN([Numeric_Conversion],
+[BOOST_FIND_HEADER([boost/numeric/conversion/converter.hpp])
+])# BOOST_NUMERIC_CONVERSION
+
+
+# BOOST_OPTIONAL()
+# ----------------
+# Look for Boost.Optional
+BOOST_DEFUN([Optional],
+[BOOST_FIND_HEADER([boost/optional.hpp])])
+
+
+# BOOST_PREPROCESSOR()
+# --------------------
+# Look for Boost.Preprocessor
+BOOST_DEFUN([Preprocessor],
+[BOOST_FIND_HEADER([boost/preprocessor/repeat.hpp])])
+
+
+# BOOST_RANGE()
+# --------------------
+# Look for Boost.Range
+BOOST_DEFUN([Range],
+[BOOST_FIND_HEADER([boost/range/adaptors.hpp])])
+
+# BOOST_UNORDERED()
+# -----------------
+# Look for Boost.Unordered
+BOOST_DEFUN([Unordered],
+[BOOST_FIND_HEADER([boost/unordered_map.hpp])])
+
+
+# BOOST_UUID()
+# ------------
+# Look for Boost.Uuid
+BOOST_DEFUN([Uuid],
+[BOOST_FIND_HEADER([boost/uuid/uuid.hpp])])
+
+
+# BOOST_PROGRAM_OPTIONS([PREFERRED-RT-OPT])
+# -----------------------------------------
+# Look for Boost.Program_options. For the documentation of PREFERRED-RT-OPT,
+# see the documentation of BOOST_FIND_LIB above.
+BOOST_DEFUN([Program_Options],
+[BOOST_FIND_LIB([program_options], [$1],
+ [boost/program_options.hpp],
+ [boost::program_options::options_description d("test");])
+])# BOOST_PROGRAM_OPTIONS
+
+
+
+# _BOOST_PYTHON_CONFIG(VARIABLE, FLAG)
+# ------------------------------------
+# Save VARIABLE, and define it via `python-config --FLAG`.
+# Substitute BOOST_PYTHON_VARIABLE.
+m4_define([_BOOST_PYTHON_CONFIG],
+[AC_SUBST([BOOST_PYTHON_$1],
+ [`python-config --$2 2>/dev/null`])dnl
+boost_python_save_$1=$$1
+$1="$$1 $BOOST_PYTHON_$1"])
+
+
+# BOOST_PYTHON([PREFERRED-RT-OPT])
+# --------------------------------
+# Look for Boost.Python. For the documentation of PREFERRED-RT-OPT,
+# see the documentation of BOOST_FIND_LIB above.
+BOOST_DEFUN([Python],
+[_BOOST_PYTHON_CONFIG([CPPFLAGS], [includes])
+_BOOST_PYTHON_CONFIG([LDFLAGS], [ldflags])
+_BOOST_PYTHON_CONFIG([LIBS], [libs])
+m4_pattern_allow([^BOOST_PYTHON_MODULE$])dnl
+BOOST_FIND_LIBS([python], [python python3], [$1],
+ [boost/python.hpp],
+ [], [BOOST_PYTHON_MODULE(empty) {}])
+CPPFLAGS=$boost_python_save_CPPFLAGS
+LDFLAGS=$boost_python_save_LDFLAGS
+LIBS=$boost_python_save_LIBS
+])# BOOST_PYTHON
+
+
+# BOOST_REF()
+# -----------
+# Look for Boost.Ref
+BOOST_DEFUN([Ref],
+[BOOST_FIND_HEADER([boost/ref.hpp])])
+
+
+# BOOST_REGEX([PREFERRED-RT-OPT])
+# -------------------------------
+# Look for Boost.Regex. For the documentation of PREFERRED-RT-OPT, see the
+# documentation of BOOST_FIND_LIB above.
+BOOST_DEFUN([Regex],
+[BOOST_FIND_LIB([regex], [$1],
+ [boost/regex.hpp],
+ [boost::regex exp("*"); boost::regex_match("foo", exp);])
+])# BOOST_REGEX
+
+
+# BOOST_SERIALIZATION([PREFERRED-RT-OPT])
+# ---------------------------------------
+# Look for Boost.Serialization. For the documentation of PREFERRED-RT-OPT, see
+# the documentation of BOOST_FIND_LIB above.
+BOOST_DEFUN([Serialization],
+[BOOST_FIND_LIB([serialization], [$1],
+ [boost/archive/text_oarchive.hpp],
+ [std::ostream* o = 0; // Cheap way to get an ostream...
+ boost::archive::text_oarchive t(*o);])
+])# BOOST_SERIALIZATION
+
+
+# BOOST_SIGNALS([PREFERRED-RT-OPT])
+# ---------------------------------
+# Look for Boost.Signals. For the documentation of PREFERRED-RT-OPT, see the
+# documentation of BOOST_FIND_LIB above.
+BOOST_DEFUN([Signals],
+[BOOST_FIND_LIB([signals], [$1],
+ [boost/signal.hpp],
+ [boost::signal<void ()> s;])
+])# BOOST_SIGNALS
+
+
+# BOOST_SIGNALS2()
+# ----------------
+# Look for Boost.Signals2 (new since 1.39.0).
+BOOST_DEFUN([Signals2],
+[BOOST_FIND_HEADER([boost/signals2.hpp])
+])# BOOST_SIGNALS2
+
+
+# BOOST_SMART_PTR()
+# -----------------
+# Look for Boost.SmartPtr
+BOOST_DEFUN([Smart_Ptr],
+[BOOST_FIND_HEADER([boost/scoped_ptr.hpp])
+BOOST_FIND_HEADER([boost/shared_ptr.hpp])
+])
+
+
+# BOOST_STATICASSERT()
+# --------------------
+# Look for Boost.StaticAssert
+BOOST_DEFUN([StaticAssert],
+[BOOST_FIND_HEADER([boost/static_assert.hpp])])
+
+
+# BOOST_STRING_ALGO()
+# -------------------
+# Look for Boost.StringAlgo
+BOOST_DEFUN([String_Algo],
+[BOOST_FIND_HEADER([boost/algorithm/string.hpp])
+])
+
+
+# BOOST_SYSTEM([PREFERRED-RT-OPT])
+# --------------------------------
+# Look for Boost.System. For the documentation of PREFERRED-RT-OPT, see the
+# documentation of BOOST_FIND_LIB above. This library was introduced in Boost
+# 1.35.0.
+BOOST_DEFUN([System],
+[BOOST_FIND_LIB([system], [$1],
+ [boost/system/error_code.hpp],
+ [boost::system::error_code e; e.clear();])
+])# BOOST_SYSTEM
+
+
+# BOOST_TEST([PREFERRED-RT-OPT])
+# ------------------------------
+# Look for Boost.Test. For the documentation of PREFERRED-RT-OPT, see the
+# documentation of BOOST_FIND_LIB above.
+BOOST_DEFUN([Test],
+[m4_pattern_allow([^BOOST_CHECK$])dnl
+BOOST_FIND_LIB([unit_test_framework], [$1],
+ [boost/test/unit_test.hpp], [BOOST_CHECK(2 == 2);],
+ [using boost::unit_test::test_suite;
+ test_suite* init_unit_test_suite(int argc, char ** argv)
+ { return NULL; }])
+])# BOOST_TEST
+
+
+# BOOST_THREAD([PREFERRED-RT-OPT])
+# ---------------------------------
+# Look for Boost.Thread. For the documentation of PREFERRED-RT-OPT, see the
+# documentation of BOOST_FIND_LIB above.
+BOOST_DEFUN([Thread],
+[dnl Having the pthread flag is required at least on GCC3 where
+dnl boost/thread.hpp would complain if we try to compile without
+dnl -pthread on GNU/Linux.
+AC_REQUIRE([_BOOST_PTHREAD_FLAG])dnl
+boost_thread_save_LIBS=$LIBS
+boost_thread_save_LDFLAGS=$LDFLAGS
+boost_thread_save_CPPFLAGS=$CPPFLAGS
+# Link-time dependency from thread to system was added as of 1.49.0.
+if test $boost_major_version -ge 149; then
+BOOST_SYSTEM([$1])
+fi # end of the Boost.System check.
+m4_pattern_allow([^BOOST_SYSTEM_(LIBS|LDFLAGS)$])dnl
+LIBS="$LIBS $BOOST_SYSTEM_LIBS $boost_cv_pthread_flag"
+LDFLAGS="$LDFLAGS $BOOST_SYSTEM_LDFLAGS"
+CPPFLAGS="$CPPFLAGS $boost_cv_pthread_flag"
+
+# When compiling for the Windows platform, the threads library is named
+# differently. This suffix doesn't exist in new versions of Boost, or
+# possibly new versions of GCC on mingw I am assuming it's Boost's change for
+# now and I am setting version to 1.48, for lack of knowledge as to when this
+# change occurred.
+if test $boost_major_version -lt 148; then
+ case $host_os in
+ (*mingw*) boost_thread_lib_ext=_win32;;
+ esac
+fi
+BOOST_FIND_LIBS([thread], [thread$boost_thread_lib_ext],
+ [$1],
+ [boost/thread.hpp], [boost::thread t; boost::mutex m;])
+
+case $host_os in
+ (*mingw*) boost_thread_w32_socket_link=-lws2_32;;
+esac
+
+BOOST_THREAD_LIBS="$BOOST_THREAD_LIBS $BOOST_SYSTEM_LIBS $boost_cv_pthread_flag $boost_thread_w32_socket_link"
+BOOST_THREAD_LDFLAGS="$BOOST_SYSTEM_LDFLAGS"
+BOOST_CPPFLAGS="$BOOST_CPPFLAGS $boost_cv_pthread_flag"
+LIBS=$boost_thread_save_LIBS
+LDFLAGS=$boost_thread_save_LDFLAGS
+CPPFLAGS=$boost_thread_save_CPPFLAGS
+])# BOOST_THREAD
+
+AU_ALIAS([BOOST_THREADS], [BOOST_THREAD])
+
+
+# BOOST_TOKENIZER()
+# -----------------
+# Look for Boost.Tokenizer
+BOOST_DEFUN([Tokenizer],
+[BOOST_FIND_HEADER([boost/tokenizer.hpp])])
+
+
+# BOOST_TRIBOOL()
+# ---------------
+# Look for Boost.Tribool
+BOOST_DEFUN([Tribool],
+[BOOST_FIND_HEADER([boost/logic/tribool_fwd.hpp])
+BOOST_FIND_HEADER([boost/logic/tribool.hpp])
+])
+
+
+# BOOST_TUPLE()
+# -------------
+# Look for Boost.Tuple
+BOOST_DEFUN([Tuple],
+[BOOST_FIND_HEADER([boost/tuple/tuple.hpp])])
+
+
+# BOOST_TYPETRAITS()
+# --------------------
+# Look for Boost.TypeTraits
+BOOST_DEFUN([TypeTraits],
+[BOOST_FIND_HEADER([boost/type_traits.hpp])])
+
+
+# BOOST_UTILITY()
+# ---------------
+# Look for Boost.Utility (noncopyable, result_of, base-from-member idiom,
+# etc.)
+BOOST_DEFUN([Utility],
+[BOOST_FIND_HEADER([boost/utility.hpp])])
+
+
+# BOOST_VARIANT()
+# ---------------
+# Look for Boost.Variant.
+BOOST_DEFUN([Variant],
+[BOOST_FIND_HEADER([boost/variant/variant_fwd.hpp])
+BOOST_FIND_HEADER([boost/variant.hpp])])
+
+
+# BOOST_POINTER_CONTAINER()
+# ------------------------
+# Look for Boost.PointerContainer
+BOOST_DEFUN([Pointer_Container],
+[BOOST_FIND_HEADER([boost/ptr_container/ptr_deque.hpp])
+BOOST_FIND_HEADER([boost/ptr_container/ptr_list.hpp])
+BOOST_FIND_HEADER([boost/ptr_container/ptr_vector.hpp])
+BOOST_FIND_HEADER([boost/ptr_container/ptr_array.hpp])
+BOOST_FIND_HEADER([boost/ptr_container/ptr_set.hpp])
+BOOST_FIND_HEADER([boost/ptr_container/ptr_map.hpp])
+])# BOOST_POINTER_CONTAINER
+
+
+# BOOST_WAVE([PREFERRED-RT-OPT])
+# ------------------------------
+# NOTE: If you intend to use Wave/Spirit with thread support, make sure you
+# call BOOST_THREAD first.
+# Look for Boost.Wave. For the documentation of PREFERRED-RT-OPT, see the
+# documentation of BOOST_FIND_LIB above.
+BOOST_DEFUN([Wave],
+[AC_REQUIRE([BOOST_FILESYSTEM])dnl
+AC_REQUIRE([BOOST_DATE_TIME])dnl
+boost_wave_save_LIBS=$LIBS
+boost_wave_save_LDFLAGS=$LDFLAGS
+m4_pattern_allow([^BOOST_((FILE)?SYSTEM|DATE_TIME|THREAD)_(LIBS|LDFLAGS)$])dnl
+LIBS="$LIBS $BOOST_SYSTEM_LIBS $BOOST_FILESYSTEM_LIBS $BOOST_DATE_TIME_LIBS \
+$BOOST_THREAD_LIBS"
+LDFLAGS="$LDFLAGS $BOOST_SYSTEM_LDFLAGS $BOOST_FILESYSTEM_LDFLAGS \
+$BOOST_DATE_TIME_LDFLAGS $BOOST_THREAD_LDFLAGS"
+BOOST_FIND_LIB([wave], [$1],
+ [boost/wave.hpp],
+ [boost::wave::token_id id; get_token_name(id);])
+LIBS=$boost_wave_save_LIBS
+LDFLAGS=$boost_wave_save_LDFLAGS
+])# BOOST_WAVE
+
+
+# BOOST_XPRESSIVE()
+# -----------------
+# Look for Boost.Xpressive (new since 1.36.0).
+BOOST_DEFUN([Xpressive],
+[BOOST_FIND_HEADER([boost/xpressive/xpressive.hpp])])
+
+
+# ----------------- #
+# Internal helpers. #
+# ----------------- #
+
+
+# _BOOST_PTHREAD_FLAG()
+# ---------------------
+# Internal helper for BOOST_THREAD. Computes boost_cv_pthread_flag
+# which must be used in CPPFLAGS and LIBS.
+#
+# Yes, we *need* to put the -pthread thing in CPPFLAGS because with GCC3,
+# boost/thread.hpp will trigger a #error if -pthread isn't used:
+# boost/config/requires_threads.hpp:47:5: #error "Compiler threading support
+# is not turned on. Please set the correct command line options for
+# threading: -pthread (Linux), -pthreads (Solaris) or -mthreads (Mingw32)"
+#
+# Based on ACX_PTHREAD: http://autoconf-archive.cryp.to/acx_pthread.html
+AC_DEFUN([_BOOST_PTHREAD_FLAG],
+[AC_REQUIRE([AC_PROG_CXX])dnl
+AC_REQUIRE([AC_CANONICAL_HOST])dnl
+AC_LANG_PUSH([C++])dnl
+AC_CACHE_CHECK([for the flags needed to use pthreads], [boost_cv_pthread_flag],
+[ boost_cv_pthread_flag=
+ # The ordering *is* (sometimes) important. Some notes on the
+ # individual items follow:
+ # (none): in case threads are in libc; should be tried before -Kthread and
+ # other compiler flags to prevent continual compiler warnings
+ # -lpthreads: AIX (must check this before -lpthread)
+ # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
+ # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
+ # -llthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
+ # -pthread: GNU Linux/GCC (kernel threads), BSD/GCC (userland threads)
+ # -pthreads: Solaris/GCC
+ # -mthreads: MinGW32/GCC, Lynx/GCC
+ # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
+ # doesn't hurt to check since this sometimes defines pthreads too;
+ # also defines -D_REENTRANT)
+ # ... -mt is also the pthreads flag for HP/aCC
+ # -lpthread: GNU Linux, etc.
+ # --thread-safe: KAI C++
+ case $host_os in #(
+ *solaris*)
+ # On Solaris (at least, for some versions), libc contains stubbed
+ # (non-functional) versions of the pthreads routines, so link-based
+ # tests will erroneously succeed. (We need to link with -pthreads/-mt/
+ # -lpthread.) (The stubs are missing pthread_cleanup_push, or rather
+ # a function called by this macro, so we could check for that, but
+ # who knows whether they'll stub that too in a future libc.) So,
+ # we'll just look for -pthreads and -lpthread first:
+ boost_pthread_flags="-pthreads -lpthread -mt -pthread";; #(
+ *)
+ boost_pthread_flags="-lpthreads -Kthread -kthread -llthread -pthread \
+ -pthreads -mthreads -lpthread --thread-safe -mt";;
+ esac
+ # Generate the test file.
+ AC_LANG_CONFTEST([AC_LANG_PROGRAM([#include <pthread.h>],
+ [pthread_t th; pthread_join(th, 0);
+ pthread_attr_init(0); pthread_cleanup_push(0, 0);
+ pthread_create(0,0,0,0); pthread_cleanup_pop(0);])])
+ for boost_pthread_flag in '' $boost_pthread_flags; do
+ boost_pthread_ok=false
+dnl Re-use the test file already generated.
+ boost_pthreads__save_LIBS=$LIBS
+ LIBS="$LIBS $boost_pthread_flag"
+ AC_LINK_IFELSE([],
+ [if grep ".*$boost_pthread_flag" conftest.err; then
+ echo "This flag seems to have triggered warnings" >&AS_MESSAGE_LOG_FD
+ else
+ boost_pthread_ok=:; boost_cv_pthread_flag=$boost_pthread_flag
+ fi])
+ LIBS=$boost_pthreads__save_LIBS
+ $boost_pthread_ok && break
+ done
+])
+AC_LANG_POP([C++])dnl
+])# _BOOST_PTHREAD_FLAG
+
+
+# _BOOST_gcc_test(MAJOR, MINOR)
+# -----------------------------
+# Internal helper for _BOOST_FIND_COMPILER_TAG.
+m4_define([_BOOST_gcc_test],
+["defined __GNUC__ && __GNUC__ == $1 && __GNUC_MINOR__ == $2 && !defined __ICC @ gcc$1$2"])dnl
+
+# _BOOST_mingw_test(MAJOR, MINOR)
+# -----------------------------
+# Internal helper for _BOOST_FIND_COMPILER_TAG.
+m4_define([_BOOST_mingw_test],
+["defined __GNUC__ && __GNUC__ == $1 && __GNUC_MINOR__ == $2 && !defined __ICC && \
+ (defined WIN32 || defined WINNT || defined _WIN32 || defined __WIN32 \
+ || defined __WIN32__ || defined __WINNT || defined __WINNT__) @ mgw$1$2"])dnl
+
+
+# _BOOST_FIND_COMPILER_TAG()
+# --------------------------
+# Internal. When Boost is installed without --layout=system, each library
+# filename will hold a suffix that encodes the compiler used during the
+# build. The Boost build system seems to call this a `tag'.
+AC_DEFUN([_BOOST_FIND_COMPILER_TAG],
+[AC_REQUIRE([AC_PROG_CXX])dnl
+AC_REQUIRE([AC_CANONICAL_HOST])dnl
+AC_CACHE_CHECK([for the toolset name used by Boost for $CXX],
+ [boost_cv_lib_tag],
+[boost_cv_lib_tag=unknown
+if test x$boost_cv_inc_path != xno; then
+ AC_LANG_PUSH([C++])dnl
+ # The following tests are mostly inspired by boost/config/auto_link.hpp
+ # The list is sorted to most recent/common to oldest compiler (in order
+ # to increase the likelihood of finding the right compiler with the
+ # least number of compilation attempt).
+ # Beware that some tests are sensible to the order (for instance, we must
+ # look for MinGW before looking for GCC3).
+ # I used one compilation test per compiler with a #error to recognize
+ # each compiler so that it works even when cross-compiling (let me know
+ # if you know a better approach).
+ # Known missing tags (known from Boost's tools/build/v2/tools/common.jam):
+ # como, edg, kcc, bck, mp, sw, tru, xlc
+ # I'm not sure about my test for `il' (be careful: Intel's ICC pre-defines
+ # the same defines as GCC's).
+ for i in \
+ _BOOST_mingw_test(6, 3) \
+ _BOOST_gcc_test(6, 3) \
+ _BOOST_mingw_test(6, 2) \
+ _BOOST_gcc_test(6, 2) \
+ _BOOST_mingw_test(6, 1) \
+ _BOOST_gcc_test(6, 1) \
+ _BOOST_mingw_test(6, 0) \
+ _BOOST_gcc_test(6, 0) \
+ _BOOST_mingw_test(5, 4) \
+ _BOOST_gcc_test(5, 4) \
+ _BOOST_mingw_test(5, 3) \
+ _BOOST_gcc_test(5, 3) \
+ _BOOST_mingw_test(5, 2) \
+ _BOOST_gcc_test(5, 2) \
+ _BOOST_mingw_test(5, 1) \
+ _BOOST_gcc_test(5, 1) \
+ _BOOST_mingw_test(5, 0) \
+ _BOOST_gcc_test(5, 0) \
+ _BOOST_mingw_test(4, 10) \
+ _BOOST_gcc_test(4, 10) \
+ _BOOST_mingw_test(4, 9) \
+ _BOOST_gcc_test(4, 9) \
+ _BOOST_mingw_test(4, 8) \
+ _BOOST_gcc_test(4, 8) \
+ _BOOST_mingw_test(4, 7) \
+ _BOOST_gcc_test(4, 7) \
+ _BOOST_mingw_test(4, 6) \
+ _BOOST_gcc_test(4, 6) \
+ _BOOST_mingw_test(4, 5) \
+ _BOOST_gcc_test(4, 5) \
+ _BOOST_mingw_test(4, 4) \
+ _BOOST_gcc_test(4, 4) \
+ _BOOST_mingw_test(4, 3) \
+ _BOOST_gcc_test(4, 3) \
+ _BOOST_mingw_test(4, 2) \
+ _BOOST_gcc_test(4, 2) \
+ _BOOST_mingw_test(4, 1) \
+ _BOOST_gcc_test(4, 1) \
+ _BOOST_mingw_test(4, 0) \
+ _BOOST_gcc_test(4, 0) \
+ "defined __GNUC__ && __GNUC__ == 3 && !defined __ICC \
+ && (defined WIN32 || defined WINNT || defined _WIN32 || defined __WIN32 \
+ || defined __WIN32__ || defined __WINNT || defined __WINNT__) @ mgw" \
+ _BOOST_gcc_test(3, 4) \
+ _BOOST_gcc_test(3, 3) \
+ "defined _MSC_VER && _MSC_VER >= 1500 @ vc90" \
+ "defined _MSC_VER && _MSC_VER == 1400 @ vc80" \
+ _BOOST_gcc_test(3, 2) \
+ "defined _MSC_VER && _MSC_VER == 1310 @ vc71" \
+ _BOOST_gcc_test(3, 1) \
+ _BOOST_gcc_test(3, 0) \
+ "defined __BORLANDC__ @ bcb" \
+ "defined __ICC && (defined __unix || defined __unix__) @ il" \
+ "defined __ICL @ iw" \
+ "defined _MSC_VER && _MSC_VER == 1300 @ vc7" \
+ _BOOST_gcc_test(2, 95) \
+ "defined __MWERKS__ && __MWERKS__ <= 0x32FF @ cw9" \
+ "defined _MSC_VER && _MSC_VER < 1300 && !defined UNDER_CE @ vc6" \
+ "defined _MSC_VER && _MSC_VER < 1300 && defined UNDER_CE @ evc4" \
+ "defined __MWERKS__ && __MWERKS__ <= 0x31FF @ cw8"
+ do
+ boost_tag_test=`expr "X$i" : 'X\([[^@]]*\) @ '`
+ boost_tag=`expr "X$i" : 'X[[^@]]* @ \(.*\)'`
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#if $boost_tag_test
+/* OK */
+#else
+# error $boost_tag_test
+#endif
+]])], [boost_cv_lib_tag=$boost_tag; break], [])
+ done
+AC_LANG_POP([C++])dnl
+ case $boost_cv_lib_tag in #(
+ # Some newer (>= 1.35?) versions of Boost seem to only use "gcc" as opposed
+ # to "gcc41" for instance.
+ *-gcc | *'-gcc ') :;; #( Don't re-add -gcc: it's already in there.
+ gcc*)
+ boost_tag_x=
+ case $host_os in #(
+ darwin*)
+ if test $boost_major_version -ge 136; then
+ # The `x' added in r46793 of Boost.
+ boost_tag_x=x
+ fi;;
+ esac
+ # We can specify multiple tags in this variable because it's used by
+ # BOOST_FIND_LIB that does a `for tag in -$boost_cv_lib_tag' ...
+ boost_cv_lib_tag="$boost_tag_x$boost_cv_lib_tag -${boost_tag_x}gcc"
+ ;; #(
+ unknown)
+ AC_MSG_WARN([[could not figure out which toolset name to use for $CXX]])
+ boost_cv_lib_tag=
+ ;;
+ esac
+fi])dnl end of AC_CACHE_CHECK
+])# _BOOST_FIND_COMPILER_TAG
+
+
+# _BOOST_GUESS_WHETHER_TO_USE_MT()
+# --------------------------------
+# Compile a small test to try to guess whether we should favor MT (Multi
+# Thread) flavors of Boost. Sets boost_guess_use_mt accordingly.
+AC_DEFUN([_BOOST_GUESS_WHETHER_TO_USE_MT],
+[# Check whether we do better use `mt' even though we weren't ask to.
+AC_LANG_PUSH([C++])dnl
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#if defined _REENTRANT || defined _MT || defined __MT__
+/* use -mt */
+#else
+# error MT not needed
+#endif
+]])], [boost_guess_use_mt=:], [boost_guess_use_mt=false])
+AC_LANG_POP([C++])dnl
+])
+
+# _BOOST_AC_LINK_IFELSE(PROGRAM, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
+# -------------------------------------------------------------------
+# Fork of _AC_LINK_IFELSE that preserves conftest.o across calls. Fragile,
+# will break when Autoconf changes its internals. Requires that you manually
+# rm -f conftest.$ac_objext in between to really different tests, otherwise
+# you will try to link a conftest.o left behind by a previous test.
+# Used to aggressively optimize BOOST_FIND_LIB (see the big comment in this
+# macro).
+#
+# Don't use "break" in the actions, as it would short-circuit some code
+# this macro runs after the actions.
+m4_define([_BOOST_AC_LINK_IFELSE],
+[m4_ifvaln([$1], [AC_LANG_CONFTEST([$1])])dnl
+rm -f conftest$ac_exeext
+boost_save_ac_ext=$ac_ext
+boost_use_source=:
+# If we already have a .o, re-use it. We change $ac_ext so that $ac_link
+# tries to link the existing object file instead of compiling from source.
+test -f conftest.$ac_objext && ac_ext=$ac_objext && boost_use_source=false &&
+ _AS_ECHO_LOG([re-using the existing conftest.$ac_objext])
+AS_IF([_AC_DO_STDERR($ac_link) && {
+ test -z "$ac_[]_AC_LANG_ABBREV[]_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_executable_p conftest$ac_exeext
+dnl FIXME: use AS_TEST_X instead when 2.61 is widespread enough.
+ }],
+ [$2],
+ [if $boost_use_source; then
+ _AC_MSG_LOG_CONFTEST
+ fi
+ $3])
+ac_objext=$boost_save_ac_objext
+ac_ext=$boost_save_ac_ext
+dnl Delete also the IPA/IPO (Inter Procedural Analysis/Optimization)
+dnl information created by the PGI compiler (conftest_ipa8_conftest.oo),
+dnl as it would interfere with the next link command.
+rm -f core conftest.err conftest_ipa8_conftest.oo \
+ conftest$ac_exeext m4_ifval([$1], [conftest.$ac_ext])[]dnl
+])# _BOOST_AC_LINK_IFELSE
+
+# Local Variables:
+# mode: autoconf
+# End:
diff --git a/m4/libtool.m4 b/m4/libtool.m4
new file mode 100644
index 0000000..c4c0294
--- /dev/null
+++ b/m4/libtool.m4
@@ -0,0 +1,8394 @@
+# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
+#
+# Copyright (C) 1996-2001, 2003-2015 Free Software Foundation, Inc.
+# Written by Gordon Matzigkeit, 1996
+#
+# This file is free software; the Free Software Foundation gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved.
+
+m4_define([_LT_COPYING], [dnl
+# Copyright (C) 2014 Free Software Foundation, Inc.
+# This is free software; see the source for copying conditions. There is NO
+# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+# GNU Libtool is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of of the License, or
+# (at your option) any later version.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program or library that is built
+# using GNU Libtool, you may include this file under the same
+# distribution terms that you use for the rest of that program.
+#
+# GNU Libtool is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+])
+
+# serial 58 LT_INIT
+
+
+# LT_PREREQ(VERSION)
+# ------------------
+# Complain and exit if this libtool version is less that VERSION.
+m4_defun([LT_PREREQ],
+[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
+ [m4_default([$3],
+ [m4_fatal([Libtool version $1 or higher is required],
+ 63)])],
+ [$2])])
+
+
+# _LT_CHECK_BUILDDIR
+# ------------------
+# Complain if the absolute build directory name contains unusual characters
+m4_defun([_LT_CHECK_BUILDDIR],
+[case `pwd` in
+ *\ * | *\ *)
+ AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
+esac
+])
+
+
+# LT_INIT([OPTIONS])
+# ------------------
+AC_DEFUN([LT_INIT],
+[AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK
+AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
+AC_BEFORE([$0], [LT_LANG])dnl
+AC_BEFORE([$0], [LT_OUTPUT])dnl
+AC_BEFORE([$0], [LTDL_INIT])dnl
+m4_require([_LT_CHECK_BUILDDIR])dnl
+
+dnl Autoconf doesn't catch unexpanded LT_ macros by default:
+m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
+m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
+dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
+dnl unless we require an AC_DEFUNed macro:
+AC_REQUIRE([LTOPTIONS_VERSION])dnl
+AC_REQUIRE([LTSUGAR_VERSION])dnl
+AC_REQUIRE([LTVERSION_VERSION])dnl
+AC_REQUIRE([LTOBSOLETE_VERSION])dnl
+m4_require([_LT_PROG_LTMAIN])dnl
+
+_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
+
+dnl Parse OPTIONS
+_LT_SET_OPTIONS([$0], [$1])
+
+# This can be used to rebuild libtool when needed
+LIBTOOL_DEPS=$ltmain
+
+# Always use our own libtool.
+LIBTOOL='$(SHELL) $(top_builddir)/libtool'
+AC_SUBST(LIBTOOL)dnl
+
+_LT_SETUP
+
+# Only expand once:
+m4_define([LT_INIT])
+])# LT_INIT
+
+# Old names:
+AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
+AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
+dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
+
+
+# _LT_PREPARE_CC_BASENAME
+# -----------------------
+m4_defun([_LT_PREPARE_CC_BASENAME], [
+# Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
+func_cc_basename ()
+{
+ for cc_temp in @S|@*""; do
+ case $cc_temp in
+ compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
+ distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
+ \-*) ;;
+ *) break;;
+ esac
+ done
+ func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
+}
+])# _LT_PREPARE_CC_BASENAME
+
+
+# _LT_CC_BASENAME(CC)
+# -------------------
+# It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME,
+# but that macro is also expanded into generated libtool script, which
+# arranges for $SED and $ECHO to be set by different means.
+m4_defun([_LT_CC_BASENAME],
+[m4_require([_LT_PREPARE_CC_BASENAME])dnl
+AC_REQUIRE([_LT_DECL_SED])dnl
+AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
+func_cc_basename $1
+cc_basename=$func_cc_basename_result
+])
+
+
+# _LT_FILEUTILS_DEFAULTS
+# ----------------------
+# It is okay to use these file commands and assume they have been set
+# sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'.
+m4_defun([_LT_FILEUTILS_DEFAULTS],
+[: ${CP="cp -f"}
+: ${MV="mv -f"}
+: ${RM="rm -f"}
+])# _LT_FILEUTILS_DEFAULTS
+
+
+# _LT_SETUP
+# ---------
+m4_defun([_LT_SETUP],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+AC_REQUIRE([AC_CANONICAL_BUILD])dnl
+AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
+AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
+
+_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl
+dnl
+_LT_DECL([], [host_alias], [0], [The host system])dnl
+_LT_DECL([], [host], [0])dnl
+_LT_DECL([], [host_os], [0])dnl
+dnl
+_LT_DECL([], [build_alias], [0], [The build system])dnl
+_LT_DECL([], [build], [0])dnl
+_LT_DECL([], [build_os], [0])dnl
+dnl
+AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([LT_PATH_LD])dnl
+AC_REQUIRE([LT_PATH_NM])dnl
+dnl
+AC_REQUIRE([AC_PROG_LN_S])dnl
+test -z "$LN_S" && LN_S="ln -s"
+_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
+dnl
+AC_REQUIRE([LT_CMD_MAX_LEN])dnl
+_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
+_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
+dnl
+m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_CHECK_SHELL_FEATURES])dnl
+m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
+m4_require([_LT_CMD_RELOAD])dnl
+m4_require([_LT_CHECK_MAGIC_METHOD])dnl
+m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
+m4_require([_LT_CMD_OLD_ARCHIVE])dnl
+m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
+m4_require([_LT_WITH_SYSROOT])dnl
+m4_require([_LT_CMD_TRUNCATE])dnl
+
+_LT_CONFIG_LIBTOOL_INIT([
+# See if we are running on zsh, and set the options that allow our
+# commands through without removal of \ escapes INIT.
+if test -n "\${ZSH_VERSION+set}"; then
+ setopt NO_GLOB_SUBST
+fi
+])
+if test -n "${ZSH_VERSION+set}"; then
+ setopt NO_GLOB_SUBST
+fi
+
+_LT_CHECK_OBJDIR
+
+m4_require([_LT_TAG_COMPILER])dnl
+
+case $host_os in
+aix3*)
+ # AIX sometimes has problems with the GCC collect2 program. For some
+ # reason, if we set the COLLECT_NAMES environment variable, the problems
+ # vanish in a puff of smoke.
+ if test set != "${COLLECT_NAMES+set}"; then
+ COLLECT_NAMES=
+ export COLLECT_NAMES
+ fi
+ ;;
+esac
+
+# Global variables:
+ofile=libtool
+can_build_shared=yes
+
+# All known linkers require a '.a' archive for static linking (except MSVC,
+# which needs '.lib').
+libext=a
+
+with_gnu_ld=$lt_cv_prog_gnu_ld
+
+old_CC=$CC
+old_CFLAGS=$CFLAGS
+
+# Set sane defaults for various variables
+test -z "$CC" && CC=cc
+test -z "$LTCC" && LTCC=$CC
+test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
+test -z "$LD" && LD=ld
+test -z "$ac_objext" && ac_objext=o
+
+_LT_CC_BASENAME([$compiler])
+
+# Only perform the check for file, if the check method requires it
+test -z "$MAGIC_CMD" && MAGIC_CMD=file
+case $deplibs_check_method in
+file_magic*)
+ if test "$file_magic_cmd" = '$MAGIC_CMD'; then
+ _LT_PATH_MAGIC
+ fi
+ ;;
+esac
+
+# Use C for the default configuration in the libtool script
+LT_SUPPORTED_TAG([CC])
+_LT_LANG_C_CONFIG
+_LT_LANG_DEFAULT_CONFIG
+_LT_CONFIG_COMMANDS
+])# _LT_SETUP
+
+
+# _LT_PREPARE_SED_QUOTE_VARS
+# --------------------------
+# Define a few sed substitution that help us do robust quoting.
+m4_defun([_LT_PREPARE_SED_QUOTE_VARS],
+[# Backslashify metacharacters that are still active within
+# double-quoted strings.
+sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
+
+# Same as above, but do not quote variable references.
+double_quote_subst='s/\([["`\\]]\)/\\\1/g'
+
+# Sed substitution to delay expansion of an escaped shell variable in a
+# double_quote_subst'ed string.
+delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
+
+# Sed substitution to delay expansion of an escaped single quote.
+delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
+
+# Sed substitution to avoid accidental globbing in evaled expressions
+no_glob_subst='s/\*/\\\*/g'
+])
+
+# _LT_PROG_LTMAIN
+# ---------------
+# Note that this code is called both from 'configure', and 'config.status'
+# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably,
+# 'config.status' has no value for ac_aux_dir unless we are using Automake,
+# so we pass a copy along to make sure it has a sensible value anyway.
+m4_defun([_LT_PROG_LTMAIN],
+[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
+_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
+ltmain=$ac_aux_dir/ltmain.sh
+])# _LT_PROG_LTMAIN
+
+
+## ------------------------------------- ##
+## Accumulate code for creating libtool. ##
+## ------------------------------------- ##
+
+# So that we can recreate a full libtool script including additional
+# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
+# in macros and then make a single call at the end using the 'libtool'
+# label.
+
+
+# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
+# ----------------------------------------
+# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
+m4_define([_LT_CONFIG_LIBTOOL_INIT],
+[m4_ifval([$1],
+ [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
+ [$1
+])])])
+
+# Initialize.
+m4_define([_LT_OUTPUT_LIBTOOL_INIT])
+
+
+# _LT_CONFIG_LIBTOOL([COMMANDS])
+# ------------------------------
+# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
+m4_define([_LT_CONFIG_LIBTOOL],
+[m4_ifval([$1],
+ [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
+ [$1
+])])])
+
+# Initialize.
+m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
+
+
+# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
+# -----------------------------------------------------
+m4_defun([_LT_CONFIG_SAVE_COMMANDS],
+[_LT_CONFIG_LIBTOOL([$1])
+_LT_CONFIG_LIBTOOL_INIT([$2])
+])
+
+
+# _LT_FORMAT_COMMENT([COMMENT])
+# -----------------------------
+# Add leading comment marks to the start of each line, and a trailing
+# full-stop to the whole comment if one is not present already.
+m4_define([_LT_FORMAT_COMMENT],
+[m4_ifval([$1], [
+m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
+ [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
+)])
+
+
+
+## ------------------------ ##
+## FIXME: Eliminate VARNAME ##
+## ------------------------ ##
+
+
+# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
+# -------------------------------------------------------------------
+# CONFIGNAME is the name given to the value in the libtool script.
+# VARNAME is the (base) name used in the configure script.
+# VALUE may be 0, 1 or 2 for a computed quote escaped value based on
+# VARNAME. Any other value will be used directly.
+m4_define([_LT_DECL],
+[lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
+ [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
+ [m4_ifval([$1], [$1], [$2])])
+ lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
+ m4_ifval([$4],
+ [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
+ lt_dict_add_subkey([lt_decl_dict], [$2],
+ [tagged?], [m4_ifval([$5], [yes], [no])])])
+])
+
+
+# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
+# --------------------------------------------------------
+m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
+
+
+# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
+# ------------------------------------------------
+m4_define([lt_decl_tag_varnames],
+[_lt_decl_filter([tagged?], [yes], $@)])
+
+
+# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
+# ---------------------------------------------------------
+m4_define([_lt_decl_filter],
+[m4_case([$#],
+ [0], [m4_fatal([$0: too few arguments: $#])],
+ [1], [m4_fatal([$0: too few arguments: $#: $1])],
+ [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
+ [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
+ [lt_dict_filter([lt_decl_dict], $@)])[]dnl
+])
+
+
+# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
+# --------------------------------------------------
+m4_define([lt_decl_quote_varnames],
+[_lt_decl_filter([value], [1], $@)])
+
+
+# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
+# ---------------------------------------------------
+m4_define([lt_decl_dquote_varnames],
+[_lt_decl_filter([value], [2], $@)])
+
+
+# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
+# ---------------------------------------------------
+m4_define([lt_decl_varnames_tagged],
+[m4_assert([$# <= 2])dnl
+_$0(m4_quote(m4_default([$1], [[, ]])),
+ m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
+ m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
+m4_define([_lt_decl_varnames_tagged],
+[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
+
+
+# lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
+# ------------------------------------------------
+m4_define([lt_decl_all_varnames],
+[_$0(m4_quote(m4_default([$1], [[, ]])),
+ m4_if([$2], [],
+ m4_quote(lt_decl_varnames),
+ m4_quote(m4_shift($@))))[]dnl
+])
+m4_define([_lt_decl_all_varnames],
+[lt_join($@, lt_decl_varnames_tagged([$1],
+ lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
+])
+
+
+# _LT_CONFIG_STATUS_DECLARE([VARNAME])
+# ------------------------------------
+# Quote a variable value, and forward it to 'config.status' so that its
+# declaration there will have the same value as in 'configure'. VARNAME
+# must have a single quote delimited value for this to work.
+m4_define([_LT_CONFIG_STATUS_DECLARE],
+[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
+
+
+# _LT_CONFIG_STATUS_DECLARATIONS
+# ------------------------------
+# We delimit libtool config variables with single quotes, so when
+# we write them to config.status, we have to be sure to quote all
+# embedded single quotes properly. In configure, this macro expands
+# each variable declared with _LT_DECL (and _LT_TAGDECL) into:
+#
+# <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
+m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
+[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
+ [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
+
+
+# _LT_LIBTOOL_TAGS
+# ----------------
+# Output comment and list of tags supported by the script
+m4_defun([_LT_LIBTOOL_TAGS],
+[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
+available_tags='_LT_TAGS'dnl
+])
+
+
+# _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
+# -----------------------------------
+# Extract the dictionary values for VARNAME (optionally with TAG) and
+# expand to a commented shell variable setting:
+#
+# # Some comment about what VAR is for.
+# visible_name=$lt_internal_name
+m4_define([_LT_LIBTOOL_DECLARE],
+[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
+ [description])))[]dnl
+m4_pushdef([_libtool_name],
+ m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
+m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
+ [0], [_libtool_name=[$]$1],
+ [1], [_libtool_name=$lt_[]$1],
+ [2], [_libtool_name=$lt_[]$1],
+ [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
+m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
+])
+
+
+# _LT_LIBTOOL_CONFIG_VARS
+# -----------------------
+# Produce commented declarations of non-tagged libtool config variables
+# suitable for insertion in the LIBTOOL CONFIG section of the 'libtool'
+# script. Tagged libtool config variables (even for the LIBTOOL CONFIG
+# section) are produced by _LT_LIBTOOL_TAG_VARS.
+m4_defun([_LT_LIBTOOL_CONFIG_VARS],
+[m4_foreach([_lt_var],
+ m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
+ [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
+
+
+# _LT_LIBTOOL_TAG_VARS(TAG)
+# -------------------------
+m4_define([_LT_LIBTOOL_TAG_VARS],
+[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
+ [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
+
+
+# _LT_TAGVAR(VARNAME, [TAGNAME])
+# ------------------------------
+m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
+
+
+# _LT_CONFIG_COMMANDS
+# -------------------
+# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of
+# variables for single and double quote escaping we saved from calls
+# to _LT_DECL, we can put quote escaped variables declarations
+# into 'config.status', and then the shell code to quote escape them in
+# for loops in 'config.status'. Finally, any additional code accumulated
+# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
+m4_defun([_LT_CONFIG_COMMANDS],
+[AC_PROVIDE_IFELSE([LT_OUTPUT],
+ dnl If the libtool generation code has been placed in $CONFIG_LT,
+ dnl instead of duplicating it all over again into config.status,
+ dnl then we will have config.status run $CONFIG_LT later, so it
+ dnl needs to know what name is stored there:
+ [AC_CONFIG_COMMANDS([libtool],
+ [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
+ dnl If the libtool generation code is destined for config.status,
+ dnl expand the accumulated commands and init code now:
+ [AC_CONFIG_COMMANDS([libtool],
+ [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
+])#_LT_CONFIG_COMMANDS
+
+
+# Initialize.
+m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
+[
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+sed_quote_subst='$sed_quote_subst'
+double_quote_subst='$double_quote_subst'
+delay_variable_subst='$delay_variable_subst'
+_LT_CONFIG_STATUS_DECLARATIONS
+LTCC='$LTCC'
+LTCFLAGS='$LTCFLAGS'
+compiler='$compiler_DEFAULT'
+
+# A function that is used when there is no print builtin or printf.
+func_fallback_echo ()
+{
+ eval 'cat <<_LTECHO_EOF
+\$[]1
+_LTECHO_EOF'
+}
+
+# Quote evaled strings.
+for var in lt_decl_all_varnames([[ \
+]], lt_decl_quote_varnames); do
+ case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
+ *[[\\\\\\\`\\"\\\$]]*)
+ eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
+ ;;
+ *)
+ eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
+ ;;
+ esac
+done
+
+# Double-quote double-evaled strings.
+for var in lt_decl_all_varnames([[ \
+]], lt_decl_dquote_varnames); do
+ case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
+ *[[\\\\\\\`\\"\\\$]]*)
+ eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
+ ;;
+ *)
+ eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
+ ;;
+ esac
+done
+
+_LT_OUTPUT_LIBTOOL_INIT
+])
+
+# _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
+# ------------------------------------
+# Generate a child script FILE with all initialization necessary to
+# reuse the environment learned by the parent script, and make the
+# file executable. If COMMENT is supplied, it is inserted after the
+# '#!' sequence but before initialization text begins. After this
+# macro, additional text can be appended to FILE to form the body of
+# the child script. The macro ends with non-zero status if the
+# file could not be fully written (such as if the disk is full).
+m4_ifdef([AS_INIT_GENERATED],
+[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
+[m4_defun([_LT_GENERATED_FILE_INIT],
+[m4_require([AS_PREPARE])]dnl
+[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
+[lt_write_fail=0
+cat >$1 <<_ASEOF || lt_write_fail=1
+#! $SHELL
+# Generated by $as_me.
+$2
+SHELL=\${CONFIG_SHELL-$SHELL}
+export SHELL
+_ASEOF
+cat >>$1 <<\_ASEOF || lt_write_fail=1
+AS_SHELL_SANITIZE
+_AS_PREPARE
+exec AS_MESSAGE_FD>&1
+_ASEOF
+test 0 = "$lt_write_fail" && chmod +x $1[]dnl
+m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
+
+# LT_OUTPUT
+# ---------
+# This macro allows early generation of the libtool script (before
+# AC_OUTPUT is called), incase it is used in configure for compilation
+# tests.
+AC_DEFUN([LT_OUTPUT],
+[: ${CONFIG_LT=./config.lt}
+AC_MSG_NOTICE([creating $CONFIG_LT])
+_LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
+[# Run this file to recreate a libtool stub with the current configuration.])
+
+cat >>"$CONFIG_LT" <<\_LTEOF
+lt_cl_silent=false
+exec AS_MESSAGE_LOG_FD>>config.log
+{
+ echo
+ AS_BOX([Running $as_me.])
+} >&AS_MESSAGE_LOG_FD
+
+lt_cl_help="\
+'$as_me' creates a local libtool stub from the current configuration,
+for use in further configure time tests before the real libtool is
+generated.
+
+Usage: $[0] [[OPTIONS]]
+
+ -h, --help print this help, then exit
+ -V, --version print version number, then exit
+ -q, --quiet do not print progress messages
+ -d, --debug don't remove temporary files
+
+Report bugs to <bug-libtool@gnu.org>."
+
+lt_cl_version="\
+m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
+m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
+configured by $[0], generated by m4_PACKAGE_STRING.
+
+Copyright (C) 2011 Free Software Foundation, Inc.
+This config.lt script is free software; the Free Software Foundation
+gives unlimited permision to copy, distribute and modify it."
+
+while test 0 != $[#]
+do
+ case $[1] in
+ --version | --v* | -V )
+ echo "$lt_cl_version"; exit 0 ;;
+ --help | --h* | -h )
+ echo "$lt_cl_help"; exit 0 ;;
+ --debug | --d* | -d )
+ debug=: ;;
+ --quiet | --q* | --silent | --s* | -q )
+ lt_cl_silent=: ;;
+
+ -*) AC_MSG_ERROR([unrecognized option: $[1]
+Try '$[0] --help' for more information.]) ;;
+
+ *) AC_MSG_ERROR([unrecognized argument: $[1]
+Try '$[0] --help' for more information.]) ;;
+ esac
+ shift
+done
+
+if $lt_cl_silent; then
+ exec AS_MESSAGE_FD>/dev/null
+fi
+_LTEOF
+
+cat >>"$CONFIG_LT" <<_LTEOF
+_LT_OUTPUT_LIBTOOL_COMMANDS_INIT
+_LTEOF
+
+cat >>"$CONFIG_LT" <<\_LTEOF
+AC_MSG_NOTICE([creating $ofile])
+_LT_OUTPUT_LIBTOOL_COMMANDS
+AS_EXIT(0)
+_LTEOF
+chmod +x "$CONFIG_LT"
+
+# configure is writing to config.log, but config.lt does its own redirection,
+# appending to config.log, which fails on DOS, as config.log is still kept
+# open by configure. Here we exec the FD to /dev/null, effectively closing
+# config.log, so it can be properly (re)opened and appended to by config.lt.
+lt_cl_success=:
+test yes = "$silent" &&
+ lt_config_lt_args="$lt_config_lt_args --quiet"
+exec AS_MESSAGE_LOG_FD>/dev/null
+$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
+exec AS_MESSAGE_LOG_FD>>config.log
+$lt_cl_success || AS_EXIT(1)
+])# LT_OUTPUT
+
+
+# _LT_CONFIG(TAG)
+# ---------------
+# If TAG is the built-in tag, create an initial libtool script with a
+# default configuration from the untagged config vars. Otherwise add code
+# to config.status for appending the configuration named by TAG from the
+# matching tagged config vars.
+m4_defun([_LT_CONFIG],
+[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+_LT_CONFIG_SAVE_COMMANDS([
+ m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
+ m4_if(_LT_TAG, [C], [
+ # See if we are running on zsh, and set the options that allow our
+ # commands through without removal of \ escapes.
+ if test -n "${ZSH_VERSION+set}"; then
+ setopt NO_GLOB_SUBST
+ fi
+
+ cfgfile=${ofile}T
+ trap "$RM \"$cfgfile\"; exit 1" 1 2 15
+ $RM "$cfgfile"
+
+ cat <<_LT_EOF >> "$cfgfile"
+#! $SHELL
+# Generated automatically by $as_me ($PACKAGE) $VERSION
+# NOTE: Changes made to this file will be lost: look at ltmain.sh.
+
+# Provide generalized library-building support services.
+# Written by Gordon Matzigkeit, 1996
+
+_LT_COPYING
+_LT_LIBTOOL_TAGS
+
+# Configured defaults for sys_lib_dlsearch_path munging.
+: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"}
+
+# ### BEGIN LIBTOOL CONFIG
+_LT_LIBTOOL_CONFIG_VARS
+_LT_LIBTOOL_TAG_VARS
+# ### END LIBTOOL CONFIG
+
+_LT_EOF
+
+ cat <<'_LT_EOF' >> "$cfgfile"
+
+# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE
+
+_LT_PREPARE_MUNGE_PATH_LIST
+_LT_PREPARE_CC_BASENAME
+
+# ### END FUNCTIONS SHARED WITH CONFIGURE
+
+_LT_EOF
+
+ case $host_os in
+ aix3*)
+ cat <<\_LT_EOF >> "$cfgfile"
+# AIX sometimes has problems with the GCC collect2 program. For some
+# reason, if we set the COLLECT_NAMES environment variable, the problems
+# vanish in a puff of smoke.
+if test set != "${COLLECT_NAMES+set}"; then
+ COLLECT_NAMES=
+ export COLLECT_NAMES
+fi
+_LT_EOF
+ ;;
+ esac
+
+ _LT_PROG_LTMAIN
+
+ # We use sed instead of cat because bash on DJGPP gets confused if
+ # if finds mixed CR/LF and LF-only lines. Since sed operates in
+ # text mode, it properly converts lines to CR/LF. This bash problem
+ # is reportedly fixed, but why not run on old versions too?
+ sed '$q' "$ltmain" >> "$cfgfile" \
+ || (rm -f "$cfgfile"; exit 1)
+
+ mv -f "$cfgfile" "$ofile" ||
+ (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
+ chmod +x "$ofile"
+],
+[cat <<_LT_EOF >> "$ofile"
+
+dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
+dnl in a comment (ie after a #).
+# ### BEGIN LIBTOOL TAG CONFIG: $1
+_LT_LIBTOOL_TAG_VARS(_LT_TAG)
+# ### END LIBTOOL TAG CONFIG: $1
+_LT_EOF
+])dnl /m4_if
+],
+[m4_if([$1], [], [
+ PACKAGE='$PACKAGE'
+ VERSION='$VERSION'
+ RM='$RM'
+ ofile='$ofile'], [])
+])dnl /_LT_CONFIG_SAVE_COMMANDS
+])# _LT_CONFIG
+
+
+# LT_SUPPORTED_TAG(TAG)
+# ---------------------
+# Trace this macro to discover what tags are supported by the libtool
+# --tag option, using:
+# autoconf --trace 'LT_SUPPORTED_TAG:$1'
+AC_DEFUN([LT_SUPPORTED_TAG], [])
+
+
+# C support is built-in for now
+m4_define([_LT_LANG_C_enabled], [])
+m4_define([_LT_TAGS], [])
+
+
+# LT_LANG(LANG)
+# -------------
+# Enable libtool support for the given language if not already enabled.
+AC_DEFUN([LT_LANG],
+[AC_BEFORE([$0], [LT_OUTPUT])dnl
+m4_case([$1],
+ [C], [_LT_LANG(C)],
+ [C++], [_LT_LANG(CXX)],
+ [Go], [_LT_LANG(GO)],
+ [Java], [_LT_LANG(GCJ)],
+ [Fortran 77], [_LT_LANG(F77)],
+ [Fortran], [_LT_LANG(FC)],
+ [Windows Resource], [_LT_LANG(RC)],
+ [m4_ifdef([_LT_LANG_]$1[_CONFIG],
+ [_LT_LANG($1)],
+ [m4_fatal([$0: unsupported language: "$1"])])])dnl
+])# LT_LANG
+
+
+# _LT_LANG(LANGNAME)
+# ------------------
+m4_defun([_LT_LANG],
+[m4_ifdef([_LT_LANG_]$1[_enabled], [],
+ [LT_SUPPORTED_TAG([$1])dnl
+ m4_append([_LT_TAGS], [$1 ])dnl
+ m4_define([_LT_LANG_]$1[_enabled], [])dnl
+ _LT_LANG_$1_CONFIG($1)])dnl
+])# _LT_LANG
+
+
+m4_ifndef([AC_PROG_GO], [
+############################################################
+# NOTE: This macro has been submitted for inclusion into #
+# GNU Autoconf as AC_PROG_GO. When it is available in #
+# a released version of Autoconf we should remove this #
+# macro and use it instead. #
+############################################################
+m4_defun([AC_PROG_GO],
+[AC_LANG_PUSH(Go)dnl
+AC_ARG_VAR([GOC], [Go compiler command])dnl
+AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl
+_AC_ARG_VAR_LDFLAGS()dnl
+AC_CHECK_TOOL(GOC, gccgo)
+if test -z "$GOC"; then
+ if test -n "$ac_tool_prefix"; then
+ AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo])
+ fi
+fi
+if test -z "$GOC"; then
+ AC_CHECK_PROG(GOC, gccgo, gccgo, false)
+fi
+])#m4_defun
+])#m4_ifndef
+
+
+# _LT_LANG_DEFAULT_CONFIG
+# -----------------------
+m4_defun([_LT_LANG_DEFAULT_CONFIG],
+[AC_PROVIDE_IFELSE([AC_PROG_CXX],
+ [LT_LANG(CXX)],
+ [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
+
+AC_PROVIDE_IFELSE([AC_PROG_F77],
+ [LT_LANG(F77)],
+ [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
+
+AC_PROVIDE_IFELSE([AC_PROG_FC],
+ [LT_LANG(FC)],
+ [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
+
+dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
+dnl pulling things in needlessly.
+AC_PROVIDE_IFELSE([AC_PROG_GCJ],
+ [LT_LANG(GCJ)],
+ [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
+ [LT_LANG(GCJ)],
+ [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
+ [LT_LANG(GCJ)],
+ [m4_ifdef([AC_PROG_GCJ],
+ [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
+ m4_ifdef([A][M_PROG_GCJ],
+ [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
+ m4_ifdef([LT_PROG_GCJ],
+ [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
+
+AC_PROVIDE_IFELSE([AC_PROG_GO],
+ [LT_LANG(GO)],
+ [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])])
+
+AC_PROVIDE_IFELSE([LT_PROG_RC],
+ [LT_LANG(RC)],
+ [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
+])# _LT_LANG_DEFAULT_CONFIG
+
+# Obsolete macros:
+AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
+AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
+AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
+AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
+AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
+dnl AC_DEFUN([AC_LIBTOOL_F77], [])
+dnl AC_DEFUN([AC_LIBTOOL_FC], [])
+dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
+dnl AC_DEFUN([AC_LIBTOOL_RC], [])
+
+
+# _LT_TAG_COMPILER
+# ----------------
+m4_defun([_LT_TAG_COMPILER],
+[AC_REQUIRE([AC_PROG_CC])dnl
+
+_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
+_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
+_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
+_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
+
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
+
+# If no C compiler flags were specified, use CFLAGS.
+LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
+
+# Allow CC to be a program name with arguments.
+compiler=$CC
+])# _LT_TAG_COMPILER
+
+
+# _LT_COMPILER_BOILERPLATE
+# ------------------------
+# Check for compiler boilerplate output or warnings with
+# the simple compiler test code.
+m4_defun([_LT_COMPILER_BOILERPLATE],
+[m4_require([_LT_DECL_SED])dnl
+ac_outfile=conftest.$ac_objext
+echo "$lt_simple_compile_test_code" >conftest.$ac_ext
+eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_compiler_boilerplate=`cat conftest.err`
+$RM conftest*
+])# _LT_COMPILER_BOILERPLATE
+
+
+# _LT_LINKER_BOILERPLATE
+# ----------------------
+# Check for linker boilerplate output or warnings with
+# the simple link test code.
+m4_defun([_LT_LINKER_BOILERPLATE],
+[m4_require([_LT_DECL_SED])dnl
+ac_outfile=conftest.$ac_objext
+echo "$lt_simple_link_test_code" >conftest.$ac_ext
+eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_linker_boilerplate=`cat conftest.err`
+$RM -r conftest*
+])# _LT_LINKER_BOILERPLATE
+
+# _LT_REQUIRED_DARWIN_CHECKS
+# -------------------------
+m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
+ case $host_os in
+ rhapsody* | darwin*)
+ AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
+ AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
+ AC_CHECK_TOOL([LIPO], [lipo], [:])
+ AC_CHECK_TOOL([OTOOL], [otool], [:])
+ AC_CHECK_TOOL([OTOOL64], [otool64], [:])
+ _LT_DECL([], [DSYMUTIL], [1],
+ [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
+ _LT_DECL([], [NMEDIT], [1],
+ [Tool to change global to local symbols on Mac OS X])
+ _LT_DECL([], [LIPO], [1],
+ [Tool to manipulate fat objects and archives on Mac OS X])
+ _LT_DECL([], [OTOOL], [1],
+ [ldd/readelf like tool for Mach-O binaries on Mac OS X])
+ _LT_DECL([], [OTOOL64], [1],
+ [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
+
+ AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
+ [lt_cv_apple_cc_single_mod=no
+ if test -z "$LT_MULTI_MODULE"; then
+ # By default we will add the -single_module flag. You can override
+ # by either setting the environment variable LT_MULTI_MODULE
+ # non-empty at configure time, or by adding -multi_module to the
+ # link flags.
+ rm -rf libconftest.dylib*
+ echo "int foo(void){return 1;}" > conftest.c
+ echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
+-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
+ $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
+ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
+ _lt_result=$?
+ # If there is a non-empty error log, and "single_module"
+ # appears in it, assume the flag caused a linker warning
+ if test -s conftest.err && $GREP single_module conftest.err; then
+ cat conftest.err >&AS_MESSAGE_LOG_FD
+ # Otherwise, if the output was created with a 0 exit code from
+ # the compiler, it worked.
+ elif test -f libconftest.dylib && test 0 = "$_lt_result"; then
+ lt_cv_apple_cc_single_mod=yes
+ else
+ cat conftest.err >&AS_MESSAGE_LOG_FD
+ fi
+ rm -rf libconftest.dylib*
+ rm -f conftest.*
+ fi])
+
+ AC_CACHE_CHECK([for -exported_symbols_list linker flag],
+ [lt_cv_ld_exported_symbols_list],
+ [lt_cv_ld_exported_symbols_list=no
+ save_LDFLAGS=$LDFLAGS
+ echo "_main" > conftest.sym
+ LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
+ [lt_cv_ld_exported_symbols_list=yes],
+ [lt_cv_ld_exported_symbols_list=no])
+ LDFLAGS=$save_LDFLAGS
+ ])
+
+ AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
+ [lt_cv_ld_force_load=no
+ cat > conftest.c << _LT_EOF
+int forced_loaded() { return 2;}
+_LT_EOF
+ echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
+ $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
+ echo "$AR cr libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
+ $AR cr libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
+ echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
+ $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
+ cat > conftest.c << _LT_EOF
+int main() { return 0;}
+_LT_EOF
+ echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
+ $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
+ _lt_result=$?
+ if test -s conftest.err && $GREP force_load conftest.err; then
+ cat conftest.err >&AS_MESSAGE_LOG_FD
+ elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then
+ lt_cv_ld_force_load=yes
+ else
+ cat conftest.err >&AS_MESSAGE_LOG_FD
+ fi
+ rm -f conftest.err libconftest.a conftest conftest.c
+ rm -rf conftest.dSYM
+ ])
+ case $host_os in
+ rhapsody* | darwin1.[[012]])
+ _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;;
+ darwin1.*)
+ _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
+ darwin*) # darwin 5.x on
+ # if running on 10.5 or later, the deployment target defaults
+ # to the OS version, if on x86, and 10.4, the deployment
+ # target defaults to 10.4. Don't you love it?
+ case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
+ 10.0,*86*-darwin8*|10.0,*-darwin[[912]]*)
+ _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
+ 10.[[012]][[,.]]*)
+ _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
+ 10.*|11.*)
+ _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
+ esac
+ ;;
+ esac
+ if test yes = "$lt_cv_apple_cc_single_mod"; then
+ _lt_dar_single_mod='$single_module'
+ fi
+ if test yes = "$lt_cv_ld_exported_symbols_list"; then
+ _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym'
+ else
+ _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib'
+ fi
+ if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then
+ _lt_dsymutil='~$DSYMUTIL $lib || :'
+ else
+ _lt_dsymutil=
+ fi
+ ;;
+ esac
+])
+
+
+# _LT_DARWIN_LINKER_FEATURES([TAG])
+# ---------------------------------
+# Checks for linker and compiler features on darwin
+m4_defun([_LT_DARWIN_LINKER_FEATURES],
+[
+ m4_require([_LT_REQUIRED_DARWIN_CHECKS])
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+ _LT_TAGVAR(hardcode_direct, $1)=no
+ _LT_TAGVAR(hardcode_automatic, $1)=yes
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
+ if test yes = "$lt_cv_ld_force_load"; then
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
+ m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes],
+ [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes])
+ else
+ _LT_TAGVAR(whole_archive_flag_spec, $1)=''
+ fi
+ _LT_TAGVAR(link_all_deplibs, $1)=yes
+ _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined
+ case $cc_basename in
+ ifort*|nagfor*) _lt_dar_can_shared=yes ;;
+ *) _lt_dar_can_shared=$GCC ;;
+ esac
+ if test yes = "$_lt_dar_can_shared"; then
+ output_verbose_link_cmd=func_echo_all
+ _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil"
+ _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
+ _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil"
+ _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil"
+ m4_if([$1], [CXX],
+[ if test yes != "$lt_cv_apple_cc_single_mod"; then
+ _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dsymutil"
+ _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil"
+ fi
+],[])
+ else
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+])
+
+# _LT_SYS_MODULE_PATH_AIX([TAGNAME])
+# ----------------------------------
+# Links a minimal program and checks the executable
+# for the system default hardcoded library path. In most cases,
+# this is /usr/lib:/lib, but when the MPI compilers are used
+# the location of the communication and MPI libs are included too.
+# If we don't find anything, use the default library path according
+# to the aix ld manual.
+# Store the results from the different compilers for each TAGNAME.
+# Allow to override them for all tags through lt_cv_aix_libpath.
+m4_defun([_LT_SYS_MODULE_PATH_AIX],
+[m4_require([_LT_DECL_SED])dnl
+if test set = "${lt_cv_aix_libpath+set}"; then
+ aix_libpath=$lt_cv_aix_libpath
+else
+ AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
+ [AC_LINK_IFELSE([AC_LANG_PROGRAM],[
+ lt_aix_libpath_sed='[
+ /Import File Strings/,/^$/ {
+ /^0/ {
+ s/^0 *\([^ ]*\) *$/\1/
+ p
+ }
+ }]'
+ _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+ # Check for a 64-bit object if we didn't find anything.
+ if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
+ _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+ fi],[])
+ if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
+ _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib
+ fi
+ ])
+ aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
+fi
+])# _LT_SYS_MODULE_PATH_AIX
+
+
+# _LT_SHELL_INIT(ARG)
+# -------------------
+m4_define([_LT_SHELL_INIT],
+[m4_divert_text([M4SH-INIT], [$1
+])])# _LT_SHELL_INIT
+
+
+
+# _LT_PROG_ECHO_BACKSLASH
+# -----------------------
+# Find how we can fake an echo command that does not interpret backslash.
+# In particular, with Autoconf 2.60 or later we add some code to the start
+# of the generated configure script that will find a shell with a builtin
+# printf (that we can use as an echo command).
+m4_defun([_LT_PROG_ECHO_BACKSLASH],
+[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
+ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
+
+AC_MSG_CHECKING([how to print strings])
+# Test print first, because it will be a builtin if present.
+if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
+ test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
+ ECHO='print -r --'
+elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
+ ECHO='printf %s\n'
+else
+ # Use this function as a fallback that always works.
+ func_fallback_echo ()
+ {
+ eval 'cat <<_LTECHO_EOF
+$[]1
+_LTECHO_EOF'
+ }
+ ECHO='func_fallback_echo'
+fi
+
+# func_echo_all arg...
+# Invoke $ECHO with all args, space-separated.
+func_echo_all ()
+{
+ $ECHO "$*"
+}
+
+case $ECHO in
+ printf*) AC_MSG_RESULT([printf]) ;;
+ print*) AC_MSG_RESULT([print -r]) ;;
+ *) AC_MSG_RESULT([cat]) ;;
+esac
+
+m4_ifdef([_AS_DETECT_SUGGESTED],
+[_AS_DETECT_SUGGESTED([
+ test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
+ ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+ ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
+ ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
+ PATH=/empty FPATH=/empty; export PATH FPATH
+ test "X`printf %s $ECHO`" = "X$ECHO" \
+ || test "X`print -r -- $ECHO`" = "X$ECHO" )])])
+
+_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
+_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
+])# _LT_PROG_ECHO_BACKSLASH
+
+
+# _LT_WITH_SYSROOT
+# ----------------
+AC_DEFUN([_LT_WITH_SYSROOT],
+[AC_MSG_CHECKING([for sysroot])
+AC_ARG_WITH([sysroot],
+[AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@],
+ [Search for dependent libraries within DIR (or the compiler's sysroot
+ if not specified).])],
+[], [with_sysroot=no])
+
+dnl lt_sysroot will always be passed unquoted. We quote it here
+dnl in case the user passed a directory name.
+lt_sysroot=
+case $with_sysroot in #(
+ yes)
+ if test yes = "$GCC"; then
+ lt_sysroot=`$CC --print-sysroot 2>/dev/null`
+ fi
+ ;; #(
+ /*)
+ lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
+ ;; #(
+ no|'')
+ ;; #(
+ *)
+ AC_MSG_RESULT([$with_sysroot])
+ AC_MSG_ERROR([The sysroot must be an absolute path.])
+ ;;
+esac
+
+ AC_MSG_RESULT([${lt_sysroot:-no}])
+_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
+[dependent libraries, and where our libraries should be installed.])])
+
+# _LT_ENABLE_LOCK
+# ---------------
+m4_defun([_LT_ENABLE_LOCK],
+[AC_ARG_ENABLE([libtool-lock],
+ [AS_HELP_STRING([--disable-libtool-lock],
+ [avoid locking (might break parallel builds)])])
+test no = "$enable_libtool_lock" || enable_libtool_lock=yes
+
+# Some flags need to be propagated to the compiler or linker for good
+# libtool support.
+case $host in
+ia64-*-hpux*)
+ # Find out what ABI is being produced by ac_compile, and set mode
+ # options accordingly.
+ echo 'int i;' > conftest.$ac_ext
+ if AC_TRY_EVAL(ac_compile); then
+ case `/usr/bin/file conftest.$ac_objext` in
+ *ELF-32*)
+ HPUX_IA64_MODE=32
+ ;;
+ *ELF-64*)
+ HPUX_IA64_MODE=64
+ ;;
+ esac
+ fi
+ rm -rf conftest*
+ ;;
+*-*-irix6*)
+ # Find out what ABI is being produced by ac_compile, and set linker
+ # options accordingly.
+ echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
+ if AC_TRY_EVAL(ac_compile); then
+ if test yes = "$lt_cv_prog_gnu_ld"; then
+ case `/usr/bin/file conftest.$ac_objext` in
+ *32-bit*)
+ LD="${LD-ld} -melf32bsmip"
+ ;;
+ *N32*)
+ LD="${LD-ld} -melf32bmipn32"
+ ;;
+ *64-bit*)
+ LD="${LD-ld} -melf64bmip"
+ ;;
+ esac
+ else
+ case `/usr/bin/file conftest.$ac_objext` in
+ *32-bit*)
+ LD="${LD-ld} -32"
+ ;;
+ *N32*)
+ LD="${LD-ld} -n32"
+ ;;
+ *64-bit*)
+ LD="${LD-ld} -64"
+ ;;
+ esac
+ fi
+ fi
+ rm -rf conftest*
+ ;;
+
+mips64*-*linux*)
+ # Find out what ABI is being produced by ac_compile, and set linker
+ # options accordingly.
+ echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
+ if AC_TRY_EVAL(ac_compile); then
+ emul=elf
+ case `/usr/bin/file conftest.$ac_objext` in
+ *32-bit*)
+ emul="${emul}32"
+ ;;
+ *64-bit*)
+ emul="${emul}64"
+ ;;
+ esac
+ case `/usr/bin/file conftest.$ac_objext` in
+ *MSB*)
+ emul="${emul}btsmip"
+ ;;
+ *LSB*)
+ emul="${emul}ltsmip"
+ ;;
+ esac
+ case `/usr/bin/file conftest.$ac_objext` in
+ *N32*)
+ emul="${emul}n32"
+ ;;
+ esac
+ LD="${LD-ld} -m $emul"
+ fi
+ rm -rf conftest*
+ ;;
+
+x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
+s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
+ # Find out what ABI is being produced by ac_compile, and set linker
+ # options accordingly. Note that the listed cases only cover the
+ # situations where additional linker options are needed (such as when
+ # doing 32-bit compilation for a host where ld defaults to 64-bit, or
+ # vice versa); the common cases where no linker options are needed do
+ # not appear in the list.
+ echo 'int i;' > conftest.$ac_ext
+ if AC_TRY_EVAL(ac_compile); then
+ case `/usr/bin/file conftest.o` in
+ *32-bit*)
+ case $host in
+ x86_64-*kfreebsd*-gnu)
+ LD="${LD-ld} -m elf_i386_fbsd"
+ ;;
+ x86_64-*linux*)
+ case `/usr/bin/file conftest.o` in
+ *x86-64*)
+ LD="${LD-ld} -m elf32_x86_64"
+ ;;
+ *)
+ LD="${LD-ld} -m elf_i386"
+ ;;
+ esac
+ ;;
+ powerpc64le-*linux*)
+ LD="${LD-ld} -m elf32lppclinux"
+ ;;
+ powerpc64-*linux*)
+ LD="${LD-ld} -m elf32ppclinux"
+ ;;
+ s390x-*linux*)
+ LD="${LD-ld} -m elf_s390"
+ ;;
+ sparc64-*linux*)
+ LD="${LD-ld} -m elf32_sparc"
+ ;;
+ esac
+ ;;
+ *64-bit*)
+ case $host in
+ x86_64-*kfreebsd*-gnu)
+ LD="${LD-ld} -m elf_x86_64_fbsd"
+ ;;
+ x86_64-*linux*)
+ LD="${LD-ld} -m elf_x86_64"
+ ;;
+ powerpcle-*linux*)
+ LD="${LD-ld} -m elf64lppc"
+ ;;
+ powerpc-*linux*)
+ LD="${LD-ld} -m elf64ppc"
+ ;;
+ s390*-*linux*|s390*-*tpf*)
+ LD="${LD-ld} -m elf64_s390"
+ ;;
+ sparc*-*linux*)
+ LD="${LD-ld} -m elf64_sparc"
+ ;;
+ esac
+ ;;
+ esac
+ fi
+ rm -rf conftest*
+ ;;
+
+*-*-sco3.2v5*)
+ # On SCO OpenServer 5, we need -belf to get full-featured binaries.
+ SAVE_CFLAGS=$CFLAGS
+ CFLAGS="$CFLAGS -belf"
+ AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
+ [AC_LANG_PUSH(C)
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
+ AC_LANG_POP])
+ if test yes != "$lt_cv_cc_needs_belf"; then
+ # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
+ CFLAGS=$SAVE_CFLAGS
+ fi
+ ;;
+*-*solaris*)
+ # Find out what ABI is being produced by ac_compile, and set linker
+ # options accordingly.
+ echo 'int i;' > conftest.$ac_ext
+ if AC_TRY_EVAL(ac_compile); then
+ case `/usr/bin/file conftest.o` in
+ *64-bit*)
+ case $lt_cv_prog_gnu_ld in
+ yes*)
+ case $host in
+ i?86-*-solaris*|x86_64-*-solaris*)
+ LD="${LD-ld} -m elf_x86_64"
+ ;;
+ sparc*-*-solaris*)
+ LD="${LD-ld} -m elf64_sparc"
+ ;;
+ esac
+ # GNU ld 2.21 introduced _sol2 emulations. Use them if available.
+ if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
+ LD=${LD-ld}_sol2
+ fi
+ ;;
+ *)
+ if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
+ LD="${LD-ld} -64"
+ fi
+ ;;
+ esac
+ ;;
+ esac
+ fi
+ rm -rf conftest*
+ ;;
+esac
+
+need_locks=$enable_libtool_lock
+])# _LT_ENABLE_LOCK
+
+
+# _LT_PROG_AR
+# -----------
+m4_defun([_LT_PROG_AR],
+[AC_CHECK_TOOLS(AR, [ar], false)
+: ${AR=ar}
+: ${AR_FLAGS=cr}
+_LT_DECL([], [AR], [1], [The archiver])
+_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive])
+
+AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
+ [lt_cv_ar_at_file=no
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
+ [echo conftest.$ac_objext > conftest.lst
+ lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD'
+ AC_TRY_EVAL([lt_ar_try])
+ if test 0 -eq "$ac_status"; then
+ # Ensure the archiver fails upon bogus file names.
+ rm -f conftest.$ac_objext libconftest.a
+ AC_TRY_EVAL([lt_ar_try])
+ if test 0 -ne "$ac_status"; then
+ lt_cv_ar_at_file=@
+ fi
+ fi
+ rm -f conftest.* libconftest.a
+ ])
+ ])
+
+if test no = "$lt_cv_ar_at_file"; then
+ archiver_list_spec=
+else
+ archiver_list_spec=$lt_cv_ar_at_file
+fi
+_LT_DECL([], [archiver_list_spec], [1],
+ [How to feed a file listing to the archiver])
+])# _LT_PROG_AR
+
+
+# _LT_CMD_OLD_ARCHIVE
+# -------------------
+m4_defun([_LT_CMD_OLD_ARCHIVE],
+[_LT_PROG_AR
+
+AC_CHECK_TOOL(STRIP, strip, :)
+test -z "$STRIP" && STRIP=:
+_LT_DECL([], [STRIP], [1], [A symbol stripping program])
+
+AC_CHECK_TOOL(RANLIB, ranlib, :)
+test -z "$RANLIB" && RANLIB=:
+_LT_DECL([], [RANLIB], [1],
+ [Commands used to install an old-style archive])
+
+# Determine commands to create old-style static archives.
+old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
+old_postinstall_cmds='chmod 644 $oldlib'
+old_postuninstall_cmds=
+
+if test -n "$RANLIB"; then
+ case $host_os in
+ bitrig* | openbsd*)
+ old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
+ ;;
+ *)
+ old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
+ ;;
+ esac
+ old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
+fi
+
+case $host_os in
+ darwin*)
+ lock_old_archive_extraction=yes ;;
+ *)
+ lock_old_archive_extraction=no ;;
+esac
+_LT_DECL([], [old_postinstall_cmds], [2])
+_LT_DECL([], [old_postuninstall_cmds], [2])
+_LT_TAGDECL([], [old_archive_cmds], [2],
+ [Commands used to build an old-style archive])
+_LT_DECL([], [lock_old_archive_extraction], [0],
+ [Whether to use a lock for old archive extraction])
+])# _LT_CMD_OLD_ARCHIVE
+
+
+# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
+# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
+# ----------------------------------------------------------------
+# Check whether the given compiler option works
+AC_DEFUN([_LT_COMPILER_OPTION],
+[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_DECL_SED])dnl
+AC_CACHE_CHECK([$1], [$2],
+ [$2=no
+ m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+ lt_compiler_flag="$3" ## exclude from sc_useless_quotes_in_assignment
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ # The option is referenced via a variable to avoid confusing sed.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
+ (eval "$lt_compile" 2>conftest.err)
+ ac_status=$?
+ cat conftest.err >&AS_MESSAGE_LOG_FD
+ echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
+ if (exit $ac_status) && test -s "$ac_outfile"; then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings other than the usual output.
+ $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+ if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
+ $2=yes
+ fi
+ fi
+ $RM conftest*
+])
+
+if test yes = "[$]$2"; then
+ m4_if([$5], , :, [$5])
+else
+ m4_if([$6], , :, [$6])
+fi
+])# _LT_COMPILER_OPTION
+
+# Old name:
+AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
+
+
+# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
+# [ACTION-SUCCESS], [ACTION-FAILURE])
+# ----------------------------------------------------
+# Check whether the given linker option works
+AC_DEFUN([_LT_LINKER_OPTION],
+[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_DECL_SED])dnl
+AC_CACHE_CHECK([$1], [$2],
+ [$2=no
+ save_LDFLAGS=$LDFLAGS
+ LDFLAGS="$LDFLAGS $3"
+ echo "$lt_simple_link_test_code" > conftest.$ac_ext
+ if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
+ # The linker can only warn and ignore the option if not recognized
+ # So say no if there are warnings
+ if test -s conftest.err; then
+ # Append any errors to the config.log.
+ cat conftest.err 1>&AS_MESSAGE_LOG_FD
+ $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+ if diff conftest.exp conftest.er2 >/dev/null; then
+ $2=yes
+ fi
+ else
+ $2=yes
+ fi
+ fi
+ $RM -r conftest*
+ LDFLAGS=$save_LDFLAGS
+])
+
+if test yes = "[$]$2"; then
+ m4_if([$4], , :, [$4])
+else
+ m4_if([$5], , :, [$5])
+fi
+])# _LT_LINKER_OPTION
+
+# Old name:
+AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
+
+
+# LT_CMD_MAX_LEN
+#---------------
+AC_DEFUN([LT_CMD_MAX_LEN],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+# find the maximum length of command line arguments
+AC_MSG_CHECKING([the maximum length of command line arguments])
+AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
+ i=0
+ teststring=ABCD
+
+ case $build_os in
+ msdosdjgpp*)
+ # On DJGPP, this test can blow up pretty badly due to problems in libc
+ # (any single argument exceeding 2000 bytes causes a buffer overrun
+ # during glob expansion). Even if it were fixed, the result of this
+ # check would be larger than it should be.
+ lt_cv_sys_max_cmd_len=12288; # 12K is about right
+ ;;
+
+ gnu*)
+ # Under GNU Hurd, this test is not required because there is
+ # no limit to the length of command line arguments.
+ # Libtool will interpret -1 as no limit whatsoever
+ lt_cv_sys_max_cmd_len=-1;
+ ;;
+
+ cygwin* | mingw* | cegcc*)
+ # On Win9x/ME, this test blows up -- it succeeds, but takes
+ # about 5 minutes as the teststring grows exponentially.
+ # Worse, since 9x/ME are not pre-emptively multitasking,
+ # you end up with a "frozen" computer, even though with patience
+ # the test eventually succeeds (with a max line length of 256k).
+ # Instead, let's just punt: use the minimum linelength reported by
+ # all of the supported platforms: 8192 (on NT/2K/XP).
+ lt_cv_sys_max_cmd_len=8192;
+ ;;
+
+ mint*)
+ # On MiNT this can take a long time and run out of memory.
+ lt_cv_sys_max_cmd_len=8192;
+ ;;
+
+ amigaos*)
+ # On AmigaOS with pdksh, this test takes hours, literally.
+ # So we just punt and use a minimum line length of 8192.
+ lt_cv_sys_max_cmd_len=8192;
+ ;;
+
+ bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*)
+ # This has been around since 386BSD, at least. Likely further.
+ if test -x /sbin/sysctl; then
+ lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
+ elif test -x /usr/sbin/sysctl; then
+ lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
+ else
+ lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
+ fi
+ # And add a safety zone
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
+ ;;
+
+ interix*)
+ # We know the value 262144 and hardcode it with a safety zone (like BSD)
+ lt_cv_sys_max_cmd_len=196608
+ ;;
+
+ os2*)
+ # The test takes a long time on OS/2.
+ lt_cv_sys_max_cmd_len=8192
+ ;;
+
+ osf*)
+ # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
+ # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
+ # nice to cause kernel panics so lets avoid the loop below.
+ # First set a reasonable default.
+ lt_cv_sys_max_cmd_len=16384
+ #
+ if test -x /sbin/sysconfig; then
+ case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
+ *1*) lt_cv_sys_max_cmd_len=-1 ;;
+ esac
+ fi
+ ;;
+ sco3.2v5*)
+ lt_cv_sys_max_cmd_len=102400
+ ;;
+ sysv5* | sco5v6* | sysv4.2uw2*)
+ kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
+ if test -n "$kargmax"; then
+ lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'`
+ else
+ lt_cv_sys_max_cmd_len=32768
+ fi
+ ;;
+ *)
+ lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
+ if test -n "$lt_cv_sys_max_cmd_len" && \
+ test undefined != "$lt_cv_sys_max_cmd_len"; then
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
+ else
+ # Make teststring a little bigger before we do anything with it.
+ # a 1K string should be a reasonable start.
+ for i in 1 2 3 4 5 6 7 8; do
+ teststring=$teststring$teststring
+ done
+ SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
+ # If test is not a shell built-in, we'll probably end up computing a
+ # maximum length that is only half of the actual maximum length, but
+ # we can't tell.
+ while { test X`env echo "$teststring$teststring" 2>/dev/null` \
+ = "X$teststring$teststring"; } >/dev/null 2>&1 &&
+ test 17 != "$i" # 1/2 MB should be enough
+ do
+ i=`expr $i + 1`
+ teststring=$teststring$teststring
+ done
+ # Only check the string length outside the loop.
+ lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
+ teststring=
+ # Add a significant safety factor because C++ compilers can tack on
+ # massive amounts of additional arguments before passing them to the
+ # linker. It appears as though 1/2 is a usable value.
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
+ fi
+ ;;
+ esac
+])
+if test -n "$lt_cv_sys_max_cmd_len"; then
+ AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
+else
+ AC_MSG_RESULT(none)
+fi
+max_cmd_len=$lt_cv_sys_max_cmd_len
+_LT_DECL([], [max_cmd_len], [0],
+ [What is the maximum length of a command?])
+])# LT_CMD_MAX_LEN
+
+# Old name:
+AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
+
+
+# _LT_HEADER_DLFCN
+# ----------------
+m4_defun([_LT_HEADER_DLFCN],
+[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
+])# _LT_HEADER_DLFCN
+
+
+# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
+# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
+# ----------------------------------------------------------------
+m4_defun([_LT_TRY_DLOPEN_SELF],
+[m4_require([_LT_HEADER_DLFCN])dnl
+if test yes = "$cross_compiling"; then :
+ [$4]
+else
+ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+ lt_status=$lt_dlunknown
+ cat > conftest.$ac_ext <<_LT_EOF
+[#line $LINENO "configure"
+#include "confdefs.h"
+
+#if HAVE_DLFCN_H
+#include <dlfcn.h>
+#endif
+
+#include <stdio.h>
+
+#ifdef RTLD_GLOBAL
+# define LT_DLGLOBAL RTLD_GLOBAL
+#else
+# ifdef DL_GLOBAL
+# define LT_DLGLOBAL DL_GLOBAL
+# else
+# define LT_DLGLOBAL 0
+# endif
+#endif
+
+/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
+ find out it does not work in some platform. */
+#ifndef LT_DLLAZY_OR_NOW
+# ifdef RTLD_LAZY
+# define LT_DLLAZY_OR_NOW RTLD_LAZY
+# else
+# ifdef DL_LAZY
+# define LT_DLLAZY_OR_NOW DL_LAZY
+# else
+# ifdef RTLD_NOW
+# define LT_DLLAZY_OR_NOW RTLD_NOW
+# else
+# ifdef DL_NOW
+# define LT_DLLAZY_OR_NOW DL_NOW
+# else
+# define LT_DLLAZY_OR_NOW 0
+# endif
+# endif
+# endif
+# endif
+#endif
+
+/* When -fvisibility=hidden is used, assume the code has been annotated
+ correspondingly for the symbols needed. */
+#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
+int fnord () __attribute__((visibility("default")));
+#endif
+
+int fnord () { return 42; }
+int main ()
+{
+ void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
+ int status = $lt_dlunknown;
+
+ if (self)
+ {
+ if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
+ else
+ {
+ if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
+ else puts (dlerror ());
+ }
+ /* dlclose (self); */
+ }
+ else
+ puts (dlerror ());
+
+ return status;
+}]
+_LT_EOF
+ if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then
+ (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
+ lt_status=$?
+ case x$lt_status in
+ x$lt_dlno_uscore) $1 ;;
+ x$lt_dlneed_uscore) $2 ;;
+ x$lt_dlunknown|x*) $3 ;;
+ esac
+ else :
+ # compilation failed
+ $3
+ fi
+fi
+rm -fr conftest*
+])# _LT_TRY_DLOPEN_SELF
+
+
+# LT_SYS_DLOPEN_SELF
+# ------------------
+AC_DEFUN([LT_SYS_DLOPEN_SELF],
+[m4_require([_LT_HEADER_DLFCN])dnl
+if test yes != "$enable_dlopen"; then
+ enable_dlopen=unknown
+ enable_dlopen_self=unknown
+ enable_dlopen_self_static=unknown
+else
+ lt_cv_dlopen=no
+ lt_cv_dlopen_libs=
+
+ case $host_os in
+ beos*)
+ lt_cv_dlopen=load_add_on
+ lt_cv_dlopen_libs=
+ lt_cv_dlopen_self=yes
+ ;;
+
+ mingw* | pw32* | cegcc*)
+ lt_cv_dlopen=LoadLibrary
+ lt_cv_dlopen_libs=
+ ;;
+
+ cygwin*)
+ lt_cv_dlopen=dlopen
+ lt_cv_dlopen_libs=
+ ;;
+
+ darwin*)
+ # if libdl is installed we need to link against it
+ AC_CHECK_LIB([dl], [dlopen],
+ [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[
+ lt_cv_dlopen=dyld
+ lt_cv_dlopen_libs=
+ lt_cv_dlopen_self=yes
+ ])
+ ;;
+
+ tpf*)
+ # Don't try to run any link tests for TPF. We know it's impossible
+ # because TPF is a cross-compiler, and we know how we open DSOs.
+ lt_cv_dlopen=dlopen
+ lt_cv_dlopen_libs=
+ lt_cv_dlopen_self=no
+ ;;
+
+ *)
+ AC_CHECK_FUNC([shl_load],
+ [lt_cv_dlopen=shl_load],
+ [AC_CHECK_LIB([dld], [shl_load],
+ [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld],
+ [AC_CHECK_FUNC([dlopen],
+ [lt_cv_dlopen=dlopen],
+ [AC_CHECK_LIB([dl], [dlopen],
+ [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],
+ [AC_CHECK_LIB([svld], [dlopen],
+ [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld],
+ [AC_CHECK_LIB([dld], [dld_link],
+ [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld])
+ ])
+ ])
+ ])
+ ])
+ ])
+ ;;
+ esac
+
+ if test no = "$lt_cv_dlopen"; then
+ enable_dlopen=no
+ else
+ enable_dlopen=yes
+ fi
+
+ case $lt_cv_dlopen in
+ dlopen)
+ save_CPPFLAGS=$CPPFLAGS
+ test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
+
+ save_LDFLAGS=$LDFLAGS
+ wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
+
+ save_LIBS=$LIBS
+ LIBS="$lt_cv_dlopen_libs $LIBS"
+
+ AC_CACHE_CHECK([whether a program can dlopen itself],
+ lt_cv_dlopen_self, [dnl
+ _LT_TRY_DLOPEN_SELF(
+ lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
+ lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
+ ])
+
+ if test yes = "$lt_cv_dlopen_self"; then
+ wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
+ AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
+ lt_cv_dlopen_self_static, [dnl
+ _LT_TRY_DLOPEN_SELF(
+ lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
+ lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
+ ])
+ fi
+
+ CPPFLAGS=$save_CPPFLAGS
+ LDFLAGS=$save_LDFLAGS
+ LIBS=$save_LIBS
+ ;;
+ esac
+
+ case $lt_cv_dlopen_self in
+ yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
+ *) enable_dlopen_self=unknown ;;
+ esac
+
+ case $lt_cv_dlopen_self_static in
+ yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
+ *) enable_dlopen_self_static=unknown ;;
+ esac
+fi
+_LT_DECL([dlopen_support], [enable_dlopen], [0],
+ [Whether dlopen is supported])
+_LT_DECL([dlopen_self], [enable_dlopen_self], [0],
+ [Whether dlopen of programs is supported])
+_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
+ [Whether dlopen of statically linked programs is supported])
+])# LT_SYS_DLOPEN_SELF
+
+# Old name:
+AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
+
+
+# _LT_COMPILER_C_O([TAGNAME])
+# ---------------------------
+# Check to see if options -c and -o are simultaneously supported by compiler.
+# This macro does not hard code the compiler like AC_PROG_CC_C_O.
+m4_defun([_LT_COMPILER_C_O],
+[m4_require([_LT_DECL_SED])dnl
+m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_TAG_COMPILER])dnl
+AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
+ [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
+ [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
+ $RM -r conftest 2>/dev/null
+ mkdir conftest
+ cd conftest
+ mkdir out
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+ lt_compiler_flag="-o out/conftest2.$ac_objext"
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
+ (eval "$lt_compile" 2>out/conftest.err)
+ ac_status=$?
+ cat out/conftest.err >&AS_MESSAGE_LOG_FD
+ echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
+ if (exit $ac_status) && test -s out/conftest2.$ac_objext
+ then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings
+ $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
+ $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
+ if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
+ _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
+ fi
+ fi
+ chmod u+w . 2>&AS_MESSAGE_LOG_FD
+ $RM conftest*
+ # SGI C++ compiler will create directory out/ii_files/ for
+ # template instantiation
+ test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
+ $RM out/* && rmdir out
+ cd ..
+ $RM -r conftest
+ $RM conftest*
+])
+_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
+ [Does compiler simultaneously support -c and -o options?])
+])# _LT_COMPILER_C_O
+
+
+# _LT_COMPILER_FILE_LOCKS([TAGNAME])
+# ----------------------------------
+# Check to see if we can do hard links to lock some files if needed
+m4_defun([_LT_COMPILER_FILE_LOCKS],
+[m4_require([_LT_ENABLE_LOCK])dnl
+m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+_LT_COMPILER_C_O([$1])
+
+hard_links=nottested
+if test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then
+ # do not overwrite the value of need_locks provided by the user
+ AC_MSG_CHECKING([if we can lock with hard links])
+ hard_links=yes
+ $RM conftest*
+ ln conftest.a conftest.b 2>/dev/null && hard_links=no
+ touch conftest.a
+ ln conftest.a conftest.b 2>&5 || hard_links=no
+ ln conftest.a conftest.b 2>/dev/null && hard_links=no
+ AC_MSG_RESULT([$hard_links])
+ if test no = "$hard_links"; then
+ AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe])
+ need_locks=warn
+ fi
+else
+ need_locks=no
+fi
+_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
+])# _LT_COMPILER_FILE_LOCKS
+
+
+# _LT_CHECK_OBJDIR
+# ----------------
+m4_defun([_LT_CHECK_OBJDIR],
+[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
+[rm -f .libs 2>/dev/null
+mkdir .libs 2>/dev/null
+if test -d .libs; then
+ lt_cv_objdir=.libs
+else
+ # MS-DOS does not allow filenames that begin with a dot.
+ lt_cv_objdir=_libs
+fi
+rmdir .libs 2>/dev/null])
+objdir=$lt_cv_objdir
+_LT_DECL([], [objdir], [0],
+ [The name of the directory that contains temporary libtool files])dnl
+m4_pattern_allow([LT_OBJDIR])dnl
+AC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/",
+ [Define to the sub-directory where libtool stores uninstalled libraries.])
+])# _LT_CHECK_OBJDIR
+
+
+# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
+# --------------------------------------
+# Check hardcoding attributes.
+m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
+[AC_MSG_CHECKING([how to hardcode library paths into programs])
+_LT_TAGVAR(hardcode_action, $1)=
+if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
+ test -n "$_LT_TAGVAR(runpath_var, $1)" ||
+ test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then
+
+ # We can hardcode non-existent directories.
+ if test no != "$_LT_TAGVAR(hardcode_direct, $1)" &&
+ # If the only mechanism to avoid hardcoding is shlibpath_var, we
+ # have to relink, otherwise we might link with an installed library
+ # when we should be linking with a yet-to-be-installed one
+ ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" &&
+ test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then
+ # Linking always hardcodes the temporary library directory.
+ _LT_TAGVAR(hardcode_action, $1)=relink
+ else
+ # We can link without hardcoding, and we can hardcode nonexisting dirs.
+ _LT_TAGVAR(hardcode_action, $1)=immediate
+ fi
+else
+ # We cannot hardcode anything, or else we can only hardcode existing
+ # directories.
+ _LT_TAGVAR(hardcode_action, $1)=unsupported
+fi
+AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
+
+if test relink = "$_LT_TAGVAR(hardcode_action, $1)" ||
+ test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then
+ # Fast installation is not supported
+ enable_fast_install=no
+elif test yes = "$shlibpath_overrides_runpath" ||
+ test no = "$enable_shared"; then
+ # Fast installation is not necessary
+ enable_fast_install=needless
+fi
+_LT_TAGDECL([], [hardcode_action], [0],
+ [How to hardcode a shared library path into an executable])
+])# _LT_LINKER_HARDCODE_LIBPATH
+
+
+# _LT_CMD_STRIPLIB
+# ----------------
+m4_defun([_LT_CMD_STRIPLIB],
+[m4_require([_LT_DECL_EGREP])
+striplib=
+old_striplib=
+AC_MSG_CHECKING([whether stripping libraries is possible])
+if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
+ test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
+ test -z "$striplib" && striplib="$STRIP --strip-unneeded"
+ AC_MSG_RESULT([yes])
+else
+# FIXME - insert some real tests, host_os isn't really good enough
+ case $host_os in
+ darwin*)
+ if test -n "$STRIP"; then
+ striplib="$STRIP -x"
+ old_striplib="$STRIP -S"
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_RESULT([no])
+ fi
+ ;;
+ *)
+ AC_MSG_RESULT([no])
+ ;;
+ esac
+fi
+_LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
+_LT_DECL([], [striplib], [1])
+])# _LT_CMD_STRIPLIB
+
+
+# _LT_PREPARE_MUNGE_PATH_LIST
+# ---------------------------
+# Make sure func_munge_path_list() is defined correctly.
+m4_defun([_LT_PREPARE_MUNGE_PATH_LIST],
+[[# func_munge_path_list VARIABLE PATH
+# -----------------------------------
+# VARIABLE is name of variable containing _space_ separated list of
+# directories to be munged by the contents of PATH, which is string
+# having a format:
+# "DIR[:DIR]:"
+# string "DIR[ DIR]" will be prepended to VARIABLE
+# ":DIR[:DIR]"
+# string "DIR[ DIR]" will be appended to VARIABLE
+# "DIRP[:DIRP]::[DIRA:]DIRA"
+# string "DIRP[ DIRP]" will be prepended to VARIABLE and string
+# "DIRA[ DIRA]" will be appended to VARIABLE
+# "DIR[:DIR]"
+# VARIABLE will be replaced by "DIR[ DIR]"
+func_munge_path_list ()
+{
+ case x@S|@2 in
+ x)
+ ;;
+ *:)
+ eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\"
+ ;;
+ x:*)
+ eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\"
+ ;;
+ *::*)
+ eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
+ eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\"
+ ;;
+ *)
+ eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\"
+ ;;
+ esac
+}
+]])# _LT_PREPARE_PATH_LIST
+
+
+# _LT_SYS_DYNAMIC_LINKER([TAG])
+# -----------------------------
+# PORTME Fill in your ld.so characteristics
+m4_defun([_LT_SYS_DYNAMIC_LINKER],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+m4_require([_LT_DECL_EGREP])dnl
+m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_DECL_OBJDUMP])dnl
+m4_require([_LT_DECL_SED])dnl
+m4_require([_LT_CHECK_SHELL_FEATURES])dnl
+m4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl
+AC_MSG_CHECKING([dynamic linker characteristics])
+m4_if([$1],
+ [], [
+if test yes = "$GCC"; then
+ case $host_os in
+ darwin*) lt_awk_arg='/^libraries:/,/LR/' ;;
+ *) lt_awk_arg='/^libraries:/' ;;
+ esac
+ case $host_os in
+ mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;;
+ *) lt_sed_strip_eq='s|=/|/|g' ;;
+ esac
+ lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
+ case $lt_search_path_spec in
+ *\;*)
+ # if the path contains ";" then we assume it to be the separator
+ # otherwise default to the standard path separator (i.e. ":") - it is
+ # assumed that no part of a normal pathname contains ";" but that should
+ # okay in the real world where ";" in dirpaths is itself problematic.
+ lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
+ ;;
+ *)
+ lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
+ ;;
+ esac
+ # Ok, now we have the path, separated by spaces, we can step through it
+ # and add multilib dir if necessary...
+ lt_tmp_lt_search_path_spec=
+ lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
+ # ...but if some path component already ends with the multilib dir we assume
+ # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer).
+ case "$lt_multi_os_dir; $lt_search_path_spec " in
+ "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*)
+ lt_multi_os_dir=
+ ;;
+ esac
+ for lt_sys_path in $lt_search_path_spec; do
+ if test -d "$lt_sys_path$lt_multi_os_dir"; then
+ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir"
+ elif test -n "$lt_multi_os_dir"; then
+ test -d "$lt_sys_path" && \
+ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
+ fi
+ done
+ lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
+BEGIN {RS = " "; FS = "/|\n";} {
+ lt_foo = "";
+ lt_count = 0;
+ for (lt_i = NF; lt_i > 0; lt_i--) {
+ if ($lt_i != "" && $lt_i != ".") {
+ if ($lt_i == "..") {
+ lt_count++;
+ } else {
+ if (lt_count == 0) {
+ lt_foo = "/" $lt_i lt_foo;
+ } else {
+ lt_count--;
+ }
+ }
+ }
+ }
+ if (lt_foo != "") { lt_freq[[lt_foo]]++; }
+ if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
+}'`
+ # AWK program above erroneously prepends '/' to C:/dos/paths
+ # for these hosts.
+ case $host_os in
+ mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
+ $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;;
+ esac
+ sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
+else
+ sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
+fi])
+library_names_spec=
+libname_spec='lib$name'
+soname_spec=
+shrext_cmds=.so
+postinstall_cmds=
+postuninstall_cmds=
+finish_cmds=
+finish_eval=
+shlibpath_var=
+shlibpath_overrides_runpath=unknown
+version_type=none
+dynamic_linker="$host_os ld.so"
+sys_lib_dlsearch_path_spec="/lib /usr/lib"
+need_lib_prefix=unknown
+hardcode_into_libs=no
+
+# when you set need_version to no, make sure it does not cause -set_version
+# flags to be left without arguments
+need_version=unknown
+
+AC_ARG_VAR([LT_SYS_LIBRARY_PATH],
+[User-defined run-time library search path.])
+
+case $host_os in
+aix3*)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ library_names_spec='$libname$release$shared_ext$versuffix $libname.a'
+ shlibpath_var=LIBPATH
+
+ # AIX 3 has no versioning support, so we append a major version to the name.
+ soname_spec='$libname$release$shared_ext$major'
+ ;;
+
+aix[[4-9]]*)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ need_lib_prefix=no
+ need_version=no
+ hardcode_into_libs=yes
+ if test ia64 = "$host_cpu"; then
+ # AIX 5 supports IA64
+ library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext'
+ shlibpath_var=LD_LIBRARY_PATH
+ else
+ # With GCC up to 2.95.x, collect2 would create an import file
+ # for dependence libraries. The import file would start with
+ # the line '#! .'. This would cause the generated library to
+ # depend on '.', always an invalid library. This was fixed in
+ # development snapshots of GCC prior to 3.0.
+ case $host_os in
+ aix4 | aix4.[[01]] | aix4.[[01]].*)
+ if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
+ echo ' yes '
+ echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then
+ :
+ else
+ can_build_shared=no
+ fi
+ ;;
+ esac
+ # Using Import Files as archive members, it is possible to support
+ # filename-based versioning of shared library archives on AIX. While
+ # this would work for both with and without runtime linking, it will
+ # prevent static linking of such archives. So we do filename-based
+ # shared library versioning with .so extension only, which is used
+ # when both runtime linking and shared linking is enabled.
+ # Unfortunately, runtime linking may impact performance, so we do
+ # not want this to be the default eventually. Also, we use the
+ # versioned .so libs for executables only if there is the -brtl
+ # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only.
+ # To allow for filename-based versioning support, we need to create
+ # libNAME.so.V as an archive file, containing:
+ # *) an Import File, referring to the versioned filename of the
+ # archive as well as the shared archive member, telling the
+ # bitwidth (32 or 64) of that shared object, and providing the
+ # list of exported symbols of that shared object, eventually
+ # decorated with the 'weak' keyword
+ # *) the shared object with the F_LOADONLY flag set, to really avoid
+ # it being seen by the linker.
+ # At run time we better use the real file rather than another symlink,
+ # but for link time we create the symlink libNAME.so -> libNAME.so.V
+
+ case $with_aix_soname,$aix_use_runtimelinking in
+ # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct
+ # soname into executable. Probably we can add versioning support to
+ # collect2, so additional links can be useful in future.
+ aix,yes) # traditional libtool
+ dynamic_linker='AIX unversionable lib.so'
+ # If using run time linking (on AIX 4.2 or later) use lib<name>.so
+ # instead of lib<name>.a to let people know that these are not
+ # typical AIX shared libraries.
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ ;;
+ aix,no) # traditional AIX only
+ dynamic_linker='AIX lib.a[(]lib.so.V[)]'
+ # We preserve .a as extension for shared libraries through AIX4.2
+ # and later when we are not doing run time linking.
+ library_names_spec='$libname$release.a $libname.a'
+ soname_spec='$libname$release$shared_ext$major'
+ ;;
+ svr4,*) # full svr4 only
+ dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]"
+ library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
+ # We do not specify a path in Import Files, so LIBPATH fires.
+ shlibpath_overrides_runpath=yes
+ ;;
+ *,yes) # both, prefer svr4
+ dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]"
+ library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
+ # unpreferred sharedlib libNAME.a needs extra handling
+ postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"'
+ postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"'
+ # We do not specify a path in Import Files, so LIBPATH fires.
+ shlibpath_overrides_runpath=yes
+ ;;
+ *,no) # both, prefer aix
+ dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]"
+ library_names_spec='$libname$release.a $libname.a'
+ soname_spec='$libname$release$shared_ext$major'
+ # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling
+ postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)'
+ postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"'
+ ;;
+ esac
+ shlibpath_var=LIBPATH
+ fi
+ ;;
+
+amigaos*)
+ case $host_cpu in
+ powerpc)
+ # Since July 2007 AmigaOS4 officially supports .so libraries.
+ # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ ;;
+ m68k)
+ library_names_spec='$libname.ixlibrary $libname.a'
+ # Create ${libname}_ixlibrary.a entries in /sys/libs.
+ finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
+ ;;
+ esac
+ ;;
+
+beos*)
+ library_names_spec='$libname$shared_ext'
+ dynamic_linker="$host_os ld.so"
+ shlibpath_var=LIBRARY_PATH
+ ;;
+
+bsdi[[45]]*)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ need_version=no
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
+ sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
+ # the default ld.so.conf also contains /usr/contrib/lib and
+ # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
+ # libtool to hard-code these into programs
+ ;;
+
+cygwin* | mingw* | pw32* | cegcc*)
+ version_type=windows
+ shrext_cmds=.dll
+ need_version=no
+ need_lib_prefix=no
+
+ case $GCC,$cc_basename in
+ yes,*)
+ # gcc
+ library_names_spec='$libname.dll.a'
+ # DLL is installed to $(libdir)/../bin by postinstall_cmds
+ postinstall_cmds='base_file=`basename \$file`~
+ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
+ dldir=$destdir/`dirname \$dlpath`~
+ test -d \$dldir || mkdir -p \$dldir~
+ $install_prog $dir/$dlname \$dldir/$dlname~
+ chmod a+x \$dldir/$dlname~
+ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
+ eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
+ fi'
+ postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
+ dlpath=$dir/\$dldll~
+ $RM \$dlpath'
+ shlibpath_overrides_runpath=yes
+
+ case $host_os in
+ cygwin*)
+ # Cygwin DLLs use 'cyg' prefix rather than 'lib'
+ soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
+m4_if([$1], [],[
+ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
+ ;;
+ mingw* | cegcc*)
+ # MinGW DLLs use traditional 'lib' prefix
+ soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
+ ;;
+ pw32*)
+ # pw32 DLLs use 'pw' prefix rather than 'lib'
+ library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
+ ;;
+ esac
+ dynamic_linker='Win32 ld.exe'
+ ;;
+
+ *,cl*)
+ # Native MSVC
+ libname_spec='$name'
+ soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
+ library_names_spec='$libname.dll.lib'
+
+ case $build_os in
+ mingw*)
+ sys_lib_search_path_spec=
+ lt_save_ifs=$IFS
+ IFS=';'
+ for lt_path in $LIB
+ do
+ IFS=$lt_save_ifs
+ # Let DOS variable expansion print the short 8.3 style file name.
+ lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
+ sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
+ done
+ IFS=$lt_save_ifs
+ # Convert to MSYS style.
+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
+ ;;
+ cygwin*)
+ # Convert to unix form, then to dos form, then back to unix form
+ # but this time dos style (no spaces!) so that the unix form looks
+ # like /cygdrive/c/PROGRA~1:/cygdr...
+ sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
+ sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
+ sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
+ ;;
+ *)
+ sys_lib_search_path_spec=$LIB
+ if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
+ # It is most probably a Windows format PATH.
+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+ else
+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
+ fi
+ # FIXME: find the short name or the path components, as spaces are
+ # common. (e.g. "Program Files" -> "PROGRA~1")
+ ;;
+ esac
+
+ # DLL is installed to $(libdir)/../bin by postinstall_cmds
+ postinstall_cmds='base_file=`basename \$file`~
+ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
+ dldir=$destdir/`dirname \$dlpath`~
+ test -d \$dldir || mkdir -p \$dldir~
+ $install_prog $dir/$dlname \$dldir/$dlname'
+ postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
+ dlpath=$dir/\$dldll~
+ $RM \$dlpath'
+ shlibpath_overrides_runpath=yes
+ dynamic_linker='Win32 link.exe'
+ ;;
+
+ *)
+ # Assume MSVC wrapper
+ library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib'
+ dynamic_linker='Win32 ld.exe'
+ ;;
+ esac
+ # FIXME: first we should search . and the directory the executable is in
+ shlibpath_var=PATH
+ ;;
+
+darwin* | rhapsody*)
+ dynamic_linker="$host_os dyld"
+ version_type=darwin
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='$libname$release$major$shared_ext $libname$shared_ext'
+ soname_spec='$libname$release$major$shared_ext'
+ shlibpath_overrides_runpath=yes
+ shlibpath_var=DYLD_LIBRARY_PATH
+ shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
+m4_if([$1], [],[
+ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
+ sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
+ ;;
+
+dgux*)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ ;;
+
+freebsd* | dragonfly*)
+ # DragonFly does not have aout. When/if they implement a new
+ # versioning mechanism, adjust this.
+ if test -x /usr/bin/objformat; then
+ objformat=`/usr/bin/objformat`
+ else
+ case $host_os in
+ freebsd[[23]].*) objformat=aout ;;
+ *) objformat=elf ;;
+ esac
+ fi
+ version_type=freebsd-$objformat
+ case $version_type in
+ freebsd-elf*)
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
+ need_version=no
+ need_lib_prefix=no
+ ;;
+ freebsd-*)
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
+ need_version=yes
+ ;;
+ esac
+ shlibpath_var=LD_LIBRARY_PATH
+ case $host_os in
+ freebsd2.*)
+ shlibpath_overrides_runpath=yes
+ ;;
+ freebsd3.[[01]]* | freebsdelf3.[[01]]*)
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ ;;
+ freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
+ freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ ;;
+ *) # from 4.6 on, and DragonFly
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ ;;
+ esac
+ ;;
+
+haiku*)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ need_lib_prefix=no
+ need_version=no
+ dynamic_linker="$host_os runtime_loader"
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
+ shlibpath_var=LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
+ hardcode_into_libs=yes
+ ;;
+
+hpux9* | hpux10* | hpux11*)
+ # Give a soname corresponding to the major version so that dld.sl refuses to
+ # link against other versions.
+ version_type=sunos
+ need_lib_prefix=no
+ need_version=no
+ case $host_cpu in
+ ia64*)
+ shrext_cmds='.so'
+ hardcode_into_libs=yes
+ dynamic_linker="$host_os dld.so"
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
+ if test 32 = "$HPUX_IA64_MODE"; then
+ sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
+ sys_lib_dlsearch_path_spec=/usr/lib/hpux32
+ else
+ sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
+ sys_lib_dlsearch_path_spec=/usr/lib/hpux64
+ fi
+ ;;
+ hppa*64*)
+ shrext_cmds='.sl'
+ hardcode_into_libs=yes
+ dynamic_linker="$host_os dld.sl"
+ shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
+ shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
+ sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
+ sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+ ;;
+ *)
+ shrext_cmds='.sl'
+ dynamic_linker="$host_os dld.sl"
+ shlibpath_var=SHLIB_PATH
+ shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
+ ;;
+ esac
+ # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
+ postinstall_cmds='chmod 555 $lib'
+ # or fails outright, so override atomically:
+ install_override_mode=555
+ ;;
+
+interix[[3-9]]*)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
+ dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ ;;
+
+irix5* | irix6* | nonstopux*)
+ case $host_os in
+ nonstopux*) version_type=nonstopux ;;
+ *)
+ if test yes = "$lt_cv_prog_gnu_ld"; then
+ version_type=linux # correct to gnu/linux during the next big refactor
+ else
+ version_type=irix
+ fi ;;
+ esac
+ need_lib_prefix=no
+ need_version=no
+ soname_spec='$libname$release$shared_ext$major'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext'
+ case $host_os in
+ irix5* | nonstopux*)
+ libsuff= shlibsuff=
+ ;;
+ *)
+ case $LD in # libtool.m4 will add one of these switches to LD
+ *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
+ libsuff= shlibsuff= libmagic=32-bit;;
+ *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
+ libsuff=32 shlibsuff=N32 libmagic=N32;;
+ *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
+ libsuff=64 shlibsuff=64 libmagic=64-bit;;
+ *) libsuff= shlibsuff= libmagic=never-match;;
+ esac
+ ;;
+ esac
+ shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
+ shlibpath_overrides_runpath=no
+ sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff"
+ sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff"
+ hardcode_into_libs=yes
+ ;;
+
+# No shared lib support for Linux oldld, aout, or coff.
+linux*oldld* | linux*aout* | linux*coff*)
+ dynamic_linker=no
+ ;;
+
+linux*android*)
+ version_type=none # Android doesn't support versioned libraries.
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='$libname$release$shared_ext'
+ soname_spec='$libname$release$shared_ext'
+ finish_cmds=
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+
+ # This implies no fast_install, which is unacceptable.
+ # Some rework will be needed to allow for fast_install
+ # before this can be enabled.
+ hardcode_into_libs=yes
+
+ dynamic_linker='Android linker'
+ # Don't embed -rpath directories since the linker doesn't support them.
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ ;;
+
+# This must be glibc/ELF.
+linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+
+ # Some binutils ld are patched to set DT_RUNPATH
+ AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
+ [lt_cv_shlibpath_overrides_runpath=no
+ save_LDFLAGS=$LDFLAGS
+ save_libdir=$libdir
+ eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
+ LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
+ [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
+ [lt_cv_shlibpath_overrides_runpath=yes])])
+ LDFLAGS=$save_LDFLAGS
+ libdir=$save_libdir
+ ])
+ shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
+
+ # This implies no fast_install, which is unacceptable.
+ # Some rework will be needed to allow for fast_install
+ # before this can be enabled.
+ hardcode_into_libs=yes
+
+ # Ideally, we could use ldconfig to report *all* directores which are
+ # searched for libraries, however this is still not possible. Aside from not
+ # being certain /sbin/ldconfig is available, command
+ # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64,
+ # even though it is searched at run-time. Try to do the best guess by
+ # appending ld.so.conf contents (and includes) to the search path.
+ if test -f /etc/ld.so.conf; then
+ lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
+ sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
+ fi
+
+ # We used to test for /lib/ld.so.1 and disable shared libraries on
+ # powerpc, because MkLinux only supported shared libraries with the
+ # GNU dynamic linker. Since this was broken with cross compilers,
+ # most powerpc-linux boxes support dynamic linking these days and
+ # people can always --disable-shared, the test was removed, and we
+ # assume the GNU/Linux dynamic linker is in use.
+ dynamic_linker='GNU/Linux ld.so'
+ ;;
+
+netbsdelf*-gnu)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ dynamic_linker='NetBSD ld.elf_so'
+ ;;
+
+netbsd*)
+ version_type=sunos
+ need_lib_prefix=no
+ need_version=no
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+ dynamic_linker='NetBSD (a.out) ld.so'
+ else
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
+ dynamic_linker='NetBSD ld.elf_so'
+ fi
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ ;;
+
+newsos6)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ ;;
+
+*nto* | *qnx*)
+ version_type=qnx
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ dynamic_linker='ldqnx.so'
+ ;;
+
+openbsd* | bitrig*)
+ version_type=sunos
+ sys_lib_dlsearch_path_spec=/usr/lib
+ need_lib_prefix=no
+ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
+ need_version=no
+ else
+ need_version=yes
+ fi
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ ;;
+
+os2*)
+ libname_spec='$name'
+ version_type=windows
+ shrext_cmds=.dll
+ need_version=no
+ need_lib_prefix=no
+ # OS/2 can only load a DLL with a base name of 8 characters or less.
+ soname_spec='`test -n "$os2dllname" && libname="$os2dllname";
+ v=$($ECHO $release$versuffix | tr -d .-);
+ n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _);
+ $ECHO $n$v`$shared_ext'
+ library_names_spec='${libname}_dll.$libext'
+ dynamic_linker='OS/2 ld.exe'
+ shlibpath_var=BEGINLIBPATH
+ sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
+ sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+ postinstall_cmds='base_file=`basename \$file`~
+ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~
+ dldir=$destdir/`dirname \$dlpath`~
+ test -d \$dldir || mkdir -p \$dldir~
+ $install_prog $dir/$dlname \$dldir/$dlname~
+ chmod a+x \$dldir/$dlname~
+ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
+ eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
+ fi'
+ postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~
+ dlpath=$dir/\$dldll~
+ $RM \$dlpath'
+ ;;
+
+osf3* | osf4* | osf5*)
+ version_type=osf
+ need_lib_prefix=no
+ need_version=no
+ soname_spec='$libname$release$shared_ext$major'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ shlibpath_var=LD_LIBRARY_PATH
+ sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
+ sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+ ;;
+
+rdos*)
+ dynamic_linker=no
+ ;;
+
+solaris*)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ # ldd complains unless libraries are executable
+ postinstall_cmds='chmod +x $lib'
+ ;;
+
+sunos4*)
+ version_type=sunos
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
+ finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ if test yes = "$with_gnu_ld"; then
+ need_lib_prefix=no
+ fi
+ need_version=yes
+ ;;
+
+sysv4 | sysv4.3*)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ case $host_vendor in
+ sni)
+ shlibpath_overrides_runpath=no
+ need_lib_prefix=no
+ runpath_var=LD_RUN_PATH
+ ;;
+ siemens)
+ need_lib_prefix=no
+ ;;
+ motorola)
+ need_lib_prefix=no
+ need_version=no
+ shlibpath_overrides_runpath=no
+ sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
+ ;;
+ esac
+ ;;
+
+sysv4*MP*)
+ if test -d /usr/nec; then
+ version_type=linux # correct to gnu/linux during the next big refactor
+ library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext'
+ soname_spec='$libname$shared_ext.$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ fi
+ ;;
+
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+ version_type=sco
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ if test yes = "$with_gnu_ld"; then
+ sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
+ else
+ sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
+ case $host_os in
+ sco3.2v5*)
+ sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
+ ;;
+ esac
+ fi
+ sys_lib_dlsearch_path_spec='/usr/lib'
+ ;;
+
+tpf*)
+ # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
+ version_type=linux # correct to gnu/linux during the next big refactor
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ ;;
+
+uts4*)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ ;;
+
+*)
+ dynamic_linker=no
+ ;;
+esac
+AC_MSG_RESULT([$dynamic_linker])
+test no = "$dynamic_linker" && can_build_shared=no
+
+variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
+if test yes = "$GCC"; then
+ variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
+fi
+
+if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then
+ sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec
+fi
+
+if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then
+ sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec
+fi
+
+# remember unaugmented sys_lib_dlsearch_path content for libtool script decls...
+configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec
+
+# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code
+func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH"
+
+# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool
+configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH
+
+_LT_DECL([], [variables_saved_for_relink], [1],
+ [Variables whose values should be saved in libtool wrapper scripts and
+ restored at link time])
+_LT_DECL([], [need_lib_prefix], [0],
+ [Do we need the "lib" prefix for modules?])
+_LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
+_LT_DECL([], [version_type], [0], [Library versioning type])
+_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable])
+_LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
+_LT_DECL([], [shlibpath_overrides_runpath], [0],
+ [Is shlibpath searched before the hard-coded library search path?])
+_LT_DECL([], [libname_spec], [1], [Format of library name prefix])
+_LT_DECL([], [library_names_spec], [1],
+ [[List of archive names. First name is the real one, the rest are links.
+ The last name is the one that the linker finds with -lNAME]])
+_LT_DECL([], [soname_spec], [1],
+ [[The coded name of the library, if different from the real name]])
+_LT_DECL([], [install_override_mode], [1],
+ [Permission mode override for installation of shared libraries])
+_LT_DECL([], [postinstall_cmds], [2],
+ [Command to use after installation of a shared archive])
+_LT_DECL([], [postuninstall_cmds], [2],
+ [Command to use after uninstallation of a shared archive])
+_LT_DECL([], [finish_cmds], [2],
+ [Commands used to finish a libtool library installation in a directory])
+_LT_DECL([], [finish_eval], [1],
+ [[As "finish_cmds", except a single script fragment to be evaled but
+ not shown]])
+_LT_DECL([], [hardcode_into_libs], [0],
+ [Whether we should hardcode library paths into libraries])
+_LT_DECL([], [sys_lib_search_path_spec], [2],
+ [Compile-time system search path for libraries])
+_LT_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2],
+ [Detected run-time system search path for libraries])
+_LT_DECL([], [configure_time_lt_sys_library_path], [2],
+ [Explicit LT_SYS_LIBRARY_PATH set during ./configure time])
+])# _LT_SYS_DYNAMIC_LINKER
+
+
+# _LT_PATH_TOOL_PREFIX(TOOL)
+# --------------------------
+# find a file program that can recognize shared library
+AC_DEFUN([_LT_PATH_TOOL_PREFIX],
+[m4_require([_LT_DECL_EGREP])dnl
+AC_MSG_CHECKING([for $1])
+AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
+[case $MAGIC_CMD in
+[[\\/*] | ?:[\\/]*])
+ lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
+ ;;
+*)
+ lt_save_MAGIC_CMD=$MAGIC_CMD
+ lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
+dnl $ac_dummy forces splitting on constant user-supplied paths.
+dnl POSIX.2 word splitting is done only on the output of word expansions,
+dnl not every word. This closes a longstanding sh security hole.
+ ac_dummy="m4_if([$2], , $PATH, [$2])"
+ for ac_dir in $ac_dummy; do
+ IFS=$lt_save_ifs
+ test -z "$ac_dir" && ac_dir=.
+ if test -f "$ac_dir/$1"; then
+ lt_cv_path_MAGIC_CMD=$ac_dir/"$1"
+ if test -n "$file_magic_test_file"; then
+ case $deplibs_check_method in
+ "file_magic "*)
+ file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
+ MAGIC_CMD=$lt_cv_path_MAGIC_CMD
+ if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
+ $EGREP "$file_magic_regex" > /dev/null; then
+ :
+ else
+ cat <<_LT_EOF 1>&2
+
+*** Warning: the command libtool uses to detect shared libraries,
+*** $file_magic_cmd, produces output that libtool cannot recognize.
+*** The result is that libtool may fail to recognize shared libraries
+*** as such. This will affect the creation of libtool libraries that
+*** depend on shared libraries, but programs linked with such libtool
+*** libraries will work regardless of this problem. Nevertheless, you
+*** may want to report the problem to your system manager and/or to
+*** bug-libtool@gnu.org
+
+_LT_EOF
+ fi ;;
+ esac
+ fi
+ break
+ fi
+ done
+ IFS=$lt_save_ifs
+ MAGIC_CMD=$lt_save_MAGIC_CMD
+ ;;
+esac])
+MAGIC_CMD=$lt_cv_path_MAGIC_CMD
+if test -n "$MAGIC_CMD"; then
+ AC_MSG_RESULT($MAGIC_CMD)
+else
+ AC_MSG_RESULT(no)
+fi
+_LT_DECL([], [MAGIC_CMD], [0],
+ [Used to examine libraries when file_magic_cmd begins with "file"])dnl
+])# _LT_PATH_TOOL_PREFIX
+
+# Old name:
+AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
+
+
+# _LT_PATH_MAGIC
+# --------------
+# find a file program that can recognize a shared library
+m4_defun([_LT_PATH_MAGIC],
+[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
+if test -z "$lt_cv_path_MAGIC_CMD"; then
+ if test -n "$ac_tool_prefix"; then
+ _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
+ else
+ MAGIC_CMD=:
+ fi
+fi
+])# _LT_PATH_MAGIC
+
+
+# LT_PATH_LD
+# ----------
+# find the pathname to the GNU or non-GNU linker
+AC_DEFUN([LT_PATH_LD],
+[AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([AC_CANONICAL_HOST])dnl
+AC_REQUIRE([AC_CANONICAL_BUILD])dnl
+m4_require([_LT_DECL_SED])dnl
+m4_require([_LT_DECL_EGREP])dnl
+m4_require([_LT_PROG_ECHO_BACKSLASH])dnl
+
+AC_ARG_WITH([gnu-ld],
+ [AS_HELP_STRING([--with-gnu-ld],
+ [assume the C compiler uses GNU ld @<:@default=no@:>@])],
+ [test no = "$withval" || with_gnu_ld=yes],
+ [with_gnu_ld=no])dnl
+
+ac_prog=ld
+if test yes = "$GCC"; then
+ # Check if gcc -print-prog-name=ld gives a path.
+ AC_MSG_CHECKING([for ld used by $CC])
+ case $host in
+ *-*-mingw*)
+ # gcc leaves a trailing carriage return, which upsets mingw
+ ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
+ *)
+ ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
+ esac
+ case $ac_prog in
+ # Accept absolute paths.
+ [[\\/]]* | ?:[[\\/]]*)
+ re_direlt='/[[^/]][[^/]]*/\.\./'
+ # Canonicalize the pathname of ld
+ ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
+ while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
+ ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
+ done
+ test -z "$LD" && LD=$ac_prog
+ ;;
+ "")
+ # If it fails, then pretend we aren't using GCC.
+ ac_prog=ld
+ ;;
+ *)
+ # If it is relative, then search for the first ld in PATH.
+ with_gnu_ld=unknown
+ ;;
+ esac
+elif test yes = "$with_gnu_ld"; then
+ AC_MSG_CHECKING([for GNU ld])
+else
+ AC_MSG_CHECKING([for non-GNU ld])
+fi
+AC_CACHE_VAL(lt_cv_path_LD,
+[if test -z "$LD"; then
+ lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
+ for ac_dir in $PATH; do
+ IFS=$lt_save_ifs
+ test -z "$ac_dir" && ac_dir=.
+ if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
+ lt_cv_path_LD=$ac_dir/$ac_prog
+ # Check to see if the program is GNU ld. I'd rather use --version,
+ # but apparently some variants of GNU ld only accept -v.
+ # Break only if it was the GNU/non-GNU ld that we prefer.
+ case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
+ *GNU* | *'with BFD'*)
+ test no != "$with_gnu_ld" && break
+ ;;
+ *)
+ test yes != "$with_gnu_ld" && break
+ ;;
+ esac
+ fi
+ done
+ IFS=$lt_save_ifs
+else
+ lt_cv_path_LD=$LD # Let the user override the test with a path.
+fi])
+LD=$lt_cv_path_LD
+if test -n "$LD"; then
+ AC_MSG_RESULT($LD)
+else
+ AC_MSG_RESULT(no)
+fi
+test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
+_LT_PATH_LD_GNU
+AC_SUBST([LD])
+
+_LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
+])# LT_PATH_LD
+
+# Old names:
+AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
+AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AM_PROG_LD], [])
+dnl AC_DEFUN([AC_PROG_LD], [])
+
+
+# _LT_PATH_LD_GNU
+#- --------------
+m4_defun([_LT_PATH_LD_GNU],
+[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
+[# I'd rather use --version here, but apparently some GNU lds only accept -v.
+case `$LD -v 2>&1 </dev/null` in
+*GNU* | *'with BFD'*)
+ lt_cv_prog_gnu_ld=yes
+ ;;
+*)
+ lt_cv_prog_gnu_ld=no
+ ;;
+esac])
+with_gnu_ld=$lt_cv_prog_gnu_ld
+])# _LT_PATH_LD_GNU
+
+
+# _LT_CMD_RELOAD
+# --------------
+# find reload flag for linker
+# -- PORTME Some linkers may need a different reload flag.
+m4_defun([_LT_CMD_RELOAD],
+[AC_CACHE_CHECK([for $LD option to reload object files],
+ lt_cv_ld_reload_flag,
+ [lt_cv_ld_reload_flag='-r'])
+reload_flag=$lt_cv_ld_reload_flag
+case $reload_flag in
+"" | " "*) ;;
+*) reload_flag=" $reload_flag" ;;
+esac
+reload_cmds='$LD$reload_flag -o $output$reload_objs'
+case $host_os in
+ cygwin* | mingw* | pw32* | cegcc*)
+ if test yes != "$GCC"; then
+ reload_cmds=false
+ fi
+ ;;
+ darwin*)
+ if test yes = "$GCC"; then
+ reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs'
+ else
+ reload_cmds='$LD$reload_flag -o $output$reload_objs'
+ fi
+ ;;
+esac
+_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
+_LT_TAGDECL([], [reload_cmds], [2])dnl
+])# _LT_CMD_RELOAD
+
+
+# _LT_PATH_DD
+# -----------
+# find a working dd
+m4_defun([_LT_PATH_DD],
+[AC_CACHE_CHECK([for a working dd], [ac_cv_path_lt_DD],
+[printf 0123456789abcdef0123456789abcdef >conftest.i
+cat conftest.i conftest.i >conftest2.i
+: ${lt_DD:=$DD}
+AC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd],
+[if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
+ cmp -s conftest.i conftest.out \
+ && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=:
+fi])
+rm -f conftest.i conftest2.i conftest.out])
+])# _LT_PATH_DD
+
+
+# _LT_CMD_TRUNCATE
+# ----------------
+# find command to truncate a binary pipe
+m4_defun([_LT_CMD_TRUNCATE],
+[m4_require([_LT_PATH_DD])
+AC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin],
+[printf 0123456789abcdef0123456789abcdef >conftest.i
+cat conftest.i conftest.i >conftest2.i
+lt_cv_truncate_bin=
+if "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
+ cmp -s conftest.i conftest.out \
+ && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1"
+fi
+rm -f conftest.i conftest2.i conftest.out
+test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"])
+_LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1],
+ [Command to truncate a binary pipe])
+])# _LT_CMD_TRUNCATE
+
+
+# _LT_CHECK_MAGIC_METHOD
+# ----------------------
+# how to check for library dependencies
+# -- PORTME fill in with the dynamic library characteristics
+m4_defun([_LT_CHECK_MAGIC_METHOD],
+[m4_require([_LT_DECL_EGREP])
+m4_require([_LT_DECL_OBJDUMP])
+AC_CACHE_CHECK([how to recognize dependent libraries],
+lt_cv_deplibs_check_method,
+[lt_cv_file_magic_cmd='$MAGIC_CMD'
+lt_cv_file_magic_test_file=
+lt_cv_deplibs_check_method='unknown'
+# Need to set the preceding variable on all platforms that support
+# interlibrary dependencies.
+# 'none' -- dependencies not supported.
+# 'unknown' -- same as none, but documents that we really don't know.
+# 'pass_all' -- all dependencies passed with no checks.
+# 'test_compile' -- check by making test program.
+# 'file_magic [[regex]]' -- check by looking for files in library path
+# that responds to the $file_magic_cmd with a given extended regex.
+# If you have 'file' or equivalent on your system and you're not sure
+# whether 'pass_all' will *always* work, you probably want this one.
+
+case $host_os in
+aix[[4-9]]*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+beos*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+bsdi[[45]]*)
+ lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
+ lt_cv_file_magic_cmd='/usr/bin/file -L'
+ lt_cv_file_magic_test_file=/shlib/libc.so
+ ;;
+
+cygwin*)
+ # func_win32_libid is a shell function defined in ltmain.sh
+ lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
+ lt_cv_file_magic_cmd='func_win32_libid'
+ ;;
+
+mingw* | pw32*)
+ # Base MSYS/MinGW do not provide the 'file' command needed by
+ # func_win32_libid shell function, so use a weaker test based on 'objdump',
+ # unless we find 'file', for example because we are cross-compiling.
+ if ( file / ) >/dev/null 2>&1; then
+ lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
+ lt_cv_file_magic_cmd='func_win32_libid'
+ else
+ # Keep this pattern in sync with the one in func_win32_libid.
+ lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
+ lt_cv_file_magic_cmd='$OBJDUMP -f'
+ fi
+ ;;
+
+cegcc*)
+ # use the weaker test based on 'objdump'. See mingw*.
+ lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
+ lt_cv_file_magic_cmd='$OBJDUMP -f'
+ ;;
+
+darwin* | rhapsody*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+freebsd* | dragonfly*)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
+ case $host_cpu in
+ i*86 )
+ # Not sure whether the presence of OpenBSD here was a mistake.
+ # Let's accept both of them until this is cleared up.
+ lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
+ lt_cv_file_magic_cmd=/usr/bin/file
+ lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
+ ;;
+ esac
+ else
+ lt_cv_deplibs_check_method=pass_all
+ fi
+ ;;
+
+haiku*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+hpux10.20* | hpux11*)
+ lt_cv_file_magic_cmd=/usr/bin/file
+ case $host_cpu in
+ ia64*)
+ lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
+ lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
+ ;;
+ hppa*64*)
+ [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]']
+ lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
+ ;;
+ *)
+ lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library'
+ lt_cv_file_magic_test_file=/usr/lib/libc.sl
+ ;;
+ esac
+ ;;
+
+interix[[3-9]]*)
+ # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
+ lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
+ ;;
+
+irix5* | irix6* | nonstopux*)
+ case $LD in
+ *-32|*"-32 ") libmagic=32-bit;;
+ *-n32|*"-n32 ") libmagic=N32;;
+ *-64|*"-64 ") libmagic=64-bit;;
+ *) libmagic=never-match;;
+ esac
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+# This must be glibc/ELF.
+linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+netbsd* | netbsdelf*-gnu)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
+ lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
+ else
+ lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
+ fi
+ ;;
+
+newos6*)
+ lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
+ lt_cv_file_magic_cmd=/usr/bin/file
+ lt_cv_file_magic_test_file=/usr/lib/libnls.so
+ ;;
+
+*nto* | *qnx*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+openbsd* | bitrig*)
+ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
+ lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
+ else
+ lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
+ fi
+ ;;
+
+osf3* | osf4* | osf5*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+rdos*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+solaris*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+sysv4 | sysv4.3*)
+ case $host_vendor in
+ motorola)
+ lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]'
+ lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
+ ;;
+ ncr)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+ sequent)
+ lt_cv_file_magic_cmd='/bin/file'
+ lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
+ ;;
+ sni)
+ lt_cv_file_magic_cmd='/bin/file'
+ lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
+ lt_cv_file_magic_test_file=/lib/libc.so
+ ;;
+ siemens)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+ pc)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+ esac
+ ;;
+
+tpf*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+os2*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+esac
+])
+
+file_magic_glob=
+want_nocaseglob=no
+if test "$build" = "$host"; then
+ case $host_os in
+ mingw* | pw32*)
+ if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
+ want_nocaseglob=yes
+ else
+ file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"`
+ fi
+ ;;
+ esac
+fi
+
+file_magic_cmd=$lt_cv_file_magic_cmd
+deplibs_check_method=$lt_cv_deplibs_check_method
+test -z "$deplibs_check_method" && deplibs_check_method=unknown
+
+_LT_DECL([], [deplibs_check_method], [1],
+ [Method to check whether dependent libraries are shared objects])
+_LT_DECL([], [file_magic_cmd], [1],
+ [Command to use when deplibs_check_method = "file_magic"])
+_LT_DECL([], [file_magic_glob], [1],
+ [How to find potential files when deplibs_check_method = "file_magic"])
+_LT_DECL([], [want_nocaseglob], [1],
+ [Find potential files using nocaseglob when deplibs_check_method = "file_magic"])
+])# _LT_CHECK_MAGIC_METHOD
+
+
+# LT_PATH_NM
+# ----------
+# find the pathname to a BSD- or MS-compatible name lister
+AC_DEFUN([LT_PATH_NM],
+[AC_REQUIRE([AC_PROG_CC])dnl
+AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
+[if test -n "$NM"; then
+ # Let the user override the test.
+ lt_cv_path_NM=$NM
+else
+ lt_nm_to_check=${ac_tool_prefix}nm
+ if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
+ lt_nm_to_check="$lt_nm_to_check nm"
+ fi
+ for lt_tmp_nm in $lt_nm_to_check; do
+ lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
+ for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
+ IFS=$lt_save_ifs
+ test -z "$ac_dir" && ac_dir=.
+ tmp_nm=$ac_dir/$lt_tmp_nm
+ if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then
+ # Check to see if the nm accepts a BSD-compat flag.
+ # Adding the 'sed 1q' prevents false positives on HP-UX, which says:
+ # nm: unknown option "B" ignored
+ # Tru64's nm complains that /dev/null is an invalid object file
+ # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty
+ case $build_os in
+ mingw*) lt_bad_file=conftest.nm/nofile ;;
+ *) lt_bad_file=/dev/null ;;
+ esac
+ case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in
+ *$lt_bad_file* | *'Invalid file or object type'*)
+ lt_cv_path_NM="$tmp_nm -B"
+ break 2
+ ;;
+ *)
+ case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
+ */dev/null*)
+ lt_cv_path_NM="$tmp_nm -p"
+ break 2
+ ;;
+ *)
+ lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
+ continue # so that we can try to find one that supports BSD flags
+ ;;
+ esac
+ ;;
+ esac
+ fi
+ done
+ IFS=$lt_save_ifs
+ done
+ : ${lt_cv_path_NM=no}
+fi])
+if test no != "$lt_cv_path_NM"; then
+ NM=$lt_cv_path_NM
+else
+ # Didn't find any BSD compatible name lister, look for dumpbin.
+ if test -n "$DUMPBIN"; then :
+ # Let the user override the test.
+ else
+ AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
+ case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in
+ *COFF*)
+ DUMPBIN="$DUMPBIN -symbols -headers"
+ ;;
+ *)
+ DUMPBIN=:
+ ;;
+ esac
+ fi
+ AC_SUBST([DUMPBIN])
+ if test : != "$DUMPBIN"; then
+ NM=$DUMPBIN
+ fi
+fi
+test -z "$NM" && NM=nm
+AC_SUBST([NM])
+_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
+
+AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
+ [lt_cv_nm_interface="BSD nm"
+ echo "int some_variable = 0;" > conftest.$ac_ext
+ (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
+ (eval "$ac_compile" 2>conftest.err)
+ cat conftest.err >&AS_MESSAGE_LOG_FD
+ (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
+ (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
+ cat conftest.err >&AS_MESSAGE_LOG_FD
+ (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
+ cat conftest.out >&AS_MESSAGE_LOG_FD
+ if $GREP 'External.*some_variable' conftest.out > /dev/null; then
+ lt_cv_nm_interface="MS dumpbin"
+ fi
+ rm -f conftest*])
+])# LT_PATH_NM
+
+# Old names:
+AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
+AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AM_PROG_NM], [])
+dnl AC_DEFUN([AC_PROG_NM], [])
+
+# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
+# --------------------------------
+# how to determine the name of the shared library
+# associated with a specific link library.
+# -- PORTME fill in with the dynamic library characteristics
+m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB],
+[m4_require([_LT_DECL_EGREP])
+m4_require([_LT_DECL_OBJDUMP])
+m4_require([_LT_DECL_DLLTOOL])
+AC_CACHE_CHECK([how to associate runtime and link libraries],
+lt_cv_sharedlib_from_linklib_cmd,
+[lt_cv_sharedlib_from_linklib_cmd='unknown'
+
+case $host_os in
+cygwin* | mingw* | pw32* | cegcc*)
+ # two different shell functions defined in ltmain.sh;
+ # decide which one to use based on capabilities of $DLLTOOL
+ case `$DLLTOOL --help 2>&1` in
+ *--identify-strict*)
+ lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
+ ;;
+ *)
+ lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
+ ;;
+ esac
+ ;;
+*)
+ # fallback: assume linklib IS sharedlib
+ lt_cv_sharedlib_from_linklib_cmd=$ECHO
+ ;;
+esac
+])
+sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
+test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
+
+_LT_DECL([], [sharedlib_from_linklib_cmd], [1],
+ [Command to associate shared and link libraries])
+])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
+
+
+# _LT_PATH_MANIFEST_TOOL
+# ----------------------
+# locate the manifest tool
+m4_defun([_LT_PATH_MANIFEST_TOOL],
+[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)
+test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
+AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool],
+ [lt_cv_path_mainfest_tool=no
+ echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD
+ $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
+ cat conftest.err >&AS_MESSAGE_LOG_FD
+ if $GREP 'Manifest Tool' conftest.out > /dev/null; then
+ lt_cv_path_mainfest_tool=yes
+ fi
+ rm -f conftest*])
+if test yes != "$lt_cv_path_mainfest_tool"; then
+ MANIFEST_TOOL=:
+fi
+_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
+])# _LT_PATH_MANIFEST_TOOL
+
+
+# _LT_DLL_DEF_P([FILE])
+# ---------------------
+# True iff FILE is a Windows DLL '.def' file.
+# Keep in sync with func_dll_def_p in the libtool script
+AC_DEFUN([_LT_DLL_DEF_P],
+[dnl
+ test DEF = "`$SED -n dnl
+ -e '\''s/^[[ ]]*//'\'' dnl Strip leading whitespace
+ -e '\''/^\(;.*\)*$/d'\'' dnl Delete empty lines and comments
+ -e '\''s/^\(EXPORTS\|LIBRARY\)\([[ ]].*\)*$/DEF/p'\'' dnl
+ -e q dnl Only consider the first "real" line
+ $1`" dnl
+])# _LT_DLL_DEF_P
+
+
+# LT_LIB_M
+# --------
+# check for math library
+AC_DEFUN([LT_LIB_M],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+LIBM=
+case $host in
+*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
+ # These system don't have libm, or don't need it
+ ;;
+*-ncr-sysv4.3*)
+ AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw)
+ AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
+ ;;
+*)
+ AC_CHECK_LIB(m, cos, LIBM=-lm)
+ ;;
+esac
+AC_SUBST([LIBM])
+])# LT_LIB_M
+
+# Old name:
+AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_CHECK_LIBM], [])
+
+
+# _LT_COMPILER_NO_RTTI([TAGNAME])
+# -------------------------------
+m4_defun([_LT_COMPILER_NO_RTTI],
+[m4_require([_LT_TAG_COMPILER])dnl
+
+_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
+
+if test yes = "$GCC"; then
+ case $cc_basename in
+ nvcc*)
+ _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
+ *)
+ _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;;
+ esac
+
+ _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
+ lt_cv_prog_compiler_rtti_exceptions,
+ [-fno-rtti -fno-exceptions], [],
+ [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
+fi
+_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
+ [Compiler flag to turn off builtin functions])
+])# _LT_COMPILER_NO_RTTI
+
+
+# _LT_CMD_GLOBAL_SYMBOLS
+# ----------------------
+m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([AC_PROG_AWK])dnl
+AC_REQUIRE([LT_PATH_NM])dnl
+AC_REQUIRE([LT_PATH_LD])dnl
+m4_require([_LT_DECL_SED])dnl
+m4_require([_LT_DECL_EGREP])dnl
+m4_require([_LT_TAG_COMPILER])dnl
+
+# Check for command to grab the raw symbol name followed by C symbol from nm.
+AC_MSG_CHECKING([command to parse $NM output from $compiler object])
+AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
+[
+# These are sane defaults that work on at least a few old systems.
+# [They come from Ultrix. What could be older than Ultrix?!! ;)]
+
+# Character class describing NM global symbol codes.
+symcode='[[BCDEGRST]]'
+
+# Regexp to match symbols that can be accessed directly from C.
+sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
+
+# Define system-specific variables.
+case $host_os in
+aix*)
+ symcode='[[BCDT]]'
+ ;;
+cygwin* | mingw* | pw32* | cegcc*)
+ symcode='[[ABCDGISTW]]'
+ ;;
+hpux*)
+ if test ia64 = "$host_cpu"; then
+ symcode='[[ABCDEGRST]]'
+ fi
+ ;;
+irix* | nonstopux*)
+ symcode='[[BCDEGRST]]'
+ ;;
+osf*)
+ symcode='[[BCDEGQRST]]'
+ ;;
+solaris*)
+ symcode='[[BDRT]]'
+ ;;
+sco3.2v5*)
+ symcode='[[DT]]'
+ ;;
+sysv4.2uw2*)
+ symcode='[[DT]]'
+ ;;
+sysv5* | sco5v6* | unixware* | OpenUNIX*)
+ symcode='[[ABDT]]'
+ ;;
+sysv4)
+ symcode='[[DFNSTU]]'
+ ;;
+esac
+
+# If we're using GNU nm, then use its standard symbol codes.
+case `$NM -V 2>&1` in
+*GNU* | *'with BFD'*)
+ symcode='[[ABCDGIRSTW]]' ;;
+esac
+
+if test "$lt_cv_nm_interface" = "MS dumpbin"; then
+ # Gets list of data symbols to import.
+ lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'"
+ # Adjust the below global symbol transforms to fixup imported variables.
+ lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'"
+ lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'"
+ lt_c_name_lib_hook="\
+ -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\
+ -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'"
+else
+ # Disable hooks by default.
+ lt_cv_sys_global_symbol_to_import=
+ lt_cdecl_hook=
+ lt_c_name_hook=
+ lt_c_name_lib_hook=
+fi
+
+# Transform an extracted symbol line into a proper C declaration.
+# Some systems (esp. on ia64) link data and code symbols differently,
+# so use this general approach.
+lt_cv_sys_global_symbol_to_cdecl="sed -n"\
+$lt_cdecl_hook\
+" -e 's/^T .* \(.*\)$/extern int \1();/p'"\
+" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'"
+
+# Transform an extracted symbol line into symbol name and symbol address
+lt_cv_sys_global_symbol_to_c_name_address="sed -n"\
+$lt_c_name_hook\
+" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\
+" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'"
+
+# Transform an extracted symbol line into symbol name with lib prefix and
+# symbol address.
+lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\
+$lt_c_name_lib_hook\
+" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\
+" -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\
+" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'"
+
+# Handle CRLF in mingw tool chain
+opt_cr=
+case $build_os in
+mingw*)
+ opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
+ ;;
+esac
+
+# Try without a prefix underscore, then with it.
+for ac_symprfx in "" "_"; do
+
+ # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
+ symxfrm="\\1 $ac_symprfx\\2 \\2"
+
+ # Write the raw and C identifiers.
+ if test "$lt_cv_nm_interface" = "MS dumpbin"; then
+ # Fake it for dumpbin and say T for any non-static function,
+ # D for any global variable and I for any imported variable.
+ # Also find C++ and __fastcall symbols from MSVC++,
+ # which start with @ or ?.
+ lt_cv_sys_global_symbol_pipe="$AWK ['"\
+" {last_section=section; section=\$ 3};"\
+" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
+" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
+" /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\
+" /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\
+" /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\
+" \$ 0!~/External *\|/{next};"\
+" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
+" {if(hide[section]) next};"\
+" {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\
+" {split(\$ 0,a,/\||\r/); split(a[2],s)};"\
+" s[1]~/^[@?]/{print f,s[1],s[1]; next};"\
+" s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\
+" ' prfx=^$ac_symprfx]"
+ else
+ lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
+ fi
+ lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
+
+ # Check to see that the pipe works correctly.
+ pipe_works=no
+
+ rm -f conftest*
+ cat > conftest.$ac_ext <<_LT_EOF
+#ifdef __cplusplus
+extern "C" {
+#endif
+char nm_test_var;
+void nm_test_func(void);
+void nm_test_func(void){}
+#ifdef __cplusplus
+}
+#endif
+int main(){nm_test_var='a';nm_test_func();return(0);}
+_LT_EOF
+
+ if AC_TRY_EVAL(ac_compile); then
+ # Now try to grab the symbols.
+ nlist=conftest.nm
+ $ECHO "$as_me:$LINENO: $NM conftest.$ac_objext | $lt_cv_sys_global_symbol_pipe > $nlist" >&AS_MESSAGE_LOG_FD
+ if eval "$NM" conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist 2>&AS_MESSAGE_LOG_FD && test -s "$nlist"; then
+ # Try sorting and uniquifying the output.
+ if sort "$nlist" | uniq > "$nlist"T; then
+ mv -f "$nlist"T "$nlist"
+ else
+ rm -f "$nlist"T
+ fi
+
+ # Make sure that we snagged all the symbols we need.
+ if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
+ if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
+ cat <<_LT_EOF > conftest.$ac_ext
+/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */
+#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE
+/* DATA imports from DLLs on WIN32 can't be const, because runtime
+ relocations are performed -- see ld's documentation on pseudo-relocs. */
+# define LT@&t@_DLSYM_CONST
+#elif defined __osf__
+/* This system does not cope well with relocations in const data. */
+# define LT@&t@_DLSYM_CONST
+#else
+# define LT@&t@_DLSYM_CONST const
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+_LT_EOF
+ # Now generate the symbol file.
+ eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
+
+ cat <<_LT_EOF >> conftest.$ac_ext
+
+/* The mapping between symbol names and symbols. */
+LT@&t@_DLSYM_CONST struct {
+ const char *name;
+ void *address;
+}
+lt__PROGRAM__LTX_preloaded_symbols[[]] =
+{
+ { "@PROGRAM@", (void *) 0 },
+_LT_EOF
+ $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
+ cat <<\_LT_EOF >> conftest.$ac_ext
+ {0, (void *) 0}
+};
+
+/* This works around a problem in FreeBSD linker */
+#ifdef FREEBSD_WORKAROUND
+static const void *lt_preloaded_setup() {
+ return lt__PROGRAM__LTX_preloaded_symbols;
+}
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+_LT_EOF
+ # Now try linking the two files.
+ mv conftest.$ac_objext conftstm.$ac_objext
+ lt_globsym_save_LIBS=$LIBS
+ lt_globsym_save_CFLAGS=$CFLAGS
+ LIBS=conftstm.$ac_objext
+ CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
+ if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then
+ pipe_works=yes
+ fi
+ LIBS=$lt_globsym_save_LIBS
+ CFLAGS=$lt_globsym_save_CFLAGS
+ else
+ echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
+ fi
+ else
+ echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
+ fi
+ else
+ echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
+ fi
+ else
+ echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
+ cat conftest.$ac_ext >&5
+ fi
+ rm -rf conftest* conftst*
+
+ # Do not use the global_symbol_pipe unless it works.
+ if test yes = "$pipe_works"; then
+ break
+ else
+ lt_cv_sys_global_symbol_pipe=
+ fi
+done
+])
+if test -z "$lt_cv_sys_global_symbol_pipe"; then
+ lt_cv_sys_global_symbol_to_cdecl=
+fi
+if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
+ AC_MSG_RESULT(failed)
+else
+ AC_MSG_RESULT(ok)
+fi
+
+# Response file support.
+if test "$lt_cv_nm_interface" = "MS dumpbin"; then
+ nm_file_list_spec='@'
+elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then
+ nm_file_list_spec='@'
+fi
+
+_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
+ [Take the output of nm and produce a listing of raw symbols and C names])
+_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
+ [Transform the output of nm in a proper C declaration])
+_LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1],
+ [Transform the output of nm into a list of symbols to manually relocate])
+_LT_DECL([global_symbol_to_c_name_address],
+ [lt_cv_sys_global_symbol_to_c_name_address], [1],
+ [Transform the output of nm in a C name address pair])
+_LT_DECL([global_symbol_to_c_name_address_lib_prefix],
+ [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
+ [Transform the output of nm in a C name address pair when lib prefix is needed])
+_LT_DECL([nm_interface], [lt_cv_nm_interface], [1],
+ [The name lister interface])
+_LT_DECL([], [nm_file_list_spec], [1],
+ [Specify filename containing input files for $NM])
+]) # _LT_CMD_GLOBAL_SYMBOLS
+
+
+# _LT_COMPILER_PIC([TAGNAME])
+# ---------------------------
+m4_defun([_LT_COMPILER_PIC],
+[m4_require([_LT_TAG_COMPILER])dnl
+_LT_TAGVAR(lt_prog_compiler_wl, $1)=
+_LT_TAGVAR(lt_prog_compiler_pic, $1)=
+_LT_TAGVAR(lt_prog_compiler_static, $1)=
+
+m4_if([$1], [CXX], [
+ # C++ specific cases for pic, static, wl, etc.
+ if test yes = "$GXX"; then
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+
+ case $host_os in
+ aix*)
+ # All AIX code is PIC.
+ if test ia64 = "$host_cpu"; then
+ # AIX 5 now supports IA64 processor
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ fi
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ ;;
+
+ amigaos*)
+ case $host_cpu in
+ powerpc)
+ # see comment about AmigaOS4 .so support
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ ;;
+ m68k)
+ # FIXME: we need at least 68020 code to build shared libraries, but
+ # adding the '-m68020' flag to GCC prevents building anything better,
+ # like '-m68040'.
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
+ ;;
+ esac
+ ;;
+
+ beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+ # PIC is the default for these OSes.
+ ;;
+ mingw* | cygwin* | os2* | pw32* | cegcc*)
+ # This hack is so that the source file can tell whether it is being
+ # built for inclusion in a dll (and should export symbols for example).
+ # Although the cygwin gcc ignores -fPIC, still need this for old-style
+ # (--disable-auto-import) libraries
+ m4_if([$1], [GCJ], [],
+ [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
+ case $host_os in
+ os2*)
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
+ ;;
+ esac
+ ;;
+ darwin* | rhapsody*)
+ # PIC is the default on this platform
+ # Common symbols not allowed in MH_DYLIB files
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
+ ;;
+ *djgpp*)
+ # DJGPP does not support shared libraries at all
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)=
+ ;;
+ haiku*)
+ # PIC is the default for Haiku.
+ # The "-static" flag exists, but is broken.
+ _LT_TAGVAR(lt_prog_compiler_static, $1)=
+ ;;
+ interix[[3-9]]*)
+ # Interix 3.x gcc -fpic/-fPIC options generate broken code.
+ # Instead, we relocate shared libraries at runtime.
+ ;;
+ sysv4*MP*)
+ if test -d /usr/nec; then
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
+ fi
+ ;;
+ hpux*)
+ # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
+ # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
+ # sets the default TLS model and affects inlining.
+ case $host_cpu in
+ hppa*64*)
+ ;;
+ *)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ ;;
+ esac
+ ;;
+ *qnx* | *nto*)
+ # QNX uses GNU C++, but need to define -shared option too, otherwise
+ # it will coredump.
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
+ ;;
+ *)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ ;;
+ esac
+ else
+ case $host_os in
+ aix[[4-9]]*)
+ # All AIX code is PIC.
+ if test ia64 = "$host_cpu"; then
+ # AIX 5 now supports IA64 processor
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ else
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
+ fi
+ ;;
+ chorus*)
+ case $cc_basename in
+ cxch68*)
+ # Green Hills C++ Compiler
+ # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
+ ;;
+ esac
+ ;;
+ mingw* | cygwin* | os2* | pw32* | cegcc*)
+ # This hack is so that the source file can tell whether it is being
+ # built for inclusion in a dll (and should export symbols for example).
+ m4_if([$1], [GCJ], [],
+ [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
+ ;;
+ dgux*)
+ case $cc_basename in
+ ec++*)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ ;;
+ ghcx*)
+ # Green Hills C++ Compiler
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ freebsd* | dragonfly*)
+ # FreeBSD uses GNU C++
+ ;;
+ hpux9* | hpux10* | hpux11*)
+ case $cc_basename in
+ CC*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
+ if test ia64 != "$host_cpu"; then
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
+ fi
+ ;;
+ aCC*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
+ case $host_cpu in
+ hppa*64*|ia64*)
+ # +Z the default
+ ;;
+ *)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
+ ;;
+ esac
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ interix*)
+ # This is c89, which is MS Visual C++ (no shared libs)
+ # Anyone wants to do a port?
+ ;;
+ irix5* | irix6* | nonstopux*)
+ case $cc_basename in
+ CC*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+ # CC pic flag -KPIC is the default.
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
+ case $cc_basename in
+ KCC*)
+ # KAI C++ Compiler
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ ;;
+ ecpc* )
+ # old Intel C++ for x86_64, which still supported -KPIC.
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+ ;;
+ icpc* )
+ # Intel C++, used to be incompatible with GCC.
+ # ICC 10 doesn't accept -KPIC any more.
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+ ;;
+ pgCC* | pgcpp*)
+ # Portland Group C++ compiler
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+ cxx*)
+ # Compaq C++
+ # Make sure the PIC flag is empty. It appears that all Alpha
+ # Linux and Compaq Tru64 Unix objects are PIC.
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)=
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+ ;;
+ xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*)
+ # IBM XL 8.0, 9.0 on PPC and BlueGene
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
+ ;;
+ *)
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*)
+ # Sun C++ 5.9
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ lynxos*)
+ ;;
+ m88k*)
+ ;;
+ mvs*)
+ case $cc_basename in
+ cxx*)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ netbsd* | netbsdelf*-gnu)
+ ;;
+ *qnx* | *nto*)
+ # QNX uses GNU C++, but need to define -shared option too, otherwise
+ # it will coredump.
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
+ ;;
+ osf3* | osf4* | osf5*)
+ case $cc_basename in
+ KCC*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
+ ;;
+ RCC*)
+ # Rational C++ 2.4.1
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+ ;;
+ cxx*)
+ # Digital/Compaq C++
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ # Make sure the PIC flag is empty. It appears that all Alpha
+ # Linux and Compaq Tru64 Unix objects are PIC.
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)=
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ psos*)
+ ;;
+ solaris*)
+ case $cc_basename in
+ CC* | sunCC*)
+ # Sun C++ 4.2, 5.x and Centerline C++
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
+ ;;
+ gcx*)
+ # Green Hills C++ Compiler
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ sunos4*)
+ case $cc_basename in
+ CC*)
+ # Sun C++ 4.x
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+ lcc*)
+ # Lucid
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+ case $cc_basename in
+ CC*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+ esac
+ ;;
+ tandem*)
+ case $cc_basename in
+ NCC*)
+ # NonStop-UX NCC 3.20
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ vxworks*)
+ ;;
+ *)
+ _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
+ ;;
+ esac
+ fi
+],
+[
+ if test yes = "$GCC"; then
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+
+ case $host_os in
+ aix*)
+ # All AIX code is PIC.
+ if test ia64 = "$host_cpu"; then
+ # AIX 5 now supports IA64 processor
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ fi
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ ;;
+
+ amigaos*)
+ case $host_cpu in
+ powerpc)
+ # see comment about AmigaOS4 .so support
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ ;;
+ m68k)
+ # FIXME: we need at least 68020 code to build shared libraries, but
+ # adding the '-m68020' flag to GCC prevents building anything better,
+ # like '-m68040'.
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
+ ;;
+ esac
+ ;;
+
+ beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+ # PIC is the default for these OSes.
+ ;;
+
+ mingw* | cygwin* | pw32* | os2* | cegcc*)
+ # This hack is so that the source file can tell whether it is being
+ # built for inclusion in a dll (and should export symbols for example).
+ # Although the cygwin gcc ignores -fPIC, still need this for old-style
+ # (--disable-auto-import) libraries
+ m4_if([$1], [GCJ], [],
+ [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
+ case $host_os in
+ os2*)
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
+ ;;
+ esac
+ ;;
+
+ darwin* | rhapsody*)
+ # PIC is the default on this platform
+ # Common symbols not allowed in MH_DYLIB files
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
+ ;;
+
+ haiku*)
+ # PIC is the default for Haiku.
+ # The "-static" flag exists, but is broken.
+ _LT_TAGVAR(lt_prog_compiler_static, $1)=
+ ;;
+
+ hpux*)
+ # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
+ # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
+ # sets the default TLS model and affects inlining.
+ case $host_cpu in
+ hppa*64*)
+ # +Z the default
+ ;;
+ *)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ ;;
+ esac
+ ;;
+
+ interix[[3-9]]*)
+ # Interix 3.x gcc -fpic/-fPIC options generate broken code.
+ # Instead, we relocate shared libraries at runtime.
+ ;;
+
+ msdosdjgpp*)
+ # Just because we use GCC doesn't mean we suddenly get shared libraries
+ # on systems that don't support them.
+ _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
+ enable_shared=no
+ ;;
+
+ *nto* | *qnx*)
+ # QNX uses GNU C++, but need to define -shared option too, otherwise
+ # it will coredump.
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
+ ;;
+
+ sysv4*MP*)
+ if test -d /usr/nec; then
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
+ fi
+ ;;
+
+ *)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ ;;
+ esac
+
+ case $cc_basename in
+ nvcc*) # Cuda Compiler Driver 2.2
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
+ if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)"
+ fi
+ ;;
+ esac
+ else
+ # PORTME Check for flag to pass linker flags through the system compiler.
+ case $host_os in
+ aix*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ if test ia64 = "$host_cpu"; then
+ # AIX 5 now supports IA64 processor
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ else
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
+ fi
+ ;;
+
+ darwin* | rhapsody*)
+ # PIC is the default on this platform
+ # Common symbols not allowed in MH_DYLIB files
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
+ case $cc_basename in
+ nagfor*)
+ # NAG Fortran compiler
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+ esac
+ ;;
+
+ mingw* | cygwin* | pw32* | os2* | cegcc*)
+ # This hack is so that the source file can tell whether it is being
+ # built for inclusion in a dll (and should export symbols for example).
+ m4_if([$1], [GCJ], [],
+ [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
+ case $host_os in
+ os2*)
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
+ ;;
+ esac
+ ;;
+
+ hpux9* | hpux10* | hpux11*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+ # not for PA HP-UX.
+ case $host_cpu in
+ hppa*64*|ia64*)
+ # +Z the default
+ ;;
+ *)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
+ ;;
+ esac
+ # Is there a better lt_prog_compiler_static that works with the bundled CC?
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
+ ;;
+
+ irix5* | irix6* | nonstopux*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ # PIC (with -KPIC) is the default.
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+ ;;
+
+ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
+ case $cc_basename in
+ # old Intel for x86_64, which still supported -KPIC.
+ ecc*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+ ;;
+ # flang / f18. f95 an alias for gfortran or flang on Debian
+ flang* | f18* | f95*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+ ;;
+ # icc used to be incompatible with GCC.
+ # ICC 10 doesn't accept -KPIC any more.
+ icc* | ifort*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+ ;;
+ # Lahey Fortran 8.1.
+ lf95*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
+ ;;
+ nagfor*)
+ # NAG Fortran compiler
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+ tcc*)
+ # Fabrice Bellard et al's Tiny C Compiler
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+ ;;
+ pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
+ # Portland Group compilers (*not* the Pentium gcc compiler,
+ # which looks to be a dead project)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+ ccc*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ # All Alpha code is PIC.
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+ ;;
+ xl* | bgxl* | bgf* | mpixl*)
+ # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
+ ;;
+ *)
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*)
+ # Sun Fortran 8.3 passes all unrecognized flags to the linker
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
+ ;;
+ *Sun\ F* | *Sun*Fortran*)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
+ ;;
+ *Sun\ C*)
+ # Sun C 5.9
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ ;;
+ *Intel*\ [[CF]]*Compiler*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+ ;;
+ *Portland\ Group*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+
+ newsos6)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+
+ *nto* | *qnx*)
+ # QNX uses GNU C++, but need to define -shared option too, otherwise
+ # it will coredump.
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
+ ;;
+
+ osf3* | osf4* | osf5*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ # All OSF/1 code is PIC.
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+ ;;
+
+ rdos*)
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+ ;;
+
+ solaris*)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ case $cc_basename in
+ f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
+ *)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
+ esac
+ ;;
+
+ sunos4*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+
+ sysv4 | sysv4.2uw2* | sysv4.3*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+
+ sysv4*MP*)
+ if test -d /usr/nec; then
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ fi
+ ;;
+
+ sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+
+ unicos*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
+ ;;
+
+ uts4*)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+
+ *)
+ _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
+ ;;
+ esac
+ fi
+])
+case $host_os in
+ # For platforms that do not support PIC, -DPIC is meaningless:
+ *djgpp*)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)=
+ ;;
+ *)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
+ ;;
+esac
+
+AC_CACHE_CHECK([for $compiler option to produce PIC],
+ [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)],
+ [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
+_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)
+
+#
+# Check to make sure the PIC flag actually works.
+#
+if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
+ _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
+ [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
+ [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
+ [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
+ "" | " "*) ;;
+ *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
+ esac],
+ [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
+ _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
+fi
+_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
+ [Additional compiler flags for building library objects])
+
+_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
+ [How to pass a linker flag through the compiler])
+#
+# Check to make sure the static flag actually works.
+#
+wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
+_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
+ _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
+ $lt_tmp_static_flag,
+ [],
+ [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
+_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
+ [Compiler flag to prevent dynamic linking])
+])# _LT_COMPILER_PIC
+
+
+# _LT_LINKER_SHLIBS([TAGNAME])
+# ----------------------------
+# See if the linker supports building shared libraries.
+m4_defun([_LT_LINKER_SHLIBS],
+[AC_REQUIRE([LT_PATH_LD])dnl
+AC_REQUIRE([LT_PATH_NM])dnl
+m4_require([_LT_PATH_MANIFEST_TOOL])dnl
+m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_DECL_EGREP])dnl
+m4_require([_LT_DECL_SED])dnl
+m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
+m4_require([_LT_TAG_COMPILER])dnl
+AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
+m4_if([$1], [CXX], [
+ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+ _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
+ case $host_os in
+ aix[[4-9]]*)
+ # If we're using GNU nm, then we don't want the "-C" option.
+ # -C means demangle to GNU nm, but means don't demangle to AIX nm.
+ # Without the "-l" option, or with the "-B" option, AIX nm treats
+ # weak defined symbols like other global defined symbols, whereas
+ # GNU nm marks them as "W".
+ # While the 'weak' keyword is ignored in the Export File, we need
+ # it in the Import File for the 'aix-soname' feature, so we have
+ # to replace the "-B" option with "-P" for AIX nm.
+ if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
+ _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
+ else
+ _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
+ fi
+ ;;
+ pw32*)
+ _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds
+ ;;
+ cygwin* | mingw* | cegcc*)
+ case $cc_basename in
+ cl*)
+ _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
+ ;;
+ *)
+ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
+ _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
+ ;;
+ esac
+ ;;
+ linux* | k*bsd*-gnu | gnu*)
+ _LT_TAGVAR(link_all_deplibs, $1)=no
+ ;;
+ *)
+ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+ ;;
+ esac
+], [
+ runpath_var=
+ _LT_TAGVAR(allow_undefined_flag, $1)=
+ _LT_TAGVAR(always_export_symbols, $1)=no
+ _LT_TAGVAR(archive_cmds, $1)=
+ _LT_TAGVAR(archive_expsym_cmds, $1)=
+ _LT_TAGVAR(compiler_needs_object, $1)=no
+ _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)=
+ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+ _LT_TAGVAR(hardcode_automatic, $1)=no
+ _LT_TAGVAR(hardcode_direct, $1)=no
+ _LT_TAGVAR(hardcode_direct_absolute, $1)=no
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=
+ _LT_TAGVAR(hardcode_minus_L, $1)=no
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
+ _LT_TAGVAR(inherit_rpath, $1)=no
+ _LT_TAGVAR(link_all_deplibs, $1)=unknown
+ _LT_TAGVAR(module_cmds, $1)=
+ _LT_TAGVAR(module_expsym_cmds, $1)=
+ _LT_TAGVAR(old_archive_from_new_cmds, $1)=
+ _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
+ _LT_TAGVAR(thread_safe_flag_spec, $1)=
+ _LT_TAGVAR(whole_archive_flag_spec, $1)=
+ # include_expsyms should be a list of space-separated symbols to be *always*
+ # included in the symbol list
+ _LT_TAGVAR(include_expsyms, $1)=
+ # exclude_expsyms can be an extended regexp of symbols to exclude
+ # it will be wrapped by ' (' and ')$', so one must not match beginning or
+ # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc',
+ # as well as any symbol that contains 'd'.
+ _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
+ # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
+ # platforms (ab)use it in PIC code, but their linkers get confused if
+ # the symbol is explicitly referenced. Since portable code cannot
+ # rely on this symbol name, it's probably fine to never include it in
+ # preloaded symbol tables.
+ # Exclude shared library initialization/finalization symbols.
+dnl Note also adjust exclude_expsyms for C++ above.
+ extract_expsyms_cmds=
+
+ case $host_os in
+ cygwin* | mingw* | pw32* | cegcc*)
+ # FIXME: the MSVC++ port hasn't been tested in a loooong time
+ # When not using gcc, we currently assume that we are using
+ # Microsoft Visual C++.
+ if test yes != "$GCC"; then
+ with_gnu_ld=no
+ fi
+ ;;
+ interix*)
+ # we just hope/assume this is gcc and not c89 (= MSVC++)
+ with_gnu_ld=yes
+ ;;
+ openbsd* | bitrig*)
+ with_gnu_ld=no
+ ;;
+ linux* | k*bsd*-gnu | gnu*)
+ _LT_TAGVAR(link_all_deplibs, $1)=no
+ ;;
+ esac
+
+ _LT_TAGVAR(ld_shlibs, $1)=yes
+
+ # On some targets, GNU ld is compatible enough with the native linker
+ # that we're better off using the native interface for both.
+ lt_use_gnu_ld_interface=no
+ if test yes = "$with_gnu_ld"; then
+ case $host_os in
+ aix*)
+ # The AIX port of GNU ld has always aspired to compatibility
+ # with the native linker. However, as the warning in the GNU ld
+ # block says, versions before 2.19.5* couldn't really create working
+ # shared libraries, regardless of the interface used.
+ case `$LD -v 2>&1` in
+ *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
+ *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;;
+ *\ \(GNU\ Binutils\)\ [[3-9]]*) ;;
+ *)
+ lt_use_gnu_ld_interface=yes
+ ;;
+ esac
+ ;;
+ *)
+ lt_use_gnu_ld_interface=yes
+ ;;
+ esac
+ fi
+
+ if test yes = "$lt_use_gnu_ld_interface"; then
+ # If archive_cmds runs LD, not CC, wlarc should be empty
+ wlarc='$wl'
+
+ # Set some defaults for GNU ld with shared library support. These
+ # are reset later if shared libraries are not supported. Putting them
+ # here allows them to be overridden if necessary.
+ runpath_var=LD_RUN_PATH
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
+ # ancient GNU ld didn't support --whole-archive et. al.
+ if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
+ _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
+ else
+ _LT_TAGVAR(whole_archive_flag_spec, $1)=
+ fi
+ supports_anon_versioning=no
+ case `$LD -v | $SED -e 's/([^)]\+)\s\+//' 2>&1` in
+ *GNU\ gold*) supports_anon_versioning=yes ;;
+ *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
+ *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
+ *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
+ *\ 2.11.*) ;; # other 2.11 versions
+ *) supports_anon_versioning=yes ;;
+ esac
+
+ # See if GNU ld supports shared libraries.
+ case $host_os in
+ aix[[3-9]]*)
+ # On AIX/PPC, the GNU linker is very broken
+ if test ia64 != "$host_cpu"; then
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ cat <<_LT_EOF 1>&2
+
+*** Warning: the GNU linker, at least up to release 2.19, is reported
+*** to be unable to reliably create shared libraries on AIX.
+*** Therefore, libtool is disabling shared libraries support. If you
+*** really care for shared libraries, you may want to install binutils
+*** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
+*** You will then need to restart the configuration process.
+
+_LT_EOF
+ fi
+ ;;
+
+ amigaos*)
+ case $host_cpu in
+ powerpc)
+ # see comment about AmigaOS4 .so support
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)=''
+ ;;
+ m68k)
+ _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ ;;
+ esac
+ ;;
+
+ beos*)
+ if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+ # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
+ # support --undefined. This deserves some investigation. FIXME
+ _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+ else
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+
+ cygwin* | mingw* | pw32* | cegcc*)
+ # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
+ # as there is no search path for DLLs.
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols'
+ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+ _LT_TAGVAR(always_export_symbols, $1)=no
+ _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
+ _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
+
+ if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+ # If the export-symbols file already is a .def file, use it as
+ # is; otherwise, prepend EXPORTS...
+ _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
+ cp $export_symbols $output_objdir/$soname.def;
+ else
+ echo EXPORTS > $output_objdir/$soname.def;
+ cat $export_symbols >> $output_objdir/$soname.def;
+ fi~
+ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+ else
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+
+ haiku*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+ _LT_TAGVAR(link_all_deplibs, $1)=yes
+ ;;
+
+ os2*)
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+ shrext_cmds=.dll
+ _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
+ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
+ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
+ $ECHO EXPORTS >> $output_objdir/$libname.def~
+ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
+ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
+ emximp -o $lib $output_objdir/$libname.def'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
+ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
+ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
+ $ECHO EXPORTS >> $output_objdir/$libname.def~
+ prefix_cmds="$SED"~
+ if test EXPORTS = "`$SED 1q $export_symbols`"; then
+ prefix_cmds="$prefix_cmds -e 1d";
+ fi~
+ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
+ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
+ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
+ emximp -o $lib $output_objdir/$libname.def'
+ _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
+ _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+ ;;
+
+ interix[[3-9]]*)
+ _LT_TAGVAR(hardcode_direct, $1)=no
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
+ # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
+ # Instead, shared libraries are loaded at an image base (0x10000000 by
+ # default) and relocated if they conflict, which is a slow very memory
+ # consuming and fragmenting process. To avoid this, we pick a random,
+ # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
+ # time. Moving up from 0x10000000 also allows more sbrk(2) space.
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+ ;;
+
+ gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
+ tmp_diet=no
+ if test linux-dietlibc = "$host_os"; then
+ case $cc_basename in
+ diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
+ esac
+ fi
+ if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
+ && test no = "$tmp_diet"
+ then
+ tmp_addflag=' $pic_flag'
+ tmp_sharedflag='-shared'
+ case $cc_basename,$host_cpu in
+ pgcc*) # Portland Group C compiler
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
+ tmp_addflag=' $pic_flag'
+ ;;
+ pgf77* | pgf90* | pgf95* | pgfortran*)
+ # Portland Group f77 and f90 compilers
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
+ tmp_addflag=' $pic_flag -Mnomain' ;;
+ ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
+ tmp_addflag=' -i_dynamic' ;;
+ efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
+ tmp_addflag=' -i_dynamic -nofor_main' ;;
+ ifc* | ifort*) # Intel Fortran compiler
+ tmp_addflag=' -nofor_main' ;;
+ lf95*) # Lahey Fortran 8.1
+ _LT_TAGVAR(whole_archive_flag_spec, $1)=
+ tmp_sharedflag='--shared' ;;
+ nagfor*) # NAGFOR 5.3
+ tmp_sharedflag='-Wl,-shared' ;;
+ xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
+ tmp_sharedflag='-qmkshrobj'
+ tmp_addflag= ;;
+ nvcc*) # Cuda Compiler Driver 2.2
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
+ _LT_TAGVAR(compiler_needs_object, $1)=yes
+ ;;
+ esac
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*) # Sun C 5.9
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
+ _LT_TAGVAR(compiler_needs_object, $1)=yes
+ tmp_sharedflag='-G' ;;
+ *Sun\ F*) # Sun Fortran 8.3
+ tmp_sharedflag='-G' ;;
+ esac
+ _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+
+ if test yes = "$supports_anon_versioning"; then
+ _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
+ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+ echo "local: *; };" >> $output_objdir/$libname.ver~
+ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
+ fi
+
+ case $cc_basename in
+ tcc*)
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic'
+ ;;
+ xlf* | bgf* | bgxlf* | mpixlf*)
+ # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
+ _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
+ if test yes = "$supports_anon_versioning"; then
+ _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
+ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+ echo "local: *; };" >> $output_objdir/$libname.ver~
+ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
+ fi
+ ;;
+ esac
+ else
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+
+ netbsd* | netbsdelf*-gnu)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+ _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
+ wlarc=
+ else
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
+ fi
+ ;;
+
+ solaris*)
+ if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ cat <<_LT_EOF 1>&2
+
+*** Warning: The releases 2.8.* of the GNU linker cannot reliably
+*** create shared libraries on Solaris systems. Therefore, libtool
+*** is disabling shared libraries support. We urge you to upgrade GNU
+*** binutils to release 2.9.1 or newer. Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
+
+_LT_EOF
+ elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
+ else
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+
+ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
+ case `$LD -v 2>&1` in
+ *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ cat <<_LT_EOF 1>&2
+
+*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot
+*** reliably create shared libraries on SCO systems. Therefore, libtool
+*** is disabling shared libraries support. We urge you to upgrade GNU
+*** binutils to release 2.16.91.0.3 or newer. Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
+
+_LT_EOF
+ ;;
+ *)
+ # For security reasons, it is highly recommended that you always
+ # use absolute paths for naming shared libraries, and exclude the
+ # DT_RUNPATH tag from executables and libraries. But doing so
+ # requires that you compile everything twice, which is a pain.
+ if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
+ else
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+ esac
+ ;;
+
+ sunos4*)
+ _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+ wlarc=
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ *)
+ if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
+ else
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+ esac
+
+ if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then
+ runpath_var=
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)=
+ _LT_TAGVAR(whole_archive_flag_spec, $1)=
+ fi
+ else
+ # PORTME fill in a description of your system's linker (not GNU ld)
+ case $host_os in
+ aix3*)
+ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+ _LT_TAGVAR(always_export_symbols, $1)=yes
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
+ # Note: this linker hardcodes the directories in LIBPATH if there
+ # are no directories specified by -L.
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then
+ # Neither direct hardcoding nor static linking is supported with a
+ # broken collect2.
+ _LT_TAGVAR(hardcode_direct, $1)=unsupported
+ fi
+ ;;
+
+ aix[[4-9]]*)
+ if test ia64 = "$host_cpu"; then
+ # On IA64, the linker does run time linking by default, so we don't
+ # have to do anything special.
+ aix_use_runtimelinking=no
+ exp_sym_flag='-Bexport'
+ no_entry_flag=
+ else
+ # If we're using GNU nm, then we don't want the "-C" option.
+ # -C means demangle to GNU nm, but means don't demangle to AIX nm.
+ # Without the "-l" option, or with the "-B" option, AIX nm treats
+ # weak defined symbols like other global defined symbols, whereas
+ # GNU nm marks them as "W".
+ # While the 'weak' keyword is ignored in the Export File, we need
+ # it in the Import File for the 'aix-soname' feature, so we have
+ # to replace the "-B" option with "-P" for AIX nm.
+ if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
+ _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
+ else
+ _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
+ fi
+ aix_use_runtimelinking=no
+
+ # Test if we are trying to use run time linking or normal
+ # AIX style linking. If -brtl is somewhere in LDFLAGS, we
+ # have runtime linking enabled, and use it for executables.
+ # For shared libraries, we enable/disable runtime linking
+ # depending on the kind of the shared library created -
+ # when "with_aix_soname,aix_use_runtimelinking" is:
+ # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables
+ # "aix,yes" lib.so shared, rtl:yes, for executables
+ # lib.a static archive
+ # "both,no" lib.so.V(shr.o) shared, rtl:yes
+ # lib.a(lib.so.V) shared, rtl:no, for executables
+ # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
+ # lib.a(lib.so.V) shared, rtl:no
+ # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables
+ # lib.a static archive
+ case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
+ for ld_flag in $LDFLAGS; do
+ if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then
+ aix_use_runtimelinking=yes
+ break
+ fi
+ done
+ if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
+ # With aix-soname=svr4, we create the lib.so.V shared archives only,
+ # so we don't have lib.a shared libs to link our executables.
+ # We have to force runtime linking in this case.
+ aix_use_runtimelinking=yes
+ LDFLAGS="$LDFLAGS -Wl,-brtl"
+ fi
+ ;;
+ esac
+
+ exp_sym_flag='-bexport'
+ no_entry_flag='-bnoentry'
+ fi
+
+ # When large executables or shared objects are built, AIX ld can
+ # have problems creating the table of contents. If linking a library
+ # or program results in "error TOC overflow" add -mminimal-toc to
+ # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
+ # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
+
+ _LT_TAGVAR(archive_cmds, $1)=''
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
+ _LT_TAGVAR(link_all_deplibs, $1)=yes
+ _LT_TAGVAR(file_list_spec, $1)='$wl-f,'
+ case $with_aix_soname,$aix_use_runtimelinking in
+ aix,*) ;; # traditional, no import file
+ svr4,* | *,yes) # use import file
+ # The Import File defines what to hardcode.
+ _LT_TAGVAR(hardcode_direct, $1)=no
+ _LT_TAGVAR(hardcode_direct_absolute, $1)=no
+ ;;
+ esac
+
+ if test yes = "$GCC"; then
+ case $host_os in aix4.[[012]]|aix4.[[012]].*)
+ # We only want to do this on AIX 4.2 and lower, the check
+ # below for broken collect2 doesn't work under 4.3+
+ collect2name=`$CC -print-prog-name=collect2`
+ if test -f "$collect2name" &&
+ strings "$collect2name" | $GREP resolve_lib_name >/dev/null
+ then
+ # We have reworked collect2
+ :
+ else
+ # We have old collect2
+ _LT_TAGVAR(hardcode_direct, $1)=unsupported
+ # It fails to find uninstalled libraries when the uninstalled
+ # path is not listed in the libpath. Setting hardcode_minus_L
+ # to unsupported forces relinking
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=
+ fi
+ ;;
+ esac
+ shared_flag='-shared'
+ if test yes = "$aix_use_runtimelinking"; then
+ shared_flag="$shared_flag "'$wl-G'
+ fi
+ # Need to ensure runtime linking is disabled for the traditional
+ # shared library, or the linker may eventually find shared libraries
+ # /with/ Import File - we do not want to mix them.
+ shared_flag_aix='-shared'
+ shared_flag_svr4='-shared $wl-G'
+ else
+ # not using gcc
+ if test ia64 = "$host_cpu"; then
+ # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
+ # chokes on -Wl,-G. The following line is correct:
+ shared_flag='-G'
+ else
+ if test yes = "$aix_use_runtimelinking"; then
+ shared_flag='$wl-G'
+ else
+ shared_flag='$wl-bM:SRE'
+ fi
+ shared_flag_aix='$wl-bM:SRE'
+ shared_flag_svr4='$wl-G'
+ fi
+ fi
+
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall'
+ # It seems that -bexpall does not export symbols beginning with
+ # underscore (_), so it is better to generate a list of symbols to export.
+ _LT_TAGVAR(always_export_symbols, $1)=yes
+ if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
+ # Warning - without using the other runtime loading flags (-brtl),
+ # -berok will link without error, but may produce a broken library.
+ _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
+ # Determine the default libpath from the value encoded in an
+ # empty executable.
+ _LT_SYS_MODULE_PATH_AIX([$1])
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag
+ else
+ if test ia64 = "$host_cpu"; then
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib'
+ _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
+ _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols"
+ else
+ # Determine the default libpath from the value encoded in an
+ # empty executable.
+ _LT_SYS_MODULE_PATH_AIX([$1])
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
+ # Warning - without using the other run time loading flags,
+ # -berok will link without error, but may produce a broken library.
+ _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok'
+ _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok'
+ if test yes = "$with_gnu_ld"; then
+ # We only use this code for GNU lds that support --whole-archive.
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
+ else
+ # Exported symbols can be pulled into shared objects from archives
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
+ fi
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
+ # -brtl affects multiple linker settings, -berok does not and is overridden later
+ compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`'
+ if test svr4 != "$with_aix_soname"; then
+ # This is similar to how AIX traditionally builds its shared libraries.
+ _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname'
+ fi
+ if test aix != "$with_aix_soname"; then
+ _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp'
+ else
+ # used by -dlpreopen to get the symbols
+ _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir'
+ fi
+ _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d'
+ fi
+ fi
+ ;;
+
+ amigaos*)
+ case $host_cpu in
+ powerpc)
+ # see comment about AmigaOS4 .so support
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)=''
+ ;;
+ m68k)
+ _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ ;;
+ esac
+ ;;
+
+ bsdi[[45]]*)
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
+ ;;
+
+ cygwin* | mingw* | pw32* | cegcc*)
+ # When not using gcc, we currently assume that we are using
+ # Microsoft Visual C++.
+ # hardcode_libdir_flag_spec is actually meaningless, as there is
+ # no search path for DLLs.
+ case $cc_basename in
+ cl*)
+ # Native MSVC
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
+ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+ _LT_TAGVAR(always_export_symbols, $1)=yes
+ _LT_TAGVAR(file_list_spec, $1)='@'
+ # Tell ltmain to make .lib files, not .a files.
+ libext=lib
+ # Tell ltmain to make .dll files, not .so files.
+ shrext_cmds=.dll
+ # FIXME: Setting linknames here is a bad hack.
+ _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
+ _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
+ cp "$export_symbols" "$output_objdir/$soname.def";
+ echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
+ else
+ $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
+ fi~
+ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
+ linknames='
+ # The linker will not automatically build a static lib if we build a DLL.
+ # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
+ _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+ _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
+ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
+ # Don't use ranlib
+ _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
+ _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
+ lt_tool_outputfile="@TOOL_OUTPUT@"~
+ case $lt_outputfile in
+ *.exe|*.EXE) ;;
+ *)
+ lt_outputfile=$lt_outputfile.exe
+ lt_tool_outputfile=$lt_tool_outputfile.exe
+ ;;
+ esac~
+ if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
+ $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
+ $RM "$lt_outputfile.manifest";
+ fi'
+ ;;
+ *)
+ # Assume MSVC wrapper
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
+ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+ # Tell ltmain to make .lib files, not .a files.
+ libext=lib
+ # Tell ltmain to make .dll files, not .so files.
+ shrext_cmds=.dll
+ # FIXME: Setting linknames here is a bad hack.
+ _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
+ # The linker will automatically build a .lib file if we build a DLL.
+ _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
+ # FIXME: Should let the user specify the lib program.
+ _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
+ _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+ ;;
+ esac
+ ;;
+
+ darwin* | rhapsody*)
+ _LT_DARWIN_LINKER_FEATURES($1)
+ ;;
+
+ dgux*)
+ _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
+ # support. Future versions do this automatically, but an explicit c++rt0.o
+ # does not break anything, and helps significantly (at the cost of a little
+ # extra space).
+ freebsd2.2*)
+ _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ # Unfortunately, older versions of FreeBSD 2 do not have this feature.
+ freebsd2.*)
+ _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
+ freebsd* | dragonfly*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ hpux9*)
+ if test yes = "$GCC"; then
+ _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
+ else
+ _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
+ fi
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
+ ;;
+
+ hpux10*)
+ if test yes,no = "$GCC,$with_gnu_ld"; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
+ fi
+ if test no = "$with_gnu_ld"; then
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ fi
+ ;;
+
+ hpux11*)
+ if test yes,no = "$GCC,$with_gnu_ld"; then
+ case $host_cpu in
+ hppa*64*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ ia64*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ *)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ esac
+ else
+ case $host_cpu in
+ hppa*64*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ ia64*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ *)
+ m4_if($1, [], [
+ # Older versions of the 11.00 compiler do not understand -b yet
+ # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
+ _LT_LINKER_OPTION([if $CC understands -b],
+ _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
+ [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
+ [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
+ [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
+ ;;
+ esac
+ fi
+ if test no = "$with_gnu_ld"; then
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+
+ case $host_cpu in
+ hppa*64*|ia64*)
+ _LT_TAGVAR(hardcode_direct, $1)=no
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+ *)
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
+
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ ;;
+ esac
+ fi
+ ;;
+
+ irix5* | irix6* | nonstopux*)
+ if test yes = "$GCC"; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
+ # Try to use the -exported_symbol ld option, if it does not
+ # work, assume that -exports_file does not work either and
+ # implicitly export all symbols.
+ # This should be the same for all languages, so no per-tag cache variable.
+ AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol],
+ [lt_cv_irix_exported_symbol],
+ [save_LDFLAGS=$LDFLAGS
+ LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null"
+ AC_LINK_IFELSE(
+ [AC_LANG_SOURCE(
+ [AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
+ [C++], [[int foo (void) { return 0; }]],
+ [Fortran 77], [[
+ subroutine foo
+ end]],
+ [Fortran], [[
+ subroutine foo
+ end]])])],
+ [lt_cv_irix_exported_symbol=yes],
+ [lt_cv_irix_exported_symbol=no])
+ LDFLAGS=$save_LDFLAGS])
+ if test yes = "$lt_cv_irix_exported_symbol"; then
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib'
+ fi
+ _LT_TAGVAR(link_all_deplibs, $1)=no
+ else
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib'
+ fi
+ _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+ _LT_TAGVAR(inherit_rpath, $1)=yes
+ _LT_TAGVAR(link_all_deplibs, $1)=yes
+ ;;
+
+ linux*)
+ case $cc_basename in
+ tcc*)
+ # Fabrice Bellard et al's Tiny C Compiler
+ _LT_TAGVAR(ld_shlibs, $1)=yes
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ esac
+ ;;
+
+ netbsd* | netbsdelf*-gnu)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+ _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
+ else
+ _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
+ fi
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ newsos6)
+ _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ *nto* | *qnx*)
+ ;;
+
+ openbsd* | bitrig*)
+ if test -f /usr/libexec/ld.so; then
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
+ else
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
+ fi
+ else
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+
+ os2*)
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+ shrext_cmds=.dll
+ _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
+ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
+ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
+ $ECHO EXPORTS >> $output_objdir/$libname.def~
+ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
+ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
+ emximp -o $lib $output_objdir/$libname.def'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
+ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
+ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
+ $ECHO EXPORTS >> $output_objdir/$libname.def~
+ prefix_cmds="$SED"~
+ if test EXPORTS = "`$SED 1q $export_symbols`"; then
+ prefix_cmds="$prefix_cmds -e 1d";
+ fi~
+ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
+ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
+ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
+ emximp -o $lib $output_objdir/$libname.def'
+ _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
+ _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+ ;;
+
+ osf3*)
+ if test yes = "$GCC"; then
+ _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
+ else
+ _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
+ fi
+ _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+ ;;
+
+ osf4* | osf5*) # as osf3* with the addition of -msym flag
+ if test yes = "$GCC"; then
+ _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
+ else
+ _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
+ $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.exp'
+
+ # Both c and cxx compiler support -rpath directly
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
+ fi
+ _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+ ;;
+
+ solaris*)
+ _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
+ if test yes = "$GCC"; then
+ wlarc='$wl'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
+ else
+ case `$CC -V 2>&1` in
+ *"Compilers 5.0"*)
+ wlarc=''
+ _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
+ ;;
+ *)
+ wlarc='$wl'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
+ ;;
+ esac
+ fi
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ case $host_os in
+ solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
+ *)
+ # The compiler driver will combine and reorder linker options,
+ # but understands '-z linker_flag'. GCC discards it without '$wl',
+ # but is careful enough not to reorder.
+ # Supported since Solaris 2.6 (maybe 2.5.1?)
+ if test yes = "$GCC"; then
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
+ else
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
+ fi
+ ;;
+ esac
+ _LT_TAGVAR(link_all_deplibs, $1)=yes
+ ;;
+
+ sunos4*)
+ if test sequent = "$host_vendor"; then
+ # Use $CC to link under sequent, because it throws in some extra .o
+ # files that make .init and .fini sections work.
+ _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
+ fi
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ sysv4)
+ case $host_vendor in
+ sni)
+ _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
+ ;;
+ siemens)
+ ## LD is ld it makes a PLAMLIB
+ ## CC just makes a GrossModule.
+ _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
+ _LT_TAGVAR(hardcode_direct, $1)=no
+ ;;
+ motorola)
+ _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
+ ;;
+ esac
+ runpath_var='LD_RUN_PATH'
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ sysv4.3*)
+ _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
+ ;;
+
+ sysv4*MP*)
+ if test -d /usr/nec; then
+ _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ runpath_var=LD_RUN_PATH
+ hardcode_runpath_var=yes
+ _LT_TAGVAR(ld_shlibs, $1)=yes
+ fi
+ ;;
+
+ sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
+ _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ runpath_var='LD_RUN_PATH'
+
+ if test yes = "$GCC"; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ fi
+ ;;
+
+ sysv5* | sco3.2v5* | sco5v6*)
+ # Note: We CANNOT use -z defs as we might desire, because we do not
+ # link with -lc, and that would cause any symbols used from libc to
+ # always be unresolved, which means just about no library would
+ # ever link correctly. If we're not using GNU ld we use -z text
+ # though, which does catch some bad symbols but isn't as heavy-handed
+ # as -z defs.
+ _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
+ _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs'
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
+ _LT_TAGVAR(link_all_deplibs, $1)=yes
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport'
+ runpath_var='LD_RUN_PATH'
+
+ if test yes = "$GCC"; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ fi
+ ;;
+
+ uts4*)
+ _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ *)
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ esac
+
+ if test sni = "$host_vendor"; then
+ case $host in
+ sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym'
+ ;;
+ esac
+ fi
+ fi
+])
+AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
+test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no
+
+_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
+
+_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
+_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
+_LT_DECL([], [extract_expsyms_cmds], [2],
+ [The commands to extract the exported symbol list from a shared archive])
+
+#
+# Do we need to explicitly link libc?
+#
+case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
+x|xyes)
+ # Assume -lc should be added
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
+
+ if test yes,yes = "$GCC,$enable_shared"; then
+ case $_LT_TAGVAR(archive_cmds, $1) in
+ *'~'*)
+ # FIXME: we may have to deal with multi-command sequences.
+ ;;
+ '$CC '*)
+ # Test whether the compiler implicitly links with -lc since on some
+ # systems, -lgcc has to come before -lc. If gcc already passes -lc
+ # to ld, don't add -lc before -lgcc.
+ AC_CACHE_CHECK([whether -lc should be explicitly linked in],
+ [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
+ [$RM conftest*
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+ if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
+ soname=conftest
+ lib=conftest
+ libobjs=conftest.$ac_objext
+ deplibs=
+ wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
+ pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
+ compiler_flags=-v
+ linker_flags=-v
+ verstring=
+ output_objdir=.
+ libname=conftest
+ lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
+ _LT_TAGVAR(allow_undefined_flag, $1)=
+ if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
+ then
+ lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
+ else
+ lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
+ fi
+ _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
+ else
+ cat conftest.err 1>&5
+ fi
+ $RM conftest*
+ ])
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
+ ;;
+ esac
+ fi
+ ;;
+esac
+
+_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
+ [Whether or not to add -lc for building shared libraries])
+_LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
+ [enable_shared_with_static_runtimes], [0],
+ [Whether or not to disallow shared libs when runtime libs are static])
+_LT_TAGDECL([], [export_dynamic_flag_spec], [1],
+ [Compiler flag to allow reflexive dlopens])
+_LT_TAGDECL([], [whole_archive_flag_spec], [1],
+ [Compiler flag to generate shared objects directly from archives])
+_LT_TAGDECL([], [compiler_needs_object], [1],
+ [Whether the compiler copes with passing no objects directly])
+_LT_TAGDECL([], [old_archive_from_new_cmds], [2],
+ [Create an old-style archive from a shared archive])
+_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
+ [Create a temporary old-style archive to link instead of a shared archive])
+_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
+_LT_TAGDECL([], [archive_expsym_cmds], [2])
+_LT_TAGDECL([], [module_cmds], [2],
+ [Commands used to build a loadable module if different from building
+ a shared archive.])
+_LT_TAGDECL([], [module_expsym_cmds], [2])
+_LT_TAGDECL([], [with_gnu_ld], [1],
+ [Whether we are building with GNU ld or not])
+_LT_TAGDECL([], [allow_undefined_flag], [1],
+ [Flag that allows shared libraries with undefined symbols to be built])
+_LT_TAGDECL([], [no_undefined_flag], [1],
+ [Flag that enforces no undefined symbols])
+_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
+ [Flag to hardcode $libdir into a binary during linking.
+ This must work even if $libdir does not exist])
+_LT_TAGDECL([], [hardcode_libdir_separator], [1],
+ [Whether we need a single "-rpath" flag with a separated argument])
+_LT_TAGDECL([], [hardcode_direct], [0],
+ [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes
+ DIR into the resulting binary])
+_LT_TAGDECL([], [hardcode_direct_absolute], [0],
+ [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes
+ DIR into the resulting binary and the resulting library dependency is
+ "absolute", i.e impossible to change by setting $shlibpath_var if the
+ library is relocated])
+_LT_TAGDECL([], [hardcode_minus_L], [0],
+ [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
+ into the resulting binary])
+_LT_TAGDECL([], [hardcode_shlibpath_var], [0],
+ [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
+ into the resulting binary])
+_LT_TAGDECL([], [hardcode_automatic], [0],
+ [Set to "yes" if building a shared library automatically hardcodes DIR
+ into the library and all subsequent libraries and executables linked
+ against it])
+_LT_TAGDECL([], [inherit_rpath], [0],
+ [Set to yes if linker adds runtime paths of dependent libraries
+ to runtime path list])
+_LT_TAGDECL([], [link_all_deplibs], [0],
+ [Whether libtool must link a program against all its dependency libraries])
+_LT_TAGDECL([], [always_export_symbols], [0],
+ [Set to "yes" if exported symbols are required])
+_LT_TAGDECL([], [export_symbols_cmds], [2],
+ [The commands to list exported symbols])
+_LT_TAGDECL([], [exclude_expsyms], [1],
+ [Symbols that should not be listed in the preloaded symbols])
+_LT_TAGDECL([], [include_expsyms], [1],
+ [Symbols that must always be exported])
+_LT_TAGDECL([], [prelink_cmds], [2],
+ [Commands necessary for linking programs (against libraries) with templates])
+_LT_TAGDECL([], [postlink_cmds], [2],
+ [Commands necessary for finishing linking programs])
+_LT_TAGDECL([], [file_list_spec], [1],
+ [Specify filename containing input files])
+dnl FIXME: Not yet implemented
+dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
+dnl [Compiler flag to generate thread safe objects])
+])# _LT_LINKER_SHLIBS
+
+
+# _LT_LANG_C_CONFIG([TAG])
+# ------------------------
+# Ensure that the configuration variables for a C compiler are suitably
+# defined. These variables are subsequently used by _LT_CONFIG to write
+# the compiler configuration to 'libtool'.
+m4_defun([_LT_LANG_C_CONFIG],
+[m4_require([_LT_DECL_EGREP])dnl
+lt_save_CC=$CC
+AC_LANG_PUSH(C)
+
+# Source file extension for C test sources.
+ac_ext=c
+
+# Object file extension for compiled C test sources.
+objext=o
+_LT_TAGVAR(objext, $1)=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="int some_variable = 0;"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='int main(){return(0);}'
+
+_LT_TAG_COMPILER
+# Save the default compiler, since it gets overwritten when the other
+# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
+compiler_DEFAULT=$CC
+
+# save warnings/boilerplate of simple test code
+_LT_COMPILER_BOILERPLATE
+_LT_LINKER_BOILERPLATE
+
+## CAVEAT EMPTOR:
+## There is no encapsulation within the following macros, do not change
+## the running order or otherwise move them around unless you know exactly
+## what you are doing...
+if test -n "$compiler"; then
+ _LT_COMPILER_NO_RTTI($1)
+ _LT_COMPILER_PIC($1)
+ _LT_COMPILER_C_O($1)
+ _LT_COMPILER_FILE_LOCKS($1)
+ _LT_LINKER_SHLIBS($1)
+ _LT_SYS_DYNAMIC_LINKER($1)
+ _LT_LINKER_HARDCODE_LIBPATH($1)
+ LT_SYS_DLOPEN_SELF
+ _LT_CMD_STRIPLIB
+
+ # Report what library types will actually be built
+ AC_MSG_CHECKING([if libtool supports shared libraries])
+ AC_MSG_RESULT([$can_build_shared])
+
+ AC_MSG_CHECKING([whether to build shared libraries])
+ test no = "$can_build_shared" && enable_shared=no
+
+ # On AIX, shared libraries and static libraries use the same namespace, and
+ # are all built from PIC.
+ case $host_os in
+ aix3*)
+ test yes = "$enable_shared" && enable_static=no
+ if test -n "$RANLIB"; then
+ archive_cmds="$archive_cmds~\$RANLIB \$lib"
+ postinstall_cmds='$RANLIB $lib'
+ fi
+ ;;
+
+ aix[[4-9]]*)
+ if test ia64 != "$host_cpu"; then
+ case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
+ yes,aix,yes) ;; # shared object as lib.so file only
+ yes,svr4,*) ;; # shared object as lib.so archive member only
+ yes,*) enable_static=no ;; # shared object in lib.a archive as well
+ esac
+ fi
+ ;;
+ esac
+ AC_MSG_RESULT([$enable_shared])
+
+ AC_MSG_CHECKING([whether to build static libraries])
+ # Make sure either enable_shared or enable_static is yes.
+ test yes = "$enable_shared" || enable_static=yes
+ AC_MSG_RESULT([$enable_static])
+
+ _LT_CONFIG($1)
+fi
+AC_LANG_POP
+CC=$lt_save_CC
+])# _LT_LANG_C_CONFIG
+
+
+# _LT_LANG_CXX_CONFIG([TAG])
+# --------------------------
+# Ensure that the configuration variables for a C++ compiler are suitably
+# defined. These variables are subsequently used by _LT_CONFIG to write
+# the compiler configuration to 'libtool'.
+m4_defun([_LT_LANG_CXX_CONFIG],
+[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_DECL_EGREP])dnl
+m4_require([_LT_PATH_MANIFEST_TOOL])dnl
+if test -n "$CXX" && ( test no != "$CXX" &&
+ ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) ||
+ (test g++ != "$CXX"))); then
+ AC_PROG_CXXCPP
+else
+ _lt_caught_CXX_error=yes
+fi
+
+AC_LANG_PUSH(C++)
+_LT_TAGVAR(archive_cmds_need_lc, $1)=no
+_LT_TAGVAR(allow_undefined_flag, $1)=
+_LT_TAGVAR(always_export_symbols, $1)=no
+_LT_TAGVAR(archive_expsym_cmds, $1)=
+_LT_TAGVAR(compiler_needs_object, $1)=no
+_LT_TAGVAR(export_dynamic_flag_spec, $1)=
+_LT_TAGVAR(hardcode_direct, $1)=no
+_LT_TAGVAR(hardcode_direct_absolute, $1)=no
+_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
+_LT_TAGVAR(hardcode_libdir_separator, $1)=
+_LT_TAGVAR(hardcode_minus_L, $1)=no
+_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
+_LT_TAGVAR(hardcode_automatic, $1)=no
+_LT_TAGVAR(inherit_rpath, $1)=no
+_LT_TAGVAR(module_cmds, $1)=
+_LT_TAGVAR(module_expsym_cmds, $1)=
+_LT_TAGVAR(link_all_deplibs, $1)=unknown
+_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+_LT_TAGVAR(reload_flag, $1)=$reload_flag
+_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
+_LT_TAGVAR(no_undefined_flag, $1)=
+_LT_TAGVAR(whole_archive_flag_spec, $1)=
+_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
+
+# Source file extension for C++ test sources.
+ac_ext=cpp
+
+# Object file extension for compiled C++ test sources.
+objext=o
+_LT_TAGVAR(objext, $1)=$objext
+
+# No sense in running all these tests if we already determined that
+# the CXX compiler isn't working. Some variables (like enable_shared)
+# are currently assumed to apply to all compilers on this platform,
+# and will be corrupted by setting them based on a non-working compiler.
+if test yes != "$_lt_caught_CXX_error"; then
+ # Code to be used in simple compile tests
+ lt_simple_compile_test_code="int some_variable = 0;"
+
+ # Code to be used in simple link tests
+ lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
+
+ # ltmain only uses $CC for tagged configurations so make sure $CC is set.
+ _LT_TAG_COMPILER
+
+ # save warnings/boilerplate of simple test code
+ _LT_COMPILER_BOILERPLATE
+ _LT_LINKER_BOILERPLATE
+
+ # Allow CC to be a program name with arguments.
+ lt_save_CC=$CC
+ lt_save_CFLAGS=$CFLAGS
+ lt_save_LD=$LD
+ lt_save_GCC=$GCC
+ GCC=$GXX
+ lt_save_with_gnu_ld=$with_gnu_ld
+ lt_save_path_LD=$lt_cv_path_LD
+ if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
+ lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
+ else
+ $as_unset lt_cv_prog_gnu_ld
+ fi
+ if test -n "${lt_cv_path_LDCXX+set}"; then
+ lt_cv_path_LD=$lt_cv_path_LDCXX
+ else
+ $as_unset lt_cv_path_LD
+ fi
+ test -z "${LDCXX+set}" || LD=$LDCXX
+ CC=${CXX-"c++"}
+ CFLAGS=$CXXFLAGS
+ compiler=$CC
+ _LT_TAGVAR(compiler, $1)=$CC
+ _LT_CC_BASENAME([$compiler])
+
+ if test -n "$compiler"; then
+ # We don't want -fno-exception when compiling C++ code, so set the
+ # no_builtin_flag separately
+ if test yes = "$GXX"; then
+ _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
+ else
+ _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
+ fi
+
+ if test yes = "$GXX"; then
+ # Set up default GNU C++ configuration
+
+ LT_PATH_LD
+
+ # Check if GNU C++ uses GNU ld as the underlying linker, since the
+ # archiving commands below assume that GNU ld is being used.
+ if test yes = "$with_gnu_ld"; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
+
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
+
+ # If archive_cmds runs LD, not CC, wlarc should be empty
+ # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
+ # investigate it a little bit more. (MM)
+ wlarc='$wl'
+
+ # ancient GNU ld didn't support --whole-archive et. al.
+ if eval "`$CC -print-prog-name=ld` --help 2>&1" |
+ $GREP 'no-whole-archive' > /dev/null; then
+ _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
+ else
+ _LT_TAGVAR(whole_archive_flag_spec, $1)=
+ fi
+ else
+ with_gnu_ld=no
+ wlarc=
+
+ # A generic and very simple default shared library creation
+ # command for GNU C++ for the case where it uses the native
+ # linker, instead of GNU ld. If possible, this setting should
+ # overridden to take advantage of the native linker features on
+ # the platform it is being used on.
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
+ fi
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"'
+
+ else
+ GXX=no
+ with_gnu_ld=no
+ wlarc=
+ fi
+
+ # PORTME: fill in a description of your system's C++ link characteristics
+ AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
+ _LT_TAGVAR(ld_shlibs, $1)=yes
+ case $host_os in
+ aix3*)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ aix[[4-9]]*)
+ if test ia64 = "$host_cpu"; then
+ # On IA64, the linker does run time linking by default, so we don't
+ # have to do anything special.
+ aix_use_runtimelinking=no
+ exp_sym_flag='-Bexport'
+ no_entry_flag=
+ else
+ aix_use_runtimelinking=no
+
+ # Test if we are trying to use run time linking or normal
+ # AIX style linking. If -brtl is somewhere in LDFLAGS, we
+ # have runtime linking enabled, and use it for executables.
+ # For shared libraries, we enable/disable runtime linking
+ # depending on the kind of the shared library created -
+ # when "with_aix_soname,aix_use_runtimelinking" is:
+ # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables
+ # "aix,yes" lib.so shared, rtl:yes, for executables
+ # lib.a static archive
+ # "both,no" lib.so.V(shr.o) shared, rtl:yes
+ # lib.a(lib.so.V) shared, rtl:no, for executables
+ # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
+ # lib.a(lib.so.V) shared, rtl:no
+ # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables
+ # lib.a static archive
+ case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
+ for ld_flag in $LDFLAGS; do
+ case $ld_flag in
+ *-brtl*)
+ aix_use_runtimelinking=yes
+ break
+ ;;
+ esac
+ done
+ if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
+ # With aix-soname=svr4, we create the lib.so.V shared archives only,
+ # so we don't have lib.a shared libs to link our executables.
+ # We have to force runtime linking in this case.
+ aix_use_runtimelinking=yes
+ LDFLAGS="$LDFLAGS -Wl,-brtl"
+ fi
+ ;;
+ esac
+
+ exp_sym_flag='-bexport'
+ no_entry_flag='-bnoentry'
+ fi
+
+ # When large executables or shared objects are built, AIX ld can
+ # have problems creating the table of contents. If linking a library
+ # or program results in "error TOC overflow" add -mminimal-toc to
+ # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
+ # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
+
+ _LT_TAGVAR(archive_cmds, $1)=''
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
+ _LT_TAGVAR(link_all_deplibs, $1)=yes
+ _LT_TAGVAR(file_list_spec, $1)='$wl-f,'
+ case $with_aix_soname,$aix_use_runtimelinking in
+ aix,*) ;; # no import file
+ svr4,* | *,yes) # use import file
+ # The Import File defines what to hardcode.
+ _LT_TAGVAR(hardcode_direct, $1)=no
+ _LT_TAGVAR(hardcode_direct_absolute, $1)=no
+ ;;
+ esac
+
+ if test yes = "$GXX"; then
+ case $host_os in aix4.[[012]]|aix4.[[012]].*)
+ # We only want to do this on AIX 4.2 and lower, the check
+ # below for broken collect2 doesn't work under 4.3+
+ collect2name=`$CC -print-prog-name=collect2`
+ if test -f "$collect2name" &&
+ strings "$collect2name" | $GREP resolve_lib_name >/dev/null
+ then
+ # We have reworked collect2
+ :
+ else
+ # We have old collect2
+ _LT_TAGVAR(hardcode_direct, $1)=unsupported
+ # It fails to find uninstalled libraries when the uninstalled
+ # path is not listed in the libpath. Setting hardcode_minus_L
+ # to unsupported forces relinking
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=
+ fi
+ esac
+ shared_flag='-shared'
+ if test yes = "$aix_use_runtimelinking"; then
+ shared_flag=$shared_flag' $wl-G'
+ fi
+ # Need to ensure runtime linking is disabled for the traditional
+ # shared library, or the linker may eventually find shared libraries
+ # /with/ Import File - we do not want to mix them.
+ shared_flag_aix='-shared'
+ shared_flag_svr4='-shared $wl-G'
+ else
+ # not using gcc
+ if test ia64 = "$host_cpu"; then
+ # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
+ # chokes on -Wl,-G. The following line is correct:
+ shared_flag='-G'
+ else
+ if test yes = "$aix_use_runtimelinking"; then
+ shared_flag='$wl-G'
+ else
+ shared_flag='$wl-bM:SRE'
+ fi
+ shared_flag_aix='$wl-bM:SRE'
+ shared_flag_svr4='$wl-G'
+ fi
+ fi
+
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall'
+ # It seems that -bexpall does not export symbols beginning with
+ # underscore (_), so it is better to generate a list of symbols to
+ # export.
+ _LT_TAGVAR(always_export_symbols, $1)=yes
+ if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
+ # Warning - without using the other runtime loading flags (-brtl),
+ # -berok will link without error, but may produce a broken library.
+ # The "-G" linker flag allows undefined symbols.
+ _LT_TAGVAR(no_undefined_flag, $1)='-bernotok'
+ # Determine the default libpath from the value encoded in an empty
+ # executable.
+ _LT_SYS_MODULE_PATH_AIX([$1])
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
+
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag
+ else
+ if test ia64 = "$host_cpu"; then
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib'
+ _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
+ _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols"
+ else
+ # Determine the default libpath from the value encoded in an
+ # empty executable.
+ _LT_SYS_MODULE_PATH_AIX([$1])
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
+ # Warning - without using the other run time loading flags,
+ # -berok will link without error, but may produce a broken library.
+ _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok'
+ _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok'
+ if test yes = "$with_gnu_ld"; then
+ # We only use this code for GNU lds that support --whole-archive.
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
+ else
+ # Exported symbols can be pulled into shared objects from archives
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
+ fi
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
+ # -brtl affects multiple linker settings, -berok does not and is overridden later
+ compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`'
+ if test svr4 != "$with_aix_soname"; then
+ # This is similar to how AIX traditionally builds its shared
+ # libraries. Need -bnortl late, we may have -brtl in LDFLAGS.
+ _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname'
+ fi
+ if test aix != "$with_aix_soname"; then
+ _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp'
+ else
+ # used by -dlpreopen to get the symbols
+ _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir'
+ fi
+ _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d'
+ fi
+ fi
+ ;;
+
+ beos*)
+ if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+ # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
+ # support --undefined. This deserves some investigation. FIXME
+ _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+ else
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+
+ chorus*)
+ case $cc_basename in
+ *)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ esac
+ ;;
+
+ cygwin* | mingw* | pw32* | cegcc*)
+ case $GXX,$cc_basename in
+ ,cl* | no,cl*)
+ # Native MSVC
+ # hardcode_libdir_flag_spec is actually meaningless, as there is
+ # no search path for DLLs.
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
+ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+ _LT_TAGVAR(always_export_symbols, $1)=yes
+ _LT_TAGVAR(file_list_spec, $1)='@'
+ # Tell ltmain to make .lib files, not .a files.
+ libext=lib
+ # Tell ltmain to make .dll files, not .so files.
+ shrext_cmds=.dll
+ # FIXME: Setting linknames here is a bad hack.
+ _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
+ _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
+ cp "$export_symbols" "$output_objdir/$soname.def";
+ echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
+ else
+ $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
+ fi~
+ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
+ linknames='
+ # The linker will not automatically build a static lib if we build a DLL.
+ # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
+ _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+ # Don't use ranlib
+ _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
+ _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
+ lt_tool_outputfile="@TOOL_OUTPUT@"~
+ case $lt_outputfile in
+ *.exe|*.EXE) ;;
+ *)
+ lt_outputfile=$lt_outputfile.exe
+ lt_tool_outputfile=$lt_tool_outputfile.exe
+ ;;
+ esac~
+ func_to_tool_file "$lt_outputfile"~
+ if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
+ $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
+ $RM "$lt_outputfile.manifest";
+ fi'
+ ;;
+ *)
+ # g++
+ # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
+ # as there is no search path for DLLs.
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols'
+ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+ _LT_TAGVAR(always_export_symbols, $1)=no
+ _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+
+ if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+ # If the export-symbols file already is a .def file, use it as
+ # is; otherwise, prepend EXPORTS...
+ _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
+ cp $export_symbols $output_objdir/$soname.def;
+ else
+ echo EXPORTS > $output_objdir/$soname.def;
+ cat $export_symbols >> $output_objdir/$soname.def;
+ fi~
+ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+ else
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+ esac
+ ;;
+ darwin* | rhapsody*)
+ _LT_DARWIN_LINKER_FEATURES($1)
+ ;;
+
+ os2*)
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+ shrext_cmds=.dll
+ _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
+ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
+ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
+ $ECHO EXPORTS >> $output_objdir/$libname.def~
+ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
+ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
+ emximp -o $lib $output_objdir/$libname.def'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
+ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
+ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
+ $ECHO EXPORTS >> $output_objdir/$libname.def~
+ prefix_cmds="$SED"~
+ if test EXPORTS = "`$SED 1q $export_symbols`"; then
+ prefix_cmds="$prefix_cmds -e 1d";
+ fi~
+ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
+ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
+ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
+ emximp -o $lib $output_objdir/$libname.def'
+ _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
+ _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+ ;;
+
+ dgux*)
+ case $cc_basename in
+ ec++*)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ ghcx*)
+ # Green Hills C++ Compiler
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ *)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ esac
+ ;;
+
+ freebsd2.*)
+ # C++ shared libraries reported to be fairly broken before
+ # switch to ELF
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+
+ freebsd-elf*)
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+ ;;
+
+ freebsd* | dragonfly*)
+ # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
+ # conventions
+ _LT_TAGVAR(ld_shlibs, $1)=yes
+ ;;
+
+ haiku*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+ _LT_TAGVAR(link_all_deplibs, $1)=yes
+ ;;
+
+ hpux9*)
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
+ # but as the default
+ # location of the library.
+
+ case $cc_basename in
+ CC*)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ aCC*)
+ _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ #
+ # There doesn't appear to be a way to prevent this compiler from
+ # explicitly linking system object files so we need to strip them
+ # from the output so that they don't get included in the library
+ # dependencies.
+ output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP " \-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
+ ;;
+ *)
+ if test yes = "$GXX"; then
+ _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
+ else
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+ esac
+ ;;
+
+ hpux10*|hpux11*)
+ if test no = "$with_gnu_ld"; then
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+
+ case $host_cpu in
+ hppa*64*|ia64*)
+ ;;
+ *)
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
+ ;;
+ esac
+ fi
+ case $host_cpu in
+ hppa*64*|ia64*)
+ _LT_TAGVAR(hardcode_direct, $1)=no
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+ *)
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
+ # but as the default
+ # location of the library.
+ ;;
+ esac
+
+ case $cc_basename in
+ CC*)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ aCC*)
+ case $host_cpu in
+ hppa*64*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ ;;
+ ia64*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ ;;
+ *)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ ;;
+ esac
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ #
+ # There doesn't appear to be a way to prevent this compiler from
+ # explicitly linking system object files so we need to strip them
+ # from the output so that they don't get included in the library
+ # dependencies.
+ output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP " \-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
+ ;;
+ *)
+ if test yes = "$GXX"; then
+ if test no = "$with_gnu_ld"; then
+ case $host_cpu in
+ hppa*64*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ ;;
+ ia64*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ ;;
+ *)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ ;;
+ esac
+ fi
+ else
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+ esac
+ ;;
+
+ interix[[3-9]]*)
+ _LT_TAGVAR(hardcode_direct, $1)=no
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
+ # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
+ # Instead, shared libraries are loaded at an image base (0x10000000 by
+ # default) and relocated if they conflict, which is a slow very memory
+ # consuming and fragmenting process. To avoid this, we pick a random,
+ # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
+ # time. Moving up from 0x10000000 also allows more sbrk(2) space.
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+ ;;
+ irix5* | irix6*)
+ case $cc_basename in
+ CC*)
+ # SGI C++
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
+
+ # Archives containing C++ object files must be created using
+ # "CC -ar", where "CC" is the IRIX C++ compiler. This is
+ # necessary to make sure instantiated templates are included
+ # in the archive.
+ _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
+ ;;
+ *)
+ if test yes = "$GXX"; then
+ if test no = "$with_gnu_ld"; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
+ else
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` -o $lib'
+ fi
+ fi
+ _LT_TAGVAR(link_all_deplibs, $1)=yes
+ ;;
+ esac
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+ _LT_TAGVAR(inherit_rpath, $1)=yes
+ ;;
+
+ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
+ case $cc_basename in
+ KCC*)
+ # Kuck and Associates, Inc. (KAI) C++ Compiler
+
+ # KCC will only create a shared library if the output file
+ # ends with ".so" (or ".sl" for HP-UX), so rename the library
+ # to its proper name (with version) after linking.
+ _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib $wl-retain-symbols-file,$export_symbols; mv \$templib $lib'
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ #
+ # There doesn't appear to be a way to prevent this compiler from
+ # explicitly linking system object files so we need to strip them
+ # from the output so that they don't get included in the library
+ # dependencies.
+ output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
+
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
+
+ # Archives containing C++ object files must be created using
+ # "CC -Bstatic", where "CC" is the KAI C++ compiler.
+ _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
+ ;;
+ icpc* | ecpc* )
+ # Intel C++
+ with_gnu_ld=yes
+ # version 8.0 and above of icpc choke on multiply defined symbols
+ # if we add $predep_objects and $postdep_objects, however 7.1 and
+ # earlier do not add the objects themselves.
+ case `$CC -V 2>&1` in
+ *"Version 7."*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
+ ;;
+ *) # Version 8.0 or newer
+ tmp_idyn=
+ case $host_cpu in
+ ia64*) tmp_idyn=' -i_dynamic';;
+ esac
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
+ ;;
+ esac
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
+ ;;
+ pgCC* | pgcpp*)
+ # Portland Group C++ compiler
+ case `$CC -V` in
+ *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
+ _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
+ rm -rf $tpldir~
+ $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
+ compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
+ _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
+ rm -rf $tpldir~
+ $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
+ $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
+ $RANLIB $oldlib'
+ _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
+ rm -rf $tpldir~
+ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
+ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
+ rm -rf $tpldir~
+ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
+ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
+ ;;
+ *) # Version 6 and above use weak symbols
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
+ ;;
+ esac
+
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
+ ;;
+ cxx*)
+ # Compaq C++
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib $wl-retain-symbols-file $wl$export_symbols'
+
+ runpath_var=LD_RUN_PATH
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ #
+ # There doesn't appear to be a way to prevent this compiler from
+ # explicitly linking system object files so we need to strip them
+ # from the output so that they don't get included in the library
+ # dependencies.
+ output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed'
+ ;;
+ xl* | mpixl* | bgxl*)
+ # IBM XL 8.0 on PPC, with GNU ld
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+ if test yes = "$supports_anon_versioning"; then
+ _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
+ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+ echo "local: *; };" >> $output_objdir/$libname.ver~
+ $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
+ fi
+ ;;
+ *)
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*)
+ # Sun C++ 5.9
+ _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file $wl$export_symbols'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
+ _LT_TAGVAR(compiler_needs_object, $1)=yes
+
+ # Not sure whether something based on
+ # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
+ # would be better.
+ output_verbose_link_cmd='func_echo_all'
+
+ # Archives containing C++ object files must be created using
+ # "CC -xar", where "CC" is the Sun C++ compiler. This is
+ # necessary to make sure instantiated templates are included
+ # in the archive.
+ _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+
+ lynxos*)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+
+ m88k*)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+
+ mvs*)
+ case $cc_basename in
+ cxx*)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ *)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ esac
+ ;;
+
+ netbsd*)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+ _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
+ wlarc=
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ fi
+ # Workaround some broken pre-1.5 toolchains
+ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
+ ;;
+
+ *nto* | *qnx*)
+ _LT_TAGVAR(ld_shlibs, $1)=yes
+ ;;
+
+ openbsd* | bitrig*)
+ if test -f /usr/libexec/ld.so; then
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
+ if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file,$export_symbols -o $lib'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
+ _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
+ fi
+ output_verbose_link_cmd=func_echo_all
+ else
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+
+ osf3* | osf4* | osf5*)
+ case $cc_basename in
+ KCC*)
+ # Kuck and Associates, Inc. (KAI) C++ Compiler
+
+ # KCC will only create a shared library if the output file
+ # ends with ".so" (or ".sl" for HP-UX), so rename the library
+ # to its proper name (with version) after linking.
+ _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+
+ # Archives containing C++ object files must be created using
+ # the KAI C++ compiler.
+ case $host in
+ osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
+ *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
+ esac
+ ;;
+ RCC*)
+ # Rational C++ 2.4.1
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ cxx*)
+ case $host in
+ osf3*)
+ _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $soname `test -n "$verstring" && func_echo_all "$wl-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
+ ;;
+ *)
+ _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
+ echo "-hidden">> $lib.exp~
+ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname $wl-input $wl$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~
+ $RM $lib.exp'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
+ ;;
+ esac
+
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ #
+ # There doesn't appear to be a way to prevent this compiler from
+ # explicitly linking system object files so we need to strip them
+ # from the output so that they don't get included in the library
+ # dependencies.
+ output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
+ ;;
+ *)
+ if test yes,no = "$GXX,$with_gnu_ld"; then
+ _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
+ case $host in
+ osf3*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
+ ;;
+ *)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
+ ;;
+ esac
+
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"'
+
+ else
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+ esac
+ ;;
+
+ psos*)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+
+ sunos4*)
+ case $cc_basename in
+ CC*)
+ # Sun C++ 4.x
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ lcc*)
+ # Lucid
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ *)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ esac
+ ;;
+
+ solaris*)
+ case $cc_basename in
+ CC* | sunCC*)
+ # Sun C++ 4.2, 5.x and Centerline C++
+ _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
+ _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $CC -G$allow_undefined_flag $wl-M $wl$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
+
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ case $host_os in
+ solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
+ *)
+ # The compiler driver will combine and reorder linker options,
+ # but understands '-z linker_flag'.
+ # Supported since Solaris 2.6 (maybe 2.5.1?)
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
+ ;;
+ esac
+ _LT_TAGVAR(link_all_deplibs, $1)=yes
+
+ output_verbose_link_cmd='func_echo_all'
+
+ # Archives containing C++ object files must be created using
+ # "CC -xar", where "CC" is the Sun C++ compiler. This is
+ # necessary to make sure instantiated templates are included
+ # in the archive.
+ _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
+ ;;
+ gcx*)
+ # Green Hills C++ Compiler
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
+
+ # The C++ compiler must be used to create the archive.
+ _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
+ ;;
+ *)
+ # GNU C++ compiler with Solaris linker
+ if test yes,no = "$GXX,$with_gnu_ld"; then
+ _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs'
+ if $CC --version | $GREP -v '^2\.7' > /dev/null; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $CC -shared $pic_flag -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"'
+ else
+ # g++ 2.7 appears to require '-G' NOT '-shared' on this
+ # platform.
+ _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $CC -G -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"'
+ fi
+
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir'
+ case $host_os in
+ solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
+ *)
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
+ ;;
+ esac
+ fi
+ ;;
+ esac
+ ;;
+
+ sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
+ _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ runpath_var='LD_RUN_PATH'
+
+ case $cc_basename in
+ CC*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ *)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ esac
+ ;;
+
+ sysv5* | sco3.2v5* | sco5v6*)
+ # Note: We CANNOT use -z defs as we might desire, because we do not
+ # link with -lc, and that would cause any symbols used from libc to
+ # always be unresolved, which means just about no library would
+ # ever link correctly. If we're not using GNU ld we use -z text
+ # though, which does catch some bad symbols but isn't as heavy-handed
+ # as -z defs.
+ _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
+ _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs'
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
+ _LT_TAGVAR(link_all_deplibs, $1)=yes
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport'
+ runpath_var='LD_RUN_PATH'
+
+ case $cc_basename in
+ CC*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
+ '"$_LT_TAGVAR(old_archive_cmds, $1)"
+ _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
+ '"$_LT_TAGVAR(reload_cmds, $1)"
+ ;;
+ *)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ esac
+ ;;
+
+ tandem*)
+ case $cc_basename in
+ NCC*)
+ # NonStop-UX NCC 3.20
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ *)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ esac
+ ;;
+
+ vxworks*)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+
+ *)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ esac
+
+ AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
+ test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no
+
+ _LT_TAGVAR(GCC, $1)=$GXX
+ _LT_TAGVAR(LD, $1)=$LD
+
+ ## CAVEAT EMPTOR:
+ ## There is no encapsulation within the following macros, do not change
+ ## the running order or otherwise move them around unless you know exactly
+ ## what you are doing...
+ _LT_SYS_HIDDEN_LIBDEPS($1)
+ _LT_COMPILER_PIC($1)
+ _LT_COMPILER_C_O($1)
+ _LT_COMPILER_FILE_LOCKS($1)
+ _LT_LINKER_SHLIBS($1)
+ _LT_SYS_DYNAMIC_LINKER($1)
+ _LT_LINKER_HARDCODE_LIBPATH($1)
+
+ _LT_CONFIG($1)
+ fi # test -n "$compiler"
+
+ CC=$lt_save_CC
+ CFLAGS=$lt_save_CFLAGS
+ LDCXX=$LD
+ LD=$lt_save_LD
+ GCC=$lt_save_GCC
+ with_gnu_ld=$lt_save_with_gnu_ld
+ lt_cv_path_LDCXX=$lt_cv_path_LD
+ lt_cv_path_LD=$lt_save_path_LD
+ lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
+ lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
+fi # test yes != "$_lt_caught_CXX_error"
+
+AC_LANG_POP
+])# _LT_LANG_CXX_CONFIG
+
+
+# _LT_FUNC_STRIPNAME_CNF
+# ----------------------
+# func_stripname_cnf prefix suffix name
+# strip PREFIX and SUFFIX off of NAME.
+# PREFIX and SUFFIX must not contain globbing or regex special
+# characters, hashes, percent signs, but SUFFIX may contain a leading
+# dot (in which case that matches only a dot).
+#
+# This function is identical to the (non-XSI) version of func_stripname,
+# except this one can be used by m4 code that may be executed by configure,
+# rather than the libtool script.
+m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl
+AC_REQUIRE([_LT_DECL_SED])
+AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])
+func_stripname_cnf ()
+{
+ case @S|@2 in
+ .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;;
+ *) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;;
+ esac
+} # func_stripname_cnf
+])# _LT_FUNC_STRIPNAME_CNF
+
+
+# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
+# ---------------------------------
+# Figure out "hidden" library dependencies from verbose
+# compiler output when linking a shared library.
+# Parse the compiler output and extract the necessary
+# objects, libraries and library flags.
+m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
+[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl
+# Dependencies to place before and after the object being linked:
+_LT_TAGVAR(predep_objects, $1)=
+_LT_TAGVAR(postdep_objects, $1)=
+_LT_TAGVAR(predeps, $1)=
+_LT_TAGVAR(postdeps, $1)=
+_LT_TAGVAR(compiler_lib_search_path, $1)=
+
+dnl we can't use the lt_simple_compile_test_code here,
+dnl because it contains code intended for an executable,
+dnl not a library. It's possible we should let each
+dnl tag define a new lt_????_link_test_code variable,
+dnl but it's only used here...
+m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
+int a;
+void foo (void) { a = 0; }
+_LT_EOF
+], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
+class Foo
+{
+public:
+ Foo (void) { a = 0; }
+private:
+ int a;
+};
+_LT_EOF
+], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
+ subroutine foo
+ implicit none
+ integer*4 a
+ a=0
+ return
+ end
+_LT_EOF
+], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
+ subroutine foo
+ implicit none
+ integer a
+ a=0
+ return
+ end
+_LT_EOF
+], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
+public class foo {
+ private int a;
+ public void bar (void) {
+ a = 0;
+ }
+};
+_LT_EOF
+], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF
+package foo
+func foo() {
+}
+_LT_EOF
+])
+
+_lt_libdeps_save_CFLAGS=$CFLAGS
+case "$CC $CFLAGS " in #(
+*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
+*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
+*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;;
+esac
+
+dnl Parse the compiler output and extract the necessary
+dnl objects, libraries and library flags.
+if AC_TRY_EVAL(ac_compile); then
+ # Parse the compiler output and extract the necessary
+ # objects, libraries and library flags.
+
+ # Sentinel used to keep track of whether or not we are before
+ # the conftest object file.
+ pre_test_object_deps_done=no
+
+ for p in `eval "$output_verbose_link_cmd"`; do
+ case $prev$p in
+
+ -L* | -R* | -l*)
+ # Some compilers place space between "-{L,R}" and the path.
+ # Remove the space.
+ if test x-L = "$p" ||
+ test x-R = "$p"; then
+ prev=$p
+ continue
+ fi
+
+ # Expand the sysroot to ease extracting the directories later.
+ if test -z "$prev"; then
+ case $p in
+ -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
+ -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
+ -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
+ esac
+ fi
+ case $p in
+ =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
+ esac
+ if test no = "$pre_test_object_deps_done"; then
+ case $prev in
+ -L | -R)
+ # Internal compiler library paths should come after those
+ # provided the user. The postdeps already come after the
+ # user supplied libs so there is no need to process them.
+ if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
+ _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p
+ else
+ _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p"
+ fi
+ ;;
+ # The "-l" case would never come before the object being
+ # linked, so don't bother handling this case.
+ esac
+ else
+ if test -z "$_LT_TAGVAR(postdeps, $1)"; then
+ _LT_TAGVAR(postdeps, $1)=$prev$p
+ else
+ _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p"
+ fi
+ fi
+ prev=
+ ;;
+
+ *.lto.$objext) ;; # Ignore GCC LTO objects
+ *.$objext)
+ # This assumes that the test object file only shows up
+ # once in the compiler output.
+ if test "$p" = "conftest.$objext"; then
+ pre_test_object_deps_done=yes
+ continue
+ fi
+
+ if test no = "$pre_test_object_deps_done"; then
+ if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
+ _LT_TAGVAR(predep_objects, $1)=$p
+ else
+ _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
+ fi
+ else
+ if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
+ _LT_TAGVAR(postdep_objects, $1)=$p
+ else
+ _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
+ fi
+ fi
+ ;;
+
+ *) ;; # Ignore the rest.
+
+ esac
+ done
+
+ # Clean up.
+ rm -f a.out a.exe
+else
+ echo "libtool.m4: error: problem compiling $1 test program"
+fi
+
+$RM -f confest.$objext
+CFLAGS=$_lt_libdeps_save_CFLAGS
+
+# PORTME: override above test on systems where it is broken
+m4_if([$1], [CXX],
+[case $host_os in
+interix[[3-9]]*)
+ # Interix 3.5 installs completely hosed .la files for C++, so rather than
+ # hack all around it, let's just trust "g++" to DTRT.
+ _LT_TAGVAR(predep_objects,$1)=
+ _LT_TAGVAR(postdep_objects,$1)=
+ _LT_TAGVAR(postdeps,$1)=
+ ;;
+esac
+])
+
+case " $_LT_TAGVAR(postdeps, $1) " in
+*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
+esac
+ _LT_TAGVAR(compiler_lib_search_dirs, $1)=
+if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
+ _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'`
+fi
+_LT_TAGDECL([], [compiler_lib_search_dirs], [1],
+ [The directories searched by this compiler when creating a shared library])
+_LT_TAGDECL([], [predep_objects], [1],
+ [Dependencies to place before and after the objects being linked to
+ create a shared library])
+_LT_TAGDECL([], [postdep_objects], [1])
+_LT_TAGDECL([], [predeps], [1])
+_LT_TAGDECL([], [postdeps], [1])
+_LT_TAGDECL([], [compiler_lib_search_path], [1],
+ [The library search path used internally by the compiler when linking
+ a shared library])
+])# _LT_SYS_HIDDEN_LIBDEPS
+
+
+# _LT_LANG_F77_CONFIG([TAG])
+# --------------------------
+# Ensure that the configuration variables for a Fortran 77 compiler are
+# suitably defined. These variables are subsequently used by _LT_CONFIG
+# to write the compiler configuration to 'libtool'.
+m4_defun([_LT_LANG_F77_CONFIG],
+[AC_LANG_PUSH(Fortran 77)
+if test -z "$F77" || test no = "$F77"; then
+ _lt_disable_F77=yes
+fi
+
+_LT_TAGVAR(archive_cmds_need_lc, $1)=no
+_LT_TAGVAR(allow_undefined_flag, $1)=
+_LT_TAGVAR(always_export_symbols, $1)=no
+_LT_TAGVAR(archive_expsym_cmds, $1)=
+_LT_TAGVAR(export_dynamic_flag_spec, $1)=
+_LT_TAGVAR(hardcode_direct, $1)=no
+_LT_TAGVAR(hardcode_direct_absolute, $1)=no
+_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
+_LT_TAGVAR(hardcode_libdir_separator, $1)=
+_LT_TAGVAR(hardcode_minus_L, $1)=no
+_LT_TAGVAR(hardcode_automatic, $1)=no
+_LT_TAGVAR(inherit_rpath, $1)=no
+_LT_TAGVAR(module_cmds, $1)=
+_LT_TAGVAR(module_expsym_cmds, $1)=
+_LT_TAGVAR(link_all_deplibs, $1)=unknown
+_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+_LT_TAGVAR(reload_flag, $1)=$reload_flag
+_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
+_LT_TAGVAR(no_undefined_flag, $1)=
+_LT_TAGVAR(whole_archive_flag_spec, $1)=
+_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
+
+# Source file extension for f77 test sources.
+ac_ext=f
+
+# Object file extension for compiled f77 test sources.
+objext=o
+_LT_TAGVAR(objext, $1)=$objext
+
+# No sense in running all these tests if we already determined that
+# the F77 compiler isn't working. Some variables (like enable_shared)
+# are currently assumed to apply to all compilers on this platform,
+# and will be corrupted by setting them based on a non-working compiler.
+if test yes != "$_lt_disable_F77"; then
+ # Code to be used in simple compile tests
+ lt_simple_compile_test_code="\
+ subroutine t
+ return
+ end
+"
+
+ # Code to be used in simple link tests
+ lt_simple_link_test_code="\
+ program t
+ end
+"
+
+ # ltmain only uses $CC for tagged configurations so make sure $CC is set.
+ _LT_TAG_COMPILER
+
+ # save warnings/boilerplate of simple test code
+ _LT_COMPILER_BOILERPLATE
+ _LT_LINKER_BOILERPLATE
+
+ # Allow CC to be a program name with arguments.
+ lt_save_CC=$CC
+ lt_save_GCC=$GCC
+ lt_save_CFLAGS=$CFLAGS
+ CC=${F77-"f77"}
+ CFLAGS=$FFLAGS
+ compiler=$CC
+ _LT_TAGVAR(compiler, $1)=$CC
+ _LT_CC_BASENAME([$compiler])
+ GCC=$G77
+ if test -n "$compiler"; then
+ AC_MSG_CHECKING([if libtool supports shared libraries])
+ AC_MSG_RESULT([$can_build_shared])
+
+ AC_MSG_CHECKING([whether to build shared libraries])
+ test no = "$can_build_shared" && enable_shared=no
+
+ # On AIX, shared libraries and static libraries use the same namespace, and
+ # are all built from PIC.
+ case $host_os in
+ aix3*)
+ test yes = "$enable_shared" && enable_static=no
+ if test -n "$RANLIB"; then
+ archive_cmds="$archive_cmds~\$RANLIB \$lib"
+ postinstall_cmds='$RANLIB $lib'
+ fi
+ ;;
+ aix[[4-9]]*)
+ if test ia64 != "$host_cpu"; then
+ case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
+ yes,aix,yes) ;; # shared object as lib.so file only
+ yes,svr4,*) ;; # shared object as lib.so archive member only
+ yes,*) enable_static=no ;; # shared object in lib.a archive as well
+ esac
+ fi
+ ;;
+ esac
+ AC_MSG_RESULT([$enable_shared])
+
+ AC_MSG_CHECKING([whether to build static libraries])
+ # Make sure either enable_shared or enable_static is yes.
+ test yes = "$enable_shared" || enable_static=yes
+ AC_MSG_RESULT([$enable_static])
+
+ _LT_TAGVAR(GCC, $1)=$G77
+ _LT_TAGVAR(LD, $1)=$LD
+
+ ## CAVEAT EMPTOR:
+ ## There is no encapsulation within the following macros, do not change
+ ## the running order or otherwise move them around unless you know exactly
+ ## what you are doing...
+ _LT_COMPILER_PIC($1)
+ _LT_COMPILER_C_O($1)
+ _LT_COMPILER_FILE_LOCKS($1)
+ _LT_LINKER_SHLIBS($1)
+ _LT_SYS_DYNAMIC_LINKER($1)
+ _LT_LINKER_HARDCODE_LIBPATH($1)
+
+ _LT_CONFIG($1)
+ fi # test -n "$compiler"
+
+ GCC=$lt_save_GCC
+ CC=$lt_save_CC
+ CFLAGS=$lt_save_CFLAGS
+fi # test yes != "$_lt_disable_F77"
+
+AC_LANG_POP
+])# _LT_LANG_F77_CONFIG
+
+
+# _LT_LANG_FC_CONFIG([TAG])
+# -------------------------
+# Ensure that the configuration variables for a Fortran compiler are
+# suitably defined. These variables are subsequently used by _LT_CONFIG
+# to write the compiler configuration to 'libtool'.
+m4_defun([_LT_LANG_FC_CONFIG],
+[AC_LANG_PUSH(Fortran)
+
+if test -z "$FC" || test no = "$FC"; then
+ _lt_disable_FC=yes
+fi
+
+_LT_TAGVAR(archive_cmds_need_lc, $1)=no
+_LT_TAGVAR(allow_undefined_flag, $1)=
+_LT_TAGVAR(always_export_symbols, $1)=no
+_LT_TAGVAR(archive_expsym_cmds, $1)=
+_LT_TAGVAR(export_dynamic_flag_spec, $1)=
+_LT_TAGVAR(hardcode_direct, $1)=no
+_LT_TAGVAR(hardcode_direct_absolute, $1)=no
+_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
+_LT_TAGVAR(hardcode_libdir_separator, $1)=
+_LT_TAGVAR(hardcode_minus_L, $1)=no
+_LT_TAGVAR(hardcode_automatic, $1)=no
+_LT_TAGVAR(inherit_rpath, $1)=no
+_LT_TAGVAR(module_cmds, $1)=
+_LT_TAGVAR(module_expsym_cmds, $1)=
+_LT_TAGVAR(link_all_deplibs, $1)=unknown
+_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+_LT_TAGVAR(reload_flag, $1)=$reload_flag
+_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
+_LT_TAGVAR(no_undefined_flag, $1)=
+_LT_TAGVAR(whole_archive_flag_spec, $1)=
+_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
+
+# Source file extension for fc test sources.
+ac_ext=${ac_fc_srcext-f}
+
+# Object file extension for compiled fc test sources.
+objext=o
+_LT_TAGVAR(objext, $1)=$objext
+
+# No sense in running all these tests if we already determined that
+# the FC compiler isn't working. Some variables (like enable_shared)
+# are currently assumed to apply to all compilers on this platform,
+# and will be corrupted by setting them based on a non-working compiler.
+if test yes != "$_lt_disable_FC"; then
+ # Code to be used in simple compile tests
+ lt_simple_compile_test_code="\
+ subroutine t
+ return
+ end
+"
+
+ # Code to be used in simple link tests
+ lt_simple_link_test_code="\
+ program t
+ end
+"
+
+ # ltmain only uses $CC for tagged configurations so make sure $CC is set.
+ _LT_TAG_COMPILER
+
+ # save warnings/boilerplate of simple test code
+ _LT_COMPILER_BOILERPLATE
+ _LT_LINKER_BOILERPLATE
+
+ # Allow CC to be a program name with arguments.
+ lt_save_CC=$CC
+ lt_save_GCC=$GCC
+ lt_save_CFLAGS=$CFLAGS
+ CC=${FC-"f95"}
+ CFLAGS=$FCFLAGS
+ compiler=$CC
+ GCC=$ac_cv_fc_compiler_gnu
+
+ _LT_TAGVAR(compiler, $1)=$CC
+ _LT_CC_BASENAME([$compiler])
+
+ if test -n "$compiler"; then
+ AC_MSG_CHECKING([if libtool supports shared libraries])
+ AC_MSG_RESULT([$can_build_shared])
+
+ AC_MSG_CHECKING([whether to build shared libraries])
+ test no = "$can_build_shared" && enable_shared=no
+
+ # On AIX, shared libraries and static libraries use the same namespace, and
+ # are all built from PIC.
+ case $host_os in
+ aix3*)
+ test yes = "$enable_shared" && enable_static=no
+ if test -n "$RANLIB"; then
+ archive_cmds="$archive_cmds~\$RANLIB \$lib"
+ postinstall_cmds='$RANLIB $lib'
+ fi
+ ;;
+ aix[[4-9]]*)
+ if test ia64 != "$host_cpu"; then
+ case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
+ yes,aix,yes) ;; # shared object as lib.so file only
+ yes,svr4,*) ;; # shared object as lib.so archive member only
+ yes,*) enable_static=no ;; # shared object in lib.a archive as well
+ esac
+ fi
+ ;;
+ esac
+ AC_MSG_RESULT([$enable_shared])
+
+ AC_MSG_CHECKING([whether to build static libraries])
+ # Make sure either enable_shared or enable_static is yes.
+ test yes = "$enable_shared" || enable_static=yes
+ AC_MSG_RESULT([$enable_static])
+
+ _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu
+ _LT_TAGVAR(LD, $1)=$LD
+
+ ## CAVEAT EMPTOR:
+ ## There is no encapsulation within the following macros, do not change
+ ## the running order or otherwise move them around unless you know exactly
+ ## what you are doing...
+ _LT_SYS_HIDDEN_LIBDEPS($1)
+ _LT_COMPILER_PIC($1)
+ _LT_COMPILER_C_O($1)
+ _LT_COMPILER_FILE_LOCKS($1)
+ _LT_LINKER_SHLIBS($1)
+ _LT_SYS_DYNAMIC_LINKER($1)
+ _LT_LINKER_HARDCODE_LIBPATH($1)
+
+ _LT_CONFIG($1)
+ fi # test -n "$compiler"
+
+ GCC=$lt_save_GCC
+ CC=$lt_save_CC
+ CFLAGS=$lt_save_CFLAGS
+fi # test yes != "$_lt_disable_FC"
+
+AC_LANG_POP
+])# _LT_LANG_FC_CONFIG
+
+
+# _LT_LANG_GCJ_CONFIG([TAG])
+# --------------------------
+# Ensure that the configuration variables for the GNU Java Compiler compiler
+# are suitably defined. These variables are subsequently used by _LT_CONFIG
+# to write the compiler configuration to 'libtool'.
+m4_defun([_LT_LANG_GCJ_CONFIG],
+[AC_REQUIRE([LT_PROG_GCJ])dnl
+AC_LANG_SAVE
+
+# Source file extension for Java test sources.
+ac_ext=java
+
+# Object file extension for compiled Java test sources.
+objext=o
+_LT_TAGVAR(objext, $1)=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="class foo {}"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
+
+# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+_LT_TAG_COMPILER
+
+# save warnings/boilerplate of simple test code
+_LT_COMPILER_BOILERPLATE
+_LT_LINKER_BOILERPLATE
+
+# Allow CC to be a program name with arguments.
+lt_save_CC=$CC
+lt_save_CFLAGS=$CFLAGS
+lt_save_GCC=$GCC
+GCC=yes
+CC=${GCJ-"gcj"}
+CFLAGS=$GCJFLAGS
+compiler=$CC
+_LT_TAGVAR(compiler, $1)=$CC
+_LT_TAGVAR(LD, $1)=$LD
+_LT_CC_BASENAME([$compiler])
+
+# GCJ did not exist at the time GCC didn't implicitly link libc in.
+_LT_TAGVAR(archive_cmds_need_lc, $1)=no
+
+_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+_LT_TAGVAR(reload_flag, $1)=$reload_flag
+_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
+
+## CAVEAT EMPTOR:
+## There is no encapsulation within the following macros, do not change
+## the running order or otherwise move them around unless you know exactly
+## what you are doing...
+if test -n "$compiler"; then
+ _LT_COMPILER_NO_RTTI($1)
+ _LT_COMPILER_PIC($1)
+ _LT_COMPILER_C_O($1)
+ _LT_COMPILER_FILE_LOCKS($1)
+ _LT_LINKER_SHLIBS($1)
+ _LT_LINKER_HARDCODE_LIBPATH($1)
+
+ _LT_CONFIG($1)
+fi
+
+AC_LANG_RESTORE
+
+GCC=$lt_save_GCC
+CC=$lt_save_CC
+CFLAGS=$lt_save_CFLAGS
+])# _LT_LANG_GCJ_CONFIG
+
+
+# _LT_LANG_GO_CONFIG([TAG])
+# --------------------------
+# Ensure that the configuration variables for the GNU Go compiler
+# are suitably defined. These variables are subsequently used by _LT_CONFIG
+# to write the compiler configuration to 'libtool'.
+m4_defun([_LT_LANG_GO_CONFIG],
+[AC_REQUIRE([LT_PROG_GO])dnl
+AC_LANG_SAVE
+
+# Source file extension for Go test sources.
+ac_ext=go
+
+# Object file extension for compiled Go test sources.
+objext=o
+_LT_TAGVAR(objext, $1)=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="package main; func main() { }"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='package main; func main() { }'
+
+# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+_LT_TAG_COMPILER
+
+# save warnings/boilerplate of simple test code
+_LT_COMPILER_BOILERPLATE
+_LT_LINKER_BOILERPLATE
+
+# Allow CC to be a program name with arguments.
+lt_save_CC=$CC
+lt_save_CFLAGS=$CFLAGS
+lt_save_GCC=$GCC
+GCC=yes
+CC=${GOC-"gccgo"}
+CFLAGS=$GOFLAGS
+compiler=$CC
+_LT_TAGVAR(compiler, $1)=$CC
+_LT_TAGVAR(LD, $1)=$LD
+_LT_CC_BASENAME([$compiler])
+
+# Go did not exist at the time GCC didn't implicitly link libc in.
+_LT_TAGVAR(archive_cmds_need_lc, $1)=no
+
+_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+_LT_TAGVAR(reload_flag, $1)=$reload_flag
+_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
+
+## CAVEAT EMPTOR:
+## There is no encapsulation within the following macros, do not change
+## the running order or otherwise move them around unless you know exactly
+## what you are doing...
+if test -n "$compiler"; then
+ _LT_COMPILER_NO_RTTI($1)
+ _LT_COMPILER_PIC($1)
+ _LT_COMPILER_C_O($1)
+ _LT_COMPILER_FILE_LOCKS($1)
+ _LT_LINKER_SHLIBS($1)
+ _LT_LINKER_HARDCODE_LIBPATH($1)
+
+ _LT_CONFIG($1)
+fi
+
+AC_LANG_RESTORE
+
+GCC=$lt_save_GCC
+CC=$lt_save_CC
+CFLAGS=$lt_save_CFLAGS
+])# _LT_LANG_GO_CONFIG
+
+
+# _LT_LANG_RC_CONFIG([TAG])
+# -------------------------
+# Ensure that the configuration variables for the Windows resource compiler
+# are suitably defined. These variables are subsequently used by _LT_CONFIG
+# to write the compiler configuration to 'libtool'.
+m4_defun([_LT_LANG_RC_CONFIG],
+[AC_REQUIRE([LT_PROG_RC])dnl
+AC_LANG_SAVE
+
+# Source file extension for RC test sources.
+ac_ext=rc
+
+# Object file extension for compiled RC test sources.
+objext=o
+_LT_TAGVAR(objext, $1)=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
+
+# Code to be used in simple link tests
+lt_simple_link_test_code=$lt_simple_compile_test_code
+
+# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+_LT_TAG_COMPILER
+
+# save warnings/boilerplate of simple test code
+_LT_COMPILER_BOILERPLATE
+_LT_LINKER_BOILERPLATE
+
+# Allow CC to be a program name with arguments.
+lt_save_CC=$CC
+lt_save_CFLAGS=$CFLAGS
+lt_save_GCC=$GCC
+GCC=
+CC=${RC-"windres"}
+CFLAGS=
+compiler=$CC
+_LT_TAGVAR(compiler, $1)=$CC
+_LT_CC_BASENAME([$compiler])
+_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
+
+if test -n "$compiler"; then
+ :
+ _LT_CONFIG($1)
+fi
+
+GCC=$lt_save_GCC
+AC_LANG_RESTORE
+CC=$lt_save_CC
+CFLAGS=$lt_save_CFLAGS
+])# _LT_LANG_RC_CONFIG
+
+
+# LT_PROG_GCJ
+# -----------
+AC_DEFUN([LT_PROG_GCJ],
+[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
+ [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
+ [AC_CHECK_TOOL(GCJ, gcj,)
+ test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2"
+ AC_SUBST(GCJFLAGS)])])[]dnl
+])
+
+# Old name:
+AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
+
+
+# LT_PROG_GO
+# ----------
+AC_DEFUN([LT_PROG_GO],
+[AC_CHECK_TOOL(GOC, gccgo,)
+])
+
+
+# LT_PROG_RC
+# ----------
+AC_DEFUN([LT_PROG_RC],
+[AC_CHECK_TOOL(RC, windres,)
+])
+
+# Old name:
+AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([LT_AC_PROG_RC], [])
+
+
+# _LT_DECL_EGREP
+# --------------
+# If we don't have a new enough Autoconf to choose the best grep
+# available, choose the one first in the user's PATH.
+m4_defun([_LT_DECL_EGREP],
+[AC_REQUIRE([AC_PROG_EGREP])dnl
+AC_REQUIRE([AC_PROG_FGREP])dnl
+test -z "$GREP" && GREP=grep
+_LT_DECL([], [GREP], [1], [A grep program that handles long lines])
+_LT_DECL([], [EGREP], [1], [An ERE matcher])
+_LT_DECL([], [FGREP], [1], [A literal string matcher])
+dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
+AC_SUBST([GREP])
+])
+
+
+# _LT_DECL_OBJDUMP
+# --------------
+# If we don't have a new enough Autoconf to choose the best objdump
+# available, choose the one first in the user's PATH.
+m4_defun([_LT_DECL_OBJDUMP],
+[AC_CHECK_TOOL(OBJDUMP, objdump, false)
+test -z "$OBJDUMP" && OBJDUMP=objdump
+_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
+AC_SUBST([OBJDUMP])
+])
+
+# _LT_DECL_DLLTOOL
+# ----------------
+# Ensure DLLTOOL variable is set.
+m4_defun([_LT_DECL_DLLTOOL],
+[AC_CHECK_TOOL(DLLTOOL, dlltool, false)
+test -z "$DLLTOOL" && DLLTOOL=dlltool
+_LT_DECL([], [DLLTOOL], [1], [DLL creation program])
+AC_SUBST([DLLTOOL])
+])
+
+# _LT_DECL_SED
+# ------------
+# Check for a fully-functional sed program, that truncates
+# as few characters as possible. Prefer GNU sed if found.
+m4_defun([_LT_DECL_SED],
+[AC_PROG_SED
+test -z "$SED" && SED=sed
+Xsed="$SED -e 1s/^X//"
+_LT_DECL([], [SED], [1], [A sed program that does not truncate output])
+_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
+ [Sed that helps us avoid accidentally triggering echo(1) options like -n])
+])# _LT_DECL_SED
+
+m4_ifndef([AC_PROG_SED], [
+############################################################
+# NOTE: This macro has been submitted for inclusion into #
+# GNU Autoconf as AC_PROG_SED. When it is available in #
+# a released version of Autoconf we should remove this #
+# macro and use it instead. #
+############################################################
+
+m4_defun([AC_PROG_SED],
+[AC_MSG_CHECKING([for a sed that does not truncate output])
+AC_CACHE_VAL(lt_cv_path_SED,
+[# Loop through the user's path and test for sed and gsed.
+# Then use that list of sed's as ones to test for truncation.
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for lt_ac_prog in sed gsed; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
+ lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
+ fi
+ done
+ done
+done
+IFS=$as_save_IFS
+lt_ac_max=0
+lt_ac_count=0
+# Add /usr/xpg4/bin/sed as it is typically found on Solaris
+# along with /bin/sed that truncates output.
+for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
+ test ! -f "$lt_ac_sed" && continue
+ cat /dev/null > conftest.in
+ lt_ac_count=0
+ echo $ECHO_N "0123456789$ECHO_C" >conftest.in
+ # Check for GNU sed and select it if it is found.
+ if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
+ lt_cv_path_SED=$lt_ac_sed
+ break
+ fi
+ while true; do
+ cat conftest.in conftest.in >conftest.tmp
+ mv conftest.tmp conftest.in
+ cp conftest.in conftest.nl
+ echo >>conftest.nl
+ $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
+ cmp -s conftest.out conftest.nl || break
+ # 10000 chars as input seems more than enough
+ test 10 -lt "$lt_ac_count" && break
+ lt_ac_count=`expr $lt_ac_count + 1`
+ if test "$lt_ac_count" -gt "$lt_ac_max"; then
+ lt_ac_max=$lt_ac_count
+ lt_cv_path_SED=$lt_ac_sed
+ fi
+ done
+done
+])
+SED=$lt_cv_path_SED
+AC_SUBST([SED])
+AC_MSG_RESULT([$SED])
+])#AC_PROG_SED
+])#m4_ifndef
+
+# Old name:
+AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([LT_AC_PROG_SED], [])
+
+
+# _LT_CHECK_SHELL_FEATURES
+# ------------------------
+# Find out whether the shell is Bourne or XSI compatible,
+# or has some other useful features.
+m4_defun([_LT_CHECK_SHELL_FEATURES],
+[if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+ lt_unset=unset
+else
+ lt_unset=false
+fi
+_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
+
+# test EBCDIC or ASCII
+case `echo X|tr X '\101'` in
+ A) # ASCII based system
+ # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
+ lt_SP2NL='tr \040 \012'
+ lt_NL2SP='tr \015\012 \040\040'
+ ;;
+ *) # EBCDIC based system
+ lt_SP2NL='tr \100 \n'
+ lt_NL2SP='tr \r\n \100\100'
+ ;;
+esac
+_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
+_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
+])# _LT_CHECK_SHELL_FEATURES
+
+
+# _LT_PATH_CONVERSION_FUNCTIONS
+# -----------------------------
+# Determine what file name conversion functions should be used by
+# func_to_host_file (and, implicitly, by func_to_host_path). These are needed
+# for certain cross-compile configurations and native mingw.
+m4_defun([_LT_PATH_CONVERSION_FUNCTIONS],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+AC_REQUIRE([AC_CANONICAL_BUILD])dnl
+AC_MSG_CHECKING([how to convert $build file names to $host format])
+AC_CACHE_VAL(lt_cv_to_host_file_cmd,
+[case $host in
+ *-*-mingw* )
+ case $build in
+ *-*-mingw* ) # actually msys
+ lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
+ ;;
+ *-*-cygwin* )
+ lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
+ ;;
+ * ) # otherwise, assume *nix
+ lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
+ ;;
+ esac
+ ;;
+ *-*-cygwin* )
+ case $build in
+ *-*-mingw* ) # actually msys
+ lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
+ ;;
+ *-*-cygwin* )
+ lt_cv_to_host_file_cmd=func_convert_file_noop
+ ;;
+ * ) # otherwise, assume *nix
+ lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
+ ;;
+ esac
+ ;;
+ * ) # unhandled hosts (and "normal" native builds)
+ lt_cv_to_host_file_cmd=func_convert_file_noop
+ ;;
+esac
+])
+to_host_file_cmd=$lt_cv_to_host_file_cmd
+AC_MSG_RESULT([$lt_cv_to_host_file_cmd])
+_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd],
+ [0], [convert $build file names to $host format])dnl
+
+AC_MSG_CHECKING([how to convert $build file names to toolchain format])
+AC_CACHE_VAL(lt_cv_to_tool_file_cmd,
+[#assume ordinary cross tools, or native build.
+lt_cv_to_tool_file_cmd=func_convert_file_noop
+case $host in
+ *-*-mingw* )
+ case $build in
+ *-*-mingw* ) # actually msys
+ lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
+ ;;
+ esac
+ ;;
+esac
+])
+to_tool_file_cmd=$lt_cv_to_tool_file_cmd
+AC_MSG_RESULT([$lt_cv_to_tool_file_cmd])
+_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],
+ [0], [convert $build files to toolchain format])dnl
+])# _LT_PATH_CONVERSION_FUNCTIONS
diff --git a/m4/ltoptions.m4 b/m4/ltoptions.m4
new file mode 100644
index 0000000..94b0829
--- /dev/null
+++ b/m4/ltoptions.m4
@@ -0,0 +1,437 @@
+# Helper functions for option handling. -*- Autoconf -*-
+#
+# Copyright (C) 2004-2005, 2007-2009, 2011-2015 Free Software
+# Foundation, Inc.
+# Written by Gary V. Vaughan, 2004
+#
+# This file is free software; the Free Software Foundation gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved.
+
+# serial 8 ltoptions.m4
+
+# This is to help aclocal find these macros, as it can't see m4_define.
+AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
+
+
+# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
+# ------------------------------------------
+m4_define([_LT_MANGLE_OPTION],
+[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
+
+
+# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
+# ---------------------------------------
+# Set option OPTION-NAME for macro MACRO-NAME, and if there is a
+# matching handler defined, dispatch to it. Other OPTION-NAMEs are
+# saved as a flag.
+m4_define([_LT_SET_OPTION],
+[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
+m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
+ _LT_MANGLE_DEFUN([$1], [$2]),
+ [m4_warning([Unknown $1 option '$2'])])[]dnl
+])
+
+
+# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
+# ------------------------------------------------------------
+# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
+m4_define([_LT_IF_OPTION],
+[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
+
+
+# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
+# -------------------------------------------------------
+# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
+# are set.
+m4_define([_LT_UNLESS_OPTIONS],
+[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
+ [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
+ [m4_define([$0_found])])])[]dnl
+m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
+])[]dnl
+])
+
+
+# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
+# ----------------------------------------
+# OPTION-LIST is a space-separated list of Libtool options associated
+# with MACRO-NAME. If any OPTION has a matching handler declared with
+# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
+# the unknown option and exit.
+m4_defun([_LT_SET_OPTIONS],
+[# Set options
+m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
+ [_LT_SET_OPTION([$1], _LT_Option)])
+
+m4_if([$1],[LT_INIT],[
+ dnl
+ dnl Simply set some default values (i.e off) if boolean options were not
+ dnl specified:
+ _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
+ ])
+ _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
+ ])
+ dnl
+ dnl If no reference was made to various pairs of opposing options, then
+ dnl we run the default mode handler for the pair. For example, if neither
+ dnl 'shared' nor 'disable-shared' was passed, we enable building of shared
+ dnl archives by default:
+ _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
+ _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
+ _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
+ _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
+ [_LT_ENABLE_FAST_INSTALL])
+ _LT_UNLESS_OPTIONS([LT_INIT], [aix-soname=aix aix-soname=both aix-soname=svr4],
+ [_LT_WITH_AIX_SONAME([aix])])
+ ])
+])# _LT_SET_OPTIONS
+
+
+## --------------------------------- ##
+## Macros to handle LT_INIT options. ##
+## --------------------------------- ##
+
+# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
+# -----------------------------------------
+m4_define([_LT_MANGLE_DEFUN],
+[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
+
+
+# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
+# -----------------------------------------------
+m4_define([LT_OPTION_DEFINE],
+[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
+])# LT_OPTION_DEFINE
+
+
+# dlopen
+# ------
+LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
+])
+
+AU_DEFUN([AC_LIBTOOL_DLOPEN],
+[_LT_SET_OPTION([LT_INIT], [dlopen])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you
+put the 'dlopen' option into LT_INIT's first parameter.])
+])
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
+
+
+# win32-dll
+# ---------
+# Declare package support for building win32 dll's.
+LT_OPTION_DEFINE([LT_INIT], [win32-dll],
+[enable_win32_dll=yes
+
+case $host in
+*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
+ AC_CHECK_TOOL(AS, as, false)
+ AC_CHECK_TOOL(DLLTOOL, dlltool, false)
+ AC_CHECK_TOOL(OBJDUMP, objdump, false)
+ ;;
+esac
+
+test -z "$AS" && AS=as
+_LT_DECL([], [AS], [1], [Assembler program])dnl
+
+test -z "$DLLTOOL" && DLLTOOL=dlltool
+_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl
+
+test -z "$OBJDUMP" && OBJDUMP=objdump
+_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl
+])# win32-dll
+
+AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+_LT_SET_OPTION([LT_INIT], [win32-dll])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you
+put the 'win32-dll' option into LT_INIT's first parameter.])
+])
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
+
+
+# _LT_ENABLE_SHARED([DEFAULT])
+# ----------------------------
+# implement the --enable-shared flag, and supports the 'shared' and
+# 'disable-shared' LT_INIT options.
+# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'.
+m4_define([_LT_ENABLE_SHARED],
+[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
+AC_ARG_ENABLE([shared],
+ [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
+ [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
+ [p=${PACKAGE-default}
+ case $enableval in
+ yes) enable_shared=yes ;;
+ no) enable_shared=no ;;
+ *)
+ enable_shared=no
+ # Look at the argument we got. We use all the common list separators.
+ lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
+ for pkg in $enableval; do
+ IFS=$lt_save_ifs
+ if test "X$pkg" = "X$p"; then
+ enable_shared=yes
+ fi
+ done
+ IFS=$lt_save_ifs
+ ;;
+ esac],
+ [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
+
+ _LT_DECL([build_libtool_libs], [enable_shared], [0],
+ [Whether or not to build shared libraries])
+])# _LT_ENABLE_SHARED
+
+LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
+LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
+
+# Old names:
+AC_DEFUN([AC_ENABLE_SHARED],
+[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
+])
+
+AC_DEFUN([AC_DISABLE_SHARED],
+[_LT_SET_OPTION([LT_INIT], [disable-shared])
+])
+
+AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
+AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AM_ENABLE_SHARED], [])
+dnl AC_DEFUN([AM_DISABLE_SHARED], [])
+
+
+
+# _LT_ENABLE_STATIC([DEFAULT])
+# ----------------------------
+# implement the --enable-static flag, and support the 'static' and
+# 'disable-static' LT_INIT options.
+# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'.
+m4_define([_LT_ENABLE_STATIC],
+[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
+AC_ARG_ENABLE([static],
+ [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
+ [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
+ [p=${PACKAGE-default}
+ case $enableval in
+ yes) enable_static=yes ;;
+ no) enable_static=no ;;
+ *)
+ enable_static=no
+ # Look at the argument we got. We use all the common list separators.
+ lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
+ for pkg in $enableval; do
+ IFS=$lt_save_ifs
+ if test "X$pkg" = "X$p"; then
+ enable_static=yes
+ fi
+ done
+ IFS=$lt_save_ifs
+ ;;
+ esac],
+ [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
+
+ _LT_DECL([build_old_libs], [enable_static], [0],
+ [Whether or not to build static libraries])
+])# _LT_ENABLE_STATIC
+
+LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
+LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
+
+# Old names:
+AC_DEFUN([AC_ENABLE_STATIC],
+[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
+])
+
+AC_DEFUN([AC_DISABLE_STATIC],
+[_LT_SET_OPTION([LT_INIT], [disable-static])
+])
+
+AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
+AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AM_ENABLE_STATIC], [])
+dnl AC_DEFUN([AM_DISABLE_STATIC], [])
+
+
+
+# _LT_ENABLE_FAST_INSTALL([DEFAULT])
+# ----------------------------------
+# implement the --enable-fast-install flag, and support the 'fast-install'
+# and 'disable-fast-install' LT_INIT options.
+# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'.
+m4_define([_LT_ENABLE_FAST_INSTALL],
+[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
+AC_ARG_ENABLE([fast-install],
+ [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
+ [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
+ [p=${PACKAGE-default}
+ case $enableval in
+ yes) enable_fast_install=yes ;;
+ no) enable_fast_install=no ;;
+ *)
+ enable_fast_install=no
+ # Look at the argument we got. We use all the common list separators.
+ lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
+ for pkg in $enableval; do
+ IFS=$lt_save_ifs
+ if test "X$pkg" = "X$p"; then
+ enable_fast_install=yes
+ fi
+ done
+ IFS=$lt_save_ifs
+ ;;
+ esac],
+ [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
+
+_LT_DECL([fast_install], [enable_fast_install], [0],
+ [Whether or not to optimize for fast installation])dnl
+])# _LT_ENABLE_FAST_INSTALL
+
+LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
+LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
+
+# Old names:
+AU_DEFUN([AC_ENABLE_FAST_INSTALL],
+[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you put
+the 'fast-install' option into LT_INIT's first parameter.])
+])
+
+AU_DEFUN([AC_DISABLE_FAST_INSTALL],
+[_LT_SET_OPTION([LT_INIT], [disable-fast-install])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you put
+the 'disable-fast-install' option into LT_INIT's first parameter.])
+])
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
+dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
+
+
+# _LT_WITH_AIX_SONAME([DEFAULT])
+# ----------------------------------
+# implement the --with-aix-soname flag, and support the `aix-soname=aix'
+# and `aix-soname=both' and `aix-soname=svr4' LT_INIT options. DEFAULT
+# is either `aix', `both' or `svr4'. If omitted, it defaults to `aix'.
+m4_define([_LT_WITH_AIX_SONAME],
+[m4_define([_LT_WITH_AIX_SONAME_DEFAULT], [m4_if($1, svr4, svr4, m4_if($1, both, both, aix))])dnl
+shared_archive_member_spec=
+case $host,$enable_shared in
+power*-*-aix[[5-9]]*,yes)
+ AC_MSG_CHECKING([which variant of shared library versioning to provide])
+ AC_ARG_WITH([aix-soname],
+ [AS_HELP_STRING([--with-aix-soname=aix|svr4|both],
+ [shared library versioning (aka "SONAME") variant to provide on AIX, @<:@default=]_LT_WITH_AIX_SONAME_DEFAULT[@:>@.])],
+ [case $withval in
+ aix|svr4|both)
+ ;;
+ *)
+ AC_MSG_ERROR([Unknown argument to --with-aix-soname])
+ ;;
+ esac
+ lt_cv_with_aix_soname=$with_aix_soname],
+ [AC_CACHE_VAL([lt_cv_with_aix_soname],
+ [lt_cv_with_aix_soname=]_LT_WITH_AIX_SONAME_DEFAULT)
+ with_aix_soname=$lt_cv_with_aix_soname])
+ AC_MSG_RESULT([$with_aix_soname])
+ if test aix != "$with_aix_soname"; then
+ # For the AIX way of multilib, we name the shared archive member
+ # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o',
+ # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File.
+ # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag,
+ # the AIX toolchain works better with OBJECT_MODE set (default 32).
+ if test 64 = "${OBJECT_MODE-32}"; then
+ shared_archive_member_spec=shr_64
+ else
+ shared_archive_member_spec=shr
+ fi
+ fi
+ ;;
+*)
+ with_aix_soname=aix
+ ;;
+esac
+
+_LT_DECL([], [shared_archive_member_spec], [0],
+ [Shared archive member basename, for filename based shared library versioning on AIX])dnl
+])# _LT_WITH_AIX_SONAME
+
+LT_OPTION_DEFINE([LT_INIT], [aix-soname=aix], [_LT_WITH_AIX_SONAME([aix])])
+LT_OPTION_DEFINE([LT_INIT], [aix-soname=both], [_LT_WITH_AIX_SONAME([both])])
+LT_OPTION_DEFINE([LT_INIT], [aix-soname=svr4], [_LT_WITH_AIX_SONAME([svr4])])
+
+
+# _LT_WITH_PIC([MODE])
+# --------------------
+# implement the --with-pic flag, and support the 'pic-only' and 'no-pic'
+# LT_INIT options.
+# MODE is either 'yes' or 'no'. If omitted, it defaults to 'both'.
+m4_define([_LT_WITH_PIC],
+[AC_ARG_WITH([pic],
+ [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@],
+ [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
+ [lt_p=${PACKAGE-default}
+ case $withval in
+ yes|no) pic_mode=$withval ;;
+ *)
+ pic_mode=default
+ # Look at the argument we got. We use all the common list separators.
+ lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
+ for lt_pkg in $withval; do
+ IFS=$lt_save_ifs
+ if test "X$lt_pkg" = "X$lt_p"; then
+ pic_mode=yes
+ fi
+ done
+ IFS=$lt_save_ifs
+ ;;
+ esac],
+ [pic_mode=m4_default([$1], [default])])
+
+_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
+])# _LT_WITH_PIC
+
+LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
+LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
+
+# Old name:
+AU_DEFUN([AC_LIBTOOL_PICMODE],
+[_LT_SET_OPTION([LT_INIT], [pic-only])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you
+put the 'pic-only' option into LT_INIT's first parameter.])
+])
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
+
+## ----------------- ##
+## LTDL_INIT Options ##
+## ----------------- ##
+
+m4_define([_LTDL_MODE], [])
+LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
+ [m4_define([_LTDL_MODE], [nonrecursive])])
+LT_OPTION_DEFINE([LTDL_INIT], [recursive],
+ [m4_define([_LTDL_MODE], [recursive])])
+LT_OPTION_DEFINE([LTDL_INIT], [subproject],
+ [m4_define([_LTDL_MODE], [subproject])])
+
+m4_define([_LTDL_TYPE], [])
+LT_OPTION_DEFINE([LTDL_INIT], [installable],
+ [m4_define([_LTDL_TYPE], [installable])])
+LT_OPTION_DEFINE([LTDL_INIT], [convenience],
+ [m4_define([_LTDL_TYPE], [convenience])])
diff --git a/m4/ltsugar.m4 b/m4/ltsugar.m4
new file mode 100644
index 0000000..48bc934
--- /dev/null
+++ b/m4/ltsugar.m4
@@ -0,0 +1,124 @@
+# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*-
+#
+# Copyright (C) 2004-2005, 2007-2008, 2011-2015 Free Software
+# Foundation, Inc.
+# Written by Gary V. Vaughan, 2004
+#
+# This file is free software; the Free Software Foundation gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved.
+
+# serial 6 ltsugar.m4
+
+# This is to help aclocal find these macros, as it can't see m4_define.
+AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
+
+
+# lt_join(SEP, ARG1, [ARG2...])
+# -----------------------------
+# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
+# associated separator.
+# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
+# versions in m4sugar had bugs.
+m4_define([lt_join],
+[m4_if([$#], [1], [],
+ [$#], [2], [[$2]],
+ [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
+m4_define([_lt_join],
+[m4_if([$#$2], [2], [],
+ [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
+
+
+# lt_car(LIST)
+# lt_cdr(LIST)
+# ------------
+# Manipulate m4 lists.
+# These macros are necessary as long as will still need to support
+# Autoconf-2.59, which quotes differently.
+m4_define([lt_car], [[$1]])
+m4_define([lt_cdr],
+[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
+ [$#], 1, [],
+ [m4_dquote(m4_shift($@))])])
+m4_define([lt_unquote], $1)
+
+
+# lt_append(MACRO-NAME, STRING, [SEPARATOR])
+# ------------------------------------------
+# Redefine MACRO-NAME to hold its former content plus 'SEPARATOR''STRING'.
+# Note that neither SEPARATOR nor STRING are expanded; they are appended
+# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
+# No SEPARATOR is output if MACRO-NAME was previously undefined (different
+# than defined and empty).
+#
+# This macro is needed until we can rely on Autoconf 2.62, since earlier
+# versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
+m4_define([lt_append],
+[m4_define([$1],
+ m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
+
+
+
+# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
+# ----------------------------------------------------------
+# Produce a SEP delimited list of all paired combinations of elements of
+# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list
+# has the form PREFIXmINFIXSUFFIXn.
+# Needed until we can rely on m4_combine added in Autoconf 2.62.
+m4_define([lt_combine],
+[m4_if(m4_eval([$# > 3]), [1],
+ [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
+[[m4_foreach([_Lt_prefix], [$2],
+ [m4_foreach([_Lt_suffix],
+ ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
+ [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
+
+
+# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
+# -----------------------------------------------------------------------
+# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
+# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
+m4_define([lt_if_append_uniq],
+[m4_ifdef([$1],
+ [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
+ [lt_append([$1], [$2], [$3])$4],
+ [$5])],
+ [lt_append([$1], [$2], [$3])$4])])
+
+
+# lt_dict_add(DICT, KEY, VALUE)
+# -----------------------------
+m4_define([lt_dict_add],
+[m4_define([$1($2)], [$3])])
+
+
+# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
+# --------------------------------------------
+m4_define([lt_dict_add_subkey],
+[m4_define([$1($2:$3)], [$4])])
+
+
+# lt_dict_fetch(DICT, KEY, [SUBKEY])
+# ----------------------------------
+m4_define([lt_dict_fetch],
+[m4_ifval([$3],
+ m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
+ m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
+
+
+# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
+# -----------------------------------------------------------------
+m4_define([lt_if_dict_fetch],
+[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
+ [$5],
+ [$6])])
+
+
+# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
+# --------------------------------------------------------------
+m4_define([lt_dict_filter],
+[m4_if([$5], [], [],
+ [lt_join(m4_quote(m4_default([$4], [[, ]])),
+ lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
+ [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
+])
diff --git a/m4/ltversion.m4 b/m4/ltversion.m4
new file mode 100644
index 0000000..fa04b52
--- /dev/null
+++ b/m4/ltversion.m4
@@ -0,0 +1,23 @@
+# ltversion.m4 -- version numbers -*- Autoconf -*-
+#
+# Copyright (C) 2004, 2011-2015 Free Software Foundation, Inc.
+# Written by Scott James Remnant, 2004
+#
+# This file is free software; the Free Software Foundation gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved.
+
+# @configure_input@
+
+# serial 4179 ltversion.m4
+# This file is part of GNU Libtool
+
+m4_define([LT_PACKAGE_VERSION], [2.4.6])
+m4_define([LT_PACKAGE_REVISION], [2.4.6])
+
+AC_DEFUN([LTVERSION_VERSION],
+[macro_version='2.4.6'
+macro_revision='2.4.6'
+_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
+_LT_DECL(, macro_revision, 0)
+])
diff --git a/m4/lt~obsolete.m4 b/m4/lt~obsolete.m4
new file mode 100644
index 0000000..c6b26f8
--- /dev/null
+++ b/m4/lt~obsolete.m4
@@ -0,0 +1,99 @@
+# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*-
+#
+# Copyright (C) 2004-2005, 2007, 2009, 2011-2015 Free Software
+# Foundation, Inc.
+# Written by Scott James Remnant, 2004.
+#
+# This file is free software; the Free Software Foundation gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved.
+
+# serial 5 lt~obsolete.m4
+
+# These exist entirely to fool aclocal when bootstrapping libtool.
+#
+# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN),
+# which have later been changed to m4_define as they aren't part of the
+# exported API, or moved to Autoconf or Automake where they belong.
+#
+# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN
+# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
+# using a macro with the same name in our local m4/libtool.m4 it'll
+# pull the old libtool.m4 in (it doesn't see our shiny new m4_define
+# and doesn't know about Autoconf macros at all.)
+#
+# So we provide this file, which has a silly filename so it's always
+# included after everything else. This provides aclocal with the
+# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
+# because those macros already exist, or will be overwritten later.
+# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6.
+#
+# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
+# Yes, that means every name once taken will need to remain here until
+# we give up compatibility with versions before 1.7, at which point
+# we need to keep only those names which we still refer to.
+
+# This is to help aclocal find these macros, as it can't see m4_define.
+AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
+
+m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
+m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])])
+m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
+m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])])
+m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
+m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])])
+m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])])
+m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
+m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])])
+m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])])
+m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])])
+m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
+m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
+m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
+m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
+m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])])
+m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])])
+m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
+m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
+m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])])
+m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])])
+m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
+m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
+m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
+m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
+m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
+m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
+m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
+m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])])
+m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])])
+m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])])
+m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
+m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])])
+m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])])
+m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])])
+m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])])
+m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
+m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])])
+m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
+m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])])
+m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])])
+m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])])
+m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
+m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
+m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
+m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
+m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
+m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
+m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
+m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
+m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
+m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
+m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])])
+m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
+m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])])
+m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])])
+m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])])
+m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])])
+m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])])
+m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])])
+m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])])
diff --git a/misc/libixion.spec.in b/misc/libixion.spec.in
new file mode 100644
index 0000000..fb3fdea
--- /dev/null
+++ b/misc/libixion.spec.in
@@ -0,0 +1,76 @@
+%define _corename libixion
+%define _ver @VERSION@
+%define _pkgname %{_corename}_%{_ver}
+%define _apiver @IXION_API_VERSION@
+%define _libname %{_corename}-%{_apiver}
+
+Name: %{_corename}-0_4-0
+Version: %{_ver}
+Release: 1
+Url: http://gitorious.org/ixion
+License: MIT/X11
+Source: %{_pkgname}.tar.bz2
+Group: Development/Libraries/C and C++
+Summary: Threaded multi-target formula parser & interpreter
+BuildRoot: %{_tmppath}/%{name}-%{version}-build
+BuildRequires: gcc-c++, libstdc++-devel, pkg-config, coreutils, boost-devel
+BuildRequires: mdds-devel >= 0.5.4
+Requires: boost >= 1.39
+
+%description
+Ixion is a general purpose formula parser & interpreter that can calculate
+multiple named targets, or "cells".
+
+Authors:
+--------
+ Kohei Yoshida <kohei.yoshida@suse.com>
+
+%package devel
+License: MIT/X11
+Group: Development/Libraries/C and C++
+Summary: Threaded multi-target formula parser & interpreter
+
+%description devel
+Ixion is a general purpose formula parser & interpreter that can calculate
+multiple named targets, or "cells".
+
+Authors:
+--------
+ Kohei Yoshida <kohei.yoshida@suse.com>
+
+%prep
+%setup -q -n %{_pkgname}
+
+%build
+./autogen.sh --prefix=/usr --libdir=%_libdir
+make %{?_smp_mflags}
+
+%check
+make check
+
+%install
+make DESTDIR=$RPM_BUILD_ROOT install
+rm $RPM_BUILD_ROOT%_bindir/ixion-test
+rm $RPM_BUILD_ROOT%_libdir/%{_libname}.a
+rm $RPM_BUILD_ROOT%_libdir/%{_libname}.la
+
+%post -p /sbin/ldconfig
+%postun -p /sbin/ldconfig
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(-,root,root)
+%{_bindir}/ixion-parser
+%{_bindir}/ixion-sorter
+%{_libdir}/%{_libname}.so.*
+
+%files devel
+%defattr(-,root,root)
+%{_includedir}/%{_libname}
+%{_libdir}/%{_libname}.so
+%{_libdir}/pkgconfig/%{_libname}.pc
+
+%changelog
+
diff --git a/missing b/missing
new file mode 100755
index 0000000..1fe1611
--- /dev/null
+++ b/missing
@@ -0,0 +1,215 @@
+#! /bin/sh
+# Common wrapper for a few potentially missing GNU programs.
+
+scriptversion=2018-03-07.03; # UTC
+
+# Copyright (C) 1996-2021 Free Software Foundation, Inc.
+# Originally written by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+if test $# -eq 0; then
+ echo 1>&2 "Try '$0 --help' for more information"
+ exit 1
+fi
+
+case $1 in
+
+ --is-lightweight)
+ # Used by our autoconf macros to check whether the available missing
+ # script is modern enough.
+ exit 0
+ ;;
+
+ --run)
+ # Back-compat with the calling convention used by older automake.
+ shift
+ ;;
+
+ -h|--h|--he|--hel|--help)
+ echo "\
+$0 [OPTION]... PROGRAM [ARGUMENT]...
+
+Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due
+to PROGRAM being missing or too old.
+
+Options:
+ -h, --help display this help and exit
+ -v, --version output version information and exit
+
+Supported PROGRAM values:
+ aclocal autoconf autoheader autom4te automake makeinfo
+ bison yacc flex lex help2man
+
+Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and
+'g' are ignored when checking the name.
+
+Send bug reports to <bug-automake@gnu.org>."
+ exit $?
+ ;;
+
+ -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
+ echo "missing $scriptversion (GNU Automake)"
+ exit $?
+ ;;
+
+ -*)
+ echo 1>&2 "$0: unknown '$1' option"
+ echo 1>&2 "Try '$0 --help' for more information"
+ exit 1
+ ;;
+
+esac
+
+# Run the given program, remember its exit status.
+"$@"; st=$?
+
+# If it succeeded, we are done.
+test $st -eq 0 && exit 0
+
+# Also exit now if we it failed (or wasn't found), and '--version' was
+# passed; such an option is passed most likely to detect whether the
+# program is present and works.
+case $2 in --version|--help) exit $st;; esac
+
+# Exit code 63 means version mismatch. This often happens when the user
+# tries to use an ancient version of a tool on a file that requires a
+# minimum version.
+if test $st -eq 63; then
+ msg="probably too old"
+elif test $st -eq 127; then
+ # Program was missing.
+ msg="missing on your system"
+else
+ # Program was found and executed, but failed. Give up.
+ exit $st
+fi
+
+perl_URL=https://www.perl.org/
+flex_URL=https://github.com/westes/flex
+gnu_software_URL=https://www.gnu.org/software
+
+program_details ()
+{
+ case $1 in
+ aclocal|automake)
+ echo "The '$1' program is part of the GNU Automake package:"
+ echo "<$gnu_software_URL/automake>"
+ echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:"
+ echo "<$gnu_software_URL/autoconf>"
+ echo "<$gnu_software_URL/m4/>"
+ echo "<$perl_URL>"
+ ;;
+ autoconf|autom4te|autoheader)
+ echo "The '$1' program is part of the GNU Autoconf package:"
+ echo "<$gnu_software_URL/autoconf/>"
+ echo "It also requires GNU m4 and Perl in order to run:"
+ echo "<$gnu_software_URL/m4/>"
+ echo "<$perl_URL>"
+ ;;
+ esac
+}
+
+give_advice ()
+{
+ # Normalize program name to check for.
+ normalized_program=`echo "$1" | sed '
+ s/^gnu-//; t
+ s/^gnu//; t
+ s/^g//; t'`
+
+ printf '%s\n' "'$1' is $msg."
+
+ configure_deps="'configure.ac' or m4 files included by 'configure.ac'"
+ case $normalized_program in
+ autoconf*)
+ echo "You should only need it if you modified 'configure.ac',"
+ echo "or m4 files included by it."
+ program_details 'autoconf'
+ ;;
+ autoheader*)
+ echo "You should only need it if you modified 'acconfig.h' or"
+ echo "$configure_deps."
+ program_details 'autoheader'
+ ;;
+ automake*)
+ echo "You should only need it if you modified 'Makefile.am' or"
+ echo "$configure_deps."
+ program_details 'automake'
+ ;;
+ aclocal*)
+ echo "You should only need it if you modified 'acinclude.m4' or"
+ echo "$configure_deps."
+ program_details 'aclocal'
+ ;;
+ autom4te*)
+ echo "You might have modified some maintainer files that require"
+ echo "the 'autom4te' program to be rebuilt."
+ program_details 'autom4te'
+ ;;
+ bison*|yacc*)
+ echo "You should only need it if you modified a '.y' file."
+ echo "You may want to install the GNU Bison package:"
+ echo "<$gnu_software_URL/bison/>"
+ ;;
+ lex*|flex*)
+ echo "You should only need it if you modified a '.l' file."
+ echo "You may want to install the Fast Lexical Analyzer package:"
+ echo "<$flex_URL>"
+ ;;
+ help2man*)
+ echo "You should only need it if you modified a dependency" \
+ "of a man page."
+ echo "You may want to install the GNU Help2man package:"
+ echo "<$gnu_software_URL/help2man/>"
+ ;;
+ makeinfo*)
+ echo "You should only need it if you modified a '.texi' file, or"
+ echo "any other file indirectly affecting the aspect of the manual."
+ echo "You might want to install the Texinfo package:"
+ echo "<$gnu_software_URL/texinfo/>"
+ echo "The spurious makeinfo call might also be the consequence of"
+ echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might"
+ echo "want to install GNU make:"
+ echo "<$gnu_software_URL/make/>"
+ ;;
+ *)
+ echo "You might have modified some files without having the proper"
+ echo "tools for further handling them. Check the 'README' file, it"
+ echo "often tells you about the needed prerequisites for installing"
+ echo "this package. You may also peek at any GNU archive site, in"
+ echo "case some other package contains this missing '$1' program."
+ ;;
+ esac
+}
+
+give_advice "$1" | sed -e '1s/^/WARNING: /' \
+ -e '2,$s/^/ /' >&2
+
+# Propagate the correct exit status (expected to be 127 for a program
+# not found, 63 for a program that failed due to version mismatch).
+exit $st
+
+# Local variables:
+# eval: (add-hook 'before-save-hook 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-time-zone: "UTC0"
+# time-stamp-end: "; # UTC"
+# End:
diff --git a/src/Makefile.am b/src/Makefile.am
new file mode 100644
index 0000000..c081dfd
--- /dev/null
+++ b/src/Makefile.am
@@ -0,0 +1,54 @@
+SUBDIRS = include test libixion python
+
+AM_CPPFLAGS = \
+ -I$(top_srcdir)/include \
+ -I$(top_srcdir)/src/include \
+ $(MDDS_CFLAGS) $(BOOST_CPPFLAGS)
+
+bin_PROGRAMS = ixion-parser ixion-sorter ixion-formula-tokenizer
+
+ixion_parser_SOURCES = \
+ ixion_parser.cpp \
+ model_parser.hpp \
+ model_parser.cpp \
+ app_common.hpp \
+ app_common.cpp \
+ session_handler.hpp \
+ session_handler.cpp \
+ table_handler.hpp \
+ table_handler.cpp
+
+ixion_parser_LDADD = libixion/libixion-@IXION_API_VERSION@.la \
+ $(BOOST_PROGRAM_OPTIONS_LIBS)
+
+ixion_sorter_SOURCES = \
+ ixion_sorter.cpp \
+ app_common.cpp \
+ sort_input_parser.hpp \
+ sort_input_parser.cpp
+
+ixion_sorter_LDADD = libixion/libixion-@IXION_API_VERSION@.la \
+ $(BOOST_PROGRAM_OPTIONS_LIBS)
+
+ixion_formula_tokenizer_SOURCES = \
+ ixion_formula_tokenizer.cpp
+
+ixion_formula_tokenizer_LDADD = libixion/libixion-@IXION_API_VERSION@.la \
+ $(BOOST_PROGRAM_OPTIONS_LIBS)
+
+
+AM_TESTS_ENVIRONMENT = PATH=.libs$${PATH:+:$${PATH}}; export PATH; \
+ LD_LIBRARY_PATH=libixion/.libs$${LD_LIBRARY_PATH:+:$${LD_LIBRARY_PATH}}; export LD_LIBRARY_PATH; \
+ DYLD_LIBRARY_PATH=$${LD_LIBRARY_PATH}}; export DYLD_LIBRARY_PATH;
+
+TESTS = \
+ ../test/parser-test-t0.sh \
+ ../test/parser-test-t1.sh \
+ ../test/parser-test-t2.sh \
+ ../test/parser-test-t3.sh \
+ ../test/parser-test-t4.sh \
+ ../test/parser-test-t5.sh \
+ ../test/parser-test-t6.sh \
+ ../test/parser-test-t7.sh \
+ ../test/parser-test-t8.sh
+
diff --git a/src/Makefile.in b/src/Makefile.in
new file mode 100644
index 0000000..b95e641
--- /dev/null
+++ b/src/Makefile.in
@@ -0,0 +1,1345 @@
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
+
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+VPATH = @srcdir@
+am__is_gnu_make = { \
+ if test -z '$(MAKELEVEL)'; then \
+ false; \
+ elif test -n '$(MAKE_HOST)'; then \
+ true; \
+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+ true; \
+ else \
+ false; \
+ fi; \
+}
+am__make_running_with_option = \
+ case $${target_option-} in \
+ ?) ;; \
+ *) echo "am__make_running_with_option: internal error: invalid" \
+ "target option '$${target_option-}' specified" >&2; \
+ exit 1;; \
+ esac; \
+ has_opt=no; \
+ sane_makeflags=$$MAKEFLAGS; \
+ if $(am__is_gnu_make); then \
+ sane_makeflags=$$MFLAGS; \
+ else \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ bs=\\; \
+ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
+ esac; \
+ fi; \
+ skip_next=no; \
+ strip_trailopt () \
+ { \
+ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+ }; \
+ for flg in $$sane_makeflags; do \
+ test $$skip_next = yes && { skip_next=no; continue; }; \
+ case $$flg in \
+ *=*|--*) continue;; \
+ -*I) strip_trailopt 'I'; skip_next=yes;; \
+ -*I?*) strip_trailopt 'I';; \
+ -*O) strip_trailopt 'O'; skip_next=yes;; \
+ -*O?*) strip_trailopt 'O';; \
+ -*l) strip_trailopt 'l'; skip_next=yes;; \
+ -*l?*) strip_trailopt 'l';; \
+ -[dEDm]) skip_next=yes;; \
+ -[JT]) skip_next=yes;; \
+ esac; \
+ case $$flg in \
+ *$$target_option*) has_opt=yes; break;; \
+ esac; \
+ done; \
+ test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+bin_PROGRAMS = ixion-parser$(EXEEXT) ixion-sorter$(EXEEXT) \
+ ixion-formula-tokenizer$(EXEEXT)
+subdir = src
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/ax_cxx_compile_stdcxx.m4 \
+ $(top_srcdir)/m4/ax_cxx_compile_stdcxx_17.m4 \
+ $(top_srcdir)/m4/boost.m4 $(top_srcdir)/m4/libtool.m4 \
+ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
+ $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+am__installdirs = "$(DESTDIR)$(bindir)"
+PROGRAMS = $(bin_PROGRAMS)
+am_ixion_formula_tokenizer_OBJECTS = \
+ ixion_formula_tokenizer.$(OBJEXT)
+ixion_formula_tokenizer_OBJECTS = \
+ $(am_ixion_formula_tokenizer_OBJECTS)
+am__DEPENDENCIES_1 =
+ixion_formula_tokenizer_DEPENDENCIES = \
+ libixion/libixion-@IXION_API_VERSION@.la $(am__DEPENDENCIES_1)
+AM_V_lt = $(am__v_lt_@AM_V@)
+am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
+am__v_lt_0 = --silent
+am__v_lt_1 =
+am_ixion_parser_OBJECTS = ixion_parser.$(OBJEXT) \
+ model_parser.$(OBJEXT) app_common.$(OBJEXT) \
+ session_handler.$(OBJEXT) table_handler.$(OBJEXT)
+ixion_parser_OBJECTS = $(am_ixion_parser_OBJECTS)
+ixion_parser_DEPENDENCIES = libixion/libixion-@IXION_API_VERSION@.la \
+ $(am__DEPENDENCIES_1)
+am_ixion_sorter_OBJECTS = ixion_sorter.$(OBJEXT) app_common.$(OBJEXT) \
+ sort_input_parser.$(OBJEXT)
+ixion_sorter_OBJECTS = $(am_ixion_sorter_OBJECTS)
+ixion_sorter_DEPENDENCIES = libixion/libixion-@IXION_API_VERSION@.la \
+ $(am__DEPENDENCIES_1)
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo " GEN " $@;
+am__v_GEN_1 =
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 =
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__maybe_remake_depfiles = depfiles
+am__depfiles_remade = ./$(DEPDIR)/app_common.Po \
+ ./$(DEPDIR)/ixion_formula_tokenizer.Po \
+ ./$(DEPDIR)/ixion_parser.Po ./$(DEPDIR)/ixion_sorter.Po \
+ ./$(DEPDIR)/model_parser.Po ./$(DEPDIR)/session_handler.Po \
+ ./$(DEPDIR)/sort_input_parser.Po ./$(DEPDIR)/table_handler.Po
+am__mv = mv -f
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CXXFLAGS) $(CXXFLAGS)
+AM_V_CXX = $(am__v_CXX_@AM_V@)
+am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@)
+am__v_CXX_0 = @echo " CXX " $@;
+am__v_CXX_1 =
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CXXLD = $(am__v_CXXLD_@AM_V@)
+am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@)
+am__v_CXXLD_0 = @echo " CXXLD " $@;
+am__v_CXXLD_1 =
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_@AM_V@)
+am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
+am__v_CC_0 = @echo " CC " $@;
+am__v_CC_1 =
+CCLD = $(CC)
+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_@AM_V@)
+am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
+am__v_CCLD_0 = @echo " CCLD " $@;
+am__v_CCLD_1 =
+SOURCES = $(ixion_formula_tokenizer_SOURCES) $(ixion_parser_SOURCES) \
+ $(ixion_sorter_SOURCES)
+DIST_SOURCES = $(ixion_formula_tokenizer_SOURCES) \
+ $(ixion_parser_SOURCES) $(ixion_sorter_SOURCES)
+RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
+ ctags-recursive dvi-recursive html-recursive info-recursive \
+ install-data-recursive install-dvi-recursive \
+ install-exec-recursive install-html-recursive \
+ install-info-recursive install-pdf-recursive \
+ install-ps-recursive install-recursive installcheck-recursive \
+ installdirs-recursive pdf-recursive ps-recursive \
+ tags-recursive uninstall-recursive
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
+ distclean-recursive maintainer-clean-recursive
+am__recursive_targets = \
+ $(RECURSIVE_TARGETS) \
+ $(RECURSIVE_CLEAN_TARGETS) \
+ $(am__extra_recursive_targets)
+AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
+ check recheck distdir distdir-am
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+# Read a list of newline-separated strings from the standard input,
+# and print each of them once, without duplicates. Input order is
+# *not* preserved.
+am__uniquify_input = $(AWK) '\
+ BEGIN { nonempty = 0; } \
+ { items[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in items) print i; }; } \
+'
+# Make sure the list of sources is unique. This is necessary because,
+# e.g., the same source file might be shared among _SOURCES variables
+# for different programs/libraries.
+am__define_uniq_tagged_files = \
+ list='$(am__tagged_files)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | $(am__uniquify_input)`
+am__tty_colors_dummy = \
+ mgn= red= grn= lgn= blu= brg= std=; \
+ am__color_tests=no
+am__tty_colors = { \
+ $(am__tty_colors_dummy); \
+ if test "X$(AM_COLOR_TESTS)" = Xno; then \
+ am__color_tests=no; \
+ elif test "X$(AM_COLOR_TESTS)" = Xalways; then \
+ am__color_tests=yes; \
+ elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \
+ am__color_tests=yes; \
+ fi; \
+ if test $$am__color_tests = yes; then \
+ red=''; \
+ grn=''; \
+ lgn=''; \
+ blu=''; \
+ mgn=''; \
+ brg=''; \
+ std=''; \
+ fi; \
+}
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+ if (++n[$$2] == $(am__install_max)) \
+ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+ END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+ test -z "$$files" \
+ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+ $(am__cd) "$$dir" && rm -f $$files; }; \
+ }
+am__recheck_rx = ^[ ]*:recheck:[ ]*
+am__global_test_result_rx = ^[ ]*:global-test-result:[ ]*
+am__copy_in_global_log_rx = ^[ ]*:copy-in-global-log:[ ]*
+# A command that, given a newline-separated list of test names on the
+# standard input, print the name of the tests that are to be re-run
+# upon "make recheck".
+am__list_recheck_tests = $(AWK) '{ \
+ recheck = 1; \
+ while ((rc = (getline line < ($$0 ".trs"))) != 0) \
+ { \
+ if (rc < 0) \
+ { \
+ if ((getline line2 < ($$0 ".log")) < 0) \
+ recheck = 0; \
+ break; \
+ } \
+ else if (line ~ /$(am__recheck_rx)[nN][Oo]/) \
+ { \
+ recheck = 0; \
+ break; \
+ } \
+ else if (line ~ /$(am__recheck_rx)[yY][eE][sS]/) \
+ { \
+ break; \
+ } \
+ }; \
+ if (recheck) \
+ print $$0; \
+ close ($$0 ".trs"); \
+ close ($$0 ".log"); \
+}'
+# A command that, given a newline-separated list of test names on the
+# standard input, create the global log from their .trs and .log files.
+am__create_global_log = $(AWK) ' \
+function fatal(msg) \
+{ \
+ print "fatal: making $@: " msg | "cat >&2"; \
+ exit 1; \
+} \
+function rst_section(header) \
+{ \
+ print header; \
+ len = length(header); \
+ for (i = 1; i <= len; i = i + 1) \
+ printf "="; \
+ printf "\n\n"; \
+} \
+{ \
+ copy_in_global_log = 1; \
+ global_test_result = "RUN"; \
+ while ((rc = (getline line < ($$0 ".trs"))) != 0) \
+ { \
+ if (rc < 0) \
+ fatal("failed to read from " $$0 ".trs"); \
+ if (line ~ /$(am__global_test_result_rx)/) \
+ { \
+ sub("$(am__global_test_result_rx)", "", line); \
+ sub("[ ]*$$", "", line); \
+ global_test_result = line; \
+ } \
+ else if (line ~ /$(am__copy_in_global_log_rx)[nN][oO]/) \
+ copy_in_global_log = 0; \
+ }; \
+ if (copy_in_global_log) \
+ { \
+ rst_section(global_test_result ": " $$0); \
+ while ((rc = (getline line < ($$0 ".log"))) != 0) \
+ { \
+ if (rc < 0) \
+ fatal("failed to read from " $$0 ".log"); \
+ print line; \
+ }; \
+ printf "\n"; \
+ }; \
+ close ($$0 ".trs"); \
+ close ($$0 ".log"); \
+}'
+# Restructured Text title.
+am__rst_title = { sed 's/.*/ & /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; }
+# Solaris 10 'make', and several other traditional 'make' implementations,
+# pass "-e" to $(SHELL), and POSIX 2008 even requires this. Work around it
+# by disabling -e (using the XSI extension "set +e") if it's set.
+am__sh_e_setup = case $$- in *e*) set +e;; esac
+# Default flags passed to test drivers.
+am__common_driver_flags = \
+ --color-tests "$$am__color_tests" \
+ --enable-hard-errors "$$am__enable_hard_errors" \
+ --expect-failure "$$am__expect_failure"
+# To be inserted before the command running the test. Creates the
+# directory for the log if needed. Stores in $dir the directory
+# containing $f, in $tst the test, in $log the log. Executes the
+# developer- defined test setup AM_TESTS_ENVIRONMENT (if any), and
+# passes TESTS_ENVIRONMENT. Set up options for the wrapper that
+# will run the test scripts (or their associated LOG_COMPILER, if
+# thy have one).
+am__check_pre = \
+$(am__sh_e_setup); \
+$(am__vpath_adj_setup) $(am__vpath_adj) \
+$(am__tty_colors); \
+srcdir=$(srcdir); export srcdir; \
+case "$@" in \
+ */*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;; \
+ *) am__odir=.;; \
+esac; \
+test "x$$am__odir" = x"." || test -d "$$am__odir" \
+ || $(MKDIR_P) "$$am__odir" || exit $$?; \
+if test -f "./$$f"; then dir=./; \
+elif test -f "$$f"; then dir=; \
+else dir="$(srcdir)/"; fi; \
+tst=$$dir$$f; log='$@'; \
+if test -n '$(DISABLE_HARD_ERRORS)'; then \
+ am__enable_hard_errors=no; \
+else \
+ am__enable_hard_errors=yes; \
+fi; \
+case " $(XFAIL_TESTS) " in \
+ *[\ \ ]$$f[\ \ ]* | *[\ \ ]$$dir$$f[\ \ ]*) \
+ am__expect_failure=yes;; \
+ *) \
+ am__expect_failure=no;; \
+esac; \
+$(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT)
+# A shell command to get the names of the tests scripts with any registered
+# extension removed (i.e., equivalently, the names of the test logs, with
+# the '.log' extension removed). The result is saved in the shell variable
+# '$bases'. This honors runtime overriding of TESTS and TEST_LOGS. Sadly,
+# we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)",
+# since that might cause problem with VPATH rewrites for suffix-less tests.
+# See also 'test-harness-vpath-rewrite.sh' and 'test-trs-basic.sh'.
+am__set_TESTS_bases = \
+ bases='$(TEST_LOGS)'; \
+ bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \
+ bases=`echo $$bases`
+AM_TESTSUITE_SUMMARY_HEADER = ' for $(PACKAGE_STRING)'
+RECHECK_LOGS = $(TEST_LOGS)
+TEST_SUITE_LOG = test-suite.log
+TEST_EXTENSIONS = @EXEEXT@ .test
+LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver
+LOG_COMPILE = $(LOG_COMPILER) $(AM_LOG_FLAGS) $(LOG_FLAGS)
+am__set_b = \
+ case '$@' in \
+ */*) \
+ case '$*' in \
+ */*) b='$*';; \
+ *) b=`echo '$@' | sed 's/\.log$$//'`; \
+ esac;; \
+ *) \
+ b='$*';; \
+ esac
+am__test_logs1 = $(TESTS:=.log)
+am__test_logs2 = $(am__test_logs1:@EXEEXT@.log=.log)
+TEST_LOGS = $(am__test_logs2:.test.log=.log)
+TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver
+TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \
+ $(TEST_LOG_FLAGS)
+DIST_SUBDIRS = $(SUBDIRS)
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp \
+ $(top_srcdir)/test-driver
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+am__relativize = \
+ dir0=`pwd`; \
+ sed_first='s,^\([^/]*\)/.*$$,\1,'; \
+ sed_rest='s,^[^/]*/*,,'; \
+ sed_last='s,^.*/\([^/]*\)$$,\1,'; \
+ sed_butlast='s,/*[^/]*$$,,'; \
+ while test -n "$$dir1"; do \
+ first=`echo "$$dir1" | sed -e "$$sed_first"`; \
+ if test "$$first" != "."; then \
+ if test "$$first" = ".."; then \
+ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
+ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
+ else \
+ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
+ if test "$$first2" = "$$first"; then \
+ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
+ else \
+ dir2="../$$dir2"; \
+ fi; \
+ dir0="$$dir0"/"$$first"; \
+ fi; \
+ fi; \
+ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
+ done; \
+ reldir="$$dir2"
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AS = @AS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+BOOST_CPPFLAGS = @BOOST_CPPFLAGS@
+BOOST_FILESYSTEM_LDFLAGS = @BOOST_FILESYSTEM_LDFLAGS@
+BOOST_FILESYSTEM_LDPATH = @BOOST_FILESYSTEM_LDPATH@
+BOOST_FILESYSTEM_LIBS = @BOOST_FILESYSTEM_LIBS@
+BOOST_LDPATH = @BOOST_LDPATH@
+BOOST_PROGRAM_OPTIONS_LDFLAGS = @BOOST_PROGRAM_OPTIONS_LDFLAGS@
+BOOST_PROGRAM_OPTIONS_LDPATH = @BOOST_PROGRAM_OPTIONS_LDPATH@
+BOOST_PROGRAM_OPTIONS_LIBS = @BOOST_PROGRAM_OPTIONS_LIBS@
+BOOST_ROOT = @BOOST_ROOT@
+BOOST_SYSTEM_LDFLAGS = @BOOST_SYSTEM_LDFLAGS@
+BOOST_SYSTEM_LDPATH = @BOOST_SYSTEM_LDPATH@
+BOOST_SYSTEM_LIBS = @BOOST_SYSTEM_LIBS@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPPFLAGS = @CPPFLAGS@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DISTCHECK_CONFIGURE_FLAGS = @DISTCHECK_CONFIGURE_FLAGS@
+DLLTOOL = @DLLTOOL@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+ETAGS = @ETAGS@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+GREP = @GREP@
+HAVE_CXX17 = @HAVE_CXX17@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+IXION_API_VERSION = @IXION_API_VERSION@
+IXION_MAJOR_API_VERSION = @IXION_MAJOR_API_VERSION@
+IXION_MAJOR_VERSION = @IXION_MAJOR_VERSION@
+IXION_MICRO_VERSION = @IXION_MICRO_VERSION@
+IXION_MINOR_API_VERSION = @IXION_MINOR_API_VERSION@
+IXION_MINOR_VERSION = @IXION_MINOR_VERSION@
+IXION_VERSION = @IXION_VERSION@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
+MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MDDS_CFLAGS = @MDDS_CFLAGS@
+MDDS_LIBS = @MDDS_LIBS@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
+POW_LIB = @POW_LIB@
+PYTHON = @PYTHON@
+PYTHON_CFLAGS = @PYTHON_CFLAGS@
+PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
+PYTHON_LIBS = @PYTHON_LIBS@
+PYTHON_PLATFORM = @PYTHON_PLATFORM@
+PYTHON_PREFIX = @PYTHON_PREFIX@
+PYTHON_VERSION = @PYTHON_VERSION@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+VULKAN_CFLAGS = @VULKAN_CFLAGS@
+VULKAN_LIBS = @VULKAN_LIBS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+pkgpyexecdir = @pkgpyexecdir@
+pkgpythondir = @pkgpythondir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+pyexecdir = @pyexecdir@
+pythondir = @pythondir@
+runstatedir = @runstatedir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+SUBDIRS = include test libixion python
+AM_CPPFLAGS = \
+ -I$(top_srcdir)/include \
+ -I$(top_srcdir)/src/include \
+ $(MDDS_CFLAGS) $(BOOST_CPPFLAGS)
+
+ixion_parser_SOURCES = \
+ ixion_parser.cpp \
+ model_parser.hpp \
+ model_parser.cpp \
+ app_common.hpp \
+ app_common.cpp \
+ session_handler.hpp \
+ session_handler.cpp \
+ table_handler.hpp \
+ table_handler.cpp
+
+ixion_parser_LDADD = libixion/libixion-@IXION_API_VERSION@.la \
+ $(BOOST_PROGRAM_OPTIONS_LIBS)
+
+ixion_sorter_SOURCES = \
+ ixion_sorter.cpp \
+ app_common.cpp \
+ sort_input_parser.hpp \
+ sort_input_parser.cpp
+
+ixion_sorter_LDADD = libixion/libixion-@IXION_API_VERSION@.la \
+ $(BOOST_PROGRAM_OPTIONS_LIBS)
+
+ixion_formula_tokenizer_SOURCES = \
+ ixion_formula_tokenizer.cpp
+
+ixion_formula_tokenizer_LDADD = libixion/libixion-@IXION_API_VERSION@.la \
+ $(BOOST_PROGRAM_OPTIONS_LIBS)
+
+AM_TESTS_ENVIRONMENT = PATH=.libs$${PATH:+:$${PATH}}; export PATH; \
+ LD_LIBRARY_PATH=libixion/.libs$${LD_LIBRARY_PATH:+:$${LD_LIBRARY_PATH}}; export LD_LIBRARY_PATH; \
+ DYLD_LIBRARY_PATH=$${LD_LIBRARY_PATH}}; export DYLD_LIBRARY_PATH;
+
+TESTS = \
+ ../test/parser-test-t0.sh \
+ ../test/parser-test-t1.sh \
+ ../test/parser-test-t2.sh \
+ ../test/parser-test-t3.sh \
+ ../test/parser-test-t4.sh \
+ ../test/parser-test-t5.sh \
+ ../test/parser-test-t6.sh \
+ ../test/parser-test-t7.sh \
+ ../test/parser-test-t8.sh
+
+all: all-recursive
+
+.SUFFIXES:
+.SUFFIXES: .cpp .lo .log .o .obj .test .test$(EXEEXT) .trs
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --foreign src/Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+install-binPROGRAMS: $(bin_PROGRAMS)
+ @$(NORMAL_INSTALL)
+ @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \
+ fi; \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed 's/$(EXEEXT)$$//' | \
+ while read p p1; do if test -f $$p \
+ || test -f $$p1 \
+ ; then echo "$$p"; echo "$$p"; else :; fi; \
+ done | \
+ sed -e 'p;s,.*/,,;n;h' \
+ -e 's|.*|.|' \
+ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
+ sed 'N;N;N;s,\n, ,g' | \
+ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
+ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+ if ($$2 == $$4) files[d] = files[d] " " $$1; \
+ else { print "f", $$3 "/" $$4, $$1; } } \
+ END { for (d in files) print "f", d, files[d] }' | \
+ while read type dir files; do \
+ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+ test -z "$$files" || { \
+ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
+ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
+ } \
+ ; done
+
+uninstall-binPROGRAMS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+ files=`for p in $$list; do echo "$$p"; done | \
+ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
+ -e 's/$$/$(EXEEXT)/' \
+ `; \
+ test -n "$$list" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(bindir)" && rm -f $$files
+
+clean-binPROGRAMS:
+ @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \
+ echo " rm -f" $$list; \
+ rm -f $$list || exit $$?; \
+ test -n "$(EXEEXT)" || exit 0; \
+ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+ echo " rm -f" $$list; \
+ rm -f $$list
+
+ixion-formula-tokenizer$(EXEEXT): $(ixion_formula_tokenizer_OBJECTS) $(ixion_formula_tokenizer_DEPENDENCIES) $(EXTRA_ixion_formula_tokenizer_DEPENDENCIES)
+ @rm -f ixion-formula-tokenizer$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(ixion_formula_tokenizer_OBJECTS) $(ixion_formula_tokenizer_LDADD) $(LIBS)
+
+ixion-parser$(EXEEXT): $(ixion_parser_OBJECTS) $(ixion_parser_DEPENDENCIES) $(EXTRA_ixion_parser_DEPENDENCIES)
+ @rm -f ixion-parser$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(ixion_parser_OBJECTS) $(ixion_parser_LDADD) $(LIBS)
+
+ixion-sorter$(EXEEXT): $(ixion_sorter_OBJECTS) $(ixion_sorter_DEPENDENCIES) $(EXTRA_ixion_sorter_DEPENDENCIES)
+ @rm -f ixion-sorter$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(ixion_sorter_OBJECTS) $(ixion_sorter_LDADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/app_common.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ixion_formula_tokenizer.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ixion_parser.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ixion_sorter.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/model_parser.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/session_handler.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sort_input_parser.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/table_handler.Po@am__quote@ # am--include-marker
+
+$(am__depfiles_remade):
+ @$(MKDIR_P) $(@D)
+ @echo '# dummy' >$@-t && $(am__mv) $@-t $@
+
+am--depfiles: $(am__depfiles_remade)
+
+.cpp.o:
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $<
+
+.cpp.obj:
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cpp.lo:
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run 'make' without going through this Makefile.
+# To change the values of 'make' variables: instead of editing Makefiles,
+# (1) if the variable is set in 'config.status', edit 'config.status'
+# (which will cause the Makefiles to be regenerated when you run 'make');
+# (2) otherwise, pass the desired values on the 'make' command line.
+$(am__recursive_targets):
+ @fail=; \
+ if $(am__make_keepgoing); then \
+ failcom='fail=yes'; \
+ else \
+ failcom='exit 1'; \
+ fi; \
+ dot_seen=no; \
+ target=`echo $@ | sed s/-recursive//`; \
+ case "$@" in \
+ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+ *) list='$(SUBDIRS)' ;; \
+ esac; \
+ for subdir in $$list; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ dot_seen=yes; \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || eval $$failcom; \
+ done; \
+ if test "$$dot_seen" = "no"; then \
+ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+ fi; test -z "$$fail"
+
+ID: $(am__tagged_files)
+ $(am__define_uniq_tagged_files); mkid -fID $$unique
+tags: tags-recursive
+TAGS: tags
+
+tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ set x; \
+ here=`pwd`; \
+ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
+ include_option=--etags-include; \
+ empty_fix=.; \
+ else \
+ include_option=--include; \
+ empty_fix=; \
+ fi; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ test ! -f $$subdir/TAGS || \
+ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
+ fi; \
+ done; \
+ $(am__define_uniq_tagged_files); \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: ctags-recursive
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ $(am__define_uniq_tagged_files); \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+cscopelist: cscopelist-recursive
+
+cscopelist-am: $(am__tagged_files)
+ list='$(am__tagged_files)'; \
+ case "$(srcdir)" in \
+ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+ *) sdir=$(subdir)/$(srcdir) ;; \
+ esac; \
+ for i in $$list; do \
+ if test -f "$$i"; then \
+ echo "$(subdir)/$$i"; \
+ else \
+ echo "$$sdir/$$i"; \
+ fi; \
+ done >> $(top_builddir)/cscope.files
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+# Recover from deleted '.trs' file; this should ensure that
+# "rm -f foo.log; make foo.trs" re-run 'foo.test', and re-create
+# both 'foo.log' and 'foo.trs'. Break the recipe in two subshells
+# to avoid problems with "make -n".
+.log.trs:
+ rm -f $< $@
+ $(MAKE) $(AM_MAKEFLAGS) $<
+
+# Leading 'am--fnord' is there to ensure the list of targets does not
+# expand to empty, as could happen e.g. with make check TESTS=''.
+am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck)
+am--force-recheck:
+ @:
+
+$(TEST_SUITE_LOG): $(TEST_LOGS)
+ @$(am__set_TESTS_bases); \
+ am__f_ok () { test -f "$$1" && test -r "$$1"; }; \
+ redo_bases=`for i in $$bases; do \
+ am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \
+ done`; \
+ if test -n "$$redo_bases"; then \
+ redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \
+ redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \
+ if $(am__make_dryrun); then :; else \
+ rm -f $$redo_logs && rm -f $$redo_results || exit 1; \
+ fi; \
+ fi; \
+ if test -n "$$am__remaking_logs"; then \
+ echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \
+ "recursion detected" >&2; \
+ elif test -n "$$redo_logs"; then \
+ am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \
+ fi; \
+ if $(am__make_dryrun); then :; else \
+ st=0; \
+ errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \
+ for i in $$redo_bases; do \
+ test -f $$i.trs && test -r $$i.trs \
+ || { echo "$$errmsg $$i.trs" >&2; st=1; }; \
+ test -f $$i.log && test -r $$i.log \
+ || { echo "$$errmsg $$i.log" >&2; st=1; }; \
+ done; \
+ test $$st -eq 0 || exit 1; \
+ fi
+ @$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \
+ ws='[ ]'; \
+ results=`for b in $$bases; do echo $$b.trs; done`; \
+ test -n "$$results" || results=/dev/null; \
+ all=` grep "^$$ws*:test-result:" $$results | wc -l`; \
+ pass=` grep "^$$ws*:test-result:$$ws*PASS" $$results | wc -l`; \
+ fail=` grep "^$$ws*:test-result:$$ws*FAIL" $$results | wc -l`; \
+ skip=` grep "^$$ws*:test-result:$$ws*SKIP" $$results | wc -l`; \
+ xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \
+ xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \
+ error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \
+ if test `expr $$fail + $$xpass + $$error` -eq 0; then \
+ success=true; \
+ else \
+ success=false; \
+ fi; \
+ br='==================='; br=$$br$$br$$br$$br; \
+ result_count () \
+ { \
+ if test x"$$1" = x"--maybe-color"; then \
+ maybe_colorize=yes; \
+ elif test x"$$1" = x"--no-color"; then \
+ maybe_colorize=no; \
+ else \
+ echo "$@: invalid 'result_count' usage" >&2; exit 4; \
+ fi; \
+ shift; \
+ desc=$$1 count=$$2; \
+ if test $$maybe_colorize = yes && test $$count -gt 0; then \
+ color_start=$$3 color_end=$$std; \
+ else \
+ color_start= color_end=; \
+ fi; \
+ echo "$${color_start}# $$desc $$count$${color_end}"; \
+ }; \
+ create_testsuite_report () \
+ { \
+ result_count $$1 "TOTAL:" $$all "$$brg"; \
+ result_count $$1 "PASS: " $$pass "$$grn"; \
+ result_count $$1 "SKIP: " $$skip "$$blu"; \
+ result_count $$1 "XFAIL:" $$xfail "$$lgn"; \
+ result_count $$1 "FAIL: " $$fail "$$red"; \
+ result_count $$1 "XPASS:" $$xpass "$$red"; \
+ result_count $$1 "ERROR:" $$error "$$mgn"; \
+ }; \
+ { \
+ echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \
+ $(am__rst_title); \
+ create_testsuite_report --no-color; \
+ echo; \
+ echo ".. contents:: :depth: 2"; \
+ echo; \
+ for b in $$bases; do echo $$b; done \
+ | $(am__create_global_log); \
+ } >$(TEST_SUITE_LOG).tmp || exit 1; \
+ mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \
+ if $$success; then \
+ col="$$grn"; \
+ else \
+ col="$$red"; \
+ test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \
+ fi; \
+ echo "$${col}$$br$${std}"; \
+ echo "$${col}Testsuite summary"$(AM_TESTSUITE_SUMMARY_HEADER)"$${std}"; \
+ echo "$${col}$$br$${std}"; \
+ create_testsuite_report --maybe-color; \
+ echo "$$col$$br$$std"; \
+ if $$success; then :; else \
+ echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}"; \
+ if test -n "$(PACKAGE_BUGREPORT)"; then \
+ echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}"; \
+ fi; \
+ echo "$$col$$br$$std"; \
+ fi; \
+ $$success || exit 1
+
+check-TESTS:
+ @list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list
+ @list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list
+ @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
+ @set +e; $(am__set_TESTS_bases); \
+ log_list=`for i in $$bases; do echo $$i.log; done`; \
+ trs_list=`for i in $$bases; do echo $$i.trs; done`; \
+ log_list=`echo $$log_list`; trs_list=`echo $$trs_list`; \
+ $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \
+ exit $$?;
+recheck: all
+ @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
+ @set +e; $(am__set_TESTS_bases); \
+ bases=`for i in $$bases; do echo $$i; done \
+ | $(am__list_recheck_tests)` || exit 1; \
+ log_list=`for i in $$bases; do echo $$i.log; done`; \
+ log_list=`echo $$log_list`; \
+ $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) \
+ am__force_recheck=am--force-recheck \
+ TEST_LOGS="$$log_list"; \
+ exit $$?
+../test/parser-test-t0.sh.log: ../test/parser-test-t0.sh
+ @p='../test/parser-test-t0.sh'; \
+ b='../test/parser-test-t0.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+../test/parser-test-t1.sh.log: ../test/parser-test-t1.sh
+ @p='../test/parser-test-t1.sh'; \
+ b='../test/parser-test-t1.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+../test/parser-test-t2.sh.log: ../test/parser-test-t2.sh
+ @p='../test/parser-test-t2.sh'; \
+ b='../test/parser-test-t2.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+../test/parser-test-t3.sh.log: ../test/parser-test-t3.sh
+ @p='../test/parser-test-t3.sh'; \
+ b='../test/parser-test-t3.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+../test/parser-test-t4.sh.log: ../test/parser-test-t4.sh
+ @p='../test/parser-test-t4.sh'; \
+ b='../test/parser-test-t4.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+../test/parser-test-t5.sh.log: ../test/parser-test-t5.sh
+ @p='../test/parser-test-t5.sh'; \
+ b='../test/parser-test-t5.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+../test/parser-test-t6.sh.log: ../test/parser-test-t6.sh
+ @p='../test/parser-test-t6.sh'; \
+ b='../test/parser-test-t6.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+../test/parser-test-t7.sh.log: ../test/parser-test-t7.sh
+ @p='../test/parser-test-t7.sh'; \
+ b='../test/parser-test-t7.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+../test/parser-test-t8.sh.log: ../test/parser-test-t8.sh
+ @p='../test/parser-test-t8.sh'; \
+ b='../test/parser-test-t8.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+.test.log:
+ @p='$<'; \
+ $(am__set_b); \
+ $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+@am__EXEEXT_TRUE@.test$(EXEEXT).log:
+@am__EXEEXT_TRUE@ @p='$<'; \
+@am__EXEEXT_TRUE@ $(am__set_b); \
+@am__EXEEXT_TRUE@ $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \
+@am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \
+@am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \
+@am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT)
+distdir: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) distdir-am
+
+distdir-am: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+ @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ $(am__make_dryrun) \
+ || test -d "$(distdir)/$$subdir" \
+ || $(MKDIR_P) "$(distdir)/$$subdir" \
+ || exit 1; \
+ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
+ $(am__relativize); \
+ new_distdir=$$reldir; \
+ dir1=$$subdir; dir2="$(top_distdir)"; \
+ $(am__relativize); \
+ new_top_distdir=$$reldir; \
+ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
+ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
+ ($(am__cd) $$subdir && \
+ $(MAKE) $(AM_MAKEFLAGS) \
+ top_distdir="$$new_top_distdir" \
+ distdir="$$new_distdir" \
+ am__remove_distdir=: \
+ am__skip_length_check=: \
+ am__skip_mode_fix=: \
+ distdir) \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+ $(MAKE) $(AM_MAKEFLAGS) check-TESTS
+check: check-recursive
+all-am: Makefile $(PROGRAMS)
+installdirs: installdirs-recursive
+installdirs-am:
+ for dir in "$(DESTDIR)$(bindir)"; do \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+ done
+install: install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-recursive
+install-strip:
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
+mostlyclean-generic:
+ -test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS)
+ -test -z "$(TEST_LOGS:.log=.trs)" || rm -f $(TEST_LOGS:.log=.trs)
+ -test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-recursive
+
+clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-recursive
+ -rm -f ./$(DEPDIR)/app_common.Po
+ -rm -f ./$(DEPDIR)/ixion_formula_tokenizer.Po
+ -rm -f ./$(DEPDIR)/ixion_parser.Po
+ -rm -f ./$(DEPDIR)/ixion_sorter.Po
+ -rm -f ./$(DEPDIR)/model_parser.Po
+ -rm -f ./$(DEPDIR)/session_handler.Po
+ -rm -f ./$(DEPDIR)/sort_input_parser.Po
+ -rm -f ./$(DEPDIR)/table_handler.Po
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+html: html-recursive
+
+html-am:
+
+info: info-recursive
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-recursive
+
+install-dvi-am:
+
+install-exec-am: install-binPROGRAMS
+
+install-html: install-html-recursive
+
+install-html-am:
+
+install-info: install-info-recursive
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-recursive
+
+install-pdf-am:
+
+install-ps: install-ps-recursive
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-recursive
+ -rm -f ./$(DEPDIR)/app_common.Po
+ -rm -f ./$(DEPDIR)/ixion_formula_tokenizer.Po
+ -rm -f ./$(DEPDIR)/ixion_parser.Po
+ -rm -f ./$(DEPDIR)/ixion_sorter.Po
+ -rm -f ./$(DEPDIR)/model_parser.Po
+ -rm -f ./$(DEPDIR)/session_handler.Po
+ -rm -f ./$(DEPDIR)/sort_input_parser.Po
+ -rm -f ./$(DEPDIR)/table_handler.Po
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool
+
+pdf: pdf-recursive
+
+pdf-am:
+
+ps: ps-recursive
+
+ps-am:
+
+uninstall-am: uninstall-binPROGRAMS
+
+.MAKE: $(am__recursive_targets) check-am install-am install-strip
+
+.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \
+ am--depfiles check check-TESTS check-am clean \
+ clean-binPROGRAMS clean-generic clean-libtool cscopelist-am \
+ ctags ctags-am distclean distclean-compile distclean-generic \
+ distclean-libtool distclean-tags distdir dvi dvi-am html \
+ html-am info info-am install install-am install-binPROGRAMS \
+ install-data install-data-am install-dvi install-dvi-am \
+ install-exec install-exec-am install-html install-html-am \
+ install-info install-info-am install-man install-pdf \
+ install-pdf-am install-ps install-ps-am install-strip \
+ installcheck installcheck-am installdirs installdirs-am \
+ maintainer-clean maintainer-clean-generic mostlyclean \
+ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
+ pdf pdf-am ps ps-am recheck tags tags-am uninstall \
+ uninstall-am uninstall-binPROGRAMS
+
+.PRECIOUS: Makefile
+
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/src/app_common.cpp b/src/app_common.cpp
new file mode 100644
index 0000000..38e5c7e
--- /dev/null
+++ b/src/app_common.cpp
@@ -0,0 +1,40 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include "app_common.hpp"
+
+#include <ixion/exceptions.hpp>
+
+#include <fstream>
+#include <sstream>
+
+namespace ixion { namespace detail {
+
+std::string_view get_formula_result_output_separator()
+{
+ static const char* sep =
+ "---------------------------------------------------------";
+ return sep;
+}
+
+std::string load_file_content(const std::string& filepath)
+{
+ std::ifstream file(filepath.c_str());
+ if (!file)
+ // failed to open the specified file.
+ throw file_not_found(filepath);
+
+ std::ostringstream os;
+ os << file.rdbuf();
+ file.close();
+
+ return os.str();
+}
+
+}} // namespace ixion::detail
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/src/app_common.hpp b/src/app_common.hpp
new file mode 100644
index 0000000..d467e46
--- /dev/null
+++ b/src/app_common.hpp
@@ -0,0 +1,23 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef INCLUDED_IXION_SRC_APP_COMMON_HPP
+#define INCLUDED_IXION_SRC_APP_COMMON_HPP
+
+#include <string>
+
+namespace ixion { namespace detail {
+
+std::string_view get_formula_result_output_separator();
+
+std::string load_file_content(const std::string& filepath);
+
+}} // namespace ixion::detail
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/src/include/Makefile.am b/src/include/Makefile.am
new file mode 100644
index 0000000..ca4a861
--- /dev/null
+++ b/src/include/Makefile.am
@@ -0,0 +1,4 @@
+
+EXTRA_DIST = \
+ depth_first_search.hpp \
+ test_global.hpp
diff --git a/src/include/Makefile.in b/src/include/Makefile.in
new file mode 100644
index 0000000..377ac52
--- /dev/null
+++ b/src/include/Makefile.in
@@ -0,0 +1,491 @@
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
+
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+VPATH = @srcdir@
+am__is_gnu_make = { \
+ if test -z '$(MAKELEVEL)'; then \
+ false; \
+ elif test -n '$(MAKE_HOST)'; then \
+ true; \
+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+ true; \
+ else \
+ false; \
+ fi; \
+}
+am__make_running_with_option = \
+ case $${target_option-} in \
+ ?) ;; \
+ *) echo "am__make_running_with_option: internal error: invalid" \
+ "target option '$${target_option-}' specified" >&2; \
+ exit 1;; \
+ esac; \
+ has_opt=no; \
+ sane_makeflags=$$MAKEFLAGS; \
+ if $(am__is_gnu_make); then \
+ sane_makeflags=$$MFLAGS; \
+ else \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ bs=\\; \
+ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
+ esac; \
+ fi; \
+ skip_next=no; \
+ strip_trailopt () \
+ { \
+ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+ }; \
+ for flg in $$sane_makeflags; do \
+ test $$skip_next = yes && { skip_next=no; continue; }; \
+ case $$flg in \
+ *=*|--*) continue;; \
+ -*I) strip_trailopt 'I'; skip_next=yes;; \
+ -*I?*) strip_trailopt 'I';; \
+ -*O) strip_trailopt 'O'; skip_next=yes;; \
+ -*O?*) strip_trailopt 'O';; \
+ -*l) strip_trailopt 'l'; skip_next=yes;; \
+ -*l?*) strip_trailopt 'l';; \
+ -[dEDm]) skip_next=yes;; \
+ -[JT]) skip_next=yes;; \
+ esac; \
+ case $$flg in \
+ *$$target_option*) has_opt=yes; break;; \
+ esac; \
+ done; \
+ test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = src/include
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/ax_cxx_compile_stdcxx.m4 \
+ $(top_srcdir)/m4/ax_cxx_compile_stdcxx_17.m4 \
+ $(top_srcdir)/m4/boost.m4 $(top_srcdir)/m4/libtool.m4 \
+ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
+ $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo " GEN " $@;
+am__v_GEN_1 =
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 =
+SOURCES =
+DIST_SOURCES =
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+am__DIST_COMMON = $(srcdir)/Makefile.in
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AS = @AS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+BOOST_CPPFLAGS = @BOOST_CPPFLAGS@
+BOOST_FILESYSTEM_LDFLAGS = @BOOST_FILESYSTEM_LDFLAGS@
+BOOST_FILESYSTEM_LDPATH = @BOOST_FILESYSTEM_LDPATH@
+BOOST_FILESYSTEM_LIBS = @BOOST_FILESYSTEM_LIBS@
+BOOST_LDPATH = @BOOST_LDPATH@
+BOOST_PROGRAM_OPTIONS_LDFLAGS = @BOOST_PROGRAM_OPTIONS_LDFLAGS@
+BOOST_PROGRAM_OPTIONS_LDPATH = @BOOST_PROGRAM_OPTIONS_LDPATH@
+BOOST_PROGRAM_OPTIONS_LIBS = @BOOST_PROGRAM_OPTIONS_LIBS@
+BOOST_ROOT = @BOOST_ROOT@
+BOOST_SYSTEM_LDFLAGS = @BOOST_SYSTEM_LDFLAGS@
+BOOST_SYSTEM_LDPATH = @BOOST_SYSTEM_LDPATH@
+BOOST_SYSTEM_LIBS = @BOOST_SYSTEM_LIBS@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPPFLAGS = @CPPFLAGS@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DISTCHECK_CONFIGURE_FLAGS = @DISTCHECK_CONFIGURE_FLAGS@
+DLLTOOL = @DLLTOOL@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+ETAGS = @ETAGS@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+GREP = @GREP@
+HAVE_CXX17 = @HAVE_CXX17@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+IXION_API_VERSION = @IXION_API_VERSION@
+IXION_MAJOR_API_VERSION = @IXION_MAJOR_API_VERSION@
+IXION_MAJOR_VERSION = @IXION_MAJOR_VERSION@
+IXION_MICRO_VERSION = @IXION_MICRO_VERSION@
+IXION_MINOR_API_VERSION = @IXION_MINOR_API_VERSION@
+IXION_MINOR_VERSION = @IXION_MINOR_VERSION@
+IXION_VERSION = @IXION_VERSION@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
+MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MDDS_CFLAGS = @MDDS_CFLAGS@
+MDDS_LIBS = @MDDS_LIBS@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
+POW_LIB = @POW_LIB@
+PYTHON = @PYTHON@
+PYTHON_CFLAGS = @PYTHON_CFLAGS@
+PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
+PYTHON_LIBS = @PYTHON_LIBS@
+PYTHON_PLATFORM = @PYTHON_PLATFORM@
+PYTHON_PREFIX = @PYTHON_PREFIX@
+PYTHON_VERSION = @PYTHON_VERSION@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+VULKAN_CFLAGS = @VULKAN_CFLAGS@
+VULKAN_LIBS = @VULKAN_LIBS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+pkgpyexecdir = @pkgpyexecdir@
+pkgpythondir = @pkgpythondir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+pyexecdir = @pyexecdir@
+pythondir = @pythondir@
+runstatedir = @runstatedir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+EXTRA_DIST = \
+ depth_first_search.hpp \
+ test_global.hpp
+
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/include/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --foreign src/include/Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+tags TAGS:
+
+ctags CTAGS:
+
+cscope cscopelist:
+
+distdir: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) distdir-am
+
+distdir-am: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile
+installdirs:
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: install-am install-strip
+
+.PHONY: all all-am check check-am clean clean-generic clean-libtool \
+ cscopelist-am ctags-am distclean distclean-generic \
+ distclean-libtool distdir dvi dvi-am html html-am info info-am \
+ install install-am install-data install-data-am install-dvi \
+ install-dvi-am install-exec install-exec-am install-html \
+ install-html-am install-info install-info-am install-man \
+ install-pdf install-pdf-am install-ps install-ps-am \
+ install-strip installcheck installcheck-am installdirs \
+ maintainer-clean maintainer-clean-generic mostlyclean \
+ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+ tags-am uninstall uninstall-am
+
+.PRECIOUS: Makefile
+
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/src/include/depth_first_search.hpp b/src/include/depth_first_search.hpp
new file mode 100644
index 0000000..f68b1bd
--- /dev/null
+++ b/src/include/depth_first_search.hpp
@@ -0,0 +1,226 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef INCLUDED_IXION_DEPTH_FIRST_SEARCH_HPP
+#define INCLUDED_IXION_DEPTH_FIRST_SEARCH_HPP
+
+#include "ixion/exceptions.hpp"
+
+#include <vector>
+#include <set>
+#include <map>
+#include <exception>
+#include <iostream>
+#include <unordered_map>
+
+namespace ixion {
+
+template<typename _ValueType, typename _ValueHashType>
+class depth_first_search
+{
+public:
+ typedef _ValueType value_type;
+ typedef _ValueHashType value_hash_type;
+
+private:
+ typedef std::unordered_map<value_type, size_t, value_hash_type> value_index_map_type;
+
+ enum cell_color_type { white, gray, black };
+
+ class dfs_error : public general_error
+ {
+ public:
+ dfs_error(const std::string& msg) : general_error(msg) {}
+ };
+
+ struct node_data
+ {
+ cell_color_type color;
+ value_type node;
+ size_t time_visited;
+ size_t time_finished;
+
+ node_data() : color(white), time_visited(0), time_finished(0) {}
+ };
+
+public:
+ typedef std::set<value_type> precedent_cells_type;
+ typedef std::map<value_type, precedent_cells_type> precedent_map_type;
+
+ class back_inserter
+ {
+ std::vector<value_type>& m_sorted;
+ public:
+ back_inserter(std::vector<value_type>& sorted) : m_sorted(sorted) {}
+
+ void operator()(const value_type& v)
+ {
+ m_sorted.push_back(v);
+ }
+ };
+
+ /**
+ * Stores all precedent-dependent relations which are to be used to
+ * perform topological sort.
+ */
+ class relations
+ {
+ friend class depth_first_search;
+
+ public:
+ void insert(value_type pre, value_type dep)
+ {
+ typename precedent_map_type::iterator itr = m_map.find(pre);
+ if (itr == m_map.end())
+ {
+ // First dependent for this precedent.
+ std::pair<typename precedent_map_type::iterator, bool> r =
+ m_map.insert(
+ typename precedent_map_type::value_type(pre, precedent_cells_type()));
+
+ if (!r.second)
+ throw dfs_error("failed to insert a new set instance");
+
+ itr = r.first;
+ }
+
+ itr->second.insert(dep);
+ }
+
+ private:
+ const precedent_map_type& get() const { return m_map; }
+
+ precedent_map_type m_map;
+ };
+
+ template<typename _Iter>
+ depth_first_search(
+ const _Iter& begin, const _Iter& end,
+ const relations& rels, back_inserter handler);
+
+ void run();
+
+private:
+ void init();
+
+ void visit(size_t cell_index);
+ size_t get_cell_index(const value_type& p) const;
+ const precedent_cells_type* get_precedent_cells(value_type cell);
+
+private:
+ const precedent_map_type& m_precedent_map;
+ back_inserter m_handler;
+ size_t m_value_count;
+ value_index_map_type m_value_indices;
+
+ size_t m_time_stamp;
+ std::vector<node_data> m_values;
+};
+
+template<typename _ValueType, typename _ValueHashType>
+template<typename _Iter>
+depth_first_search<_ValueType,_ValueHashType>::depth_first_search(
+ const _Iter& begin, const _Iter& end,
+ const relations& rels, back_inserter handler) :
+ m_precedent_map(rels.get()),
+ m_handler(std::move(handler)),
+ m_value_count(std::distance(begin, end)),
+ m_time_stamp(0),
+ m_values(m_value_count)
+{
+ // Construct value node to index mapping.
+ size_t i = 0;
+ for (_Iter it = begin; it != end; ++it, ++i)
+ m_value_indices.insert(
+ typename value_index_map_type::value_type(*it, i));
+}
+
+template<typename _ValueType, typename _ValueHashType>
+void depth_first_search<_ValueType,_ValueHashType>::init()
+{
+ std::vector<node_data> values(m_value_count);
+
+ // Now, construct index to cell node mapping.
+ for (const auto& vi : m_value_indices)
+ values[vi.second].node = vi.first;
+
+ m_values.swap(values);
+ m_time_stamp = 0;
+}
+
+template<typename _ValueType, typename _ValueHashType>
+void depth_first_search<_ValueType,_ValueHashType>::run()
+{
+ init();
+
+ try
+ {
+ for (size_t i = 0; i < m_value_count; ++i)
+ if (m_values[i].color == white)
+ visit(i);
+ }
+ catch(const dfs_error& e)
+ {
+ std::cout << "dfs error: " << e.what() << std::endl;
+ }
+}
+
+template<typename _ValueType, typename _ValueHashType>
+void depth_first_search<_ValueType,_ValueHashType>::visit(size_t cell_index)
+{
+ value_type p = m_values[cell_index].node;
+ m_values[cell_index].color = gray;
+ m_values[cell_index].time_visited = ++m_time_stamp;
+
+ do
+ {
+ const precedent_cells_type* depends = get_precedent_cells(p);
+ if (!depends)
+ // No dependent cells.
+ break;
+
+ for (const value_type& dcell : *depends)
+ {
+ size_t dcell_id = get_cell_index(dcell);
+ if (m_values[dcell_id].color == white)
+ {
+ visit(dcell_id);
+ }
+ }
+ }
+ while (false);
+
+ m_values[cell_index].color = black;
+ m_values[cell_index].time_finished = ++m_time_stamp;
+ m_handler(m_values[cell_index].node);
+}
+
+template<typename _ValueType, typename _ValueHashType>
+size_t depth_first_search<_ValueType,_ValueHashType>::get_cell_index(const value_type& p) const
+{
+ typename value_index_map_type::const_iterator itr = m_value_indices.find(p);
+ if (itr == m_value_indices.end())
+ throw dfs_error("cell ptr to index mapping failed.");
+ return itr->second;
+}
+
+template<typename _ValueType, typename _ValueHashType>
+const typename depth_first_search<_ValueType,_ValueHashType>::precedent_cells_type*
+depth_first_search<_ValueType,_ValueHashType>::get_precedent_cells(value_type cell)
+{
+ typename precedent_map_type::const_iterator itr = m_precedent_map.find(cell);
+ if (itr == m_precedent_map.end())
+ // This cell has no dependent cells.
+ return nullptr;
+
+ return &itr->second;
+}
+
+}
+
+#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/src/include/test_global.hpp b/src/include/test_global.hpp
new file mode 100644
index 0000000..1832f50
--- /dev/null
+++ b/src/include/test_global.hpp
@@ -0,0 +1,43 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#pragma once
+
+#ifdef NDEBUG
+// release build
+#undef NDEBUG
+#include <cassert>
+#define NDEBUG
+#else
+// debug build
+#include <cassert>
+#endif
+
+#include <iostream>
+#include <chrono>
+#include <string>
+
+namespace ixion { namespace test {
+
+class stack_printer
+{
+public:
+ explicit stack_printer(std::string msg);
+ ~stack_printer();
+
+private:
+ double get_time() const;
+
+ std::string m_msg;
+ double m_start_time;
+};
+
+}}
+
+#define IXION_TEST_FUNC_SCOPE ixion::test::stack_printer __sp__(__func__)
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/src/ixion_formula_tokenizer.cpp b/src/ixion_formula_tokenizer.cpp
new file mode 100644
index 0000000..2fd429d
--- /dev/null
+++ b/src/ixion_formula_tokenizer.cpp
@@ -0,0 +1,156 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef IXION_FORMULA_PARSER_CPP
+#define IXION_FORMULA_PARSER_CPP
+
+#include <string>
+#include <vector>
+#include <iostream>
+
+#include <boost/program_options.hpp>
+
+#include "ixion/formula.hpp"
+#include "ixion/model_context.hpp"
+#include "ixion/formula_name_resolver.hpp"
+#include "ixion/config.hpp"
+
+using std::cout;
+using std::endl;
+
+std::vector<std::string> parse_sheet_names(const std::string& s)
+{
+ std::vector<std::string> names;
+
+ const char* p = s.data();
+ const char* p_end = p + s.size();
+ const char* p0 = nullptr;
+
+ for (; p != p_end; ++p)
+ {
+ if (!p0)
+ p0 = p;
+
+ if (*p == ',')
+ {
+ size_t n = std::distance(p0, p);
+ names.emplace_back(p0, n);
+ p0 = nullptr;
+ }
+ }
+
+ if (p0)
+ {
+ size_t n = std::distance(p0, p);
+ names.emplace_back(p0, n);
+ }
+
+ return names;
+}
+
+void tokenize_formula(const std::string& formula, const std::string& sheets)
+{
+ using namespace ixion;
+
+ model_context cxt;
+
+ for (const std::string& name : parse_sheet_names(sheets))
+ cxt.append_sheet(name);
+
+ std::unique_ptr<formula_name_resolver> resolver =
+ formula_name_resolver::get(formula_name_resolver_t::excel_a1, &cxt);
+
+ config cfg = cxt.get_config();
+ cfg.sep_function_arg = ',';
+ cxt.set_config(cfg);
+
+ abs_address_t pos;
+
+ formula_tokens_t tokens = parse_formula_string(cxt, pos, *resolver, formula);
+
+ cout << "* original formula string: " << formula << endl;
+
+ std::string normalized = print_formula_tokens(cxt, pos, *resolver, tokens);
+ cout << "* normalized formula string: " << normalized << endl;
+
+ cout << "* individual tokens:" << endl;
+ for (const auto& t : tokens)
+ cout << " * " << t << endl;
+}
+
+int main (int argc, char** argv)
+{
+ namespace po = ::boost::program_options;
+
+ po::options_description desc("Allowed options");
+ desc.add_options()
+ ("help,h", "print this help.")
+ ("sheets", po::value<std::string>(), "Sheet names.");
+
+ po::options_description hidden("Hidden options");
+ hidden.add_options()
+ ("formula-expression", po::value<std::string>(), "formula expression");
+
+ po::options_description cmd_opt;
+ cmd_opt.add(desc).add(hidden);
+
+ po::positional_options_description po_desc;
+ po_desc.add("formula-expression", -1);
+
+ po::variables_map vm;
+ try
+ {
+ po::store(
+ po::command_line_parser(argc, argv).options(cmd_opt).positional(po_desc).run(), vm);
+ po::notify(vm);
+ }
+ catch (const std::exception& e)
+ {
+ // Unknown options.
+ cout << e.what() << endl;
+ cout << desc;
+ return EXIT_FAILURE;
+ }
+
+ auto print_help = [desc]()
+ {
+ cout << "Usage: ixion-formula-tokenizer [options] FORMULA_EXPRESSION" << endl
+ << endl
+ << desc;
+ };
+
+ if (vm.count("help"))
+ {
+ print_help();
+ return EXIT_SUCCESS;
+ }
+
+ if (!vm.count("formula-expression"))
+ {
+ cout << "formula expression is not given." << endl;
+ print_help();
+ return EXIT_FAILURE;
+ }
+
+ try
+ {
+ std::string formula = vm["formula-expression"].as<std::string>();
+ std::string sheets = vm.count("sheets") ? vm["sheets"].as<std::string>() : std::string();
+ tokenize_formula(formula, sheets);
+ }
+ catch (const std::exception& e)
+ {
+ cout << "Failed to parse formula expression: " << e.what() << endl;
+ return EXIT_FAILURE;
+ }
+
+ return EXIT_SUCCESS;
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/src/ixion_parser.cpp b/src/ixion_parser.cpp
new file mode 100644
index 0000000..d6ace96
--- /dev/null
+++ b/src/ixion_parser.cpp
@@ -0,0 +1,134 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include "model_parser.hpp"
+#include "app_common.hpp"
+
+#include <string>
+#include <vector>
+#include <iostream>
+#include <thread>
+
+#include <boost/program_options.hpp>
+
+using namespace std;
+using namespace ixion;
+
+namespace {
+
+class parse_file
+{
+ const size_t m_thread_count;
+public:
+ parse_file(size_t thread_count) : m_thread_count(thread_count) {}
+
+ void operator() (const string& fpath) const
+ {
+ double start_time = get_current_time();
+ cout << detail::get_formula_result_output_separator() << endl;
+ cout << "parsing " << fpath << endl;
+
+ try
+ {
+ model_parser parser(fpath, m_thread_count);
+ parser.parse();
+ }
+ catch (const exception& e)
+ {
+ cerr << e.what() << endl;
+ cerr << "failed to parse " << fpath << endl;
+ throw;
+ }
+
+ cout << detail::get_formula_result_output_separator() << endl;
+ cout << "(duration: " << get_current_time() - start_time << " sec)" << endl;
+ cout << detail::get_formula_result_output_separator() << endl;
+ }
+};
+
+const char* help_thread =
+"Specify the number of threads to use for calculation. Note that the number "
+"specified by this option corresponds with the number of calculation threads "
+"i.e. those child threads that perform cell interpretations. The main thread "
+"does not perform any calculations; instead, it creates a new child thread to "
+"manage the calculation threads, the number of which is specified by the arg. "
+"Therefore, the total number of threads used by this program will be arg + 1."
+;
+
+}
+
+int main (int argc, char** argv)
+{
+ namespace po = ::boost::program_options;
+
+ size_t thread_count = 0;
+ po::options_description desc("Allowed options");
+ desc.add_options()
+ ("help,h", "Print this help.")
+ ("thread,t", po::value<size_t>(), help_thread);
+
+ po::options_description hidden("Hidden options");
+ hidden.add_options()
+ ("input-file", po::value<std::vector<std::string>>(), "input file");
+
+ po::options_description cmd_opt;
+ cmd_opt.add(desc).add(hidden);
+
+ po::positional_options_description po_desc;
+ po_desc.add("input-file", -1);
+
+ po::variables_map vm;
+ try
+ {
+ po::store(
+ po::command_line_parser(argc, argv).options(cmd_opt).positional(po_desc).run(), vm);
+ po::notify(vm);
+ }
+ catch (const exception& e)
+ {
+ // Unknown options.
+ cout << e.what() << endl;
+ cout << desc;
+ return EXIT_FAILURE;
+ }
+
+ if (vm.count("help"))
+ {
+ cout << "Usage: ixion-parser [options] FILE1 FILE2 ..." << endl
+ << endl
+ << "The FILE must contain the definitions of cells according to the cell definition rule." << endl << endl
+ << desc;
+ return EXIT_SUCCESS;
+ }
+
+ if (vm.count("thread"))
+ thread_count = vm["thread"].as<size_t>();
+
+ vector<string> files;
+ if (vm.count("input-file"))
+ files = vm["input-file"].as< vector<string> >();
+
+ if (thread_count > 0)
+ {
+ cout << "Using " << thread_count << " threads" << endl;
+ cout << "Number of CPUS: " << std::thread::hardware_concurrency() << endl;
+ }
+
+ try
+ {
+ // Parse all files one at a time.
+ for_each(files.begin(), files.end(), parse_file(thread_count));
+ }
+ catch (const exception&)
+ {
+ return EXIT_FAILURE;
+ }
+
+ return EXIT_SUCCESS;
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/src/ixion_sorter.cpp b/src/ixion_sorter.cpp
new file mode 100644
index 0000000..619cf9e
--- /dev/null
+++ b/src/ixion_sorter.cpp
@@ -0,0 +1,93 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include "sort_input_parser.hpp"
+
+#include <cstdlib>
+#include <string>
+#include <vector>
+#include <iostream>
+
+#include <boost/program_options.hpp>
+
+using namespace std;
+
+namespace po = ::boost::program_options;
+
+void print_help(const po::options_description& desc)
+{
+ cout << "Usage: ixion-parser [options] FILE" << endl
+ << endl
+ << "FILE must contain a list of dependencies." << endl << endl
+ << desc;
+}
+
+int main (int argc, char** argv)
+{
+ po::options_description desc("Allowed options");
+ desc.add_options()
+ ("help,h", "print this help.");
+
+ po::options_description hidden("Hidden options");
+ hidden.add_options()
+ ("input-file", po::value<vector<string>>(), "input file");
+
+ po::options_description cmd_opt;
+ cmd_opt.add(desc).add(hidden);
+
+ po::positional_options_description po_desc;
+ po_desc.add("input-file", -1);
+
+ po::variables_map vm;
+ try
+ {
+ po::store(
+ po::command_line_parser(argc, argv).options(cmd_opt).positional(po_desc).run(), vm);
+ po::notify(vm);
+ }
+ catch (const exception& e)
+ {
+ // Unknown options.
+ cerr << e.what() << endl;
+ print_help(desc);
+ return EXIT_FAILURE;
+ }
+
+ if (vm.count("help"))
+ {
+ print_help(desc);
+ return EXIT_SUCCESS;
+ }
+
+ vector<string> files;
+ if (vm.count("input-file"))
+ files = vm["input-file"].as<vector<string>>();
+
+ if (files.size() != 1)
+ {
+ cerr << "Takes exactly one input file." << endl;
+ print_help(desc);
+ return EXIT_FAILURE;
+ }
+
+ const string& filepath = files[0];
+ try
+ {
+ ::ixion::sort_input_parser parser(filepath);
+ parser.parse();
+ parser.print();
+ }
+ catch (const exception& e)
+ {
+ // Unknown options.
+ cerr << e.what() << endl;
+ return EXIT_FAILURE;
+ }
+
+ return EXIT_SUCCESS;
+}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/src/libixion/Makefile.am b/src/libixion/Makefile.am
new file mode 100644
index 0000000..9bdce5f
--- /dev/null
+++ b/src/libixion/Makefile.am
@@ -0,0 +1,164 @@
+
+AM_CPPFLAGS = \
+ -I$(top_srcdir)/include \
+ -I$(top_srcdir)/src/include \
+ -DIXION_BUILD \
+ $(MDDS_CFLAGS) \
+ $(BOOST_CPPFLAGS)
+
+if BUILD_VULKAN
+
+AM_CPPFLAGS += -DBUILD_VULKAN
+
+endif # BUILD_VULKAN
+
+check_PROGRAMS = \
+ document-test \
+ general-test \
+ ixion-test-track-deps \
+ compute-engine-test \
+ dirty-cell-tracker-test \
+ name-resolver-test
+
+lib_LTLIBRARIES = libixion-@IXION_API_VERSION@.la
+libixion_@IXION_API_VERSION@_la_SOURCES = \
+ address.cpp \
+ address_iterator.cpp \
+ calc_status.hpp \
+ calc_status.cpp \
+ cell.cpp \
+ cell_access.cpp \
+ column_store_type.hpp \
+ compute_engine.cpp \
+ config.cpp \
+ debug.hpp \
+ debug.cpp \
+ dirty_cell_tracker.cpp \
+ document.cpp \
+ exceptions.cpp \
+ formula.cpp \
+ formula_calc.cpp \
+ formula_function_opcode.cpp \
+ formula_functions.hpp \
+ formula_functions.cpp \
+ formula_interpreter.hpp \
+ formula_interpreter.cpp \
+ formula_lexer.hpp \
+ formula_lexer.cpp \
+ formula_name_resolver.cpp \
+ formula_parser.hpp \
+ formula_parser.cpp \
+ formula_result.cpp \
+ formula_tokens.cpp \
+ formula_value_stack.hpp \
+ formula_value_stack.cpp \
+ global.cpp \
+ impl_types.hpp \
+ impl_types.cpp \
+ info.cpp \
+ lexer_tokens.hpp \
+ lexer_tokens.cpp \
+ matrix.cpp \
+ model_context.cpp \
+ model_context_impl.hpp \
+ model_context_impl.cpp \
+ model_iterator.cpp \
+ model_types.hpp \
+ model_types.cpp \
+ module.cpp \
+ named_expressions_iterator.cpp \
+ queue_entry.hpp \
+ queue_entry.cpp \
+ table.cpp \
+ types.cpp \
+ utf8.hpp \
+ utf8.cpp \
+ utils.hpp \
+ utils.cpp \
+ workbook.hpp \
+ workbook.cpp \
+ interface.cpp
+
+if BUILD_VULKAN
+
+# VULKAN module
+
+pkglib_LTLIBRARIES = ixion-@IXION_API_VERSION@-vulkan.la
+ixion_@IXION_API_VERSION@_vulkan_la_SOURCES = \
+ compute_engine_vulkan.hpp \
+ compute_engine_vulkan.cpp \
+ vulkan_obj.hpp \
+ vulkan_obj.cpp
+
+ixion_@IXION_API_VERSION@_vulkan_la_LDFLAGS = \
+ -module -avoid-version -export-symbols-regex \
+ register_module
+
+ixion_@IXION_API_VERSION@_vulkan_la_LIBADD = \
+ libixion-@IXION_API_VERSION@.la \
+ $(VULKAN_LIBS)
+
+ixion_@IXION_API_VERSION@_vulkan_la_CPPFLAGS = \
+ $(AM_CPPFLAGS) \
+ $(VULKAN_CPPFLAGS)
+
+endif # BUILD_VULKAN
+
+if IXION_THREADS
+
+libixion_@IXION_API_VERSION@_la_SOURCES += \
+ cell_queue_manager.hpp \
+ cell_queue_manager.cpp
+
+endif
+
+libixion_@IXION_API_VERSION@_la_LDFLAGS = \
+ -no-undefined \
+ -Wl,-rpath,'$$ORIGIN' -Wl,-rpath,'$$ORIGIN/$(PACKAGE)' \
+ $(BOOST_FILESYSTEM_LDFLAGS)
+
+libixion_@IXION_API_VERSION@_la_LIBADD = \
+ $(BOOST_FILESYSTEM_LIBS)
+
+document_test_SOURCES = document_test.cpp
+document_test_LDADD = \
+ libixion-@IXION_API_VERSION@.la \
+ ../test/libixion-test.a
+
+general_test_SOURCES = general_test.cpp
+general_test_LDADD = \
+ libixion-@IXION_API_VERSION@.la \
+ ../test/libixion-test.a \
+ $(BOOST_PROGRAM_OPTIONS_LIBS)
+
+name_resolver_test_SOURCES = name_resolver_test.cpp
+name_resolver_test_LDADD = \
+ libixion-@IXION_API_VERSION@.la \
+ ../test/libixion-test.a \
+ $(BOOST_PROGRAM_OPTIONS_LIBS)
+
+ixion_test_track_deps_SOURCES = ixion_test_track_deps.cpp
+ixion_test_track_deps_LDADD = \
+ libixion-@IXION_API_VERSION@.la \
+ ../test/libixion-test.a \
+ $(BOOST_PROGRAM_OPTIONS_LIBS)
+
+compute_engine_test_SOURCES = compute_engine_test.cpp
+compute_engine_test_LDADD = \
+ ../test/libixion-test.a \
+ libixion-@IXION_API_VERSION@.la
+
+dirty_cell_tracker_test_SOURCES = dirty_cell_tracker_test.cpp
+dirty_cell_tracker_test_LDADD = \
+ ../test/libixion-test.a \
+ libixion-@IXION_API_VERSION@.la
+
+AM_TESTS_ENVIRONMENT =
+
+TESTS = \
+ document-test \
+ general-test \
+ ixion-test-track-deps \
+ compute-engine-test \
+ dirty-cell-tracker-test \
+ name-resolver-test
diff --git a/src/libixion/Makefile.in b/src/libixion/Makefile.in
new file mode 100644
index 0000000..baf3327
--- /dev/null
+++ b/src/libixion/Makefile.in
@@ -0,0 +1,1552 @@
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
+
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+VPATH = @srcdir@
+am__is_gnu_make = { \
+ if test -z '$(MAKELEVEL)'; then \
+ false; \
+ elif test -n '$(MAKE_HOST)'; then \
+ true; \
+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+ true; \
+ else \
+ false; \
+ fi; \
+}
+am__make_running_with_option = \
+ case $${target_option-} in \
+ ?) ;; \
+ *) echo "am__make_running_with_option: internal error: invalid" \
+ "target option '$${target_option-}' specified" >&2; \
+ exit 1;; \
+ esac; \
+ has_opt=no; \
+ sane_makeflags=$$MAKEFLAGS; \
+ if $(am__is_gnu_make); then \
+ sane_makeflags=$$MFLAGS; \
+ else \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ bs=\\; \
+ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
+ esac; \
+ fi; \
+ skip_next=no; \
+ strip_trailopt () \
+ { \
+ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+ }; \
+ for flg in $$sane_makeflags; do \
+ test $$skip_next = yes && { skip_next=no; continue; }; \
+ case $$flg in \
+ *=*|--*) continue;; \
+ -*I) strip_trailopt 'I'; skip_next=yes;; \
+ -*I?*) strip_trailopt 'I';; \
+ -*O) strip_trailopt 'O'; skip_next=yes;; \
+ -*O?*) strip_trailopt 'O';; \
+ -*l) strip_trailopt 'l'; skip_next=yes;; \
+ -*l?*) strip_trailopt 'l';; \
+ -[dEDm]) skip_next=yes;; \
+ -[JT]) skip_next=yes;; \
+ esac; \
+ case $$flg in \
+ *$$target_option*) has_opt=yes; break;; \
+ esac; \
+ done; \
+ test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+@BUILD_VULKAN_TRUE@am__append_1 = -DBUILD_VULKAN
+check_PROGRAMS = document-test$(EXEEXT) general-test$(EXEEXT) \
+ ixion-test-track-deps$(EXEEXT) compute-engine-test$(EXEEXT) \
+ dirty-cell-tracker-test$(EXEEXT) name-resolver-test$(EXEEXT)
+@IXION_THREADS_TRUE@am__append_2 = \
+@IXION_THREADS_TRUE@ cell_queue_manager.hpp \
+@IXION_THREADS_TRUE@ cell_queue_manager.cpp
+
+TESTS = document-test$(EXEEXT) general-test$(EXEEXT) \
+ ixion-test-track-deps$(EXEEXT) compute-engine-test$(EXEEXT) \
+ dirty-cell-tracker-test$(EXEEXT) name-resolver-test$(EXEEXT)
+subdir = src/libixion
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/ax_cxx_compile_stdcxx.m4 \
+ $(top_srcdir)/m4/ax_cxx_compile_stdcxx_17.m4 \
+ $(top_srcdir)/m4/boost.m4 $(top_srcdir)/m4/libtool.m4 \
+ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
+ $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES = constants.inl
+CONFIG_CLEAN_VPATH_FILES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+ if (++n[$$2] == $(am__install_max)) \
+ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+ END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+ test -z "$$files" \
+ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+ $(am__cd) "$$dir" && rm -f $$files; }; \
+ }
+am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pkglibdir)"
+LTLIBRARIES = $(lib_LTLIBRARIES) $(pkglib_LTLIBRARIES)
+am__DEPENDENCIES_1 =
+@BUILD_VULKAN_TRUE@ixion_@IXION_API_VERSION@_vulkan_la_DEPENDENCIES = \
+@BUILD_VULKAN_TRUE@ libixion-@IXION_API_VERSION@.la \
+@BUILD_VULKAN_TRUE@ $(am__DEPENDENCIES_1)
+am__ixion_@IXION_API_VERSION@_vulkan_la_SOURCES_DIST = \
+ compute_engine_vulkan.hpp compute_engine_vulkan.cpp \
+ vulkan_obj.hpp vulkan_obj.cpp
+@BUILD_VULKAN_TRUE@am_ixion_@IXION_API_VERSION@_vulkan_la_OBJECTS = ixion_@IXION_API_VERSION@_vulkan_la-compute_engine_vulkan.lo \
+@BUILD_VULKAN_TRUE@ ixion_@IXION_API_VERSION@_vulkan_la-vulkan_obj.lo
+ixion_@IXION_API_VERSION@_vulkan_la_OBJECTS = \
+ $(am_ixion_@IXION_API_VERSION@_vulkan_la_OBJECTS)
+AM_V_lt = $(am__v_lt_@AM_V@)
+am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
+am__v_lt_0 = --silent
+am__v_lt_1 =
+ixion_@IXION_API_VERSION@_vulkan_la_LINK = $(LIBTOOL) $(AM_V_lt) \
+ --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \
+ $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \
+ $(ixion_@IXION_API_VERSION@_vulkan_la_LDFLAGS) $(LDFLAGS) -o \
+ $@
+@BUILD_VULKAN_TRUE@am_ixion_@IXION_API_VERSION@_vulkan_la_rpath = \
+@BUILD_VULKAN_TRUE@ -rpath $(pkglibdir)
+libixion_@IXION_API_VERSION@_la_DEPENDENCIES = $(am__DEPENDENCIES_1)
+am__libixion_@IXION_API_VERSION@_la_SOURCES_DIST = address.cpp \
+ address_iterator.cpp calc_status.hpp calc_status.cpp cell.cpp \
+ cell_access.cpp column_store_type.hpp compute_engine.cpp \
+ config.cpp debug.hpp debug.cpp dirty_cell_tracker.cpp \
+ document.cpp exceptions.cpp formula.cpp formula_calc.cpp \
+ formula_function_opcode.cpp formula_functions.hpp \
+ formula_functions.cpp formula_interpreter.hpp \
+ formula_interpreter.cpp formula_lexer.hpp formula_lexer.cpp \
+ formula_name_resolver.cpp formula_parser.hpp \
+ formula_parser.cpp formula_result.cpp formula_tokens.cpp \
+ formula_value_stack.hpp formula_value_stack.cpp global.cpp \
+ impl_types.hpp impl_types.cpp info.cpp lexer_tokens.hpp \
+ lexer_tokens.cpp matrix.cpp model_context.cpp \
+ model_context_impl.hpp model_context_impl.cpp \
+ model_iterator.cpp model_types.hpp model_types.cpp module.cpp \
+ named_expressions_iterator.cpp queue_entry.hpp queue_entry.cpp \
+ table.cpp types.cpp utf8.hpp utf8.cpp utils.hpp utils.cpp \
+ workbook.hpp workbook.cpp interface.cpp cell_queue_manager.hpp \
+ cell_queue_manager.cpp
+@IXION_THREADS_TRUE@am__objects_1 = cell_queue_manager.lo
+am_libixion_@IXION_API_VERSION@_la_OBJECTS = address.lo \
+ address_iterator.lo calc_status.lo cell.lo cell_access.lo \
+ compute_engine.lo config.lo debug.lo dirty_cell_tracker.lo \
+ document.lo exceptions.lo formula.lo formula_calc.lo \
+ formula_function_opcode.lo formula_functions.lo \
+ formula_interpreter.lo formula_lexer.lo \
+ formula_name_resolver.lo formula_parser.lo formula_result.lo \
+ formula_tokens.lo formula_value_stack.lo global.lo \
+ impl_types.lo info.lo lexer_tokens.lo matrix.lo \
+ model_context.lo model_context_impl.lo model_iterator.lo \
+ model_types.lo module.lo named_expressions_iterator.lo \
+ queue_entry.lo table.lo types.lo utf8.lo utils.lo workbook.lo \
+ interface.lo $(am__objects_1)
+libixion_@IXION_API_VERSION@_la_OBJECTS = \
+ $(am_libixion_@IXION_API_VERSION@_la_OBJECTS)
+libixion_@IXION_API_VERSION@_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
+ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
+ $(AM_CXXFLAGS) $(CXXFLAGS) \
+ $(libixion_@IXION_API_VERSION@_la_LDFLAGS) $(LDFLAGS) -o $@
+am_compute_engine_test_OBJECTS = compute_engine_test.$(OBJEXT)
+compute_engine_test_OBJECTS = $(am_compute_engine_test_OBJECTS)
+compute_engine_test_DEPENDENCIES = ../test/libixion-test.a \
+ libixion-@IXION_API_VERSION@.la
+am_dirty_cell_tracker_test_OBJECTS = \
+ dirty_cell_tracker_test.$(OBJEXT)
+dirty_cell_tracker_test_OBJECTS = \
+ $(am_dirty_cell_tracker_test_OBJECTS)
+dirty_cell_tracker_test_DEPENDENCIES = ../test/libixion-test.a \
+ libixion-@IXION_API_VERSION@.la
+am_document_test_OBJECTS = document_test.$(OBJEXT)
+document_test_OBJECTS = $(am_document_test_OBJECTS)
+document_test_DEPENDENCIES = libixion-@IXION_API_VERSION@.la \
+ ../test/libixion-test.a
+am_general_test_OBJECTS = general_test.$(OBJEXT)
+general_test_OBJECTS = $(am_general_test_OBJECTS)
+general_test_DEPENDENCIES = libixion-@IXION_API_VERSION@.la \
+ ../test/libixion-test.a $(am__DEPENDENCIES_1)
+am_ixion_test_track_deps_OBJECTS = ixion_test_track_deps.$(OBJEXT)
+ixion_test_track_deps_OBJECTS = $(am_ixion_test_track_deps_OBJECTS)
+ixion_test_track_deps_DEPENDENCIES = libixion-@IXION_API_VERSION@.la \
+ ../test/libixion-test.a $(am__DEPENDENCIES_1)
+am_name_resolver_test_OBJECTS = name_resolver_test.$(OBJEXT)
+name_resolver_test_OBJECTS = $(am_name_resolver_test_OBJECTS)
+name_resolver_test_DEPENDENCIES = libixion-@IXION_API_VERSION@.la \
+ ../test/libixion-test.a $(am__DEPENDENCIES_1)
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo " GEN " $@;
+am__v_GEN_1 =
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 =
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__maybe_remake_depfiles = depfiles
+am__depfiles_remade = ./$(DEPDIR)/address.Plo \
+ ./$(DEPDIR)/address_iterator.Plo ./$(DEPDIR)/calc_status.Plo \
+ ./$(DEPDIR)/cell.Plo ./$(DEPDIR)/cell_access.Plo \
+ ./$(DEPDIR)/cell_queue_manager.Plo \
+ ./$(DEPDIR)/compute_engine.Plo \
+ ./$(DEPDIR)/compute_engine_test.Po ./$(DEPDIR)/config.Plo \
+ ./$(DEPDIR)/debug.Plo ./$(DEPDIR)/dirty_cell_tracker.Plo \
+ ./$(DEPDIR)/dirty_cell_tracker_test.Po \
+ ./$(DEPDIR)/document.Plo ./$(DEPDIR)/document_test.Po \
+ ./$(DEPDIR)/exceptions.Plo ./$(DEPDIR)/formula.Plo \
+ ./$(DEPDIR)/formula_calc.Plo \
+ ./$(DEPDIR)/formula_function_opcode.Plo \
+ ./$(DEPDIR)/formula_functions.Plo \
+ ./$(DEPDIR)/formula_interpreter.Plo \
+ ./$(DEPDIR)/formula_lexer.Plo \
+ ./$(DEPDIR)/formula_name_resolver.Plo \
+ ./$(DEPDIR)/formula_parser.Plo ./$(DEPDIR)/formula_result.Plo \
+ ./$(DEPDIR)/formula_tokens.Plo \
+ ./$(DEPDIR)/formula_value_stack.Plo \
+ ./$(DEPDIR)/general_test.Po ./$(DEPDIR)/global.Plo \
+ ./$(DEPDIR)/impl_types.Plo ./$(DEPDIR)/info.Plo \
+ ./$(DEPDIR)/interface.Plo \
+ ./$(DEPDIR)/ixion_@IXION_API_VERSION@_vulkan_la-compute_engine_vulkan.Plo \
+ ./$(DEPDIR)/ixion_@IXION_API_VERSION@_vulkan_la-vulkan_obj.Plo \
+ ./$(DEPDIR)/ixion_test_track_deps.Po \
+ ./$(DEPDIR)/lexer_tokens.Plo ./$(DEPDIR)/matrix.Plo \
+ ./$(DEPDIR)/model_context.Plo \
+ ./$(DEPDIR)/model_context_impl.Plo \
+ ./$(DEPDIR)/model_iterator.Plo ./$(DEPDIR)/model_types.Plo \
+ ./$(DEPDIR)/module.Plo ./$(DEPDIR)/name_resolver_test.Po \
+ ./$(DEPDIR)/named_expressions_iterator.Plo \
+ ./$(DEPDIR)/queue_entry.Plo ./$(DEPDIR)/table.Plo \
+ ./$(DEPDIR)/types.Plo ./$(DEPDIR)/utf8.Plo \
+ ./$(DEPDIR)/utils.Plo ./$(DEPDIR)/workbook.Plo
+am__mv = mv -f
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CXXFLAGS) $(CXXFLAGS)
+AM_V_CXX = $(am__v_CXX_@AM_V@)
+am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@)
+am__v_CXX_0 = @echo " CXX " $@;
+am__v_CXX_1 =
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CXXLD = $(am__v_CXXLD_@AM_V@)
+am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@)
+am__v_CXXLD_0 = @echo " CXXLD " $@;
+am__v_CXXLD_1 =
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_@AM_V@)
+am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
+am__v_CC_0 = @echo " CC " $@;
+am__v_CC_1 =
+CCLD = $(CC)
+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_@AM_V@)
+am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
+am__v_CCLD_0 = @echo " CCLD " $@;
+am__v_CCLD_1 =
+SOURCES = $(ixion_@IXION_API_VERSION@_vulkan_la_SOURCES) \
+ $(libixion_@IXION_API_VERSION@_la_SOURCES) \
+ $(compute_engine_test_SOURCES) \
+ $(dirty_cell_tracker_test_SOURCES) $(document_test_SOURCES) \
+ $(general_test_SOURCES) $(ixion_test_track_deps_SOURCES) \
+ $(name_resolver_test_SOURCES)
+DIST_SOURCES = \
+ $(am__ixion_@IXION_API_VERSION@_vulkan_la_SOURCES_DIST) \
+ $(am__libixion_@IXION_API_VERSION@_la_SOURCES_DIST) \
+ $(compute_engine_test_SOURCES) \
+ $(dirty_cell_tracker_test_SOURCES) $(document_test_SOURCES) \
+ $(general_test_SOURCES) $(ixion_test_track_deps_SOURCES) \
+ $(name_resolver_test_SOURCES)
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+# Read a list of newline-separated strings from the standard input,
+# and print each of them once, without duplicates. Input order is
+# *not* preserved.
+am__uniquify_input = $(AWK) '\
+ BEGIN { nonempty = 0; } \
+ { items[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in items) print i; }; } \
+'
+# Make sure the list of sources is unique. This is necessary because,
+# e.g., the same source file might be shared among _SOURCES variables
+# for different programs/libraries.
+am__define_uniq_tagged_files = \
+ list='$(am__tagged_files)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | $(am__uniquify_input)`
+am__tty_colors_dummy = \
+ mgn= red= grn= lgn= blu= brg= std=; \
+ am__color_tests=no
+am__tty_colors = { \
+ $(am__tty_colors_dummy); \
+ if test "X$(AM_COLOR_TESTS)" = Xno; then \
+ am__color_tests=no; \
+ elif test "X$(AM_COLOR_TESTS)" = Xalways; then \
+ am__color_tests=yes; \
+ elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \
+ am__color_tests=yes; \
+ fi; \
+ if test $$am__color_tests = yes; then \
+ red=''; \
+ grn=''; \
+ lgn=''; \
+ blu=''; \
+ mgn=''; \
+ brg=''; \
+ std=''; \
+ fi; \
+}
+am__recheck_rx = ^[ ]*:recheck:[ ]*
+am__global_test_result_rx = ^[ ]*:global-test-result:[ ]*
+am__copy_in_global_log_rx = ^[ ]*:copy-in-global-log:[ ]*
+# A command that, given a newline-separated list of test names on the
+# standard input, print the name of the tests that are to be re-run
+# upon "make recheck".
+am__list_recheck_tests = $(AWK) '{ \
+ recheck = 1; \
+ while ((rc = (getline line < ($$0 ".trs"))) != 0) \
+ { \
+ if (rc < 0) \
+ { \
+ if ((getline line2 < ($$0 ".log")) < 0) \
+ recheck = 0; \
+ break; \
+ } \
+ else if (line ~ /$(am__recheck_rx)[nN][Oo]/) \
+ { \
+ recheck = 0; \
+ break; \
+ } \
+ else if (line ~ /$(am__recheck_rx)[yY][eE][sS]/) \
+ { \
+ break; \
+ } \
+ }; \
+ if (recheck) \
+ print $$0; \
+ close ($$0 ".trs"); \
+ close ($$0 ".log"); \
+}'
+# A command that, given a newline-separated list of test names on the
+# standard input, create the global log from their .trs and .log files.
+am__create_global_log = $(AWK) ' \
+function fatal(msg) \
+{ \
+ print "fatal: making $@: " msg | "cat >&2"; \
+ exit 1; \
+} \
+function rst_section(header) \
+{ \
+ print header; \
+ len = length(header); \
+ for (i = 1; i <= len; i = i + 1) \
+ printf "="; \
+ printf "\n\n"; \
+} \
+{ \
+ copy_in_global_log = 1; \
+ global_test_result = "RUN"; \
+ while ((rc = (getline line < ($$0 ".trs"))) != 0) \
+ { \
+ if (rc < 0) \
+ fatal("failed to read from " $$0 ".trs"); \
+ if (line ~ /$(am__global_test_result_rx)/) \
+ { \
+ sub("$(am__global_test_result_rx)", "", line); \
+ sub("[ ]*$$", "", line); \
+ global_test_result = line; \
+ } \
+ else if (line ~ /$(am__copy_in_global_log_rx)[nN][oO]/) \
+ copy_in_global_log = 0; \
+ }; \
+ if (copy_in_global_log) \
+ { \
+ rst_section(global_test_result ": " $$0); \
+ while ((rc = (getline line < ($$0 ".log"))) != 0) \
+ { \
+ if (rc < 0) \
+ fatal("failed to read from " $$0 ".log"); \
+ print line; \
+ }; \
+ printf "\n"; \
+ }; \
+ close ($$0 ".trs"); \
+ close ($$0 ".log"); \
+}'
+# Restructured Text title.
+am__rst_title = { sed 's/.*/ & /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; }
+# Solaris 10 'make', and several other traditional 'make' implementations,
+# pass "-e" to $(SHELL), and POSIX 2008 even requires this. Work around it
+# by disabling -e (using the XSI extension "set +e") if it's set.
+am__sh_e_setup = case $$- in *e*) set +e;; esac
+# Default flags passed to test drivers.
+am__common_driver_flags = \
+ --color-tests "$$am__color_tests" \
+ --enable-hard-errors "$$am__enable_hard_errors" \
+ --expect-failure "$$am__expect_failure"
+# To be inserted before the command running the test. Creates the
+# directory for the log if needed. Stores in $dir the directory
+# containing $f, in $tst the test, in $log the log. Executes the
+# developer- defined test setup AM_TESTS_ENVIRONMENT (if any), and
+# passes TESTS_ENVIRONMENT. Set up options for the wrapper that
+# will run the test scripts (or their associated LOG_COMPILER, if
+# thy have one).
+am__check_pre = \
+$(am__sh_e_setup); \
+$(am__vpath_adj_setup) $(am__vpath_adj) \
+$(am__tty_colors); \
+srcdir=$(srcdir); export srcdir; \
+case "$@" in \
+ */*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;; \
+ *) am__odir=.;; \
+esac; \
+test "x$$am__odir" = x"." || test -d "$$am__odir" \
+ || $(MKDIR_P) "$$am__odir" || exit $$?; \
+if test -f "./$$f"; then dir=./; \
+elif test -f "$$f"; then dir=; \
+else dir="$(srcdir)/"; fi; \
+tst=$$dir$$f; log='$@'; \
+if test -n '$(DISABLE_HARD_ERRORS)'; then \
+ am__enable_hard_errors=no; \
+else \
+ am__enable_hard_errors=yes; \
+fi; \
+case " $(XFAIL_TESTS) " in \
+ *[\ \ ]$$f[\ \ ]* | *[\ \ ]$$dir$$f[\ \ ]*) \
+ am__expect_failure=yes;; \
+ *) \
+ am__expect_failure=no;; \
+esac; \
+$(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT)
+# A shell command to get the names of the tests scripts with any registered
+# extension removed (i.e., equivalently, the names of the test logs, with
+# the '.log' extension removed). The result is saved in the shell variable
+# '$bases'. This honors runtime overriding of TESTS and TEST_LOGS. Sadly,
+# we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)",
+# since that might cause problem with VPATH rewrites for suffix-less tests.
+# See also 'test-harness-vpath-rewrite.sh' and 'test-trs-basic.sh'.
+am__set_TESTS_bases = \
+ bases='$(TEST_LOGS)'; \
+ bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \
+ bases=`echo $$bases`
+AM_TESTSUITE_SUMMARY_HEADER = ' for $(PACKAGE_STRING)'
+RECHECK_LOGS = $(TEST_LOGS)
+AM_RECURSIVE_TARGETS = check recheck
+TEST_SUITE_LOG = test-suite.log
+TEST_EXTENSIONS = @EXEEXT@ .test
+LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver
+LOG_COMPILE = $(LOG_COMPILER) $(AM_LOG_FLAGS) $(LOG_FLAGS)
+am__set_b = \
+ case '$@' in \
+ */*) \
+ case '$*' in \
+ */*) b='$*';; \
+ *) b=`echo '$@' | sed 's/\.log$$//'`; \
+ esac;; \
+ *) \
+ b='$*';; \
+ esac
+am__test_logs1 = $(TESTS:=.log)
+am__test_logs2 = $(am__test_logs1:@EXEEXT@.log=.log)
+TEST_LOGS = $(am__test_logs2:.test.log=.log)
+TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver
+TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \
+ $(TEST_LOG_FLAGS)
+am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/constants.inl.in \
+ $(top_srcdir)/depcomp $(top_srcdir)/test-driver
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AS = @AS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+BOOST_CPPFLAGS = @BOOST_CPPFLAGS@
+BOOST_FILESYSTEM_LDFLAGS = @BOOST_FILESYSTEM_LDFLAGS@
+BOOST_FILESYSTEM_LDPATH = @BOOST_FILESYSTEM_LDPATH@
+BOOST_FILESYSTEM_LIBS = @BOOST_FILESYSTEM_LIBS@
+BOOST_LDPATH = @BOOST_LDPATH@
+BOOST_PROGRAM_OPTIONS_LDFLAGS = @BOOST_PROGRAM_OPTIONS_LDFLAGS@
+BOOST_PROGRAM_OPTIONS_LDPATH = @BOOST_PROGRAM_OPTIONS_LDPATH@
+BOOST_PROGRAM_OPTIONS_LIBS = @BOOST_PROGRAM_OPTIONS_LIBS@
+BOOST_ROOT = @BOOST_ROOT@
+BOOST_SYSTEM_LDFLAGS = @BOOST_SYSTEM_LDFLAGS@
+BOOST_SYSTEM_LDPATH = @BOOST_SYSTEM_LDPATH@
+BOOST_SYSTEM_LIBS = @BOOST_SYSTEM_LIBS@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPPFLAGS = @CPPFLAGS@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DISTCHECK_CONFIGURE_FLAGS = @DISTCHECK_CONFIGURE_FLAGS@
+DLLTOOL = @DLLTOOL@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+ETAGS = @ETAGS@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+GREP = @GREP@
+HAVE_CXX17 = @HAVE_CXX17@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+IXION_API_VERSION = @IXION_API_VERSION@
+IXION_MAJOR_API_VERSION = @IXION_MAJOR_API_VERSION@
+IXION_MAJOR_VERSION = @IXION_MAJOR_VERSION@
+IXION_MICRO_VERSION = @IXION_MICRO_VERSION@
+IXION_MINOR_API_VERSION = @IXION_MINOR_API_VERSION@
+IXION_MINOR_VERSION = @IXION_MINOR_VERSION@
+IXION_VERSION = @IXION_VERSION@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
+MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MDDS_CFLAGS = @MDDS_CFLAGS@
+MDDS_LIBS = @MDDS_LIBS@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
+POW_LIB = @POW_LIB@
+PYTHON = @PYTHON@
+PYTHON_CFLAGS = @PYTHON_CFLAGS@
+PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
+PYTHON_LIBS = @PYTHON_LIBS@
+PYTHON_PLATFORM = @PYTHON_PLATFORM@
+PYTHON_PREFIX = @PYTHON_PREFIX@
+PYTHON_VERSION = @PYTHON_VERSION@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+VULKAN_CFLAGS = @VULKAN_CFLAGS@
+VULKAN_LIBS = @VULKAN_LIBS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+pkgpyexecdir = @pkgpyexecdir@
+pkgpythondir = @pkgpythondir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+pyexecdir = @pyexecdir@
+pythondir = @pythondir@
+runstatedir = @runstatedir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/src/include \
+ -DIXION_BUILD $(MDDS_CFLAGS) $(BOOST_CPPFLAGS) $(am__append_1)
+lib_LTLIBRARIES = libixion-@IXION_API_VERSION@.la
+libixion_@IXION_API_VERSION@_la_SOURCES = address.cpp \
+ address_iterator.cpp calc_status.hpp calc_status.cpp cell.cpp \
+ cell_access.cpp column_store_type.hpp compute_engine.cpp \
+ config.cpp debug.hpp debug.cpp dirty_cell_tracker.cpp \
+ document.cpp exceptions.cpp formula.cpp formula_calc.cpp \
+ formula_function_opcode.cpp formula_functions.hpp \
+ formula_functions.cpp formula_interpreter.hpp \
+ formula_interpreter.cpp formula_lexer.hpp formula_lexer.cpp \
+ formula_name_resolver.cpp formula_parser.hpp \
+ formula_parser.cpp formula_result.cpp formula_tokens.cpp \
+ formula_value_stack.hpp formula_value_stack.cpp global.cpp \
+ impl_types.hpp impl_types.cpp info.cpp lexer_tokens.hpp \
+ lexer_tokens.cpp matrix.cpp model_context.cpp \
+ model_context_impl.hpp model_context_impl.cpp \
+ model_iterator.cpp model_types.hpp model_types.cpp module.cpp \
+ named_expressions_iterator.cpp queue_entry.hpp queue_entry.cpp \
+ table.cpp types.cpp utf8.hpp utf8.cpp utils.hpp utils.cpp \
+ workbook.hpp workbook.cpp interface.cpp $(am__append_2)
+
+# VULKAN module
+@BUILD_VULKAN_TRUE@pkglib_LTLIBRARIES = ixion-@IXION_API_VERSION@-vulkan.la
+@BUILD_VULKAN_TRUE@ixion_@IXION_API_VERSION@_vulkan_la_SOURCES = \
+@BUILD_VULKAN_TRUE@ compute_engine_vulkan.hpp \
+@BUILD_VULKAN_TRUE@ compute_engine_vulkan.cpp \
+@BUILD_VULKAN_TRUE@ vulkan_obj.hpp \
+@BUILD_VULKAN_TRUE@ vulkan_obj.cpp
+
+@BUILD_VULKAN_TRUE@ixion_@IXION_API_VERSION@_vulkan_la_LDFLAGS = \
+@BUILD_VULKAN_TRUE@ -module -avoid-version -export-symbols-regex \
+@BUILD_VULKAN_TRUE@ register_module
+
+@BUILD_VULKAN_TRUE@ixion_@IXION_API_VERSION@_vulkan_la_LIBADD = \
+@BUILD_VULKAN_TRUE@ libixion-@IXION_API_VERSION@.la \
+@BUILD_VULKAN_TRUE@ $(VULKAN_LIBS)
+
+@BUILD_VULKAN_TRUE@ixion_@IXION_API_VERSION@_vulkan_la_CPPFLAGS = \
+@BUILD_VULKAN_TRUE@ $(AM_CPPFLAGS) \
+@BUILD_VULKAN_TRUE@ $(VULKAN_CPPFLAGS)
+
+libixion_@IXION_API_VERSION@_la_LDFLAGS = \
+ -no-undefined \
+ -Wl,-rpath,'$$ORIGIN' -Wl,-rpath,'$$ORIGIN/$(PACKAGE)' \
+ $(BOOST_FILESYSTEM_LDFLAGS)
+
+libixion_@IXION_API_VERSION@_la_LIBADD = \
+ $(BOOST_FILESYSTEM_LIBS)
+
+document_test_SOURCES = document_test.cpp
+document_test_LDADD = \
+ libixion-@IXION_API_VERSION@.la \
+ ../test/libixion-test.a
+
+general_test_SOURCES = general_test.cpp
+general_test_LDADD = \
+ libixion-@IXION_API_VERSION@.la \
+ ../test/libixion-test.a \
+ $(BOOST_PROGRAM_OPTIONS_LIBS)
+
+name_resolver_test_SOURCES = name_resolver_test.cpp
+name_resolver_test_LDADD = \
+ libixion-@IXION_API_VERSION@.la \
+ ../test/libixion-test.a \
+ $(BOOST_PROGRAM_OPTIONS_LIBS)
+
+ixion_test_track_deps_SOURCES = ixion_test_track_deps.cpp
+ixion_test_track_deps_LDADD = \
+ libixion-@IXION_API_VERSION@.la \
+ ../test/libixion-test.a \
+ $(BOOST_PROGRAM_OPTIONS_LIBS)
+
+compute_engine_test_SOURCES = compute_engine_test.cpp
+compute_engine_test_LDADD = \
+ ../test/libixion-test.a \
+ libixion-@IXION_API_VERSION@.la
+
+dirty_cell_tracker_test_SOURCES = dirty_cell_tracker_test.cpp
+dirty_cell_tracker_test_LDADD = \
+ ../test/libixion-test.a \
+ libixion-@IXION_API_VERSION@.la
+
+AM_TESTS_ENVIRONMENT =
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .cpp .lo .log .o .obj .test .test$(EXEEXT) .trs
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/libixion/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --foreign src/libixion/Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+constants.inl: $(top_builddir)/config.status $(srcdir)/constants.inl.in
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+
+clean-checkPROGRAMS:
+ @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \
+ echo " rm -f" $$list; \
+ rm -f $$list || exit $$?; \
+ test -n "$(EXEEXT)" || exit 0; \
+ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+ echo " rm -f" $$list; \
+ rm -f $$list
+
+install-libLTLIBRARIES: $(lib_LTLIBRARIES)
+ @$(NORMAL_INSTALL)
+ @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
+ list2=; for p in $$list; do \
+ if test -f $$p; then \
+ list2="$$list2 $$p"; \
+ else :; fi; \
+ done; \
+ test -z "$$list2" || { \
+ echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \
+ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \
+ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \
+ }
+
+uninstall-libLTLIBRARIES:
+ @$(NORMAL_UNINSTALL)
+ @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
+ for p in $$list; do \
+ $(am__strip_dir) \
+ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \
+ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \
+ done
+
+clean-libLTLIBRARIES:
+ -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
+ @list='$(lib_LTLIBRARIES)'; \
+ locs=`for p in $$list; do echo $$p; done | \
+ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \
+ sort -u`; \
+ test -z "$$locs" || { \
+ echo rm -f $${locs}; \
+ rm -f $${locs}; \
+ }
+
+install-pkglibLTLIBRARIES: $(pkglib_LTLIBRARIES)
+ @$(NORMAL_INSTALL)
+ @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \
+ list2=; for p in $$list; do \
+ if test -f $$p; then \
+ list2="$$list2 $$p"; \
+ else :; fi; \
+ done; \
+ test -z "$$list2" || { \
+ echo " $(MKDIR_P) '$(DESTDIR)$(pkglibdir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(pkglibdir)" || exit 1; \
+ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkglibdir)'"; \
+ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkglibdir)"; \
+ }
+
+uninstall-pkglibLTLIBRARIES:
+ @$(NORMAL_UNINSTALL)
+ @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \
+ for p in $$list; do \
+ $(am__strip_dir) \
+ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkglibdir)/$$f'"; \
+ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkglibdir)/$$f"; \
+ done
+
+clean-pkglibLTLIBRARIES:
+ -test -z "$(pkglib_LTLIBRARIES)" || rm -f $(pkglib_LTLIBRARIES)
+ @list='$(pkglib_LTLIBRARIES)'; \
+ locs=`for p in $$list; do echo $$p; done | \
+ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \
+ sort -u`; \
+ test -z "$$locs" || { \
+ echo rm -f $${locs}; \
+ rm -f $${locs}; \
+ }
+
+ixion-@IXION_API_VERSION@-vulkan.la: $(ixion_@IXION_API_VERSION@_vulkan_la_OBJECTS) $(ixion_@IXION_API_VERSION@_vulkan_la_DEPENDENCIES) $(EXTRA_ixion_@IXION_API_VERSION@_vulkan_la_DEPENDENCIES)
+ $(AM_V_CXXLD)$(ixion_@IXION_API_VERSION@_vulkan_la_LINK) $(am_ixion_@IXION_API_VERSION@_vulkan_la_rpath) $(ixion_@IXION_API_VERSION@_vulkan_la_OBJECTS) $(ixion_@IXION_API_VERSION@_vulkan_la_LIBADD) $(LIBS)
+
+libixion-@IXION_API_VERSION@.la: $(libixion_@IXION_API_VERSION@_la_OBJECTS) $(libixion_@IXION_API_VERSION@_la_DEPENDENCIES) $(EXTRA_libixion_@IXION_API_VERSION@_la_DEPENDENCIES)
+ $(AM_V_CXXLD)$(libixion_@IXION_API_VERSION@_la_LINK) -rpath $(libdir) $(libixion_@IXION_API_VERSION@_la_OBJECTS) $(libixion_@IXION_API_VERSION@_la_LIBADD) $(LIBS)
+
+compute-engine-test$(EXEEXT): $(compute_engine_test_OBJECTS) $(compute_engine_test_DEPENDENCIES) $(EXTRA_compute_engine_test_DEPENDENCIES)
+ @rm -f compute-engine-test$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(compute_engine_test_OBJECTS) $(compute_engine_test_LDADD) $(LIBS)
+
+dirty-cell-tracker-test$(EXEEXT): $(dirty_cell_tracker_test_OBJECTS) $(dirty_cell_tracker_test_DEPENDENCIES) $(EXTRA_dirty_cell_tracker_test_DEPENDENCIES)
+ @rm -f dirty-cell-tracker-test$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(dirty_cell_tracker_test_OBJECTS) $(dirty_cell_tracker_test_LDADD) $(LIBS)
+
+document-test$(EXEEXT): $(document_test_OBJECTS) $(document_test_DEPENDENCIES) $(EXTRA_document_test_DEPENDENCIES)
+ @rm -f document-test$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(document_test_OBJECTS) $(document_test_LDADD) $(LIBS)
+
+general-test$(EXEEXT): $(general_test_OBJECTS) $(general_test_DEPENDENCIES) $(EXTRA_general_test_DEPENDENCIES)
+ @rm -f general-test$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(general_test_OBJECTS) $(general_test_LDADD) $(LIBS)
+
+ixion-test-track-deps$(EXEEXT): $(ixion_test_track_deps_OBJECTS) $(ixion_test_track_deps_DEPENDENCIES) $(EXTRA_ixion_test_track_deps_DEPENDENCIES)
+ @rm -f ixion-test-track-deps$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(ixion_test_track_deps_OBJECTS) $(ixion_test_track_deps_LDADD) $(LIBS)
+
+name-resolver-test$(EXEEXT): $(name_resolver_test_OBJECTS) $(name_resolver_test_DEPENDENCIES) $(EXTRA_name_resolver_test_DEPENDENCIES)
+ @rm -f name-resolver-test$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(name_resolver_test_OBJECTS) $(name_resolver_test_LDADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/address.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/address_iterator.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/calc_status.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cell.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cell_access.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cell_queue_manager.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/compute_engine.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/compute_engine_test.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/config.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/debug.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dirty_cell_tracker.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dirty_cell_tracker_test.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/document.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/document_test.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exceptions.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/formula.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/formula_calc.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/formula_function_opcode.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/formula_functions.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/formula_interpreter.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/formula_lexer.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/formula_name_resolver.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/formula_parser.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/formula_result.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/formula_tokens.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/formula_value_stack.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/general_test.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/global.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/impl_types.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/info.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/interface.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ixion_@IXION_API_VERSION@_vulkan_la-compute_engine_vulkan.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ixion_@IXION_API_VERSION@_vulkan_la-vulkan_obj.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ixion_test_track_deps.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lexer_tokens.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/matrix.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/model_context.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/model_context_impl.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/model_iterator.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/model_types.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/module.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/name_resolver_test.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/named_expressions_iterator.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/queue_entry.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/table.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/types.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/utf8.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/utils.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/workbook.Plo@am__quote@ # am--include-marker
+
+$(am__depfiles_remade):
+ @$(MKDIR_P) $(@D)
+ @echo '# dummy' >$@-t && $(am__mv) $@-t $@
+
+am--depfiles: $(am__depfiles_remade)
+
+.cpp.o:
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $<
+
+.cpp.obj:
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cpp.lo:
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $<
+
+ixion_@IXION_API_VERSION@_vulkan_la-compute_engine_vulkan.lo: compute_engine_vulkan.cpp
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ixion_@IXION_API_VERSION@_vulkan_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT ixion_@IXION_API_VERSION@_vulkan_la-compute_engine_vulkan.lo -MD -MP -MF $(DEPDIR)/ixion_@IXION_API_VERSION@_vulkan_la-compute_engine_vulkan.Tpo -c -o ixion_@IXION_API_VERSION@_vulkan_la-compute_engine_vulkan.lo `test -f 'compute_engine_vulkan.cpp' || echo '$(srcdir)/'`compute_engine_vulkan.cpp
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ixion_@IXION_API_VERSION@_vulkan_la-compute_engine_vulkan.Tpo $(DEPDIR)/ixion_@IXION_API_VERSION@_vulkan_la-compute_engine_vulkan.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='compute_engine_vulkan.cpp' object='ixion_@IXION_API_VERSION@_vulkan_la-compute_engine_vulkan.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ixion_@IXION_API_VERSION@_vulkan_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ixion_@IXION_API_VERSION@_vulkan_la-compute_engine_vulkan.lo `test -f 'compute_engine_vulkan.cpp' || echo '$(srcdir)/'`compute_engine_vulkan.cpp
+
+ixion_@IXION_API_VERSION@_vulkan_la-vulkan_obj.lo: vulkan_obj.cpp
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ixion_@IXION_API_VERSION@_vulkan_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT ixion_@IXION_API_VERSION@_vulkan_la-vulkan_obj.lo -MD -MP -MF $(DEPDIR)/ixion_@IXION_API_VERSION@_vulkan_la-vulkan_obj.Tpo -c -o ixion_@IXION_API_VERSION@_vulkan_la-vulkan_obj.lo `test -f 'vulkan_obj.cpp' || echo '$(srcdir)/'`vulkan_obj.cpp
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ixion_@IXION_API_VERSION@_vulkan_la-vulkan_obj.Tpo $(DEPDIR)/ixion_@IXION_API_VERSION@_vulkan_la-vulkan_obj.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='vulkan_obj.cpp' object='ixion_@IXION_API_VERSION@_vulkan_la-vulkan_obj.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ixion_@IXION_API_VERSION@_vulkan_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ixion_@IXION_API_VERSION@_vulkan_la-vulkan_obj.lo `test -f 'vulkan_obj.cpp' || echo '$(srcdir)/'`vulkan_obj.cpp
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+ID: $(am__tagged_files)
+ $(am__define_uniq_tagged_files); mkid -fID $$unique
+tags: tags-am
+TAGS: tags
+
+tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ set x; \
+ here=`pwd`; \
+ $(am__define_uniq_tagged_files); \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: ctags-am
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ $(am__define_uniq_tagged_files); \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+cscopelist: cscopelist-am
+
+cscopelist-am: $(am__tagged_files)
+ list='$(am__tagged_files)'; \
+ case "$(srcdir)" in \
+ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+ *) sdir=$(subdir)/$(srcdir) ;; \
+ esac; \
+ for i in $$list; do \
+ if test -f "$$i"; then \
+ echo "$(subdir)/$$i"; \
+ else \
+ echo "$$sdir/$$i"; \
+ fi; \
+ done >> $(top_builddir)/cscope.files
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+# Recover from deleted '.trs' file; this should ensure that
+# "rm -f foo.log; make foo.trs" re-run 'foo.test', and re-create
+# both 'foo.log' and 'foo.trs'. Break the recipe in two subshells
+# to avoid problems with "make -n".
+.log.trs:
+ rm -f $< $@
+ $(MAKE) $(AM_MAKEFLAGS) $<
+
+# Leading 'am--fnord' is there to ensure the list of targets does not
+# expand to empty, as could happen e.g. with make check TESTS=''.
+am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck)
+am--force-recheck:
+ @:
+
+$(TEST_SUITE_LOG): $(TEST_LOGS)
+ @$(am__set_TESTS_bases); \
+ am__f_ok () { test -f "$$1" && test -r "$$1"; }; \
+ redo_bases=`for i in $$bases; do \
+ am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \
+ done`; \
+ if test -n "$$redo_bases"; then \
+ redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \
+ redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \
+ if $(am__make_dryrun); then :; else \
+ rm -f $$redo_logs && rm -f $$redo_results || exit 1; \
+ fi; \
+ fi; \
+ if test -n "$$am__remaking_logs"; then \
+ echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \
+ "recursion detected" >&2; \
+ elif test -n "$$redo_logs"; then \
+ am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \
+ fi; \
+ if $(am__make_dryrun); then :; else \
+ st=0; \
+ errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \
+ for i in $$redo_bases; do \
+ test -f $$i.trs && test -r $$i.trs \
+ || { echo "$$errmsg $$i.trs" >&2; st=1; }; \
+ test -f $$i.log && test -r $$i.log \
+ || { echo "$$errmsg $$i.log" >&2; st=1; }; \
+ done; \
+ test $$st -eq 0 || exit 1; \
+ fi
+ @$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \
+ ws='[ ]'; \
+ results=`for b in $$bases; do echo $$b.trs; done`; \
+ test -n "$$results" || results=/dev/null; \
+ all=` grep "^$$ws*:test-result:" $$results | wc -l`; \
+ pass=` grep "^$$ws*:test-result:$$ws*PASS" $$results | wc -l`; \
+ fail=` grep "^$$ws*:test-result:$$ws*FAIL" $$results | wc -l`; \
+ skip=` grep "^$$ws*:test-result:$$ws*SKIP" $$results | wc -l`; \
+ xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \
+ xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \
+ error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \
+ if test `expr $$fail + $$xpass + $$error` -eq 0; then \
+ success=true; \
+ else \
+ success=false; \
+ fi; \
+ br='==================='; br=$$br$$br$$br$$br; \
+ result_count () \
+ { \
+ if test x"$$1" = x"--maybe-color"; then \
+ maybe_colorize=yes; \
+ elif test x"$$1" = x"--no-color"; then \
+ maybe_colorize=no; \
+ else \
+ echo "$@: invalid 'result_count' usage" >&2; exit 4; \
+ fi; \
+ shift; \
+ desc=$$1 count=$$2; \
+ if test $$maybe_colorize = yes && test $$count -gt 0; then \
+ color_start=$$3 color_end=$$std; \
+ else \
+ color_start= color_end=; \
+ fi; \
+ echo "$${color_start}# $$desc $$count$${color_end}"; \
+ }; \
+ create_testsuite_report () \
+ { \
+ result_count $$1 "TOTAL:" $$all "$$brg"; \
+ result_count $$1 "PASS: " $$pass "$$grn"; \
+ result_count $$1 "SKIP: " $$skip "$$blu"; \
+ result_count $$1 "XFAIL:" $$xfail "$$lgn"; \
+ result_count $$1 "FAIL: " $$fail "$$red"; \
+ result_count $$1 "XPASS:" $$xpass "$$red"; \
+ result_count $$1 "ERROR:" $$error "$$mgn"; \
+ }; \
+ { \
+ echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \
+ $(am__rst_title); \
+ create_testsuite_report --no-color; \
+ echo; \
+ echo ".. contents:: :depth: 2"; \
+ echo; \
+ for b in $$bases; do echo $$b; done \
+ | $(am__create_global_log); \
+ } >$(TEST_SUITE_LOG).tmp || exit 1; \
+ mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \
+ if $$success; then \
+ col="$$grn"; \
+ else \
+ col="$$red"; \
+ test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \
+ fi; \
+ echo "$${col}$$br$${std}"; \
+ echo "$${col}Testsuite summary"$(AM_TESTSUITE_SUMMARY_HEADER)"$${std}"; \
+ echo "$${col}$$br$${std}"; \
+ create_testsuite_report --maybe-color; \
+ echo "$$col$$br$$std"; \
+ if $$success; then :; else \
+ echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}"; \
+ if test -n "$(PACKAGE_BUGREPORT)"; then \
+ echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}"; \
+ fi; \
+ echo "$$col$$br$$std"; \
+ fi; \
+ $$success || exit 1
+
+check-TESTS: $(check_PROGRAMS)
+ @list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list
+ @list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list
+ @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
+ @set +e; $(am__set_TESTS_bases); \
+ log_list=`for i in $$bases; do echo $$i.log; done`; \
+ trs_list=`for i in $$bases; do echo $$i.trs; done`; \
+ log_list=`echo $$log_list`; trs_list=`echo $$trs_list`; \
+ $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \
+ exit $$?;
+recheck: all $(check_PROGRAMS)
+ @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
+ @set +e; $(am__set_TESTS_bases); \
+ bases=`for i in $$bases; do echo $$i; done \
+ | $(am__list_recheck_tests)` || exit 1; \
+ log_list=`for i in $$bases; do echo $$i.log; done`; \
+ log_list=`echo $$log_list`; \
+ $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) \
+ am__force_recheck=am--force-recheck \
+ TEST_LOGS="$$log_list"; \
+ exit $$?
+document-test.log: document-test$(EXEEXT)
+ @p='document-test$(EXEEXT)'; \
+ b='document-test'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+general-test.log: general-test$(EXEEXT)
+ @p='general-test$(EXEEXT)'; \
+ b='general-test'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+ixion-test-track-deps.log: ixion-test-track-deps$(EXEEXT)
+ @p='ixion-test-track-deps$(EXEEXT)'; \
+ b='ixion-test-track-deps'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+compute-engine-test.log: compute-engine-test$(EXEEXT)
+ @p='compute-engine-test$(EXEEXT)'; \
+ b='compute-engine-test'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+dirty-cell-tracker-test.log: dirty-cell-tracker-test$(EXEEXT)
+ @p='dirty-cell-tracker-test$(EXEEXT)'; \
+ b='dirty-cell-tracker-test'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+name-resolver-test.log: name-resolver-test$(EXEEXT)
+ @p='name-resolver-test$(EXEEXT)'; \
+ b='name-resolver-test'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+.test.log:
+ @p='$<'; \
+ $(am__set_b); \
+ $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+@am__EXEEXT_TRUE@.test$(EXEEXT).log:
+@am__EXEEXT_TRUE@ @p='$<'; \
+@am__EXEEXT_TRUE@ $(am__set_b); \
+@am__EXEEXT_TRUE@ $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \
+@am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \
+@am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \
+@am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT)
+distdir: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) distdir-am
+
+distdir-am: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+ $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS)
+ $(MAKE) $(AM_MAKEFLAGS) check-TESTS
+check: check-am
+all-am: Makefile $(LTLIBRARIES)
+install-checkPROGRAMS: install-libLTLIBRARIES
+
+install-pkglibLTLIBRARIES: install-libLTLIBRARIES
+
+installdirs:
+ for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pkglibdir)"; do \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+ done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
+mostlyclean-generic:
+ -test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS)
+ -test -z "$(TEST_LOGS:.log=.trs)" || rm -f $(TEST_LOGS:.log=.trs)
+ -test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-checkPROGRAMS clean-generic clean-libLTLIBRARIES \
+ clean-libtool clean-pkglibLTLIBRARIES mostlyclean-am
+
+distclean: distclean-am
+ -rm -f ./$(DEPDIR)/address.Plo
+ -rm -f ./$(DEPDIR)/address_iterator.Plo
+ -rm -f ./$(DEPDIR)/calc_status.Plo
+ -rm -f ./$(DEPDIR)/cell.Plo
+ -rm -f ./$(DEPDIR)/cell_access.Plo
+ -rm -f ./$(DEPDIR)/cell_queue_manager.Plo
+ -rm -f ./$(DEPDIR)/compute_engine.Plo
+ -rm -f ./$(DEPDIR)/compute_engine_test.Po
+ -rm -f ./$(DEPDIR)/config.Plo
+ -rm -f ./$(DEPDIR)/debug.Plo
+ -rm -f ./$(DEPDIR)/dirty_cell_tracker.Plo
+ -rm -f ./$(DEPDIR)/dirty_cell_tracker_test.Po
+ -rm -f ./$(DEPDIR)/document.Plo
+ -rm -f ./$(DEPDIR)/document_test.Po
+ -rm -f ./$(DEPDIR)/exceptions.Plo
+ -rm -f ./$(DEPDIR)/formula.Plo
+ -rm -f ./$(DEPDIR)/formula_calc.Plo
+ -rm -f ./$(DEPDIR)/formula_function_opcode.Plo
+ -rm -f ./$(DEPDIR)/formula_functions.Plo
+ -rm -f ./$(DEPDIR)/formula_interpreter.Plo
+ -rm -f ./$(DEPDIR)/formula_lexer.Plo
+ -rm -f ./$(DEPDIR)/formula_name_resolver.Plo
+ -rm -f ./$(DEPDIR)/formula_parser.Plo
+ -rm -f ./$(DEPDIR)/formula_result.Plo
+ -rm -f ./$(DEPDIR)/formula_tokens.Plo
+ -rm -f ./$(DEPDIR)/formula_value_stack.Plo
+ -rm -f ./$(DEPDIR)/general_test.Po
+ -rm -f ./$(DEPDIR)/global.Plo
+ -rm -f ./$(DEPDIR)/impl_types.Plo
+ -rm -f ./$(DEPDIR)/info.Plo
+ -rm -f ./$(DEPDIR)/interface.Plo
+ -rm -f ./$(DEPDIR)/ixion_@IXION_API_VERSION@_vulkan_la-compute_engine_vulkan.Plo
+ -rm -f ./$(DEPDIR)/ixion_@IXION_API_VERSION@_vulkan_la-vulkan_obj.Plo
+ -rm -f ./$(DEPDIR)/ixion_test_track_deps.Po
+ -rm -f ./$(DEPDIR)/lexer_tokens.Plo
+ -rm -f ./$(DEPDIR)/matrix.Plo
+ -rm -f ./$(DEPDIR)/model_context.Plo
+ -rm -f ./$(DEPDIR)/model_context_impl.Plo
+ -rm -f ./$(DEPDIR)/model_iterator.Plo
+ -rm -f ./$(DEPDIR)/model_types.Plo
+ -rm -f ./$(DEPDIR)/module.Plo
+ -rm -f ./$(DEPDIR)/name_resolver_test.Po
+ -rm -f ./$(DEPDIR)/named_expressions_iterator.Plo
+ -rm -f ./$(DEPDIR)/queue_entry.Plo
+ -rm -f ./$(DEPDIR)/table.Plo
+ -rm -f ./$(DEPDIR)/types.Plo
+ -rm -f ./$(DEPDIR)/utf8.Plo
+ -rm -f ./$(DEPDIR)/utils.Plo
+ -rm -f ./$(DEPDIR)/workbook.Plo
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am: install-libLTLIBRARIES install-pkglibLTLIBRARIES
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -f ./$(DEPDIR)/address.Plo
+ -rm -f ./$(DEPDIR)/address_iterator.Plo
+ -rm -f ./$(DEPDIR)/calc_status.Plo
+ -rm -f ./$(DEPDIR)/cell.Plo
+ -rm -f ./$(DEPDIR)/cell_access.Plo
+ -rm -f ./$(DEPDIR)/cell_queue_manager.Plo
+ -rm -f ./$(DEPDIR)/compute_engine.Plo
+ -rm -f ./$(DEPDIR)/compute_engine_test.Po
+ -rm -f ./$(DEPDIR)/config.Plo
+ -rm -f ./$(DEPDIR)/debug.Plo
+ -rm -f ./$(DEPDIR)/dirty_cell_tracker.Plo
+ -rm -f ./$(DEPDIR)/dirty_cell_tracker_test.Po
+ -rm -f ./$(DEPDIR)/document.Plo
+ -rm -f ./$(DEPDIR)/document_test.Po
+ -rm -f ./$(DEPDIR)/exceptions.Plo
+ -rm -f ./$(DEPDIR)/formula.Plo
+ -rm -f ./$(DEPDIR)/formula_calc.Plo
+ -rm -f ./$(DEPDIR)/formula_function_opcode.Plo
+ -rm -f ./$(DEPDIR)/formula_functions.Plo
+ -rm -f ./$(DEPDIR)/formula_interpreter.Plo
+ -rm -f ./$(DEPDIR)/formula_lexer.Plo
+ -rm -f ./$(DEPDIR)/formula_name_resolver.Plo
+ -rm -f ./$(DEPDIR)/formula_parser.Plo
+ -rm -f ./$(DEPDIR)/formula_result.Plo
+ -rm -f ./$(DEPDIR)/formula_tokens.Plo
+ -rm -f ./$(DEPDIR)/formula_value_stack.Plo
+ -rm -f ./$(DEPDIR)/general_test.Po
+ -rm -f ./$(DEPDIR)/global.Plo
+ -rm -f ./$(DEPDIR)/impl_types.Plo
+ -rm -f ./$(DEPDIR)/info.Plo
+ -rm -f ./$(DEPDIR)/interface.Plo
+ -rm -f ./$(DEPDIR)/ixion_@IXION_API_VERSION@_vulkan_la-compute_engine_vulkan.Plo
+ -rm -f ./$(DEPDIR)/ixion_@IXION_API_VERSION@_vulkan_la-vulkan_obj.Plo
+ -rm -f ./$(DEPDIR)/ixion_test_track_deps.Po
+ -rm -f ./$(DEPDIR)/lexer_tokens.Plo
+ -rm -f ./$(DEPDIR)/matrix.Plo
+ -rm -f ./$(DEPDIR)/model_context.Plo
+ -rm -f ./$(DEPDIR)/model_context_impl.Plo
+ -rm -f ./$(DEPDIR)/model_iterator.Plo
+ -rm -f ./$(DEPDIR)/model_types.Plo
+ -rm -f ./$(DEPDIR)/module.Plo
+ -rm -f ./$(DEPDIR)/name_resolver_test.Po
+ -rm -f ./$(DEPDIR)/named_expressions_iterator.Plo
+ -rm -f ./$(DEPDIR)/queue_entry.Plo
+ -rm -f ./$(DEPDIR)/table.Plo
+ -rm -f ./$(DEPDIR)/types.Plo
+ -rm -f ./$(DEPDIR)/utf8.Plo
+ -rm -f ./$(DEPDIR)/utils.Plo
+ -rm -f ./$(DEPDIR)/workbook.Plo
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-libLTLIBRARIES uninstall-pkglibLTLIBRARIES
+
+.MAKE: check-am install-am install-strip
+
+.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-TESTS \
+ check-am clean clean-checkPROGRAMS clean-generic \
+ clean-libLTLIBRARIES clean-libtool clean-pkglibLTLIBRARIES \
+ cscopelist-am ctags ctags-am distclean distclean-compile \
+ distclean-generic distclean-libtool distclean-tags distdir dvi \
+ dvi-am html html-am info info-am install install-am \
+ install-data install-data-am install-dvi install-dvi-am \
+ install-exec install-exec-am install-html install-html-am \
+ install-info install-info-am install-libLTLIBRARIES \
+ install-man install-pdf install-pdf-am \
+ install-pkglibLTLIBRARIES install-ps install-ps-am \
+ install-strip installcheck installcheck-am installdirs \
+ maintainer-clean maintainer-clean-generic mostlyclean \
+ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
+ pdf pdf-am ps ps-am recheck tags tags-am uninstall \
+ uninstall-am uninstall-libLTLIBRARIES \
+ uninstall-pkglibLTLIBRARIES
+
+.PRECIOUS: Makefile
+
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/src/libixion/address.cpp b/src/libixion/address.cpp
new file mode 100644
index 0000000..2b9b82c
--- /dev/null
+++ b/src/libixion/address.cpp
@@ -0,0 +1,568 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include "ixion/address.hpp"
+
+#include <sstream>
+#include <limits>
+
+namespace ixion {
+
+static const row_t row_max = std::numeric_limits<row_t>::max();
+static const col_t column_max = std::numeric_limits<col_t>::max();
+
+const row_t row_unset = row_max - 9;
+const row_t row_upper_bound = row_max - 10;
+
+const col_t column_unset = column_max - 9;
+const col_t column_upper_bound = column_max / 26 - 26;
+
+abs_address_t::abs_address_t() : sheet(0), row(0), column(0) {}
+abs_address_t::abs_address_t(init_invalid) : sheet(-1), row(-1), column(-1) {}
+
+abs_address_t::abs_address_t(sheet_t _sheet, row_t _row, col_t _column) :
+ sheet(_sheet), row(_row), column(_column) {}
+
+abs_address_t::abs_address_t(const abs_address_t& r) :
+ sheet(r.sheet), row(r.row), column(r.column) {}
+
+bool abs_address_t::valid() const
+{
+ return sheet >= 0 && row >= 0 && column >= 0 && row <= row_unset && column <= column_unset;
+}
+
+std::string abs_address_t::get_name() const
+{
+ std::ostringstream os;
+ os << "(sheet=" << sheet << "; row=" << row << "; column=" << column << ")";
+ return os.str();
+}
+
+std::size_t abs_address_t::hash::operator()(const abs_address_t& addr) const
+{
+ return addr.sheet + addr.row + addr.column;
+}
+
+bool operator== (const abs_address_t& left, const abs_address_t& right)
+{
+ return left.sheet == right.sheet &&
+ left.row == right.row &&
+ left.column == right.column;
+}
+
+bool operator!= (const abs_address_t& left, const abs_address_t& right)
+{
+ return !operator==(left, right);
+}
+
+bool operator< (const abs_address_t& left, const abs_address_t& right)
+{
+ if (left.sheet != right.sheet)
+ return left.sheet < right.sheet;
+
+ if (left.row != right.row)
+ return left.row < right.row;
+
+ return left.column < right.column;
+}
+
+address_t::address_t() :
+ sheet(0), row(0), column(0), abs_sheet(true), abs_row(true), abs_column(true) {}
+
+address_t::address_t(sheet_t _sheet, row_t _row, col_t _column, bool _abs_sheet, bool _abs_row, bool _abs_column) :
+ sheet(_sheet), row(_row), column(_column),
+ abs_sheet(_abs_sheet), abs_row(_abs_row), abs_column(_abs_column) {}
+
+address_t::address_t(const address_t& r) :
+ sheet(r.sheet), row(r.row), column(r.column),
+ abs_sheet(r.abs_sheet), abs_row(r.abs_row), abs_column(r.abs_column) {}
+
+address_t::address_t(const abs_address_t& r) :
+ sheet(r.sheet), row(r.row), column(r.column),
+ abs_sheet(true), abs_row(true), abs_column(true) {}
+
+bool address_t::valid() const
+{
+ if (abs_sheet)
+ {
+ if (sheet < 0)
+ return false;
+ }
+
+ if (row > row_unset)
+ return false;
+
+ if (abs_row)
+ {
+ if (row < 0)
+ return false;
+ }
+ else
+ {
+ if (row < -row_upper_bound)
+ return false;
+ }
+
+ if (column > column_unset)
+ return false;
+
+ if (abs_column)
+ {
+ if (column < 0)
+ return false;
+ }
+ else
+ {
+ if (column < -column_upper_bound)
+ return false;
+ }
+
+ return true;
+}
+
+abs_address_t address_t::to_abs(const abs_address_t& origin) const
+{
+ abs_address_t abs_addr;
+ abs_addr.sheet = sheet;
+ abs_addr.row = row;
+ abs_addr.column = column;
+
+ if (!is_valid_sheet(origin.sheet))
+ // If the origin sheet is invalid, then any sheet position relative to that should be invalid.
+ abs_addr.sheet = origin.sheet;
+ else if (!abs_sheet)
+ abs_addr.sheet += origin.sheet;
+
+ if (!abs_row && row <= row_upper_bound)
+ abs_addr.row += origin.row;
+
+ if (!abs_column && column <= column_upper_bound)
+ abs_addr.column += origin.column;
+
+ return abs_addr;
+}
+
+std::string address_t::get_name() const
+{
+ std::ostringstream os;
+ os << "(row=" << row << " [";
+ if (abs_row)
+ os << "abs";
+ else
+ os << "rel";
+ os << "]; column=" << column << " [";
+ if (abs_column)
+ os << "abs";
+ else
+ os << "rel";
+ os << "])";
+ return os.str();
+}
+
+void address_t::set_absolute(bool abs)
+{
+ abs_sheet = abs;
+ abs_row = abs;
+ abs_column = abs;
+}
+
+std::size_t address_t::hash::operator()(const address_t& addr) const
+{
+ return 0;
+}
+
+bool operator== (const address_t& left, const address_t& right)
+{
+ return left.sheet == right.sheet &&
+ left.row == right.row &&
+ left.column == right.column &&
+ left.abs_sheet == right.abs_sheet &&
+ left.abs_row == right.abs_row &&
+ left.abs_column == right.abs_column;
+}
+
+bool operator!=(const address_t& left, const address_t& right)
+{
+ return !operator==(left, right);
+}
+
+bool operator< (const address_t& left, const address_t& right)
+{
+ // Not sure how to compare absolute and relative addresses, but let's make
+ // absolute address always greater than relative one until we find a
+ // better way.
+
+ if (left.abs_sheet != right.abs_sheet)
+ return left.abs_sheet < right.abs_sheet;
+
+ if (left.abs_row != right.abs_row)
+ return left.abs_row < right.abs_row;
+
+ if (left.abs_column != right.abs_column)
+ return left.abs_column < right.abs_column;
+
+ if (left.sheet != right.sheet)
+ return left.sheet < right.sheet;
+
+ if (left.row != right.row)
+ return left.row < right.row;
+
+ return left.column < right.column;
+}
+
+abs_rc_address_t::abs_rc_address_t() : row(0), column(0)
+{
+}
+
+abs_rc_address_t::abs_rc_address_t(init_invalid) :
+ row(-1), column(-1) {}
+
+abs_rc_address_t::abs_rc_address_t(row_t _row, col_t _column) :
+ row(_row), column(_column) {}
+
+abs_rc_address_t::abs_rc_address_t(const abs_rc_address_t& r) :
+ row(r.row), column(r.column) {}
+
+abs_rc_address_t::abs_rc_address_t(const abs_address_t& r) :
+ row(r.row), column(r.column) {}
+
+bool abs_rc_address_t::valid() const
+{
+ return row >= 0 && column >= 0 && row <= row_unset && column <= column_unset;
+}
+
+std::size_t abs_rc_address_t::hash::operator() (const abs_rc_address_t& addr) const
+{
+ size_t hv = addr.column;
+ hv <<= 16;
+ hv += addr.row;
+ return hv;
+}
+
+bool operator== (const abs_rc_address_t& left, const abs_rc_address_t& right)
+{
+ return left.row == right.row && left.column == right.column;
+}
+
+bool operator!= (const abs_rc_address_t& left, const abs_rc_address_t& right)
+{
+ return !operator==(left, right);
+}
+
+bool operator< (const abs_rc_address_t& left, const abs_rc_address_t& right)
+{
+ if (left.row != right.row)
+ return left.row < right.row;
+
+ return left.column < right.column;
+}
+
+rc_address_t::rc_address_t() :
+ row(0), column(0), abs_row(true), abs_column(true) {}
+
+rc_address_t::rc_address_t(row_t _row, col_t _column, bool _abs_row, bool _abs_column) :
+ row(_row), column(_column), abs_row(_abs_row), abs_column(_abs_column) {}
+
+rc_address_t::rc_address_t(const rc_address_t& r) :
+ row(r.row), column(r.column), abs_row(r.abs_row), abs_column(r.abs_column) {}
+
+std::size_t rc_address_t::hash::operator()(const rc_address_t& addr) const
+{
+ std::size_t hv = addr.column;
+ hv <<= 16;
+ hv += addr.row;
+ return hv;
+}
+
+abs_range_t::abs_range_t() {}
+abs_range_t::abs_range_t(init_invalid) :
+ first(abs_address_t::invalid), last(abs_address_t::invalid) {}
+
+abs_range_t::abs_range_t(sheet_t _sheet, row_t _row, col_t _col) :
+ first(_sheet, _row, _col), last(_sheet, _row, _col) {}
+
+abs_range_t::abs_range_t(sheet_t _sheet, row_t _row, col_t _col, row_t _row_span, col_t _col_span) :
+ first(_sheet, _row, _col), last(_sheet, _row + _row_span - 1, _col + _col_span - 1)
+{
+ if (_row_span < 1 || _col_span < 1)
+ {
+ std::ostringstream os;
+ os << "abs_range_t: invalid span (row=" << _row_span << "; col=" << _col_span << ")";
+ throw std::range_error(os.str());
+ }
+}
+
+abs_range_t::abs_range_t(const abs_address_t& addr, row_t row_span, col_t col_span) :
+ first(addr), last(addr)
+{
+ if (row_span > 0)
+ last.row += row_span - 1;
+ if (col_span > 0)
+ last.column += col_span - 1;
+}
+
+abs_range_t::abs_range_t(const abs_address_t& addr) :
+ first(addr), last(addr) {}
+
+std::size_t abs_range_t::hash::operator() (const abs_range_t& range) const
+{
+ abs_address_t::hash adr_hash;
+ return adr_hash(range.first) + 65536*adr_hash(range.last);
+}
+
+bool abs_range_t::valid() const
+{
+ return first.valid() && last.valid() &&
+ first.sheet <= last.sheet &&
+ first.column <= last.column &&
+ first.row <= last.row;
+}
+
+void abs_range_t::set_all_columns()
+{
+ first.column = column_unset;
+ last.column = column_unset;
+}
+
+void abs_range_t::set_all_rows()
+{
+ first.row = row_unset;
+ last.row = row_unset;
+}
+
+bool abs_range_t::all_columns() const
+{
+ return first.column == column_unset && last.column == column_unset;
+}
+
+bool abs_range_t::all_rows() const
+{
+ return first.row == row_unset && last.row == row_unset;
+}
+
+bool abs_range_t::contains(const abs_address_t& addr) const
+{
+ return first.sheet <= addr.sheet && addr.sheet <= last.sheet &&
+ first.row <= addr.row && addr.row <= last.row &&
+ first.column <= addr.column && addr.column <= last.column;
+}
+
+void abs_range_t::reorder()
+{
+ if (first.sheet > last.sheet)
+ std::swap(first.sheet, last.sheet);
+
+ if (first.row > last.row)
+ std::swap(first.row, last.row);
+
+ if (first.column > last.column)
+ std::swap(first.column, last.column);
+}
+
+bool operator==(const abs_range_t& left, const abs_range_t& right)
+{
+ return left.first == right.first && left.last == right.last;
+}
+
+bool operator!=(const abs_range_t& left, const abs_range_t& right)
+{
+ return !operator==(left, right);
+}
+
+bool operator<(const abs_range_t& left, const abs_range_t& right)
+{
+ if (left.first != right.first)
+ return left.first < right.first;
+ return left.last < right.last;
+}
+
+abs_rc_range_t::abs_rc_range_t() {}
+abs_rc_range_t::abs_rc_range_t(init_invalid) :
+ first(abs_rc_address_t::invalid), last(abs_rc_address_t::invalid) {}
+
+abs_rc_range_t::abs_rc_range_t(const abs_rc_range_t& other) :
+ first(other.first), last(other.last) {}
+
+abs_rc_range_t::abs_rc_range_t(const abs_range_t& other) :
+ first(other.first), last(other.last) {}
+
+size_t abs_rc_range_t::hash::operator() (const abs_rc_range_t& range) const
+{
+ abs_rc_address_t::hash adr_hash;
+ return adr_hash(range.first) + 65536*adr_hash(range.last);
+}
+
+bool abs_rc_range_t::valid() const
+{
+ if (!first.valid() || !last.valid())
+ return false;
+
+ if (first.row != row_unset && last.row != row_unset)
+ {
+ if (first.row > last.row)
+ return false;
+ }
+
+ if (first.column != column_unset && last.column != column_unset)
+ {
+ if (first.column > last.column)
+ return false;
+ }
+
+ return true;
+}
+
+void abs_rc_range_t::set_all_columns()
+{
+ first.column = column_unset;
+ last.column = column_unset;
+}
+
+void abs_rc_range_t::set_all_rows()
+{
+ first.row = row_unset;
+ last.row = row_unset;
+}
+
+bool abs_rc_range_t::all_columns() const
+{
+ return first.column == column_unset && last.column == column_unset;
+}
+
+bool abs_rc_range_t::all_rows() const
+{
+ return first.row == row_unset && last.row == row_unset;
+}
+
+bool abs_rc_range_t::contains(const abs_rc_address_t& addr) const
+{
+ return first.row <= addr.row && addr.row <= last.row &&
+ first.column <= addr.column && addr.column <= last.column;
+}
+
+bool operator==(const abs_rc_range_t& left, const abs_rc_range_t& right)
+{
+ return left.first == right.first && left.last == right.last;
+}
+
+bool operator!=(const abs_rc_range_t& left, const abs_rc_range_t& right)
+{
+ return !operator==(left, right);
+}
+
+bool operator<(const abs_rc_range_t& left, const abs_rc_range_t& right)
+{
+ if (left.first != right.first)
+ return left.first < right.first;
+ return left.last < right.last;
+}
+
+range_t::range_t() {}
+range_t::range_t(const address_t& _first, const address_t& _last) :
+ first(_first), last(_last) {}
+
+range_t::range_t(const range_t& r) : first(r.first), last(r.last) {}
+range_t::range_t(const abs_range_t& r) : first(r.first), last(r.last) {}
+
+bool range_t::valid() const
+{
+ return first.valid() && last.valid();
+}
+
+void range_t::set_all_columns()
+{
+ first.column = column_unset;
+ last.column = column_unset;
+}
+
+void range_t::set_all_rows()
+{
+ first.row = row_unset;
+ last.row = row_unset;
+}
+
+bool range_t::all_columns() const
+{
+ return first.column == column_unset && last.column == column_unset;
+}
+
+bool range_t::all_rows() const
+{
+ return first.row == row_unset && last.row == row_unset;
+}
+
+abs_range_t range_t::to_abs(const abs_address_t& origin) const
+{
+ abs_range_t ret;
+ ret.first = first.to_abs(origin);
+ ret.last = last.to_abs(origin);
+ return ret;
+}
+
+void range_t::set_absolute(bool abs)
+{
+ first.set_absolute(abs);
+ last.set_absolute(abs);
+}
+
+std::size_t range_t::hash::operator() (const range_t& range) const
+{
+ address_t::hash adr_hash;
+ return adr_hash(range.first) + 65536*adr_hash(range.last);
+}
+
+bool operator==(const range_t& left, const range_t& right)
+{
+ return left.first == right.first && left.last == right.last;
+}
+
+bool operator!=(const range_t& left, const range_t& right)
+{
+ return !operator==(left, right);
+}
+
+std::ostream& operator<<(std::ostream& os, const abs_address_t& addr)
+{
+ os << "(sheet:" << addr.sheet << "; row:" << addr.row << "; column:" << addr.column << ")";
+ return os;
+}
+
+std::ostream& operator<<(std::ostream& os, const abs_rc_address_t& addr)
+{
+ os << "(row:" << addr.row << "; column:" << addr.column << ")";
+ return os;
+}
+
+std::ostream& operator<<(std::ostream& os, const address_t& addr)
+{
+ os << "(sheet:" << addr.sheet << " " << (addr.abs_sheet?"abs":"rel")
+ << "; row:" << addr.row << " " << (addr.abs_row?"abs":"rel")
+ <<"; column:" << addr.column << " " << (addr.abs_column?"abs":"rel") << ")";
+ return os;
+}
+
+std::ostream& operator<<(std::ostream& os, const abs_range_t& range)
+{
+ os << range.first << "-" << range.last;
+ return os;
+}
+
+std::ostream& operator<<(std::ostream& os, const abs_rc_range_t& range)
+{
+ os << range.first << "-" << range.last;
+ return os;
+}
+
+std::ostream& operator<<(std::ostream& os, const range_t& range)
+{
+ os << range.first << "-" << range.last;
+ return os;
+}
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/src/libixion/address_iterator.cpp b/src/libixion/address_iterator.cpp
new file mode 100644
index 0000000..0911d41
--- /dev/null
+++ b/src/libixion/address_iterator.cpp
@@ -0,0 +1,316 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include "ixion/address_iterator.hpp"
+#include "ixion/address.hpp"
+#include "ixion/global.hpp"
+
+#include <cassert>
+#include <functional>
+
+namespace ixion {
+
+namespace {
+
+bool inc_sheet(const abs_range_t& range, abs_address_t& pos)
+{
+ if (pos.sheet < range.last.sheet)
+ {
+ ++pos.sheet;
+ pos.row = range.first.row;
+ pos.column = range.first.column;
+ return true;
+ }
+
+ return false;
+}
+
+bool dec_sheet(const abs_range_t& range, abs_address_t& pos)
+{
+ if (range.first.sheet < pos.sheet)
+ {
+ --pos.sheet;
+ pos.row = range.last.row;
+ pos.column = range.last.column;
+ return true;
+ }
+
+ return false;
+}
+
+void inc_vertical(const abs_range_t& range, abs_address_t& pos, bool& end_pos)
+{
+ if (end_pos)
+ throw std::out_of_range("attempting to increment past the end position.");
+
+ if (pos.row < range.last.row)
+ {
+ ++pos.row;
+ return;
+ }
+
+ if (pos.column < range.last.column)
+ {
+ ++pos.column;
+ pos.row = range.first.row;
+ return;
+ }
+
+ if (inc_sheet(range, pos))
+ return;
+
+ assert(pos == range.last);
+ end_pos = true;
+}
+
+void dec_vertical(const abs_range_t& range, abs_address_t& pos, bool& end_pos)
+{
+ if (end_pos)
+ {
+ end_pos = false;
+ assert(pos == range.last);
+ return;
+ }
+
+ if (range.first.row < pos.row)
+ {
+ --pos.row;
+ return;
+ }
+
+ assert(pos.row == range.first.row);
+
+ if (range.first.column < pos.column)
+ {
+ --pos.column;
+ pos.row = range.last.row;
+ return;
+ }
+
+ assert(pos.column == range.first.column);
+
+ if (dec_sheet(range, pos))
+ return;
+
+ assert(pos == range.first);
+ throw std::out_of_range("Attempting to decrement beyond the first position.");
+}
+
+void inc_horizontal(const abs_range_t& range, abs_address_t& pos, bool& end_pos)
+{
+ if (end_pos)
+ throw std::out_of_range("attempting to increment past the end position.");
+
+ if (pos.column < range.last.column)
+ {
+ ++pos.column;
+ return;
+ }
+
+ if (pos.row < range.last.row)
+ {
+ ++pos.row;
+ pos.column = range.first.column;
+ return;
+ }
+
+ if (inc_sheet(range, pos))
+ return;
+
+ assert(pos == range.last);
+ end_pos = true;
+}
+
+void dec_horizontal(const abs_range_t& range, abs_address_t& pos, bool& end_pos)
+{
+ if (end_pos)
+ {
+ end_pos = false;
+ assert(pos == range.last);
+ return;
+ }
+
+ if (range.first.column < pos.column)
+ {
+ --pos.column;
+ return;
+ }
+
+ assert(pos.column == range.first.column);
+
+ if (range.first.row < pos.row)
+ {
+ --pos.row;
+ pos.column = range.last.column;
+ return;
+ }
+
+ assert(pos.row == range.first.row);
+
+ if (dec_sheet(range, pos))
+ return;
+
+ assert(pos == range.first);
+ throw std::out_of_range("Attempting to decrement beyond the first position.");
+}
+
+using update_func_type = std::function<void(const abs_range_t&,abs_address_t&,bool&)>;
+
+} // anonymous namespace
+
+struct abs_address_iterator::impl
+{
+ const abs_range_t m_range;
+ rc_direction_t m_dir;
+
+ impl(const abs_range_t& range, rc_direction_t dir) :
+ m_range(range), m_dir(dir) {}
+};
+
+struct abs_address_iterator::const_iterator::impl_node
+{
+ const abs_range_t* mp_range;
+ abs_address_t m_pos;
+ bool m_end_pos; //< flag that indicates whether the node is at the position past the last valid address.
+
+ update_func_type m_func_inc;
+ update_func_type m_func_dec;
+
+ impl_node() : mp_range(nullptr), m_pos(abs_address_t::invalid), m_end_pos(false) {}
+
+ impl_node(const abs_range_t& range, rc_direction_t dir, bool end) :
+ mp_range(&range),
+ m_pos(end ? range.last : range.first),
+ m_end_pos(end)
+ {
+ switch (dir)
+ {
+ case rc_direction_t::horizontal:
+ m_func_inc = inc_horizontal;
+ m_func_dec = dec_horizontal;
+ break;
+ case rc_direction_t::vertical:
+ m_func_inc = inc_vertical;
+ m_func_dec = dec_vertical;
+ break;
+ default:
+ throw std::logic_error("unhandled direction value.");
+ }
+ }
+
+ impl_node(const impl_node& r) :
+ mp_range(r.mp_range),
+ m_pos(r.m_pos),
+ m_end_pos(r.m_end_pos),
+ m_func_inc(r.m_func_inc),
+ m_func_dec(r.m_func_dec) {}
+
+ bool equals(const impl_node& r) const
+ {
+ return mp_range == r.mp_range && m_pos == r.m_pos && m_end_pos == r.m_end_pos;
+ }
+
+ void inc()
+ {
+ m_func_inc(*mp_range, m_pos, m_end_pos);
+ }
+
+ void dec()
+ {
+ m_func_dec(*mp_range, m_pos, m_end_pos);
+ }
+};
+
+abs_address_iterator::const_iterator::const_iterator() :
+ mp_impl(std::make_unique<impl_node>()) {}
+
+abs_address_iterator::const_iterator::const_iterator(
+ const abs_range_t& range, rc_direction_t dir, bool end) :
+ mp_impl(std::make_unique<impl_node>(range, dir, end)) {}
+
+abs_address_iterator::const_iterator::const_iterator(const const_iterator& r) :
+ mp_impl(std::make_unique<impl_node>(*r.mp_impl)) {}
+
+abs_address_iterator::const_iterator::const_iterator(const_iterator&& r) :
+ mp_impl(std::move(r.mp_impl)) {}
+
+abs_address_iterator::const_iterator::~const_iterator() {}
+
+abs_address_iterator::const_iterator& abs_address_iterator::const_iterator::operator++()
+{
+ mp_impl->inc();
+ return *this;
+}
+
+abs_address_iterator::const_iterator abs_address_iterator::const_iterator::operator++(int)
+{
+ auto saved = *this;
+ mp_impl->inc();
+ return saved;
+}
+
+abs_address_iterator::const_iterator& abs_address_iterator::const_iterator::operator--()
+{
+ mp_impl->dec();
+ return *this;
+}
+
+abs_address_iterator::const_iterator abs_address_iterator::const_iterator::operator--(int)
+{
+ auto saved = *this;
+ mp_impl->dec();
+ return saved;
+}
+
+const abs_address_iterator::const_iterator::value_type& abs_address_iterator::const_iterator::operator*() const
+{
+ return mp_impl->m_pos;
+}
+
+const abs_address_iterator::const_iterator::value_type* abs_address_iterator::const_iterator::operator->() const
+{
+ return &mp_impl->m_pos;
+}
+
+bool abs_address_iterator::const_iterator::operator== (const const_iterator& r) const
+{
+ return mp_impl->equals(*r.mp_impl);
+}
+
+bool abs_address_iterator::const_iterator::operator!= (const const_iterator& r) const
+{
+ return !operator==(r);
+}
+
+abs_address_iterator::abs_address_iterator(const abs_range_t& range, rc_direction_t dir) :
+ mp_impl(std::make_unique<impl>(range, dir)) {}
+
+abs_address_iterator::~abs_address_iterator() {}
+
+abs_address_iterator::const_iterator abs_address_iterator::begin() const
+{
+ return cbegin();
+}
+
+abs_address_iterator::const_iterator abs_address_iterator::end() const
+{
+ return cend();
+}
+
+abs_address_iterator::const_iterator abs_address_iterator::cbegin() const
+{
+ return const_iterator(mp_impl->m_range, mp_impl->m_dir, false);
+}
+
+abs_address_iterator::const_iterator abs_address_iterator::cend() const
+{
+ return const_iterator(mp_impl->m_range, mp_impl->m_dir, true);
+}
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/src/libixion/calc_status.cpp b/src/libixion/calc_status.cpp
new file mode 100644
index 0000000..300b6e1
--- /dev/null
+++ b/src/libixion/calc_status.cpp
@@ -0,0 +1,29 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include "calc_status.hpp"
+
+namespace ixion {
+
+calc_status::calc_status() : result(nullptr), circular_safe(false), refcount(0) {}
+calc_status::calc_status(const rc_size_t& _group_size) :
+ result(nullptr), group_size(_group_size), circular_safe(false), refcount(0) {}
+
+void calc_status::add_ref()
+{
+ ++refcount;
+}
+
+void calc_status::release_ref()
+{
+ if (--refcount == 0)
+ delete this;
+}
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/src/libixion/calc_status.hpp b/src/libixion/calc_status.hpp
new file mode 100644
index 0000000..fc25121
--- /dev/null
+++ b/src/libixion/calc_status.hpp
@@ -0,0 +1,57 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef INCLUDED_IXION_CALC_STATUS_HPP
+#define INCLUDED_IXION_CALC_STATUS_HPP
+
+#include "ixion/formula_result.hpp"
+
+#include <mutex>
+#include <condition_variable>
+
+#include <boost/intrusive_ptr.hpp>
+
+namespace ixion {
+
+struct calc_status
+{
+ calc_status(const calc_status&) = delete;
+ calc_status& operator=(const calc_status&) = delete;
+
+ std::mutex mtx;
+ std::condition_variable cond;
+ std::unique_ptr<formula_result> result;
+
+ const rc_size_t group_size;
+ bool circular_safe;
+
+ size_t refcount;
+
+ calc_status();
+ calc_status(const rc_size_t& _group_size);
+
+ void add_ref();
+ void release_ref();
+};
+
+inline void intrusive_ptr_add_ref(calc_status* p)
+{
+ p->add_ref();
+}
+
+inline void intrusive_ptr_release(calc_status* p)
+{
+ p->release_ref();
+}
+
+using calc_status_ptr_t = boost::intrusive_ptr<calc_status>;
+
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/src/libixion/cell.cpp b/src/libixion/cell.cpp
new file mode 100644
index 0000000..22e8dc3
--- /dev/null
+++ b/src/libixion/cell.cpp
@@ -0,0 +1,578 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include <ixion/cell.hpp>
+#include <ixion/address.hpp>
+#include <ixion/exceptions.hpp>
+#include <ixion/formula_result.hpp>
+#include <ixion/formula_tokens.hpp>
+#include <ixion/interface/session_handler.hpp>
+#include <ixion/global.hpp>
+#include <ixion/matrix.hpp>
+#include <ixion/formula_name_resolver.hpp>
+#include <ixion/formula.hpp>
+#include <ixion/model_context.hpp>
+
+#include "formula_interpreter.hpp"
+#include "debug.hpp"
+
+#include <cassert>
+#include <string>
+#include <sstream>
+#include <iostream>
+#include <algorithm>
+#include <functional>
+
+#include "calc_status.hpp"
+
+#define FORMULA_CIRCULAR_SAFE 0x01
+#define FORMULA_SHARED_TOKENS 0x02
+
+using namespace std;
+
+namespace ixion {
+
+namespace {
+
+#if IXION_LOGGING
+
+[[maybe_unused]] std::string gen_trace_output(const formula_cell& fc, const model_context& cxt, const abs_address_t& pos)
+{
+ auto resolver = formula_name_resolver::get(formula_name_resolver_t::excel_a1, &cxt);
+ std::ostringstream os;
+ os << "pos=" << pos.get_name() << "; formula='" << print_formula_tokens(cxt, pos, *resolver, fc.get_tokens()->get()) << "'";
+ return os.str();
+}
+
+#endif
+
+}
+
+struct formula_cell::impl
+{
+ mutable calc_status_ptr_t m_calc_status;
+ formula_tokens_store_ptr_t m_tokens;
+ rc_address_t m_group_pos;
+
+ impl() : impl(-1, -1, new calc_status, formula_tokens_store_ptr_t()) {}
+
+ impl(const formula_tokens_store_ptr_t& tokens) : impl(-1, -1, new calc_status, tokens) {}
+
+ impl(row_t row, col_t col, const calc_status_ptr_t& cs,
+ const formula_tokens_store_ptr_t& tokens) :
+ m_calc_status(cs),
+ m_tokens(tokens),
+ m_group_pos(row, col, false, false) {}
+
+ /**
+ * Block until the result becomes available.
+ *
+ * @param lock mutex lock associated with the result cache data.
+ */
+ void wait_for_interpreted_result(std::unique_lock<std::mutex>& lock) const
+ {
+ IXION_TRACE("Wait for the interpreted result");
+
+ while (!m_calc_status->result)
+ {
+ IXION_TRACE("Waiting...");
+ m_calc_status->cond.wait(lock);
+ }
+ }
+
+ void reset_flag()
+ {
+ m_calc_status->circular_safe = false;
+ }
+
+ /**
+ * Check if this cell contains a circular reference.
+ *
+ * @return true if this cell contains no circular reference, hence
+ * considered "safe", false otherwise.
+ */
+ bool is_circular_safe() const
+ {
+ return m_calc_status->circular_safe;
+ }
+
+ bool check_ref_for_circular_safety(const formula_cell& ref, const abs_address_t& pos)
+ {
+ if (!ref.mp_impl->is_circular_safe())
+ {
+ // Circular dependency detected !!
+ IXION_DEBUG("Circular dependency detected !!");
+ assert(!m_calc_status->result);
+ m_calc_status->result =
+ std::make_unique<formula_result>(formula_error_t::ref_result_not_available);
+
+ return false;
+ }
+ return true;
+ }
+
+ void check_calc_status_or_throw() const
+ {
+ if (!m_calc_status->result)
+ {
+ // Result not cached yet. Reference error.
+ IXION_DEBUG("Result not cached yet. This is a reference error.");
+ throw formula_error(formula_error_t::ref_result_not_available);
+ }
+
+ if (m_calc_status->result->get_type() == formula_result::result_type::error)
+ {
+ // Error condition.
+ IXION_DEBUG("Error in result.");
+ throw formula_error(m_calc_status->result->get_error());
+ }
+ }
+
+ double fetch_value_from_result() const
+ {
+ check_calc_status_or_throw();
+
+ switch (m_calc_status->result->get_type())
+ {
+ case formula_result::result_type::boolean:
+ return m_calc_status->result->get_boolean() ? 1.0 : 0.0;
+ case formula_result::result_type::value:
+ return m_calc_status->result->get_value();
+ case formula_result::result_type::matrix:
+ {
+ IXION_TRACE("Fetching a matrix result.");
+ const matrix& m = m_calc_status->result->get_matrix();
+ row_t row_size = m.row_size();
+ col_t col_size = m.col_size();
+
+ if (m_group_pos.row >= row_size || m_group_pos.column >= col_size)
+ throw formula_error(formula_error_t::invalid_value_type);
+
+ matrix::element elem = m.get(m_group_pos.row, m_group_pos.column);
+
+ switch (elem.type)
+ {
+ case matrix::element_type::numeric:
+ return std::get<double>(elem.value);
+ case matrix::element_type::empty:
+ return 0.0;
+ case matrix::element_type::boolean:
+ return std::get<bool>(elem.value) ? 1.0 : 0.0;
+ case matrix::element_type::string:
+ case matrix::element_type::error:
+ default:
+ throw formula_error(formula_error_t::invalid_value_type);
+ }
+ }
+ default:
+ {
+ std::ostringstream os;
+ os << "numeric result was requested, but the actual result is of "
+ << m_calc_status->result->get_type() << " type.";
+ throw formula_error(
+ formula_error_t::invalid_value_type,
+ os.str()
+ );
+ }
+ }
+ }
+
+ std::string_view fetch_string_from_result() const
+ {
+ check_calc_status_or_throw();
+
+ switch (m_calc_status->result->get_type())
+ {
+ case formula_result::result_type::string:
+ return m_calc_status->result->get_string();
+ case formula_result::result_type::matrix:
+ {
+ const matrix& m = m_calc_status->result->get_matrix();
+ row_t row_size = m.row_size();
+ col_t col_size = m.col_size();
+
+ if (m_group_pos.row >= row_size || m_group_pos.column >= col_size)
+ throw formula_error(formula_error_t::invalid_value_type);
+
+ matrix::element elem = m.get(m_group_pos.row, m_group_pos.column);
+
+ switch (elem.type)
+ {
+ case matrix::element_type::string:
+ return std::get<std::string_view>(elem.value);
+ case matrix::element_type::numeric:
+ case matrix::element_type::empty:
+ case matrix::element_type::boolean:
+ case matrix::element_type::error:
+ default:
+ throw formula_error(formula_error_t::invalid_value_type);
+ }
+ }
+ default:
+ {
+ std::ostringstream os;
+ os << "string result was requested, but the actual result is of "
+ << m_calc_status->result->get_type() << " type.";
+ throw formula_error(
+ formula_error_t::invalid_value_type,
+ os.str()
+ );
+ }
+ }
+
+ return std::string_view{};
+ }
+
+ bool is_grouped() const
+ {
+ return m_group_pos.column >= 0 && m_group_pos.row >= 0;
+ }
+
+ bool is_group_parent() const
+ {
+ return m_group_pos.column == 0 && m_group_pos.row == 0;
+ }
+
+ bool calc_allowed() const
+ {
+ if (!is_grouped())
+ return true;
+
+ return is_group_parent();
+ }
+
+ formula_result get_single_formula_result(const formula_result& src) const
+ {
+ if (!is_grouped())
+ return src; // returns a copy.
+
+ if (src.get_type() != formula_result::result_type::matrix)
+ // A grouped cell should have a matrix result whose size equals the
+ // size of the group. But in case of anything else, just return the
+ // stored value.
+ return src;
+
+ const matrix& m = src.get_matrix();
+ row_t row_size = m.row_size();
+ col_t col_size = m.col_size();
+
+ if (m_group_pos.row >= row_size || m_group_pos.column >= col_size)
+ return formula_result(formula_error_t::invalid_value_type);
+
+ matrix::element elem = m.get(m_group_pos.row, m_group_pos.column);
+
+ switch (elem.type)
+ {
+ case matrix::element_type::numeric:
+ return formula_result(std::get<double>(elem.value));
+ case matrix::element_type::string:
+ {
+ std::string s{std::get<std::string_view>(elem.value)};
+ return formula_result(std::move(s));
+ }
+ case matrix::element_type::error:
+ return formula_result(std::get<formula_error_t>(elem.value));
+ case matrix::element_type::empty:
+ return formula_result();
+ case matrix::element_type::boolean:
+ return formula_result(std::get<bool>(elem.value) ? 1.0 : 0.0);
+ default:
+ throw std::logic_error("unhandled element type of a matrix result value.");
+ }
+ }
+
+ void set_single_formula_result(formula_result result)
+ {
+ if (is_grouped())
+ {
+ std::unique_lock<std::mutex> lock(m_calc_status->mtx);
+
+ if (!m_calc_status->result)
+ {
+ m_calc_status->result =
+ std::make_unique<formula_result>(
+ matrix(m_calc_status->group_size.row, m_calc_status->group_size.column));
+ }
+
+ matrix& m = m_calc_status->result->get_matrix();
+ assert(m_group_pos.row < row_t(m.row_size()));
+ assert(m_group_pos.column < col_t(m.col_size()));
+
+ switch (result.get_type())
+ {
+ case formula_result::result_type::boolean:
+ m.set(m_group_pos.row, m_group_pos.column, result.get_boolean());
+ break;
+ case formula_result::result_type::value:
+ m.set(m_group_pos.row, m_group_pos.column, result.get_value());
+ break;
+ case formula_result::result_type::string:
+ m.set(m_group_pos.row, m_group_pos.column, result.get_string());
+ break;
+ case formula_result::result_type::error:
+ m.set(m_group_pos.row, m_group_pos.column, result.get_error());
+ break;
+ case formula_result::result_type::matrix:
+ throw std::logic_error("setting a cached result of matrix value directly is not yet supported.");
+ }
+
+ return;
+ }
+
+ std::unique_lock<std::mutex> lock(m_calc_status->mtx);
+ m_calc_status->result = std::make_unique<formula_result>(std::move(result));
+ }
+};
+
+formula_cell::formula_cell() : mp_impl(std::make_unique<impl>()) {}
+
+formula_cell::formula_cell(const formula_tokens_store_ptr_t& tokens) :
+ mp_impl(std::make_unique<impl>(tokens)) {}
+
+formula_cell::formula_cell(
+ row_t group_row, col_t group_col,
+ const calc_status_ptr_t& cs,
+ const formula_tokens_store_ptr_t& tokens) :
+ mp_impl(std::make_unique<impl>(group_row, group_col, cs, tokens)) {}
+
+formula_cell::~formula_cell()
+{
+}
+
+const formula_tokens_store_ptr_t& formula_cell::get_tokens() const
+{
+ return mp_impl->m_tokens;
+}
+
+void formula_cell::set_tokens(const formula_tokens_store_ptr_t& tokens)
+{
+ mp_impl->m_tokens = tokens;
+}
+
+double formula_cell::get_value(formula_result_wait_policy_t policy) const
+{
+ std::unique_lock<std::mutex> lock(mp_impl->m_calc_status->mtx);
+ if (policy == formula_result_wait_policy_t::block_until_done)
+ mp_impl->wait_for_interpreted_result(lock);
+ return mp_impl->fetch_value_from_result();
+}
+
+std::string_view formula_cell::get_string(formula_result_wait_policy_t policy) const
+{
+ std::unique_lock<std::mutex> lock(mp_impl->m_calc_status->mtx);
+ if (policy == formula_result_wait_policy_t::block_until_done)
+ mp_impl->wait_for_interpreted_result(lock);
+ return mp_impl->fetch_string_from_result();
+}
+
+void formula_cell::interpret(model_context& context, const abs_address_t& pos)
+{
+ IXION_TRACE(gen_trace_output(*this, context, pos));
+
+ if (!mp_impl->calc_allowed())
+ throw std::logic_error("Calculation on this formula cell is not allowed.");
+
+ calc_status& status = *mp_impl->m_calc_status;
+
+ {
+ std::lock_guard<std::mutex> lock(status.mtx);
+
+ if (mp_impl->m_calc_status->result)
+ {
+ // When the result is already cached before the cell is interpreted,
+ // it can mean the cell has circular dependency.
+ if (status.result->get_type() == formula_result::result_type::error)
+ {
+ auto handler = context.create_session_handler();
+ if (handler)
+ {
+ handler->begin_cell_interpret(pos);
+ std::string_view msg = get_formula_error_name(status.result->get_error());
+ handler->set_formula_error(msg);
+ handler->end_cell_interpret();
+ }
+ }
+ return;
+ }
+
+ formula_interpreter fin(this, context);
+ fin.set_origin(pos);
+ status.result = std::make_unique<formula_result>();
+ if (fin.interpret())
+ {
+ // Successful interpretation.
+ *status.result = fin.transfer_result();
+ }
+ else
+ {
+ // Interpretation ended with an error condition.
+ status.result->set_error(fin.get_error());
+ }
+ }
+
+ status.cond.notify_all();
+}
+
+void formula_cell::check_circular(const model_context& cxt, const abs_address_t& pos)
+{
+ // TODO: Check to make sure this is being run on the main thread only.
+ for (const formula_token& t : mp_impl->m_tokens->get())
+ {
+ switch (t.opcode)
+ {
+ case fop_single_ref:
+ {
+ abs_address_t addr = std::get<address_t>(t.value).to_abs(pos);
+ const formula_cell* ref = cxt.get_formula_cell(addr);
+
+ if (!ref)
+ continue;
+
+ if (!mp_impl->check_ref_for_circular_safety(*ref, addr))
+ return;
+
+ break;
+ }
+ case fop_range_ref:
+ {
+ abs_range_t range = std::get<range_t>(t.value).to_abs(pos);
+ for (sheet_t sheet = range.first.sheet; sheet <= range.last.sheet; ++sheet)
+ {
+ rc_size_t sheet_size = cxt.get_sheet_size();
+ col_t col_first = range.first.column, col_last = range.last.column;
+ if (range.all_columns())
+ {
+ col_first = 0;
+ col_last = sheet_size.column - 1;
+ }
+
+ for (col_t col = col_first; col <= col_last; ++col)
+ {
+ row_t row_first = range.first.row, row_last = range.last.row;
+ if (range.all_rows())
+ {
+ assert(row_last == row_unset);
+ row_first = 0;
+ row_last = sheet_size.row - 1;
+ }
+
+ for (row_t row = row_first; row <= row_last; ++row)
+ {
+ abs_address_t addr(sheet, row, col);
+ if (cxt.get_celltype(addr) != celltype_t::formula)
+ continue;
+
+ if (!mp_impl->check_ref_for_circular_safety(*cxt.get_formula_cell(addr), addr))
+ return;
+ }
+ }
+ }
+
+ break;
+ }
+ default:
+ ;
+ }
+
+ }
+
+ // No circular dependencies. Good.
+ mp_impl->m_calc_status->circular_safe = true;
+}
+
+void formula_cell::reset()
+{
+ std::lock_guard<std::mutex> lock(mp_impl->m_calc_status->mtx);
+ mp_impl->m_calc_status->result.reset();
+ mp_impl->reset_flag();
+}
+
+std::vector<const formula_token*> formula_cell::get_ref_tokens(
+ const model_context& cxt, const abs_address_t& pos) const
+{
+ std::vector<const formula_token*> ret;
+
+ std::function<void(const formula_tokens_t::value_type&)> get_refs = [&](const formula_tokens_t::value_type& t)
+ {
+ switch (t.opcode)
+ {
+ case fop_single_ref:
+ case fop_range_ref:
+ ret.push_back(&t);
+ break;
+ case fop_named_expression:
+ {
+ const named_expression_t* named_exp =
+ cxt.get_named_expression(pos.sheet, std::get<std::string>(t.value));
+
+ if (!named_exp)
+ // silently ignore non-existing names.
+ break;
+
+ // recursive call.
+ std::for_each(named_exp->tokens.begin(), named_exp->tokens.end(), get_refs);
+ break;
+ }
+ default:
+ ; // ignore the rest.
+ }
+ };
+
+ const formula_tokens_t& this_tokens = mp_impl->m_tokens->get();
+
+ std::for_each(this_tokens.begin(), this_tokens.end(), get_refs);
+
+ return ret;
+}
+
+const formula_result& formula_cell::get_raw_result_cache(formula_result_wait_policy_t policy) const
+{
+ std::unique_lock<std::mutex> lock(mp_impl->m_calc_status->mtx);
+
+ if (policy == formula_result_wait_policy_t::block_until_done)
+ mp_impl->wait_for_interpreted_result(lock);
+
+ if (!mp_impl->m_calc_status->result)
+ {
+ IXION_DEBUG("Result not yet available.");
+ throw formula_error(formula_error_t::ref_result_not_available);
+ }
+
+ return *mp_impl->m_calc_status->result;
+}
+
+formula_result formula_cell::get_result_cache(formula_result_wait_policy_t policy) const
+{
+ const formula_result& src = get_raw_result_cache(policy);
+ return mp_impl->get_single_formula_result(src);
+}
+
+void formula_cell::set_result_cache(formula_result result)
+{
+ mp_impl->set_single_formula_result(result);
+}
+
+formula_group_t formula_cell::get_group_properties() const
+{
+ uintptr_t identity = reinterpret_cast<uintptr_t>(mp_impl->m_calc_status.get());
+ return formula_group_t(mp_impl->m_calc_status->group_size, identity, mp_impl->is_grouped());
+}
+
+abs_address_t formula_cell::get_parent_position(const abs_address_t& pos) const
+{
+ if (!mp_impl->is_grouped())
+ return pos;
+
+ abs_address_t parent_pos = pos;
+ parent_pos.column -= mp_impl->m_group_pos.column;
+ parent_pos.row -= mp_impl->m_group_pos.row;
+ return parent_pos;
+}
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/src/libixion/cell_access.cpp b/src/libixion/cell_access.cpp
new file mode 100644
index 0000000..f3c038e
--- /dev/null
+++ b/src/libixion/cell_access.cpp
@@ -0,0 +1,176 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include <ixion/cell_access.hpp>
+#include <ixion/global.hpp>
+#include <ixion/model_context.hpp>
+#include <ixion/formula_result.hpp>
+#include <ixion/exceptions.hpp>
+
+#include "model_context_impl.hpp"
+#include "workbook.hpp"
+#include "utils.hpp"
+#include "model_types.hpp"
+
+namespace ixion {
+
+struct cell_access::impl
+{
+ const model_context& cxt;
+ column_store_t::const_position_type pos;
+ impl(const model_context& _cxt) : cxt(_cxt) {}
+};
+
+cell_access::cell_access(const model_context& cxt, const abs_address_t& addr) :
+ mp_impl(std::make_unique<impl>(cxt))
+{
+ mp_impl->pos = cxt.mp_impl->get_cell_position(addr);
+}
+
+cell_access::cell_access(cell_access&& other) :
+ mp_impl(std::move(other.mp_impl))
+{
+ other.mp_impl = std::make_unique<impl>(mp_impl->cxt);
+}
+
+cell_access& cell_access::operator= (cell_access&& other)
+{
+ mp_impl = std::move(other.mp_impl);
+ other.mp_impl = std::make_unique<impl>(mp_impl->cxt);
+ return *this;
+}
+
+cell_access::~cell_access() {}
+
+celltype_t cell_access::get_type() const
+{
+ return detail::to_celltype(mp_impl->pos.first->type);
+}
+
+cell_value_t cell_access::get_value_type() const
+{
+ return detail::to_cell_value_type(
+ mp_impl->pos, mp_impl->cxt.get_formula_result_wait_policy());
+}
+
+const formula_cell* cell_access::get_formula_cell() const
+{
+ if (mp_impl->pos.first->type != element_type_formula)
+ return nullptr;
+
+ return formula_element_block::at(*mp_impl->pos.first->data, mp_impl->pos.second);
+}
+
+formula_result cell_access::get_formula_result() const
+{
+ const formula_cell* fc = get_formula_cell();
+ if (!fc)
+ throw general_error("cell is not a formula cell.");
+
+ return fc->get_result_cache(mp_impl->cxt.get_formula_result_wait_policy());
+}
+
+double cell_access::get_numeric_value() const
+{
+ switch (mp_impl->pos.first->type)
+ {
+ case element_type_numeric:
+ return numeric_element_block::at(*mp_impl->pos.first->data, mp_impl->pos.second);
+ case element_type_boolean:
+ {
+ auto it = boolean_element_block::cbegin(*mp_impl->pos.first->data);
+ std::advance(it, mp_impl->pos.second);
+ return *it ? 1.0 : 0.0;
+ }
+ case element_type_formula:
+ {
+ const formula_cell* p = formula_element_block::at(*mp_impl->pos.first->data, mp_impl->pos.second);
+ return p->get_value(mp_impl->cxt.get_formula_result_wait_policy());
+ }
+ default:
+ ;
+ }
+ return 0.0;
+}
+
+bool cell_access::get_boolean_value() const
+{
+ switch (mp_impl->pos.first->type)
+ {
+ case element_type_numeric:
+ return numeric_element_block::at(*mp_impl->pos.first->data, mp_impl->pos.second) != 0.0 ? true : false;
+ case element_type_boolean:
+ {
+ auto it = boolean_element_block::cbegin(*mp_impl->pos.first->data);
+ std::advance(it, mp_impl->pos.second);
+ return *it;
+ }
+ case element_type_formula:
+ {
+ const formula_cell* p = formula_element_block::at(*mp_impl->pos.first->data, mp_impl->pos.second);
+ return p->get_value(mp_impl->cxt.get_formula_result_wait_policy()) == 0.0 ? false : true;
+ }
+ default:
+ ;
+ }
+ return false;
+}
+
+std::string_view cell_access::get_string_value() const
+{
+ switch (mp_impl->pos.first->type)
+ {
+ case element_type_string:
+ {
+ string_id_t sid = string_element_block::at(*mp_impl->pos.first->data, mp_impl->pos.second);
+ const std::string* p = mp_impl->cxt.get_string(sid);
+ return p ? *p : std::string_view{};
+ }
+ case element_type_formula:
+ {
+ const formula_cell* p = formula_element_block::at(*mp_impl->pos.first->data, mp_impl->pos.second);
+ return p->get_string(mp_impl->cxt.get_formula_result_wait_policy());
+ }
+ case element_type_empty:
+ return detail::empty_string;
+ default:
+ ;
+ }
+
+ return std::string_view{};
+}
+
+string_id_t cell_access::get_string_identifier() const
+{
+ switch (mp_impl->pos.first->type)
+ {
+ case element_type_string:
+ return string_element_block::at(*mp_impl->pos.first->data, mp_impl->pos.second);
+ default:
+ ;
+ }
+ return empty_string_id;
+}
+
+formula_error_t cell_access::get_error_value() const
+{
+ if (mp_impl->pos.first->type != element_type_formula)
+ // this is not a formula cell.
+ return formula_error_t::no_error;
+
+ const formula_cell* fc = formula_element_block::at(*mp_impl->pos.first->data, mp_impl->pos.second);
+ formula_result res = fc->get_result_cache(mp_impl->cxt.get_formula_result_wait_policy());
+ if (res.get_type() != formula_result::result_type::error)
+ // this formula cell doesn't have an error result.
+ return formula_error_t::no_error;
+
+ return res.get_error();
+}
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/src/libixion/cell_queue_manager.cpp b/src/libixion/cell_queue_manager.cpp
new file mode 100644
index 0000000..729c630
--- /dev/null
+++ b/src/libixion/cell_queue_manager.cpp
@@ -0,0 +1,149 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include "cell_queue_manager.hpp"
+#include "queue_entry.hpp"
+#include <ixion/cell.hpp>
+#include <ixion/model_context.hpp>
+
+#include <cassert>
+#include <queue>
+#include <future>
+#include <algorithm>
+
+#if !IXION_THREADS
+#error "This file is not to be compiled when the threads are disabled."
+#endif
+
+namespace ixion {
+
+namespace {
+
+class scoped_guard
+{
+ std::thread m_thread;
+public:
+ scoped_guard(std::thread thread) : m_thread(std::move(thread)) {}
+ scoped_guard(scoped_guard&& other) : m_thread(std::move(other.m_thread)) {}
+
+ scoped_guard(const scoped_guard&) = delete;
+ scoped_guard& operator= (const scoped_guard&) = delete;
+
+ ~scoped_guard()
+ {
+ m_thread.join();
+ }
+};
+
+class interpreter_queue
+{
+ using future_type = std::future<void>;
+
+ model_context& m_context;
+
+ std::queue<future_type> m_futures;
+ std::mutex m_mtx;
+ std::condition_variable m_cond;
+
+ size_t m_max_queue;
+
+ void interpret(formula_cell* p, const abs_address_t& pos)
+ {
+ p->interpret(m_context, pos);
+ }
+
+public:
+ interpreter_queue(model_context& cxt, size_t max_queue) :
+ m_context(cxt), m_max_queue(max_queue) {}
+
+ /**
+ * Push one formula cell to the interpreter queue for future
+ * intepretation.
+ *
+ * @param p pointer to formula cell instance.
+ * @param pos position of the formual cell.
+ */
+ void push(formula_cell* p, const abs_address_t& pos)
+ {
+ std::unique_lock<std::mutex> lock(m_mtx);
+
+ while (m_futures.size() >= m_max_queue)
+ m_cond.wait(lock);
+
+ future_type f = std::async(
+ std::launch::async, &interpreter_queue::interpret, this, p, pos);
+ m_futures.push(std::move(f));
+ lock.unlock();
+
+ m_cond.notify_one();
+ }
+
+ /**
+ * Wait for one formula cell to finish its interpretation.
+ */
+ void wait_one()
+ {
+ std::unique_lock<std::mutex> lock(m_mtx);
+
+ while (m_futures.empty())
+ m_cond.wait(lock);
+
+ future_type ret = std::move(m_futures.front());
+ m_futures.pop();
+ lock.unlock();
+
+ ret.get(); // This may throw if an exception was thrown on the thread.
+
+ m_cond.notify_one();
+ }
+};
+
+}
+
+struct formula_cell_queue::impl
+{
+ model_context& m_context;
+ std::vector<queue_entry> m_cells;
+ size_t m_thread_count;
+
+ impl(model_context& cxt, std::vector<queue_entry>&& cells, size_t thread_count) :
+ m_context(cxt),
+ m_cells(cells),
+ m_thread_count(thread_count) {}
+
+ void thread_launch(interpreter_queue* queue)
+ {
+ for (queue_entry& e : m_cells)
+ queue->push(e.p, e.pos);
+ }
+
+ void run()
+ {
+ interpreter_queue queue(m_context, m_thread_count);
+
+ std::thread t(&formula_cell_queue::impl::thread_launch, this, &queue);
+ scoped_guard guard(std::move(t));
+
+ for (size_t i = 0, n = m_cells.size(); i < n; ++i)
+ queue.wait_one();
+ }
+};
+
+formula_cell_queue::formula_cell_queue(
+ model_context& cxt, std::vector<queue_entry>&& cells, size_t thread_count) :
+ mp_impl(std::make_unique<impl>(cxt, std::move(cells), thread_count)) {}
+
+formula_cell_queue::~formula_cell_queue() {}
+
+void formula_cell_queue::run()
+{
+ mp_impl->run();
+}
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/src/libixion/cell_queue_manager.hpp b/src/libixion/cell_queue_manager.hpp
new file mode 100644
index 0000000..b458fa1
--- /dev/null
+++ b/src/libixion/cell_queue_manager.hpp
@@ -0,0 +1,47 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef INCLUDED_IXION_CELL_QUEUE_MANAGER_HPP
+#define INCLUDED_IXION_CELL_QUEUE_MANAGER_HPP
+
+#include <ixion/global.hpp>
+
+#include <memory>
+#include <vector>
+
+namespace ixion {
+
+class formula_cell;
+class model_context;
+struct queue_entry;
+
+/**
+ * Class that manages multi-threaded calculation of formula cells.
+ */
+class formula_cell_queue
+{
+ struct impl;
+ std::unique_ptr<impl> mp_impl;
+
+public:
+ formula_cell_queue() = delete;
+
+ formula_cell_queue(
+ model_context& cxt,
+ std::vector<queue_entry>&& cells,
+ size_t thread_count);
+
+ ~formula_cell_queue();
+
+ void run();
+};
+
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/src/libixion/column_store_type.hpp b/src/libixion/column_store_type.hpp
new file mode 100644
index 0000000..76110c1
--- /dev/null
+++ b/src/libixion/column_store_type.hpp
@@ -0,0 +1,73 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef IXION_COLUMN_STORE_TYPE_HPP
+#define IXION_COLUMN_STORE_TYPE_HPP
+
+#include "ixion/types.hpp"
+#include "ixion/cell.hpp"
+
+#include <mdds/multi_type_vector/types.hpp>
+#include <mdds/multi_type_vector/macro.hpp>
+#include <mdds/multi_type_vector/block_funcs.hpp>
+#include <mdds/multi_type_vector.hpp>
+#include <mdds/multi_type_matrix.hpp>
+
+#include <deque>
+
+namespace ixion {
+
+// Element types
+
+constexpr mdds::mtv::element_t element_type_empty = mdds::mtv::element_type_empty;
+constexpr mdds::mtv::element_t element_type_boolean = mdds::mtv::element_type_boolean;
+constexpr mdds::mtv::element_t element_type_numeric = mdds::mtv::element_type_double;
+constexpr mdds::mtv::element_t element_type_string = mdds::mtv::element_type_uint32;
+constexpr mdds::mtv::element_t element_type_formula = mdds::mtv::element_type_user_start;
+
+// Element block types
+
+using boolean_element_block = mdds::mtv::boolean_element_block;
+using numeric_element_block = mdds::mtv::double_element_block;
+using string_element_block = mdds::mtv::uint32_element_block;
+
+using formula_element_block =
+ mdds::mtv::noncopyable_managed_element_block<element_type_formula, ixion::formula_cell>;
+
+MDDS_MTV_DEFINE_ELEMENT_CALLBACKS_PTR(formula_cell, element_type_formula, nullptr, formula_element_block)
+
+struct column_store_traits : mdds::mtv::default_traits
+{
+ using block_funcs = mdds::mtv::element_block_funcs<
+ boolean_element_block,
+ numeric_element_block,
+ string_element_block,
+ formula_element_block>;
+};
+
+/** Type that represents a whole column. */
+using column_store_t = mdds::multi_type_vector<column_store_traits>;
+
+/** Type that represents a collection of columns. */
+using column_stores_t = std::deque<column_store_t>;
+
+/**
+ * The integer element blocks are used to store string ID's. The actual
+ * string element blocks are not used in the matrix store in ixion.
+ */
+struct matrix_store_traits
+{
+ typedef mdds::mtv::int64_element_block integer_element_block;
+ typedef mdds::mtv::string_element_block string_element_block;
+};
+
+using matrix_store_t = mdds::multi_type_matrix<matrix_store_traits>;
+
+}
+
+#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/src/libixion/compute_engine.cpp b/src/libixion/compute_engine.cpp
new file mode 100644
index 0000000..c6ac077
--- /dev/null
+++ b/src/libixion/compute_engine.cpp
@@ -0,0 +1,132 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include "ixion/compute_engine.hpp"
+#include "ixion/global.hpp"
+
+#include <iostream>
+#include <unordered_map>
+
+namespace ixion { namespace draft {
+
+namespace {
+
+struct class_factory
+{
+ void* handler;
+ create_compute_engine_t create;
+ destroy_compute_engine_t destroy;
+};
+
+class class_factory_store
+{
+ using store_type = std::unordered_map<std::string, class_factory>;
+ store_type m_store;
+
+public:
+
+ const class_factory* get(std::string_view name) const
+ {
+ auto it = m_store.find(std::string(name));
+ if (it == m_store.end())
+ return nullptr;
+
+ return &it->second;
+ }
+
+ void insert(void* hdl, std::string_view name, create_compute_engine_t func_create, destroy_compute_engine_t func_destroy)
+ {
+ class_factory cf;
+ cf.handler = hdl;
+ cf.create = func_create;
+ cf.destroy = func_destroy;
+ m_store.emplace(name, cf);
+ }
+
+ ~class_factory_store()
+ {
+ for (auto& kv : m_store)
+ {
+ class_factory& cf = kv.second;
+ unload_module(cf.handler);
+ }
+ }
+};
+
+class_factory_store store;
+
+}
+
+struct compute_engine::impl
+{
+ impl() {}
+};
+
+std::shared_ptr<compute_engine> compute_engine::create(std::string_view name)
+{
+ if (name.empty())
+ // Name is not specified. Use the default engine.
+ return std::make_shared<compute_engine>();
+
+ const class_factory* cf = store.get(name);
+ if (!cf)
+ // No class factory for this name. Fall back to default.
+ return std::make_shared<compute_engine>();
+
+ return std::shared_ptr<compute_engine>(cf->create(), cf->destroy);
+}
+
+void compute_engine::add_class(
+ void* hdl, std::string_view name, create_compute_engine_t func_create, destroy_compute_engine_t func_destroy)
+{
+ store.insert(hdl, name, func_create, func_destroy);
+}
+
+compute_engine::compute_engine() :
+ mp_impl(std::make_unique<impl>())
+{
+}
+
+compute_engine::~compute_engine()
+{
+}
+
+std::string_view compute_engine::get_name() const
+{
+ return "default";
+}
+
+void compute_engine::compute_fibonacci(array& io)
+{
+ if (io.type != array_type::uint32)
+ return;
+
+ auto fibonacci = [](uint32_t n) -> uint32_t
+ {
+ if (n <= 1)
+ return n;
+
+ uint32_t curr = 1;
+ uint32_t prev = 1;
+
+ for (uint32_t i = 2; i < n; ++i)
+ {
+ uint32_t temp = curr;
+ curr += prev;
+ prev = temp;
+ }
+
+ return curr;
+ };
+
+ for (uint32_t i = 0; i < io.size; ++i)
+ io.uint32[i] = fibonacci(io.uint32[i]);
+}
+
+}}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/src/libixion/compute_engine_test.cpp b/src/libixion/compute_engine_test.cpp
new file mode 100644
index 0000000..58a45a3
--- /dev/null
+++ b/src/libixion/compute_engine_test.cpp
@@ -0,0 +1,125 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include "test_global.hpp" // This must be the first header to be included.
+
+#include <ixion/compute_engine.hpp>
+#include <ixion/module.hpp>
+#include <algorithm>
+#include <chrono>
+#include <iostream>
+#include <iterator>
+#include <sstream>
+#include <string>
+#include <vector>
+#include <functional>
+
+using std::cout;
+using std::endl;
+
+namespace {
+
+using test_func_t = std::function<void()>;
+
+std::vector<std::pair<std::string, test_func_t>> tests;
+
+#define REGISTER_TEST(x) tests.emplace_back(#x, x);
+
+template<typename T>
+void print_values(std::string_view msg, const T& values)
+{
+ cout << msg << ": ";
+
+ if (values.size() <= 20)
+ std::copy(values.begin(), values.end(), std::ostream_iterator<typename T::value_type>(cout, " "));
+ else
+ {
+ // Print only the first 15 and last 5 values.
+ auto it = values.begin();
+ auto it_end = it + 15;
+
+ std::copy(it, it_end, std::ostream_iterator<typename T::value_type>(cout, " "));
+
+ cout << "... ";
+
+ it_end = values.end();
+ it = it_end - 5;
+
+ std::copy(it, it_end, std::ostream_iterator<typename T::value_type>(cout, " "));
+ }
+
+ cout << endl;
+}
+
+void print_summary(const std::shared_ptr<ixion::draft::compute_engine>& engine)
+{
+ cout << "--" << endl;
+ cout << "name: " << engine->get_name() << endl;
+
+ std::vector<uint32_t> values(16384u);
+
+ uint32_t n = 0;
+ std::generate(values.begin(), values.end(), [&n] { return n++; });
+
+ ixion::draft::array io{};
+ io.uint32 = values.data();
+ io.size = values.size();
+ io.type = ixion::draft::array_type::uint32;
+
+ print_values("fibonacci input", values);
+ {
+ std::ostringstream os;
+ os << "fibonacci (n=" << values.size() << ")";
+ ixion::test::stack_printer __stack_printer__(os.str());
+ engine->compute_fibonacci(io);
+ }
+ print_values("fibonacci output", values);
+}
+
+}
+
+void test_create_default()
+{
+ IXION_TEST_FUNC_SCOPE;
+
+ std::shared_ptr<ixion::draft::compute_engine> p = ixion::draft::compute_engine::create();
+ assert(p);
+ assert(p->get_name() == "default");
+ print_summary(p);
+}
+
+void test_create_vulkan()
+{
+ IXION_TEST_FUNC_SCOPE;
+
+ std::shared_ptr<ixion::draft::compute_engine> p = ixion::draft::compute_engine::create("vulkan");
+ assert(p);
+ assert(p->get_name() == "vulkan");
+ print_summary(p);
+}
+
+int main()
+{
+ ixion::draft::init_modules();
+
+ REGISTER_TEST(test_create_default);
+#ifdef BUILD_VULKAN
+ REGISTER_TEST(test_create_vulkan);
+#endif
+
+ for (auto test : tests)
+ {
+ cout << "--------------------------" << endl;
+ cout << " " << test.first << endl;
+ cout << "--------------------------" << endl;
+ test.second();
+ }
+
+ return EXIT_SUCCESS;
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/src/libixion/compute_engine_vulkan.cpp b/src/libixion/compute_engine_vulkan.cpp
new file mode 100644
index 0000000..25fad82
--- /dev/null
+++ b/src/libixion/compute_engine_vulkan.cpp
@@ -0,0 +1,234 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include "compute_engine_vulkan.hpp"
+#include "ixion/module.hpp"
+#include "ixion/env.hpp"
+#include "ixion/exceptions.hpp"
+
+#include "debug.hpp"
+
+#include <iostream>
+#include <vector>
+#include <cstring>
+
+namespace ixion { namespace draft {
+
+namespace {
+
+std::size_t get_byte_size(const array& io)
+{
+ switch (io.type)
+ {
+ case array_type::uint32:
+ return sizeof(uint32_t) * io.size;
+ case array_type::float32:
+ return sizeof(float) * io.size;
+ case array_type::float64:
+ return sizeof(double) * io.size;
+ case array_type::unknown:
+ IXION_DEBUG("array type is unknown.");
+ }
+
+ return 0;
+}
+
+}
+
+/**
+ * This function first writes the source data array to host buffer, then
+ * creates a device local buffer, and create and execute a command to copy
+ * the data in the host buffer to the device local buffer.
+ */
+void compute_engine_vulkan::copy_to_device_local_buffer(
+ array& io, vk_buffer& host_buffer, vk_buffer& device_buffer)
+{
+ vk_command_buffer cmd_copy = m_cmd_pool.create_command_buffer();
+ cmd_copy.begin();
+ cmd_copy.copy_buffer(host_buffer, device_buffer, sizeof(uint32_t)*io.size);
+ cmd_copy.end();
+
+ vk_fence fence(m_device, 0);
+ vk_queue q = m_device.get_queue();
+ q.submit(cmd_copy, fence);
+ fence.wait();
+}
+
+compute_engine_vulkan::compute_engine_vulkan() :
+ compute_engine(),
+ m_instance(),
+ m_device(m_instance),
+ m_cmd_pool(m_device)
+{
+}
+
+compute_engine_vulkan::~compute_engine_vulkan()
+{
+}
+
+std::string_view compute_engine_vulkan::get_name() const
+{
+ return "vulkan";
+}
+
+void compute_engine_vulkan::compute_fibonacci(array& io)
+{
+ runtime_context cxt;
+ cxt.input_buffer_size = io.size;
+
+ std::size_t data_byte_size = get_byte_size(io);
+
+ vk_buffer host_buffer(
+ m_device, data_byte_size,
+ VK_BUFFER_USAGE_TRANSFER_SRC_BIT | VK_BUFFER_USAGE_TRANSFER_DST_BIT,
+ VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT);
+
+ host_buffer.write_to_memory(io.data, data_byte_size);
+
+ vk_buffer device_buffer(
+ m_device, data_byte_size,
+ VK_BUFFER_USAGE_STORAGE_BUFFER_BIT | VK_BUFFER_USAGE_TRANSFER_SRC_BIT | VK_BUFFER_USAGE_TRANSFER_DST_BIT,
+ VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT);
+
+ copy_to_device_local_buffer(io, host_buffer, device_buffer);
+
+ // Create a descriptor pool, by specifying the number of descriptors for
+ // each type that can be allocated in a single set, as well as the max
+ // number of sets. Here, we are specifying that we will only allocate one
+ // set, and each set will contain only one storage buffer.
+ vk_descriptor_pool desc_pool(m_device, 1u,
+ {
+ { VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, 1u },
+ }
+ );
+
+ // Create a descriptor set layout. This specifies what descriptor type is
+ // bound to what binding location and how many units (in case the
+ // descriptor is an array), and which stages can access it. Here, we are
+ // binding one storage buffer to the binding location of 0, for the
+ // compute stage.
+ vk_descriptor_set_layout ds_layout(m_device,
+ {
+ // binding id, descriptor type, descriptor count, stage flags, sampler (optional)
+ { 0, VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, 1u, VK_SHADER_STAGE_COMPUTE_BIT, nullptr },
+ }
+ );
+
+ // Create a pipeline layout. A pipeline layout consists of one or more
+ // descriptor set layouts as well as one or more push constants. It
+ // describes the entire resources the pipeline will have access to. Here
+ // we only have one descriptor set layout and no push constants.
+ vk_pipeline_layout pl_layout(m_device, ds_layout);
+
+ // Allocate a descriptor set from the descriptor set layout. This will
+ // get bound to command buffer later as part of the recorded commands.
+ vk_descriptor_set desc_set = desc_pool.allocate(ds_layout);
+
+ // Update the descriptor set with the content of the device-local buffer.
+ // You always have to create a descriptor set first, then update it
+ // afterward. Here, we are binding the actual device buffer instance to
+ // the binding location of 0, just like we specified above.
+ desc_set.update(m_device, 0u, VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, device_buffer);
+
+ // Create pipeline cache. You need to create this so that you can
+ // optinally save the cached pipeline state to disk for re-use, which we
+ // don't do here.
+ vk_pipeline_cache pl_cache(m_device);
+
+ // Load shader module for fibonnaci.
+ vk_shader_module fibonnaci_module(m_device, vk_shader_module::module_type::fibonacci);
+
+ // Create a compute pipeline.
+ vk_pipeline pipeline(cxt, m_device, pl_layout, pl_cache, fibonnaci_module);
+
+ // allocate command buffer.
+ vk_command_buffer cmd = m_cmd_pool.create_command_buffer();
+
+ // Record command buffer.
+ cmd.begin();
+
+ // Ensure that the write to the device buffer gets finished before the
+ // compute shader stage.
+ cmd.buffer_memory_barrier(
+ device_buffer,
+ VK_ACCESS_HOST_WRITE_BIT,
+ VK_ACCESS_SHADER_READ_BIT,
+ VK_PIPELINE_STAGE_HOST_BIT,
+ VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT
+ );
+
+ // Bind the pipeline and descriptor set to the compute pipeline.
+ cmd.bind_pipeline(pipeline, VK_PIPELINE_BIND_POINT_COMPUTE);
+ cmd.bind_descriptor_set(VK_PIPELINE_BIND_POINT_COMPUTE, pl_layout, desc_set);
+
+ // Trigger compute work for data size of (n, 1, 1).
+ cmd.dispatch(cxt.input_buffer_size, 1, 1);
+
+ // Ensure that the compute stages finishes before buffer gets copied.
+ cmd.buffer_memory_barrier(
+ device_buffer,
+ VK_ACCESS_SHADER_WRITE_BIT,
+ VK_ACCESS_TRANSFER_READ_BIT,
+ VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT,
+ VK_PIPELINE_STAGE_TRANSFER_BIT
+ );
+
+ // Copy the data from the device local buffer to the host buffer.
+ cmd.copy_buffer(device_buffer, host_buffer, data_byte_size);
+
+ // Ensure that the buffer copying gets done before data is read on the
+ // host cpu side.
+ cmd.buffer_memory_barrier(
+ host_buffer,
+ VK_ACCESS_TRANSFER_WRITE_BIT,
+ VK_ACCESS_HOST_READ_BIT,
+ VK_PIPELINE_STAGE_TRANSFER_BIT,
+ VK_PIPELINE_STAGE_HOST_BIT
+ );
+
+ cmd.end();
+
+ // Submit the command and wait.
+ vk_fence fence(m_device, VK_FENCE_CREATE_SIGNALED_BIT);
+ fence.reset();
+
+ vk_queue q = m_device.get_queue();
+ q.submit(cmd, fence, VK_PIPELINE_STAGE_TRANSFER_BIT);
+ fence.wait();
+
+ // Read the values from the host memory.
+ host_buffer.read_from_memory(io.data, data_byte_size);
+}
+
+compute_engine* create()
+{
+ return new compute_engine_vulkan();
+}
+
+void destroy(const compute_engine* p)
+{
+ delete static_cast<const compute_engine_vulkan*>(p);
+}
+
+}}
+
+extern "C" {
+
+IXION_MOD_EXPORT ixion::draft::module_def* register_module()
+{
+ static ixion::draft::module_def md =
+ {
+ ixion::draft::create,
+ ixion::draft::destroy
+ };
+
+ return &md;
+}
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/src/libixion/compute_engine_vulkan.hpp b/src/libixion/compute_engine_vulkan.hpp
new file mode 100644
index 0000000..7d6f581
--- /dev/null
+++ b/src/libixion/compute_engine_vulkan.hpp
@@ -0,0 +1,39 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef INCLUDED_IXION_COMPUTE_ENGINE_VULKAN_HPP
+#define INCLUDED_IXION_COMPUTE_ENGINE_VULKAN_HPP
+
+#include "ixion/compute_engine.hpp"
+
+#include "vulkan_obj.hpp"
+
+namespace ixion { namespace draft {
+
+class compute_engine_vulkan final : public compute_engine
+{
+ vk_instance m_instance;
+ vk_device m_device;
+ vk_command_pool m_cmd_pool;
+
+ void copy_to_device_local_buffer(
+ array& io, vk_buffer& host_buffer, vk_buffer& device_buffer);
+
+public:
+ compute_engine_vulkan();
+ virtual ~compute_engine_vulkan() override;
+
+ virtual std::string_view get_name() const override;
+
+ virtual void compute_fibonacci(array& io) override;
+};
+
+}}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/src/libixion/config.cpp b/src/libixion/config.cpp
new file mode 100644
index 0000000..e4a39e7
--- /dev/null
+++ b/src/libixion/config.cpp
@@ -0,0 +1,27 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include "ixion/config.hpp"
+
+namespace ixion {
+
+config::config() :
+ sep_function_arg(','),
+ sep_matrix_column(','),
+ sep_matrix_row(';'),
+ output_precision(-1)
+{}
+
+config::config(const config& r) :
+ sep_function_arg(r.sep_function_arg),
+ sep_matrix_column(r.sep_matrix_column),
+ sep_matrix_row(r.sep_matrix_row),
+ output_precision(r.output_precision) {}
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/src/libixion/constants.inl.in b/src/libixion/constants.inl.in
new file mode 100644
index 0000000..90fca83
--- /dev/null
+++ b/src/libixion/constants.inl.in
@@ -0,0 +1,7 @@
+
+#define IXION_MAJOR_VERSION @IXION_MAJOR_VERSION@
+#define IXION_MINOR_VERSION @IXION_MINOR_VERSION@
+#define IXION_MICRO_VERSION @IXION_MICRO_VERSION@
+#define IXION_MAJOR_API_VERSION @IXION_MAJOR_API_VERSION@
+#define IXION_MINOR_API_VERSION @IXION_MINOR_API_VERSION@
+
diff --git a/src/libixion/debug.cpp b/src/libixion/debug.cpp
new file mode 100644
index 0000000..f790ada
--- /dev/null
+++ b/src/libixion/debug.cpp
@@ -0,0 +1,35 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include "debug.hpp"
+#include "ixion/formula_name_resolver.hpp"
+#include "ixion/formula_tokens.hpp"
+#include "ixion/cell.hpp"
+#include "ixion/formula.hpp"
+
+#include <sstream>
+
+namespace ixion { namespace detail {
+
+std::string print_formula_expression(const model_context& cxt, const abs_address_t& pos, const formula_cell& cell)
+{
+ auto resolver = formula_name_resolver::get(formula_name_resolver_t::excel_a1, &cxt);
+ assert(resolver);
+ const formula_tokens_t& tokens = cell.get_tokens()->get();
+ return print_formula_tokens(cxt, pos, *resolver, tokens);
+}
+
+std::string print_formula_token_repr(const formula_token& t)
+{
+ std::ostringstream os;
+ os << t;
+ return os.str();
+}
+
+}}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/src/libixion/debug.hpp b/src/libixion/debug.hpp
new file mode 100644
index 0000000..32f5c6e
--- /dev/null
+++ b/src/libixion/debug.hpp
@@ -0,0 +1,47 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef INCLUDED_IXION_DEBUG_HPP
+#define INCLUDED_IXION_DEBUG_HPP
+
+#include <string>
+
+#if defined(IXION_DEBUG_ON) || defined(IXION_TRACE_ON)
+#include <iostream>
+#endif
+
+#ifdef IXION_DEBUG_ON
+#define IXION_DEBUG(stream) \
+ do { std::cerr << "[ixion]:[DEBUG]:" << __FILE__ << ":" << __LINE__ << ":" << __FUNCTION__ << ": " << stream << std::endl; } while (false)
+#else
+#define IXION_DEBUG(...)
+#endif
+
+#ifdef IXION_TRACE_ON
+#define IXION_TRACE(stream) \
+ do { std::cerr << "[ixion]:[TRACE]:" << __FILE__ << ":" << __LINE__ << ":" << __FUNCTION__ << ": " << stream << std::endl; } while (false)
+#else
+#define IXION_TRACE(...)
+#endif
+
+namespace ixion {
+
+class formula_cell;
+struct formula_token;
+struct abs_address_t;
+class model_context;
+
+namespace detail {
+
+std::string print_formula_expression(const model_context& cxt, const abs_address_t& pos, const formula_cell& cell);
+std::string print_formula_token_repr(const formula_token& t);
+
+}}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/src/libixion/dirty_cell_tracker.cpp b/src/libixion/dirty_cell_tracker.cpp
new file mode 100644
index 0000000..e5311bc
--- /dev/null
+++ b/src/libixion/dirty_cell_tracker.cpp
@@ -0,0 +1,418 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include "ixion/dirty_cell_tracker.hpp"
+#include "ixion/global.hpp"
+#include "ixion/formula_name_resolver.hpp"
+
+#include "depth_first_search.hpp"
+#include "debug.hpp"
+
+#include <mdds/rtree.hpp>
+#include <deque>
+#include <limits>
+
+namespace ixion {
+
+namespace {
+
+using rtree_type = mdds::rtree<rc_t, abs_range_set_t>;
+using rtree_array_type = std::deque<rtree_type>;
+
+} // anonymous namespace
+
+struct dirty_cell_tracker::impl
+{
+ rtree_array_type m_grids;
+ abs_range_set_t m_volatile_cells;
+
+ mutable std::unique_ptr<formula_name_resolver> m_resolver;
+
+ impl() {}
+
+ rtree_type& fetch_grid_or_resize(size_t n)
+ {
+ if (m_grids.size() <= n)
+ m_grids.resize(n+1);
+
+ return m_grids[n];
+ }
+
+ const rtree_type* fetch_grid(size_t n) const
+ {
+ return (n < m_grids.size()) ? &m_grids[n] : nullptr;
+ }
+
+ rtree_type* fetch_grid(size_t n)
+ {
+ return (n < m_grids.size()) ? &m_grids[n] : nullptr;
+ }
+
+ /**
+ * Given a modified cell range, return all ranges that are directly
+ * affected by it.
+ *
+ * @param range modified cell range.
+ *
+ * @return collection of ranges that are directly affected by the modified
+ * cell range.
+ */
+ abs_range_set_t get_affected_cell_ranges(const abs_range_t& range) const
+ {
+ const rtree_type* grid = fetch_grid(range.first.sheet);
+ if (!grid)
+ return abs_range_set_t();
+
+ rtree_type::const_search_results res = grid->search(
+ {{range.first.row, range.first.column}, {range.last.row, range.last.column}},
+ rtree_type::search_type::overlap);
+
+ abs_range_set_t ranges;
+
+ for (const abs_range_set_t& range_set : res)
+ ranges.insert(range_set.begin(), range_set.end());
+
+ return ranges;
+ }
+
+ std::string print(const abs_range_t& range) const
+ {
+ if (!m_resolver)
+ m_resolver = formula_name_resolver::get(formula_name_resolver_t::excel_a1, nullptr);
+
+ abs_address_t origin(0, 0, 0);
+ range_t rrange = range;
+ rrange.set_absolute(false);
+
+ std::ostringstream os;
+ os << "Sheet" << (rrange.first.sheet+1) << '!';
+
+ if (rrange.first == rrange.last)
+ os << m_resolver->get_name(rrange.first, origin, false);
+ else
+ os << m_resolver->get_name(rrange, origin, false);
+
+ return os.str();
+ }
+};
+
+dirty_cell_tracker::dirty_cell_tracker() : mp_impl(std::make_unique<impl>()) {}
+dirty_cell_tracker::~dirty_cell_tracker() {}
+
+void dirty_cell_tracker::add(const abs_range_t& src, const abs_range_t& dest)
+{
+ if (!src.valid() || src.first.sheet != src.last.sheet)
+ {
+ // source range must be on one sheet.
+ std::ostringstream os;
+ os << "dirty_cell_tracker::add: invalid source range: src=" << src;
+ throw std::invalid_argument(os.str());
+ }
+
+ if (!dest.valid())
+ {
+ std::ostringstream os;
+ os << "dirty_cell_tracker::add: invalid destination range: src=" << src << "; dest=" << dest;
+ throw std::invalid_argument(os.str());
+ }
+
+ if (dest.all_columns() || dest.all_rows())
+ {
+ std::ostringstream os;
+ os << "dirty_cell_tracker::add: unset column or row range is not allowed " << dest;
+ throw std::invalid_argument(os.str());
+ }
+
+ for (sheet_t sheet = dest.first.sheet; sheet <= dest.last.sheet; ++sheet)
+ {
+ rtree_type& tree = mp_impl->fetch_grid_or_resize(sheet);
+
+ rtree_type::extent_type search_box(
+ {{dest.first.row, dest.first.column}, {dest.last.row, dest.last.column}});
+
+ rtree_type::search_results res = tree.search(search_box, rtree_type::search_type::match);
+
+ if (res.begin() == res.end())
+ {
+ // No listener for this destination range. Insert a new one.
+ abs_range_set_t listener;
+ listener.emplace(src);
+ tree.insert(search_box, std::move(listener));
+ }
+ else
+ {
+ // A listener already exists for this destination cell.
+ abs_range_set_t& listener = *res.begin();
+ listener.emplace(src);
+ }
+ }
+}
+
+void dirty_cell_tracker::remove(const abs_range_t& src, const abs_range_t& dest)
+{
+ if (!src.valid() || src.first.sheet != src.last.sheet)
+ {
+ // source range must be on one sheet.
+ std::ostringstream os;
+ os << "dirty_cell_tracker::add: invalid source range: src=" << src;
+ throw std::invalid_argument(os.str());
+ }
+
+ if (!dest.valid())
+ {
+ std::ostringstream os;
+ os << "dirty_cell_tracker::remove: invalid destination range: src=" << src << "; dest=" << dest;
+ throw std::invalid_argument(os.str());
+ }
+
+ if (dest.all_columns() || dest.all_rows())
+ {
+ std::ostringstream os;
+ os << "dirty_cell_tracker::remove: unset column or row range is not allowed " << dest;
+ throw std::invalid_argument(os.str());
+ }
+
+ for (sheet_t sheet = dest.first.sheet; sheet <= dest.last.sheet; ++sheet)
+ {
+ rtree_type* tree = mp_impl->fetch_grid(sheet);
+ if (!tree)
+ {
+ IXION_DEBUG("Nothing is tracked on sheet " << sheet << ".");
+ continue;
+ }
+
+ rtree_type::extent_type search_box(
+ {{dest.first.row, dest.first.column}, {dest.last.row, dest.last.column}});
+
+ rtree_type::search_results res = tree->search(search_box, rtree_type::search_type::match);
+
+ if (res.begin() == res.end())
+ {
+ // No listener for this destination cell. Nothing to remove.
+ IXION_DEBUG(dest << " is not being tracked by anybody on sheet " << sheet << ".");
+ continue;
+ }
+
+ rtree_type::iterator it_listener = res.begin();
+ abs_range_set_t& listener = *it_listener;
+ size_t n_removed = listener.erase(src);
+
+ if (!n_removed)
+ {
+ IXION_DEBUG(src << " was not tracking " << dest << " on sheet " << sheet << ".");
+ }
+
+ if (listener.empty())
+ // Remove this from the R-tree.
+ tree->erase(it_listener);
+ }
+}
+
+void dirty_cell_tracker::add_volatile(const abs_range_t& pos)
+{
+ mp_impl->m_volatile_cells.insert(pos);
+}
+
+void dirty_cell_tracker::remove_volatile(const abs_range_t& pos)
+{
+ mp_impl->m_volatile_cells.erase(pos);
+}
+
+abs_range_set_t dirty_cell_tracker::query_dirty_cells(const abs_range_t& modified_cell) const
+{
+ abs_range_set_t mod_cells;
+ mod_cells.insert(modified_cell);
+ return query_dirty_cells(mod_cells);
+}
+
+abs_range_set_t dirty_cell_tracker::query_dirty_cells(const abs_range_set_t& modified_cells) const
+{
+ abs_range_set_t dirty_formula_cells;
+
+ // Volatile cells are in theory always formula cells and therefore always
+ // should be included.
+ dirty_formula_cells.insert(
+ mp_impl->m_volatile_cells.begin(), mp_impl->m_volatile_cells.end());
+
+ abs_range_set_t cur_modified_cells = modified_cells;
+ for (const abs_range_t& r : mp_impl->m_volatile_cells)
+ cur_modified_cells.insert(r);
+
+ while (!cur_modified_cells.empty())
+ {
+ abs_range_set_t next_modified_cells;
+
+ for (const abs_range_t& mc : cur_modified_cells)
+ {
+ abs_range_set_t affected_ranges = mp_impl->get_affected_cell_ranges(mc);
+ for (const abs_range_t& r : affected_ranges)
+ {
+ auto res = dirty_formula_cells.insert(r);
+ if (res.second)
+ // This affected range has not yet been visited. Put it
+ // in the chain for the next round of checks.
+ next_modified_cells.insert(r);
+ }
+ }
+
+ cur_modified_cells.swap(next_modified_cells);
+ }
+
+ return dirty_formula_cells;
+}
+
+std::vector<abs_range_t> dirty_cell_tracker::query_and_sort_dirty_cells(const abs_range_t& modified_cell) const
+{
+ abs_range_set_t mod_cells;
+ mod_cells.insert(modified_cell);
+ return query_and_sort_dirty_cells(mod_cells);
+}
+
+std::vector<abs_range_t> dirty_cell_tracker::query_and_sort_dirty_cells(
+ const abs_range_set_t& modified_cells, const abs_range_set_t* dirty_formula_cells) const
+{
+ abs_range_set_t cur_modified_cells = modified_cells;
+
+ abs_range_set_t final_dirty_formula_cells;
+
+ // Get the initial set of formula cells affected by the modified cells.
+ // Note that these modified cells are not dirty formula cells.
+ if (!cur_modified_cells.empty())
+ {
+ abs_range_set_t next_modified_cells;
+ for (const abs_range_t& mc : cur_modified_cells)
+ {
+ for (const abs_range_t& r : mp_impl->get_affected_cell_ranges(mc))
+ {
+ auto res = final_dirty_formula_cells.insert(r);
+ if (res.second)
+ // This affected range has not yet been visited. Put it
+ // in the chain for the next round of checks.
+ next_modified_cells.insert(r);
+ }
+ }
+
+ cur_modified_cells.swap(next_modified_cells);
+ }
+
+ // Because the modified cells in the subsequent rounds are all dirty
+ // formula cells, we need to track precedent-dependent relationships for
+ // later sorting.
+
+ cur_modified_cells.insert(mp_impl->m_volatile_cells.begin(), mp_impl->m_volatile_cells.end());
+
+ if (dirty_formula_cells)
+ cur_modified_cells.insert(dirty_formula_cells->begin(), dirty_formula_cells->end());
+
+ using dfs_type = depth_first_search<abs_range_t, abs_range_t::hash>;
+ dfs_type::relations rels;
+
+ while (!cur_modified_cells.empty())
+ {
+ abs_range_set_t next_modified_cells;
+ for (const abs_range_t& mc : cur_modified_cells)
+ {
+ for (const abs_range_t& r : mp_impl->get_affected_cell_ranges(mc))
+ {
+ // Record each precedent-dependent relationship (r =
+ // precedent; mc = dependent).
+ rels.insert(r, mc);
+
+ auto res = final_dirty_formula_cells.insert(r);
+ if (res.second)
+ // This affected range has not yet been visited. Put it
+ // in the chain for the next round of checks.
+ next_modified_cells.insert(r);
+ }
+ }
+
+ cur_modified_cells.swap(next_modified_cells);
+ }
+
+ // Volatile cells are always formula cells and therefore always should be
+ // included.
+ final_dirty_formula_cells.insert(
+ mp_impl->m_volatile_cells.begin(), mp_impl->m_volatile_cells.end());
+
+ if (dirty_formula_cells)
+ {
+ final_dirty_formula_cells.insert(
+ dirty_formula_cells->begin(), dirty_formula_cells->end());
+ }
+
+ // Perform topological sort on the dirty formula cell ranges.
+ std::vector<abs_range_t> retval;
+ dfs_type sorter(final_dirty_formula_cells.begin(), final_dirty_formula_cells.end(), rels, dfs_type::back_inserter(retval));
+ sorter.run();
+
+ return retval;
+}
+
+std::string dirty_cell_tracker::to_string() const
+{
+ auto resolver = formula_name_resolver::get(formula_name_resolver_t::excel_a1, nullptr);
+ const abs_address_t origin(0, 0, 0);
+
+ rc_t max_val = std::numeric_limits<rc_t>::max();
+ std::vector<std::string> lines;
+
+ for (rc_t i = 0, n = mp_impl->m_grids.size(); i < n; ++i)
+ {
+ const rtree_type& grid = mp_impl->m_grids[i];
+ rtree_type::const_search_results res =
+ grid.search({{0, 0}, {max_val, max_val}}, rtree_type::search_type::overlap);
+
+ for (auto it = res.cbegin(); it != res.cend(); ++it)
+ {
+ const rtree_type::extent_type& ext = it.extent();
+ const abs_range_set_t& srcs = *it;
+
+ range_t dest(
+ address_t(i, ext.start.d[0], ext.start.d[1]),
+ address_t(i, ext.end.d[0], ext.end.d[1]));
+
+ dest.set_absolute(false);
+
+ std::string dest_name = ext.is_point() ?
+ resolver->get_name(dest.first, origin, false) :
+ resolver->get_name(dest, origin, false);
+
+ for (const abs_range_t& src : srcs)
+ {
+ std::ostringstream os;
+ os << mp_impl->print(src);
+ os << " -> Sheet" << (dest.first.sheet+1) << '!' << dest_name;
+ lines.push_back(os.str());
+ }
+ }
+ }
+
+ if (lines.empty())
+ return std::string();
+
+ std::ostringstream os;
+ auto it = lines.begin();
+ os << *it;
+ for (++it; it != lines.end(); ++it)
+ os << std::endl << *it;
+ return os.str();
+}
+
+bool dirty_cell_tracker::empty() const
+{
+ for (const rtree_type& grid : mp_impl->m_grids)
+ {
+ if (!grid.empty())
+ return false;
+ }
+
+ return true;
+}
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/src/libixion/dirty_cell_tracker_test.cpp b/src/libixion/dirty_cell_tracker_test.cpp
new file mode 100644
index 0000000..3a035fc
--- /dev/null
+++ b/src/libixion/dirty_cell_tracker_test.cpp
@@ -0,0 +1,395 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include "test_global.hpp" // This must be the first header to be included.
+#include <ixion/dirty_cell_tracker.hpp>
+#include <cassert>
+#include <iostream>
+#include <unordered_map>
+
+using namespace ixion;
+using namespace std;
+
+using ranks_type = std::unordered_map<abs_range_t, size_t, abs_range_t::hash>;
+
+ranks_type create_ranks(const std::vector<abs_range_t>& sorted)
+{
+ ranks_type ranks;
+ size_t rank = 0;
+ for (const abs_range_t& r : sorted)
+ ranks.insert({r, rank++});
+
+ return ranks;
+}
+
+void test_empty_query()
+{
+ IXION_TEST_FUNC_SCOPE;
+
+ dirty_cell_tracker tracker;
+
+ // Empty query.
+ abs_range_set_t mod_cells;
+ abs_range_set_t res = tracker.query_dirty_cells(mod_cells);
+ assert(res.empty());
+
+ // A "modified" cell is outside existing sheet range. Make sure we don't
+ // crash here.
+ mod_cells.emplace(1, 1, 1);
+ res = tracker.query_dirty_cells(mod_cells);
+ assert(res.empty());
+
+ auto sorted = tracker.query_and_sort_dirty_cells(mod_cells);
+ assert(sorted.empty());
+
+ // Dirty cells are like newly entered formula cells that need to be
+ // calculated regardless.
+ abs_range_set_t dirty_cells;
+ dirty_cells.emplace(0, 0, 0); // A1
+ dirty_cells.emplace(0, 1, 0); // A2
+ dirty_cells.emplace(0, 0, 1); // B1
+ dirty_cells.emplace(0, 1, 1); // B2
+ sorted = tracker.query_and_sort_dirty_cells(mod_cells, &dirty_cells);
+ assert(sorted.size() == 4);
+}
+
+void test_cell_to_cell()
+{
+ IXION_TEST_FUNC_SCOPE;
+
+ dirty_cell_tracker tracker;
+
+ // A2 to listen to A1.
+ abs_address_t A1(0, 0, 0);
+ abs_address_t A2(0, 1, 0);
+ tracker.add(A2, A1);
+
+ // A1 is modified. A2 should be updated.
+ abs_range_set_t mod_cells;
+ mod_cells.insert(A1);
+ abs_range_set_t res = tracker.query_dirty_cells(mod_cells);
+ assert(res.size() == 1);
+ abs_range_t cell = *res.cbegin();
+ assert(cell.first == A2);
+
+ // A3 to listen to A2.
+ abs_address_t A3(0, 2, 0);
+ tracker.add(A3, A2);
+
+ // A1 is modified. Both A2 and A3 should be updated.
+ res = tracker.query_dirty_cells(mod_cells);
+ assert(res.size() == 2);
+
+ assert(res.count(A2) > 0);
+ assert(res.count(A3) > 0);
+
+ // A2 should be ranked lower than A3.
+ auto sorted = tracker.query_and_sort_dirty_cells(mod_cells);
+ auto ranks = create_ranks(sorted);
+ assert(ranks[A2] < ranks[A3]);
+
+ // A2 no longer tracks A1, and because of this, a modification of A1
+ // should not trigger any updates.
+ tracker.remove(A2, A1);
+ res = tracker.query_dirty_cells(mod_cells);
+ assert(res.empty());
+
+ // Add A2->A1 once again, to re-establish the previous chain.
+ tracker.add(A2, A1);
+ res = tracker.query_dirty_cells(mod_cells);
+ assert(res.size() == 2);
+
+ assert(res.count(A2) > 0);
+ assert(res.count(A3) > 0);
+}
+
+void test_cell_to_range()
+{
+ IXION_TEST_FUNC_SCOPE;
+
+ dirty_cell_tracker tracker;
+
+ // B2 listens to C1:D4.
+ abs_address_t B2(0, 1, 1);
+ abs_range_t C1_D4(0, 0, 2, 4, 2);
+ tracker.add(B2, C1_D4);
+
+ // D3 gets modified. B2 should be updated.
+ abs_range_set_t mod_cells;
+ mod_cells.emplace(0, 2, 3);
+ abs_range_set_t res = tracker.query_dirty_cells(mod_cells);
+ assert(res.size() == 1);
+ assert(res.count(B2) > 0);
+
+ // E10 listens to A1:B4 which includes B2.
+ abs_address_t E10(0, 9, 4);
+ abs_range_t A1_B4(0, 0, 0, 4, 2);
+ tracker.add(E10, A1_B4);
+
+ // D3 gets modified again. This time both B2 and E10 need updating.
+ res = tracker.query_dirty_cells(mod_cells);
+ assert(res.size() == 2);
+ assert(res.count(B2) > 0);
+ assert(res.count(E10) > 0);
+
+ // B2 no longer listens to C1:D4.
+ tracker.remove(B2, C1_D4);
+
+ // D3 gets modified again, but no cells need updating.
+ res = tracker.query_dirty_cells(mod_cells);
+ assert(res.empty());
+
+ // B3 gets modified. E10 should be updated.
+ mod_cells.clear();
+ abs_address_t B3(0, 2, 1);
+ mod_cells.insert(B3);
+ res = tracker.query_dirty_cells(mod_cells);
+ assert(res.size() == 1);
+ assert(res.count(E10) > 0);
+}
+
+void test_volatile_cells()
+{
+ IXION_TEST_FUNC_SCOPE;
+
+ dirty_cell_tracker tracker;
+
+ // We use sheet 2 in this test.
+ abs_address_t A1(1, 0, 0);
+ abs_address_t B2(1, 1, 1);
+ abs_address_t C3(1, 2, 2);
+
+ tracker.add_volatile(A1);
+
+ // No cells have been modified.
+ abs_range_set_t mod_cells;
+ abs_range_set_t res = tracker.query_dirty_cells(mod_cells);
+
+ assert(res.size() == 1);
+ assert(res.count(A1) > 0);
+
+ tracker.add_volatile(B2);
+ res = tracker.query_dirty_cells(mod_cells);
+ assert(res.size() == 2);
+ assert(res.count(A1) > 0);
+ assert(res.count(B2) > 0);
+
+ tracker.add_volatile(C3);
+ res = tracker.query_dirty_cells(mod_cells);
+ assert(res.size() == 3);
+ assert(res.count(A1) > 0);
+ assert(res.count(B2) > 0);
+ assert(res.count(C3) > 0);
+
+ // Start removing the volatile cells one by one.
+ tracker.remove_volatile(B2);
+ res = tracker.query_dirty_cells(mod_cells);
+ assert(res.size() == 2);
+ assert(res.count(A1) > 0);
+ assert(res.count(C3) > 0);
+
+ tracker.remove_volatile(C3);
+ res = tracker.query_dirty_cells(mod_cells);
+ assert(res.size() == 1);
+ assert(res.count(A1) > 0);
+
+ tracker.remove_volatile(A1);
+ res = tracker.query_dirty_cells(mod_cells);
+ assert(res.empty());
+}
+
+void test_volatile_cells_2()
+{
+ IXION_TEST_FUNC_SCOPE;
+
+ dirty_cell_tracker tracker;
+
+ abs_address_t A1(1, 0, 0);
+ abs_address_t B2(1, 1, 1);
+ abs_address_t C3(1, 2, 2);
+
+ // B2 tracks A1 and C3 tracks B2.
+ tracker.add(B2, A1);
+ tracker.add(C3, B2);
+
+ // No cells have been modified.
+ abs_range_set_t mod_cells;
+ abs_range_set_t res = tracker.query_dirty_cells(mod_cells);
+ assert(res.empty());
+
+ // Set A1 as volatile cell. All of A2, B2 and C3 should be dirty.
+ tracker.add_volatile(A1);
+ res = tracker.query_dirty_cells(mod_cells);
+ assert(res.size() == 3);
+
+ auto sorted = tracker.query_and_sort_dirty_cells(mod_cells);
+ assert(sorted.size() == 3);
+ auto ranks = create_ranks(sorted);
+ assert(ranks[A1] < ranks[B2]);
+ assert(ranks[B2] < ranks[C3]);
+
+ // Remove A1 as volatile cell. Now no cells should be dirty.
+ tracker.remove_volatile(A1);
+ sorted = tracker.query_and_sort_dirty_cells(mod_cells);
+ assert(sorted.empty());
+
+ // Now, declare A1 as a dirty cell.
+ abs_range_set_t dirty_cells;
+ dirty_cells.insert(A1);
+ sorted = tracker.query_and_sort_dirty_cells(mod_cells, &dirty_cells);
+ assert(sorted.size() == 3);
+}
+
+void test_multi_sheets()
+{
+ IXION_TEST_FUNC_SCOPE;
+
+ dirty_cell_tracker tracker;
+
+ // B2 on sheet 2 tracks A10 on sheet 1.
+ abs_address_t s2_B2(1, 1, 1);
+ abs_address_t s1_A10(0, 9, 0);
+ tracker.add(s2_B2, s1_A10);
+
+ // A10 on sheet 1 gets modified.
+ abs_range_set_t res = tracker.query_dirty_cells(s1_A10);
+ assert(res.size() == 1);
+ assert(res.count(s2_B2) > 0);
+
+ // A10 on sheet 2 gets modified. This should trigger no updates.
+ abs_address_t s2_A10(1, 9, 0);
+ res = tracker.query_dirty_cells(s2_A10);
+ assert(res.empty());
+}
+
+void test_recursive_tracking()
+{
+ IXION_TEST_FUNC_SCOPE;
+
+ dirty_cell_tracker tracker;
+
+ abs_address_t A1(0, 0, 0), B1(0, 0, 1);
+
+ // A1 and B1 track each other.
+ tracker.add(A1, B1);
+ tracker.add(B1, A1);
+
+ abs_range_set_t res = tracker.query_dirty_cells(A1);
+ assert(res.size() == 2);
+ assert(res.count(A1) > 0);
+ assert(res.count(B1) > 0);
+}
+
+void test_listen_to_cell_in_range()
+{
+ IXION_TEST_FUNC_SCOPE;
+
+ dirty_cell_tracker tracker;
+
+ abs_address_t A2(0, 1, 0), E7(0, 6, 4), G11(0, 10, 6);
+ abs_range_t C5_E7(0, 4, 2, 3, 3);
+ abs_range_t A1_A3(0, 0, 0, 3, 1);
+ abs_range_t C1_E1(0, 0, 2, 1, 3);
+ abs_range_t G5_H7(0, 4, 6, 3, 2);
+ abs_range_t E7_G9(0, 6, 4, 3, 3);
+
+ tracker.add(G11, E7);
+ tracker.add(C5_E7, A1_A3);
+ tracker.add(C5_E7, C1_E1);
+
+ cout << "--" << endl;
+ cout << tracker.to_string() << endl;
+
+ abs_range_set_t res = tracker.query_dirty_cells(A2);
+ assert(res.size() == 2);
+ assert(res.count(C5_E7) > 0);
+ assert(res.count(G11) > 0);
+
+ tracker.add(G5_H7, A1_A3);
+ tracker.remove(G11, E7);
+ tracker.add(G11, E7_G9);
+
+ cout << "--" << endl;
+ cout << tracker.to_string() << endl;
+
+ res = tracker.query_dirty_cells(A2);
+ assert(res.size() == 3);
+ assert(res.count(C5_E7) > 0);
+ assert(res.count(G5_H7) > 0);
+ assert(res.count(G11) > 0);
+
+ // Test topological sort results, and make sure they are ranked correctly.
+ std::vector<abs_range_t> sorted = tracker.query_and_sort_dirty_cells(A2);
+
+ auto ranks = create_ranks(sorted);
+ assert(ranks[C5_E7] < ranks[G11]);
+ assert(ranks[G5_H7] < ranks[G11]);
+}
+
+void test_listen_to_3d_range()
+{
+ IXION_TEST_FUNC_SCOPE;
+
+ dirty_cell_tracker tracker;
+
+ abs_address_t E7(0, 6, 4);
+ abs_range_t C1_E5_sheets_0_2(0, 0, 2, 5, 3);
+ C1_E5_sheets_0_2.last.sheet += 2;
+ tracker.add(E7, C1_E5_sheets_0_2);
+
+ cout << "--" << endl;
+ cout << tracker.to_string() << endl;
+
+ abs_address_t D3(0, 2, 3);
+ for (sheet_t s = 0; s <= 4; ++s)
+ {
+ D3.sheet = s;
+ auto cells = tracker.query_dirty_cells(D3);
+ if (s <= 2)
+ {
+ assert(cells.size() == 1);
+ assert(E7 == *cells.begin());
+ }
+ else
+ assert(cells.empty());
+ }
+
+ for (sheet_t s = 0; s <= 4; ++s)
+ {
+ abs_range_t E5_F6(0, 4, 4, 2, 2);
+ E5_F6.first.sheet = E5_F6.last.sheet = s;
+ auto cells = tracker.query_dirty_cells(E5_F6);
+ if (s <= 2)
+ {
+ assert(cells.size() == 1);
+ assert(E7 == *cells.begin());
+ }
+ else
+ assert(cells.empty());
+ }
+
+ // Remove the multi-sheet listener, and make sure the tracker is empty.
+ tracker.remove(E7, C1_E5_sheets_0_2);
+ assert(tracker.empty());
+}
+
+int main()
+{
+ test_empty_query();
+ test_cell_to_cell();
+ test_cell_to_range();
+ test_volatile_cells();
+ test_volatile_cells_2();
+ test_multi_sheets();
+ test_recursive_tracking();
+ test_listen_to_cell_in_range();
+ test_listen_to_3d_range();
+
+ return EXIT_SUCCESS;
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/src/libixion/document.cpp b/src/libixion/document.cpp
new file mode 100644
index 0000000..3c9854f
--- /dev/null
+++ b/src/libixion/document.cpp
@@ -0,0 +1,237 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include "ixion/document.hpp"
+#include "ixion/global.hpp"
+#include "ixion/model_context.hpp"
+#include "ixion/formula_name_resolver.hpp"
+#include "ixion/formula.hpp"
+#include "ixion/cell_access.hpp"
+
+#include <cstring>
+#include <sstream>
+
+namespace ixion {
+
+namespace {
+
+abs_address_t to_address(
+ const model_context& cxt, const formula_name_resolver& resolver, const document::cell_pos& pos)
+{
+ switch (pos.type)
+ {
+ case document::cell_pos::cp_type::string:
+ {
+ std::string_view s = std::get<std::string_view>(pos.value);
+ formula_name_t name = resolver.resolve(s, abs_address_t());
+ if (name.type != formula_name_t::cell_reference)
+ {
+ std::ostringstream os;
+ os << "invalid cell address: " << s;
+ throw std::invalid_argument(os.str());
+ }
+
+ return std::get<address_t>(name.value).to_abs(abs_address_t());
+ }
+ case document::cell_pos::cp_type::address:
+ {
+ return std::get<abs_address_t>(pos.value);
+ }
+ }
+
+ throw std::logic_error("unrecognized cell position type.");
+}
+
+} // anonymous namespace
+
+document::cell_pos::cell_pos(const char* p) :
+ type(cp_type::string),
+ value(p)
+{
+}
+
+document::cell_pos::cell_pos(const char* p, size_t n) :
+ type(cp_type::string),
+ value(std::string_view(p, n))
+{
+}
+
+document::cell_pos::cell_pos(const std::string& s) :
+ type(cp_type::string),
+ value(s)
+{
+}
+
+document::cell_pos::cell_pos(const abs_address_t& addr) :
+ type(cp_type::address),
+ value(addr)
+{
+}
+
+struct document::impl
+{
+ model_context cxt;
+ std::unique_ptr<formula_name_resolver> resolver;
+
+ abs_range_set_t modified_cells;
+ abs_range_set_t modified_formula_cells;
+
+ impl() :
+ cxt(),
+ resolver(formula_name_resolver::get(formula_name_resolver_t::excel_a1, &cxt))
+ {}
+
+ impl(formula_name_resolver_t cell_address_type) :
+ cxt(),
+ resolver(formula_name_resolver::get(cell_address_type, &cxt))
+ {}
+
+ void append_sheet(std::string name)
+ {
+ cxt.append_sheet(std::move(name));
+ }
+
+ void set_sheet_name(sheet_t sheet, std::string name)
+ {
+ cxt.set_sheet_name(sheet, std::move(name));
+ }
+
+ cell_access get_cell_access(cell_pos pos) const
+ {
+ abs_address_t addr = to_address(cxt, *resolver, pos);
+ return cxt.get_cell_access(addr);
+ }
+
+ void set_numeric_cell(cell_pos pos, double val)
+ {
+ abs_address_t addr = to_address(cxt, *resolver, pos);
+ unregister_formula_cell(cxt, addr);
+ cxt.set_numeric_cell(addr, val);
+ modified_cells.insert(addr);
+ }
+
+ void set_string_cell(cell_pos pos, std::string_view s)
+ {
+ abs_address_t addr = to_address(cxt, *resolver, pos);
+ unregister_formula_cell(cxt, addr);
+ cxt.set_string_cell(addr, s);
+ modified_cells.insert(addr);
+ }
+
+ void set_boolean_cell(cell_pos pos, bool val)
+ {
+ abs_address_t addr = to_address(cxt, *resolver, pos);
+ unregister_formula_cell(cxt, addr);
+ cxt.set_boolean_cell(addr, val);
+ modified_cells.insert(addr);
+ }
+
+ void empty_cell(cell_pos pos)
+ {
+ abs_address_t addr = to_address(cxt, *resolver, pos);
+ unregister_formula_cell(cxt, addr);
+ cxt.empty_cell(addr);
+ modified_cells.insert(addr);
+ }
+
+ double get_numeric_value(cell_pos pos) const
+ {
+ abs_address_t addr = to_address(cxt, *resolver, pos);
+ return cxt.get_numeric_value(addr);
+ }
+
+ std::string_view get_string_value(cell_pos pos) const
+ {
+ abs_address_t addr = to_address(cxt, *resolver, pos);
+ return cxt.get_string_value(addr);
+ }
+
+ void set_formula_cell(cell_pos pos, std::string_view formula)
+ {
+ abs_address_t addr = to_address(cxt, *resolver, pos);
+ unregister_formula_cell(cxt, addr);
+ auto tokens = parse_formula_string(cxt, addr, *resolver, formula);
+ formula_cell* fc = cxt.set_formula_cell(addr, std::move(tokens));
+ register_formula_cell(cxt, addr, fc);
+ modified_formula_cells.insert(addr);
+ }
+
+ void calculate(size_t thread_count)
+ {
+ auto sorted_cells = query_and_sort_dirty_cells(cxt, modified_cells, &modified_formula_cells);
+ calculate_sorted_cells(cxt, sorted_cells, thread_count);
+ modified_cells.clear();
+ modified_formula_cells.clear();
+ }
+};
+
+document::document() :
+ mp_impl(std::make_unique<impl>()) {}
+
+document::document(formula_name_resolver_t cell_address_type) :
+ mp_impl(std::make_unique<impl>(cell_address_type)) {}
+
+document::~document() {}
+
+void document::append_sheet(std::string name)
+{
+ mp_impl->append_sheet(std::move(name));
+}
+
+void document::set_sheet_name(sheet_t sheet, std::string name)
+{
+ mp_impl->set_sheet_name(sheet, std::move(name));
+}
+
+cell_access document::get_cell_access(cell_pos pos) const
+{
+ return mp_impl->get_cell_access(pos);
+}
+
+void document::set_numeric_cell(cell_pos pos, double val)
+{
+ mp_impl->set_numeric_cell(pos, val);
+}
+
+void document::set_string_cell(cell_pos pos, std::string_view s)
+{
+ mp_impl->set_string_cell(pos, s);
+}
+
+void document::set_boolean_cell(cell_pos pos, bool val)
+{
+ mp_impl->set_boolean_cell(pos, val);
+}
+
+void document::empty_cell(cell_pos pos)
+{
+ mp_impl->empty_cell(pos);
+}
+
+double document::get_numeric_value(cell_pos pos) const
+{
+ return mp_impl->get_numeric_value(pos);
+}
+
+std::string_view document::get_string_value(cell_pos pos) const
+{
+ return mp_impl->get_string_value(pos);
+}
+
+void document::set_formula_cell(cell_pos pos, std::string_view formula)
+{
+ mp_impl->set_formula_cell(pos, formula);
+}
+
+void document::calculate(size_t thread_count)
+{
+ mp_impl->calculate(thread_count);
+}
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/src/libixion/document_test.cpp b/src/libixion/document_test.cpp
new file mode 100644
index 0000000..fb14264
--- /dev/null
+++ b/src/libixion/document_test.cpp
@@ -0,0 +1,190 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include "test_global.hpp" // This must be the first header to be included.
+
+#include <ixion/document.hpp>
+#include <ixion/address.hpp>
+#include <ixion/macros.hpp>
+#include <ixion/cell_access.hpp>
+
+#include <iostream>
+#include <cassert>
+#include <sstream>
+
+using namespace std;
+using namespace ixion;
+
+namespace {
+
+bool equal(double v1, double v2)
+{
+ // To work around the floating point rounding errors, convert the values to
+ // strings then compare as string numbers.
+ std::ostringstream os1, os2;
+ os1 << v1;
+ os2 << v2;
+ return os1.str() == os2.str();
+}
+
+}
+
+void test_basic_calc()
+{
+ IXION_TEST_FUNC_SCOPE;
+
+ abs_address_t A1(0, 0, 0);
+ abs_address_t A2(0, 1, 0);
+ abs_address_t A3(0, 2, 0);
+
+ document doc;
+ doc.append_sheet("test");
+ doc.set_numeric_cell("A1", 1.1);
+ doc.set_numeric_cell(A2, 1.2);
+ doc.set_numeric_cell({IXION_ASCII("A3")}, 1.3);
+
+ assert(doc.get_numeric_value(A1) == 1.1);
+ assert(doc.get_numeric_value("A2") == 1.2);
+ assert(doc.get_numeric_value(A3) == 1.3);
+
+ doc.set_formula_cell("B4", "SUM(A1:A3)");
+ doc.calculate(0);
+
+ double v = doc.get_numeric_value("B4");
+ assert(equal(v, 3.6));
+
+ doc.empty_cell(A2);
+ doc.calculate(0);
+ v = doc.get_numeric_value("B4");
+ assert(equal(v, 2.4));
+}
+
+void test_string_io()
+{
+ IXION_TEST_FUNC_SCOPE;
+
+ document doc;
+ doc.append_sheet("test");
+
+ std::string B3("B3"), C4("C4"), D5("D5"), D5_value("Cell D5 value");
+ doc.set_string_cell(B3, "Cell B3");
+ doc.set_string_cell(C4, "Cell C4");
+ doc.set_string_cell(D5, D5_value);
+
+ std::string_view s = doc.get_string_value(B3);
+ assert(s == "Cell B3");
+
+ s = doc.get_string_value(C4);
+ assert(s == "Cell C4");
+
+ s = doc.get_string_value(D5);
+ assert(s == D5_value);
+
+ doc.set_formula_cell("A10", "CONCATENATE(B3, \" and \", C4)");
+ doc.calculate(0);
+
+ s = doc.get_string_value("A10");
+ assert(s == "Cell B3 and Cell C4");
+
+ doc.empty_cell(C4);
+ doc.calculate(0);
+
+ s = doc.get_string_value("A10");
+ assert(s == "Cell B3 and ");
+}
+
+void test_boolean_io()
+{
+ IXION_TEST_FUNC_SCOPE;
+
+ document doc;
+ doc.append_sheet("test1");
+ doc.append_sheet("test2");
+
+ doc.set_boolean_cell("test2!B2", true);
+ doc.set_boolean_cell("test2!C3", false);
+
+ doc.set_formula_cell("test1!A1", "SUM(test2!A1:D4)");
+ doc.calculate(0);
+ double v = doc.get_numeric_value("test1!A1");
+ assert(v == 1.0);
+
+ // Trigger recalculation.
+ doc.set_boolean_cell("test2!C4", true);
+ doc.calculate(0);
+ v = doc.get_numeric_value("test1!A1");
+ assert(v == 2.0);
+
+ cell_access ca = doc.get_cell_access("test2!B2");
+ assert(ca.get_type() == celltype_t::boolean);
+ assert(ca.get_value_type() == cell_value_t::boolean);
+
+ ca = doc.get_cell_access("test2!C3");
+ assert(ca.get_type() == celltype_t::boolean);
+ assert(ca.get_value_type() == cell_value_t::boolean);
+}
+
+void test_custom_cell_address_syntax()
+{
+ IXION_TEST_FUNC_SCOPE;
+
+ document doc(formula_name_resolver_t::excel_r1c1);
+ doc.append_sheet("MySheet");
+
+ doc.set_numeric_cell("R3C3", 345.0);
+ abs_address_t R3C3(0, 2, 2);
+ double v = doc.get_numeric_value(R3C3);
+ assert(v == 345.0);
+}
+
+void test_rename_sheets()
+{
+ IXION_TEST_FUNC_SCOPE;
+
+ document doc(formula_name_resolver_t::excel_r1c1);
+ doc.append_sheet("Sheet1");
+ doc.append_sheet("Sheet2");
+ doc.append_sheet("Sheet3");
+ doc.set_numeric_cell("Sheet3!R3C3", 456.0);
+
+ double v = doc.get_numeric_value("Sheet3!R3C3");
+ assert(v == 456.0);
+
+ doc.set_sheet_name(0, "S1");
+ doc.set_sheet_name(1, "S2");
+ doc.set_sheet_name(2, "S3");
+
+ v = doc.get_numeric_value("S3!R3C3");
+ assert(v == 456.0);
+
+ doc.set_numeric_cell("S2!R4C2", 789.0);
+ v = doc.get_numeric_value("S2!R4C2");
+ assert(v == 789.0);
+
+ try
+ {
+ doc.get_numeric_value("Sheet3!R3C3");
+ assert(!"Exception should've been thrown.");
+ }
+ catch (const std::invalid_argument&)
+ {
+ // correct exception
+ }
+}
+
+int main()
+{
+ test_basic_calc();
+ test_string_io();
+ test_boolean_io();
+ test_custom_cell_address_syntax();
+ test_rename_sheets();
+
+ return EXIT_SUCCESS;
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/src/libixion/exceptions.cpp b/src/libixion/exceptions.cpp
new file mode 100644
index 0000000..b87f834
--- /dev/null
+++ b/src/libixion/exceptions.cpp
@@ -0,0 +1,117 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include "ixion/exceptions.hpp"
+
+#include <sstream>
+
+namespace ixion {
+
+general_error::general_error() : m_msg() {}
+
+general_error::general_error(const std::string& msg) :
+ m_msg(msg) {}
+
+general_error::~general_error() {}
+
+const char* general_error::what() const noexcept
+{
+ return m_msg.c_str();
+}
+
+void general_error::set_message(const std::string& msg)
+{
+ m_msg = msg;
+}
+
+struct formula_error::impl
+{
+ formula_error_t error;
+ std::string msg;
+ std::string buffer;
+
+ impl(formula_error_t _error) :
+ error(_error) {}
+
+ impl(formula_error_t _error, std::string _msg) :
+ error(_error), msg(std::move(_msg)) {}
+};
+
+formula_error::formula_error(formula_error_t fe) :
+ mp_impl(std::make_unique<impl>(fe)) {}
+
+formula_error::formula_error(formula_error_t fe, std::string msg) :
+ mp_impl(std::make_unique<impl>(fe, std::move(msg))) {}
+
+formula_error::formula_error(formula_error&& other) :
+ mp_impl(std::move(other.mp_impl))
+{
+ other.mp_impl = std::make_unique<impl>(formula_error_t::no_error);
+}
+
+formula_error::~formula_error()
+{
+}
+
+const char* formula_error::what() const noexcept
+{
+ std::string_view error_name = get_formula_error_name(mp_impl->error);
+ if (mp_impl->msg.empty())
+ return error_name.data();
+
+ std::ostringstream os;
+ os << mp_impl->msg << " (type: " << error_name << ")";
+ mp_impl->buffer = os.str();
+ return mp_impl->buffer.data();
+}
+
+formula_error_t formula_error::get_error() const
+{
+ return mp_impl->error;
+}
+
+formula_registration_error::formula_registration_error(const std::string& msg)
+{
+ std::ostringstream os;
+ os << "formula_registration_error: " << msg;
+ set_message(os.str());
+}
+
+formula_registration_error::~formula_registration_error() {}
+
+file_not_found::file_not_found(const std::string& fpath) :
+ general_error(fpath)
+{
+ std::ostringstream os;
+ os << "specified file not found: " << fpath;
+ set_message(os.str());
+}
+
+file_not_found::~file_not_found() {}
+
+model_context_error::model_context_error(const std::string& msg, error_type type) :
+ general_error(msg), m_type(type) {}
+
+model_context_error::~model_context_error() {}
+
+model_context_error::error_type model_context_error::get_error_type() const
+{
+ return m_type;
+}
+
+not_implemented_error::not_implemented_error(const std::string& msg)
+{
+ std::ostringstream os;
+ os << "not_implemented_error: " << msg;
+ set_message(os.str());
+}
+
+not_implemented_error::~not_implemented_error() {}
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/src/libixion/formula.cpp b/src/libixion/formula.cpp
new file mode 100644
index 0000000..21e990a
--- /dev/null
+++ b/src/libixion/formula.cpp
@@ -0,0 +1,464 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include <ixion/formula.hpp>
+#include <ixion/formula_name_resolver.hpp>
+#include <ixion/formula_function_opcode.hpp>
+#include <ixion/cell.hpp>
+#include <ixion/dirty_cell_tracker.hpp>
+#include <ixion/types.hpp>
+#include <ixion/model_context.hpp>
+
+#include "formula_lexer.hpp"
+#include "formula_parser.hpp"
+#include "formula_functions.hpp"
+#include "debug.hpp"
+
+#include <sstream>
+#include <algorithm>
+
+namespace ixion {
+
+namespace {
+
+#if IXION_LOGGING
+
+[[maybe_unused]] std::string debug_print_formula_tokens(const formula_tokens_t& tokens)
+{
+ std::ostringstream os;
+
+ for (const formula_token& t : tokens)
+ {
+ os << std::endl << " * " << t;
+ }
+
+ return os.str();
+}
+
+#endif
+
+void print_token(
+ const print_config& config, const model_context& cxt, const abs_address_t& pos,
+ const formula_name_resolver& resolver, const formula_token& token, std::ostream& os)
+{
+ auto sheet_to_print = [&config, &pos](const address_t& ref_addr) -> bool
+ {
+ switch (config.display_sheet)
+ {
+ case display_sheet_t::always:
+ return true;
+ case display_sheet_t::never:
+ return false;
+ case display_sheet_t::only_if_different:
+ return ref_addr.to_abs(pos).sheet != pos.sheet;
+ case display_sheet_t::unspecified:
+ break;
+ }
+ return false;
+ };
+
+ switch (token.opcode)
+ {
+ case fop_array_open:
+ os << '{';
+ break;
+ case fop_array_close:
+ os << '}';
+ break;
+ case fop_close:
+ os << ')';
+ break;
+ case fop_divide:
+ os << '/';
+ break;
+ case fop_minus:
+ os << '-';
+ break;
+ case fop_multiply:
+ os << '*';
+ break;
+ case fop_exponent:
+ os << '^';
+ break;
+ case fop_concat:
+ os << '&';
+ break;
+ case fop_open:
+ os << '(';
+ break;
+ case fop_plus:
+ os << '+';
+ break;
+ case fop_value:
+ os << std::get<double>(token.value);
+ break;
+ case fop_sep:
+ os << cxt.get_config().sep_function_arg;
+ break;
+ case fop_array_row_sep:
+ os << cxt.get_config().sep_matrix_row;
+ break;
+ case fop_function:
+ {
+ auto fop = std::get<formula_function_t>(token.value);
+ os << formula_functions::get_function_name(fop);
+ break;
+ }
+ case fop_single_ref:
+ {
+ const address_t& addr = std::get<address_t>(token.value);
+ bool sheet_name = sheet_to_print(addr);
+ os << resolver.get_name(addr, pos, sheet_name);
+ break;
+ }
+ case fop_range_ref:
+ {
+ const range_t& range = std::get<range_t>(token.value);
+ bool sheet_name = sheet_to_print(range.first);
+ os << resolver.get_name(range, pos, sheet_name);
+ break;
+ }
+ case fop_table_ref:
+ {
+ const table_t& tbl = std::get<table_t>(token.value);
+ os << resolver.get_name(tbl);
+ break;
+ }
+ case fop_string:
+ {
+ auto sid = std::get<string_id_t>(token.value);
+ const std::string* p = cxt.get_string(sid);
+ if (p)
+ os << "\"" << *p << "\"";
+ else
+ IXION_DEBUG("failed to get a string value for the identifier value of " << sid);
+
+ break;
+ }
+ case fop_equal:
+ os << "=";
+ break;
+ case fop_not_equal:
+ os << "<>";
+ break;
+ case fop_less:
+ os << "<";
+ break;
+ case fop_greater:
+ os << ">";
+ break;
+ case fop_less_equal:
+ os << "<=";
+ break;
+ case fop_greater_equal:
+ os << ">=";
+ break;
+ case fop_named_expression:
+ os << std::get<std::string>(token.value);
+ break;
+ case fop_unknown:
+ default:
+ {
+ std::ostringstream repr;
+ repr << token;
+ IXION_DEBUG(
+ "token not printed (repr='" << repr.str()
+ << "'; name='" << get_opcode_name(token.opcode)
+ << "'; opcode='" << get_formula_opcode_string(token.opcode)
+ << "')");
+ }
+ }
+}
+
+}
+
+formula_tokens_t parse_formula_string(
+ model_context& cxt, const abs_address_t& pos,
+ const formula_name_resolver& resolver, std::string_view formula)
+{
+ IXION_TRACE("pos=" << pos.get_name() << "; formula='" << formula << "'");
+ lexer_tokens_t lxr_tokens;
+ formula_lexer lexer(cxt.get_config(), formula.data(), formula.size());
+ lexer.tokenize();
+ lexer.swap_tokens(lxr_tokens);
+
+ IXION_TRACE("lexer tokens: " << print_tokens(lxr_tokens, true));
+
+ formula_tokens_t tokens;
+ formula_parser parser(lxr_tokens, cxt, resolver);
+ parser.set_origin(pos);
+ parser.parse();
+ parser.get_tokens().swap(tokens);
+
+ IXION_TRACE("formula tokens (string): " << print_formula_tokens(cxt, pos, resolver, tokens));
+ IXION_TRACE("formula tokens (individual): " << debug_print_formula_tokens(tokens));
+
+ return tokens;
+}
+
+formula_tokens_t create_formula_error_tokens(
+ model_context& cxt, std::string_view src_formula,
+ std::string_view error)
+{
+ formula_tokens_t tokens;
+ tokens.emplace_back(fop_error);
+ tokens.back().value = 2u;
+
+ string_id_t sid_src_formula = cxt.add_string(src_formula);
+ tokens.emplace_back(sid_src_formula);
+
+ string_id_t sid_error = cxt.add_string(error);
+ tokens.emplace_back(sid_error);
+
+ return tokens;
+}
+
+std::string print_formula_tokens(
+ const model_context& cxt, const abs_address_t& pos,
+ const formula_name_resolver& resolver, const formula_tokens_t& tokens)
+{
+ print_config config;
+ config.display_sheet = display_sheet_t::only_if_different;
+ return print_formula_tokens(config, cxt, pos, resolver, tokens);
+}
+
+std::string print_formula_tokens(
+ const print_config& config, const model_context& cxt, const abs_address_t& pos,
+ const formula_name_resolver& resolver, const formula_tokens_t& tokens)
+{
+ std::ostringstream os;
+
+ if (!tokens.empty() && tokens[0].opcode == fop_error)
+ // Let's not print anything on error tokens.
+ return std::string();
+
+ for (const formula_token& token : tokens)
+ print_token(config, cxt, pos, resolver, token, os);
+
+ return os.str();
+}
+
+std::string print_formula_token(
+ const model_context& cxt, const abs_address_t& pos,
+ const formula_name_resolver& resolver, const formula_token& token)
+{
+ print_config config;
+ config.display_sheet = display_sheet_t::only_if_different;
+ return print_formula_token(config, cxt, pos, resolver, token);
+}
+
+std::string print_formula_token(
+ const print_config& config, const model_context& cxt, const abs_address_t& pos,
+ const formula_name_resolver& resolver, const formula_token& token)
+{
+ std::ostringstream os;
+ print_token(config, cxt, pos, resolver, token, os);
+ return os.str();
+}
+
+namespace {
+
+bool is_volatile(formula_function_t func)
+{
+ switch (func)
+ {
+ case formula_function_t::func_now:
+ return true;
+ default:
+ ;
+ }
+ return false;
+}
+
+bool has_volatile(const formula_tokens_t& tokens)
+{
+ for (const auto& t : tokens)
+ {
+ if (t.opcode != fop_function)
+ continue;
+
+ auto func = std::get<formula_function_t>(t.value);
+ if (is_volatile(func))
+ return true;
+ }
+ return false;
+}
+
+void check_sheet_or_throw(const char* func_name, sheet_t sheet, const model_context& cxt, const abs_address_t& pos, const formula_cell& cell)
+{
+ if (is_valid_sheet(sheet))
+ return;
+
+ IXION_DEBUG("invalid range reference: func=" << func_name
+ << "; pos=" << pos.get_name()
+ << "; formula='" << detail::print_formula_expression(cxt, pos, cell)
+ << "'");
+
+ std::ostringstream os;
+ os << func_name << ": invalid sheet index in " << pos.get_name()
+ << ": formula='" << detail::print_formula_expression(cxt, pos, cell) << "'";
+ throw ixion::formula_registration_error(os.str());
+}
+
+}
+
+void register_formula_cell(
+ model_context& cxt, const abs_address_t& pos, const formula_cell* cell)
+{
+#ifdef IXION_DEBUG_UTILS
+ if (cell)
+ {
+ const formula_cell* check = cxt.get_formula_cell(pos);
+ if (cell != check)
+ {
+ throw std::runtime_error(
+ "The cell instance passed to this call does not match the cell instance found at the specified position.");
+ }
+ }
+#endif
+
+ if (!cell)
+ {
+ cell = cxt.get_formula_cell(pos);
+ if (!cell)
+ // Not a formula cell. Bail out.
+ return;
+ }
+
+ formula_group_t fg_props = cell->get_group_properties();
+ dirty_cell_tracker& tracker = cxt.get_cell_tracker();
+
+ abs_range_t src_pos = pos;
+ if (fg_props.grouped)
+ {
+ // Expand the source range for grouped formula cells.
+ src_pos.last.column += fg_props.size.column - 1;
+ src_pos.last.row += fg_props.size.row - 1;
+ }
+
+ IXION_TRACE("pos=" << pos.get_name()
+ << "; formula='" << detail::print_formula_expression(cxt, pos, *cell)
+ << "'");
+
+ std::vector<const formula_token*> ref_tokens = cell->get_ref_tokens(cxt, pos);
+
+ for (const formula_token* p : ref_tokens)
+ {
+ IXION_TRACE("ref token: " << detail::print_formula_token_repr(*p));
+
+ switch (p->opcode)
+ {
+ case fop_single_ref:
+ {
+ abs_address_t addr = std::get<address_t>(p->value).to_abs(pos);
+ check_sheet_or_throw("register_formula_cell", addr.sheet, cxt, pos, *cell);
+ tracker.add(src_pos, addr);
+ break;
+ }
+ case fop_range_ref:
+ {
+ abs_range_t range = std::get<range_t>(p->value).to_abs(pos);
+ check_sheet_or_throw("register_formula_cell", range.first.sheet, cxt, pos, *cell);
+ rc_size_t sheet_size = cxt.get_sheet_size();
+ if (range.all_columns())
+ {
+ range.first.column = 0;
+ range.last.column = sheet_size.column - 1;
+ }
+ if (range.all_rows())
+ {
+ range.first.row = 0;
+ range.last.row = sheet_size.row - 1;
+ }
+ range.reorder();
+ tracker.add(src_pos, range);
+ break;
+ }
+ default:
+ ; // ignore the rest.
+ }
+ }
+
+ // Check if the cell is volatile.
+ const formula_tokens_store_ptr_t& ts = cell->get_tokens();
+ if (ts && has_volatile(ts->get()))
+ tracker.add_volatile(pos);
+}
+
+void unregister_formula_cell(model_context& cxt, const abs_address_t& pos)
+{
+ // When there is a formula cell at this position, unregister it from
+ // the dependency tree.
+ formula_cell* fcell = cxt.get_formula_cell(pos);
+ if (!fcell)
+ // Not a formula cell. Bail out.
+ return;
+
+ dirty_cell_tracker& tracker = cxt.get_cell_tracker();
+ tracker.remove_volatile(pos);
+
+ // Go through all its existing references, and remove
+ // itself as their listener. This step is important
+ // especially during partial re-calculation.
+ std::vector<const formula_token*> ref_tokens = fcell->get_ref_tokens(cxt, pos);
+
+ for (const formula_token* p : ref_tokens)
+ {
+
+ switch (p->opcode)
+ {
+ case fop_single_ref:
+ {
+ abs_address_t addr = std::get<address_t>(p->value).to_abs(pos);
+ check_sheet_or_throw("unregister_formula_cell", addr.sheet, cxt, pos, *fcell);
+ tracker.remove(pos, addr);
+ break;
+ }
+ case fop_range_ref:
+ {
+ abs_range_t range = std::get<range_t>(p->value).to_abs(pos);
+ check_sheet_or_throw("unregister_formula_cell", range.first.sheet, cxt, pos, *fcell);
+ tracker.remove(pos, range);
+ break;
+ }
+ default:
+ ; // ignore the rest.
+ }
+ }
+}
+
+abs_address_set_t query_dirty_cells(model_context& cxt, const abs_address_set_t& modified_cells)
+{
+ abs_range_set_t modified_ranges;
+ for (const abs_address_t& mc : modified_cells)
+ modified_ranges.insert(mc);
+
+ const dirty_cell_tracker& tracker = cxt.get_cell_tracker();
+ abs_range_set_t dirty_ranges = tracker.query_dirty_cells(modified_ranges);
+
+ // Convert a set of ranges to a set of addresses.
+ abs_address_set_t dirty_cells;
+ std::for_each(dirty_ranges.begin(), dirty_ranges.end(),
+ [&dirty_cells](const abs_range_t& r)
+ {
+ dirty_cells.insert(r.first);
+ }
+ );
+ return dirty_cells;
+}
+
+std::vector<abs_range_t> query_and_sort_dirty_cells(
+ model_context& cxt, const abs_range_set_t& modified_cells,
+ const abs_range_set_t* dirty_formula_cells)
+{
+ const dirty_cell_tracker& tracker = cxt.get_cell_tracker();
+ return tracker.query_and_sort_dirty_cells(modified_cells, dirty_formula_cells);
+}
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/src/libixion/formula_calc.cpp b/src/libixion/formula_calc.cpp
new file mode 100644
index 0000000..0e16382
--- /dev/null
+++ b/src/libixion/formula_calc.cpp
@@ -0,0 +1,89 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include <ixion/formula.hpp>
+#include <ixion/address.hpp>
+#include <ixion/cell.hpp>
+#include <ixion/formula_name_resolver.hpp>
+#include <ixion/model_context.hpp>
+
+#include "queue_entry.hpp"
+#include "debug.hpp"
+
+#if IXION_THREADS
+#include "cell_queue_manager.hpp"
+#endif
+
+#include <algorithm>
+
+namespace ixion {
+
+namespace {
+
+class calc_scope
+{
+ model_context& m_cxt;
+public:
+ calc_scope(model_context& cxt) : m_cxt(cxt)
+ {
+ m_cxt.notify(formula_event_t::calculation_begins);
+ }
+
+ ~calc_scope()
+ {
+ m_cxt.notify(formula_event_t::calculation_ends);
+ }
+};
+
+}
+
+void calculate_sorted_cells(
+ model_context& cxt, const std::vector<abs_range_t>& formula_cells, size_t thread_count)
+{
+#if IXION_THREADS == 0
+ thread_count = 0; // threads are disabled thus not to be used.
+#endif
+
+ calc_scope cs(cxt);
+
+ std::vector<queue_entry> entries;
+ entries.reserve(formula_cells.size());
+
+ for (const abs_range_t& r : formula_cells)
+ entries.emplace_back(cxt.get_formula_cell(r.first), r.first);
+
+ // Reset cell status.
+ for (queue_entry& e : entries)
+ {
+ e.p->reset();
+ IXION_TRACE("pos=" << e.pos.get_name() << " formula=" << detail::print_formula_expression(cxt, e.pos, *e.p));
+ }
+
+ // First, detect circular dependencies and mark those circular
+ // dependent cells with appropriate error flags.
+ for (queue_entry& e : entries)
+ e.p->check_circular(cxt, e.pos);
+
+ if (!thread_count)
+ {
+ // Interpret cells using just a single thread.
+ for (queue_entry& e : entries)
+ e.p->interpret(cxt, e.pos);
+
+ return;
+ }
+
+#if IXION_THREADS
+ // Interpret cells in topological order using threads.
+ formula_cell_queue queue(cxt, std::move(entries), thread_count);
+ queue.run();
+#endif
+}
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/src/libixion/formula_function_opcode.cpp b/src/libixion/formula_function_opcode.cpp
new file mode 100644
index 0000000..bf7db5a
--- /dev/null
+++ b/src/libixion/formula_function_opcode.cpp
@@ -0,0 +1,26 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include "ixion/formula_function_opcode.hpp"
+
+#include "formula_functions.hpp"
+
+namespace ixion {
+
+std::string_view get_formula_function_name(formula_function_t func)
+{
+ return formula_functions::get_function_name(func);
+}
+
+formula_function_t get_formula_function_opcode(std::string_view s)
+{
+ return formula_functions::get_function_opcode(s);
+}
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/src/libixion/formula_functions.cpp b/src/libixion/formula_functions.cpp
new file mode 100644
index 0000000..c3e10a6
--- /dev/null
+++ b/src/libixion/formula_functions.cpp
@@ -0,0 +1,2389 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include "formula_functions.hpp"
+#include "debug.hpp"
+#include "column_store_type.hpp" // internal mdds::multi_type_vector
+#include "utils.hpp"
+#include "utf8.hpp"
+
+#include <ixion/formula_tokens.hpp>
+#include <ixion/formula_result.hpp>
+#include <ixion/matrix.hpp>
+#include <ixion/macros.hpp>
+#include <ixion/model_iterator.hpp>
+#include <ixion/cell_access.hpp>
+
+#ifdef max
+#undef max
+#endif
+#ifdef min
+#undef min
+#endif
+
+#include <cassert>
+#include <iostream>
+#include <sstream>
+#include <thread>
+#include <chrono>
+#include <cmath>
+#include <optional>
+#include <iterator>
+
+#include <mdds/sorted_string_map.hpp>
+
+namespace ixion {
+
+namespace {
+
+namespace builtin_funcs {
+
+typedef mdds::sorted_string_map<formula_function_t> map_type;
+
+// Keys must be sorted.
+constexpr map_type::entry entries[] =
+{
+ { IXION_ASCII("ABS"), formula_function_t::func_abs },
+ { IXION_ASCII("ACOS"), formula_function_t::func_acos },
+ { IXION_ASCII("ACOSH"), formula_function_t::func_acosh },
+ { IXION_ASCII("ACOT"), formula_function_t::func_acot },
+ { IXION_ASCII("ACOTH"), formula_function_t::func_acoth },
+ { IXION_ASCII("ADDRESS"), formula_function_t::func_address },
+ { IXION_ASCII("AGGREGATE"), formula_function_t::func_aggregate },
+ { IXION_ASCII("AND"), formula_function_t::func_and },
+ { IXION_ASCII("ARABIC"), formula_function_t::func_arabic },
+ { IXION_ASCII("AREAS"), formula_function_t::func_areas },
+ { IXION_ASCII("ASC"), formula_function_t::func_asc },
+ { IXION_ASCII("ASIN"), formula_function_t::func_asin },
+ { IXION_ASCII("ASINH"), formula_function_t::func_asinh },
+ { IXION_ASCII("ATAN"), formula_function_t::func_atan },
+ { IXION_ASCII("ATAN2"), formula_function_t::func_atan2 },
+ { IXION_ASCII("ATANH"), formula_function_t::func_atanh },
+ { IXION_ASCII("AVEDEV"), formula_function_t::func_avedev },
+ { IXION_ASCII("AVERAGE"), formula_function_t::func_average },
+ { IXION_ASCII("AVERAGEA"), formula_function_t::func_averagea },
+ { IXION_ASCII("AVERAGEIF"), formula_function_t::func_averageif },
+ { IXION_ASCII("AVERAGEIFS"), formula_function_t::func_averageifs },
+ { IXION_ASCII("B"), formula_function_t::func_b },
+ { IXION_ASCII("BAHTTEXT"), formula_function_t::func_bahttext },
+ { IXION_ASCII("BASE"), formula_function_t::func_base },
+ { IXION_ASCII("BETADIST"), formula_function_t::func_betadist },
+ { IXION_ASCII("BETAINV"), formula_function_t::func_betainv },
+ { IXION_ASCII("BINOMDIST"), formula_function_t::func_binomdist },
+ { IXION_ASCII("BITAND"), formula_function_t::func_bitand },
+ { IXION_ASCII("BITLSHIFT"), formula_function_t::func_bitlshift },
+ { IXION_ASCII("BITOR"), formula_function_t::func_bitor },
+ { IXION_ASCII("BITRSHIFT"), formula_function_t::func_bitrshift },
+ { IXION_ASCII("BITXOR"), formula_function_t::func_bitxor },
+ { IXION_ASCII("CEILING"), formula_function_t::func_ceiling },
+ { IXION_ASCII("CELL"), formula_function_t::func_cell },
+ { IXION_ASCII("CHAR"), formula_function_t::func_char },
+ { IXION_ASCII("CHIDIST"), formula_function_t::func_chidist },
+ { IXION_ASCII("CHIINV"), formula_function_t::func_chiinv },
+ { IXION_ASCII("CHISQDIST"), formula_function_t::func_chisqdist },
+ { IXION_ASCII("CHISQINV"), formula_function_t::func_chisqinv },
+ { IXION_ASCII("CHITEST"), formula_function_t::func_chitest },
+ { IXION_ASCII("CHOOSE"), formula_function_t::func_choose },
+ { IXION_ASCII("CLEAN"), formula_function_t::func_clean },
+ { IXION_ASCII("CODE"), formula_function_t::func_code },
+ { IXION_ASCII("COLOR"), formula_function_t::func_color },
+ { IXION_ASCII("COLUMN"), formula_function_t::func_column },
+ { IXION_ASCII("COLUMNS"), formula_function_t::func_columns },
+ { IXION_ASCII("COMBIN"), formula_function_t::func_combin },
+ { IXION_ASCII("COMBINA"), formula_function_t::func_combina },
+ { IXION_ASCII("CONCAT"), formula_function_t::func_concat },
+ { IXION_ASCII("CONCATENATE"), formula_function_t::func_concatenate },
+ { IXION_ASCII("CONFIDENCE"), formula_function_t::func_confidence },
+ { IXION_ASCII("CORREL"), formula_function_t::func_correl },
+ { IXION_ASCII("COS"), formula_function_t::func_cos },
+ { IXION_ASCII("COSH"), formula_function_t::func_cosh },
+ { IXION_ASCII("COT"), formula_function_t::func_cot },
+ { IXION_ASCII("COTH"), formula_function_t::func_coth },
+ { IXION_ASCII("COUNT"), formula_function_t::func_count },
+ { IXION_ASCII("COUNTA"), formula_function_t::func_counta },
+ { IXION_ASCII("COUNTBLANK"), formula_function_t::func_countblank },
+ { IXION_ASCII("COUNTIF"), formula_function_t::func_countif },
+ { IXION_ASCII("COUNTIFS"), formula_function_t::func_countifs },
+ { IXION_ASCII("COVAR"), formula_function_t::func_covar },
+ { IXION_ASCII("CRITBINOM"), formula_function_t::func_critbinom },
+ { IXION_ASCII("CSC"), formula_function_t::func_csc },
+ { IXION_ASCII("CSCH"), formula_function_t::func_csch },
+ { IXION_ASCII("CUMIPMT"), formula_function_t::func_cumipmt },
+ { IXION_ASCII("CUMPRINC"), formula_function_t::func_cumprinc },
+ { IXION_ASCII("CURRENT"), formula_function_t::func_current },
+ { IXION_ASCII("DATE"), formula_function_t::func_date },
+ { IXION_ASCII("DATEDIF"), formula_function_t::func_datedif },
+ { IXION_ASCII("DATEVALUE"), formula_function_t::func_datevalue },
+ { IXION_ASCII("DAVERAGE"), formula_function_t::func_daverage },
+ { IXION_ASCII("DAY"), formula_function_t::func_day },
+ { IXION_ASCII("DAYS"), formula_function_t::func_days },
+ { IXION_ASCII("DAYS360"), formula_function_t::func_days360 },
+ { IXION_ASCII("DB"), formula_function_t::func_db },
+ { IXION_ASCII("DCOUNT"), formula_function_t::func_dcount },
+ { IXION_ASCII("DCOUNTA"), formula_function_t::func_dcounta },
+ { IXION_ASCII("DDB"), formula_function_t::func_ddb },
+ { IXION_ASCII("DDE"), formula_function_t::func_dde },
+ { IXION_ASCII("DECIMAL"), formula_function_t::func_decimal },
+ { IXION_ASCII("DEGREES"), formula_function_t::func_degrees },
+ { IXION_ASCII("DEVSQ"), formula_function_t::func_devsq },
+ { IXION_ASCII("DGET"), formula_function_t::func_dget },
+ { IXION_ASCII("DMAX"), formula_function_t::func_dmax },
+ { IXION_ASCII("DMIN"), formula_function_t::func_dmin },
+ { IXION_ASCII("DOLLAR"), formula_function_t::func_dollar },
+ { IXION_ASCII("DPRODUCT"), formula_function_t::func_dproduct },
+ { IXION_ASCII("DSTDEV"), formula_function_t::func_dstdev },
+ { IXION_ASCII("DSTDEVP"), formula_function_t::func_dstdevp },
+ { IXION_ASCII("DSUM"), formula_function_t::func_dsum },
+ { IXION_ASCII("DVAR"), formula_function_t::func_dvar },
+ { IXION_ASCII("DVARP"), formula_function_t::func_dvarp },
+ { IXION_ASCII("EASTERSUNDAY"), formula_function_t::func_eastersunday },
+ { IXION_ASCII("EFFECT"), formula_function_t::func_effect },
+ { IXION_ASCII("ENCODEURL"), formula_function_t::func_encodeurl },
+ { IXION_ASCII("ERRORTYPE"), formula_function_t::func_errortype },
+ { IXION_ASCII("EUROCONVERT"), formula_function_t::func_euroconvert },
+ { IXION_ASCII("EVEN"), formula_function_t::func_even },
+ { IXION_ASCII("EXACT"), formula_function_t::func_exact },
+ { IXION_ASCII("EXP"), formula_function_t::func_exp },
+ { IXION_ASCII("EXPONDIST"), formula_function_t::func_expondist },
+ { IXION_ASCII("FACT"), formula_function_t::func_fact },
+ { IXION_ASCII("FALSE"), formula_function_t::func_false },
+ { IXION_ASCII("FDIST"), formula_function_t::func_fdist },
+ { IXION_ASCII("FILTERXML"), formula_function_t::func_filterxml },
+ { IXION_ASCII("FIND"), formula_function_t::func_find },
+ { IXION_ASCII("FINDB"), formula_function_t::func_findb },
+ { IXION_ASCII("FINV"), formula_function_t::func_finv },
+ { IXION_ASCII("FISHER"), formula_function_t::func_fisher },
+ { IXION_ASCII("FISHERINV"), formula_function_t::func_fisherinv },
+ { IXION_ASCII("FIXED"), formula_function_t::func_fixed },
+ { IXION_ASCII("FLOOR"), formula_function_t::func_floor },
+ { IXION_ASCII("FORECAST"), formula_function_t::func_forecast },
+ { IXION_ASCII("FORMULA"), formula_function_t::func_formula },
+ { IXION_ASCII("FOURIER"), formula_function_t::func_fourier },
+ { IXION_ASCII("FREQUENCY"), formula_function_t::func_frequency },
+ { IXION_ASCII("FTEST"), formula_function_t::func_ftest },
+ { IXION_ASCII("FV"), formula_function_t::func_fv },
+ { IXION_ASCII("GAMMA"), formula_function_t::func_gamma },
+ { IXION_ASCII("GAMMADIST"), formula_function_t::func_gammadist },
+ { IXION_ASCII("GAMMAINV"), formula_function_t::func_gammainv },
+ { IXION_ASCII("GAMMALN"), formula_function_t::func_gammaln },
+ { IXION_ASCII("GAUSS"), formula_function_t::func_gauss },
+ { IXION_ASCII("GCD"), formula_function_t::func_gcd },
+ { IXION_ASCII("GEOMEAN"), formula_function_t::func_geomean },
+ { IXION_ASCII("GETPIVOTDATA"), formula_function_t::func_getpivotdata },
+ { IXION_ASCII("GOALSEEK"), formula_function_t::func_goalseek },
+ { IXION_ASCII("GROWTH"), formula_function_t::func_growth },
+ { IXION_ASCII("HARMEAN"), formula_function_t::func_harmean },
+ { IXION_ASCII("HLOOKUP"), formula_function_t::func_hlookup },
+ { IXION_ASCII("HOUR"), formula_function_t::func_hour },
+ { IXION_ASCII("HYPERLINK"), formula_function_t::func_hyperlink },
+ { IXION_ASCII("HYPGEOMDIST"), formula_function_t::func_hypgeomdist },
+ { IXION_ASCII("IF"), formula_function_t::func_if },
+ { IXION_ASCII("IFERROR"), formula_function_t::func_iferror },
+ { IXION_ASCII("IFNA"), formula_function_t::func_ifna },
+ { IXION_ASCII("IFS"), formula_function_t::func_ifs },
+ { IXION_ASCII("INDEX"), formula_function_t::func_index },
+ { IXION_ASCII("INDIRECT"), formula_function_t::func_indirect },
+ { IXION_ASCII("INFO"), formula_function_t::func_info },
+ { IXION_ASCII("INT"), formula_function_t::func_int },
+ { IXION_ASCII("INTERCEPT"), formula_function_t::func_intercept },
+ { IXION_ASCII("IPMT"), formula_function_t::func_ipmt },
+ { IXION_ASCII("IRR"), formula_function_t::func_irr },
+ { IXION_ASCII("ISBLANK"), formula_function_t::func_isblank },
+ { IXION_ASCII("ISERR"), formula_function_t::func_iserr },
+ { IXION_ASCII("ISERROR"), formula_function_t::func_iserror },
+ { IXION_ASCII("ISEVEN"), formula_function_t::func_iseven },
+ { IXION_ASCII("ISFORMULA"), formula_function_t::func_isformula },
+ { IXION_ASCII("ISLOGICAL"), formula_function_t::func_islogical },
+ { IXION_ASCII("ISNA"), formula_function_t::func_isna },
+ { IXION_ASCII("ISNONTEXT"), formula_function_t::func_isnontext },
+ { IXION_ASCII("ISNUMBER"), formula_function_t::func_isnumber },
+ { IXION_ASCII("ISODD"), formula_function_t::func_isodd },
+ { IXION_ASCII("ISOWEEKNUM"), formula_function_t::func_isoweeknum },
+ { IXION_ASCII("ISPMT"), formula_function_t::func_ispmt },
+ { IXION_ASCII("ISREF"), formula_function_t::func_isref },
+ { IXION_ASCII("ISTEXT"), formula_function_t::func_istext },
+ { IXION_ASCII("JIS"), formula_function_t::func_jis },
+ { IXION_ASCII("KURT"), formula_function_t::func_kurt },
+ { IXION_ASCII("LARGE"), formula_function_t::func_large },
+ { IXION_ASCII("LCM"), formula_function_t::func_lcm },
+ { IXION_ASCII("LEFT"), formula_function_t::func_left },
+ { IXION_ASCII("LEFTB"), formula_function_t::func_leftb },
+ { IXION_ASCII("LEN"), formula_function_t::func_len },
+ { IXION_ASCII("LENB"), formula_function_t::func_lenb },
+ { IXION_ASCII("LINEST"), formula_function_t::func_linest },
+ { IXION_ASCII("LN"), formula_function_t::func_ln },
+ { IXION_ASCII("LOG"), formula_function_t::func_log },
+ { IXION_ASCII("LOG10"), formula_function_t::func_log10 },
+ { IXION_ASCII("LOGEST"), formula_function_t::func_logest },
+ { IXION_ASCII("LOGINV"), formula_function_t::func_loginv },
+ { IXION_ASCII("LOGNORMDIST"), formula_function_t::func_lognormdist },
+ { IXION_ASCII("LOOKUP"), formula_function_t::func_lookup },
+ { IXION_ASCII("LOWER"), formula_function_t::func_lower },
+ { IXION_ASCII("MATCH"), formula_function_t::func_match },
+ { IXION_ASCII("MAX"), formula_function_t::func_max },
+ { IXION_ASCII("MAXA"), formula_function_t::func_maxa },
+ { IXION_ASCII("MAXIFS"), formula_function_t::func_maxifs },
+ { IXION_ASCII("MDETERM"), formula_function_t::func_mdeterm },
+ { IXION_ASCII("MEDIAN"), formula_function_t::func_median },
+ { IXION_ASCII("MID"), formula_function_t::func_mid },
+ { IXION_ASCII("MIDB"), formula_function_t::func_midb },
+ { IXION_ASCII("MIN"), formula_function_t::func_min },
+ { IXION_ASCII("MINA"), formula_function_t::func_mina },
+ { IXION_ASCII("MINIFS"), formula_function_t::func_minifs },
+ { IXION_ASCII("MINUTE"), formula_function_t::func_minute },
+ { IXION_ASCII("MINVERSE"), formula_function_t::func_minverse },
+ { IXION_ASCII("MIRR"), formula_function_t::func_mirr },
+ { IXION_ASCII("MMULT"), formula_function_t::func_mmult },
+ { IXION_ASCII("MOD"), formula_function_t::func_mod },
+ { IXION_ASCII("MODE"), formula_function_t::func_mode },
+ { IXION_ASCII("MONTH"), formula_function_t::func_month },
+ { IXION_ASCII("MULTIRANGE"), formula_function_t::func_multirange },
+ { IXION_ASCII("MUNIT"), formula_function_t::func_munit },
+ { IXION_ASCII("MVALUE"), formula_function_t::func_mvalue },
+ { IXION_ASCII("N"), formula_function_t::func_n },
+ { IXION_ASCII("NA"), formula_function_t::func_na },
+ { IXION_ASCII("NEG"), formula_function_t::func_neg },
+ { IXION_ASCII("NEGBINOMDIST"), formula_function_t::func_negbinomdist },
+ { IXION_ASCII("NETWORKDAYS"), formula_function_t::func_networkdays },
+ { IXION_ASCII("NOMINAL"), formula_function_t::func_nominal },
+ { IXION_ASCII("NORMDIST"), formula_function_t::func_normdist },
+ { IXION_ASCII("NORMINV"), formula_function_t::func_norminv },
+ { IXION_ASCII("NORMSDIST"), formula_function_t::func_normsdist },
+ { IXION_ASCII("NORMSINV"), formula_function_t::func_normsinv },
+ { IXION_ASCII("NOT"), formula_function_t::func_not },
+ { IXION_ASCII("NOW"), formula_function_t::func_now },
+ { IXION_ASCII("NPER"), formula_function_t::func_nper },
+ { IXION_ASCII("NPV"), formula_function_t::func_npv },
+ { IXION_ASCII("NUMBERVALUE"), formula_function_t::func_numbervalue },
+ { IXION_ASCII("ODD"), formula_function_t::func_odd },
+ { IXION_ASCII("OFFSET"), formula_function_t::func_offset },
+ { IXION_ASCII("OR"), formula_function_t::func_or },
+ { IXION_ASCII("PDURATION"), formula_function_t::func_pduration },
+ { IXION_ASCII("PEARSON"), formula_function_t::func_pearson },
+ { IXION_ASCII("PERCENTILE"), formula_function_t::func_percentile },
+ { IXION_ASCII("PERCENTRANK"), formula_function_t::func_percentrank },
+ { IXION_ASCII("PERMUT"), formula_function_t::func_permut },
+ { IXION_ASCII("PERMUTATIONA"), formula_function_t::func_permutationa },
+ { IXION_ASCII("PHI"), formula_function_t::func_phi },
+ { IXION_ASCII("PI"), formula_function_t::func_pi },
+ { IXION_ASCII("PMT"), formula_function_t::func_pmt },
+ { IXION_ASCII("POISSON"), formula_function_t::func_poisson },
+ { IXION_ASCII("POWER"), formula_function_t::func_power },
+ { IXION_ASCII("PPMT"), formula_function_t::func_ppmt },
+ { IXION_ASCII("PROB"), formula_function_t::func_prob },
+ { IXION_ASCII("PRODUCT"), formula_function_t::func_product },
+ { IXION_ASCII("PROPER"), formula_function_t::func_proper },
+ { IXION_ASCII("PV"), formula_function_t::func_pv },
+ { IXION_ASCII("QUARTILE"), formula_function_t::func_quartile },
+ { IXION_ASCII("RADIANS"), formula_function_t::func_radians },
+ { IXION_ASCII("RAND"), formula_function_t::func_rand },
+ { IXION_ASCII("RANK"), formula_function_t::func_rank },
+ { IXION_ASCII("RATE"), formula_function_t::func_rate },
+ { IXION_ASCII("RAWSUBTRACT"), formula_function_t::func_rawsubtract },
+ { IXION_ASCII("REGEX"), formula_function_t::func_regex },
+ { IXION_ASCII("REPLACE"), formula_function_t::func_replace },
+ { IXION_ASCII("REPLACEB"), formula_function_t::func_replaceb },
+ { IXION_ASCII("REPT"), formula_function_t::func_rept },
+ { IXION_ASCII("RIGHT"), formula_function_t::func_right },
+ { IXION_ASCII("RIGHTB"), formula_function_t::func_rightb },
+ { IXION_ASCII("ROMAN"), formula_function_t::func_roman },
+ { IXION_ASCII("ROUND"), formula_function_t::func_round },
+ { IXION_ASCII("ROUNDDOWN"), formula_function_t::func_rounddown },
+ { IXION_ASCII("ROUNDSIG"), formula_function_t::func_roundsig },
+ { IXION_ASCII("ROUNDUP"), formula_function_t::func_roundup },
+ { IXION_ASCII("ROW"), formula_function_t::func_row },
+ { IXION_ASCII("ROWS"), formula_function_t::func_rows },
+ { IXION_ASCII("RRI"), formula_function_t::func_rri },
+ { IXION_ASCII("RSQ"), formula_function_t::func_rsq },
+ { IXION_ASCII("SEARCH"), formula_function_t::func_search },
+ { IXION_ASCII("SEARCHB"), formula_function_t::func_searchb },
+ { IXION_ASCII("SEC"), formula_function_t::func_sec },
+ { IXION_ASCII("SECH"), formula_function_t::func_sech },
+ { IXION_ASCII("SECOND"), formula_function_t::func_second },
+ { IXION_ASCII("SHEET"), formula_function_t::func_sheet },
+ { IXION_ASCII("SHEETS"), formula_function_t::func_sheets },
+ { IXION_ASCII("SIGN"), formula_function_t::func_sign },
+ { IXION_ASCII("SIN"), formula_function_t::func_sin },
+ { IXION_ASCII("SINH"), formula_function_t::func_sinh },
+ { IXION_ASCII("SKEW"), formula_function_t::func_skew },
+ { IXION_ASCII("SKEWP"), formula_function_t::func_skewp },
+ { IXION_ASCII("SLN"), formula_function_t::func_sln },
+ { IXION_ASCII("SLOPE"), formula_function_t::func_slope },
+ { IXION_ASCII("SMALL"), formula_function_t::func_small },
+ { IXION_ASCII("SQRT"), formula_function_t::func_sqrt },
+ { IXION_ASCII("STANDARDIZE"), formula_function_t::func_standardize },
+ { IXION_ASCII("STDEV"), formula_function_t::func_stdev },
+ { IXION_ASCII("STDEVA"), formula_function_t::func_stdeva },
+ { IXION_ASCII("STDEVP"), formula_function_t::func_stdevp },
+ { IXION_ASCII("STDEVPA"), formula_function_t::func_stdevpa },
+ { IXION_ASCII("STEYX"), formula_function_t::func_steyx },
+ { IXION_ASCII("STYLE"), formula_function_t::func_style },
+ { IXION_ASCII("SUBSTITUTE"), formula_function_t::func_substitute },
+ { IXION_ASCII("SUBTOTAL"), formula_function_t::func_subtotal },
+ { IXION_ASCII("SUM"), formula_function_t::func_sum },
+ { IXION_ASCII("SUMIF"), formula_function_t::func_sumif },
+ { IXION_ASCII("SUMIFS"), formula_function_t::func_sumifs },
+ { IXION_ASCII("SUMPRODUCT"), formula_function_t::func_sumproduct },
+ { IXION_ASCII("SUMSQ"), formula_function_t::func_sumsq },
+ { IXION_ASCII("SUMX2MY2"), formula_function_t::func_sumx2my2 },
+ { IXION_ASCII("SUMX2PY2"), formula_function_t::func_sumx2py2 },
+ { IXION_ASCII("SUMXMY2"), formula_function_t::func_sumxmy2 },
+ { IXION_ASCII("SWITCH"), formula_function_t::func_switch },
+ { IXION_ASCII("SYD"), formula_function_t::func_syd },
+ { IXION_ASCII("T"), formula_function_t::func_t },
+ { IXION_ASCII("TAN"), formula_function_t::func_tan },
+ { IXION_ASCII("TANH"), formula_function_t::func_tanh },
+ { IXION_ASCII("TDIST"), formula_function_t::func_tdist },
+ { IXION_ASCII("TEXT"), formula_function_t::func_text },
+ { IXION_ASCII("TEXTJOIN"), formula_function_t::func_textjoin },
+ { IXION_ASCII("TIME"), formula_function_t::func_time },
+ { IXION_ASCII("TIMEVALUE"), formula_function_t::func_timevalue },
+ { IXION_ASCII("TINV"), formula_function_t::func_tinv },
+ { IXION_ASCII("TODAY"), formula_function_t::func_today },
+ { IXION_ASCII("TRANSPOSE"), formula_function_t::func_transpose },
+ { IXION_ASCII("TREND"), formula_function_t::func_trend },
+ { IXION_ASCII("TRIM"), formula_function_t::func_trim },
+ { IXION_ASCII("TRIMMEAN"), formula_function_t::func_trimmean },
+ { IXION_ASCII("TRUE"), formula_function_t::func_true },
+ { IXION_ASCII("TRUNC"), formula_function_t::func_trunc },
+ { IXION_ASCII("TTEST"), formula_function_t::func_ttest },
+ { IXION_ASCII("TYPE"), formula_function_t::func_type },
+ { IXION_ASCII("UNICHAR"), formula_function_t::func_unichar },
+ { IXION_ASCII("UNICODE"), formula_function_t::func_unicode },
+ { IXION_ASCII("UPPER"), formula_function_t::func_upper },
+ { IXION_ASCII("VALUE"), formula_function_t::func_value },
+ { IXION_ASCII("VAR"), formula_function_t::func_var },
+ { IXION_ASCII("VARA"), formula_function_t::func_vara },
+ { IXION_ASCII("VARP"), formula_function_t::func_varp },
+ { IXION_ASCII("VARPA"), formula_function_t::func_varpa },
+ { IXION_ASCII("VDB"), formula_function_t::func_vdb },
+ { IXION_ASCII("VLOOKUP"), formula_function_t::func_vlookup },
+ { IXION_ASCII("WAIT"), formula_function_t::func_wait },
+ { IXION_ASCII("WEBSERVICE"), formula_function_t::func_webservice },
+ { IXION_ASCII("WEEKDAY"), formula_function_t::func_weekday },
+ { IXION_ASCII("WEEKNUM"), formula_function_t::func_weeknum },
+ { IXION_ASCII("WEIBULL"), formula_function_t::func_weibull },
+ { IXION_ASCII("XOR"), formula_function_t::func_xor },
+ { IXION_ASCII("YEAR"), formula_function_t::func_year },
+ { IXION_ASCII("ZTEST"), formula_function_t::func_ztest },
+};
+
+const map_type& get()
+{
+ static map_type mt(entries, std::size(entries), formula_function_t::func_unknown);
+ return mt;
+}
+
+} // builtin_funcs namespace
+
+constexpr std::string_view unknown_func_name = "unknown";
+
+/**
+ * Traverse all elements of a passed matrix to sum up their values.
+ */
+double sum_matrix_elements(const matrix& mx)
+{
+ double sum = 0.0;
+ size_t rows = mx.row_size();
+ size_t cols = mx.col_size();
+ for (size_t row = 0; row < rows; ++row)
+ for (size_t col = 0; col < cols; ++col)
+ sum += mx.get_numeric(row, col);
+
+ return sum;
+}
+
+numeric_matrix multiply_matrices(const matrix& left, const matrix& right)
+{
+ // The column size of the left matrix must equal the row size of the right
+ // matrix.
+
+ size_t n = left.col_size();
+
+ if (n != right.row_size())
+ throw formula_error(formula_error_t::invalid_expression);
+
+ numeric_matrix left_nm = left.as_numeric();
+ numeric_matrix right_nm = right.as_numeric();
+
+ numeric_matrix output(left_nm.row_size(), right_nm.col_size());
+
+ for (size_t row = 0; row < output.row_size(); ++row)
+ {
+ for (size_t col = 0; col < output.col_size(); ++col)
+ {
+ double v = 0.0;
+ for (size_t i = 0; i < n; ++i)
+ v += left_nm(row, i) * right_nm(i, col);
+
+ output(row, col) = v;
+ }
+ }
+
+ return output;
+}
+
+bool pop_and_check_for_odd_value(formula_value_stack& args)
+{
+ double v = args.pop_value();
+ intmax_t iv = std::trunc(v);
+ iv = std::abs(iv);
+ bool odd = iv & 0x01;
+ return odd;
+}
+
+/**
+ * Pop a single-value argument from the stack and interpret it as a boolean
+ * value if it's either boolean or numeric type, or ignore if it's a string or
+ * error type. The behavior is undefined if called for non-single-value
+ * argument type.
+ */
+std::optional<bool> pop_one_value_as_boolean(const model_context& cxt, formula_value_stack& args)
+{
+ std::optional<bool> ret;
+
+ switch (args.get_type())
+ {
+ case stack_value_t::single_ref:
+ {
+ auto addr = args.pop_single_ref();
+ cell_access ca = cxt.get_cell_access(addr);
+
+ switch (ca.get_value_type())
+ {
+ case cell_value_t::boolean:
+ case cell_value_t::numeric:
+ ret = ca.get_boolean_value();
+ break;
+ default:;
+ }
+
+ break;
+ }
+ case stack_value_t::value:
+ case stack_value_t::boolean:
+ ret = args.pop_boolean();
+ break;
+ case stack_value_t::string:
+ case stack_value_t::error:
+ // ignore string type
+ args.pop_back();
+ break;
+ case stack_value_t::range_ref:
+ case stack_value_t::matrix:
+ // should not be called for non-single value.
+ throw formula_error(formula_error_t::general_error);
+ }
+
+ return ret;
+}
+
+/**
+ * Pop a value from the stack, and insert one or more numeric values to the
+ * specified sequence container.
+ */
+template<typename ContT>
+void append_values_from_stack(
+ const model_context& cxt, formula_value_stack& args, std::back_insert_iterator<ContT> insert_it)
+{
+ static_assert(
+ std::is_floating_point_v<typename ContT::value_type>,
+ "this function only supports a container of floating point values.");
+
+ switch (args.get_type())
+ {
+ case stack_value_t::boolean:
+ case stack_value_t::value:
+ insert_it = args.pop_value();
+ break;
+ case stack_value_t::single_ref:
+ {
+ abs_address_t addr = args.pop_single_ref();
+ auto ca = cxt.get_cell_access(addr);
+ switch (ca.get_value_type())
+ {
+ case cell_value_t::boolean:
+ insert_it = ca.get_boolean_value() ? 1.0 : 0.0;
+ break;
+ case cell_value_t::numeric:
+ insert_it = ca.get_numeric_value();
+ break;
+ default:;
+ }
+ break;
+ }
+ case stack_value_t::range_ref:
+ {
+ const formula_result_wait_policy_t wait_policy = cxt.get_formula_result_wait_policy();
+ abs_range_t range = args.pop_range_ref();
+
+ column_block_callback_t cb = [&insert_it, wait_policy](
+ col_t col, row_t row1, row_t row2, const column_block_shape_t& node)
+ {
+ assert(row1 <= row2);
+ row_t length = row2 - row1 + 1;
+
+ switch (node.type)
+ {
+ case column_block_t::boolean:
+ {
+ auto blk_range = detail::make_element_range<column_block_t::boolean>{}(node, length);
+ auto func = [](bool b) { return b ? 1.0 : 0.0; };
+ std::transform(blk_range.begin(), blk_range.end(), insert_it, func);
+ break;
+ }
+ case column_block_t::numeric:
+ {
+ auto blk_range = detail::make_element_range<column_block_t::numeric>{}(node, length);
+ std::copy(blk_range.begin(), blk_range.end(), insert_it);
+ break;
+ }
+ case column_block_t::formula:
+ {
+ auto blk_range = detail::make_element_range<column_block_t::formula>{}(node, length);
+
+ for (const formula_cell* fc : blk_range)
+ {
+ formula_result res = fc->get_result_cache(wait_policy);
+ switch (res.get_type())
+ {
+ case formula_result::result_type::boolean:
+ insert_it = res.get_boolean() ? 1.0 : 0.0;
+ break;
+ case formula_result::result_type::value:
+ insert_it = res.get_value();
+ break;
+ default:;
+ }
+ }
+
+ break;
+ }
+ default:;
+ }
+ return true;
+ };
+
+ for (sheet_t sheet = range.first.sheet; sheet <= range.last.sheet; ++sheet)
+ cxt.walk(sheet, range, cb);
+
+ break;
+ }
+ default:
+ args.pop_back();
+ }
+}
+
+} // anonymous namespace
+
+// ============================================================================
+
+formula_functions::invalid_arg::invalid_arg(const std::string& msg) :
+ general_error(msg) {}
+
+formula_function_t formula_functions::get_function_opcode(const formula_token& token)
+{
+ assert(token.opcode == fop_function);
+ return std::get<formula_function_t>(token.value);
+}
+
+formula_function_t formula_functions::get_function_opcode(std::string_view s)
+{
+ std::string upper;
+
+ for (char c : s)
+ {
+ if (c > 'Z')
+ {
+ // Convert to upper case.
+ c -= 'a' - 'A';
+ }
+
+ upper.push_back(c);
+ }
+
+ return builtin_funcs::get().find(upper.data(), upper.size());
+}
+
+std::string_view formula_functions::get_function_name(formula_function_t oc)
+{
+ for (const builtin_funcs::map_type::entry& e : builtin_funcs::entries)
+ {
+ if (e.value == oc)
+ return e.key;
+ }
+ return unknown_func_name;
+}
+
+formula_functions::formula_functions(model_context& cxt, const abs_address_t& pos) :
+ m_context(cxt), m_pos(pos)
+{
+}
+
+formula_functions::~formula_functions()
+{
+}
+
+void formula_functions::interpret(formula_function_t oc, formula_value_stack& args)
+{
+ try
+ {
+ switch (oc)
+ {
+ case formula_function_t::func_abs:
+ fnc_abs(args);
+ break;
+ case formula_function_t::func_and:
+ fnc_and(args);
+ break;
+ case formula_function_t::func_average:
+ fnc_average(args);
+ break;
+ case formula_function_t::func_column:
+ fnc_column(args);
+ break;
+ case formula_function_t::func_columns:
+ fnc_columns(args);
+ break;
+ case formula_function_t::func_concatenate:
+ fnc_concatenate(args);
+ break;
+ case formula_function_t::func_count:
+ fnc_count(args);
+ break;
+ case formula_function_t::func_counta:
+ fnc_counta(args);
+ break;
+ case formula_function_t::func_countblank:
+ fnc_countblank(args);
+ break;
+ case formula_function_t::func_exact:
+ fnc_exact(args);
+ break;
+ case formula_function_t::func_false:
+ fnc_false(args);
+ break;
+ case formula_function_t::func_find:
+ fnc_find(args);
+ break;
+ case formula_function_t::func_if:
+ fnc_if(args);
+ break;
+ case formula_function_t::func_isblank:
+ fnc_isblank(args);
+ break;
+ case formula_function_t::func_iserror:
+ fnc_iserror(args);
+ break;
+ case formula_function_t::func_iseven:
+ fnc_iseven(args);
+ break;
+ case formula_function_t::func_isformula:
+ fnc_isformula(args);
+ break;
+ case formula_function_t::func_islogical:
+ fnc_islogical(args);
+ break;
+ case formula_function_t::func_isna:
+ fnc_isna(args);
+ break;
+ case formula_function_t::func_isnontext:
+ fnc_isnontext(args);
+ break;
+ case formula_function_t::func_isnumber:
+ fnc_isnumber(args);
+ break;
+ case formula_function_t::func_isodd:
+ fnc_isodd(args);
+ break;
+ case formula_function_t::func_isref:
+ fnc_isref(args);
+ break;
+ case formula_function_t::func_istext:
+ fnc_istext(args);
+ break;
+ case formula_function_t::func_int:
+ fnc_int(args);
+ break;
+ case formula_function_t::func_left:
+ fnc_left(args);
+ break;
+ case formula_function_t::func_len:
+ fnc_len(args);
+ break;
+ case formula_function_t::func_max:
+ fnc_max(args);
+ break;
+ case formula_function_t::func_median:
+ fnc_median(args);
+ break;
+ case formula_function_t::func_mid:
+ fnc_mid(args);
+ break;
+ case formula_function_t::func_min:
+ fnc_min(args);
+ break;
+ case formula_function_t::func_mmult:
+ fnc_mmult(args);
+ break;
+ case formula_function_t::func_mode:
+ fnc_mode(args);
+ break;
+ case formula_function_t::func_n:
+ fnc_n(args);
+ break;
+ case formula_function_t::func_na:
+ fnc_na(args);
+ break;
+ case formula_function_t::func_not:
+ fnc_not(args);
+ break;
+ case formula_function_t::func_now:
+ fnc_now(args);
+ break;
+ case formula_function_t::func_or:
+ fnc_or(args);
+ break;
+ case formula_function_t::func_pi:
+ fnc_pi(args);
+ break;
+ case formula_function_t::func_replace:
+ fnc_replace(args);
+ break;
+ case formula_function_t::func_rept:
+ fnc_rept(args);
+ break;
+ case formula_function_t::func_right:
+ fnc_right(args);
+ break;
+ case formula_function_t::func_row:
+ fnc_row(args);
+ break;
+ case formula_function_t::func_rows:
+ fnc_rows(args);
+ break;
+ case formula_function_t::func_sheet:
+ fnc_sheet(args);
+ break;
+ case formula_function_t::func_sheets:
+ fnc_sheets(args);
+ break;
+ case formula_function_t::func_substitute:
+ fnc_substitute(args);
+ break;
+ case formula_function_t::func_subtotal:
+ fnc_subtotal(args);
+ break;
+ case formula_function_t::func_sum:
+ fnc_sum(args);
+ break;
+ case formula_function_t::func_t:
+ fnc_t(args);
+ break;
+ case formula_function_t::func_textjoin:
+ fnc_textjoin(args);
+ break;
+ case formula_function_t::func_trim:
+ fnc_trim(args);
+ break;
+ case formula_function_t::func_true:
+ fnc_true(args);
+ break;
+ case formula_function_t::func_type:
+ fnc_type(args);
+ break;
+ case formula_function_t::func_wait:
+ fnc_wait(args);
+ break;
+ case formula_function_t::func_unknown:
+ default:
+ {
+ std::ostringstream os;
+ os << "formula function not implemented yet (name="
+ << get_formula_function_name(oc)
+ << ")";
+ throw not_implemented_error(os.str());
+ }
+ }
+ }
+ catch (const formula_error& e)
+ {
+ using t = std::underlying_type<formula_error_t>::type;
+ formula_error_t err = e.get_error();
+ if (static_cast<t>(err) >= 200u)
+ // re-throw if it's an internal error.
+ throw;
+
+ args.clear();
+ args.push_error(err);
+ }
+}
+
+void formula_functions::fnc_max(formula_value_stack& args) const
+{
+ if (args.empty())
+ throw formula_functions::invalid_arg("MAX requires one or more arguments.");
+
+ double ret = args.pop_value();
+ while (!args.empty())
+ {
+ double v = args.pop_value();
+ if (v > ret)
+ ret = v;
+ }
+ args.push_value(ret);
+}
+
+void formula_functions::fnc_median(formula_value_stack& args) const
+{
+ if (args.empty())
+ throw formula_functions::invalid_arg("MEDIAN requires one or more arguments.");
+
+ std::vector<double> seq;
+
+ while (!args.empty())
+ append_values_from_stack(m_context, args, std::back_inserter(seq));
+
+ std::size_t mid_pos = seq.size() / 2;
+
+ if (seq.size() & 0x01)
+ {
+ // odd number of values
+ auto it_mid = seq.begin() + mid_pos;
+ std::nth_element(seq.begin(), it_mid, seq.end());
+ args.push_value(seq[mid_pos]);
+ }
+ else
+ {
+ // even number of values. Take the average of the two mid values.
+ std::sort(seq.begin(), seq.end());
+ double v = seq[mid_pos - 1] + seq[mid_pos];
+ args.push_value(v / 2.0);
+ }
+}
+
+void formula_functions::fnc_min(formula_value_stack& args) const
+{
+ if (args.empty())
+ throw formula_functions::invalid_arg("MIN requires one or more arguments.");
+
+ double ret = args.pop_value();
+ while (!args.empty())
+ {
+ double v = args.pop_value();
+ if (v < ret)
+ ret = v;
+ }
+ args.push_value(ret);
+}
+
+void formula_functions::fnc_mode(formula_value_stack& args) const
+{
+ if (args.empty())
+ throw formula_functions::invalid_arg("MODE requires one or more arguments.");
+
+ std::vector<double> seq;
+
+ while (!args.empty())
+ append_values_from_stack(m_context, args, std::back_inserter(seq));
+
+ if (seq.empty())
+ {
+ args.push_error(formula_error_t::no_value_available);
+ return;
+ }
+
+ std::sort(seq.begin(), seq.end());
+
+ // keep counting the number of adjacent equal values in the sorted sequence.
+
+ using value_count_type = std::tuple<double, std::size_t>;
+ std::vector<value_count_type> value_counts;
+
+ for (auto it = seq.begin(); it != seq.end(); )
+ {
+ double cur_v = *it;
+ auto it_tail = std::find_if(it, seq.end(), [cur_v](double v) { return cur_v < v; });
+ std::size_t len = std::distance(it, it_tail);
+ value_counts.emplace_back(cur_v, len);
+ it = it_tail;
+ }
+
+ assert(!value_counts.empty());
+
+ // Sort the results by the frequency in descending order first, then the
+ // value in ascending order.
+ auto func_comp = [](value_count_type lhs, value_count_type rhs)
+ {
+ if (std::get<1>(lhs) > std::get<1>(rhs))
+ return true;
+
+ return std::get<0>(lhs) < std::get<0>(rhs);
+ };
+
+ std::sort(value_counts.begin(), value_counts.end(), func_comp);
+ auto [top_value, top_count] = value_counts[0];
+
+ if (top_count == 1)
+ {
+ args.push_error(formula_error_t::no_value_available);
+ return;
+ }
+
+ args.push_value(top_value);
+}
+
+void formula_functions::fnc_sum(formula_value_stack& args) const
+{
+ IXION_TRACE("function: sum");
+
+ if (args.empty())
+ throw formula_functions::invalid_arg("SUM requires one or more arguments.");
+
+ double ret = 0;
+ while (!args.empty())
+ {
+ switch (args.get_type())
+ {
+ case stack_value_t::range_ref:
+ ret += sum_matrix_elements(args.pop_range_value());
+ break;
+ case stack_value_t::single_ref:
+ case stack_value_t::string:
+ case stack_value_t::value:
+ default:
+ ret += args.pop_value();
+ }
+ }
+
+ args.push_value(ret);
+
+ IXION_TRACE("function: sum end (result=" << ret << ")");
+}
+
+void formula_functions::fnc_count(formula_value_stack& args) const
+{
+ double ret = 0;
+
+ while (!args.empty())
+ {
+ switch (args.get_type())
+ {
+ case stack_value_t::value:
+ args.pop_back();
+ ++ret;
+ break;
+ case stack_value_t::range_ref:
+ {
+ abs_range_t range = args.pop_range_ref();
+ ret += m_context.count_range(range, value_numeric | value_boolean);
+ break;
+ }
+ case stack_value_t::single_ref:
+ {
+ abs_address_t pos = args.pop_single_ref();
+ abs_range_t range;
+ range.first = range.last = pos;
+ ret += m_context.count_range(range, value_numeric | value_boolean);
+ break;
+ }
+ default:
+ args.pop_back();
+ }
+ }
+
+ args.push_value(ret);
+}
+
+void formula_functions::fnc_counta(formula_value_stack& args) const
+{
+ double ret = 0;
+
+ while (!args.empty())
+ {
+ switch (args.get_type())
+ {
+ case stack_value_t::string:
+ case stack_value_t::value:
+ args.pop_back();
+ ++ret;
+ break;
+ case stack_value_t::range_ref:
+ {
+ abs_range_t range = args.pop_range_ref();
+ ret += m_context.count_range(range, value_numeric | value_boolean | value_string);
+ break;
+ }
+ case stack_value_t::single_ref:
+ {
+ abs_address_t pos = args.pop_single_ref();
+ abs_range_t range;
+ range.first = range.last = pos;
+ ret += m_context.count_range(range, value_numeric | value_boolean | value_string);
+ break;
+ }
+ default:
+ args.pop_back();
+ }
+
+ }
+
+ args.push_value(ret);
+}
+
+void formula_functions::fnc_countblank(formula_value_stack& args) const
+{
+ if (args.size() != 1)
+ throw formula_functions::invalid_arg("COUNTBLANK requires exactly 1 argument.");
+
+ switch (args.get_type())
+ {
+ case stack_value_t::single_ref:
+ case stack_value_t::range_ref:
+ {
+ abs_range_t range = args.pop_range_ref();
+ double ret = m_context.count_range(range, value_empty);
+ args.push_value(ret);
+ break;
+ }
+ default:
+ throw formula_functions::invalid_arg("COUNTBLANK only takes a reference argument.");
+ }
+}
+
+void formula_functions::fnc_abs(formula_value_stack& args) const
+{
+ if (args.size() != 1)
+ throw formula_functions::invalid_arg("ABS requires exactly 1 argument.");
+
+ double v = args.pop_value();
+ args.push_value(std::abs(v));
+}
+
+void formula_functions::fnc_average(formula_value_stack& args) const
+{
+ if (args.empty())
+ throw formula_functions::invalid_arg("AVERAGE requires one or more arguments.");
+
+ double ret = 0;
+ double count = 0.0;
+ while (!args.empty())
+ {
+ switch (args.get_type())
+ {
+ case stack_value_t::range_ref:
+ {
+ matrix mx = args.pop_range_value();
+ size_t rows = mx.row_size();
+ size_t cols = mx.col_size();
+
+ for (size_t r = 0; r < rows; ++r)
+ {
+ for (size_t c = 0; c < cols; ++c)
+ {
+ if (!mx.is_numeric(r, c))
+ continue;
+
+ ret += mx.get_numeric(r, c);
+ ++count;
+ }
+ }
+ break;
+ }
+ case stack_value_t::single_ref:
+ case stack_value_t::string:
+ case stack_value_t::value:
+ default:
+ ret += args.pop_value();
+ ++count;
+ }
+ }
+
+ args.push_value(ret/count);
+}
+
+void formula_functions::fnc_mmult(formula_value_stack& args) const
+{
+ matrix mx[2];
+ matrix* mxp = mx;
+ const matrix* mxp_end = mxp + 2;
+
+ bool is_arg_invalid = false;
+
+ // NB : the stack is LIFO i.e. the first matrix is the right matrix and
+ // the second one is the left one.
+
+ while (!args.empty())
+ {
+ if (mxp == mxp_end)
+ {
+ is_arg_invalid = true;
+ break;
+ }
+
+ auto m = args.maybe_pop_matrix();
+ if (!m)
+ {
+ is_arg_invalid = true;
+ break;
+ }
+
+ mxp->swap(*m);
+ ++mxp;
+ }
+
+ if (mxp != mxp_end)
+ is_arg_invalid = true;
+
+ if (is_arg_invalid)
+ throw formula_functions::invalid_arg("MMULT requires exactly two ranges.");
+
+ mx[0].swap(mx[1]); // Make it so that 0 -> left and 1 -> right.
+
+ if (!mx[0].is_numeric() || !mx[1].is_numeric())
+ throw formula_functions::invalid_arg(
+ "MMULT requires two numeric ranges. At least one range is not numeric.");
+
+ numeric_matrix ans = multiply_matrices(mx[0], mx[1]);
+
+ args.push_matrix(ans);
+}
+
+void formula_functions::fnc_pi(formula_value_stack& args) const
+{
+ if (!args.empty())
+ throw formula_functions::invalid_arg("PI takes no arguments.");
+
+ args.push_value(M_PI);
+}
+
+void formula_functions::fnc_int(formula_value_stack& args) const
+{
+ if (args.size() != 1)
+ throw formula_functions::invalid_arg("INT requires exactly 1 argument.");
+
+ double v = args.pop_value();
+ args.push_value(std::floor(v));
+}
+
+void formula_functions::fnc_and(formula_value_stack& args) const
+{
+ const formula_result_wait_policy_t wait_policy = m_context.get_formula_result_wait_policy();
+ bool final_result = true;
+
+ while (!args.empty() && final_result)
+ {
+ switch (args.get_type())
+ {
+ case stack_value_t::single_ref:
+ case stack_value_t::value:
+ case stack_value_t::string:
+ {
+ std::optional<bool> v = pop_one_value_as_boolean(m_context, args);
+ if (v)
+ final_result = *v;
+ break;
+ }
+ case stack_value_t::range_ref:
+ {
+ auto range = args.pop_range_ref();
+ sheet_t sheet = range.first.sheet;
+ abs_rc_range_t rc_range = range;
+
+ column_block_callback_t cb = [&final_result, wait_policy](
+ col_t col, row_t row1, row_t row2, const column_block_shape_t& node)
+ {
+ assert(row1 <= row2);
+ row_t length = row2 - row1 + 1;
+
+ switch (node.type)
+ {
+ case column_block_t::empty:
+ case column_block_t::string:
+ case column_block_t::unknown:
+ // non-numeric blocks get skipped.
+ break;
+ case column_block_t::boolean:
+ {
+ auto blk_range = detail::make_element_range<column_block_t::boolean>{}(node, length);
+ bool res = std::all_of(blk_range.begin(), blk_range.end(), [](bool v) { return v; });
+ final_result = res;
+ break;
+ }
+ case column_block_t::numeric:
+ {
+ auto blk_range = detail::make_element_range<column_block_t::numeric>{}(node, length);
+ bool res = std::all_of(blk_range.begin(), blk_range.end(), [](double v) { return v != 0.0; });
+ final_result = res;
+ break;
+ }
+ case column_block_t::formula:
+ {
+ auto blk_range = detail::make_element_range<column_block_t::formula>{}(node, length);
+
+ for (const formula_cell* fc : blk_range)
+ {
+ formula_result res = fc->get_result_cache(wait_policy);
+ switch (res.get_type())
+ {
+ case formula_result::result_type::boolean:
+ final_result = res.get_boolean();
+ break;
+ case formula_result::result_type::value:
+ final_result = res.get_value() != 0.0;
+ break;
+ default:;
+ }
+ }
+
+ break;
+ }
+ }
+
+ return final_result; // returning false will end the walk.
+ };
+
+ m_context.walk(sheet, rc_range, cb);
+ break;
+ }
+ default:
+ throw formula_error(formula_error_t::general_error);
+ }
+ }
+
+ args.clear();
+ args.push_boolean(final_result);
+}
+
+void formula_functions::fnc_or(formula_value_stack& args) const
+{
+ const formula_result_wait_policy_t wait_policy = m_context.get_formula_result_wait_policy();
+ bool final_result = false;
+
+ while (!args.empty())
+ {
+ bool this_result = false;
+
+ switch (args.get_type())
+ {
+ case stack_value_t::single_ref:
+ case stack_value_t::value:
+ case stack_value_t::string:
+ {
+ std::optional<bool> v = pop_one_value_as_boolean(m_context, args);
+ if (v)
+ this_result = *v;
+ break;
+ }
+ case stack_value_t::range_ref:
+ {
+ auto range = args.pop_range_ref();
+ sheet_t sheet = range.first.sheet;
+ abs_rc_range_t rc_range = range;
+
+ // We will bail out of the walk on the first positive result.
+
+ column_block_callback_t cb = [&this_result, wait_policy](
+ col_t col, row_t row1, row_t row2, const column_block_shape_t& node)
+ {
+ assert(row1 <= row2);
+ row_t length = row2 - row1 + 1;
+
+ switch (node.type)
+ {
+ case column_block_t::empty:
+ case column_block_t::string:
+ case column_block_t::unknown:
+ // non-numeric blocks get skipped.
+ break;
+ case column_block_t::boolean:
+ {
+ auto blk_range = detail::make_element_range<column_block_t::boolean>{}(node, length);
+ this_result = std::any_of(blk_range.begin(), blk_range.end(), [](bool v) { return v; });
+ break;
+ }
+ case column_block_t::numeric:
+ {
+ auto blk_range = detail::make_element_range<column_block_t::numeric>{}(node, length);
+ this_result = std::any_of(blk_range.begin(), blk_range.end(), [](double v) { return v != 0.0; });
+ break;
+ }
+ case column_block_t::formula:
+ {
+ auto blk_range = detail::make_element_range<column_block_t::formula>{}(node, length);
+
+ for (const formula_cell* fc : blk_range)
+ {
+ formula_result res = fc->get_result_cache(wait_policy);
+ switch (res.get_type())
+ {
+ case formula_result::result_type::boolean:
+ this_result = res.get_boolean();
+ break;
+ case formula_result::result_type::value:
+ this_result = res.get_value() != 0.0;
+ break;
+ default:;
+ }
+
+ if (this_result)
+ break;
+ }
+
+ break;
+ }
+ }
+
+ return !this_result; // returning false will end the walk.
+ };
+
+ m_context.walk(sheet, rc_range, cb);
+ break;
+ }
+ default:
+ throw formula_error(formula_error_t::general_error);
+ }
+
+ if (this_result)
+ {
+ final_result = true;
+ break;
+ }
+ }
+
+ args.clear();
+ args.push_boolean(final_result);
+}
+
+void formula_functions::fnc_if(formula_value_stack& args) const
+{
+ if (args.size() != 3)
+ throw formula_functions::invalid_arg("IF requires exactly 3 arguments.");
+
+ formula_value_stack::iterator pos = args.begin();
+ bool eval = args.get_value(0) != 0.0;
+ if (eval)
+ std::advance(pos, 1);
+ else
+ std::advance(pos, 2);
+
+ formula_value_stack ret(m_context);
+ ret.push_back(args.release(pos));
+ args.swap(ret);
+}
+
+void formula_functions::fnc_true(formula_value_stack& args) const
+{
+ if (!args.empty())
+ throw formula_functions::invalid_arg("TRUE takes no arguments.");
+
+ args.push_boolean(true);
+}
+
+void formula_functions::fnc_false(formula_value_stack& args) const
+{
+ if (!args.empty())
+ throw formula_functions::invalid_arg("FALSE takes no arguments.");
+
+ args.push_boolean(false);
+}
+
+void formula_functions::fnc_not(formula_value_stack& args) const
+{
+ if (args.size() != 1)
+ throw formula_functions::invalid_arg("NOT requires exactly one argument.");
+
+ args.push_boolean(!args.pop_boolean());
+}
+
+void formula_functions::fnc_isblank(formula_value_stack& args) const
+{
+ if (args.size() != 1)
+ throw formula_functions::invalid_arg("ISBLANK requires exactly one argument.");
+
+ switch (args.get_type())
+ {
+ case stack_value_t::single_ref:
+ {
+ abs_address_t addr = args.pop_single_ref();
+ bool res = m_context.get_celltype(addr) == celltype_t::empty;
+ args.push_boolean(res);
+ break;
+ }
+ case stack_value_t::range_ref:
+ {
+ abs_range_t range = args.pop_range_ref();
+ bool res = m_context.is_empty(range);
+ args.push_boolean(res);
+ break;
+ }
+ default:
+ {
+ args.clear();
+ args.push_boolean(false);
+ }
+ }
+}
+
+void formula_functions::fnc_iserror(formula_value_stack& args) const
+{
+ if (args.size() != 1)
+ throw formula_functions::invalid_arg("ISERROR requires exactly one argument.");
+
+ switch (args.get_type())
+ {
+ case stack_value_t::single_ref:
+ {
+ abs_address_t addr = args.pop_single_ref();
+ bool res = m_context.get_cell_value_type(addr) == cell_value_t::error;
+ args.push_boolean(res);
+ break;
+ }
+ case stack_value_t::error:
+ {
+ args.clear();
+ args.push_boolean(true);
+ break;
+ }
+ default:
+ {
+ args.clear();
+ args.push_boolean(false);
+ }
+ }
+}
+
+void formula_functions::fnc_iseven(formula_value_stack& args) const
+{
+ if (args.size() != 1)
+ throw formula_functions::invalid_arg("ISEVEN requires exactly one argument.");
+
+ bool odd = pop_and_check_for_odd_value(args);
+ args.push_boolean(!odd);
+}
+
+void formula_functions::fnc_isformula(formula_value_stack& args) const
+{
+ if (args.size() != 1)
+ throw formula_functions::invalid_arg("ISFORMULA requires exactly one argument.");
+
+ if (args.get_type() != stack_value_t::single_ref)
+ {
+ args.clear();
+ args.push_boolean(false);
+ return;
+ }
+
+ abs_address_t addr = args.pop_single_ref();
+ bool res = m_context.get_celltype(addr) == celltype_t::formula;
+ args.push_boolean(res);
+}
+
+void formula_functions::fnc_islogical(formula_value_stack& args) const
+{
+ if (args.size() != 1)
+ throw formula_functions::invalid_arg("ISLOGICAL requires exactly one argument.");
+
+ switch (args.get_type())
+ {
+ case stack_value_t::single_ref:
+ {
+ abs_address_t addr = args.pop_single_ref();
+ bool res = m_context.get_cell_value_type(addr) == cell_value_t::boolean;
+ args.push_boolean(res);
+ break;
+ }
+ case stack_value_t::boolean:
+ args.clear();
+ args.push_boolean(true);
+ break;
+ default:
+ args.clear();
+ args.push_boolean(false);
+ }
+}
+
+void formula_functions::fnc_isna(formula_value_stack& args) const
+{
+ if (args.size() != 1u)
+ throw formula_functions::invalid_arg("ISNA requires exactly one argument.");
+
+ switch (args.get_type())
+ {
+ case stack_value_t::single_ref:
+ {
+ abs_address_t addr = args.pop_single_ref();
+ auto ca = m_context.get_cell_access(addr);
+ formula_error_t err = ca.get_error_value();
+ args.push_boolean(err == formula_error_t::no_value_available);
+ break;
+ }
+ case stack_value_t::error:
+ {
+ bool res = args.pop_error() == formula_error_t::no_value_available;
+ args.push_boolean(res);
+ break;
+ }
+ default:
+ {
+ args.clear();
+ args.push_boolean(false);
+ }
+ }
+}
+
+void formula_functions::fnc_isnontext(formula_value_stack& args) const
+{
+ if (args.size() != 1)
+ throw formula_functions::invalid_arg("ISNONTEXT requires exactly one argument.");
+
+ switch (args.get_type())
+ {
+ case stack_value_t::single_ref:
+ {
+ abs_address_t addr = args.pop_single_ref();
+ bool res = m_context.get_cell_value_type(addr) != cell_value_t::string;
+ args.push_boolean(res);
+ break;
+ }
+ case stack_value_t::string:
+ args.clear();
+ args.push_boolean(false);
+ break;
+ default:
+ args.clear();
+ args.push_boolean(true);
+ }
+}
+
+void formula_functions::fnc_isnumber(formula_value_stack& args) const
+{
+ if (args.size() != 1)
+ throw formula_functions::invalid_arg("ISNUMBER requires exactly one argument.");
+
+ switch (args.get_type())
+ {
+ case stack_value_t::single_ref:
+ {
+ abs_address_t addr = args.pop_single_ref();
+ bool res = m_context.get_cell_value_type(addr) == cell_value_t::numeric;
+ args.push_boolean(res);
+ break;
+ }
+ case stack_value_t::value:
+ args.clear();
+ args.push_boolean(true);
+ break;
+ default:
+ args.clear();
+ args.push_boolean(false);
+ }
+}
+
+void formula_functions::fnc_isodd(formula_value_stack& args) const
+{
+ if (args.size() != 1)
+ throw formula_functions::invalid_arg("ISODD requires exactly one argument.");
+
+ bool odd = pop_and_check_for_odd_value(args);
+ args.push_boolean(odd);
+}
+
+void formula_functions::fnc_isref(formula_value_stack& args) const
+{
+ if (args.size() != 1)
+ throw formula_functions::invalid_arg("ISREF requires exactly one argument.");
+
+ switch (args.get_type())
+ {
+ case stack_value_t::single_ref:
+ case stack_value_t::range_ref:
+ args.clear();
+ args.push_boolean(true);
+ break;
+ default:
+ args.clear();
+ args.push_boolean(false);
+ }
+}
+
+void formula_functions::fnc_istext(formula_value_stack& args) const
+{
+ if (args.size() != 1)
+ throw formula_functions::invalid_arg("ISTEXT requires exactly one argument.");
+
+ switch (args.get_type())
+ {
+ case stack_value_t::single_ref:
+ {
+ abs_address_t addr = args.pop_single_ref();
+ bool res = m_context.get_cell_value_type(addr) == cell_value_t::string;
+ args.push_boolean(res);
+ break;
+ }
+ case stack_value_t::string:
+ args.clear();
+ args.push_boolean(true);
+ break;
+ default:
+ args.clear();
+ args.push_boolean(false);
+ }
+}
+
+void formula_functions::fnc_n(formula_value_stack& args) const
+{
+ if (args.size() != 1u)
+ throw formula_functions::invalid_arg("N takes exactly one argument.");
+
+ double v = args.pop_value();
+ args.push_value(v);
+}
+
+void formula_functions::fnc_na(formula_value_stack& args) const
+{
+ if (!args.empty())
+ throw formula_functions::invalid_arg("NA takes no arguments.");
+
+ args.push_error(formula_error_t::no_value_available);
+}
+
+void formula_functions::fnc_type(formula_value_stack& args) const
+{
+ if (args.size() != 1u)
+ throw formula_functions::invalid_arg("TYPE requires exactly one argument.");
+
+ switch (args.get_type())
+ {
+ case stack_value_t::boolean:
+ args.pop_back();
+ args.push_value(4);
+ break;
+ case stack_value_t::error:
+ args.pop_back();
+ args.push_value(16);
+ break;
+ case stack_value_t::matrix:
+ case stack_value_t::range_ref:
+ args.pop_back();
+ args.push_value(64);
+ break;
+ case stack_value_t::string:
+ args.pop_back();
+ args.push_value(2);
+ break;
+ case stack_value_t::value:
+ args.pop_back();
+ args.push_value(1);
+ break;
+ case stack_value_t::single_ref:
+ {
+ abs_address_t addr = args.pop_single_ref();
+ cell_access ca = m_context.get_cell_access(addr);
+
+ switch (ca.get_value_type())
+ {
+ case cell_value_t::boolean:
+ args.push_value(4);
+ break;
+ case cell_value_t::empty:
+ case cell_value_t::numeric:
+ args.push_value(1);
+ break;
+ case cell_value_t::error:
+ args.push_value(16);
+ break;
+ case cell_value_t::string:
+ args.push_value(2);
+ break;
+ case cell_value_t::unknown:
+ throw formula_error(formula_error_t::no_result_error);
+ }
+
+ break;
+ }
+ }
+}
+
+void formula_functions::fnc_len(formula_value_stack& args) const
+{
+ if (args.size() != 1)
+ throw formula_functions::invalid_arg("LEN requires exactly one argument.");
+
+ std::string s = args.pop_string();
+
+ auto positions = detail::calc_utf8_byte_positions(s);
+ args.push_value(positions.size());
+}
+
+void formula_functions::fnc_mid(formula_value_stack& args) const
+{
+ if (args.size() != 3)
+ throw formula_functions::invalid_arg("MID requires exactly 3 arguments.");
+
+ int len = std::floor(args.pop_value());
+ int start = std::floor(args.pop_value()); // 1-based
+
+ if (len < 0 || start < 1)
+ {
+ args.clear();
+ args.push_error(formula_error_t::invalid_value_type);
+ return;
+ }
+
+ std::string s = args.pop_string();
+
+ auto positions = detail::calc_utf8_byte_positions(s);
+
+ start -= 1; // convert to 0-based start position
+
+ if (std::size_t(start) >= positions.size())
+ {
+ args.push_string(std::string{});
+ return;
+ }
+
+ std::size_t skip_front = positions[start];
+ std::size_t skip_back = 0;
+
+ int max_length = positions.size() - start;
+ if (len < max_length)
+ skip_back = s.size() - positions[start + len];
+
+ auto it_head = s.cbegin() + skip_front;
+ auto it_end = s.cend() - skip_back;
+
+ std::string truncated;
+ std::copy(it_head, it_end, std::back_inserter(truncated));
+ args.push_string(truncated);
+}
+
+void formula_functions::fnc_concatenate(formula_value_stack& args) const
+{
+ std::string s;
+ while (!args.empty())
+ s = args.pop_string() + s;
+ args.push_string(std::move(s));
+}
+
+void formula_functions::fnc_exact(formula_value_stack& args) const
+{
+ if (args.size() != 2u)
+ throw formula_functions::invalid_arg("EXACT requires exactly 2 arguments.");
+
+ std::string right = args.pop_string();
+ std::string left = args.pop_string();
+
+ return args.push_boolean(right == left);
+}
+
+void formula_functions::fnc_find(formula_value_stack& args) const
+{
+ if (args.size() < 2u || args.size() > 3u)
+ throw formula_functions::invalid_arg("FIND requires at least 2 and no more than 3 arguments.");
+
+ int start_pos = 0;
+ if (args.size() == 3u)
+ start_pos = std::floor(args.pop_value()) - 1; // to 0-based
+
+ if (start_pos < 0)
+ {
+ args.clear();
+ args.push_error(formula_error_t::invalid_value_type);
+ return;
+ }
+
+ std::string content = args.pop_string();
+ std::string part = args.pop_string();
+
+ auto positions = detail::calc_utf8_byte_positions(content);
+
+ // convert the logical utf-8 start position to a corresponding byte start position
+
+ if (std::size_t(start_pos) >= positions.size())
+ {
+ args.push_error(formula_error_t::invalid_value_type);
+ return;
+ }
+
+ start_pos = positions[start_pos];
+ std::size_t pos = content.find(part, start_pos);
+
+ if (pos == std::string::npos)
+ {
+ args.push_error(formula_error_t::invalid_value_type);
+ return;
+ }
+
+ // convert the byte position to a logical utf-8 character position.
+ auto it = std::lower_bound(positions.begin(), positions.end(), pos);
+
+ if (it == positions.end() || *it != pos)
+ {
+ // perhaps invalid utf-8 string...
+ args.push_error(formula_error_t::invalid_value_type);
+ return;
+ }
+
+ pos = std::distance(positions.begin(), it);
+ args.push_value(pos + 1); // back to 1-based
+}
+
+void formula_functions::fnc_left(formula_value_stack& args) const
+{
+ if (args.empty() || args.size() > 2)
+ throw formula_functions::invalid_arg(
+ "LEFT requires at least one argument but no more than 2.");
+
+ int n = 1; // when the 2nd arg is skipped, it defaults to 1.
+ if (args.size() == 2)
+ n = std::floor(args.pop_value());
+
+ if (n < 0)
+ {
+ args.clear();
+ args.push_error(formula_error_t::invalid_value_type);
+ return;
+ }
+
+ std::string s = args.pop_string();
+
+ auto positions = detail::calc_utf8_byte_positions(s);
+
+ // Resize ONLY when the desired length is lower than the original string length.
+ if (std::size_t(n) < positions.size())
+ s.resize(positions[n]);
+
+ args.push_string(std::move(s));
+}
+
+void formula_functions::fnc_replace(formula_value_stack& args) const
+{
+ if (args.size() != 4u)
+ throw formula_functions::invalid_arg("REPLACE requires exactly 4 arguments.");
+
+ std::string new_text = args.pop_string();
+ int n_segment = std::floor(args.pop_value());
+ int pos_segment = std::floor(args.pop_value()) - 1; // to 0-based
+
+ if (n_segment < 0 || pos_segment < 0)
+ {
+ args.clear();
+ args.push_error(formula_error_t::invalid_value_type);
+ return;
+ }
+
+ std::string content = args.pop_string();
+
+ auto positions = detail::calc_utf8_byte_positions(content);
+
+ pos_segment = std::min<int>(pos_segment, positions.size());
+ n_segment = std::min<int>(n_segment, positions.size() - pos_segment);
+
+ // convert to its byte position.
+ std::size_t pos_bytes = std::size_t(pos_segment) < positions.size() ? positions[pos_segment] : content.size();
+
+ // copy the leading segment.
+ auto it = std::next(content.begin(), pos_bytes);
+ std::string content_new{content.begin(), it};
+
+ content_new += new_text;
+
+ // copy the trailing segment.
+ std::size_t pos_logical = pos_segment + n_segment;
+ pos_bytes = pos_logical < positions.size() ? positions[pos_logical] : content.size();
+ it = std::next(content.begin(), pos_bytes);
+ std::copy(it, content.end(), std::back_inserter(content_new));
+
+ args.push_string(content_new);
+}
+
+void formula_functions::fnc_rept(formula_value_stack& args) const
+{
+ if (args.size() != 2u)
+ throw formula_functions::invalid_arg("REPT requires 2 arguments.");
+
+ int count = args.pop_value();
+ if (count < 0)
+ {
+ args.clear();
+ args.push_error(formula_error_t::invalid_value_type);
+ return;
+ }
+
+ std::string s = args.pop_string();
+ std::ostringstream os;
+ for (int i = 0; i < count; ++i)
+ os << s;
+
+ args.push_string(os.str());
+}
+
+void formula_functions::fnc_right(formula_value_stack& args) const
+{
+ if (args.empty() || args.size() > 2)
+ throw formula_functions::invalid_arg(
+ "RIGHT requires at least one argument but no more than 2.");
+
+ int n = 1; // when the 2nd arg is skipped, it defaults to 1.
+ if (args.size() == 2)
+ n = std::floor(args.pop_value());
+
+ if (n < 0)
+ {
+ args.clear();
+ args.push_error(formula_error_t::invalid_value_type);
+ return;
+ }
+
+ if (n == 0)
+ {
+ args.clear();
+ args.push_string(std::string{});
+ return;
+ }
+
+ std::string s = args.pop_string();
+
+ auto positions = detail::calc_utf8_byte_positions(s);
+
+ // determine how many logical characters to skip.
+ n = int(positions.size()) - n;
+
+ if (n > 0)
+ {
+ assert(std::size_t(n) < positions.size());
+ auto it = std::next(s.begin(), positions[n]);
+ std::string s_skipped;
+ std::copy(it, s.end(), std::back_inserter(s_skipped));
+ s.swap(s_skipped);
+ }
+
+ args.push_string(std::move(s));
+}
+
+void formula_functions::fnc_substitute(formula_value_stack& args) const
+{
+ if (args.size() < 3 || args.size() > 4)
+ throw formula_functions::invalid_arg(
+ "SUBSTITUTE requires at least 3 arguments but no more than 4.");
+
+ constexpr int replace_all = -1;
+ int which = replace_all;
+
+ if (args.size() == 4)
+ {
+ // explicit which value provided.
+ which = std::floor(args.pop_value());
+
+ if (which < 1)
+ {
+ args.clear();
+ args.push_error(formula_error_t::invalid_value_type);
+ return;
+ }
+ }
+
+ const std::string text_new = args.pop_string();
+ const std::string text_old = args.pop_string();
+ const std::string content = args.pop_string();
+ std::string content_new;
+
+ std::size_t pos = 0;
+ int which_found = 0;
+
+ while (true)
+ {
+ std::size_t found_pos = content.find(text_old, pos);
+ if (found_pos == std::string::npos)
+ {
+ // Copy the rest of the string to the new buffer and exit.
+ content_new.append(content, pos, std::string::npos);
+ break;
+ }
+
+ ++which_found;
+ bool replace_this = which_found == which || which == replace_all;
+ content_new.append(content, pos, found_pos - pos);
+ content_new.append(replace_this ? text_new : text_old);
+ pos = found_pos + text_old.size();
+ }
+
+ args.clear();
+ args.push_string(std::move(content_new));
+}
+
+void formula_functions::fnc_t(formula_value_stack& args) const
+{
+ if (args.size() != 1u)
+ throw formula_functions::invalid_arg("T takes exactly one argument.");
+
+ switch (args.get_type())
+ {
+ case stack_value_t::string:
+ // Do nothing and reuse the string value as the return value.
+ break;
+ case stack_value_t::single_ref:
+ case stack_value_t::range_ref:
+ {
+ auto addr = args.pop_single_ref();
+ auto ca = m_context.get_cell_access(addr);
+
+ std::string s;
+
+ if (ca.get_value_type() == cell_value_t::string)
+ s = ca.get_string_value();
+
+ args.push_string(std::move(s));
+ break;
+ }
+ default:
+ {
+ args.pop_back();
+ args.push_string(std::string{});
+ }
+ }
+}
+
+void formula_functions::fnc_textjoin(formula_value_stack& args) const
+{
+ if (args.size() < 3u)
+ throw formula_functions::invalid_arg("TEXTJOIN requires at least 3 arguments.");
+
+ std::deque<abs_range_t> ranges;
+
+ while (args.size() > 2u)
+ ranges.push_front(args.pop_range_ref());
+
+ bool skip_empty = args.pop_boolean();
+ std::string delim = args.pop_string();
+ std::vector<std::string> tokens;
+
+ for (const abs_range_t& range : ranges)
+ {
+ for (sheet_t sheet = range.first.sheet; sheet <= range.last.sheet; ++sheet)
+ {
+ model_iterator miter = m_context.get_model_iterator(sheet, rc_direction_t::horizontal, range);
+
+ for (; miter.has(); miter.next())
+ {
+ auto& cell = miter.get();
+
+ switch (cell.type)
+ {
+ case celltype_t::string:
+ {
+ auto sid = std::get<string_id_t>(cell.value);
+ const std::string* s = m_context.get_string(sid);
+ assert(s);
+ tokens.emplace_back(*s);
+ break;
+ }
+ case celltype_t::numeric:
+ {
+ std::ostringstream os;
+ os << std::get<double>(cell.value);
+ tokens.emplace_back(os.str());
+ break;
+ }
+ case celltype_t::boolean:
+ {
+ std::ostringstream os;
+ os << std::boolalpha << std::get<bool>(cell.value);
+ tokens.emplace_back(os.str());
+ break;
+ }
+ case celltype_t::formula:
+ {
+ const auto* fc = std::get<const formula_cell*>(cell.value);
+ formula_result res = fc->get_result_cache(m_context.get_formula_result_wait_policy());
+ tokens.emplace_back(res.str(m_context));
+ break;
+ }
+ case celltype_t::empty:
+ {
+ if (!skip_empty)
+ tokens.emplace_back();
+ break;
+ }
+ case celltype_t::unknown:
+ // logic error - this should never happen!
+ throw formula_error(formula_error_t::no_result_error);
+ }
+ }
+ }
+ }
+
+ if (tokens.empty())
+ {
+ args.push_string(std::string{});
+ return;
+ }
+
+ std::string result = std::move(tokens.front());
+
+ for (auto it = std::next(tokens.begin()); it != tokens.end(); ++it)
+ {
+ result.append(delim);
+ result.append(*it);
+ }
+
+ args.push_string(std::move(result));
+}
+
+void formula_functions::fnc_trim(formula_value_stack& args) const
+{
+ if (args.size() != 1u)
+ throw formula_functions::invalid_arg("TRIM takes exactly one argument.");
+
+ std::string s = args.pop_string();
+ const char* p = s.data();
+ const char* p_end = p + s.size();
+ const char* p_head = nullptr;
+
+ std::vector<std::string> tokens;
+
+ for (; p != p_end; ++p)
+ {
+ if (*p == ' ')
+ {
+ if (p_head)
+ {
+ tokens.emplace_back(p_head, std::distance(p_head, p));
+ p_head = nullptr;
+ }
+
+ continue;
+ }
+
+ if (!p_head)
+ // keep track of the head of each token.
+ p_head = p;
+ }
+
+ if (p_head)
+ tokens.emplace_back(p_head, std::distance(p_head, p));
+
+ if (tokens.empty())
+ {
+ args.push_string(std::string{});
+ return;
+ }
+
+ std::ostringstream os;
+ std::copy(tokens.cbegin(), std::prev(tokens.cend()), std::ostream_iterator<std::string>(os, " "));
+ os << tokens.back();
+
+ args.push_string(os.str());
+}
+
+void formula_functions::fnc_now(formula_value_stack& args) const
+{
+ if (!args.empty())
+ throw formula_functions::invalid_arg("NOW takes no arguments.");
+
+ // TODO: this value is currently not accurate since we don't take into
+ // account the zero date yet.
+ double cur_time = get_current_time();
+ cur_time /= 86400.0; // convert seconds to days.
+ args.push_value(cur_time);
+}
+
+void formula_functions::fnc_wait(formula_value_stack& args) const
+{
+ std::this_thread::sleep_for(std::chrono::milliseconds(1000));
+ args.clear();
+ args.push_value(1);
+}
+
+void formula_functions::fnc_subtotal(formula_value_stack& args) const
+{
+ if (args.size() != 2)
+ throw formula_functions::invalid_arg("SUBTOTAL requires exactly 2 arguments.");
+
+ abs_range_t range = args.pop_range_ref();
+ int subtype = args.pop_value();
+ switch (subtype)
+ {
+ case 109:
+ {
+ // SUM
+ matrix mx = m_context.get_range_value(range);
+ args.push_value(sum_matrix_elements(mx));
+ break;
+ }
+ default:
+ {
+ std::ostringstream os;
+ os << "SUBTOTAL: function type " << subtype << " not implemented yet";
+ throw formula_functions::invalid_arg(os.str());
+ }
+ }
+}
+
+void formula_functions::fnc_column(formula_value_stack& args) const
+{
+ if (args.empty())
+ {
+ args.push_value(m_pos.column + 1);
+ return;
+ }
+
+ if (args.size() > 1)
+ throw formula_functions::invalid_arg("COLUMN requires 1 argument or less.");
+
+ switch (args.get_type())
+ {
+ case stack_value_t::single_ref:
+ case stack_value_t::range_ref:
+ {
+ abs_address_t addr = args.pop_single_ref();
+ args.push_value(addr.column + 1);
+ break;
+ }
+ default:
+ throw formula_error(formula_error_t::invalid_value_type);
+ }
+}
+
+void formula_functions::fnc_columns(formula_value_stack& args) const
+{
+ double res = 0.0;
+
+ while (!args.empty())
+ {
+ switch (args.get_type())
+ {
+ case stack_value_t::single_ref:
+ case stack_value_t::range_ref:
+ {
+ abs_range_t range = args.pop_range_ref();
+ res += range.last.column - range.first.column + 1;
+ break;
+ }
+ default:
+ throw formula_error(formula_error_t::invalid_value_type);
+ }
+ }
+
+ args.push_value(res);
+}
+
+void formula_functions::fnc_row(formula_value_stack& args) const
+{
+ if (args.empty())
+ {
+ args.push_value(m_pos.row + 1);
+ return;
+ }
+
+ if (args.size() > 1)
+ throw formula_functions::invalid_arg("ROW requires 1 argument or less.");
+
+ switch (args.get_type())
+ {
+ case stack_value_t::single_ref:
+ case stack_value_t::range_ref:
+ {
+ abs_address_t addr = args.pop_single_ref();
+ args.push_value(addr.row + 1);
+ break;
+ }
+ default:
+ throw formula_error(formula_error_t::invalid_value_type);
+ }
+}
+
+void formula_functions::fnc_rows(formula_value_stack& args) const
+{
+ double res = 0.0;
+
+ while (!args.empty())
+ {
+ switch (args.get_type())
+ {
+ case stack_value_t::single_ref:
+ case stack_value_t::range_ref:
+ {
+ abs_range_t range = args.pop_range_ref();
+ res += range.last.row - range.first.row + 1;
+ break;
+ }
+ default:
+ throw formula_error(formula_error_t::invalid_value_type);
+ }
+ }
+
+ args.push_value(res);
+}
+
+void formula_functions::fnc_sheet(formula_value_stack& args) const
+{
+ if (args.empty())
+ {
+ // Take the current sheet index.
+ args.push_value(m_pos.sheet + 1);
+ return;
+ }
+
+ if (args.size() > 1u)
+ throw formula_functions::invalid_arg("SHEET only takes one argument or less.");
+
+ switch (args.get_type())
+ {
+ case stack_value_t::single_ref:
+ case stack_value_t::range_ref:
+ {
+ abs_range_t range = args.pop_range_ref();
+ args.push_value(range.first.sheet + 1);
+ break;
+ }
+ case stack_value_t::string:
+ {
+ // TODO: we need to make this case insensitive.
+ std::string sheet_name = args.pop_string();
+ sheet_t sheet_id = m_context.get_sheet_index(sheet_name);
+ if (sheet_id == invalid_sheet)
+ throw formula_error(formula_error_t::no_value_available);
+
+ args.push_value(sheet_id + 1);
+ break;
+ }
+ default:
+ throw formula_error(formula_error_t::invalid_value_type);
+ }
+}
+
+void formula_functions::fnc_sheets(formula_value_stack& args) const
+{
+ if (args.empty())
+ {
+ args.push_value(m_context.get_sheet_count());
+ return;
+ }
+
+ if (args.size() != 1u)
+ throw formula_functions::invalid_arg("SHEETS only takes one argument or less.");
+
+ switch (args.get_type())
+ {
+ case stack_value_t::single_ref:
+ case stack_value_t::range_ref:
+ {
+ abs_range_t range = args.pop_range_ref();
+ sheet_t n = range.last.sheet - range.first.sheet + 1;
+ args.push_value(n);
+ break;
+ }
+ default:
+ throw formula_error(formula_error_t::no_value_available);
+ }
+}
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/src/libixion/formula_functions.hpp b/src/libixion/formula_functions.hpp
new file mode 100644
index 0000000..c4d9d73
--- /dev/null
+++ b/src/libixion/formula_functions.hpp
@@ -0,0 +1,129 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef __IXION_FORMULA_FUNCTIONS_HPP__
+#define __IXION_FORMULA_FUNCTIONS_HPP__
+
+#include "ixion/global.hpp"
+#include "ixion/exceptions.hpp"
+#include "ixion/formula_function_opcode.hpp"
+
+#include "formula_value_stack.hpp"
+
+#include <string>
+#include <vector>
+
+namespace ixion {
+
+struct formula_token;
+
+/**
+ * Collection of built-in cell function implementations. Note that those
+ * functions that return a string result <i>may</i> modify the state of the
+ * model context when the result string is not yet in the shared string
+ * pool.
+ */
+class formula_functions
+{
+public:
+ class invalid_arg : public general_error
+ {
+ public:
+ invalid_arg(const ::std::string& msg);
+ };
+
+ formula_functions(model_context& cxt, const abs_address_t& pos);
+ ~formula_functions();
+
+ static formula_function_t get_function_opcode(const formula_token& token);
+ static formula_function_t get_function_opcode(std::string_view s);
+ static std::string_view get_function_name(formula_function_t oc);
+
+ void interpret(formula_function_t oc, formula_value_stack& args);
+
+private:
+
+ // category: statistical
+ void fnc_abs(formula_value_stack& args) const;
+ void fnc_average(formula_value_stack& args) const;
+ void fnc_count(formula_value_stack& args) const;
+ void fnc_counta(formula_value_stack& args) const;
+ void fnc_countblank(formula_value_stack& args) const;
+ void fnc_max(formula_value_stack& args) const;
+ void fnc_median(formula_value_stack& args) const;
+ void fnc_min(formula_value_stack& args) const;
+ void fnc_mode(formula_value_stack& args) const;
+ void fnc_pi(formula_value_stack& args) const;
+
+ // category: mathematical
+ void fnc_int(formula_value_stack& args) const;
+ void fnc_mmult(formula_value_stack& args) const;
+ void fnc_subtotal(formula_value_stack& args) const;
+ void fnc_sum(formula_value_stack& args) const;
+
+ // category: logical
+ void fnc_and(formula_value_stack& args) const;
+ void fnc_false(formula_value_stack& args) const;
+ void fnc_if(formula_value_stack& args) const;
+ void fnc_not(formula_value_stack& args) const;
+ void fnc_or(formula_value_stack& args) const;
+ void fnc_true(formula_value_stack& args) const;
+
+ // category: information
+ void fnc_isblank(formula_value_stack& args) const;
+ void fnc_iserror(formula_value_stack& args) const;
+ void fnc_iseven(formula_value_stack& args) const;
+ void fnc_isformula(formula_value_stack& args) const;
+ void fnc_islogical(formula_value_stack& args) const;
+ void fnc_isna(formula_value_stack& args) const;
+ void fnc_isnontext(formula_value_stack& args) const;
+ void fnc_isnumber(formula_value_stack& args) const;
+ void fnc_isodd(formula_value_stack& args) const;
+ void fnc_isref(formula_value_stack& args) const;
+ void fnc_istext(formula_value_stack& args) const;
+ void fnc_n(formula_value_stack& args) const;
+ void fnc_na(formula_value_stack& args) const;
+ void fnc_type(formula_value_stack& args) const;
+
+ // category: text
+ void fnc_concatenate(formula_value_stack& args) const;
+ void fnc_exact(formula_value_stack& args) const;
+ void fnc_find(formula_value_stack& args) const;
+ void fnc_left(formula_value_stack& args) const;
+ void fnc_len(formula_value_stack& args) const;
+ void fnc_mid(formula_value_stack& args) const;
+ void fnc_replace(formula_value_stack& args) const;
+ void fnc_rept(formula_value_stack& args) const;
+ void fnc_right(formula_value_stack& args) const;
+ void fnc_substitute(formula_value_stack& args) const;
+ void fnc_t(formula_value_stack& args) const;
+ void fnc_textjoin(formula_value_stack& args) const;
+ void fnc_trim(formula_value_stack& args) const;
+
+ // category: date & time
+ void fnc_now(formula_value_stack& args) const;
+
+ // cateogry: spreadsheet
+ void fnc_column(formula_value_stack& args) const;
+ void fnc_columns(formula_value_stack& args) const;
+ void fnc_row(formula_value_stack& args) const;
+ void fnc_rows(formula_value_stack& args) const;
+ void fnc_sheet(formula_value_stack& args) const;
+ void fnc_sheets(formula_value_stack& args) const;
+
+ // category: development
+ void fnc_wait(formula_value_stack& args) const;
+
+private:
+ model_context& m_context;
+ abs_address_t m_pos;
+};
+
+}
+
+#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/src/libixion/formula_interpreter.cpp b/src/libixion/formula_interpreter.cpp
new file mode 100644
index 0000000..65c95e6
--- /dev/null
+++ b/src/libixion/formula_interpreter.cpp
@@ -0,0 +1,1753 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include "formula_interpreter.hpp"
+#include "formula_functions.hpp"
+#include "debug.hpp"
+
+#include <ixion/cell.hpp>
+#include <ixion/global.hpp>
+#include <ixion/matrix.hpp>
+#include <ixion/formula.hpp>
+#include <ixion/interface/session_handler.hpp>
+#include <ixion/interface/table_handler.hpp>
+#include <ixion/config.hpp>
+#include <ixion/cell_access.hpp>
+
+#include <cassert>
+#include <string>
+#include <iostream>
+#include <sstream>
+#include <cmath>
+#include <optional>
+
+namespace ixion {
+
+namespace {
+
+class invalid_expression : public general_error
+{
+public:
+ invalid_expression(const std::string& msg) : general_error(msg) {}
+};
+
+const formula_token paren_open = formula_token{fop_open};
+const formula_token paren_close = formula_token{fop_close};
+
+}
+
+formula_interpreter::formula_interpreter(const formula_cell* cell, model_context& cxt) :
+ m_parent_cell(cell),
+ m_context(cxt),
+ m_error(formula_error_t::no_error)
+{
+}
+
+formula_interpreter::~formula_interpreter()
+{
+}
+
+void formula_interpreter::set_origin(const abs_address_t& pos)
+{
+ m_pos = pos;
+}
+
+bool formula_interpreter::interpret()
+{
+ mp_handler = m_context.create_session_handler();
+ if (mp_handler)
+ mp_handler->begin_cell_interpret(m_pos);
+
+ try
+ {
+ init_tokens();
+
+ if (m_tokens.empty())
+ {
+ IXION_DEBUG("interpreter has no tokens to interpret");
+ return false;
+ }
+
+ m_cur_token_itr = m_tokens.begin();
+ m_error = formula_error_t::no_error;
+ m_result.reset();
+
+ expression();
+
+ if (m_cur_token_itr != m_tokens.end())
+ {
+ if (mp_handler)
+ mp_handler->set_invalid_expression("formula token interpretation ended prematurely.");
+ return false;
+ }
+
+ pop_result();
+
+ IXION_TRACE("interpretation successfully finished");
+
+ if (mp_handler)
+ mp_handler->end_cell_interpret();
+
+ return true;
+ }
+ catch (const invalid_expression& e)
+ {
+ IXION_DEBUG("invalid expression: " << e.what());
+
+ if (mp_handler)
+ mp_handler->set_invalid_expression(e.what());
+
+ m_error = formula_error_t::invalid_expression;
+ }
+ catch (const formula_error& e)
+ {
+ IXION_DEBUG("formula error: " << e.what());
+
+ if (mp_handler)
+ mp_handler->set_formula_error(e.what());
+
+ m_error = e.get_error();
+ }
+
+ if (mp_handler)
+ mp_handler->end_cell_interpret();
+
+ return false;
+}
+
+formula_result formula_interpreter::transfer_result()
+{
+ return std::move(m_result);
+}
+
+formula_error_t formula_interpreter::get_error() const
+{
+ return m_error;
+}
+
+void formula_interpreter::init_tokens()
+{
+ clear_stacks();
+
+ name_set used_names;
+ m_tokens.clear();
+
+ const formula_tokens_store_ptr_t& ts = m_parent_cell->get_tokens();
+ if (!ts)
+ return;
+
+ for (const formula_token& t : ts->get())
+ {
+ if (t.opcode == fop_named_expression)
+ {
+ // Named expression. Expand it.
+ const auto& name = std::get<std::string>(t.value);
+ const named_expression_t* expr = m_context.get_named_expression(
+ m_pos.sheet, name);
+
+ used_names.insert(name);
+ expand_named_expression(expr, used_names);
+ }
+ else
+ // Normal token.
+ m_tokens.push_back(&t);
+ }
+
+ m_end_token_pos = m_tokens.end();
+}
+
+namespace {
+
+void get_result_from_cell(const model_context& cxt, const abs_address_t& addr, formula_result& res)
+{
+ switch (cxt.get_celltype(addr))
+ {
+ case celltype_t::formula:
+ {
+ res = cxt.get_formula_result(addr);
+ break;
+ }
+ case celltype_t::boolean:
+ res.set_boolean(cxt.get_boolean_value(addr));
+ break;
+ case celltype_t::numeric:
+ res.set_value(cxt.get_numeric_value(addr));
+ break;
+ case celltype_t::string:
+ {
+ std::string_view s = cxt.get_string_value(addr);
+ res.set_string_value(std::string{s});
+ break;
+ }
+ case celltype_t::unknown:
+ default:
+ ;
+ }
+}
+
+}
+
+void formula_interpreter::pop_result()
+{
+ // there should only be one stack value left for the result value.
+ assert(get_stack().size() == 1);
+ stack_value& res = get_stack().back();
+ switch (res.get_type())
+ {
+ case stack_value_t::range_ref:
+ {
+ const abs_range_t& range = res.get_range();
+ get_result_from_cell(m_context, range.first, m_result);
+ break;
+ }
+ case stack_value_t::single_ref:
+ {
+ get_result_from_cell(m_context, res.get_address(), m_result);
+ break;
+ }
+ case stack_value_t::string:
+ {
+ m_result.set_string_value(res.get_string());
+ break;
+ }
+ case stack_value_t::boolean:
+ {
+ m_result.set_boolean(res.get_boolean());
+ break;
+ }
+ case stack_value_t::value:
+ IXION_TRACE("value=" << res.get_value());
+ m_result.set_value(res.get_value());
+ break;
+ case stack_value_t::matrix:
+ m_result.set_matrix(res.pop_matrix());
+ break;
+ case stack_value_t::error:
+ m_result.set_error(res.get_error());
+ break;
+ }
+
+ if (mp_handler)
+ mp_handler->set_result(m_result);
+}
+
+void formula_interpreter::expand_named_expression(const named_expression_t* expr, name_set& used_names)
+{
+ if (!expr)
+ throw formula_error(formula_error_t::name_not_found);
+
+ m_tokens.push_back(&paren_open);
+ for (const auto& t : expr->tokens)
+ {
+ if (t.opcode == fop_named_expression)
+ {
+ const auto& expr_name = std::get<std::string>(t.value);
+ if (used_names.count(expr_name) > 0)
+ {
+ // Circular reference detected.
+ throw invalid_expression("circular referencing of named expressions");
+ }
+ const named_expression_t* this_expr = m_context.get_named_expression(m_pos.sheet, expr_name);
+ used_names.insert(expr_name);
+ expand_named_expression(this_expr, used_names);
+ }
+ else
+ m_tokens.push_back(&t);
+ }
+ m_tokens.push_back(&paren_close);
+}
+
+void formula_interpreter::ensure_token_exists() const
+{
+ if (!has_token())
+ throw invalid_expression("formula expression ended prematurely");
+}
+
+bool formula_interpreter::has_token() const
+{
+ return m_cur_token_itr != m_end_token_pos;
+}
+
+void formula_interpreter::next()
+{
+ ++m_cur_token_itr;
+}
+
+const formula_token& formula_interpreter::token() const
+{
+ assert(m_cur_token_itr != m_end_token_pos);
+ return *(*m_cur_token_itr);
+}
+
+const formula_token& formula_interpreter::token_or_throw() const
+{
+ ensure_token_exists();
+ return *(*m_cur_token_itr);
+}
+
+const formula_token& formula_interpreter::next_token()
+{
+ next();
+ if (!has_token())
+ throw invalid_expression("expecting a token but no more tokens found.");
+
+ return token();
+}
+
+const std::string& formula_interpreter::string_or_throw() const
+{
+ assert(token().opcode == fop_string);
+
+ const string_id_t sid = std::get<string_id_t>(token().value);
+ const std::string* p = m_context.get_string(sid);
+ if (!p)
+ throw general_error("no string found for the specified string ID.");
+
+ if (mp_handler)
+ mp_handler->push_string(sid);
+
+ return *p;
+}
+
+namespace {
+
+bool valid_expression_op(fopcode_t oc)
+{
+ switch (oc)
+ {
+ case fop_plus:
+ case fop_minus:
+ case fop_equal:
+ case fop_not_equal:
+ case fop_less:
+ case fop_less_equal:
+ case fop_greater:
+ case fop_greater_equal:
+ return true;
+ default:
+ ;
+ }
+ return false;
+}
+
+/**
+ * Pop the value off of the stack but only as one of the following type:
+ *
+ * <ul>
+ * <li>value</li>
+ * <li>string</li>
+ * <li>matrix</li>
+ * </ul>
+ */
+std::optional<stack_value> pop_stack_value(const model_context& cxt, formula_value_stack& stack)
+{
+ switch (stack.get_type())
+ {
+ case stack_value_t::boolean:
+ return stack_value{stack.pop_boolean() ? 1.0 : 0.0};
+ case stack_value_t::value:
+ return stack_value{stack.pop_value()};
+ case stack_value_t::string:
+ return stack_value{stack.pop_string()};
+ case stack_value_t::matrix:
+ return stack_value{stack.pop_matrix()};
+ case stack_value_t::single_ref:
+ {
+ const abs_address_t& addr = stack.pop_single_ref();
+ auto ca = cxt.get_cell_access(addr);
+
+ switch (ca.get_type())
+ {
+ case celltype_t::empty:
+ {
+ // empty cell has a value of 0.
+ return stack_value{0.0};
+ }
+ case celltype_t::boolean:
+ // TODO : Decide whether we need to treat this as a
+ // distinct boolean value. For now, let's treat this as a
+ // numeric value equivalent.
+ case celltype_t::numeric:
+ {
+ double val = ca.get_numeric_value();
+ return stack_value{val};
+ }
+ case celltype_t::string:
+ {
+ std::size_t strid = ca.get_string_identifier();
+ const std::string* ps = cxt.get_string(strid);
+ if (!ps)
+ {
+ IXION_DEBUG("fail to get a string value for the id of " << strid);
+ return {};
+ }
+
+ return stack_value{*ps};
+ }
+ case celltype_t::formula:
+ {
+ formula_result res = ca.get_formula_result();
+
+ switch (res.get_type())
+ {
+ case formula_result::result_type::boolean:
+ return stack_value{res.get_boolean() ? 1.0 : 0.0};
+ case formula_result::result_type::value:
+ return stack_value{res.get_value()};
+ case formula_result::result_type::string:
+ return stack_value{res.get_string()};
+ case formula_result::result_type::error:
+ default:
+ return {};
+ }
+ }
+ default:
+ return {};
+ }
+ break;
+ }
+ case stack_value_t::range_ref:
+ default:;
+ }
+
+ return {};
+}
+
+void compare_values(formula_value_stack& vs, fopcode_t oc, double val1, double val2)
+{
+ switch (oc)
+ {
+ case fop_plus:
+ vs.push_value(val1 + val2);
+ break;
+ case fop_minus:
+ vs.push_value(val1 - val2);
+ break;
+ case fop_equal:
+ vs.push_value(val1 == val2);
+ break;
+ case fop_not_equal:
+ vs.push_value(val1 != val2);
+ break;
+ case fop_less:
+ vs.push_value(val1 < val2);
+ break;
+ case fop_less_equal:
+ vs.push_value(val1 <= val2);
+ break;
+ case fop_greater:
+ vs.push_value(val1 > val2);
+ break;
+ case fop_greater_equal:
+ vs.push_value(val1 >= val2);
+ break;
+ default:
+ throw invalid_expression("unknown expression operator.");
+ }
+}
+
+void compare_strings(formula_value_stack& vs, fopcode_t oc, const std::string& str1, const std::string& str2)
+{
+ switch (oc)
+ {
+ case fop_plus:
+ case fop_minus:
+ throw formula_error(formula_error_t::invalid_expression);
+ case fop_equal:
+ vs.push_value(str1 == str2);
+ break;
+ case fop_not_equal:
+ vs.push_value(str1 != str2);
+ break;
+ case fop_less:
+ vs.push_value(str1 < str2);
+ break;
+ case fop_less_equal:
+ vs.push_value(str1 <= str2);
+ break;
+ case fop_greater:
+ vs.push_value(str1 > str2);
+ break;
+ case fop_greater_equal:
+ vs.push_value(str1 >= str2);
+ break;
+ default:
+ throw invalid_expression("unknown expression operator.");
+ }
+}
+
+void compare_value_to_string(
+ formula_value_stack& vs, fopcode_t oc, double /*val1*/, const std::string& /*str2*/)
+{
+ // Value 1 is numeric while value 2 is string. String is
+ // always greater than numeric value.
+ switch (oc)
+ {
+ case fop_plus:
+ case fop_minus:
+ throw formula_error(formula_error_t::invalid_expression);
+ case fop_equal:
+ vs.push_value(false);
+ break;
+ case fop_not_equal:
+ vs.push_value(true);
+ break;
+ case fop_less:
+ case fop_less_equal:
+ // val1 < str2
+ vs.push_value(true);
+ break;
+ case fop_greater:
+ case fop_greater_equal:
+ // val1 > str2
+ vs.push_value(false);
+ break;
+ default:
+ throw invalid_expression("unknown expression operator.");
+ }
+}
+
+void compare_string_to_value(
+ formula_value_stack& vs, fopcode_t oc, const std::string& /*str1*/, double /*val2*/)
+{
+ switch (oc)
+ {
+ case fop_plus:
+ case fop_minus:
+ throw formula_error(formula_error_t::invalid_expression);
+ case fop_equal:
+ vs.push_value(false);
+ break;
+ case fop_not_equal:
+ vs.push_value(true);
+ break;
+ case fop_less:
+ case fop_less_equal:
+ // str1 < val2
+ vs.push_value(false);
+ break;
+ case fop_greater:
+ case fop_greater_equal:
+ // str1 > val2
+ vs.push_value(true);
+ break;
+ default:
+ throw invalid_expression("unknown expression operator.");
+ }
+}
+
+template<typename Op>
+matrix operate_all_elements(const matrix& mtx, double val)
+{
+ matrix res = mtx;
+
+ for (std::size_t col = 0; col < mtx.col_size(); ++col)
+ {
+ for (std::size_t row = 0; row < mtx.row_size(); ++row)
+ {
+ auto elem = mtx.get(row, col);
+
+ switch (elem.type)
+ {
+ case matrix::element_type::numeric:
+ {
+ auto v = Op{}(std::get<double>(elem.value), val);
+ if (v)
+ res.set(row, col, *v);
+ else
+ res.set(row, col, v.error());
+ break;
+ }
+ case matrix::element_type::string:
+ break;
+ case matrix::element_type::boolean:
+ {
+ auto v = Op{}(std::get<bool>(elem.value), val);
+ if (v)
+ res.set(row, col, *v);
+ else
+ res.set(row, col, v.error());
+ break;
+ }
+ case matrix::element_type::error:
+ res.set(row, col, std::get<formula_error_t>(elem.value));
+ break;
+ case matrix::element_type::empty:
+ break;
+ }
+ }
+ }
+
+ return res;
+}
+
+matrix operate_all_elements(const matrix& mtx, std::string_view val)
+{
+ matrix res = mtx;
+
+ for (std::size_t col = 0; col < mtx.col_size(); ++col)
+ {
+ for (std::size_t row = 0; row < mtx.row_size(); ++row)
+ {
+ auto elem = mtx.get(row, col);
+
+ switch (elem.type)
+ {
+ case matrix::element_type::numeric:
+ {
+ std::ostringstream os;
+ os << std::get<double>(elem.value) << val;
+ res.set(row, col, os.str());
+ break;
+ }
+ case matrix::element_type::string:
+ {
+ std::ostringstream os;
+ os << std::get<std::string_view>(elem.value) << val;
+ res.set(row, col, os.str());
+ break;
+ }
+ case matrix::element_type::boolean:
+ {
+ std::ostringstream os;
+ os << std::boolalpha << std::get<bool>(elem.value) << val;
+ res.set(row, col, os.str());
+ break;
+ }
+ case matrix::element_type::error:
+ res.set(row, col, std::get<formula_error_t>(elem.value));
+ break;
+ case matrix::element_type::empty:
+ break;
+ }
+ }
+ }
+
+ return res;
+}
+
+matrix operate_all_elements(std::string_view val, const matrix& mtx)
+{
+ matrix res = mtx;
+
+ for (std::size_t col = 0; col < mtx.col_size(); ++col)
+ {
+ for (std::size_t row = 0; row < mtx.row_size(); ++row)
+ {
+ auto elem = mtx.get(row, col);
+
+ switch (elem.type)
+ {
+ case matrix::element_type::numeric:
+ {
+ std::ostringstream os;
+ os << val << std::get<double>(elem.value);
+ res.set(row, col, os.str());
+ break;
+ }
+ case matrix::element_type::string:
+ {
+ std::ostringstream os;
+ os << val << std::get<std::string_view>(elem.value);
+ res.set(row, col, os.str());
+ break;
+ }
+ case matrix::element_type::boolean:
+ {
+ std::ostringstream os;
+ os << val << std::boolalpha << std::get<bool>(elem.value);
+ res.set(row, col, os.str());
+ break;
+ }
+ case matrix::element_type::error:
+ res.set(row, col, std::get<formula_error_t>(elem.value));
+ break;
+ case matrix::element_type::empty:
+ break;
+ }
+ }
+ }
+
+ return res;
+}
+
+template<typename Op>
+matrix operate_all_elements(double val, const matrix& mtx)
+{
+ matrix res = mtx;
+
+ for (std::size_t col = 0; col < mtx.col_size(); ++col)
+ {
+ for (std::size_t row = 0; row < mtx.row_size(); ++row)
+ {
+ auto elem = mtx.get(row, col);
+
+ switch (elem.type)
+ {
+ case matrix::element_type::numeric:
+ {
+ auto v = Op{}(val, std::get<double>(elem.value));
+ if (v)
+ res.set(row, col, *v);
+ else
+ res.set(row, col, v.error());
+ break;
+ }
+ case matrix::element_type::string:
+ break;
+ case matrix::element_type::boolean:
+ {
+ auto v = Op{}(val, std::get<bool>(elem.value));
+ if (v)
+ res.set(row, col, *v);
+ else
+ res.set(row, col, v.error());
+ break;
+ }
+ case matrix::element_type::error:
+ res.set(row, col, std::get<formula_error_t>(elem.value));
+ break;
+ case matrix::element_type::empty:
+ break;
+ }
+ }
+ }
+
+ return res;
+}
+
+struct add_op
+{
+ formula_op_result<double> operator()(double v1, double v2) const
+ {
+ return v1 + v2;
+ }
+};
+
+struct sub_op
+{
+ formula_op_result<double> operator()(double v1, double v2) const
+ {
+ return v1 - v2;
+ }
+};
+
+struct equal_op
+{
+ formula_op_result<double> operator()(double v1, double v2) const
+ {
+ return v1 == v2;
+ }
+};
+
+struct not_equal_op
+{
+ formula_op_result<bool> operator()(double v1, double v2) const
+ {
+ return v1 != v2;
+ }
+};
+
+struct less_op
+{
+ formula_op_result<bool> operator()(double v1, double v2) const
+ {
+ return v1 < v2;
+ }
+};
+
+struct less_equal_op
+{
+ formula_op_result<bool> operator()(double v1, double v2) const
+ {
+ return v1 <= v2;
+ }
+};
+
+struct greater_op
+{
+ formula_op_result<bool> operator()(double v1, double v2) const
+ {
+ return v1 > v2;
+ }
+};
+
+struct greater_equal_op
+{
+ formula_op_result<bool> operator()(double v1, double v2) const
+ {
+ return v1 >= v2;
+ }
+};
+
+struct multiply_op
+{
+ formula_op_result<double> operator()(double v1, double v2) const
+ {
+ return v1 * v2;
+ }
+};
+
+struct divide_op
+{
+ formula_op_result<double> operator()(double v1, double v2) const
+ {
+ if (v2 == 0.0)
+ return formula_error_t::division_by_zero;
+
+ return v1 / v2;
+ }
+};
+
+struct exponent_op
+{
+ formula_op_result<double> operator()(double v1, double v2) const
+ {
+ return std::pow(v1, v2);
+ }
+};
+
+void compare_matrix_to_value(formula_value_stack& vs, fopcode_t oc, const matrix& mtx, double val)
+{
+ switch (oc)
+ {
+ case fop_minus:
+ val = -val;
+ // fallthrough
+ case fop_plus:
+ {
+ matrix res = operate_all_elements<add_op>(mtx, val);
+ vs.push_matrix(res);
+ break;
+ }
+ case fop_equal:
+ {
+ matrix res = operate_all_elements<equal_op>(mtx, val);
+ vs.push_matrix(res);
+ break;
+ }
+ case fop_not_equal:
+ {
+ matrix res = operate_all_elements<not_equal_op>(mtx, val);
+ vs.push_matrix(res);
+ break;
+ }
+ case fop_less:
+ {
+ matrix res = operate_all_elements<less_op>(mtx, val);
+ vs.push_matrix(res);
+ break;
+ }
+ case fop_less_equal:
+ {
+ matrix res = operate_all_elements<less_equal_op>(mtx, val);
+ vs.push_matrix(res);
+ break;
+ }
+ case fop_greater:
+ {
+ matrix res = operate_all_elements<greater_op>(mtx, val);
+ vs.push_matrix(res);
+ break;
+ }
+ case fop_greater_equal:
+ {
+ matrix res = operate_all_elements<greater_equal_op>(mtx, val);
+ vs.push_matrix(res);
+ break;
+ }
+ default:
+ throw invalid_expression("unknown expression operator.");
+ }
+}
+
+void compare_value_to_matrix(formula_value_stack& vs, fopcode_t oc, double val, const matrix& mtx)
+{
+ switch (oc)
+ {
+ case fop_minus:
+ {
+ matrix res = operate_all_elements<sub_op>(val, mtx);
+ vs.push_matrix(res);
+ break;
+ }
+ case fop_plus:
+ {
+ matrix res = operate_all_elements<add_op>(val, mtx);
+ vs.push_matrix(res);
+ break;
+ }
+ case fop_equal:
+ {
+ matrix res = operate_all_elements<equal_op>(val, mtx);
+ vs.push_matrix(res);
+ break;
+ }
+ case fop_not_equal:
+ {
+ matrix res = operate_all_elements<not_equal_op>(val, mtx);
+ vs.push_matrix(res);
+ break;
+ }
+ case fop_less:
+ {
+ matrix res = operate_all_elements<less_op>(val, mtx);
+ vs.push_matrix(res);
+ break;
+ }
+ case fop_less_equal:
+ {
+ matrix res = operate_all_elements<less_equal_op>(val, mtx);
+ vs.push_matrix(res);
+ break;
+ }
+ case fop_greater:
+ {
+ matrix res = operate_all_elements<greater_op>(val, mtx);
+ vs.push_matrix(res);
+ break;
+ }
+ case fop_greater_equal:
+ {
+ matrix res = operate_all_elements<greater_equal_op>(val, mtx);
+ vs.push_matrix(res);
+ break;
+ }
+ default:
+ throw invalid_expression("unknown expression operator.");
+ }
+}
+
+std::optional<double> elem_to_numeric(const matrix::element& e)
+{
+ switch (e.type)
+ {
+ case matrix::element_type::numeric:
+ return std::get<double>(e.value);
+ case matrix::element_type::boolean:
+ return std::get<bool>(e.value) ? 1.0 : 0.0;
+ case matrix::element_type::empty:
+ return 0.0;
+ default:;
+ }
+
+ return {};
+};
+
+template<typename Op>
+resolved_stack_value op_matrix_or_numeric(const resolved_stack_value& lhs, const resolved_stack_value& rhs)
+{
+ switch (lhs.type())
+ {
+ case resolved_stack_value::value_type::matrix:
+ {
+ switch (rhs.type())
+ {
+ case resolved_stack_value::value_type::matrix: // matrix * matrix
+ {
+ const matrix& m1 = lhs.get_matrix();
+ const matrix& m2 = rhs.get_matrix();
+
+ if (m1.row_size() != m2.row_size() || m1.col_size() != m2.col_size())
+ throw invalid_expression("matrix size mis-match");
+
+ matrix res = m1; // copy
+
+ for (std::size_t col = 0; col < res.col_size(); ++col)
+ {
+ for (std::size_t row = 0; row < res.row_size(); ++row)
+ {
+ auto elem1 = res.get(row, col);
+ auto elem2 = m2.get(row, col);
+
+ std::optional<double> v1 = elem_to_numeric(elem1);
+ std::optional<double> v2 = elem_to_numeric(elem2);
+
+ if (v1 && v2)
+ {
+ auto v = Op{}(*v1, *v2);
+ if (v)
+ res.set(row, col, *v);
+ else
+ res.set(row, col, v.error());
+ }
+ else
+ res.set(row, col, formula_error_t::invalid_value_type);
+ }
+ }
+ return res;
+ }
+ case resolved_stack_value::value_type::numeric: // matrix * value
+ return operate_all_elements<Op>(lhs.get_matrix(), rhs.get_numeric());
+ case resolved_stack_value::value_type::string:
+ throw invalid_expression("unexpected string value");
+ }
+ break;
+ }
+ case resolved_stack_value::value_type::numeric:
+ {
+ switch (rhs.type())
+ {
+ case resolved_stack_value::value_type::matrix: // value * matrix
+ return operate_all_elements<Op>(lhs.get_numeric(), rhs.get_matrix());
+ case resolved_stack_value::value_type::numeric: // value * value
+ {
+ auto v = Op{}(lhs.get_numeric(), rhs.get_numeric());
+ if (!v)
+ throw formula_error(v.error());
+
+ return *v;
+ }
+ case resolved_stack_value::value_type::string:
+ throw invalid_expression("unexpected string value");
+ }
+ break;
+ }
+ case resolved_stack_value::value_type::string:
+ throw invalid_expression("unexpected string value");
+ }
+
+ std::ostringstream os;
+ os << "unhandled variant type: lhs=" << int(lhs.type()) << "; rhs=" << int(rhs.type());
+ throw invalid_expression(os.str());
+}
+
+std::ostream& operator<<(std::ostream& os, const matrix::element& e)
+{
+ switch (e.type)
+ {
+ case matrix::element_type::numeric:
+ os << std::get<double>(e.value);
+ break;
+ case matrix::element_type::string:
+ os << std::get<std::string_view>(e.value);
+ break;
+ case matrix::element_type::boolean:
+ os << std::boolalpha << std::get<bool>(e.value);
+ break;
+ case matrix::element_type::error:
+ case matrix::element_type::empty:
+ break;
+ }
+ return os;
+}
+
+resolved_stack_value concat_matrix_or_string(const resolved_stack_value& lhs, const resolved_stack_value& rhs)
+{
+ switch (lhs.type())
+ {
+ case resolved_stack_value::value_type::matrix:
+ {
+ switch (rhs.type())
+ {
+ case resolved_stack_value::value_type::matrix: // matrix & matrix
+ {
+ const matrix& m1 = lhs.get_matrix();
+ const matrix& m2 = rhs.get_matrix();
+
+ if (m1.row_size() != m2.row_size() || m1.col_size() != m2.col_size())
+ throw invalid_expression("matrix size mis-match");
+
+ matrix res = m1; // copy
+
+ for (std::size_t col = 0; col < res.col_size(); ++col)
+ {
+ for (std::size_t row = 0; row < res.row_size(); ++row)
+ {
+ auto elem1 = res.get(row, col);
+ auto elem2 = m2.get(row, col);
+
+ std::ostringstream os;
+ os << elem1 << elem2;
+
+ res.set(row, col, os.str());
+ }
+ }
+ return res;
+ }
+ case resolved_stack_value::value_type::string: // matrix & string
+ return operate_all_elements(lhs.get_matrix(), rhs.get_string());
+ case resolved_stack_value::value_type::numeric: // matrix & string
+ throw invalid_expression("unexpected numeric value");
+ }
+ break;
+ }
+ case resolved_stack_value::value_type::string:
+ {
+ switch (rhs.type())
+ {
+ case resolved_stack_value::value_type::matrix: // string & matrix
+ return operate_all_elements(lhs.get_string(), rhs.get_matrix());
+ case resolved_stack_value::value_type::string: // string & string
+ return lhs.get_string() + rhs.get_string();
+ case resolved_stack_value::value_type::numeric:
+ throw invalid_expression("unexpected numeric value");
+ }
+ break;
+ }
+ case resolved_stack_value::value_type::numeric:
+ throw invalid_expression("unexpected numeric value");
+ }
+
+ std::ostringstream os;
+ os << "unhandled variant type: lhs=" << int(lhs.type()) << "; rhs=" << int(rhs.type());
+ throw invalid_expression(os.str());
+}
+
+} // anonymous namespace
+
+void formula_interpreter::expression()
+{
+ // <term> + <term> + <term> + ... + <term>
+ // valid operators are: +, -, =, <, >, <=, >=, <>.
+
+ term();
+ while (has_token())
+ {
+ fopcode_t oc = token().opcode;
+ if (!valid_expression_op(oc))
+ return;
+
+ auto sv1 = pop_stack_value(m_context, get_stack());
+ if (!sv1)
+ {
+ IXION_DEBUG("failed to pop value from the stack");
+ throw formula_error(formula_error_t::general_error);
+ }
+
+ if (mp_handler)
+ mp_handler->push_token(oc);
+
+ next();
+ term();
+
+ auto sv2 = pop_stack_value(m_context, get_stack());
+ if (!sv2)
+ {
+ IXION_DEBUG("failed to pop value from the stack");
+ throw formula_error(formula_error_t::general_error);
+ }
+
+ switch (sv1->get_type())
+ {
+ case stack_value_t::value:
+ {
+ switch (sv2->get_type())
+ {
+ case stack_value_t::value:
+ {
+ // Both are numeric values.
+ compare_values(get_stack(), oc, sv1->get_value(), sv2->get_value());
+ break;
+ }
+ case stack_value_t::string:
+ {
+ compare_value_to_string(get_stack(), oc, sv1->get_value(), sv2->get_string());
+ break;
+ }
+ case stack_value_t::matrix:
+ {
+ compare_value_to_matrix(get_stack(), oc, sv1->get_value(), sv2->get_matrix());
+ break;
+ }
+ default:
+ {
+ IXION_DEBUG("unsupported value type for value 2: " << sv2->get_type());
+ throw formula_error(formula_error_t::general_error);
+ }
+ }
+ break;
+ }
+ case stack_value_t::string:
+ {
+ switch (sv2->get_type())
+ {
+ case stack_value_t::value:
+ {
+ // Value 1 is string while value 2 is numeric.
+ compare_string_to_value(get_stack(), oc, sv1->get_string(), sv2->get_value());
+ break;
+ }
+ case stack_value_t::string:
+ {
+ // Both are strings.
+ compare_strings(get_stack(), oc, sv1->get_string(), sv2->get_string());
+ break;
+ }
+ default:
+ {
+ IXION_DEBUG("unsupported value type for value 2: " << sv2->get_type());
+ throw formula_error(formula_error_t::general_error);
+ }
+ }
+ break;
+ }
+ case stack_value_t::matrix:
+ {
+ switch (sv2->get_type())
+ {
+ case stack_value_t::value:
+ {
+ compare_matrix_to_value(get_stack(), oc, sv1->get_matrix(), sv2->get_value());
+ break;
+ }
+ default:
+ {
+ IXION_DEBUG("unsupported value type for value 2: " << sv2->get_type());
+ throw formula_error(formula_error_t::general_error);
+ }
+ }
+ break;
+ }
+ default:
+ {
+ IXION_DEBUG("unsupported value type for value 1: " << sv1->get_type());
+ throw formula_error(formula_error_t::general_error);
+ }
+ }
+ }
+}
+
+void formula_interpreter::term()
+{
+ // <factor> || <factor> (*|^|&|/) <term>
+
+ factor();
+ if (!has_token())
+ return;
+
+ fopcode_t oc = token().opcode;
+
+ auto pop_matrix_or_numeric_values = [this]()
+ {
+ auto v1 = get_stack().pop_matrix_or_numeric();
+ next(); // skip the op token
+ term();
+ auto v2 = get_stack().pop_matrix_or_numeric();
+ return std::make_pair(std::move(v1), std::move(v2));
+ };
+
+ auto push_to_stack = [this](const resolved_stack_value& v)
+ {
+ switch (v.type())
+ {
+ case resolved_stack_value::value_type::matrix:
+ get_stack().push_matrix(v.get_matrix());
+ break;
+ case resolved_stack_value::value_type::numeric:
+ get_stack().push_value(v.get_numeric());
+ break;
+ case resolved_stack_value::value_type::string:
+ get_stack().push_string(v.get_string());
+ break;
+ default:
+ throw invalid_expression("result must be either matrix or double");
+ }
+ };
+
+ switch (oc)
+ {
+ case fop_multiply:
+ {
+ if (mp_handler)
+ mp_handler->push_token(oc);
+
+ const auto& [lhs, rhs] = pop_matrix_or_numeric_values();
+ auto res = op_matrix_or_numeric<multiply_op>(lhs, rhs);
+ push_to_stack(res);
+ return;
+ }
+ case fop_exponent:
+ {
+ if (mp_handler)
+ mp_handler->push_token(oc);
+
+ const auto& [base, exp] = pop_matrix_or_numeric_values();
+ auto res = op_matrix_or_numeric<exponent_op>(base, exp);
+ push_to_stack(res);
+ return;
+ }
+ case fop_concat:
+ {
+ if (mp_handler)
+ mp_handler->push_token(oc);
+
+ auto lhs = get_stack().pop_matrix_or_string();
+ next();
+ term();
+ auto rhs = get_stack().pop_matrix_or_string();
+ auto res = concat_matrix_or_string(lhs, rhs);
+ push_to_stack(res);
+ return;
+ }
+ case fop_divide:
+ {
+ if (mp_handler)
+ mp_handler->push_token(oc);
+
+ const auto& [lhs, rhs] = pop_matrix_or_numeric_values();
+ auto res = op_matrix_or_numeric<divide_op>(lhs, rhs);
+ push_to_stack(res);
+ return;
+ }
+ default:
+ ;
+ }
+}
+
+void formula_interpreter::factor()
+{
+ // <constant> || <variable> || '(' <expression> ')' || <function>
+
+ bool negative_sign = sign(); // NB: may be precedeed by a '+' or '-' sign.
+ fopcode_t oc = token().opcode;
+
+ switch (oc)
+ {
+ case fop_open:
+ paren();
+ break;
+ case fop_named_expression:
+ {
+ // All named expressions are supposed to be expanded prior to interpretation.
+ IXION_DEBUG("named expression encountered in factor.");
+ throw formula_error(formula_error_t::general_error);
+ }
+ case fop_value:
+ {
+ constant();
+ break;
+ }
+ case fop_single_ref:
+ single_ref();
+ break;
+ case fop_range_ref:
+ range_ref();
+ break;
+ case fop_table_ref:
+ table_ref();
+ break;
+ case fop_function:
+ function();
+ break;
+ case fop_string:
+ literal();
+ break;
+ case fop_array_open:
+ array();
+ break;
+ default:
+ {
+ std::ostringstream os;
+ os << "factor: unexpected token type: <" << get_opcode_name(oc) << ">";
+ throw invalid_expression(os.str());
+ }
+ }
+
+ if (negative_sign)
+ {
+ double v = get_stack().pop_value();
+ get_stack().push_value(v * -1.0);
+ }
+}
+
+bool formula_interpreter::sign()
+{
+ ensure_token_exists();
+
+ fopcode_t oc = token().opcode;
+ bool sign_set = false;
+
+ switch (oc)
+ {
+ case fop_minus:
+ sign_set = true;
+ // fall through
+ case fop_plus:
+ {
+ if (mp_handler)
+ mp_handler->push_token(oc);
+
+ next();
+
+ if (!has_token())
+ throw invalid_expression("sign: a sign cannot be the last token");
+ }
+ default:
+ ;
+ }
+
+ return sign_set;
+}
+
+void formula_interpreter::paren()
+{
+ if (mp_handler)
+ mp_handler->push_token(fop_open);
+
+ next();
+ expression();
+ if (token_or_throw().opcode != fop_close)
+ throw invalid_expression("paren: expected close paren");
+
+ if (mp_handler)
+ mp_handler->push_token(fop_close);
+
+ next();
+}
+
+void formula_interpreter::single_ref()
+{
+ const address_t& addr = std::get<address_t>(token().value);
+ IXION_TRACE("ref=" << addr.get_name() << "; origin=" << m_pos.get_name());
+
+ if (mp_handler)
+ mp_handler->push_single_ref(addr, m_pos);
+
+ abs_address_t abs_addr = addr.to_abs(m_pos);
+ IXION_TRACE("ref=" << abs_addr.get_name() << " (converted to absolute)");
+
+ if (abs_addr == m_pos)
+ {
+ // self-referencing is not permitted.
+ throw formula_error(formula_error_t::ref_result_not_available);
+ }
+
+ get_stack().push_single_ref(abs_addr);
+ next();
+}
+
+void formula_interpreter::range_ref()
+{
+ const range_t& range = std::get<range_t>(token().value);
+ IXION_TRACE("ref-start=" << range.first.get_name() << "; ref-end=" << range.last.get_name() << "; origin=" << m_pos.get_name());
+
+ if (mp_handler)
+ mp_handler->push_range_ref(range, m_pos);
+
+ abs_range_t abs_range = range.to_abs(m_pos);
+ abs_range.reorder();
+
+ IXION_TRACE("ref-start=" << abs_range.first.get_name() << "; ref-end=" << abs_range.last.get_name() << " (converted to absolute)");
+
+ // Check the reference range to make sure it doesn't include the parent cell.
+ if (abs_range.contains(m_pos))
+ {
+ // Referenced range contains the address of this cell. Not good.
+ throw formula_error(formula_error_t::ref_result_not_available);
+ }
+
+ get_stack().push_range_ref(abs_range);
+ next();
+}
+
+void formula_interpreter::table_ref()
+{
+ const iface::table_handler* table_hdl = m_context.get_table_handler();
+ if (!table_hdl)
+ {
+ IXION_DEBUG("failed to get a table_handler instance.");
+ throw formula_error(formula_error_t::ref_result_not_available);
+ }
+
+ const table_t& table = std::get<table_t>(token().value);
+
+ if (mp_handler)
+ mp_handler->push_table_ref(table);
+
+ abs_range_t range(abs_range_t::invalid);
+ if (table.name != empty_string_id)
+ {
+ range = table_hdl->get_range(table.name, table.column_first, table.column_last, table.areas);
+ }
+ else
+ {
+ // Table name is not given. Use the current cell position to infer
+ // which table to use.
+ range = table_hdl->get_range(m_pos, table.column_first, table.column_last, table.areas);
+ }
+
+ get_stack().push_range_ref(range);
+ next();
+}
+
+void formula_interpreter::constant()
+{
+ double val = std::get<double>(token().value);
+ next();
+ get_stack().push_value(val);
+ if (mp_handler)
+ mp_handler->push_value(val);
+}
+
+void formula_interpreter::literal()
+{
+ const std::string& s = string_or_throw();
+
+ next();
+ get_stack().push_string(s);
+}
+
+void formula_interpreter::array()
+{
+ // '{' <constant> or <literal> ',' or ';' <constant> or <literal> ',' or ';' .... '}'
+ assert(token().opcode == fop_array_open);
+
+ if (mp_handler)
+ mp_handler->push_token(fop_array_open);
+
+ next(); // skip '{'
+
+ std::vector<double> values;
+ std::vector<std::tuple<std::size_t, std::size_t, std::string>> strings;
+ std::size_t row = 0;
+ std::size_t col = 0;
+ std::optional<std::size_t> prev_col;
+
+ fopcode_t prev_op = fop_array_open;
+
+ for (; has_token(); next())
+ {
+ bool has_sign = false;
+
+ switch (prev_op)
+ {
+ case fop_array_open:
+ case fop_sep:
+ case fop_array_row_sep:
+ has_sign = sign();
+ break;
+ default:;
+ }
+
+ switch (token().opcode)
+ {
+ case fop_string:
+ {
+ switch (prev_op)
+ {
+ case fop_array_open:
+ case fop_sep:
+ case fop_array_row_sep:
+ break;
+ default:
+ throw invalid_expression("array: invalid placement of value");
+ }
+
+ strings.emplace_back(row, col, string_or_throw());
+ values.push_back(0); // placeholder value, will be replaced
+
+ ++col;
+ break;
+ }
+ case fop_value:
+ {
+ switch (prev_op)
+ {
+ case fop_minus:
+ case fop_plus:
+ case fop_array_open:
+ case fop_sep:
+ case fop_array_row_sep:
+ break;
+ default:
+ throw invalid_expression("array: invalid placement of value");
+ }
+
+ double v = std::get<double>(token().value);
+
+ if (mp_handler)
+ mp_handler->push_value(v);
+
+ if (has_sign)
+ v = -v;
+
+ values.push_back(v);
+
+ ++col;
+ break;
+ }
+ case fop_sep:
+ {
+ switch (prev_op)
+ {
+ case fop_value:
+ case fop_string:
+ break;
+ default:
+ throw invalid_expression("array: unexpected separator");
+ }
+
+ if (mp_handler)
+ mp_handler->push_token(fop_sep);
+ break;
+ }
+ case fop_array_row_sep:
+ {
+ switch (prev_op)
+ {
+ case fop_value:
+ case fop_string:
+ break;
+ default:
+ throw invalid_expression("array: unexpected row separator");
+ }
+
+ if (mp_handler)
+ mp_handler->push_token(fop_array_row_sep);
+
+ ++row;
+
+ if (prev_col && *prev_col != col)
+ throw invalid_expression("array: inconsistent column width");
+
+ prev_col = col;
+ col = 0;
+ break;
+ }
+ case fop_array_close:
+ {
+ switch (prev_op)
+ {
+ case fop_array_open:
+ case fop_value:
+ case fop_string:
+ break;
+ default:
+ throw invalid_expression("array: invalid placement of array close operator");
+ }
+
+ if (prev_col && *prev_col != col)
+ throw invalid_expression("array: inconsistent column width");
+
+ ++row;
+
+ // Stored values are in row-major order, but the matrix expects a column-major array.
+ numeric_matrix num_mtx_transposed(std::move(values), col, row);
+ numeric_matrix num_mtx(row, col);
+
+ for (std::size_t r = 0; r < row; ++r)
+ for (std::size_t c = 0; c < col; ++c)
+ num_mtx(r, c) = num_mtx_transposed(c, r);
+
+ if (strings.empty())
+ // pure numeric matrix
+ get_stack().push_matrix(std::move(num_mtx));
+ else
+ {
+ // multi-type matrix
+ matrix mtx(num_mtx);
+ for (const auto& [r, c, str] : strings)
+ mtx.set(r, c, str);
+
+ get_stack().push_matrix(std::move(mtx));
+ }
+
+ if (mp_handler)
+ mp_handler->push_token(fop_array_close);
+
+ next(); // skip '}'
+ return;
+ }
+ default:
+ {
+ std::ostringstream os;
+ os << "array: unexpected token type: <" << get_opcode_name(token().opcode) << ">";
+ throw invalid_expression(os.str());
+ }
+ }
+
+ prev_op = token().opcode;
+ }
+
+ throw invalid_expression("array: ended prematurely");
+}
+
+void formula_interpreter::function()
+{
+ // <func name> '(' <expression> ',' <expression> ',' ... ',' <expression> ')'
+ ensure_token_exists();
+ assert(token().opcode == fop_function);
+ formula_function_t func_oc = formula_functions::get_function_opcode(token());
+ if (mp_handler)
+ mp_handler->push_function(func_oc);
+
+ push_stack();
+
+ IXION_TRACE("function='" << get_formula_function_name(func_oc) << "'");
+ assert(get_stack().empty());
+
+ if (next_token().opcode != fop_open)
+ throw invalid_expression("expecting a '(' after a function name.");
+
+ if (mp_handler)
+ mp_handler->push_token(fop_open);
+
+ fopcode_t oc = next_token().opcode;
+ bool expect_sep = false;
+ while (oc != fop_close)
+ {
+ if (expect_sep)
+ {
+ if (oc != fop_sep)
+ throw invalid_expression("argument separator is expected, but not found.");
+ next();
+ expect_sep = false;
+
+ if (mp_handler)
+ mp_handler->push_token(oc);
+ }
+ else
+ {
+ expression();
+ expect_sep = true;
+ }
+ oc = token_or_throw().opcode;
+ }
+
+ if (mp_handler)
+ mp_handler->push_token(oc);
+
+ next();
+
+ // Function call pops all stack values pushed onto the stack this far, and
+ // pushes the result onto the stack.
+ formula_functions(m_context, m_pos).interpret(func_oc, get_stack());
+ assert(get_stack().size() == 1);
+
+ pop_stack();
+}
+
+void formula_interpreter::clear_stacks()
+{
+ m_stacks.clear();
+ m_stacks.emplace_back(m_context);
+}
+
+void formula_interpreter::push_stack()
+{
+ m_stacks.emplace_back(m_context);
+}
+
+void formula_interpreter::pop_stack()
+{
+ assert(m_stacks.size() >= 2);
+ assert(m_stacks.back().size() == 1);
+ auto tmp = m_stacks.back().release_back();
+ m_stacks.pop_back();
+ m_stacks.back().push_back(std::move(tmp));
+}
+
+formula_value_stack& formula_interpreter::get_stack()
+{
+ assert(!m_stacks.empty());
+ return m_stacks.back();
+}
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/src/libixion/formula_interpreter.hpp b/src/libixion/formula_interpreter.hpp
new file mode 100644
index 0000000..73721f6
--- /dev/null
+++ b/src/libixion/formula_interpreter.hpp
@@ -0,0 +1,125 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef INCLUDED_IXION_FORMULA_INTERPRETER_HPP
+#define INCLUDED_IXION_FORMULA_INTERPRETER_HPP
+
+#include "ixion/global.hpp"
+#include "ixion/formula_tokens.hpp"
+#include "ixion/formula_result.hpp"
+
+#include "formula_value_stack.hpp"
+
+#include <sstream>
+#include <unordered_set>
+#include <deque>
+
+namespace ixion {
+
+class formula_cell;
+
+namespace iface {
+
+class session_handler;
+
+}
+
+/**
+ * The formula interpreter parses a series of formula tokens representing a
+ * formula expression, and calculates the result of that expression.
+ *
+ * <p>Intermediate result of each handler is pushed onto the stack and
+ * popped from it for the calling method to retrieve. By the end of the
+ * interpretation there should only be one result left on the stack which is
+ * the final result of the interpretation of the expression. The number of
+ * intermediate results (or stack values) on the stack is normally one at
+ * the end of each handler, except for the function handler where the number
+ * of stack values may be more than one when the function may take more than
+ * one argument.</p>
+ */
+class formula_interpreter
+{
+ using name_set = std::unordered_set<std::string>;
+ using fv_stacks_type = std::deque<formula_value_stack>;
+
+public:
+ typedef ::std::vector<const formula_token*> local_tokens_type;
+
+ formula_interpreter() = delete;
+ formula_interpreter(const formula_interpreter&) = delete;
+ formula_interpreter& operator= (formula_interpreter) = delete;
+
+ formula_interpreter(const formula_cell* cell, model_context& cxt);
+ ~formula_interpreter();
+
+ void set_origin(const abs_address_t& pos);
+ bool interpret();
+ formula_result transfer_result();
+ formula_error_t get_error() const;
+
+private:
+ /**
+ * Expand all named expressions into a flat set of tokens. This is also
+ * where we detect circular referencing of named expressions.
+ */
+ void init_tokens();
+
+ void pop_result();
+
+ void expand_named_expression(const named_expression_t* expr, name_set& used_names);
+
+ void ensure_token_exists() const;
+ bool has_token() const;
+ void next();
+ const formula_token& token() const;
+ const formula_token& token_or_throw() const;
+ const formula_token& next_token();
+ const std::string& string_or_throw() const;
+
+ // The following methods are handlers. In each handler, the initial
+ // position is always set to the first unprocessed token. Each handler is
+ // responsible for setting the token position to the next unprocessed
+ // position when it finishes.
+
+ void expression();
+ void term();
+ void factor();
+ bool sign();
+ void paren();
+ void single_ref();
+ void range_ref();
+ void table_ref();
+ void constant();
+ void literal();
+ void array();
+ void function();
+
+ void clear_stacks();
+ void push_stack();
+ void pop_stack();
+
+ formula_value_stack& get_stack();
+
+private:
+ const formula_cell* m_parent_cell;
+ model_context& m_context;
+ std::unique_ptr<iface::session_handler> mp_handler;
+ abs_address_t m_pos;
+
+ fv_stacks_type m_stacks;
+ local_tokens_type m_tokens;
+ local_tokens_type::const_iterator m_cur_token_itr;
+ local_tokens_type::const_iterator m_end_token_pos;
+
+ formula_result m_result;
+ formula_error_t m_error;
+};
+
+}
+
+#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/src/libixion/formula_lexer.cpp b/src/libixion/formula_lexer.cpp
new file mode 100644
index 0000000..7928d82
--- /dev/null
+++ b/src/libixion/formula_lexer.cpp
@@ -0,0 +1,345 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include "formula_lexer.hpp"
+#include "debug.hpp"
+#include "ixion/global.hpp"
+
+#include <cassert>
+#include <iostream>
+#include <sstream>
+#include <cctype>
+#include <unordered_map>
+
+namespace ixion {
+
+namespace {
+
+const std::unordered_map<char, lexer_opcode_t> ops_map = {
+ { '&', lexer_opcode_t::concat },
+ { '(', lexer_opcode_t::open },
+ { ')', lexer_opcode_t::close },
+ { '*', lexer_opcode_t::multiply },
+ { '+', lexer_opcode_t::plus },
+ { '-', lexer_opcode_t::minus },
+ { '/', lexer_opcode_t::divide },
+ { '<', lexer_opcode_t::less },
+ { '=', lexer_opcode_t::equal },
+ { '>', lexer_opcode_t::greater },
+ { '^', lexer_opcode_t::exponent },
+ { '{', lexer_opcode_t::array_open },
+ { '}', lexer_opcode_t::array_close },
+};
+
+} // anonymous namespace
+
+class tokenizer
+{
+ enum buffer_type {
+ buf_numeral,
+ buf_name
+ };
+
+public:
+ tokenizer() = delete;
+ tokenizer(const tokenizer&) = delete;
+ tokenizer& operator= (tokenizer) = delete;
+
+ explicit tokenizer(lexer_tokens_t& tokens, const char* p, size_t n) :
+ m_tokens(tokens),
+ m_sep_arg(','),
+ m_sep_array_row(';'),
+ m_sep_decimal('.'),
+ mp_first(p),
+ mp_char(NULL),
+ m_size(n),
+ m_pos(0),
+ mp_char_stored(nullptr),
+ m_pos_stored(0)
+ {
+ }
+
+ void run();
+
+ void set_sep_arg(char c);
+
+private:
+ bool is_arg_sep(char c) const;
+ bool is_array_row_sep(char c) const;
+ bool is_decimal_sep(char c) const;
+ bool is_op(char c) const;
+
+ void init();
+
+ void numeral();
+ void space();
+ void name();
+ void op(lexer_opcode_t oc);
+ void string();
+
+ bool has_char() const;
+ void next();
+ void push_pos();
+ void pop_pos();
+
+private:
+ lexer_tokens_t& m_tokens;
+
+ char m_sep_arg;
+ char m_sep_array_row;
+ char m_sep_decimal;
+
+ const char* mp_first;
+ const char* mp_char;
+ const size_t m_size;
+ size_t m_pos;
+
+ const char* mp_char_stored;
+ size_t m_pos_stored;
+};
+
+void tokenizer::init()
+{
+ m_tokens.clear();
+ mp_char = mp_first;
+ m_pos = 0;
+}
+
+void tokenizer::run()
+{
+ if (!m_size)
+ // Nothing to do.
+ return;
+
+ init();
+
+ while (has_char())
+ {
+ if (std::isdigit(*mp_char))
+ {
+ numeral();
+ continue;
+ }
+
+ if (auto it = ops_map.find(*mp_char); it != ops_map.end())
+ {
+ op(it->second);
+ continue;
+ }
+
+ switch (*mp_char)
+ {
+ case ' ':
+ space();
+ continue;
+ case '"':
+ string();
+ continue;
+ }
+
+ if (is_arg_sep(*mp_char))
+ {
+ op(lexer_opcode_t::sep);
+ continue;
+ }
+
+ if (is_array_row_sep(*mp_char))
+ {
+ op(lexer_opcode_t::array_row_sep);
+ continue;
+ }
+
+ name();
+ }
+}
+
+void tokenizer::set_sep_arg(char c)
+{
+ m_sep_arg = c;
+}
+
+bool tokenizer::is_arg_sep(char c) const
+{
+ return c == m_sep_arg;
+}
+
+bool tokenizer::is_array_row_sep(char c) const
+{
+ return c == m_sep_array_row;
+}
+
+bool tokenizer::is_decimal_sep(char c) const
+{
+ return c == m_sep_decimal;
+}
+
+bool tokenizer::is_op(char c) const
+{
+ if (is_arg_sep(c))
+ return true;
+
+ if (ops_map.count(c) > 0)
+ return true;
+
+ switch (*mp_char)
+ {
+ case ' ':
+ case '"':
+ return true;
+ }
+ return false;
+}
+
+void tokenizer::numeral()
+{
+ const char* p = mp_char;
+ push_pos();
+
+ size_t len = 1;
+ size_t sep_count = 0;
+ for (next(); has_char(); next(), ++len)
+ {
+ if (*mp_char == ':')
+ {
+ // Treat this as a name. This may be a part of a row-only range (e.g. 3:3).
+ pop_pos();
+ name();
+ return;
+ }
+
+ if (std::isdigit(*mp_char))
+ continue;
+ if (is_decimal_sep(*mp_char) && ++sep_count <= 1)
+ continue;
+
+ break;
+ }
+
+ if (sep_count > 1)
+ {
+ // failed to parse this as a numeral. Treat this as a name.
+ IXION_TRACE("error parsing '" << std::string(p, len) << "' as a numeral, treating it as a name.");
+ pop_pos();
+ name();
+ return;
+ }
+ double val = to_double({p, len});
+ m_tokens.emplace_back(val);
+}
+
+void tokenizer::space()
+{
+ // space is ignored for now.
+ next();
+}
+
+void tokenizer::name()
+{
+ std::vector<char> scopes;
+
+ const char* p = mp_char;
+ size_t len = 0;
+
+ for (; has_char(); next(), ++len)
+ {
+ char c = *mp_char;
+
+ if (!scopes.empty() && scopes.back() == c)
+ {
+ scopes.pop_back();
+ continue;
+ }
+
+ switch (c)
+ {
+ case '[':
+ scopes.push_back(']');
+ continue;
+ case '\'':
+ scopes.push_back('\'');
+ continue;
+ }
+
+ if (!scopes.empty())
+ continue;
+
+ if (is_op(c))
+ break;
+ }
+
+ m_tokens.emplace_back(lexer_opcode_t::name, std::string_view{p, len});
+}
+
+void tokenizer::op(lexer_opcode_t oc)
+{
+ m_tokens.emplace_back(oc);
+ next();
+}
+
+void tokenizer::string()
+{
+ next();
+ const char* p = mp_char;
+ size_t len = 0;
+ for (; *mp_char != '"' && has_char(); ++len)
+ next();
+
+ m_tokens.emplace_back(lexer_opcode_t::string, std::string_view{p, len});
+
+ if (*mp_char == '"')
+ next();
+}
+
+void tokenizer::next()
+{
+ ++mp_char;
+ ++m_pos;
+}
+
+void tokenizer::push_pos()
+{
+ mp_char_stored = mp_char;
+ m_pos_stored = m_pos;
+}
+
+void tokenizer::pop_pos()
+{
+ mp_char = mp_char_stored;
+ m_pos = m_pos_stored;
+
+ mp_char_stored = NULL;
+ m_pos_stored = 0;
+}
+
+bool tokenizer::has_char() const
+{
+ return m_pos < m_size;
+}
+
+// ============================================================================
+
+formula_lexer::tokenize_error::tokenize_error(const std::string& msg) : general_error(msg) {}
+
+formula_lexer::formula_lexer(const config& config, const char* p, size_t n) :
+ m_config(config), mp_first(p), m_size(n) {}
+
+formula_lexer::~formula_lexer() {}
+
+void formula_lexer::tokenize()
+{
+ tokenizer tkr(m_tokens, mp_first, m_size);
+ tkr.set_sep_arg(m_config.sep_function_arg);
+ tkr.run();
+}
+
+void formula_lexer::swap_tokens(lexer_tokens_t& tokens)
+{
+ m_tokens.swap(tokens);
+}
+
+}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/src/libixion/formula_lexer.hpp b/src/libixion/formula_lexer.hpp
new file mode 100644
index 0000000..b61eb0b
--- /dev/null
+++ b/src/libixion/formula_lexer.hpp
@@ -0,0 +1,55 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef INCLUDED_IXION_FORMULA_LEXER_HPP
+#define INCLUDED_IXION_FORMULA_LEXER_HPP
+
+#include <string>
+#include <exception>
+
+#include "ixion/exceptions.hpp"
+#include "ixion/config.hpp"
+
+#include "lexer_tokens.hpp"
+
+namespace ixion {
+
+class formula_lexer
+{
+ formula_lexer() = delete;
+ formula_lexer(const formula_lexer&) = delete;
+ formula_lexer& operator= (const formula_lexer&) = delete;
+public:
+ class tokenize_error : public general_error
+ {
+ public:
+ tokenize_error(const std::string& msg);
+ };
+
+ formula_lexer(const config& config, const char* p, size_t n);
+ ~formula_lexer();
+
+ void tokenize();
+
+ /**
+ * Note that this will empty the tokens stored inside the lexer instance.
+ *
+ * @param tokens token container to move the tokens to.
+ */
+ void swap_tokens(lexer_tokens_t& tokens);
+
+private:
+ const config& m_config;
+ lexer_tokens_t m_tokens;
+ const char* mp_first;
+ size_t m_size;
+};
+
+}
+
+#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/src/libixion/formula_name_resolver.cpp b/src/libixion/formula_name_resolver.cpp
new file mode 100644
index 0000000..9e11401
--- /dev/null
+++ b/src/libixion/formula_name_resolver.cpp
@@ -0,0 +1,2057 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include <ixion/formula_name_resolver.hpp>
+#include <ixion/table.hpp>
+
+#include "formula_functions.hpp"
+#include "debug.hpp"
+
+#include <cassert>
+#include <iostream>
+#include <sstream>
+#include <vector>
+#include <limits>
+#include <algorithm>
+#include <cctype>
+#include <optional>
+
+namespace ixion {
+
+namespace {
+
+bool check_address_by_sheet_bounds(const model_context* cxt, const address_t& pos)
+{
+ rc_size_t ss(row_upper_bound, column_upper_bound);
+
+ if (cxt && pos.sheet >= 0 && size_t(pos.sheet) < cxt->get_sheet_count())
+ {
+ // Make sure the address is within the sheet size.
+ ss = cxt->get_sheet_size();
+ }
+
+ row_t row_check = pos.row >= 0 ? pos.row : -pos.row;
+
+ if (pos.row != row_unset && row_check >= ss.row)
+ return false;
+
+ col_t col_check = pos.column >= 0 ? pos.column : -pos.column;
+
+ if (pos.column != column_unset && col_check >= ss.column)
+ return false;
+
+ return true;
+}
+
+bool resolve_function(const char* p, size_t n, formula_name_t& ret)
+{
+ formula_function_t func_oc = formula_functions::get_function_opcode({p, n});
+ if (func_oc != formula_function_t::func_unknown)
+ {
+ // This is a built-in function.
+ ret.type = formula_name_t::function;
+ ret.value = func_oc;
+ return true;
+ }
+ return false;
+}
+
+/**
+ * Table reference can be either one of:
+ *
+ * <ul>
+ * <li>Table[Column]</li>
+ * <li>[Column]</li>
+ * <li>Table[[#Area],[Column]]</li>
+ * <li>Table[[#Area1],[#Area2],[Column]]</li>
+ * </ul>
+ *
+ * where the #Area (area specifier) can be one or more of
+ *
+ * <ul>
+ * <li>#Header</li>
+ * <li>#Data</li>
+ * <li>#Totals</li>
+ * <li>#All</li>
+ * </ul>
+ */
+bool resolve_table(const model_context* cxt, const char* p, size_t n, formula_name_t& ret)
+{
+ if (!cxt)
+ return false;
+
+ short scope = 0;
+ size_t last_column_pos = std::numeric_limits<size_t>::max();
+ std::string_view buf;
+ std::string_view table_name;
+ std::vector<std::string_view> names;
+
+ bool table_detected = false;
+
+ const char* p_end = p + n;
+ for (; p != p_end; ++p)
+ {
+ switch (*p)
+ {
+ case '[':
+ {
+ if (scope >= 2)
+ return false;
+
+ table_detected = true;
+ if (!buf.empty())
+ {
+ if (scope != 0)
+ return false;
+
+ table_name = buf;
+ buf = std::string_view{};
+ }
+
+ ++scope;
+ }
+ break;
+ case ']':
+ {
+ if (scope <= 0)
+ // non-matching brace.
+ return false;
+
+ if (!buf.empty())
+ {
+ names.push_back(buf);
+ buf = std::string_view{};
+ }
+
+ --scope;
+ }
+ break;
+ case ',':
+ {
+ if (!buf.empty())
+ return false;
+ }
+ break;
+ case ':':
+ {
+ if (scope != 1)
+ // allowed only inside the first scope.
+ return false;
+
+ if (!buf.empty())
+ return false;
+
+ if (names.empty())
+ return false;
+
+ last_column_pos = names.size();
+ }
+ break;
+ default:
+ if (buf.empty())
+ buf = std::string_view{p, 1u};
+ else
+ buf = std::string_view{buf.data(), buf.size() + 1u};
+ }
+ }
+
+ if (!buf.empty())
+ return false;
+
+ if (!table_detected)
+ return false;
+
+ if (names.empty())
+ return false;
+
+ formula_name_t::table_type table;
+ table.areas = table_area_none;
+ table.name = table_name;
+ table.column_first = std::string_view();
+ table.column_last = std::string_view();
+
+ for (std::size_t i = 0; i < names.size(); ++i)
+ {
+ std::string_view name = names[i];
+ assert(!name.empty());
+
+ if (name[0] == '#')
+ {
+ // area specifier.
+ name.remove_prefix(1);
+ if (name == "Headers")
+ table.areas |= table_area_headers;
+ else if (name == "Data")
+ table.areas |= table_area_data;
+ else if (name == "Totals")
+ table.areas |= table_area_totals;
+ else if (name == "All")
+ table.areas = table_area_all;
+ }
+ else if (!table.column_first.empty())
+ {
+ // This is a second column name.
+ if (!table.column_last.empty())
+ return false;
+
+ if (i != last_column_pos)
+ return false;
+
+ table.column_last = name;
+ }
+ else
+ {
+ // first column name.
+ if (!table.areas)
+ table.areas = table_area_data;
+
+ table.column_first = name;
+ }
+ }
+
+ ret.type = formula_name_t::table_reference;
+ ret.value = table;
+
+ return true;
+}
+
+/**
+ * Check if the name is a built-in function, or else it's considered a named
+ * expression.
+ *
+ * @param name name to be resolved
+ * @param ret resolved name type
+ */
+void resolve_function_or_name(const char* p, size_t n, formula_name_t& ret)
+{
+ if (resolve_function(p, n, ret))
+ return;
+
+ // Everything else is assumed to be a named expression.
+ ret.type = formula_name_t::named_expression;
+}
+
+void set_cell_reference(formula_name_t& ret, const address_t& addr)
+{
+ ret.type = formula_name_t::cell_reference;
+ ret.value = addr;
+}
+
+enum class resolver_parse_mode { column, row };
+
+void append_sheet_name(std::ostringstream& os, const ixion::model_context& cxt, sheet_t sheet)
+{
+ if (!is_valid_sheet(sheet))
+ {
+ IXION_DEBUG("invalid sheet index (" << sheet << ")");
+ return;
+ }
+
+ std::string sheet_name = cxt.get_sheet_name(sheet);
+ std::string buffer; // used only when the sheet name contains at least one single quote.
+
+ const char* p = sheet_name.data();
+ const char* p_end = p + sheet_name.size();
+
+ bool quote = false;
+ const char* p0 = nullptr;
+
+ for (; p != p_end; ++p)
+ {
+ if (!p0)
+ p0 = p;
+
+ switch (*p)
+ {
+ case ' ':
+ case '"':
+ quote = true;
+ break;
+ case '\'':
+ quote = true;
+ buffer += std::string(p0, p-p0);
+ buffer.push_back(*p);
+ buffer.push_back(*p);
+ p0 = nullptr;
+ break;
+ }
+ }
+
+ if (quote)
+ os << '\'';
+
+ if (buffer.empty())
+ os << sheet_name;
+ else
+ {
+ if (p0)
+ buffer += std::string(p0, p-p0);
+ os << buffer;
+ }
+
+ if (quote)
+ os << '\'';
+}
+
+void append_sheet_name_calc_a1(
+ std::ostringstream& os, const ixion::model_context* cxt, const address_t& addr, const abs_address_t& origin)
+{
+ if (!cxt)
+ return;
+
+ sheet_t sheet = addr.sheet;
+ if (addr.abs_sheet)
+ os << '$';
+ else
+ sheet += origin.sheet;
+ append_sheet_name(os, *cxt, sheet);
+ os << '.';
+}
+
+void append_sheet_name_odf_cra(
+ std::ostringstream& os, const ixion::model_context* cxt, const address_t& addr, const abs_address_t& origin)
+{
+ if (cxt)
+ {
+ sheet_t sheet = addr.sheet;
+ if (addr.abs_sheet)
+ os << '$';
+ else
+ sheet += origin.sheet;
+ append_sheet_name(os, *cxt, sheet);
+ }
+ os << '.';
+}
+
+void append_column_name_a1(std::ostringstream& os, col_t col)
+{
+ const col_t div = 26;
+ std::string col_name;
+ while (true)
+ {
+ col_t rem = col % div;
+ char c = 'A' + rem;
+ col_name.push_back(c);
+ if (col < div)
+ break;
+
+ col -= rem;
+ col /= div;
+ col -= 1;
+ }
+
+ std::reverse(col_name.begin(), col_name.end());
+ os << col_name;
+}
+
+void append_column_address_a1(std::ostringstream& os, col_t col, col_t origin, bool absolute)
+{
+ if (col == column_unset)
+ return;
+
+ if (absolute)
+ os << '$';
+ else
+ col += origin;
+
+ append_column_name_a1(os, col);
+}
+
+void append_row_address_a1(std::ostringstream& os, row_t row, row_t origin, bool absolute)
+{
+ if (row == row_unset)
+ return;
+
+ if (absolute)
+ os << '$';
+ else
+ row += origin;
+
+ os << (row + 1);
+}
+
+void append_address_a1(
+ std::ostringstream& os, const ixion::model_context* cxt,
+ const address_t& addr, const abs_address_t& pos, char sheet_name_sep)
+{
+ assert(sheet_name_sep);
+
+ col_t col = addr.column;
+ row_t row = addr.row;
+ sheet_t sheet = addr.sheet;
+ if (!addr.abs_column)
+ col += pos.column;
+ if (!addr.abs_row)
+ row += pos.row;
+ if (!addr.abs_sheet)
+ sheet += pos.sheet;
+
+ if (cxt)
+ {
+ append_sheet_name(os, *cxt, sheet);
+ os << sheet_name_sep;
+ }
+
+ if (addr.abs_column)
+ os << '$';
+ append_column_name_a1(os, col);
+
+ if (addr.abs_row)
+ os << '$';
+ os << (row + 1);
+}
+
+/**
+ * Almost identical to append_address_a1, but it always appends a sheet name
+ * separator even if a sheet name is not appended.
+ */
+void append_address_a1_with_sheet_name_sep(
+ std::ostringstream& os, const ixion::model_context* cxt,
+ const address_t& addr, const abs_address_t& pos, char sheet_name_sep)
+{
+ if (!cxt)
+ os << sheet_name_sep;
+
+ append_address_a1(os, cxt, addr, pos, sheet_name_sep);
+}
+
+void append_address_r1c1(
+ std::ostringstream& os, const address_t& addr, const abs_address_t& pos)
+{
+ if (addr.row != row_unset)
+ {
+ os << 'R';
+ if (addr.abs_row)
+ // absolute row address.
+ os << (addr.row+1);
+ else if (addr.row)
+ {
+ // relative row address different from origin.
+ os << '[';
+ os << addr.row;
+ os << ']';
+ }
+
+ }
+ if (addr.column != column_unset)
+ {
+ os << 'C';
+ if (addr.abs_column)
+ os << (addr.column+1);
+ else if (addr.column)
+ {
+ os << '[';
+ os << addr.column;
+ os << ']';
+ }
+ }
+}
+
+void append_name_string(std::ostringstream& os, const model_context* cxt, string_id_t sid)
+{
+ if (!cxt)
+ return;
+
+ const std::string* p = cxt->get_string(sid);
+ if (p)
+ os << *p;
+}
+
+char append_table_areas(std::ostringstream& os, const table_t& table)
+{
+ if (table.areas == table_area_all)
+ {
+ os << "[#All]";
+ return 1;
+ }
+
+ bool headers = (table.areas & table_area_headers);
+ bool data = (table.areas & table_area_data);
+ bool totals = (table.areas & table_area_totals);
+
+ char count = 0;
+ if (headers)
+ {
+ os << "[#Headers]";
+ ++count;
+ }
+
+ if (data)
+ {
+ if (count > 0)
+ os << ',';
+ os << "[#Data]";
+ ++count;
+ }
+
+ if (totals)
+ {
+ if (count > 0)
+ os << ',';
+ os << "[#Totals]";
+ ++count;
+ }
+
+ return count;
+}
+
+enum parse_address_result_type
+{
+ invalid = 0,
+ valid_address,
+ range_expected /// valid address followed by a ':'.
+};
+
+struct parse_address_result
+{
+ parse_address_result_type result;
+ bool sheet_name = false;
+};
+
+#if IXION_LOGGING
+
+[[maybe_unused]] std::ostream& operator<< (std::ostream& os, parse_address_result_type rt)
+{
+ static const char* names[] = {
+ "invalid",
+ "valid address",
+ "range expected"
+ };
+
+ os << names[rt];
+ return os;
+}
+
+[[maybe_unused]] std::string to_string(parse_address_result_type rt)
+{
+ std::ostringstream os;
+ os << rt;
+ return os.str();
+}
+
+#endif
+
+/**
+ * Upon successful parsing, the position should be on the separator character.
+ */
+std::optional<sheet_t> parse_sheet_name_quoted(
+ const ixion::model_context& cxt, const char sep, const char*& p, const char* p_end)
+{
+ assert(*p == '\'');
+
+ ++p; // skip the open quote.
+ std::size_t len = 0;
+ std::string buffer; // used only when the name contains at least one single quote.
+ const char* p1 = p;
+
+ // parse until the closing quote is reached.
+ for (; p < p_end; ++p)
+ {
+ if (*p == '\'')
+ {
+ ++p; // skip the quote
+ if (p == p_end)
+ break;
+
+ if (*p == '\'')
+ {
+ // next character is a quote too. Store the parsed string
+ // segment to the buffer and move on.
+ ++len;
+ buffer += std::string(p1, len);
+ p1 = p + 1;
+ len = 0;
+ continue;
+ }
+
+ if (*p != sep)
+ // the next char must be the separator. Parse failed.
+ break;
+
+ std::optional<sheet_t> sheet;
+
+ if (buffer.empty())
+ // Name contains no single quotes.
+ sheet = cxt.get_sheet_index({p1, len});
+ else
+ {
+ buffer += std::string(p1, len);
+ sheet = cxt.get_sheet_index({buffer.data(), buffer.size()});
+ }
+
+ return sheet;
+ }
+
+ ++len;
+ }
+
+ return std::optional<sheet_t>{};
+}
+
+/**
+ * Try to parse a sheet name prefix in the string. If this fails, revert
+ * the current position back to the original position prior to the call.
+ *
+ * Upon successful parsing, the position should be on the separator character.
+ *
+ * @param cxt model context used to query sheet names.
+ * @param sep separator character between sheet name and the cell address.
+ * @param p pointer to the first character. When the parsing is succesful,
+ * this will point to the separator character, but if the parsing
+ * fails, it will point to the same character it pointed to prior to
+ * calling this function.
+ * @param p_end end position that is one character past the last parsable
+ * character.
+ *
+ * @return value containing sheet index upon success, or empty upon failure.
+ */
+std::optional<sheet_t> parse_sheet_name(
+ const ixion::model_context& cxt, const char sep, const char*& p, const char* p_end)
+{
+ assert(p < p_end);
+
+ const char* p_old = p; // old position to revert to in case we fail to parse a sheet name.
+
+ if (*p == '$')
+ ++p;
+
+ if (*p == '\'')
+ {
+ auto sheet = parse_sheet_name_quoted(cxt, sep, p, p_end);
+ if (!sheet)
+ p = p_old;
+ return sheet;
+ }
+
+ const char* p0 = p;
+ size_t len = 0;
+
+ // parse until we hit the sheet-address separator.
+ for (; p < p_end; ++p, ++len)
+ {
+ if (*p == sep)
+ return cxt.get_sheet_index({p0, len});
+ }
+
+ p = p_old;
+ return std::optional<sheet_t>{};
+}
+
+struct sheet_range_t
+{
+ bool present = false; // whether or not the address contains sheet name segment
+ sheet_t sheet1 = invalid_sheet;
+ sheet_t sheet2 = invalid_sheet;
+
+ bool valid() const
+ {
+ return sheet1 != invalid_sheet || sheet2 != invalid_sheet;
+ }
+};
+
+sheet_range_t parse_excel_sheet_name_quoted(const ixion::model_context& cxt, const char*& p, const char* p_end)
+{
+ assert(*p == '\'');
+ const char* p_old = p; // old position to revert to in case we fail to parse a sheet name.
+
+ ++p; // skip the quote
+
+ sheet_range_t ret;
+ bool was_quote = false; // record if the last char was a quote, but only when it followed a non-quote char.
+ std::string buf; // for name containing quote(s)
+
+ for (const char* p0 = nullptr; p < p_end; ++p)
+ {
+ if (!p0)
+ p0 = p;
+
+ switch (*p)
+ {
+ case '!':
+ {
+ if (!was_quote)
+ {
+ // Fail
+ p = p_end;
+ break;
+ }
+
+ assert(ret.sheet2 == invalid_sheet);
+ std::size_t n = std::distance(p0, p) - 1u;
+ buf += std::string_view{p0, n};
+ ret.sheet2 = cxt.get_sheet_index(buf);
+ ret.present = true;
+ return ret;
+ }
+ case ':':
+ {
+ if (ret.sheet1 != invalid_sheet)
+ {
+ // likely the second range separator, which is not allowed. Fail.
+ p = p_end;
+ break;
+ }
+
+ std::size_t n = std::distance(p0, p);
+ buf += std::string_view{p0, n};
+ ret.sheet1 = cxt.get_sheet_index(buf);
+ p0 = nullptr;
+ buf.clear();
+ was_quote = false;
+ break;
+ }
+ case '\'':
+ {
+ if (was_quote)
+ {
+ // two consequtive quotes are treated as a single quote.
+ std::size_t n = std::distance(p0, p);
+ buf += std::string_view{p0, n};
+ p0 = nullptr;
+ }
+
+ // if more than two quotes occur, set the flag only on the 1st, 3rd, 5th etc.
+ was_quote = !was_quote;
+ break;
+ }
+ default:
+ was_quote = false;
+ }
+ }
+
+ p = p_old;
+ ret.sheet1 = ret.sheet2 = invalid_sheet;
+ return ret;
+}
+
+/**
+ * Parse an Excel sheet name string. An Excel name can be a range of sheets
+ * separated by a ':' e.g. Sheet1:Sheet2!A1:B2.
+ *
+ * @return sheet range values. It can either contain 1) two valid sheet
+ * indices for a range of sheets, 2) sheet1 invalid and sheet2 valid
+ * for a single sheet name, or 3) both sheet indices are invalid.
+ */
+sheet_range_t parse_excel_sheet_name(const ixion::model_context& cxt, const char*& p, const char* p_end)
+{
+ assert(p < p_end);
+ if (*p == '\'')
+ return parse_excel_sheet_name_quoted(cxt, p, p_end);
+
+ sheet_range_t ret;
+
+ const char* p_old = p; // old position to revert to in case we fail to parse a sheet name.
+
+ for (const char* p0 = nullptr; p < p_end; ++p)
+ {
+ if (!p0)
+ p0 = p;
+
+ switch (*p)
+ {
+ case '!':
+ {
+ assert(ret.sheet2 == invalid_sheet);
+ std::size_t n = std::distance(p0, p);
+ std::string_view name{p0, n};
+ ret.sheet2 = cxt.get_sheet_index(name);
+ ret.present = true;
+ return ret;
+ }
+ case ':':
+ {
+ if (ret.sheet1 != invalid_sheet)
+ {
+ // likely the second range separator, which is not allowed. Fail.
+ p = p_end;
+ break;
+ }
+
+ std::size_t n = std::distance(p0, p);
+ std::string_view name{p0, n};
+ ret.sheet1 = cxt.get_sheet_index(name);
+ p0 = nullptr;
+ break;
+ }
+ case ' ':
+ case '\'':
+ case '"':
+ {
+ // invalid char. Check if a '!' occurs at a later position.
+ for (++p; p < p_end; ++p)
+ {
+ if (*p == '!')
+ {
+ ret.present = true;
+ p = p_end;
+ break;
+ }
+ }
+ break;
+ }
+ }
+ }
+
+ p = p_old;
+ ret.sheet1 = ret.sheet2 = invalid_sheet;
+ return ret;
+}
+
+/**
+ * If there is no number to parse, it returns 0 and the p will not
+ * increment. Otherwise, p will point to the position past the last parsed
+ * digit character.
+ */
+template<typename T>
+T parse_number(const char*&p, const char* p_end)
+{
+ assert(p < p_end);
+
+ T num = 0;
+
+ bool sign = false;
+ if (*p == '+')
+ ++p;
+ else if (*p == '-')
+ {
+ ++p;
+ sign = true;
+ }
+
+ for (; p < p_end && std::isdigit(*p); ++p)
+ {
+ // Parse number.
+ num *= 10;
+ num += *p - '0';
+ }
+
+ if (sign)
+ num *= -1;
+
+ return num;
+}
+
+/**
+ * Parse A1-style single cell address.
+ *
+ * @param p it must point to the first character of a cell address.
+ * @param p_end end position that is one character past the last character of
+ * a parsable character sequence.
+ * @param addr resolved cell address.
+ *
+ * @return parsing result.
+ */
+parse_address_result_type parse_address_a1(const char*& p, const char* p_end, address_t& addr)
+{
+ // NOTE: Row and column IDs are 1-based during parsing, while 0 is used as
+ // the state of a value-not-set. They are subtracted by one before
+ // returning.
+
+ resolver_parse_mode mode = resolver_parse_mode::column;
+
+ for (; p < p_end; ++p)
+ {
+ char c = *p;
+ if ('a' <= c && c <= 'z')
+ {
+ // Convert to upper case.
+ c -= 'a' - 'A';
+ }
+
+ if ('A' <= c && c <= 'Z')
+ {
+ // Column digit
+ if (mode != resolver_parse_mode::column)
+ return invalid;
+
+ if (addr.column)
+ addr.column *= 26;
+ addr.column += static_cast<col_t>(c - 'A' + 1);
+
+ if (addr.column > column_upper_bound)
+ return invalid;
+ }
+ else if (std::isdigit(c))
+ {
+ if (mode == resolver_parse_mode::column)
+ {
+ // First digit of a row.
+ if (c == '0')
+ // Leading zeros not allowed.
+ return invalid;
+
+ mode = resolver_parse_mode::row;
+ }
+
+ if (addr.row)
+ addr.row *= 10;
+
+ addr.row += static_cast<row_t>(c - '0');
+ }
+ else if (c == ':')
+ {
+ if (mode == resolver_parse_mode::row)
+ {
+ if (!addr.row)
+ return invalid;
+
+ --addr.row;
+
+ if (addr.column)
+ --addr.column;
+ else
+ addr.column = column_unset;
+
+ return range_expected;
+ }
+ else if (mode == resolver_parse_mode::column)
+ {
+ // row number is not given.
+ if (addr.column)
+ --addr.column;
+ else
+ // neither row number nor column number is given.
+ return invalid;
+
+ addr.row = row_unset;
+ return range_expected;
+ }
+ else
+ return invalid;
+ }
+ else if (c == '$')
+ {
+ // Absolute position.
+ if (mode == resolver_parse_mode::column)
+ {
+ if (addr.column)
+ {
+ // Column position has been already parsed.
+ mode = resolver_parse_mode::row;
+ addr.abs_row = true;
+ }
+ else
+ {
+ // Column position has not yet been parsed.
+ addr.abs_column = true;
+ }
+ }
+ else
+ return invalid;
+ }
+ else
+ return invalid;
+ }
+
+ if (mode == resolver_parse_mode::row)
+ {
+ if (!addr.row)
+ return invalid;
+
+ --addr.row;
+
+ if (addr.column)
+ --addr.column;
+ else
+ addr.column = column_unset;
+ }
+ else if (mode == resolver_parse_mode::column)
+ {
+ // row number is not given.
+ if (addr.column)
+ --addr.column;
+ else
+ // neither row number nor column number is given.
+ return invalid;
+
+ addr.row = row_unset;
+ }
+ return valid_address;
+}
+
+parse_address_result_type parse_address_r1c1(const char*& p, const char* p_end, address_t& addr)
+{
+ assert(p < p_end);
+
+ addr.row = row_unset;
+ addr.column = column_unset;
+
+ if (*p == 'R' || *p == 'r')
+ {
+ addr.row = 0;
+ addr.abs_row = false;
+ ++p;
+
+ if (p == p_end)
+ // Just 'R'. Not sure if this is valid or invalid, but let's call it invalid for now.
+ return parse_address_result_type::invalid;
+
+ if (*p != 'C' && *p != 'c')
+ {
+ addr.abs_row = (*p != '[');
+ if (!addr.abs_row)
+ {
+ // Relative row address.
+ ++p;
+ if (!std::isdigit(*p) && *p != '-' && *p != '+')
+ return parse_address_result_type::invalid;
+
+ addr.row = parse_number<row_t>(p, p_end);
+ if (p + 1 == p_end)
+ return (*p == ']') ? parse_address_result_type::valid_address : parse_address_result_type::invalid;
+ ++p;
+ }
+ else if (std::isdigit(*p))
+ {
+ // Absolute row address.
+ addr.row = parse_number<row_t>(p, p_end);
+ if (addr.row <= 0)
+ // absolute address with 0 or negative value is invalid.
+ return parse_address_result_type::invalid;
+
+ --addr.row; // 1-based to 0-based.
+
+ if (p == p_end)
+ // 'R' followed by a number without 'C' is valid.
+ return parse_address_result_type::valid_address;
+ }
+ }
+ }
+
+ if (*p == 'C' || *p == 'c')
+ {
+ addr.column = 0;
+ addr.abs_column = false;
+
+ ++p;
+ if (p == p_end)
+ {
+ if (addr.row == row_unset)
+ // Just 'C'. Row must be set.
+ return parse_address_result_type::invalid;
+
+ if (!addr.abs_row && addr.row == 0)
+ // 'RC' is invalid as it references itself.
+ return parse_address_result_type::invalid;
+
+ return parse_address_result_type::valid_address;
+ }
+
+ if (*p == '[')
+ {
+ // Relative column address.
+ ++p;
+ if (p == p_end)
+ return parse_address_result_type::invalid;
+
+ if (!std::isdigit(*p) && *p != '-' && *p != '+')
+ return parse_address_result_type::invalid;
+
+ addr.column = parse_number<col_t>(p, p_end);
+ if (p + 1 == p_end)
+ return (*p == ']') ? parse_address_result_type::valid_address : parse_address_result_type::invalid;
+
+ ++p;
+ }
+ else if (std::isdigit(*p))
+ {
+ // Absolute column address.
+ addr.abs_column = true;
+ addr.column = parse_number<col_t>(p, p_end);
+ if (addr.column <= 0)
+ // absolute address with 0 or negative value is invalid.
+ return parse_address_result_type::invalid;
+
+ --addr.column; // 1-based to 0-based.
+
+ if (p == p_end)
+ return parse_address_result_type::valid_address;
+ }
+ }
+
+ if (*p == ':')
+ return (p + 1 == p_end) ? parse_address_result_type::invalid : parse_address_result_type::range_expected;
+
+ return parse_address_result_type::invalid;
+}
+
+parse_address_result parse_address_calc_a1(
+ const ixion::model_context* cxt, const char*& p, const char* p_last, address_t& addr)
+{
+ parse_address_result res;
+
+ addr.row = 0;
+ addr.column = 0;
+ addr.abs_row = false;
+ addr.abs_column = false;
+
+ if (cxt)
+ {
+ // Overwrite the sheet index *only when* the sheet name is parsed successfully.
+ const char* p0 = p;
+ auto sheet = parse_sheet_name(*cxt, '.', p, p_last + 1);
+ res.sheet_name = sheet.has_value();
+ if (sheet)
+ {
+ ++p; // skip the separator
+ addr.sheet = *sheet;
+ addr.abs_sheet = (*p0 == '$');
+ }
+ }
+
+ res.result = parse_address_a1(p, ++p_last, addr);
+ return res;
+}
+
+/**
+ * Parse a single cell address in ODF cell-range-address syntax. This is
+ * almost identical to Calc A1 except that it allows a leading '.' as in
+ * '.E1' as opposed to just 'E1'.
+ */
+parse_address_result parse_address_odf_cra(
+ const ixion::model_context* cxt, const char*& p, const char* p_last, address_t& addr)
+{
+ if (*p == '.')
+ {
+ // Skip the '.', and assume absence of sheet name.
+ ++p;
+ cxt = nullptr;
+ }
+
+ return parse_address_calc_a1(cxt, p, p_last, addr);
+}
+
+parse_address_result_type parse_address_excel_a1(const char*& p, const char* p_end, address_t& addr)
+{
+ addr.row = 0;
+ addr.column = 0;
+ addr.abs_sheet = true; // Excel's sheet position is always absolute.
+ addr.abs_row = false;
+ addr.abs_column = false;
+
+ return parse_address_a1(p, p_end, addr);
+}
+
+parse_address_result_type parse_address_excel_r1c1(const char*& p, const char* p_end, address_t& addr)
+{
+ addr.row = 0;
+ addr.column = 0;
+ addr.abs_sheet = true; // Excel's sheet position is always absolute.
+ addr.abs_row = false;
+ addr.abs_column = false;
+
+ return parse_address_r1c1(p, p_end, addr);
+}
+
+parse_address_result parse_address_odff(
+ const ixion::model_context* cxt, const char*& p, const char* p_last, address_t& addr)
+{
+ parse_address_result res;
+ assert(p <= p_last);
+
+ addr.row = 0;
+ addr.column = 0;
+ addr.abs_row = false;
+ addr.abs_column = false;
+
+ if (*p == '.')
+ {
+ // This address doesn't contain a sheet name.
+ ++p;
+ }
+ else if (cxt)
+ {
+ // This address DOES contain a sheet name.
+ res.sheet_name = true;
+ addr.abs_sheet = false;
+ addr.sheet = invalid_sheet;
+
+ // Overwrite the sheet index *only when* the sheet name is parsed successfully.
+ if (*p == '$')
+ {
+ addr.abs_sheet = true;
+ ++p;
+ }
+
+ if (p <= p_last)
+ {
+ auto sheet = parse_sheet_name(*cxt, '.', p, p_last + 1);
+ if (sheet)
+ {
+ ++p; // skip the separator
+ addr.sheet = *sheet;
+ }
+ }
+ }
+
+ res.result = parse_address_a1(p, ++p_last, addr);
+ return res;
+}
+
+void to_relative_address(address_t& addr, const abs_address_t& pos, bool sheet)
+{
+ if (!addr.abs_sheet && sheet)
+ addr.sheet -= pos.sheet;
+ if (!addr.abs_row && addr.row <= row_upper_bound)
+ addr.row -= pos.row;
+ if (!addr.abs_column && addr.column <= column_upper_bound)
+ addr.column -= pos.column;
+}
+
+std::string to_string(const model_context* cxt, const table_t& table)
+{
+ std::ostringstream os;
+ append_name_string(os, cxt, table.name);
+
+ if (table.column_first == empty_string_id)
+ {
+ // Area specifier(s) only.
+ bool headers = (table.areas & table_area_headers);
+ bool data = (table.areas & table_area_data);
+ bool totals = (table.areas & table_area_totals);
+
+ short count = 0;
+ if (headers)
+ ++count;
+ if (data)
+ ++count;
+ if (totals)
+ ++count;
+
+ bool multiple = count == 2;
+ if (multiple)
+ os << '[';
+
+ append_table_areas(os, table);
+
+ if (multiple)
+ os << ']';
+ }
+ else if (table.column_last == empty_string_id)
+ {
+ // single column.
+ os << '[';
+
+ bool multiple = false;
+ if (table.areas && table.areas != table_area_data)
+ {
+ if (append_table_areas(os, table))
+ {
+ os << ',';
+ multiple = true;
+ }
+ }
+
+ if (multiple)
+ os << '[';
+
+ append_name_string(os, cxt, table.column_first);
+
+ if (multiple)
+ os << ']';
+
+ os << ']';
+ }
+ else
+ {
+ // column range.
+ os << '[';
+
+ if (table.areas && table.areas != table_area_data)
+ {
+ if (append_table_areas(os, table))
+ os << ',';
+ }
+
+ os << '[';
+ append_name_string(os, cxt, table.column_first);
+ os << "]:[";
+ append_name_string(os, cxt, table.column_last);
+ os << "]]";
+ }
+
+ return os.str();
+}
+
+} // anonymous namespace
+
+formula_name_t::formula_name_t() :
+ type(invalid), value(formula_function_t::func_unknown) {}
+
+std::string formula_name_t::to_string() const
+{
+ std::ostringstream os;
+
+ switch (type)
+ {
+ case cell_reference:
+ os << "cell reference: " << std::get<address_t>(value);
+ break;
+ case function:
+ {
+ auto v = std::get<formula_function_t>(value);
+ os << "function: " << get_formula_function_name(v);
+ break;
+ }
+ case invalid:
+ os << "invalid";
+ break;
+ case named_expression:
+ os << "named expression";
+ break;
+ case range_reference:
+ os << "range raference: " << std::get<range_t>(value);
+ break;
+ case table_reference:
+ os << "table reference";
+ break;
+ default:
+ os << "unknown foromula name type";
+ }
+
+ return os.str();
+}
+
+formula_name_resolver::formula_name_resolver() {}
+formula_name_resolver::~formula_name_resolver() {}
+
+namespace {
+
+std::string get_column_name_a1(col_t col)
+{
+ std::ostringstream os;
+ append_column_name_a1(os, col);
+ return os.str();
+}
+
+class excel_a1 : public formula_name_resolver
+{
+public:
+ excel_a1(const model_context* cxt) : formula_name_resolver(), mp_cxt(cxt) {}
+ virtual ~excel_a1() {}
+
+ virtual formula_name_t resolve(std::string_view s, const abs_address_t& pos) const
+ {
+ const char* p = s.data();
+ std::size_t n = s.size();
+
+ formula_name_t ret;
+ if (!n)
+ return ret;
+
+ if (resolve_function(p, n, ret))
+ return ret;
+
+ if (resolve_table(mp_cxt, p, n, ret))
+ return ret;
+
+ const char* p_end = p + n;
+
+ sheet_range_t sheets;
+
+ if (mp_cxt)
+ {
+ sheets = parse_excel_sheet_name(*mp_cxt, p, p_end);
+ if (sheets.present && sheets.sheet2 == invalid_sheet)
+ // Sheet name(s) given but is not found in the model.
+ return ret;
+
+ if (sheets.present)
+ {
+ assert(*p == '!');
+ ++p; // skip the '!'
+ }
+ }
+
+ // Use the sheet where the cell is unless sheet name is explicitly given.
+ address_t parsed_addr(pos.sheet, 0, 0, false, false, false);
+
+ parse_address_result_type parse_res = parse_address_excel_a1(p, p_end, parsed_addr);
+
+ if (parse_res != invalid)
+ {
+ // This is a valid A1-style address syntax-wise.
+
+ if (!check_address_by_sheet_bounds(mp_cxt, parsed_addr))
+ parse_res = invalid;
+ }
+
+ // prevent for example H to be recognized as column address
+ if (parse_res == valid_address && parsed_addr.row != row_unset)
+ {
+ // This is a single cell address.
+ to_relative_address(parsed_addr, pos, false);
+
+ if (sheets.present)
+ {
+ if (sheets.sheet1 != invalid_sheet)
+ {
+ // range of sheets is given. Switch to a range.
+ range_t v{parsed_addr, parsed_addr};
+ v.first.sheet = sheets.sheet1;
+ v.last.sheet = sheets.sheet2;
+
+ ret.value = v;
+ ret.type = formula_name_t::range_reference;
+ }
+ else
+ {
+ // single sheet is given.
+ parsed_addr.sheet = sheets.sheet2;
+ set_cell_reference(ret, parsed_addr);
+ }
+ }
+ else
+ set_cell_reference(ret, parsed_addr);
+
+ return ret;
+ }
+
+ if (parse_res == range_expected)
+ {
+ assert(*p == ':');
+ ++p; // skip ':'
+
+ if (p == p_end)
+ // ':' occurs as the last character. This is not allowed.
+ return ret;
+
+ range_t v;
+ to_relative_address(parsed_addr, pos, false);
+ v.first = parsed_addr;
+
+ // For now, we assume the sheet index of the end address is identical
+ // to that of the begin address.
+ parse_res = parse_address_excel_a1(p, p_end, parsed_addr);
+ if (parse_res != valid_address)
+ {
+ // The 2nd part after the ':' is not valid.
+ ret.value = v;
+ return ret;
+ }
+
+ to_relative_address(parsed_addr, pos, false);
+ v.last = parsed_addr;
+ v.last.sheet = v.first.sheet; // re-use the sheet index of the begin address.
+
+ if (sheets.present)
+ {
+ if (sheets.sheet1 != invalid_sheet)
+ {
+ // range of sheets is given
+ v.first.sheet = sheets.sheet1;
+ v.last.sheet = sheets.sheet2;
+ }
+ else
+ {
+ // single sheet is given
+ v.first.sheet = v.last.sheet = sheets.sheet2;
+ }
+ }
+
+ ret.value = v;
+ ret.type = formula_name_t::range_reference;
+ return ret;
+ }
+
+ resolve_function_or_name(p, n, ret);
+ return ret;
+ }
+
+ virtual std::string get_name(const address_t& addr, const abs_address_t& pos, bool sheet_name) const
+ {
+ std::ostringstream os;
+ append_address_a1(os, sheet_name ? mp_cxt : nullptr, addr, pos, '!');
+ return os.str();
+ }
+
+ virtual std::string get_name(const range_t& range, const abs_address_t& pos, bool sheet_name) const
+ {
+ // For now, sheet index of the end-range address is ignored.
+
+ std::ostringstream os;
+ col_t col = range.first.column;
+ row_t row = range.first.row;
+ sheet_t sheet = range.first.sheet;
+
+ if (!range.first.abs_sheet)
+ sheet += pos.sheet;
+
+ if (sheet_name && mp_cxt)
+ {
+ append_sheet_name(os, *mp_cxt, sheet);
+ os << '!';
+ }
+
+ append_column_address_a1(os, col, pos.column, range.first.abs_column);
+ append_row_address_a1(os, row, pos.row, range.first.abs_row);
+
+ os << ":";
+ col = range.last.column;
+ row = range.last.row;
+
+ append_column_address_a1(os, col, pos.column, range.last.abs_column);
+
+ if (row != row_unset)
+ {
+ if (range.last.abs_row)
+ os << '$';
+ else
+ row += pos.row;
+ os << (row + 1);
+ }
+
+ return os.str();
+ }
+
+ virtual std::string get_name(const table_t& table) const
+ {
+ return to_string(mp_cxt, table);
+ }
+
+ virtual std::string get_column_name(col_t col) const
+ {
+ return get_column_name_a1(col);
+ }
+
+private:
+ const model_context* mp_cxt;
+};
+
+class excel_r1c1 : public formula_name_resolver
+{
+ const model_context* mp_cxt;
+
+ void write_sheet_name(std::ostringstream& os, const address_t& addr, const abs_address_t& pos) const
+ {
+ if (mp_cxt)
+ {
+ sheet_t sheet = addr.sheet;
+ if (!addr.abs_sheet)
+ sheet += pos.sheet;
+
+ append_sheet_name(os, *mp_cxt, sheet);
+ os << '!';
+ }
+ }
+
+public:
+ excel_r1c1(const model_context* cxt) : mp_cxt(cxt) {}
+
+ virtual formula_name_t resolve(std::string_view s, const abs_address_t& pos) const
+ {
+ const char* p = s.data();
+ std::size_t n = s.size();
+
+ formula_name_t ret;
+ if (!n)
+ return ret;
+
+ if (resolve_function(p, n, ret))
+ return ret;
+
+ const char* p_end = p + n;
+
+ sheet_range_t sheets;
+
+ if (mp_cxt)
+ {
+ sheets = parse_excel_sheet_name(*mp_cxt, p, p_end);
+ if (sheets.present && sheets.sheet2 == invalid_sheet)
+ // Sheet name(s) given but is not found in the model.
+ return ret;
+
+ if (sheets.present)
+ {
+ assert(*p == '!');
+ ++p; // skip the '!'
+ }
+ }
+
+ // Use the sheet where the cell is unless sheet name is explicitly given.
+ address_t parsed_addr(pos.sheet, 0, 0);
+ parse_address_result_type parse_res = parse_address_excel_r1c1(p, p_end, parsed_addr);
+
+ switch (parse_res)
+ {
+ case parse_address_result_type::valid_address:
+ {
+ if (sheets.present)
+ {
+ if (sheets.sheet1 != invalid_sheet)
+ {
+ // range of sheets is given. Switch to a range.
+ range_t v{parsed_addr, parsed_addr};
+ v.first.sheet = sheets.sheet1;
+ v.last.sheet = sheets.sheet2;
+
+ ret.value = v;
+ ret.type = formula_name_t::range_reference;
+ }
+ else
+ {
+ // single sheet is given.
+ parsed_addr.sheet = sheets.sheet2;
+ set_cell_reference(ret, parsed_addr);
+ }
+ }
+ else
+ set_cell_reference(ret, parsed_addr);
+
+ return ret;
+ }
+ case parse_address_result_type::range_expected:
+ {
+ ++p; // skip ':'
+ if (p == p_end)
+ return ret;
+
+ range_t v;
+ v.first = parsed_addr;
+
+ parse_address_result_type parse_res2 = parse_address_excel_r1c1(p, p_end, parsed_addr);
+ if (parse_res2 != parse_address_result_type::valid_address)
+ return ret;
+
+ v.last = parsed_addr;
+
+ if (sheets.present)
+ {
+ if (sheets.sheet1 != invalid_sheet)
+ {
+ // range of sheets is given
+ v.first.sheet = sheets.sheet1;
+ v.last.sheet = sheets.sheet2;
+ }
+ else
+ {
+ // single sheet is given
+ v.first.sheet = v.last.sheet = sheets.sheet2;
+ }
+ }
+
+ ret.type = formula_name_t::range_reference;
+ ret.value = v;
+
+ return ret;
+ }
+ default:
+ ;
+ }
+
+ resolve_function_or_name(p, n, ret);
+ return ret;
+ }
+
+ virtual std::string get_name(const address_t& addr, const abs_address_t& pos, bool sheet_name) const
+ {
+ std::ostringstream os;
+
+ if (sheet_name)
+ write_sheet_name(os, addr, pos);
+
+ append_address_r1c1(os, addr, pos);
+ return os.str();
+ }
+
+ virtual std::string get_name(const range_t& range, const abs_address_t& pos, bool sheet_name) const
+ {
+ std::ostringstream os;
+
+ if (sheet_name)
+ write_sheet_name(os, range.first, pos);
+
+ append_address_r1c1(os, range.first, pos);
+ os << ':';
+ append_address_r1c1(os, range.last, pos);
+ return os.str();
+ }
+
+ virtual std::string get_name(const table_t& table) const
+ {
+ return to_string(mp_cxt, table);
+ }
+
+ virtual std::string get_column_name(col_t col) const
+ {
+ std::ostringstream os;
+ os << (col+1);
+ return os.str();
+ }
+};
+
+class dot_a1_resolver : public formula_name_resolver
+{
+ using func_parse_address_type =
+ std::function<parse_address_result(
+ const ixion::model_context*,
+ const char*&, const char*, address_t&)>;
+
+ using func_append_address_type =
+ std::function<void(
+ std::ostringstream&, const ixion::model_context*,
+ const address_t&, const abs_address_t&, char)>;
+
+ using func_append_sheet_name_type =
+ std::function<void(
+ std::ostringstream&, const ixion::model_context*,
+ const address_t&, const abs_address_t&)>;
+
+ const model_context* mp_cxt;
+ func_parse_address_type m_func_parse_address;
+ func_append_address_type m_func_append_address;
+ func_append_sheet_name_type m_func_append_sheet_name;
+
+ static bool display_last_sheet(const range_t& range, const abs_address_t& pos)
+ {
+ if (range.first.abs_sheet != range.last.abs_sheet)
+ return true;
+
+ abs_range_t abs = range.to_abs(pos);
+ return abs.first.sheet != abs.last.sheet;
+ }
+
+public:
+ dot_a1_resolver(
+ const model_context* cxt,
+ func_parse_address_type func_parse_address,
+ func_append_address_type func_append_address,
+ func_append_sheet_name_type func_append_sheet_name) :
+ formula_name_resolver(),
+ mp_cxt(cxt),
+ m_func_parse_address(func_parse_address),
+ m_func_append_address(func_append_address),
+ m_func_append_sheet_name(func_append_sheet_name) {}
+
+ virtual formula_name_t resolve(std::string_view s, const abs_address_t &pos) const override
+ {
+ const char* p = s.data();
+ std::size_t n = s.size();
+
+ formula_name_t ret;
+ if (!n)
+ return ret;
+
+ if (resolve_function(p, n, ret))
+ return ret;
+
+ const char* p_last = p + n -1;
+
+ // Use the sheet where the cell is unless sheet name is explicitly given.
+ address_t parsed_addr(pos.sheet, 0, 0, false, false, false);
+
+ parse_address_result parse_res = m_func_parse_address(mp_cxt, p, p_last, parsed_addr);
+ IXION_TRACE("parse address result on 1st address (" << to_string(parse_res.result) << ")");
+
+ if (parse_res.result != invalid)
+ {
+ // This is a valid A1-style address syntax-wise.
+
+ if (parsed_addr.sheet == invalid_sheet)
+ {
+ IXION_DEBUG("Sheet name is not found in the model context.");
+ return ret;
+ }
+
+ if (!check_address_by_sheet_bounds(mp_cxt, parsed_addr))
+ {
+ IXION_DEBUG("Address is outside the sheet bounds.");
+ parse_res.result = invalid;
+ }
+ }
+
+ // prevent for example H to be recognized as column address
+ if (parse_res.result == valid_address && parsed_addr.row != row_unset)
+ {
+ // This is a single cell address.
+ to_relative_address(parsed_addr, pos, true);
+ set_cell_reference(ret, parsed_addr);
+
+ return ret;
+ }
+
+ if (parse_res.result == range_expected)
+ {
+ if (p == p_last)
+ {
+ IXION_DEBUG("':' occurs as the last character. This is not allowed.");
+ return ret;
+ }
+
+ ++p; // skip ':'
+
+ to_relative_address(parsed_addr, pos, true);
+ range_t v;
+ v.first = parsed_addr;
+
+ parse_res = m_func_parse_address(mp_cxt, p, p_last, parsed_addr);
+ IXION_TRACE("parse address result on 2nd address (" << to_string(parse_res.result) << ")");
+
+ if (parse_res.result != valid_address)
+ {
+ IXION_DEBUG("2nd part after the ':' is not valid.");
+ return ret;
+ }
+
+ to_relative_address(parsed_addr, pos, parse_res.sheet_name);
+ v.last = parsed_addr;
+ ret.type = formula_name_t::range_reference;
+ ret.value = v;
+ return ret;
+ }
+
+ resolve_function_or_name(p, n, ret);
+ return ret;
+ }
+
+ virtual std::string get_name(const address_t &addr, const abs_address_t &pos, bool sheet_name) const override
+ {
+ std::ostringstream os;
+ if (sheet_name && addr.abs_sheet)
+ os << '$';
+ m_func_append_address(os, sheet_name ? mp_cxt : nullptr, addr, pos, '.');
+ return os.str();
+ }
+
+ virtual std::string get_name(const range_t& range, const abs_address_t& pos, bool sheet_name) const override
+ {
+ std::ostringstream os;
+ col_t col = range.first.column;
+ row_t row = range.first.row;
+
+ m_func_append_sheet_name(os, sheet_name ? mp_cxt : nullptr, range.first, pos);
+
+ append_column_address_a1(os, col, pos.column, range.first.abs_column);
+ append_row_address_a1(os, row, pos.row, range.first.abs_row);
+
+ os << ":";
+
+ if (!display_last_sheet(range, pos))
+ sheet_name = false;
+
+ m_func_append_sheet_name(os, sheet_name ? mp_cxt : nullptr, range.last, pos);
+
+ col = range.last.column;
+ row = range.last.row;
+
+ append_column_address_a1(os, col, pos.column, range.last.abs_column);
+ append_row_address_a1(os, row, pos.row, range.last.abs_row);
+
+ return os.str();
+ }
+
+ virtual std::string get_name(const table_t &table) const override
+ {
+ // TODO : find out how Calc A1 handles table reference.
+ return std::string();
+ }
+
+ virtual std::string get_column_name(col_t col) const override
+ {
+ return get_column_name_a1(col);
+ }
+};
+
+/**
+ * Name resolver for ODFF formula expressions.
+ */
+class odff_resolver : public formula_name_resolver
+{
+public:
+ odff_resolver(const model_context* cxt) : formula_name_resolver(), mp_cxt(cxt) {}
+ virtual ~odff_resolver() {}
+
+ virtual formula_name_t resolve(std::string_view s, const abs_address_t& pos) const
+ {
+ const char* p = s.data();
+ std::size_t n = s.size();
+
+ formula_name_t ret;
+
+ if (resolve_function(p, n, ret))
+ return ret;
+
+ if (!n)
+ // Empty string.
+ return ret;
+
+ // First character must be '[' for this to be a reference.
+ if (*p != '[')
+ {
+ ret.type = formula_name_t::named_expression;
+ return ret;
+ }
+
+ ++p;
+ const char* p_last = p;
+ std::advance(p_last, n-2);
+
+ // Last character must be ']'.
+ if (*p_last != ']')
+ return ret;
+
+ --p_last;
+
+ // Use the sheet where the cell is unless sheet name is explicitly given.
+ address_t parsed_addr(pos.sheet, 0, 0, true, false, false);
+
+ parse_address_result parse_res = parse_address_odff(mp_cxt, p, p_last, parsed_addr);
+
+ // prevent for example H to be recognized as column address
+ if (parse_res.result == valid_address && parsed_addr.row != row_unset)
+ {
+ // This is a single cell address.
+ to_relative_address(parsed_addr, pos, true);
+ set_cell_reference(ret, parsed_addr);
+ return ret;
+ }
+
+ if (parse_res.result == range_expected)
+ {
+ if (p == p_last)
+ // ':' occurs as the last character. This is not allowed.
+ return ret;
+
+ ++p; // skip ':'
+
+ range_t v;
+ to_relative_address(parsed_addr, pos, true);
+ v.first = parsed_addr;
+
+ parse_res = parse_address_odff(mp_cxt, p, p_last, parsed_addr);
+ if (parse_res.result != valid_address)
+ // The 2nd part after the ':' is not valid.
+ return ret;
+
+ to_relative_address(parsed_addr, pos, parse_res.sheet_name);
+
+ v.last = parsed_addr;
+ ret.type = formula_name_t::range_reference;
+ ret.value = v;
+
+ return ret;
+ }
+
+ resolve_function_or_name(p, n, ret);
+
+ return ret;
+ }
+
+ virtual std::string get_name(const address_t& addr, const abs_address_t& pos, bool sheet_name) const
+ {
+ if (!mp_cxt)
+ sheet_name = false;
+
+ std::ostringstream os;
+ os << '[';
+ if (sheet_name)
+ {
+ if (addr.abs_sheet)
+ os << '$';
+ append_address_a1(os, mp_cxt, addr, pos, '.');
+ }
+ else
+ {
+ os << '.';
+ append_address_a1(os, nullptr, addr, pos, '.');
+ }
+ os << ']';
+ return os.str();
+ }
+
+ virtual std::string get_name(const range_t& range, const abs_address_t& pos, bool sheet_name) const
+ {
+ if (!mp_cxt)
+ sheet_name = false;
+
+ std::ostringstream os;
+ os << '[';
+
+ if (sheet_name)
+ {
+ const model_context* cxt = mp_cxt;
+
+ if (range.first.abs_sheet)
+ os << '$';
+ append_address_a1(os, cxt, range.first, pos, '.');
+
+ os << ':';
+
+ if (range.last.sheet != range.first.sheet || range.last.abs_sheet != range.first.abs_sheet)
+ {
+ // sheet indices differ between the first and last addresses.
+ if (range.last.abs_sheet)
+ os << '$';
+ }
+ else
+ {
+ // sheet indices are identical.
+ cxt = nullptr;
+ os << '.';
+ }
+
+ append_address_a1(os, cxt, range.last, pos, '.');
+ }
+ else
+ {
+ os << '.';
+ append_address_a1(os, nullptr, range.first, pos, '.');
+ os << ":.";
+ append_address_a1(os, nullptr, range.last, pos, '.');
+ }
+
+ os << ']';
+ return os.str();
+ }
+
+ virtual std::string get_name(const table_t& table) const
+ {
+ // TODO : ODF doesn't support table reference yet.
+ return std::string();
+ }
+
+ virtual std::string get_column_name(col_t col) const
+ {
+ return get_column_name_a1(col);
+ }
+
+private:
+ const model_context* mp_cxt;
+};
+
+}
+
+std::unique_ptr<formula_name_resolver> formula_name_resolver::get(
+ formula_name_resolver_t type, const model_context* cxt)
+{
+
+ switch (type)
+ {
+ case formula_name_resolver_t::excel_a1:
+ return std::unique_ptr<formula_name_resolver>(new excel_a1(cxt));
+ case formula_name_resolver_t::excel_r1c1:
+ return std::unique_ptr<formula_name_resolver>(new excel_r1c1(cxt));
+ case formula_name_resolver_t::odff:
+ return std::unique_ptr<formula_name_resolver>(new odff_resolver(cxt));
+ case formula_name_resolver_t::calc_a1:
+ return std::unique_ptr<formula_name_resolver>(
+ new dot_a1_resolver(
+ cxt, parse_address_calc_a1, append_address_a1, append_sheet_name_calc_a1));
+ case formula_name_resolver_t::odf_cra:
+ return std::unique_ptr<formula_name_resolver>(
+ new dot_a1_resolver(
+ cxt, parse_address_odf_cra, append_address_a1_with_sheet_name_sep, append_sheet_name_odf_cra));
+ case formula_name_resolver_t::unknown:
+ default:
+ ;
+ }
+
+ return std::unique_ptr<formula_name_resolver>();
+}
+
+}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/src/libixion/formula_parser.cpp b/src/libixion/formula_parser.cpp
new file mode 100644
index 0000000..4a8e6f5
--- /dev/null
+++ b/src/libixion/formula_parser.cpp
@@ -0,0 +1,268 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include "formula_parser.hpp"
+#include "ixion/formula_name_resolver.hpp"
+
+#include "formula_functions.hpp"
+
+#include <iostream>
+#include <sstream>
+
+namespace ixion {
+
+namespace {
+
+class ref_error : public general_error
+{
+public:
+ ref_error(const std::string& msg) :
+ general_error(msg) {}
+};
+
+}
+
+// ----------------------------------------------------------------------------
+
+formula_parser::parse_error::parse_error(const std::string& msg) :
+ general_error(msg) {}
+
+// ----------------------------------------------------------------------------
+
+formula_parser::formula_parser(
+ const lexer_tokens_t& tokens, model_context& cxt, const formula_name_resolver& resolver) :
+ m_itr_cur(tokens.end()),
+ m_itr_end(tokens.end()),
+ m_tokens(tokens),
+ m_context(cxt),
+ m_resolver(resolver)
+{
+}
+
+formula_parser::~formula_parser()
+{
+}
+
+void formula_parser::set_origin(const abs_address_t& pos)
+{
+ m_pos = pos;
+}
+
+void formula_parser::parse()
+{
+ for (m_itr_cur = m_tokens.begin(); has_token(); next())
+ {
+ switch (get_token().opcode)
+ {
+ case lexer_opcode_t::array_open:
+ case lexer_opcode_t::array_close:
+ case lexer_opcode_t::open:
+ case lexer_opcode_t::close:
+ case lexer_opcode_t::plus:
+ case lexer_opcode_t::minus:
+ case lexer_opcode_t::multiply:
+ case lexer_opcode_t::exponent:
+ case lexer_opcode_t::concat:
+ case lexer_opcode_t::equal:
+ case lexer_opcode_t::divide:
+ case lexer_opcode_t::sep:
+ case lexer_opcode_t::array_row_sep:
+ primitive();
+ break;
+ case lexer_opcode_t::name:
+ name();
+ break;
+ case lexer_opcode_t::string:
+ literal();
+ break;
+ case lexer_opcode_t::value:
+ value();
+ break;
+ case lexer_opcode_t::less:
+ less();
+ break;
+ case lexer_opcode_t::greater:
+ greater();
+ break;
+ default:
+ ;
+ }
+ }
+}
+
+formula_tokens_t& formula_parser::get_tokens()
+{
+ return m_formula_tokens;
+}
+
+void formula_parser::primitive()
+{
+ fopcode_t foc = fop_unknown;
+ switch (get_token().opcode)
+ {
+ case lexer_opcode_t::close:
+ foc = fop_close;
+ break;
+ case lexer_opcode_t::divide:
+ foc = fop_divide;
+ break;
+ case lexer_opcode_t::minus:
+ foc = fop_minus;
+ break;
+ case lexer_opcode_t::multiply:
+ foc = fop_multiply;
+ break;
+ case lexer_opcode_t::exponent:
+ foc = fop_exponent;
+ break;
+ case lexer_opcode_t::concat:
+ foc = fop_concat;
+ break;
+ case lexer_opcode_t::equal:
+ foc = fop_equal;
+ break;
+ case lexer_opcode_t::open:
+ foc = fop_open;
+ break;
+ case lexer_opcode_t::plus:
+ foc = fop_plus;
+ break;
+ case lexer_opcode_t::sep:
+ foc = fop_sep;
+ break;
+ case lexer_opcode_t::array_row_sep:
+ foc = fop_array_row_sep;
+ break;
+ case lexer_opcode_t::array_open:
+ foc = fop_array_open;
+ break;
+ case lexer_opcode_t::array_close:
+ foc = fop_array_close;
+ break;
+ default:
+ throw parse_error("unknown primitive token received");
+ }
+ m_formula_tokens.emplace_back(foc);
+}
+
+void formula_parser::name()
+{
+ std::string_view name = std::get<std::string_view>(get_token().value);
+
+ formula_name_t fn = m_resolver.resolve(name, m_pos);
+
+ switch (fn.type)
+ {
+ case formula_name_t::cell_reference:
+ m_formula_tokens.emplace_back(std::get<address_t>(fn.value));
+ break;
+ case formula_name_t::range_reference:
+ {
+ m_formula_tokens.emplace_back(std::get<range_t>(fn.value));
+ break;
+ }
+ case formula_name_t::table_reference:
+ {
+ table_t table;
+ formula_name_t::table_type src_table = std::get<formula_name_t::table_type>(fn.value);
+ table.name = m_context.add_string(src_table.name);
+ table.column_first = m_context.add_string(src_table.column_first);
+ table.column_last = m_context.add_string(src_table.column_last);
+ table.areas = src_table.areas;
+ m_formula_tokens.emplace_back(table);
+ break;
+ }
+ case formula_name_t::function:
+ m_formula_tokens.emplace_back(std::get<formula_function_t>(fn.value));
+ break;
+ case formula_name_t::named_expression:
+ m_formula_tokens.emplace_back(std::string{name});
+ break;
+ default:
+ {
+ std::ostringstream os;
+ os << "failed to resolve a name token '" << name << "'.";
+ throw parse_error(os.str());
+ }
+ }
+}
+
+void formula_parser::literal()
+{
+ string_id_t sid = m_context.add_string(std::get<std::string_view>(get_token().value));
+ m_formula_tokens.emplace_back(sid);
+}
+
+void formula_parser::value()
+{
+ m_formula_tokens.emplace_back(std::get<double>(get_token().value));
+}
+
+void formula_parser::less()
+{
+ if (has_next())
+ {
+ next();
+ switch (get_token().opcode)
+ {
+ case lexer_opcode_t::equal:
+ m_formula_tokens.emplace_back(fop_less_equal);
+ return;
+ case lexer_opcode_t::greater:
+ m_formula_tokens.emplace_back(fop_not_equal);
+ return;
+ default:
+ ;
+ }
+ prev();
+ }
+ m_formula_tokens.emplace_back(fop_less);
+}
+
+void formula_parser::greater()
+{
+ if (has_next())
+ {
+ next();
+ if (get_token().opcode == lexer_opcode_t::equal)
+ {
+ m_formula_tokens.emplace_back(fop_greater_equal);
+ return;
+ }
+ prev();
+ }
+ m_formula_tokens.emplace_back(fop_greater);
+
+}
+
+const lexer_token& formula_parser::get_token() const
+{
+ return *m_itr_cur;
+}
+
+bool formula_parser::has_token() const
+{
+ return m_itr_cur != m_itr_end;
+}
+
+bool formula_parser::has_next() const
+{
+ return (m_itr_cur+1) != m_itr_end;
+}
+
+void formula_parser::next()
+{
+ ++m_itr_cur;
+}
+
+void formula_parser::prev()
+{
+ --m_itr_cur;
+}
+
+}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/src/libixion/formula_parser.hpp b/src/libixion/formula_parser.hpp
new file mode 100644
index 0000000..3c28b67
--- /dev/null
+++ b/src/libixion/formula_parser.hpp
@@ -0,0 +1,80 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef INCLUDED_IXION_FORMULA_PARSER_HPP
+#define INCLUDED_IXION_FORMULA_PARSER_HPP
+
+#include "ixion/exceptions.hpp"
+#include "ixion/formula_tokens.hpp"
+
+#include "lexer_tokens.hpp"
+
+#include <string>
+
+namespace ixion {
+
+class formula_name_resolver;
+class model_context;
+
+/**
+ * Class formula_parser parses a series of primitive (or lexer) tokens
+ * passed on from the lexer, and turn them into a series of formula tokens.
+ * It also picks up a list of cells that it depends on.
+ */
+class formula_parser
+{
+ formula_parser() = delete;
+ formula_parser(const formula_parser&) = delete;
+ formula_parser& operator=(const formula_parser&) = delete;
+
+public:
+ class parse_error : public general_error
+ {
+ public:
+ parse_error(const ::std::string& msg);
+ };
+
+ formula_parser(const lexer_tokens_t& tokens, model_context& cxt, const formula_name_resolver& resolver);
+ ~formula_parser();
+
+ void set_origin(const abs_address_t& pos);
+ void parse();
+
+ formula_tokens_t& get_tokens();
+
+private:
+
+ void primitive();
+ void name();
+ void literal();
+ void value();
+ void less();
+ void greater();
+
+ const lexer_token& get_token() const;
+ bool has_token() const;
+ bool has_next() const;
+ void next();
+ void prev();
+
+private:
+ lexer_tokens_t::const_iterator m_itr_cur;
+ lexer_tokens_t::const_iterator m_itr_end;
+
+ const lexer_tokens_t& m_tokens; // lexer tokens of this expression
+ model_context& m_context;
+ formula_tokens_t m_formula_tokens;
+ abs_address_t m_pos; // reference position (usually current cell). always absolute.
+
+ const formula_name_resolver& m_resolver;
+};
+
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/src/libixion/formula_result.cpp b/src/libixion/formula_result.cpp
new file mode 100644
index 0000000..f20395a
--- /dev/null
+++ b/src/libixion/formula_result.cpp
@@ -0,0 +1,421 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include <ixion/formula_result.hpp>
+#include <ixion/exceptions.hpp>
+#include <ixion/config.hpp>
+#include <ixion/matrix.hpp>
+#include <ixion/model_context.hpp>
+
+#include <cassert>
+#include <sstream>
+#include <iomanip>
+#include <ostream>
+#include <variant>
+
+#include "debug.hpp"
+
+namespace ixion {
+
+struct formula_result::impl
+{
+ using result_value_type = std::variant<bool, double, formula_error_t, matrix, std::string>;
+
+ result_type type;
+ result_value_type value;
+
+ impl() : type(result_type::value), value(0.0) {}
+ impl(bool b) : type(result_type::boolean), value(b) {}
+ impl(double v) : type(result_type::value), value(v) {}
+ impl(std::string str) : type(result_type::string), value(std::move(str)) {}
+ impl(formula_error_t e) : type(result_type::error), value(e) {}
+ impl(matrix mtx) : type(result_type::matrix), value(std::move(mtx)) {}
+ impl(const impl& other) : type(other.type), value(other.value) {}
+
+ void reset()
+ {
+ type = result_type::value;
+ value = 0.0;
+ }
+
+ void set_boolean(bool b)
+ {
+ type = result_type::boolean;
+ value = b;
+ }
+
+ void set_value(double v)
+ {
+ IXION_TRACE("v=" << v);
+ type = result_type::value;
+ value = v;
+ }
+
+ void set_string_value(std::string str)
+ {
+ type = result_type::string;
+ value = std::move(str);
+ }
+
+ void set_error(formula_error_t e)
+ {
+ type = result_type::error;
+ value = e;
+ }
+
+ void set_matrix(matrix mtx)
+ {
+ type = result_type::matrix;
+ value = std::move(mtx);
+ }
+
+ bool get_boolean() const
+ {
+ assert(type == result_type::boolean);
+ return std::get<bool>(value);
+ }
+
+ double get_value() const
+ {
+ assert(type == result_type::value);
+ return std::get<double>(value);
+ }
+
+ const std::string& get_string_value() const
+ {
+ assert(type == result_type::string);
+ return std::get<std::string>(value);
+ }
+
+ formula_error_t get_error() const
+ {
+ assert(type == result_type::error);
+ return std::get<formula_error_t>(value);
+ }
+
+ const matrix& get_matrix() const
+ {
+ assert(type == result_type::matrix);
+ return std::get<matrix>(value);
+ }
+
+ matrix& get_matrix()
+ {
+ assert(type == result_type::matrix);
+ return std::get<matrix>(value);
+ }
+
+ result_type get_type() const
+ {
+ return type;
+ }
+
+ std::string str(const model_context& cxt) const
+ {
+ switch (type)
+ {
+ case result_type::error:
+ {
+ std::string_view s = get_formula_error_name(std::get<formula_error_t>(value));
+ return std::string(s);
+ }
+ case result_type::string:
+ return std::get<std::string>(value);
+ case result_type::boolean:
+ {
+ std::ostringstream os;
+ os << std::boolalpha << std::get<bool>(value);
+ return os.str();
+ }
+ case result_type::value:
+ {
+ std::ostringstream os;
+ if (cxt.get_config().output_precision >= 0)
+ os << std::fixed << std::setprecision(cxt.get_config().output_precision);
+ os << std::get<double>(value);
+ return os.str();
+ }
+ case result_type::matrix:
+ {
+ const matrix& m = std::get<matrix>(value);
+
+ std::ostringstream os;
+
+ os << '{';
+
+ for (size_t row = 0; row < m.row_size(); ++row)
+ {
+ if (row > 0)
+ os << cxt.get_config().sep_matrix_row;
+
+ for (size_t col = 0; col < m.col_size(); ++col)
+ {
+ if (col > 0)
+ os << cxt.get_config().sep_matrix_column;
+
+ matrix::element e = m.get(row, col);
+
+ switch (e.type)
+ {
+ case matrix::element_type::numeric:
+ {
+ os << std::get<double>(e.value);
+ break;
+ }
+ case matrix::element_type::string:
+ {
+ os << '"' << std::get<std::string_view>(e.value) << '"';
+ break;
+ }
+ case matrix::element_type::error:
+ {
+ os << get_formula_error_name(std::get<formula_error_t>(e.value));
+ break;
+ }
+ case matrix::element_type::boolean:
+ {
+ os << std::get<bool>(e.value);
+ break;
+ }
+ default:
+ ;
+ }
+ }
+ }
+
+ os << '}';
+
+ return os.str();
+ }
+ default:
+ assert(!"unknown formula result type!");
+ }
+ return std::string{};
+ }
+
+ void parse(std::string_view s)
+ {
+ if (s.empty())
+ return;
+
+ switch (s[0])
+ {
+ case '#':
+ {
+ parse_error(s);
+ break;
+ }
+ case '"':
+ {
+ parse_string(s);
+ break;
+ }
+ case 't':
+ case 'f':
+ {
+ // parse this as a boolean value.
+ value = to_bool(s);
+ type = result_type::boolean;
+ break;
+ }
+ default:
+ {
+ // parse this as a number.
+ value = to_double(s);
+ type = result_type::value;
+ }
+ }
+ }
+
+ void move_from(formula_result&& r)
+ {
+ type = r.mp_impl->type;
+ value = std::move(r.mp_impl->value);
+ }
+
+ bool equals(const formula_result& r) const
+ {
+ if (type != r.mp_impl->type)
+ return false;
+
+ return value == r.mp_impl->value;
+ }
+
+ void parse_error(std::string_view s)
+ {
+ assert(!s.empty());
+ assert(s[0] == '#');
+
+ formula_error_t err = to_formula_error_type(s);
+
+ if (err == formula_error_t::no_error)
+ {
+ std::ostringstream os;
+ os << "malformed error string: " << s;
+ throw general_error(os.str());
+ }
+
+ value = err;
+ type = result_type::error;
+ }
+
+ void parse_string(std::string_view s)
+ {
+ if (s.size() < 2u)
+ // It needs to at least have the opening and closing quotes.
+ return;
+
+ assert(s[0] == '"');
+ auto pos = s.find_first_of('"', 1);
+ if (pos == std::string_view::npos)
+ throw general_error("failed to parse string result.");
+
+ type = result_type::string;
+ value = std::string(&s[1], pos - 1);
+ }
+};
+
+formula_result::formula_result() :
+ mp_impl(std::make_unique<impl>()) {}
+
+formula_result::formula_result(const formula_result& r) :
+ mp_impl(std::make_unique<impl>(*r.mp_impl)) {}
+
+formula_result::formula_result(formula_result&& r) : mp_impl(std::move(r.mp_impl)) {}
+
+formula_result::formula_result(bool b) : mp_impl(std::make_unique<impl>(b)) {}
+
+formula_result::formula_result(double v) : mp_impl(std::make_unique<impl>(v)) {}
+
+formula_result::formula_result(std::string str) : mp_impl(std::make_unique<impl>(std::move(str))) {}
+
+formula_result::formula_result(formula_error_t e) : mp_impl(std::make_unique<impl>(e)) {}
+
+formula_result::formula_result(matrix mtx) : mp_impl(std::make_unique<impl>(std::move(mtx))) {}
+
+formula_result::~formula_result() {}
+
+void formula_result::reset()
+{
+ mp_impl->reset();
+}
+
+void formula_result::set_boolean(bool b)
+{
+ mp_impl->set_boolean(b);
+}
+
+void formula_result::set_value(double v)
+{
+ mp_impl->set_value(v);
+}
+
+void formula_result::set_string_value(std::string str)
+{
+ mp_impl->set_string_value(std::move(str));
+}
+
+void formula_result::set_error(formula_error_t e)
+{
+ mp_impl->set_error(e);
+}
+
+void formula_result::set_matrix(matrix mtx)
+{
+ mp_impl->set_matrix(std::move(mtx));
+}
+
+bool formula_result::get_boolean() const
+{
+ return mp_impl->get_boolean();
+}
+
+double formula_result::get_value() const
+{
+ return mp_impl->get_value();
+}
+
+const std::string& formula_result::get_string() const
+{
+ return mp_impl->get_string_value();
+}
+
+formula_error_t formula_result::get_error() const
+{
+ return mp_impl->get_error();
+}
+
+const matrix& formula_result::get_matrix() const
+{
+ return mp_impl->get_matrix();
+}
+
+matrix& formula_result::get_matrix()
+{
+ return mp_impl->get_matrix();
+}
+
+formula_result::result_type formula_result::get_type() const
+{
+ return mp_impl->get_type();
+}
+
+std::string formula_result::str(const model_context& cxt) const
+{
+ return mp_impl->str(cxt);
+}
+
+void formula_result::parse(std::string_view s)
+{
+ mp_impl->parse(s);
+}
+
+formula_result& formula_result::operator= (formula_result r)
+{
+ mp_impl->move_from(std::move(r));
+ return *this;
+}
+
+bool formula_result::operator== (const formula_result& r) const
+{
+ return mp_impl->equals(r);
+}
+
+bool formula_result::operator!= (const formula_result& r) const
+{
+ return !operator== (r);
+}
+
+std::ostream& operator<< (std::ostream& os, formula_result::result_type v)
+{
+ switch (v)
+ {
+ case formula_result::result_type::error:
+ os << "error";
+ break;
+ case formula_result::result_type::matrix:
+ os << "matrix";
+ break;
+ case formula_result::result_type::string:
+ os << "string";
+ break;
+ case formula_result::result_type::value:
+ os << "value";
+ break;
+ case formula_result::result_type::boolean:
+ os << "boolean";
+ break;
+ default:
+ ;
+ }
+
+ return os;
+}
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/src/libixion/formula_tokens.cpp b/src/libixion/formula_tokens.cpp
new file mode 100644
index 0000000..ea432e8
--- /dev/null
+++ b/src/libixion/formula_tokens.cpp
@@ -0,0 +1,303 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include <ixion/formula_tokens.hpp>
+#include <ixion/exceptions.hpp>
+#include <ixion/global.hpp>
+#include <ixion/macros.hpp>
+
+#include <sstream>
+
+namespace ixion {
+
+std::string_view get_opcode_name(fopcode_t oc)
+{
+ // Make sure the names are ordered identically to the ordering of the enum members.
+ static constexpr std::string_view names[] = {
+ "unknown", // fop_unknown
+ "single-ref", // fop_single_ref
+ "range-ref", // fop_range_ref
+ "table-ref", // fop_table_ref
+ "named-expression", // fop_named_expression
+ "string", // fop_string
+ "value", // fop_value
+ "function", // fop_function
+ "plus", // fop_plus
+ "minus", // fop_minus
+ "divide", // fop_divide
+ "multiply", // fop_multiply
+ "exponent", // fop_exponent
+ "concat", // fop_concat
+ "equal", // fop_equal
+ "not-equal", // fop_not_equal
+ "less", // fop_less
+ "greater", // fop_greater
+ "less-equal", // fop_less_equal
+ "greater-equal", // fop_greater_equal
+ "open", // fop_open
+ "close", // fop_close
+ "sep", // fop_sep
+ "array-row-sep", // fop_array_row_sep
+ "array-open", // fop_array_open
+ "array-close", // fop_array_close
+ "error", // fop_error
+ };
+
+ if (std::size_t(oc) >= std::size(names))
+ return "???";
+
+ return names[oc];
+}
+
+std::string_view get_formula_opcode_string(fopcode_t oc)
+{
+ static constexpr std::string_view empty = "";
+
+ // Make sure the names are ordered identically to the ordering of the enum members.
+ static constexpr std::string_view names[] = {
+ empty, // fop_unknown
+ empty, // fop_single_ref
+ empty, // fop_range_ref
+ empty, // fop_table_ref
+ empty, // fop_named_expression
+ empty, // fop_string
+ empty, // fop_value
+ empty, // fop_function
+ "+", // fop_plus
+ "-", // fop_minus
+ "/", // fop_divide
+ "*", // fop_multiply
+ "^", // fop_exponent
+ "&", // fop_concat
+ "=", // fop_equal
+ "<>", // fop_not_equal
+ "<", // fop_less
+ ">", // fop_greater
+ "<=", // fop_less_equal
+ ">=", // fop_greater_equal
+ "(", // fop_open
+ ")", // fop_close
+ empty, // fop_sep
+ empty, // fop_array_row_sep
+ "{", // fop_array_open
+ "}", // fop_array_close
+ empty, // fop_error
+ };
+
+ if (std::size_t(oc) >= std::size(names))
+ return empty;
+
+ return names[oc];
+}
+
+// ============================================================================
+
+formula_token::formula_token(fopcode_t op) :
+ opcode(op)
+{
+ switch (opcode)
+ {
+ case fop_single_ref:
+ case fop_range_ref:
+ case fop_table_ref:
+ case fop_named_expression:
+ case fop_string:
+ case fop_value:
+ case fop_function:
+ {
+ std::ostringstream os;
+ os << "this opcode named '" << get_opcode_name(op) << "' cannot be instantiated by this constructor";
+ throw std::invalid_argument(os.str());
+ }
+ default:;
+ }
+}
+
+formula_token::formula_token(const address_t& addr) :
+ opcode(fop_single_ref), value(addr)
+{
+}
+
+formula_token::formula_token(const range_t& range) :
+ opcode(fop_range_ref), value(range)
+{
+}
+
+formula_token::formula_token(const table_t& table) :
+ opcode(fop_table_ref), value(table)
+{
+}
+
+formula_token::formula_token(formula_function_t func) :
+ opcode(fop_function), value(func)
+{
+}
+
+formula_token::formula_token(double v) :
+ opcode(fop_value), value(v)
+{
+}
+
+formula_token::formula_token(string_id_t sid) :
+ opcode(fop_string), value(sid)
+{
+}
+
+formula_token::formula_token(std::string name) :
+ opcode(fop_named_expression), value(std::move(name))
+{
+}
+
+
+formula_token::formula_token(const formula_token& r) = default;
+formula_token::formula_token(formula_token&& r) = default;
+formula_token::~formula_token() = default;
+
+bool formula_token::operator== (const formula_token& r) const
+{
+ return opcode == r.opcode && value == r.value;
+}
+
+bool formula_token::operator!= (const formula_token& r) const
+{
+ return !operator== (r);
+}
+
+struct formula_tokens_store::impl
+{
+ formula_tokens_t m_tokens;
+ size_t m_refcount;
+
+ impl() : m_refcount(0) {}
+};
+
+formula_tokens_store::formula_tokens_store() :
+ mp_impl(std::make_unique<impl>())
+{
+}
+
+formula_tokens_store::~formula_tokens_store()
+{
+}
+
+formula_tokens_store_ptr_t formula_tokens_store::create()
+{
+ return formula_tokens_store_ptr_t(new formula_tokens_store);
+}
+
+void formula_tokens_store::add_ref()
+{
+ ++mp_impl->m_refcount;
+}
+
+void formula_tokens_store::release_ref()
+{
+ if (--mp_impl->m_refcount == 0)
+ delete this;
+}
+
+size_t formula_tokens_store::get_reference_count() const
+{
+ return mp_impl->m_refcount;
+}
+
+formula_tokens_t& formula_tokens_store::get()
+{
+ return mp_impl->m_tokens;
+}
+
+const formula_tokens_t& formula_tokens_store::get() const
+{
+ return mp_impl->m_tokens;
+}
+
+named_expression_t::named_expression_t() {}
+named_expression_t::named_expression_t(const abs_address_t& _origin, formula_tokens_t _tokens) :
+ origin(_origin), tokens(std::move(_tokens)) {}
+
+named_expression_t::named_expression_t(named_expression_t&& other) :
+ origin(other.origin), tokens(std::move(other.tokens)) {}
+
+named_expression_t::~named_expression_t() {}
+
+std::ostream& operator<< (std::ostream& os, const formula_token& ft)
+{
+ switch (ft.opcode)
+ {
+ case fop_string:
+ {
+ os << "string token: (identifier=" << std::get<string_id_t>(ft.value) << ")";
+ break;
+ }
+ case fop_value:
+ {
+ os << "value token: " << std::get<double>(ft.value);
+ break;
+ }
+ case fop_single_ref:
+ {
+ os << "single ref token: " << std::get<address_t>(ft.value);
+ break;
+ }
+ case fop_range_ref:
+ {
+ os << "range ref token: " << std::get<range_t>(ft.value);
+ break;
+ }
+ case fop_table_ref:
+ {
+ os << "table ref token: " << std::get<table_t>(ft.value);
+ break;
+ }
+ case fop_named_expression:
+ {
+ os << "named expression token: '" << std::get<std::string>(ft.value) << "'";
+ break;
+ }
+ case fop_function:
+ {
+ using _int_type = std::underlying_type_t<formula_function_t>;
+
+ formula_function_t v = std::get<formula_function_t>(ft.value);
+ os << "function token: (opcode=" << _int_type(v) << "; name='" << get_formula_function_name(v) << "')";
+ break;
+ }
+ case fop_error:
+ {
+ os << "invalid error token: (count=" << std::get<string_id_t>(ft.value) << ")";
+ break;
+ }
+ case fop_plus:
+ case fop_minus:
+ case fop_divide:
+ case fop_multiply:
+ case fop_exponent:
+ case fop_concat:
+ case fop_equal:
+ case fop_not_equal:
+ case fop_less:
+ case fop_greater:
+ case fop_less_equal:
+ case fop_greater_equal:
+ case fop_open:
+ case fop_close:
+ case fop_sep:
+ case fop_array_row_sep:
+ case fop_array_open:
+ case fop_array_close:
+ case fop_unknown:
+ os << "opcode token: (name=" << get_opcode_name(ft.opcode) << "; s='"
+ << get_formula_opcode_string(ft.opcode) << "')";
+ break;
+ }
+
+ return os;
+}
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/src/libixion/formula_value_stack.cpp b/src/libixion/formula_value_stack.cpp
new file mode 100644
index 0000000..9985c77
--- /dev/null
+++ b/src/libixion/formula_value_stack.cpp
@@ -0,0 +1,625 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include "formula_value_stack.hpp"
+#include "debug.hpp"
+
+#include <ixion/address.hpp>
+#include <ixion/cell.hpp>
+#include <ixion/cell_access.hpp>
+#include <ixion/matrix.hpp>
+#include <ixion/formula_result.hpp>
+#include <ixion/config.hpp>
+#include <ixion/exceptions.hpp>
+
+#include <string>
+#include <sstream>
+
+namespace ixion {
+
+namespace {
+
+bool get_boolean_value(const model_context& cxt, const stack_value& v)
+{
+ switch (v.get_type())
+ {
+ case stack_value_t::boolean:
+ return v.get_boolean();
+ case stack_value_t::value:
+ case stack_value_t::matrix:
+ return v.get_value() != 0.0;
+ case stack_value_t::single_ref:
+ {
+ // reference to a single cell.
+ const abs_address_t& addr = v.get_address();
+ auto ca = cxt.get_cell_access(addr);
+ switch (ca.get_value_type())
+ {
+ case cell_value_t::numeric:
+ case cell_value_t::boolean:
+ return ca.get_boolean_value();
+ case cell_value_t::empty:
+ return false;
+ default:;
+ }
+ break;
+ }
+ default:;
+ }
+
+ throw formula_error(formula_error_t::invalid_value_type);
+}
+
+double get_numeric_value(const model_context& cxt, const stack_value& v)
+{
+ switch (v.get_type())
+ {
+ case stack_value_t::boolean:
+ return v.get_boolean() ? 1.0 : 0.0;
+ case stack_value_t::value:
+ case stack_value_t::matrix:
+ return v.get_value();
+ case stack_value_t::string:
+ return 0.0;
+ case stack_value_t::single_ref:
+ {
+ // reference to a single cell.
+ const abs_address_t& addr = v.get_address();
+ return cxt.get_numeric_value(addr);
+ }
+ default:;
+ }
+
+ throw formula_error(formula_error_t::invalid_value_type);
+}
+
+} // anonymous namespace
+
+std::ostream& operator<<(std::ostream& os, stack_value_t sv)
+{
+ static constexpr std::string_view names[] = {
+ "boolean",
+ "error",
+ "value",
+ "string",
+ "single_ref",
+ "range_ref",
+ "matrix",
+ };
+
+ auto pos = static_cast<std::size_t>(sv);
+ if (pos < std::size(names))
+ os << names[pos];
+ else
+ os << "???";
+
+ return os;
+}
+
+stack_value::stack_value(bool b) :
+ m_type(stack_value_t::boolean), m_value(b) {}
+
+stack_value::stack_value(double val) :
+ m_type(stack_value_t::value), m_value(val) {}
+
+stack_value::stack_value(std::string str) :
+ m_type(stack_value_t::string), m_value(std::move(str)) {}
+
+stack_value::stack_value(const abs_address_t& val) :
+ m_type(stack_value_t::single_ref), m_value(val) {}
+
+stack_value::stack_value(const abs_range_t& val) :
+ m_type(stack_value_t::range_ref), m_value(val) {}
+
+stack_value::stack_value(formula_error_t err) :
+ m_type(stack_value_t::error), m_value(err) {}
+
+stack_value::stack_value(matrix mtx) :
+ m_type(stack_value_t::matrix), m_value(std::move(mtx)) {}
+
+stack_value::stack_value(stack_value&& other) :
+ m_type(other.m_type), m_value(std::move(other.m_value)) {}
+
+stack_value::~stack_value() = default;
+
+stack_value& stack_value::operator= (stack_value&& other)
+{
+ m_type = other.m_type;
+ m_value = std::move(other.m_value);
+ return *this;
+}
+
+stack_value_t stack_value::get_type() const
+{
+ return m_type;
+}
+
+bool stack_value::get_boolean() const
+{
+ switch (m_type)
+ {
+ case stack_value_t::boolean:
+ return std::get<bool>(m_value);
+ case stack_value_t::value:
+ return std::get<double>(m_value) != 0.0;
+ case stack_value_t::matrix:
+ return std::get<matrix>(m_value).get_boolean(0, 0);
+ default:;
+ }
+
+ return false;
+}
+
+double stack_value::get_value() const
+{
+ switch (m_type)
+ {
+ case stack_value_t::boolean:
+ return std::get<bool>(m_value) ? 1.0 : 0.0;
+ case stack_value_t::value:
+ return std::get<double>(m_value);
+ case stack_value_t::matrix:
+ return std::get<matrix>(m_value).get_numeric(0, 0);
+ default:
+ ;
+ }
+
+ return 0.0;
+}
+
+const std::string& stack_value::get_string() const
+{
+ return std::get<std::string>(m_value);
+}
+
+const abs_address_t& stack_value::get_address() const
+{
+ return std::get<abs_address_t>(m_value);
+}
+
+const abs_range_t& stack_value::get_range() const
+{
+ return std::get<abs_range_t>(m_value);
+}
+
+formula_error_t stack_value::get_error() const
+{
+ return std::get<formula_error_t>(m_value);
+}
+
+const matrix& stack_value::get_matrix() const
+{
+ return std::get<matrix>(m_value);
+}
+
+matrix stack_value::pop_matrix()
+{
+ switch (m_type)
+ {
+ case stack_value_t::boolean:
+ {
+ matrix mtx(1, 1);
+ mtx.set(0, 0, std::get<bool>(m_value));
+ return mtx;
+ }
+ case stack_value_t::value:
+ {
+ matrix mtx(1, 1);
+ mtx.set(0, 0, std::get<double>(m_value));
+ return mtx;
+ }
+ case stack_value_t::matrix:
+ {
+ matrix mtx;
+ mtx.swap(std::get<matrix>(m_value));
+ return mtx;
+ }
+ default:
+ throw formula_error(formula_error_t::stack_error);
+ }
+}
+
+formula_value_stack::formula_value_stack(const model_context& cxt) : m_context(cxt) {}
+
+formula_value_stack::iterator formula_value_stack::begin()
+{
+ return m_stack.begin();
+}
+
+formula_value_stack::iterator formula_value_stack::end()
+{
+ return m_stack.end();
+}
+
+formula_value_stack::const_iterator formula_value_stack::begin() const
+{
+ return m_stack.begin();
+}
+
+formula_value_stack::const_iterator formula_value_stack::end() const
+{
+ return m_stack.end();
+}
+
+formula_value_stack::value_type formula_value_stack::release(iterator pos)
+{
+ auto tmp = std::move(*pos);
+ m_stack.erase(pos);
+ return tmp;
+}
+
+formula_value_stack::value_type formula_value_stack::release_back()
+{
+ assert(!m_stack.empty());
+ auto tmp = std::move(m_stack.back());
+ m_stack.pop_back();
+ return tmp;
+}
+
+bool formula_value_stack::empty() const
+{
+ return m_stack.empty();
+}
+
+size_t formula_value_stack::size() const
+{
+ return m_stack.size();
+}
+
+void formula_value_stack::clear()
+{
+ return m_stack.clear();
+}
+
+void formula_value_stack::swap(formula_value_stack& other)
+{
+ m_stack.swap(other.m_stack);
+}
+
+stack_value& formula_value_stack::back()
+{
+ return m_stack.back();
+}
+
+const stack_value& formula_value_stack::back() const
+{
+ return m_stack.back();
+}
+
+const stack_value& formula_value_stack::operator[](size_t pos) const
+{
+ return m_stack[pos];
+}
+
+double formula_value_stack::get_value(size_t pos) const
+{
+ const stack_value& v = m_stack[pos];
+ return get_numeric_value(m_context, v);
+}
+
+void formula_value_stack::push_back(value_type&& val)
+{
+ IXION_TRACE("push_back");
+ m_stack.push_back(std::move(val));
+}
+
+void formula_value_stack::push_boolean(bool b)
+{
+ IXION_TRACE("b=" << std::boolalpha << b);
+ m_stack.emplace_back(b);
+}
+
+void formula_value_stack::push_value(double val)
+{
+ IXION_TRACE("val=" << val);
+ m_stack.emplace_back(val);
+}
+
+void formula_value_stack::push_string(std::string str)
+{
+ IXION_TRACE("str='" << str << "'");
+ m_stack.emplace_back(std::move(str));
+}
+
+void formula_value_stack::push_single_ref(const abs_address_t& val)
+{
+ IXION_TRACE("val=" << val.get_name());
+ m_stack.emplace_back(val);
+}
+
+void formula_value_stack::push_range_ref(const abs_range_t& val)
+{
+ assert(val.valid());
+ IXION_TRACE("start=" << val.first.get_name() << "; end=" << val.last.get_name());
+ m_stack.emplace_back(val);
+}
+
+void formula_value_stack::push_matrix(matrix mtx)
+{
+ IXION_TRACE("push_matrix");
+ m_stack.emplace_back(std::move(mtx));
+}
+
+void formula_value_stack::push_error(formula_error_t err)
+{
+ IXION_TRACE("err=" << short(err) << " (" << get_formula_error_name(err) << ")");
+ m_stack.emplace_back(err);
+}
+
+bool formula_value_stack::pop_boolean()
+{
+ if (m_stack.empty())
+ throw formula_error(formula_error_t::stack_error);
+
+ const stack_value& v = m_stack.back();
+ bool ret = get_boolean_value(m_context, v);
+ m_stack.pop_back();
+ IXION_TRACE("ret=" << std::boolalpha << ret);
+ return ret;
+}
+
+double formula_value_stack::pop_value()
+{
+ double ret = 0.0;
+ if (m_stack.empty())
+ throw formula_error(formula_error_t::stack_error);
+
+ const stack_value& v = m_stack.back();
+ ret = get_numeric_value(m_context, v);
+ m_stack.pop_back();
+ IXION_TRACE("ret=" << ret);
+ return ret;
+}
+
+std::string formula_value_stack::pop_string()
+{
+ IXION_TRACE("pop_string");
+
+ if (m_stack.empty())
+ throw formula_error(formula_error_t::stack_error);
+
+ const stack_value& v = m_stack.back();
+ switch (v.get_type())
+ {
+ case stack_value_t::string:
+ {
+ const std::string str = v.get_string();
+ m_stack.pop_back();
+ return str;
+ }
+ case stack_value_t::boolean:
+ {
+ std::ostringstream os;
+ os << std::boolalpha << v.get_boolean();
+ m_stack.pop_back();
+ return os.str();
+ }
+ case stack_value_t::value:
+ {
+ std::ostringstream os;
+ os << v.get_value();
+ m_stack.pop_back();
+ return os.str();
+ }
+ case stack_value_t::single_ref:
+ {
+ // reference to a single cell.
+ abs_address_t addr = v.get_address();
+ m_stack.pop_back();
+
+ switch (m_context.get_celltype(addr))
+ {
+ case celltype_t::empty:
+ return std::string();
+ case celltype_t::formula:
+ {
+ formula_result res = m_context.get_formula_result(addr);
+
+ switch (res.get_type())
+ {
+ case formula_result::result_type::error:
+ throw formula_error(res.get_error());
+ case formula_result::result_type::string:
+ return res.get_string();
+ case formula_result::result_type::boolean:
+ {
+ std::ostringstream os;
+ os << std::boolalpha << res.get_boolean();
+ return os.str();
+ }
+ case formula_result::result_type::value:
+ {
+ std::ostringstream os;
+ os << res.get_value();
+ return os.str();
+ }
+ default:
+ throw formula_error(formula_error_t::stack_error);
+ }
+ }
+ break;
+ case celltype_t::numeric:
+ {
+ std::ostringstream os;
+ os << m_context.get_numeric_value(addr);
+ return os.str();
+ }
+ case celltype_t::string:
+ {
+ const std::string* ps = m_context.get_string(m_context.get_string_identifier(addr));
+ if (!ps)
+ throw formula_error(formula_error_t::stack_error);
+ return *ps;
+ }
+ break;
+ default:
+ throw formula_error(formula_error_t::stack_error);
+ }
+
+ break;
+ }
+ default:
+ {
+ IXION_DEBUG("unhandled type: " << v.get_type());
+ }
+ }
+ throw formula_error(formula_error_t::stack_error);
+}
+
+matrix formula_value_stack::pop_matrix()
+{
+ if (auto mtx = maybe_pop_matrix(); mtx)
+ return *mtx;
+
+ throw formula_error(formula_error_t::stack_error);
+}
+
+std::optional<matrix> formula_value_stack::maybe_pop_matrix()
+{
+ if (m_stack.empty())
+ throw formula_error(formula_error_t::stack_error);
+
+ stack_value& v = m_stack.back();
+ switch (v.get_type())
+ {
+ case stack_value_t::matrix:
+ {
+ auto mtx = v.pop_matrix();
+ m_stack.pop_back();
+ return mtx;
+ }
+ case stack_value_t::range_ref:
+ return pop_range_value();
+ default:;
+ }
+
+ return {};
+}
+
+abs_address_t formula_value_stack::pop_single_ref()
+{
+ IXION_TRACE("pop_single_ref");
+
+ if (m_stack.empty())
+ throw formula_error(formula_error_t::stack_error);
+
+ const stack_value& v = m_stack.back();
+
+ switch (v.get_type())
+ {
+ case stack_value_t::single_ref:
+ {
+ abs_address_t addr = v.get_address();
+ m_stack.pop_back();
+ return addr;
+ }
+ case stack_value_t::range_ref:
+ {
+ abs_range_t range = v.get_range();
+ m_stack.pop_back();
+ return range.first;
+ }
+ default:;
+ }
+
+ throw formula_error(formula_error_t::stack_error);
+}
+
+abs_range_t formula_value_stack::pop_range_ref()
+{
+ IXION_TRACE("pop_range_ref");
+
+ if (m_stack.empty())
+ throw formula_error(formula_error_t::stack_error);
+
+ const stack_value& v = m_stack.back();
+
+ switch (v.get_type())
+ {
+ case stack_value_t::single_ref:
+ {
+ abs_address_t addr = v.get_address();
+ m_stack.pop_back();
+ return addr;
+ }
+ case stack_value_t::range_ref:
+ {
+ abs_range_t range = v.get_range();
+ m_stack.pop_back();
+ return range;
+ }
+ default:
+ throw formula_error(formula_error_t::stack_error);
+ }
+}
+
+matrix formula_value_stack::pop_range_value()
+{
+ IXION_TRACE("pop_range_value");
+
+ if (m_stack.empty())
+ throw formula_error(formula_error_t::stack_error);
+
+ const stack_value& v = m_stack.back();
+ if (v.get_type() != stack_value_t::range_ref)
+ throw formula_error(formula_error_t::stack_error);
+
+ matrix ret = m_context.get_range_value(v.get_range());
+ m_stack.pop_back();
+ return ret;
+}
+
+formula_error_t formula_value_stack::pop_error()
+{
+ IXION_TRACE("pop_error");
+
+ if (m_stack.empty())
+ throw formula_error(formula_error_t::stack_error);
+
+ const stack_value& v = m_stack.back();
+ if (v.get_type() != stack_value_t::error)
+ throw formula_error(formula_error_t::stack_error);
+
+ formula_error_t ret = v.get_error();
+ m_stack.pop_back();
+ return ret;
+}
+
+resolved_stack_value formula_value_stack::pop_matrix_or_numeric()
+{
+ if (auto mtx = maybe_pop_matrix(); mtx)
+ return *mtx;
+
+ // fall back to numeric value
+ return pop_value();
+}
+
+resolved_stack_value formula_value_stack::pop_matrix_or_string()
+{
+ if (auto mtx = maybe_pop_matrix(); mtx)
+ return *mtx;
+
+ // fall back to string value
+ return pop_string();
+}
+
+void formula_value_stack::pop_back()
+{
+ m_stack.pop_back();
+}
+
+stack_value_t formula_value_stack::get_type() const
+{
+ if (m_stack.empty())
+ throw formula_error(formula_error_t::stack_error);
+
+ return m_stack.back().get_type();
+}
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/src/libixion/formula_value_stack.hpp b/src/libixion/formula_value_stack.hpp
new file mode 100644
index 0000000..91c8fb0
--- /dev/null
+++ b/src/libixion/formula_value_stack.hpp
@@ -0,0 +1,153 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef INCLUDED_IXION_FORMULA_VALUE_STACK_HPP
+#define INCLUDED_IXION_FORMULA_VALUE_STACK_HPP
+
+#include <ixion/address.hpp>
+#include <ixion/global.hpp>
+#include <ixion/matrix.hpp>
+#include <ixion/model_context.hpp>
+
+#include "impl_types.hpp"
+
+#include <deque>
+#include <variant>
+#include <ostream>
+#include <optional>
+
+namespace ixion {
+
+/**
+ * Type of stack value which can be used as intermediate value during
+ * formula interpretation.
+ */
+enum class stack_value_t
+{
+ boolean,
+ error,
+ value,
+ string,
+ single_ref,
+ range_ref,
+ matrix,
+};
+
+std::ostream& operator<<(std::ostream& os, stack_value_t sv);
+
+/**
+ * Individual stack value storage.
+ */
+class stack_value
+{
+ using stored_value_type = std::variant<bool, double, abs_address_t, abs_range_t, formula_error_t, matrix, std::string>;
+
+ stack_value_t m_type;
+ stored_value_type m_value;
+
+public:
+ stack_value() = delete;
+ stack_value(const stack_value&) = delete;
+ stack_value& operator= (const stack_value&) = delete;
+
+ explicit stack_value(bool b);
+ explicit stack_value(double val);
+ explicit stack_value(std::string str);
+ explicit stack_value(const abs_address_t& val);
+ explicit stack_value(const abs_range_t& val);
+ explicit stack_value(formula_error_t err);
+ explicit stack_value(matrix mtx);
+ stack_value(stack_value&& other);
+ ~stack_value();
+
+ stack_value& operator= (stack_value&& other);
+
+ stack_value_t get_type() const;
+ bool get_boolean() const;
+ double get_value() const;
+ const std::string& get_string() const;
+ const abs_address_t& get_address() const;
+ const abs_range_t& get_range() const;
+ formula_error_t get_error() const;
+
+ const matrix& get_matrix() const;
+
+ /**
+ * Move the matrix value out from storage. The internal matrix content
+ * will be empty after this call.
+ */
+ matrix pop_matrix();
+};
+
+/**
+ * FILO stack of values; last pushed value gets popped first.
+ */
+class formula_value_stack
+{
+ typedef std::deque<stack_value> store_type;
+ store_type m_stack;
+ const model_context& m_context;
+
+public:
+ formula_value_stack() = delete;
+ formula_value_stack(const formula_value_stack&) = delete;
+ formula_value_stack& operator= (const formula_value_stack&) = delete;
+
+ explicit formula_value_stack(const model_context& cxt);
+
+ typedef store_type::value_type value_type;
+ typedef store_type::iterator iterator;
+ typedef store_type::const_iterator const_iterator;
+ iterator begin();
+ iterator end();
+ const_iterator begin() const;
+ const_iterator end() const;
+ value_type release(iterator pos);
+ value_type release_back();
+ bool empty() const;
+ size_t size() const;
+ void clear();
+ void swap(formula_value_stack& other);
+
+ stack_value& back();
+ const stack_value& back() const;
+ const stack_value& operator[](size_t pos) const;
+
+ double get_value(size_t pos) const;
+
+ void push_back(value_type&& val);
+ void push_boolean(bool b);
+ void push_value(double val);
+ void push_string(std::string str);
+ void push_single_ref(const abs_address_t& val);
+ void push_range_ref(const abs_range_t& val);
+ void push_matrix(matrix mtx);
+ void push_error(formula_error_t err);
+
+ bool pop_boolean();
+ double pop_value();
+ std::string pop_string();
+ matrix pop_matrix();
+ std::optional<matrix> maybe_pop_matrix();
+ abs_address_t pop_single_ref();
+ abs_range_t pop_range_ref();
+ matrix pop_range_value();
+ formula_error_t pop_error();
+
+ resolved_stack_value pop_matrix_or_numeric();
+ resolved_stack_value pop_matrix_or_string();
+
+ void pop_back();
+
+ stack_value_t get_type() const;
+};
+
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/src/libixion/general_test.cpp b/src/libixion/general_test.cpp
new file mode 100644
index 0000000..4409205
--- /dev/null
+++ b/src/libixion/general_test.cpp
@@ -0,0 +1,1495 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include "test_global.hpp" // This must be the first header to be included.
+
+#include <ixion/formula_name_resolver.hpp>
+#include <ixion/address.hpp>
+#include <ixion/formula.hpp>
+#include <ixion/model_context.hpp>
+#include <ixion/model_iterator.hpp>
+#include <ixion/named_expressions_iterator.hpp>
+#include <ixion/global.hpp>
+#include <ixion/macros.hpp>
+#include <ixion/interface/table_handler.hpp>
+#include <ixion/config.hpp>
+#include <ixion/matrix.hpp>
+#include <ixion/cell.hpp>
+#include <ixion/cell_access.hpp>
+#include <ixion/formula_result.hpp>
+#include <ixion/exceptions.hpp>
+
+#include <string>
+#include <cstring>
+#include <sstream>
+#include <thread>
+
+using namespace std;
+using namespace ixion;
+
+namespace {
+
+void test_size()
+{
+ IXION_TEST_FUNC_SCOPE;
+
+ cout << "test size" << endl;
+ cout << "* int: " << sizeof(int) << endl;
+ cout << "* long: " << sizeof(long) << endl;
+ cout << "* double: " << sizeof(double) << endl;
+ cout << "* size_t: " << sizeof(size_t) << endl;
+ cout << "* string_id_t: " << sizeof(string_id_t)
+ << " (min:" << std::numeric_limits<string_id_t>::min()
+ << "; max:" << std::numeric_limits<string_id_t>::max() << ")" << endl;
+ cout << "* celltype_t: " << sizeof(celltype_t) << endl;
+ cout << "* formula_cell: " << sizeof(formula_cell) << endl;
+ cout << "* formula_tokens_t: " << sizeof(formula_tokens_t) << endl;
+}
+
+void test_string_to_double()
+{
+ IXION_TEST_FUNC_SCOPE;
+
+ struct { const char* s; double v; } tests[] = {
+ { "12", 12.0 },
+ { "0", 0.0 },
+ { "1.3", 1.3 },
+ { "1234.00983", 1234.00983 },
+ { "-123.3", -123.3 }
+ };
+
+ size_t n = sizeof(tests) / sizeof(tests[0]);
+ for (size_t i = 0; i < n; ++i)
+ {
+ double v = to_double(tests[i].s);
+ assert(v == tests[i].v);
+ }
+}
+
+void test_string_pool()
+{
+ IXION_TEST_FUNC_SCOPE;
+
+ model_context cxt;
+
+ string_id_t s_table1 = cxt.append_string("Table1");
+ string_id_t s_table2 = cxt.append_string("Table2");
+ string_id_t s_cat = cxt.append_string("Category");
+ string_id_t s_val = cxt.append_string("Value");
+
+ cxt.dump_strings();
+
+ // Make sure these work correctly before proceeding further with the test.
+ assert(s_table1 == cxt.get_identifier_from_string("Table1"));
+ assert(s_table2 == cxt.get_identifier_from_string("Table2"));
+ assert(s_cat == cxt.get_identifier_from_string("Category"));
+ assert(s_val == cxt.get_identifier_from_string("Value"));
+}
+
+void test_formula_tokens_store()
+{
+ IXION_TEST_FUNC_SCOPE;
+
+ formula_tokens_store_ptr_t p = formula_tokens_store::create();
+ assert(p->get_reference_count() == 1);
+ auto p2 = p;
+
+ assert(p->get_reference_count() == 2);
+ assert(p2->get_reference_count() == 2);
+
+ auto p3(p);
+
+ assert(p->get_reference_count() == 3);
+ assert(p2->get_reference_count() == 3);
+ assert(p3->get_reference_count() == 3);
+
+ p3.reset();
+ assert(p->get_reference_count() == 2);
+ assert(p2->get_reference_count() == 2);
+
+ p2.reset();
+ assert(p->get_reference_count() == 1);
+ p.reset();
+}
+
+void test_matrix()
+{
+ IXION_TEST_FUNC_SCOPE;
+
+ struct check
+ {
+ size_t row;
+ size_t col;
+ double val;
+ };
+
+ std::vector<check> checks =
+ {
+ { 0, 0, 1.0 },
+ { 0, 1, 2.0 },
+ { 1, 0, 3.0 },
+ { 1, 1, 4.0 },
+ };
+
+ numeric_matrix num_mtx(2, 2);
+
+ for (const check& c : checks)
+ num_mtx(c.row, c.col) = c.val;
+
+ for (const check& c : checks)
+ assert(num_mtx(c.row, c.col) == c.val);
+
+ matrix mtx(num_mtx);
+
+ for (const check& c : checks)
+ {
+ matrix::element e = mtx.get(c.row, c.col);
+ assert(e.type == matrix::element_type::numeric);
+ assert(std::get<double>(e.value) == c.val);
+ }
+}
+
+void test_matrix_non_numeric_values()
+{
+ IXION_TEST_FUNC_SCOPE;
+
+ matrix mtx(2, 2);
+ mtx.set(0, 0, 1.1);
+ mtx.set(1, 0, formula_error_t::division_by_zero);
+ mtx.set(0, 1, std::string("foo"));
+ mtx.set(1, 1, true);
+
+ assert(mtx.get_numeric(0, 0) == 1.1);
+
+ matrix::element elem = mtx.get(1, 0);
+ assert(elem.type == matrix::element_type::error);
+ assert(std::get<formula_error_t>(elem.value) == formula_error_t::division_by_zero);
+
+ elem = mtx.get(0, 1);
+ assert(elem.type == matrix::element_type::string);
+ assert(std::get<std::string_view>(elem.value) == "foo");
+
+ elem = mtx.get(1, 1);
+ assert(elem.type == matrix::element_type::boolean);
+ assert(std::get<bool>(elem.value) == true);
+}
+
+void test_address()
+{
+ IXION_TEST_FUNC_SCOPE;
+
+ {
+ address_t addr(-1, 0, 0, false, false, false);
+ abs_address_t pos(1, 0, 0);
+ abs_address_t abs_addr = addr.to_abs(pos);
+ assert(abs_addr.sheet == 0 && abs_addr.row == 0 && abs_addr.column == 0);
+
+ abs_address_t pos_invalid_sheet(invalid_sheet, 2, 3);
+ auto test = addr.to_abs(pos_invalid_sheet);
+ assert(test.sheet == invalid_sheet);
+ assert(test.row == 2);
+ assert(test.column == 3);
+ }
+
+
+ // Default constructor makes valid address.
+ assert(abs_address_t().valid());
+ assert(abs_range_t().valid());
+
+ // These are invalid addresses.
+ assert(!abs_address_t(abs_address_t::invalid).valid());
+ assert(!abs_range_t(abs_range_t::invalid).valid());
+
+ {
+ abs_range_t range(1, 1, 2, 3, 3);
+ assert(range.first.sheet == 1);
+ assert(range.first.row == 1);
+ assert(range.first.column == 2);
+ assert(range.last.sheet == 1);
+ assert(range.last.row == 3);
+ assert(range.last.column == 4);
+
+ abs_range_t range2(range);
+ assert(range2 == range);
+
+ abs_rc_range_t rc_range(range);
+ assert(rc_range.first.row == 1);
+ assert(rc_range.first.column == 2);
+ assert(rc_range.last.row == 3);
+ assert(rc_range.last.column == 4);
+ }
+}
+
+bool check_formula_expression(
+ model_context& cxt, const formula_name_resolver& resolver, const char* p)
+{
+ size_t n = strlen(p);
+ cout << "testing formula expression '" << p << "'" << endl;
+
+ formula_tokens_t tokens = parse_formula_string(cxt, abs_address_t(), resolver, {p, n});
+ std::string expression = print_formula_tokens(cxt, abs_address_t(), resolver, tokens);
+
+ int res = strcmp(p, expression.data());
+ if (res)
+ {
+ cout << "formula expressions differ: '" << p << "' (before) -> '" << expression << "' (after)" << endl;
+ return false;
+ }
+
+ std::ostringstream os;
+ for (const auto& t : tokens)
+ os << print_formula_token(cxt, abs_address_t(), resolver, t);
+ std::string individual_tokens = os.str();
+
+ if (expression != individual_tokens)
+ {
+ cout << "whole expression differs from individual token strings:" << endl
+ << " * expression='" << expression << "'" << endl
+ << " * individual-tokens='" << individual_tokens << "'" << endl;
+ return false;
+ }
+
+ return true;
+}
+
+/**
+ * Make sure the public API works as advertized.
+ */
+void test_parse_and_print_expressions()
+{
+ IXION_TEST_FUNC_SCOPE;
+
+ // Excel A1
+
+ std::vector<const char*> exps = {
+ "\" \"",
+ "1/3*1.4",
+ "2.3*(1+2)/(34*(3-2))",
+ "SUM(1,2,3)",
+ "A1",
+ "B10",
+ "XFD1048576",
+ "C10:D20",
+ "A1:XFD1048576",
+ "H:H",
+ "B:D",
+ "AB:AD",
+ "2:2",
+ "3:5",
+ "34:36",
+ "1>2",
+ "1>=2",
+ "1<2",
+ "1<=2",
+ "1<>2",
+ "1=2",
+ "Table1[Category]",
+ "Table1[Value]",
+ "Table1[#Headers]",
+ "Table1[[#Headers],[Category]:[Value]]",
+ "Table1[[#Headers],[#Data],[Category]:[Value]]",
+ "IF(A1=\"\",\"empty\",\"not empty\")",
+ "$'Ying & Yang'.$A$1:$H$54",
+ };
+
+ model_context cxt;
+ cxt.append_sheet("Test");
+ cxt.append_string("Table1");
+ cxt.append_string("Category");
+ cxt.append_string("Value");
+ cxt.append_sheet("Ying & Yang"); // name with '&'
+
+ auto resolver = formula_name_resolver::get(formula_name_resolver_t::excel_a1, &cxt);
+ assert(resolver);
+
+ for (const char* exp : exps)
+ {
+ bool result = check_formula_expression(cxt, *resolver, exp);
+ assert(result);
+ }
+
+ // Excel R1C1
+
+ exps = {
+ "SUM(R[-5]C:R[-1]C)",
+ };
+
+ resolver = formula_name_resolver::get(formula_name_resolver_t::excel_r1c1, &cxt);
+ assert(resolver);
+
+ for (const char* exp : exps)
+ {
+ bool result = check_formula_expression(cxt, *resolver, exp);
+ assert(result);
+ }
+
+ // ODFF
+
+ exps = {
+ "\" \"",
+ "SUM([.A1];[.B1])",
+ "CONCATENATE([.A6];\" \";[.B6])",
+ "IF(['Ying & Yang'.$A$1:.$O$200];2;0)",
+ };
+
+ resolver = formula_name_resolver::get(formula_name_resolver_t::odff, &cxt);
+ assert(resolver);
+
+ config cfg = cxt.get_config();
+ cfg.sep_function_arg = ';';
+ cxt.set_config(cfg);
+
+ for (const char* exp : exps)
+ {
+ bool result = check_formula_expression(cxt, *resolver, exp);
+ assert(result);
+ }
+}
+
+/**
+ * Function name must be resolved case-insensitively.
+ */
+void test_function_name_resolution()
+{
+ IXION_TEST_FUNC_SCOPE;
+
+ const char* valid_names[] = {
+ "SUM", "sum", "Sum", "Average", "max", "min"
+ };
+
+ const char* invalid_names[] = {
+ "suma", "foo", "", "su", "maxx", "minmin"
+ };
+
+ model_context cxt;
+ cxt.append_sheet("Test");
+ auto resolver = formula_name_resolver::get(ixion::formula_name_resolver_t::excel_a1, &cxt);
+ size_t n = std::size(valid_names);
+ for (size_t i = 0; i < n; ++i)
+ {
+ const char* name = valid_names[i];
+ cout << "valid name: " << name << endl;
+ formula_name_t t = resolver->resolve(name, abs_address_t());
+ assert(t.type == formula_name_t::function);
+ }
+
+ n = std::size(invalid_names);
+ for (size_t i = 0; i < n; ++i)
+ {
+ const char* name = invalid_names[i];
+ cout << "invalid name: " << name << endl;
+ formula_name_t t = resolver->resolve(name, abs_address_t());
+ assert(t.type != formula_name_t::function);
+ }
+}
+
+formula_cell* insert_formula(
+ model_context& cxt, const abs_address_t& pos, const char* exp,
+ const formula_name_resolver& resolver)
+{
+ formula_tokens_t tokens = parse_formula_string(cxt, pos, resolver, exp);
+ auto ts = formula_tokens_store::create();
+ ts->get() = std::move(tokens);
+ formula_cell* p_inserted = cxt.set_formula_cell(pos, ts);
+ assert(p_inserted);
+ register_formula_cell(cxt, pos);
+ formula_cell* p = cxt.get_formula_cell(pos);
+ assert(p);
+ assert(p == p_inserted);
+ return p;
+}
+
+void test_model_context_storage()
+{
+ IXION_TEST_FUNC_SCOPE;
+
+ {
+ model_context cxt;
+ auto resolver = formula_name_resolver::get(formula_name_resolver_t::excel_a1, &cxt);
+ assert(resolver);
+
+ cxt.append_sheet("test");
+
+ // Test empty cell access.
+ cell_access ca = cxt.get_cell_access(abs_address_t(0, 0, 0));
+ assert(ca.get_type() == celltype_t::empty);
+ assert(ca.get_value_type() == cell_value_t::empty);
+
+ // String value on an empty cell should be an empty string.
+ std::string_view s = ca.get_string_value();
+ assert(s.empty());
+
+ // Likewise...
+ s = cxt.get_string_value(abs_address_t(0, 0, 0));
+ assert(s.empty());
+
+ // Test storage of numeric values.
+ volatile double val = 0.1;
+ for (col_t col = 0; col < 3; ++col)
+ {
+ for (row_t row = 0; row < 3; ++row)
+ {
+ abs_address_t pos(0, row, col);
+ cxt.set_numeric_cell(pos, val);
+ double test = cxt.get_numeric_value(pos);
+ assert(test == val);
+
+ ca = cxt.get_cell_access(pos);
+ assert(ca.get_type() == celltype_t::numeric);
+ assert(ca.get_value_type() == cell_value_t::numeric);
+ test = ca.get_numeric_value();
+ assert(test == val);
+
+ val += 0.2;
+ }
+ }
+
+ // Test formula cells.
+ abs_address_t pos(0,3,0);
+ const char* exp = "SUM(1,2,3)";
+ formula_tokens_t tokens = parse_formula_string(cxt, pos, *resolver, exp);
+ auto ts = formula_tokens_store::create();
+ ts->get() = std::move(tokens);
+ formula_cell* p_inserted = cxt.set_formula_cell(pos, ts);
+ assert(p_inserted);
+ formula_cell* p = cxt.get_formula_cell(pos);
+ assert(p);
+ assert(p_inserted == p);
+ p->interpret(cxt, pos);
+
+ ca = cxt.get_cell_access(pos);
+ assert(ca.get_type() == celltype_t::formula);
+ assert(ca.get_value_type() == cell_value_t::numeric);
+ assert(ca.get_numeric_value() == 6.0);
+ }
+
+ {
+ model_context cxt;
+ auto resolver = formula_name_resolver::get(formula_name_resolver_t::excel_a1, &cxt);
+ assert(resolver);
+
+ cxt.append_sheet("test");
+ string exp = "1";
+ cxt.set_formula_cell(abs_address_t(0,0,0), parse_formula_string(cxt, abs_address_t(0,0,0), *resolver, exp));
+ cxt.set_formula_cell(abs_address_t(0,2,0), parse_formula_string(cxt, abs_address_t(0,2,0), *resolver, exp));
+ cxt.set_formula_cell(abs_address_t(0,1,0), parse_formula_string(cxt, abs_address_t(0,1,0), *resolver, exp));
+ }
+
+ {
+ // Test data area.
+ model_context cxt;
+ cxt.append_sheet("test");
+
+ abs_range_t area = cxt.get_data_range(0);
+ assert(!area.valid());
+
+ cxt.set_numeric_cell(abs_address_t(0, 6, 5), 1.1);
+ area = cxt.get_data_range(0);
+ assert(area.first == area.last);
+ assert(area.first.sheet == 0);
+ assert(area.first.row == 6);
+ assert(area.first.column == 5);
+
+ cxt.set_numeric_cell(abs_address_t(0, 2, 3), 1.1);
+ area = cxt.get_data_range(0);
+ assert(area.first.sheet == 0);
+ assert(area.first.row == 2);
+ assert(area.first.column == 3);
+ assert(area.last.sheet == 0);
+ assert(area.last.row == 6);
+ assert(area.last.column == 5);
+
+ cxt.set_numeric_cell(abs_address_t(0, 7, 1), 1.1);
+ area = cxt.get_data_range(0);
+ assert(area.first.sheet == 0);
+ assert(area.first.row == 2);
+ assert(area.first.column == 1);
+ assert(area.last.sheet == 0);
+ assert(area.last.row == 7);
+ assert(area.last.column == 5);
+
+ // This shouldn't change the data range.
+ cxt.set_numeric_cell(abs_address_t(0, 5, 5), 1.1);
+ abs_range_t test = cxt.get_data_range(0);
+ assert(test == area);
+ }
+
+ {
+ // Fill up the document model and make sure the data range is still
+ // correct.
+ const row_t row_size = 5;
+ const col_t col_size = 4;
+ model_context cxt({row_size, col_size});
+ cxt.append_sheet("test");
+ for (row_t row = 0; row < row_size; ++row)
+ for (col_t col = 0; col < col_size; ++col)
+ cxt.set_numeric_cell(abs_address_t(0,row,col), 1.0);
+
+ abs_range_t test = cxt.get_data_range(0);
+
+ assert(test.first.sheet == 0);
+ assert(test.first.row == 0);
+ assert(test.first.column == 0);
+ assert(test.last.sheet == 0);
+ assert(test.last.row == row_size-1);
+ assert(test.last.column == col_size-1);
+ }
+
+ {
+ const row_t row_size = 5;
+ const col_t col_size = 4;
+ model_context cxt({row_size, col_size});
+ cxt.append_sheet("test");
+ cxt.set_numeric_cell(abs_address_t(0,0,0), 1.0);
+ cxt.set_numeric_cell(abs_address_t(0,row_size-1,0), 1.0);
+ cxt.set_numeric_cell(abs_address_t(0,row_size/2,col_size/2), 1.0);
+
+ abs_range_t test = cxt.get_data_range(0);
+
+ assert(test.first.sheet == 0);
+ assert(test.first.row == 0);
+ assert(test.first.column == 0);
+ assert(test.last.sheet == 0);
+ assert(test.last.row == row_size-1);
+ assert(test.last.column == col_size/2);
+ }
+}
+
+void test_model_context_direct_string_access()
+{
+ IXION_TEST_FUNC_SCOPE;
+
+ model_context cxt{{400, 20}};
+ cxt.append_sheet("test");
+
+ // regular string cell
+ abs_address_t B2(0, 1, 1);
+ cxt.set_string_cell(B2, "string cell");
+ std::string_view s = cxt.get_string_value(B2);
+ assert(s == "string cell");
+
+ cell_access ca = cxt.get_cell_access(B2);
+ assert(ca.get_type() == celltype_t::string);
+ assert(ca.get_value_type() == cell_value_t::string);
+ s = ca.get_string_value();
+ assert(s == "string cell");
+
+ // formula cell containing a string result.
+ abs_address_t C4(0, 3, 2);
+ auto resolver = formula_name_resolver::get(formula_name_resolver_t::calc_a1, &cxt);
+ assert(resolver);
+
+ // Insert a formula containing one literal string token.
+ formula_tokens_t tokens = parse_formula_string(cxt, C4, *resolver, "\"string value in formula\"");
+ assert(tokens.size() == 1);
+ cxt.set_formula_cell(C4, std::move(tokens));
+ // no need to register formula cell since it does not reference other cells.
+
+ abs_range_set_t formula_cells{C4};
+ auto sorted = query_and_sort_dirty_cells(cxt, abs_range_set_t(), &formula_cells);
+ calculate_sorted_cells(cxt, sorted, 1);
+
+ s = cxt.get_string_value(C4);
+ assert(s == "string value in formula");
+
+ ca = cxt.get_cell_access(C4);
+ assert(ca.get_type() == celltype_t::formula);
+ assert(ca.get_value_type() == cell_value_t::string);
+ s = ca.get_string_value();
+ assert(s == "string value in formula");
+}
+
+void test_model_context_named_expression()
+{
+ IXION_TEST_FUNC_SCOPE;
+
+ model_context cxt{{400, 20}};
+ cxt.append_sheet("test");
+ auto resolver = formula_name_resolver::get(formula_name_resolver_t::calc_a1, &cxt);
+ assert(resolver);
+
+ abs_address_t B3(0, 2, 1);
+
+ struct test_case
+ {
+ std::string name;
+ std::string formula;
+ abs_address_t origin;
+ };
+
+ std::vector<test_case> tcs = {
+ { "LeftAndAbove", "A3+B2", B3 },
+ { "SumAboveRow", "SUM(A2:D2)", B3 },
+ };
+
+ for (const test_case& tc : tcs)
+ {
+ formula_tokens_t tokens = parse_formula_string(cxt, tc.origin, *resolver, tc.formula);
+ std::string test = print_formula_tokens(cxt, tc.origin, *resolver, tokens);
+ assert(test == tc.formula);
+
+ cxt.set_named_expression(tc.name, tc.origin, std::move(tokens));
+ }
+
+ for (const test_case& tc : tcs)
+ {
+ const named_expression_t* exp = cxt.get_named_expression(0, tc.name);
+ assert(exp);
+ assert(exp->origin == tc.origin);
+ std::string test = print_formula_tokens(cxt, exp->origin, *resolver, exp->tokens);
+ assert(test == tc.formula);
+ }
+
+ // invalid names should be rejected.
+ struct name_test_case
+ {
+ std::string name;
+ bool valid;
+ };
+
+ std::vector<name_test_case> invalid_names = {
+ { "Name 1", false },
+ { "Name_1", true },
+ { "123Name", false },
+ { "Name123", true },
+ { "", false },
+ { "Name.1", true },
+ { ".Name.2", false },
+ };
+
+ for (const name_test_case& tc : invalid_names)
+ {
+ abs_address_t origin;
+ std::string formula = "1+2";
+
+ if (tc.valid)
+ {
+ formula_tokens_t tokens = parse_formula_string(cxt, origin, *resolver, formula);
+ cxt.set_named_expression(tc.name, origin, std::move(tokens));
+
+ tokens = parse_formula_string(cxt, origin, *resolver, formula);
+ cxt.set_named_expression(0, tc.name, origin, std::move(tokens));
+ }
+ else
+ {
+ try
+ {
+ formula_tokens_t tokens = parse_formula_string(cxt, origin, *resolver, formula);
+ cxt.set_named_expression(tc.name, origin, std::move(tokens));
+ assert(!"named expression with invalid name should have been rejected!");
+ }
+ catch (const model_context_error& e)
+ {
+ assert(e.get_error_type() == model_context_error::invalid_named_expression);
+ }
+
+ try
+ {
+ formula_tokens_t tokens = parse_formula_string(cxt, origin, *resolver, formula);
+ cxt.set_named_expression(0, tc.name, origin, std::move(tokens));
+ assert(!"named expression with invalid name should have been rejected!");
+ }
+ catch (const model_context_error& e)
+ {
+ assert(e.get_error_type() == model_context_error::invalid_named_expression);
+ }
+ }
+ }
+}
+
+bool check_model_iterator_output(model_iterator& iter, const std::vector<model_iterator::cell>& checks)
+{
+ for (const model_iterator::cell& c : checks)
+ {
+ if (!iter.has())
+ {
+ cerr << "a cell value was expected, but none found." << endl;
+ return false;
+ }
+
+ if (iter.get() != c)
+ {
+ cerr << "unexpected cell value: expected=" << c << "; observed=" << iter.get() << endl;
+ return false;
+ }
+
+ iter.next();
+ }
+
+ if (iter.has())
+ {
+ cerr << "an additional cell value was found, but none was expected." << endl;
+ return false;
+ }
+
+ return true;
+}
+
+void test_model_context_iterator_horizontal()
+{
+ IXION_TEST_FUNC_SCOPE;
+
+ const row_t row_size = 5;
+ const col_t col_size = 2;
+ model_context cxt{{row_size, col_size}};
+ model_iterator iter;
+
+ abs_rc_range_t whole_range;
+ whole_range.set_all_columns();
+ whole_range.set_all_rows();
+
+ // It should not crash or throw an exception on empty model.
+ iter = cxt.get_model_iterator(0, rc_direction_t::horizontal, whole_range);
+ assert(!iter.has());
+
+ // Insert an actual sheet and try again.
+
+ cxt.append_sheet("empty sheet");
+ iter = cxt.get_model_iterator(0, rc_direction_t::horizontal, whole_range);
+
+ // Make sure the cell position iterates correctly.
+ size_t cell_count = 0;
+ for (row_t row = 0; row < row_size; ++row)
+ {
+ for (col_t col = 0; col < col_size; ++cell_count, ++col, iter.next())
+ {
+ assert(iter.has());
+ assert(iter.get().row == row);
+ assert(iter.get().col == col);
+ assert(iter.get().type == celltype_t::empty);
+ }
+ }
+
+ assert(!iter.has()); // There should be no more cells on this sheet.
+ assert(cell_count == 10);
+
+ cxt.append_sheet("values");
+ cxt.set_string_cell(abs_address_t(1, 0, 0), "F1");
+ cxt.set_string_cell(abs_address_t(1, 0, 1), "F2");
+ cxt.set_boolean_cell(abs_address_t(1, 1, 0), true);
+ cxt.set_boolean_cell(abs_address_t(1, 1, 1), false);
+ cxt.set_numeric_cell(abs_address_t(1, 2, 0), 3.14);
+ cxt.set_numeric_cell(abs_address_t(1, 2, 1), -12.5);
+
+ auto resolver = formula_name_resolver::get(formula_name_resolver_t::excel_a1, &cxt);
+ abs_range_set_t modified_cells;
+ abs_address_t pos(1, 3, 0);
+ formula_tokens_t tokens = parse_formula_string(cxt, pos, *resolver, "SUM(1, 2, 3)");
+ formula_cell* p = cxt.set_formula_cell(pos, std::move(tokens));
+ assert(p);
+ const formula_tokens_t& t = p->get_tokens()->get();
+ assert(t.size() == 8); // there should be 8 tokens.
+ register_formula_cell(cxt, pos, p);
+ modified_cells.insert(pos);
+
+ pos.column = 1;
+ tokens = parse_formula_string(cxt, pos, *resolver, "5 + 6 - 7");
+ p = cxt.set_formula_cell(pos, std::move(tokens));
+ register_formula_cell(cxt, pos, p);
+ modified_cells.insert(pos);
+
+ // Calculate the formula cells.
+ auto sorted = query_and_sort_dirty_cells(cxt, abs_range_set_t(), &modified_cells);
+ calculate_sorted_cells(cxt, sorted, 1);
+
+ std::vector<model_iterator::cell> checks =
+ {
+ // row, column, value
+ { 0, 0, cxt.get_identifier_from_string("F1") },
+ { 0, 1, cxt.get_identifier_from_string("F2") },
+ { 1, 0, true },
+ { 1, 1, false },
+ { 2, 0, 3.14 },
+ { 2, 1, -12.5 },
+ { 3, 0, cxt.get_formula_cell(abs_address_t(1, 3, 0)) },
+ { 3, 1, cxt.get_formula_cell(abs_address_t(1, 3, 1)) },
+ { 4, 0 },
+ { 4, 1 },
+ };
+
+ // Iterator and check the individual cell values.
+ iter = cxt.get_model_iterator(1, rc_direction_t::horizontal, whole_range);
+ assert(check_model_iterator_output(iter, checks));
+}
+
+void test_model_context_iterator_horizontal_range()
+{
+ IXION_TEST_FUNC_SCOPE;
+
+ nullptr_t empty = nullptr;
+ model_context cxt{{10, 5}};
+ cxt.append_sheet("Values");
+ cxt.set_cell_values(0, {
+ { "F1", "F2", "F3", "F4", "F5" },
+ { 1.0, true, "s1", empty, empty },
+ { 1.1, false, empty, "s2", empty },
+ { 1.2, false, empty, "s3", empty },
+ { 1.3, true, empty, "s4", empty },
+ { 1.4, false, empty, "s5", empty },
+ { 1.5, "NA", empty, "s6", empty },
+ { 1.6, 99.9, empty, "s7", empty },
+ { 1.7, 199.9, empty, "s8", empty },
+ { 1.8, 299.9, empty, "s9", "end" },
+ });
+
+ // Only iterate over the first two rows.
+ abs_rc_range_t range;
+ range.set_all_columns();
+ range.first.row = 0;
+ range.last.row = 1;
+
+ model_iterator iter = cxt.get_model_iterator(0, rc_direction_t::horizontal, range);
+
+ std::vector<model_iterator::cell> checks =
+ {
+ // row, column, value
+ { 0, 0, cxt.get_identifier_from_string("F1") },
+ { 0, 1, cxt.get_identifier_from_string("F2") },
+ { 0, 2, cxt.get_identifier_from_string("F3") },
+ { 0, 3, cxt.get_identifier_from_string("F4") },
+ { 0, 4, cxt.get_identifier_from_string("F5") },
+ { 1, 0, 1.0 },
+ { 1, 1, true },
+ { 1, 2, cxt.get_identifier_from_string("s1") },
+ { 1, 3 },
+ { 1, 4 },
+ };
+
+ assert(check_model_iterator_output(iter, checks));
+
+ // Only iterate over rows 2:4.
+ range.first.row = 2;
+ range.last.row = 4;
+ iter = cxt.get_model_iterator(0, rc_direction_t::horizontal, range);
+
+ checks =
+ {
+ // row, column, value
+ { 2, 0, 1.1 },
+ { 2, 1, false },
+ { 2, 2 },
+ { 2, 3, cxt.get_identifier_from_string("s2") },
+ { 2, 4 },
+ { 3, 0, 1.2 },
+ { 3, 1, false },
+ { 3, 2 },
+ { 3, 3, cxt.get_identifier_from_string("s3") },
+ { 3, 4 },
+ { 4, 0, 1.3 },
+ { 4, 1, true },
+ { 4, 2 },
+ { 4, 3, cxt.get_identifier_from_string("s4") },
+ { 4, 4 },
+ };
+
+ assert(check_model_iterator_output(iter, checks));
+
+ // Only iterate over columns 1:3 and only down to row 4.
+ range.set_all_rows();
+ range.first.column = 1;
+ range.last.column = 3;
+ range.last.row = 4;
+ iter = cxt.get_model_iterator(0, rc_direction_t::horizontal, range);
+
+ checks =
+ {
+ // row, column, value
+ { 0, 1, cxt.get_identifier_from_string("F2") },
+ { 0, 2, cxt.get_identifier_from_string("F3") },
+ { 0, 3, cxt.get_identifier_from_string("F4") },
+ { 1, 1, true },
+ { 1, 2, cxt.get_identifier_from_string("s1") },
+ { 1, 3 },
+ { 2, 1, false },
+ { 2, 2 },
+ { 2, 3, cxt.get_identifier_from_string("s2") },
+ { 3, 1, false },
+ { 3, 2 },
+ { 3, 3, cxt.get_identifier_from_string("s3") },
+ { 4, 1, true },
+ { 4, 2 },
+ { 4, 3, cxt.get_identifier_from_string("s4") },
+ };
+
+ assert(check_model_iterator_output(iter, checks));
+}
+
+void test_model_context_iterator_vertical()
+{
+ IXION_TEST_FUNC_SCOPE;
+
+ const row_t row_size = 5;
+ const col_t col_size = 2;
+ model_context cxt{{row_size, col_size}};
+ model_iterator iter;
+
+ abs_rc_range_t whole_range;
+ whole_range.set_all_columns();
+ whole_range.set_all_rows();
+
+ // It should not crash or throw an exception on empty model.
+ iter = cxt.get_model_iterator(0, rc_direction_t::vertical, whole_range);
+ assert(!iter.has());
+
+ // Insert an actual sheet and try again.
+
+ cxt.append_sheet("empty sheet");
+ iter = cxt.get_model_iterator(0, rc_direction_t::vertical, whole_range);
+
+ // Make sure the cell position iterates correctly.
+ size_t cell_count = 0;
+ for (col_t col = 0; col < col_size; ++col)
+ {
+ for (row_t row = 0; row < row_size; ++cell_count, ++row, iter.next())
+ {
+ const model_iterator::cell& cell = iter.get();
+ assert(iter.has());
+ assert(cell.row == row);
+ assert(cell.col == col);
+ assert(cell.type == celltype_t::empty);
+ }
+ }
+
+ assert(!iter.has()); // There should be no more cells on this sheet.
+ assert(cell_count == 10);
+
+ cxt.append_sheet("values");
+ cxt.set_string_cell(abs_address_t(1, 0, 0), "F1");
+ cxt.set_string_cell(abs_address_t(1, 0, 1), "F2");
+ cxt.set_boolean_cell(abs_address_t(1, 1, 0), true);
+ cxt.set_boolean_cell(abs_address_t(1, 1, 1), false);
+ cxt.set_numeric_cell(abs_address_t(1, 2, 0), 3.14);
+ cxt.set_numeric_cell(abs_address_t(1, 2, 1), -12.5);
+
+ auto resolver = formula_name_resolver::get(formula_name_resolver_t::excel_a1, &cxt);
+ abs_range_set_t modified_cells;
+ abs_address_t pos(1, 3, 0);
+ formula_tokens_t tokens = parse_formula_string(cxt, pos, *resolver, "SUM(1, 2, 3)");
+ cxt.set_formula_cell(pos, std::move(tokens));
+ register_formula_cell(cxt, pos);
+ modified_cells.insert(pos);
+
+ pos.column = 1;
+ tokens = parse_formula_string(cxt, pos, *resolver, "5 + 6 - 7");
+ cxt.set_formula_cell(pos, std::move(tokens));
+ register_formula_cell(cxt, pos);
+ modified_cells.insert(pos);
+
+ // Calculate the formula cells.
+ auto sorted = query_and_sort_dirty_cells(cxt, abs_range_set_t(), &modified_cells);
+ calculate_sorted_cells(cxt, sorted, 1);
+
+ std::vector<model_iterator::cell> checks =
+ {
+ // row, column, value
+ { 0, 0, cxt.get_identifier_from_string("F1") },
+ { 1, 0, true },
+ { 2, 0, 3.14 },
+ { 3, 0, cxt.get_formula_cell(abs_address_t(1, 3, 0)) },
+ { 4, 0 },
+
+ { 0, 1, cxt.get_identifier_from_string("F2") },
+ { 1, 1, false },
+ { 2, 1, -12.5 },
+ { 3, 1, cxt.get_formula_cell(abs_address_t(1, 3, 1)) },
+ { 4, 1 },
+ };
+
+ iter = cxt.get_model_iterator(1, rc_direction_t::vertical, whole_range);
+ assert(check_model_iterator_output(iter, checks));
+}
+
+void test_model_context_iterator_vertical_range()
+{
+ IXION_TEST_FUNC_SCOPE;
+
+ nullptr_t empty = nullptr;
+ model_context cxt{{10, 5}};
+ cxt.append_sheet("Values");
+ cxt.set_cell_values(0, {
+ { "F1", "F2", "F3", "F4", "F5" },
+ { 1.0, true, "s1", empty, empty },
+ { 1.1, false, empty, "s2", empty },
+ { 1.2, false, empty, "s3", empty },
+ { 1.3, true, empty, "s4", empty },
+ { 1.4, false, empty, "s5", empty },
+ { 1.5, "NA", empty, "s6", empty },
+ { 1.6, 99.9, empty, "s7", empty },
+ { 1.7, 199.9, empty, "s8", empty },
+ { 1.8, 299.9, empty, "s9", "end" },
+ });
+
+ // Iterate over the top 2 rows.
+ abs_rc_range_t range;
+ range.set_all_columns();
+ range.set_all_rows();
+ range.last.row = 1;
+
+ model_iterator iter = cxt.get_model_iterator(0, rc_direction_t::vertical, range);
+
+ std::vector<model_iterator::cell> checks =
+ {
+ // row, column, value
+ { 0, 0, cxt.get_identifier_from_string("F1") },
+ { 1, 0, 1.0 },
+ { 0, 1, cxt.get_identifier_from_string("F2") },
+ { 1, 1, true },
+ { 0, 2, cxt.get_identifier_from_string("F3") },
+ { 1, 2, cxt.get_identifier_from_string("s1") },
+ { 0, 3, cxt.get_identifier_from_string("F4") },
+ { 1, 3 },
+ { 0, 4, cxt.get_identifier_from_string("F5") },
+ { 1, 4 },
+ };
+
+ assert(check_model_iterator_output(iter, checks));
+
+ // Iterate over the bottom 2 rows.
+
+ range.set_all_rows();
+ range.first.row = 8;
+ iter = cxt.get_model_iterator(0, rc_direction_t::vertical, range);
+
+ checks =
+ {
+ // row, column, value
+ { 8, 0, 1.7 },
+ { 9, 0, 1.8 },
+ { 8, 1, 199.9 },
+ { 9, 1, 299.9 },
+ { 8, 2 },
+ { 9, 2 },
+ { 8, 3, cxt.get_identifier_from_string("s8") },
+ { 9, 3, cxt.get_identifier_from_string("s9") },
+ { 8, 4 },
+ { 9, 4, cxt.get_identifier_from_string("end") },
+ };
+
+ assert(check_model_iterator_output(iter, checks));
+
+ // Iterate over the bottom-left corners.
+ range.last.column = 2;
+ iter = cxt.get_model_iterator(0, rc_direction_t::vertical, range);
+
+ checks =
+ {
+ // row, column, value
+ { 8, 0, 1.7 },
+ { 9, 0, 1.8 },
+ { 8, 1, 199.9 },
+ { 9, 1, 299.9 },
+ { 8, 2 },
+ { 9, 2 },
+ };
+
+ assert(check_model_iterator_output(iter, checks));
+
+ // Iterate over the top-right corners.
+ range.first.column = 3;
+ range.last.column = column_unset;
+ range.first.row = row_unset;
+ range.last.row = 1;
+ iter = cxt.get_model_iterator(0, rc_direction_t::vertical, range);
+
+ checks =
+ {
+ { 0, 3, cxt.get_identifier_from_string("F4") },
+ { 1, 3 },
+ { 0, 4, cxt.get_identifier_from_string("F5") },
+ { 1, 4 },
+ };
+
+ assert(check_model_iterator_output(iter, checks));
+
+ // Iterate over only one cell in the middle.
+ range.first.row = 5;
+ range.last.row = 5;
+ range.first.column = 3;
+ range.last.column = 3;
+
+ iter = cxt.get_model_iterator(0, rc_direction_t::vertical, range);
+ checks =
+ {
+ { 5, 3, cxt.get_identifier_from_string("s5") },
+ };
+
+ assert(check_model_iterator_output(iter, checks));
+}
+
+void test_model_context_iterator_named_exps()
+{
+ IXION_TEST_FUNC_SCOPE;
+
+ struct check
+ {
+ std::string name;
+ const named_expression_t* exp;
+ };
+
+ model_context cxt{{100, 10}};
+ cxt.append_sheet("test1");
+ cxt.append_sheet("test2");
+
+ named_expressions_iterator iter;
+ assert(!iter.has());
+ assert(iter.size() == 0);
+
+ iter = cxt.get_named_expressions_iterator();
+ assert(!iter.has());
+ assert(iter.size() == 0);
+
+ auto resolver = formula_name_resolver::get(formula_name_resolver_t::calc_a1, &cxt);
+ assert(resolver);
+
+ auto tokenize = [&](const char* p) -> formula_tokens_t
+ {
+ return parse_formula_string(cxt, abs_address_t(), *resolver, p);
+ };
+
+ auto validate = [](named_expressions_iterator _iter, const std::vector<check>& _expected) -> bool
+ {
+ if (_iter.size() != _expected.size())
+ {
+ cout << "iterator's size() returns wrong value." << endl;
+ return false;
+ }
+
+ for (const check& c : _expected)
+ {
+ if (!_iter.has())
+ {
+ cout << "iterator has no more element, but it is expected to." << endl;
+ return false;
+ }
+
+ if (c.name != *_iter.get().name)
+ {
+ cout << "names differ: expected='" << c.name << "'; actual='" << *_iter.get().name << endl;
+ return false;
+ }
+
+ if (c.exp != _iter.get().expression)
+ {
+ cout << "expressions differ." << endl;
+ return false;
+ }
+
+ _iter.next();
+ }
+
+ if (_iter.has())
+ {
+ cout << "the iterator has more elements, but it is not expected to." << endl;
+ return false;
+ }
+
+ return true;
+ };
+
+ cxt.set_named_expression("MyCalc", tokenize("(1+2)/3"));
+
+ std::vector<check> expected =
+ {
+ { "MyCalc", cxt.get_named_expression(0, "MyCalc") },
+ };
+
+ iter = cxt.get_named_expressions_iterator();
+ assert(validate(iter, expected));
+
+ cxt.set_named_expression("RefToRight", tokenize("B1"));
+
+ expected =
+ {
+ { "MyCalc", cxt.get_named_expression(0, "MyCalc") },
+ { "RefToRight", cxt.get_named_expression(0, "RefToRight") },
+ };
+
+ iter = cxt.get_named_expressions_iterator();
+ assert(validate(iter, expected));
+
+ cxt.set_named_expression(1, "MyCalc2", tokenize("(B1+C1)/D1"));
+ cxt.set_named_expression(1, "MyCalc3", tokenize("B1/(PI()*2)"));
+
+ iter = cxt.get_named_expressions_iterator(0);
+ assert(!iter.has());
+
+ iter = cxt.get_named_expressions_iterator(1);
+
+ expected =
+ {
+ { "MyCalc2", cxt.get_named_expression(1, "MyCalc2") },
+ { "MyCalc3", cxt.get_named_expression(1, "MyCalc3") },
+ };
+
+ assert(validate(iter, expected));
+}
+
+void test_model_context_fill_down()
+{
+ IXION_TEST_FUNC_SCOPE;
+
+ nullptr_t empty = nullptr;
+ model_context cxt{{100, 10}};
+ cxt.append_sheet("test");
+ cxt.set_cell_values(0, {
+ { "numeric", "bool", "string", "empty" },
+ { 12.3, true, "foo", empty },
+ { empty, empty, empty, 1.1 },
+ { empty, empty, empty, 1.1 },
+ { empty, empty, empty, 1.1 },
+ { empty, empty, empty, 1.1 },
+ { empty, empty, empty, 1.1 },
+ });
+
+ abs_address_t pos(0, 1, 0);
+ cxt.fill_down_cells(pos, 2);
+
+ assert(cxt.get_numeric_value(abs_address_t(0, 1, 0)) == 12.3);
+ assert(cxt.get_numeric_value(abs_address_t(0, 2, 0)) == 12.3);
+ assert(cxt.get_numeric_value(abs_address_t(0, 3, 0)) == 12.3);
+ assert(cxt.is_empty(abs_address_t(0, 4, 0)));
+
+ pos.column = 1;
+ cxt.fill_down_cells(pos, 1);
+ assert(cxt.get_boolean_value(abs_address_t(0, 1, 1)) == true);
+ assert(cxt.get_boolean_value(abs_address_t(0, 2, 1)) == true);
+ assert(cxt.is_empty(abs_address_t(0, 3, 1)));
+
+ pos.column = 2;
+ string_id_t s_foo = cxt.get_string_identifier(pos);
+ const std::string* p = cxt.get_string(s_foo);
+ assert(p && *p == "foo");
+ cxt.fill_down_cells(pos, 3);
+ assert(cxt.get_string_identifier(abs_address_t(0, 2, 2)) == s_foo);
+ assert(cxt.get_string_identifier(abs_address_t(0, 3, 2)) == s_foo);
+ assert(cxt.get_string_identifier(abs_address_t(0, 4, 2)) == s_foo);
+ assert(cxt.is_empty(abs_address_t(0, 5, 2)));
+
+ pos.column = 3;
+ cxt.fill_down_cells(pos, 2);
+ assert(cxt.is_empty(pos));
+ assert(cxt.is_empty(abs_address_t(0, 2, 3)));
+ assert(cxt.is_empty(abs_address_t(0, 3, 3)));
+ assert(cxt.get_numeric_value(abs_address_t(0, 4, 3)) == 1.1);
+}
+
+void test_model_context_error_value()
+{
+ IXION_TEST_FUNC_SCOPE;
+
+ model_context cxt{{100, 10}};
+ cxt.append_sheet("test");
+
+ auto resolver = formula_name_resolver::get(formula_name_resolver_t::excel_a1, &cxt);
+ assert(resolver);
+
+ abs_address_t pos(0,3,0);
+ const char* exp = "10/0";
+ formula_tokens_t tokens = parse_formula_string(cxt, pos, *resolver, exp);
+ formula_cell* fc = cxt.set_formula_cell(pos, std::move(tokens));
+ fc->interpret(cxt, pos);
+
+ cell_access ca = cxt.get_cell_access(pos);
+ assert(ca.get_type() == celltype_t::formula);
+ assert(ca.get_value_type() == cell_value_t::error);
+ assert(ca.get_error_value() == formula_error_t::division_by_zero);
+}
+
+void test_model_context_rename_sheets()
+{
+ IXION_TEST_FUNC_SCOPE;
+
+ model_context cxt{{100, 10}};
+ cxt.append_sheet("sheet1");
+ cxt.append_sheet("sheet2");
+ cxt.append_sheet("sheet3");
+
+ assert(cxt.get_sheet_index("sheet1") == 0);
+ assert(cxt.get_sheet_index("sheet2") == 1);
+ assert(cxt.get_sheet_index("sheet3") == 2);
+
+ cxt.set_sheet_name(0, "sheet1"); // Setting it to the current name is a no-op.
+ try
+ {
+ cxt.set_sheet_name(0, "sheet3");
+ assert(!"exception should have been thrown!");
+ }
+ catch (const ixion::model_context_error& e)
+ {
+ assert(e.get_error_type() == ixion::model_context_error::sheet_name_conflict);
+ }
+ catch (...)
+ {
+ assert(!"wrong exception caught");
+ }
+
+ cxt.set_sheet_name(0, "one");
+ cxt.set_sheet_name(1, "two");
+ cxt.set_sheet_name(2, "three");
+
+ assert(cxt.get_sheet_index("one") == 0);
+ assert(cxt.get_sheet_index("two") == 1);
+ assert(cxt.get_sheet_index("three") == 2);
+}
+
+void test_volatile_function()
+{
+ IXION_TEST_FUNC_SCOPE;
+
+ model_context cxt{{1048576, 16384}};
+ auto resolver = formula_name_resolver::get(formula_name_resolver_t::excel_a1, &cxt);
+ assert(resolver);
+
+ cxt.append_sheet("test");
+
+ abs_range_set_t dirty_cells;
+ abs_range_set_t modified_cells;
+
+ // Set values into A1:A3.
+ cxt.set_numeric_cell(abs_address_t(0,0,0), 1.0);
+ cxt.set_numeric_cell(abs_address_t(0,1,0), 2.0);
+ cxt.set_numeric_cell(abs_address_t(0,2,0), 3.0);
+
+ // Set formula in A4 that references A1:A3.
+ formula_cell* p = insert_formula(cxt, abs_address_t(0,3,0), "SUM(A1:A3)", *resolver);
+ assert(p);
+ dirty_cells.insert(abs_address_t(0,3,0));
+
+ // Initial full calculation.
+ auto sorted = ixion::query_and_sort_dirty_cells(cxt, modified_cells, &dirty_cells);
+ ixion::calculate_sorted_cells(cxt, sorted, 0);
+
+ double val = cxt.get_numeric_value(abs_address_t(0,3,0));
+ assert(val == 6);
+
+ modified_cells.clear();
+ dirty_cells.clear();
+
+ // Modify the value of A2. This should flag A4 dirty.
+ cxt.set_numeric_cell(abs_address_t(0,1,0), 10.0);
+ modified_cells.insert(abs_address_t(0,1,0));
+ sorted = ixion::query_and_sort_dirty_cells(cxt, modified_cells, &dirty_cells);
+ assert(sorted.size() == 1);
+
+ // Partial recalculation.
+ ixion::calculate_sorted_cells(cxt, sorted, 0);
+
+ val = cxt.get_numeric_value(abs_address_t(0, 3, 0));
+ assert(val == 14);
+
+ modified_cells.clear();
+ dirty_cells.clear();
+
+ // Insert a volatile cell into B1. At this point B1 should be the only dirty cell.
+ p = insert_formula(cxt, abs_address_t(0,0,1), "NOW()", *resolver);
+ assert(p);
+ dirty_cells.insert(abs_address_t(0,0,1));
+ sorted = ixion::query_and_sort_dirty_cells(cxt, modified_cells, &dirty_cells);
+ assert(sorted.size() == 1);
+
+ // Partial recalc again.
+ ixion::calculate_sorted_cells(cxt, sorted, 0);
+ double t1 = cxt.get_numeric_value(abs_address_t(0,0,1));
+
+ // Pause for 0.2 second.
+ std::this_thread::sleep_for(std::chrono::milliseconds(200));
+
+ // No modification, but B1 should still be flagged dirty.
+ modified_cells.clear();
+ dirty_cells.clear();
+
+ sorted = ixion::query_and_sort_dirty_cells(cxt, modified_cells, &dirty_cells);
+ assert(sorted.size() == 1);
+ ixion::calculate_sorted_cells(cxt, sorted, 0);
+ double t2 = cxt.get_numeric_value(abs_address_t(0,0,1));
+ double delta = (t2-t1)*24*60*60;
+ cout << "delta = " << delta << endl;
+
+ // The delta should be close to 0.2. It may be a little larger depending
+ // on the CPU speed.
+ assert(0.2 <= delta && delta <= 0.3);
+}
+
+void test_invalid_formula_tokens()
+{
+ IXION_TEST_FUNC_SCOPE;
+
+ model_context cxt;
+ std::string_view invalid_formula("invalid formula");
+ std::string_view error_msg("failed to parse formula");
+
+ formula_tokens_t tokens = create_formula_error_tokens(cxt, invalid_formula, error_msg);
+
+ assert(tokens[0].opcode == fop_error);
+ assert(tokens.size() == (std::get<string_id_t>(tokens[0].value) + 1));
+
+ assert(tokens[1].opcode == fop_string);
+ string_id_t sid = std::get<string_id_t>(tokens[1].value);
+ const std::string* s = cxt.get_string(sid);
+ assert(invalid_formula == *s);
+
+ assert(tokens[2].opcode == fop_string);
+ sid = std::get<string_id_t>(tokens[2].value);
+ s = cxt.get_string(sid);
+ assert(error_msg == *s);
+}
+
+void test_grouped_formula_string_results()
+{
+ IXION_TEST_FUNC_SCOPE;
+
+ model_context cxt;
+ cxt.append_sheet("test");
+
+ auto resolver = formula_name_resolver::get(formula_name_resolver_t::excel_a1, &cxt);
+ assert(resolver);
+
+ abs_range_t A1B2(0, 0, 0, 2, 2);
+
+ formula_tokens_t tokens = parse_formula_string(cxt, A1B2.first, *resolver, "\"literal string\"");
+
+ matrix res_value(2, 2, std::string("literal string"));
+ formula_result res(std::move(res_value));
+ cxt.set_grouped_formula_cells(A1B2, std::move(tokens), std::move(res));
+
+ std::string_view s = cxt.get_string_value(A1B2.last);
+ assert(s == "literal string");
+}
+
+} // anonymous namespace
+
+int main()
+{
+ test_size();
+ test_string_to_double();
+ test_string_pool();
+ test_formula_tokens_store();
+ test_matrix();
+ test_matrix_non_numeric_values();
+
+ test_address();
+ test_parse_and_print_expressions();
+ test_function_name_resolution();
+ test_model_context_storage();
+ test_model_context_direct_string_access();
+ test_model_context_named_expression();
+ test_model_context_iterator_horizontal();
+ test_model_context_iterator_horizontal_range();
+ test_model_context_iterator_vertical();
+ test_model_context_iterator_vertical_range();
+ test_model_context_iterator_named_exps();
+ test_model_context_fill_down();
+ test_model_context_error_value();
+ test_model_context_rename_sheets();
+ test_volatile_function();
+ test_invalid_formula_tokens();
+ test_grouped_formula_string_results();
+
+ return EXIT_SUCCESS;
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/src/libixion/global.cpp b/src/libixion/global.cpp
new file mode 100644
index 0000000..1100bcb
--- /dev/null
+++ b/src/libixion/global.cpp
@@ -0,0 +1,103 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include "ixion/global.hpp"
+#include "ixion/address.hpp"
+#include "ixion/matrix.hpp"
+#include "ixion/cell.hpp"
+#include "ixion/exceptions.hpp"
+#include "ixion/formula_result.hpp"
+
+#include <iostream>
+#include <cstdlib>
+#include <sstream>
+#include <fstream>
+#include <chrono>
+
+using namespace std;
+
+namespace ixion {
+
+double get_current_time()
+{
+ unsigned long usec_since_epoch =
+ std::chrono::duration_cast<std::chrono::microseconds>(
+ std::chrono::system_clock::now().time_since_epoch()).count();
+
+ return usec_since_epoch / 1000000.0;
+}
+
+double to_double(std::string_view s)
+{
+ const char* p = s.data();
+ std::size_t n = s.size();
+
+ if (!n)
+ return 0.0;
+
+ // First, use the standard C API.
+ const char* p_last_check = p + n;
+ char* p_last;
+ double val = strtod(p, &p_last);
+ if (p_last == p_last_check)
+ return val;
+
+ // If that fails, do the manual conversion, which may introduce rounding
+ // errors. Revise this to reduce the amount of rounding error.
+ bool dot = false;
+ double frac = 1.0;
+ double sign = 1.0;
+ for (size_t i = 0; i < n; ++i, ++p)
+ {
+ if (i == 0)
+ {
+ if (*p == '+')
+ // Skip this.
+ continue;
+
+ if (*p == '-')
+ {
+ sign = -1.0;
+ continue;
+ }
+ }
+ if (*p == '.')
+ {
+ if (dot)
+ // Second dot is not allowed.
+ break;
+ dot = true;
+ continue;
+ }
+
+ if (*p < '0' || '9' < *p)
+ // not a digit. End the parse.
+ break;
+
+ int digit = *p - '0';
+ if (dot)
+ {
+ frac *= 0.1;
+ val += digit * frac;
+ }
+ else
+ {
+ val *= 10.0;
+ val += digit;
+ }
+ }
+ return sign*val;
+}
+
+bool to_bool(std::string_view s)
+{
+ return s == "true";
+}
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/src/libixion/impl_types.cpp b/src/libixion/impl_types.cpp
new file mode 100644
index 0000000..223f2c5
--- /dev/null
+++ b/src/libixion/impl_types.cpp
@@ -0,0 +1,40 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include "impl_types.hpp"
+
+#include <stdexcept>
+
+namespace ixion {
+
+resolved_stack_value::resolved_stack_value(matrix v) : m_value(std::move(v)) {}
+resolved_stack_value::resolved_stack_value(double v) : m_value(v) {}
+resolved_stack_value::resolved_stack_value(std::string v) : m_value(std::move(v)) {}
+
+resolved_stack_value::value_type resolved_stack_value::type() const
+{
+ return value_type(m_value.index());
+}
+
+const matrix& resolved_stack_value::get_matrix() const
+{
+ return std::get<matrix>(m_value);
+}
+
+double resolved_stack_value::get_numeric() const
+{
+ return std::get<double>(m_value);
+}
+
+const std::string& resolved_stack_value::get_string() const
+{
+ return std::get<std::string>(m_value);
+}
+
+} // namespace ixion
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/src/libixion/impl_types.hpp b/src/libixion/impl_types.hpp
new file mode 100644
index 0000000..89ead71
--- /dev/null
+++ b/src/libixion/impl_types.hpp
@@ -0,0 +1,69 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#pragma once
+
+#include <ixion/matrix.hpp>
+#include <ixion/types.hpp>
+
+#include <variant>
+#include <string>
+
+namespace ixion {
+
+class matrix;
+
+/**
+ * Similar to stack_value but does not store a reference; it only stores a
+ * static value.
+ */
+class resolved_stack_value
+{
+ // Keep the type ordering in sync with value_type's.
+ using store_type = std::variant<matrix, double, std::string>;
+ store_type m_value;
+public:
+
+ enum class value_type { matrix, numeric, string };
+
+ resolved_stack_value(matrix v);
+ resolved_stack_value(double v);
+ resolved_stack_value(std::string v);
+
+ value_type type() const;
+
+ const matrix& get_matrix() const;
+ double get_numeric() const;
+ const std::string& get_string() const;
+};
+
+template<typename T>
+class formula_op_result
+{
+ using store_type = std::variant<T, formula_error_t>;
+ store_type m_value;
+
+public:
+ formula_op_result(T v) : m_value(std::move(v)) {}
+ formula_op_result(formula_error_t err) : m_value(err) {}
+
+ operator bool() const { return m_value.index() == 0; }
+
+ T operator*() const
+ {
+ return std::get<T>(m_value);
+ }
+
+ formula_error_t error() const
+ {
+ return std::get<formula_error_t>(m_value);
+ }
+};
+
+} // namespace ixion
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/src/libixion/info.cpp b/src/libixion/info.cpp
new file mode 100644
index 0000000..0a117ad
--- /dev/null
+++ b/src/libixion/info.cpp
@@ -0,0 +1,41 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include "ixion/info.hpp"
+
+#include "constants.inl"
+
+namespace ixion {
+
+int get_version_major()
+{
+ return IXION_MAJOR_VERSION;
+}
+
+int get_version_minor()
+{
+ return IXION_MINOR_VERSION;
+}
+
+int get_version_micro()
+{
+ return IXION_MICRO_VERSION;
+}
+
+int get_api_version_major()
+{
+ return IXION_MAJOR_API_VERSION;
+}
+
+int get_api_version_minor()
+{
+ return IXION_MINOR_API_VERSION;
+}
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/src/libixion/interface.cpp b/src/libixion/interface.cpp
new file mode 100644
index 0000000..5bf19a1
--- /dev/null
+++ b/src/libixion/interface.cpp
@@ -0,0 +1,19 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include "ixion/interface/table_handler.hpp"
+#include "ixion/interface/session_handler.hpp"
+
+namespace ixion { namespace iface {
+
+table_handler::~table_handler() {}
+
+session_handler::~session_handler() {}
+
+}}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/src/libixion/ixion_test_track_deps.cpp b/src/libixion/ixion_test_track_deps.cpp
new file mode 100644
index 0000000..95875f6
--- /dev/null
+++ b/src/libixion/ixion_test_track_deps.cpp
@@ -0,0 +1,155 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include "test_global.hpp" // This must be the first header to be included.
+
+#include <ixion/model_context.hpp>
+#include <ixion/macros.hpp>
+#include <ixion/formula_name_resolver.hpp>
+#include <ixion/formula.hpp>
+
+#include <cassert>
+#include <iostream>
+
+using namespace ixion;
+using namespace std;
+
+void test_single_cell_dependency()
+{
+ IXION_TEST_FUNC_SCOPE;
+
+ model_context cxt{{400, 200}};
+ cxt.append_sheet("One");
+
+ auto resolver = formula_name_resolver::get(formula_name_resolver_t::excel_a1, &cxt);
+
+ cxt.set_numeric_cell(abs_address_t(0,0,0), 1.0); // A1
+
+ // A2
+ abs_address_t pos(0,1,0);
+ formula_tokens_t tokens = parse_formula_string(cxt, pos, *resolver, "A1*2");
+ formula_tokens_store_ptr_t store = formula_tokens_store::create();
+ store->get() = std::move(tokens);
+ cxt.set_formula_cell(pos, store);
+ register_formula_cell(cxt, pos);
+
+ // A3
+ pos.row = 2;
+ tokens = parse_formula_string(cxt, pos, *resolver, "A2*2");
+ store = formula_tokens_store::create();
+ store->get() = std::move(tokens);
+ cxt.set_formula_cell(pos, store);
+ register_formula_cell(cxt, pos);
+
+ // If A1 is modified, then both A2 and A3 should get updated.
+ abs_address_set_t mod_cells = {
+ { 0, 0, 0 }
+ };
+
+ abs_address_set_t cells = query_dirty_cells(cxt, mod_cells);
+
+ assert(cells.size() == 2);
+ assert(cells.count(abs_address_t(0,1,0)) == 1);
+ assert(cells.count(abs_address_t(0,2,0)) == 1);
+}
+
+void test_range_dependency()
+{
+ IXION_TEST_FUNC_SCOPE;
+
+ model_context cxt{{400, 200}};
+ cxt.append_sheet("One");
+
+ cxt.set_numeric_cell(abs_address_t(0,0,0), 1.0); // A1
+ cxt.set_numeric_cell(abs_address_t(0,0,0), 2.0); // A2
+ cxt.set_numeric_cell(abs_address_t(0,0,0), 3.0); // A3
+
+ cxt.set_numeric_cell(abs_address_t(0,0,2), 4.0); // C1
+ cxt.set_numeric_cell(abs_address_t(0,0,2), 5.0); // D1
+ cxt.set_numeric_cell(abs_address_t(0,0,2), 6.0); // E1
+
+ auto resolver = formula_name_resolver::get(formula_name_resolver_t::excel_a1, &cxt);
+
+ // C5
+ abs_address_t pos(0,4,2);
+ formula_tokens_t tokens = parse_formula_string(cxt, pos, *resolver, "SUM(A1:A3,C1:E1)");
+ auto ts = formula_tokens_store::create();
+ ts->get() = std::move(tokens);
+ cxt.set_formula_cell(pos, ts);
+ register_formula_cell(cxt, pos);
+
+ // A10
+ pos.row = 9;
+ pos.column = 0;
+ tokens = parse_formula_string(cxt, pos, *resolver, "C5*2");
+ ts = formula_tokens_store::create();
+ ts->get() = std::move(tokens);
+ cxt.set_formula_cell(pos, ts);
+ register_formula_cell(cxt, pos);
+
+ // If A1 is modified, both C5 and A10 should get updated.
+ abs_address_set_t addrs = { abs_address_t(0,0,0) };
+ abs_address_set_t cells = query_dirty_cells(cxt, addrs);
+
+ assert(cells.count(abs_address_t(0,4,2)) == 1);
+ assert(cells.count(abs_address_t(0,9,0)) == 1);
+}
+
+void test_matrix_dependency()
+{
+ IXION_TEST_FUNC_SCOPE;
+
+ model_context cxt{{400, 200}};
+ cxt.append_sheet("One");
+
+ cxt.set_numeric_cell(abs_address_t(0,0,0), 1.0); // A1
+ cxt.set_numeric_cell(abs_address_t(0,0,0), 2.0); // A2
+ cxt.set_numeric_cell(abs_address_t(0,0,0), 3.0); // A3
+
+ cxt.set_numeric_cell(abs_address_t(0,0,2), 4.0); // C1
+ cxt.set_numeric_cell(abs_address_t(0,0,2), 5.0); // D1
+ cxt.set_numeric_cell(abs_address_t(0,0,2), 6.0); // E1
+
+ abs_range_t range;
+ range.first = abs_address_t(0,4,2); // C5
+ range.last = abs_address_t(0,6,4); // E7
+
+ auto resolver = formula_name_resolver::get(formula_name_resolver_t::excel_a1, &cxt);
+
+ // C5:E7
+ formula_tokens_t tokens = parse_formula_string(
+ cxt, range.first, *resolver, "MMULT(A1:A3,C1:E1)");
+
+ cxt.set_grouped_formula_cells(range, std::move(tokens));
+ register_formula_cell(cxt, range.first); // Register only the top-left cell.
+
+ // A10
+ abs_address_t pos(0,9,0);
+ tokens = parse_formula_string(cxt, pos, *resolver, "C5*2");
+ auto ts = formula_tokens_store::create();
+ ts->get() = std::move(tokens);
+ cxt.set_formula_cell(pos, ts);
+ register_formula_cell(cxt, pos);
+
+ // If A1 is modified, both C5 and A10 should get updated.
+ abs_address_set_t addrs = { abs_address_t(0,0,0) };
+ abs_address_set_t cells = query_dirty_cells(cxt, addrs);
+
+ assert(cells.count(abs_address_t(0,4,2)) == 1);
+ assert(cells.count(abs_address_t(0,9,0)) == 1);
+}
+
+int main()
+{
+ test_single_cell_dependency();
+ test_range_dependency();
+ test_matrix_dependency();
+
+ return EXIT_SUCCESS;
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/src/libixion/lexer_tokens.cpp b/src/libixion/lexer_tokens.cpp
new file mode 100644
index 0000000..2f3bef3
--- /dev/null
+++ b/src/libixion/lexer_tokens.cpp
@@ -0,0 +1,156 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include "lexer_tokens.hpp"
+
+#include <iostream>
+#include <sstream>
+#include <algorithm>
+
+using namespace std;
+
+namespace ixion {
+
+std::string print_tokens(const lexer_tokens_t& tokens, bool verbose)
+{
+ std::ostringstream os;
+
+ for (const auto& t : tokens)
+ {
+ if (verbose)
+ os << "(" << get_opcode_name(t.opcode) << ")'" << t << "' ";
+ else
+ os << t;
+ }
+
+ return os.str();
+}
+
+const char* get_opcode_name(lexer_opcode_t oc)
+{
+ switch (oc)
+ {
+ case lexer_opcode_t::value:
+ return "value";
+ case lexer_opcode_t::string:
+ return "string";
+ case lexer_opcode_t::name:
+ return "name";
+ case lexer_opcode_t::divide:
+ return "divide";
+ case lexer_opcode_t::minus:
+ return "minus";
+ case lexer_opcode_t::multiply:
+ return "multiply";
+ case lexer_opcode_t::exponent:
+ return "exponent";
+ case lexer_opcode_t::concat:
+ return "concat";
+ case lexer_opcode_t::equal:
+ return "equal";
+ case lexer_opcode_t::less:
+ return "less";
+ case lexer_opcode_t::greater:
+ return "greater";
+ case lexer_opcode_t::plus:
+ return "plus";
+ case lexer_opcode_t::open:
+ return "open";
+ case lexer_opcode_t::close:
+ return "close";
+ case lexer_opcode_t::sep:
+ return "sep";
+ case lexer_opcode_t::array_row_sep:
+ return "array-row-sep";
+ case lexer_opcode_t::array_open:
+ return "array-open";
+ case lexer_opcode_t::array_close:
+ return "array-close";
+ }
+ return "";
+}
+
+lexer_token::lexer_token(lexer_opcode_t _opcode) :
+ opcode(_opcode)
+{
+}
+
+lexer_token::lexer_token(lexer_opcode_t _opcode, std::string_view _value) :
+ opcode(_opcode), value(_value)
+{
+}
+
+lexer_token::lexer_token(double _value) :
+ opcode(lexer_opcode_t::value), value(_value)
+{
+}
+
+
+std::ostream& operator<<(std::ostream& os, const lexer_token& t)
+{
+ switch (t.opcode)
+ {
+ case lexer_opcode_t::plus:
+ os << '+';
+ break;
+ case lexer_opcode_t::minus:
+ os << '-';
+ break;
+ case lexer_opcode_t::divide:
+ os << '/';
+ break;
+ case lexer_opcode_t::multiply:
+ os << '*';
+ break;
+ case lexer_opcode_t::exponent:
+ os << '^';
+ break;
+ case lexer_opcode_t::concat:
+ os << '&';
+ break;
+ case lexer_opcode_t::equal:
+ os << '=';
+ break;
+ case lexer_opcode_t::less:
+ os << '<';
+ break;
+ case lexer_opcode_t::greater:
+ os << '>';
+ break;
+ case lexer_opcode_t::open:
+ os << '(';
+ break;
+ case lexer_opcode_t::close:
+ os << ')';
+ break;
+ case lexer_opcode_t::array_open:
+ os << '{';
+ break;
+ case lexer_opcode_t::array_close:
+ os << '}';
+ break;
+ case lexer_opcode_t::sep:
+ os << ',';
+ break;
+ case lexer_opcode_t::array_row_sep:
+ os << ';';
+ break;
+ case lexer_opcode_t::name:
+ case lexer_opcode_t::string:
+ os << std::get<std::string_view>(t.value);
+ break;
+ case lexer_opcode_t::value:
+ os << std::get<double>(t.value);
+ break;
+ }
+
+ return os;
+}
+
+} // namespace ixion
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/src/libixion/lexer_tokens.hpp b/src/libixion/lexer_tokens.hpp
new file mode 100644
index 0000000..61109a6
--- /dev/null
+++ b/src/libixion/lexer_tokens.hpp
@@ -0,0 +1,75 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef INCLUDED_IXION_LEXER_TOKENS_HPP
+#define INCLUDED_IXION_LEXER_TOKENS_HPP
+
+#include <ixion/env.hpp>
+
+#include <vector>
+#include <memory>
+#include <variant>
+#include <string_view>
+
+namespace ixion {
+
+enum class lexer_opcode_t
+{
+ // data types
+ value,
+ string,
+ name,
+
+ // arithmetic operators
+ plus,
+ minus,
+ divide,
+ multiply,
+ exponent,
+
+ // string operators
+ concat,
+
+ // relational operators
+ equal,
+ less,
+ greater,
+
+ // parentheses, separators
+ open,
+ close,
+ sep,
+ array_open,
+ array_close,
+ array_row_sep,
+};
+
+const char* get_opcode_name(lexer_opcode_t oc);
+
+struct lexer_token
+{
+ using value_type = std::variant<double, std::string_view>;
+
+ lexer_opcode_t opcode;
+ value_type value;
+
+ lexer_token(lexer_opcode_t _opcode);
+ lexer_token(lexer_opcode_t _opcode, std::string_view _value);
+ lexer_token(double _value);
+};
+
+std::ostream& operator<<(std::ostream& os, const lexer_token& t);
+
+using lexer_tokens_t = std::vector<lexer_token>;
+
+std::string print_tokens(const lexer_tokens_t& tokens, bool verbose);
+
+} // namespace ixion
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/src/libixion/matrix.cpp b/src/libixion/matrix.cpp
new file mode 100644
index 0000000..14d1769
--- /dev/null
+++ b/src/libixion/matrix.cpp
@@ -0,0 +1,331 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include "ixion/matrix.hpp"
+#include "ixion/global.hpp"
+#include "column_store_type.hpp"
+
+#include <limits>
+#include <cstring>
+#include <functional>
+
+namespace ixion {
+
+const double nan = std::numeric_limits<double>::quiet_NaN();
+
+struct matrix::impl
+{
+ matrix_store_t m_data;
+
+ impl() {}
+
+ impl(size_t rows, size_t cols) : m_data(rows, cols) {}
+
+ impl(size_t rows, size_t cols, double numeric) :
+ m_data(rows, cols, numeric) {}
+
+ impl(size_t rows, size_t cols, bool boolean) :
+ m_data(rows, cols, boolean) {}
+
+ impl(size_t rows, size_t cols, const std::string& str) :
+ m_data(rows, cols, str) {}
+
+ impl(size_t rows, size_t cols, formula_error_t error) :
+ m_data(rows, cols, -static_cast<int64_t>(error)) {}
+
+ impl(const std::vector<double>& array, size_t rows, size_t cols) :
+ m_data(rows, cols, array.begin(), array.end()) {}
+
+ impl(const impl& other) : m_data(other.m_data) {}
+};
+
+struct numeric_matrix::impl
+{
+ std::vector<double> m_array;
+ size_t m_rows;
+ size_t m_cols;
+
+ impl() : m_rows(0), m_cols(0) {}
+
+ impl(size_t rows, size_t cols) :
+ m_array(rows * cols, 0.0), m_rows(rows), m_cols(cols) {}
+
+ impl(std::vector<double> array, size_t rows, size_t cols) :
+ m_array(std::move(array)), m_rows(rows), m_cols(cols) {}
+
+ size_t to_array_pos(size_t row, size_t col) const
+ {
+ return m_rows * col + row;
+ }
+};
+
+matrix::matrix() :
+ mp_impl(std::make_unique<impl>()) {}
+
+matrix::matrix(size_t rows, size_t cols) :
+ mp_impl(std::make_unique<impl>(rows, cols)) {}
+
+matrix::matrix(size_t rows, size_t cols, double numeric) :
+ mp_impl(std::make_unique<impl>(rows, cols, numeric)) {}
+
+matrix::matrix(size_t rows, size_t cols, bool boolean) :
+ mp_impl(std::make_unique<impl>(rows, cols, boolean)) {}
+
+matrix::matrix(size_t rows, size_t cols, const std::string& str) :
+ mp_impl(std::make_unique<impl>(rows, cols, str)) {}
+
+matrix::matrix(size_t rows, size_t cols, formula_error_t error) :
+ mp_impl(std::make_unique<impl>(rows, cols, error)) {}
+
+matrix::matrix(const matrix& other) :
+ mp_impl(std::make_unique<impl>(*other.mp_impl))
+{
+}
+
+matrix::matrix(matrix&& other) :
+ mp_impl(std::move(other.mp_impl))
+{
+}
+
+matrix::matrix(const numeric_matrix& other) :
+ mp_impl(std::make_unique<impl>(
+ other.mp_impl->m_array, other.row_size(), other.col_size()))
+{
+}
+
+matrix::~matrix() = default;
+
+matrix& matrix::operator= (matrix other)
+{
+ matrix t(std::move(other));
+ swap(t);
+ return *this;
+}
+
+bool matrix::is_numeric() const
+{
+ return mp_impl->m_data.numeric();
+}
+
+bool matrix::get_boolean(size_t row, size_t col) const
+{
+ return mp_impl->m_data.get_boolean(row, col);
+}
+
+bool matrix::is_numeric(size_t row, size_t col) const
+{
+ switch (mp_impl->m_data.get_type(row, col))
+ {
+ case mdds::mtm::element_numeric:
+ case mdds::mtm::element_boolean:
+ return true;
+ default:
+ ;
+ }
+
+ return false;
+}
+
+double matrix::get_numeric(size_t row, size_t col) const
+{
+ return mp_impl->m_data.get_numeric(row, col);
+}
+
+void matrix::set(size_t row, size_t col, double val)
+{
+ mp_impl->m_data.set(row, col, val);
+}
+
+void matrix::set(size_t row, size_t col, bool val)
+{
+ mp_impl->m_data.set(row, col, val);
+}
+
+void matrix::set(size_t row, size_t col, const std::string& str)
+{
+ mp_impl->m_data.set(row, col, str);
+}
+
+void matrix::set(size_t row, size_t col, formula_error_t val)
+{
+ int64_t encoded = -static_cast<uint8_t>(val);
+ mp_impl->m_data.set(row, col, encoded);
+}
+
+matrix::element matrix::get(size_t row, size_t col) const
+{
+ element me;
+ me.type = element_type::empty;
+
+ switch (mp_impl->m_data.get_type(row, col))
+ {
+ case mdds::mtm::element_numeric:
+ me.type = element_type::numeric;
+ me.value = mp_impl->m_data.get_numeric(row, col);
+ break;
+ case mdds::mtm::element_integer:
+ {
+ // This is an error value, which must be negative.
+ auto v = mp_impl->m_data.get_integer(row, col);
+ if (v >= 0)
+ break;
+
+ me.type = element_type::error;
+ me.value = static_cast<formula_error_t>(-v);
+ break;
+ }
+ case mdds::mtm::element_string:
+ {
+ me.type = element_type::string;
+ me.value = mp_impl->m_data.get_string(row, col);
+ break;
+ }
+ case mdds::mtm::element_boolean:
+ {
+ me.type = element_type::boolean;
+ me.value = mp_impl->m_data.get_boolean(row, col);
+ break;
+ }
+ default:
+ ;
+ }
+
+ return me;
+}
+
+size_t matrix::row_size() const
+{
+ return mp_impl->m_data.size().row;
+}
+
+size_t matrix::col_size() const
+{
+ return mp_impl->m_data.size().column;
+}
+
+void matrix::swap(matrix& r)
+{
+ mp_impl.swap(r.mp_impl);
+}
+
+numeric_matrix matrix::as_numeric() const
+{
+ matrix_store_t::size_pair_type mtx_size = mp_impl->m_data.size();
+
+ std::vector<double> num_array(mtx_size.row*mtx_size.column, nan);
+ double* dest = num_array.data();
+
+ std::function<void(const matrix_store_t::element_block_node_type&)> f =
+ [&](const matrix_store_t::element_block_node_type& node)
+ {
+ assert(node.offset == 0);
+
+ switch (node.type)
+ {
+ case mdds::mtm::element_integer:
+ {
+ // String and error values will be handled as numeric values of 0.0.
+#ifndef __STDC_IEC_559__
+ throw std::runtime_error("IEEE 754 is not fully supported.");
+#endif
+ std::memset(dest, 0, sizeof(double)*node.size); // IEEE 754 defines 0.0 to be 8 zero bytes.
+ std::advance(dest, node.size);
+ break;
+ }
+ case mdds::mtm::element_boolean:
+ {
+ using block_type = matrix_store_t::boolean_block_type;
+ auto it = block_type::begin(*node.data);
+ auto ite = block_type::end(*node.data);
+
+ for (; it != ite; ++it)
+ *dest++ = *it ? 1.0 : 0.0;
+ break;
+ }
+ case mdds::mtm::element_numeric:
+ {
+ using block_type = matrix_store_t::numeric_block_type;
+ const double* src = &block_type::at(*node.data, 0);
+ std::memcpy(dest, src, sizeof(double)*node.size);
+ std::advance(dest, node.size);
+ break;
+ }
+ case mdds::mtm::element_string:
+ {
+ // Skip string blocks.
+ std::advance(dest, node.size);
+ break;
+ }
+ default:
+ ;
+ }
+ };
+
+ mp_impl->m_data.walk(f);
+
+ return numeric_matrix(std::move(num_array), mtx_size.row, mtx_size.column);
+}
+
+bool matrix::operator== (const matrix& r) const
+{
+ return mp_impl->m_data == r.mp_impl->m_data;
+}
+
+bool matrix::operator!= (const matrix& r) const
+{
+ return !operator==(r);
+}
+
+numeric_matrix::numeric_matrix() : mp_impl(std::make_unique<impl>()) {}
+numeric_matrix::numeric_matrix(size_t rows, size_t cols) :
+ mp_impl(std::make_unique<impl>(rows, cols)) {}
+numeric_matrix::numeric_matrix(std::vector<double> array, size_t rows, size_t cols) :
+ mp_impl(std::make_unique<impl>(std::move(array), rows, cols)) {}
+
+numeric_matrix::numeric_matrix(numeric_matrix&& r) : mp_impl(std::move(r.mp_impl)) {}
+
+numeric_matrix::~numeric_matrix() {}
+
+numeric_matrix& numeric_matrix::operator= (numeric_matrix other)
+{
+ numeric_matrix t(std::move(other));
+ swap(t);
+
+ return *this;
+}
+
+double& numeric_matrix::operator() (size_t row, size_t col)
+{
+ size_t pos = mp_impl->to_array_pos(row, col);
+ return mp_impl->m_array[pos];
+}
+
+const double& numeric_matrix::operator() (size_t row, size_t col) const
+{
+ size_t pos = mp_impl->to_array_pos(row, col);
+ return mp_impl->m_array[pos];
+}
+
+void numeric_matrix::swap(numeric_matrix& r)
+{
+ mp_impl.swap(r.mp_impl);
+}
+
+size_t numeric_matrix::row_size() const
+{
+ return mp_impl->m_rows;
+}
+
+size_t numeric_matrix::col_size() const
+{
+ return mp_impl->m_cols;
+}
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
+
diff --git a/src/libixion/model_context.cpp b/src/libixion/model_context.cpp
new file mode 100644
index 0000000..b5ece1a
--- /dev/null
+++ b/src/libixion/model_context.cpp
@@ -0,0 +1,425 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include <ixion/model_context.hpp>
+#include <ixion/formula_result.hpp>
+#include <ixion/matrix.hpp>
+#include <ixion/model_iterator.hpp>
+#include <ixion/interface/session_handler.hpp>
+#include <ixion/named_expressions_iterator.hpp>
+#include <ixion/cell_access.hpp>
+#include <ixion/exceptions.hpp>
+
+#include "model_context_impl.hpp"
+
+namespace ixion {
+
+model_context::input_cell::input_cell(std::nullptr_t) : type(celltype_t::empty) {}
+model_context::input_cell::input_cell(bool b) : type(celltype_t::boolean)
+{
+ value = b;
+}
+
+model_context::input_cell::input_cell(const char* s) : type(celltype_t::string)
+{
+ value = std::string_view(s);
+}
+
+model_context::input_cell::input_cell(double v) : type(celltype_t::numeric)
+{
+ value = v;
+}
+
+model_context::input_cell::input_cell(const input_cell& other) :
+ type(other.type), value(other.value)
+{
+}
+
+model_context::input_row::input_row(std::initializer_list<input_cell> cells) :
+ m_cells(std::move(cells)) { }
+
+const std::initializer_list<model_context::input_cell>& model_context::input_row::cells() const
+{
+ return m_cells;
+}
+
+std::unique_ptr<iface::session_handler> model_context::session_handler_factory::create()
+{
+ return std::unique_ptr<iface::session_handler>();
+}
+
+model_context::session_handler_factory::~session_handler_factory() {}
+
+model_context::model_context() :
+ mp_impl(new detail::model_context_impl(*this, {1048576, 16384})) {}
+
+model_context::model_context(const rc_size_t& sheet_size) :
+ mp_impl(new detail::model_context_impl(*this, sheet_size)) {}
+
+model_context::~model_context()
+{
+}
+
+formula_result_wait_policy_t model_context::get_formula_result_wait_policy() const
+{
+ return mp_impl->get_formula_result_wait_policy();
+}
+
+void model_context::notify(formula_event_t event)
+{
+ mp_impl->notify(event);
+}
+
+const config& model_context::get_config() const
+{
+ return mp_impl->get_config();
+}
+
+dirty_cell_tracker& model_context::get_cell_tracker()
+{
+ return mp_impl->get_cell_tracker();
+}
+
+const dirty_cell_tracker& model_context::get_cell_tracker() const
+{
+ return mp_impl->get_cell_tracker();
+}
+
+void model_context::empty_cell(const abs_address_t& addr)
+{
+ mp_impl->empty_cell(addr);
+}
+
+void model_context::set_numeric_cell(const abs_address_t& addr, double val)
+{
+ mp_impl->set_numeric_cell(addr, val);
+}
+
+void model_context::set_boolean_cell(const abs_address_t& addr, bool val)
+{
+ mp_impl->set_boolean_cell(addr, val);
+}
+
+void model_context::set_string_cell(const abs_address_t& addr, std::string_view s)
+{
+ mp_impl->set_string_cell(addr, s);
+}
+
+cell_access model_context::get_cell_access(const abs_address_t& addr) const
+{
+ return cell_access(*this, addr);
+}
+
+void model_context::fill_down_cells(const abs_address_t& src, size_t n_dst)
+{
+ mp_impl->fill_down_cells(src, n_dst);
+}
+
+void model_context::set_string_cell(const abs_address_t& addr, string_id_t identifier)
+{
+ mp_impl->set_string_cell(addr, identifier);
+}
+
+formula_cell* model_context::set_formula_cell(const abs_address_t& addr, formula_tokens_t tokens)
+{
+ formula_tokens_store_ptr_t ts = formula_tokens_store::create();
+ ts->get() = std::move(tokens);
+
+ return mp_impl->set_formula_cell(addr, ts);
+}
+
+formula_cell* model_context::set_formula_cell(
+ const abs_address_t& addr, const formula_tokens_store_ptr_t& tokens)
+{
+ return mp_impl->set_formula_cell(addr, tokens);
+}
+
+formula_cell* model_context::set_formula_cell(
+ const abs_address_t& addr, const formula_tokens_store_ptr_t& tokens, formula_result result)
+{
+ return mp_impl->set_formula_cell(addr, tokens, std::move(result));
+}
+
+void model_context::set_grouped_formula_cells(
+ const abs_range_t& group_range, formula_tokens_t tokens)
+{
+ mp_impl->set_grouped_formula_cells(group_range, std::move(tokens));
+}
+
+void model_context::set_grouped_formula_cells(
+ const abs_range_t& group_range, formula_tokens_t tokens, formula_result result)
+{
+ mp_impl->set_grouped_formula_cells(group_range, std::move(tokens), std::move(result));
+}
+
+abs_range_t model_context::get_data_range(sheet_t sheet) const
+{
+ return mp_impl->get_data_range(sheet);
+}
+
+bool model_context::is_empty(const abs_address_t& addr) const
+{
+ return mp_impl->is_empty(addr);
+}
+
+bool model_context::is_empty(const abs_range_t& range) const
+{
+ return mp_impl->is_empty(range);
+}
+
+celltype_t model_context::get_celltype(const abs_address_t& addr) const
+{
+ return mp_impl->get_celltype(addr);
+}
+
+cell_value_t model_context::get_cell_value_type(const abs_address_t& addr) const
+{
+ return mp_impl->get_cell_value_type(addr);
+}
+
+double model_context::get_numeric_value(const abs_address_t& addr) const
+{
+ return mp_impl->get_numeric_value(addr);
+}
+
+bool model_context::get_boolean_value(const abs_address_t& addr) const
+{
+ return mp_impl->get_boolean_value(addr);
+}
+
+void model_context::set_sheet_size(const rc_size_t& sheet_size)
+{
+ mp_impl->set_sheet_size(sheet_size);
+}
+
+void model_context::set_config(const config& cfg)
+{
+ mp_impl->set_config(cfg);
+}
+
+string_id_t model_context::get_string_identifier(const abs_address_t& addr) const
+{
+ return mp_impl->get_string_identifier(addr);
+}
+
+std::string_view model_context::get_string_value(const abs_address_t& addr) const
+{
+ return mp_impl->get_string_value(addr);
+}
+
+const formula_cell* model_context::get_formula_cell(const abs_address_t& addr) const
+{
+ return mp_impl->get_formula_cell(addr);
+}
+
+formula_cell* model_context::get_formula_cell(const abs_address_t& addr)
+{
+ return mp_impl->get_formula_cell(addr);
+}
+
+formula_result model_context::get_formula_result(const abs_address_t& addr) const
+{
+ return mp_impl->get_formula_result(addr);
+}
+
+double model_context::count_range(const abs_range_t& range, values_t values_type) const
+{
+ return mp_impl->count_range(range, values_type);
+}
+
+matrix model_context::get_range_value(const abs_range_t& range) const
+{
+ if (range.first.sheet != range.last.sheet)
+ throw general_error("multi-sheet range is not allowed.");
+
+ if (!range.valid())
+ {
+ std::ostringstream os;
+ os << "invalid range: " << range;
+ throw std::invalid_argument(os.str());
+ }
+
+ rc_size_t sheet_size = get_sheet_size();
+ abs_range_t range_clipped = range;
+ if (range_clipped.all_rows())
+ {
+ range_clipped.first.row = 0;
+ range_clipped.last.row = sheet_size.row - 1;
+ }
+ if (range_clipped.all_columns())
+ {
+ range_clipped.first.column = 0;
+ range_clipped.last.column = sheet_size.column - 1;
+ }
+
+ row_t rows = range_clipped.last.row - range_clipped.first.row + 1;
+ col_t cols = range_clipped.last.column - range_clipped.first.column + 1;
+
+ matrix ret(rows, cols);
+ for (row_t i = 0; i < rows; ++i)
+ {
+ for (col_t j = 0; j < cols; ++j)
+ {
+ row_t row = i + range_clipped.first.row;
+ col_t col = j + range_clipped.first.column;
+ double val = get_numeric_value(abs_address_t(range_clipped.first.sheet, row, col));
+
+ // TODO: we need to handle string types when that becomes available.
+ ret.set(i, j, val);
+ }
+ }
+ return ret;
+}
+
+std::unique_ptr<iface::session_handler> model_context::create_session_handler()
+{
+ return mp_impl->create_session_handler();
+}
+
+iface::table_handler* model_context::get_table_handler()
+{
+ return mp_impl->get_table_handler();
+}
+
+const iface::table_handler* model_context::get_table_handler() const
+{
+ return mp_impl->get_table_handler();
+}
+
+string_id_t model_context::append_string(std::string_view s)
+{
+ return mp_impl->append_string(s);
+}
+
+string_id_t model_context::add_string(std::string_view s)
+{
+ return mp_impl->add_string(s);
+}
+
+const std::string* model_context::get_string(string_id_t identifier) const
+{
+ return mp_impl->get_string(identifier);
+}
+
+sheet_t model_context::get_sheet_index(std::string_view name) const
+{
+ return mp_impl->get_sheet_index(name);
+}
+
+std::string model_context::get_sheet_name(sheet_t sheet) const
+{
+ return mp_impl->get_sheet_name(sheet);
+}
+
+void model_context::set_sheet_name(sheet_t sheet, std::string name)
+{
+ mp_impl->set_sheet_name(sheet, std::move(name));
+}
+
+rc_size_t model_context::get_sheet_size() const
+{
+ return mp_impl->get_sheet_size();
+}
+
+size_t model_context::get_sheet_count() const
+{
+ return mp_impl->get_sheet_count();
+}
+
+void model_context::set_named_expression(std::string name, formula_tokens_t expr)
+{
+ abs_address_t origin(0, 0, 0);
+ mp_impl->set_named_expression(std::move(name), origin, std::move(expr));
+}
+
+void model_context::set_named_expression(std::string name, const abs_address_t& origin, formula_tokens_t expr)
+{
+ mp_impl->set_named_expression(std::move(name), origin, std::move(expr));
+}
+
+void model_context::set_named_expression(sheet_t sheet, std::string name, formula_tokens_t expr)
+{
+ abs_address_t origin(0, 0, 0);
+ mp_impl->set_named_expression(sheet, std::move(name), origin, std::move(expr));
+}
+
+void model_context::set_named_expression(
+ sheet_t sheet, std::string name, const abs_address_t& origin, formula_tokens_t expr)
+{
+ mp_impl->set_named_expression(sheet, std::move(name), origin, std::move(expr));
+}
+
+const named_expression_t* model_context::get_named_expression(sheet_t sheet, std::string_view name) const
+{
+ return mp_impl->get_named_expression(sheet, name);
+}
+
+sheet_t model_context::append_sheet(std::string name)
+{
+ return mp_impl->append_sheet(std::move(name));
+}
+
+void model_context::set_cell_values(sheet_t sheet, std::initializer_list<input_row> rows)
+{
+ mp_impl->set_cell_values(sheet, std::move(rows));
+}
+
+void model_context::set_session_handler_factory(session_handler_factory* factory)
+{
+ mp_impl->set_session_handler_factory(factory);
+}
+
+void model_context::set_table_handler(iface::table_handler* handler)
+{
+ mp_impl->set_table_handler(handler);
+}
+
+size_t model_context::get_string_count() const
+{
+ return mp_impl->get_string_count();
+}
+
+void model_context::dump_strings() const
+{
+ mp_impl->dump_strings();
+}
+
+string_id_t model_context::get_identifier_from_string(std::string_view s) const
+{
+ return mp_impl->get_identifier_from_string(s);
+}
+
+model_iterator model_context::get_model_iterator(
+ sheet_t sheet, rc_direction_t dir, const abs_rc_range_t& range) const
+{
+ return mp_impl->get_model_iterator(sheet, dir, range);
+}
+
+named_expressions_iterator model_context::get_named_expressions_iterator() const
+{
+ return named_expressions_iterator(*this, -1);
+}
+
+named_expressions_iterator model_context::get_named_expressions_iterator(sheet_t sheet) const
+{
+ return named_expressions_iterator(*this, sheet);
+}
+
+void model_context::walk(
+ sheet_t sheet, const abs_rc_range_t& range, column_block_callback_t cb) const
+{
+ mp_impl->walk(sheet, range, std::move(cb));
+}
+
+bool model_context::empty() const
+{
+ return mp_impl->empty();
+}
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/src/libixion/model_context_impl.cpp b/src/libixion/model_context_impl.cpp
new file mode 100644
index 0000000..fdd6714
--- /dev/null
+++ b/src/libixion/model_context_impl.cpp
@@ -0,0 +1,1126 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include "model_context_impl.hpp"
+
+#include <ixion/address.hpp>
+#include <ixion/cell.hpp>
+#include <ixion/formula_result.hpp>
+#include <ixion/matrix.hpp>
+#include <ixion/interface/session_handler.hpp>
+#include <ixion/model_iterator.hpp>
+#include <ixion/exceptions.hpp>
+
+#include "calc_status.hpp"
+#include "model_types.hpp"
+#include "utils.hpp"
+#include "debug.hpp"
+
+#include <sstream>
+#include <iostream>
+#include <cstring>
+
+using std::cout;
+using std::endl;
+
+namespace ixion { namespace detail {
+
+string_id_t safe_string_pool::append_string_unsafe(std::string_view s)
+{
+ assert(!s.empty());
+
+ string_id_t str_id = m_strings.size();
+ m_strings.push_back(std::string{s});
+ s = m_strings.back();
+ m_string_map.insert(string_map_type::value_type(s, str_id));
+ return str_id;
+}
+
+string_id_t safe_string_pool::append_string(std::string_view s)
+{
+ if (s.empty())
+ // Never add an empty or invalid string.
+ return empty_string_id;
+
+ std::unique_lock<std::mutex> lock(m_mtx);
+ return append_string_unsafe(s);
+}
+
+string_id_t safe_string_pool::add_string(std::string_view s)
+{
+ if (s.empty())
+ // Never add an empty or invalid string.
+ return empty_string_id;
+
+ std::unique_lock<std::mutex> lock(m_mtx);
+ string_map_type::iterator itr = m_string_map.find(s);
+ if (itr != m_string_map.end())
+ return itr->second;
+
+ return append_string_unsafe(s);
+}
+
+const std::string* safe_string_pool::get_string(string_id_t identifier) const
+{
+ if (identifier == empty_string_id)
+ return &m_empty_string;
+
+ if (identifier >= m_strings.size())
+ return nullptr;
+
+ return &m_strings[identifier];
+}
+
+size_t safe_string_pool::size() const
+{
+ return m_strings.size();
+}
+
+void safe_string_pool::dump_strings() const
+{
+ {
+ cout << "string count: " << m_strings.size() << endl;
+ auto it = m_strings.begin(), ite = m_strings.end();
+ for (string_id_t sid = 0; it != ite; ++it, ++sid)
+ {
+ const std::string& s = *it;
+ cout << "* " << sid << ": '" << s << "' (" << (void*)s.data() << ")" << endl;
+ }
+ }
+
+ {
+ cout << "string map count: " << m_string_map.size() << endl;
+ auto it = m_string_map.begin(), ite = m_string_map.end();
+ for (; it != ite; ++it)
+ {
+ std::string_view key = it->first;
+ cout << "* key: '" << key << "' (" << (void*)key.data() << "; " << key.size() << "), value: " << it->second << endl;
+ }
+ }
+}
+
+string_id_t safe_string_pool::get_identifier_from_string(std::string_view s) const
+{
+ string_map_type::const_iterator it = m_string_map.find(s);
+ return it == m_string_map.end() ? empty_string_id : it->second;
+}
+
+namespace {
+
+model_context::session_handler_factory dummy_session_handler_factory;
+
+rc_size_t to_group_size(const abs_range_t& group_range)
+{
+ rc_size_t group_size;
+ group_size.row = group_range.last.row - group_range.first.row + 1;
+ group_size.column = group_range.last.column - group_range.first.column + 1;
+ return group_size;
+}
+
+void set_grouped_formula_cells_to_workbook(
+ workbook& wb, const abs_address_t& top_left, const rc_size_t& group_size,
+ const calc_status_ptr_t& cs, const formula_tokens_store_ptr_t& ts)
+{
+ worksheet& sheet = wb.at(top_left.sheet);
+
+ for (col_t col_offset = 0; col_offset < group_size.column; ++col_offset)
+ {
+ col_t col = top_left.column + col_offset;
+ column_store_t& col_store = sheet.at(col);
+ column_store_t::iterator& pos_hint = sheet.get_pos_hint(col);
+
+ for (row_t row_offset = 0; row_offset < group_size.row; ++row_offset)
+ {
+ row_t row = top_left.row + row_offset;
+ pos_hint = col_store.set(pos_hint, row, new formula_cell(row_offset, col_offset, cs, ts));
+ }
+ }
+}
+
+/**
+ * The name of a named expression can only contain letters, numbers or an
+ * underscore character.
+ */
+void check_named_exp_name_or_throw(const char* p, size_t n)
+{
+ const char* p_end = p + n;
+
+ if (p == p_end)
+ throw model_context_error(
+ "empty name is not allowed", model_context_error::invalid_named_expression);
+
+ if ('0' <= *p && *p <= '9')
+ throw model_context_error(
+ "name cannot start with a numeric character", model_context_error::invalid_named_expression);
+
+ if (*p == '.')
+ throw model_context_error(
+ "name cannot start with a dot", model_context_error::invalid_named_expression);
+
+ for (; p != p_end; ++p)
+ {
+ char c = *p;
+ if ('a' <= c && c <= 'z')
+ continue;
+
+ if ('A' <= c && c <= 'Z')
+ continue;
+
+ if ('0' <= c && c <= '9')
+ continue;
+
+ if (c == '_' || c == '.')
+ continue;
+
+ std::ostringstream os;
+ os << "name contains invalid character '" << c << "'";
+ throw model_context_error(os.str(), model_context_error::invalid_named_expression);
+ }
+}
+
+void clip_range(abs_range_t& range, const rc_size_t& sheet_size)
+{
+ if (range.first.row == row_unset)
+ range.first.row = 0;
+ if (range.last.row == row_unset)
+ range.last.row = sheet_size.row - 1;
+}
+
+void throw_sheet_name_conflict(const std::string& name)
+{
+ // This sheet name is already taken.
+ std::ostringstream os;
+ os << "Sheet name '" << name << "' already exists.";
+ throw model_context_error(os.str(), model_context_error::sheet_name_conflict);
+}
+
+} // anonymous namespace
+
+model_context_impl::model_context_impl(model_context& parent, const rc_size_t& sheet_size) :
+ m_parent(parent),
+ m_sheet_size(sheet_size),
+ m_tracker(),
+ mp_table_handler(nullptr),
+ mp_session_factory(&dummy_session_handler_factory),
+ m_formula_res_wait_policy(formula_result_wait_policy_t::throw_exception)
+{
+}
+
+model_context_impl::~model_context_impl() {}
+
+void model_context_impl::notify(formula_event_t event)
+{
+ switch (event)
+ {
+ case formula_event_t::calculation_begins:
+ m_formula_res_wait_policy = formula_result_wait_policy_t::block_until_done;
+ break;
+ case formula_event_t::calculation_ends:
+ m_formula_res_wait_policy = formula_result_wait_policy_t::throw_exception;
+ break;
+ }
+}
+
+void model_context_impl::set_named_expression(
+ std::string name, const abs_address_t& origin, formula_tokens_t&& expr)
+{
+ check_named_exp_name_or_throw(name.data(), name.size());
+
+ IXION_TRACE("named expression: name='" << name << "'");
+ m_named_expressions.insert(
+ detail::named_expressions_t::value_type(
+ std::move(name),
+ named_expression_t(origin, std::move(expr))
+ )
+ );
+}
+
+void model_context_impl::set_named_expression(
+ sheet_t sheet, std::string name, const abs_address_t& origin, formula_tokens_t&& expr)
+{
+ check_named_exp_name_or_throw(name.data(), name.size());
+
+ detail::named_expressions_t& ns = m_sheets.at(sheet).get_named_expressions();
+ IXION_TRACE("named expression: name='" << name << "'");
+ ns.insert(
+ detail::named_expressions_t::value_type(
+ std::move(name),
+ named_expression_t(origin, std::move(expr))
+ )
+ );
+}
+
+const named_expression_t* model_context_impl::get_named_expression(std::string_view name) const
+{
+ named_expressions_t::const_iterator itr = m_named_expressions.find(std::string(name));
+ return itr == m_named_expressions.end() ? nullptr : &itr->second;
+}
+
+const named_expression_t* model_context_impl::get_named_expression(sheet_t sheet, std::string_view name) const
+{
+ const worksheet* ws = fetch_sheet(sheet);
+
+ if (ws)
+ {
+ const named_expressions_t& ns = ws->get_named_expressions();
+ auto it = ns.find(std::string(name));
+ if (it != ns.end())
+ return &it->second;
+ }
+
+ // Search the global scope if not found in the sheet local scope.
+ return get_named_expression(name);
+}
+
+sheet_t model_context_impl::get_sheet_index(std::string_view name) const
+{
+ strings_type::const_iterator itr_beg = m_sheet_names.begin(), itr_end = m_sheet_names.end();
+ for (strings_type::const_iterator itr = itr_beg; itr != itr_end; ++itr)
+ {
+ const std::string& s = *itr;
+ if (s.empty())
+ continue;
+
+ if (s == name)
+ return static_cast<sheet_t>(std::distance(itr_beg, itr));
+ }
+ return invalid_sheet;
+}
+
+std::string model_context_impl::get_sheet_name(sheet_t sheet) const
+{
+ if (sheet < 0 || m_sheet_names.size() <= std::size_t(sheet))
+ return std::string();
+
+ return m_sheet_names[sheet];
+}
+
+void model_context_impl::set_sheet_name(sheet_t sheet, std::string name)
+{
+ if (sheet < 0 || m_sheet_names.size() <= std::size_t(sheet))
+ {
+ std::ostringstream os;
+ os << "invalid sheet index: " << sheet;
+ throw std::invalid_argument(os.str());
+ }
+
+ for (std::size_t i = 0; i < m_sheet_names.size(); ++i)
+ {
+ if (m_sheet_names[i] == name)
+ {
+ if (i == std::size_t(sheet))
+ // Same sheet name is given. No point updating it.
+ return;
+ else
+ throw_sheet_name_conflict(name);
+ }
+ }
+
+ m_sheet_names[sheet] = std::move(name);
+}
+
+rc_size_t model_context_impl::get_sheet_size() const
+{
+ return m_sheet_size;
+}
+
+size_t model_context_impl::get_sheet_count() const
+{
+ return m_sheets.size();
+}
+
+sheet_t model_context_impl::append_sheet(std::string&& name)
+{
+ IXION_TRACE("name='" << name << "'");
+
+ // Check if the new sheet name already exists.
+ strings_type::const_iterator it =
+ std::find(m_sheet_names.begin(), m_sheet_names.end(), name);
+ if (it != m_sheet_names.end())
+ throw_sheet_name_conflict(name);
+
+ // index of the new sheet.
+ sheet_t sheet_index = m_sheets.size();
+
+ m_sheet_names.push_back(std::move(name));
+ m_sheets.push_back(m_sheet_size.row, m_sheet_size.column);
+ return sheet_index;
+}
+
+void model_context_impl::set_cell_values(sheet_t sheet, std::initializer_list<model_context::input_row>&& rows)
+{
+ abs_address_t pos;
+ pos.sheet = sheet;
+ pos.row = 0;
+ pos.column = 0;
+
+ // TODO : This function is not optimized for speed as it is mainly for
+ // convenience. Decide if we need to optimize this later.
+
+ for (const model_context::input_row& row : rows)
+ {
+ pos.column = 0;
+
+ for (const model_context::input_cell& c : row.cells())
+ {
+ switch (c.type)
+ {
+ case celltype_t::numeric:
+ set_numeric_cell(pos, std::get<double>(c.value));
+ break;
+ case celltype_t::string:
+ {
+ auto s = std::get<std::string_view>(c.value);
+ set_string_cell(pos, s);
+ break;
+ }
+ case celltype_t::boolean:
+ set_boolean_cell(pos, std::get<bool>(c.value));
+ break;
+ default:
+ ;
+ }
+
+ ++pos.column;
+ }
+
+ ++pos.row;
+ }
+}
+
+string_id_t model_context_impl::append_string(std::string_view s)
+{
+ return m_str_pool.append_string(s);
+}
+
+string_id_t model_context_impl::add_string(std::string_view s)
+{
+ return m_str_pool.add_string(s);
+}
+
+const std::string* model_context_impl::get_string(string_id_t identifier) const
+{
+ return m_str_pool.get_string(identifier);
+}
+
+size_t model_context_impl::get_string_count() const
+{
+ return m_str_pool.size();
+}
+
+void model_context_impl::dump_strings() const
+{
+ m_str_pool.dump_strings();
+}
+
+const column_store_t* model_context_impl::get_column(sheet_t sheet, col_t col) const
+{
+ if (static_cast<size_t>(sheet) >= m_sheets.size())
+ return nullptr;
+
+ const worksheet& sh = m_sheets[sheet];
+
+ if (static_cast<size_t>(col) >= sh.size())
+ return nullptr;
+
+ return &sh[col];
+}
+
+const column_stores_t* model_context_impl::get_columns(sheet_t sheet) const
+{
+ if (static_cast<size_t>(sheet) >= m_sheets.size())
+ return nullptr;
+
+ const worksheet& sh = m_sheets[sheet];
+ return &sh.get_columns();
+}
+
+namespace {
+
+double count_formula_block(
+ formula_result_wait_policy_t wait_policy, const column_store_t::const_iterator& itb, size_t offset, size_t len, const values_t& vt)
+{
+ double ret = 0.0;
+
+ // Inspect each formula cell individually.
+ formula_cell** pp = &formula_element_block::at(*itb->data, offset);
+ formula_cell** pp_end = pp + len;
+ for (; pp != pp_end; ++pp)
+ {
+ const formula_cell& fc = **pp;
+ formula_result res = fc.get_result_cache(wait_policy);
+
+ switch (res.get_type())
+ {
+ case formula_result::result_type::boolean:
+ if (vt.is_boolean())
+ ++ret;
+ break;
+ case formula_result::result_type::value:
+ if (vt.is_numeric())
+ ++ret;
+ break;
+ case formula_result::result_type::string:
+ if (vt.is_string())
+ ++ret;
+ break;
+ case formula_result::result_type::error:
+ // TODO : how do we handle error formula cells?
+ break;
+ case formula_result::result_type::matrix:
+ // TODO : ditto
+ break;
+ }
+ }
+
+ return ret;
+}
+
+column_block_t map_column_block_type(const mdds::mtv::element_t mtv_type)
+{
+ static const std::map<mdds::mtv::element_t, column_block_t> rules = {
+ { element_type_empty, column_block_t::empty }, // -1
+ { element_type_boolean, column_block_t::boolean }, // 0
+ { element_type_string, column_block_t::string }, // 6
+ { element_type_numeric, column_block_t::numeric }, // 10
+ { element_type_formula, column_block_t::formula }, // user-start (50)
+ };
+
+ auto it = rules.find(mtv_type);
+ return it == rules.end() ? column_block_t::unknown : it->second;
+}
+
+} // anonymous namespace
+
+double model_context_impl::count_range(abs_range_t range, values_t values_type) const
+{
+ if (m_sheets.empty())
+ return 0.0;
+
+ clip_range(range, m_sheet_size);
+
+ double ret = 0.0;
+ sheet_t last_sheet = range.last.sheet;
+ if (static_cast<size_t>(last_sheet) >= m_sheets.size())
+ last_sheet = m_sheets.size() - 1;
+
+ for (sheet_t sheet = range.first.sheet; sheet <= last_sheet; ++sheet)
+ {
+ const worksheet& ws = m_sheets.at(sheet);
+ for (col_t col = range.first.column; col <= range.last.column; ++col)
+ {
+ const column_store_t& cs = ws.at(col);
+ row_t cur_row = range.first.row;
+ column_store_t::const_position_type pos = cs.position(cur_row);
+ column_store_t::const_iterator itb = pos.first; // block iterator
+ column_store_t::const_iterator itb_end = cs.end();
+ size_t offset = pos.second;
+ if (itb == itb_end)
+ continue;
+
+ bool cont = true;
+ while (cont)
+ {
+ // remaining length of current block.
+ size_t len = itb->size - offset;
+ row_t last_row = cur_row + len - 1;
+
+ if (last_row >= range.last.row)
+ {
+ last_row = range.last.row;
+ len = last_row - cur_row + 1;
+ cont = false;
+ }
+
+ bool match = false;
+
+ switch (itb->type)
+ {
+ case element_type_numeric:
+ match = values_type.is_numeric();
+ break;
+ case element_type_boolean:
+ match = values_type.is_boolean();
+ break;
+ case element_type_string:
+ match = values_type.is_string();
+ break;
+ case element_type_empty:
+ match = values_type.is_empty();
+ break;
+ case element_type_formula:
+ ret += count_formula_block(m_formula_res_wait_policy, itb, offset, len, values_type);
+ break;
+ default:
+ {
+ std::ostringstream os;
+ os << __FUNCTION__ << ": unhandled block type (" << itb->type << ")";
+ throw general_error(os.str());
+ }
+ }
+
+ if (match)
+ ret += len;
+
+ // Move to the next block.
+ cur_row = last_row + 1;
+ ++itb;
+ offset = 0;
+ if (itb == itb_end)
+ cont = false;
+ }
+ }
+ }
+
+ return ret;
+}
+
+void model_context_impl::walk(sheet_t sheet, const abs_rc_range_t& range, column_block_callback_t cb) const
+{
+ const worksheet& sh = m_sheets.at(sheet);
+
+ for (col_t ic = range.first.column; ic <= range.last.column; ++ic)
+ {
+ row_t cur_row = range.first.row;
+
+ while (cur_row <= range.last.row)
+ {
+ const column_store_t& col = sh.at(ic);
+ auto pos = col.position(cur_row);
+ auto blk = pos.first;
+
+ column_block_shape_t shape;
+ shape.position = blk->position;
+ shape.size = blk->size;
+ shape.offset = pos.second;
+ shape.type = map_column_block_type(blk->type);
+ shape.data = blk->data;
+
+ // last row specified by the caller, or row corresponding to the
+ // last element of the block, whichever comes first.
+ row_t last_row = std::min<row_t>(blk->size - pos.second - 1 + cur_row, range.last.row);
+
+ if (!cb(ic, cur_row, last_row, shape))
+ return;
+
+ assert(blk->size > pos.second);
+ cur_row += blk->size - pos.second;
+ }
+ }
+}
+
+bool model_context_impl::empty() const
+{
+ return m_sheets.empty();
+}
+
+const worksheet* model_context_impl::fetch_sheet(sheet_t sheet_index) const
+{
+ if (sheet_index < 0 || m_sheets.size() <= size_t(sheet_index))
+ return nullptr;
+
+ return &m_sheets[sheet_index];
+}
+
+column_store_t::const_position_type model_context_impl::get_cell_position(const abs_address_t& addr) const
+{
+ const column_store_t& col_store = m_sheets.at(addr.sheet).at(addr.column);
+ return col_store.position(addr.row);
+}
+
+const detail::named_expressions_t& model_context_impl::get_named_expressions() const
+{
+ return m_named_expressions;
+}
+
+const detail::named_expressions_t& model_context_impl::get_named_expressions(sheet_t sheet) const
+{
+ const worksheet& sh = m_sheets.at(sheet);
+ return sh.get_named_expressions();
+}
+
+model_iterator model_context_impl::get_model_iterator(
+ sheet_t sheet, rc_direction_t dir, const abs_rc_range_t& range) const
+{
+ return model_iterator(*this, sheet, range, dir);
+}
+
+void model_context_impl::set_sheet_size(const rc_size_t& sheet_size)
+{
+ if (!m_sheets.empty())
+ throw model_context_error(
+ "You cannot change the sheet size if you already have at least one existing sheet.",
+ model_context_error::sheet_size_locked);
+
+ m_sheet_size = sheet_size;
+}
+
+std::unique_ptr<iface::session_handler> model_context_impl::create_session_handler()
+{
+ return mp_session_factory->create();
+}
+
+void model_context_impl::empty_cell(const abs_address_t& addr)
+{
+ worksheet& sheet = m_sheets.at(addr.sheet);
+ column_store_t& col_store = sheet.at(addr.column);
+ column_store_t::iterator& pos_hint = sheet.get_pos_hint(addr.column);
+ pos_hint = col_store.set_empty(addr.row, addr.row);
+}
+
+void model_context_impl::set_numeric_cell(const abs_address_t& addr, double val)
+{
+ worksheet& sheet = m_sheets.at(addr.sheet);
+ column_store_t& col_store = sheet.at(addr.column);
+ column_store_t::iterator& pos_hint = sheet.get_pos_hint(addr.column);
+ pos_hint = col_store.set(pos_hint, addr.row, val);
+}
+
+void model_context_impl::set_boolean_cell(const abs_address_t& addr, bool val)
+{
+ worksheet& sheet = m_sheets.at(addr.sheet);
+ column_store_t& col_store = sheet.at(addr.column);
+ column_store_t::iterator& pos_hint = sheet.get_pos_hint(addr.column);
+ pos_hint = col_store.set(pos_hint, addr.row, val);
+}
+
+void model_context_impl::set_string_cell(const abs_address_t& addr, std::string_view s)
+{
+ worksheet& sheet = m_sheets.at(addr.sheet);
+ string_id_t str_id = add_string(s);
+ column_store_t& col_store = sheet.at(addr.column);
+ column_store_t::iterator& pos_hint = sheet.get_pos_hint(addr.column);
+ pos_hint = col_store.set(pos_hint, addr.row, str_id);
+}
+
+void model_context_impl::fill_down_cells(const abs_address_t& src, size_t n_dst)
+{
+ if (!n_dst)
+ // Destination cell length is 0. Nothing to copy to.
+ return;
+
+ worksheet& sheet = m_sheets.at(src.sheet);
+ column_store_t& col_store = sheet.at(src.column);
+ column_store_t::iterator& pos_hint = sheet.get_pos_hint(src.column);
+
+ column_store_t::const_position_type pos = col_store.position(pos_hint, src.row);
+ auto it = pos.first; // block iterator
+
+ switch (it->type)
+ {
+ case element_type_numeric:
+ {
+ double v = col_store.get<numeric_element_block>(pos);
+ std::vector<double> vs(n_dst, v);
+ pos_hint = col_store.set(pos_hint, src.row+1, vs.begin(), vs.end());
+ break;
+ }
+ case element_type_boolean:
+ {
+ bool b = col_store.get<boolean_element_block>(pos);
+ std::deque<bool> vs(n_dst, b);
+ pos_hint = col_store.set(pos_hint, src.row+1, vs.begin(), vs.end());
+ break;
+ }
+ case element_type_string:
+ {
+ string_id_t sid = col_store.get<string_element_block>(pos);
+ std::vector<string_id_t> vs(n_dst, sid);
+ pos_hint = col_store.set(pos_hint, src.row+1, vs.begin(), vs.end());
+ break;
+ }
+ case element_type_empty:
+ {
+ size_t start_pos = src.row + 1;
+ size_t end_pos = start_pos + n_dst - 1;
+ pos_hint = col_store.set_empty(pos_hint, start_pos, end_pos);
+ break;
+ }
+ case element_type_formula:
+ // TODO : support this.
+ throw not_implemented_error("filling down of a formula cell is not yet supported.");
+ default:
+ {
+ std::ostringstream os;
+ os << __FUNCTION__ << ": unhandled block type (" << it->type << ")";
+ throw general_error(os.str());
+ }
+ }
+}
+
+void model_context_impl::set_string_cell(const abs_address_t& addr, string_id_t identifier)
+{
+ worksheet& sheet = m_sheets.at(addr.sheet);
+ column_store_t& col_store = sheet.at(addr.column);
+ column_store_t::iterator& pos_hint = sheet.get_pos_hint(addr.column);
+ pos_hint = col_store.set(pos_hint, addr.row, identifier);
+}
+
+formula_cell* model_context_impl::set_formula_cell(
+ const abs_address_t& addr, const formula_tokens_store_ptr_t& tokens)
+{
+ std::unique_ptr<formula_cell> fcell = std::make_unique<formula_cell>(tokens);
+
+ worksheet& sheet = m_sheets.at(addr.sheet);
+ column_store_t& col_store = sheet.at(addr.column);
+ column_store_t::iterator& pos_hint = sheet.get_pos_hint(addr.column);
+ formula_cell* p = fcell.release();
+ pos_hint = col_store.set(pos_hint, addr.row, p);
+ return p;
+}
+
+formula_cell* model_context_impl::set_formula_cell(
+ const abs_address_t& addr, const formula_tokens_store_ptr_t& tokens, formula_result result)
+{
+ std::unique_ptr<formula_cell> fcell = std::make_unique<formula_cell>(tokens);
+
+ worksheet& sheet = m_sheets.at(addr.sheet);
+ column_store_t& col_store = sheet.at(addr.column);
+ column_store_t::iterator& pos_hint = sheet.get_pos_hint(addr.column);
+ formula_cell* p = fcell.release();
+ p->set_result_cache(std::move(result));
+ pos_hint = col_store.set(pos_hint, addr.row, p);
+ return p;
+}
+
+void model_context_impl::set_grouped_formula_cells(
+ const abs_range_t& group_range, formula_tokens_t tokens)
+{
+ formula_tokens_store_ptr_t ts = formula_tokens_store::create();
+ ts->get() = std::move(tokens);
+
+ rc_size_t group_size = to_group_size(group_range);
+ calc_status_ptr_t cs(new calc_status(group_size));
+ set_grouped_formula_cells_to_workbook(m_sheets, group_range.first, group_size, cs, ts);
+}
+
+void model_context_impl::set_grouped_formula_cells(
+ const abs_range_t& group_range, formula_tokens_t tokens, formula_result result)
+{
+ formula_tokens_store_ptr_t ts = formula_tokens_store::create();
+ ts->get() = std::move(tokens);
+
+ rc_size_t group_size = to_group_size(group_range);
+
+ if (result.get_type() != formula_result::result_type::matrix)
+ throw std::invalid_argument("cached result for grouped formula cells must be of matrix type.");
+
+ if (row_t(result.get_matrix().row_size()) != group_size.row || col_t(result.get_matrix().col_size()) != group_size.column)
+ throw std::invalid_argument("dimension of the cached result differs from the size of the group.");
+
+ calc_status_ptr_t cs(new calc_status(group_size));
+ cs->result = std::make_unique<formula_result>(std::move(result));
+ set_grouped_formula_cells_to_workbook(m_sheets, group_range.first, group_size, cs, ts);
+}
+
+abs_range_t model_context_impl::get_data_range(sheet_t sheet) const
+{
+ const worksheet& cols = m_sheets.at(sheet);
+ size_t col_size = cols.size();
+ if (!col_size)
+ return abs_range_t(abs_range_t::invalid);
+
+ row_t row_size = cols[0].size();
+ if (!row_size)
+ return abs_range_t(abs_range_t::invalid);
+
+ abs_range_t range;
+ range.first.column = 0;
+ range.first.row = row_size-1;
+ range.first.sheet = sheet;
+ range.last.column = -1; // if this stays -1 all columns are empty.
+ range.last.row = 0;
+ range.last.sheet = sheet;
+
+ for (size_t i = 0; i < col_size; ++i)
+ {
+ const column_store_t& col = cols[i];
+ if (col.empty())
+ {
+ if (range.last.column < 0)
+ ++range.first.column;
+ continue;
+ }
+
+ if (range.first.row > 0)
+ {
+ // First non-empty row.
+
+ column_store_t::const_iterator it = col.begin(), it_end = col.end();
+ assert(it != it_end);
+ if (it->type == element_type_empty)
+ {
+ // First block is empty.
+ row_t offset = it->size;
+ ++it;
+ if (it == it_end)
+ {
+ // The whole column is empty.
+ if (range.last.column < 0)
+ ++range.first.column;
+ continue;
+ }
+
+ assert(it->type != element_type_empty);
+ if (range.first.row > offset)
+ range.first.row = offset;
+ }
+ else
+ // Set the first row to 0, and lock it.
+ range.first.row = 0;
+ }
+
+ if (range.last.row < (row_size-1))
+ {
+ // Last non-empty row.
+
+ column_store_t::const_reverse_iterator it = col.rbegin(), it_end = col.rend();
+ assert(it != it_end);
+ if (it->type == element_type_empty)
+ {
+ // Last block is empty.
+ size_t size_last_block = it->size;
+ ++it;
+ if (it == it_end)
+ {
+ // The whole column is empty.
+ if (range.last.column < 0)
+ ++range.first.column;
+ continue;
+ }
+
+ assert(it->type != element_type_empty);
+ row_t last_data_row = static_cast<row_t>(col.size() - size_last_block - 1);
+ if (range.last.row < last_data_row)
+ range.last.row = last_data_row;
+ }
+ else
+ // Last block is not empty.
+ range.last.row = row_size - 1;
+ }
+
+ // Check if the column contains at least one non-empty cell.
+ if (col.block_size() > 1 || !col.is_empty(0))
+ range.last.column = i;
+ }
+
+ if (range.last.column < 0)
+ // No data column found. The whole sheet is empty.
+ return abs_range_t(abs_range_t::invalid);
+
+ return range;
+}
+
+bool model_context_impl::is_empty(const abs_address_t& addr) const
+{
+ return m_sheets.at(addr.sheet).at(addr.column).is_empty(addr.row);
+}
+
+bool model_context_impl::is_empty(abs_range_t range) const
+{
+ range = shrink_to_workbook(range);
+
+ for (sheet_t sh = range.first.sheet; sh <= range.last.sheet; ++sh)
+ {
+ for (col_t col = range.first.column; col <= range.last.column; ++col)
+ {
+ const column_store_t& col_store = m_sheets[sh][col];
+ auto pos = col_store.position(range.first.row);
+ if (pos.first->type != element_type_empty)
+ // The top block is non-empty.
+ return false;
+
+ // See if this block covers the entire row range.
+ row_t last_empty_row = range.first.row + pos.first->size - pos.second - 1;
+ if (last_empty_row < range.last.row)
+ return false;
+ }
+ }
+
+ return true;
+}
+
+celltype_t model_context_impl::get_celltype(const abs_address_t& addr) const
+{
+ mdds::mtv::element_t gmcell_type =
+ m_sheets.at(addr.sheet).at(addr.column).get_type(addr.row);
+
+ return detail::to_celltype(gmcell_type);
+}
+
+cell_value_t model_context_impl::get_cell_value_type(const abs_address_t& addr) const
+{
+ const column_store_t& col_store = m_sheets.at(addr.sheet).at(addr.column);
+ auto pos = col_store.position(addr.row);
+ return detail::to_cell_value_type(pos, get_formula_result_wait_policy());
+}
+
+double model_context_impl::get_numeric_value(const abs_address_t& addr) const
+{
+ const column_store_t& col_store = m_sheets.at(addr.sheet).at(addr.column);
+ auto pos = col_store.position(addr.row);
+
+ switch (pos.first->type)
+ {
+ case element_type_numeric:
+ return numeric_element_block::at(*pos.first->data, pos.second);
+ case element_type_boolean:
+ {
+ auto it = boolean_element_block::cbegin(*pos.first->data);
+ std::advance(it, pos.second);
+ return *it ? 1.0 : 0.0;
+ }
+ case element_type_formula:
+ {
+ const formula_cell* p = formula_element_block::at(*pos.first->data, pos.second);
+ return p->get_value(m_formula_res_wait_policy);
+ }
+ default:
+ ;
+ }
+ return 0.0;
+}
+
+bool model_context_impl::get_boolean_value(const abs_address_t& addr) const
+{
+ const column_store_t& col_store = m_sheets.at(addr.sheet).at(addr.column);
+ auto pos = col_store.position(addr.row);
+
+ switch (pos.first->type)
+ {
+ case element_type_numeric:
+ return numeric_element_block::at(*pos.first->data, pos.second) != 0.0 ? true : false;
+ case element_type_boolean:
+ {
+ auto it = boolean_element_block::cbegin(*pos.first->data);
+ std::advance(it, pos.second);
+ return *it;
+ }
+ case element_type_formula:
+ {
+ const formula_cell* p = formula_element_block::at(*pos.first->data, pos.second);
+ return p->get_value(m_formula_res_wait_policy) == 0.0 ? false : true;
+ }
+ default:
+ ;
+ }
+ return false;
+}
+
+string_id_t model_context_impl::get_string_identifier(const abs_address_t& addr) const
+{
+ const column_store_t& col_store = m_sheets.at(addr.sheet).at(addr.column);
+ auto pos = col_store.position(addr.row);
+
+ switch (pos.first->type)
+ {
+ case element_type_string:
+ return string_element_block::at(*pos.first->data, pos.second);
+ default:
+ ;
+ }
+ return empty_string_id;
+}
+
+std::string_view model_context_impl::get_string_value(const abs_address_t& addr) const
+{
+ const column_store_t& col_store = m_sheets.at(addr.sheet).at(addr.column);
+ auto pos = col_store.position(addr.row);
+
+ switch (pos.first->type)
+ {
+ case element_type_string:
+ {
+ string_id_t sid = string_element_block::at(*pos.first->data, pos.second);
+ const std::string* p = m_str_pool.get_string(sid);
+ return p ? *p : std::string_view{};
+ }
+ case element_type_formula:
+ {
+ const formula_cell* p = formula_element_block::at(*pos.first->data, pos.second);
+ return p->get_string(m_formula_res_wait_policy);
+ }
+ case element_type_empty:
+ return empty_string;
+ default:
+ ;
+ }
+
+ return std::string_view{};
+}
+
+string_id_t model_context_impl::get_identifier_from_string(std::string_view s) const
+{
+ return m_str_pool.get_identifier_from_string(s);
+}
+
+const formula_cell* model_context_impl::get_formula_cell(const abs_address_t& addr) const
+{
+ const column_store_t& col_store = m_sheets.at(addr.sheet).at(addr.column);
+ auto pos = col_store.position(addr.row);
+
+ if (pos.first->type != element_type_formula)
+ return nullptr;
+
+ return formula_element_block::at(*pos.first->data, pos.second);
+}
+
+formula_cell* model_context_impl::get_formula_cell(const abs_address_t& addr)
+{
+ column_store_t& col_store = m_sheets.at(addr.sheet).at(addr.column);
+ auto pos = col_store.position(addr.row);
+
+ if (pos.first->type != element_type_formula)
+ return nullptr;
+
+ return formula_element_block::at(*pos.first->data, pos.second);
+}
+
+formula_result model_context_impl::get_formula_result(const abs_address_t& addr) const
+{
+ const formula_cell* fc = get_formula_cell(addr);
+ if (!fc)
+ throw general_error("not a formula cell.");
+
+ return fc->get_result_cache(m_formula_res_wait_policy);
+}
+
+abs_range_t model_context_impl::shrink_to_workbook(abs_range_t range) const
+{
+ range.reorder();
+
+ if (m_sheets.empty())
+ return range;
+
+ if (range.first.sheet >= sheet_t(m_sheets.size()))
+ throw general_error("out-of-bound sheet ranges");
+
+ range.last.sheet = std::min<sheet_t>(range.last.sheet, m_sheets.size()-1);
+ const worksheet& ws = m_sheets[range.last.sheet];
+ const column_stores_t& cols = ws.get_columns();
+
+ if (cols.empty())
+ return range;
+
+ if (range.first.column >= col_t(cols.size()))
+ throw general_error("out-of-bound column ranges");
+
+ range.last.column = std::min<col_t>(range.last.column, cols.size()-1);
+
+ const column_store_t& col = cols[0];
+
+ if (range.first.row >= row_t(col.size()))
+ throw general_error("out-of-bound row ranges");
+
+ range.last.row = std::min<row_t>(range.last.row, col.size()-1);
+
+ return range;
+}
+
+}}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/src/libixion/model_context_impl.hpp b/src/libixion/model_context_impl.hpp
new file mode 100644
index 0000000..57b73d8
--- /dev/null
+++ b/src/libixion/model_context_impl.hpp
@@ -0,0 +1,206 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef INCLUDED_MODEL_CONTEXT_IMPL_HPP
+#define INCLUDED_MODEL_CONTEXT_IMPL_HPP
+
+#include "ixion/model_context.hpp"
+#include "ixion/types.hpp"
+#include "ixion/config.hpp"
+#include "ixion/dirty_cell_tracker.hpp"
+
+#include "workbook.hpp"
+#include "column_store_type.hpp"
+
+#include <vector>
+#include <string>
+#include <unordered_map>
+#include <mutex>
+#include <deque>
+
+namespace ixion { namespace detail {
+
+class safe_string_pool
+{
+ using string_pool_type = std::deque<std::string>;
+ using string_map_type = std::unordered_map<std::string_view, string_id_t>;
+
+ std::mutex m_mtx;
+ string_pool_type m_strings;
+ string_map_type m_string_map;
+ std::string m_empty_string;
+
+ string_id_t append_string_unsafe(std::string_view s);
+
+public:
+ string_id_t append_string(std::string_view s);
+ string_id_t add_string(std::string_view s);
+ const std::string* get_string(string_id_t identifier) const;
+
+ size_t size() const;
+ void dump_strings() const;
+ string_id_t get_identifier_from_string(std::string_view s) const;
+};
+
+class model_context_impl
+{
+ typedef std::vector<std::string> strings_type;
+
+public:
+ model_context_impl() = delete;
+ model_context_impl(const model_context_impl&) = delete;
+ model_context_impl& operator= (model_context_impl) = delete;
+
+ model_context_impl(model_context& parent, const rc_size_t& sheet_size);
+ ~model_context_impl();
+
+ formula_result_wait_policy_t get_formula_result_wait_policy() const
+ {
+ return m_formula_res_wait_policy;
+ }
+
+ void notify(formula_event_t event);
+
+ const config& get_config() const
+ {
+ return m_config;
+ }
+
+ void set_config(const config& cfg)
+ {
+ m_config = cfg;
+ }
+
+ void set_sheet_size(const rc_size_t& sheet_size);
+
+ dirty_cell_tracker& get_cell_tracker()
+ {
+ return m_tracker;
+ }
+
+ const dirty_cell_tracker& get_cell_tracker() const
+ {
+ return m_tracker;
+ }
+
+ std::unique_ptr<iface::session_handler> create_session_handler();
+
+ void set_session_handler_factory(model_context::session_handler_factory* factory)
+ {
+ mp_session_factory = factory;
+ }
+
+ iface::table_handler* get_table_handler()
+ {
+ return mp_table_handler;
+ }
+
+ const iface::table_handler* get_table_handler() const
+ {
+ return mp_table_handler;
+ }
+
+ void set_table_handler(iface::table_handler* handler)
+ {
+ mp_table_handler = handler;
+ }
+
+ void empty_cell(const abs_address_t& addr);
+ void set_numeric_cell(const abs_address_t& addr, double val);
+ void set_boolean_cell(const abs_address_t& addr, bool val);
+ void set_string_cell(const abs_address_t& addr, std::string_view s);
+ void set_string_cell(const abs_address_t& addr, string_id_t identifier);
+ void fill_down_cells(const abs_address_t& src, size_t n_dst);
+ formula_cell* set_formula_cell(const abs_address_t& addr, const formula_tokens_store_ptr_t& tokens);
+ formula_cell* set_formula_cell(const abs_address_t& addr, const formula_tokens_store_ptr_t& tokens, formula_result result);
+ void set_grouped_formula_cells(const abs_range_t& group_range, formula_tokens_t tokens);
+ void set_grouped_formula_cells(const abs_range_t& group_range, formula_tokens_t tokens, formula_result result);
+
+ abs_range_t get_data_range(sheet_t sheet) const;
+
+ bool is_empty(const abs_address_t& addr) const;
+ bool is_empty(abs_range_t range) const;
+ celltype_t get_celltype(const abs_address_t& addr) const;
+ cell_value_t get_cell_value_type(const abs_address_t& addr) const;
+ double get_numeric_value(const abs_address_t& addr) const;
+ bool get_boolean_value(const abs_address_t& addr) const;
+ string_id_t get_string_identifier(const abs_address_t& addr) const;
+ std::string_view get_string_value(const abs_address_t& addr) const;
+ string_id_t get_identifier_from_string(std::string_view s) const;
+ const formula_cell* get_formula_cell(const abs_address_t& addr) const;
+ formula_cell* get_formula_cell(const abs_address_t& addr);
+
+ formula_result get_formula_result(const abs_address_t& addr) const;
+
+ void set_named_expression(std::string name, const abs_address_t& origin, formula_tokens_t&& expr);
+ void set_named_expression(sheet_t sheet, std::string name, const abs_address_t& origin, formula_tokens_t&& expr);
+
+ const named_expression_t* get_named_expression(std::string_view name) const;
+ const named_expression_t* get_named_expression(sheet_t sheet, std::string_view name) const;
+
+ sheet_t get_sheet_index(std::string_view name) const;
+ std::string get_sheet_name(sheet_t sheet) const;
+ void set_sheet_name(sheet_t sheet, std::string name);
+ rc_size_t get_sheet_size() const;
+ size_t get_sheet_count() const;
+ sheet_t append_sheet(std::string&& name);
+
+ void set_cell_values(sheet_t sheet, std::initializer_list<model_context::input_row>&& rows);
+
+ string_id_t append_string(std::string_view s);
+ string_id_t add_string(std::string_view s);
+ const std::string* get_string(string_id_t identifier) const;
+ size_t get_string_count() const;
+ void dump_strings() const;
+
+ const column_store_t* get_column(sheet_t sheet, col_t col) const;
+ const column_stores_t* get_columns(sheet_t sheet) const;
+
+ double count_range(abs_range_t range, values_t values_type) const;
+
+ void walk(sheet_t sheet, const abs_rc_range_t& range, column_block_callback_t cb) const;
+
+ bool empty() const;
+
+ const worksheet* fetch_sheet(sheet_t sheet_index) const;
+
+ column_store_t::const_position_type get_cell_position(const abs_address_t& addr) const;
+
+ const detail::named_expressions_t& get_named_expressions() const;
+ const detail::named_expressions_t& get_named_expressions(sheet_t sheet) const;
+
+ model_iterator get_model_iterator(
+ sheet_t sheet, rc_direction_t dir, const abs_rc_range_t& range) const;
+
+private:
+ abs_range_t shrink_to_workbook(abs_range_t range) const;
+
+private:
+ model_context& m_parent;
+
+ rc_size_t m_sheet_size;
+ workbook m_sheets;
+
+ config m_config;
+ dirty_cell_tracker m_tracker;
+ iface::table_handler* mp_table_handler;
+ detail::named_expressions_t m_named_expressions;
+
+ model_context::session_handler_factory* mp_session_factory;
+
+ strings_type m_sheet_names; ///< index to sheet name map.
+
+ safe_string_pool m_str_pool;
+
+ formula_result_wait_policy_t m_formula_res_wait_policy;
+};
+
+}}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/src/libixion/model_iterator.cpp b/src/libixion/model_iterator.cpp
new file mode 100644
index 0000000..fb54b70
--- /dev/null
+++ b/src/libixion/model_iterator.cpp
@@ -0,0 +1,408 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include "ixion/model_iterator.hpp"
+#include "ixion/global.hpp"
+#include "ixion/exceptions.hpp"
+#include "model_context_impl.hpp"
+
+#include <mdds/multi_type_vector/collection.hpp>
+#include <sstream>
+#include <ostream>
+
+namespace ixion {
+
+model_iterator::cell::cell() : row(0), col(0), type(celltype_t::empty), value(false) {}
+
+model_iterator::cell::cell(row_t _row, col_t _col) :
+ row(_row), col(_col), type(celltype_t::empty), value(false) {}
+
+model_iterator::cell::cell(row_t _row, col_t _col, bool _b) :
+ row(_row), col(_col), type(celltype_t::boolean), value(_b) {}
+
+model_iterator::cell::cell(row_t _row, col_t _col, string_id_t _s) :
+ row(_row), col(_col), type(celltype_t::string), value(_s) {}
+
+model_iterator::cell::cell(row_t _row, col_t _col, double _v) :
+ row(_row), col(_col), type(celltype_t::numeric), value(_v) {}
+
+model_iterator::cell::cell(row_t _row, col_t _col, const formula_cell* _f) :
+ row(_row), col(_col), type(celltype_t::formula), value(_f) {}
+
+bool model_iterator::cell::operator== (const cell& other) const
+{
+ if (type != other.type || row != other.row || col != other.col)
+ return false;
+
+ return value == other.value;
+}
+
+bool model_iterator::cell::operator!= (const cell& other) const
+{
+ return !operator==(other);
+}
+
+class model_iterator::impl
+{
+public:
+ virtual bool has() const = 0;
+ virtual void next() = 0;
+ virtual const model_iterator::cell& get() const = 0;
+ virtual ~impl() {}
+};
+
+namespace {
+
+class iterator_core_empty : public model_iterator::impl
+{
+ model_iterator::cell m_cell;
+public:
+ bool has() const override { return false; }
+
+ void next() override {}
+
+ const model_iterator::cell& get() const override
+ {
+ return m_cell;
+ }
+};
+
+
+class iterator_core_horizontal : public model_iterator::impl
+{
+ using collection_type = mdds::mtv::collection<column_store_t>;
+
+ collection_type m_collection;
+ mutable model_iterator::cell m_current_cell;
+ mutable bool m_update_current_cell;
+ collection_type::const_iterator m_current_pos;
+ collection_type::const_iterator m_end;
+
+ void update_current() const
+ {
+ m_current_cell.col = m_current_pos->index;
+ m_current_cell.row = m_current_pos->position;
+
+ switch (m_current_pos->type)
+ {
+ case element_type_boolean:
+ m_current_cell.type = celltype_t::boolean;
+ m_current_cell.value = m_current_pos->get<boolean_element_block>();
+ break;
+ case element_type_numeric:
+ m_current_cell.type = celltype_t::numeric;
+ m_current_cell.value = m_current_pos->get<numeric_element_block>();
+ break;
+ case element_type_string:
+ m_current_cell.type = celltype_t::string;
+ m_current_cell.value = m_current_pos->get<string_element_block>();
+ break;
+ case element_type_formula:
+ m_current_cell.type = celltype_t::formula;
+ m_current_cell.value = m_current_pos->get<formula_element_block>();
+ break;
+ case element_type_empty:
+ m_current_cell.type = celltype_t::empty;
+ m_current_cell.value = false;
+ default:
+ ;
+ }
+
+ m_update_current_cell = false;
+ }
+public:
+ iterator_core_horizontal(const detail::model_context_impl& cxt, sheet_t sheet, const abs_rc_range_t& range) :
+ m_update_current_cell(true)
+ {
+ const column_stores_t* cols = cxt.get_columns(sheet);
+ if (cols && !cols->empty())
+ {
+ collection_type c = mdds::mtv::collection<column_store_t>(cols->begin(), cols->end());
+
+ if (range.valid())
+ {
+ if (!range.all_columns())
+ {
+ col_t c1 = range.first.column == column_unset ? 0 : range.first.column;
+ col_t c2 = range.last.column == column_unset ? (cols->size() - 1) : range.last.column;
+ assert(c1 >= 0);
+ assert(c1 <= c2);
+ size_t start = c1;
+ size_t size = c2 - c1 + 1;
+ c.set_collection_range(start, size);
+ }
+
+ if (!range.all_rows())
+ {
+ const column_store_t& col = (*cols)[0];
+ row_t r1 = range.first.row == row_unset ? 0 : range.first.row;
+ row_t r2 = range.last.row == row_unset ? (col.size() - 1) : range.last.row;
+ assert(r1 >= 0);
+ assert(r1 <= r2);
+ size_t start = r1;
+ size_t size = r2 - r1 + 1;
+ c.set_element_range(start, size);
+ }
+ }
+
+ m_collection.swap(c);
+ }
+
+ m_current_pos = m_collection.begin();
+ m_end = m_collection.end();
+ }
+
+ virtual bool has() const override
+ {
+ return m_current_pos != m_end;
+ }
+
+ virtual void next() override
+ {
+ ++m_current_pos;
+ m_update_current_cell = true;
+ }
+
+ virtual const model_iterator::cell& get() const override
+ {
+ if (m_update_current_cell)
+ update_current();
+ return m_current_cell;
+ }
+};
+
+class iterator_core_vertical : public model_iterator::impl
+{
+ const column_stores_t* m_cols;
+ mutable model_iterator::cell m_current_cell;
+ mutable bool m_update_current_cell;
+
+ column_stores_t::const_iterator m_it_cols;
+ column_stores_t::const_iterator m_it_cols_begin;
+ column_stores_t::const_iterator m_it_cols_end;
+
+ column_store_t::const_position_type m_current_pos;
+ column_store_t::const_position_type m_end_pos;
+
+ row_t m_row_first;
+ row_t m_row_last;
+
+ void update_current() const
+ {
+ column_store_t::const_iterator blk_pos = m_current_pos.first;
+
+ switch (blk_pos->type)
+ {
+ case element_type_empty:
+ m_current_cell.type = celltype_t::empty;
+ m_current_cell.value = false;
+ break;
+ case element_type_boolean:
+ m_current_cell.type = celltype_t::boolean;
+ m_current_cell.value = column_store_t::get<boolean_element_block>(m_current_pos);
+ break;
+ case element_type_numeric:
+ m_current_cell.type = celltype_t::numeric;
+ m_current_cell.value = column_store_t::get<numeric_element_block>(m_current_pos);
+ break;
+ case element_type_string:
+ m_current_cell.type = celltype_t::string;
+ m_current_cell.value = column_store_t::get<string_element_block>(m_current_pos);
+ break;
+ case element_type_formula:
+ m_current_cell.type = celltype_t::formula;
+ m_current_cell.value = column_store_t::get<formula_element_block>(m_current_pos);
+ break;
+ default:
+ throw std::logic_error("unhandled element type.");
+ }
+
+ m_current_cell.row = column_store_t::logical_position(m_current_pos);
+ m_current_cell.col = std::distance(m_it_cols_begin, m_it_cols);
+ m_update_current_cell = false;
+ }
+
+public:
+ iterator_core_vertical(const detail::model_context_impl& cxt, sheet_t sheet, const abs_rc_range_t& range) :
+ m_update_current_cell(true),
+ m_row_first(0),
+ m_row_last(row_unset)
+ {
+ m_cols = cxt.get_columns(sheet);
+ if (!m_cols)
+ return;
+
+ m_it_cols_begin = m_cols->begin();
+ m_it_cols = m_it_cols_begin;
+ m_it_cols_end = m_cols->end();
+ if (m_it_cols_begin == m_it_cols_end)
+ return;
+
+ m_row_last = (*m_cols)[0].size() - 1;
+
+ if (range.valid())
+ {
+ col_t last_col = m_cols->size() - 1;
+
+ if (range.last.column != column_unset && range.last.column < last_col)
+ {
+ // Shrink the tail end.
+ col_t diff = range.last.column - last_col;
+ assert(diff < 0);
+ std::advance(m_it_cols_end, diff);
+
+ last_col += diff;
+ }
+
+ if (range.first.column != column_unset)
+ {
+ if (range.first.column <= last_col)
+ std::advance(m_it_cols, range.first.column);
+ else
+ {
+ // First column is past the last column. Nothing to parse.
+ m_it_cols_begin = m_it_cols_end;
+ return;
+ }
+ }
+
+ if (range.last.row != row_unset && range.last.row < m_row_last)
+ {
+ // Shrink the tail end.
+ m_row_last = range.last.row;
+ }
+
+ if (range.first.row != row_unset)
+ {
+ if (range.first.row <= m_row_last)
+ m_row_first = range.first.row;
+ else
+ {
+ // First row is past the last row. Set it to an empty
+ // range and bail out.
+ m_it_cols_begin = m_it_cols_end;
+ return;
+ }
+ }
+ }
+
+ const column_store_t& col = *m_it_cols;
+ m_current_pos = col.position(m_row_first);
+ m_end_pos = col.position(m_row_last+1);
+ }
+
+ bool has() const override
+ {
+ if (!m_cols)
+ return false;
+
+ return m_it_cols != m_it_cols_end;
+ }
+
+ void next() override
+ {
+ m_update_current_cell = true;
+ m_current_pos = column_store_t::next_position(m_current_pos);
+
+ const column_store_t* col = &*m_it_cols;
+ if (m_current_pos != m_end_pos)
+ // It hasn't reached the end of the current column yet.
+ return;
+
+ ++m_it_cols; // Move to the next column.
+ if (m_it_cols == m_it_cols_end)
+ return;
+
+ // Reset the position to the first cell in the new column.
+ col = &*m_it_cols;
+ m_current_pos = col->position(m_row_first);
+ m_end_pos = col->position(m_row_last+1);
+ }
+
+ const model_iterator::cell& get() const override
+ {
+ if (m_update_current_cell)
+ update_current();
+ return m_current_cell;
+ }
+};
+
+} // anonymous namespace
+
+model_iterator::model_iterator() : mp_impl(std::make_unique<iterator_core_empty>()) {}
+model_iterator::model_iterator(const detail::model_context_impl& cxt, sheet_t sheet, const abs_rc_range_t& range, rc_direction_t dir)
+{
+ switch (dir)
+ {
+ case rc_direction_t::horizontal:
+ mp_impl = std::make_unique<iterator_core_horizontal>(cxt, sheet, range);
+ break;
+ case rc_direction_t::vertical:
+ mp_impl = std::make_unique<iterator_core_vertical>(cxt, sheet, range);
+ break;
+ }
+}
+
+model_iterator::model_iterator(model_iterator&& other) : mp_impl(std::move(other.mp_impl)) {}
+
+model_iterator::~model_iterator() {}
+
+model_iterator& model_iterator::operator= (model_iterator&& other)
+{
+ mp_impl = std::move(other.mp_impl);
+ other.mp_impl = std::make_unique<iterator_core_empty>();
+ return *this;
+}
+
+bool model_iterator::has() const
+{
+ return mp_impl->has();
+}
+
+void model_iterator::next()
+{
+ mp_impl->next();
+}
+
+const model_iterator::cell& model_iterator::get() const
+{
+ return mp_impl->get();
+}
+
+std::ostream& operator<< (std::ostream& os, const model_iterator::cell& c)
+{
+ os << "(row=" << c.row << "; col=" << c.col << "; type=" << short(c.type);
+
+ switch (c.type)
+ {
+ case celltype_t::boolean:
+ os << "; boolean=" << std::get<bool>(c.value);
+ break;
+ case celltype_t::formula:
+ os << "; formula=" << std::get<const formula_cell*>(c.value);
+ break;
+ case celltype_t::numeric:
+ os << "; numeric=" << std::get<double>(c.value);
+ break;
+ case celltype_t::string:
+ os << "; string=" << std::get<string_id_t>(c.value);
+ break;
+ case celltype_t::empty:
+ os << "; empty";
+ break;
+ case celltype_t::unknown:
+ default:
+ ;
+ }
+
+ os << ')';
+ return os;
+}
+
+} // namespace ixion
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/src/libixion/model_types.cpp b/src/libixion/model_types.cpp
new file mode 100644
index 0000000..ee46119
--- /dev/null
+++ b/src/libixion/model_types.cpp
@@ -0,0 +1,16 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include "model_types.hpp"
+
+namespace ixion { namespace detail {
+
+const std::string empty_string = "";
+
+}}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/src/libixion/model_types.hpp b/src/libixion/model_types.hpp
new file mode 100644
index 0000000..3884621
--- /dev/null
+++ b/src/libixion/model_types.hpp
@@ -0,0 +1,31 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef INCLUDED_IXION_MODEL_TYPES_HPP
+#define INCLUDED_IXION_MODEL_TYPES_HPP
+
+#include <string>
+#include <map>
+#include <memory>
+
+#include "ixion/formula_tokens.hpp"
+
+namespace ixion {
+
+class formula_cell;
+
+namespace detail {
+
+typedef std::map<std::string, named_expression_t> named_expressions_t;
+
+extern const std::string empty_string;
+
+}}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/src/libixion/module.cpp b/src/libixion/module.cpp
new file mode 100644
index 0000000..b6a4dff
--- /dev/null
+++ b/src/libixion/module.cpp
@@ -0,0 +1,111 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include "ixion/module.hpp"
+#include "ixion/info.hpp"
+#include "ixion/compute_engine.hpp"
+#include <sstream>
+#include <vector>
+#include <boost/filesystem.hpp>
+
+#ifdef _WIN32
+#include <windows.h>
+#else
+#include <dlfcn.h>
+#endif
+
+namespace fs = boost::filesystem;
+
+namespace ixion { namespace draft {
+
+namespace {
+
+const char* mod_names[] = { "vulkan" };
+
+std::string get_module_prefix()
+{
+ std::ostringstream os;
+ os << "ixion-" << get_api_version_major() << "." << get_api_version_minor() << "-";
+ return os.str();
+}
+
+typedef module_def* (*fp_register_module_type)(void);
+
+void register_module(void* mod_handler, std::string_view mod_name, fp_register_module_type fp_register_module)
+{
+ if (!fp_register_module)
+ return;
+
+ module_def* md = fp_register_module();
+ compute_engine::add_class(
+ mod_handler, mod_name, md->create_compute_engine, md->destroy_compute_engine);
+}
+
+} // anonymous namespace
+
+#ifdef _WIN32
+
+void init_modules()
+{
+ std::string mod_prefix = get_module_prefix();
+
+ for (const char* mod_name : mod_names)
+ {
+ std::ostringstream os;
+ os << mod_prefix << mod_name << ".dll";
+
+ std::string modfile_name = os.str();
+
+ HMODULE hdl = LoadLibrary(modfile_name.c_str());
+ if (!hdl)
+ continue;
+
+ fp_register_module_type fp_register_module;
+ *(void**)(&fp_register_module) =
+ reinterpret_cast<void **>(GetProcAddress(hdl, "register_module"));
+
+ register_module(hdl, mod_name, fp_register_module);
+ }
+}
+
+void unload_module(void* handler)
+{
+ FreeLibrary((HMODULE)handler);
+}
+
+#else
+
+void init_modules()
+{
+ std::string mod_prefix = get_module_prefix();
+
+ for (const char* mod_name : mod_names)
+ {
+ std::ostringstream os;
+ os << mod_prefix << mod_name << ".so";
+
+ void* hdl = dlopen(os.str().data(), RTLD_NOW | RTLD_GLOBAL);
+ if (!hdl)
+ continue;
+
+ fp_register_module_type fp_register_module;
+ *(void**)(&fp_register_module) = dlsym(hdl, "register_module");
+
+ register_module(hdl, mod_name, fp_register_module);
+ }
+}
+
+void unload_module(void* handler)
+{
+ dlclose(handler);
+}
+
+#endif
+
+}}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/src/libixion/name_resolver_test.cpp b/src/libixion/name_resolver_test.cpp
new file mode 100644
index 0000000..82cea0f
--- /dev/null
+++ b/src/libixion/name_resolver_test.cpp
@@ -0,0 +1,1131 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include "test_global.hpp" // This must be the first header to be included.
+
+#include <ixion/model_context.hpp>
+#include <ixion/formula_name_resolver.hpp>
+#include <ixion/address.hpp>
+#include <ixion/table.hpp>
+
+#include <string>
+
+using namespace ixion;
+
+namespace {
+
+struct ref_name_entry
+{
+ const char* name;
+ bool sheet_name;
+};
+
+void test_calc_a1()
+{
+ IXION_TEST_FUNC_SCOPE;
+
+ model_context cxt;
+ cxt.append_sheet("One");
+ cxt.append_sheet("Two");
+ cxt.append_sheet("Three");
+ cxt.append_sheet("A B C"); // name with space
+ auto resolver = formula_name_resolver::get(formula_name_resolver_t::calc_a1, &cxt);
+ assert(resolver);
+
+ {
+ // Parse single cell addresses.
+ ref_name_entry names[] =
+ {
+ { "A1", false },
+ { "$A1", false },
+ { "A$1", false },
+ { "$A$1", false },
+ { "Z1", false },
+ { "AA23", false },
+ { "AB23", false },
+ { "$AB23", false },
+ { "AB$23", false },
+ { "$AB$23", false },
+ { "BA1", false },
+ { "AAA2", false },
+ { "ABA1", false },
+ { "BAA1", false },
+ { "XFD1048576", false },
+ { "One.A1", true },
+ { "One.XFD1048576", true },
+ { "Two.B10", true },
+ { "Two.$B10", true },
+ { "Two.B$10", true },
+ { "Two.$B$10", true },
+ { "Three.CFD234", true },
+ { "$Three.CFD234", true },
+ { "'A B C'.Z12", true },
+ { "$'A B C'.Z12", true },
+ { 0, false }
+ };
+
+ for (size_t i = 0; names[i].name; ++i)
+ {
+ const char* p = names[i].name;
+ std::string name_a1(p);
+ std::cout << "single cell address: " << name_a1 << std::endl;
+ formula_name_t res = resolver->resolve(name_a1, abs_address_t());
+ if (res.type != formula_name_t::cell_reference)
+ {
+ std::cerr << "failed to resolve cell address: " << name_a1 << std::endl;
+ assert(false);
+ }
+
+ address_t addr = std::get<address_t>(res.value);
+ std::string test_name = resolver->get_name(addr, abs_address_t(), names[i].sheet_name);
+
+ if (name_a1 != test_name)
+ {
+ std::cerr << "failed to compile name from address: (name expected: " << name_a1 << "; actual name created: " << test_name << ")" << std::endl;
+ assert(false);
+ }
+ }
+ }
+
+ {
+ // Parse range addresses.
+
+ ref_name_entry names[] =
+ {
+ { "A1:B2", false },
+ { "$D10:G$24", false },
+ { "One.C$1:Z$400", true },
+ { "Two.$C1:$Z400", true },
+ { "Three.$C1:Z$400", true },
+ { "$Three.$C1:Z$400", true },
+ { "'A B C'.$C4:$Z256", true },
+ { "$'A B C'.$C4:$Z256", true },
+ { "One.C4:Three.Z100", true },
+ { "One.C4:$Three.Z100", true },
+ { "$One.C4:Three.Z100", true },
+ { "$One.C4:$Three.Z100", true },
+ { 0, false },
+ };
+
+ for (sheet_t sheet = 0; sheet <= 3; ++sheet)
+ {
+ for (size_t i = 0; names[i].name; ++i)
+ {
+ abs_address_t pos{sheet, 0, 0};
+ std::string name_a1(names[i].name);
+ std::cout << "range address: " << name_a1 << std::endl;
+ formula_name_t res = resolver->resolve(name_a1, pos);
+ if (res.type != formula_name_t::range_reference)
+ {
+ std::cerr << "failed to resolve range address: " << name_a1 << std::endl;
+ assert(false);
+ }
+
+ std::string test_name = resolver->get_name(
+ std::get<range_t>(res.value), pos, names[i].sheet_name);
+
+ if (name_a1 != test_name)
+ {
+ std::cerr << "failed to compile name from range: (pos: " << pos << "; name expected: " << name_a1 << "; actual name created: " << test_name << ")" << std::endl;
+ assert(false);
+ }
+ }
+ }
+ }
+
+ struct {
+ const char* name; sheet_t sheet1; row_t row1; col_t col1; sheet_t sheet2; row_t row2; col_t col2;
+ } range_tests[] = {
+ { "A1:B2", 0, 0, 0, 0, 1, 1 },
+ { "D10:G24", 0, 9, 3, 0, 23, 6 },
+ { "One.C1:Z400", 0, 0, 2, 0, 399, 25 },
+ { "Two.C1:Z400", 1, 0, 2, 1, 399, 25 },
+ { "Three.C1:Z400", 2, 0, 2, 2, 399, 25 },
+ { 0, 0, 0, 0, 0, 0, 0 }
+ };
+
+ for (size_t i = 0; range_tests[i].name; ++i)
+ {
+ std::string name_a1(range_tests[i].name);
+ std::cout << "range address: " << name_a1 << std::endl;
+ formula_name_t res = resolver->resolve(name_a1, abs_address_t());
+ auto range = std::get<range_t>(res.value);
+ assert(res.type == formula_name_t::range_reference);
+ assert(range.first.sheet == range_tests[i].sheet1);
+ assert(range.first.row == range_tests[i].row1);
+ assert(range.first.column == range_tests[i].col1);
+ assert(range.last.sheet == range_tests[i].sheet2);
+ assert(range.last.row == range_tests[i].row2);
+ assert(range.last.column == range_tests[i].col2);
+ }
+
+ {
+ formula_name_t res = resolver->resolve("B1", abs_address_t(0,1,1));
+ auto addr = std::get<address_t>(res.value);
+ assert(res.type == formula_name_t::cell_reference);
+ assert(addr.sheet == 0);
+ assert(addr.row == -1);
+ assert(addr.column == 0);
+ }
+
+ {
+ formula_name_t res = resolver->resolve("B2:B4", abs_address_t(0,0,3));
+ auto range = std::get<range_t>(res.value);
+ assert(res.type == formula_name_t::range_reference);
+ assert(range.first.sheet == 0);
+ assert(range.first.row == 1);
+ assert(range.first.column == -2);
+ assert(range.last.sheet == 0);
+ assert(range.last.row == 3);
+ assert(range.last.column == -2);
+ }
+
+ {
+ formula_name_t res = resolver->resolve("Three.B2", abs_address_t(2,0,0));
+ auto addr = std::get<address_t>(res.value);
+ assert(res.type == formula_name_t::cell_reference);
+ assert(!addr.abs_sheet);
+ assert(!addr.abs_row);
+ assert(!addr.abs_column);
+ assert(addr.sheet == 0);
+ assert(addr.row == 1);
+ assert(addr.column == 1);
+ }
+
+ {
+ abs_address_t pos(2, 0, 0);
+ std::string name("One.B2:Three.C4");
+ formula_name_t res = resolver->resolve(name, pos);
+ auto range = std::get<range_t>(res.value);
+ assert(res.type == formula_name_t::range_reference);
+ assert(!range.first.abs_sheet);
+ assert(!range.first.abs_row);
+ assert(!range.first.abs_column);
+ assert(range.first.sheet == -2);
+ assert(range.first.row == 1);
+ assert(range.first.column == 1);
+ assert(!range.last.abs_sheet);
+ assert(!range.last.abs_row);
+ assert(!range.last.abs_column);
+ assert(range.last.sheet == 0);
+ assert(range.last.row == 3);
+ assert(range.last.column == 2);
+
+ std::string s = resolver->get_name(range, pos, true);
+ assert(s == name);
+ }
+}
+
+void test_excel_a1()
+{
+ IXION_TEST_FUNC_SCOPE;
+
+ model_context cxt;
+ cxt.append_sheet("One");
+ cxt.append_sheet("Two");
+ cxt.append_sheet("Three");
+ cxt.append_sheet("A B C"); // name with space
+ cxt.append_sheet("A'B"); // name with quote
+ cxt.append_sheet("C'''D"); // name with multiple consecutive quotes
+ cxt.append_sheet("\"Quoted\""); // name with double quotes
+ auto resolver = formula_name_resolver::get(formula_name_resolver_t::excel_a1, &cxt);
+ assert(resolver);
+
+ {
+ // Parse single cell addresses.
+ ref_name_entry names[] =
+ {
+ { "A1", false },
+ { "$A1", false },
+ { "A$1", false },
+ { "$A$1", false },
+ { "Z1", false },
+ { "AA23", false },
+ { "AB23", false },
+ { "$AB23", false },
+ { "AB$23", false },
+ { "$AB$23", false },
+ { "BA1", false },
+ { "AAA2", false },
+ { "ABA1", false },
+ { "BAA1", false },
+ { "XFD1048576", false },
+ { "One!A1", true },
+ { "One!XFD1048576", true },
+ { "Two!B10", true },
+ { "Two!$B10", true },
+ { "Two!B$10", true },
+ { "Two!$B$10", true },
+ { "Three!CFD234", true },
+ { "'A B C'!Z12", true },
+ { "'A''B'!Z12", true },
+ { "'C''''''D'!BB23", true },
+ { "'\"Quoted\"'!A2", true },
+ { 0, false }
+ };
+
+ for (size_t i = 0; names[i].name; ++i)
+ {
+ const char* p = names[i].name;
+ std::string name_a1(p);
+ formula_name_t res = resolver->resolve(name_a1, abs_address_t());
+ if (res.type != formula_name_t::cell_reference)
+ {
+ std::cerr << "failed to resolve cell address: " << name_a1 << std::endl;
+ assert(false);
+ }
+
+ address_t addr = std::get<address_t>(res.value);
+ std::string test_name = resolver->get_name(addr, abs_address_t(), names[i].sheet_name);
+
+ if (name_a1 != test_name)
+ {
+ std::cerr << "failed to compile name from address: (name expected: " << name_a1 << "; actual name created: " << test_name << ")" << std::endl;
+ assert(false);
+ }
+ }
+ }
+
+ {
+ // Parse range addresses.
+
+ ref_name_entry names[] =
+ {
+ { "A1:B2", false },
+ { "$D10:G$24", false },
+ { "One!C$1:Z$400", true },
+ { "Two!$C1:$Z400", true },
+ { "Three!$C1:Z$400", true },
+ { "'A B C'!$C4:$Z256", true },
+ { 0, false },
+ };
+
+ for (size_t i = 0; names[i].name; ++i)
+ {
+ const char* p = names[i].name;
+ std::string name_a1(p);
+ std::cout << "range address: " << name_a1 << std::endl;
+ formula_name_t res = resolver->resolve(name_a1, abs_address_t());
+ if (res.type != formula_name_t::range_reference)
+ {
+ std::cerr << "failed to resolve range address: " << name_a1 << std::endl;
+ assert(false);
+ }
+
+ range_t range = std::get<range_t>(res.value);
+ std::string test_name = resolver->get_name(range, abs_address_t(), names[i].sheet_name);
+
+ if (name_a1 != test_name)
+ {
+ std::cerr << "failed to compile name from range: (name expected: " << name_a1 << "; actual name created: " << test_name << ")" << std::endl;
+ assert(false);
+ }
+ }
+ }
+
+ // Parse range addresses.
+ struct {
+ const char* name; sheet_t sheet1; row_t row1; col_t col1; sheet_t sheet2; row_t row2; col_t col2;
+ } range_tests[] = {
+ { "A1:B2", 0, 0, 0, 0, 1, 1 },
+ { "D10:G24", 0, 9, 3, 0, 23, 6 },
+ { "One!C1:Z400", 0, 0, 2, 0, 399, 25 },
+ { "Two!C1:Z400", 1, 0, 2, 1, 399, 25 },
+ { "Three!C1:Z400", 2, 0, 2, 2, 399, 25 },
+ { 0, 0, 0, 0, 0, 0, 0 }
+ };
+
+ for (size_t i = 0; range_tests[i].name; ++i)
+ {
+ std::string name_a1(range_tests[i].name);
+ formula_name_t res = resolver->resolve(name_a1, abs_address_t());
+ auto range = std::get<range_t>(res.value);
+ assert(res.type == formula_name_t::range_reference);
+ assert(range.first.sheet == range_tests[i].sheet1);
+ assert(range.first.row == range_tests[i].row1);
+ assert(range.first.column == range_tests[i].col1);
+ assert(range.last.sheet == range_tests[i].sheet2);
+ assert(range.last.row == range_tests[i].row2);
+ assert(range.last.column == range_tests[i].col2);
+ }
+
+ {
+ formula_name_t res = resolver->resolve("B1", abs_address_t(0,1,1));
+ auto addr = std::get<address_t>(res.value);
+ assert(res.type == formula_name_t::cell_reference);
+ assert(addr.sheet == 0);
+ assert(addr.row == -1);
+ assert(addr.column == 0);
+ }
+
+ {
+ formula_name_t res = resolver->resolve("B2:B4", abs_address_t(0,0,3));
+ auto range = std::get<range_t>(res.value);
+ assert(res.type == formula_name_t::range_reference);
+ assert(range.first.sheet == 0);
+ assert(range.first.row == 1);
+ assert(range.first.column == -2);
+ assert(range.last.sheet == 0);
+ assert(range.last.row == 3);
+ assert(range.last.column == -2);
+ }
+
+ // Parse name without row index.
+ struct {
+ const char* name; formula_name_t::name_type type;
+ } name_tests[] = {
+ { "H:H", formula_name_t::range_reference },
+ { "ABC", formula_name_t::named_expression },
+ { "H", formula_name_t::named_expression },
+ { "MAX", formula_name_t::function },
+ { 0, formula_name_t::invalid }
+ };
+
+ for (size_t i = 0; name_tests[i].name; ++i)
+ {
+ std::string name_a1(name_tests[i].name);
+ formula_name_t res = resolver->resolve(name_a1, abs_address_t());
+ assert(res.type == name_tests[i].type);
+ }
+
+ std::string_view invalid_names[] = {
+ "NotExists!A1", // non-existing sheet name
+ "A B C!B2", // sheet name with space not being quoted
+ "A''B!D10", // sheet name with quote must be quoted
+ "\"Quoted\"!E12", // sheet name with double quotes must be quoted
+ };
+
+ for (const auto& name: invalid_names)
+ {
+ std::cout << "invalid name: " << name << std::endl;
+ formula_name_t res = resolver->resolve(name, abs_address_t());
+ std::cout << "parsed name: " << res.to_string() << std::endl;
+ assert(res.type == formula_name_t::invalid);
+ }
+}
+
+void test_excel_a1_multisheet()
+{
+ IXION_TEST_FUNC_SCOPE;
+
+ model_context cxt;
+ cxt.append_sheet("One");
+ cxt.append_sheet("Two");
+ cxt.append_sheet("Three");
+ cxt.append_sheet("A B C"); // name with space
+ cxt.append_sheet("A'B"); // name with quote
+ cxt.append_sheet("C'D''E"); // name with two quotes
+ cxt.append_sheet("\"Quoted\""); // name with double quotes
+
+ auto resolver = formula_name_resolver::get(formula_name_resolver_t::excel_a1, &cxt);
+ assert(resolver);
+
+ struct check_type
+ {
+ std::string_view name;
+ address_t address1;
+ address_t address2;
+ };
+
+ // NB: sheet positions are always absolute in Excel.
+ const check_type checks[] = {
+ { "One:Two!C4", {0, 3, 2, true, false, false}, {1, 3, 2, true, false, false} },
+ { "One:Three!A1:B2", {0, 0, 0, true, false, false}, {2, 1, 1, true, false, false} },
+ { "'Two:A''B'!$F$10", {1, 9, 5, true, true, true}, {4, 9, 5, true, true, true} },
+ { "'A''B:C''D''''E'!B$2:D$10", {4, 1, 1, true, true, false}, {5, 9, 3, true, true, false} },
+ { "'Three:\"Quoted\"'!B10", {2, 9, 1, true, false, false}, {6, 9, 1, true, false, false} },
+ };
+
+ for (const auto& c : checks)
+ {
+ std::cout << "name: " << c.name << std::endl;
+ formula_name_t res = resolver->resolve(c.name, abs_address_t());
+ assert(res.type == formula_name_t::name_type::range_reference);
+
+ auto v = std::get<range_t>(res.value);
+ assert(v.first == c.address1);
+ assert(v.last == c.address2);
+ }
+}
+
+void test_named_expression()
+{
+ IXION_TEST_FUNC_SCOPE;
+
+ model_context cxt;
+ cxt.append_sheet("Sheet");
+
+ const std::vector<formula_name_resolver_t> resolver_types = {
+ formula_name_resolver_t::excel_a1,
+ formula_name_resolver_t::excel_r1c1,
+ // TODO : add more resolver types.
+ };
+
+ const std::vector<std::string> names = {
+ "MyRange",
+ "MyRange2",
+ };
+
+ for (formula_name_resolver_t rt : resolver_types)
+ {
+ std::cout << "formula resolver type: " << int(rt) << std::endl; // TODO : map the enum value to std::string name.
+
+ auto resolver = formula_name_resolver::get(rt, &cxt);
+ assert(resolver);
+
+ for (const std::string& name : names)
+ {
+ std::cout << "parsing '" << name << "'..." << std::endl;
+ formula_name_t res = resolver->resolve(name, abs_address_t(0,0,0));
+ assert(res.type == formula_name_t::name_type::named_expression);
+ }
+ }
+}
+
+void test_table_excel_a1()
+{
+ IXION_TEST_FUNC_SCOPE;
+
+ model_context cxt;
+ cxt.append_sheet("Sheet");
+ string_id_t s_table1 = cxt.append_string("Table1");
+ string_id_t s_table2 = cxt.append_string("Table2");
+ string_id_t s_cat = cxt.append_string("Category");
+ string_id_t s_val = cxt.append_string("Value");
+
+ // Make sure these work correctly before proceeding further with the test.
+ assert(s_table1 == cxt.get_identifier_from_string("Table1"));
+ assert(s_table2 == cxt.get_identifier_from_string("Table2"));
+ assert(s_cat == cxt.get_identifier_from_string("Category"));
+ assert(s_val == cxt.get_identifier_from_string("Value"));
+
+ auto resolver = formula_name_resolver::get(formula_name_resolver_t::excel_a1, &cxt);
+ assert(resolver);
+
+ struct {
+ std::string_view exp;
+ sheet_t sheet;
+ row_t row;
+ col_t col;
+ string_id_t table_name;
+ string_id_t column_first;
+ string_id_t column_last;
+ table_areas_t areas;
+ } tests[] = {
+ { "[Value]", 0, 9, 2, empty_string_id, s_val, empty_string_id, table_area_data },
+ { "Table1[Category]", 0, 9, 2, s_table1, s_cat, empty_string_id, table_area_data },
+ { "Table1[Value]", 0, 9, 2, s_table1, s_val, empty_string_id, table_area_data },
+ { "Table1[[#Headers],[Value]]", 0, 9, 2, s_table1, s_val, empty_string_id, table_area_headers },
+ { "Table1[[#Headers],[#Data],[Value]]", 0, 9, 2, s_table1, s_val, empty_string_id, table_area_headers | table_area_data },
+ { "Table1[[#All],[Category]]", 0, 9, 2, s_table1, s_cat, empty_string_id, table_area_all },
+ { "Table1[[#Totals],[Category]]", 0, 9, 2, s_table1, s_cat, empty_string_id, table_area_totals },
+ { "Table1[[#Data],[#Totals],[Value]]", 0, 9, 2, s_table1, s_val, empty_string_id, table_area_data | table_area_totals },
+ { "Table1[#All]", 0, 9, 2, s_table1, empty_string_id, empty_string_id, table_area_all },
+ { "Table1[#Headers]", 0, 9, 2, s_table1, empty_string_id, empty_string_id, table_area_headers },
+ { "Table1[#Data]", 0, 9, 2, s_table1, empty_string_id, empty_string_id, table_area_data },
+ { "Table1[#Totals]", 0, 9, 2, s_table1, empty_string_id, empty_string_id, table_area_totals },
+ { "Table1[[#Headers],[#Data]]", 0, 9, 2, s_table1, empty_string_id, empty_string_id, table_area_headers | table_area_data },
+ { "Table1[[#Totals],[Category]:[Value]]", 0, 9, 2, s_table1, s_cat, s_val, table_area_totals },
+ { "Table1[[#Data],[#Totals],[Category]:[Value]]", 0, 9, 2, s_table1, s_cat, s_val, table_area_data | table_area_totals },
+ };
+
+ for (size_t i = 0, n = std::size(tests); i < n; ++i)
+ {
+ std::cout << "* table reference: " << tests[i].exp << std::endl;
+ abs_address_t pos(tests[i].sheet, tests[i].row, tests[i].col);
+ formula_name_t res = resolver->resolve(tests[i].exp, pos);
+ if (res.type != formula_name_t::table_reference)
+ assert(!"table reference expected.");
+
+ auto table = std::get<formula_name_t::table_type>(res.value);
+ string_id_t table_name = cxt.get_identifier_from_string(table.name);
+ string_id_t column_first = cxt.get_identifier_from_string(table.column_first);
+ string_id_t column_last = cxt.get_identifier_from_string(table.column_last);
+ assert(table_name == tests[i].table_name);
+ assert(column_first == tests[i].column_first);
+ assert(column_last == tests[i].column_last);
+ assert(table.areas == tests[i].areas);
+
+ // Make sure we get the same name back.
+ table_t tb;
+ tb.name = table_name;
+ tb.column_first = column_first;
+ tb.column_last = column_last;
+ tb.areas = table.areas;
+ std::string original(tests[i].exp);
+ std::string returned = resolver->get_name(tb);
+ std::cout << " original: " << original << std::endl;
+ std::cout << " returned: " << returned << std::endl;
+ assert(original == returned);
+ }
+}
+
+void test_excel_r1c1()
+{
+ IXION_TEST_FUNC_SCOPE;
+
+ model_context cxt;
+ cxt.append_sheet("One");
+ cxt.append_sheet("Two");
+ cxt.append_sheet("A B C"); // name with space
+ cxt.append_sheet("80's Music");
+
+ auto resolver = formula_name_resolver::get(formula_name_resolver_t::excel_r1c1, &cxt);
+ assert(resolver);
+
+ // Parse single cell addresses for round-tripping.
+ ref_name_entry single_ref_names[] =
+ {
+ { "R2", false },
+ { "R[3]", false },
+ { "R[-10]", false },
+ { "C2", false },
+ { "C[3]", false },
+ { "C[-10]", false },
+ { "R1C1", false },
+ { "R[1]C2", false },
+ { "R2C[-2]", false },
+ { "R1C", false },
+ { "R[-3]C", false },
+ { "RC2", false },
+ { "One!R10C", true },
+ { "Two!C[-2]", true },
+ { "'A B C'!R100", true },
+ { 0, false }
+ };
+
+ for (size_t i = 0; single_ref_names[i].name; ++i)
+ {
+ const char* p = single_ref_names[i].name;
+ std::string name_r1c1(p);
+ std::cout << "Parsing " << name_r1c1 << std::endl;
+ formula_name_t res = resolver->resolve(name_r1c1, abs_address_t());
+ if (res.type != formula_name_t::cell_reference)
+ {
+ std::cerr << "failed to resolve cell address: " << name_r1c1 << std::endl;
+ assert(false);
+ }
+
+ address_t addr = std::get<address_t>(res.value);
+ std::string test_name = resolver->get_name(addr, abs_address_t(), single_ref_names[i].sheet_name);
+
+ if (name_r1c1 != test_name)
+ {
+ std::cerr << "failed to compile name from address: (name expected: "
+ << name_r1c1 << "; actual name created: " << test_name << ")" << std::endl;
+ assert(false);
+ }
+ }
+
+ // These are supposed to be all invalid or named expression.
+ const char* invalid_address[] = {
+ "F",
+ "RR",
+ "RC",
+ "R",
+ "C",
+ "R0C1",
+ "R[-2]C-1",
+ "R1C2:",
+ "R:",
+ "R2:",
+ "R[-3]:",
+ "C:",
+ "C3:",
+ "C[-4]:",
+ 0
+ };
+
+ for (size_t i = 0; invalid_address[i]; ++i)
+ {
+ const char* p = invalid_address[i];
+ std::string name_r1c1(p);
+ formula_name_t res = resolver->resolve(name_r1c1, abs_address_t());
+ if (res.type != formula_name_t::invalid && res.type != formula_name_t::named_expression)
+ {
+ std::cerr << "address " << name_r1c1 << " is expected to be invalid." << std::endl;
+ assert(false);
+ }
+ }
+
+ // These are supposed to be all valid.
+ const char* valid_address[] = {
+ "r1c2",
+ "r[-2]",
+ "c10",
+ 0
+ };
+
+ for (size_t i = 0; valid_address[i]; ++i)
+ {
+ const char* p = valid_address[i];
+ std::string name_r1c1(p);
+ formula_name_t res = resolver->resolve(name_r1c1, abs_address_t());
+ if (res.type != formula_name_t::cell_reference)
+ {
+ std::cerr << "address " << name_r1c1 << " is expected to be valid." << std::endl;
+ assert(false);
+ }
+ }
+
+ // Parse range addresses.
+ struct {
+ const char* name;
+ sheet_t sheet1;
+ row_t row1;
+ col_t col1;
+ sheet_t sheet2;
+ row_t row2;
+ col_t col2;
+ bool abs_sheet1;
+ bool abs_row1;
+ bool abs_col1;
+ bool abs_sheet2;
+ bool abs_row2;
+ bool abs_col2;
+ } range_tests[] = {
+ { "R1C1:R2C2", 0, 0, 0, 0, 1, 1, true, true, true, true, true, true },
+ { "R[-3]C[2]:R[1]C[4]", 0, -3, 2, 0, 1, 4, true, false, false, true, false, false },
+ { "R2:R4", 0, 1, column_unset, 0, 3, column_unset, true, true, false, true, true, false },
+ { "R[2]:R[4]", 0, 2, column_unset, 0, 4, column_unset, true, false, false, true, false, false },
+ { "C3:C6", 0, row_unset, 2, 0, row_unset, 5, true, false, true, true, false, true },
+ { "C[3]:C[6]", 0, row_unset, 3, 0, row_unset, 6, true, false, false, true, false, false },
+ { "Two!R2C2:R2C[100]", 1, 1, 1, 1, 1, 100, true, true, true, true, true, false },
+ { "'A B C'!R[2]:R[4]", 2, 2, column_unset, 2, 4, column_unset, true, false, false, true, false, false },
+ { 0, 0, 0, 0, 0, 0, 0, false, false, false, false, false, false }
+ };
+
+ for (size_t i = 0; range_tests[i].name; ++i)
+ {
+ std::string name_r1c1(range_tests[i].name);
+ std::cout << "Parsing " << name_r1c1 << std::endl;
+ formula_name_t res = resolver->resolve(name_r1c1, abs_address_t());
+ auto range = std::get<range_t>(res.value);
+
+ assert(res.type == formula_name_t::range_reference);
+ assert(range.first.sheet == range_tests[i].sheet1);
+ assert(range.first.row == range_tests[i].row1);
+ assert(range.first.column == range_tests[i].col1);
+ assert(range.first.abs_sheet == range_tests[i].abs_sheet1);
+ if (range.first.row != row_unset)
+ // When row is unset, whether it's relative or absolute is not relevant.
+ assert(range.first.abs_row == range_tests[i].abs_row1);
+ if (range.first.column != column_unset)
+ // Same with unset column.
+ assert(range.first.abs_column == range_tests[i].abs_col1);
+
+ assert(range.last.sheet == range_tests[i].sheet2);
+ assert(range.last.row == range_tests[i].row2);
+ assert(range.last.column == range_tests[i].col2);
+ assert(range.last.abs_sheet == range_tests[i].abs_sheet2);
+ if (range.last.row != row_unset)
+ assert(range.last.abs_row == range_tests[i].abs_row2);
+ if (range.last.column != column_unset)
+ assert(range.last.abs_column == range_tests[i].abs_col2);
+ }
+
+ ref_name_entry range_ref_names[] =
+ {
+ { "R2C2:R3C3", false },
+ { "R[-3]C2:R[-1]C3", false },
+ { "R[-5]C:R[-1]C", false },
+ { "'A B C'!R2:R4", true },
+ { "'80''s Music'!C[2]:C[4]", true },
+ { 0, false },
+ };
+
+ for (size_t i = 0; range_ref_names[i].name; ++i)
+ {
+ const char* p = range_ref_names[i].name;
+ std::string name_r1c1(p);
+ std::cout << "Parsing " << name_r1c1 << std::endl;
+ formula_name_t res = resolver->resolve(name_r1c1, abs_address_t());
+ if (res.type != formula_name_t::range_reference)
+ {
+ std::cerr << "failed to resolve range address: " << name_r1c1 << std::endl;
+ assert(false);
+ }
+
+ auto range = std::get<range_t>(res.value);
+ std::string test_name = resolver->get_name(range, abs_address_t(), range_ref_names[i].sheet_name);
+
+ if (name_r1c1 != test_name)
+ {
+ std::cerr << "failed to compile name from range: (name expected: " << name_r1c1 << "; actual name created: " << test_name << ")" << std::endl;
+ assert(false);
+ }
+ }
+
+ struct {
+ col_t col;
+ std::string name;
+ } colnames[] = {
+ { 0, "1" },
+ { 1, "2" },
+ { 10, "11" },
+ { 123, "124" },
+ };
+
+ for (size_t i = 0, n = std::size(colnames); i < n; ++i)
+ {
+ std::string colname = resolver->get_column_name(colnames[i].col);
+ if (colname != colnames[i].name)
+ {
+ std::cerr << "column name: expected='" << colnames[i].name << "', actual='" << colname << "'" << std::endl;
+ assert(false);
+ }
+ }
+}
+
+void test_excel_r1c1_multisheet()
+{
+ IXION_TEST_FUNC_SCOPE;
+
+ model_context cxt;
+ cxt.append_sheet("One");
+ cxt.append_sheet("Two");
+ cxt.append_sheet("Three");
+ cxt.append_sheet("A B C"); // name with space
+ cxt.append_sheet("A'B"); // name with quote
+ cxt.append_sheet("C'D''E"); // name with two quotes
+ cxt.append_sheet("\"Quoted\""); // name with double quotes
+
+ auto resolver = formula_name_resolver::get(formula_name_resolver_t::excel_r1c1, &cxt);
+ assert(resolver);
+
+ struct check_type
+ {
+ std::string_view name;
+ address_t address1;
+ address_t address2;
+ };
+
+ // NB: sheet positions are always absolute in Excel.
+ const check_type checks[] = {
+ { "One:Two!R[3]C[2]", {0, 3, 2, true, false, false}, {1, 3, 2, true, false, false} },
+ { "One:Three!RC:R[1]C[1]", {0, 0, 0, true, false, false}, {2, 1, 1, true, false, false} },
+ { "'Two:A''B'!R10C6", {1, 9, 5, true, true, true}, {4, 9, 5, true, true, true} },
+ { "'A''B:C''D''''E'!R2C[1]:R10C[3]", {4, 1, 1, true, true, false}, {5, 9, 3, true, true, false} },
+ { "'Three:\"Quoted\"'!R[9]C[1]", {2, 9, 1, true, false, false}, {6, 9, 1, true, false, false} },
+ };
+
+ for (const auto& c : checks)
+ {
+ std::cout << "name: " << c.name << std::endl;
+ formula_name_t res = resolver->resolve(c.name, abs_address_t());
+ assert(res.type == formula_name_t::name_type::range_reference);
+
+ auto v = std::get<range_t>(res.value);
+ assert(v.first == c.address1);
+ assert(v.last == c.address2);
+ }
+}
+
+void test_odff()
+{
+ IXION_TEST_FUNC_SCOPE;
+
+ model_context cxt;
+ cxt.append_sheet("One");
+ cxt.append_sheet("Two");
+ cxt.append_sheet("A B C"); // name with space
+ cxt.append_sheet("80's Music");
+
+ auto resolver = formula_name_resolver::get(formula_name_resolver_t::odff, &cxt);
+ assert(resolver);
+
+ // Parse single cell addresses.
+ ref_name_entry single_ref_names[] =
+ {
+ { "[.A1]", false },
+ { "[.$A1]", false },
+ { "[.A$1]", false },
+ { "[.$A$1]", false },
+ { 0, false }
+ };
+
+ for (size_t i = 0; single_ref_names[i].name; ++i)
+ {
+ const char* p = single_ref_names[i].name;
+ std::string name_a1(p);
+ formula_name_t res = resolver->resolve(name_a1, abs_address_t());
+ if (res.type != formula_name_t::cell_reference)
+ {
+ std::cerr << "failed to resolve cell address: " << name_a1 << std::endl;
+ assert(false);
+ }
+
+ address_t addr = std::get<address_t>(res.value);
+ std::string test_name = resolver->get_name(addr, abs_address_t(), single_ref_names[i].sheet_name);
+
+ if (name_a1 != test_name)
+ {
+ std::cerr << "failed to compile name from address: (name expected: " << name_a1 << "; actual name created: " << test_name << ")" << std::endl;
+ assert(false);
+ }
+ }
+
+ // Parse cell range addresses.
+ ref_name_entry range_ref_names[] =
+ {
+ { "[.A1:.A3]", false },
+ { "[.$B5:.$D10]", false },
+ { 0, false }
+ };
+
+ for (size_t i = 0; range_ref_names[i].name; ++i)
+ {
+ const char* p = range_ref_names[i].name;
+ std::string name_a1(p);
+ formula_name_t res = resolver->resolve(name_a1, abs_address_t());
+ if (res.type != formula_name_t::range_reference)
+ {
+ std::cerr << "failed to resolve range address: " << name_a1 << std::endl;
+ assert(false);
+ }
+
+ auto range = std::get<range_t>(res.value);
+ std::string test_name = resolver->get_name(range, abs_address_t(), range_ref_names[i].sheet_name);
+
+ if (name_a1 != test_name)
+ {
+ std::cerr << "failed to compile name from range: (name expected: " << name_a1 << "; actual name created: " << test_name << ")" << std::endl;
+ assert(false);
+ }
+ }
+
+ // single cell addresses with sheet names
+ ref_name_entry addr_with_sheet_names[] =
+ {
+ { "[One.$B$1]", true },
+ { "[$One.$B$1]", true },
+ { "[Two.$B$2]", true },
+ { "[$Two.$B$4]", true },
+ { "['A B C'.$B$4]", true },
+ { "[$'A B C'.$B$4]", true },
+ { 0, false },
+ };
+
+ for (size_t i = 0; addr_with_sheet_names[i].name; ++i)
+ {
+ const char* p = addr_with_sheet_names[i].name;
+ std::string name_a1(p);
+
+ formula_name_t res = resolver->resolve(name_a1, abs_address_t());
+ if (res.type != formula_name_t::cell_reference)
+ {
+ std::cerr << "failed to resolve cell address: " << name_a1 << std::endl;
+ assert(false);
+ }
+
+ address_t addr = std::get<address_t>(res.value);
+ std::string test_name = resolver->get_name(addr, abs_address_t(), addr_with_sheet_names[i].sheet_name);
+
+ if (name_a1 != test_name)
+ {
+ std::cerr << "failed to compile name from cell address: (name expected: " << name_a1 << "; actual name created: " << test_name << ")" << std::endl;
+ assert(false);
+ }
+ }
+
+ // range addresses with sheet names
+ ref_name_entry ref_with_sheet_names[] =
+ {
+ { "[One.$B$1:.$B$30]", true },
+ { "[$One.$B$1:.$B$30]", true },
+ { "[Two.$B$2:.$D30]", true },
+ { "[$Two.$B$4:.F$35]", true },
+ { "['A B C'.$B$4:.F$35]", true },
+ { "[$'A B C'.$B$4:.F$35]", true },
+ { "[$One.B$4:$Two.F35]", true },
+ { "[$One.B$4:'A B C'.F35]", true },
+ { "[One.B$4:$'A B C'.F35]", true },
+ { 0, false },
+ };
+
+ for (size_t i = 0; ref_with_sheet_names[i].name; ++i)
+ {
+ const char* p = ref_with_sheet_names[i].name;
+ std::string name_a1(p);
+
+ formula_name_t res = resolver->resolve(name_a1, abs_address_t());
+ if (res.type != formula_name_t::range_reference)
+ {
+ std::cerr << "failed to resolve range address: " << name_a1 << std::endl;
+ assert(false);
+ }
+
+ auto range = std::get<range_t>(res.value);
+ std::string test_name = resolver->get_name(range, abs_address_t(), ref_with_sheet_names[i].sheet_name);
+
+ if (name_a1 != test_name)
+ {
+ std::cerr << "failed to compile name from range: (name expected: " << name_a1 << "; actual name created: " << test_name << ")" << std::endl;
+ assert(false);
+ }
+ }
+
+ {
+ std::string name = "[.H2:.I2]";
+ abs_address_t pos(2, 1, 9);
+ formula_name_t res = resolver->resolve(name, pos);
+ assert(res.type == formula_name_t::range_reference);
+ abs_range_t range = std::get<range_t>(res.value).to_abs(pos);
+ abs_range_t range_expected(abs_address_t(pos.sheet, 1, 7), 1, 2);
+ assert(range == range_expected);
+ }
+
+ {
+ std::string name = "[Two.$B$2:.$B$10]";
+ abs_address_t pos(3, 2, 1);
+ formula_name_t res = resolver->resolve(name, pos);
+ assert(res.type == formula_name_t::range_reference);
+ abs_range_t range = std::get<range_t>(res.value).to_abs(pos);
+ abs_range_t range_expected(abs_address_t(1, 1, 1), 9, 1);
+ assert(range == range_expected);
+ }
+
+ {
+ std::string name = "MyRange";
+ abs_address_t pos(3, 2, 1);
+ formula_name_t res = resolver->resolve(name, pos);
+ assert(res.type == formula_name_t::named_expression);
+ }
+}
+
+void test_odf_cra()
+{
+ IXION_TEST_FUNC_SCOPE;
+
+ model_context cxt;
+ cxt.append_sheet("One");
+ cxt.append_sheet("Two");
+ cxt.append_sheet("Three");
+ cxt.append_sheet("A B C"); // name with space
+ auto resolver = formula_name_resolver::get(formula_name_resolver_t::odf_cra, &cxt);
+ assert(resolver);
+
+ {
+ // Parse single cell addresses.
+ ref_name_entry names[] =
+ {
+ { ".A1", false },
+ { ".$A1", false },
+ { ".A$1", false },
+ { ".$A$1", false },
+ { ".Z1", false },
+ { ".AA23", false },
+ { ".AB23", false },
+ { ".$AB23", false },
+ { ".AB$23", false },
+ { ".$AB$23", false },
+ { ".BA1", false },
+ { ".AAA2", false },
+ { ".ABA1", false },
+ { ".BAA1", false },
+ { ".XFD1048576", false },
+ { "One.A1", true },
+ { "One.XFD1048576", true },
+ { "Two.B10", true },
+ { "Two.$B10", true },
+ { "Two.B$10", true },
+ { "Two.$B$10", true },
+ { "Three.CFD234", true },
+ { "$Three.CFD234", true },
+ { "'A B C'.Z12", true },
+ { "$'A B C'.Z12", true },
+ { 0, false }
+ };
+
+ for (size_t i = 0; names[i].name; ++i)
+ {
+ const char* p = names[i].name;
+ std::string name_a1(p);
+ std::cout << "single cell address: " << name_a1 << std::endl;
+ formula_name_t res = resolver->resolve(name_a1, abs_address_t());
+ if (res.type != formula_name_t::cell_reference)
+ {
+ std::cerr << "failed to resolve cell address: " << name_a1 << std::endl;
+ assert(false);
+ }
+
+ address_t addr = std::get<address_t>(res.value);
+ std::string test_name = resolver->get_name(addr, abs_address_t(), names[i].sheet_name);
+
+ if (name_a1 != test_name)
+ {
+ std::cerr << "failed to compile name from address: (name expected: " << name_a1 << "; actual name created: " << test_name << ")" << std::endl;
+ assert(false);
+ }
+ }
+ }
+
+ {
+ // Parse range addresses.
+
+ ref_name_entry names[] =
+ {
+ { ".A1:.B2", false },
+ { ".$D10:.G$24", false },
+ { "One.C$1:.Z$400", true },
+ { "Two.$C1:.$Z400", true },
+ { "Three.$C1:.Z$400", true },
+ { "$Three.$C1:.Z$400", true },
+ { "'A B C'.$C4:.$Z256", true },
+ { "$'A B C'.$C4:.$Z256", true },
+ { "One.C4:Three.Z100", true },
+ { "One.C4:$Three.Z100", true },
+ { "$One.C4:Three.Z100", true },
+ { "$One.C4:$Three.Z100", true },
+ { 0, false },
+ };
+
+ for (sheet_t sheet = 0; sheet <= 3; ++sheet)
+ {
+ for (size_t i = 0; names[i].name; ++i)
+ {
+ abs_address_t pos{sheet, 0, 0};
+ std::string name_a1(names[i].name);
+ std::cout << "range address: " << name_a1 << std::endl;
+ formula_name_t res = resolver->resolve(name_a1, pos);
+ if (res.type != formula_name_t::range_reference)
+ {
+ std::cerr << "failed to resolve range address: " << name_a1 << std::endl;
+ assert(false);
+ }
+
+ auto range = std::get<range_t>(res.value);
+ std::string test_name = resolver->get_name(range, pos, names[i].sheet_name);
+
+ if (name_a1 != test_name)
+ {
+ std::cerr << "failed to compile name from range: (pos: " << pos << "; name expected: " << name_a1 << "; actual name created: " << test_name << ")" << std::endl;
+ assert(false);
+ }
+ }
+ }
+ }
+}
+
+} // anonymous namespace
+
+int main()
+{
+ test_calc_a1();
+ test_excel_a1();
+ test_excel_a1_multisheet();
+ test_named_expression();
+ test_table_excel_a1();
+ test_excel_r1c1();
+ test_excel_r1c1_multisheet();
+ test_odff();
+ test_odf_cra();
+
+ return EXIT_SUCCESS;
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/src/libixion/named_expressions_iterator.cpp b/src/libixion/named_expressions_iterator.cpp
new file mode 100644
index 0000000..77ce457
--- /dev/null
+++ b/src/libixion/named_expressions_iterator.cpp
@@ -0,0 +1,85 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include "ixion/named_expressions_iterator.hpp"
+#include "ixion/global.hpp"
+#include "model_types.hpp"
+#include "model_context_impl.hpp"
+
+namespace ixion {
+
+struct named_expressions_iterator::impl
+{
+ const detail::named_expressions_t* named_exps;
+ detail::named_expressions_t::const_iterator it;
+ detail::named_expressions_t::const_iterator it_end;
+
+ impl() : named_exps(nullptr) {}
+
+ impl(const model_context& cxt, sheet_t scope) :
+ named_exps(scope >=0 ? &cxt.mp_impl->get_named_expressions(scope) : &cxt.mp_impl->get_named_expressions()),
+ it(named_exps->cbegin()),
+ it_end(named_exps->cend()) {}
+
+ impl(const impl& other) :
+ named_exps(other.named_exps),
+ it(other.it),
+ it_end(other.it_end) {}
+};
+
+named_expressions_iterator::named_expressions_iterator() :
+ mp_impl(std::make_unique<impl>()) {}
+
+named_expressions_iterator::named_expressions_iterator(const model_context& cxt, sheet_t scope) :
+ mp_impl(std::make_unique<impl>(cxt, scope)) {}
+
+named_expressions_iterator::named_expressions_iterator(const named_expressions_iterator& other) :
+ mp_impl(std::make_unique<impl>(*other.mp_impl)) {}
+
+named_expressions_iterator::named_expressions_iterator(named_expressions_iterator&& other) :
+ mp_impl(std::move(other.mp_impl)) {}
+
+named_expressions_iterator::~named_expressions_iterator() = default;
+
+size_t named_expressions_iterator::size() const
+{
+ if (!mp_impl->named_exps)
+ return 0;
+
+ return mp_impl->named_exps->size();
+}
+
+bool named_expressions_iterator::has() const
+{
+ if (!mp_impl->named_exps)
+ return false;
+
+ return mp_impl->it != mp_impl->it_end;
+}
+
+void named_expressions_iterator::next()
+{
+ ++mp_impl->it;
+}
+
+named_expressions_iterator::named_expression named_expressions_iterator::get() const
+{
+ named_expression ret;
+ ret.name = &mp_impl->it->first;
+ ret.expression = &mp_impl->it->second;
+ return ret;
+}
+
+named_expressions_iterator& named_expressions_iterator::operator= (const named_expressions_iterator& other)
+{
+ mp_impl = std::make_unique<impl>(*other.mp_impl);
+ return *this;
+}
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/src/libixion/queue_entry.cpp b/src/libixion/queue_entry.cpp
new file mode 100644
index 0000000..3051f8f
--- /dev/null
+++ b/src/libixion/queue_entry.cpp
@@ -0,0 +1,17 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include "queue_entry.hpp"
+
+namespace ixion {
+
+queue_entry::queue_entry(formula_cell* _p, const abs_address_t& _pos) :
+ p(_p), pos(_pos) {}
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/src/libixion/queue_entry.hpp b/src/libixion/queue_entry.hpp
new file mode 100644
index 0000000..eb5e663
--- /dev/null
+++ b/src/libixion/queue_entry.hpp
@@ -0,0 +1,29 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef INCLUDED_QUEUE_ENTRY_HPP
+#define INCLUDED_QUEUE_ENTRY_HPP
+
+#include "ixion/address.hpp"
+
+namespace ixion {
+
+class formula_cell;
+
+struct queue_entry
+{
+ formula_cell* p;
+ abs_address_t pos;
+
+ queue_entry(formula_cell* _p, const abs_address_t& _pos);
+};
+
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/src/libixion/table.cpp b/src/libixion/table.cpp
new file mode 100644
index 0000000..d182715
--- /dev/null
+++ b/src/libixion/table.cpp
@@ -0,0 +1,40 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include <ixion/table.hpp>
+
+#include <iomanip>
+
+namespace ixion {
+
+table_t::table_t() :
+ name(empty_string_id),
+ column_first(empty_string_id),
+ column_last(empty_string_id),
+ areas(table_area_none) {}
+
+bool table_t::operator== (const table_t& r) const
+{
+ return name == r.name && column_first == r.column_first && column_last == r.column_first && areas == r.areas;
+}
+
+bool table_t::operator!= (const table_t& r) const
+{
+ return !operator==(r);
+}
+
+std::ostream& operator<<(std::ostream& os, const table_t& table)
+{
+ os << "(name:" << table.name << "; column-first:" << table.column_first
+ << "; column-last:" << table.column_last << "; areas:0x" << std::hex
+ << std::setw(2) << std::setfill('0') << table.areas << ")";
+ return os;
+}
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/src/libixion/types.cpp b/src/libixion/types.cpp
new file mode 100644
index 0000000..32d996c
--- /dev/null
+++ b/src/libixion/types.cpp
@@ -0,0 +1,133 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include <ixion/types.hpp>
+#include <ixion/macros.hpp>
+
+#include "column_store_type.hpp"
+
+#include <limits>
+#include <vector>
+
+namespace ixion {
+
+namespace {
+
+constexpr std::string_view formula_error_names[] = {
+ "", // 0: no error
+ "#REF!", // 1: result not available
+ "#DIV/0!", // 2: division by zero
+ "#NUM!", // 3: invalid expression
+ "#NAME?", // 4: name not found
+ "#NULL!", // 5: no range intersection
+ "#VALUE!", // 6: invalid value type
+ "#N/A", // 7: no value available
+};
+
+} // anonymous namespace
+
+const sheet_t global_scope = -1;
+const sheet_t invalid_sheet = -2;
+
+const string_id_t empty_string_id = std::numeric_limits<string_id_t>::max();
+
+bool is_valid_sheet(sheet_t sheet)
+{
+ return sheet >= 0;
+}
+
+rc_size_t::rc_size_t() : row(0), column(0) {}
+rc_size_t::rc_size_t(const rc_size_t& other) : row(other.row), column(other.column) {}
+rc_size_t::rc_size_t(row_t _row, col_t _column) : row(_row), column(_column) {}
+rc_size_t::~rc_size_t() {}
+
+rc_size_t& rc_size_t::operator= (const rc_size_t& other)
+{
+ row = other.row;
+ column = other.column;
+ return *this;
+}
+
+formula_group_t::formula_group_t() : size(), identity(0), grouped(false) {}
+formula_group_t::formula_group_t(const formula_group_t& r) :
+ size(r.size), identity(r.identity), grouped(r.grouped) {}
+formula_group_t::formula_group_t(const rc_size_t& _group_size, uintptr_t _identity, bool _grouped) :
+ size(_group_size), identity(_identity), grouped(_grouped) {}
+formula_group_t::~formula_group_t() {}
+
+formula_group_t& formula_group_t::operator= (const formula_group_t& other)
+{
+ size = other.size;
+ identity = other.identity;
+ return *this;
+}
+
+std::string_view get_formula_error_name(formula_error_t fe)
+{
+ constexpr std::string_view default_err_name = "#ERR!";
+
+ if (std::size_t(fe) < std::size(formula_error_names))
+ return formula_error_names[std::size_t(fe)];
+
+ return default_err_name;
+}
+
+formula_error_t to_formula_error_type(std::string_view s)
+{
+ const auto* p = formula_error_names;
+ const auto* p_end = p + std::size(formula_error_names);
+
+ p = std::find(p, p_end, s);
+
+ if (p == p_end)
+ return formula_error_t::no_error;
+
+ return formula_error_t(std::distance(formula_error_names, p));
+}
+
+column_block_shape_t::column_block_shape_t() :
+ position(0), size(0), offset(0), type(column_block_t::unknown), data(nullptr)
+{
+}
+
+column_block_shape_t::column_block_shape_t(
+ std::size_t _position, std::size_t _size, std::size_t _offset,
+ column_block_t _type, column_block_handle _data) :
+ position(_position), size(_size), offset(_offset), type(_type), data(_data)
+{
+}
+
+column_block_shape_t::column_block_shape_t(const column_block_shape_t& other) :
+ position(other.position), size(other.size), offset(other.offset),
+ type(other.type), data(other.data)
+{
+}
+
+column_block_shape_t& column_block_shape_t::operator=(const column_block_shape_t& other)
+{
+ position = other.position;
+ size = other.size;
+ offset = other.offset;
+ type = other.type;
+ data = other.data;
+ return *this;
+}
+
+std::ostream& operator<< (std::ostream& os, const column_block_shape_t& v)
+{
+ os << "(column_block_shape_t: position=" << v.position << "; size=" << v.size << "; offset=" << v.offset
+ << "; type=" << int(v.type) << "; data=" << v.data << ")";
+ return os;
+}
+
+print_config::print_config() = default;
+print_config::print_config(const print_config&) = default;
+print_config::~print_config() = default;
+
+} // namespace ixion
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/src/libixion/utf8.cpp b/src/libixion/utf8.cpp
new file mode 100644
index 0000000..a833ada
--- /dev/null
+++ b/src/libixion/utf8.cpp
@@ -0,0 +1,72 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include "utf8.hpp"
+
+#include <ixion/exceptions.hpp>
+#include <sstream>
+#include <limits>
+
+namespace ixion { namespace detail {
+
+namespace {
+
+constexpr uint8_t invalid_utf8_byte_length = std::numeric_limits<uint8_t>::max();
+
+uint8_t calc_utf8_byte_length(uint8_t c1)
+{
+ if ((c1 & 0x80) == 0x00)
+ // highest bit is not set.
+ return 1;
+
+ if ((c1 & 0xE0) == 0xC0)
+ // highest 3 bits are 110.
+ return 2;
+
+ if ((c1 & 0xF0) == 0xE0)
+ // highest 4 bits are 1110.
+ return 3;
+
+ if ((c1 & 0xFC) == 0xF0)
+ // highest 5 bits are 11110.
+ return 4;
+
+ return invalid_utf8_byte_length;
+}
+
+}
+
+std::vector<std::size_t> calc_utf8_byte_positions(const std::string& s)
+{
+ const char* p = s.data();
+ const char* p0 = p; // head position
+ const char* p_end = p + s.size();
+
+ std::vector<std::size_t> positions;
+
+ while (p < p_end)
+ {
+ positions.push_back(std::distance(p0, p));
+
+ uint8_t n = calc_utf8_byte_length(*p);
+
+ if (n == invalid_utf8_byte_length)
+ {
+ std::ostringstream os;
+ os << "invalid utf8 byte length in string '" << s << "'";
+ throw general_error(os.str());
+ }
+
+ p += n;
+ }
+
+ return positions;
+}
+
+}}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/src/libixion/utf8.hpp b/src/libixion/utf8.hpp
new file mode 100644
index 0000000..56962b9
--- /dev/null
+++ b/src/libixion/utf8.hpp
@@ -0,0 +1,27 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#pragma once
+
+#include <vector>
+#include <string>
+
+namespace ixion { namespace detail {
+
+/**
+ * Obtains the positions of the first bytes of the unicode characters.
+ *
+ * @param s input string encoded in utf-8.
+ *
+ * @return a sequence of the positions. The size of the sequence equals the
+ * logical length of the utf-8 string.
+ */
+std::vector<std::size_t> calc_utf8_byte_positions(const std::string& s);
+
+}}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/src/libixion/utils.cpp b/src/libixion/utils.cpp
new file mode 100644
index 0000000..24d78ec
--- /dev/null
+++ b/src/libixion/utils.cpp
@@ -0,0 +1,70 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include "utils.hpp"
+#include <ixion/exceptions.hpp>
+#include <ixion/formula_result.hpp>
+
+#include <sstream>
+
+namespace ixion { namespace detail {
+
+celltype_t to_celltype(mdds::mtv::element_t mtv_type)
+{
+ switch (mtv_type)
+ {
+ case element_type_empty:
+ return celltype_t::empty;
+ case element_type_numeric:
+ return celltype_t::numeric;
+ case element_type_boolean:
+ return celltype_t::boolean;
+ case element_type_string:
+ return celltype_t::string;
+ case element_type_formula:
+ return celltype_t::formula;
+ default:
+ ;
+ }
+
+ std::ostringstream os;
+ os << "unknown cell type (" << mtv_type << ")";
+ throw general_error(os.str());
+}
+
+cell_value_t to_cell_value_type(
+ const column_store_t::const_position_type& pos, formula_result_wait_policy_t policy)
+{
+ celltype_t raw_type = to_celltype(pos.first->type);
+
+ if (raw_type != celltype_t::formula)
+ // celltype_t and cell_result_t are numerically equivalent except for the formula slot.
+ return static_cast<cell_value_t>(raw_type);
+
+ const formula_cell* fc = formula_element_block::at(*pos.first->data, pos.second);
+ formula_result res = fc->get_result_cache(policy); // by calling this we should not get a matrix result.
+
+ switch (res.get_type())
+ {
+ case formula_result::result_type::boolean:
+ return cell_value_t::boolean;
+ case formula_result::result_type::value:
+ return cell_value_t::numeric;
+ case formula_result::result_type::string:
+ return cell_value_t::string;
+ case formula_result::result_type::error:
+ return cell_value_t::error;
+ case formula_result::result_type::matrix:
+ throw std::logic_error("we shouldn't be getting a matrix result type here.");
+ }
+
+ return cell_value_t::unknown;
+}
+
+}}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/src/libixion/utils.hpp b/src/libixion/utils.hpp
new file mode 100644
index 0000000..aff5c4d
--- /dev/null
+++ b/src/libixion/utils.hpp
@@ -0,0 +1,111 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef INCLUDED_IXION_DETAIL_UTILS_HPP
+#define INCLUDED_IXION_DETAIL_UTILS_HPP
+
+#include "ixion/types.hpp"
+#include "column_store_type.hpp"
+
+#include <sstream>
+
+namespace ixion { namespace detail {
+
+celltype_t to_celltype(mdds::mtv::element_t mtv_type);
+
+cell_value_t to_cell_value_type(
+ const column_store_t::const_position_type& pos, formula_result_wait_policy_t policy);
+
+template<std::size_t S, typename T>
+void ensure_max_size(const T& v)
+{
+ static_assert(sizeof(T) <= S, "The size of the value exceeded allowed size limit.");
+}
+
+template<typename T>
+class const_element_block_range
+{
+ const T* m_begin;
+ const T* m_end;
+
+public:
+ const_element_block_range(const T* begin, const T* end) : m_begin(begin), m_end(end) {}
+
+ const T* begin() const { return m_begin; }
+ const T* end() const { return m_end; }
+};
+
+/* Specialization for bool in order to handle std::vector<bool>. */
+template<>
+class const_element_block_range<bool>
+{
+ using iterator_type = boolean_element_block::const_iterator;
+ iterator_type m_begin;
+ iterator_type m_end;
+
+public:
+ const_element_block_range(const iterator_type& begin, const iterator_type& end) :
+ m_begin(begin), m_end(end) {}
+
+ iterator_type begin() const { return m_begin; }
+ iterator_type end() const { return m_end; }
+};
+
+template<column_block_t BlockT>
+struct make_element_range;
+
+template<>
+struct make_element_range<column_block_t::boolean>
+{
+ const_element_block_range<bool> operator()(const column_block_shape_t& node, std::size_t length) const
+ {
+ // NB: special treatment for std::vector<bool> which underlies boolean_element_block.
+ const auto* blk = reinterpret_cast<const boolean_element_block*>(node.data);
+ auto it = boolean_element_block::cbegin(*blk);
+ it = std::next(it, node.offset);
+ length = std::min(node.size - node.offset, length);
+ auto it_end = std::next(it, length);
+
+ return {it, it_end};
+ }
+};
+
+template<>
+struct make_element_range<column_block_t::numeric>
+{
+ const_element_block_range<double> operator()(const column_block_shape_t& node, std::size_t length) const
+ {
+ const auto* blk = reinterpret_cast<const numeric_element_block*>(node.data);
+ const double* p = &numeric_element_block::at(*blk, node.offset);
+ length = std::min(node.size - node.offset, length);
+ const double* p_end = p + length;
+
+ return {p, p_end};
+ }
+};
+
+template<>
+struct make_element_range<column_block_t::formula>
+{
+ const_element_block_range<const formula_cell*> operator()(const column_block_shape_t& node, std::size_t length) const
+ {
+ const auto* blk = reinterpret_cast<const formula_element_block*>(node.data);
+ auto p = &formula_element_block::at(*blk, node.offset);
+ length = std::min(node.size - node.offset, length);
+ auto p_end = p + length;
+
+ return {p, p_end};
+ }
+};
+
+// TODO : add specialization for the other block types as needed.
+
+}}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/src/libixion/vulkan_obj.cpp b/src/libixion/vulkan_obj.cpp
new file mode 100644
index 0000000..e11181b
--- /dev/null
+++ b/src/libixion/vulkan_obj.cpp
@@ -0,0 +1,870 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include "vulkan_obj.hpp"
+#include "debug.hpp"
+
+#include "ixion/macros.hpp"
+
+#include <vector>
+#include <cstring>
+#include <iostream>
+#include <sstream>
+#include <iomanip>
+#include <bitset>
+
+namespace ixion { namespace draft {
+
+namespace {
+
+#include "vulkan_spirv_blobs.inl"
+
+VKAPI_ATTR VkBool32 VKAPI_CALL vulkan_debug_callback(
+ VkDebugUtilsMessageSeverityFlagBitsEXT severity,
+ VkDebugUtilsMessageTypeFlagsEXT type,
+ const VkDebugUtilsMessengerCallbackDataEXT* cb_data,
+ void* user)
+{
+ IXION_DEBUG(cb_data->pMessage);
+ return VK_FALSE;
+}
+
+/**
+ * When the original size is not a multiple of the device's atom size, pad
+ * it to the next multiple of the atom size. Certain memory operations
+ * require the size to be a multiple of the atom size.
+ */
+VkDeviceSize pad_to_atom_size(const vk_device& device, VkDeviceSize src_size)
+{
+ auto padded_size = src_size;
+
+ auto atom_size = device.get_physical_device_limits().nonCoherentAtomSize;
+ auto rem = padded_size % atom_size;
+ if (rem)
+ padded_size += atom_size - rem;
+
+ return padded_size;
+}
+
+} // anonymous namespace
+
+vk_instance::vk_instance()
+{
+ const char* validation_layer = "VK_LAYER_KHRONOS_validation";
+ const char* validation_ext = "VK_EXT_debug_utils";
+
+ VkApplicationInfo app_info = {};
+ app_info.sType = VK_STRUCTURE_TYPE_APPLICATION_INFO;
+ app_info.pApplicationName = "ixion-compute-engine-vulkan";
+ app_info.pEngineName = "none";
+ app_info.apiVersion = VK_API_VERSION_1_0;
+
+ VkInstanceCreateInfo instance_ci = {};
+ instance_ci.sType = VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO;
+ instance_ci.pApplicationInfo = &app_info;
+
+ uint32_t n_layers;
+ vkEnumerateInstanceLayerProperties(&n_layers, nullptr);
+ std::vector<VkLayerProperties> layers(n_layers);
+ vkEnumerateInstanceLayerProperties(&n_layers, layers.data());
+
+ IXION_TRACE("scanning for validation layer...");
+ bool has_validation_layer = false;
+ for (const VkLayerProperties& props : layers)
+ {
+ if (!strcmp(props.layerName, validation_layer))
+ {
+ IXION_TRACE("- " << props.layerName << " (found)");
+ has_validation_layer = true;
+ break;
+ }
+
+ IXION_TRACE("- " << props.layerName);
+ }
+
+ if (has_validation_layer)
+ {
+ instance_ci.ppEnabledLayerNames = &validation_layer;
+ instance_ci.enabledLayerCount = 1;
+ instance_ci.enabledExtensionCount = 1;
+ instance_ci.ppEnabledExtensionNames = &validation_ext;
+ }
+
+ VkResult res = vkCreateInstance(&instance_ci, nullptr, &m_instance);
+ if (res != VK_SUCCESS)
+ throw std::runtime_error("failed to create a vulkan instance.");
+
+ if (has_validation_layer)
+ {
+ VkDebugUtilsMessengerCreateInfoEXT debug_ci{};
+ debug_ci.sType = VK_STRUCTURE_TYPE_DEBUG_UTILS_MESSENGER_CREATE_INFO_EXT;
+ debug_ci.messageSeverity =
+ VK_DEBUG_UTILS_MESSAGE_SEVERITY_VERBOSE_BIT_EXT |
+ VK_DEBUG_UTILS_MESSAGE_SEVERITY_WARNING_BIT_EXT |
+ VK_DEBUG_UTILS_MESSAGE_SEVERITY_ERROR_BIT_EXT;
+ debug_ci.messageType =
+ VK_DEBUG_UTILS_MESSAGE_TYPE_GENERAL_BIT_EXT |
+ VK_DEBUG_UTILS_MESSAGE_TYPE_VALIDATION_BIT_EXT |
+ VK_DEBUG_UTILS_MESSAGE_TYPE_PERFORMANCE_BIT_EXT;
+ debug_ci.pfnUserCallback = vulkan_debug_callback;
+ debug_ci.pUserData = nullptr;
+
+ auto func = (PFN_vkCreateDebugUtilsMessengerEXT)vkGetInstanceProcAddr(
+ m_instance, "vkCreateDebugUtilsMessengerEXT");
+
+ if (func)
+ {
+ res = func(m_instance, &debug_ci, nullptr, &m_debug_messenger);
+ if (res != VK_SUCCESS)
+ throw std::runtime_error("failed to create debug utils messenger.");
+ }
+ }
+}
+
+vk_instance::~vk_instance()
+{
+ if (m_debug_messenger)
+ {
+ auto func = (PFN_vkDestroyDebugUtilsMessengerEXT)vkGetInstanceProcAddr(
+ m_instance, "vkDestroyDebugUtilsMessengerEXT");
+
+ if (func)
+ func(m_instance, m_debug_messenger, nullptr);
+ }
+
+ vkDestroyInstance(m_instance, nullptr);
+}
+
+VkInstance& vk_instance::get() { return m_instance; }
+
+vk_queue::vk_queue(VkQueue queue) : m_queue(queue) {}
+
+vk_queue::~vk_queue() {}
+
+void vk_queue::submit(vk_command_buffer& cmd, vk_fence& fence, VkPipelineStageFlags dst_stages)
+{
+ VkSubmitInfo info{};
+ info.sType = VK_STRUCTURE_TYPE_SUBMIT_INFO;
+ info.pWaitDstStageMask = dst_stages ? &dst_stages : nullptr;
+ info.commandBufferCount = 1;
+ info.pCommandBuffers = &cmd.get();
+
+ VkResult res = vkQueueSubmit(m_queue, 1, &info, fence.get());
+ if (res != VK_SUCCESS)
+ throw std::runtime_error("failed to submit command to queue.");
+}
+
+void vk_queue::wait_idle()
+{
+ vkQueueWaitIdle(m_queue);
+}
+
+vk_device::vk_device(vk_instance& instance)
+{
+ uint32_t n_devices = 0;
+ VkResult res = vkEnumeratePhysicalDevices(instance.get(), &n_devices, nullptr);
+ if (res != VK_SUCCESS)
+ throw std::runtime_error("failed to query the number of physical devices.");
+
+ if (!n_devices)
+ throw std::runtime_error("no vulkan devices found!");
+
+ std::vector<VkPhysicalDevice> devices(n_devices);
+ res = vkEnumeratePhysicalDevices(instance.get(), &n_devices, devices.data());
+ if (res != VK_SUCCESS)
+ throw std::runtime_error("failed to obtain the physical device data.");
+
+#ifdef IXION_TRACE_ON
+ for (const VkPhysicalDevice pd : devices)
+ {
+ VkPhysicalDeviceProperties props;
+ vkGetPhysicalDeviceProperties(pd, &props);
+
+ IXION_TRACE("--");
+ IXION_TRACE("name: " << props.deviceName);
+ IXION_TRACE("vendor ID: " << props.vendorID);
+ IXION_TRACE("device ID: " << props.deviceID);
+ }
+#endif
+
+ m_physical_device = devices[0]; // pick the first physical device for now.
+ vkGetPhysicalDeviceProperties(m_physical_device, &m_physical_device_props);
+
+ {
+ uint32_t n_qfs;
+ vkGetPhysicalDeviceQueueFamilyProperties(m_physical_device, &n_qfs, nullptr);
+
+ std::vector<VkQueueFamilyProperties> qf_props(n_qfs);
+ vkGetPhysicalDeviceQueueFamilyProperties(m_physical_device, &n_qfs, qf_props.data());
+
+ IXION_TRACE("scanning for a queue family that supports compute...");
+
+ uint8_t current_n_flags = std::numeric_limits<uint8_t>::max();
+
+ for (size_t i = 0; i < qf_props.size(); ++i)
+ {
+ uint8_t n_flags = 0;
+ bool supports_compute = false;
+
+ const VkQueueFamilyProperties& props = qf_props[i];
+
+ std::ostringstream os;
+ os << "- queue family " << i << ": ";
+
+ if (props.queueFlags & VK_QUEUE_GRAPHICS_BIT)
+ {
+ os << "graphics ";
+ ++n_flags;
+ }
+
+ if (props.queueFlags & VK_QUEUE_COMPUTE_BIT)
+ {
+ os << "compute ";
+ ++n_flags;
+ supports_compute = true;
+ }
+
+ if (props.queueFlags & VK_QUEUE_TRANSFER_BIT)
+ {
+ os << "transfer ";
+ ++n_flags;
+ }
+
+ if (props.queueFlags & VK_QUEUE_SPARSE_BINDING_BIT)
+ {
+ os << "sparse-binding ";
+ ++n_flags;
+ }
+
+ if (props.queueFlags & VK_QUEUE_PROTECTED_BIT)
+ {
+ os << "protected ";
+ ++n_flags;
+ }
+
+ if (supports_compute && n_flags < current_n_flags)
+ {
+ current_n_flags = n_flags;
+ m_queue_family_index = i;
+ os << "(picked)";
+ }
+
+ IXION_TRACE(os.str());
+ }
+
+ IXION_TRACE("final queue family index: " << m_queue_family_index);
+
+ VkDeviceQueueCreateInfo queue_ci = {};
+
+ const float queue_prio = 0.0f;
+ queue_ci.sType = VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO;
+ queue_ci.queueFamilyIndex = m_queue_family_index;
+ queue_ci.queueCount = 1;
+ queue_ci.pQueuePriorities = &queue_prio;
+
+ VkDeviceCreateInfo device_ci = {};
+ device_ci.sType = VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO;
+ device_ci.queueCreateInfoCount = 1;
+ device_ci.pQueueCreateInfos = &queue_ci;
+ res = vkCreateDevice(m_physical_device, &device_ci, nullptr, &m_device);
+ if (res != VK_SUCCESS)
+ throw std::runtime_error("failed to create a logical device.");
+
+ vkGetDeviceQueue(m_device, m_queue_family_index, 0, &m_queue);
+ }
+}
+
+vk_device::~vk_device()
+{
+ vkDestroyDevice(m_device, nullptr);
+}
+
+VkDevice& vk_device::get()
+{
+ return m_device;
+}
+
+const VkDevice& vk_device::get() const
+{
+ return m_device;
+}
+
+VkPhysicalDevice vk_device::get_physical_device()
+{
+ return m_physical_device;
+}
+
+const VkPhysicalDeviceLimits& vk_device::get_physical_device_limits() const
+{
+ return m_physical_device_props.limits;
+}
+
+vk_queue vk_device::get_queue()
+{
+ return vk_queue(m_queue);
+}
+
+VkDevice& vk_command_pool::get_device()
+{
+ return m_device;
+}
+
+VkCommandPool& vk_command_pool::get()
+{
+ return m_cmd_pool;
+}
+
+vk_command_pool::vk_command_pool(vk_device& device) :
+ m_device(device.get())
+{
+ VkCommandPoolCreateInfo ci = {};
+ ci.sType = VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO;
+ ci.queueFamilyIndex = device.get_queue_family_index();
+ ci.flags = VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT;
+ VkResult res = vkCreateCommandPool(device.get(), &ci, nullptr, &m_cmd_pool);
+ if (res != VK_SUCCESS)
+ throw std::runtime_error("failed to create command pool.");
+}
+
+vk_command_pool::~vk_command_pool()
+{
+ vkDestroyCommandPool(m_device, m_cmd_pool, nullptr);
+}
+
+vk_command_buffer vk_command_pool::create_command_buffer()
+{
+ return vk_command_buffer(*this);
+}
+
+vk_command_buffer::vk_command_buffer(vk_command_pool& cmd_pool) :
+ m_cmd_pool(cmd_pool)
+{
+ VkCommandBufferAllocateInfo cb_ai {};
+ cb_ai.sType = VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO;
+ cb_ai.commandPool = m_cmd_pool.get();
+ cb_ai.level = VK_COMMAND_BUFFER_LEVEL_PRIMARY;
+ cb_ai.commandBufferCount = 1;
+
+ VkResult res = vkAllocateCommandBuffers(m_cmd_pool.get_device(), &cb_ai, &m_cmd_buffer);
+ if (res != VK_SUCCESS)
+ throw std::runtime_error("failed to create a command buffer.");
+}
+
+vk_command_buffer::~vk_command_buffer()
+{
+ vkFreeCommandBuffers(m_cmd_pool.get_device(), m_cmd_pool.get(), 1, &m_cmd_buffer);
+}
+
+VkCommandBuffer& vk_command_buffer::get()
+{
+ return m_cmd_buffer;
+}
+
+void vk_command_buffer::begin()
+{
+ VkCommandBufferBeginInfo info{};
+ info.sType = VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO;
+ vkBeginCommandBuffer(m_cmd_buffer, &info);
+}
+
+void vk_command_buffer::end()
+{
+ vkEndCommandBuffer(m_cmd_buffer);
+}
+
+void vk_command_buffer::copy_buffer(vk_buffer& src, vk_buffer& dst, VkDeviceSize size)
+{
+ VkBufferCopy copy_region{};
+ copy_region.size = size;
+ vkCmdCopyBuffer(m_cmd_buffer, src.get(), dst.get(), 1, &copy_region);
+}
+
+void vk_command_buffer::buffer_memory_barrier(
+ const vk_buffer& buffer, VkAccessFlags src_access, VkAccessFlags dst_access,
+ VkPipelineStageFlagBits src_stage, VkPipelineStageFlagBits dst_stage)
+{
+ VkBufferMemoryBarrier info{};
+ info.sType = VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER;
+ info.buffer = buffer.get();
+ info.size = VK_WHOLE_SIZE;
+ info.srcAccessMask = src_access;
+ info.dstAccessMask = dst_access;
+ info.srcQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED;
+ info.dstQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED;
+
+ vkCmdPipelineBarrier(
+ m_cmd_buffer,
+ src_stage,
+ dst_stage,
+ 0,
+ 0, nullptr,
+ 1, &info,
+ 0, nullptr);
+}
+
+void vk_command_buffer::bind_pipeline(
+ const vk_pipeline& pipeline, VkPipelineBindPoint bind_point)
+{
+ vkCmdBindPipeline(m_cmd_buffer, bind_point, pipeline.get());
+}
+
+void vk_command_buffer::bind_descriptor_set(
+ VkPipelineBindPoint bind_point, const vk_pipeline_layout& pl_layout,
+ const vk_descriptor_set& desc_set)
+{
+ vkCmdBindDescriptorSets(
+ m_cmd_buffer, bind_point, pl_layout.get(), 0, 1, &desc_set.get(), 0, 0);
+}
+
+void vk_command_buffer::dispatch(uint32_t gc_x, uint32_t gc_y, uint32_t gc_z)
+{
+ vkCmdDispatch(m_cmd_buffer, gc_x, gc_y, gc_z);
+}
+
+vk_buffer::mem_type vk_buffer::find_memory_type(VkMemoryPropertyFlags mem_props) const
+{
+ mem_type ret;
+
+ VkPhysicalDeviceMemoryProperties pm_props;
+ vkGetPhysicalDeviceMemoryProperties(m_device.get_physical_device(), &pm_props);
+
+ VkMemoryRequirements mem_reqs;
+ vkGetBufferMemoryRequirements(m_device.get(), m_buffer, &mem_reqs);
+
+ ret.size = mem_reqs.size;
+
+ IXION_TRACE("buffer memory requirements:");
+ IXION_TRACE(" - size: " << mem_reqs.size);
+ IXION_TRACE(" - alignment: " << mem_reqs.alignment);
+ IXION_TRACE(" - memory type bits: "
+ << std::bitset<32>(mem_reqs.memoryTypeBits)
+ << " (" << mem_reqs.memoryTypeBits << ")");
+
+ IXION_TRACE("requested memory property flags: 0x"
+ << std::setw(2) << std::hex << std::setfill('0') << mem_props);
+
+ IXION_TRACE("memory types: n=" << std::dec << pm_props.memoryTypeCount);
+ for (uint32_t i = 0; i < pm_props.memoryTypeCount; ++i)
+ {
+ auto mt = pm_props.memoryTypes[i];
+ IXION_TRACE("- "
+ << std::setw(2)
+ << std::setfill('0')
+ << i
+ << ": property flags: " << std::bitset<32>(mt.propertyFlags) << " (0x"
+ << std::setw(2)
+ << std::hex
+ << std::setfill('0')
+ << mt.propertyFlags
+ << "); heap index: "
+ << std::dec
+ << mt.heapIndex);
+
+ if ((mem_reqs.memoryTypeBits & 1) == 1)
+ {
+ // The buffer can take this memory type. Now, check against
+ // the requested usage types.
+
+ if ((mt.propertyFlags & mem_props) == mem_props)
+ {
+ ret.index = i;
+ return ret;
+ }
+ }
+
+ mem_reqs.memoryTypeBits >>= 1;
+ }
+
+ throw std::runtime_error("no usable memory type found!");
+}
+
+vk_buffer::vk_buffer(vk_device& device, VkDeviceSize size, VkBufferUsageFlags usage, VkMemoryPropertyFlags mem_props) :
+ m_device(device)
+{
+ VkBufferCreateInfo buf_ci {};
+ buf_ci.sType = VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO;
+ buf_ci.usage = usage;
+ buf_ci.size = size;
+ buf_ci.sharingMode = VK_SHARING_MODE_EXCLUSIVE;
+
+ IXION_TRACE("buffer usage flags: " << std::bitset<32>(usage) << " (0x" << std::hex << usage << ")");
+ IXION_TRACE("memory property flags: " << std::bitset<32>(mem_props) << " (0x" << std::hex << mem_props << ")");
+ IXION_TRACE("buffer size: " << std::dec << size);
+
+ VkResult res = vkCreateBuffer(m_device.get(), &buf_ci, nullptr, &m_buffer);
+ if (res != VK_SUCCESS)
+ throw std::runtime_error("failed to create buffer.");
+
+ mem_type mt = find_memory_type(mem_props);
+
+ IXION_TRACE("memory type: (index=" << mt.index << "; size=" << mt.size << ")");
+
+ VkMemoryAllocateInfo mem_ai {};
+ mem_ai.sType = VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO;
+ mem_ai.allocationSize = mt.size;
+ mem_ai.memoryTypeIndex = mt.index;
+
+ res = vkAllocateMemory(m_device.get(), &mem_ai, nullptr, &m_memory);
+ if (res != VK_SUCCESS)
+ throw std::runtime_error("failed to allocate memory.");
+
+ res = vkBindBufferMemory(m_device.get(), m_buffer, m_memory, 0);
+ if (res != VK_SUCCESS)
+ throw std::runtime_error("failed to bind buffer to memory.");
+}
+
+vk_buffer::~vk_buffer()
+{
+ vkFreeMemory(m_device.get(), m_memory, nullptr);
+ vkDestroyBuffer(m_device.get(), m_buffer, nullptr);
+}
+
+VkBuffer& vk_buffer::get()
+{
+ return m_buffer;
+}
+
+const VkBuffer& vk_buffer::get() const
+{
+ return m_buffer;
+}
+
+void vk_buffer::write_to_memory(void* data, VkDeviceSize size)
+{
+ IXION_TRACE("copying data of size " << size);
+
+ VkDeviceSize padded_size = pad_to_atom_size(m_device, size);
+
+ void* mapped = nullptr;
+ VkResult res = vkMapMemory(m_device.get(), m_memory, 0, padded_size, 0, &mapped);
+ if (res != VK_SUCCESS)
+ throw std::runtime_error("failed to map memory.");
+
+ memcpy(mapped, data, size);
+
+ // flush the modified memory range.
+ VkMappedMemoryRange flush_range{};
+ flush_range.sType = VK_STRUCTURE_TYPE_MAPPED_MEMORY_RANGE;
+ flush_range.memory = m_memory;
+ flush_range.offset = 0;
+ flush_range.size = padded_size;
+ vkFlushMappedMemoryRanges(m_device.get(), 1, &flush_range);
+
+ vkUnmapMemory(m_device.get(), m_memory);
+}
+
+void vk_buffer::read_from_memory(void* data, VkDeviceSize size)
+{
+ IXION_TRACE("reading data from memory for size " << size << "...");
+
+ VkDeviceSize padded_size = pad_to_atom_size(m_device, size);
+
+ void *mapped;
+ vkMapMemory(m_device.get(), m_memory, 0, padded_size, 0, &mapped);
+
+ VkMappedMemoryRange invalidate_range{};
+ invalidate_range.sType = VK_STRUCTURE_TYPE_MAPPED_MEMORY_RANGE;
+ invalidate_range.memory = m_memory;
+ invalidate_range.offset = 0;
+ invalidate_range.size = padded_size;
+ vkInvalidateMappedMemoryRanges(m_device.get(), 1, &invalidate_range);
+
+ // Copy to output
+ memcpy(data, mapped, size);
+ vkUnmapMemory(m_device.get(), m_memory);
+}
+
+vk_fence::vk_fence(vk_device& device, VkFenceCreateFlags flags) :
+ m_device(device)
+{
+ VkFenceCreateInfo info{};
+ info.sType = VK_STRUCTURE_TYPE_FENCE_CREATE_INFO;
+ info.flags = flags;
+
+ vkCreateFence(m_device.get(), &info, nullptr, &m_fence);
+}
+
+vk_fence::~vk_fence()
+{
+ vkDestroyFence(m_device.get(), m_fence, nullptr);
+}
+
+VkFence& vk_fence::get()
+{
+ return m_fence;
+}
+
+void vk_fence::wait()
+{
+ VkResult res = vkWaitForFences(m_device.get(), 1, &m_fence, VK_TRUE, UINT64_MAX);
+ if (res != VK_SUCCESS)
+ throw std::runtime_error("failed to wait for a fence.");
+}
+
+void vk_fence::reset()
+{
+ vkResetFences(m_device.get(), 1, &m_fence);
+}
+
+vk_descriptor_pool::vk_descriptor_pool(
+ vk_device& device, uint32_t max_sets, std::initializer_list<VkDescriptorPoolSize> sizes) :
+ m_device(device)
+{
+ VkDescriptorPoolCreateInfo info{};
+ info.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO;
+ info.poolSizeCount = sizes.size();
+ info.pPoolSizes = sizes.begin();
+ info.maxSets = max_sets;
+
+ VkResult res = vkCreateDescriptorPool(m_device.get(), &info, nullptr, &m_pool);
+ if (res != VK_SUCCESS)
+ throw std::runtime_error("failed to create a descriptor pool.");
+}
+
+vk_descriptor_pool::~vk_descriptor_pool()
+{
+ vkDestroyDescriptorPool(m_device.get(), m_pool, nullptr);
+}
+
+vk_descriptor_set vk_descriptor_pool::allocate(const vk_descriptor_set_layout& ds_layout)
+{
+ VkDescriptorSetAllocateInfo ai{};
+ ai.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO;
+ ai.descriptorPool = m_pool;
+ ai.pSetLayouts = &ds_layout.get();
+ ai.descriptorSetCount = 1u;
+
+ VkDescriptorSet ds;
+ VkResult res = vkAllocateDescriptorSets(m_device.get(), &ai, &ds);
+ if (res != VK_SUCCESS)
+ throw std::runtime_error("failed to allocate a descriptor set.");
+
+ return vk_descriptor_set(ds);
+}
+
+vk_descriptor_set_layout::vk_descriptor_set_layout(
+ vk_device& device, std::initializer_list<VkDescriptorSetLayoutBinding> bindings) :
+ m_device(device)
+{
+ VkDescriptorSetLayoutCreateInfo info{};
+ info.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO;
+ info.pBindings = bindings.begin();
+ info.bindingCount = bindings.size();
+
+ VkResult res = vkCreateDescriptorSetLayout(m_device.get(), &info, nullptr, &m_ds_layout);
+ if (res != VK_SUCCESS)
+ throw std::runtime_error("failed to create a descriptor set layout.");
+}
+
+vk_descriptor_set_layout::~vk_descriptor_set_layout()
+{
+ vkDestroyDescriptorSetLayout(m_device.get(), m_ds_layout, nullptr);
+}
+
+VkDescriptorSetLayout& vk_descriptor_set_layout::get()
+{
+ return m_ds_layout;
+}
+
+const VkDescriptorSetLayout& vk_descriptor_set_layout::get() const
+{
+ return m_ds_layout;
+}
+
+vk_descriptor_set::vk_descriptor_set(VkDescriptorSet ds) :
+ m_set(ds) {}
+
+vk_descriptor_set::~vk_descriptor_set() {}
+
+VkDescriptorSet& vk_descriptor_set::get()
+{
+ return m_set;
+}
+
+const VkDescriptorSet& vk_descriptor_set::get() const
+{
+ return m_set;
+}
+
+void vk_descriptor_set::update(
+ const vk_device& device, uint32_t binding, VkDescriptorType type,
+ const vk_buffer& buffer)
+{
+ VkDescriptorBufferInfo buffer_desc = { buffer.get(), 0, VK_WHOLE_SIZE };
+
+ VkWriteDescriptorSet write_ds{};
+ write_ds.sType = VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET;
+ write_ds.dstSet = m_set;
+ write_ds.descriptorType = type;
+ write_ds.dstBinding = binding;
+ write_ds.pBufferInfo = &buffer_desc;
+ write_ds.descriptorCount = 1u;
+
+ vkUpdateDescriptorSets(device.get(), 1u, &write_ds, 0, nullptr);
+}
+
+vk_pipeline_layout::vk_pipeline_layout(
+ vk_device& device, vk_descriptor_set_layout& ds_layout) :
+ m_device(device)
+{
+ VkPipelineLayoutCreateInfo info{};
+ info.sType = VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO;
+ info.setLayoutCount = 1;
+ info.pSetLayouts = &ds_layout.get();
+
+ VkResult res = vkCreatePipelineLayout(m_device.get(), &info, nullptr, &m_layout);
+ if (res != VK_SUCCESS)
+ throw std::runtime_error("failed to create a pipeline layout.");
+}
+
+vk_pipeline_layout::~vk_pipeline_layout()
+{
+ vkDestroyPipelineLayout(m_device.get(), m_layout, nullptr);
+}
+
+VkPipelineLayout& vk_pipeline_layout::get()
+{
+ return m_layout;
+}
+
+const VkPipelineLayout& vk_pipeline_layout::get() const
+{
+ return m_layout;
+}
+
+vk_pipeline_cache::vk_pipeline_cache(vk_device& device) :
+ m_device(device)
+{
+ VkPipelineCacheCreateInfo info{};
+ info.sType = VK_STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO;
+ VkResult res = vkCreatePipelineCache(m_device.get(), &info, nullptr, &m_cache);
+ if (res != VK_SUCCESS)
+ throw std::runtime_error("failed to create a pipeline cache.");
+}
+
+vk_pipeline_cache::~vk_pipeline_cache()
+{
+ vkDestroyPipelineCache(m_device.get(), m_cache, nullptr);
+}
+
+VkPipelineCache& vk_pipeline_cache::get()
+{
+ return m_cache;
+}
+
+const VkPipelineCache& vk_pipeline_cache::get() const
+{
+ return m_cache;
+}
+
+vk_shader_module::vk_shader_module(vk_device& device, module_type mt) :
+ m_device(device)
+{
+ const uint32_t* array = nullptr;
+ std::size_t n_array = 0;
+
+ switch (mt)
+ {
+ case module_type::fibonacci:
+ {
+ array = reinterpret_cast<const uint32_t*>(fibonacci_spirv);
+ n_array = std::size(fibonacci_spirv);
+
+ IXION_TRACE("module type: fibonacci (size=" << n_array << ")");
+
+ break;
+ }
+ default:
+ throw std::runtime_error("invalid module type");
+ }
+
+ VkShaderModuleCreateInfo ci{};
+ ci.sType = VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO;
+ ci.codeSize = n_array;
+ ci.pCode = array;
+
+ VkResult res = vkCreateShaderModule(m_device.get(), &ci, NULL, &m_module);
+ if (res != VK_SUCCESS)
+ throw std::runtime_error("failed to create a shader module.");
+}
+
+vk_shader_module::~vk_shader_module()
+{
+ vkDestroyShaderModule(m_device.get(), m_module, nullptr);
+}
+
+VkShaderModule& vk_shader_module::get()
+{
+ return m_module;
+}
+
+const VkShaderModule& vk_shader_module::get() const
+{
+ return m_module;
+}
+
+vk_pipeline::vk_pipeline(
+ const runtime_context& cxt, vk_device& device, vk_pipeline_layout& pl_layout,
+ vk_pipeline_cache& pl_cache, vk_shader_module& shader) :
+ m_device(device)
+{
+ struct sp_data_type
+ {
+ uint32_t BUFFER_ELEMENTS;
+ };
+
+ sp_data_type sp_data;
+ sp_data.BUFFER_ELEMENTS = cxt.input_buffer_size;
+
+ VkSpecializationMapEntry sp_map_entry{};
+ sp_map_entry.constantID = 0;
+ sp_map_entry.offset = 0;
+ sp_map_entry.size = sizeof(uint32_t);
+
+ VkSpecializationInfo sp_info{};
+ sp_info.mapEntryCount = 1;
+ sp_info.pMapEntries = &sp_map_entry;
+ sp_info.dataSize = sizeof(sp_data_type);
+ sp_info.pData = &sp_data;
+
+ // Data about the shader module, with special constant data via specialiation
+ // info member.
+ VkPipelineShaderStageCreateInfo shader_stage_ci{};
+ shader_stage_ci.sType = VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO;
+ shader_stage_ci.stage = VK_SHADER_STAGE_COMPUTE_BIT;
+ shader_stage_ci.module = shader.get();
+ shader_stage_ci.pName = "main";
+ shader_stage_ci.pSpecializationInfo = &sp_info;
+
+ VkComputePipelineCreateInfo pipeline_ci{};
+ pipeline_ci.sType = VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO;
+ pipeline_ci.layout = pl_layout.get();
+ pipeline_ci.flags = 0;
+ pipeline_ci.stage = shader_stage_ci;
+
+ vkCreateComputePipelines(
+ m_device.get(), pl_cache.get(), 1, &pipeline_ci, nullptr, &m_pipeline);
+}
+
+vk_pipeline::~vk_pipeline()
+{
+ vkDestroyPipeline(m_device.get(), m_pipeline, nullptr);
+}
+
+VkPipeline& vk_pipeline::get()
+{
+ return m_pipeline;
+}
+
+const VkPipeline& vk_pipeline::get() const
+{
+ return m_pipeline;
+}
+
+}}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/src/libixion/vulkan_obj.hpp b/src/libixion/vulkan_obj.hpp
new file mode 100644
index 0000000..498efa8
--- /dev/null
+++ b/src/libixion/vulkan_obj.hpp
@@ -0,0 +1,319 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef INCLUDED_IXION_VULKAN_OBJ_HPP
+#define INCLUDED_IXION_VULKAN_OBJ_HPP
+
+#include <vulkan/vulkan.h>
+#include <memory>
+#include <limits>
+
+namespace ixion { namespace draft {
+
+template<typename T, typename U = void>
+struct null_value;
+
+template<typename T>
+struct null_value<T, typename std::enable_if<std::is_pointer<T>::value>::type>
+{
+ static constexpr std::nullptr_t value = nullptr;
+};
+
+template<typename T>
+struct null_value<T, typename std::enable_if<std::is_integral<T>::value>::type>
+{
+ static constexpr T value = 0;
+};
+
+struct runtime_context
+{
+ uint32_t input_buffer_size = 0;
+};
+
+class vk_buffer;
+class vk_command_buffer;
+class vk_command_pool;
+class vk_descriptor_set;
+class vk_descriptor_set_layout;
+class vk_fence;
+class vk_pipeline;
+class vk_pipeline_layout;
+
+class vk_instance
+{
+ VkInstance m_instance = null_value<VkInstance>::value;
+ VkDebugUtilsMessengerEXT m_debug_messenger = null_value<VkDebugUtilsMessengerEXT>::value;
+
+public:
+ vk_instance();
+ ~vk_instance();
+
+ VkInstance& get();
+};
+
+class vk_queue
+{
+ VkQueue m_queue;
+
+public:
+ vk_queue(VkQueue queue);
+ ~vk_queue();
+
+ void submit(vk_command_buffer& cmd, vk_fence& fence, VkPipelineStageFlags dst_stages = 0);
+
+ void wait_idle();
+};
+
+class vk_device
+{
+ friend class vk_command_pool;
+ friend class vk_buffer;
+
+ static constexpr uint32_t QUEUE_FAMILY_NOT_SET = std::numeric_limits<uint32_t>::max();
+
+ VkPhysicalDevice m_physical_device = null_value<VkPhysicalDevice>::value;
+ VkPhysicalDeviceProperties m_physical_device_props;
+ VkDevice m_device = null_value<VkDevice>::value;
+ uint32_t m_queue_family_index = QUEUE_FAMILY_NOT_SET;
+ VkQueue m_queue = null_value<VkQueue>::value;
+
+ uint32_t get_queue_family_index() const
+ {
+ return m_queue_family_index;
+ }
+
+public:
+ vk_device(vk_instance& instance);
+ ~vk_device();
+
+ VkDevice& get();
+ const VkDevice& get() const;
+
+ VkPhysicalDevice get_physical_device();
+
+ const VkPhysicalDeviceLimits& get_physical_device_limits() const;
+
+ vk_queue get_queue();
+};
+
+class vk_command_pool
+{
+ friend class vk_command_buffer;
+
+ VkDevice m_device = null_value<VkDevice>::value;
+ VkCommandPool m_cmd_pool = null_value<VkCommandPool>::value;
+
+ VkDevice& get_device();
+ VkCommandPool& get();
+
+public:
+ vk_command_pool(vk_device& device);
+ ~vk_command_pool();
+
+ vk_command_buffer create_command_buffer();
+};
+
+class vk_command_buffer
+{
+ friend class vk_command_pool;
+
+ vk_command_pool& m_cmd_pool;
+ VkCommandBuffer m_cmd_buffer = null_value<VkCommandBuffer>::value;
+
+ vk_command_buffer(vk_command_pool& cmd_pool);
+
+public:
+ ~vk_command_buffer();
+
+ VkCommandBuffer& get();
+
+ void begin();
+ void end();
+
+ void copy_buffer(vk_buffer& src, vk_buffer& dst, VkDeviceSize size);
+
+ void buffer_memory_barrier(
+ const vk_buffer& buffer, VkAccessFlags src_access, VkAccessFlags dst_access,
+ VkPipelineStageFlagBits src_stage, VkPipelineStageFlagBits dst_stage);
+
+ void bind_pipeline(const vk_pipeline& pipeline, VkPipelineBindPoint bind_point);
+
+ void bind_descriptor_set(
+ VkPipelineBindPoint bind_point, const vk_pipeline_layout& pl_layout,
+ const vk_descriptor_set& desc_set);
+
+ void dispatch(uint32_t gc_x, uint32_t gc_y, uint32_t gc_z);
+};
+
+class vk_buffer
+{
+ vk_device& m_device;
+ VkBuffer m_buffer = null_value<VkBuffer>::value;
+ VkDeviceMemory m_memory = null_value<VkDeviceMemory>::value;
+
+ struct mem_type
+ {
+ uint32_t index;
+ VkDeviceSize size;
+ };
+
+ /**
+ * Find a suitable device memory type that can be used to store data for
+ * the buffer.
+ *
+ * @param mem_props desired memory properties.
+ *
+ * @return mem_type memory type as an index into the list of device memory
+ * types, and the memory size as required by the buffer.
+ */
+ mem_type find_memory_type(VkMemoryPropertyFlags mem_props) const;
+
+public:
+ vk_buffer(vk_device& device, VkDeviceSize size, VkBufferUsageFlags usage, VkMemoryPropertyFlags mem_props);
+ ~vk_buffer();
+
+ VkBuffer& get();
+ const VkBuffer& get() const;
+
+ void write_to_memory(void* data, VkDeviceSize size);
+
+ void read_from_memory(void* data, VkDeviceSize size);
+};
+
+class vk_fence
+{
+ vk_device& m_device;
+ VkFence m_fence = null_value<VkFence>::value;
+
+public:
+ vk_fence(vk_device& device, VkFenceCreateFlags flags);
+ ~vk_fence();
+
+ VkFence& get();
+
+ void wait();
+ void reset();
+};
+
+class vk_descriptor_pool
+{
+ vk_device& m_device;
+ VkDescriptorPool m_pool = null_value<VkDescriptorPool>::value;
+
+public:
+ vk_descriptor_pool(vk_device& device, uint32_t max_sets, std::initializer_list<VkDescriptorPoolSize> sizes);
+ ~vk_descriptor_pool();
+
+ vk_descriptor_set allocate(const vk_descriptor_set_layout& ds_layout);
+};
+
+class vk_descriptor_set_layout
+{
+ vk_device& m_device;
+ VkDescriptorSetLayout m_ds_layout = null_value<VkDescriptorSetLayout>::value;
+
+public:
+ vk_descriptor_set_layout(vk_device& device, std::initializer_list<VkDescriptorSetLayoutBinding> bindings);
+ ~vk_descriptor_set_layout();
+
+ VkDescriptorSetLayout& get();
+ const VkDescriptorSetLayout& get() const;
+};
+
+/**
+ * Descriptor set contains a collection of descriptors. Think of a
+ * descriptor as a handle into a resource, which can be a buffer or an
+ * image.
+ *
+ * @see https://vkguide.dev/docs/chapter-4/descriptors/
+ *
+ */
+class vk_descriptor_set
+{
+ friend class vk_descriptor_pool;
+ VkDescriptorSet m_set = null_value<VkDescriptorSet>::value;
+
+ vk_descriptor_set(VkDescriptorSet ds);
+public:
+ ~vk_descriptor_set();
+
+ VkDescriptorSet& get();
+ const VkDescriptorSet& get() const;
+
+ /**
+ * Update the descriptor set with the content of the device local buffer.
+ *
+ * @param device logical device
+ * @param binding binding position
+ * @param type descriptor type.
+ * @param buffer device local buffer to get the content from.
+ */
+ void update(const vk_device& device, uint32_t binding, VkDescriptorType type, const vk_buffer& buffer);
+};
+
+class vk_pipeline_layout
+{
+ vk_device& m_device;
+ VkPipelineLayout m_layout = null_value<VkPipelineLayout>::value;
+
+public:
+ vk_pipeline_layout(vk_device& device, vk_descriptor_set_layout& ds_layout);
+ ~vk_pipeline_layout();
+
+ VkPipelineLayout& get();
+ const VkPipelineLayout& get() const;
+};
+
+class vk_pipeline_cache
+{
+ vk_device& m_device;
+ VkPipelineCache m_cache = null_value<VkPipelineCache>::value;
+
+public:
+ vk_pipeline_cache(vk_device& device);
+ ~vk_pipeline_cache();
+
+ VkPipelineCache& get();
+ const VkPipelineCache& get() const;
+};
+
+class vk_shader_module
+{
+ vk_device& m_device;
+ VkShaderModule m_module = null_value<VkShaderModule>::value;
+
+public:
+ enum class module_type { fibonacci };
+
+ vk_shader_module(vk_device& device, module_type mt);
+ ~vk_shader_module();
+
+ VkShaderModule& get();
+ const VkShaderModule& get() const;
+};
+
+class vk_pipeline
+{
+ vk_device& m_device;
+ VkPipeline m_pipeline = null_value<VkPipeline>::value;
+
+public:
+ vk_pipeline(
+ const runtime_context& cxt, vk_device& device, vk_pipeline_layout& pl_layout,
+ vk_pipeline_cache& pl_cache, vk_shader_module& shader);
+
+ ~vk_pipeline();
+
+ VkPipeline& get();
+ const VkPipeline& get() const;
+};
+
+}}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/src/libixion/workbook.cpp b/src/libixion/workbook.cpp
new file mode 100644
index 0000000..7fd7328
--- /dev/null
+++ b/src/libixion/workbook.cpp
@@ -0,0 +1,55 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include "ixion/global.hpp"
+
+#include "workbook.hpp"
+
+namespace ixion {
+
+worksheet::worksheet() {}
+
+worksheet::worksheet(size_t row_size, size_t col_size)
+{
+ m_pos_hints.reserve(col_size);
+ for (size_t i = 0; i < col_size; ++i)
+ {
+ m_columns.emplace_back(row_size);
+ m_pos_hints.push_back(m_columns.back().begin());
+ }
+}
+
+worksheet::~worksheet() {}
+
+workbook::workbook() {}
+
+workbook::workbook(size_t sheet_size, size_t row_size, size_t col_size)
+{
+ for (size_t i = 0; i < sheet_size; ++i)
+ m_sheets.emplace_back(row_size, col_size);
+}
+
+workbook::~workbook() {}
+
+void workbook::push_back(size_t row_size, size_t col_size)
+{
+ m_sheets.emplace_back(row_size, col_size);
+}
+
+size_t workbook::size() const
+{
+ return m_sheets.size();
+}
+
+bool workbook::empty() const
+{
+ return m_sheets.empty();
+}
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/src/libixion/workbook.hpp b/src/libixion/workbook.hpp
new file mode 100644
index 0000000..453e989
--- /dev/null
+++ b/src/libixion/workbook.hpp
@@ -0,0 +1,78 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef INCLUDED_IXION_WORKBOOK_HPP
+#define INCLUDED_IXION_WORKBOOK_HPP
+
+#include "column_store_type.hpp"
+#include "model_types.hpp"
+
+#include <vector>
+
+namespace ixion {
+
+class worksheet
+{
+public:
+ typedef column_store_t::size_type size_type;
+
+ worksheet();
+ worksheet(size_type row_size, size_type col_size);
+ ~worksheet();
+
+ column_store_t& operator[](size_type n) { return m_columns[n]; }
+ const column_store_t& operator[](size_type n) const { return m_columns[n]; }
+
+ column_store_t& at(size_type n) { return m_columns.at(n); }
+ const column_store_t& at(size_type n) const { return m_columns.at(n); }
+
+ column_store_t::iterator& get_pos_hint(size_type n) { return m_pos_hints.at(n); }
+
+ /**
+ * Return the number of columns.
+ *
+ * @return number of columns.
+ */
+ size_type size() const { return m_columns.size(); }
+
+ const column_stores_t& get_columns() const { return m_columns; }
+
+ detail::named_expressions_t& get_named_expressions() { return m_named_expressions; }
+ const detail::named_expressions_t& get_named_expressions() const { return m_named_expressions; }
+
+private:
+ column_stores_t m_columns;
+ std::vector<column_store_t::iterator> m_pos_hints;
+ detail::named_expressions_t m_named_expressions;
+};
+
+class workbook
+{
+public:
+ workbook();
+ workbook(size_t sheet_size, size_t row_size, size_t col_size);
+ ~workbook();
+
+ worksheet& operator[](size_t n) { return m_sheets[n]; }
+ const worksheet& operator[](size_t n) const { return m_sheets[n]; }
+
+ worksheet& at(size_t n) { return m_sheets.at(n); }
+ const worksheet& at(size_t n) const { return m_sheets.at(n); }
+
+ void push_back(size_t row_size, size_t col_size);
+
+ size_t size() const;
+ bool empty() const;
+
+private:
+ std::deque<worksheet> m_sheets;
+};
+
+}
+
+#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/src/model_parser.cpp b/src/model_parser.cpp
new file mode 100644
index 0000000..fcabbcf
--- /dev/null
+++ b/src/model_parser.cpp
@@ -0,0 +1,1203 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include "model_parser.hpp"
+#include "app_common.hpp"
+
+#include "ixion/formula.hpp"
+#include "ixion/formula_name_resolver.hpp"
+#include "ixion/formula_result.hpp"
+#include "ixion/macros.hpp"
+#include "ixion/address_iterator.hpp"
+#include "ixion/dirty_cell_tracker.hpp"
+#include "ixion/cell_access.hpp"
+#include "ixion/config.hpp"
+#include "ixion/cell.hpp"
+
+#include <sstream>
+#include <iostream>
+#include <vector>
+#include <functional>
+#include <cstring>
+#include <cassert>
+#include <memory>
+
+#include <mdds/sorted_string_map.hpp>
+
+using namespace std;
+
+#define DEBUG_MODEL_PARSER 0
+
+namespace ixion {
+
+namespace {
+
+long to_long(std::string_view value)
+{
+ char* pe = nullptr;
+ long ret = std::strtol(value.data(), &pe, 10);
+
+ if (value.data() == pe)
+ {
+ std::ostringstream os;
+ os << "'" << value << "' is not a valid integer.";
+ throw model_parser::parse_error(os.str());
+ }
+
+ return ret;
+}
+
+bool is_separator(char c)
+{
+ switch (c)
+ {
+ case '=':
+ case ':':
+ case '@':
+ return true;
+ default:
+ ;
+ }
+
+ return false;
+}
+
+std::string_view parse_command_to_buffer(const char*& p, const char* p_end)
+{
+ ++p; // skip '%'.
+ std::size_t n = 1;
+
+ if (*p == '%')
+ {
+ // This line is a comment. Skip the rest of the line.
+ std::string_view ret{p, n}; // return it as command named '%'
+ while (p != p_end && *p != '\n') ++p;
+ return ret;
+ }
+
+ auto* p_head = p;
+ for (++p; p != p_end && *p != '\n'; ++p)
+ ++n;
+
+ return std::string_view{p_head, n};
+}
+
+class string_printer
+{
+ const model_context& m_cxt;
+ char m_sep;
+ bool m_first;
+
+public:
+ string_printer(const model_context& cxt, char sep) :
+ m_cxt(cxt), m_sep(sep), m_first(true) {}
+
+ void operator() (string_id_t sid)
+ {
+ if (m_first)
+ m_first = false;
+ else
+ cout << m_sep;
+
+ const std::string* p = m_cxt.get_string(sid);
+ if (p)
+ cout << *p;
+ }
+};
+
+void print_section_title(const char* title)
+{
+ std::cout << detail::get_formula_result_output_separator() << std::endl << title << std::endl;
+}
+
+namespace commands {
+
+enum class type
+{
+ unknown,
+ comment,
+ calc,
+ recalc,
+ check,
+ exit,
+ push,
+ mode_init,
+ mode_edit,
+ mode_result,
+ mode_result_cache,
+ mode_table,
+ mode_session,
+ mode_named_expression,
+ print_dependency,
+};
+
+typedef mdds::sorted_string_map<type> map_type;
+
+// Keys must be sorted.
+const std::vector<map_type::entry> entries =
+{
+ { IXION_ASCII("%"), type::comment },
+ { IXION_ASCII("calc"), type::calc },
+ { IXION_ASCII("check"), type::check },
+ { IXION_ASCII("exit"), type::exit },
+ { IXION_ASCII("mode edit"), type::mode_edit },
+ { IXION_ASCII("mode init"), type::mode_init },
+ { IXION_ASCII("mode named-expression"), type::mode_named_expression },
+ { IXION_ASCII("mode result"), type::mode_result },
+ { IXION_ASCII("mode result-cache"), type::mode_result_cache },
+ { IXION_ASCII("mode session"), type::mode_session },
+ { IXION_ASCII("mode table"), type::mode_table },
+ { IXION_ASCII("print dependency"), type::print_dependency },
+ { IXION_ASCII("push"), type::push },
+ { IXION_ASCII("recalc"), type::recalc },
+};
+
+const map_type& get()
+{
+ static map_type mt(entries.data(), entries.size(), type::unknown);
+ return mt;
+}
+
+} // namespace commands
+
+} // anonymous namespace
+
+model_parser::parse_error::parse_error(const string& msg) : general_error()
+{
+ ostringstream os;
+ os << "parse error: " << msg;
+ set_message(os.str());
+}
+
+// ============================================================================
+
+model_parser::check_error::check_error(const string& msg) :
+ general_error(msg) {}
+
+// ============================================================================
+
+model_parser::model_parser(const string& filepath, size_t thread_count) :
+ m_context({1048576, 1024}),
+ m_table_handler(),
+ m_session_handler_factory(m_context),
+ mp_table_entry(nullptr),
+ mp_name_resolver(formula_name_resolver::get(formula_name_resolver_t::excel_a1, &m_context)),
+ m_filepath(filepath),
+ m_strm(detail::load_file_content(m_filepath)),
+ m_thread_count(thread_count),
+ mp_head(nullptr),
+ mp_end(nullptr),
+ mp_char(nullptr),
+ m_current_sheet(0),
+ m_parse_mode(parse_mode_unknown),
+ m_print_separator(false),
+ m_print_sheet_name(false)
+{
+ m_context.set_session_handler_factory(&m_session_handler_factory);
+ m_context.set_table_handler(&m_table_handler);
+
+ mp_head = m_strm.data();
+ mp_end = mp_head + m_strm.size();
+}
+
+model_parser::~model_parser() {}
+
+void model_parser::parse()
+{
+ mp_char = mp_head;
+ m_parse_mode = parse_mode_unknown;
+
+ for (; mp_char != mp_end; ++mp_char)
+ {
+ // In each iteration, the p always points to the 1st character of a
+ // line.
+ if (*mp_char== '%')
+ {
+ parse_command();
+ if (m_parse_mode == parse_mode_exit)
+ return;
+ continue;
+ }
+
+ if (m_print_separator)
+ {
+ m_print_separator = false;
+ cout << detail::get_formula_result_output_separator() << endl;
+ }
+
+ switch (m_parse_mode)
+ {
+ case parse_mode_init:
+ parse_init();
+ break;
+ case parse_mode_edit:
+ parse_edit();
+ break;
+ case parse_mode_result:
+ parse_result();
+ break;
+ case parse_mode_result_cache:
+ parse_result_cache();
+ break;
+ case parse_mode_table:
+ parse_table();
+ break;
+ case parse_mode_session:
+ parse_session();
+ break;
+ case parse_mode_named_expression:
+ parse_named_expression();
+ break;
+ default:
+ throw parse_error("unknown parse mode");
+ }
+ }
+}
+
+void model_parser::init_model()
+{
+ if (m_context.empty())
+ m_context.append_sheet("sheet");
+}
+
+void model_parser::parse_command()
+{
+ // This line contains a command.
+ std::string_view buf_cmd = parse_command_to_buffer(mp_char, mp_end);
+ commands::type cmd = commands::get().find(buf_cmd.data(), buf_cmd.size());
+
+ switch (cmd)
+ {
+ case commands::type::comment:
+ // This is a comment line. Just ignore it.
+ break;
+ case commands::type::calc:
+ {
+ print_section_title("calculating");
+
+ // Perform full calculation on all currently stored formula cells.
+
+ for (const abs_range_t& pos : m_dirty_formula_cells)
+ register_formula_cell(m_context, pos.first);
+
+ abs_range_set_t empty;
+ std::vector<abs_range_t> sorted_cells =
+ query_and_sort_dirty_cells(m_context, empty, &m_dirty_formula_cells);
+ calculate_sorted_cells(m_context, sorted_cells, m_thread_count);
+ break;
+ }
+ case commands::type::recalc:
+ {
+ print_section_title("recalculating");
+
+ // Perform partial recalculation only on those formula cells that
+ // need recalculation.
+
+ std::vector<abs_range_t> sorted_cells =
+ query_and_sort_dirty_cells(m_context, m_modified_cells, &m_dirty_formula_cells);
+
+ calculate_sorted_cells(m_context, sorted_cells, m_thread_count);
+ break;
+ }
+ case commands::type::check:
+ {
+ // Check cell results.
+ check();
+ break;
+ }
+ case commands::type::exit:
+ {
+ // Exit the loop.
+ m_parse_mode = parse_mode_exit;
+ return;
+ }
+ case commands::type::push:
+ {
+ switch (m_parse_mode)
+ {
+ case parse_mode_table:
+ push_table();
+ break;
+ case parse_mode_named_expression:
+ push_named_expression();
+ break;
+ default:
+ throw parse_error("push command was used for wrong mode!");
+ }
+ break;
+ }
+ case commands::type::mode_init:
+ {
+ print_section_title("initializing");
+
+ m_parse_mode = parse_mode_init;
+ m_print_separator = true;
+ break;
+ }
+ case commands::type::mode_result:
+ {
+ // Clear any previous result values.
+ m_formula_results.clear();
+ m_parse_mode = parse_mode_result;
+ break;
+ }
+ case commands::type::mode_result_cache:
+ {
+ print_section_title("caching formula results");
+
+ m_parse_mode = parse_mode_result_cache;
+ m_print_separator = true;
+ break;
+ }
+ case commands::type::mode_edit:
+ {
+ print_section_title("editing");
+
+ m_parse_mode = parse_mode_edit;
+ m_dirty_formula_cells.clear();
+ m_modified_cells.clear();
+ m_print_separator = true;
+ break;
+ }
+ case commands::type::mode_table:
+ {
+ m_parse_mode = parse_mode_table;
+ mp_table_entry.reset(new table_handler::entry);
+ break;
+ }
+ case commands::type::mode_session:
+ {
+ print_section_title("session");
+
+ m_print_separator = true;
+ m_parse_mode = parse_mode_session;
+ break;
+ }
+ case commands::type::mode_named_expression:
+ {
+ m_print_separator = true;
+ m_parse_mode = parse_mode_named_expression;
+ mp_named_expression = std::make_unique<named_expression_type>();
+ break;
+ }
+ case commands::type::print_dependency:
+ {
+ print_section_title("print dependency");
+ print_dependency();
+ break;
+ }
+ case commands::type::unknown:
+ {
+ ostringstream os;
+ os << "unknown command: " << buf_cmd << endl;
+ throw parse_error(os.str());
+ }
+ default:
+ ;
+ }
+}
+
+void model_parser::parse_session()
+{
+ std::string_view cmd, value;
+ std::string_view* buf = &cmd;
+
+ for (; mp_char != mp_end && *mp_char != '\n'; ++mp_char)
+ {
+ if (*mp_char == ':')
+ {
+ if (buf == &value)
+ throw parse_error("2nd ':' character is illegal.");
+
+ buf = &value;
+ continue;
+ }
+
+ if (buf->empty())
+ *buf = std::string_view{mp_char, 1u};
+ else
+ *buf = std::string_view{buf->data(), buf->size() + 1u};
+ }
+
+ if (cmd == "row-limit")
+ {
+ rc_size_t ss = m_context.get_sheet_size();
+ ss.row = to_long(value);
+ m_context.set_sheet_size(ss);
+ }
+ else if (cmd == "column-limit")
+ {
+ rc_size_t ss = m_context.get_sheet_size();
+ ss.column = to_long(value);
+ m_context.set_sheet_size(ss);
+ }
+ else if (cmd == "insert-sheet")
+ {
+ m_context.append_sheet(std::string{value});
+ cout << "sheet: (name: " << value << ")" << endl;
+ }
+ else if (cmd == "current-sheet")
+ {
+ m_current_sheet = m_context.get_sheet_index(value);
+
+ if (m_current_sheet == invalid_sheet)
+ {
+ ostringstream os;
+ os << "No sheet named '" << value << "' found.";
+ throw parse_error(os.str());
+ }
+
+ cout << "current sheet: " << value << endl;
+ }
+ else if (cmd == "display-sheet-name")
+ {
+ cout << "display sheet name: " << value << endl;
+ m_print_sheet_name = to_bool(value);
+ m_session_handler_factory.show_sheet_name(m_print_sheet_name);
+ }
+}
+
+void model_parser::parse_init()
+{
+ init_model();
+
+ cell_def_type cell_def = parse_cell_definition();
+ if (cell_def.name.empty() && cell_def.value.empty())
+ return;
+
+ if (cell_def.matrix_value)
+ {
+ assert(cell_def.type == ct_formula);
+ const abs_address_t& pos = cell_def.pos.first;
+
+ formula_tokens_t tokens =
+ parse_formula_string(m_context, pos, *mp_name_resolver, cell_def.value);
+
+ m_context.set_grouped_formula_cells(cell_def.pos, std::move(tokens));
+ m_dirty_formula_cells.insert(cell_def.pos);
+
+ std::cout << "{" << get_display_range_string(cell_def.pos) << "}: (m) " << cell_def.value << std::endl;
+ return;
+ }
+
+ abs_address_iterator iter(cell_def.pos, rc_direction_t::vertical);
+
+ for (const abs_address_t& pos : iter)
+ {
+ m_modified_cells.insert(pos);
+
+ switch (cell_def.type)
+ {
+ case ct_formula:
+ {
+ formula_tokens_t tokens =
+ parse_formula_string(m_context, pos, *mp_name_resolver, cell_def.value);
+
+ auto ts = formula_tokens_store::create();
+ ts->get() = std::move(tokens);
+ m_context.set_formula_cell(pos, ts);
+ m_dirty_formula_cells.insert(pos);
+
+ std::cout << get_display_cell_string(pos) << ": (f) " << cell_def.value << std::endl;
+ break;
+ }
+ case ct_string:
+ {
+ m_context.set_string_cell(pos, cell_def.value);
+
+ std::cout << get_display_cell_string(pos) << ": (s) " << cell_def.value << std::endl;
+ break;
+ }
+ case ct_value:
+ {
+ double v = to_double(cell_def.value);
+ m_context.set_numeric_cell(pos, v);
+
+ std::cout << get_display_cell_string(pos) << ": (n) " << v << std::endl;
+ break;
+ }
+ case ct_boolean:
+ {
+ bool b = to_bool(cell_def.value);
+ m_context.set_boolean_cell(pos, b);
+
+ std::cout << get_display_cell_string(pos) << ": (b) " << (b ? "true" : "false") << std::endl;
+ break;
+ }
+ default:
+ throw model_parser::parse_error("unknown content type");
+ }
+ }
+}
+
+void model_parser::parse_edit()
+{
+ cell_def_type cell_def = parse_cell_definition();
+ if (cell_def.name.empty() && cell_def.value.empty())
+ return;
+
+ if (cell_def.matrix_value)
+ {
+ assert(cell_def.type == ct_formula);
+ const abs_address_t& pos = cell_def.pos.first;
+
+ m_modified_cells.insert(pos);
+ unregister_formula_cell(m_context, pos);
+
+ formula_tokens_t tokens =
+ parse_formula_string(m_context, pos, *mp_name_resolver, cell_def.value);
+
+ m_context.set_grouped_formula_cells(cell_def.pos, std::move(tokens));
+ m_dirty_formula_cells.insert(cell_def.pos);
+ register_formula_cell(m_context, pos);
+ return;
+ }
+
+ abs_address_iterator iter(cell_def.pos, rc_direction_t::vertical);
+
+ for (const abs_address_t& pos : iter)
+ {
+ m_modified_cells.insert(pos);
+ unregister_formula_cell(m_context, pos);
+
+ if (cell_def.value.empty())
+ {
+ // A valid name is given but with empty definition. Just remove the
+ // existing cell.
+ m_context.empty_cell(pos);
+ continue;
+ }
+
+ switch (cell_def.type)
+ {
+ case ct_formula:
+ {
+ formula_tokens_t tokens =
+ parse_formula_string(m_context, pos, *mp_name_resolver, cell_def.value);
+
+ auto ts = formula_tokens_store::create();
+ ts->get() = std::move(tokens);
+ m_context.set_formula_cell(pos, ts);
+ m_dirty_formula_cells.insert(pos);
+ register_formula_cell(m_context, pos);
+ std::cout << get_display_cell_string(pos) << ": (f) " << cell_def.value << std::endl;
+ break;
+ }
+ case ct_string:
+ {
+ m_context.set_string_cell(pos, cell_def.value);
+ std::cout << get_display_cell_string(pos) << ": (s) " << cell_def.value << std::endl;
+ break;
+ }
+ case ct_value:
+ {
+ double v = to_double(cell_def.value);
+ m_context.set_numeric_cell(pos, v);
+ std::cout << get_display_cell_string(pos) << ": (n) " << v << std::endl;
+ break;
+ }
+ default:
+ throw model_parser::parse_error("unknown content type");
+ }
+ }
+}
+
+void model_parser::parse_result()
+{
+ parsed_assignment_type res = parse_assignment();
+
+ auto name_s = std::string{res.first};
+
+ formula_result fres;
+ fres.parse(res.second);
+ model_parser::results_type::iterator itr = m_formula_results.find(name_s);
+ if (itr == m_formula_results.end())
+ {
+ // This cell doesn't exist yet.
+ pair<model_parser::results_type::iterator, bool> r =
+ m_formula_results.insert(model_parser::results_type::value_type(name_s, fres));
+ if (!r.second)
+ throw model_parser::parse_error("failed to insert a new result.");
+ }
+ else
+ itr->second = fres;
+}
+
+void model_parser::parse_result_cache()
+{
+ parsed_assignment_type res = parse_assignment();
+
+ auto name_s = std::string{res.first};
+
+ formula_result fres;
+ fres.parse(res.second);
+
+ formula_name_t fnt = mp_name_resolver->resolve(name_s, abs_address_t(m_current_sheet,0,0));
+
+ switch (fnt.type)
+ {
+ case formula_name_t::cell_reference:
+ {
+ abs_address_t pos = std::get<address_t>(fnt.value).to_abs(abs_address_t());
+ formula_cell* fc = m_context.get_formula_cell(pos);
+ if (!fc)
+ {
+ std::ostringstream os;
+ os << name_s << " is not a formula cell";
+ throw model_parser::parse_error(name_s);
+ }
+
+ fc->set_result_cache(fres);
+
+ cout << get_display_cell_string(pos) << ": " << fres.str(m_context) << endl;
+ break;
+ }
+ case formula_name_t::range_reference:
+ throw model_parser::parse_error("TODO: we do not support setting result cache to range just yet.");
+ default:
+ {
+ std::ostringstream os;
+ os << "invalid cell name: " << name_s;
+ throw model_parser::parse_error(os.str());
+ }
+ }
+}
+
+void model_parser::parse_table()
+{
+ assert(mp_table_entry);
+
+ // In table mode, each line must be attribute=value.
+ parsed_assignment_type res = parse_assignment();
+ const auto [name, value] = res;
+// const std::string_view name = res.first;
+// const std::string_view value = res.second;
+
+ table_handler::entry& entry = *mp_table_entry;
+
+ if (name == "name")
+ entry.name = m_context.add_string(value);
+ else if (name == "range")
+ {
+ if (!mp_name_resolver)
+ return;
+
+ abs_address_t pos(m_current_sheet,0,0);
+ formula_name_t ret = mp_name_resolver->resolve(value, pos);
+ if (ret.type != formula_name_t::range_reference)
+ throw parse_error("range of a table is expected to be given as a range reference.");
+
+ entry.range = std::get<range_t>(ret.value).to_abs(pos);
+ }
+ else if (name == "columns")
+ parse_table_columns(value);
+ else if (name == "totals-row-count")
+ entry.totals_row_count = to_double(value);
+}
+
+void model_parser::push_table()
+{
+ cout << detail::get_formula_result_output_separator() << endl;
+
+ if (!mp_table_entry)
+ return;
+
+ table_handler::entry& entry = *mp_table_entry;
+
+ const string* ps = m_context.get_string(entry.name);
+ if (ps)
+ cout << "name: " << *ps << endl;
+
+ if (mp_name_resolver)
+ cout << "range: " << mp_name_resolver->get_name(entry.range, abs_address_t(m_current_sheet,0,0), false) << endl;
+
+ cout << "columns: ";
+ std::for_each(entry.columns.begin(), entry.columns.end(), string_printer(m_context, ','));
+ cout << endl;
+
+ cout << "totals row count: " << mp_table_entry->totals_row_count << endl;
+ m_table_handler.insert(mp_table_entry);
+ assert(!mp_table_entry);
+}
+
+void model_parser::parse_named_expression()
+{
+ assert(mp_named_expression);
+
+ parsed_assignment_type res = parse_assignment();
+ if (res.first == "name")
+ mp_named_expression->name = std::string{res.second};
+ else if (res.first == "expression")
+ mp_named_expression->expression = std::string{res.second};
+ else if (res.first == "origin")
+ {
+ const std::string_view s = res.second;
+
+ formula_name_t name =
+ mp_name_resolver->resolve(s, abs_address_t(m_current_sheet,0,0));
+
+ if (name.type != formula_name_t::name_type::cell_reference)
+ {
+ std::ostringstream os;
+ os << "'" << s << "' is not a valid named expression origin.";
+ throw parse_error(os.str());
+ }
+
+ mp_named_expression->origin = std::get<address_t>(name.value).to_abs(abs_address_t(m_current_sheet,0,0));
+ }
+ else if (res.first == "scope")
+ {
+ // Resolve it as a sheet name and store the sheet index if found.
+ mp_named_expression->scope = m_context.get_sheet_index(res.second);
+ if (mp_named_expression->scope == invalid_sheet)
+ {
+ std::ostringstream os;
+ os << "no sheet named '" << res.second << "' exists in the model.";
+ throw parse_error(os.str());
+ }
+ }
+ else
+ {
+ std::ostringstream os;
+ os << "unknown property of named expression '" << res.first << "'";
+ throw parse_error(os.str());
+ }
+}
+
+void model_parser::push_named_expression()
+{
+ assert(mp_named_expression);
+
+ formula_tokens_t tokens = parse_formula_string(
+ m_context, mp_named_expression->origin, *mp_name_resolver,
+ mp_named_expression->expression);
+
+ std::string exp_s = print_formula_tokens(
+ m_context, mp_named_expression->origin, *mp_name_resolver, tokens);
+
+ cout << "name: " << mp_named_expression->name << endl;
+ cout << "expression: " << exp_s << endl;
+ cout << "origin: " << mp_named_expression->origin << endl;
+
+ cout << "scope: ";
+
+ if (mp_named_expression->scope == global_scope)
+ cout << "(global)";
+ else
+ {
+ std::string sheet_name =
+ m_context.get_sheet_name(mp_named_expression->scope);
+
+ if (sheet_name.empty())
+ {
+ ostringstream os;
+ os << "no sheet exists with a sheet index of " << mp_named_expression->scope;
+ throw std::runtime_error(os.str());
+ }
+
+ cout << sheet_name;
+ }
+
+ cout << endl;
+
+ if (mp_named_expression->scope == global_scope)
+ {
+ m_context.set_named_expression(mp_named_expression->name, std::move(tokens));
+ }
+ else
+ {
+ m_context.set_named_expression(
+ mp_named_expression->scope, mp_named_expression->name, std::move(tokens));
+ }
+
+ mp_named_expression.reset();
+}
+
+void model_parser::print_dependency()
+{
+ std::cout << detail::get_formula_result_output_separator() << std::endl;
+ std::cout << m_context.get_cell_tracker().to_string() << std::endl;
+}
+
+void model_parser::parse_table_columns(std::string_view str)
+{
+ assert(mp_table_entry);
+ table_handler::entry& entry = *mp_table_entry;
+
+ const char* p = str.data();
+ const char* pend = p + str.size();
+ std::string_view buf;
+ for (; p != pend; ++p)
+ {
+ if (*p == ',')
+ {
+ // Flush the current column name buffer.
+ string_id_t col_name = empty_string_id;
+ if (!buf.empty())
+ col_name = m_context.add_string(buf);
+
+ entry.columns.push_back(col_name);
+ buf = std::string_view{};
+ }
+ else
+ {
+ if (buf.empty())
+ buf = std::string_view{p, 1u};
+ else
+ buf = std::string_view{buf.data(), buf.size() + 1u};
+ }
+ }
+
+ string_id_t col_name = empty_string_id;
+ if (!buf.empty())
+ col_name = m_context.add_string(buf);
+
+ entry.columns.push_back(col_name);
+}
+
+model_parser::parsed_assignment_type model_parser::parse_assignment()
+{
+ // Parse to get name and value strings.
+ parsed_assignment_type res;
+ std::string_view buf;
+
+ for (; mp_char != mp_end && *mp_char != '\n'; ++mp_char)
+ {
+ if (*mp_char == '=')
+ {
+ if (buf.empty())
+ throw model_parser::parse_error("left hand side is empty");
+
+ res.first = buf;
+ buf = std::string_view{};
+ }
+ else
+ {
+ if (buf.empty())
+ buf = std::string_view{mp_char, 1u};
+ else
+ buf = std::string_view{buf.data(), buf.size() + 1u};
+ }
+ }
+
+ if (!buf.empty())
+ {
+ if (res.first.empty())
+ throw model_parser::parse_error("'=' is missing");
+
+ res.second = buf;
+ }
+
+ return res;
+}
+
+model_parser::cell_def_type model_parser::parse_cell_definition()
+{
+ enum class section_type
+ {
+ name,
+ braced_name,
+ after_braced_name,
+ braced_value,
+ value
+ };
+
+ section_type section = section_type::name;
+
+ cell_def_type ret;
+ ret.type = model_parser::ct_unknown;
+
+ char skip_next = 0;
+
+ std::string_view buf;
+
+ const char* line_head = mp_char;
+
+ for (; mp_char != mp_end && *mp_char != '\n'; ++mp_char)
+ {
+ if (skip_next)
+ {
+ if (*mp_char != skip_next)
+ {
+ std::ostringstream os;
+ os << "'" << skip_next << "' was expected, but '" << *mp_char << "' was found.";
+ throw model_parser::parse_error(os.str());
+ }
+
+ skip_next = 0;
+ continue;
+ }
+
+ switch (section)
+ {
+ case section_type::name:
+ {
+ if (mp_char == line_head && *mp_char == '{')
+ {
+ section = section_type::braced_name;
+ continue;
+ }
+
+ if (is_separator(*mp_char))
+ {
+ // Separator encountered. Set the name and clear the buffer.
+ if (buf.empty())
+ throw model_parser::parse_error("left hand side is empty");
+
+ ret.name = buf;
+ buf = std::string_view{};
+
+ switch (*mp_char)
+ {
+ case '=':
+ ret.type = model_parser::ct_formula;
+ break;
+ case ':':
+ ret.type = model_parser::ct_value;
+ break;
+ case '@':
+ ret.type = model_parser::ct_string;
+ break;
+ default:
+ ;
+ }
+
+ section = section_type::value;
+ continue;
+ }
+
+ break;
+ }
+ case section_type::braced_name:
+ {
+ if (*mp_char == '}')
+ {
+ ret.name = buf;
+ buf = std::string_view{};
+ section = section_type::after_braced_name;
+ continue;
+ }
+
+ break;
+ }
+ case section_type::after_braced_name:
+ {
+ switch (*mp_char)
+ {
+ case '{':
+ section = section_type::braced_value;
+ ret.type = model_parser::ct_formula;
+ skip_next = '=';
+ break;
+ case '=':
+ ret.type = model_parser::ct_formula;
+ section = section_type::value;
+ break;
+ case ':':
+ ret.type = model_parser::ct_value;
+ section = section_type::value;
+ break;
+ case '@':
+ ret.type = model_parser::ct_string;
+ section = section_type::value;
+ break;
+ default:
+ {
+ std::ostringstream os;
+ os << "Unexpected character after braced name: '" << *mp_char << "'";
+ throw model_parser::parse_error(os.str());
+ }
+ }
+
+ continue; // skip this character.
+ }
+ case section_type::braced_value:
+ case section_type::value:
+ default:
+ ;
+ }
+
+ if (buf.empty())
+ buf = std::string_view{mp_char, 1u};
+ else
+ buf = std::string_view{buf.data(), buf.size() + 1u};
+ }
+
+ ret.value = buf;
+
+ if (ret.type == model_parser::ct_value && !ret.value.empty())
+ {
+ // Check if this is a potential boolean value.
+ if (ret.value[0] == 't' || ret.value[0] == 'f')
+ ret.type = model_parser::ct_boolean;
+ }
+
+ if (section == section_type::braced_value)
+ {
+ // Make sure that the braced value ends with '}'.
+ char last = ret.value.back();
+ if (last != '}')
+ {
+ std::ostringstream os;
+ os << "'}' was expected at the end of a braced value, but '" << last << "' was found.";
+ model_parser::parse_error(os.str());
+ }
+ ret.value = std::string_view{ret.value.data(), ret.value.size() - 1u};
+ ret.matrix_value = true;
+ }
+
+ if (ret.name.empty())
+ {
+ if (ret.value.empty())
+ // This is an empty line. Bail out.
+ return ret;
+
+ // Buffer is not empty but name is not given. We must be missing a separator.
+ std::ostringstream os;
+ os << "separator may be missing (name='" << ret.name << "'; value='" << ret.value << "')";
+ throw model_parser::parse_error(os.str());
+ }
+
+ formula_name_t fnt = mp_name_resolver->resolve(ret.name, abs_address_t(m_current_sheet, 0, 0));
+
+ switch (fnt.type)
+ {
+ case formula_name_t::cell_reference:
+ {
+ ret.pos.first = std::get<address_t>(fnt.value).to_abs(abs_address_t(0,0,0));
+ ret.pos.last = ret.pos.first;
+ break;
+ }
+ case formula_name_t::range_reference:
+ {
+ ret.pos = std::get<range_t>(fnt.value).to_abs(abs_address_t(0,0,0));
+ break;
+ }
+ default:
+ {
+ std::ostringstream os;
+ os << "invalid cell name: " << ret.name;
+ throw model_parser::parse_error(os.str());
+ }
+ }
+
+ return ret;
+}
+
+void model_parser::check()
+{
+ cout << detail::get_formula_result_output_separator() << endl
+ << "checking results" << endl
+ << detail::get_formula_result_output_separator() << endl;
+
+ results_type::const_iterator itr = m_formula_results.begin(), itr_end = m_formula_results.end();
+ for (; itr != itr_end; ++itr)
+ {
+ const string& name = itr->first;
+ if (name.empty())
+ throw check_error("empty cell name");
+
+ const formula_result& res = itr->second;
+ cout << name << ": " << res.str(m_context) << endl;
+
+ formula_name_t name_type = mp_name_resolver->resolve(name, abs_address_t());
+ if (name_type.type != formula_name_t::cell_reference)
+ {
+ ostringstream os;
+ os << "unrecognized cell address: " << name;
+ throw std::runtime_error(os.str());
+ }
+
+ abs_address_t addr = std::get<address_t>(name_type.value).to_abs(abs_address_t());
+ cell_access ca = m_context.get_cell_access(addr);
+
+ switch (ca.get_type())
+ {
+ case celltype_t::formula:
+ {
+ formula_result res_cell = ca.get_formula_result();
+
+ if (res_cell != res)
+ {
+ ostringstream os;
+ os << "unexpected result: (expected: " << res.str(m_context) << "; actual: " << res_cell.str(m_context) << ")";
+ throw check_error(os.str());
+ }
+ break;
+ }
+ case celltype_t::numeric:
+ {
+ double actual_val = ca.get_numeric_value();
+ if (actual_val != res.get_value())
+ {
+ ostringstream os;
+ os << "unexpected numeric result: (expected: " << res.get_value() << "; actual: " << actual_val << ")";
+ throw check_error(os.str());
+ }
+ break;
+ }
+ case celltype_t::boolean:
+ {
+ bool actual = ca.get_boolean_value();
+ bool expected = res.get_boolean();
+ if (actual != expected)
+ {
+ ostringstream os;
+ os << std::boolalpha;
+ os << "unexpected boolean result: (expected: " << expected << "; actual: " << actual << ")";
+ throw check_error(os.str());
+ }
+ break;
+ }
+ case celltype_t::string:
+ {
+ std::string_view actual = ca.get_string_value();
+ const std::string& s_expected = res.get_string();
+
+ if (actual != s_expected)
+ {
+ std::ostringstream os;
+ os << "unexpected string result: (expected: '" << s_expected << "'; actual: '" << actual << "')";
+ throw check_error(os.str());
+ }
+
+ break;
+ }
+ case celltype_t::empty:
+ {
+ std::ostringstream os;
+ os << "cell " << name << " is empty.";
+ throw check_error(os.str());
+ }
+ case celltype_t::unknown:
+ {
+ std::ostringstream os;
+ os << "cell type is unknown for cell " << name;
+ throw check_error(os.str());
+ }
+ }
+ }
+}
+
+std::string model_parser::get_display_cell_string(const abs_address_t& pos) const
+{
+ address_t pos_display(pos);
+ pos_display.set_absolute(false);
+ return mp_name_resolver->get_name(pos_display, abs_address_t(), m_print_sheet_name);
+}
+
+std::string model_parser::get_display_range_string(const abs_range_t& pos) const
+{
+ range_t pos_display(pos);
+ pos_display.first.set_absolute(false);
+ pos_display.last.set_absolute(false);
+ return mp_name_resolver->get_name(pos_display, abs_address_t(), m_print_sheet_name);
+}
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/src/model_parser.hpp b/src/model_parser.hpp
new file mode 100644
index 0000000..c15a50e
--- /dev/null
+++ b/src/model_parser.hpp
@@ -0,0 +1,157 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef INCLUDED_IXION_MODEL_PARSER_HPP
+#define INCLUDED_IXION_MODEL_PARSER_HPP
+
+#include "ixion/exceptions.hpp"
+#include "ixion/model_context.hpp"
+#include "ixion/formula_result.hpp"
+
+#include "session_handler.hpp"
+#include "table_handler.hpp"
+
+#include <string>
+#include <exception>
+#include <vector>
+#include <unordered_map>
+
+namespace ixion {
+
+class model_parser
+{
+ enum parse_mode_type
+ {
+ parse_mode_unknown = 0,
+ parse_mode_init,
+ parse_mode_result,
+ parse_mode_result_cache,
+ parse_mode_edit,
+ parse_mode_table,
+ parse_mode_session,
+ parse_mode_named_expression,
+ parse_mode_exit
+ };
+
+ using parsed_assignment_type = std::pair<std::string_view, std::string_view>;
+
+ struct named_expression_type
+ {
+ std::string name;
+ std::string expression;
+ abs_address_t origin;
+ sheet_t scope = global_scope;
+ };
+
+ /**
+ * Right-hand-side cell content type.
+ */
+ enum cell_type
+ {
+ ct_unknown = 0,
+ ct_formula,
+ ct_value,
+ ct_string,
+ ct_boolean
+ };
+
+ struct cell_def_type
+ {
+ std::string_view name;
+ std::string_view value;
+ cell_type type;
+ abs_range_t pos;
+
+ bool matrix_value = false;
+ };
+
+public:
+ typedef std::unordered_map< ::std::string, formula_result> results_type;
+
+ class parse_error : public general_error
+ {
+ public:
+ explicit parse_error(const std::string& msg);
+ };
+
+ class check_error : public general_error
+ {
+ public:
+ check_error(const ::std::string& msg);
+ };
+
+ model_parser() = delete;
+ model_parser(const model_parser&) = delete;
+ model_parser& operator= (model_parser) = delete;
+
+ model_parser(const ::std::string& filepath, size_t thread_count);
+ ~model_parser();
+
+ void parse();
+
+private:
+ void init_model();
+
+ void parse_command();
+
+ void parse_session();
+ void parse_init();
+ void parse_edit();
+ void parse_result();
+ void parse_result_cache();
+
+ void parse_table();
+ void parse_table_columns(std::string_view str);
+ void push_table();
+
+ void parse_named_expression();
+ void push_named_expression();
+
+ void print_dependency();
+
+ /**
+ * Parse a simple left=right assignment line.
+ */
+ parsed_assignment_type parse_assignment();
+
+ cell_def_type parse_cell_definition();
+
+ void check();
+
+ std::string get_display_cell_string(const abs_address_t& pos) const;
+ std::string get_display_range_string(const abs_range_t& pos) const;
+
+private:
+
+ model_context m_context;
+ table_handler m_table_handler;
+ session_handler::factory m_session_handler_factory;
+ std::unique_ptr<table_handler::entry> mp_table_entry;
+ std::unique_ptr<formula_name_resolver> mp_name_resolver;
+ std::unique_ptr<named_expression_type> mp_named_expression;
+ std::string m_filepath;
+ std::string m_strm;
+ size_t m_thread_count;
+ abs_range_set_t m_dirty_formula_cells;
+ abs_range_set_t m_modified_cells;
+ results_type m_formula_results;
+
+ const char* mp_head;
+ const char* mp_end;
+ const char* mp_char;
+
+ sheet_t m_current_sheet;
+
+ parse_mode_type m_parse_mode;
+ bool m_print_separator:1;
+ bool m_print_sheet_name:1;
+};
+
+}
+
+#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/src/python/Makefile.am b/src/python/Makefile.am
new file mode 100644
index 0000000..1dc98c4
--- /dev/null
+++ b/src/python/Makefile.am
@@ -0,0 +1,35 @@
+if BUILD_PYTHON
+
+EXTRA_DIST = test-env.sh
+
+pyexec_LTLIBRARIES = ixion.la
+ixion_la_SOURCES = \
+ document.hpp \
+ document.cpp \
+ global.hpp \
+ global.cpp \
+ python.cpp \
+ sheet.hpp \
+ sheet.cpp
+
+ixion_la_LDFLAGS = -module -avoid-version -export-symbols-regex PyInit_ixion
+ixion_la_CPPFLAGS = -I$(top_srcdir)/include $(PYTHON_CFLAGS) $(MDDS_CFLAGS)
+ixion_la_LIBADD = \
+ ../libixion/libixion-@IXION_API_VERSION@.la \
+ $(PYTHON_LIBS)
+
+if OSX
+
+TESTS = ../../bin/run-python-test-osx.sh
+
+else
+
+AM_TESTS_ENVIRONMENT = . $(srcdir)/test-env.sh;
+
+TESTS = \
+ ../../test/python/document.py \
+ ../../test/python/module.py
+
+endif
+
+endif
diff --git a/src/python/Makefile.in b/src/python/Makefile.in
new file mode 100644
index 0000000..11b660a
--- /dev/null
+++ b/src/python/Makefile.in
@@ -0,0 +1,1145 @@
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
+
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+VPATH = @srcdir@
+am__is_gnu_make = { \
+ if test -z '$(MAKELEVEL)'; then \
+ false; \
+ elif test -n '$(MAKE_HOST)'; then \
+ true; \
+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+ true; \
+ else \
+ false; \
+ fi; \
+}
+am__make_running_with_option = \
+ case $${target_option-} in \
+ ?) ;; \
+ *) echo "am__make_running_with_option: internal error: invalid" \
+ "target option '$${target_option-}' specified" >&2; \
+ exit 1;; \
+ esac; \
+ has_opt=no; \
+ sane_makeflags=$$MAKEFLAGS; \
+ if $(am__is_gnu_make); then \
+ sane_makeflags=$$MFLAGS; \
+ else \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ bs=\\; \
+ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
+ esac; \
+ fi; \
+ skip_next=no; \
+ strip_trailopt () \
+ { \
+ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+ }; \
+ for flg in $$sane_makeflags; do \
+ test $$skip_next = yes && { skip_next=no; continue; }; \
+ case $$flg in \
+ *=*|--*) continue;; \
+ -*I) strip_trailopt 'I'; skip_next=yes;; \
+ -*I?*) strip_trailopt 'I';; \
+ -*O) strip_trailopt 'O'; skip_next=yes;; \
+ -*O?*) strip_trailopt 'O';; \
+ -*l) strip_trailopt 'l'; skip_next=yes;; \
+ -*l?*) strip_trailopt 'l';; \
+ -[dEDm]) skip_next=yes;; \
+ -[JT]) skip_next=yes;; \
+ esac; \
+ case $$flg in \
+ *$$target_option*) has_opt=yes; break;; \
+ esac; \
+ done; \
+ test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = src/python
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/ax_cxx_compile_stdcxx.m4 \
+ $(top_srcdir)/m4/ax_cxx_compile_stdcxx_17.m4 \
+ $(top_srcdir)/m4/boost.m4 $(top_srcdir)/m4/libtool.m4 \
+ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
+ $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+ if (++n[$$2] == $(am__install_max)) \
+ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+ END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+ test -z "$$files" \
+ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+ $(am__cd) "$$dir" && rm -f $$files; }; \
+ }
+am__installdirs = "$(DESTDIR)$(pyexecdir)"
+LTLIBRARIES = $(pyexec_LTLIBRARIES)
+am__DEPENDENCIES_1 =
+@BUILD_PYTHON_TRUE@ixion_la_DEPENDENCIES = ../libixion/libixion-@IXION_API_VERSION@.la \
+@BUILD_PYTHON_TRUE@ $(am__DEPENDENCIES_1)
+am__ixion_la_SOURCES_DIST = document.hpp document.cpp global.hpp \
+ global.cpp python.cpp sheet.hpp sheet.cpp
+@BUILD_PYTHON_TRUE@am_ixion_la_OBJECTS = ixion_la-document.lo \
+@BUILD_PYTHON_TRUE@ ixion_la-global.lo ixion_la-python.lo \
+@BUILD_PYTHON_TRUE@ ixion_la-sheet.lo
+ixion_la_OBJECTS = $(am_ixion_la_OBJECTS)
+AM_V_lt = $(am__v_lt_@AM_V@)
+am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
+am__v_lt_0 = --silent
+am__v_lt_1 =
+ixion_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+ $(CXXFLAGS) $(ixion_la_LDFLAGS) $(LDFLAGS) -o $@
+@BUILD_PYTHON_TRUE@am_ixion_la_rpath = -rpath $(pyexecdir)
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo " GEN " $@;
+am__v_GEN_1 =
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 =
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__maybe_remake_depfiles = depfiles
+am__depfiles_remade = ./$(DEPDIR)/ixion_la-document.Plo \
+ ./$(DEPDIR)/ixion_la-global.Plo \
+ ./$(DEPDIR)/ixion_la-python.Plo ./$(DEPDIR)/ixion_la-sheet.Plo
+am__mv = mv -f
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CXXFLAGS) $(CXXFLAGS)
+AM_V_CXX = $(am__v_CXX_@AM_V@)
+am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@)
+am__v_CXX_0 = @echo " CXX " $@;
+am__v_CXX_1 =
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CXXLD = $(am__v_CXXLD_@AM_V@)
+am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@)
+am__v_CXXLD_0 = @echo " CXXLD " $@;
+am__v_CXXLD_1 =
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_@AM_V@)
+am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
+am__v_CC_0 = @echo " CC " $@;
+am__v_CC_1 =
+CCLD = $(CC)
+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_@AM_V@)
+am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
+am__v_CCLD_0 = @echo " CCLD " $@;
+am__v_CCLD_1 =
+SOURCES = $(ixion_la_SOURCES)
+DIST_SOURCES = $(am__ixion_la_SOURCES_DIST)
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+# Read a list of newline-separated strings from the standard input,
+# and print each of them once, without duplicates. Input order is
+# *not* preserved.
+am__uniquify_input = $(AWK) '\
+ BEGIN { nonempty = 0; } \
+ { items[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in items) print i; }; } \
+'
+# Make sure the list of sources is unique. This is necessary because,
+# e.g., the same source file might be shared among _SOURCES variables
+# for different programs/libraries.
+am__define_uniq_tagged_files = \
+ list='$(am__tagged_files)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | $(am__uniquify_input)`
+am__tty_colors_dummy = \
+ mgn= red= grn= lgn= blu= brg= std=; \
+ am__color_tests=no
+am__tty_colors = { \
+ $(am__tty_colors_dummy); \
+ if test "X$(AM_COLOR_TESTS)" = Xno; then \
+ am__color_tests=no; \
+ elif test "X$(AM_COLOR_TESTS)" = Xalways; then \
+ am__color_tests=yes; \
+ elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \
+ am__color_tests=yes; \
+ fi; \
+ if test $$am__color_tests = yes; then \
+ red=''; \
+ grn=''; \
+ lgn=''; \
+ blu=''; \
+ mgn=''; \
+ brg=''; \
+ std=''; \
+ fi; \
+}
+am__recheck_rx = ^[ ]*:recheck:[ ]*
+am__global_test_result_rx = ^[ ]*:global-test-result:[ ]*
+am__copy_in_global_log_rx = ^[ ]*:copy-in-global-log:[ ]*
+# A command that, given a newline-separated list of test names on the
+# standard input, print the name of the tests that are to be re-run
+# upon "make recheck".
+am__list_recheck_tests = $(AWK) '{ \
+ recheck = 1; \
+ while ((rc = (getline line < ($$0 ".trs"))) != 0) \
+ { \
+ if (rc < 0) \
+ { \
+ if ((getline line2 < ($$0 ".log")) < 0) \
+ recheck = 0; \
+ break; \
+ } \
+ else if (line ~ /$(am__recheck_rx)[nN][Oo]/) \
+ { \
+ recheck = 0; \
+ break; \
+ } \
+ else if (line ~ /$(am__recheck_rx)[yY][eE][sS]/) \
+ { \
+ break; \
+ } \
+ }; \
+ if (recheck) \
+ print $$0; \
+ close ($$0 ".trs"); \
+ close ($$0 ".log"); \
+}'
+# A command that, given a newline-separated list of test names on the
+# standard input, create the global log from their .trs and .log files.
+am__create_global_log = $(AWK) ' \
+function fatal(msg) \
+{ \
+ print "fatal: making $@: " msg | "cat >&2"; \
+ exit 1; \
+} \
+function rst_section(header) \
+{ \
+ print header; \
+ len = length(header); \
+ for (i = 1; i <= len; i = i + 1) \
+ printf "="; \
+ printf "\n\n"; \
+} \
+{ \
+ copy_in_global_log = 1; \
+ global_test_result = "RUN"; \
+ while ((rc = (getline line < ($$0 ".trs"))) != 0) \
+ { \
+ if (rc < 0) \
+ fatal("failed to read from " $$0 ".trs"); \
+ if (line ~ /$(am__global_test_result_rx)/) \
+ { \
+ sub("$(am__global_test_result_rx)", "", line); \
+ sub("[ ]*$$", "", line); \
+ global_test_result = line; \
+ } \
+ else if (line ~ /$(am__copy_in_global_log_rx)[nN][oO]/) \
+ copy_in_global_log = 0; \
+ }; \
+ if (copy_in_global_log) \
+ { \
+ rst_section(global_test_result ": " $$0); \
+ while ((rc = (getline line < ($$0 ".log"))) != 0) \
+ { \
+ if (rc < 0) \
+ fatal("failed to read from " $$0 ".log"); \
+ print line; \
+ }; \
+ printf "\n"; \
+ }; \
+ close ($$0 ".trs"); \
+ close ($$0 ".log"); \
+}'
+# Restructured Text title.
+am__rst_title = { sed 's/.*/ & /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; }
+# Solaris 10 'make', and several other traditional 'make' implementations,
+# pass "-e" to $(SHELL), and POSIX 2008 even requires this. Work around it
+# by disabling -e (using the XSI extension "set +e") if it's set.
+am__sh_e_setup = case $$- in *e*) set +e;; esac
+# Default flags passed to test drivers.
+am__common_driver_flags = \
+ --color-tests "$$am__color_tests" \
+ --enable-hard-errors "$$am__enable_hard_errors" \
+ --expect-failure "$$am__expect_failure"
+# To be inserted before the command running the test. Creates the
+# directory for the log if needed. Stores in $dir the directory
+# containing $f, in $tst the test, in $log the log. Executes the
+# developer- defined test setup AM_TESTS_ENVIRONMENT (if any), and
+# passes TESTS_ENVIRONMENT. Set up options for the wrapper that
+# will run the test scripts (or their associated LOG_COMPILER, if
+# thy have one).
+am__check_pre = \
+$(am__sh_e_setup); \
+$(am__vpath_adj_setup) $(am__vpath_adj) \
+$(am__tty_colors); \
+srcdir=$(srcdir); export srcdir; \
+case "$@" in \
+ */*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;; \
+ *) am__odir=.;; \
+esac; \
+test "x$$am__odir" = x"." || test -d "$$am__odir" \
+ || $(MKDIR_P) "$$am__odir" || exit $$?; \
+if test -f "./$$f"; then dir=./; \
+elif test -f "$$f"; then dir=; \
+else dir="$(srcdir)/"; fi; \
+tst=$$dir$$f; log='$@'; \
+if test -n '$(DISABLE_HARD_ERRORS)'; then \
+ am__enable_hard_errors=no; \
+else \
+ am__enable_hard_errors=yes; \
+fi; \
+case " $(XFAIL_TESTS) " in \
+ *[\ \ ]$$f[\ \ ]* | *[\ \ ]$$dir$$f[\ \ ]*) \
+ am__expect_failure=yes;; \
+ *) \
+ am__expect_failure=no;; \
+esac; \
+$(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT)
+# A shell command to get the names of the tests scripts with any registered
+# extension removed (i.e., equivalently, the names of the test logs, with
+# the '.log' extension removed). The result is saved in the shell variable
+# '$bases'. This honors runtime overriding of TESTS and TEST_LOGS. Sadly,
+# we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)",
+# since that might cause problem with VPATH rewrites for suffix-less tests.
+# See also 'test-harness-vpath-rewrite.sh' and 'test-trs-basic.sh'.
+am__set_TESTS_bases = \
+ bases='$(TEST_LOGS)'; \
+ bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \
+ bases=`echo $$bases`
+AM_TESTSUITE_SUMMARY_HEADER = ' for $(PACKAGE_STRING)'
+RECHECK_LOGS = $(TEST_LOGS)
+AM_RECURSIVE_TARGETS = check recheck
+TEST_SUITE_LOG = test-suite.log
+TEST_EXTENSIONS = @EXEEXT@ .test
+LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver
+LOG_COMPILE = $(LOG_COMPILER) $(AM_LOG_FLAGS) $(LOG_FLAGS)
+am__set_b = \
+ case '$@' in \
+ */*) \
+ case '$*' in \
+ */*) b='$*';; \
+ *) b=`echo '$@' | sed 's/\.log$$//'`; \
+ esac;; \
+ *) \
+ b='$*';; \
+ esac
+am__test_logs1 = $(TESTS:=.log)
+am__test_logs2 = $(am__test_logs1:@EXEEXT@.log=.log)
+TEST_LOGS = $(am__test_logs2:.test.log=.log)
+TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver
+TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \
+ $(TEST_LOG_FLAGS)
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp \
+ $(top_srcdir)/test-driver
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AS = @AS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+BOOST_CPPFLAGS = @BOOST_CPPFLAGS@
+BOOST_FILESYSTEM_LDFLAGS = @BOOST_FILESYSTEM_LDFLAGS@
+BOOST_FILESYSTEM_LDPATH = @BOOST_FILESYSTEM_LDPATH@
+BOOST_FILESYSTEM_LIBS = @BOOST_FILESYSTEM_LIBS@
+BOOST_LDPATH = @BOOST_LDPATH@
+BOOST_PROGRAM_OPTIONS_LDFLAGS = @BOOST_PROGRAM_OPTIONS_LDFLAGS@
+BOOST_PROGRAM_OPTIONS_LDPATH = @BOOST_PROGRAM_OPTIONS_LDPATH@
+BOOST_PROGRAM_OPTIONS_LIBS = @BOOST_PROGRAM_OPTIONS_LIBS@
+BOOST_ROOT = @BOOST_ROOT@
+BOOST_SYSTEM_LDFLAGS = @BOOST_SYSTEM_LDFLAGS@
+BOOST_SYSTEM_LDPATH = @BOOST_SYSTEM_LDPATH@
+BOOST_SYSTEM_LIBS = @BOOST_SYSTEM_LIBS@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPPFLAGS = @CPPFLAGS@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DISTCHECK_CONFIGURE_FLAGS = @DISTCHECK_CONFIGURE_FLAGS@
+DLLTOOL = @DLLTOOL@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+ETAGS = @ETAGS@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+GREP = @GREP@
+HAVE_CXX17 = @HAVE_CXX17@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+IXION_API_VERSION = @IXION_API_VERSION@
+IXION_MAJOR_API_VERSION = @IXION_MAJOR_API_VERSION@
+IXION_MAJOR_VERSION = @IXION_MAJOR_VERSION@
+IXION_MICRO_VERSION = @IXION_MICRO_VERSION@
+IXION_MINOR_API_VERSION = @IXION_MINOR_API_VERSION@
+IXION_MINOR_VERSION = @IXION_MINOR_VERSION@
+IXION_VERSION = @IXION_VERSION@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
+MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MDDS_CFLAGS = @MDDS_CFLAGS@
+MDDS_LIBS = @MDDS_LIBS@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
+POW_LIB = @POW_LIB@
+PYTHON = @PYTHON@
+PYTHON_CFLAGS = @PYTHON_CFLAGS@
+PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
+PYTHON_LIBS = @PYTHON_LIBS@
+PYTHON_PLATFORM = @PYTHON_PLATFORM@
+PYTHON_PREFIX = @PYTHON_PREFIX@
+PYTHON_VERSION = @PYTHON_VERSION@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+VULKAN_CFLAGS = @VULKAN_CFLAGS@
+VULKAN_LIBS = @VULKAN_LIBS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+pkgpyexecdir = @pkgpyexecdir@
+pkgpythondir = @pkgpythondir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+pyexecdir = @pyexecdir@
+pythondir = @pythondir@
+runstatedir = @runstatedir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+@BUILD_PYTHON_TRUE@EXTRA_DIST = test-env.sh
+@BUILD_PYTHON_TRUE@pyexec_LTLIBRARIES = ixion.la
+@BUILD_PYTHON_TRUE@ixion_la_SOURCES = \
+@BUILD_PYTHON_TRUE@ document.hpp \
+@BUILD_PYTHON_TRUE@ document.cpp \
+@BUILD_PYTHON_TRUE@ global.hpp \
+@BUILD_PYTHON_TRUE@ global.cpp \
+@BUILD_PYTHON_TRUE@ python.cpp \
+@BUILD_PYTHON_TRUE@ sheet.hpp \
+@BUILD_PYTHON_TRUE@ sheet.cpp
+
+@BUILD_PYTHON_TRUE@ixion_la_LDFLAGS = -module -avoid-version -export-symbols-regex PyInit_ixion
+@BUILD_PYTHON_TRUE@ixion_la_CPPFLAGS = -I$(top_srcdir)/include $(PYTHON_CFLAGS) $(MDDS_CFLAGS)
+@BUILD_PYTHON_TRUE@ixion_la_LIBADD = \
+@BUILD_PYTHON_TRUE@ ../libixion/libixion-@IXION_API_VERSION@.la \
+@BUILD_PYTHON_TRUE@ $(PYTHON_LIBS)
+
+@BUILD_PYTHON_TRUE@@OSX_FALSE@TESTS = \
+@BUILD_PYTHON_TRUE@@OSX_FALSE@ ../../test/python/document.py \
+@BUILD_PYTHON_TRUE@@OSX_FALSE@ ../../test/python/module.py
+
+@BUILD_PYTHON_TRUE@@OSX_TRUE@TESTS = ../../bin/run-python-test-osx.sh
+@BUILD_PYTHON_TRUE@@OSX_FALSE@AM_TESTS_ENVIRONMENT = . $(srcdir)/test-env.sh;
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .cpp .lo .log .o .obj .test .test$(EXEEXT) .trs
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/python/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --foreign src/python/Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+install-pyexecLTLIBRARIES: $(pyexec_LTLIBRARIES)
+ @$(NORMAL_INSTALL)
+ @list='$(pyexec_LTLIBRARIES)'; test -n "$(pyexecdir)" || list=; \
+ list2=; for p in $$list; do \
+ if test -f $$p; then \
+ list2="$$list2 $$p"; \
+ else :; fi; \
+ done; \
+ test -z "$$list2" || { \
+ echo " $(MKDIR_P) '$(DESTDIR)$(pyexecdir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(pyexecdir)" || exit 1; \
+ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pyexecdir)'"; \
+ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pyexecdir)"; \
+ }
+
+uninstall-pyexecLTLIBRARIES:
+ @$(NORMAL_UNINSTALL)
+ @list='$(pyexec_LTLIBRARIES)'; test -n "$(pyexecdir)" || list=; \
+ for p in $$list; do \
+ $(am__strip_dir) \
+ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pyexecdir)/$$f'"; \
+ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pyexecdir)/$$f"; \
+ done
+
+clean-pyexecLTLIBRARIES:
+ -test -z "$(pyexec_LTLIBRARIES)" || rm -f $(pyexec_LTLIBRARIES)
+ @list='$(pyexec_LTLIBRARIES)'; \
+ locs=`for p in $$list; do echo $$p; done | \
+ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \
+ sort -u`; \
+ test -z "$$locs" || { \
+ echo rm -f $${locs}; \
+ rm -f $${locs}; \
+ }
+
+ixion.la: $(ixion_la_OBJECTS) $(ixion_la_DEPENDENCIES) $(EXTRA_ixion_la_DEPENDENCIES)
+ $(AM_V_CXXLD)$(ixion_la_LINK) $(am_ixion_la_rpath) $(ixion_la_OBJECTS) $(ixion_la_LIBADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ixion_la-document.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ixion_la-global.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ixion_la-python.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ixion_la-sheet.Plo@am__quote@ # am--include-marker
+
+$(am__depfiles_remade):
+ @$(MKDIR_P) $(@D)
+ @echo '# dummy' >$@-t && $(am__mv) $@-t $@
+
+am--depfiles: $(am__depfiles_remade)
+
+.cpp.o:
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $<
+
+.cpp.obj:
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cpp.lo:
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $<
+
+ixion_la-document.lo: document.cpp
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ixion_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT ixion_la-document.lo -MD -MP -MF $(DEPDIR)/ixion_la-document.Tpo -c -o ixion_la-document.lo `test -f 'document.cpp' || echo '$(srcdir)/'`document.cpp
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ixion_la-document.Tpo $(DEPDIR)/ixion_la-document.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='document.cpp' object='ixion_la-document.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ixion_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ixion_la-document.lo `test -f 'document.cpp' || echo '$(srcdir)/'`document.cpp
+
+ixion_la-global.lo: global.cpp
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ixion_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT ixion_la-global.lo -MD -MP -MF $(DEPDIR)/ixion_la-global.Tpo -c -o ixion_la-global.lo `test -f 'global.cpp' || echo '$(srcdir)/'`global.cpp
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ixion_la-global.Tpo $(DEPDIR)/ixion_la-global.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='global.cpp' object='ixion_la-global.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ixion_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ixion_la-global.lo `test -f 'global.cpp' || echo '$(srcdir)/'`global.cpp
+
+ixion_la-python.lo: python.cpp
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ixion_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT ixion_la-python.lo -MD -MP -MF $(DEPDIR)/ixion_la-python.Tpo -c -o ixion_la-python.lo `test -f 'python.cpp' || echo '$(srcdir)/'`python.cpp
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ixion_la-python.Tpo $(DEPDIR)/ixion_la-python.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='python.cpp' object='ixion_la-python.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ixion_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ixion_la-python.lo `test -f 'python.cpp' || echo '$(srcdir)/'`python.cpp
+
+ixion_la-sheet.lo: sheet.cpp
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ixion_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT ixion_la-sheet.lo -MD -MP -MF $(DEPDIR)/ixion_la-sheet.Tpo -c -o ixion_la-sheet.lo `test -f 'sheet.cpp' || echo '$(srcdir)/'`sheet.cpp
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ixion_la-sheet.Tpo $(DEPDIR)/ixion_la-sheet.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='sheet.cpp' object='ixion_la-sheet.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ixion_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ixion_la-sheet.lo `test -f 'sheet.cpp' || echo '$(srcdir)/'`sheet.cpp
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+ID: $(am__tagged_files)
+ $(am__define_uniq_tagged_files); mkid -fID $$unique
+tags: tags-am
+TAGS: tags
+
+tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ set x; \
+ here=`pwd`; \
+ $(am__define_uniq_tagged_files); \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: ctags-am
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ $(am__define_uniq_tagged_files); \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+cscopelist: cscopelist-am
+
+cscopelist-am: $(am__tagged_files)
+ list='$(am__tagged_files)'; \
+ case "$(srcdir)" in \
+ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+ *) sdir=$(subdir)/$(srcdir) ;; \
+ esac; \
+ for i in $$list; do \
+ if test -f "$$i"; then \
+ echo "$(subdir)/$$i"; \
+ else \
+ echo "$$sdir/$$i"; \
+ fi; \
+ done >> $(top_builddir)/cscope.files
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+# Recover from deleted '.trs' file; this should ensure that
+# "rm -f foo.log; make foo.trs" re-run 'foo.test', and re-create
+# both 'foo.log' and 'foo.trs'. Break the recipe in two subshells
+# to avoid problems with "make -n".
+.log.trs:
+ rm -f $< $@
+ $(MAKE) $(AM_MAKEFLAGS) $<
+
+# Leading 'am--fnord' is there to ensure the list of targets does not
+# expand to empty, as could happen e.g. with make check TESTS=''.
+am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck)
+am--force-recheck:
+ @:
+
+$(TEST_SUITE_LOG): $(TEST_LOGS)
+ @$(am__set_TESTS_bases); \
+ am__f_ok () { test -f "$$1" && test -r "$$1"; }; \
+ redo_bases=`for i in $$bases; do \
+ am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \
+ done`; \
+ if test -n "$$redo_bases"; then \
+ redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \
+ redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \
+ if $(am__make_dryrun); then :; else \
+ rm -f $$redo_logs && rm -f $$redo_results || exit 1; \
+ fi; \
+ fi; \
+ if test -n "$$am__remaking_logs"; then \
+ echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \
+ "recursion detected" >&2; \
+ elif test -n "$$redo_logs"; then \
+ am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \
+ fi; \
+ if $(am__make_dryrun); then :; else \
+ st=0; \
+ errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \
+ for i in $$redo_bases; do \
+ test -f $$i.trs && test -r $$i.trs \
+ || { echo "$$errmsg $$i.trs" >&2; st=1; }; \
+ test -f $$i.log && test -r $$i.log \
+ || { echo "$$errmsg $$i.log" >&2; st=1; }; \
+ done; \
+ test $$st -eq 0 || exit 1; \
+ fi
+ @$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \
+ ws='[ ]'; \
+ results=`for b in $$bases; do echo $$b.trs; done`; \
+ test -n "$$results" || results=/dev/null; \
+ all=` grep "^$$ws*:test-result:" $$results | wc -l`; \
+ pass=` grep "^$$ws*:test-result:$$ws*PASS" $$results | wc -l`; \
+ fail=` grep "^$$ws*:test-result:$$ws*FAIL" $$results | wc -l`; \
+ skip=` grep "^$$ws*:test-result:$$ws*SKIP" $$results | wc -l`; \
+ xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \
+ xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \
+ error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \
+ if test `expr $$fail + $$xpass + $$error` -eq 0; then \
+ success=true; \
+ else \
+ success=false; \
+ fi; \
+ br='==================='; br=$$br$$br$$br$$br; \
+ result_count () \
+ { \
+ if test x"$$1" = x"--maybe-color"; then \
+ maybe_colorize=yes; \
+ elif test x"$$1" = x"--no-color"; then \
+ maybe_colorize=no; \
+ else \
+ echo "$@: invalid 'result_count' usage" >&2; exit 4; \
+ fi; \
+ shift; \
+ desc=$$1 count=$$2; \
+ if test $$maybe_colorize = yes && test $$count -gt 0; then \
+ color_start=$$3 color_end=$$std; \
+ else \
+ color_start= color_end=; \
+ fi; \
+ echo "$${color_start}# $$desc $$count$${color_end}"; \
+ }; \
+ create_testsuite_report () \
+ { \
+ result_count $$1 "TOTAL:" $$all "$$brg"; \
+ result_count $$1 "PASS: " $$pass "$$grn"; \
+ result_count $$1 "SKIP: " $$skip "$$blu"; \
+ result_count $$1 "XFAIL:" $$xfail "$$lgn"; \
+ result_count $$1 "FAIL: " $$fail "$$red"; \
+ result_count $$1 "XPASS:" $$xpass "$$red"; \
+ result_count $$1 "ERROR:" $$error "$$mgn"; \
+ }; \
+ { \
+ echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \
+ $(am__rst_title); \
+ create_testsuite_report --no-color; \
+ echo; \
+ echo ".. contents:: :depth: 2"; \
+ echo; \
+ for b in $$bases; do echo $$b; done \
+ | $(am__create_global_log); \
+ } >$(TEST_SUITE_LOG).tmp || exit 1; \
+ mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \
+ if $$success; then \
+ col="$$grn"; \
+ else \
+ col="$$red"; \
+ test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \
+ fi; \
+ echo "$${col}$$br$${std}"; \
+ echo "$${col}Testsuite summary"$(AM_TESTSUITE_SUMMARY_HEADER)"$${std}"; \
+ echo "$${col}$$br$${std}"; \
+ create_testsuite_report --maybe-color; \
+ echo "$$col$$br$$std"; \
+ if $$success; then :; else \
+ echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}"; \
+ if test -n "$(PACKAGE_BUGREPORT)"; then \
+ echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}"; \
+ fi; \
+ echo "$$col$$br$$std"; \
+ fi; \
+ $$success || exit 1
+
+check-TESTS:
+ @list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list
+ @list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list
+ @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
+ @set +e; $(am__set_TESTS_bases); \
+ log_list=`for i in $$bases; do echo $$i.log; done`; \
+ trs_list=`for i in $$bases; do echo $$i.trs; done`; \
+ log_list=`echo $$log_list`; trs_list=`echo $$trs_list`; \
+ $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \
+ exit $$?;
+recheck: all
+ @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
+ @set +e; $(am__set_TESTS_bases); \
+ bases=`for i in $$bases; do echo $$i; done \
+ | $(am__list_recheck_tests)` || exit 1; \
+ log_list=`for i in $$bases; do echo $$i.log; done`; \
+ log_list=`echo $$log_list`; \
+ $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) \
+ am__force_recheck=am--force-recheck \
+ TEST_LOGS="$$log_list"; \
+ exit $$?
+../../test/python/document.py.log: ../../test/python/document.py
+ @p='../../test/python/document.py'; \
+ b='../../test/python/document.py'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+../../test/python/module.py.log: ../../test/python/module.py
+ @p='../../test/python/module.py'; \
+ b='../../test/python/module.py'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+../../bin/run-python-test-osx.sh.log: ../../bin/run-python-test-osx.sh
+ @p='../../bin/run-python-test-osx.sh'; \
+ b='../../bin/run-python-test-osx.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+.test.log:
+ @p='$<'; \
+ $(am__set_b); \
+ $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+@am__EXEEXT_TRUE@.test$(EXEEXT).log:
+@am__EXEEXT_TRUE@ @p='$<'; \
+@am__EXEEXT_TRUE@ $(am__set_b); \
+@am__EXEEXT_TRUE@ $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \
+@am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \
+@am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \
+@am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT)
+distdir: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) distdir-am
+
+distdir-am: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+ $(MAKE) $(AM_MAKEFLAGS) check-TESTS
+check: check-am
+all-am: Makefile $(LTLIBRARIES)
+installdirs:
+ for dir in "$(DESTDIR)$(pyexecdir)"; do \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+ done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
+mostlyclean-generic:
+ -test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS)
+ -test -z "$(TEST_LOGS:.log=.trs)" || rm -f $(TEST_LOGS:.log=.trs)
+ -test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool clean-pyexecLTLIBRARIES \
+ mostlyclean-am
+
+distclean: distclean-am
+ -rm -f ./$(DEPDIR)/ixion_la-document.Plo
+ -rm -f ./$(DEPDIR)/ixion_la-global.Plo
+ -rm -f ./$(DEPDIR)/ixion_la-python.Plo
+ -rm -f ./$(DEPDIR)/ixion_la-sheet.Plo
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am: install-pyexecLTLIBRARIES
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -f ./$(DEPDIR)/ixion_la-document.Plo
+ -rm -f ./$(DEPDIR)/ixion_la-global.Plo
+ -rm -f ./$(DEPDIR)/ixion_la-python.Plo
+ -rm -f ./$(DEPDIR)/ixion_la-sheet.Plo
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-pyexecLTLIBRARIES
+
+.MAKE: check-am install-am install-strip
+
+.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-TESTS \
+ check-am clean clean-generic clean-libtool \
+ clean-pyexecLTLIBRARIES cscopelist-am ctags ctags-am distclean \
+ distclean-compile distclean-generic distclean-libtool \
+ distclean-tags distdir dvi dvi-am html html-am info info-am \
+ install install-am install-data install-data-am install-dvi \
+ install-dvi-am install-exec install-exec-am install-html \
+ install-html-am install-info install-info-am install-man \
+ install-pdf install-pdf-am install-ps install-ps-am \
+ install-pyexecLTLIBRARIES install-strip installcheck \
+ installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-compile \
+ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+ recheck tags tags-am uninstall uninstall-am \
+ uninstall-pyexecLTLIBRARIES
+
+.PRECIOUS: Makefile
+
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/src/python/document.cpp b/src/python/document.cpp
new file mode 100644
index 0000000..48d1073
--- /dev/null
+++ b/src/python/document.cpp
@@ -0,0 +1,313 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include "document.hpp"
+#include "sheet.hpp"
+#include "global.hpp"
+
+#include "ixion/formula.hpp"
+#include "ixion/exceptions.hpp"
+#include "ixion/config.hpp"
+
+#include <iostream>
+#include <vector>
+#include <algorithm>
+#include <sstream>
+
+using namespace std;
+
+namespace ixion { namespace python {
+
+namespace {
+
+/** non-python part of the document data */
+struct document_data
+{
+ document_global m_global;
+ vector<PyObject*> m_sheets;
+
+ ~document_data();
+};
+
+struct free_pyobj
+{
+ void operator() (PyObject* p)
+ {
+ Py_XDECREF(p);
+ }
+};
+
+document_data::~document_data()
+{
+ for_each(m_sheets.begin(), m_sheets.end(), free_pyobj());
+}
+
+/**
+ * Python Document object.
+ */
+struct pyobj_document
+{
+ PyObject_HEAD
+
+ document_data* m_data;
+};
+
+void document_dealloc(pyobj_document* self)
+{
+ delete self->m_data;
+ Py_TYPE(self)->tp_free(reinterpret_cast<PyObject*>(self));
+}
+
+PyObject* document_new(PyTypeObject* type, PyObject* /*args*/, PyObject* /*kwargs*/)
+{
+ pyobj_document* self = (pyobj_document*)type->tp_alloc(type, 0);
+ self->m_data = new document_data;
+ return reinterpret_cast<PyObject*>(self);
+}
+
+int document_init(pyobj_document* self, PyObject* /*args*/, PyObject* /*kwargs*/)
+{
+ return 0;
+}
+
+PyObject* document_append_sheet(pyobj_document* self, PyObject* args)
+{
+ char* sheet_name = nullptr;
+ if (!PyArg_ParseTuple(args, "s", &sheet_name))
+ {
+ PyErr_SetString(PyExc_TypeError, "The method must be given a sheet name string");
+ return nullptr;
+ }
+
+ assert(sheet_name);
+
+ PyTypeObject* sheet_type = get_sheet_type();
+ if (!sheet_type)
+ return nullptr;
+
+ PyObject* obj_sheet = sheet_type->tp_new(sheet_type, args, 0);
+ if (!obj_sheet)
+ {
+ PyErr_SetString(PyExc_RuntimeError,
+ "Failed to allocate memory for the new sheet object.");
+ return nullptr;
+ }
+
+ sheet_type->tp_init(obj_sheet, args, 0);
+
+ // Pass model_context to the sheet object.
+ sheet_data* sd = get_sheet_data(obj_sheet);
+ sd->m_global = &self->m_data->m_global;
+ ixion::model_context& cxt = sd->m_global->m_cxt;
+ try
+ {
+ sd->m_sheet_index = cxt.append_sheet(sheet_name);
+ }
+ catch (const model_context_error& e)
+ {
+ // Most likely the sheet name already exists in this document.
+ Py_XDECREF(obj_sheet);
+ switch (e.get_error_type())
+ {
+ case model_context_error::sheet_name_conflict:
+ PyErr_SetString(get_python_document_error(), e.what());
+ break;
+ default:
+ PyErr_SetString(get_python_document_error(),
+ "Sheet insertion failed for unknown reason.");
+ }
+ return nullptr;
+ }
+ catch (const general_error& e)
+ {
+ Py_XDECREF(obj_sheet);
+ ostringstream os;
+ os << "Sheet insertion failed and the reason is '" << e.what() << "'";
+ PyErr_SetString(get_python_document_error(), os.str().c_str());
+ return nullptr;
+ }
+
+ // Append this sheet instance to the document.
+ Py_INCREF(obj_sheet);
+ self->m_data->m_sheets.push_back(obj_sheet);
+
+ return obj_sheet;
+}
+
+const char* doc_document_calculate =
+"Document.calculate([threads])\n"
+"\n"
+"(Re-)calculate all modified formula cells in the document.\n"
+"\n"
+"Keyword arguments:\n"
+"\n"
+"threads -- number of threads to use besides the main thread, or 0 if all\n"
+" calculations are to be performed on the main thread. (default 0)\n"
+;
+
+PyObject* document_calculate(pyobj_document* self, PyObject* args, PyObject* kwargs)
+{
+ static const char* kwlist[] = { "threads", nullptr };
+
+ long threads = 0;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|i", const_cast<char**>(kwlist), &threads))
+ {
+ PyErr_SetString(PyExc_TypeError, "Failed to parse the arguments for Document.calculate()");
+ return nullptr;
+ }
+
+ document_global& dg = self->m_data->m_global;
+
+ // Query additional dirty formula cells and add them to the current set.
+ std::vector<abs_range_t> sorted = ixion::query_and_sort_dirty_cells(
+ dg.m_cxt, dg.m_modified_cells, &dg.m_dirty_formula_cells);
+ ixion::calculate_sorted_cells(dg.m_cxt, sorted, threads);
+
+ dg.m_modified_cells.clear();
+ dg.m_dirty_formula_cells.clear();
+
+ Py_INCREF(Py_None);
+ return Py_None;
+}
+
+PyObject* document_get_sheet(pyobj_document* self, PyObject* arg)
+{
+ const vector<PyObject*>& sheets = self->m_data->m_sheets;
+ if (PyLong_Check(arg))
+ {
+ long index = PyLong_AsLong(arg);
+ if (index == -1 && PyErr_Occurred())
+ return nullptr;
+
+ if (index < 0 || static_cast<size_t>(index) >= sheets.size())
+ {
+ PyErr_SetString(PyExc_IndexError, "Out-of-bound sheet index");
+ return nullptr;
+ }
+
+ PyObject* sheet_obj = sheets[index];
+ Py_INCREF(sheet_obj);
+ return sheet_obj;
+ }
+
+ // Not a python int object. See if it's a string object.
+ const char* name = PyUnicode_AsUTF8(arg);
+ if (!name)
+ {
+ PyErr_SetString(PyExc_TypeError,
+ "The 'arg' value must be either of type int or type str.");
+ return nullptr;
+ }
+
+ // Iterate through all sheets to find a match.
+ // TODO : Use string hash to speed up the lookup.
+ for (PyObject* sh : sheets)
+ {
+ PyObject* obj = get_sheet_name(sh);
+ if (!obj)
+ continue;
+
+ const char* this_name = PyUnicode_AsUTF8(obj);
+ if (!this_name)
+ continue;
+
+ if (!strcmp(name, this_name))
+ {
+ Py_INCREF(sh);
+ return sh;
+ }
+ }
+
+ ostringstream os;
+ os << "No sheet named '" << name << "' found";
+ PyErr_SetString(PyExc_IndexError, os.str().c_str());
+ return nullptr;
+}
+
+PyObject* document_getter_sheet_names(pyobj_document* self, void* closure)
+{
+ model_context& cxt = self->m_data->m_global.m_cxt;
+ const vector<PyObject*>& sheets = self->m_data->m_sheets;
+ size_t n = sheets.size();
+ PyObject* t = PyTuple_New(n);
+ for (size_t i = 0; i < n; ++i)
+ {
+ std::string name = cxt.get_sheet_name(i);
+ PyObject* o = PyUnicode_FromString(name.c_str());
+ PyTuple_SetItem(t, i, o);
+ }
+
+ return t;
+}
+
+PyMethodDef document_methods[] =
+{
+ { "append_sheet", (PyCFunction)document_append_sheet, METH_VARARGS, "append new sheet to the document" },
+ { "calculate", (PyCFunction)document_calculate, METH_VARARGS | METH_KEYWORDS, doc_document_calculate },
+ { "get_sheet", (PyCFunction)document_get_sheet, METH_O, "get a sheet object either by index or name" },
+ { nullptr }
+};
+
+PyGetSetDef document_getset[] =
+{
+ { "sheet_names", (getter)document_getter_sheet_names, (setter)nullptr, "A tuple of sheet names", nullptr },
+ { nullptr }
+};
+
+PyTypeObject document_type =
+{
+ PyVarObject_HEAD_INIT(nullptr, 0)
+ "ixion.Document", // tp_name
+ sizeof(pyobj_document), // tp_basicsize
+ 0, // tp_itemsize
+ (destructor)document_dealloc, // tp_dealloc
+ 0, // tp_print
+ 0, // tp_getattr
+ 0, // tp_setattr
+ 0, // tp_compare
+ 0, // tp_repr
+ 0, // tp_as_number
+ 0, // tp_as_sequence
+ 0, // tp_as_mapping
+ 0, // tp_hash
+ 0, // tp_call
+ 0, // tp_str
+ 0, // tp_getattro
+ 0, // tp_setattro
+ 0, // tp_as_buffer
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, // tp_flags
+ "ixion document object", // tp_doc
+ 0, // tp_traverse
+ 0, // tp_clear
+ 0, // tp_richcompare
+ 0, // tp_weaklistoffset
+ 0, // tp_iter
+ 0, // tp_iternext
+ document_methods, // tp_methods
+ 0, // tp_members
+ document_getset, // tp_getset
+ 0, // tp_base
+ 0, // tp_dict
+ 0, // tp_descr_get
+ 0, // tp_descr_set
+ 0, // tp_dictoffset
+ (initproc)document_init, // tp_init
+ 0, // tp_alloc
+ document_new, // tp_new
+};
+
+}
+
+PyTypeObject* get_document_type()
+{
+ return &document_type;
+}
+
+}}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/src/python/document.hpp b/src/python/document.hpp
new file mode 100644
index 0000000..b024000
--- /dev/null
+++ b/src/python/document.hpp
@@ -0,0 +1,21 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef INCLUDED_IXION_PYTHON_DOCUMENT_HPP
+#define INCLUDED_IXION_PYTHON_DOCUMENT_HPP
+
+#include <Python.h>
+
+namespace ixion { namespace python {
+
+PyTypeObject* get_document_type();
+
+}}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/src/python/global.cpp b/src/python/global.cpp
new file mode 100644
index 0000000..4d9a76b
--- /dev/null
+++ b/src/python/global.cpp
@@ -0,0 +1,39 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include "ixion/config.hpp"
+#include "global.hpp"
+
+namespace ixion { namespace python {
+
+document_global::document_global() :
+ m_cxt(),
+ m_resolver(ixion::formula_name_resolver::get(formula_name_resolver_t::excel_a1, &m_cxt))
+{
+}
+
+PyObject* get_python_document_error()
+{
+ static PyObject* p = PyErr_NewException(const_cast<char*>("ixion.DocumentError"), NULL, NULL);
+ return p;
+}
+
+PyObject* get_python_sheet_error()
+{
+ static PyObject* p = PyErr_NewException(const_cast<char*>("ixion.SheetError"), NULL, NULL);
+ return p;
+}
+
+PyObject* get_python_formula_error()
+{
+ static PyObject* p = PyErr_NewException(const_cast<char*>("ixion.FormulaError"), NULL, NULL);
+ return p;
+}
+
+}}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/src/python/global.hpp b/src/python/global.hpp
new file mode 100644
index 0000000..d0a917f
--- /dev/null
+++ b/src/python/global.hpp
@@ -0,0 +1,45 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef INCLUDED_IXION_PYTHON_GLOBAL_HPP
+#define INCLUDED_IXION_PYTHON_GLOBAL_HPP
+
+#include <Python.h>
+
+#include "ixion/model_context.hpp"
+#include "ixion/formula_name_resolver.hpp"
+#include "ixion/address.hpp"
+
+namespace ixion { namespace python {
+
+struct document_global
+{
+ model_context m_cxt;
+
+ /**
+ * positions of all modified cells (formula and non-formula cells) since
+ * last calculation.
+ */
+ abs_range_set_t m_modified_cells;
+
+ /** positions of all dirty formula cells since last calculation. */
+ abs_range_set_t m_dirty_formula_cells;
+
+ std::unique_ptr<formula_name_resolver> m_resolver;
+
+ document_global();
+};
+
+PyObject* get_python_document_error();
+PyObject* get_python_sheet_error();
+PyObject* get_python_formula_error();
+
+}}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/src/python/python.cpp b/src/python/python.cpp
new file mode 100644
index 0000000..1c8b5bf
--- /dev/null
+++ b/src/python/python.cpp
@@ -0,0 +1,174 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include "document.hpp"
+#include "sheet.hpp"
+#include "global.hpp"
+
+#include "ixion/env.hpp"
+#include "ixion/info.hpp"
+
+#include <iostream>
+#include <string>
+
+#define IXION_DEBUG_PYTHON 0
+#define GETSTATE(m) ((struct module_state*)PyModule_GetState(m))
+
+using namespace std;
+
+namespace ixion { namespace python {
+
+namespace {
+
+#if IXION_DEBUG_PYTHON
+void print_args(PyObject* args)
+{
+ string args_str;
+ PyObject* repr = PyObject_Repr(args);
+ if (repr)
+ {
+ Py_INCREF(repr);
+ args_str = PyBytes_AsString(repr);
+ Py_DECREF(repr);
+ }
+ cout << args_str << "\n";
+}
+#endif
+
+PyObject* info(PyObject*, PyObject*)
+{
+ cout << "ixion version: "
+ << ixion::get_version_major() << '.'
+ << ixion::get_version_minor() << '.'
+ << ixion::get_version_micro() << endl;
+
+ Py_INCREF(Py_None);
+ return Py_None;
+}
+
+PyObject* column_label(PyObject* /*module*/, PyObject* args, PyObject* kwargs)
+{
+ int start;
+ int stop;
+ int resolver_index = 1; // Excel A1 by default
+ static const char* kwlist[] = { "start", "stop", "resolver", nullptr };
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "ii|i", const_cast<char**>(kwlist), &start, &stop, &resolver_index))
+ return nullptr;
+
+ if (start >= stop)
+ {
+ PyErr_SetString(
+ PyExc_IndexError,
+ "Start position is larger or equal to the stop position.");
+ return nullptr;
+ }
+
+ if (start < 0)
+ {
+ PyErr_SetString(
+ PyExc_IndexError,
+ "Start position should be larger than or equal to 0.");
+ return nullptr;
+ }
+
+ auto resolver = formula_name_resolver::get(
+ static_cast<formula_name_resolver_t>(resolver_index), nullptr);
+ if (!resolver)
+ {
+ PyErr_SetString(
+ get_python_formula_error(), "Specified resolver type is invalid.");
+ return nullptr;
+ }
+
+ int size = stop - start;
+ PyObject* t = PyTuple_New(size);
+
+ for (int i = start; i < stop; ++i)
+ {
+ string s = resolver->get_column_name(i);
+ PyObject* o = PyUnicode_FromString(s.c_str());
+ PyTuple_SetItem(t, i-start, o);
+ }
+
+ return t;
+}
+
+PyMethodDef ixion_methods[] =
+{
+ { "info", (PyCFunction)info, METH_NOARGS, "Print ixion module information." },
+ { "column_label", (PyCFunction)column_label, METH_VARARGS | METH_KEYWORDS,
+ "Return a list of column label strings based on specified column range values." },
+ { nullptr, nullptr, 0, nullptr }
+};
+
+struct module_state
+{
+ PyObject* error;
+};
+
+int ixion_traverse(PyObject* m, visitproc visit, void* arg)
+{
+ Py_VISIT(GETSTATE(m)->error);
+ return 0;
+}
+
+int ixion_clear(PyObject* m)
+{
+ Py_CLEAR(GETSTATE(m)->error);
+ return 0;
+}
+
+}
+
+struct PyModuleDef moduledef =
+{
+ PyModuleDef_HEAD_INIT,
+ "ixion",
+ nullptr,
+ sizeof(struct module_state),
+ ixion_methods,
+ nullptr,
+ ixion_traverse,
+ ixion_clear,
+ nullptr
+};
+
+}}
+
+extern "C" {
+
+IXION_DLLPUBLIC PyObject* PyInit_ixion()
+{
+ PyTypeObject* doc_type = ixion::python::get_document_type();
+ if (PyType_Ready(doc_type) < 0)
+ return nullptr;
+
+ PyTypeObject* sheet_type = ixion::python::get_sheet_type();
+ if (PyType_Ready(sheet_type) < 0)
+ return nullptr;
+
+ PyObject* m = PyModule_Create(&ixion::python::moduledef);
+
+ Py_INCREF(doc_type);
+ PyModule_AddObject(m, "Document", reinterpret_cast<PyObject*>(doc_type));
+
+ Py_INCREF(sheet_type);
+ PyModule_AddObject(m, "Sheet", reinterpret_cast<PyObject*>(sheet_type));
+
+ PyModule_AddObject(
+ m, "DocumentError", ixion::python::get_python_document_error());
+ PyModule_AddObject(
+ m, "SheetError", ixion::python::get_python_sheet_error());
+ PyModule_AddObject(
+ m, "FormulaError", ixion::python::get_python_formula_error());
+
+ return m;
+}
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/src/python/sheet.cpp b/src/python/sheet.cpp
new file mode 100644
index 0000000..873004a
--- /dev/null
+++ b/src/python/sheet.cpp
@@ -0,0 +1,376 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include "sheet.hpp"
+#include "global.hpp"
+
+#include <ixion/model_context.hpp>
+#include <ixion/formula_name_resolver.hpp>
+#include <ixion/formula.hpp>
+#include <ixion/cell.hpp>
+#include <ixion/exceptions.hpp>
+
+#include <structmember.h>
+
+#include <iostream>
+
+using namespace std;
+
+namespace ixion { namespace python {
+
+sheet_data::sheet_data() : m_global(nullptr), m_sheet_index(-1) {}
+
+namespace {
+
+struct sheet
+{
+ PyObject_HEAD
+ PyObject* name; // sheet name
+
+ sheet_data* m_data;
+};
+
+void sheet_dealloc(sheet* self)
+{
+ delete self->m_data;
+
+ Py_XDECREF(self->name);
+ Py_TYPE(self)->tp_free(reinterpret_cast<PyObject*>(self));
+}
+
+PyObject* sheet_new(PyTypeObject* type, PyObject* /*args*/, PyObject* /*kwargs*/)
+{
+ sheet* self = (sheet*)type->tp_alloc(type, 0);
+ if (!self)
+ return nullptr;
+
+ self->m_data = new sheet_data;
+
+ self->name = PyUnicode_FromString("");
+ if (!self->name)
+ {
+ Py_DECREF(self);
+ return nullptr;
+ }
+ return reinterpret_cast<PyObject*>(self);
+}
+
+int sheet_init(sheet* self, PyObject* args, PyObject* kwargs)
+{
+ PyObject* name = nullptr;
+ static const char* kwlist[] = { "name", nullptr };
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|O", (char**)kwlist, &name))
+ return -1;
+
+ if (name)
+ {
+ PyObject* tmp = self->name;
+ Py_INCREF(name);
+ self->name = name;
+ Py_XDECREF(tmp);
+ }
+
+ return 0;
+}
+
+PyObject* sheet_set_numeric_cell(sheet* self, PyObject* args, PyObject* kwargs)
+{
+ int col = -1;
+ int row = -1;
+ double val = 0.0;
+
+ static const char* kwlist[] = { "row", "column", "value", nullptr };
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "iid", const_cast<char**>(kwlist), &row, &col, &val))
+ return nullptr;
+
+ sheet_data* sd = get_sheet_data(reinterpret_cast<PyObject*>(self));
+ if (!sd->m_global)
+ {
+ PyErr_SetString(get_python_sheet_error(),
+ "This Sheet object does not belong to a Document object.");
+ return nullptr;
+ }
+
+ ixion::model_context& cxt = sd->m_global->m_cxt;
+ ixion::abs_address_t pos(sd->m_sheet_index, row, col);
+ sd->m_global->m_modified_cells.insert(pos);
+ cxt.set_numeric_cell(pos, val);
+
+ Py_INCREF(Py_None);
+ return Py_None;
+}
+
+PyObject* sheet_set_string_cell(sheet* self, PyObject* args, PyObject* kwargs)
+{
+ int col = -1;
+ int row = -1;
+ char* val = nullptr;
+
+ static const char* kwlist[] = { "row", "column", "value", nullptr };
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "iis", const_cast<char**>(kwlist), &row, &col, &val))
+ return nullptr;
+
+ sheet_data* sd = get_sheet_data(reinterpret_cast<PyObject*>(self));
+ if (!sd->m_global)
+ {
+ PyErr_SetString(get_python_sheet_error(),
+ "This Sheet object does not belong to a Document object.");
+ return nullptr;
+ }
+
+ ixion::model_context& cxt = sd->m_global->m_cxt;
+ ixion::abs_address_t pos(sd->m_sheet_index, row, col);
+ sd->m_global->m_modified_cells.insert(pos);
+ cxt.set_string_cell(pos, val);
+
+ Py_INCREF(Py_None);
+ return Py_None;
+}
+
+PyObject* sheet_set_formula_cell(sheet* self, PyObject* args, PyObject* kwargs)
+{
+ int col = -1;
+ int row = -1;
+ char* formula = nullptr;
+
+ static const char* kwlist[] = { "row", "column", "value", nullptr };
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "iis", const_cast<char**>(kwlist), &row, &col, &formula))
+ return nullptr;
+
+ sheet_data* sd = get_sheet_data(reinterpret_cast<PyObject*>(self));
+ if (!sd->m_global)
+ {
+ PyErr_SetString(get_python_sheet_error(),
+ "This Sheet object does not belong to a Document object.");
+ return nullptr;
+ }
+
+ ixion::model_context& cxt = sd->m_global->m_cxt;
+
+ ixion::abs_address_t pos(sd->m_sheet_index, row, col);
+ sd->m_global->m_dirty_formula_cells.insert(pos);
+
+ ixion::formula_tokens_t tokens =
+ ixion::parse_formula_string(cxt, pos, *sd->m_global->m_resolver, formula);
+
+ auto ts = formula_tokens_store::create();
+ ts->get() = std::move(tokens);
+ cxt.set_formula_cell(pos, ts);
+
+ // Put this formula cell in a dependency chain.
+ ixion::register_formula_cell(cxt, pos);
+
+ Py_INCREF(Py_None);
+ return Py_None;
+}
+
+PyObject* sheet_get_numeric_value(sheet* self, PyObject* args, PyObject* kwargs)
+{
+ int col = -1;
+ int row = -1;
+
+ static const char* kwlist[] = { "row", "column", nullptr };
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "ii", const_cast<char**>(kwlist), &row, &col))
+ return nullptr;
+
+ sheet_data* sd = get_sheet_data(reinterpret_cast<PyObject*>(self));
+ if (!sd->m_global)
+ {
+ PyErr_SetString(get_python_sheet_error(),
+ "This Sheet object does not belong to a Document object.");
+ return nullptr;
+ }
+
+ ixion::model_context& cxt = sd->m_global->m_cxt;
+ double val = 0.0;
+ try
+ {
+ val = cxt.get_numeric_value(ixion::abs_address_t(sd->m_sheet_index, row, col));
+ }
+ catch (const formula_error&)
+ {
+ PyErr_SetString(PyExc_TypeError, "The formula cell has yet to be calculated");
+ return nullptr;
+ }
+
+ return PyFloat_FromDouble(val);
+}
+
+PyObject* sheet_get_string_value(sheet* self, PyObject* args, PyObject* kwargs)
+{
+ int col = -1;
+ int row = -1;
+
+ static const char* kwlist[] = { "row", "column", nullptr };
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "ii", const_cast<char**>(kwlist), &row, &col))
+ return nullptr;
+
+ sheet_data* sd = get_sheet_data(reinterpret_cast<PyObject*>(self));
+ if (!sd->m_global)
+ {
+ PyErr_SetString(get_python_sheet_error(),
+ "This Sheet object does not belong to a Document object.");
+ return nullptr;
+ }
+
+ ixion::model_context& cxt = sd->m_global->m_cxt;
+ std::string_view s = cxt.get_string_value(ixion::abs_address_t(sd->m_sheet_index, row, col));
+ if (s.empty())
+ return PyUnicode_FromStringAndSize(nullptr, 0);
+
+ return PyUnicode_FromStringAndSize(s.data(), s.size());
+}
+
+PyObject* sheet_get_formula_expression(sheet* self, PyObject* args, PyObject* kwargs)
+{
+ int col = -1;
+ int row = -1;
+
+ static const char* kwlist[] = { "row", "column", nullptr };
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "ii", const_cast<char**>(kwlist), &row, &col))
+ return nullptr;
+
+ sheet_data* sd = get_sheet_data(reinterpret_cast<PyObject*>(self));
+ if (!sd->m_global)
+ {
+ PyErr_SetString(get_python_sheet_error(),
+ "This Sheet object does not belong to a Document object.");
+ return nullptr;
+ }
+
+ ixion::model_context& cxt = sd->m_global->m_cxt;
+ ixion::abs_address_t pos(sd->m_sheet_index, row, col);
+ const ixion::formula_cell* fc = cxt.get_formula_cell(pos);
+
+ if (!fc)
+ {
+ PyErr_SetString(get_python_sheet_error(), "No formula cell at specified position.");
+ return nullptr;
+ }
+
+ const ixion::formula_tokens_t& ft = fc->get_tokens()->get();
+
+ string str = ixion::print_formula_tokens(cxt, pos, *sd->m_global->m_resolver, ft);
+ if (str.empty())
+ return PyUnicode_FromString("");
+
+ return PyUnicode_FromStringAndSize(str.data(), str.size());
+}
+
+PyObject* sheet_erase_cell(sheet* self, PyObject* args, PyObject* kwargs)
+{
+ PyErr_SetString(PyExc_RuntimeError, "erase_cell() method has been deprecated. Please use empty_cell() instead.");
+ return nullptr;
+}
+
+PyObject* sheet_empty_cell(sheet* self, PyObject* args, PyObject* kwargs)
+{
+ int col = -1;
+ int row = -1;
+
+ static const char* kwlist[] = { "row", "column", nullptr };
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "ii", const_cast<char**>(kwlist), &row, &col))
+ return nullptr;
+
+ sheet_data* sd = get_sheet_data(reinterpret_cast<PyObject*>(self));
+ if (!sd->m_global)
+ {
+ PyErr_SetString(get_python_sheet_error(),
+ "This Sheet object does not belong to a Document object.");
+ return nullptr;
+ }
+
+ ixion::model_context& cxt = sd->m_global->m_cxt;
+ abs_address_t pos(sd->m_sheet_index, row, col);
+ sd->m_global->m_modified_cells.insert(pos);
+ cxt.empty_cell(pos);
+
+ Py_INCREF(Py_None);
+ return Py_None;
+}
+
+PyMethodDef sheet_methods[] =
+{
+ { "set_numeric_cell", (PyCFunction)sheet_set_numeric_cell, METH_VARARGS | METH_KEYWORDS, "set numeric value to specified cell" },
+ { "set_formula_cell", (PyCFunction)sheet_set_formula_cell, METH_VARARGS | METH_KEYWORDS, "set formula to specified cell" },
+ { "set_string_cell", (PyCFunction)sheet_set_string_cell, METH_VARARGS | METH_KEYWORDS, "set string to specified cell" },
+ { "get_numeric_value", (PyCFunction)sheet_get_numeric_value, METH_VARARGS | METH_KEYWORDS, "get numeric value from specified cell" },
+ { "get_string_value", (PyCFunction)sheet_get_string_value, METH_VARARGS | METH_KEYWORDS, "get string value from specified cell" },
+ { "get_formula_expression", (PyCFunction)sheet_get_formula_expression, METH_VARARGS | METH_KEYWORDS, "get formula expression string from specified cell position" },
+ { "empty_cell", (PyCFunction)sheet_empty_cell, METH_VARARGS | METH_KEYWORDS, "empty cell at specified position" },
+ { "erase_cell", (PyCFunction)sheet_erase_cell, METH_VARARGS | METH_KEYWORDS, "erase cell at specified position" },
+ { nullptr }
+};
+
+PyMemberDef sheet_members[] =
+{
+ { (char*)"name", T_OBJECT_EX, offsetof(sheet, name), READONLY, (char*)"sheet name" },
+ { nullptr }
+};
+
+PyTypeObject sheet_type =
+{
+ PyVarObject_HEAD_INIT(nullptr, 0)
+ "ixion.Sheet", // tp_name
+ sizeof(sheet), // tp_basicsize
+ 0, // tp_itemsize
+ (destructor)sheet_dealloc, // tp_dealloc
+ 0, // tp_print
+ 0, // tp_getattr
+ 0, // tp_setattr
+ 0, // tp_compare
+ 0, // tp_repr
+ 0, // tp_as_number
+ 0, // tp_as_sequence
+ 0, // tp_as_mapping
+ 0, // tp_hash
+ 0, // tp_call
+ 0, // tp_str
+ 0, // tp_getattro
+ 0, // tp_setattro
+ 0, // tp_as_buffer
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, // tp_flags
+ "ixion sheet object", // tp_doc
+ 0, // tp_traverse
+ 0, // tp_clear
+ 0, // tp_richcompare
+ 0, // tp_weaklistoffset
+ 0, // tp_iter
+ 0, // tp_iternext
+ sheet_methods, // tp_methods
+ sheet_members, // tp_members
+ 0, // tp_getset
+ 0, // tp_base
+ 0, // tp_dict
+ 0, // tp_descr_get
+ 0, // tp_descr_set
+ 0, // tp_dictoffset
+ (initproc)sheet_init, // tp_init
+ 0, // tp_alloc
+ sheet_new, // tp_new
+};
+
+}
+
+PyTypeObject* get_sheet_type()
+{
+ return &sheet_type;
+}
+
+sheet_data* get_sheet_data(PyObject* obj)
+{
+ return reinterpret_cast<sheet*>(obj)->m_data;
+}
+
+PyObject* get_sheet_name(PyObject* obj)
+{
+ return reinterpret_cast<sheet*>(obj)->name;
+}
+
+}}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/src/python/sheet.hpp b/src/python/sheet.hpp
new file mode 100644
index 0000000..e85596e
--- /dev/null
+++ b/src/python/sheet.hpp
@@ -0,0 +1,44 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef INCLUDED_IXION_PYTHON_SHEET_HPP
+#define INCLUDED_IXION_PYTHON_SHEET_HPP
+
+#include <Python.h>
+
+#include "ixion/types.hpp"
+
+namespace ixion { namespace python {
+
+struct document_global;
+
+struct sheet_data
+{
+ document_global* m_global;
+ ixion::sheet_t m_sheet_index;
+
+ sheet_data();
+};
+
+PyTypeObject* get_sheet_type();
+
+sheet_data* get_sheet_data(PyObject* obj);
+
+/**
+ * Get the sheet name of a python sheet object.
+ *
+ * @param obj python sheet object.
+ *
+ * @return python string object storing the sheet name.
+ */
+PyObject* get_sheet_name(PyObject* obj);
+
+}}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/src/python/test-env.sh b/src/python/test-env.sh
new file mode 100644
index 0000000..fc3f6cb
--- /dev/null
+++ b/src/python/test-env.sh
@@ -0,0 +1,9 @@
+
+PYTHONPATH=.libs:$PYTHONPATH
+
+# Ensure that the libixion shared library built as part of the current build
+# is discovered first.
+LD_LIBRARY_PATH=../libixion/.libs:$LD_LIBRARY_PATH
+
+export PYTHONPATH LD_LIBRARY_PATH
+
diff --git a/src/session_handler.cpp b/src/session_handler.cpp
new file mode 100644
index 0000000..b5e49a9
--- /dev/null
+++ b/src/session_handler.cpp
@@ -0,0 +1,169 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include "session_handler.hpp"
+#include "app_common.hpp"
+
+#include "ixion/formula_name_resolver.hpp"
+#include "ixion/formula_result.hpp"
+#include "ixion/formula_tokens.hpp"
+#include "ixion/config.hpp"
+
+#include <string>
+#include <iostream>
+#include <sstream>
+#include <mutex>
+
+using namespace std;
+
+namespace ixion {
+
+session_handler::factory::factory(const model_context& cxt) :
+ m_context(cxt), m_show_sheet_name(false) {}
+
+session_handler::factory::~factory() {}
+
+std::unique_ptr<iface::session_handler> session_handler::factory::create()
+{
+ return std::make_unique<session_handler>(m_context, m_show_sheet_name);
+}
+
+void session_handler::factory::show_sheet_name(bool b)
+{
+ m_show_sheet_name = b;
+}
+
+struct session_handler::impl
+{
+ const model_context& m_context;
+ std::unique_ptr<formula_name_resolver> mp_resolver;
+ std::string m_cell_name;
+ std::ostringstream m_buf;
+ bool m_show_sheet_name;
+
+ impl(const model_context& cxt, bool show_sheet_name) :
+ m_context(cxt),
+ mp_resolver(formula_name_resolver::get(formula_name_resolver_t::excel_a1, &cxt)),
+ m_show_sheet_name(show_sheet_name) {}
+};
+
+session_handler::session_handler(const model_context& cxt, bool show_sheet_name) :
+ mp_impl(std::make_unique<impl>(cxt, show_sheet_name)) {}
+
+session_handler::~session_handler() {}
+
+void session_handler::begin_cell_interpret(const abs_address_t& pos)
+{
+ // Convert absolute to relative address, which looks better when printed.
+ address_t pos_display(pos);
+ pos_display.set_absolute(false);
+ mp_impl->m_cell_name = mp_impl->mp_resolver->get_name(pos_display, abs_address_t(), mp_impl->m_show_sheet_name);
+
+ mp_impl->m_buf << detail::get_formula_result_output_separator() << endl;
+ mp_impl->m_buf << mp_impl->m_cell_name << ": ";
+}
+
+void session_handler::end_cell_interpret()
+{
+ print(mp_impl->m_buf.str());
+}
+
+void session_handler::set_result(const formula_result& result)
+{
+ mp_impl->m_buf << std::endl << mp_impl->m_cell_name << ": result = ";
+
+ switch (result.get_type())
+ {
+ case formula_result::result_type::string:
+ {
+ constexpr char quote = '\'';
+ mp_impl->m_buf << quote << result.str(mp_impl->m_context) << quote;
+ break;
+ }
+ default:
+ mp_impl->m_buf << result.str(mp_impl->m_context);
+ }
+
+ mp_impl->m_buf << " [" << result.get_type() << ']' << std::endl;
+}
+
+void session_handler::set_invalid_expression(std::string_view msg)
+{
+ mp_impl->m_buf << endl << mp_impl->m_cell_name << ": invalid expression: " << msg << endl;
+}
+
+void session_handler::set_formula_error(std::string_view msg)
+{
+ mp_impl->m_buf << endl << mp_impl->m_cell_name << ": result = " << msg << endl;
+}
+
+void session_handler::push_token(fopcode_t fop)
+{
+ switch (fop)
+ {
+ case fop_sep:
+ {
+ mp_impl->m_buf << mp_impl->m_context.get_config().sep_function_arg;
+ break;
+ }
+ case fop_array_row_sep:
+ {
+ mp_impl->m_buf << mp_impl->m_context.get_config().sep_matrix_row;
+ break;
+ }
+ default:
+ mp_impl->m_buf << get_formula_opcode_string(fop);
+ }
+}
+
+void session_handler::push_value(double val)
+{
+ mp_impl->m_buf << val;
+}
+
+void session_handler::push_string(size_t sid)
+{
+ const string* p = mp_impl->m_context.get_string(sid);
+ mp_impl->m_buf << '"';
+ if (p)
+ mp_impl->m_buf << *p;
+ else
+ mp_impl->m_buf << "(null string)";
+ mp_impl->m_buf << '"';
+}
+
+void session_handler::push_single_ref(const address_t& addr, const abs_address_t& pos)
+{
+ mp_impl->m_buf << mp_impl->mp_resolver->get_name(addr, pos, false);
+}
+
+void session_handler::push_range_ref(const range_t& range, const abs_address_t& pos)
+{
+ mp_impl->m_buf << mp_impl->mp_resolver->get_name(range, pos, false);
+}
+
+void session_handler::push_table_ref(const table_t& table)
+{
+ mp_impl->m_buf << mp_impl->mp_resolver->get_name(table);
+}
+
+void session_handler::push_function(formula_function_t foc)
+{
+ mp_impl->m_buf << get_formula_function_name(foc);
+}
+
+void session_handler::print(const std::string& msg)
+{
+ static std::mutex mtx;
+ std::lock_guard<std::mutex> lock(mtx);
+ cout << msg;
+}
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
+
diff --git a/src/session_handler.hpp b/src/session_handler.hpp
new file mode 100644
index 0000000..cdedf41
--- /dev/null
+++ b/src/session_handler.hpp
@@ -0,0 +1,66 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef INCLUDED_IXION_SESSION_HANDLER_HPP
+#define INCLUDED_IXION_SESSION_HANDLER_HPP
+
+#include "ixion/interface/session_handler.hpp"
+#include "ixion/model_context.hpp"
+
+#include <memory>
+
+namespace ixion {
+
+class session_handler : public iface::session_handler
+{
+ struct impl;
+ std::unique_ptr<impl> mp_impl;
+
+public:
+ session_handler(const model_context& cxt, bool show_sheet_name);
+ virtual ~session_handler();
+
+ virtual void begin_cell_interpret(const abs_address_t& pos) override;
+ virtual void end_cell_interpret() override;
+ virtual void set_result(const formula_result& result) override;
+ virtual void set_invalid_expression(std::string_view msg) override;
+ virtual void set_formula_error(std::string_view msg) override;
+
+ virtual void push_token(fopcode_t fop) override;
+ virtual void push_value(double val) override;
+ virtual void push_string(size_t sid) override;
+ virtual void push_single_ref(const address_t& addr, const abs_address_t& pos) override;
+ virtual void push_range_ref(const range_t& range, const abs_address_t& pos) override;
+ virtual void push_table_ref(const table_t& table) override;
+ virtual void push_function(formula_function_t foc) override;
+
+ class factory : public model_context::session_handler_factory
+ {
+ const model_context& m_context;
+ bool m_show_sheet_name;
+ public:
+ factory(const model_context& cxt);
+ virtual ~factory() override;
+
+ virtual std::unique_ptr<iface::session_handler> create() override;
+
+ void show_sheet_name(bool b);
+ };
+
+ /**
+ * Print string to stdout in a thread-safe way.
+ *
+ * @param msg string to print to stdout.
+ */
+ static void print(const std::string& msg);
+};
+
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/src/sort_input_parser.cpp b/src/sort_input_parser.cpp
new file mode 100644
index 0000000..2069455
--- /dev/null
+++ b/src/sort_input_parser.cpp
@@ -0,0 +1,151 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include "sort_input_parser.hpp"
+#include "app_common.hpp"
+
+#include <ixion/global.hpp>
+
+#include <fstream>
+#include <iostream>
+#include <algorithm>
+
+using namespace std;
+
+namespace ixion {
+
+size_t hash_value(const std::string_view& s)
+{
+ size_t n = s.size();
+ size_t hash_val = 0;
+ for (size_t i = 0; i < n; ++i)
+ hash_val += (s[i] << i);
+ return hash_val;
+}
+
+
+namespace {
+
+struct mem_str_buf_printer
+{
+ void operator() (const std::string_view& r) const
+ {
+ std::cout << r << std::endl;
+ }
+};
+
+}
+
+sort_input_parser::parse_error::parse_error(const string& msg) :
+ general_error(msg) {}
+
+sort_input_parser::parse_error::~parse_error() throw() {}
+
+// ----------------------------------------------------------------------------
+
+sort_input_parser::sort_input_parser(const string& filepath) :
+ m_content(detail::load_file_content(filepath)),
+ mp(nullptr), mp_last(nullptr)
+{
+}
+
+sort_input_parser::~sort_input_parser()
+{
+}
+
+void sort_input_parser::parse()
+{
+ if (m_content.empty())
+ return;
+
+ mp = &m_content[0];
+ mp_last = &m_content[m_content.size()-1];
+ std::string_view cell, dep;
+ bool in_name = true;
+ for (;mp != mp_last; ++mp)
+ {
+ switch (*mp)
+ {
+ case ' ':
+ // Let's skip blanks for now.
+ break;
+ case '\n':
+ // end of line.
+ if (cell.empty())
+ {
+ if (!dep.empty())
+ throw parse_error("cell name is emtpy but dependency name isn't.");
+ }
+ else
+ {
+ if (dep.empty())
+ throw parse_error("dependency name is empty.");
+ else
+ insert_depend(cell, dep);
+ }
+
+ cell = std::string_view{};
+ dep = std::string_view{};
+ in_name = true;
+ break;
+ case ':':
+ if (!dep.empty())
+ throw parse_error("more than one separator in a single line!");
+ if (cell.empty())
+ throw parse_error("cell name is empty");
+ in_name = false;
+ break;
+ default:
+ if (in_name)
+ {
+ if (cell.empty())
+ cell = std::string_view{mp, 1u};
+ else
+ cell = std::string_view{cell.data(), cell.size() + 1u};
+ }
+ else
+ {
+ if (dep.empty())
+ dep = std::string_view{mp, 1u};
+ else
+ dep = std::string_view{dep.data(), dep.size() + 1u};
+ }
+ }
+ }
+}
+
+void sort_input_parser::print()
+{
+ remove_duplicate_cells();
+
+ // Run the depth first search.
+ vector<std::string_view> sorted;
+ sorted.reserve(m_all_cells.size());
+ dfs_type::back_inserter handler(sorted);
+ dfs_type dfs(m_all_cells.begin(), m_all_cells.end(), m_set, handler);
+ dfs.run();
+
+ // Print the result.
+ for_each(sorted.begin(), sorted.end(), mem_str_buf_printer());
+}
+
+void sort_input_parser::remove_duplicate_cells()
+{
+ sort(m_all_cells.begin(), m_all_cells.end());
+ vector<std::string_view>::iterator itr = unique(m_all_cells.begin(), m_all_cells.end());
+ m_all_cells.erase(itr, m_all_cells.end());
+}
+
+void sort_input_parser::insert_depend(const std::string_view& cell, const std::string_view& dep)
+{
+ m_set.insert(cell, dep);
+ m_all_cells.push_back(cell);
+ m_all_cells.push_back(dep);
+}
+
+}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/src/sort_input_parser.hpp b/src/sort_input_parser.hpp
new file mode 100644
index 0000000..92970e1
--- /dev/null
+++ b/src/sort_input_parser.hpp
@@ -0,0 +1,54 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef __IXION_SORT_INPUT_PARSER_HXX__
+#define __IXION_SORT_INPUT_PARSER_HXX__
+
+#include <ixion/exceptions.hpp>
+
+#include "depth_first_search.hpp"
+
+#include <vector>
+#include <string>
+
+namespace ixion {
+
+class sort_input_parser
+{
+ class parse_error : public general_error
+ {
+ public:
+ parse_error(const ::std::string& msg);
+ virtual ~parse_error() throw();
+ };
+
+ using dfs_type = depth_first_search<std::string_view, std::hash<std::string_view>>;
+
+public:
+ sort_input_parser(const ::std::string& filepath);
+ ~sort_input_parser();
+
+ void parse();
+ void print();
+
+private:
+ void remove_duplicate_cells();
+ void insert_depend(const std::string_view& cell, const std::string_view& dep);
+
+private:
+ dfs_type::relations m_set;
+ std::string m_content;
+ std::vector<std::string_view> m_all_cells;
+
+ const char* mp;
+ const char* mp_last;
+};
+
+}
+
+#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/src/table_handler.cpp b/src/table_handler.cpp
new file mode 100644
index 0000000..7d3c185
--- /dev/null
+++ b/src/table_handler.cpp
@@ -0,0 +1,141 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include "table_handler.hpp"
+
+namespace ixion {
+
+table_handler::entry::entry() :
+ name(empty_string_id), range(abs_range_t::invalid), totals_row_count(0) {}
+
+table_handler::~table_handler() {}
+
+abs_range_t table_handler::get_range(
+ const abs_address_t& pos, string_id_t column_first, string_id_t column_last,
+ table_areas_t areas) const
+{
+ entries_type::const_iterator it = m_entries.begin(), it_end = m_entries.end();
+ for (; it != it_end; ++it)
+ {
+ const entry& e = *it->second;
+ if (!e.range.contains(pos))
+ continue;
+
+ return get_column_range(e, column_first, column_last, areas);
+ }
+
+ return abs_range_t(abs_range_t::invalid);
+}
+
+abs_range_t table_handler::get_range(
+ string_id_t table, string_id_t column_first, string_id_t column_last,
+ table_areas_t areas) const
+{
+ entries_type::const_iterator it = m_entries.find(table);
+ if (it == m_entries.end())
+ // Table name not found.
+ return abs_range_t(abs_range_t::invalid);
+
+ const entry& e = *it->second;
+ return get_column_range(e, column_first, column_last, areas);
+}
+
+void table_handler::insert(std::unique_ptr<entry>& p)
+{
+ if (!p)
+ return;
+
+ string_id_t name = p->name;
+ m_entries.insert(
+ entries_type::value_type(
+ name, std::unique_ptr<entry>(p.release())));
+}
+
+void adjust_table_area(abs_range_t& range, const table_handler::entry& e, table_areas_t areas)
+{
+ bool headers = (areas & table_area_headers);
+ bool data = (areas & table_area_data);
+ bool totals = (areas & table_area_totals);
+
+ if (headers)
+ {
+ if (data)
+ {
+ if (totals)
+ {
+ // All areas.
+ return;
+ }
+
+ // Headers + data areas
+ range.last.row -= e.totals_row_count;
+ return;
+ }
+
+ // Headers only.
+ range.last.row = range.first.row;
+ return;
+ }
+
+ // No header row.
+ --range.first.row;
+
+ if (data)
+ {
+ if (totals)
+ {
+ // Data + totals areas
+ return;
+ }
+
+ // Data area only.
+ range.last.row -= e.totals_row_count;
+ return;
+ }
+
+ // Totals area only.
+ if (e.totals_row_count <= 0)
+ {
+ range = abs_range_t(abs_range_t::invalid);
+ return;
+ }
+
+ range.first.row = range.last.row;
+ range.first.row -= e.totals_row_count - 1;
+}
+
+abs_range_t table_handler::get_column_range(
+ const entry& e, string_id_t column_first, string_id_t column_last, table_areas_t areas) const
+{
+ if (column_first == empty_string_id)
+ {
+ // Area specifiers only.
+ abs_range_t ret = e.range;
+ adjust_table_area(ret, e, areas);
+ return ret;
+ }
+
+ for (size_t i = 0, n = e.columns.size(); i < n; ++i)
+ {
+ if (e.columns[i] == column_first)
+ {
+ // Matching column name found.
+ abs_range_t ret = e.range;
+ col_t col = e.range.first.column + i;
+ ret.first.column = col;
+ ret.last.column = col;
+ adjust_table_area(ret, e, areas);
+ return ret;
+ }
+ }
+
+ return abs_range_t(abs_range_t::invalid);
+}
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/src/table_handler.hpp b/src/table_handler.hpp
new file mode 100644
index 0000000..68f5859
--- /dev/null
+++ b/src/table_handler.hpp
@@ -0,0 +1,59 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef IXION_TABLE_HANDLER_HPP
+#define IXION_TABLE_HANDLER_HPP
+
+#include "ixion/interface/table_handler.hpp"
+#include "ixion/types.hpp"
+#include "ixion/address.hpp"
+
+#include <vector>
+#include <map>
+#include <memory>
+
+namespace ixion {
+
+class table_handler : public iface::table_handler
+{
+public:
+
+ /** single table entry */
+ struct entry
+ {
+ string_id_t name;
+ abs_range_t range;
+ std::vector<string_id_t> columns;
+ row_t totals_row_count;
+
+ entry();
+ };
+
+ typedef std::map<string_id_t, std::unique_ptr<entry>> entries_type;
+
+ virtual ~table_handler();
+
+ virtual abs_range_t get_range(
+ const abs_address_t& pos, string_id_t column_first, string_id_t column_last, table_areas_t areas) const;
+ virtual abs_range_t get_range(
+ string_id_t table, string_id_t column_first, string_id_t column_last, table_areas_t areas) const;
+
+ void insert(std::unique_ptr<entry>& p);
+
+private:
+ abs_range_t get_column_range(
+ const entry& e, string_id_t column_first, string_id_t column_last,
+ table_areas_t areas) const;
+
+ entries_type m_entries;
+};
+
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/src/test/Makefile.am b/src/test/Makefile.am
new file mode 100644
index 0000000..c6e7c23
--- /dev/null
+++ b/src/test/Makefile.am
@@ -0,0 +1,9 @@
+
+AM_CPPFLAGS = \
+ -I$(top_srcdir)/include \
+ -I$(top_srcdir)/src/include
+
+noinst_LIBRARIES = libixion-test.a
+
+libixion_test_a_SOURCES = \
+ test_global.cpp
diff --git a/src/test/Makefile.in b/src/test/Makefile.in
new file mode 100644
index 0000000..7e1f61f
--- /dev/null
+++ b/src/test/Makefile.in
@@ -0,0 +1,646 @@
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
+
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+VPATH = @srcdir@
+am__is_gnu_make = { \
+ if test -z '$(MAKELEVEL)'; then \
+ false; \
+ elif test -n '$(MAKE_HOST)'; then \
+ true; \
+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+ true; \
+ else \
+ false; \
+ fi; \
+}
+am__make_running_with_option = \
+ case $${target_option-} in \
+ ?) ;; \
+ *) echo "am__make_running_with_option: internal error: invalid" \
+ "target option '$${target_option-}' specified" >&2; \
+ exit 1;; \
+ esac; \
+ has_opt=no; \
+ sane_makeflags=$$MAKEFLAGS; \
+ if $(am__is_gnu_make); then \
+ sane_makeflags=$$MFLAGS; \
+ else \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ bs=\\; \
+ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
+ esac; \
+ fi; \
+ skip_next=no; \
+ strip_trailopt () \
+ { \
+ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+ }; \
+ for flg in $$sane_makeflags; do \
+ test $$skip_next = yes && { skip_next=no; continue; }; \
+ case $$flg in \
+ *=*|--*) continue;; \
+ -*I) strip_trailopt 'I'; skip_next=yes;; \
+ -*I?*) strip_trailopt 'I';; \
+ -*O) strip_trailopt 'O'; skip_next=yes;; \
+ -*O?*) strip_trailopt 'O';; \
+ -*l) strip_trailopt 'l'; skip_next=yes;; \
+ -*l?*) strip_trailopt 'l';; \
+ -[dEDm]) skip_next=yes;; \
+ -[JT]) skip_next=yes;; \
+ esac; \
+ case $$flg in \
+ *$$target_option*) has_opt=yes; break;; \
+ esac; \
+ done; \
+ test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = src/test
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/ax_cxx_compile_stdcxx.m4 \
+ $(top_srcdir)/m4/ax_cxx_compile_stdcxx_17.m4 \
+ $(top_srcdir)/m4/boost.m4 $(top_srcdir)/m4/libtool.m4 \
+ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
+ $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+LIBRARIES = $(noinst_LIBRARIES)
+ARFLAGS = cru
+AM_V_AR = $(am__v_AR_@AM_V@)
+am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@)
+am__v_AR_0 = @echo " AR " $@;
+am__v_AR_1 =
+libixion_test_a_AR = $(AR) $(ARFLAGS)
+libixion_test_a_LIBADD =
+am_libixion_test_a_OBJECTS = test_global.$(OBJEXT)
+libixion_test_a_OBJECTS = $(am_libixion_test_a_OBJECTS)
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo " GEN " $@;
+am__v_GEN_1 =
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 =
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__maybe_remake_depfiles = depfiles
+am__depfiles_remade = ./$(DEPDIR)/test_global.Po
+am__mv = mv -f
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+AM_V_lt = $(am__v_lt_@AM_V@)
+am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
+am__v_lt_0 = --silent
+am__v_lt_1 =
+LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CXXFLAGS) $(CXXFLAGS)
+AM_V_CXX = $(am__v_CXX_@AM_V@)
+am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@)
+am__v_CXX_0 = @echo " CXX " $@;
+am__v_CXX_1 =
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CXXLD = $(am__v_CXXLD_@AM_V@)
+am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@)
+am__v_CXXLD_0 = @echo " CXXLD " $@;
+am__v_CXXLD_1 =
+SOURCES = $(libixion_test_a_SOURCES)
+DIST_SOURCES = $(libixion_test_a_SOURCES)
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+# Read a list of newline-separated strings from the standard input,
+# and print each of them once, without duplicates. Input order is
+# *not* preserved.
+am__uniquify_input = $(AWK) '\
+ BEGIN { nonempty = 0; } \
+ { items[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in items) print i; }; } \
+'
+# Make sure the list of sources is unique. This is necessary because,
+# e.g., the same source file might be shared among _SOURCES variables
+# for different programs/libraries.
+am__define_uniq_tagged_files = \
+ list='$(am__tagged_files)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | $(am__uniquify_input)`
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AS = @AS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+BOOST_CPPFLAGS = @BOOST_CPPFLAGS@
+BOOST_FILESYSTEM_LDFLAGS = @BOOST_FILESYSTEM_LDFLAGS@
+BOOST_FILESYSTEM_LDPATH = @BOOST_FILESYSTEM_LDPATH@
+BOOST_FILESYSTEM_LIBS = @BOOST_FILESYSTEM_LIBS@
+BOOST_LDPATH = @BOOST_LDPATH@
+BOOST_PROGRAM_OPTIONS_LDFLAGS = @BOOST_PROGRAM_OPTIONS_LDFLAGS@
+BOOST_PROGRAM_OPTIONS_LDPATH = @BOOST_PROGRAM_OPTIONS_LDPATH@
+BOOST_PROGRAM_OPTIONS_LIBS = @BOOST_PROGRAM_OPTIONS_LIBS@
+BOOST_ROOT = @BOOST_ROOT@
+BOOST_SYSTEM_LDFLAGS = @BOOST_SYSTEM_LDFLAGS@
+BOOST_SYSTEM_LDPATH = @BOOST_SYSTEM_LDPATH@
+BOOST_SYSTEM_LIBS = @BOOST_SYSTEM_LIBS@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPPFLAGS = @CPPFLAGS@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DISTCHECK_CONFIGURE_FLAGS = @DISTCHECK_CONFIGURE_FLAGS@
+DLLTOOL = @DLLTOOL@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+ETAGS = @ETAGS@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+GREP = @GREP@
+HAVE_CXX17 = @HAVE_CXX17@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+IXION_API_VERSION = @IXION_API_VERSION@
+IXION_MAJOR_API_VERSION = @IXION_MAJOR_API_VERSION@
+IXION_MAJOR_VERSION = @IXION_MAJOR_VERSION@
+IXION_MICRO_VERSION = @IXION_MICRO_VERSION@
+IXION_MINOR_API_VERSION = @IXION_MINOR_API_VERSION@
+IXION_MINOR_VERSION = @IXION_MINOR_VERSION@
+IXION_VERSION = @IXION_VERSION@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
+MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MDDS_CFLAGS = @MDDS_CFLAGS@
+MDDS_LIBS = @MDDS_LIBS@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
+POW_LIB = @POW_LIB@
+PYTHON = @PYTHON@
+PYTHON_CFLAGS = @PYTHON_CFLAGS@
+PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
+PYTHON_LIBS = @PYTHON_LIBS@
+PYTHON_PLATFORM = @PYTHON_PLATFORM@
+PYTHON_PREFIX = @PYTHON_PREFIX@
+PYTHON_VERSION = @PYTHON_VERSION@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+VULKAN_CFLAGS = @VULKAN_CFLAGS@
+VULKAN_LIBS = @VULKAN_LIBS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+pkgpyexecdir = @pkgpyexecdir@
+pkgpythondir = @pkgpythondir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+pyexecdir = @pyexecdir@
+pythondir = @pythondir@
+runstatedir = @runstatedir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+AM_CPPFLAGS = \
+ -I$(top_srcdir)/include \
+ -I$(top_srcdir)/src/include
+
+noinst_LIBRARIES = libixion-test.a
+libixion_test_a_SOURCES = \
+ test_global.cpp
+
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .cpp .lo .o .obj
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/test/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --foreign src/test/Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+clean-noinstLIBRARIES:
+ -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
+
+libixion-test.a: $(libixion_test_a_OBJECTS) $(libixion_test_a_DEPENDENCIES) $(EXTRA_libixion_test_a_DEPENDENCIES)
+ $(AM_V_at)-rm -f libixion-test.a
+ $(AM_V_AR)$(libixion_test_a_AR) libixion-test.a $(libixion_test_a_OBJECTS) $(libixion_test_a_LIBADD)
+ $(AM_V_at)$(RANLIB) libixion-test.a
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_global.Po@am__quote@ # am--include-marker
+
+$(am__depfiles_remade):
+ @$(MKDIR_P) $(@D)
+ @echo '# dummy' >$@-t && $(am__mv) $@-t $@
+
+am--depfiles: $(am__depfiles_remade)
+
+.cpp.o:
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $<
+
+.cpp.obj:
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cpp.lo:
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+ID: $(am__tagged_files)
+ $(am__define_uniq_tagged_files); mkid -fID $$unique
+tags: tags-am
+TAGS: tags
+
+tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ set x; \
+ here=`pwd`; \
+ $(am__define_uniq_tagged_files); \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: ctags-am
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ $(am__define_uniq_tagged_files); \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+cscopelist: cscopelist-am
+
+cscopelist-am: $(am__tagged_files)
+ list='$(am__tagged_files)'; \
+ case "$(srcdir)" in \
+ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+ *) sdir=$(subdir)/$(srcdir) ;; \
+ esac; \
+ for i in $$list; do \
+ if test -f "$$i"; then \
+ echo "$(subdir)/$$i"; \
+ else \
+ echo "$$sdir/$$i"; \
+ fi; \
+ done >> $(top_builddir)/cscope.files
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+distdir: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) distdir-am
+
+distdir-am: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile $(LIBRARIES)
+installdirs:
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool clean-noinstLIBRARIES \
+ mostlyclean-am
+
+distclean: distclean-am
+ -rm -f ./$(DEPDIR)/test_global.Po
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -f ./$(DEPDIR)/test_global.Po
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \
+ clean-generic clean-libtool clean-noinstLIBRARIES \
+ cscopelist-am ctags ctags-am distclean distclean-compile \
+ distclean-generic distclean-libtool distclean-tags distdir dvi \
+ dvi-am html html-am info info-am install install-am \
+ install-data install-data-am install-dvi install-dvi-am \
+ install-exec install-exec-am install-html install-html-am \
+ install-info install-info-am install-man install-pdf \
+ install-pdf-am install-ps install-ps-am install-strip \
+ installcheck installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-compile \
+ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+ tags tags-am uninstall uninstall-am
+
+.PRECIOUS: Makefile
+
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/src/test/test_global.cpp b/src/test/test_global.cpp
new file mode 100644
index 0000000..0325b9c
--- /dev/null
+++ b/src/test/test_global.cpp
@@ -0,0 +1,24 @@
+#include "test_global.hpp"
+
+namespace ixion { namespace test {
+
+stack_printer::stack_printer(std::string msg) :
+ m_msg(std::move(msg))
+{
+ std::cerr << m_msg << ": --begin" << std::endl;
+ m_start_time = get_time();
+}
+
+stack_printer::~stack_printer()
+{
+ double end_time = get_time();
+ std::cerr << m_msg << ": --end (duration: " << (end_time-m_start_time) << " sec)" << std::endl;
+}
+
+double stack_printer::get_time() const
+{
+ double v = std::chrono::system_clock::now().time_since_epoch() / std::chrono::milliseconds(1);
+ return v / 1000.0;
+}
+
+}}
diff --git a/test-driver b/test-driver
new file mode 100755
index 0000000..be73b80
--- /dev/null
+++ b/test-driver
@@ -0,0 +1,153 @@
+#! /bin/sh
+# test-driver - basic testsuite driver script.
+
+scriptversion=2018-03-07.03; # UTC
+
+# Copyright (C) 2011-2021 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# This file is maintained in Automake, please report
+# bugs to <bug-automake@gnu.org> or send patches to
+# <automake-patches@gnu.org>.
+
+# Make unconditional expansion of undefined variables an error. This
+# helps a lot in preventing typo-related bugs.
+set -u
+
+usage_error ()
+{
+ echo "$0: $*" >&2
+ print_usage >&2
+ exit 2
+}
+
+print_usage ()
+{
+ cat <<END
+Usage:
+ test-driver --test-name NAME --log-file PATH --trs-file PATH
+ [--expect-failure {yes|no}] [--color-tests {yes|no}]
+ [--enable-hard-errors {yes|no}] [--]
+ TEST-SCRIPT [TEST-SCRIPT-ARGUMENTS]
+
+The '--test-name', '--log-file' and '--trs-file' options are mandatory.
+See the GNU Automake documentation for information.
+END
+}
+
+test_name= # Used for reporting.
+log_file= # Where to save the output of the test script.
+trs_file= # Where to save the metadata of the test run.
+expect_failure=no
+color_tests=no
+enable_hard_errors=yes
+while test $# -gt 0; do
+ case $1 in
+ --help) print_usage; exit $?;;
+ --version) echo "test-driver $scriptversion"; exit $?;;
+ --test-name) test_name=$2; shift;;
+ --log-file) log_file=$2; shift;;
+ --trs-file) trs_file=$2; shift;;
+ --color-tests) color_tests=$2; shift;;
+ --expect-failure) expect_failure=$2; shift;;
+ --enable-hard-errors) enable_hard_errors=$2; shift;;
+ --) shift; break;;
+ -*) usage_error "invalid option: '$1'";;
+ *) break;;
+ esac
+ shift
+done
+
+missing_opts=
+test x"$test_name" = x && missing_opts="$missing_opts --test-name"
+test x"$log_file" = x && missing_opts="$missing_opts --log-file"
+test x"$trs_file" = x && missing_opts="$missing_opts --trs-file"
+if test x"$missing_opts" != x; then
+ usage_error "the following mandatory options are missing:$missing_opts"
+fi
+
+if test $# -eq 0; then
+ usage_error "missing argument"
+fi
+
+if test $color_tests = yes; then
+ # Keep this in sync with 'lib/am/check.am:$(am__tty_colors)'.
+ red='' # Red.
+ grn='' # Green.
+ lgn='' # Light green.
+ blu='' # Blue.
+ mgn='' # Magenta.
+ std='' # No color.
+else
+ red= grn= lgn= blu= mgn= std=
+fi
+
+do_exit='rm -f $log_file $trs_file; (exit $st); exit $st'
+trap "st=129; $do_exit" 1
+trap "st=130; $do_exit" 2
+trap "st=141; $do_exit" 13
+trap "st=143; $do_exit" 15
+
+# Test script is run here. We create the file first, then append to it,
+# to ameliorate tests themselves also writing to the log file. Our tests
+# don't, but others can (automake bug#35762).
+: >"$log_file"
+"$@" >>"$log_file" 2>&1
+estatus=$?
+
+if test $enable_hard_errors = no && test $estatus -eq 99; then
+ tweaked_estatus=1
+else
+ tweaked_estatus=$estatus
+fi
+
+case $tweaked_estatus:$expect_failure in
+ 0:yes) col=$red res=XPASS recheck=yes gcopy=yes;;
+ 0:*) col=$grn res=PASS recheck=no gcopy=no;;
+ 77:*) col=$blu res=SKIP recheck=no gcopy=yes;;
+ 99:*) col=$mgn res=ERROR recheck=yes gcopy=yes;;
+ *:yes) col=$lgn res=XFAIL recheck=no gcopy=yes;;
+ *:*) col=$red res=FAIL recheck=yes gcopy=yes;;
+esac
+
+# Report the test outcome and exit status in the logs, so that one can
+# know whether the test passed or failed simply by looking at the '.log'
+# file, without the need of also peaking into the corresponding '.trs'
+# file (automake bug#11814).
+echo "$res $test_name (exit status: $estatus)" >>"$log_file"
+
+# Report outcome to console.
+echo "${col}${res}${std}: $test_name"
+
+# Register the test result, and other relevant metadata.
+echo ":test-result: $res" > $trs_file
+echo ":global-test-result: $res" >> $trs_file
+echo ":recheck: $recheck" >> $trs_file
+echo ":copy-in-global-log: $gcopy" >> $trs_file
+
+# Local Variables:
+# mode: shell-script
+# sh-indentation: 2
+# eval: (add-hook 'before-save-hook 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-time-zone: "UTC0"
+# time-stamp-end: "; # UTC"
+# End:
diff --git a/test/00-command-exit.txt b/test/00-command-exit.txt
new file mode 100644
index 0000000..4b58137
--- /dev/null
+++ b/test/00-command-exit.txt
@@ -0,0 +1,9 @@
+%% Test to make sure the %exit command really exits.
+%% The 'foo' command doesn't exist, so if that line is reached the parser
+%% throws an error.
+%mode init
+A1:1
+A2:2
+%exit
+%foo
+
diff --git a/test/01-concat-operator.txt b/test/01-concat-operator.txt
new file mode 100644
index 0000000..0d58884
--- /dev/null
+++ b/test/01-concat-operator.txt
@@ -0,0 +1,31 @@
+%% Test case for concat (&) operator.
+%mode init
+A1@left
+A2@-right
+A3=A1&A2
+B1@left
+B2@&
+B3@right
+B4@&
+B5@forward
+B6=B1&B2&B3&B4&B5
+C1="("&A3&" : "&B6&")"
+C2=1&2
+%calc
+%mode result
+A3="left-right"
+B6="left&right&forward"
+C1="(left-right : left&right&forward)"
+C2="12"
+%check
+%mode edit
+A2@_or_right
+B2@_and_
+B4@_and_
+%recalc
+%mode result
+A3="left_or_right"
+B6="left_and_right_and_forward"
+C1="(left_or_right : left_and_right_and_forward)"
+%check
+%exit
diff --git a/test/01-exponent-operator.txt b/test/01-exponent-operator.txt
new file mode 100644
index 0000000..2e9de31
--- /dev/null
+++ b/test/01-exponent-operator.txt
@@ -0,0 +1,17 @@
+%% Test case for the exponent (^) operator.
+%mode init
+A4=2^3
+B1:5
+B2=A4^B1
+%calc
+%mode result
+A4=8
+B2=32768
+%check
+%mode edit
+B1:4
+%recalc
+%mode result
+B2=4096
+%check
+%exit
diff --git a/test/01-inline-array-div.txt b/test/01-inline-array-div.txt
new file mode 100644
index 0000000..08039ce
--- /dev/null
+++ b/test/01-inline-array-div.txt
@@ -0,0 +1,35 @@
+%% Test for inline array with multiplication.
+%mode init
+{A1:B2}{={30,60;90,120}/3}
+{A3:B4}{=120/{2,3;4,0}}
+{A5:B6}{=A1:B2/10}
+{A7:B8}{=240/A1:B2}
+{A9:B10}{={9,16;21,25}/{3,8;7,5}}
+{A11:D11}{={4,2,3,"C"}/{2,"A","B",2}}
+%calc
+%mode result
+A1=10
+B1=20
+A2=30
+B2=40
+A3=60
+B3=40
+A4=30
+B4=#DIV/0!
+A5=1
+B5=2
+A6=3
+B6=4
+A7=24
+B7=12
+A8=8
+B8=6
+A9=3
+B9=2
+A10=3
+B10=5
+A11=2
+B11=#VALUE!
+C11=#VALUE!
+D11=#VALUE!
+%check
diff --git a/test/01-inline-array-exp.txt b/test/01-inline-array-exp.txt
new file mode 100644
index 0000000..b6509da
--- /dev/null
+++ b/test/01-inline-array-exp.txt
@@ -0,0 +1,35 @@
+%% Test for inline array with multiplication.
+%mode init
+{A1:B2}{={1,2;3,4}^2}
+{A3:B4}{=2^{1,2;3,4}}
+{A5:B6}{=A1:B2^2}
+{A7:B8}{=2^A1:B2}
+{A9:B10}{={1,2;3,4}^{5,2;4,3}}
+{A11:D11}{={2,3,4,"C"}^{4,"A","B",2}}
+%calc
+%mode result
+A1=1
+B1=4
+A2=9
+B2=16
+A3=2
+B3=4
+A4=8
+B4=16
+A5=1
+B5=16
+A6=81
+B6=256
+A7=2
+B7=16
+A8=512
+B8=65536
+A9=1
+B9=4
+A10=81
+B10=64
+A11=16
+B11=#VALUE!
+C11=#VALUE!
+D11=#VALUE!
+%check
diff --git a/test/01-inline-array-mul.txt b/test/01-inline-array-mul.txt
new file mode 100644
index 0000000..2b7b1e2
--- /dev/null
+++ b/test/01-inline-array-mul.txt
@@ -0,0 +1,35 @@
+%% Test for inline array with multiplication.
+%mode init
+{A1:B2}{={1,2;3,4}*10}
+{A3:B4}{=10*{2,3;4,5}}
+{A5:B6}{=A1:B2*2}
+{A7:B8}{=3*A1:B2}
+{A9:B10}{={2,3;4,5}*{9,8;7,6}}
+{A11:D11}{={1,2,3,"C"}*{4,"A","B",2}}
+%calc
+%mode result
+A1=10
+B1=20
+A2=30
+B2=40
+A3=20
+B3=30
+A4=40
+B4=50
+A5=20
+B5=40
+A6=60
+B6=80
+A7=30
+B7=60
+A8=90
+B8=120
+A9=18
+B9=24
+A10=28
+B10=30
+A11=4
+B11=#VALUE!
+C11=#VALUE!
+D11=#VALUE!
+%check
diff --git a/test/01-inline-array-op-lhs.txt b/test/01-inline-array-op-lhs.txt
new file mode 100644
index 0000000..b3dfa22
--- /dev/null
+++ b/test/01-inline-array-op-lhs.txt
@@ -0,0 +1,54 @@
+%% Test for inline arrays
+%mode init
+{A1:B2}{={1,2;4,5}+2}
+{A3:B4}{={1,2;4,5}-2}
+{A5:B6}{={1,2;4,5}=2}
+{A7:B8}{={1,2;4,5}<>2}
+{A9:B10}{={1,2;4,5}<2}
+{A11:B12}{={1,2;4,5}<=2}
+{A13:B14}{={1,2;4,5}>2}
+{A15:B16}{={1,2;4,5}>=2}
+%calc
+%mode result
+%% +2
+A1=3
+B1=4
+A2=6
+B2=7
+%% -2
+A3=-1
+B3=0
+A4=2
+B4=3
+%% =2
+A5=0
+B5=1
+A6=0
+B6=0
+%% <>2
+A7=1
+B7=0
+A8=1
+B8=1
+%% <2
+A9=1
+B9=0
+A10=0
+B10=0
+%% <=2
+A11=1
+B11=1
+A12=0
+B12=0
+%% >2
+A13=0
+B13=0
+A14=1
+B14=1
+%% >=2
+A15=0
+B15=1
+A16=1
+B16=1
+%check
+
diff --git a/test/01-inline-array-op-rhs.txt b/test/01-inline-array-op-rhs.txt
new file mode 100644
index 0000000..e3590be
--- /dev/null
+++ b/test/01-inline-array-op-rhs.txt
@@ -0,0 +1,54 @@
+%% Test for inline arrays
+%mode init
+{A1:B2}{=2+{1,2;4,5}}
+{A3:B4}{=2-{1,2;4,5}}
+{A5:B6}{=2={1,2;4,5}}
+{A7:B8}{=2<>{1,2;4,5}}
+{A9:B10}{=2<{1,2;4,5}}
+{A11:B12}{=2<={1,2;4,5}}
+{A13:B14}{=2>{1,2;4,5}}
+{A15:B16}{=2>={1,2;4,5}}
+%calc
+%mode result
+%% 2+{...}
+A1=3
+B1=4
+A2=6
+B2=7
+%% 2-{...}
+A3=1
+B3=0
+A4=-2
+B4=-3
+%% 2={...}
+A5=0
+B5=1
+A6=0
+B6=0
+%% 2<>{...}
+A7=1
+B7=0
+A8=1
+B8=1
+%% 2<{...}
+A9=0
+B9=0
+A10=1
+B10=1
+%% 2<={...}
+A11=0
+B11=1
+A12=1
+B12=1
+%% 2>{...}
+A13=1
+B13=0
+A14=0
+B14=0
+%% 2>={...}
+A15=1
+B15=1
+A16=0
+B16=0
+%check
+
diff --git a/test/01-inline-array-string-concat.txt b/test/01-inline-array-string-concat.txt
new file mode 100644
index 0000000..3f5b881
--- /dev/null
+++ b/test/01-inline-array-string-concat.txt
@@ -0,0 +1,19 @@
+%% Test for inline array with multiplication.
+%mode init
+{A1:B2}{={1,2;3,4}&"A"}
+{A3:B4}{="B"&{2,3;4,"D"}}
+{A5:C5}{={"a","b","c"}&{"d","e","f"}}
+%calc
+%mode result
+A1="1A"
+B1="2A"
+A2="3A"
+B2="4A"
+A3="B2"
+B3="B3"
+A4="B4"
+B4="BD"
+A5="ad"
+B5="be"
+C5="cf"
+%check
diff --git a/test/01-inline-array.txt b/test/01-inline-array.txt
new file mode 100644
index 0000000..2da6f74
--- /dev/null
+++ b/test/01-inline-array.txt
@@ -0,0 +1,29 @@
+%% Test for inline arrays
+%mode init
+{A1:C2}{={1,2,3;4,5,6}}
+{A4:B6}{={1,2;3,4;5,6}}
+{C8:D8}{={"A","B"}}
+{B10:D11}{={-1,2,"red";-5.1,-4,"blue"}}
+%calc
+%mode result
+A1=1
+B1=2
+C1=3
+A2=4
+B2=5
+C2=6
+A4=1
+B4=2
+A5=3
+B5=4
+A6=5
+B6=6
+C8="A"
+D8="B"
+B10=-1
+C10=2
+D10="red"
+B11=-5.1
+C11=-4
+D11="blue"
+%check
diff --git a/test/01-ranged-definitions-dups.txt b/test/01-ranged-definitions-dups.txt
new file mode 100644
index 0000000..06acf37
--- /dev/null
+++ b/test/01-ranged-definitions-dups.txt
@@ -0,0 +1,37 @@
+%% Test range definitions for duplicated values.
+%mode init
+{A1:B2}=2*3
+{A3:B4}@text
+{A5:B6}:12.2
+%calc
+%mode result
+A1=6
+A2=6
+A3="text"
+A4="text"
+A5=12.2
+A6=12.2
+B1=6
+B2=6
+B3="text"
+B4="text"
+B5=12.2
+B6=12.2
+%check
+%mode edit
+{A1:B6}@overwritten
+%mode result
+A1="overwritten"
+A2="overwritten"
+A3="overwritten"
+A4="overwritten"
+A5="overwritten"
+A6="overwritten"
+B1="overwritten"
+B2="overwritten"
+B3="overwritten"
+B4="overwritten"
+B5="overwritten"
+B6="overwritten"
+%check
+%exit
diff --git a/test/01-simple-arithmetic.txt b/test/01-simple-arithmetic.txt
new file mode 100644
index 0000000..ddedb39
--- /dev/null
+++ b/test/01-simple-arithmetic.txt
@@ -0,0 +1,53 @@
+%% Test calculation involving dependency resolution.
+%mode init
+A1=1
+A2=A1+10
+A3=A2+A1*30
+A4=(10+20)*A2
+A5=A1-A2+A3*A4
+A6=A1+A3
+A7=A7
+A8=10/0
+A9=A8
+%calc
+%mode result
+A1=1
+A2=11
+A3=41
+A4=330
+A5=13520
+A6=42
+A7=#REF!
+A8=#DIV/0!
+A9=#DIV/0!
+%check
+%mode edit
+A6=A1+A2
+%recalc
+%mode result
+A1=1
+A2=11
+A3=41
+A4=330
+A5=13520
+A6=12
+A7=#REF!
+A8=#DIV/0!
+A9=#DIV/0!
+%check
+%mode edit
+A1=10
+%recalc
+%mode result
+A1=10
+A2=20
+A3=320
+A4=600
+A5=191990
+A6=30
+A7=#REF!
+A8=#DIV/0!
+A9=#DIV/0!
+%check
+%exit
+
diff --git a/test/02-circular-01.txt b/test/02-circular-01.txt
new file mode 100644
index 0000000..d6ebf6c
--- /dev/null
+++ b/test/02-circular-01.txt
@@ -0,0 +1,27 @@
+%% Test circular dependency detection.
+%mode init
+A1=20
+A2=A1+A3
+A3=A2-10
+A4=A1+35
+A5=A1*A4
+A6=A7
+A7=A8
+A8=A9
+A9=A10
+A10=A6
+%calc
+%mode result
+A1=20
+A2=#REF!
+A3=#REF!
+A4=55
+A5=1100
+A6=#REF!
+A7=#REF!
+A8=#REF!
+A9=#REF!
+A10=#REF!
+%check
+%exit
+
diff --git a/test/02-circular-02.txt b/test/02-circular-02.txt
new file mode 100644
index 0000000..a81ca42
--- /dev/null
+++ b/test/02-circular-02.txt
@@ -0,0 +1,15 @@
+%% Check for single cell circular references during edit.
+%mode init
+A1=B1
+%calc
+%mode result
+A1=0
+%check
+%mode edit
+B1=A1
+%recalc
+%mode result
+A1=#REF!
+B1=#REF!
+%check
+%exit
diff --git a/test/03-expression.txt b/test/03-expression.txt
new file mode 100644
index 0000000..4fa1581
--- /dev/null
+++ b/test/03-expression.txt
@@ -0,0 +1,17 @@
+%% Test basic expressions.
+%mode init
+A1=1
+A2=1+2-3*2
+A3=1*2+1
+A4=20*(3+4)
+A5=(20*3)+4
+%calc
+%mode result
+A1=1
+A2=-3
+A3=3
+A4=140
+A5=64
+%check
+%exit
+
diff --git a/test/03-leading-signs.txt b/test/03-leading-signs.txt
new file mode 100644
index 0000000..4c6c87b
--- /dev/null
+++ b/test/03-leading-signs.txt
@@ -0,0 +1,22 @@
+%% Test case for handling leading signs.
+%mode init
+B2=-3
+B4=-4*5
+B5=-2*-3
+B6=+4
+B7=+4+6
+A2=-B2
+A3=A2*-B7
+A4=+B5+B6
+%calc
+%mode result
+B2=-3
+B4=-20
+B5=6
+B6=4
+B7=10
+A2=3
+A3=-30
+A4=10
+%check
+
diff --git a/test/04-function-abs.txt b/test/04-function-abs.txt
new file mode 100644
index 0000000..ad60db3
--- /dev/null
+++ b/test/04-function-abs.txt
@@ -0,0 +1,20 @@
+%% Test for ABS function.
+%mode init
+A1=2
+A2=-4.2
+A3=9
+A4=-5.8
+B1=ABS(A1)
+B2=ABS(A2)
+B3=ABS(A3)
+B4=ABS(A4)
+B5=ABS(A2+A4)
+%calc
+%mode result
+B1=2
+B2=4.2
+B3=9
+B4=5.8
+B5=10
+%check
+%exit
diff --git a/test/04-function-and-boolean.txt b/test/04-function-and-boolean.txt
new file mode 100644
index 0000000..f1b3241
--- /dev/null
+++ b/test/04-function-and-boolean.txt
@@ -0,0 +1,25 @@
+%% AND function with boolean values.
+%mode init
+A1:true
+A2:true
+A3:false
+A4:true
+A5:true
+B1=AND(A1)
+B2=AND(A1:A2)
+B3=AND(A1:A3)
+B4=AND(A1:A10)
+B5=AND(A4:A10)
+B6=AND(A3,A4,A5)
+B7=AND(A1,A4)
+%calc
+%mode result
+B1=true
+B2=true
+B3=false
+B4=false
+B5=true
+B6=false
+B7=true
+%check
+%exit
diff --git a/test/04-function-and.txt b/test/04-function-and.txt
new file mode 100644
index 0000000..74300f9
--- /dev/null
+++ b/test/04-function-and.txt
@@ -0,0 +1,34 @@
+%% AND function
+%mode init
+A1:12
+A2:23
+A3:34
+A4:0
+A11=1
+A12=2
+A13=3
+A14=0
+A20@string value
+A21="string result"
+B1=AND(A1:A10)
+B2=AND(A1:A3)
+B3=AND(A11:A13)
+B4=AND(A11:A14)
+B5=AND(1,2,3)
+B6=AND(2,0,-1)
+B7=AND(2,"str",22)
+B8=AND(A1,A2,A3,A20,A21)
+B9=AND(A1,A14,A21)
+%calc
+%mode result
+B1=false
+B2=true
+B3=true
+B4=false
+B5=true
+B6=false
+B7=true
+B8=true
+B9=false
+%check
+%exit
diff --git a/test/04-function-average.txt b/test/04-function-average.txt
new file mode 100644
index 0000000..b56469d
--- /dev/null
+++ b/test/04-function-average.txt
@@ -0,0 +1,13 @@
+%% Test for AVERAGE function.
+%mode init
+A1=2
+A2=4
+A3=9
+A4=AVERAGE(A1:A3)
+A5=AVERAGE(A1,A2,A3)
+%calc
+%mode result
+A4=5
+A5=5
+%check
+%exit
diff --git a/test/04-function-column-row.txt b/test/04-function-column-row.txt
new file mode 100644
index 0000000..61dc452
--- /dev/null
+++ b/test/04-function-column-row.txt
@@ -0,0 +1,36 @@
+%mode init
+A1=COLUMN()
+B2=COLUMN()
+C3=COLUMN()
+D1=COLUMN(A1)
+D2=COLUMN(B10)
+D4=COLUMN(B2:B5)
+G3=COLUMN(C1:F3)
+%calc
+%mode result
+A1=1
+B2=2
+C3=3
+D1=1
+D2=2
+D4=2
+G3=3
+%check
+%mode edit
+A1=ROW()
+B2=ROW()
+C3=ROW()
+D1=ROW(A1)
+D2=ROW(B10)
+D4=ROW(B2:B5)
+G3=ROW(C1:F3)
+%recalc
+%mode result
+A1=1
+B2=2
+C3=3
+D1=1
+D2=10
+D4=2
+G3=1
+%check
diff --git a/test/04-function-columns-rows.txt b/test/04-function-columns-rows.txt
new file mode 100644
index 0000000..388c348
--- /dev/null
+++ b/test/04-function-columns-rows.txt
@@ -0,0 +1,20 @@
+%mode init
+A1=COLUMNS(A2:B10)
+A2=COLUMNS(C1)
+A3=COLUMNS(B2,A4:D100)
+%calc
+%mode result
+A1=2
+A2=1
+A3=5
+%check
+%mode edit
+A1=ROWS(A2:B10)
+A2=ROWS(C1)
+A3=ROWS(B2,A4:D100)
+%recalc
+%mode result
+A1=9
+A2=1
+A3=98
+%check
diff --git a/test/04-function-concatenate.txt b/test/04-function-concatenate.txt
new file mode 100644
index 0000000..2ee1271
--- /dev/null
+++ b/test/04-function-concatenate.txt
@@ -0,0 +1,12 @@
+%% Test built-in functions.
+%mode init
+A1:1
+A2@One
+A3=CONCATENATE(A1," ",A2)
+%calc
+%mode result
+A1=1
+A2="One"
+A3="1 One"
+%check
+%exit
diff --git a/test/04-function-count-formula.txt b/test/04-function-count-formula.txt
new file mode 100644
index 0000000..4d70675
--- /dev/null
+++ b/test/04-function-count-formula.txt
@@ -0,0 +1,14 @@
+%% Another COUNT function test that involves formula cells as inputs.
+%mode init
+A1="str"
+A2=1+2
+A3=A2*2
+B1=COUNT(A1,A2,A3)
+B2=COUNT(A1:A3)
+B3=COUNT(B1:B2)
+%calc
+%mode result
+B1=2
+B2=2
+B3=2
+%check
diff --git a/test/04-function-count.txt b/test/04-function-count.txt
new file mode 100644
index 0000000..0b14e3b
--- /dev/null
+++ b/test/04-function-count.txt
@@ -0,0 +1,35 @@
+%% Test for COUNT function. COUNT only counts numeric cells whereas COUNTA
+%% also counts string cells.
+%mode init
+A1:1
+A2:2
+A3:3
+B1@A
+B2@B
+B3@C
+C1:true
+C2:false
+C3:false
+D1=COUNT(A1:A3)
+D2=COUNT(A1:A4)
+D3=COUNT(A1:B3)
+D4=COUNT(A1:C3)
+D5=COUNT(A1:C1)
+D6=COUNT(A100:A120)
+D7=COUNT(A:A)
+D8=COUNT(1,2,3,4)
+D9=COUNT(1,"str",3)
+D10=COUNT()
+%calc
+%mode result
+D1=3
+D2=3
+D3=3
+D4=6
+D5=2
+D6=0
+D7=3
+D8=4
+D9=2
+D10=0
+%check
diff --git a/test/04-function-counta-edit.txt b/test/04-function-counta-edit.txt
new file mode 100644
index 0000000..f6f3fc1
--- /dev/null
+++ b/test/04-function-counta-edit.txt
@@ -0,0 +1,43 @@
+%% Test for COUNTA function.
+%mode init
+A1:1
+A2:2
+A3:3
+B1@A
+B2@B
+B3@C
+C1=COUNTA(A1:B6)
+%calc
+%mode result
+C1=6
+%check
+%mode edit
+A2@Two
+A4@Four
+%recalc
+%mode result
+C1=7
+%check
+%mode edit
+B6:10
+B7:11
+%recalc
+%mode result
+C1=8
+%check
+%mode edit
+A6=18+3
+A7=2/3
+%recalc
+%mode result
+A6=21
+C1=9
+%check
+%mode edit
+C2=COUNTA(A3:B3)
+%recalc
+%mode result
+C1=9
+C2=2
+%check
+%exit
diff --git a/test/04-function-counta-static-args.txt b/test/04-function-counta-static-args.txt
new file mode 100644
index 0000000..19d8c0c
--- /dev/null
+++ b/test/04-function-counta-static-args.txt
@@ -0,0 +1,12 @@
+%% Test for COUNTA() function with static value arguments.
+%mode init
+A1=COUNTA(1,2,3)
+A2=COUNTA(1,"str",3)
+A3=COUNTA()
+%calc
+%mode result
+A1=3
+A2=3
+A3=0
+%check
+
diff --git a/test/04-function-countblank.txt b/test/04-function-countblank.txt
new file mode 100644
index 0000000..7ce2706
--- /dev/null
+++ b/test/04-function-countblank.txt
@@ -0,0 +1,38 @@
+%% --------------------------------------------------------------------------
+%mode session
+row-limit:1000
+column-limit:100
+%% --------------------------------------------------------------------------
+%mode init
+A1:1
+A2:2
+A3:3
+D1=COUNTBLANK(A1:A3)
+D2=COUNTBLANK(A3)
+D3=COUNTBLANK(A1:A4)
+D4=COUNTBLANK(B1:B10)
+D5=COUNTBLANK(A4)
+D6=COUNTBLANK(B2)
+D7=COUNTBLANK(E:E)
+%calc
+%% --------------------------------------------------------------------------
+%mode result
+D1=0
+D2=0
+D3=1
+D4=10
+D5=1
+D6=1
+D7=1000
+%check
+%% --------------------------------------------------------------------------
+%mode edit
+E5:20
+E10:100
+%recalc
+%mode result
+D7=998
+%check
+%% --------------------------------------------------------------------------
+
+
diff --git a/test/04-function-exact.txt b/test/04-function-exact.txt
new file mode 100644
index 0000000..3b996ef
--- /dev/null
+++ b/test/04-function-exact.txt
@@ -0,0 +1,16 @@
+%mode init
+A1=EXACT("aaa", "aaa")
+A2=EXACT("AaA", "aAa")
+A3=EXACT(1234, 1234)
+A4=EXACT(1234, "1234")
+B1@salvation
+B2="salvation"
+B3=EXACT(B1, B2)
+%calc
+%mode result
+A1=true
+A2=false
+A3=true
+A4=true
+B3=true
+%check
diff --git a/test/04-function-find.txt b/test/04-function-find.txt
new file mode 100644
index 0000000..f458168
--- /dev/null
+++ b/test/04-function-find.txt
@@ -0,0 +1,35 @@
+%mode init
+A1@ABCDEFGABC
+A2=FIND("ABC",A1)
+A3=FIND("ABC",A1,2)
+A4=FIND("Z",A1)
+A5=FIND("BC",A1,100)
+A6=FIND("BC",A1, 2.9)
+A7=FIND("BC",A1, 3.9)
+B1@かささぎの渡せる橋におく霜の白きを見れば夜ぞふけにける
+B2=FIND("かささぎ",B1)
+B3=FIND("渡せる橋",B1)
+B4=FIND("ふけにける",B1)
+C1@ダミー文章。ダミー文章。
+C2=FIND("ミー",C1)
+C3=FIND("ミー",C1,2)
+C4=FIND("ミー",C1,3)
+C5=FIND("ミー",C1,8)
+C6=FIND("ミー",C1,9)
+%calc
+%mode result
+A2=1
+A3=8
+A4=#VALUE!
+A5=#VALUE!
+A6=2
+A7=9
+B2=1
+B3=6
+B4=23
+C2=2
+C3=2
+C4=8
+C5=8
+C6=#VALUE!
+%check
diff --git a/test/04-function-invalid-name.txt b/test/04-function-invalid-name.txt
new file mode 100644
index 0000000..34098d1
--- /dev/null
+++ b/test/04-function-invalid-name.txt
@@ -0,0 +1,9 @@
+%% invalid function name should produce the result of #NAME?.
+%mode init
+A1=Foo()
+%calc
+%mode result
+A1=#NAME?
+%check
+%exit
+
diff --git a/test/04-function-isblank.txt b/test/04-function-isblank.txt
new file mode 100644
index 0000000..30a320d
--- /dev/null
+++ b/test/04-function-isblank.txt
@@ -0,0 +1,40 @@
+%% Test for ISBLANK function.
+%mode init
+A1:2
+A2=A1
+A3@
+B1=ISBLANK(A1)
+B2=ISBLANK(A2)
+B3=ISBLANK(A3)
+B4=ISBLANK(A4)
+B5=ISBLANK(1)
+B6=ISBLANK("string")
+C1:2
+C2:3
+C6@str1
+C7@str2
+C10:10
+D1=ISBLANK(C1:C3)
+D2=ISBLANK(C3:C5)
+D3=ISBLANK(C3:C6)
+D4=ISBLANK(C2:C6)
+D5=ISBLANK(C7:C8)
+D6=ISBLANK(C8:C9)
+D7=ISBLANK(C11:C13)
+%calc
+%mode result
+B1=false
+B2=false
+B3=false
+B4=true
+B5=false
+B6=false
+D1=false
+D2=true
+D3=false
+D4=false
+D5=false
+D6=true
+D7=true
+%check
+%exit
diff --git a/test/04-function-iserror.txt b/test/04-function-iserror.txt
new file mode 100644
index 0000000..5346e0d
--- /dev/null
+++ b/test/04-function-iserror.txt
@@ -0,0 +1,24 @@
+%% Test case for built-in ISERROR function.
+%mode init
+A1:10
+A2=10/2
+A3=2/0
+A4=NonExistingName
+B1=ISERROR(A1)
+B2=ISERROR(A2)
+B3=ISERROR(A3)
+B4=ISERROR(A4)
+C4=ISERROR(5.2)
+C5=ISERROR("inline text")
+C6=ISERROR(NA())
+%calc
+%mode result
+B1=false
+B2=false
+B3=true
+B4=true
+C4=false
+C5=false
+C6=true
+%check
+
diff --git a/test/04-function-iseven.txt b/test/04-function-iseven.txt
new file mode 100644
index 0000000..aa224e2
--- /dev/null
+++ b/test/04-function-iseven.txt
@@ -0,0 +1,40 @@
+%% Test for ISEVEN and ISODD functions.
+%mode init
+A2=10.2
+A3=11.4
+B2=ISEVEN(2)
+B3=ISEVEN(3)
+B4=ISEVEN(1.2)
+B5=ISEVEN(4.2)
+B6=ISEVEN(4.9)
+B7=ISEVEN(-4.9)
+B8=ISEVEN(A2)
+B9=ISEVEN(A3)
+C2=ISODD(2)
+C3=ISODD(3)
+C4=ISODD(1.2)
+C5=ISODD(4.2)
+C6=ISODD(4.9)
+C7=ISODD(-4.9)
+C8=ISODD(A2)
+C9=ISODD(A3)
+%calc
+%mode result
+B2=true
+B3=false
+B4=false
+B5=true
+B6=true
+B7=true
+B8=true
+B9=false
+C2=false
+C3=true
+C4=true
+C5=false
+C6=false
+C7=false
+C8=false
+C9=true
+%check
+%exit
diff --git a/test/04-function-isformula.txt b/test/04-function-isformula.txt
new file mode 100644
index 0000000..f283b54
--- /dev/null
+++ b/test/04-function-isformula.txt
@@ -0,0 +1,20 @@
+%% Test for ISFORMULA function.
+%mode init
+A1:1
+A2@string
+A3="string"
+A4=1/2
+B1=ISFORMULA(A1)
+B2=ISFORMULA(A2)
+B3=ISFORMULA(A3)
+B4=ISFORMULA(A4)
+B5=ISFORMULA(A5)
+%calc
+%mode result
+B1=false
+B2=false
+B3=true
+B4=true
+B5=false
+%check
+%exit
diff --git a/test/04-function-islogical.txt b/test/04-function-islogical.txt
new file mode 100644
index 0000000..2673409
--- /dev/null
+++ b/test/04-function-islogical.txt
@@ -0,0 +1,64 @@
+%% All values in column A are expected to be logical.
+%% All values in column B are expected to be non-logical.
+%mode init
+A1:true
+A2:false
+A3=ISBLANK(A1)
+A4=ISERROR(A2)
+A5=ISEVEN(A1)
+A6=ISODD(A1)
+A7=ISFORMULA(A2)
+A8=ISNUMBER(A1)
+A9=ISREF(A1)
+A10=ISTEXT(A3)
+A11=ISNONTEXT(A3)
+A12=A1
+A13=A2
+%% B1 is empty
+B2:12.4
+B3@string value
+B4=1/2
+C1=ISLOGICAL(A1)
+C2=ISLOGICAL(A2)
+C3=ISLOGICAL(A3)
+C4=ISLOGICAL(A4)
+C5=ISLOGICAL(A5)
+C6=ISLOGICAL(A6)
+C7=ISLOGICAL(A7)
+C8=ISLOGICAL(A8)
+C9=ISLOGICAL(A9)
+C10=ISLOGICAL(A10)
+C11=ISLOGICAL(A11)
+C12=ISLOGICAL(A12)
+C13=ISLOGICAL(A13)
+C43=ISLOGICAL(1)
+C44=ISLOGICAL("string value")
+C45=ISLOGICAL(A100)
+C46=ISLOGICAL(C1)
+D1=ISLOGICAL(B1)
+D2=ISLOGICAL(B2)
+D3=ISLOGICAL(B3)
+D4=ISLOGICAL(B4)
+%calc
+%mode result
+C1=true
+C2=true
+C3=true
+C4=true
+C5=true
+C6=true
+C7=true
+C8=true
+C9=true
+C10=true
+C11=true
+C12=true
+C13=true
+C43=false
+C44=false
+C45=false
+C46=true
+D1=false
+D2=false
+D3=false
+%check
diff --git a/test/04-function-isna.txt b/test/04-function-isna.txt
new file mode 100644
index 0000000..148c649
--- /dev/null
+++ b/test/04-function-isna.txt
@@ -0,0 +1,20 @@
+%mode init
+B1=NA()
+B2=B1
+B3=ISNA(B1)
+B4=ISNA(B2)
+B5=ISNA(B3)
+B6=ISNA(1)
+B7=ISNA("str")
+B8=ISNA(NA())
+%calc
+%mode result
+B1=#N/A
+B2=#N/A
+B3=true
+B4=true
+B5=false
+B6=false
+B7=false
+B8=true
+%check
diff --git a/test/04-function-isnumber.txt b/test/04-function-isnumber.txt
new file mode 100644
index 0000000..e1a7e19
--- /dev/null
+++ b/test/04-function-isnumber.txt
@@ -0,0 +1,20 @@
+%% Test for ISNUMBER function.
+%mode init
+A1:345
+A2=2
+A3=CONCATENATE("string", " ", "formula")
+A4@string cell
+B1=ISNUMBER(A1)
+B2=ISNUMBER(A2)
+B3=ISNUMBER(A3)
+B4=ISNUMBER(A4)
+B5=ISNUMBER(A5)
+%calc
+%mode result
+B1=true
+B2=true
+B3=false
+B4=false
+B5=false
+%check
+%exit
diff --git a/test/04-function-isref.txt b/test/04-function-isref.txt
new file mode 100644
index 0000000..08e3c20
--- /dev/null
+++ b/test/04-function-isref.txt
@@ -0,0 +1,18 @@
+%% Test for ISREF function.
+%mode init
+C5=ISREF(A2)
+C6=ISREF(A1:A10)
+C7=ISREF("inline text")
+C8=ISREF(42)
+C9=ISREF(CONCATENATE("this ", "is ", "text"))
+C10=ISREF(A1 + 10)
+%calc
+%mode result
+C5=true
+C6=true
+C7=false
+C8=false
+C9=false
+C10=false
+%check
+%exit
diff --git a/test/04-function-istext.txt b/test/04-function-istext.txt
new file mode 100644
index 0000000..59286b0
--- /dev/null
+++ b/test/04-function-istext.txt
@@ -0,0 +1,39 @@
+%% Test for ISTEXT and ISNONTEXT functions.
+%% ISNONTEXT is true where ISTEXT is false, and vice versa.
+%mode init
+A1:1
+A2=1
+A3="text"
+A4@text
+B1=ISTEXT(A1)
+B2=ISTEXT(A2)
+B3=ISTEXT(A3)
+B4=ISTEXT(A4)
+B5=ISTEXT(A5)
+B6=ISTEXT(1)
+B7=ISTEXT("inline text")
+C1=ISNONTEXT(A1)
+C2=ISNONTEXT(A2)
+C3=ISNONTEXT(A3)
+C4=ISNONTEXT(A4)
+C5=ISNONTEXT(A5)
+C6=ISNONTEXT(1)
+C7=ISNONTEXT("inline text")
+%calc
+%mode result
+B1=false
+B2=false
+B3=true
+B4=true
+B5=false
+B6=false
+B7=true
+C1=true
+C2=true
+C3=false
+C4=false
+C5=true
+C6=true
+C7=false
+%check
+%exit
diff --git a/test/04-function-left-utf8.txt b/test/04-function-left-utf8.txt
new file mode 100644
index 0000000..5c69d20
--- /dev/null
+++ b/test/04-function-left-utf8.txt
@@ -0,0 +1,33 @@
+%mode init
+A1@今日は姉の誕生日です。
+B1=LEFT(A1,0)
+B2=LEFT(A1,1)
+B3=LEFT(A1,2)
+B4=LEFT(A1,3)
+B5=LEFT(A1,4)
+B6=LEFT(A1,5)
+B7=LEFT(A1,6)
+B8=LEFT(A1,7)
+B9=LEFT(A1,8)
+B10=LEFT(A1,9)
+B11=LEFT(A1,10)
+B12=LEFT(A1,11)
+B13=LEFT(A1,12)
+B14=LEFT(A1,-1)
+%calc
+%mode result
+B1=""
+B2="今"
+B3="今日"
+B4="今日は"
+B5="今日は姉"
+B6="今日は姉の"
+B7="今日は姉の誕"
+B8="今日は姉の誕生"
+B9="今日は姉の誕生日"
+B10="今日は姉の誕生日で"
+B11="今日は姉の誕生日です"
+B12="今日は姉の誕生日です。"
+B13="今日は姉の誕生日です。"
+B14=#VALUE!
+%check
diff --git a/test/04-function-left.txt b/test/04-function-left.txt
new file mode 100644
index 0000000..9bdcd5d
--- /dev/null
+++ b/test/04-function-left.txt
@@ -0,0 +1,36 @@
+%% Test built-in function LEFT.
+%mode init
+A1@ABCDE
+A2:12345
+B1=LEFT(A1)
+B2=LEFT(A1,2)
+B3=LEFT(A1,3)
+B4=LEFT(A1,4)
+B5=LEFT(A1,5)
+B6=LEFT(A1,6)
+B7=LEFT(B6,3)
+C1=LEFT(A2)
+C2=LEFT(A2,2)
+C3=LEFT(A2,3)
+C4=LEFT(A2,4)
+C5=LEFT(A2,5)
+C6=LEFT(A2,6)
+C7=LEFT(C6,2)
+%calc
+%mode result
+B1="A"
+B2="AB"
+B3="ABC"
+B4="ABCD"
+B5="ABCDE"
+B6="ABCDE"
+B7="ABC"
+C1="1"
+C2="12"
+C3="123"
+C4="1234"
+C5="12345"
+C6="12345"
+C7="12"
+%check
+%exit
diff --git a/test/04-function-len.txt b/test/04-function-len.txt
new file mode 100644
index 0000000..c43726f
--- /dev/null
+++ b/test/04-function-len.txt
@@ -0,0 +1,12 @@
+%mode init
+A1@富士の高嶺に
+A2="雪はふりつつ"
+B1=LEN(A1)
+B2=LEN(A2)
+B3=LEN("ふりさけ見れば春日なる")
+%calc
+%mode result
+B1=6
+B2=6
+B3=11
+%check
diff --git a/test/04-function-logical.txt b/test/04-function-logical.txt
new file mode 100644
index 0000000..86df420
--- /dev/null
+++ b/test/04-function-logical.txt
@@ -0,0 +1,12 @@
+%% Test case for built-in logical functions.
+%mode init
+A1:2
+A2:3
+A3=if(A1=A2,"equal","not equal")
+A4=if(A1<>A2,"not equal","equal")
+%calc
+%mode result
+A3="not equal"
+A4="not equal"
+%check
+%exit
diff --git a/test/04-function-median.txt b/test/04-function-median.txt
new file mode 100644
index 0000000..c840053
--- /dev/null
+++ b/test/04-function-median.txt
@@ -0,0 +1,49 @@
+%mode init
+A1:5
+A2:2
+A3:3
+A4=8
+A5:1
+A6=6
+A7:7
+A8=4
+A9:9
+A10:10
+A12=MEDIAN(A$1:A1)
+A13=MEDIAN(A$1:A2)
+A14=MEDIAN(A$1:A3)
+A15=MEDIAN(A$1:A4)
+A16=MEDIAN(A$1:A5)
+A17=MEDIAN(A$1:A6)
+A18=MEDIAN(A$1:A7)
+A19=MEDIAN(A$1:A8)
+A20=MEDIAN(A$1:A9)
+A21=MEDIAN(A$1:A10)
+A22=MEDIAN(1,9,2,3,5)
+A23=MEDIAN(4,2,1,3)
+A24=MEDIAN(A1,A2,A3,A4,A5,A6,A7,A8,A9,A10)
+A25=MEDIAN(42)
+B1=TRUE()
+B2=FALSE()
+B3=TRUE()
+B5=MEDIAN(B1:B3)
+B6=MEDIAN(B1:B2)
+%calc
+%mode result
+A12=5
+A13=3.5
+A14=3
+A15=4
+A16=3
+A17=4
+A18=5
+A19=4.5
+A20=5
+A21=5.5
+A22=3
+A23=2.5
+A24=5.5
+A25=42
+B5=1
+B6=0.5
+%check
diff --git a/test/04-function-mid-utf8.txt b/test/04-function-mid-utf8.txt
new file mode 100644
index 0000000..9208a68
--- /dev/null
+++ b/test/04-function-mid-utf8.txt
@@ -0,0 +1,13 @@
+%mode init
+A1@秋の田のかりほの庵の苫をあらみわが衣手は露にぬれつつ
+B1=MID(A1,1,4)
+B2=MID(A1,16,5)
+B3=MID(A1,21,6)
+B4=MID(A1,23,10)
+%calc
+%mode result
+B1="秋の田の"
+B2="わが衣手は"
+B3="露にぬれつつ"
+B4="ぬれつつ"
+%check
diff --git a/test/04-function-mid.txt b/test/04-function-mid.txt
new file mode 100644
index 0000000..9385eb6
--- /dev/null
+++ b/test/04-function-mid.txt
@@ -0,0 +1,28 @@
+%mode init
+A1@ABCDE
+A2:12345
+B1=MID(A1,1,5)
+B2=MID(A1,1,6)
+B3=MID(A1,2,3)
+B4=MID(A1,3,3)
+B5=MID(A1,3,0)
+B6=MID(A1,0,1)
+B7=MID(A1,10,2)
+C1=MID(A2,1,5)
+C2=MID(A2,1,6)
+C3=MID(A2,2,3)
+C4=MID(A2,5,10)
+%calc
+%mode result
+B1="ABCDE"
+B2="ABCDE"
+B3="BCD"
+B4="CDE"
+B5=""
+B6=#VALUE!
+B7=""
+C1="12345"
+C2="12345"
+C3="234"
+C4="5"
+%check
diff --git a/test/04-function-mmult-inline.txt b/test/04-function-mmult-inline.txt
new file mode 100644
index 0000000..62b59ca
--- /dev/null
+++ b/test/04-function-mmult-inline.txt
@@ -0,0 +1,14 @@
+%mode init
+{A1:C3}{=mmult({1;2;3},{4,5,6})}
+%calc
+%mode result
+A1=4
+B1=5
+C1=6
+A2=8
+B2=10
+C2=12
+A3=12
+B3=15
+C3=18
+%check
diff --git a/test/04-function-mmult.txt b/test/04-function-mmult.txt
new file mode 100644
index 0000000..84eda1c
--- /dev/null
+++ b/test/04-function-mmult.txt
@@ -0,0 +1,43 @@
+%% Test built-in MMULT function which performs a matrix multiplication whose
+%% result is a matrix spanning over a range of cells.
+%mode init
+A1:1
+A2:2
+A3:3
+C1:4
+D1:5
+E1:6
+{C5:E7}{=MMULT(A1:A3,C1:E1)}
+E11=E7*10
+%calc
+%print dependency
+%mode result
+C5=4
+D5=5
+E5=6
+C6=8
+D6=10
+E6=12
+C7=12
+D7=15
+E7=18
+E11=180
+%check
+%mode edit
+A1:2
+A2:4
+A3:6
+%recalc
+%mode result
+C5=8
+D5=10
+E5=12
+C6=16
+D6=20
+E6=24
+C7=24
+D7=30
+E7=36
+E11=360
+%check
+%exit
diff --git a/test/04-function-mode.txt b/test/04-function-mode.txt
new file mode 100644
index 0000000..18ef512
--- /dev/null
+++ b/test/04-function-mode.txt
@@ -0,0 +1,26 @@
+%mode init
+A1=MODE(5,1,2,2,3,4,5,5,3,3)
+A2=MODE(1,1)
+A3=MODE(1)
+A4=MODE(1,3,2)
+A5=MODE("A","B")
+C1:4
+C2:9
+C3=4
+C4:9
+C5:2
+C6:0
+C7=10
+C8:9
+C9@string
+C10:9
+C12=MODE(C1:C4,C5:C10)
+%calc
+%mode result
+A1=3
+A2=1
+A3=#N/A
+A4=#N/A
+A5=#N/A
+C12=9
+%check
diff --git a/test/04-function-n.txt b/test/04-function-n.txt
new file mode 100644
index 0000000..28585b6
--- /dev/null
+++ b/test/04-function-n.txt
@@ -0,0 +1,26 @@
+%mode init
+A1=N(12)
+A2=N("str")
+A3=N(TRUE())
+A4=N(FALSE())
+B1:12
+B2:true
+B3:false
+B4@string value
+C1=N(B1)
+C2=N(B2)
+C3=N(B3)
+C4=N(B4)
+C5=N(B5)
+%calc
+%mode result
+A1=12
+A2=0
+A3=1
+A4=0
+C1=12
+C2=1
+C3=0
+C4=0
+C5=0
+%check
diff --git a/test/04-function-nested.txt b/test/04-function-nested.txt
new file mode 100644
index 0000000..f12ab6d
--- /dev/null
+++ b/test/04-function-nested.txt
@@ -0,0 +1,10 @@
+%% Test case for nested functions.
+%mode init
+A5=MIN(MIN(2, 4), MAX(1,8))
+A6=CONCATENATE("min: ", MIN(A5, 4), "; max: ", MAX(1, 8))
+%calc
+%mode result
+A5=2
+A6="min: 2; max: 8"
+%check
+%exit
diff --git a/test/04-function-or.txt b/test/04-function-or.txt
new file mode 100644
index 0000000..3276661
--- /dev/null
+++ b/test/04-function-or.txt
@@ -0,0 +1,39 @@
+%% Test case for OR function.
+%mode init
+A1:1
+A2:0
+A4:0
+A5=1
+A6=0
+A7:true
+A8:false
+A9@string value is ignored
+B1=OR(A1,A2)
+B2=OR(A1:A2)
+B3=OR(A2,A4)
+B4=OR(A2:A4)
+B5=OR(A2:A4,A1)
+B6=OR(A5,A6)
+B7=OR(A5:A6,A2)
+B8=OR(B1:B7)
+B9=OR(A7,A8)
+B10=OR(A8:A10)
+B11=OR(A9,A1)
+B12=OR(A9,A2)
+B13=OR(A1:A10)
+%calc
+%mode result
+B1=true
+B2=true
+B3=false
+B4=false
+B5=true
+B6=true
+B7=true
+B8=true
+B9=true
+B10=false
+B11=true
+B12=false
+B13=true
+%check
diff --git a/test/04-function-pi-int.txt b/test/04-function-pi-int.txt
new file mode 100644
index 0000000..2d59ba3
--- /dev/null
+++ b/test/04-function-pi-int.txt
@@ -0,0 +1,11 @@
+%mode init
+A1=INT(PI()*100000)
+B1=INT(7.89)
+C1=INT(-23.45)
+%calc
+%mode result
+A1=314159
+B1=7
+C1=-24
+%check
+%exit
diff --git a/test/04-function-replace.txt b/test/04-function-replace.txt
new file mode 100644
index 0000000..d2225f5
--- /dev/null
+++ b/test/04-function-replace.txt
@@ -0,0 +1,20 @@
+%mode init
+A1@My dog is not big.
+A2=REPLACE(A1,4,3,"elephant")
+B1@家の犬は大きくない。
+B2=REPLACE(B1,3,1,"子猫")
+B3=REPLACE(B1,100,100,"でもうるさい。")
+B4=REPLACE(B1,1,0,"我が")
+B5=REPLACE(B1,-1,0,"foo")
+B6=REPLACE(B1,1,-1,"foo")
+B7=REPLACE(B1,FIND("犬",B1),1,"倉庫")
+%calc
+%mode result
+A2="My elephant is not big."
+B2="家の子猫は大きくない。"
+B3="家の犬は大きくない。でもうるさい。"
+B4="我が家の犬は大きくない。"
+B5=#VALUE!
+B6=#VALUE!
+B7="家の倉庫は大きくない。"
+%check
diff --git a/test/04-function-rept.txt b/test/04-function-rept.txt
new file mode 100644
index 0000000..031a854
--- /dev/null
+++ b/test/04-function-rept.txt
@@ -0,0 +1,19 @@
+%mode init
+A1=REPT("a", 0)
+A2=REPT("a", 1)
+A3=REPT("a", 2)
+A4=REPT("a", 3)
+A5=REPT("a", -1)
+B1=REPT("<->", 5)
+B2=REPT(RIGHT("abcdef", 3), 2)
+%calc
+%mode result
+A1=""
+A2="a"
+A3="aa"
+A4="aaa"
+A5=#VALUE!
+B1="<-><-><-><-><->"
+B2="defdef"
+%check
+
diff --git a/test/04-function-right-utf8.txt b/test/04-function-right-utf8.txt
new file mode 100644
index 0000000..b8cd8eb
--- /dev/null
+++ b/test/04-function-right-utf8.txt
@@ -0,0 +1,33 @@
+%mode init
+A1@今日は姉の誕生日です。
+B1=RIGHT(A1,0)
+B2=RIGHT(A1,1)
+B3=RIGHT(A1,2)
+B4=RIGHT(A1,3)
+B5=RIGHT(A1,4)
+B6=RIGHT(A1,5)
+B7=RIGHT(A1,6)
+B8=RIGHT(A1,7)
+B9=RIGHT(A1,8)
+B10=RIGHT(A1,9)
+B11=RIGHT(A1,10)
+B12=RIGHT(A1,11)
+B13=RIGHT(A1,12)
+B14=RIGHT(A1)
+%calc
+%mode result
+B1=""
+B2="。"
+B3="す。"
+B4="です。"
+B5="日です。"
+B6="生日です。"
+B7="誕生日です。"
+B8="の誕生日です。"
+B9="姉の誕生日です。"
+B10="は姉の誕生日です。"
+B11="日は姉の誕生日です。"
+B12="今日は姉の誕生日です。"
+B13="今日は姉の誕生日です。"
+B14="。"
+%check
diff --git a/test/04-function-right.txt b/test/04-function-right.txt
new file mode 100644
index 0000000..e12cf71
--- /dev/null
+++ b/test/04-function-right.txt
@@ -0,0 +1,45 @@
+%% Test built-in function RIGHT.
+%mode init
+A1@ABCDE
+A2:12345
+B1=RIGHT(A1)
+B2=RIGHT(A1,0)
+B3=RIGHT(A1,1)
+B4=RIGHT(A1,2)
+B5=RIGHT(A1,3)
+B6=RIGHT(A1,4)
+B7=RIGHT(A1,5)
+B8=RIGHT(A1,6)
+B9=RIGHT(B8,3)
+C1=RIGHT(A2)
+C2=RIGHT(A2,0)
+C3=RIGHT(A2,1)
+C4=RIGHT(A2,2)
+C5=RIGHT(A2,3)
+C6=RIGHT(A2,4)
+C7=RIGHT(A2,5)
+C8=RIGHT(A2,6)
+C9=RIGHT(C8,2)
+D1=RIGHT(A1,-1)
+%calc
+%mode result
+B1="E"
+B2=""
+B3="E"
+B4="DE"
+B5="CDE"
+B6="BCDE"
+B7="ABCDE"
+B8="ABCDE"
+B9="CDE"
+C1="5"
+C2=""
+C3="5"
+C4="45"
+C5="345"
+C6="2345"
+C7="12345"
+C8="12345"
+C9="45"
+D1=#VALUE!
+%check
diff --git a/test/04-function-sheet.txt b/test/04-function-sheet.txt
new file mode 100644
index 0000000..6d49c8c
--- /dev/null
+++ b/test/04-function-sheet.txt
@@ -0,0 +1,31 @@
+%mode session
+insert-sheet:Sheet1
+insert-sheet:Sheet2
+insert-sheet:Sheet3
+current-sheet:Sheet1
+%mode init
+A1=SHEET(Sheet1!B1)
+A2=SHEET(Sheet2!B1)
+A3=SHEET(Sheet3!B1)
+B1=SHEET(Sheet1!D1:F10)
+B2=SHEET(Sheet2!D1:F10)
+B3=SHEET(Sheet3!D1:F10)
+C1=SHEET("Sheet1")
+C2=SHEET("Sheet2")
+C3=SHEET("Sheet3")
+C4=SHEET("DoesNotExist")
+D1=SHEET()
+%calc
+%mode result
+A1=1
+A2=2
+A3=3
+B1=1
+B2=2
+B3=3
+C1=1
+C2=2
+C3=3
+C4=#N/A
+D1=1
+%check
diff --git a/test/04-function-sheets.txt b/test/04-function-sheets.txt
new file mode 100644
index 0000000..c427fda
--- /dev/null
+++ b/test/04-function-sheets.txt
@@ -0,0 +1,27 @@
+%% SHEETS returns the number of sheets contained in the reference, or the total
+%% number of sheets in the whole document.
+%mode session
+insert-sheet:Sheet1
+insert-sheet:Sheet2
+insert-sheet:Sheet3
+current-sheet:Sheet1
+%mode init
+A1=SHEETS()
+A2=SHEETS(A1)
+A3=SHEETS(Sheet2!B1:C4)
+A4=SHEETS("str")
+A5=SHEETS(1.2)
+A6=SHEETS(Sheet1:Sheet2!A1)
+A7=SHEETS(Sheet2:Sheet3!B2)
+A8=SHEETS(Sheet1:Sheet3!B10)
+%calc
+%mode result
+A1=3
+A2=1
+A3=1
+A4=#N/A
+A5=#N/A
+A6=2
+A7=2
+A8=3
+%check
diff --git a/test/04-function-single.txt b/test/04-function-single.txt
new file mode 100644
index 0000000..28bb5cb
--- /dev/null
+++ b/test/04-function-single.txt
@@ -0,0 +1,14 @@
+%% Test built-in functions.
+%mode init
+A1=MAX(10,20,5,36)
+A2=MIN(10,20,5,36)
+A3=AVERAGE(10,20,30,40)
+A4=SUM(1,1,1)+SUM(4,5,6)
+%calc
+%mode result
+A1=36
+A2=5
+A3=25
+A4=18
+%check
+%exit
diff --git a/test/04-function-substitute.txt b/test/04-function-substitute.txt
new file mode 100644
index 0000000..faa8fa7
--- /dev/null
+++ b/test/04-function-substitute.txt
@@ -0,0 +1,34 @@
+%mode init
+A1=SUBSTITUTE("I like my dogs.","dog","cat")
+A2=SUBSTITUTE("dog dog dog","dog","cat", 1)
+A3=SUBSTITUTE("dog dog dog","dog","cat", 2)
+A4=SUBSTITUTE("dog dog dog","dog","cat", 3)
+A5=SUBSTITUTE("dog dog dog","dog","cat", 4)
+A6=SUBSTITUTE("dog dog dog","dog","cat")
+A7=SUBSTITUTE("dogdogdog","dog","cat")
+A8=SUBSTITUTE("Dog and dog","dog","bird")
+A9=SUBSTITUTE("t","a","b",0)
+A10=SUBSTITUTE(111101,1,8)
+A11=SUBSTITUTE(111101,1,8,3)
+A12=SUBSTITUTE("いちにいちにいちに","いち","壱")
+A13=SUBSTITUTE("いちにいちにいちに","いち","壱",1)
+A14=SUBSTITUTE("いちにいちにいちに","いち","壱",2)
+A15=SUBSTITUTE("いちにいちにいちに","いち","壱",3)
+%calc
+%mode result
+A1="I like my cats."
+A2="cat dog dog"
+A3="dog cat dog"
+A4="dog dog cat"
+A5="dog dog dog"
+A6="cat cat cat"
+A7="catcatcat"
+A8="Dog and bird"
+A9=#VALUE!
+A10="888808"
+A11="118101"
+A12="壱に壱に壱に"
+A13="壱にいちにいちに"
+A14="いちに壱にいちに"
+A15="いちにいちに壱に"
+%check
diff --git a/test/04-function-t.txt b/test/04-function-t.txt
new file mode 100644
index 0000000..05f7266
--- /dev/null
+++ b/test/04-function-t.txt
@@ -0,0 +1,74 @@
+%% Test case for T() function.
+%mode init
+A1@text value
+A2:12345
+A3:true
+A4:false
+A5=CONCATENATE("text"," in ","formula")
+A8=1/2
+A9=TRUE()
+A10=FALSE()
+B1=T(A1)
+B2=T(A2)
+B3=T(A3)
+B4=T(A4)
+B5=T(A5)
+B6=T(A6)
+B7=T("inline")
+B8=T(A8)
+B9=T(A9)
+B10=T(A10)
+C1=ISTEXT(B1)
+C2=ISTEXT(B2)
+C3=ISTEXT(B3)
+C4=ISTEXT(B4)
+C5=ISTEXT(B5)
+C6=ISTEXT(B6)
+C7=ISTEXT(B7)
+C8=ISTEXT(B8)
+C9=ISTEXT(B9)
+C10=ISTEXT(B10)
+D1=LEN(B1)
+D2=LEN(B2)
+D3=LEN(B3)
+D4=LEN(B4)
+D5=LEN(B5)
+D6=LEN(B6)
+D7=LEN(B7)
+D8=LEN(B8)
+D9=LEN(B9)
+D10=LEN(B10)
+%calc
+%mode result
+B1="text value"
+B2=""
+B3=""
+B4=""
+B5="text in formula"
+B6=""
+B7="inline"
+B8=""
+B9=""
+B10=""
+C1=true
+C2=true
+C3=true
+C4=true
+C5=true
+C6=true
+C7=true
+C8=true
+C9=true
+C10=true
+D1=10
+D2=0
+D3=0
+D4=0
+D5=15
+D6=0
+D7=6
+D8=0
+D9=0
+D10=0
+%check
+
diff --git a/test/04-function-textjoin.txt b/test/04-function-textjoin.txt
new file mode 100644
index 0000000..ff9b73a
--- /dev/null
+++ b/test/04-function-textjoin.txt
@@ -0,0 +1,30 @@
+%mode init
+A1@A
+A2@C
+A3:2.3
+A4:true
+A5=21/3
+B1@B
+B2="D"
+B10=REPT("Z",2)
+C1=TEXTJOIN(", ",0,A1:B2)
+C2=TEXTJOIN(", ",0,A1:A2,B1:B2)
+C3=TEXTJOIN(", ",0,A1:B1,A2:B2)
+C4=TEXTJOIN(":",0,A1,B2,A2,B1,A1)
+C5=TEXTJOIN(":",0,A1:A4)
+C6=TEXTJOIN(",",0,B1:B10)
+C7=TEXTJOIN(",",1,B1:B10)
+C8=TEXTJOIN("@",1,A1:A5)
+%calc
+%mode result
+C1="A, B, C, D"
+C2="A, C, B, D"
+C3="A, B, C, D"
+C4="A:D:C:B:A"
+C5="A:C:2.3:true"
+C6="B,D,,,,,,,,ZZ"
+C7="B,D,ZZ"
+C8="A@C@2.3@true@7"
+%check
+
+
diff --git a/test/04-function-trim.txt b/test/04-function-trim.txt
new file mode 100644
index 0000000..7c47729
--- /dev/null
+++ b/test/04-function-trim.txt
@@ -0,0 +1,21 @@
+%mode init
+A1=TRIM("one two three")
+A2=TRIM(" one two three")
+A3=TRIM(" one two three ")
+A4=TRIM("A")
+A5=TRIM("A B")
+A6=TRIM("")
+A7=TRIM(12345)
+B1@ 日本 韓国 中国
+B2=TRIM(B1)
+%calc
+%mode result
+A1="one two three"
+A2="one two three"
+A3="one two three"
+A4="A"
+A5="A B"
+A6=""
+A7="12345"
+B2="日本 韓国 中国"
+%check
diff --git a/test/04-function-true-false.txt b/test/04-function-true-false.txt
new file mode 100644
index 0000000..71b7933
--- /dev/null
+++ b/test/04-function-true-false.txt
@@ -0,0 +1,34 @@
+%mode init
+A1=TRUE()
+A2=FALSE()
+A3@string value
+A4=A3
+A5:true
+A6:false
+B1=NOT(A1)
+B2=NOT(A2)
+B3=NOT(1)
+B4=NOT(0)
+B5=NOT(-1)
+B6=NOT("str")
+B7=NOT(A3)
+B8=NOT(A4)
+B9=NOT(A5)
+B10=NOT(A6)
+B11=NOT(A7)
+%calc
+%mode result
+A1=true
+A2=false
+B1=false
+B2=true
+B3=false
+B4=true
+B5=false
+B6=#VALUE!
+B7=#VALUE!
+B8=#VALUE!
+B9=false
+B10=true
+B11=true
+%check
diff --git a/test/04-function-type.txt b/test/04-function-type.txt
new file mode 100644
index 0000000..aaabdb2
--- /dev/null
+++ b/test/04-function-type.txt
@@ -0,0 +1,42 @@
+%mode init
+A1=TYPE(1)
+A2=TYPE("str")
+A3=TYPE(TRUE())
+A4=TYPE(FALSE())
+A5=TYPE(NA())
+A6=TYPE(B1:E2)
+A7=TYPE(MMULT(D1:D3,E1:G1))
+B1@string value
+B2:12
+B3:true
+B4:false
+B5=1/2
+B6=NA()
+B7="str"
+B8=ISEVEN(12)
+C1=TYPE(B1)
+C2=TYPE(B2)
+C3=TYPE(B3)
+C4=TYPE(B4)
+C5=TYPE(B5)
+C6=TYPE(B6)
+C7=TYPE(B7)
+C8=TYPE(B8)
+%calc
+%mode result
+A1=1
+A2=2
+A3=4
+A4=4
+A5=16
+A6=64
+A7=64
+C1=2
+C2=1
+C3=4
+C4=4
+C5=1
+C6=16
+C7=2
+C8=4
+%check
diff --git a/test/05-range-reference.txt b/test/05-range-reference.txt
new file mode 100644
index 0000000..25a240a
--- /dev/null
+++ b/test/05-range-reference.txt
@@ -0,0 +1,25 @@
+%mode init
+A1=SUM(B1:B4)
+A2=SUM(C1:C4)
+B1=1
+B3=5
+C2=10
+C4=100
+%calc
+%mode result
+A1=6
+A2=110
+%check
+%mode edit
+B1=6
+%recalc
+%mode result
+A1=11
+%check
+%mode edit
+C4=1000
+%recalc
+%mode result
+A2=1010
+%check
+%exit
diff --git a/test/06-range-reference-basic-01.txt b/test/06-range-reference-basic-01.txt
new file mode 100644
index 0000000..d08ebc7
--- /dev/null
+++ b/test/06-range-reference-basic-01.txt
@@ -0,0 +1,28 @@
+%% Very simple case of range reference tracking.
+%mode init
+B1=1
+B3=5
+D1=SUM(B1:B4)
+%calc
+%mode result
+D1=6
+%check
+%mode edit
+B2=4
+%recalc
+%mode result
+D1=10
+%check
+%mode edit
+B1=10
+%recalc
+%mode result
+D1=19
+%check
+%mode edit
+B4=1
+%recalc
+%mode result
+D1=20
+%check
+%exit
diff --git a/test/06-range-reference-basic-02.txt b/test/06-range-reference-basic-02.txt
new file mode 100644
index 0000000..b97c2df
--- /dev/null
+++ b/test/06-range-reference-basic-02.txt
@@ -0,0 +1,34 @@
+%% Chained range reference tracking.
+%mode init
+A1=SUM(A2:A3)
+A3=SUM(A4:A5)
+A5=5
+%calc
+%mode result
+A1=5
+A3=5
+A5=5
+%check
+%mode edit
+A5=1
+%recalc
+%mode result
+A1=1
+A3=1
+%check
+%mode edit
+A4=10
+%recalc
+%mode result
+A3=11
+A1=11
+%check
+%mode edit
+A2=20
+%recalc
+%mode result
+A1=31
+A3=11
+%check
+%exit
+
diff --git a/test/06-range-reference-circular-01.txt b/test/06-range-reference-circular-01.txt
new file mode 100644
index 0000000..b9af839
--- /dev/null
+++ b/test/06-range-reference-circular-01.txt
@@ -0,0 +1,11 @@
+%% Test for circular range references.
+%mode init
+A1=SUM(B1:B2)
+%calc
+%mode result
+A1=0
+%check
+%mode edit
+B1=SUM(A1:A2)
+%recalc
+%exit
diff --git a/test/06-range-reference-unordered.txt b/test/06-range-reference-unordered.txt
new file mode 100644
index 0000000..34a4cd7
--- /dev/null
+++ b/test/06-range-reference-unordered.txt
@@ -0,0 +1,17 @@
+%% Test case for handling disordered range reference.
+%mode init
+A1:1
+A2:2
+A3:3
+A4=SUM(A3:A1)
+%calc
+%mode result
+A4=6
+%check
+%mode edit
+A2:4
+%recalc
+%mode result
+A4=8
+%check
+
diff --git a/test/06-range-reference-whole-column.txt b/test/06-range-reference-whole-column.txt
new file mode 100644
index 0000000..d806bc6
--- /dev/null
+++ b/test/06-range-reference-whole-column.txt
@@ -0,0 +1,17 @@
+%% Test case for handling a range reference with whole column.
+%mode init
+A1:1
+A2:2
+A3:3
+C1=SUM(A:A)
+%calc
+%mode result
+C1=6
+%check
+%mode edit
+A1:10
+%recalc
+%mode result
+C1=15
+%check
+%exit
diff --git a/test/06-range-reference-whole-row.txt b/test/06-range-reference-whole-row.txt
new file mode 100644
index 0000000..10a38a0
--- /dev/null
+++ b/test/06-range-reference-whole-row.txt
@@ -0,0 +1,17 @@
+%% Test case for handling a range reference with whole row.
+%mode init
+A2:1
+B2:2
+C2:3
+E3=SUM(2:2)
+%calc
+%mode result
+E3=6
+%check
+%mode edit
+A2:10
+%recalc
+%mode result
+E3=15
+%check
+%exit
diff --git a/test/07-fraction-numbers.txt b/test/07-fraction-numbers.txt
new file mode 100644
index 0000000..852edba
--- /dev/null
+++ b/test/07-fraction-numbers.txt
@@ -0,0 +1,12 @@
+%% Test parsing and interpretation of fractional numbers.
+%mode init
+A1=25.6+10.56-0.987
+A2=2.5+3.2
+A3=3.5*(2.3+7.567)
+%calc
+%mode result
+A1=35.173
+A2=5.7
+A3=34.5345
+%check
+%exit
diff --git a/test/08-boolean-cells.txt b/test/08-boolean-cells.txt
new file mode 100644
index 0000000..d10caf5
--- /dev/null
+++ b/test/08-boolean-cells.txt
@@ -0,0 +1,25 @@
+%% Test for parsing boolean cells.
+%% --------------------------------------------------------------------------
+%mode init
+A1@Boolean Values
+A2:true
+A3:false
+A4=A2*2
+A5=A3+3
+A7=COUNTA(A1:B3)
+A8=SUM(A1:A5)
+%% --------------------------------------------------------------------------
+%calc
+%% --------------------------------------------------------------------------
+%mode result
+A1="Boolean Values"
+A2=true
+A3=false
+A4=2
+A5=3
+A7=3
+A8=6
+%% --------------------------------------------------------------------------
+%check
+%% --------------------------------------------------------------------------
+%exit
diff --git a/test/08-numeric-cells.txt b/test/08-numeric-cells.txt
new file mode 100644
index 0000000..d324d04
--- /dev/null
+++ b/test/08-numeric-cells.txt
@@ -0,0 +1,17 @@
+%% Test for parsing numeric cells. A numeric cell begins with a cell name
+%% followed by a ':' immediately followed by a number.
+%mode init
+A1:0
+A2:1
+A3:12.5
+A4:-1.2
+A5=SUM(A1:A4)
+%calc
+%mode result
+A1=0
+A2=1
+A3=12.5
+A4=-1.2
+A5=12.3
+%check
+%exit
diff --git a/test/09-string-cells.txt b/test/09-string-cells.txt
new file mode 100644
index 0000000..e841c37
--- /dev/null
+++ b/test/09-string-cells.txt
@@ -0,0 +1,17 @@
+%% Test for parsing string cells.
+%mode init
+A1@Andy
+B1@Bruce
+C1@Charles
+D1@David
+A2=A1
+%calc
+%mode result
+A1="Andy"
+B1="Bruce"
+C1="Charles"
+D1="David"
+A2="Andy"
+%check
+%exit
+
diff --git a/test/10-shared-formulas-01.txt b/test/10-shared-formulas-01.txt
new file mode 100644
index 0000000..751790c
--- /dev/null
+++ b/test/10-shared-formulas-01.txt
@@ -0,0 +1,9 @@
+%% Test for simple columnar shared formulas.
+%mode init
+A1:100
+A2=A1+1
+A3=A2+1
+A4=A3+1
+A5=A4+1
+%calc
+%exit
diff --git a/test/11-reference-to-numeric-cell-01.txt b/test/11-reference-to-numeric-cell-01.txt
new file mode 100644
index 0000000..bf333f4
--- /dev/null
+++ b/test/11-reference-to-numeric-cell-01.txt
@@ -0,0 +1,23 @@
+%% Modify non-formula cell which should trigger formula cells referencing it
+%% to get re-calculated.
+%mode init
+A1:1
+A2=A1*A1
+A3=A1*3
+B1=A1*3+10
+%calc
+%mode result
+A2=1
+A3=3
+B1=13
+%check
+%mode edit
+A1:2
+%recalc
+%mode result
+A2=4
+A3=6
+B1=16
+%check
+%exit
+
diff --git a/test/12-inline-string-01.txt b/test/12-inline-string-01.txt
new file mode 100644
index 0000000..39fdafd
--- /dev/null
+++ b/test/12-inline-string-01.txt
@@ -0,0 +1,33 @@
+%% Test for inline string support.
+%mode init
+A1="A"
+A2="n"
+A3="d"
+A4="y"
+A5=A1
+A6=LEN("test")
+A7=LEN(123)
+A8=LEN(123.45)
+A9="Andy"
+A10=A9
+A11=LEN(A9)
+A12=CONCATENATE(A1,A2,A3,A4)
+A13=CONCATENATE(A12," is smart")
+%calc
+%mode result
+A1="A"
+A2="n"
+A3="d"
+A4="y"
+A5="A"
+A6=4
+A7=3
+A8=6
+A9="Andy"
+A10="Andy"
+A11=4
+A12="Andy"
+A13="Andy is smart"
+%check
+%exit
+
diff --git a/test/13-relational-operators-01.txt b/test/13-relational-operators-01.txt
new file mode 100644
index 0000000..8ce4434
--- /dev/null
+++ b/test/13-relational-operators-01.txt
@@ -0,0 +1,30 @@
+%% Test for relational operators with in-line numbers.
+%mode init
+A1=1=1
+A2=1=2
+A3=1*6=2*3
+A4=1<4
+A5=4<4
+A6=4>2
+A7=68>123
+A8=1>=1
+A9=1>=2
+A10=2>=0
+A11=45<>12
+A12=33<>33
+%calc
+%mode result
+A1=1
+A2=0
+A3=1
+A4=1
+A5=0
+A6=1
+A7=0
+A8=1
+A9=0
+A10=1
+A11=1
+A12=0
+%check
+%exit
diff --git a/test/13-relational-operators-02.txt b/test/13-relational-operators-02.txt
new file mode 100644
index 0000000..a9ab67e
--- /dev/null
+++ b/test/13-relational-operators-02.txt
@@ -0,0 +1,23 @@
+%% Test for relational operators with referenced numbers.
+%mode init
+A1:1
+A2:2
+A3:3
+A4=A1<A2
+A5=A1>A2
+A6=A1<>A2
+A7=A1>=A2
+A8=A1<=A2
+A9=(A1+A2)=A3
+A10=A1=A2
+%calc
+%mode result
+A4=1
+A5=0
+A6=1
+A7=0
+A8=1
+A9=1
+A10=0
+%check
+%exit
diff --git a/test/13-relational-operators-03.txt b/test/13-relational-operators-03.txt
new file mode 100644
index 0000000..6cebb24
--- /dev/null
+++ b/test/13-relational-operators-03.txt
@@ -0,0 +1,19 @@
+%% Test for relational operators with strings.
+%mode init
+A1@A
+A2@B
+A3@C
+B1=A1=A1
+B2=A1>=A1
+B3=A2<=A2
+B4=A1>A2
+B5=A1<A2
+%calc
+%mode result
+B1=1
+B2=1
+B3=1
+B4=0
+B5=1
+%check
+%exit
diff --git a/test/20-table-reference-01.txt b/test/20-table-reference-01.txt
new file mode 100644
index 0000000..0e99185
--- /dev/null
+++ b/test/20-table-reference-01.txt
@@ -0,0 +1,37 @@
+%% Basic table reference test. Set C3:D9 to be a table range with 2 columns
+%% 'Category' and 'Value'.
+%mode init
+C3@Category
+C4@A
+C5@B
+C6@C
+C7@D
+C8@E
+C9@Total
+D3@Value
+D4:1
+D5:2
+D6:3
+D7:4
+D8:5
+D9=SUBTOTAL(109,[Value])
+E1=SUM(Table1[Value])
+E2=COUNTA(Table1[#Headers])
+E3=COUNTA(Table1[[#Headers],[Category]])
+E4=COUNTA(Table1[[#Headers],[#Data],[Category]])
+%mode table
+name=Table1
+range=C3:D9
+columns=Category,Value
+totals-row-count=1
+%push
+%calc
+%mode result
+D9=15
+E1=15
+E2=2
+E3=1
+E4=6
+%check
+%exit
+
diff --git a/test/21-named-exp-workbook-01.txt b/test/21-named-exp-workbook-01.txt
new file mode 100644
index 0000000..ee55057
--- /dev/null
+++ b/test/21-named-exp-workbook-01.txt
@@ -0,0 +1,54 @@
+%% Basic named expression support.
+%% --------------------------------------------------------------------------
+%mode session
+row-limit:1000
+column-limit:100
+insert-sheet:Sheet1
+insert-sheet:Sheet2
+current-sheet:Sheet1
+%% --------------------------------------------------------------------------
+%mode init
+A1:1
+A2:2
+A3:3
+A4:4
+A5:5
+B1:6
+B2:7
+B3:8
+B4:9
+B5:10
+A7=SUM(MyRange)
+B7=SUM(MyRange2)
+%% --------------------------------------------------------------------------
+%mode named-expression
+name=MyRange
+expression=Sheet1!$A$1:$A$5
+origin=Sheet1!$A$1
+%push
+%% --------------------------------------------------------------------------
+%mode named-expression
+name=MyRange2
+expression=Sheet1!$A$1:$B$5
+origin=Sheet1!$A$1
+%push
+%% --------------------------------------------------------------------------
+%calc
+%% --------------------------------------------------------------------------
+%mode result
+A7=15
+B7=55
+%check
+%% --------------------------------------------------------------------------
+%mode edit
+A1:10
+%% --------------------------------------------------------------------------
+%recalc
+%% --------------------------------------------------------------------------
+%mode result
+A7=24
+B7=64
+%check
+%% --------------------------------------------------------------------------
+%exit
+
diff --git a/test/21-named-exp-worksheet-01.txt b/test/21-named-exp-worksheet-01.txt
new file mode 100644
index 0000000..0356c54
--- /dev/null
+++ b/test/21-named-exp-worksheet-01.txt
@@ -0,0 +1,73 @@
+%% Named expression in sheet scope.
+%% Sizes of the equally named sheet-local ranges are intentionally different,
+%% to easily test whether the correct range is picked on each sheet.
+%% --------------------------------------------------------------------------
+%mode session
+row-limit:1000
+column-limit:100
+insert-sheet:Sheet1
+insert-sheet:Sheet2
+current-sheet:Sheet1
+display-sheet-name:true
+%% --------------------------------------------------------------------------
+%mode init
+A1:1
+A2:2
+A3:3
+A4:4
+A5:5
+B1:6
+B2:7
+B3:8
+B4:9
+B5:10
+B7=SUM(MyLocalRange)
+%% --------------------------------------------------------------------------
+%mode session
+current-sheet:Sheet2
+%% --------------------------------------------------------------------------
+%mode init
+A1:10
+A2:20
+A3:30
+A4:40
+A5:50
+B1:60
+B2:70
+B3:80
+B4:90
+B5:100
+B7=SUM(MyLocalRange)
+%% --------------------------------------------------------------------------
+%mode named-expression
+name=MyLocalRange
+scope=Sheet1
+expression=Sheet1!$A$1:$A$5
+origin=Sheet1!$A$1
+%push
+%% --------------------------------------------------------------------------
+%mode named-expression
+name=MyLocalRange
+scope=Sheet2
+expression=Sheet2!$A$4:$B$5
+origin=Sheet2!$A$1
+%push
+%% --------------------------------------------------------------------------
+%calc
+%% --------------------------------------------------------------------------
+%mode result
+Sheet1!B7=15
+Sheet2!B7=280
+%check
+%% --------------------------------------------------------------------------
+%mode edit
+Sheet1!A5@some text
+Sheet2!B4@other text
+%recalc
+%% --------------------------------------------------------------------------
+%mode result
+Sheet1!B7=10
+Sheet2!B7=190
+%check
+%exit
+
diff --git a/test/22-formulas-with-cached-results.txt b/test/22-formulas-with-cached-results.txt
new file mode 100644
index 0000000..14638b9
--- /dev/null
+++ b/test/22-formulas-with-cached-results.txt
@@ -0,0 +1,15 @@
+%% Test case for formula cells with cached results. This test case intentionally
+%% does not calculate formula cells before checking their results.
+%mode init
+D2=RAND()
+E6=RAND()+12
+F7=145/RAND()
+%mode result-cache
+D2=12
+E6=145
+F7=#DIV/0!
+%mode result
+D2=12
+E6=145
+F7=#DIV/0!
+%check
diff --git a/test/22-grouped-formulas-with-cached-results.txt b/test/22-grouped-formulas-with-cached-results.txt
new file mode 100644
index 0000000..cbaf33b
--- /dev/null
+++ b/test/22-grouped-formulas-with-cached-results.txt
@@ -0,0 +1,38 @@
+%mode init
+A1=RAND()
+A2=RAND()
+B1=RAND()
+B2=RAND()
+D1=RAND()
+D2=RAND()
+E1=RAND()
+E2=RAND()
+{G1:H2}{=MMULT(A1:B2,D1:E2)}
+%mode result-cache
+A1=1
+A2=2
+B1=3
+B2=4
+D1=5
+D2=6
+E1=7
+E2=8
+G1=23
+G2=34
+H1=31
+H2=46
+%mode result
+A1=1
+A2=2
+B1=3
+B2=4
+D1=5
+D2=6
+E1=7
+E2=8
+G1=23
+G2=34
+H1=31
+H2=46
+%check
+%exit
diff --git a/test/parser-test-func.sh b/test/parser-test-func.sh
new file mode 100755
index 0000000..f55c41e
--- /dev/null
+++ b/test/parser-test-func.sh
@@ -0,0 +1,12 @@
+#!/usr/bin/env bash
+
+exec_test()
+{
+ PROGDIR=`dirname $0`
+ SRCDIR=$PROGDIR/../src
+
+ export PATH=$SRCDIR:$SRCDIR/.libs:$PATH
+
+ ixion-parser -t $1 $PROGDIR/*.txt
+}
+
diff --git a/test/parser-test-t0.sh b/test/parser-test-t0.sh
new file mode 100755
index 0000000..6f6c727
--- /dev/null
+++ b/test/parser-test-t0.sh
@@ -0,0 +1,9 @@
+#!/usr/bin/env bash
+
+PROGDIR=`dirname $0`
+source $PROGDIR/parser-test-func.sh
+
+THREAD=`echo $0 | sed -e 's/.*t\([0-9]\)\.sh/\1/g'`
+
+exec_test $THREAD
+
diff --git a/test/parser-test-t1.sh b/test/parser-test-t1.sh
new file mode 100755
index 0000000..6f6c727
--- /dev/null
+++ b/test/parser-test-t1.sh
@@ -0,0 +1,9 @@
+#!/usr/bin/env bash
+
+PROGDIR=`dirname $0`
+source $PROGDIR/parser-test-func.sh
+
+THREAD=`echo $0 | sed -e 's/.*t\([0-9]\)\.sh/\1/g'`
+
+exec_test $THREAD
+
diff --git a/test/parser-test-t2.sh b/test/parser-test-t2.sh
new file mode 100755
index 0000000..6f6c727
--- /dev/null
+++ b/test/parser-test-t2.sh
@@ -0,0 +1,9 @@
+#!/usr/bin/env bash
+
+PROGDIR=`dirname $0`
+source $PROGDIR/parser-test-func.sh
+
+THREAD=`echo $0 | sed -e 's/.*t\([0-9]\)\.sh/\1/g'`
+
+exec_test $THREAD
+
diff --git a/test/parser-test-t3.sh b/test/parser-test-t3.sh
new file mode 100755
index 0000000..6f6c727
--- /dev/null
+++ b/test/parser-test-t3.sh
@@ -0,0 +1,9 @@
+#!/usr/bin/env bash
+
+PROGDIR=`dirname $0`
+source $PROGDIR/parser-test-func.sh
+
+THREAD=`echo $0 | sed -e 's/.*t\([0-9]\)\.sh/\1/g'`
+
+exec_test $THREAD
+
diff --git a/test/parser-test-t4.sh b/test/parser-test-t4.sh
new file mode 100755
index 0000000..6f6c727
--- /dev/null
+++ b/test/parser-test-t4.sh
@@ -0,0 +1,9 @@
+#!/usr/bin/env bash
+
+PROGDIR=`dirname $0`
+source $PROGDIR/parser-test-func.sh
+
+THREAD=`echo $0 | sed -e 's/.*t\([0-9]\)\.sh/\1/g'`
+
+exec_test $THREAD
+
diff --git a/test/parser-test-t5.sh b/test/parser-test-t5.sh
new file mode 100755
index 0000000..6f6c727
--- /dev/null
+++ b/test/parser-test-t5.sh
@@ -0,0 +1,9 @@
+#!/usr/bin/env bash
+
+PROGDIR=`dirname $0`
+source $PROGDIR/parser-test-func.sh
+
+THREAD=`echo $0 | sed -e 's/.*t\([0-9]\)\.sh/\1/g'`
+
+exec_test $THREAD
+
diff --git a/test/parser-test-t6.sh b/test/parser-test-t6.sh
new file mode 100755
index 0000000..6f6c727
--- /dev/null
+++ b/test/parser-test-t6.sh
@@ -0,0 +1,9 @@
+#!/usr/bin/env bash
+
+PROGDIR=`dirname $0`
+source $PROGDIR/parser-test-func.sh
+
+THREAD=`echo $0 | sed -e 's/.*t\([0-9]\)\.sh/\1/g'`
+
+exec_test $THREAD
+
diff --git a/test/parser-test-t7.sh b/test/parser-test-t7.sh
new file mode 100755
index 0000000..6f6c727
--- /dev/null
+++ b/test/parser-test-t7.sh
@@ -0,0 +1,9 @@
+#!/usr/bin/env bash
+
+PROGDIR=`dirname $0`
+source $PROGDIR/parser-test-func.sh
+
+THREAD=`echo $0 | sed -e 's/.*t\([0-9]\)\.sh/\1/g'`
+
+exec_test $THREAD
+
diff --git a/test/parser-test-t8.sh b/test/parser-test-t8.sh
new file mode 100755
index 0000000..6f6c727
--- /dev/null
+++ b/test/parser-test-t8.sh
@@ -0,0 +1,9 @@
+#!/usr/bin/env bash
+
+PROGDIR=`dirname $0`
+source $PROGDIR/parser-test-func.sh
+
+THREAD=`echo $0 | sed -e 's/.*t\([0-9]\)\.sh/\1/g'`
+
+exec_test $THREAD
+
diff --git a/test/python/document.py b/test/python/document.py
new file mode 100755
index 0000000..538225b
--- /dev/null
+++ b/test/python/document.py
@@ -0,0 +1,242 @@
+#!/usr/bin/env python3
+
+import unittest
+import ixion
+
+
+class DocumentTest(unittest.TestCase):
+
+ def setUp(self):
+ self.doc = ixion.Document()
+
+ def test_append_sheets(self):
+ tests = (
+ "Normal", # normal name
+ "First Sheet", # white space
+ "Laura's", # single quote
+ '"Quoted"' # double quote
+ )
+
+ sheets = []
+ for test in tests:
+ sh = self.doc.append_sheet(test)
+ sheets.append(sh)
+
+ for test, sheet in zip(tests, sheets):
+ self.assertEqual(test, sheet.name)
+
+ self.assertEqual(tests, self.doc.sheet_names)
+
+ for i, test in enumerate(tests):
+ # get sheet by index.
+ sh = self.doc.get_sheet(i)
+ self.assertEqual(test, sh.name)
+
+ for test in tests:
+ # get sheet by name.
+ sh = self.doc.get_sheet(test)
+ self.assertEqual(test, sh.name)
+
+ try:
+ sheets[0].name = "Try to change sheet name"
+ self.assertTrue(False, "sheet name attribute should not be writable.")
+ except AttributeError:
+ pass # AttributeError is expected when attempting to overwrite sheet name attribute.
+ except:
+ self.assertTrue(False, "Wrong exception has been raised")
+
+ # Trying to insert a new sheet with an existing name should fail.
+ try:
+ sh = self.doc.append_sheet(tests[0])
+ self.assertTrue(False, "Trying to insert a new sheet with an existing sheet name should fail")
+ except ixion.DocumentError:
+ # This is expected.
+ pass
+
+ def test_numeric_cell_input(self):
+ sh1 = self.doc.append_sheet("Data")
+
+ # Empty cell should yield a value of 0.0.
+ check_val = sh1.get_numeric_value(0, 0)
+ self.assertEqual(0.0, check_val)
+
+ tests = (
+ # row, column, value
+ (3, 1, 11.2),
+ (4, 1, 12.0),
+ (6, 2, -12.0),
+ (6, 3, 0.0)
+ )
+
+ for test in tests:
+ sh1.set_numeric_cell(test[0], test[1], test[2]) # row, column, value
+ check_val = sh1.get_numeric_value(column=test[1], row=test[0]) # swap row and column
+ self.assertEqual(test[2], check_val)
+
+ def test_string_cell_input(self):
+ sh1 = self.doc.append_sheet("Data")
+
+ # Empty cell should yield an empty string.
+ check_val = sh1.get_string_value(0, 0)
+ self.assertEqual("", check_val)
+
+ tests = (
+ # row, column, value
+ (0, 0, "normal string"), # normal string
+ (1, 0, "A1+B1"), # string that looks like a formula expression
+ (2, 0, "'single quote'"), # single quote
+ (3, 0, "80's music"), # single quote
+ (4, 0, '"The" Music in the 80\'s'), # single and double quotes mixed
+ )
+
+ for test in tests:
+ sh1.set_string_cell(test[0], test[1], test[2]) # row, column, value
+ check_val = sh1.get_string_value(column=test[1], row=test[0]) # swap row and column
+ self.assertEqual(test[2], check_val)
+
+ def test_formula_cell_input(self):
+ sh1 = self.doc.append_sheet("Data")
+ sh1.set_formula_cell(0, 0, "12*3")
+ try:
+ val = sh1.get_numeric_value(0, 0)
+ self.assertTrue(False, "TypeError should have been raised")
+ except TypeError:
+ # TypeError is expected when trying to fetch numeric value from
+ # formula cell before it is calculated.
+ pass
+
+ self.doc.calculate()
+ val = sh1.get_numeric_value(0, 0)
+ self.assertEqual(12*3, val)
+
+ def test_formula_cell_recalc(self):
+ sh1 = self.doc.append_sheet("Data")
+ sh1.set_numeric_cell(0, 0, 1.0)
+ sh1.set_numeric_cell(1, 0, 2.0)
+ sh1.set_numeric_cell(2, 0, 4.0)
+ sh1.set_formula_cell(3, 0, "SUM(A1:A3)")
+
+ # initial calculation
+ self.doc.calculate()
+ val = sh1.get_numeric_value(3, 0)
+ self.assertEqual(7.0, val)
+
+ # recalculation
+ sh1.set_numeric_cell(1, 0, 8.0)
+ self.doc.calculate()
+ val = sh1.get_numeric_value(3, 0)
+ self.assertEqual(13.0, val)
+
+ # add another formula cell and recalc.
+ sh1.set_formula_cell(0, 1, "A1+15")
+ sh1.set_numeric_cell(0, 0, 0.0)
+ self.doc.calculate()
+ val = sh1.get_numeric_value(0, 1)
+ self.assertEqual(15.0, val)
+ val = sh1.get_numeric_value(3, 0)
+ self.assertEqual(12.0, val)
+
+ def test_formula_cell_recalc2(self):
+ sh1 = self.doc.append_sheet("Data")
+ sh1.set_numeric_cell(4, 1, 12.0) # B5
+ sh1.set_formula_cell(5, 1, "B5*2")
+ sh1.set_formula_cell(6, 1, "B6+10")
+
+ self.doc.calculate()
+ val = sh1.get_numeric_value(4, 1)
+ self.assertEqual(12.0, val)
+ val = sh1.get_numeric_value(5, 1)
+ self.assertEqual(24.0, val)
+ val = sh1.get_numeric_value(6, 1)
+ self.assertEqual(34.0, val)
+
+ # Delete B5 and check.
+ sh1.empty_cell(4, 1)
+ self.doc.calculate()
+ val = sh1.get_numeric_value(4, 1)
+ self.assertEqual(0.0, val)
+ val = sh1.get_numeric_value(5, 1)
+ self.assertEqual(0.0, val)
+ val = sh1.get_numeric_value(6, 1)
+ self.assertEqual(10.0, val)
+
+ def test_formula_cell_threaded_recalc(self):
+
+ sh1 = self.doc.append_sheet("Data")
+ sh1.set_numeric_cell(0, 0, 1.1)
+ sh1.set_numeric_cell(1, 0, 1.2)
+ sh1.set_numeric_cell(2, 0, 1.3)
+ sh1.set_formula_cell(0, 1, "SUM(A1:A3)")
+ sh1.set_formula_cell(1, 1, "B1*2")
+
+ self.doc.calculate(threads=2)
+
+ # Check the value in B1.
+ v = sh1.get_numeric_value(0, 1)
+ v = round(v, 1)
+ self.assertEqual(v, 3.6)
+
+ # Check the value in B2.
+ v = sh1.get_numeric_value(1, 1)
+ v = round(v, 1)
+ self.assertEqual(v, 7.2)
+
+ def test_formula_cell_string(self):
+ sh1 = self.doc.append_sheet("MyData")
+ sh1.set_string_cell(1, 1, "My precious string") # B2
+ sh1.set_formula_cell(1, 2, "B2") # C2
+ sh1.set_formula_cell(2, 2, "concatenate(B2, \" is here\")") # C3
+ self.doc.calculate()
+ self.assertEqual("My precious string", sh1.get_string_value(1, 1))
+ self.assertEqual("My precious string", sh1.get_string_value(1, 2))
+ self.assertEqual("My precious string is here", sh1.get_string_value(2, 2))
+
+ def test_detached_sheet(self):
+ # You can't set values to a detached sheet that doesn't belong to a
+ # Document object.
+ sh = ixion.Sheet()
+ try:
+ sh.set_numeric_cell(1, 1, 12)
+ self.assertTrue(False, "failed to raise a SheetError.")
+ except ixion.SheetError:
+ pass # expected
+
+ try:
+ sh.set_string_cell(2, 2, "String")
+ self.assertTrue(False, "failed to raise a SheetError.")
+ except ixion.SheetError:
+ pass # expected
+
+ try:
+ sh.set_formula_cell(2, 2, "A1")
+ self.assertTrue(False, "failed to raise a SheetError.")
+ except ixion.SheetError:
+ pass # expected
+
+ try:
+ sh.empty_cell(2, 1)
+ self.assertTrue(False, "failed to raise a SheetError.")
+ except ixion.SheetError:
+ pass # expected
+
+ try:
+ val = sh.get_numeric_value(2, 1)
+ self.assertTrue(False, "failed to raise a SheetError.")
+ except ixion.SheetError:
+ pass # expected
+
+ try:
+ s = sh.get_string_value(2, 1)
+ self.assertTrue(False, "failed to raise a SheetError.")
+ except ixion.SheetError:
+ pass # expected
+
+ try:
+ expr = sh.get_formula_expression(2, 1)
+ self.assertTrue(False, "failed to raise a SheetError.")
+ except ixion.SheetError:
+ pass # expected
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/test/python/module.py b/test/python/module.py
new file mode 100755
index 0000000..88682c6
--- /dev/null
+++ b/test/python/module.py
@@ -0,0 +1,40 @@
+#!/usr/bin/env python3
+
+import unittest
+import ixion
+
+
+class ModuleTest(unittest.TestCase):
+
+ def test_column_label(self):
+ # Get a single label.
+ labels = ixion.column_label(0, 1)
+ self.assertEqual(1, len(labels))
+ self.assertEqual('A', labels[0])
+
+ # Get multiple labels.
+ labels = ixion.column_label(2, 10)
+ self.assertEqual(8, len(labels))
+ self.assertEqual(labels, ('C','D','E','F','G','H','I','J'))
+
+ # The following start, stop combos should individually raise IndexError.
+ tests = (
+ (2, 2),
+ (2, 0),
+ (-1, 10)
+ )
+ for test in tests:
+ with self.assertRaises(IndexError):
+ labels = ixion.column_label(test[0], test[1])
+
+ # Keyword arguments should work.
+ labels = ixion.column_label(start=2, stop=4)
+ self.assertEqual(labels, ('C','D'))
+
+ # Get labels in R1C1.
+ labels = ixion.column_label(5, 10, 2)
+ self.assertEqual(labels, ('6','7','8','9','10'))
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/test/thread/function-parallel.txt b/test/thread/function-parallel.txt
new file mode 100644
index 0000000..49cceea
--- /dev/null
+++ b/test/thread/function-parallel.txt
@@ -0,0 +1,11 @@
+%mode init
+A1=WAIT()+1
+A2=WAIT()+20
+A3=WAIT()+15
+A4=WAIT()+5
+A5=A1+A2+A3+A4+WAIT()
+A6=(A2+A3)*2+WAIT()
+A7=A5+A6+WAIT()
+%calc
+%exit
+
diff --git a/test/thread/function-wait-simple.txt b/test/thread/function-wait-simple.txt
new file mode 100644
index 0000000..b3df0d7
--- /dev/null
+++ b/test/thread/function-wait-simple.txt
@@ -0,0 +1,8 @@
+%mode init
+A1=WAIT()+1
+A2=WAIT()+20
+A3=WAIT()+15
+A4=(A2+A3)*2+WAIT()
+%calc
+%exit
+