| #!/bin/sh |
| # |
| # Copyright 2004 The Apache Software Foundation |
| # |
| # Licensed under the Apache License, Version 2.0 (the "License"); |
| # you may not use this file except in compliance with the License. |
| # You may obtain a copy of the License at |
| # |
| # http://www.apache.org/licenses/LICENSE-2.0 |
| # |
| # Unless required by applicable law or agreed to in writing, software |
| # distributed under the License is distributed on an "AS IS" BASIS, |
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| # See the License for the specific language governing permissions and |
| # limitations under the License. |
| # |
| # |
| # buildconf: Build the support scripts needed to compile from a |
| # checked-out version of the source code. |
| |
| perl="perl" |
| libtool="libtool" |
| |
| while test $# -gt 0 |
| do |
| # Normalize |
| case "$1" in |
| -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;; |
| *) optarg= ;; |
| esac |
| |
| case "$1" in |
| --with-perl=*) |
| perl=$optarg |
| ;; |
| --with-libtool=*) |
| libtool=$optarg |
| ;; |
| esac |
| |
| shift |
| done |
| |
| libtoolize="${libtool}ize --automake --copy --force" |
| |
| echo "removing stale config files" |
| touch .deps |
| rm -f aclocal.m4 |
| rm -f generated_lists |
| rm -rf autom4te*.cache |
| |
| echo "checking buildconf prereqs"; |
| $perl build/version_check.pl libtool $libtool || exit 1 |
| $perl build/version_check.pl autoconf || exit 1 |
| $perl build/version_check.pl automake || exit 1 |
| $perl build/version_check.pl ExtUtils::XSBuilder || exit 1 |
| |
| echo "running $libtoolize" && $libtoolize && \ |
| echo "running aclocal" && aclocal && \ |
| echo "running autoconf" && autoconf && \ |
| echo "running autoheader" && autoheader && \ |
| echo "running automake -a -c" && automake -a -c && \ |
| echo "running xsbuilder" && (cd glue/perl && $perl ../../build/xsbuilder.pl) && \ |
| echo "buildconf successful." |
| |