/ autogen.sh
autogen.sh
 1  #! /bin/sh
 2  #
 3  # Copyright (c) 2002  Daniel Elstner  <daniel.elstner@gmx.net>,
 4  #               2003  Murray Cumming  <murrayc@usa.net>
 5  #
 6  # This program is free software; you can redistribute it and/or modify
 7  # it under the terms of the GNU General Public License VERSION 2 as
 8  # published by the Free Software Foundation.  You are not allowed to
 9  # use any other version of the license; unless you got the explicit
10  # permission from the author to do so.
11  #
12  # This program is distributed in the hope that it will be useful,
13  # but WITHOUT ANY WARRANTY; without even the implied warranty of
14  # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15  # GNU General Public License for more details.
16  #
17  # You should have received a copy of the GNU General Public License
18  # along with this program; if not, write to the Free Software
19  # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
20  
21  
22  # This is meant to be a well-documented, good example of an autogen.sh script
23  # Please email gnome-devel-list@gnome.org if you think it isn't.
24  
25  
26  dir=`echo "$0" | sed 's,[^/]*$,,'`
27  test "x${dir}" = "x" && dir='.'
28  
29  if test "x`cd "${dir}" 2>/dev/null && pwd`" != "x`pwd`"
30  then
31      echo "This script must be executed directly from the source directory."
32      exit 1
33  fi
34  
35  # This might not be necessary with newer autotools:
36  rm -f config.cache
37  
38  # We use glib-gettextize, which apparently does not add the intl directory 
39  # (containing a local copy of libintl code), and therefore has a slightly different Makefile.
40  echo "- glib-gettextize."	&& \
41    glib-gettextize --copy --force 	&& \
42  echo "- libtoolize."		&& \
43    libtoolize --force	&& \
44  echo "- intltoolize."		&& \
45    intltoolize --copy --force	&& \
46  echo "- aclocal"		&& \
47    aclocal 			&& \
48  echo "- autoheader"		&& \
49    autoheader			&& \
50  echo "- autoconf."		&& \
51    autoconf			&& \
52  echo "- automake."		&& \
53    automake --add-missing --gnu	&& \
54  echo				&& \
55    ./configure "$@"		&& exit 0
56  
57  exit 1
58