Compatibility tests for EasyTree and Family Origins.
[gedcom-parse.git] / doc / usage.html
index 1c59ae9dc2a126295800cfeb46ea2b61cf507c86..39a0cb3594f58e5ca6cfeb0a30d3c1e99c09f371 100644 (file)
@@ -470,10 +470,12 @@ values:<br>
 <ul>
   <li><code><b>WITHOUT_BOM</b></code></li>
   <li><code><b>WITH_BOM</b></code></li>
-</ul>
-For both these parameters you can pass 0 for non-UNICODE encodings, since
-that corresponds to the correct values (and is ignored anyway). &nbsp;The
-function returns 0 in case of success, non-zero in case of error.<br>
+</ul> For both these parameters you can pass 0 for non-UNICODE encodings,
+since that corresponds to the correct values (and is ignored anyway). &nbsp;The 
+function returns 0 in case of success, non-zero in case of error. &nbsp;Note
+that you still need to pass the correct charset value for the HEAD.CHAR tag,
+otherwise you will get a warning, and the value will be forced to the correct
+value.<br>
 <br>
 Further, it is possible to control the kind of line terminator that is used, via the following function (also to be used before <code>gedcom_write_open</code>):<br>
 <blockquote><code>int <b>gedcom_write_set_line_terminator</b> (Enc_line_end end);<br></code></blockquote>
@@ -661,11 +663,23 @@ There
 is a macro available for use in configure.in for applications that are using
 autoconf to configure their sources. &nbsp;The following macro checks whether
 the Gedcom parser library is available and whether its version is high enough:<br>
-<blockquote><code>AM_LIB_GEDCOM_PARSER([<i>major</i>,[<i>minor</i>,[<i>patch</i>]]])</code><br>
+<blockquote><code>AM_PATH_GEDCOM_PARSER([<i>min_version</i>,[<i>action_if_found</i>,[<i>action_if_not_found,</i>[<i>modules</i>]]]])</code><br>
 </blockquote>
 All the arguments are optional and default to 0. &nbsp;E.g. to check for
-version 1.34, you would put in configure.in the following statement:<br>
-<blockquote><code>AM_LIB_GEDCOM_PARSER(1,34)</code><br>
+version 1.34.2, you would put in configure.in the following statement:<br>
+<blockquote><code>AM_PATH_GEDCOM_PARSER(1.34.2)</code><br>
+</blockquote>Note that version numbers now contains three parts (since version
+0.20.0: this is also the first version in which this macro is available).<br>
+<br>
+The macro also sets the variables <code>GEDCOM_CFLAGS</code> and <code>GEDCOM_LIBS</code> for use in Makefiles. &nbsp;Typically, this would be done as follows in a Makefile.am:<br>
+<blockquote><code>bin_programs &nbsp; = myprg</code><br>
+  <code>myprg_SOURCES &nbsp;= myprg.c foo.c bar.c<br>
+INCLUDES &nbsp; &nbsp; &nbsp; = @GEDCOM_CFLAGS@<br>
+LDADD &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= @GEDCOM_LIBS@</code></blockquote>
+If your program uses some extra modules, they can be passed as fourth argument
+in the macro, so that the CFLAGS and LIBS are correctly filled in. &nbsp;Currently,
+the only available module is <code>gom</code> (the Gedcom object model). &nbsp;For example:<br>
+<blockquote><code>AM_PATH_GEDCOM_PARSER(0.21.2, , ,gom)</code><br>
 </blockquote>
 To be able to use this macro in the sources of your application, you have three options:<br>
 <ul>
@@ -689,10 +703,10 @@ There are three preprocessor symbols defined for version checks in the
                                                      </li>
                                                      
 </ul>
-   The last one is equal to <code>(GEDCOM_PARSE_VERSION_MAJOR * 1000) + GEDCOM_PARSE_VERSION_MINOR.</code><br>
+   The last one is equal to <code>(GEDCOM_PARSE_VERSION_MAJOR * 1000) + GEDCOM_PARSE_VERSION_MINOR.</code> As you see, this only checked the major and minor version, not the patch number, so this is obsolete.<br>
 <br>
 <h3>Compilation and linking flags</h3>
-Similar to other libraries, the GEDCOM parse library installs a script <code>gedcom-config</code> to help with compilation and linking flags.<br>
+Similar to other libraries, the GEDCOM parse library installs a script <code>gedcom-config</code> to help with compilation and linking flags for programs that don't use autoconf/automake.<br>
 <br>
 To get compilation flags for your program, use (depending on whether you
 only use the callback parser, or also the GEDCOM object model):
@@ -722,4 +736,6 @@ gedcom-config --libs gom</code><br>
 <br>
 <br>
 <br>
+<br>
+<br>
 </body></html>
\ No newline at end of file