]> jfr.im git - irc/freenode/solanum.git/blob - autogen.sh
Remove hardcoded TLSv1 disables
[irc/freenode/solanum.git] / autogen.sh
1 #! /bin/sh
2
3 TOP_DIR=$(dirname $0)
4 LAST_DIR=$PWD
5
6 if test ! -f $TOP_DIR/configure.ac ; then
7 echo "You must execute this script from the top level directory."
8 exit 1
9 fi
10
11 AUTOCONF=${AUTOCONF:-autoconf}
12 ACLOCAL=${ACLOCAL:-aclocal}
13 AUTOMAKE=${AUTOMAKE:-automake}
14 AUTOHEADER=${AUTOHEADER:-autoheader}
15 LIBTOOLIZE=${LIBTOOLIZE:-libtoolize}
16 #SHTOOLIZE=${SHTOOLIZE:-shtoolize}
17
18 dump_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
29 parse_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
48 run_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
80 parse_options "$@"
81
82 echo "Building librb autotools files."
83
84 cd "$TOP_DIR"/librb
85 sh autogen.sh
86
87 echo "Building main autotools files."
88
89 cd "$LAST_DIR"
90
91 run_or_die $ACLOCAL -I m4
92 run_or_die $LIBTOOLIZE --force --copy
93 run_or_die $AUTOHEADER
94 run_or_die $AUTOCONF
95 run_or_die $AUTOMAKE --add-missing --copy
96 #run_or_die $SHTOOLIZE all