<li><a href="#Error_treatment">Error treatment</a></li>
<li><a href="#Compatibility_mode">Compatibility mode</a></li>
- </ul><li><a href="#Converting_character_sets">Converting character sets</a><br>
+ </ul><li><a href="#Converting_character_sets">Converting character sets</a></li><li><a href="#Support_for_configure.in">Support for configure.in</a><br>
</li>
+
<li><a href="interface.html">Interface details</a><br>
</li>
<pre><code>iconv_close(iconv_handle);<br></code></pre>
</blockquote>
</blockquote>
- The example implementation mentioned above grows the output buffer dynamically and outputs
-"?" for characters that can't be converted.<br>
- <br>
+ The example implementation
+mentioned above grows the output buffer dynamically and outputs "?" for characters
+that can't be converted.<br>
+
+ <hr width="100%" size="2">
+ <h2><a name="Support_for_configure.in"></a>Support for configure.in</h2>
+Programs using the GEDCOM parser library and using autoconf to configure
+their sources can use the following statements in configure.in (the example
+is checking for gedcom-parse, version 1.34):<br>
+ <blockquote><code>AC_CHECK_LIB(gedcom, gedcom_parse_file,,<br>
+ AC_MSG_ERROR(Cannot find libgedcom: Please install gedcom-parse))<br>
+AC_CACHE_CHECK(for libgedcom version, ac_cv_gedcom_version_ok,<br>
+[AC_TRY_RUN([<br>
+#include <stdio.h><br>
+#include <stdlib.h><br>
+#include <gedcom.h><br>
+int<br>
+main()<br>
+{<br>
+if (GEDCOM_PARSE_VERSION >= 1034) exit(0);<br>
+exit(1);<br>
+}],<br>
+ac_cv_gedcom_version_ok='yes',<br>
+ac_cv_gedcom_version_ok='no')])<br>
+if test "$ac_cv_gedcom_version_ok" = 'yes' ; then<br>
+ AC_MSG_RESULT(ok)<br>
+else<br>
+ AC_MSG_RESULT(not ok)<br>
+ AC_MSG_ERROR(You need at least version 1.34 of gedcom-parse)<br>
+fi</code><br>
+ </blockquote>
+
+There are three preprocessor symbols defined for version checks in the header:<br>
+ <ul>
+ <li><code>GEDCOM_PARSE_VERSION_MAJOR</code></li>
+ <li><code>GEDCOM_PARSE_VERSION_MINOR</code></li>
+ <li><code>GEDCOM_PARSE_VERSION</code><br>
+ </li>
+ </ul>
+The last one is equal to <code>(GEDCOM_PARSE_VERSION_MAJOR * 1000) + GEDCOM_PARSE_VERSION_MINOR.</code><br>
<hr width="100%" size="2">
<pre><font size="-1">$Id$<br>$Name$</font><br></pre>