Better error message when defaults file is missing.
[xfwm4.git] / autogen.sh
blobea1f7d6a8d6d74a09046ee23eecb26e1cbe41669
1 #!/bin/sh
3 # $Id$
5 # Copyright (c) 2002-2005
6 # The Xfce development team. All rights reserved.
8 # Written for Xfce by Benedikt Meurer <benny@xfce.org>.
11 # Set locale to C to avoid troubles with "svn info" output parsing
12 LC_ALL=C
13 LANG=C
14 export LC_ALL LANG
16 (type xdt-autogen) >/dev/null 2>&1 || {
17 cat >&2 <<EOF
18 autogen.sh: You don't seem to have the Xfce development tools installed on
19 your system, which are required to build this software.
20 Please install the xfce4-dev-tools package first, it is available
21 from http://www.xfce.org/.
22 EOF
23 exit 1
26 # verify that po/LINGUAS is present
27 (test -f po/LINGUAS) >/dev/null 2>&1 || {
28 cat >&2 <<EOF
29 autogen.sh: The file po/LINGUAS could not be found. Please check your snapshot
30 or try to checkout again.
31 EOF
32 exit 1
35 echo "Creating configure.ac"
37 # substitute revision and linguas
38 linguas=`sed -e '/^#/d' po/LINGUAS`
39 revision=`LC_ALL=C svn info $0 | awk '/^Revision: / {printf "%05d\n", $2}'`
40 sed -e "s/@LINGUAS@/${linguas}/g" \
41 -e "s/@REVISION@/${revision}/g" \
42 < "configure.ac.in" > "configure.ac"
44 exec xdt-autogen $@
46 # vi:set ts=2 sw=2 et ai: