2006-10-12 04:36:43 -07:00
|
|
|
#!/bin/sh --
|
2013-04-23 17:38:57 -07:00
|
|
|
# Small shell script to build gd from source
|
2006-10-12 04:36:43 -07:00
|
|
|
|
2016-05-18 00:23:28 -07:00
|
|
|
v() { echo "$@"; "$@"; }
|
|
|
|
|
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-18 00:23:28 -07:00
|
|
|
v docs/naturaldocs/run_docs.sh --nonfatal
|
2013-11-15 20:40:32 -08:00
|
|
|
|
2021-02-08 15:10:51 -08:00
|
|
|
if uname | grep -qi '^darwin' ; then
|
2018-01-24 16:46:46 -08:00
|
|
|
echo "Having trouble on OS X? Try: brew install autoconf libtool automake gettext pkg-config cmake"
|
2014-10-02 09:34:50 -07:00
|
|
|
fi
|
2006-10-12 04:36:43 -07:00
|
|
|
|
2016-05-18 00:23:28 -07:00
|
|
|
if ! v autoreconf -f -i ; then
|
2016-05-17 20:01:28 -07:00
|
|
|
exit 1
|
2006-10-12 04:36:43 -07:00
|
|
|
fi
|
|
|
|
|
2016-05-21 08:35:49 -07:00
|
|
|
(
|
|
|
|
echo "/* Generated from config.hin via autoheader for cmake; see bootstrap.sh. */"
|
2018-01-29 15:07:44 -08:00
|
|
|
sed -E \
|
2016-05-17 20:06:14 -07:00
|
|
|
-e '1d' \
|
2021-02-20 00:07:57 -08:00
|
|
|
-e '/ENABLE_/{s:#undef:#cmakedefine01:}' \
|
2016-05-17 20:06:14 -07:00
|
|
|
-e 's:#undef:#cmakedefine:' \
|
2016-05-21 08:35:49 -07:00
|
|
|
src/config.hin
|
|
|
|
) > src/config.h.cmake
|