1 dnl Process this file with autoconf to produce a configure script.
2 dnl $Id: configure.in,v 1.15 2008/11/27 20:33:44 mrsam Exp $
4 dnl Copyright 1998 - 1999 Double Precision, Inc. See COPYING for
5 dnl distribution information.
7 AC_INIT(gdbmobj, 0.10, [courier-users@lists.sourceforge.net])
9 >confdefs.h # Kill PACKAGE_ macros
11 AC_CONFIG_SRCDIR(gdbmobj.c)
12 AM_INIT_AUTOMAKE([foreign no-define])
13 AM_CONFIG_HEADER(config.h)
15 dnl Checks for programs.
16 AC_USE_SYSTEM_EXTENSIONS
23 dnl Checks for libraries.
26 AC_CHECK_LIB(gdbm, gdbm_open, [ LIBGDBM=-lgdbm ; LIBS="-lgdbm $LIBS" ])
28 AC_CHECK_FUNC(gdbm_open, FOUND_GDBM=1, FOUND_GDBM=0)
30 if test "$FOUND_GDBM" = 1
32 AC_CHECK_FUNCS(gdbm_fdesc)
34 AC_CHECK_HEADERS(unistd.h fcntl.h)
40 AM_CONDITIONAL(FOUND_GDBM, test "$FOUND_GDBM" = 1)
42 dnl Checks for header files.
44 dnl Checks for typedefs, structures, and compiler characteristics.
48 dnl Checks for library functions.
51 AC_CACHE_CHECK([if the C++ compiler needs -fhandle-exceptions],
52 ac_cv_need_handlexceptions,
57 ], ac_cv_need_handlexceptions=no,
58 ac_cv_need_handlexceptions=yes)
61 if test "$ac_cv_need_handlexceptions" = "yes"
67 CXXFLAGS="-fhandle-exceptions $CXXFLAGS"
68 CXXFLAGS=`echo "$CXXFLAGS" | sed 's/-O2//'`