Ignore:
Timestamp:
Oct 18, 2008, 11:42:24 PM (11 years ago)
Author:
Sam Hocevar
Message:

Port ttyvaders to the unified libcaca 0.99.beta15 API.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • ttyvaders/trunk/bootstrap

    r989 r2990  
    11#! /bin/sh
     2# $Id$
    23
    3 # bootstrap: the ultimate bootstrap/autogen.sh script for autotools projects
    4 # Copyright (c) 2002, 2003, 2004, 2005, 2006 Sam Hocevar <sam@zoy.org>
     4# bootstrap: generic bootstrap/autogen.sh script for autotools projects
    55#
    6 #    This program is free software; you can redistribute it and/or
    7 #    modify it under the terms of the Do What The Fuck You Want To
    8 #    Public License, Version 2, as published by Sam Hocevar. See
     6# Copyright (c) 2002-2007 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
    912#    http://sam.zoy.org/wtfpl/COPYING for more details.
    1013#
     
    2629
    2730# Check for needed features
    28 auxdir="`sed -ne 's/^[ \t]*A._CONFIG_AUX_DIR *( *\([^ )]*\).*/\1/p' $conffile`"
     31auxdir="`sed -ne 's/^[ \t]*A._CONFIG_AUX_DIR *([[ ]*\([^] )]*\).*/\1/p' $conffile`"
    2932libtool="`grep -q '^[ \t]*A._PROG_LIBTOOL' $conffile && echo yes || echo no`"
     33pkgconfig="`grep -q '^[ \t]*PKG_PROG_PKG_CONFIG' $conffile && echo yes || echo no`"
    3034header="`grep -q '^[ \t]*A._CONFIG_HEADER' $conffile && echo yes || echo no`"
    3135aclocalflags="`sed -ne 's/^[ \t]*ACLOCAL_AMFLAGS[ \t]*=//p' Makefile.am`"
     
    3337# Check for automake
    3438amvers="no"
    35 for v in "-1.9" "19" "-1.8" "18" "-1.7" "17" "-1.6" "16" "-1.5" "15"; do
    36   if automake${v} --version >/dev/null 2>&1; then
    37     amvers="${v}"
     39for v in 10 9 8 7 6 5; do
     40  if automake-1.${v} --version >/dev/null 2>&1; then
     41    amvers="-1.${v}"
     42    break
     43  elif automake1.${v} --version >/dev/null 2>&1; then
     44    amvers="1.${v}"
    3845    break
    3946  fi
     
    8895fi
    8996
     97# Check for pkg-config
     98if test "$pkgconfig" = "yes"; then
     99  if ! pkg-config --version >/dev/null 2>&1; then
     100    echo "$0: you need pkg-config"
     101    exit 1
     102  fi
     103fi
     104
    90105# Remove old cruft
    91106for 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
    92107rm -Rf autom4te.cache
    93 if test -n "$auxdir" -a ! -d "$auxdir"; then mkdir "$auxdir"; fi
     108if test -n "$auxdir"; then
     109  if test ! -d "$auxdir"; then
     110    mkdir "$auxdir"
     111  fi
     112  aclocalflags="${aclocalflags} -I $auxdir -I ."
     113fi
    94114
    95115# Explain what we are doing from now
     
    99119if test "$libtool" = "yes"; then
    100120  ${libtoolize} --copy --force
    101   if test -n "$auxdir" -a -f "ltmain.sh"; then
     121  if test -n "$auxdir" -a ! "$auxdir" = "." -a -f "ltmain.sh"; then
    102122    echo "$0: working around a minor libtool issue"
    103123    mv ltmain.sh "$auxdir/"
     
    105125fi
    106126
    107 if test -n "$auxdir"; then
    108   aclocal${amvers} -I autotools ${aclocalflags}
    109 else
    110   aclocal${amvers} ${aclocalflags}
    111 fi
     127aclocal${amvers} ${aclocalflags}
    112128autoconf${acvers}
    113129if test "$header" = "yes"; then
Note: See TracChangeset for help on using the changeset viewer.