Add settings for --with-site-includes=PATH and
[chise/concord.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(concord, 0.0.1, chise-en@m17n.org)
6 AC_CONFIG_SRCDIR(concord.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         LIBS="-ldb $LIBS"
32 fi
33 )
34
35 AC_ARG_WITH(site_libraries,
36   --with-site-libraries=PATH List of directories to search first for libraries
37 ,
38 for dir in `echo "$with_site_libraries"|sed 's/:/ /'`
39 do
40     SITE_LIBS="$SITE_LIBS -L$dir"
41 done
42 LIBS=`echo "$SITE_LIBS $LIBS"|sed 's/^  *//'`
43 ,
44 if test -f /sw/include/db3/db.h; then
45         LIBS="-L/sw/lib -ldb-3 $LIBS"
46 elif test -f /sw/include/db4/db.h; then
47         LIBS="-L/sw/lib -ldb-4 $LIBS"
48 else
49         LIBS="-ldb $LIBS"
50 fi
51 )
52
53 # Checks for libraries.
54 LIBS="-ldb $LIBS"
55
56 # Checks for header files.
57
58 # Checks for typedefs, structures, and compiler characteristics.
59 AC_C_CONST
60 AC_C_INLINE
61
62 # Checks for library functions.
63 AC_FUNC_ALLOCA
64 AC_FUNC_STRNLEN
65
66 AC_CHECK_FUNCS(strnlen)
67
68 AC_CONFIG_FILES([Makefile])
69 AC_OUTPUT