Changeset 4067 for toilet


Ignore:
Timestamp:
Nov 30, 2009, 1:47:18 AM (10 years ago)
Author:
Sam Hocevar
Message:

Update bootstrap script.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • toilet/trunk/bootstrap

    r1830 r4067  
    11#! /bin/sh
     2# $Id$
    23
    3 # bootstrap: the ultimate bootstrap/autogen.sh script for autotools projects
    4 # Copyright (c) 2002-2007 Sam Hocevar <sam@zoy.org>
     4# bootstrap: generic bootstrap/autogen.sh script for autotools projects
     5#
     6# Copyright (c) 2002-2009 Sam Hocevar <sam@hocevar.net>
    57#
    68#    This program is free software. It comes without any warranty, to
     
    1113#
    1214# The latest version of this script can be found at the following place:
    13 #   http://sam.zoy.org/autotools/
     15#   http://caca.zoy.org/wiki/build
    1416
    1517# Die if an error occurs
     
    2830# Check for needed features
    2931auxdir="`sed -ne 's/^[ \t]*A._CONFIG_AUX_DIR *([[ ]*\([^] )]*\).*/\1/p' $conffile`"
    30 libtool="`grep -q '^[ \t]*A._PROG_LIBTOOL' $conffile && echo yes || echo no`"
    31 header="`grep -q '^[ \t]*A._CONFIG_HEADER' $conffile && echo yes || echo no`"
    32 aclocalflags="`sed -ne 's/^[ \t]*ACLOCAL_AMFLAGS[ \t]*=//p' Makefile.am`"
     32pkgconfig="`grep '^[ \t]*PKG_PROG_PKG_CONFIG' $conffile >/dev/null 2>&1 && echo yes || echo no`"
     33libtool="`grep '^[ \t]*A._PROG_LIBTOOL' $conffile >/dev/null 2>&1 && echo yes || echo no`"
     34header="`grep '^[ \t]*A._CONFIG_HEADER' $conffile >/dev/null 2>&1 && echo yes || echo no`"
     35makefile="`[ -f Makefile.am ] && echo yes || echo no`"
     36aclocalflags="`sed -ne 's/^[ \t]*ACLOCAL_AMFLAGS[ \t]*=//p' Makefile.am 2>/dev/null || :`"
    3337
    3438# Check for automake
    3539amvers="no"
    36 for n in 10 9 8 7 6 5; do
    37   for v in "-1.${n}" "1${n}"; do
    38     if automake${v} --version >/dev/null 2>&1; then
    39       amvers="${v}"
    40       break
    41     fi
    42   done
     40for v in 11 10 9 8 7 6 5; do
     41  if automake-1.${v} --version >/dev/null 2>&1; then
     42    amvers="-1.${v}"
     43    break
     44  elif automake1.${v} --version >/dev/null 2>&1; then
     45    amvers="1.${v}"
     46    break
     47  fi
    4348done
    4449
     
    9196fi
    9297
     98# Check for pkg-config
     99if test "$pkgconfig" = "yes"; then
     100  if ! pkg-config --version >/dev/null 2>&1; then
     101    echo "$0: you need pkg-config"
     102    exit 1
     103  fi
     104fi
     105
    93106# Remove old cruft
    94107for x in aclocal.m4 configure config.guess config.log config.sub config.cache config.h.in config.h compile libtool.m4 ltoptions.m4 ltsugar.m4 ltversion.m4 ltmain.sh libtool ltconfig missing mkinstalldirs depcomp install-sh; do rm -f $x autotools/$x; if test -n "$auxdir"; then rm -f "$auxdir/$x"; fi; done
     
    118131  autoheader${acvers}
    119132fi
    120 #add --include-deps if you want to bootstrap with any other compiler than gcc
    121 #automake${amvers} --add-missing --copy --include-deps
    122 automake${amvers} --foreign --add-missing --copy
     133if test "$makefile" = "yes"; then
     134  #add --include-deps if you want to bootstrap with any other compiler than gcc
     135  #automake${amvers} --add-missing --copy --include-deps
     136  automake${amvers} --foreign --add-missing --copy
     137fi
    123138
    124139# Remove cruft that we no longer want
Note: See TracChangeset for help on using the changeset viewer.