source: trunk/third/rpm/db/dist/configure.ac @ 19079

Revision 19079, 18.1 KB checked in by ghudson, 22 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r19078, which included commits to RCS files with non-trunk default branches.
Line 
1# Id: configure.ac,v 11.156 2002/09/04 13:51:17 bostic Exp
2# Process this file with autoconf to produce a configure script.
3
4PACKAGE=db
5AC_INIT(Berkeley DB,
6        __EDIT_DB_VERSION__, support@sleepycat.com, db-__EDIT_DB_VERSION__)
7AC_CONFIG_SRCDIR([../db/db.c])
8AC_CONFIG_HEADER(db_config.h:config.hin)
9
10# Configure setup.
11AC_CANONICAL_HOST()
12AC_ARG_PROGRAM()
13
14# We cannot build in the top-level directory.
15AC_MSG_CHECKING(if building in the top-level directory)
16[ test -d db_archive ] && AC_MSG_ERROR([
17Berkeley DB cannot be built in the top-level distribution directory.])
18AC_MSG_RESULT(no)
19
20# Substitution variables.
21AC_SUBST(ADDITIONAL_INCS)
22AC_SUBST(ADDITIONAL_LANG)
23AC_SUBST(ADDITIONAL_OBJS)
24AC_SUBST(ADDITIONAL_PROGS)
25AC_SUBST(BUILD_TARGET)
26AC_SUBST(CFLAGS)
27AC_SUBST(CONFIGURATION_ARGS)
28AC_SUBST(CONFIGURATION_PATH)
29AC_SUBST(CPPFLAGS)
30AC_SUBST(CXX)
31AC_SUBST(CXXFLAGS)
32AC_SUBST(DEFAULT_LIB)
33AC_SUBST(DEFAULT_LIB_CXX)
34AC_SUBST(EMBEDIX_ECD_CXX)
35AC_SUBST(EMBEDIX_ECD_RPC)
36AC_SUBST(EMBEDIX_ROOT)
37AC_SUBST(INSTALLER)
38AC_SUBST(INSTALL_LIBS)
39AC_SUBST(INSTALL_TARGET)
40AC_SUBST(JAR)
41AC_SUBST(JAVACFLAGS)
42AC_SUBST(LDFLAGS)
43AC_SUBST(LIBJSO_LIBS)
44AC_SUBST(LIBS)
45AC_SUBST(LIBSO_LIBS)
46AC_SUBST(LIBTOOL)
47AC_SUBST(LIBTSO_LIBS)
48AC_SUBST(LIBXSO_LIBS)
49AC_SUBST(LOAD_LIBS)
50AC_SUBST(MAKEFILE_CC)
51AC_SUBST(MAKEFILE_CCLINK)
52AC_SUBST(MAKEFILE_CXX)
53AC_SUBST(MAKEFILE_CXXLINK)
54AC_SUBST(MAKEFILE_SOLINK)
55AC_SUBST(MAKEFILE_XSOLINK)
56AC_SUBST(POSTLINK)
57AC_SUBST(RPC_CLIENT_OBJS)
58AC_SUBST(RPM_POST_INSTALL)
59AC_SUBST(RPM_POST_UNINSTALL)
60AC_SUBST(SOFLAGS)
61AC_SUBST(db_cv_path_embedix_install)
62AC_SUBST(db_cv_path_rpm_archive)
63AC_SUBST(db_int_def)
64AC_SUBST(o)
65
66# RPM needs the current absolute path.
67# RPM needs the list of original arguments, but we don't include the RPM
68# option itself.
69CONFIGURATION_PATH=${PWD-`pwd`}
70CONFIGURATION_ARGS=`echo "$*" |
71    sed -e 's/--with-embedix[[^ ]]*//' -e 's/--with-rpm[[^ ]]*//'`
72
73# Set the version.
74AM_VERSION_SET
75
76# Set the default installation location.
77AC_PREFIX_DEFAULT(/usr/local/BerkeleyDB.@DB_VERSION_MAJOR@.@DB_VERSION_MINOR@)
78
79# Process all options before using them.
80AM_OPTIONS_SET
81
82# Set some #defines based on configuration options.
83if test "$db_cv_diagnostic" = yes; then
84        AC_DEFINE(DIAGNOSTIC)
85        AH_TEMPLATE(DIAGNOSTIC,
86    [Define to 1 if you want a version with run-time diagnostic checking.])
87fi
88if test "$db_cv_debug_rop" = yes; then
89        AC_DEFINE(DEBUG_ROP)
90        AH_TEMPLATE(DEBUG_ROP,
91    [Define to 1 if you want a version that logs read operations.])
92fi
93if test "$db_cv_debug_wop" = yes; then
94        AC_DEFINE(DEBUG_WOP)
95        AH_TEMPLATE(DEBUG_WOP,
96    [Define to 1 if you want a version that logs write operations.])
97fi
98if test "$db_cv_umrw" = yes; then
99        AC_DEFINE(UMRW)
100        AH_TEMPLATE(UMRW,
101    [Define to 1 to mask harmless unitialized memory read/writes.])
102
103fi
104if test "$db_cv_test" = yes; then
105        AC_DEFINE(CONFIG_TEST)
106        AH_TEMPLATE(CONFIG_TEST,
107    [Define to 1 if you want to build a version for running the test suite.])
108fi
109
110# Check for programs used in building and installation.
111AM_PROGRAMS_SET
112AC_PROG_INSTALL
113
114# RPM/Embedix support: change the standard make and install targets
115if test "$db_cv_rpm" = "yes"; then
116        BUILD_TARGET="rpm_build"
117        echo "topdir: $CONFIGURATION_PATH" > rpmrc
118        if test "$db_cv_embedix" = "yes"; then
119                EMBEDIX_ROOT="/usr"
120                INSTALL_TARGET="embedix_install"
121        else
122                INSTALL_TARGET="rpm_install"
123        fi
124else
125        BUILD_TARGET="library_build"
126        INSTALL_TARGET="library_install"
127fi
128
129# This is where we handle stuff that autoconf can't handle: compiler,
130# preprocessor and load flags, libraries that the standard tests don't
131# look for.  The default optimization is -O.  We would like to set the
132# default optimization for systems using gcc to -O2, but we can't.  By
133# the time we know we're using gcc, it's too late to set optimization
134# flags.
135#
136# There are additional libraries we need for some compiler/architecture
137# combinations.
138#
139# Some architectures require DB to be compiled with special flags and/or
140# libraries for threaded applications
141#
142# The makefile CC may be different than the CC used in config testing,
143# because the makefile CC may be set to use $(LIBTOOL).
144#
145# XXX
146# Don't override anything if it's already set from the environment.
147optimize_def="-O"
148case "$host_os" in
149aix4.3.*|aix5*)
150        optimize_def="-O2"
151        CC=${CC-"xlc_r"}
152        CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE"
153        LDFLAGS="$LDFLAGS -Wl,-brtl";;
154bsdi3*) optimize_def="-O2"
155        CC=${CC-"shlicc2"}
156        LIBS="$LIBS -lipc";;
157bsdi*)  optimize_def="-O2";;
158freebsd*)
159        optimize_def="-O2"
160        CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE"
161        LDFLAGS="$LDFLAGS -pthread";;
162hpux*)  CPPFLAGS="$CPPFLAGS -D_REENTRANT";;
163irix*)  optimize_def="-O2"
164        CPPFLAGS="$CPPFLAGS -D_SGI_MP_SOURCE";;
165linux*) optimize_def="-O2"
166        CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE -D_REENTRANT";;
167mpeix*) CPPFLAGS="$CPPFLAGS -D_POSIX_SOURCE -D_SOCKET_SOURCE"
168        LIBS="$LIBS -lsocket -lsvipc";;
169osf*)   CPPFLAGS="$CPPFLAGS -D_REENTRANT"
170        LDFLAGS="$LDFLAGS -pthread";;
171*qnx)   AC_DEFINE(HAVE_QNX)
172        AH_TEMPLATE(HAVE_QNX, [Define to 1 if building on QNX.]);;
173solaris*)
174        CPPFLAGS="$CPPFLAGS -D_REENTRANT";;
175esac
176
177# Set CFLAGS/CXXFLAGS.  We MUST set the flags before we call autoconf
178# compiler configuration macros, because if we don't, they set CFLAGS
179# to no optimization and -g, which isn't what we want.
180CFLAGS=${CFLAGS-$optimize_def}
181CXXFLAGS=${CXXFLAGS-"$CFLAGS"}
182
183# If the user wants a debugging environment, add -g to the CFLAGS value.
184#
185# XXX
186# Some compilers can't mix optimizing and debug flags.  The only way to
187# handle this is to specify CFLAGS in the environment before configuring.
188if test "$db_cv_debug" = yes; then
189        AC_DEFINE(DEBUG)
190        AH_TEMPLATE(DEBUG, [Define to 1 if you want a debugging version.])
191
192        CFLAGS="$CFLAGS -g"
193        CXXFLAGS="$CXXFLAGS -g"
194fi
195
196# The default compiler is cc (NOT gcc), the default CFLAGS is as specified
197# above, NOT what is set by AC_PROG_CC, as it won't set optimization flags
198# for any compiler other than gcc.
199AC_PROG_CC(cc gcc)
200
201# Because of shared library building, the ${CC} used for config tests
202# may be different than the ${CC} we want to put in the Makefile.
203# The latter is known as ${MAKEFILE_CC} in this script.
204MAKEFILE_CC="${CC}"
205MAKEFILE_CCLINK="${CC}"
206MAKEFILE_CXX="nocxx"
207MAKEFILE_CXXLINK="nocxx"
208
209# See if we need the C++ compiler at all.  If so, we'd like to find one that
210# interoperates with the C compiler we chose.  Since we prefered cc over gcc,
211# we'll also prefer the vendor's compiler over g++/gcc.  If we're wrong, the
212# user can set CC and CXX in their environment before running configure.
213#
214# AC_PROG_CXX sets CXX, but it uses $CXX and $CCC (in that order) as its
215# first choices.
216if test "$db_cv_cxx" = "yes"; then
217        if test "$GCC" != "yes"; then
218                case "$host_os" in
219                aix*)           AC_CHECK_TOOL(CCC, xlC_r)
220                                LIBXSO_LIBS="-lC_r $LIBXSO_LIBS"
221                                LIBS="-lC_r $LIBS";;
222                hpux*)          AC_CHECK_TOOL(CCC, aCC);;
223                irix*)          AC_CHECK_TOOL(CCC, CC);;
224                osf*)           AC_CHECK_TOOL(CCC, cxx);;
225                solaris*)       AC_CHECK_TOOL(CCC, CC);;
226                esac
227        fi
228        AC_PROG_CXX
229        AC_CXX_HAVE_STDHEADERS
230        MAKEFILE_CXX="${CXX}"
231        MAKEFILE_CXXLINK="${CXX}"
232fi
233
234# Do some gcc specific configuration.
235AC_GCC_CONFIG1
236AC_GCC_CONFIG2
237
238# We need the -Kthread/-pthread flag when compiling on SCO/Caldera's UnixWare
239# and OpenUNIX releases.  We can't make the test until we know which compiler
240# we're using.
241case "$host_os" in
242sysv5UnixWare*|sysv5OpenUNIX8*)
243        if test "$GCC" == "yes"; then
244                CPPFLAGS="$CPPFLAGS -pthread"
245                LDFLAGS="$LDFLAGS -pthread"
246        else
247                CPPFLAGS="$CPPFLAGS -Kthread"
248                LDFLAGS="$LDFLAGS -Kthread"
249        fi;;
250esac
251
252# Export our compiler preferences for the libtool configuration.
253export CC CCC
254CCC=CXX
255
256# Libtool configuration.
257AC_PROG_LIBTOOL
258
259LIBTOOL="\$(SHELL) ./libtool"
260SOFLAGS="-rpath \$(libdir)"
261
262# Set SOSUFFIX and friends
263SOSUFFIX_CONFIG
264MODSUFFIX_CONFIG
265JMODSUFFIX_CONFIG
266
267INSTALLER="\$(LIBTOOL) --mode=install cp -p"
268
269MAKEFILE_CC="\$(LIBTOOL) --mode=compile ${MAKEFILE_CC}"
270MAKEFILE_SOLINK="\$(LIBTOOL) --mode=link ${MAKEFILE_CCLINK} -avoid-version"
271MAKEFILE_CCLINK="\$(LIBTOOL) --mode=link ${MAKEFILE_CCLINK}"
272MAKEFILE_CXX="\$(LIBTOOL) --mode=compile ${MAKEFILE_CXX}"
273MAKEFILE_XSOLINK="\$(LIBTOOL) --mode=link ${MAKEFILE_CXXLINK} -avoid-version"
274MAKEFILE_CXXLINK="\$(LIBTOOL) --mode=link ${MAKEFILE_CXXLINK}"
275
276# Configure for shared libraries, static libraries, or both.  If both are
277# configured, build the utilities and example programs with shared versions.
278#
279# $o is set to ".o" or ".lo", and is the file suffix used in the Makefile
280# instead of .o
281if test "$enable_shared" = "no"; then
282        DEFAULT_LIB="\$(libdb)"
283        POSTLINK="@true"
284        o=".o"
285fi
286if test "$enable_shared" = "yes"; then
287        DEFAULT_LIB="\$(libso_target)"
288        POSTLINK="\$(LIBTOOL) --mode=execute true"
289        o=".lo"
290fi
291INSTALL_LIBS="$DEFAULT_LIB"
292
293# Optional C++ API.
294if test "$db_cv_cxx" = "yes"; then
295        if test "$enable_shared" = "no"; then
296                DEFAULT_LIB_CXX="\$(libcxx)"
297        fi
298        if test "$enable_shared" = "yes"; then
299                DEFAULT_LIB_CXX="\$(libxso_target)"
300        fi
301        INSTALL_LIBS="$INSTALL_LIBS $DEFAULT_LIB_CXX"
302
303        # Fill in C++ library for Embedix.
304        EMBEDIX_ECD_CXX='<OPTION db-extra>\
305        TYPE=bool\
306        DEFAULT_VALUE=1\
307        PROMPT=Include BerkeleyDB C++ library?\
308        <KEEPLIST>\
309                /usr/include/db_cxx.h\
310                /usr/lib/libdb_cxx-@DB_VERSION_MAJOR@.@DB_VERSION_MINOR@.so\
311        </KEEPLIST>\
312        <PROVIDES>\
313                libdb_cxx-@DB_VERSION_MAJOR@.@DB_VERSION_MINOR@.so\
314        </PROVIDES>\
315        <REQUIRES>\
316                ld-linux.so.2\
317                libc.so.6\
318        </REQUIRES>\
319        STATIC_SIZE=0\
320        STORAGE_SIZE=523612\
321        STARTUP_TIME=0\
322        </OPTION>'
323fi
324
325# Optional Java API.
326if test "$db_cv_java" = "yes"; then
327        # Java requires shared libraries.
328        if test "$enable_shared" = "no"; then
329                AC_MSG_ERROR([Java requires shared libraries])
330        fi
331
332        AC_PROG_JAVAC
333        AC_PROG_JAR
334        AC_JNI_INCLUDE_DIR
335
336        for JNI_INCLUDE_DIR in $JNI_INCLUDE_DIRS
337        do
338                CPPFLAGS="$CPPFLAGS -I$JNI_INCLUDE_DIR"
339        done
340
341        ADDITIONAL_LANG="$ADDITIONAL_LANG java"
342        INSTALL_LIBS="$INSTALL_LIBS \$(libjso_target)"
343else
344        JAVAC=nojavac
345fi
346
347# Optional RPC client/server.
348if test "$db_cv_rpc" = "yes"; then
349        AC_DEFINE(HAVE_RPC)
350        AH_TEMPLATE(HAVE_RPC, [Define to 1 if building RPC client/server.])
351
352        RPC_CLIENT_OBJS="\$(RPC_CLIENT_OBJS)"
353        ADDITIONAL_PROGS="berkeley_db_svc $ADDITIONAL_PROGS"
354       
355        EMBEDIX_ECD_RPC="/usr/bin/berkeley_db_svc"
356
357        case "$host_os" in
358        hpux*)
359                AC_CHECK_FUNC(svc_run,,
360                    AC_CHECK_LIB(nsl, svc_run,
361                    LIBS="-lnsl $LIBS"; LIBTSO_LIBS="-lnsl $LIBTSO_LIBS"));;
362        solaris*)
363                AC_CHECK_FUNC(svc_run,, AC_CHECK_LIB(nsl, svc_run));;
364        esac
365fi
366
367AM_TCL_LOAD
368
369# Optional crypto support.
370if test -d "$srcdir/../crypto"; then
371        AC_DEFINE(HAVE_CRYPTO)
372        AH_TEMPLATE(HAVE_CRYPTO,
373    [Define to 1 if Berkeley DB release includes strong cryptography.])
374        ADDITIONAL_OBJS="aes_method${o} crypto${o} mt19937db${o} rijndael-alg-fst${o} rijndael-api-fst${o} $ADDITIONAL_OBJS"
375fi
376
377# Optional DB 1.85 compatibility API.
378if test "$db_cv_compat185" = "yes"; then
379        ADDITIONAL_INCS="db_185.h $ADDITIONAL_INCS"
380        ADDITIONAL_OBJS="db185${o} $ADDITIONAL_OBJS"
381fi
382
383# Optional utilities.
384if test "$db_cv_dump185" = "yes"; then
385        ADDITIONAL_PROGS="db_dump185 $ADDITIONAL_PROGS"
386fi
387
388# Checks for compiler characteristics.
389AC_C_CONST
390
391# Checks for include files, structures, C types.
392AC_HEADER_STAT
393AC_HEADER_TIME
394AC_HEADER_DIRENT
395AC_CHECK_HEADERS(sys/select.h sys/time.h)
396AC_CHECK_MEMBERS([struct stat.st_blksize])
397AM_TYPES
398
399AC_CACHE_CHECK([for ANSI C exit success/failure values], db_cv_exit_defines, [
400AC_TRY_COMPILE([#include <stdlib.h>], return (EXIT_SUCCESS);,
401    [db_cv_exit_defines=yes], [db_cv_exit_defines=no])])
402if test "$db_cv_exit_defines" = yes; then
403        AC_DEFINE(HAVE_EXIT_SUCCESS)
404        AH_TEMPLATE(HAVE_EXIT_SUCCESS,
405    [Define to 1 if you have EXIT_SUCCESS/EXIT_FAILURE #defines.])
406fi
407
408# Test for various functions/libraries that the test and example programs use:
409#       sched_yield function
410#       pthreads, socket and math libraries
411AC_CHECK_FUNC(sched_yield,,
412    AC_SEARCH_LIBS(sched_yield, rt, LOAD_LIBS="$LOAD_LIBS -lrt"))
413
414# XXX
415# We can't check for pthreads in the same way we did the test for sched_yield
416# because the Solaris C library includes pthread interfaces which are not
417# thread-safe.  For that reason we always add -lpthread if we find a pthread
418# library.  Also we can't depend on any specific call existing (pthread_create,
419# for example), as it may be #defined in an include file -- OSF/1 (Tru64) has
420# this problem.
421AC_HAVE_LIBRARY(pthread, LOAD_LIBS="$LOAD_LIBS -lpthread")
422
423# XXX
424# We could be more exact about whether these libraries are needed, but we don't
425# bother -- if they exist, we load them.
426AC_HAVE_LIBRARY(m, LOAD_LIBS="$LOAD_LIBS -lm")
427AC_HAVE_LIBRARY(socket, LOAD_LIBS="$LOAD_LIBS -lsocket")
428AC_HAVE_LIBRARY(nsl, LOAD_LIBS="$LOAD_LIBS -lnsl")
429
430# Check for mutexes.
431# We do this here because it changes $LIBS.
432AM_DEFINE_MUTEXES
433
434# Checks for system functions for which we have replacements.
435#
436# XXX
437# The only portable getcwd call is getcwd(char *, size_t), where the
438# buffer is non-NULL -- Solaris can't handle a NULL buffer, and they
439# deleted getwd().
440AC_REPLACE_FUNCS(getcwd getopt memcmp memcpy memmove raise)
441AC_REPLACE_FUNCS(snprintf strcasecmp strdup strerror vsnprintf)
442
443# Check for system functions we optionally use.
444AC_CHECK_FUNCS(_fstati64 clock_gettime directio gettimeofday getuid)
445AC_CHECK_FUNCS(pstat_getdynamic sched_yield select strtoul sysconf yield)
446
447# Checks for system functions for which we don't have replacements.
448# We require qsort(3).
449AC_CHECK_FUNCS(qsort, , AC_MSG_ERROR([No qsort library function.]))
450
451# Pread/pwrite.
452# HP-UX has pread/pwrite, but it doesn't work with largefile support.
453case "$host_os" in
454hpux*)
455        AC_MSG_WARN([pread/pwrite interfaces ignored on $host_os.]);;
456*)      AC_CHECK_FUNCS(pread pwrite)
457esac
458
459# Check for fcntl(2) to deny child process access to file descriptors.
460AC_CACHE_CHECK([for fcntl/F_SETFD], db_cv_fcntl_f_setfd, [
461AC_TRY_LINK([
462#include <sys/types.h>
463#include <fcntl.h>], [
464        fcntl(1, F_SETFD, 1);
465], [db_cv_fcntl_f_setfd=yes], [db_cv_fcntl_f_setfd=no])])
466if test "$db_cv_fcntl_f_setfd" = yes; then
467        AC_DEFINE(HAVE_FCNTL_F_SETFD)
468        AH_TEMPLATE(HAVE_FCNTL_F_SETFD,
469    [Define to 1 if fcntl/F_SETFD denies child access to file descriptors.])
470fi
471
472# A/UX has a broken getopt(3).
473case "$host_os" in
474aux*)   ADDITIONAL_OBJS="getopt${o} $ADDITIONAL_OBJS";;
475esac
476
477# Linux has the O_DIRECT flag, but you can't actually use it.
478AC_CACHE_CHECK([for open/O_DIRECT], db_cv_open_o_direct, [
479echo "test for working open/O_DIRECT" > __o_direct_file
480AC_TRY_RUN([
481#include <sys/types.h>
482#include <fcntl.h>
483main() {
484int c, fd = open("__o_direct_file", O_RDONLY | O_DIRECT, 0);
485exit ((fd == -1) || (read(fd, &c, 1) != 1));
486}], [db_cv_open_o_direct=yes], [db_cv_open_o_direct=no],
487AC_TRY_LINK([
488#include <sys/types.h>   
489#include <fcntl.h>], [
490        open("__o_direct_file", O_RDONLY | O_DIRECT, 0);
491], [db_cv_open_o_direct=yes], [db_cv_open_o_direct=no]))
492rm -f __o_direct_file])
493if test "$db_cv_open_o_direct" = yes; then
494        AC_DEFINE(HAVE_O_DIRECT)
495        AH_TEMPLATE(HAVE_O_DIRECT, [Define to 1 if you have the O_DIRECT flag.])
496fi
497
498# Check for largefile support.
499AC_SYS_LARGEFILE
500
501# Figure out how to create shared regions.
502#
503# First, we look for mmap.
504#
505# BSD/OS has mlock(2), but it doesn't work until the 4.1 release.
506#
507# Nextstep (version 3.3) apparently supports mmap(2) (the mmap symbol
508# is defined in the C library) but does not support munmap(2).  Don't
509# try to use mmap if we can't find munmap.
510#
511# Ultrix has mmap(2), but it doesn't work.
512mmap_ok=no
513case "$host_os" in
514bsdi3*|bsdi4.0)
515        AC_MSG_WARN([mlock(2) interface ignored on BSD/OS 3.X and 4.0.])
516        mmap_ok=yes
517        AC_CHECK_FUNCS(mmap munmap, , mmap_ok=no);;
518ultrix*)
519        AC_MSG_WARN([mmap(2) interface ignored on Ultrix.]);;
520*)
521        mmap_ok=yes
522        AC_CHECK_FUNCS(mlock munlock)
523        AC_CHECK_FUNCS(mmap munmap, , mmap_ok=no);;
524esac
525
526# Second, we look for shmget.
527#
528# SunOS has the shmget(2) interfaces, but there appears to be a missing
529# #include <debug/debug.h> file, so we ignore them.
530shmget_ok=no
531case "$host_os" in
532sunos*)
533        AC_MSG_WARN([shmget(2) interface ignored on SunOS.]);;
534*)
535        shmget_ok=yes
536        AC_CHECK_FUNCS(shmget, , shmget_ok=no);;
537esac
538
539# We require either mmap/munmap(2) or shmget(2).
540if test "$mmap_ok" = no -a "$shmget_ok" = no; then
541        AC_MSG_WARN([Neither mmap/munmap(2) or shmget(2) library functions.])
542fi
543
544# If we're not doing version name substitution, DB_VERSION_UNIQUE_NAME
545# needs to be erased.
546if test "$db_cv_uniquename" = "no"; then
547        DB_VERSION_UNIQUE_NAME=""
548fi
549
550# This is necessary so that .o files in LIBOBJS are also built via
551# the ANSI2KNR-filtering rules.
552LIB@&t@OBJS=`echo "$LIB@&t@OBJS" |
553             sed 's,\.[[^.]]* ,$U&,g;s,\.[[^.]]*$,$U&,'`
554LTLIBOBJS=`echo "$LIB@&t@OBJS" |
555           sed 's,\.[[^.]]* ,.lo ,g;s,\.[[^.]]*$,.lo,'`
556AC_SUBST(LTLIBOBJS)
557
558# Initial output file list.
559CREATE_LIST="Makefile
560    db_cxx.h:$srcdir/../dbinc/db_cxx.in
561    db_int.h:$srcdir/../dbinc/db_int.in
562    include.tcl:$srcdir/../test/include.tcl"
563
564# Create the db.h file from a source file, a list of global function
565# prototypes, and, if configured for unique names, a list of #defines
566# to do DB_VERSION_UNIQUE_NAME substitution.
567if test "$db_cv_uniquename" = "yes"; then
568        CREATE_LIST="$CREATE_LIST
569        db.h:$srcdir/../dbinc/db.in:$srcdir/../dbinc_auto/rpc_defs.in:$srcdir/../dbinc_auto/ext_def.in:$srcdir/../dbinc_auto/ext_prot.in"
570else
571        CREATE_LIST="$CREATE_LIST
572        db.h:$srcdir/../dbinc/db.in:$srcdir/../dbinc_auto/rpc_defs.in:$srcdir/../dbinc_auto/ext_prot.in"
573fi
574
575# If configured for unique names, create the db_int_uext.h file (which
576# does the DB_VERSION_UNIQUE_NAME substitution), which is included by
577# the db_int.h file.
578if test "$db_cv_uniquename" = "yes"; then
579        CREATE_LIST="$CREATE_LIST
580        db_int_def.h:$srcdir/../dbinc_auto/int_def.in"
581        db_int_def='#include "db_int_def.h"'
582fi
583
584# Create the db_185.h and db185_int.h files from source files, a list of
585# global function prototypes, and, if configured for unique names, a list
586# of #defines to do DB_VERSION_UNIQUE_NAME substitution.
587if test "$db_cv_compat185" = "yes"; then
588        if test "$db_cv_uniquename" = "yes"; then
589                CREATE_LIST="$CREATE_LIST
590                db_185.h:$srcdir/../dbinc/db_185.in:$srcdir/../dbinc_auto/ext_185_def.in:$srcdir/../dbinc_auto/ext_185_prot.in
591                db185_int.h:$srcdir/../db185/db185_int.in:$srcdir/../dbinc_auto/ext_185_def.in:$srcdir/../dbinc_auto/ext_185_prot.in"
592        else
593                CREATE_LIST="$CREATE_LIST
594                db_185.h:$srcdir/../dbinc/db_185.in:$srcdir/../dbinc_auto/ext_185_prot.in
595                db185_int.h:$srcdir/../db185/db185_int.in:$srcdir/../dbinc_auto/ext_185_prot.in"
596        fi
597fi
598
599if test "$db_cv_embedix" = "yes"; then
600        CREATE_LIST="$CREATE_LIST db.ecd:../dist/db.ecd.in"
601fi
602
603if test "$db_cv_rpm" = "yes"; then
604        CREATE_LIST="$CREATE_LIST db.spec:../dist/db.spec.in"
605fi
606
607AC_CONFIG_FILES($CREATE_LIST)
608AC_OUTPUT
Note: See TracBrowser for help on using the repository browser.