1# $Id: options.m4,v 12.8 2008/03/20 03:53:54 mjc Exp $ 2 3# Process user-specified options. 4AC_DEFUN(AM_OPTIONS_SET, [ 5 6# --enable-bigfile was the configuration option that Berkeley DB used before 7# autoconf 2.50 was released (which had --enable-largefile integrated in). 8AC_ARG_ENABLE(bigfile, 9 [AC_HELP_STRING([--disable-bigfile], 10 [Obsolete; use --disable-largefile instead.])], 11 [AC_MSG_ERROR( 12 [--enable-bigfile no longer supported, use --enable-largefile])]) 13 14AC_MSG_CHECKING(if --disable-cryptography option specified) 15AC_ARG_ENABLE(cryptography, 16 AC_HELP_STRING([--disable-cryptography], 17 [Do not build database cryptography support.]),, enableval="yes") 18db_cv_build_cryptography="$enableval" 19case "$enableval" in 20 no) AC_MSG_RESULT(yes);; 21yes) AC_MSG_RESULT(no);; 22esac 23 24AC_MSG_CHECKING(if --disable-hash option specified) 25AC_ARG_ENABLE(hash, 26 AC_HELP_STRING([--disable-hash], 27 [Do not build Hash access method.]),, enableval="yes") 28db_cv_build_hash="$enableval" 29case "$enableval" in 30 no) AC_MSG_RESULT(yes);; 31yes) AC_MSG_RESULT(no);; 32esac 33 34AC_MSG_CHECKING(if --disable-mutexsupport option specified) 35AC_ARG_ENABLE(mutexsupport, 36 AC_HELP_STRING([--disable-mutexsupport], 37 [Do not build any mutex support.]),, enableval="yes") 38db_cv_build_mutexsupport="$enableval" 39case "$enableval" in 40 no) AC_MSG_RESULT(yes);; 41yes) AC_MSG_RESULT(no);; 42esac 43 44AC_MSG_CHECKING(if --disable-queue option specified) 45AC_ARG_ENABLE(queue, 46 AC_HELP_STRING([--disable-queue], 47 [Do not build Queue access method.]),, enableval="yes") 48db_cv_build_queue="$enableval" 49case "$enableval" in 50 no) AC_MSG_RESULT(yes);; 51yes) AC_MSG_RESULT(no);; 52esac 53 54AC_MSG_CHECKING(if --disable-replication option specified) 55AC_ARG_ENABLE(replication, 56 AC_HELP_STRING([--disable-replication], 57 [Do not build database replication support.]),, enableval="yes") 58db_cv_build_replication="$enableval" 59case "$enableval" in 60 no) AC_MSG_RESULT(yes);; 61yes) AC_MSG_RESULT(no);; 62esac 63 64AC_MSG_CHECKING(if --disable-statistics option specified) 65AC_ARG_ENABLE(statistics, 66 AC_HELP_STRING([--disable-statistics], 67 [Do not build statistics support.]),, enableval="yes") 68db_cv_build_statistics="$enableval" 69case "$enableval" in 70 no) AC_MSG_RESULT(yes);; 71yes) AC_MSG_RESULT(no);; 72esac 73 74AC_MSG_CHECKING(if --disable-verify option specified) 75AC_ARG_ENABLE(verify, 76 AC_HELP_STRING([--disable-verify], 77 [Do not build database verification support.]),, enableval="yes") 78db_cv_build_verify="$enableval" 79case "$enableval" in 80 no) AC_MSG_RESULT(yes);; 81yes) AC_MSG_RESULT(no);; 82esac 83 84AC_MSG_CHECKING(if --enable-compat185 option specified) 85AC_ARG_ENABLE(compat185, 86 [AC_HELP_STRING([--enable-compat185], 87 [Build DB 1.85 compatibility API.])], 88 [db_cv_compat185="$enable_compat185"], [db_cv_compat185="no"]) 89AC_MSG_RESULT($db_cv_compat185) 90 91AC_MSG_CHECKING(if --enable-cxx option specified) 92AC_ARG_ENABLE(cxx, 93 [AC_HELP_STRING([--enable-cxx], 94 [Build C++ API.])], 95 [db_cv_cxx="$enable_cxx"], [db_cv_cxx="no"]) 96AC_MSG_RESULT($db_cv_cxx) 97 98AC_MSG_CHECKING(if --enable-debug option specified) 99AC_ARG_ENABLE(debug, 100 [AC_HELP_STRING([--enable-debug], 101 [Build a debugging version.])], 102 [db_cv_debug="$enable_debug"], [db_cv_debug="no"]) 103AC_MSG_RESULT($db_cv_debug) 104 105AC_MSG_CHECKING(if --enable-debug_rop option specified) 106AC_ARG_ENABLE(debug_rop, 107 [AC_HELP_STRING([--enable-debug_rop], 108 [Build a version that logs read operations.])], 109 [db_cv_debug_rop="$enable_debug_rop"], [db_cv_debug_rop="no"]) 110AC_MSG_RESULT($db_cv_debug_rop) 111 112AC_MSG_CHECKING(if --enable-debug_wop option specified) 113AC_ARG_ENABLE(debug_wop, 114 [AC_HELP_STRING([--enable-debug_wop], 115 [Build a version that logs write operations.])], 116 [db_cv_debug_wop="$enable_debug_wop"], [db_cv_debug_wop="no"]) 117AC_MSG_RESULT($db_cv_debug_wop) 118 119AC_MSG_CHECKING(if --enable-diagnostic option specified) 120AC_ARG_ENABLE(diagnostic, 121 [AC_HELP_STRING([--enable-diagnostic], 122 [Build a version with run-time diagnostics.])], 123 [db_cv_diagnostic="$enable_diagnostic"], [db_cv_diagnostic="no"]) 124if test "$db_cv_diagnostic" = "yes"; then 125 AC_MSG_RESULT($db_cv_diagnostic) 126fi 127if test "$db_cv_diagnostic" = "no" -a "$db_cv_debug_rop" = "yes"; then 128 db_cv_diagnostic="yes" 129 AC_MSG_RESULT([by --enable-debug_rop]) 130fi 131if test "$db_cv_diagnostic" = "no" -a "$db_cv_debug_wop" = "yes"; then 132 db_cv_diagnostic="yes" 133 AC_MSG_RESULT([by --enable-debug_wop]) 134fi 135if test "$db_cv_diagnostic" = "no"; then 136 AC_MSG_RESULT($db_cv_diagnostic) 137fi 138 139AC_MSG_CHECKING(if --enable-dump185 option specified) 140AC_ARG_ENABLE(dump185, 141 [AC_HELP_STRING([--enable-dump185], 142 [Build db_dump185(1) to dump 1.85 databases.])], 143 [db_cv_dump185="$enable_dump185"], [db_cv_dump185="no"]) 144AC_MSG_RESULT($db_cv_dump185) 145 146AC_MSG_CHECKING(if --enable-java option specified) 147AC_ARG_ENABLE(java, 148 [AC_HELP_STRING([--enable-java], 149 [Build Java API.])], 150 [db_cv_java="$enable_java"], [db_cv_java="no"]) 151AC_MSG_RESULT($db_cv_java) 152 153AC_MSG_CHECKING(if --enable-mingw option specified) 154AC_ARG_ENABLE(mingw, 155 [AC_HELP_STRING([--enable-mingw], 156 [Build Berkeley DB for MinGW.])], 157 [db_cv_mingw="$enable_mingw"], [db_cv_mingw="no"]) 158AC_MSG_RESULT($db_cv_mingw) 159 160AC_MSG_CHECKING(if --enable-o_direct option specified) 161AC_ARG_ENABLE(o_direct, 162 [AC_HELP_STRING([--enable-o_direct], 163 [Enable the O_DIRECT flag for direct I/O.])], 164 [db_cv_o_direct="$enable_o_direct"], [db_cv_o_direct="no"]) 165AC_MSG_RESULT($db_cv_o_direct) 166 167AC_MSG_CHECKING(if --enable-posixmutexes option specified) 168AC_ARG_ENABLE(posixmutexes, 169 [AC_HELP_STRING([--enable-posixmutexes], 170 [Force use of POSIX standard mutexes.])], 171 [db_cv_posixmutexes="$enable_posixmutexes"], [db_cv_posixmutexes="no"]) 172AC_MSG_RESULT($db_cv_posixmutexes) 173 174AC_ARG_ENABLE(pthread_self, 175 [AC_HELP_STRING([--enable-pthread_self], 176 [Obsolete; use --enable-pthread_api instead.])], 177 [AC_MSG_ERROR( 178 [--enable-pthread_self no longer supported, use --enable-pthread_api])]) 179 180AC_MSG_CHECKING(if --enable-pthread_api option specified) 181AC_ARG_ENABLE(pthread_api, 182 [AC_HELP_STRING([--enable-pthread_api], 183 [Configure Berkeley DB for POSIX pthread API.])], 184 [db_cv_pthread_api="$enable_pthread_api"], [db_cv_pthread_api="no"]) 185# POSIX mutexes implies other POSIX APIs. 186if test "$db_cv_posixmutexes" != "no"; then 187 db_cv_pthread_api="yes" 188fi 189AC_MSG_RESULT($db_cv_pthread_api) 190AH_TEMPLATE(HAVE_PTHREAD_API, 191 [Define to 1 to configure Berkeley DB for POSIX pthread API.]) 192if test "$db_cv_pthread_api" = "yes"; then 193 AC_DEFINE(HAVE_PTHREAD_API) 194fi 195 196AC_MSG_CHECKING(if --enable-rpc option specified) 197AC_ARG_ENABLE(rpc, 198 [AC_HELP_STRING([--enable-rpc], 199 [Build RPC client/server.])], 200 [db_cv_rpc="$enable_rpc"], [db_cv_rpc="no"]) 201AC_MSG_RESULT($db_cv_rpc) 202 203AC_MSG_CHECKING(if --enable-smallbuild option specified) 204AC_ARG_ENABLE(smallbuild, 205 [AC_HELP_STRING([--enable-smallbuild], 206 [Build small footprint version of the library.])], 207 [db_cv_smallbuild="$enable_smallbuild"], [db_cv_smallbuild="no"]) 208if test "$db_cv_smallbuild" = "yes"; then 209 db_cv_build_cryptography="no" 210 db_cv_build_hash="no" 211 db_cv_build_queue="no" 212 db_cv_build_replication="no" 213 db_cv_build_statistics="no" 214 db_cv_build_verify="no" 215fi 216AC_MSG_RESULT($db_cv_smallbuild) 217 218AC_MSG_CHECKING(if --enable-tcl option specified) 219AC_ARG_ENABLE(tcl, 220 [AC_HELP_STRING([--enable-tcl], 221 [Build Tcl API.])], 222 [db_cv_tcl="$enable_tcl"], [db_cv_tcl="no"]) 223AC_MSG_RESULT($db_cv_tcl) 224 225AC_MSG_CHECKING(if --enable-test option specified) 226AC_ARG_ENABLE(test, 227 [AC_HELP_STRING([--enable-test], 228 [Configure to run the test suite.])], 229 [db_cv_test="$enable_test"], [db_cv_test="no"]) 230AC_MSG_RESULT($db_cv_test) 231 232AC_MSG_CHECKING(if --enable-uimutexes option specified) 233AC_ARG_ENABLE(uimutexes, 234 [AC_HELP_STRING([--enable-uimutexes], 235 [Force use of Unix International mutexes.])], 236 [db_cv_uimutexes="$enable_uimutexes"], [db_cv_uimutexes="no"]) 237AC_MSG_RESULT($db_cv_uimutexes) 238 239AC_MSG_CHECKING(if --enable-umrw option specified) 240AC_ARG_ENABLE(umrw, 241 [AC_HELP_STRING([--enable-umrw], 242 [Mask harmless uninitialized memory read/writes.])], 243 [db_cv_umrw="$enable_umrw"], [db_cv_umrw="no"]) 244AC_MSG_RESULT($db_cv_umrw) 245 246AC_MSG_CHECKING(if --with-mutex=MUTEX option specified) 247AC_ARG_WITH(mutex, 248 [AC_HELP_STRING([--with-mutex=MUTEX], 249 [Select non-default mutex implementation.])], 250 [with_mutex="$withval"], [with_mutex="no"]) 251if test "$with_mutex" = "yes"; then 252 AC_MSG_ERROR([--with-mutex requires a mutex name argument]) 253fi 254if test "$with_mutex" != "no"; then 255 db_cv_mutex="$with_mutex" 256fi 257AC_MSG_RESULT($with_mutex) 258 259# --with-mutexalign=ALIGNMENT was the configuration option that Berkeley DB 260# used before the DbEnv::mutex_set_align method was added. 261AC_ARG_WITH(mutexalign, 262 [AC_HELP_STRING([--with-mutexalign=ALIGNMENT], 263 [Obsolete; use DbEnv::mutex_set_align instead.])], 264 [AC_MSG_ERROR( 265 [--with-mutexalign no longer supported, use DbEnv::mutex_set_align])]) 266 267AC_MSG_CHECKING([if --with-tcl=DIR option specified]) 268AC_ARG_WITH(tcl, 269 [AC_HELP_STRING([--with-tcl=DIR], 270 [Directory location of tclConfig.sh.])], 271 [with_tclconfig="$withval"], [with_tclconfig="no"]) 272AC_MSG_RESULT($with_tclconfig) 273if test "$with_tclconfig" != "no"; then 274 db_cv_tcl="yes" 275fi 276 277AC_MSG_CHECKING([if --with-uniquename=NAME option specified]) 278AC_ARG_WITH(uniquename, 279 [AC_HELP_STRING([--with-uniquename=NAME], 280 [Build a uniquely named library.])], 281 [with_uniquename="$withval"], [with_uniquename="no"]) 282if test "$with_uniquename" = "no"; then 283 db_cv_uniquename="no" 284 DB_VERSION_UNIQUE_NAME="" 285 AC_MSG_RESULT($with_uniquename) 286else 287 db_cv_uniquename="yes" 288 if test "$with_uniquename" = "yes"; then 289 DB_VERSION_UNIQUE_NAME="__EDIT_DB_VERSION_UNIQUE_NAME__" 290 else 291 DB_VERSION_UNIQUE_NAME="$with_uniquename" 292 fi 293 AC_MSG_RESULT($DB_VERSION_UNIQUE_NAME) 294fi 295 296# Test requires Tcl 297if test "$db_cv_test" = "yes"; then 298 if test "$db_cv_tcl" = "no"; then 299 AC_MSG_ERROR([--enable-test requires --enable-tcl]) 300 fi 301fi]) 302