Ignore:
Timestamp:
Apr 26, 2008, 9:25:03 AM (13 years ago)
Author:
Sam Hocevar
Message:
  • Update build system and licensing terms to 2008 standards.
Location:
pwntcha/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • pwntcha/trunk

    • Property svn:ignore
      •  

        old new  
        11Makefile.in
        22Makefile
         3.auto
        34aclocal.m4
        45autom4te.cache
        5 autotools
        66config.h.in
        77config.h
  • pwntcha/trunk/bootstrap

    r381 r2315  
    11#! /bin/sh
     2# $Id: bootstrap 1966 2008-02-17 08:29:51Z sam $
    23
    3 ##  bootstrap file for Elk -- Sam Hocevar <sam@zoy.org>
    4 ##  $Id: bootstrap 253 2004-08-09 20:08:52Z sam $
     4# bootstrap: generic bootstrap/autogen.sh script for autotools projects
     5#
     6# Copyright (c) 2002-2008 Sam Hocevar <sam@zoy.org>
     7#
     8#    This program is free software. It comes without any warranty, to
     9#    the extent permitted by applicable law. You can redistribute it
     10#    and/or modify it under the terms of the Do What The Fuck You Want
     11#    To Public License, Version 2, as published by Sam Hocevar. See
     12#    http://sam.zoy.org/wtfpl/COPYING for more details.
     13#
     14# The latest version of this script can be found at the following place:
     15#   http://sam.zoy.org/autotools/
    516
    6 set -x
     17# Die if an error occurs
    718set -e
    819
    9 # Get a sane environment, just in case
    10 LANG=C
    11 export LANG
    12 CYGWIN=binmode
    13 export CYGWIN
     20# Guess whether we are using configure.ac or configure.in
     21if test -f configure.ac; then
     22  conffile="configure.ac"
     23elif test -f configure.in; then
     24  conffile="configure.in"
     25else
     26  echo "$0: could not find configure.ac or configure.in"
     27  exit 1
     28fi
     29
     30# Check for needed features
     31auxdir="`sed -ne 's/^[ \t]*A._CONFIG_AUX_DIR *([[ ]*\([^] )]*\).*/\1/p' $conffile`"
     32libtool="`grep -q '^[ \t]*A._PROG_LIBTOOL' $conffile && echo yes || echo no`"
     33header="`grep -q '^[ \t]*A._CONFIG_HEADER' $conffile && echo yes || echo no`"
     34aclocalflags="`sed -ne 's/^[ \t]*ACLOCAL_AMFLAGS[ \t]*=//p' Makefile.am`"
    1435
    1536# Check for automake
    1637amvers="no"
    17 if automake-1.9 --version >/dev/null 2>&1; then
    18   amvers="-1.9"
    19 elif automake-1.8 --version >/dev/null 2>&1; then
    20   amvers="-1.8"
    21 elif automake-1.7 --version >/dev/null 2>&1; then
    22   amvers="-1.7"
    23 elif automake-1.6 --version >/dev/null 2>&1; then
    24   amvers="-1.6"
    25 elif automake-1.5 --version >/dev/null 2>&1; then
    26   amvers="-1.5"
    27 elif automake --version > /dev/null 2>&1; then
     38for v in 11 10 9 8 7 6 5; do
     39  if automake-1.${v} --version >/dev/null 2>&1; then
     40    amvers="-1.${v}"
     41    break
     42  elif automake1.${v} --version >/dev/null 2>&1; then
     43    amvers="1.${v}"
     44    break
     45  fi
     46done
     47
     48if test "${amvers}" = "no" && automake --version > /dev/null 2>&1; then
    2849  amvers="`automake --version | sed -e '1s/[^0-9]*//' -e q`"
    2950  if expr "$amvers" "<" "1.5" > /dev/null 2>&1; then
     
    3556
    3657if test "$amvers" = "no"; then
    37   set +x
    3858  echo "$0: you need automake version 1.5 or later"
    3959  exit 1
    4060fi
    4161
     62# Check for autoconf
     63acvers="no"
     64for v in "" "259" "253"; do
     65  if autoconf${v} --version >/dev/null 2>&1; then
     66    acvers="${v}"
     67    break
     68  fi
     69done
     70
     71if test "$acvers" = "no"; then
     72  echo "$0: you need autoconf"
     73  exit 1
     74fi
     75
     76# Check for libtool
     77if test "$libtool" = "yes"; then
     78  libtoolize="no"
     79  if glibtoolize --version >/dev/null 2>&1; then
     80    libtoolize="glibtoolize"
     81  else
     82    for v in "16" "15" "" "14"; do
     83      if libtoolize${v} --version >/dev/null 2>&1; then
     84        libtoolize="libtoolize${v}"
     85        break
     86      fi
     87    done
     88  fi
     89
     90  if test "$libtoolize" = "no"; then
     91    echo "$0: you need libtool"
     92    exit 1
     93  fi
     94fi
     95
    4296# Remove old cruft
    43 rm -f aclocal.m4 configure config.guess config.log config.sub config.cache config.h.in config.h compile ltmain.sh libtool ltconfig missing mkinstalldirs depcomp install-sh INSTALL
    44 rm -Rf autom4te.cache autotools
    45 mkdir autotools
     97for 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
     98rm -Rf autom4te.cache
     99if test -n "$auxdir"; then
     100  if test ! -d "$auxdir"; then
     101    mkdir "$auxdir"
     102  fi
     103  aclocalflags="${aclocalflags} -I $auxdir -I ."
     104fi
    46105
    47 aclocal${amvers}
    48 autoconf
    49 autoheader
    50 automake${amvers} --add-missing --copy
     106# Explain what we are doing from now
     107set -x
    51108
     109# Bootstrap package
     110if test "$libtool" = "yes"; then
     111  ${libtoolize} --copy --force
     112  if test -n "$auxdir" -a ! "$auxdir" = "." -a -f "ltmain.sh"; then
     113    echo "$0: working around a minor libtool issue"
     114    mv ltmain.sh "$auxdir/"
     115  fi
     116fi
     117
     118aclocal${amvers} ${aclocalflags}
     119autoconf${acvers}
     120if test "$header" = "yes"; then
     121  autoheader${acvers}
     122fi
     123#add --include-deps if you want to bootstrap with any other compiler than gcc
     124#automake${amvers} --add-missing --copy --include-deps
     125automake${amvers} --foreign --add-missing --copy
     126
     127# Remove cruft that we no longer want
     128rm -Rf autom4te.cache
     129
Note: See TracChangeset for help on using the changeset viewer.