]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
build: don't lose prior configure args on autogen.sh
authorEric Blake <eblake@redhat.com>
Thu, 25 Mar 2010 23:37:32 +0000 (17:37 -0600)
committerJim Meyering <meyering@redhat.com>
Fri, 26 Mar 2010 18:16:37 +0000 (19:16 +0100)
My prior patch forced an autogen.sh run, and I was surprised that the
suggested './autogen.sh' lost the fact that I had previously used
'./autogen.sh -C' for speed.

* autogen.sh: Use config.status, if present and there were no arguments.

Signed-off-by: Eric Blake <eblake@redhat.com>
autogen.sh

index b93cdbae653681f52ae4f2cab7fcd9bde22b75a8..a618d86329c1fde55eea75f46114aca648957605 100755 (executable)
@@ -56,8 +56,8 @@ if test "x$1" = "x--system"; then
     EXTRA_ARGS="--prefix=/usr --sysconfdir=/etc --localstatedir=/var"
     echo "Running ./configure with $EXTRA_ARGS $@"
 else
-    if test -z "$*"; then
-       echo "I am going to run ./configure with no arguments - if you wish "
+    if test -z "$*" && test ! -f "$THEDIR/config.status"; then
+        echo "I am going to run ./configure with no arguments - if you wish "
         echo "to pass any to it, please specify them on the $0 command line."
     fi
 fi
@@ -92,7 +92,11 @@ if test "x$OBJ_DIR" != x; then
     cd "$OBJ_DIR"
 fi
 
-$srcdir/configure $EXTRA_ARGS "$@" && {
+if test -z "$*" && test -f config.status; then
+    ./config.status --recheck
+else
+    $srcdir/configure $EXTRA_ARGS "$@"
+fi && {
     echo
     echo "Now type 'make' to compile libvirt."
 }