1#!/bin/sh 2 3# Copyright (c) 2013, Ben Noordhuis <info@bnoordhuis.nl> 4# 5# Permission to use, copy, modify, and/or distribute this software for any 6# purpose with or without fee is hereby granted, provided that the above 7# copyright notice and this permission notice appear in all copies. 8# 9# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 10# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 11# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 12# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 13# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 14# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 15# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 16 17cd `dirname "$0"` 18 19if [ "$LIBTOOLIZE" = "" ] && [ "`uname`" = "Darwin" ]; then 20 LIBTOOLIZE=glibtoolize 21fi 22 23ACLOCAL=${ACLOCAL:-aclocal} 24AUTOCONF=${AUTOCONF:-autoconf} 25AUTOMAKE=${AUTOMAKE:-automake} 26LIBTOOLIZE=${LIBTOOLIZE:-libtoolize} 27 28automake_version=`"$AUTOMAKE" --version | head -n 1 | sed 's/[^.0-9]//g'` 29automake_version_major=`echo "$automake_version" | cut -d. -f1` 30automake_version_minor=`echo "$automake_version" | cut -d. -f2` 31 32UV_EXTRA_AUTOMAKE_FLAGS= 33if test "$automake_version_major" -gt 1 || \ 34 test "$automake_version_major" -eq 1 && \ 35 test "$automake_version_minor" -gt 11; then 36 # serial-tests is available in v1.12 and newer. 37 UV_EXTRA_AUTOMAKE_FLAGS="$UV_EXTRA_AUTOMAKE_FLAGS serial-tests" 38fi 39echo "m4_define([UV_EXTRA_AUTOMAKE_FLAGS], [$UV_EXTRA_AUTOMAKE_FLAGS])" \ 40 > m4/libuv-extra-automake-flags.m4 41 42set -ex 43"$LIBTOOLIZE" --copy 44"$ACLOCAL" -I m4 45"$AUTOCONF" 46"$AUTOMAKE" --add-missing --copy 47