tests: use g_object_run_dispose for destroying AdgCanvas
[adg.git] / autogen.sh
blobc7c135104b5d9ac7eecd944e2da0c6c29d351c56
1 #!/bin/sh
3 # Run this to generate the configuration scripts after a fresh
4 # repository clone/checkout.
6 # USAGE: ./autogen.sh [--verbose]
8 # where --verbose shows stdout and stderr of every command (by
9 # default they are redirect to /dev/null).
11 # This script does *not* call configure (as usually done in other
12 # projects) because this would prevent VPATH builds.
14 arg1=$1
16 step() {
17 local message="$1"
18 local command="$2"
20 printf "$message... "
22 if test "$arg1" = --verbose; then
23 eval $command
24 else
25 eval $command >/dev/null 2>&1
27 local result=$?
29 if test "$result" = "0"; then
30 printf "\033[32mok\033[0m\n"
31 else
32 printf "\033[31mfailed\033[0m\n ** \"$command\" returned $result\n"
33 exit $result
38 srcdir=`dirname $0`
39 test -z "$srcdir" && srcdir=.
41 step "Checking for top-level adg directory" \
42 "test -f '$srcdir/configure.ac' -a -f '$srcdir/src/adg.h.in'"
44 cd "$srcdir"
46 step "Creating dummy ChangeLog, if needed" \
47 "test -f './ChangeLog' || touch './ChangeLog'"
49 # autoreconf interaction with libtool has been broken for ages:
50 # explicitely calling libtoolize seems to avoid some problem
51 step "Calling libtoolize" \
52 "libtoolize --automake"
54 # GNU gettext seems to have timestamp problems with git:
55 # https://bugzilla.gnome.org/show_bug.cgi?id=661128
56 step "Making adg.pot look older" \
57 "touch -t 200001010000 po/adg.pot"
59 step "Regenerating autotools files" \
60 "autoreconf -isf -Wall"
63 printf "Now run \033[1m./configure\033[0m to customize your building\n"