[PATCH] README: Replace "configure" with "autogen.sh" for correct installation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: LiaoPingfang <liao.pingfang@xxxxxxxxxx>

First of all, there is no "configure" file.
We need use autogen.sh at first to create "configure" file.
Then in autogen.sh "configure" will be executed according to
user as root or non-root.

Signed-off-by: Liao Pingfang <liao.pingfang@xxxxxxxxxx>
---
 README.rst | 4 ++--
 autogen.sh | 4 ++++
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/README.rst b/README.rst
index cdcc97b..82b4b31 100644
--- a/README.rst
+++ b/README.rst
@@ -53,7 +53,7 @@ in a manner that is suitable for installing as root, use:
 ::
 
   $ mkdir build && cd build
-  $ ../configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var
+  $ ../autogen.sh
   $ make
   $ sudo make install
 
@@ -62,7 +62,7 @@ While to build & install as an unprivileged user
 ::
 
   $ mkdir build && cd build
-  $ ../configure --prefix=$HOME/usr
+  $ ../autogen.sh
   $ make
   $ make install
 
diff --git a/autogen.sh b/autogen.sh
index 4e1bbce..3c119e1 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -27,6 +27,10 @@ if test "x$1" = "x--system"; then
       libdir=$prefix/lib64
     fi
     EXTRA_ARGS="--prefix=$prefix --sysconfdir=$sysconfdir --localstatedir=$localstatedir --libdir=$libdir"
+    if [ "$HOME" != "/root" ]; then
+	    prefix=$HOME/usr
+	    EXTRA_ARGS="--prefix=$prefix"
+    fi
 fi
 
 cd "$olddir"
-- 
2.9.5




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux