Blame synfig-core/bootstrap.sh

c70f84
#!/bin/sh
c70f84
3ab2ff
set -e
c70f84
dbee69
AUTORECONF=`command -v autoreconf || true` #if don't set true, script fails with no messages
dbee69
if [ -z $AUTORECONF ]; then
c70f84
        echo "*** No autoreconf found, please install it ***"
c70f84
        exit 1
c70f84
fi
c70f84
dbee69
INTLTOOLIZE=`command -v intltoolize || true`
dbee69
if [ -z $INTLTOOLIZE ]; then
c70f84
        echo "*** No intltoolize found, please install the intltool package ***"
c70f84
        exit 1
c70f84
fi
c70f84
dbee69
LIBTOOLIZE=`command -v libtoolize || true`
dbee69
if [ -z $LIBTOOLIZE ]; then
dbee69
        LIBTOOLIZE=`command -v glibtoolize || true`
dbee69
        if ! [ -z $LIBTOOLIZE ]; then
c70f84
                echo "Using glibtoolize. Is it OSX?"
c70f84
        fi
c70f84
fi
c70f84
dbee69
if [ -z $LIBTOOLIZE ]; then
c70f84
        echo "*** No libtoolize nor glibtoolize found, please install the intltool package ***"
c70f84
        exit 1
c70f84
fi
c70f84
c70f84
echo "running libtooize ($LIBTOOLIZE)..."
c70f84
$LIBTOOLIZE  --ltdl --copy --force
c70f84
c70f84
echo "running autopoint..."
c70f84
autopoint --force
c70f84
c70f84
echo "running autoreconf..."
c70f84
AUTOPOINT='intltoolize --automake --copy' autoreconf --force --install --verbose
c70f84
c70f84
# WORKAROUND 2013-08-15:
c70f84
# Patch the generated po/Makefile.in.in file so that locale files are installed
c70f84
# in the correct location on OS X and Free-BSD systems.  This is a workaround
c70f84
# for a bug in intltool.  
c70f84
# See https://launchpad.net/bugs/398571 and https://bugs.launchpad.net/bugs/992047
c70f84
#
c70f84
# TODO: Drop this hack, and bump our intltool version requiement once the issue
c70f84
#       is fixed in intltool
c70f84
48c969
echo "patching po/Makefile.in.in..."
48c969
sed 's/itlocaledir = $(prefix)\/$(DATADIRNAME)\/locale/itlocaledir = $(datarootdir)\/locale/' < po/Makefile.in.in > po/Makefile.in.in.tmp
az 53f712
# -- force didn't work under MacOS
az 53f712
mv -f po/Makefile.in.in.tmp po/Makefile.in.in
az 53f712
c70f84
echo "Done! Please run ./configure now."