MacOS: glibtool and glibtoolize

A typical autogen.sh (for Linux and Unix systems) script uses auto tools such as aclocal, libtool, and automake to generate necessary files for building a project. For MacOS, just replace libtool with glibtool and libtoolize with glibtoolize
#! /bin/sh
# a quick hack script to generate necessary files from
# auto* tools.
#
# WARNING: if you run this you will change the versions
# of the tools which are used and, maybe, required!
        touch Makefile.am configure.ac
{
        echo "running glibtoolize" >&2
        glibtoolize --force --copy --automake
} && {
        echo "running aclocal" >&2
        aclocal
} && {
        echo "running autoheader [ignore the warnings]" >&2
        autoheader
} && {
        echo "running automake" >&2
        automake --force-missing --foreign -a -c
} && {
        echo "running autoconf" >&2
        autoconf
} &&
        echo "autogen complete" >&2 ||
        echo "ERROR: autogen.sh failed, autogen is incomplete" >&2