ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/ermyth/autogen.sh
Revision: 1.1
Committed: Thu Jul 19 08:24:47 2007 UTC (16 years, 10 months ago) by pippijn
Content type: application/x-sh
Branch: MAIN
CVS Tags: HEAD
Log Message:
initial import. the most important changes since Atheme are:
- fixed many memory leaks
- fixed many bugs
- converted to C++ and use more STL containers
- added a (not very enhanced yet) perl module
- greatly improved XML-RPC speed
- added a JSON-RPC module with code from json-cpp
- added a valgrind memcheck module to operserv
- added a more object oriented base64 implementation
- added a specialised unit test framework
- improved stability
- use gettimeofday() if available
- reworked adding/removing commands
- MemoServ IGNORE DEL can now remove indices

File Contents

# User Rev Content
1 pippijn 1.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     # hack for freebsd -- jilles
12     [ -d /usr/local/libexec/autoconf259 ] && PATH="$PATH:/usr/local/libexec/autoconf259"
13     [ -d /usr/local/libexec/automake19 ] && PATH="$PATH:/usr/local/libexec/automake19"
14    
15     AUTOCONF=${AUTOCONF:-autoconf}
16     ACLOCAL=${ACLOCAL:-aclocal}
17     AUTOHEADER=${AUTOHEADER:-autoheader}
18    
19     dump_help_screen ()
20     {
21     echo "Usage: $0 [options]"
22     echo
23     echo "options:"
24     echo " -n skip CVS changelog creation"
25     echo " -h,--help show this help screen"
26     echo
27     exit 0
28     }
29    
30     parse_options ()
31     {
32     while test "$1" != ""; do
33     case $1 in
34     -h|--help)
35     dump_help_screen
36     ;;
37     -n)
38     SKIP_CVS_CHANGELOG=yes
39     ;;
40     *)
41     echo Invalid argument - $1
42     dump_help_screen
43     ;;
44     esac
45     shift
46     done
47     }
48    
49     run_or_die ()
50     {
51     COMMAND=$1
52    
53     # check for empty commands
54     if test -z "$COMMAND"; then
55     echo "*warning* no command specified"
56     return 1
57     fi
58    
59     shift;
60    
61     OPTIONS="$@"
62    
63     # print a message
64     echo -n "*info* running $COMMAND"
65     if test -n "$OPTIONS"; then
66     echo " ($OPTIONS)"
67     else
68     echo
69     fi
70    
71     # run or die
72     $COMMAND $OPTIONS; RESULT=$?
73     if test $RESULT -ne 0; then
74     echo "*error* $COMMAND failed. (exit code = $RESULT)"
75     exit 1
76     fi
77    
78     return 0
79     }
80    
81     parse_options "$@"
82    
83     cd $TOP_DIR
84    
85     run_or_die $ACLOCAL -I m4
86     run_or_die $AUTOHEADER
87     run_or_die $AUTOCONF
88    
89     cd $LAST_DIR