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])
63 dnl == Make statically linked test program for dmalloc tests
64 if test "$with_dmalloc" = "yes"; then
65 EXTRA_PROGS=gomtest_static
69 dnl =============================================================
70 dnl Checks for typedefs, structures, and compiler characteristics.
74 AC_CHECK_SIZEOF(void *, 4)
76 dnl ==========================================================
77 dnl Checks for library functions.
78 AC_CHECK_HEADERS(stddef.h stdlib.h string.h)
79 AC_CHECK_FUNCS(setlocale vsnprintf vsprintf)
83 dnl ==========================================================
88 if test "$am_cv_func_iconv" != yes -o "$is_iconv_sane" != yes; then
90 *******************************************************************************
91 You need 'iconv' (with features comparable to what is in glibc 2.2) to use this
92 library, consider installing GNU libiconv or use --with-libiconv-prefix to
93 point to an existing installation of that library (see README)
94 *******************************************************************************
98 AC_MSG_CHECKING(for location of iconv)
99 if test "$am_cv_lib_iconv" = yes; then
100 AC_MSG_RESULT(libiconv)
101 gedcom_LIBICONV_HAS_ANSEL
104 LCS_SUBDIRS=libcharset
105 LCS_INCLUDES='-I $(srcdir)/libcharset'
106 LCS_LIBADD=libcharset/libcharset.la
107 AC_SUBST(LCS_SUBDIRS)
108 AC_SUBST(LCS_INCLUDES)
111 if test "$is_glibc22_iconv" = yes; then
113 is_ansel_supported=yes
118 if test "$is_ansel_supported" != yes; then
120 *******************************************************************************
121 Your iconv implementation doesn't support ANSEL. Consider installing the
122 modified libiconv library if you need ANSEL support in the Gedcom parser
123 library (see README).
124 *******************************************************************************
128 AC_OUTPUT(GNUmakefile
131 gedcom/calendar/Makefile
135 iconv/libiconv/Makefile
137 utf8/libcharset/Makefile