source: libcaca/trunk/bootstrap @ 475

Last change on this file since 475 was 475, checked in by Sam Hocevar, 15 years ago
  • Use libtool for the static library generation; paves the way for a future shared library.
  • Property svn:executable set to *
  • Property svn:keywords set to Id
File size: 1.6 KB
Line 
1#! /bin/sh
2
3##  bootstrap file for libcaca -- Sam Hocevar <sam@zoy.org>
4##  $Id: bootstrap 475 2005-03-26 10:27:30Z sam $
5
6set -x
7set -e
8
9# Get a sane environment, just in case
10LANG=C
11export LANG
12CYGWIN=binmode
13export CYGWIN
14
15# Check for automake
16amvers="no"
17if automake-1.8 --version >/dev/null 2>&1; then
18  amvers="-1.8"
19elif automake-1.7 --version >/dev/null 2>&1; then
20  amvers="-1.7"
21elif automake-1.6 --version >/dev/null 2>&1; then
22  amvers="-1.6"
23elif automake-1.5 --version >/dev/null 2>&1; then
24  amvers="-1.5"
25elif automake --version > /dev/null 2>&1; then
26  amvers="`automake --version | sed -e '1s/[^0-9]*//' -e q`"
27  if expr "$amvers" "<" "1.5" > /dev/null 2>&1; then
28    amvers="no"
29  else
30    amvers=""
31  fi
32fi
33
34if test "$amvers" = "no"; then
35  set +x
36  echo "$0: you need automake version 1.5 or later"
37  exit 1
38fi
39
40libtoolize="no"
41if glibtoolize --version >/dev/null 2>&1; then
42  libtoolize="glibtoolize"
43elif libtoolize --version >/dev/null 2>&1; then
44  libtoolize="libtoolize"
45fi
46
47if test "$libtoolize" = "no"; then
48  set +x
49  echo "$0: you need libtool"
50  exit 1
51fi
52
53# Remove old cruft
54rm -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
55rm -Rf autom4te.cache
56(cd autotools && rm -f config.guess config.sub missing mkinstalldirs compile ltmain.sh depcomp install-sh)
57
58${libtoolize} --copy --force
59if test -f "ltmain.sh"; then
60  echo "$0: working around a minor libtool issue"
61  mv ltmain.sh autotools/
62fi
63
64aclocal${amvers}
65autoconf
66autoheader
67automake${amvers} --add-missing --copy
68
Note: See TracBrowser for help on using the repository browser.