This is the bootstrap I use on my Mac, working satisfactory for me.
It requires MacPort autotools.
# ! / bin / sh
# stolderdized from Ogre3D (www.ogre3d.org)
# Check for proper versions of autotools
# We require:
# - autoconf 2.50+
# - automake 1.7+
# - libtool 1.4+
# Touch revision.m4
if [ -f ./update_revision.sh ]; then
./update_revision.sh;
elif [ ! -f ./revision.m4 ]; then
echo "m4_define([SVN_REVISION], trunk-r0)" > ./revision.m4;
fi
# Deal with some gentoo-specific issues
export WANT_AUTOMAKE='1.7'
export WANT_AUTOCONF='2.5'
## Using prereq in autoconf rather than here, mostly for the debian systems at
## this point
if test -n "`/opt/local/bin/autoconf --version 2>&1|head -n 1|egrep '1.*|2.[0-4]'`"; then
echo "Autoconf 2.50 or above is required. Aborting build...";
exit 1;
fi
if test -n "`/opt/local/bin/automake --version 2>&1|head -n 1|egrep '1.[0-6]'`"; then
echo "Automake 1.7 or above is required. Aborting build...";
exit 1;
fi
if test -n "`/opt/local/bin/glibtool --version 2>&1|head -n 1|cut -f 4 -d ' '|egrep '1.[0-3]'`"; then
echo "Libtool 1.4 or above is required. Aborting build...";
exit 1;
fi
# clean up files which cause confusion when switch versions of auto*
rm -rf autom4te.cache
# Fire up autotools
/opt/local/bin/glibtoolize --force --copy && \
/opt/local/bin/aclocal $ACLOCAL_FLAGS && \
/opt/local/bin/autoheader && \
/opt/local/bin/automake --include-deps --add-missing --foreign --copy && \
/opt/local/bin/autoconf
About the debugger: If there are no spaces in the path, it seems to find the source files. Is it more problems than this?
This is the bootstrap I use on my Mac, working satisfactory for me.
It requires MacPort autotools.
You shouldn't need to hardcode the /opt/local prefix like that ?
Here is what I use for DarwinPorts:
pre-configure {
reinplace "s|^libtoolize|glibtoolize|" \
"${worksrcpath}/bootstrap"
reinplace "s|aclocal$|aclocal -I ${prefix}/share/aclocal|" \
"${worksrcpath}/bootstrap"
}
configure.cmd ./bootstrap && ./configure
For regular Mac OS X, all it needs is first searching for
the autoconf-2.57 and automake-1.7 and glibtool variants ?
(before falling back to just "autoconf", "automake", "libtool")
Making them variables is also a workable solution, as suggested:
http://developer.berlios.de/patch/?func=detailpatch&patch_id=1502&group_id=5358
I am sure you are right, I just wanted to demostrate a working example, not necessarily a good example.
In case you haven't noticed, I am only an amateur c++ programmer, but a complete novice in shell scripts. :)
I will try your script and see if it is working for me too.
I should note that the snippet was from the Portfile for MacPorts,
and thus it is written in tcl. Your bootstrap probably works fine,
but I'm looking for a solution that would work OK everywhere...
(i.e. there should be no need for the C::B user to tinker with it)
But if you are using MacPorts, those two "substitutions"
should be all you need to the regular bootstrap file from C::B ?
s|^libtoolize|glibtoolize|
s|aclocal$|aclocal -I ${prefix}/share/aclocal|
Sometimes I post the development solutions in the User forum,
sorry about that in advance, and do ask if anything is unclear...