mirror of
https://gitlab.com/virt-viewer/virt-viewer.git
synced 2025-01-11 05:17:45 +03:00
Add support for --system arg to autogen.sh
This commit is contained in:
parent
111d80a8cb
commit
a42efc728c
23
autogen.sh
23
autogen.sh
@ -30,10 +30,23 @@ if test "$DIE" -eq 1; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if test -z "$*"; then
|
||||
echo "I am going to run ./configure with not arguments - if you "
|
||||
echo "wish to pass any extra arguments to it, please specify them on "
|
||||
echo "the $0 command line."
|
||||
EXTRA_ARGS=""
|
||||
if test "x$1" = "x--system"; then
|
||||
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 "$*" ; 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
|
||||
|
||||
libtoolize --copy --force
|
||||
@ -45,7 +58,7 @@ autoconf
|
||||
|
||||
cd $THEDIR
|
||||
|
||||
$srcdir/configure "$@" && {
|
||||
$srcdir/configure $EXTRA_ARGS "$@" && {
|
||||
echo
|
||||
echo "Now type 'make' to compile virt-viewer."
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user