# Process this file with autoconf to produce a configure script. # $Id$ # $Name$ AC_INIT(utf8.c) dnl ============================================================= dnl Global variables NAME=libutf8tools AC_SUBST(NAME) VERSION=0.1.0 AC_SUBST(VERSION) LIBVERSION=0:1 AC_SUBST(LIBVERSION) SHELL=/bin/sh AC_SUBST(SHELL) dnl ============================================================= AM_INIT_AUTOMAKE(${NAME},${VERSION}) AM_CONFIG_HEADER(config.h) AC_CANONICAL_HOST EXTRA_CFLAGS="" AC_ARG_ENABLE(debug, [ --enable-debug Compilation flags to allow debugging [default=yes]], if test $enableval == "yes" then EXTRA_CFLAGS="-g $EXTRA_CFLAGS" fi, EXTRA_CFLAGS="-g $EXTRA_CFLAGS" ) AC_SUBST(EXTRA_CFLAGS) dnl ============================================================= dnl Checks for programs. AC_PROG_CC AM_PROG_LIBTOOL AC_PROG_AWK AC_PROG_INSTALL AC_PROG_LN_S AC_PROG_MAKE_SET AC_PROG_RANLIB dnl ============================================================= dnl Checks for typedefs, structures, and compiler characteristics. AC_C_CONST AC_C_INLINE AC_TYPE_SIZE_T AC_CHECK_SIZEOF(void *, 4) dnl ========================================================== dnl Checks for library functions. AC_CHECK_HEADERS(stddef.h stdlib.h string.h) AC_CHECK_FUNCS(setlocale vsnprintf vsprintf) jm_LANGINFO_CODESET jm_GLIBC21 dnl ========================================================== dnl My local stuff AM_ICONV if test "$am_cv_func_iconv" != yes; then AC_MSG_ERROR([ ******************************************************************************* You need 'iconv' (with features comparable to what is in glibc 2.2) to use this library, consider installing GNU libiconv or use --with-libiconv-prefix to point to an existing installation of that library (see README) ******************************************************************************* ]) fi AC_MSG_CHECKING(for location of iconv) if test "$am_cv_lib_iconv" = yes; then AC_MSG_RESULT(libiconv) else AC_MSG_RESULT(libc) LCS_SUBDIRS=libcharset LCS_INCLUDES='-I $(srcdir)/libcharset' LCS_LIBADD=libcharset/libcharset.la AC_SUBST(LCS_SUBDIRS) AC_SUBST(LCS_INCLUDES) AC_SUBST(LCS_LIBADD) fi AC_OUTPUT(Makefile doc/Makefile libcharset/Makefile)