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 if test "${with_libiconv_prefix+set}" = set; then
102 withval="$with_libiconv_prefix"
104 for dir in `echo "$withval" | tr : ' '`; do
105 if test -d $dir/lib; then ICONV_LIBPATH="$ICONV_LIBPATH -L$dir/lib"; fi
108 ICONV_PATH=`echo "$withval" | tr : '/bin:'`
109 ICONV_PATH="$ICONV_PATH/bin"
113 AC_MSG_CHECKING(for location of iconv)
114 if test "$am_cv_lib_iconv" = yes; then
115 AC_MSG_RESULT(libiconv)
116 gedcom_LIBICONV_HAS_ANSEL
120 if test "$is_glibc22_iconv" = yes; then
122 is_ansel_supported=yes
127 if test "$is_ansel_supported" != yes; then
129 *******************************************************************************
130 Your iconv implementation doesn't support ANSEL. Consider installing the
131 modified libiconv library if you need ANSEL support in the Gedcom parser
132 library (see README).
133 *******************************************************************************
138 darwin*) # Hack to get correct locale_charset() function
139 LDFLAGS="$ICONV_LIBPATH -liconv $LDFLAGS";;
142 AC_OUTPUT(GNUmakefile
146 gedcom/calendar/Makefile
150 iconv/libiconv/Makefile