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
|
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.13)
AC_INIT(cconv, 0.6.3, xiaoyjy@gmail.com)
AM_INIT_AUTOMAKE(cconv, 0.6.3)
AC_CONFIG_SRCDIR([cconv.c])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_MACRO_DIR([m4])
# Checks for programs.
AC_PROG_CXX
AC_PROG_CC
# Checks for libraries.
AC_PROG_LIBTOOL
# Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS([stdlib.h string.h unistd.h wchar.h])
# Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_TYPE_SIZE_T
# echo $host_os; may use host_os here.
OS_TYPE="-D"`uname -s`
AC_SUBST(OS_TYPE)
for i in /usr/local/iconv /usr/local /usr; do
(test -f $i/lib/libiconv.so ||\
test -f $i/lib/libiconv.a) && ICONV_DIR=$i && break
done
if test -z "$ICONV_DIR"; then
ICONV_LIBS=""
ICONV_INCLUDES=""
else
ICONV_LIBS="-L$ICONV_DIR/lib -liconv"
ICONV_INCLUDES="-I$ICONV_DIR/include"
fi
AC_SUBST(ICONV_INCLUDES)
AC_SUBST(ICONV_LIBS)
# Checks for library functions.
AC_FUNC_MALLOC
AC_FUNC_MEMCMP
AC_CHECK_FUNCS([memset strncasecmp memcpy])
AC_CONFIG_FILES([Makefile])
AC_OUTPUT
|