As preparation to run configure directly when building libvirt.
Signed-off-by: Pavel Hrdina <phrdina(a)redhat.com>
---
autogen.sh | 22 ++++------------------
configure.ac | 14 ++++++++++++++
docs/compiling.html.in | 2 +-
3 files changed, 19 insertions(+), 19 deletions(-)
diff --git a/autogen.sh b/autogen.sh
index 47446dc785..75e8b70d4e 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -23,7 +23,6 @@ test -f src/libvirt.c || {
dry_run=
no_git=
gnulib_srcdir=
-extra_args=
while test "$#" -gt 0; do
case "$1" in
--dry-run)
@@ -48,19 +47,6 @@ while test "$#" -gt 0; do
shift
shift
;;
- --system)
- prefix=/usr
- sysconfdir=/etc
- localstatedir=/var
- if test -d $prefix/lib64; then
- libdir=$prefix/lib64
- else
- libdir=$prefix/lib
- fi
- extra_args="--prefix=$prefix --localstatedir=$localstatedir"
- extra_args="$extra_args --sysconfdir=$sysconfdir --libdir=$libdir"
- shift
- ;;
*)
# All remaining arguments will be passed to configure verbatim
break
@@ -187,19 +173,19 @@ test "$MAKE" || {
die "GNU make is required to build libvirt"
}
-if test -z "$*" && test -z "$extra_args" && test -f
config.status; then
+if test -z "$*" && test -f config.status; then
echo "Running config.status..."
./config.status --recheck || {
die "config.status failed"
}
else
- if test -z "$*" && test -z "$extra_args"; then
+ if test -z "$*"; 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."
else
- echo "Running configure with $extra_args $@"
+ echo "Running configure with $@"
fi
- "$srcdir/configure" $extra_args "$@" || {
+ "$srcdir/configure" "$@" || {
die "configure failed"
}
fi
diff --git a/configure.ac b/configure.ac
index 2be909b7ce..d5926b9b90 100644
--- a/configure.ac
+++ b/configure.ac
@@ -151,6 +151,20 @@ then
runstatedir=$with_runstatedir
fi
+LIBVIRT_ARG_WITH([SYSTEM],
+ [configure libvirt to be compatible with normal OS vendor prefixes],
+ [no])
+if test "x$with_system" != "xno"; then
+ prefix=/usr
+ sysconfdir=/etc
+ localstatedir=/var
+ if test -d $prefix/lib64; then
+ libdir=$prefix/lib64
+ else
+ libdir=$prefix/lib
+ fi
+fi
+
gl_EARLY
gl_INIT
diff --git a/docs/compiling.html.in b/docs/compiling.html.in
index 5869ebb90f..3731bf0873 100644
--- a/docs/compiling.html.in
+++ b/docs/compiling.html.in
@@ -113,7 +113,7 @@ $ <b>sudo</b> make install</pre>
</p>
<pre>
-$ ./autogen.sh --system
+$ ./autogen.sh --with-system
$ make
</pre>
--
2.24.1