Handle config.guess and config.sub with DOS EOLs
[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% --param=[^ ]*%%g' -e 's%--cache-file=.*$%%'`"
12
13 CC="$CC" CFLAGS="$CFLAGS" $db_dist/configure $ARGS \
14         --enable-shared --enable-static \
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 installcheck:\
24 \
25 db4_install: all install_setip' \
26 -e '/^uninstall[:-]/c\
27 uninstall:' \
28 -e 's/^check depend/\
29 check: all\
30 depend/' \
31  > Makefile
32
33 # Generate manifest for rpmdb.
34 make -s listobjs > db3lobjs