#!/bin/sh
-autoheader
-autoconf
-(cd popt; autoconf)
+export CPPFLAGS
+export CFLAGS
+export LDFLAGS
-if [ "$1" = "--noconfigure" ]; then
- exit 0;
-fi
+autoreconf -i
-if [ -z "$@" ]; then
- ./configure --prefix=/usr
-else
+case "$1" in
+ "--noconfigure")
+ exit 0;
+ ;;
+ "--rpmconfigure")
+ shift
+ eval "`rpm --eval %configure`" "$@"
+ ;;
+ *)
./configure "$@"
-fi
+ ;;
+esac