--- /dev/null
+#!/bin/sh
+# Copyright 1999-2014 the Claws Mail team.
+# This file is part of Claws Mail package, and distributed under the
+# terms of the General Public License version 3 (or later).
+# See COPYING file for license details.
+
+case `uname` in
+ Darwin*)
+ if [ "`glibtoolize --version`" = "" ]; then
+ echo MacOS requires glibtool from either Macport or brew
+ exit 1
+ fi
+ LIBTOOL="glibtoolize --force --copy"
+ ;;
+ *)
+ LIBTOOL="libtoolize --force --copy"
+ ;;
+esac
+
+aclocal -I m4 \
+ && ${LIBTOOL} \
+ && autoheader \
+ && automake --add-missing --foreign --copy \
+ && autoconf
+if test -z "$NOCONFIGURE"; then
+exec ./configure --enable-maintainer-mode $@
+fi