Blame SOURCES/bootstrap.sh

efa197
#!/bin/sh
efa197
efa197
#
efa197
# Licensed to the Apache Software Foundation (ASF) under one
efa197
# or more contributor license agreements. See the NOTICE file
efa197
# distributed with this work for additional information
efa197
# regarding copyright ownership. The ASF licenses this file
efa197
# to you under the Apache License, Version 2.0 (the
efa197
# "License"); you may not use this file except in compliance
efa197
# with the License. You may obtain a copy of the License at
efa197
#
efa197
#   http://www.apache.org/licenses/LICENSE-2.0
efa197
#
efa197
# Unless required by applicable law or agreed to in writing,
efa197
# software distributed under the License is distributed on an
efa197
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
efa197
# KIND, either express or implied. See the License for the
efa197
# specific language governing permissions and limitations
efa197
# under the License.
efa197
#
efa197
efa197
echo -n "make distclean... "
efa197
make -k distclean >/dev/null 2>&1
efa197
echo "ok"
efa197
efa197
if test -d lib/php/src/ext/thrift_protocol ; then
efa197
    if phpize -v >/dev/null 2>/dev/null ; then
efa197
        (cd lib/php/src/ext/thrift_protocol && phpize)
efa197
    fi
efa197
fi
efa197
efa197
set -e
efa197
efa197
# libtoolize is called "glibtoolize" on OSX.
efa197
if libtoolize --version 1 >/dev/null 2>/dev/null; then
efa197
  LIBTOOLIZE=libtoolize
efa197
elif glibtoolize --version 1 >/dev/null 2>/dev/null; then
efa197
  LIBTOOLIZE=glibtoolize
efa197
else
efa197
  echo >&2 "Couldn't find libtoolize!"
efa197
  exit 1
efa197
fi
efa197
efa197
format_version () {
efa197
    printf "%03d%03d%03d%03d" $(echo $1 | tr '.' ' ');
efa197
}
efa197
efa197
# we require automake 1.13 or later
efa197
# check must happen externally due to use of newer macro
efa197
AUTOMAKE_VERSION=`automake --version | grep automake | egrep -o '([0-9]{1,}\.)+[0-9]{1,}'`
efa197
if  [ $(format_version $AUTOMAKE_VERSION) -lt $(format_version 1.13) ]; then
efa197
  echo >&2 "automake version $AUTOMAKE_VERSION is too old (need 1.13 or later)"
efa197
  exit 1
efa197
fi
efa197
efa197
set -e
efa197
autoscan
efa197
$LIBTOOLIZE --copy --automake
efa197
aclocal -I ./aclocal
efa197
autoheader
efa197
sed '/undef VERSION/d' config.hin > config.hin2
efa197
mv config.hin2 config.hin
efa197
autoconf
efa197
automake --copy --add-missing --foreign