summaryrefslogtreecommitdiff
path: root/db3/configure
blob: 012b4232837bb7eee438ae34abcc5150db44ba32 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/bin/sh
#set -x 
base_name=`basename $0`
base_path=`echo $0 | sed s,$base_name,,`

db_dist="${base_path}../db/dist"

rm -f config.cache

# XXX edit CFLAGS= ... out of invocation args ???
ARGS="`echo $* | sed -e 's% [^ ]*CFLAGS=[^ ]*%%' -e 's% -[^-][^ ]*%%g' -e 's% --param=[^ ]*%%g' -e 's%--cache-file=.*$%%'`"

CC="$CC" CFLAGS="$CFLAGS" $db_dist/configure $ARGS \
	--enable-shared --enable-static --enable-rpc \
	--with-uniquename=_rpmdb --srcdir=$db_dist

mv Makefile Makefile.orig
cat Makefile.orig | sed -e '/^install[:-]/c\
.PHONY: listobjs\
listobjs:\
\	@echo $(OBJS) $(C_OBJS) \
\
distdir install check:\
\
db4_install: all install_setip' > Makefile

mv db.h db.h.orig
cat db.h.orig | sed \
	-e '/^typedef	u_int32_t	db_pgno_t;/i\
/*@-incondefs -fielduse -enummemuse -typeuse @*/' \
	-e '/^struct __key_range;/a\
/*@=incondefs@*/' \
	-e '/^#define	db_create/i\
/*@-declundef -noparams -fcnuse@*/' \
	-e '/^int txn_commit __P((/a\
/*@=declundef =noparams =fcnuse =fielduse =enummemuse =typeuse @*/' > db.h

# Generate manifest for rpmdb.
make -s listobjs > db3lobjs