1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83
|
dnl Process this file with autoconf to produce a configure script.
AC_INIT
AC_CONFIG_SRCDIR([src/debug.h])
AM_INIT_AUTOMAKE(vilistextum, 2.6.9)
AC_CONFIG_HEADERS([config.h])
dnl Set current date
AC_DEFINE_UNQUOTED(RELEASEDATE, "22.10.2006", "Release date of the program")
dnl Checks for programs.
AC_PROG_CC
AC_PATH_PROG(KAPTAIN, kaptain, no)
AC_C_CHAR_UNSIGNED
dnl check for #! (shebang)
AC_SYS_INTERPRETER
dnl Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS(getopt.h)
dnl add /usr/local
CFLAGS="$CFLAGS -I/usr/local/include"
LDFLAGS="$LDFLAGS -L/usr/local/lib"
dnl checking for options
AC_MSG_CHECKING(if --enable-multibyte specified)
AC_ARG_ENABLE(multibyte,
AS_HELP_STRING(--enable-multibyte,Enable multibyte support.),
[use_multibyte=$enableval], [use_multibyte=no])
AC_MSG_RESULT($use_multibyte)
if test "$use_multibyte" = "yes"; then
AC_DEFINE(MULTIBYTE, 1, "Enable multibyte support (e.g. unicode, shift_jis)")
fi
dnl Checks for libraries.
if test "$use_multibyte" = "yes"; then
AC_CHECK_HEADERS(iconv.h,,
AC_MSG_ERROR(Need libiconv or iconv.h for multibyte support))
AC_CHECK_LIB(iconv, iconv,,
AC_MSG_WARN([Generic iconv found but not libiconv. See INSTALL for details]))
dnl setting INTERNAL_LOCALE
AC_MSG_CHECKING(for unicode locale)
DEFAULT_LOCALE=`locale -a | grep -i 'utf.*8$' | sed -e '2,$D'`
AC_MSG_RESULT("$DEFAULT_LOCALE")
AC_MSG_CHECKING(if --with-unicode-locale specified)
AC_ARG_WITH(unicode-locale,
[ --with-unicode-locale=LOCALE use this LOCALE instead of $DEFAULT_LOCALE],
AC_MSG_RESULT(yes) ;
INTERNAL_LOCALE="$with_unicode_locale" ;
AC_DEFINE_UNQUOTED(INTERNAL_LOCALE, "$with_unicode_locale", [preferred Unicode set]),
AC_MSG_RESULT(no) ;
INTERNAL_LOCALE="$DEFAULT_LOCALE" ;
AC_DEFINE_UNQUOTED(INTERNAL_LOCALE, "$DEFAULT_LOCALE", [preferred Unicode set]))
if test "$INTERNAL_LOCALE" = ""; then
AC_MSG_ERROR(Couldn't find utf-8 encoding. Use --with-unicode-locale.)
fi
fi
dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
dnl Checks for library functions.
AC_CHECK_FUNCS(strstr)
AC_CHECK_FUNCS(strcasecmp)
dnl create testsuite
dnl AC_CONFIG_TESTDIR([tests])
dnl AC_CONFIG_FILES([tests/Makefile tests/atlocal])
dnl AM_MISSING_PROG([AUTOM4TE], [autom4te])
AC_CONFIG_FILES([doc/Makefile
src/Makefile
tests/Makefile
Makefile])
AC_OUTPUT
|