|
Packit |
6baad5 |
#!/bin/bash
|
|
Packit |
6baad5 |
|
|
Packit |
6baad5 |
# This file is part of libasyncns.
|
|
Packit |
6baad5 |
#
|
|
Packit |
6baad5 |
# Copyright 2005-2008 Lennart Poettering
|
|
Packit |
6baad5 |
#
|
|
Packit |
6baad5 |
# libasyncns is free software; you can redistribute it and/or modify
|
|
Packit |
6baad5 |
# it under the terms of the GNU Lesser General Public License as
|
|
Packit |
6baad5 |
# published by the Free Software Foundation, either version 2.1 of the
|
|
Packit |
6baad5 |
# License, or (at your option) any later version.
|
|
Packit |
6baad5 |
#
|
|
Packit |
6baad5 |
# libasyncns is distributed in the hope that it will be useful, but
|
|
Packit |
6baad5 |
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
Packit |
6baad5 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
Packit |
6baad5 |
# Lesser General Public License for more details.
|
|
Packit |
6baad5 |
#
|
|
Packit |
6baad5 |
# You should have received a copy of the GNU Lesser General Public
|
|
Packit |
6baad5 |
# License along with libasyncns. If not, see
|
|
Packit |
6baad5 |
# <http://www.gnu.org/licenses/>.
|
|
Packit |
6baad5 |
|
|
Packit |
6baad5 |
VERSION=1.9
|
|
Packit |
6baad5 |
|
|
Packit |
6baad5 |
run_versioned() {
|
|
Packit |
6baad5 |
local P
|
|
Packit |
6baad5 |
local V
|
|
Packit |
6baad5 |
|
|
Packit |
6baad5 |
V=$(echo "$2" | sed -e 's,\.,,g')
|
|
Packit |
6baad5 |
|
|
Packit |
6baad5 |
if [ -e "`which $1$V 2> /dev/null`" ] ; then
|
|
Packit |
6baad5 |
P="$1$V"
|
|
Packit |
6baad5 |
else
|
|
Packit |
6baad5 |
if [ -e "`which $1-$2 2> /dev/null`" ] ; then
|
|
Packit |
6baad5 |
P="$1-$2"
|
|
Packit |
6baad5 |
else
|
|
Packit |
6baad5 |
P="$1"
|
|
Packit |
6baad5 |
fi
|
|
Packit |
6baad5 |
fi
|
|
Packit |
6baad5 |
|
|
Packit |
6baad5 |
shift 2
|
|
Packit |
6baad5 |
"$P" "$@"
|
|
Packit |
6baad5 |
}
|
|
Packit |
6baad5 |
|
|
Packit |
6baad5 |
set -ex
|
|
Packit |
6baad5 |
|
|
Packit |
6baad5 |
if [ "x$1" = "xam" ] ; then
|
|
Packit |
6baad5 |
run_versioned automake "$VERSION" -a -c --foreign
|
|
Packit |
6baad5 |
./config.status
|
|
Packit |
6baad5 |
else
|
|
Packit |
6baad5 |
rm -rf autom4te.cache
|
|
Packit |
6baad5 |
rm -f config.cache
|
|
Packit |
6baad5 |
|
|
Packit |
6baad5 |
mkdir -p common
|
|
Packit |
6baad5 |
touch config.rpath
|
|
Packit |
6baad5 |
|
|
Packit |
6baad5 |
test "x$LIBTOOLIZE" = "x" && LIBTOOLIZE=libtoolize
|
|
Packit |
6baad5 |
|
|
Packit |
6baad5 |
"$LIBTOOLIZE" -c --force
|
|
Packit |
6baad5 |
run_versioned aclocal "$VERSION" -I m4
|
|
Packit |
6baad5 |
run_versioned autoconf 2.59 -Wall
|
|
Packit |
6baad5 |
run_versioned autoheader 2.59
|
|
Packit |
6baad5 |
run_versioned automake "$VERSION" -a -c --foreign
|
|
Packit |
6baad5 |
|
|
Packit |
6baad5 |
if test "x$NOCONFIGURE" = "x"; then
|
|
Packit |
6baad5 |
CFLAGS="-g -O0" ./configure --sysconfdir=/etc --localstatedir=/var "$@"
|
|
Packit |
6baad5 |
make clean
|
|
Packit |
6baad5 |
fi
|
|
Packit |
6baad5 |
fi
|