gmrun/autogen.sh

46 lines
1.4 KiB
Bash
Raw Normal View History

2001-02-23 07:48:14 +00:00
#!/bin/sh
2020-08-24 11:27:20 +00:00
# Run this to generate all the initial makefiles, etc.
2001-02-23 07:48:14 +00:00
2021-01-07 12:21:11 +00:00
srcdir=`dirname $0`
test -z "$srcdir" && srcdir=.
cd $srcdir
2020-08-24 11:27:20 +00:00
test -z "$AUTOMAKE" && AUTOMAKE=automake
test -z "$ACLOCAL" && ACLOCAL=aclocal
test -z "$AUTOCONF" && AUTOCONF=autoconf
test -z "$AUTOHEADER" && AUTOHEADER=autoheader
2021-01-07 12:21:11 +00:00
test -z "$LIBTOOLIZE" && LIBTOOLIZE=$(which libtoolize glibtoolize 2>/dev/null | head -1)
test -z "$LIBTOOLIZE" && LIBTOOLIZE=libtoolize #paranoid precaution
2001-02-23 07:48:14 +00:00
2021-01-07 12:21:11 +00:00
if test "$1" == "verbose" || test "$1" == "--verbose" ; then
set -x
verbose='--verbose'
verbose2='--debug'
fi
2020-08-24 11:27:20 +00:00
2021-01-07 12:21:11 +00:00
# Get all required m4 macros required for configure
$LIBTOOLIZE ${verbose} --copy --force || exit 1
$ACLOCAL ${verbose} -I m4 || exit 1
2001-02-23 07:48:14 +00:00
2021-01-07 12:21:11 +00:00
# Generate config.h.in
$AUTOHEADER ${verbose} --force || exit 1
2001-02-23 07:48:14 +00:00
2021-01-07 12:21:11 +00:00
# Generate Makefile.in's
2020-08-24 11:27:20 +00:00
touch config.rpath
2021-01-07 12:21:11 +00:00
$AUTOMAKE ${verbose} --add-missing --copy --force || exit 1
2020-08-24 11:27:20 +00:00
if grep "IT_PROG_INTLTOOL" configure.ac >/dev/null ; then
2021-01-07 12:21:11 +00:00
intltoolize ${verbose2} -c --automake --force || exit 1
2020-08-24 11:27:20 +00:00
# po/Makefile.in.in has these lines:
# mostlyclean:
# rm -f *.pox $(GETTEXT_PACKAGE).pot *.old.po cat-id-tbl.tmp
# prevent $(GETTEXT_PACKAGE).pot from being deleted by `make clean`
sed 's/pox \$(GETTEXT_PACKAGE).pot/pox/' po/Makefile.in.in > po/Makefile.in.inx
mv -f po/Makefile.in.inx po/Makefile.in.in
fi
2021-01-07 12:21:11 +00:00
# generate configure
$AUTOCONF ${verbose} --force || exit 1
2020-08-24 11:27:20 +00:00
2021-01-07 12:21:11 +00:00
rm -rf autom4te.cache