File: bootstrap.sh

package info (click to toggle)
libgd2 2.3.0-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 10,360 kB
  • sloc: ansic: 48,194; sh: 5,603; cpp: 1,298; makefile: 323; perl: 225; tcl: 45
file content (27 lines) | stat: -rwxr-xr-x 832 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/bin/sh --
# Small shell script to build gd from source

v() { echo "$@"; "$@"; }

# 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.
v docs/naturaldocs/run_docs.sh --nonfatal

if echo "${OSTYPE:-$(uname)}" | grep -q '^darwin' ; then
	echo "Having trouble on OS X? Try: brew install autoconf libtool automake gettext pkg-config cmake"
fi

if ! v autoreconf -f -i ; then
	exit 1
fi

(
echo "/* Generated from config.hin via autoheader for cmake; see bootstrap.sh. */"
sed -E \
	-e '1d' \
	-e '/ENABLE_/{s:#undef:#define:;s:([^ ]*)$:\1 @\1@:;}' \
	-e 's:#undef:#cmakedefine:' \
	src/config.hin
) > src/config.h.cmake