1 --- rpm-4.5/db3/configure 2007-05-25 20:35:57.000000000 +0300
2 +++ trunk/db3/configure 2007-07-01 21:45:10.000000000 +0300
7 -# XXX edit CFLAGS= ... out of invocation args ???
8 -ARGS="`echo $* | sed -e 's% [^ ]*CFLAGS=[^ ]*%%' -e 's% -[^-][^ ]*%%g' -e 's% --param=[^ ]*%%g' -e 's%--cache-file=.*$%%'`"
10 -CC="$CC" CFLAGS="$CFLAGS" $db_dist/configure $ARGS \
11 - --enable-shared --enable-static --enable-rpc \
12 - --with-uniquename=_rpmdb --srcdir=$db_dist
13 +# We iterate over the argument list. Processing the arguments using
14 +# echo "$*" can fail with the sed chopping out parts of unrelated
16 +set -- "$@" eoa_marker
17 +while [ "$1" != "eoa_marker" ]; do
19 + sed -e 's%CFLAGS=.*%%' \
20 + -e 's%--param=.*%%g' \
21 + -e 's%--cache-file=.*$%%' \
22 + -e 's%--with-db-rpc=\(.*\)%--enable-rpc=\1%' \
23 + -e 's%--with-db-rpc%--enable-rpc%' \
24 + -e 's%--without-db-rpc%--disable-rpc%' \
25 + -e 's%--with-db-largefile=\(.*\)%--enable-largefile=\1%' \
26 + -e 's%--with-db-largefile%--enable-largefile%' \
27 + -e 's%--without-db-largefile%--disable-largefile%' \
28 + -e 's%--with-db-mutex=\(.*\)%--with-mutex=\1%' \
29 + -e 's%--with-db-mutex%%' \
30 + -e 's%--without-db-mutex%%' \
39 +# 1. "--enable-shared" is there for enforcing GNU libtool usage only
40 +# as Berkeley-DB "configure" else would not use GNU libtool at all.
41 +# 2. "--enable-static" is there for enforcing the building of a static
42 +# version of the libdb objects RPM actually is interested in.
44 +CC="$CC" CFLAGS="$CFLAGS" $db_dist/configure "$@" \
45 + --enable-shared --enable-static \
46 + --with-uniquename=_rpmdb --srcdir=$db_dist || exit 1
48 mv Makefile Makefile.orig
49 cat Makefile.orig | sed -e '/^install[:-]/c\
52 -\ @echo $(OBJS) $(C_OBJS) \
54 distdir install check:\
56 -db4_install: all install_setip' > Makefile
57 +' -e 's/^\(SOFLAGS=\).*$/\1/' > Makefile
62 -e '/^int txn_commit __P((/a\
63 /*@=declundef =noparams =fcnuse =fielduse =enummemuse =typeuse @*/' > db.h
65 -# Generate manifest for rpmdb.
66 -make -s listobjs > db3lobjs