annotate autogen.sh @ 406:5928c035fa4e trunk

[svn] Use the pkg-config database to link with libbinio in a portable way. Requires libbinio 1.4 (or higher).
author chainsaw
date Sun, 08 Jan 2006 14:14:06 -0800
parents 82fa2e996291
children 0343f357fae2
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
1 #! /bin/sh
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
2
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
3 TOP_DIR=$(dirname $0)
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
4 LAST_DIR=$PWD
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
5
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
6 if test ! -f $TOP_DIR/configure.ac ; then
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
7 echo "You must execute this script from the top level directory."
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
8 exit 1
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
9 fi
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
10
51
82fa2e996291 [svn] Removing all Makefile.in's
msameer
parents: 0
diff changeset
11 AUTOCONF=${AUTOCONF:-autoconf}
82fa2e996291 [svn] Removing all Makefile.in's
msameer
parents: 0
diff changeset
12 AUTOMAKE=${AUTOMAKE:-automake-1.9}
82fa2e996291 [svn] Removing all Makefile.in's
msameer
parents: 0
diff changeset
13 ACLOCAL=${ACLOCAL:-aclocal-1.9}
82fa2e996291 [svn] Removing all Makefile.in's
msameer
parents: 0
diff changeset
14 AUTOHEADER=${AUTOHEADER:-autoheader}
0
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
15 AUTOPOINT=${AUTOPOINT:-autopoint}
51
82fa2e996291 [svn] Removing all Makefile.in's
msameer
parents: 0
diff changeset
16 LIBTOOLIZE=${LIBTOOLIZE:-libtoolize}
0
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
17
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
18 dump_help_screen ()
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
19 {
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
20 echo "Usage: gen-auto-scripts.sh [options]"
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
21 echo
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
22 echo "options:"
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
23 echo " -n skip CVS changelog creation"
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
24 echo " -h,--help show this help screen"
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
25 echo
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
26 exit 0
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
27 }
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
28
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
29 parse_options ()
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
30 {
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
31 while test "$1" != "" ; do
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
32 case $1 in
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
33 -h|--help)
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
34 dump_help_screen
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
35 ;;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
36 -n)
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
37 SKIP_CVS_CHANGELOG=yes
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
38 ;;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
39 *)
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
40 echo Invalid argument - $1
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
41 dump_help_screen
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
42 ;;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
43 esac
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
44 shift
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
45 done
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
46 }
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
47
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
48 run_or_die ()
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
49 {
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
50 COMMAND=$1
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
51
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
52 # check for empty commands
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
53 if test -z "$COMMAND" ; then
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
54 echo "*warning* no command specified"
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
55 return 1
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
56 fi
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
57
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
58 shift;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
59
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
60 OPTIONS="$@"
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
61
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
62 # print a message
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
63 echo -n "*info* running $COMMAND"
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
64 if test -n "$OPTIONS" ; then
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
65 echo " ($OPTIONS)"
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
66 else
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
67 echo
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
68 fi
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
69
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
70 # run or die
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
71 $COMMAND $OPTIONS ; RESULT=$?
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
72 if test $RESULT -ne 0 ; then
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
73 echo "*error* $COMMAND failed. (exit code = $RESULT)"
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
74 exit 1
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
75 fi
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
76
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
77 return 0
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
78 }
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
79
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
80 parse_options "$@"
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
81
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
82 cd $TOP_DIR
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
83
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
84 run_or_die $AUTOPOINT -f
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
85 run_or_die $LIBTOOLIZE -f -c
51
82fa2e996291 [svn] Removing all Makefile.in's
msameer
parents: 0
diff changeset
86 run_or_die $ACLOCAL -I m4
0
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
87 run_or_die $AUTOHEADER
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
88 run_or_die $AUTOCONF
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
89 run_or_die $AUTOMAKE -a -c
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
90
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
91 cd $LAST_DIR
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
92