Fixed indentation in cell format dialog. [#683576]
[gnumeric.git] / autogen.sh
blob1c9950aeed3d5c3cc9a9bb8ea43e0cdd283f0a96
1 #!/bin/sh
2 # Run this to generate all the initial makefiles, etc.
4 PKG_NAME="Gnumeric"
6 REQUIRED_AUTOMAKE_VERSION=1.9.0
7 REQUIRED_LIBTOOL_VERSION=1.4.3
9 # We use the XGETTEXT_KEYWORDS variable, thus we require:
10 REQUIRED_INTLTOOL_VERSION=0.29
12 # We require Automake 1.7.2, which requires Autoconf 2.54.
13 # (It needs _AC_AM_CONFIG_HEADER_HOOK, for example.)
14 REQUIRED_AUTOCONF_VERSION=2.54
16 USE_GNOME2_MACROS=1
17 USE_COMMON_DOC_BUILD=yes
19 srcdir=`dirname $0`
20 test -z "$srcdir" && srcdir=.
22 (test -f $srcdir/configure.in \
23 && test -d $srcdir/src \
24 && test -f $srcdir/src/gnumeric.h) || {
25 echo -n "**Error**: Directory "\`$srcdir\'" does not look like the"
26 echo " top-level gnumeric directory"
27 exit 1
30 ifs_save="$IFS"; IFS=":"
31 for dir in $PATH ; do
32 IFS="$ifs_save"
33 test -z "$dir" && dir=.
34 if test -f "$dir/gnome-autogen.sh" ; then
35 gnome_autogen="$dir/gnome-autogen.sh"
36 gnome_datadir=`echo $dir | sed -e 's,/bin$,/share,'`
37 break
39 done
41 if test -z "$gnome_autogen" ; then
42 echo "You need to install the gnome-common module and make"
43 echo "sure the gnome-autogen.sh script is in your \$PATH."
44 exit 1
47 GNOME_DATADIR="$gnome_datadir"
49 # Dont't run configure yet, ...
50 GNM_NOCONFIGURE=$NOCONFIGURE
51 NOCONFIGURE=1
52 . $gnome_autogen
54 # We have our own copy of Makefile.in.in generated October 2008.
55 # One of the reasons why we need a local copy is that
56 # we generate po-functions/Makefile.in.in from it, which is committed to
57 # SVN, so this file cannot depend on the versions of the tools which the
58 # developers have installed.
60 printbold "Creating po/Makefile.in.in and po-functions/Makefile.in.in."
61 rm -f $srcdir/po/Makefile.in.in $srcdir/po-functions/Makefile.in.in
62 cp $srcdir/po/Makefile.in.in.own $srcdir/po/Makefile.in.in
63 sed '/^\(GETTEXT_PACKAGE\|subdir\) =/s/[ ]*$/-functions/
64 s|$(srcdir)/LINGUAS|$(top_srcdir)/po/LINGUAS|g
65 /^GETTEXT_PACKAGE =/a\
66 XGETTEXT_KEYWORDS = --keyword --keyword=F_
67 /^EXTRA_DISTFILES/s/ LINGUAS//
68 ' $srcdir/po/Makefile.in.in >$srcdir/po-functions/Makefile.in.in
70 printbold "Creating po-functions/POTFILES.{in,skip}."
71 rm -f $srcdir/po-functions/POTFILES.in $srcdir/po-functions/POTFILES.skip
72 # This regex matches names of XML files:
73 xml_file_name='^((schemas|templates)/.+|[^/]+)\.in$|\.(glade|xml)(\.in)?$'
74 ( echo "# Generated by autogen.sh; do not edit."
75 egrep -v "^#|$xml_file_name" $srcdir/po/POTFILES.in
76 ) >$srcdir/po-functions/POTFILES.in
77 ( echo "# Generated by autogen.sh; do not edit."
78 test -f $srcdir/po/POTFILES.skip && grep -v '^#' $srcdir/po/POTFILES.skip
79 egrep "$xml_file_name" $srcdir/po/POTFILES.in
80 ) >$srcdir/po-functions/POTFILES.skip
82 # ... and then proceed.
83 if test "x$GNM_NOCONFIGURE" = x; then
84 printbold Running $srcdir/configure $conf_flags "$@" ...
85 $srcdir/configure $conf_flags "$@" \
86 && echo Now type \`make\' to compile $PKG_NAME || exit 1