]> jfr.im git - irc/weechat/weechat.git/blob - autogen.sh
relay: fix crash when decoding a malformed websocket frame (CVE-2021-40516)
[irc/weechat/weechat.git] / autogen.sh
1 #!/bin/sh
2 #
3 # Copyright (C) 2003-2018 Sébastien Helleu <flashcode@flashtux.org>
4 # Copyright (C) 2005 Julien Louis <ptitlouis@sysif.net>
5 # Copyright (C) 2005-2006 Emmanuel Bouthenot <kolter@openics.org>
6 #
7 # This file is part of WeeChat, the extensible chat client.
8 #
9 # WeeChat is free software; you can redistribute it and/or modify
10 # it under the terms of the GNU General Public License as published by
11 # the Free Software Foundation; either version 3 of the License, or
12 # (at your option) any later version.
13 #
14 # WeeChat is distributed in the hope that it will be useful,
15 # but WITHOUT ANY WARRANTY; without even the implied warranty of
16 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 # GNU General Public License for more details.
18 #
19 # You should have received a copy of the GNU General Public License
20 # along with WeeChat. If not, see <http://www.gnu.org/licenses/>.
21 #
22
23 ###
24 ### common stuff
25 ###
26
27 DIR=$(cd $(dirname "$0"); pwd)
28 cd $DIR
29
30 AUTOGEN_LOG=autogen.log
31
32 err ()
33 {
34 echo "-------"
35 echo "Error :"
36 echo "---8<-----------------------------------"
37 cat $AUTOGEN_LOG
38 echo "----------------------------------->8---"
39 exit 1
40 }
41
42 run ()
43 {
44 echo -n "Running \"$@\"..."
45 eval $@ >$AUTOGEN_LOG 2>&1
46 if [ $? = 0 ] ; then
47 echo " OK"
48 else
49 echo " FAILED"
50 err
51 fi
52 }
53
54 # remove autotools stuff
55 run "rm -f config.h.in"
56 run "rm -f aclocal.m4 configure config.log config.status"
57 run "rm -rf autom4te*.cache"
58
59 # remove libtool stuff
60 run "rm -f libtool"
61
62 # remove gettext stuff
63 run "rm -f ABOUT-NLS"
64 run "rm -rf intl"
65
66 # execute autoreconf cmds
67 run "autoreconf -vi"
68
69 # ending
70 rm -f $AUTOGEN_LOG