]> jfr.im git - solanum.git/blame - librb/autogen.sh
doc/reference.conf: document the auth::umodes configuration option
[solanum.git] / librb / autogen.sh
CommitLineData
f9b3182c
AC
1#! /bin/sh
2
3TOP_DIR=$(dirname $0)
4LAST_DIR=$PWD
5
6if test ! -f $TOP_DIR/configure.ac ; then
7 echo "You must execute this script from the top level directory."
8 exit 1
9fi
10
11AUTOCONF=${AUTOCONF:-autoconf}
12ACLOCAL=${ACLOCAL:-aclocal}
13AUTOMAKE=${AUTOMAKE:-automake}
14AUTOHEADER=${AUTOHEADER:-autoheader}
15LIBTOOLIZE=${LIBTOOLIZE:-libtoolize}
efc4b18c 16#SHTOOLIZE=${SHTOOLIZE:-shtoolize}
f9b3182c
AC
17
18dump_help_screen ()
19{
20 echo "Usage: $0 [options]"
21 echo
22 echo "options:"
23 echo " -n skip CVS changelog creation"
24 echo " -h,--help show this help screen"
25 echo
26 exit 0
27}
28
29parse_options ()
30{
31 while test "$1" != "" ; do
32 case $1 in
33 -h|--help)
34 dump_help_screen
35 ;;
36 -n)
37 SKIP_CVS_CHANGELOG=yes
38 ;;
39 *)
40 echo Invalid argument - $1
41 dump_help_screen
42 ;;
43 esac
44 shift
45 done
46}
47
48run_or_die ()
49{
50 COMMAND=$1
51
52 # check for empty commands
53 if test -z "$COMMAND" ; then
54 echo "*warning* no command specified"
55 return 1
56 fi
57
58 shift;
59
60 OPTIONS="$@"
61
62 # print a message
63 echo -n "*info* running $COMMAND"
64 if test -n "$OPTIONS" ; then
65 echo " ($OPTIONS)"
66 else
67 echo
68 fi
69
70 # run or die
71 $COMMAND $OPTIONS ; RESULT=$?
72 if test $RESULT -ne 0 ; then
73 echo "*error* $COMMAND failed. (exit code = $RESULT)"
74 exit 1
75 fi
76
77 return 0
78}
79
80parse_options "$@"
81
82cd $TOP_DIR
83
066b05df 84run_or_die $ACLOCAL -I ../m4
f9b3182c
AC
85run_or_die $LIBTOOLIZE --force --copy
86run_or_die $AUTOHEADER
87run_or_die $AUTOCONF
a4cac7ee 88run_or_die $AUTOMAKE --add-missing --copy
efc4b18c 89#run_or_die $SHTOOLIZE all