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";;
40 [ --enable-debug Compilation flags to allow debugging [default=yes]],
41 if test $enableval == "yes"
43 EXTRA_CFLAGS="-g $EXTRA_CFLAGS"
45 EXTRA_CFLAGS="-g $EXTRA_CFLAGS"
48 AC_SUBST(EXTRA_CFLAGS)
50 dnl =============================================================
51 dnl Checks for programs.
61 if test "$YACC" = "bison -y"; then
62 AC_MSG_WARN([We'll remove the -y option here])
65 AC_MSG_ERROR([Sorry, bison is needed])
68 dnl =============================================================
69 dnl Checks for libraries.
70 AM_GNU_GETTEXT([use-libtool],[need-ngettext])
72 dnl =============================================================
73 dnl Checks for typedefs, structures, and compiler characteristics.
77 AC_CHECK_SIZEOF(void *, 4)
79 dnl ==========================================================
80 dnl Checks for library functions.
81 AC_CHECK_HEADERS(stddef.h stdlib.h string.h)
82 AC_CHECK_FUNCS(setlocale vsnprintf vsprintf)
86 dnl ==========================================================
92 if test "$am_cv_func_iconv" != yes -o "$is_iconv_sane" != yes; then
94 *******************************************************************************
95 You need 'iconv' (with features comparable to what is in glibc 2.2) to use this
96 library, consider installing GNU libiconv or use --with-libiconv-prefix to
97 point to an existing installation of that library (see README)
98 *******************************************************************************
102 AC_MSG_CHECKING(for location of iconv)
103 if test "$am_cv_lib_iconv" = yes; then
104 AC_MSG_RESULT(libiconv)
105 gedcom_LIBICONV_HAS_ANSEL
108 LCS_SUBDIRS=libcharset
109 LCS_INCLUDES='-I $(srcdir)/libcharset'
110 LCS_LIBADD=libcharset/libcharset.la
111 AC_SUBST(LCS_SUBDIRS)
112 AC_SUBST(LCS_INCLUDES)
115 if test "$is_glibc22_iconv" = yes; then
117 is_ansel_supported=yes
122 if test "$is_ansel_supported" != yes; then
124 *******************************************************************************
125 Your iconv implementation doesn't support ANSEL. Consider installing the
126 modified libiconv library if you need ANSEL support in the Gedcom parser
127 library (see README).
128 *******************************************************************************
132 AC_OUTPUT(GNUmakefile
135 gedcom/calendar/Makefile
139 iconv/libiconv/Makefile
141 utf8/libcharset/Makefile