File: db.m4

package info (click to toggle)
mpack 1.6-19
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,300 kB
  • sloc: ansic: 8,791; sh: 330; makefile: 25; perl: 25
file content (40 lines) | stat: -rw-r--r-- 870 bytes parent folder | download | duplicates (12)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
dnl $Id: db.m4,v 1.1 2001/04/04 17:58:30 shadow Exp $
dnl
dnl tests for various db libraries
dnl
AC_DEFUN([rk_DB],[berkeley_db=db
AC_ARG_WITH(berkeley-db,
[  --without-berkeley-db   if you don't want berkeley db],[
if test "$withval" = no; then
	berkeley_db=""
fi
])
if test "$berkeley_db"; then
  AC_CHECK_HEADERS([				\
	db.h					\
	db_185.h				\
  ])
fi

AC_FIND_FUNC_NO_LIBS2(dbopen, $berkeley_db, [
#include <stdio.h>
#if defined(HAVE_DB_185_H)
#include <db_185.h>
#elif defined(HAVE_DB_H)
#include <db.h>
#endif
],[NULL, 0, 0, 0, NULL])

AC_FIND_FUNC_NO_LIBS(dbm_firstkey, $berkeley_db gdbm ndbm)
AC_FIND_FUNC_NO_LIBS(db_create, $berkeley_db)

DBLIB="$LIB_dbopen"
if test "$LIB_dbopen" != "$LIB_db_create"; then
        DBLIB="$DBLIB $LIB_db_create"
fi
if test "$LIB_dbopen" != "$LIB_dbm_firstkey"; then
	DBLIB="$DBLIB $LIB_dbm_firstkey"
fi
AC_SUBST(DBLIB)dnl

])