1dnl AUTOCONF configuration for Gdbm
2dnl Copyright (C) 2007  Masayuki Onjo <onjo@lispuser.net>
3dnl Copyright (C) 2007-2009, 2018  Sam Steingold <sds@gnu.org>
4dnl This is Free Software, distributed under the GNU GPL v2+
5
6AC_PREREQ(2.57)
7AC_INIT(gdbm, 1.0, clisp-list)
8AC_CONFIG_SRCDIR(gdbm.lisp)
9AC_CONFIG_HEADERS(config.h)
10
11RSE_BOLD
12BOLD_MSG([Gdbm (Common)])
13CL_MODULE_COMMON_CHECKS()
14
15dnl Search for libgdbm and define LIBGDBM, INCGDBM.
16AC_LIB_LINKFLAGS([gdbm])
17
18BOLD_MSG([Gdbm (Headers)])
19AC_CHECK_HEADERS(gdbm.h gdbm/gdbm.h, break)
20if test "$ac_cv_header_gdbm_h" = "no" -a "$ac_cv_header_gdbm_gdbm_h" = "no";
21then AC_MSG_ERROR([cannot find Gdbm headers])
22fi
23
24BOLD_MSG([Gdbm (Functions)])
25AC_LIB_APPENDTOVAR([LIBS], [$LIBGDBM])
26AC_SEARCH_LIBS(gdbm_open, gdbm)
27if test "$ac_cv_search_gdbm_open" = "no"; then
28  AC_MSG_ERROR([cannot find Gdbm library])
29fi
30AC_CHECK_FUNCS(gdbm_open gdbm_close gdbm_fdesc gdbm_store gdbm_fetch dnl
31gdbm_delete gdbm_firstkey gdbm_nextkey gdbm_reorganize gdbm_sync dnl
32gdbm_exists gdbm_setopt gdbm_count)
33
34BOLD_MSG([Gdbm (Output)])
35AC_CONFIG_FILES(Makefile link.sh)
36AC_OUTPUT
37
38BOLD_MSG([Gdbm (Done)])
39