(LDFLAGS): New variable.
[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.9.0, chise-en@lists.chise.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/db5/db.h; then
28         CFLAGS="-I/sw/include/db5 $CFLAGS"
29 elif test -f /sw/include/db4/db.h; then
30         CFLAGS="-I/sw/include/db4 $CFLAGS"
31 elif test -f /sw/include/db3/db.h; then
32         CFLAGS="-I/sw/include/db3 $CFLAGS"
33 fi
34 )
35
36 AC_ARG_WITH(site_libraries,
37   --with-site-libraries=PATH List of directories to search first for libraries
38 ,
39 for dir in `echo "$with_site_libraries"|sed 's/:/ /'`
40 do
41     SITE_LIBS="$SITE_LIBS -L$dir"
42 done
43 LIBS=`echo "$SITE_LIBS $LIBS"|sed 's/^  *//'`
44 LIBS="-ldb $LIBS"
45 ,
46 if test -f /sw/include/db5/db.h; then
47         LIBS="-L/sw/lib -ldb-5 $LIBS"
48 elif test -f /sw/include/db4/db.h; then
49         LIBS="-L/sw/lib -ldb-4 $LIBS"
50 elif test -f /sw/include/db3/db.h; then
51         LIBS="-L/sw/lib -ldb-3 $LIBS"
52 else
53         LIBS="-ldb $LIBS"
54 fi
55 )
56
57 # Checks for libraries.
58
59 # Checks for header files.
60
61 # Checks for typedefs, structures, and compiler characteristics.
62 AC_C_CONST
63 AC_C_INLINE
64
65 AC_CHECK_SIZEOF(int)
66 AC_CHECK_SIZEOF(long)
67 AC_CHECK_SIZEOF(long long)
68 AC_CHECK_SIZEOF(void *)
69
70 # Checks for library functions.
71 AC_FUNC_ALLOCA
72 AC_FUNC_STRNLEN
73 if test "x$ac_cv_func_strnlen_working" = "xyes"; then
74     AC_DEFINE([HAVE_STRNLEN])
75 fi
76
77 AC_CONFIG_FILES([Makefile])
78 AC_OUTPUT