Add config.sub update to %configure macro
[platform/upstream/rpm.git] / autogen.sh
index 1f199df..f7ea2cf 100755 (executable)
@@ -1,16 +1,20 @@
 #!/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