update.
[chise/libchise.git] / configure.in
1 #                                               -*- Autoconf -*-
2 # Process this file with autoconf to produce a configure script.
3
4 AC_PREREQ(2.57)
5 AC_INIT(libchise, 0.5.0, chise-en@lists.chise.org)
6 AC_CONFIG_SRCDIR(chise.c)
7 AC_CONFIG_HEADER(config.h)
8
9 AC_CANONICAL_TARGET
10
11 # Checks for programs.
12 AC_PROG_CC
13 AC_PROG_LIBTOOL
14 #  AC_CHECK_PROGS(LIBTOOL, glibtool libtool, libtool, \
15 #       /usr/local/bin:/opt/bin:/sw/bin:/usr/bin:/bin)
16
17 # Settings for optional paths
18 AC_ARG_WITH(site_includes,
19   --with-site-includes=PATH List of directories to search first for header files
20 ,
21 for dir in `echo "$with_site_includes"|sed 's/:/ /'`
22 do
23     SITE_INCLUDES_CFLAGS="$SITE_INCLUDES_CFLAGS -I$dir"
24 done
25 CFLAGS=`echo "$SITE_INCLUDES_CFLAGS $CFLAGS"|sed 's/^  *//'`
26 ,
27 if test -f /sw/include/db3/db.h; then
28         CFLAGS="-I/sw/include/db3 $CFLAGS"
29 elif test -f /sw/include/db4/db.h; then
30         CFLAGS="-I/sw/include/db4 $CFLAGS"
31 fi
32 )
33
34 AC_ARG_WITH(site_libraries,
35   --with-site-libraries=PATH List of directories to search first for libraries
36 ,
37 for dir in `echo "$with_site_libraries"|sed 's/:/ /'`
38 do
39     SITE_LIBS="$SITE_LIBS -L$dir"
40 done
41 LIBS=`echo "$SITE_LIBS $LIBS"|sed 's/^  *//'`
42 )
43
44 # Checks for libraries.
45 AC_CHECK_LIB(concord,concord_open_env,
46         , AC_MSG_ERROR(Please install Concord Ver.0.9 or later.))
47
48 # Checks for header files.
49
50 # Checks for typedefs, structures, and compiler characteristics.
51 AC_C_CONST
52 AC_C_INLINE
53
54 # Checks for library functions.
55 AC_FUNC_ALLOCA
56 AC_FUNC_STRNLEN
57
58 AC_CHECK_FUNCS(strnlen)
59
60 AC_CONFIG_FILES([Makefile])
61 AC_OUTPUT