📄 configure.ac
字号:
EMBEDIX_ECD_CXX='<OPTION db-extra>\ TYPE=bool\ DEFAULT_VALUE=1\ PROMPT=Include BerkeleyDB C++ library?\ <KEEPLIST>\ /usr/include/db_cxx.h\ /usr/lib/libdb_cxx-@DB_VERSION_MAJOR@.@DB_VERSION_MINOR@.so\ </KEEPLIST>\ <PROVIDES>\ libdb_cxx-@DB_VERSION_MAJOR@.@DB_VERSION_MINOR@.so\ </PROVIDES>\ <REQUIRES>\ ld-linux.so.2\ libc.so.6\ </REQUIRES>\ STATIC_SIZE=0\ STORAGE_SIZE=523612\ STARTUP_TIME=0\ </OPTION>'fi# Optional Java API.if test "$db_cv_java" = "yes"; then # Java requires shared libraries. if test "$enable_shared" = "no"; then AC_MSG_ERROR([Java requires shared libraries]) fi AC_PROG_JAVAC AC_PROG_JAR AC_JNI_INCLUDE_DIR for JNI_INCLUDE_DIR in $JNI_INCLUDE_DIRS do CPPFLAGS="$CPPFLAGS -I$JNI_INCLUDE_DIR" done ADDITIONAL_LANG="$ADDITIONAL_LANG java" INSTALL_LIBS="$INSTALL_LIBS \$(libjso_target)"else JAVAC=nojavacfi# Optional RPC client/server.if test "$db_cv_rpc" = "yes"; then AC_DEFINE(HAVE_RPC) AH_TEMPLATE(HAVE_RPC, [Define to 1 if building RPC client/server.]) RPC_CLIENT_OBJS="\$(RPC_CLIENT_OBJS)" ADDITIONAL_PROGS="berkeley_db_svc $ADDITIONAL_PROGS" EMBEDIX_ECD_RPC="/usr/bin/berkeley_db_svc" case "$host_os" in hpux*) AC_CHECK_FUNC(svc_run,, AC_CHECK_LIB(nsl, svc_run, LIBS="-lnsl $LIBS"; LIBTSO_LIBS="-lnsl $LIBTSO_LIBS"));; solaris*) AC_CHECK_FUNC(svc_run,, AC_CHECK_LIB(nsl, svc_run));; esacfiAM_TCL_LOAD# Optional crypto support.if test -d "$srcdir/../crypto"; then AC_DEFINE(HAVE_CRYPTO) AH_TEMPLATE(HAVE_CRYPTO, [Define to 1 if Berkeley DB release includes strong cryptography.]) ADDITIONAL_OBJS="aes_method${o} crypto${o} mt19937db${o} rijndael-alg-fst${o} rijndael-api-fst${o} $ADDITIONAL_OBJS"fi# Optional DB 1.85 compatibility API.if test "$db_cv_compat185" = "yes"; then ADDITIONAL_INCS="db_185.h $ADDITIONAL_INCS" ADDITIONAL_OBJS="db185${o} $ADDITIONAL_OBJS"fi# Optional utilities.if test "$db_cv_dump185" = "yes"; then ADDITIONAL_PROGS="db_dump185 $ADDITIONAL_PROGS"fi# Checks for compiler characteristics.AC_C_CONST# Checks for include files, structures, C types.AC_HEADER_STATAC_HEADER_TIMEAC_HEADER_DIRENTAC_CHECK_HEADERS(sys/select.h sys/time.h)AC_CHECK_MEMBERS([struct stat.st_blksize])AM_TYPESAC_CACHE_CHECK([for ANSI C exit success/failure values], db_cv_exit_defines, [AC_TRY_COMPILE([#include <stdlib.h>], return (EXIT_SUCCESS);, [db_cv_exit_defines=yes], [db_cv_exit_defines=no])])if test "$db_cv_exit_defines" = yes; then AC_DEFINE(HAVE_EXIT_SUCCESS) AH_TEMPLATE(HAVE_EXIT_SUCCESS, [Define to 1 if you have EXIT_SUCCESS/EXIT_FAILURE #defines.])fi# Test for various functions/libraries that the test and example programs use:# sched_yield function# pthreads, socket and math librariesAC_CHECK_FUNC(sched_yield,, AC_SEARCH_LIBS(sched_yield, rt, LOAD_LIBS="$LOAD_LIBS -lrt"))# XXX# We can't check for pthreads in the same way we did the test for sched_yield# because the Solaris C library includes pthread interfaces which are not# thread-safe. For that reason we always add -lpthread if we find a pthread# library. Also we can't depend on any specific call existing (pthread_create,# for example), as it may be #defined in an include file -- OSF/1 (Tru64) has# this problem.AC_HAVE_LIBRARY(pthread, LOAD_LIBS="$LOAD_LIBS -lpthread")# XXX# We could be more exact about whether these libraries are needed, but we don't# bother -- if they exist, we load them.AC_HAVE_LIBRARY(m, LOAD_LIBS="$LOAD_LIBS -lm")AC_HAVE_LIBRARY(socket, LOAD_LIBS="$LOAD_LIBS -lsocket")AC_HAVE_LIBRARY(nsl, LOAD_LIBS="$LOAD_LIBS -lnsl")# Check for mutexes.# We do this here because it changes $LIBS.AM_DEFINE_MUTEXES# Checks for system functions for which we have replacements.## XXX# The only portable getcwd call is getcwd(char *, size_t), where the# buffer is non-NULL -- Solaris can't handle a NULL buffer, and they# deleted getwd().AC_REPLACE_FUNCS(getcwd getopt memcmp memcpy memmove raise)AC_REPLACE_FUNCS(snprintf strcasecmp strdup strerror vsnprintf)# Check for system functions we optionally use.AC_CHECK_FUNCS(_fstati64 clock_gettime directio gettimeofday getuid)AC_CHECK_FUNCS(pstat_getdynamic sched_yield select strtoul sysconf yield)# Checks for system functions for which we don't have replacements.# We require qsort(3).AC_CHECK_FUNCS(qsort, , AC_MSG_ERROR([No qsort library function.]))# Pread/pwrite.# HP-UX has pread/pwrite, but it doesn't work with largefile support.case "$host_os" inhpux*) AC_MSG_WARN([pread/pwrite interfaces ignored on $host_os.]);;*) AC_CHECK_FUNCS(pread pwrite)esac# Check for fcntl(2) to deny child process access to file descriptors.AC_CACHE_CHECK([for fcntl/F_SETFD], db_cv_fcntl_f_setfd, [AC_TRY_LINK([#include <sys/types.h>#include <fcntl.h>], [ fcntl(1, F_SETFD, 1);], [db_cv_fcntl_f_setfd=yes], [db_cv_fcntl_f_setfd=no])])if test "$db_cv_fcntl_f_setfd" = yes; then AC_DEFINE(HAVE_FCNTL_F_SETFD) AH_TEMPLATE(HAVE_FCNTL_F_SETFD, [Define to 1 if fcntl/F_SETFD denies child access to file descriptors.])fi# A/UX has a broken getopt(3).case "$host_os" inaux*) ADDITIONAL_OBJS="getopt${o} $ADDITIONAL_OBJS";;esac# Linux has the O_DIRECT flag, but you can't actually use it.AC_CACHE_CHECK([for open/O_DIRECT], db_cv_open_o_direct, [echo "test for working open/O_DIRECT" > __o_direct_fileAC_TRY_RUN([#include <sys/types.h>#include <fcntl.h>main() {int c, fd = open("__o_direct_file", O_RDONLY | O_DIRECT, 0);exit ((fd == -1) || (read(fd, &c, 1) != 1));}], [db_cv_open_o_direct=yes], [db_cv_open_o_direct=no],AC_TRY_LINK([#include <sys/types.h> #include <fcntl.h>], [ open("__o_direct_file", O_RDONLY | O_DIRECT, 0);], [db_cv_open_o_direct=yes], [db_cv_open_o_direct=no]))rm -f __o_direct_file])if test "$db_cv_open_o_direct" = yes; then AC_DEFINE(HAVE_O_DIRECT) AH_TEMPLATE(HAVE_O_DIRECT, [Define to 1 if you have the O_DIRECT flag.])fi# Check for largefile support.AC_SYS_LARGEFILE# Figure out how to create shared regions.## First, we look for mmap.## BSD/OS has mlock(2), but it doesn't work until the 4.1 release.## Nextstep (version 3.3) apparently supports mmap(2) (the mmap symbol# is defined in the C library) but does not support munmap(2). Don't# try to use mmap if we can't find munmap.## Ultrix has mmap(2), but it doesn't work.mmap_ok=nocase "$host_os" inbsdi3*|bsdi4.0) AC_MSG_WARN([mlock(2) interface ignored on BSD/OS 3.X and 4.0.]) mmap_ok=yes AC_CHECK_FUNCS(mmap munmap, , mmap_ok=no);;ultrix*) AC_MSG_WARN([mmap(2) interface ignored on Ultrix.]);;*) mmap_ok=yes AC_CHECK_FUNCS(mlock munlock) AC_CHECK_FUNCS(mmap munmap, , mmap_ok=no);;esac# Second, we look for shmget.## SunOS has the shmget(2) interfaces, but there appears to be a missing# #include <debug/debug.h> file, so we ignore them.shmget_ok=nocase "$host_os" insunos*) AC_MSG_WARN([shmget(2) interface ignored on SunOS.]);;*) shmget_ok=yes AC_CHECK_FUNCS(shmget, , shmget_ok=no);;esac# We require either mmap/munmap(2) or shmget(2).if test "$mmap_ok" = no -a "$shmget_ok" = no; then AC_MSG_WARN([Neither mmap/munmap(2) or shmget(2) library functions.])fi# If we're not doing version name substitution, DB_VERSION_UNIQUE_NAME# needs to be erased.if test "$db_cv_uniquename" = "no"; then DB_VERSION_UNIQUE_NAME=""fi# This is necessary so that .o files in LIBOBJS are also built via# the ANSI2KNR-filtering rules.LIB@&t@OBJS=`echo "$LIB@&t@OBJS" | sed 's,\.[[^.]]* ,$U&,g;s,\.[[^.]]*$,$U&,'`LTLIBOBJS=`echo "$LIB@&t@OBJS" | sed "s,\.[[^.]]* ,$o ,g;s,\.[[^.]]*$,$o,"`AC_SUBST(LTLIBOBJS)# Initial output file list.CREATE_LIST="Makefile db_cxx.h:$srcdir/../dbinc/db_cxx.in db_int.h:$srcdir/../dbinc/db_int.in include.tcl:$srcdir/../test/include.tcl"# Create the db.h file from a source file, a list of global function# prototypes, and, if configured for unique names, a list of #defines# to do DB_VERSION_UNIQUE_NAME substitution.if test "$db_cv_uniquename" = "yes"; then CREATE_LIST="$CREATE_LIST db.h:$srcdir/../dbinc/db.in:$srcdir/../dbinc_auto/rpc_defs.in:$srcdir/../dbinc_auto/ext_def.in:$srcdir/../dbinc_auto/ext_prot.in"else CREATE_LIST="$CREATE_LIST db.h:$srcdir/../dbinc/db.in:$srcdir/../dbinc_auto/rpc_defs.in:$srcdir/../dbinc_auto/ext_prot.in"fi# If configured for unique names, create the db_int_uext.h file (which# does the DB_VERSION_UNIQUE_NAME substitution), which is included by# the db_int.h file.if test "$db_cv_uniquename" = "yes"; then CREATE_LIST="$CREATE_LIST db_int_def.h:$srcdir/../dbinc_auto/int_def.in" db_int_def='#include "db_int_def.h"'fi# Create the db_185.h and db185_int.h files from source files, a list of# global function prototypes, and, if configured for unique names, a list# of #defines to do DB_VERSION_UNIQUE_NAME substitution.if test "$db_cv_compat185" = "yes"; then if test "$db_cv_uniquename" = "yes"; then CREATE_LIST="$CREATE_LIST db_185.h:$srcdir/../dbinc/db_185.in:$srcdir/../dbinc_auto/ext_185_def.in:$srcdir/../dbinc_auto/ext_185_prot.in db185_int.h:$srcdir/../db185/db185_int.in:$srcdir/../dbinc_auto/ext_185_def.in:$srcdir/../dbinc_auto/ext_185_prot.in" else CREATE_LIST="$CREATE_LIST db_185.h:$srcdir/../dbinc/db_185.in:$srcdir/../dbinc_auto/ext_185_prot.in db185_int.h:$srcdir/../db185/db185_int.in:$srcdir/../dbinc_auto/ext_185_prot.in" fifiif test "$db_cv_embedix" = "yes"; then CREATE_LIST="$CREATE_LIST db.ecd:../dist/db.ecd.in"fiif test "$db_cv_rpm" = "yes"; then CREATE_LIST="$CREATE_LIST db.spec:../dist/db.spec.in"fiAC_CONFIG_FILES($CREATE_LIST)AC_OUTPUT
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -