Fix version.sh compatiblity with Solaris
[xz/debian.git] / autogen.sh
blob3ac75e84c2ff36b91d0169a026cc8f05b6aa0c42
1 #!/bin/sh
2 # SPDX-License-Identifier: 0BSD
4 ###############################################################################
6 # Author: Lasse Collin
8 ###############################################################################
10 set -e -x
12 # The following six lines are almost identical to "autoreconf -fi" but faster.
13 ${AUTOPOINT:-autopoint} -f
14 ${LIBTOOLIZE:-libtoolize} -c -f || glibtoolize -c -f
15 ${ACLOCAL:-aclocal} -I m4
16 ${AUTOCONF:-autoconf}
17 ${AUTOHEADER:-autoheader}
18 ${AUTOMAKE:-automake} -acf --foreign
20 # Generate the translated man pages if the "po4a" tool is available.
21 # This is *NOT* done by "autoreconf -fi" or when "make" is run.
22 # Pass --no-po4a o this script to skip this step.
23 # It can be useful when you know that po4a isn't available and
24 # don't want autogen.sh to exit with non-zero exit status.
25 generate_po4a="y"
27 for arg in "$@"
29 case $arg in
30 "--no-po4a")
31 generate_po4a="n"
33 esac
34 done
36 if test "$generate_po4a" != "n"; then
37 cd po4a
38 sh update-po
39 cd ..
42 exit 0