Blame autogen.sh

Packit 423ecb
#!/bin/sh
Packit 423ecb
# Run this to generate all the initial makefiles, etc.
Packit 423ecb
Packit 423ecb
srcdir=`dirname $0`
Packit 423ecb
test -z "$srcdir" && srcdir=. 
Packit 423ecb
Packit 423ecb
THEDIR=`pwd`
Packit 423ecb
cd $srcdir
Packit 423ecb
DIE=0
Packit 423ecb
Packit 423ecb
(autoconf --version) < /dev/null > /dev/null 2>&1 || {
Packit 423ecb
	echo
Packit 423ecb
	echo "You must have autoconf installed to compile libxml."
Packit 423ecb
	echo "Download the appropriate package for your distribution,"
Packit 423ecb
	echo "or see http://www.gnu.org/software/autoconf"
Packit 423ecb
	DIE=1
Packit 423ecb
}
Packit 423ecb
Packit 423ecb
(libtoolize --version) < /dev/null > /dev/null 2>&1 || {
Packit 423ecb
	echo
Packit 423ecb
	echo "You must have libtool installed to compile libxml."
Packit 423ecb
	echo "Download the appropriate package for your distribution,"
Packit 423ecb
	echo "or see http://www.gnu.org/software/libtool"
Packit 423ecb
	DIE=1
Packit 423ecb
}
Packit 423ecb
Packit 423ecb
(automake --version) < /dev/null > /dev/null 2>&1 || {
Packit 423ecb
	echo
Packit 423ecb
	DIE=1
Packit 423ecb
	echo "You must have automake installed to compile libxml."
Packit 423ecb
	echo "Download the appropriate package for your distribution,"
Packit 423ecb
	echo "or see http://www.gnu.org/software/automake"
Packit 423ecb
}
Packit 423ecb
Packit 423ecb
if test "$DIE" -eq 1; then
Packit 423ecb
	exit 1
Packit 423ecb
fi
Packit 423ecb
Packit 423ecb
test -f entities.c || {
Packit 423ecb
	echo "You must run this script in the top-level libxml directory"
Packit 423ecb
	exit 1
Packit 423ecb
}
Packit 423ecb
Packit 423ecb
EXTRA_ARGS=
Packit 423ecb
if test "x$1" = "x--system"; then
Packit 423ecb
    shift
Packit 423ecb
    prefix=/usr
Packit 423ecb
    libdir=$prefix/lib
Packit 423ecb
    sysconfdir=/etc
Packit 423ecb
    localstatedir=/var
Packit 423ecb
    if [ -d /usr/lib64 ]; then
Packit 423ecb
      libdir=$prefix/lib64
Packit 423ecb
    fi
Packit 423ecb
    EXTRA_ARGS="--prefix=$prefix --sysconfdir=$sysconfdir --localstatedir=$localstatedir --libdir=$libdir"
Packit 423ecb
    echo "Running ./configure with $EXTRA_ARGS $@"
Packit 423ecb
else
Packit 423ecb
    if test -z "$NOCONFIGURE" && test -z "$*"; then
Packit 423ecb
        echo "I am going to run ./configure with no arguments - if you wish "
Packit 423ecb
        echo "to pass any to it, please specify them on the $0 command line."
Packit 423ecb
    fi
Packit 423ecb
fi
Packit 423ecb
Packit 423ecb
if [ ! -d $srcdir/m4 ]; then
Packit 423ecb
        mkdir $srcdir/m4
Packit 423ecb
fi
Packit 423ecb
Packit 423ecb
# Replaced by autoreconf below
Packit 423ecb
autoreconf -if -Wall
Packit 423ecb
Packit 423ecb
cd $THEDIR
Packit 423ecb
Packit 423ecb
if test x$OBJ_DIR != x; then
Packit 423ecb
    mkdir -p "$OBJ_DIR"
Packit 423ecb
    cd "$OBJ_DIR"
Packit 423ecb
fi
Packit 423ecb
Packit 423ecb
if test -z "$NOCONFIGURE"; then
Packit 423ecb
    $srcdir/configure $EXTRA_ARGS "$@"
Packit 423ecb
    echo
Packit 423ecb
    echo "Now type 'make' to compile libxml2."
Packit 423ecb
fi