ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/cvsroot/libcpjit/configure.ac
Revision: 1.3
Committed: Tue Oct 11 20:51:38 2005 UTC (18 years, 9 months ago) by root
Branch: MAIN
Changes since 1.2: +40 -0 lines
Log Message:
added berkeley db autoconf

File Contents

# User Rev Content
1 root 1.1 # -*- Autoconf -*-
2     # Process this file with autoconf to produce a configure script.
3    
4     AC_PREREQ(2.59)
5     AC_INIT(libcpjit, 0, libcpjit@schmorp.de)
6     AC_CONFIG_SRCDIR([cpjit.h])
7     AC_CONFIG_HEADER([config.h])
8    
9     # Checks for programs.
10 root 1.2 AC_PROG_CXX
11 root 1.1
12     # Checks for libraries.
13 root 1.3 AC_ARG_WITH(db,
14     [ --with-db=PATH Specify path to BerkelyDB install directory ],
15     [
16     if test "x$withval" != "xno" ; then
17     if test -d "$withval/lib"; then
18     LDFLAGS="-L${withval}/lib $LDFLAGS"
19     else
20     LDFLAGS="-L${withval} $LDFLAGS"
21     fi
22     if test -d "$withval/include"; then
23     CPPFLAGS="-I${withval}/include $CPPFLAGS"
24     else
25     CPPFLAGS="-I${withval} $CPPFLAGS"
26     fi
27     fi
28     ],
29     [
30     AC_EGREP_HEADER([DB_VERSION_MAJOR *3|4], [db.h],,
31     AC_MSG_ERROR([No suitable BerkeleyDB db.h header file found.
32     Use --with-db=PATH to specify the path to a version 3 or later install directory.
33     You can download BerkeleyDB from http://www.sleepycat.com]
34     )
35     )
36     ]
37     )
38    
39     AC_TRY_LINK_FUNC(db_create,,
40     AC_CHECK_LIB(db-4, db_create, LIBS="$LIBS -ldb-4",
41     AC_CHECK_LIB(db-3, db_create, LIBS="$LIBS -ldb-3",
42     AC_CHECK_LIB(db-2, db_create, LIBS="$LIBS -ldb-2",
43     AC_CHECK_LIB(db, db_create, LIBS="$LIBS -ldb",
44     AC_CHECK_LIB(db3, db_create, LIBS="$LIBS -ldb3",
45     AC_CHECK_LIB(db-3.1, db_create, LIBS="$LIBS -ldb-3.1",
46     AC_CHECK_LIB(db4, db_create, LIBS="$LIBS -ldb4",
47     AC_MSG_ERROR([No suitable BerkeleyDB library found.
48     Use --with-db=PATH to specify the path to a version 3 or later install directory.
49     You can download BerkeleyDB from http://www.sleepycat.com])))))))))
50     AC_MSG_CHECKING(BerkeleyDB)
51     AC_TRY_LINK_FUNC(db_create, AC_DEFINE([USE_DB]) have_database=1)
52     AC_MSG_RESULT(ok)
53 root 1.1
54     # Checks for header files.
55    
56     # Checks for typedefs, structures, and compiler characteristics.
57    
58     AC_CONFIG_FILES(Makefile)
59    
60     # Checks for library functions.
61     AC_OUTPUT