2006-10-12 04:36:43 -07:00
|
|
|
#!/bin/sh --
|
|
|
|
# $Id$
|
2013-04-23 17:38:57 -07:00
|
|
|
# Small shell script to build gd from source
|
2006-10-12 04:36:43 -07:00
|
|
|
|
2013-11-15 20:40:32 -08:00
|
|
|
# Generate the manual (unless naturaldocs isn't installed). Source
|
|
|
|
# dists should include the docs so that end users don't need to
|
|
|
|
# install naturaldocs. At the same time, we tolerate it being missing
|
|
|
|
# so that random hackers don't need it just to build the code.
|
2016-05-17 20:01:28 -07:00
|
|
|
if which naturaldocs >/dev/null 2>&1 ; then
|
|
|
|
echo "Generation user docs:"
|
|
|
|
(cd docs/naturaldocs; bash run_docs.sh)
|
2013-11-15 20:40:32 -08:00
|
|
|
else
|
2016-05-17 20:01:28 -07:00
|
|
|
echo "Can't find naturaldocs; not generating user manual."
|
2013-11-15 20:40:32 -08:00
|
|
|
fi
|
|
|
|
|
|
|
|
|
2016-05-17 20:01:28 -07:00
|
|
|
if echo "${OSTYPE:-$(uname)}" | grep -q '^darwin' ; then
|
|
|
|
echo "Having trouble on OS X? Try: brew install autoconf libtool automake gettext apple-gcc42 pkg-config cmake"
|
2014-10-02 09:34:50 -07:00
|
|
|
fi
|
2006-10-12 04:36:43 -07:00
|
|
|
|
2016-05-17 20:01:28 -07:00
|
|
|
echo "autoreconf -f -i"
|
|
|
|
if ! autoreconf -f -i ; then
|
|
|
|
exit 1
|
2006-10-12 04:36:43 -07:00
|
|
|
fi
|
|
|
|
|
2016-05-17 20:06:14 -07:00
|
|
|
sed \
|
|
|
|
-e '1d' \
|
|
|
|
-e '2i/* Generated from config.hin via autoheader for cmake; see bootstraps.h. */' \
|
|
|
|
-e 's:#undef:#cmakedefine:' \
|
|
|
|
src/config.hin > src/config.h.cmake
|