… | |
… | |
45 | AC_CHECK_LIB(db-3.1, db_create, LIBS="$LIBS -ldb-3.1", |
45 | AC_CHECK_LIB(db-3.1, db_create, LIBS="$LIBS -ldb-3.1", |
46 | AC_CHECK_LIB(db4, db_create, LIBS="$LIBS -ldb4", |
46 | AC_CHECK_LIB(db4, db_create, LIBS="$LIBS -ldb4", |
47 | AC_MSG_ERROR([No suitable BerkeleyDB library found. |
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. |
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]))))))))) |
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 | |
50 | |
54 | # Checks for header files. |
51 | # Checks for header files. |
55 | |
52 | |
56 | # Checks for typedefs, structures, and compiler characteristics. |
53 | # Checks for typedefs, structures, and compiler characteristics. |
57 | |
54 | |
58 | AC_CONFIG_FILES(Makefile) |
55 | AC_CONFIG_FILES(Makefile) |
59 | |
56 | |
|
|
57 | 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 | |
60 | # Checks for library functions. |
99 | # Checks for library functions. |
61 | AC_OUTPUT |
100 | AC_OUTPUT |