ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/cvsroot/libcpjit/configure.ac
Revision: 1.4
Committed: Tue Oct 11 22:06:24 2005 UTC (18 years, 9 months ago) by root
Branch: MAIN
Changes since 1.3: +42 -3 lines
Log Message:
*** empty log message ***

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 root 1.1
51     # Checks for header files.
52    
53     # Checks for typedefs, structures, and compiler characteristics.
54    
55     AC_CONFIG_FILES(Makefile)
56    
57 root 1.4 AH_BOTTOM([
58    
59     #if SIZEOF_CHAR == 1
60     # define TYPE_INT8 char
61     #else
62     # error no 8-bit type found
63     #endif
64    
65     #if SIZEOF_SHORT == 2
66     # define TYPE_INT16 short
67     #elif SIZEOF_INT == 2
68     # define TYPE_INT16 int
69     #else
70     # error no 16-bit type found
71     #endif
72    
73     #if SIZEOF_INT == 4
74     # define TYPE_INT32 int
75     #elif SIZEOF_LONG == 4
76     # define TYPE_INT32 long
77     #else
78     # error no 32-bit type found
79     #endif
80    
81     #if SIZEOF_INT == 8
82     # define TYPE_INT64 short
83     #elif SIZEOF_LONG == 8
84     # define TYPE_INT64 long
85     #elif SIZEOF_LONG_LONG == 8
86     # define TYPE_INT64 long long
87     #else
88     # error no 64-bit type found
89     #endif
90    
91     ])
92    
93     AC_CHECK_SIZEOF(char)
94     AC_CHECK_SIZEOF(short)
95     AC_CHECK_SIZEOF(int)
96     AC_CHECK_SIZEOF(long)
97     AC_CHECK_SIZEOF(long long)
98    
99 root 1.1 # Checks for library functions.
100     AC_OUTPUT