(mc_tmpdir): reduce variable scope.
[midnight-commander.git] / autogen.sh
blobf17c51a9def23251bdb7079707dfefa8f42f47e0
1 #!/bin/sh
3 set -e
5 # Use backticks to support ksh on Solaris
6 basedir=`dirname "$0"`
7 srcdir=`cd "$basedir" && pwd`
9 cd "$srcdir"
11 ${AUTORECONF:-autoreconf} --verbose --install --force -I m4 ${AUTORECONF_FLAGS}
13 # Customize the INSTALL file
14 rm -f INSTALL && ln -s doc/INSTALL .
16 # Generate po/POTFILES.in
17 if ! xgettext -h 2>&1 | grep -e '--keyword=' >/dev/null ; then
18 echo "gettext is unable to extract translations, set XGETTEXT to GNU gettext!" >&2
19 else
20 ${XGETTEXT:-xgettext} --keyword=_ --keyword=N_ --keyword=Q_ --output=- \
21 `find . -name '*.[ch]'` | ${SED-sed} -ne '/^#:/{s/#://;s/:[0-9]*/\
22 /g;s/ //g;p;}' | \
23 grep -v '^$' | sort | uniq >po/POTFILES.in
26 "$srcdir/version.sh" "$srcdir"
28 if test -x "$srcdir/configure.mc"; then
29 "$srcdir/configure.mc" "$@"