#!/bin/sh
-autoheader
-autoconf
-#echo timestamp > stamp-h.in
-#(cd popt; autoconf; echo timestamp > stamp-h.in)
+export CPPFLAGS
+export CFLAGS
+export LDFLAGS
-if [ "$1" = "--noconfigure" ]; then
- exit 0;
-fi
+autoreconf -i
-if [ X"$@" = X -a "X`uname -s`" = "XLinux" ]; then
- ./configure --prefix=/usr --disable-shared
-else
+case "$1" in
+ "--noconfigure")
+ exit 0;
+ ;;
+ "--rpmconfigure")
+ shift
+ eval "`rpm --eval %configure`" "$@"
+ ;;
+ *)
./configure "$@"
-fi
+ ;;
+esac