Version 1.15.3.
[libguestfs.git] / bootstrap
1 #!/bin/sh
2
3 usage() {
4   echo >&2 "\
5 Usage: $0 [OPTION]...
6 Bootstrap this package from the checked-out sources.
7 "
8 }
9
10 for option
11 do
12   case $option in
13   --help)
14     usage
15     exit;;
16   *)
17     echo >&2 "$0: $option: unknown option"
18     exit 1;;
19   esac
20 done
21
22 # Get gnulib files.
23
24 echo "$0: getting gnulib files..."
25 git submodule init || exit $?
26 git submodule update || exit $?
27 GNULIB_SRCDIR=.gnulib
28
29 ls po/*.po 2>/dev/null | sed 's|.*/||; s|\.po$||' > po/LINGUAS
30
31 # Run autopoint, to get po/Makevars.template:
32 # Also, released autopoint has the tendency to install macros that have
33 # been obsoleted in current gnulib, so run this before gnulib-tool.
34 autopoint --force
35
36 # Autoreconf runs aclocal before libtoolize, which causes spurious
37 # warnings if the initial aclocal is confused by the libtoolized
38 # (or worse out-of-date) macro directory.
39 libtoolize --copy --install
40
41 gnulib_tool=$GNULIB_SRCDIR/gnulib-tool
42 <$gnulib_tool || exit
43
44 (cd daemon && mkdir -p tests lib && ../$gnulib_tool --update)
45
46 modules='
47 arpa_inet
48 byteswap
49 c-ctype
50 closeout
51 connect
52 error
53 filevercmp
54 fsusage
55 fts
56 full-read
57 full-write
58 futimens
59 getaddrinfo
60 getline
61 gitlog-to-changelog
62 glob
63 gnu-make
64 gnumakefile
65 hash
66 hash-pjw
67 human
68 ignore-value
69 lock
70 maintainer-makefile
71 manywarnings
72 mkdtemp
73 netdb
74 netinet_in
75 openat
76 perror
77 pread
78 progname
79 read-file
80 readlink
81 select
82 setenv
83 sleep
84 socket
85 strchrnul
86 strerror
87 strndup
88 symlinkat
89 sys_select
90 sys_wait
91 vasprintf
92 vc-list-files
93 warnings
94 xalloc
95 xalloc-die
96 xstrtol
97 xstrtoll
98 xvasprintf
99 '
100
101 $gnulib_tool                    \
102   --avoid=dummy                 \
103   --with-tests                  \
104   --m4-base=m4                  \
105   --source-base=gnulib/lib      \
106   --tests-base=gnulib/tests     \
107   --libtool                     \
108   --import $modules
109
110 # Disable autopoint and libtoolize, since they were already done above.
111 AUTOPOINT=true LIBTOOLIZE=true autoreconf --verbose --install