annotate autogen.sh @ 16:6a86fdd4dea4 trunk

[svn] Replacement libmp4v2.
author nenolod
date Mon, 24 Oct 2005 15:33:32 -0700
parents cb178e5ad177
children 82fa2e996291
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
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
11 AUTOCONF=${AUTOCONF:-autoconf259}
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
12 AUTOMAKE=${AUTOMAKE:-automake19}
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
13 ACLOCAL=${ACLOCAL:-aclocal19}
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
14 AUTOHEADER=${AUTOHEADER:-autoheader259}
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
15 AUTOPOINT=${AUTOPOINT:-autopoint}
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
16 LIBTOOLIZE=${LIBTOOLIZE:-libtoolize15}
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
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
86 run_or_die $ACLOCAL -I m4 -I /usr/local/share/aclocal
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