d9898ee8 |
1 | dnl Process this file with autoconf to produce a configure script. |
2 | dnl $Id: configure.in,v 1.14 2007/02/26 02:56:37 mrsam Exp $ |
3 | dnl |
4 | dnl Copyright 1998 - 1999 Double Precision, Inc. See COPYING for |
5 | dnl distribution information. |
6 | |
7 | AC_INIT(gdbmobj, 0.10, [courier-users@lists.sourceforge.net]) |
8 | |
9 | >confdefs.h # Kill PACKAGE_ macros |
10 | |
11 | AC_CONFIG_SRCDIR(gdbmobj.c) |
12 | AM_INIT_AUTOMAKE([foreign no-define]) |
13 | AM_CONFIG_HEADER(config.h) |
14 | |
15 | dnl Checks for programs. |
16 | AC_PROG_CC |
17 | AC_AIX |
18 | AC_MINIX |
19 | AC_ISC_POSIX |
20 | AC_PROG_AWK |
21 | AC_PROG_CXX |
22 | AC_PROG_LIBTOOL |
23 | |
24 | dnl Checks for libraries. |
25 | |
26 | saveLIBS="$LIBS" |
27 | AC_CHECK_LIB(gdbm, gdbm_open, [ LIBGDBM=-lgdbm ; LIBS="-lgdbm $LIBS" ]) |
28 | |
29 | AC_CHECK_FUNC(gdbm_open, FOUND_GDBM=1, FOUND_GDBM=0) |
30 | |
31 | if test "$FOUND_GDBM" = 1 |
32 | then |
33 | AC_CHECK_FUNCS(gdbm_fdesc) |
34 | fi |
35 | AC_CHECK_HEADERS(unistd.h fcntl.h) |
36 | |
37 | LIBS="$saveLIBS" |
38 | |
39 | AC_SUBST(LIBGDBM) |
40 | |
41 | AM_CONDITIONAL(FOUND_GDBM, test "$FOUND_GDBM" = 1) |
42 | |
43 | dnl Checks for header files. |
44 | |
45 | dnl Checks for typedefs, structures, and compiler characteristics. |
46 | AC_C_CONST |
47 | AC_TYPE_SIZE_T |
48 | |
49 | dnl Checks for library functions. |
50 | |
51 | AC_LANG_CPLUSPLUS |
52 | AC_CACHE_CHECK([if the C++ compiler needs -fhandle-exceptions], |
53 | ac_cxx_need_handlexceptions, |
54 | |
55 | AC_TRY_COMPILE([], |
56 | [ |
57 | throw; |
58 | ], ac_cxx_need_handlexceptions=no, |
59 | ac_cxx_need_handlexceptions=yes) |
60 | ) |
61 | |
62 | if test "$ac_cxx_need_handlexceptions" = "yes" |
63 | then |
64 | case "$CXXFLAGS" in |
65 | *handle-exceptions*) |
66 | ;; |
67 | *) |
68 | CXXFLAGS="-fhandle-exceptions $CXXFLAGS" |
69 | CXXFLAGS=`echo "$CXXFLAGS" | sed 's/-O2//'` |
70 | ;; |
71 | esac |
72 | fi |
73 | |
74 | AC_OUTPUT(Makefile) |