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)
29 AC_CONFIG_SUBDIRS(utf8)
36 darwin*) AC_MSG_WARN([Disabling smart preprocessing])
37 EXTRA_CFLAGS="-no-cpp-precomp $EXTRA_CFLAGS";;
41 [ --enable-debug Compilation flags to allow debugging [default=yes]],
42 if test $enableval == "yes"
44 EXTRA_CFLAGS="-g $EXTRA_CFLAGS"
46 EXTRA_CFLAGS="-g $EXTRA_CFLAGS"
49 AC_SUBST(EXTRA_CFLAGS)
51 dnl =============================================================
52 dnl Checks for programs.
62 if test "$YACC" = "bison -y"; then
63 AC_MSG_WARN([We'll remove the -y option here])
66 AC_MSG_ERROR([Sorry, bison is needed])
69 dnl =============================================================
70 dnl Checks for libraries.
71 AM_GNU_GETTEXT([use-libtool],[need-ngettext])
73 dnl =============================================================
74 dnl Checks for typedefs, structures, and compiler characteristics.
78 AC_CHECK_SIZEOF(void *, 4)
80 dnl ==========================================================
81 dnl Checks for library functions.
82 AC_CHECK_HEADERS(stddef.h stdlib.h string.h)
83 AC_CHECK_FUNCS(setlocale vsnprintf vsprintf)
85 dnl ==========================================================
91 if test "$am_cv_func_iconv" != yes -o "$is_iconv_sane" != yes; then
93 *******************************************************************************
94 You need 'iconv' (with features comparable to what is in glibc 2.2) to use this
95 library, consider installing GNU libiconv or use --with-libiconv-prefix to
96 point to an existing installation of that library (see README)
97 *******************************************************************************
101 AC_MSG_CHECKING(for location of iconv)
102 if test "$am_cv_lib_iconv" = yes; then
103 AC_MSG_RESULT(libiconv)
104 gedcom_LIBICONV_HAS_ANSEL
108 if test "$is_glibc22_iconv" = yes; then
110 is_ansel_supported=yes
115 if test "$is_ansel_supported" != yes; then
117 *******************************************************************************
118 Your iconv implementation doesn't support ANSEL. Consider installing the
119 modified libiconv library if you need ANSEL support in the Gedcom parser
120 library (see README).
121 *******************************************************************************
125 AC_OUTPUT(GNUmakefile
129 gedcom/calendar/Makefile
133 iconv/libiconv/Makefile