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/^[^\.]*\.//' | sed 's/\..*$//'`
15 VERSION_PATCH=`echo $VERSION | sed 's/^[^\.]*\.[^\.]*\.//'`
17 AC_SUBST(VERSION_MAJOR)
18 AC_SUBST(VERSION_MINOR)
19 AC_SUBST(VERSION_PATCH)
28 dnl =============================================================
29 AM_INIT_AUTOMAKE(${NAME},${VERSION})
30 AM_CONFIG_HEADER(config.h)
31 AC_CONFIG_SUBDIRS(utf8)
38 darwin*) AC_MSG_WARN([Disabling smart preprocessing])
39 EXTRA_CFLAGS="-no-cpp-precomp $EXTRA_CFLAGS";;
43 [ --enable-debug Compilation flags to allow debugging [default=yes]],
44 if test $enableval == "yes"
46 EXTRA_CFLAGS="-g $EXTRA_CFLAGS"
48 EXTRA_CFLAGS="-g $EXTRA_CFLAGS"
51 AC_SUBST(EXTRA_CFLAGS)
53 dnl =============================================================
54 dnl Checks for programs.
64 if test "$YACC" = "bison -y"; then
65 AC_MSG_WARN([We'll remove the -y option here])
68 AC_MSG_ERROR([Sorry, bison is needed])
71 dnl =============================================================
72 dnl Checks for libraries.
73 AM_GNU_GETTEXT([use-libtool],[need-ngettext])
75 dnl =============================================================
76 dnl Checks for typedefs, structures, and compiler characteristics.
80 AC_CHECK_SIZEOF(void *, 4)
82 dnl ==========================================================
83 dnl Checks for library functions.
84 AC_CHECK_HEADERS(stddef.h stdlib.h string.h)
85 AC_CHECK_FUNCS(setlocale vsnprintf vsprintf)
87 dnl ==========================================================
93 if test "$am_cv_func_iconv" != yes -o "$is_iconv_sane" != yes; then
95 *******************************************************************************
96 You need 'iconv' (with features comparable to what is in glibc 2.2) to use this
97 library, consider installing GNU libiconv or use --with-libiconv-prefix to
98 point to an existing installation of that library (see README)
99 *******************************************************************************
103 if test "${with_libiconv_prefix+set}" = set; then
104 withval="$with_libiconv_prefix"
106 for dir in `echo "$withval" | tr : ' '`; do
107 if test -d $dir/lib; then ICONV_LIBPATH="$ICONV_LIBPATH -L$dir/lib"; fi
110 ICONV_PATH=`echo "$withval" | tr : '/bin:'`
111 ICONV_PATH="$ICONV_PATH/bin"
113 AC_SUBST(ICONV_LIBPATH)
116 AC_MSG_CHECKING(for location of iconv)
117 if test "$am_cv_lib_iconv" = yes; then
118 AC_MSG_RESULT(libiconv)
119 gedcom_LIBICONV_HAS_ANSEL
123 if test "$is_glibc22_iconv" = yes; then
125 is_ansel_supported=yes
130 if test "$is_ansel_supported" != yes; then
132 *******************************************************************************
133 Your iconv implementation doesn't support ANSEL. Consider installing the
134 modified libiconv library if you need ANSEL support in the Gedcom parser
135 library (see README).
136 *******************************************************************************
140 AC_OUTPUT(GNUmakefile
144 gedcom/calendar/Makefile
148 iconv/libiconv/Makefile