-
Notifications
You must be signed in to change notification settings - Fork 31
/
Copy pathautogen.sh
executable file
·65 lines (59 loc) · 1.13 KB
/
autogen.sh
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#!/bin/bash -e
v() { echo "$@"; "$@"; }
m4dir="autotools/m4"
# check for dependencies
if ! qlist -qI dev-libs/gnulib > /dev/null ; then
echo "please install dev-libs/gnulib"
exit 1
fi
if ! qlist -qI dev-build/autoconf-archive > /dev/null ; then
echo "please install dev-build/autoconf-archive"
exit 1
fi
# keep this list updated with non-generated M4 files
keepm4=( ac_check_sendfile.m4 )
for keepf in "${keepm4[@]}" ; do
v mv "${m4dir}/${keepf}" "autotools/"
done
v rm -rf autotools/{gnulib,m4}
v mkdir "${m4dir}"
for keepf in "${keepm4[@]}" ; do
v mv "autotools/${keepf}" "${m4dir}/"
done
# reload the gnulib code
PATH=/usr/local/src/gnu/gnulib:${PATH}
mods="
crypto/md5-buffer
crypto/sha1-buffer
crypto/sha256-buffer
crypto/sha512-buffer
dirent
faccessat
fdopendir
fstatat
futimens
getline
getopt-posix
inttypes
mkdirat
openat
readlinkat
renameat
stat-time
strcasestr-simple
strncat
strtoll
symlinkat
sys_stat
unlinkat
utimensat
vasprintf-posix
xalloc
"
v gnulib-tool \
--source-base=autotools/gnulib --m4-base=autotools/m4 \
--import \
--no-vc-files \
${mods}
export AUTOMAKE="automake --foreign"
v autoreconf -i -f