1 dnl Autoconf/automake macros for the Gedcom parser library
7 dnl AM_LIB_GEDCOM_PARSER([MINIMUM-MAJOR-VERSION, [MINIMUM-MINOR-VERSION]])
8 dnl Test for the availability of the Gedcom parser library, and check whether
9 dnl the required minimum version is available (parameters default to 0 if
11 AC_DEFUN(AM_LIB_GEDCOM_PARSER, [
12 AC_CHECK_LIB(gedcom, gedcom_parse_file,,
13 AC_MSG_ERROR([Cannot find libgedcom: Please install gedcom-parse]))
14 major_version=ifelse([$1], ,0,$1)
15 minor_version=ifelse([$2], ,0,$2)
16 AC_MSG_CHECKING(for libgedcom version >= $major_version.$minor_version)
24 if (GEDCOM_PARSE_VERSION >= $major_version * 1000 + $minor_version) exit(0);
27 ac_gedcom_version_ok='yes',
28 ac_gedcom_version_ok='no',
29 ac_gedcom_version_ok='no')
30 if test "$ac_gedcom_version_ok" = 'yes' ; then
34 AC_MSG_ERROR(You need at least version $major_version.$minor_version of gedcom-parse)