diff options
author | Jason Downs <downsj@downsj.com> | 2008-11-21 21:33:39 +0000 |
---|---|---|
committer | Jason Downs <downsj@downsj.com> | 2008-11-21 21:33:39 +0000 |
commit | 10fe387708ddfba6449b9abd74cfbdf67d495465 (patch) | |
tree | 50115c0708c762940f580d081c73495bf148101a /configure.ac | |
download | gdbm-10fe387708ddfba6449b9abd74cfbdf67d495465.tar.gz gdbm-10fe387708ddfba6449b9abd74cfbdf67d495465.tar.bz2 |
Initial revision
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 89 |
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 | |||
17 | AC_INIT([gdbm], [1.9.0], [bug-gnu-utils@gnu.org]) | ||
18 | AC_PREREQ(2.59) | ||
19 | AC_CONFIG_SRCDIR([src/gdbmdefs.h]) | ||
20 | AC_CONFIG_AUX_DIR([build-aux]) | ||
21 | AC_CONFIG_HEADERS([autoconf.h]) | ||
22 | AM_INIT_AUTOMAKE | ||
23 | AC_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]) | ||
29 | AC_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]) | ||
35 | AC_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]) | ||
41 | AC_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"]) | ||
47 | AC_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"]) | ||
53 | AC_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"]) | ||
59 | AC_PROG_CC | ||
60 | AC_PROG_CPP | ||
61 | AC_PROG_INSTALL | ||
62 | AC_PROG_LIBTOOL | ||
63 | AC_SYS_LARGEFILE | ||
64 | dnl AC_PROG_RANLIB | ||
65 | dnl AC_C_BIGENDIAN([]) | ||
66 | AC_C_CONST | ||
67 | |||
68 | AC_CHECK_HEADERS([stdlib.h string.h sys/file.h unistd.h fcntl.h sys/types.h memory.h]) | ||
69 | |||
70 | AC_CHECK_LIB(dbm, main) | ||
71 | AC_CHECK_LIB(ndbm, main) | ||
72 | AC_CHECK_FUNCS([rename ftruncate flock fsync]) | ||
73 | |||
74 | if test x$mapped_io = xyes | ||
75 | then | ||
76 | AC_FUNC_MMAP() | ||
77 | AC_CHECK_FUNCS([msync]) | ||
78 | fi | ||
79 | AC_TYPE_OFF_T | ||
80 | AC_CHECK_SIZEOF(off_t) | ||
81 | AC_CHECK_MEMBERS([struct stat.st_blksize]) | ||
82 | |||
83 | AC_SUBST(GDBM183_LIBRARY) | ||
84 | AC_SUBST(GDBM183_LIBDIR) | ||
85 | AC_SUBST(GDBM183_INCLUDEDIR) | ||
86 | AM_CONDITIONAL([COMPAT_OPT], [test "$want_compat" = yes]) | ||
87 | AM_CONDITIONAL([ENABLE_EXPORT], [test "$want_export" = yes]) | ||
88 | AC_CONFIG_FILES([Makefile src/Makefile doc/Makefile compat/Makefile export/Makefile]) | ||
89 | AC_OUTPUT | ||