1 # Process this file with autoconf to produce a configure script.
4 AC_INIT(gedcom/interface.c)
6 dnl =============================================================
12 VERSION_MAJOR=`echo $VERSION | sed 's/\..*$//'`
14 VERSION_MINOR=`echo $VERSION | sed 's/^[^\.]*\.//'`
16 AC_SUBST(VERSION_MAJOR)
17 AC_SUBST(VERSION_MINOR)
26 dnl =============================================================
27 AM_INIT_AUTOMAKE(${NAME},${VERSION})
28 AM_CONFIG_HEADER(config.h)
35 darwin*) AC_MSG_WARN([Disabling smart preprocessing])
36 EXTRA_CFLAGS="-no-cpp-precomp";;
38 AC_SUBST(EXTRA_CFLAGS)
40 dnl =============================================================
41 dnl Checks for programs.
51 if test "$YACC" = "bison -y"; then
52 AC_MSG_WARN([We'll remove the -y option here])
55 AC_MSG_ERROR([Sorry, bison is needed])
58 dnl =============================================================
59 dnl Checks for libraries.
60 AM_GNU_GETTEXT([use-libtool],[need-ngettext])
62 dnl =============================================================
63 dnl Checks for typedefs, structures, and compiler characteristics.
67 AC_CHECK_SIZEOF(void *, 4)
69 dnl ==========================================================
70 dnl Checks for library functions.
71 AC_CHECK_HEADERS(stddef.h stdlib.h string.h)
72 AC_CHECK_FUNCS(setlocale vsnprintf vsprintf)
76 dnl ==========================================================
81 if test "$am_cv_func_iconv" != yes -o "$is_iconv_sane" != yes; then
83 *******************************************************************************
84 You need 'iconv' (with features comparable to what is in glibc 2.2) to use this
85 library, consider installing GNU libiconv or use --with-libiconv-prefix to
86 point to an existing installation of that library (see README)
87 *******************************************************************************
91 AC_MSG_CHECKING(for location of iconv)
92 if test "$am_cv_lib_iconv" = yes; then
93 AC_MSG_RESULT(libiconv)
94 gedcom_LIBICONV_HAS_ANSEL
97 LCS_SUBDIRS=libcharset
98 LCS_INCLUDES='-I $(srcdir)/libcharset'
99 LCS_LIBADD=libcharset/libcharset.la
100 AC_SUBST(LCS_SUBDIRS)
101 AC_SUBST(LCS_INCLUDES)
104 if test "$is_glibc22_iconv" = yes; then
106 is_ansel_supported=yes
111 if test "$is_ansel_supported" != yes; then
113 *******************************************************************************
114 Your iconv implementation doesn't support ANSEL. Consider installing the
115 modified libiconv library if you need ANSEL support in the Gedcom parser
116 library (see README).
117 *******************************************************************************
121 AC_OUTPUT(GNUmakefile
124 gedcom/calendar/Makefile
128 iconv/libiconv/Makefile
130 utf8/libcharset/Makefile