[NEW PATCH] Make sure autogen.sh always runs configure (via gerrit-bot)

Federico Simoncelli fsimonce at redhat.com
Mon Aug 22 14:53:09 UTC 2011


New patch submitted by Federico Simoncelli (fsimonce at redhat.com)

You can review this change at: http://gerrit.usersys.redhat.com/838

commit 1372b2d9a5c719c0334b72da3478a917beb70129
Author: Daniel P. Berrange <berrange at redhat.com>
Date:   Mon Aug 22 14:39:55 2011 +0100

    Make sure autogen.sh always runs configure
    
    Standard practice for an autogen.sh script is to always run the
    configure script. In addition 'libdir' cannot be assumed to be
    /usr/lib, rather than /usr/lib64.
    
    * autogen.sh: Fix --system for x86_64 and always run configure
    
    Change-Id: Ifbcefa3b142bb5a81698c4227259240eb396a96e

diff --git a/autogen.sh b/autogen.sh
index 7bb0024..2f5b499 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -3,6 +3,28 @@
 autoreconf -if
 
 if test "x$1" = "x--system"; then
-    ./configure --prefix=/usr --sysconfdir=/etc \
-                --localstatedir=/var --libdir=/usr/lib
+    shift
+    prefix=/usr
+    libdir=$prefix/lib
+    sysconfdir=/etc
+    localstatedir=/var
+    if [ -d /usr/lib64 ]; then
+      libdir=$prefix/lib64
+    fi
+    EXTRA_ARGS="--prefix=$prefix --sysconfdir=$sysconfdir --localstatedir=$localstatedir --libdir=$libdir"
+    echo "Running ./configure with $EXTRA_ARGS $@"
+else
+    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
+
+if test -z "$*" && test -f config.status; then
+    ./config.status --recheck
+else
+    ./configure $EXTRA_ARGS "$@"
+fi && {
+    echo
+    echo "Now type 'make' to compile vdsm."
+}




More information about the vdsm-patches mailing list