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