-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathautogen.sh
More file actions
executable file
·40 lines (36 loc) · 1.06 KB
/
autogen.sh
File metadata and controls
executable file
·40 lines (36 loc) · 1.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/bin/bash
if [ "$(which libtoolize)x" = "x" ]; then
LIBTOOLIZE=glibtoolize
else
LIBTOOLIZE=libtoolize
fi
touch config.rpath
aclocal &&
autoconf &&
$LIBTOOLIZE &&
automake --add-missing;
echo -n "generating metha.h installation header... "
metha_h_success="no"
pwd_backup=`pwd`
cd src/libmetha/;
if test -f "include/metha.h"; then
chmod u+w include/metha.h
fi
echo "#ifndef _METHA__H_" > include/metha.h &&
echo "#define _METHA__H_" >> include/metha.h &&
echo "/**" >> include/metha.h &&
echo " * metha.h - $(date)" >> include/metha.h &&
echo " * Automatically generated for modules and clients." >> include/metha.h &&
echo " * License: http://bithack.se/projects/methabot/license.html" >> include/metha.h &&
echo " **/" >> include/metha.h &&
echo "" >> include/metha.h &&
cat include/metha.h.in >> include/metha.h &&
cat *.h | grep -f include/functions.grep | grep -f include/filter.grep >> include/metha.h &&
echo "#endif" >> include/metha.h &&
metha_h_success="yes"
cd $pwd_backup
if test "x$metha_h_success" = "xyes"; then
echo "ok"
else
echo "failed"
fi