autogen.sh 1.22 KB
Newer Older
dkirov's avatar
dkirov committed
1
#!/usr/bin/env bash
2
  AM_ARGS="--add-missing --gnu --copy -Wno-portability"
3 4
  CONF_ARGS=""

5
  echo "[encoding: UTF-8]" > po/POTFILES.in \
6 7
  && for p in `ls data/gui/*.ui`; do echo "[type: gettext/glade]$p" >> \
  po/POTFILES.in; done \
8
  && ls -1 data/gajim.desktop.in.in data/gajim-remote.desktop.in.in \
9
  src/*.py src/common/*.py src/command_system/*.py src/command_system/implementation/*.py src/common/zeroconf/*.py src/plugins/*.py | grep -v ipython_view.py >> \
10
  po/POTFILES.in \
11
  && echo -e "data/gajim.desktop.in\ndata/gajim-remote.desktop.in\nsrc/ipython_view.py" > po/POTFILES.skip  || exit 1
12 13 14
  if [ $(find plugins/ -name '*.py' | wc -l) -gt 0 ];then
    ls -1 plugins/*/*.py plugins/*/*.ui >> po/POTFILES.skip
  fi
15 16 17 18 19
  if test -z `which pkg-config 2>/dev/null`;then
    echo "***Error: pkg-config not found***"
	echo "See README.html for build requirements."
	exit 1
  fi
20

21 22
  which glibtoolize >/dev/null 2>&1 && LIBTOOLIZE="glibtoolize" || LIBTOOLIZE="libtoolize"

23 24
  mkdir -p config

25 26 27 28
  if [ "$NO_AUTOTOOLS_RUN" ]; then
    exit 0
  fi

dkirov's avatar
dkirov committed
29 30
  intltoolize --force --automake \
  && aclocal -I ./m4 \
31
  && $LIBTOOLIZE --copy --force --automake \
dkirov's avatar
dkirov committed
32
  && autoheader \
33
  && autoconf \
34 35
  && automake ${AM_ARGS} \
  && ./configure ${CONF_ARGS} $@