Escaped tab for non-gnu sed (#104821).
[platform/upstream/rpm.git] / db3 / configure
1 #!/bin/sh
2 #set -x 
3 base_name=`basename $0`
4 base_path=`echo $0 | sed s,$base_name,,`
5
6 db_dist="${base_path}../db/dist"
7
8 rm -f config.cache
9
10 # XXX edit CFLAGS= ... out of invocation args ???
11 ARGS="`echo $* | sed -e 's% [^ ]*CFLAGS=[^ ]*%%' -e 's% -[^-][^ ]*%%g' -e 's%--cache-file=.*$%%'`"
12
13 CC="$CC" CFLAGS="$CFLAGS" $db_dist/configure $ARGS \
14         --enable-shared --enable-static --enable-rpc \
15         --with-uniquename=_rpmdb --srcdir=$db_dist
16
17 mv Makefile Makefile.orig
18 cat Makefile.orig | sed -e '/^install[:-]/c\
19 .PHONY: listobjs\
20 listobjs:\
21 \       @echo $(OBJS) $(C_OBJS) \
22 \
23 distdir install check:\
24 \
25 db4_install: all install_setip' > Makefile
26
27 mv db.h db.h.orig
28 cat db.h.orig | sed \
29         -e '/^typedef   u_int32_t       db_pgno_t;/i\
30 /*@-incondefs -fielduse -enummemuse -typeuse @*/' \
31         -e '/^struct __key_range;/a\
32 /*@=incondefs@*/' \
33         -e '/^#define   db_create/i\
34 /*@-declundef -noparams -fcnuse@*/' \
35         -e '/^int txn_commit __P((/a\
36 /*@=declundef =noparams =fcnuse =fielduse =enummemuse =typeuse @*/' > db.h
37
38 # Generate manifest for rpmdb.
39 make -s listobjs > db3lobjs