PageRenderTime 48ms CodeModel.GetById 34ms app.highlight 9ms RepoModel.GetById 1ms app.codeStats 0ms

/bootstrap

https://code.google.com/
Shell | 104 lines | 80 code | 11 blank | 13 comment | 20 complexity | 8eb42b248f482f85a88e9b77fd7debd1 MD5 | raw file
  1#!/bin/sh
  2# $Id$
  3# $Source$
  4#
  5# Run this script to generate aclocal.m4, config.h.in, 
  6# Makefile.in's, and ./configure...
  7# 
  8# To specify extra flags to aclocal (include dirs for example),
  9# set ACLOCAL_FLAGS
 10#
 11
 12DIE=0
 13
 14# minimum required versions of autoconf/automake:
 15ACMAJOR=2
 16ACMINOR=52
 17
 18AMMAJOR=1
 19AMMINOR=4
 20AMPATCH=4
 21
 22LTLMAJOR=1
 23LTLMINOR=4
 24LTLPATCH=3
 25
 26# auxdir location
 27AUXDIR=config
 28
 29(autoconf --version 2>&1 | \
 30 perl -n0e "(/(\d+)\.(\d+)/ && \$1>=$ACMAJOR && \$2>=$ACMINOR) || exit 1") || {
 31   echo
 32   echo "Error: You must have \`autoconf' version $ACMAJOR.$ACMINOR or greater"
 33   echo "installed to run $0. Get the latest version from"
 34   echo "ftp://ftp.gnu.org/pub/gnu/autoconf/"
 35   echo
 36   NO_AUTOCONF=yes
 37   DIE=1
 38}
 39
 40versiontest="
 41if (/(\d+)\.(\d+)((-p|\.)(\d+))*/) { 
 42	exit 1 if (\$1 < $AMMAJOR); 
 43	exit 1 if (\$1 == $AMMAJOR && \$2 < $AMMINOR);
 44        if (defined(\$5)) {
 45            exit 1 if (\$1 == $AMMAJOR && \$2 == $AMMINOR && \$5 < $AMPATCH); 
 46        }
 47}"
 48
 49(automake --version 2>&1 | perl -n0e "$versiontest" ) || {
 50   echo
 51   echo "Error: You must have \`automake' version $AMMAJOR.$AMMINOR-p$AMPATCH or greater"
 52   echo "installed to run $0. Get the latest version from"
 53   echo "ftp://ftp.gnu.org/pub/gnu/automake/"
 54   echo
 55   NO_AUTOCONF=yes
 56   DIE=1
 57}
 58
 59test -n "$NO_AUTOMAKE" || (aclocal --version) < /dev/null > /dev/null 2>&1 || {
 60   echo
 61   echo "Error: \`aclocal' appears to be missing. The installed version of"
 62   echo "\`automake' may be too old. Get the most recent version from"
 63   echo "ftp://ftp.gnu.org/pub/gnu/automake/"
 64   echo
 65   NO_ACLOCAL=yes
 66   DIE=1
 67}
 68
 69versiontest="
 70if ( / (\d+)\.(\d+)\.(\d+)/) { 
 71	exit 1 if (\$1 < $LTLMAJOR); 
 72	exit 1 if (\$1 == $LTLMAJOR && \$2 < $LTLMINOR);
 73        if (defined(\$3)) {
 74            exit 1 if (\$1 == $LTLMAJOR && \$2 == $LTLMINOR && \$3 < $LTLPATCH);
 75        }
 76}"
 77
 78(libtoolize --version 2>&1 | perl -n0e "$versiontest") || {
 79   echo
 80   echo "Warning: On some systems, libtoolize versions < 1.4.3 may not"
 81   echo "install necessary files correctly.  Get the most recent"
 82   echo "version of libtool from"
 83   echo "ftp://ftp.gnu.org/gnu/libtool/"
 84   echo
 85}
 86
 87if test $DIE -eq 1; then
 88   exit 1
 89fi
 90
 91echo "running aclocal $ACLOCAL_FLAGS ... "
 92aclocal -I $AUXDIR $ACLOCAL_FLAGS
 93echo "running libtoolize ..."
 94libtoolize --automake --copy 
 95echo "running autoheader ... "
 96autoheader
 97echo "running automake --add-missing ... "
 98# ensure AUXDIR exists
 99if test ! -d $AUXDIR; then
100  mkdir $AUXDIR
101fi
102automake --copy --add-missing 
103echo "running autoconf ... "
104autoconf --warnings=all