aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorJason Downs <downsj@downsj.com>2008-11-21 21:33:39 +0000
committerJason Downs <downsj@downsj.com>2008-11-21 21:33:39 +0000
commit10fe387708ddfba6449b9abd74cfbdf67d495465 (patch)
tree50115c0708c762940f580d081c73495bf148101a /configure.ac
downloadgdbm-10fe387708ddfba6449b9abd74cfbdf67d495465.tar.gz
gdbm-10fe387708ddfba6449b9abd74cfbdf67d495465.tar.bz2
Initial revision
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac89
1 files changed, 89 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
new file mode 100644
index 0000000..0c4bc2d
--- /dev/null
+++ b/configure.ac
@@ -0,0 +1,89 @@
1# This file is part of GDBM. -*- autoconf -*-
2# Copyright (C) 2007 Free Software Foundation, Inc.
3#
4# GDBM is free software; you can redistribute it and/or modify
5# it under the terms of the GNU General Public License as published by
6# the Free Software Foundation; either version 2, or (at your option)
7# any later version.
8#
9# GDBM is distributed in the hope that it will be useful,
10# but WITHOUT ANY WARRANTY; without even the implied warranty of
11# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12# GNU General Public License for more details.
13#
14# You should have received a copy of the GNU General Public License
15# along with GDBM. If not, see <http://www.gnu.org/licenses/>. */
16
17AC_INIT([gdbm], [1.9.0], [bug-gnu-utils@gnu.org])
18AC_PREREQ(2.59)
19AC_CONFIG_SRCDIR([src/gdbmdefs.h])
20AC_CONFIG_AUX_DIR([build-aux])
21AC_CONFIG_HEADERS([autoconf.h])
22AM_INIT_AUTOMAKE
23AC_ARG_ENABLE([memory-mapped-io],
24 AC_HELP_STRING(
25 [--enable-memory-mapped-io]
26 [Use mmap(2) for disk I/O. (Default is YES.)]),
27 [mapped_io=$enableval],
28 [mapped_io=yes])
29AC_ARG_ENABLE([libgdbm-compat],
30 AC_HELP_STRING(
31 [--enable-libgdbm-compat]
32 [Build and install libgdbm_compat. (Default is NO.)]),
33 [want_compat=$enableval],
34 [want_compat=no])
35AC_ARG_ENABLE([gdbm-export],
36 AC_HELP_STRING(
37 [--enable-gdbm-export],
38 [Build and install gdbmexport with specified gdbm 1.8 library. (Default is NO.)]),
39 [want_export=$enableval],
40 [want_export=no])
41AC_ARG_WITH([gdbm183-library],
42 AC_HELP_STRING(
43 [--with-gdbm183-library],
44 [Build gdbmexport with specified (static) library.]),
45 [GDBM183_LIBRARY=$withval],
46 [GDBM183_LIBRARY="-lgdbm"])
47AC_ARG_WITH([gdbm183-libdir],
48 AC_HELP_STRING(
49 [--with-gdbm183-libdir],
50 [Build gdbmexport with the gdbm library in the specified directory.]),
51 [GDBM183_LIBDIR=$withval],
52 [GDBM183_LIBDIR="/usr/local/lib"])
53AC_ARG_WITH([gdbm183-includedir],
54 AC_HELP_STRING(
55 [--with-gdbm183-includedir],
56 [Build gdbmexport with gdbm.h in the specified directory.]),
57 [GDBM183_INCLUDEDIR=$withval],
58 [GDBM183_INCLUDEDIR="/usr/local/include"])
59AC_PROG_CC
60AC_PROG_CPP
61AC_PROG_INSTALL
62AC_PROG_LIBTOOL
63AC_SYS_LARGEFILE
64dnl AC_PROG_RANLIB
65dnl AC_C_BIGENDIAN([])
66AC_C_CONST
67
68AC_CHECK_HEADERS([stdlib.h string.h sys/file.h unistd.h fcntl.h sys/types.h memory.h])
69
70AC_CHECK_LIB(dbm, main)
71AC_CHECK_LIB(ndbm, main)
72AC_CHECK_FUNCS([rename ftruncate flock fsync])
73
74if test x$mapped_io = xyes
75then
76 AC_FUNC_MMAP()
77 AC_CHECK_FUNCS([msync])
78fi
79AC_TYPE_OFF_T
80AC_CHECK_SIZEOF(off_t)
81AC_CHECK_MEMBERS([struct stat.st_blksize])
82
83AC_SUBST(GDBM183_LIBRARY)
84AC_SUBST(GDBM183_LIBDIR)
85AC_SUBST(GDBM183_INCLUDEDIR)
86AM_CONDITIONAL([COMPAT_OPT], [test "$want_compat" = yes])
87AM_CONDITIONAL([ENABLE_EXPORT], [test "$want_export" = yes])
88AC_CONFIG_FILES([Makefile src/Makefile doc/Makefile compat/Makefile export/Makefile])
89AC_OUTPUT

Return to:

Send suggestions and report system problems to the System administrator.