X-Git-Url: https://git.dlugolecki.net.pl/?a=blobdiff_plain;f=doc%2Fusage.html;h=00bddefbfd66c45b1cc5413ff52315aab964ce9c;hb=68591c9aab2c2f87640bbea49220f860b09bb39c;hp=ee3d2d4b1133ea50d60f301feb1ef40107719a84;hpb=c7d446fe2de9a4b79a122dbe9310fc5c03764eca;p=gedcom-parse.git
diff --git a/doc/usage.html b/doc/usage.html
index ee3d2d4..00bddef 100644
--- a/doc/usage.html
+++ b/doc/usage.html
@@ -102,8 +102,9 @@ the -lgedcom
option
on the linking of the program as the last option, so that its initialization
code is run first. In the case of using the C object model, the linking
options should be: -lgedcom_gom -lgedcom
-
- The next sections will refine this piece of code to be able to have
+
The function gedcom_init()
also initializes locale handling by calling setlocale(LC_ALL, "")
, in case the application would not do this (it doesn't hurt for the application to do the same).
+
+The next sections will refine this piece of code to be able to have
meaningful errors and the actual data that is in the file.
- There are three preprocessor symbols defined for version checks in the - header:AC_CHECK_LIB(gedcom, gedcom_parse_file,,
- AC_MSG_ERROR(Cannot - find libgedcom: Please install gedcom-parse))
- AC_MSG_CHECKING(for libgedcom version)
- AC_TRY_RUN([
- #include <stdio.h>
- #include <stdlib.h>
- #include <gedcom.h>
- int
- main()
- {
- if (GEDCOM_PARSE_VERSION >= 1034) exit(0);
- exit(1);
- }],
- ac_gedcom_version_ok='yes',
- ac_gedcom_version_ok='no',
- ac_gedcom_version_ok='no')
- if test "$ac_gedcom_version_ok" = 'yes' ; then
- AC_MSG_RESULT(ok)
- else
- AC_MSG_RESULT(not ok)
- AC_MSG_ERROR(You need at least version 1.34 of gedcom-parse)
- fi
-
+All the arguments are optional and default to 0. E.g. to check for +version 1.34, you would put in configure.in the following statement:AM_LIB_GEDCOM_PARSER([major,[minor,[patch]]])
+
+To be able to use this macro in the sources of your application, you have three options:AM_LIB_GEDCOM_PARSER(1,34)
+
m4/gedcom.m4
in your autoconf data directory (i.e. the path given by 'aclocal --print-ac-dir
', usually /usr/share/aclocal
). You can do this automatically by going into the m4 subdirectory and typing 'make install-m4
'.m4/gedcom.m4
in the aclocal.m4
file in your sources.m4/gedcom.m4
in the acinclude.m4
file in your sources.GEDCOM_PARSE_VERSION_MAJOR
(GEDCOM_PARSE_VERSION_MAJOR * 1000) + GEDCOM_PARSE_VERSION_MINOR.
+