rpm/db3/configure

41 lines
1.1 KiB
Bash
Executable File

#!/bin/sh
#set -x
db_dist="../db/dist"
rm -f config.cache
# XXX hacks to get db-3.3.4 to configure properly
#ln -sf ../dist $db_dist/../db/dist
#ln -sf ../dist $db_dist
#CFLAGS="-O2 -D_GNU_SOURCE -D_REENTRANT"
CC="$CC" CFLAGS="$CFLAGS" $db_dist/configure \
`echo $* | sed -e "s%--cache-file=.*$% --enable-shared --enable-static --enable-debug --enable-rpc --with-uniquename=_rpmdb --srcdir=$db_dist%"`
# XXX hack to get db-3.3.4 to configure properly
#rm -f $db_dist/../db/dist $db_dist/dist
mv Makefile Makefile.orig
cat Makefile.orig | sed -e 's/ -g$/ -g -O2/' -e '/^install:/c\
.PHONY: listobjs\
listobjs:\
@echo $(OBJS) $(C_OBJS) \
\
distdir install check:\
\
db3_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 '/^#define db_xa_switch/a\
/*@=declundef =noparams =fcnuse =fielduse =enummemuse =typeuse @*/' > db.h
# Generate manifest for rpmdb.
make -s listobjs > db3lobjs