Blame


1 0efd7c9a 2022-07-30 op #! /bin/sh
2 0efd7c9a 2022-07-30 op #
3 0efd7c9a 2022-07-30 op # Copyright (c) 2014, 2015, 2016 Ingo Schwarze <schwarze@openbsd.org>
4 0efd7c9a 2022-07-30 op # Copyright (c) 2017, 2018 Kristaps Dzonsons <kristaps@bsd.lv>
5 0efd7c9a 2022-07-30 op # Copyright (c) 2022 Omar Polo <op@omarpolo.com>
6 0efd7c9a 2022-07-30 op #
7 0efd7c9a 2022-07-30 op # Permission to use, copy, modify, and distribute this software for any
8 0efd7c9a 2022-07-30 op # purpose with or without fee is hereby granted, provided that the above
9 0efd7c9a 2022-07-30 op # copyright notice and this permission notice appear in all copies.
10 0efd7c9a 2022-07-30 op #
11 0efd7c9a 2022-07-30 op # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
12 0efd7c9a 2022-07-30 op # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
13 0efd7c9a 2022-07-30 op # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
14 0efd7c9a 2022-07-30 op # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
15 0efd7c9a 2022-07-30 op # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
16 0efd7c9a 2022-07-30 op # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
17 0efd7c9a 2022-07-30 op # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
18 0efd7c9a 2022-07-30 op
19 0efd7c9a 2022-07-30 op OCONFIGURE_VERSION="0.3.8"
20 0efd7c9a 2022-07-30 op
21 0efd7c9a 2022-07-30 op #
22 0efd7c9a 2022-07-30 op # This script outputs two files: config.h and Makefile.configure.
23 0efd7c9a 2022-07-30 op # It tries to read from configure.local, which contains predefined
24 0efd7c9a 2022-07-30 op # values we won't autoconfigure.
25 0efd7c9a 2022-07-30 op #
26 0efd7c9a 2022-07-30 op # If you want to use configure with your project, have your GNUmakefile
27 0efd7c9a 2022-07-30 op # or BSDmakefile---whichever---try to import/include Makefile.configure
28 0efd7c9a 2022-07-30 op # at the beginning of the file.
29 0efd7c9a 2022-07-30 op #
30 0efd7c9a 2022-07-30 op # Like so (note no quotes, no period, etc.):
31 0efd7c9a 2022-07-30 op #
32 0efd7c9a 2022-07-30 op # include Makefile.configure
33 0efd7c9a 2022-07-30 op #
34 0efd7c9a 2022-07-30 op # If it exists, configure was run; otherwise, it wasn't.
35 0efd7c9a 2022-07-30 op #
36 0efd7c9a 2022-07-30 op # You'll probably want to change parts of this file. I've noted the
37 0efd7c9a 2022-07-30 op # parts that you'll probably change in the section documentation.
38 0efd7c9a 2022-07-30 op #
39 0efd7c9a 2022-07-30 op # See https://github.com/kristapsdz/oconfigure for more.
40 0efd7c9a 2022-07-30 op
41 0efd7c9a 2022-07-30 op set -e
42 0efd7c9a 2022-07-30 op
43 0efd7c9a 2022-07-30 op # try to be helpful
44 0efd7c9a 2022-07-30 op case "$1" in
45 0efd7c9a 2022-07-30 op --help|-h)
46 0efd7c9a 2022-07-30 op cat <<EOF
47 0efd7c9a 2022-07-30 op \`configure' configures lstun to adapt to many kinds of systems.
48 0efd7c9a 2022-07-30 op
49 0efd7c9a 2022-07-30 op Usage: $0 [-h] [--prefix=path] [VAR=VALUE]...
50 0efd7c9a 2022-07-30 op
51 0efd7c9a 2022-07-30 op The options are as follows:
52 0efd7c9a 2022-07-30 op
53 0efd7c9a 2022-07-30 op -h, --help print this help message
54 0efd7c9a 2022-07-30 op
55 0efd7c9a 2022-07-30 op --prefix=path equivalent to specifying the PREFIX variable, supported
56 0efd7c9a 2022-07-30 op for compatibility with other common "configure" scripts.
57 0efd7c9a 2022-07-30 op
58 0efd7c9a 2022-07-30 op Variables available:
59 0efd7c9a 2022-07-30 op
60 9050e628 2022-07-30 op SSH_PROG absolute path to the ssh(1) binary
61 0efd7c9a 2022-07-30 op LDADD generic linker flags
62 0efd7c9a 2022-07-30 op LDADD_LIBEVENT linker flags for libevent
63 0efd7c9a 2022-07-30 op LDADD_LIBEVENT2 linker flags for libevent2
64 0efd7c9a 2022-07-30 op LDADD_LIBSOCKET linker flags for libsocket
65 0efd7c9a 2022-07-30 op LDFLAGS extra linker flags
66 0efd7c9a 2022-07-30 op CPPFLAGS C preprocessors flags
67 0efd7c9a 2022-07-30 op DESTDIR destination directory
68 0efd7c9a 2022-07-30 op PREFIX where to install files
69 0efd7c9a 2022-07-30 op MANDIR where to install man pages (PREFIX/man)
70 0efd7c9a 2022-07-30 op LIBDIR where to install libraries (PREFIX/lib)
71 0efd7c9a 2022-07-30 op BINDIR where to install executables (PREFIX/bin)
72 0efd7c9a 2022-07-30 op SHAREDIR where to install misc files (PREFIX/share)
73 0efd7c9a 2022-07-30 op SBINDIR where to install system executables (PREFIX/sbin)
74 0efd7c9a 2022-07-30 op INCLUDEDIR where to install header files (PREFIX/include)
75 3a9f646c 2022-07-30 op PKG_CONFIG path to the pkg-config program or \`false'
76 0efd7c9a 2022-07-30 op
77 0efd7c9a 2022-07-30 op Additionally, the following environment variables are used if set:
78 0efd7c9a 2022-07-30 op
79 0efd7c9a 2022-07-30 op CC the C compiler to use (defaults to cc, clang or gcc)
80 0efd7c9a 2022-07-30 op CFLAGS generic C compiler flags
81 0efd7c9a 2022-07-30 op
82 0efd7c9a 2022-07-30 op EOF
83 0efd7c9a 2022-07-30 op exit 0 ;;
84 0efd7c9a 2022-07-30 op esac
85 0efd7c9a 2022-07-30 op
86 0efd7c9a 2022-07-30 op #----------------------------------------------------------------------
87 0efd7c9a 2022-07-30 op # Prepare for running: move aside previous configure runs.
88 0efd7c9a 2022-07-30 op # Output file descriptor usage:
89 0efd7c9a 2022-07-30 op # 1 (stdout): config.h or Makefile.configure
90 0efd7c9a 2022-07-30 op # 2 (stderr): original stderr, usually to the console
91 0efd7c9a 2022-07-30 op # 3: config.log
92 0efd7c9a 2022-07-30 op # You DO NOT want to change this.
93 0efd7c9a 2022-07-30 op #----------------------------------------------------------------------
94 0efd7c9a 2022-07-30 op
95 0efd7c9a 2022-07-30 op [ -w config.log ] && mv config.log config.log.old
96 0efd7c9a 2022-07-30 op [ -w config.h ] && mv config.h config.h.old
97 0efd7c9a 2022-07-30 op
98 0efd7c9a 2022-07-30 op exec 3> config.log
99 0efd7c9a 2022-07-30 op echo "config.log: writing..."
100 0efd7c9a 2022-07-30 op
101 0efd7c9a 2022-07-30 op # GNU submake prints different output if invoked recursively, which
102 0efd7c9a 2022-07-30 op # messes up CC and CFLAGS detection. Pass --no-print-directory if
103 0efd7c9a 2022-07-30 op # we have a MAKELEVEL (GNU and FreeBSD make) and the argument is
104 0efd7c9a 2022-07-30 op # allowed.
105 0efd7c9a 2022-07-30 op
106 0efd7c9a 2022-07-30 op MAKE_FLAGS=""
107 0efd7c9a 2022-07-30 op
108 0efd7c9a 2022-07-30 op if [ -n "${MAKELEVEL}" ]; then
109 0efd7c9a 2022-07-30 op if [ "${MAKELEVEL}" -gt 0 ] ; then
110 0efd7c9a 2022-07-30 op MAKE_FLAGS="--no-print-directory"
111 0efd7c9a 2022-07-30 op echo "all:" | make ${MAKE_FLAGS} -sf - 2>/dev/null || MAKE_FLAGS=""
112 0efd7c9a 2022-07-30 op fi
113 0efd7c9a 2022-07-30 op fi
114 0efd7c9a 2022-07-30 op
115 0efd7c9a 2022-07-30 op if [ -n "$MAKE_FLAGS" ]; then
116 0efd7c9a 2022-07-30 op echo "GNU submake detected: using --no-print-directory" 1>&2
117 0efd7c9a 2022-07-30 op echo "GNU submake detected: using --no-print-directory" 1>&3
118 0efd7c9a 2022-07-30 op fi
119 0efd7c9a 2022-07-30 op
120 0efd7c9a 2022-07-30 op #----------------------------------------------------------------------
121 0efd7c9a 2022-07-30 op # Initialize all variables here such that nothing can leak in from the
122 0efd7c9a 2022-07-30 op # environment except for CC and CFLAGS, which we might have passed in.
123 0efd7c9a 2022-07-30 op #----------------------------------------------------------------------
124 0efd7c9a 2022-07-30 op
125 0efd7c9a 2022-07-30 op CC=`printf "all:\\n\\t@echo \\\$(CC)\\n" | make ${MAKE_FLAGS} -sf -`
126 0efd7c9a 2022-07-30 op CFLAGS=`printf "all:\\n\\t@echo \\\$(CFLAGS)\\n" | make ${MAKE_FLAGS} -sf -`
127 0efd7c9a 2022-07-30 op CFLAGS="${CFLAGS} -g -W -Wall -Wmissing-prototypes -Wstrict-prototypes"
128 0efd7c9a 2022-07-30 op CFLAGS="${CFLAGS} -Wmissing-declarations -Wno-unused-parameter"
129 0efd7c9a 2022-07-30 op CFLAGS="${CFLAGS} -Wno-sign-compare"
130 0efd7c9a 2022-07-30 op LDADD=
131 0efd7c9a 2022-07-30 op LDADD_LIBEVENT=
132 0efd7c9a 2022-07-30 op LDADD_LIBEVENT2=
133 0efd7c9a 2022-07-30 op LDADD_LIB_SOCKET=
134 0efd7c9a 2022-07-30 op LDADD_STATIC=
135 0efd7c9a 2022-07-30 op CPPFLAGS=
136 0efd7c9a 2022-07-30 op LDFLAGS=
137 0efd7c9a 2022-07-30 op DESTDIR=
138 0efd7c9a 2022-07-30 op PREFIX="/usr/local"
139 0efd7c9a 2022-07-30 op BINDIR=
140 0efd7c9a 2022-07-30 op SBINDIR=
141 0efd7c9a 2022-07-30 op INCLUDEDIR=
142 0efd7c9a 2022-07-30 op LIBDIR=
143 0efd7c9a 2022-07-30 op MANDIR=
144 0efd7c9a 2022-07-30 op SHAREDIR=
145 0efd7c9a 2022-07-30 op INSTALL="install"
146 0efd7c9a 2022-07-30 op INSTALL_PROGRAM=
147 0efd7c9a 2022-07-30 op INSTALL_LIB=
148 0efd7c9a 2022-07-30 op INSTALL_MAN=
149 0efd7c9a 2022-07-30 op INSTALL_DATA=
150 0efd7c9a 2022-07-30 op PKG_CONFIG=
151 9050e628 2022-07-30 op SSH_PROG=
152 0efd7c9a 2022-07-30 op
153 0efd7c9a 2022-07-30 op # SunOS sets "cc", but this doesn't exist.
154 0efd7c9a 2022-07-30 op # It does have gcc, so try that instead.
155 0efd7c9a 2022-07-30 op # Prefer clang, though.
156 0efd7c9a 2022-07-30 op
157 0efd7c9a 2022-07-30 op command -v ${CC} 2>/dev/null 1>&2 || {
158 0efd7c9a 2022-07-30 op echo "${CC} not found: trying clang" 1>&2
159 0efd7c9a 2022-07-30 op echo "${CC} not found: trying clang" 1>&3
160 0efd7c9a 2022-07-30 op CC=clang
161 0efd7c9a 2022-07-30 op command -v ${CC} 2>/dev/null 1>&2 || {
162 0efd7c9a 2022-07-30 op echo "${CC} not found: trying gcc" 1>&2
163 0efd7c9a 2022-07-30 op echo "${CC} not found: trying gcc" 1>&3
164 0efd7c9a 2022-07-30 op CC=gcc
165 0efd7c9a 2022-07-30 op command -v ${CC} 2>/dev/null 1>&2 || {
166 0efd7c9a 2022-07-30 op echo "gcc not found: giving up" 1>&2
167 0efd7c9a 2022-07-30 op echo "gcc not found: giving up" 1>&3
168 0efd7c9a 2022-07-30 op exit 1
169 0efd7c9a 2022-07-30 op }
170 0efd7c9a 2022-07-30 op }
171 0efd7c9a 2022-07-30 op }
172 0efd7c9a 2022-07-30 op
173 0efd7c9a 2022-07-30 op #----------------------------------------------------------------------
174 0efd7c9a 2022-07-30 op # Allow certain variables to be overriden on the command line.
175 0efd7c9a 2022-07-30 op #----------------------------------------------------------------------
176 0efd7c9a 2022-07-30 op
177 0efd7c9a 2022-07-30 op while [ $# -gt 0 ]; do
178 0efd7c9a 2022-07-30 op key=${1%%=*}
179 0efd7c9a 2022-07-30 op val=${1#*=}
180 0efd7c9a 2022-07-30 op
181 0efd7c9a 2022-07-30 op if [ "$key" = "--prefix" ]; then
182 0efd7c9a 2022-07-30 op key=PREFIX
183 0efd7c9a 2022-07-30 op if [ "$1" = "--prefix" ]; then
184 0efd7c9a 2022-07-30 op if ! shift 2>&1 >/dev/null; then
185 0efd7c9a 2022-07-30 op echo "$0: missing value for --prefix" 1>&2
186 0efd7c9a 2022-07-30 op exit 1
187 0efd7c9a 2022-07-30 op fi
188 0efd7c9a 2022-07-30 op val="$1"
189 0efd7c9a 2022-07-30 op fi
190 0efd7c9a 2022-07-30 op fi
191 0efd7c9a 2022-07-30 op
192 0efd7c9a 2022-07-30 op if [ "$1" = "$key" ]; then
193 0efd7c9a 2022-07-30 op echo "$0: invalid key-value: $1" 1>&2
194 0efd7c9a 2022-07-30 op exit 1
195 0efd7c9a 2022-07-30 op fi
196 0efd7c9a 2022-07-30 op
197 0efd7c9a 2022-07-30 op shift
198 0efd7c9a 2022-07-30 op
199 0efd7c9a 2022-07-30 op case "$key" in
200 0efd7c9a 2022-07-30 op LDADD)
201 0efd7c9a 2022-07-30 op LDADD="$val" ;;
202 0efd7c9a 2022-07-30 op LDADD_LIBEVENT)
203 0efd7c9a 2022-07-30 op LDADD_LIBEVENT="$val" ;;
204 0efd7c9a 2022-07-30 op LDADD_LIBEVENT2)
205 0efd7c9a 2022-07-30 op LDADD_LIBEVENT2="$val" ;;
206 0efd7c9a 2022-07-30 op LDADD_LIBSOCKET)
207 0efd7c9a 2022-07-30 op LDADD_LIBSOCKET="$val" ;;
208 0efd7c9a 2022-07-30 op LDFLAGS)
209 0efd7c9a 2022-07-30 op LDFLAGS="$val" ;;
210 0efd7c9a 2022-07-30 op CPPFLAGS)
211 0efd7c9a 2022-07-30 op CPPFLAGS="$val" ;;
212 0efd7c9a 2022-07-30 op DESTDIR)
213 0efd7c9a 2022-07-30 op DESTDIR="$val" ;;
214 0efd7c9a 2022-07-30 op PREFIX)
215 0efd7c9a 2022-07-30 op PREFIX="$val" ;;
216 0efd7c9a 2022-07-30 op MANDIR)
217 0efd7c9a 2022-07-30 op MANDIR="$val" ;;
218 0efd7c9a 2022-07-30 op LIBDIR)
219 0efd7c9a 2022-07-30 op LIBDIR="$val" ;;
220 0efd7c9a 2022-07-30 op BINDIR)
221 0efd7c9a 2022-07-30 op BINDIR="$val" ;;
222 0efd7c9a 2022-07-30 op SHAREDIR)
223 0efd7c9a 2022-07-30 op SHAREDIR="$val" ;;
224 0efd7c9a 2022-07-30 op SBINDIR)
225 0efd7c9a 2022-07-30 op SBINDIR="$val" ;;
226 0efd7c9a 2022-07-30 op INCLUDEDIR)
227 0efd7c9a 2022-07-30 op INCLUDEDIR="$val" ;;
228 0efd7c9a 2022-07-30 op PKG_CONFIG)
229 0efd7c9a 2022-07-30 op PKG_CONFIG="$val" ;;
230 9050e628 2022-07-30 op SSH_PROG)
231 9050e628 2022-07-30 op SSH_PROG="$val" ;;
232 0efd7c9a 2022-07-30 op *)
233 0efd7c9a 2022-07-30 op echo "$0: invalid key: $key" 1>&2
234 0efd7c9a 2022-07-30 op exit 1
235 0efd7c9a 2022-07-30 op esac
236 0efd7c9a 2022-07-30 op done
237 0efd7c9a 2022-07-30 op
238 3a9f646c 2022-07-30 op test -z "${PKG_CONFIG}" && {
239 3a9f646c 2022-07-30 op command -v pkg-config 2>/dev/null >&2 && {
240 3a9f646c 2022-07-30 op PKG_CONFIG="$(command -v pkg-config)"
241 3a9f646c 2022-07-30 op echo "found pkg-config: $PKG_CONFIG" 1>&2
242 3a9f646c 2022-07-30 op echo "found pkg-config: $PKG_CONFIG" 1>&3
243 3a9f646c 2022-07-30 op } || {
244 3a9f646c 2022-07-30 op PKG_CONFIG=false
245 3a9f646c 2022-07-30 op echo "pkg-config not found" 1>&2
246 3a9f646c 2022-07-30 op echo "pkg-config not found" 1>&3
247 3a9f646c 2022-07-30 op }
248 3a9f646c 2022-07-30 op }
249 0efd7c9a 2022-07-30 op
250 9050e628 2022-07-30 op test -z "${SSH_PROG}" && {
251 9050e628 2022-07-30 op command -v ssh 2>/dev/null 1>&2 && {
252 9050e628 2022-07-30 op SSH_PROG="$(command -v ssh)"
253 9050e628 2022-07-30 op echo "found ssh: $SSH_PROG" 1>&2
254 9050e628 2022-07-30 op echo "found ssh: $SSH_PROG" 1>&3
255 9050e628 2022-07-30 op } || {
256 9050e628 2022-07-30 op echo "ssh not found: giving up" >&2
257 9050e628 2022-07-30 op echo "ssh not found: giving up" >&3
258 9050e628 2022-07-30 op exit 1
259 9050e628 2022-07-30 op }
260 9050e628 2022-07-30 op }
261 9050e628 2022-07-30 op
262 9050e628 2022-07-30 op
263 0efd7c9a 2022-07-30 op #----------------------------------------------------------------------
264 0efd7c9a 2022-07-30 op # These are the values that will be pushed into config.h after we test
265 0efd7c9a 2022-07-30 op # for whether they're supported or not.
266 0efd7c9a 2022-07-30 op # Each of these must have a runtest(), below.
267 0efd7c9a 2022-07-30 op # Please sort by alpha, for clarity.
268 0efd7c9a 2022-07-30 op # You WANT to change this.
269 0efd7c9a 2022-07-30 op #----------------------------------------------------------------------
270 0efd7c9a 2022-07-30 op
271 0efd7c9a 2022-07-30 op HAVE_GETEXECNAME=
272 0efd7c9a 2022-07-30 op HAVE_GETPROGNAME=
273 0efd7c9a 2022-07-30 op HAVE_LIBEVENT=
274 a41ba086 2022-07-30 op HAVE_LIBEVENT2=
275 0efd7c9a 2022-07-30 op HAVE_PLEDGE=
276 0efd7c9a 2022-07-30 op HAVE_PROGRAM_INVOCATION_SHORT_NAME=
277 0efd7c9a 2022-07-30 op HAVE_PR_SET_NAME=
278 cfe57149 2022-07-30 op HAVE_SO_SPLICE=
279 0efd7c9a 2022-07-30 op HAVE_STRLCAT=
280 0efd7c9a 2022-07-30 op HAVE_STRLCPY=
281 0efd7c9a 2022-07-30 op HAVE_STRTONUM=
282 0efd7c9a 2022-07-30 op HAVE_UNVEIL=
283 0efd7c9a 2022-07-30 op HAVE___PROGNAME=
284 0efd7c9a 2022-07-30 op
285 0efd7c9a 2022-07-30 op #----------------------------------------------------------------------
286 0efd7c9a 2022-07-30 op # Allow configure.local to override all variables, default settings,
287 0efd7c9a 2022-07-30 op # command-line arguments, and tested features, above.
288 0efd7c9a 2022-07-30 op # You PROBABLY DO NOT want to change this.
289 0efd7c9a 2022-07-30 op #----------------------------------------------------------------------
290 0efd7c9a 2022-07-30 op
291 0efd7c9a 2022-07-30 op if [ -r ./configure.local ]; then
292 0efd7c9a 2022-07-30 op echo "configure.local: reading..." 1>&2
293 0efd7c9a 2022-07-30 op echo "configure.local: reading..." 1>&3
294 0efd7c9a 2022-07-30 op cat ./configure.local 1>&3
295 0efd7c9a 2022-07-30 op . ./configure.local
296 0efd7c9a 2022-07-30 op else
297 0efd7c9a 2022-07-30 op echo "configure.local: no (fully automatic configuration)" 1>&2
298 0efd7c9a 2022-07-30 op echo "configure.local: no (fully automatic configuration)" 1>&3
299 0efd7c9a 2022-07-30 op fi
300 0efd7c9a 2022-07-30 op
301 0efd7c9a 2022-07-30 op echo 1>&3
302 0efd7c9a 2022-07-30 op
303 0efd7c9a 2022-07-30 op #----------------------------------------------------------------------
304 0efd7c9a 2022-07-30 op # Infrastructure for running tests.
305 0efd7c9a 2022-07-30 op # These consists of a series of functions that will attempt to run the
306 0efd7c9a 2022-07-30 op # given test file and record its exit into a HAVE_xxx variable.
307 0efd7c9a 2022-07-30 op # You DO NOT want to change this.
308 0efd7c9a 2022-07-30 op #----------------------------------------------------------------------
309 0efd7c9a 2022-07-30 op
310 0efd7c9a 2022-07-30 op COMP="${CC} ${CFLAGS} ${CPPFLAGS} -Wno-unused -Werror"
311 0efd7c9a 2022-07-30 op
312 0efd7c9a 2022-07-30 op # Check whether this HAVE_ setting is manually overridden.
313 0efd7c9a 2022-07-30 op # If yes, use the override, if no, do not decide anything yet.
314 0efd7c9a 2022-07-30 op # Arguments: lower-case test name, manual value
315 0efd7c9a 2022-07-30 op
316 0efd7c9a 2022-07-30 op ismanual() {
317 0efd7c9a 2022-07-30 op [ -z "${3}" ] && return 1
318 0efd7c9a 2022-07-30 op echo "${1}: manual (HAVE_${2}=${3})" 1>&2
319 0efd7c9a 2022-07-30 op echo "${1}: manual (HAVE_${2}=${3})" 1>&3
320 0efd7c9a 2022-07-30 op echo 1>&3
321 0efd7c9a 2022-07-30 op return 0
322 0efd7c9a 2022-07-30 op }
323 0efd7c9a 2022-07-30 op
324 0efd7c9a 2022-07-30 op # Run a single autoconfiguration test.
325 0efd7c9a 2022-07-30 op # In case of success, enable the feature.
326 0efd7c9a 2022-07-30 op # In case of failure, do not decide anything yet.
327 0efd7c9a 2022-07-30 op # Arguments: lower-case test name, upper-case test name, additional
328 0efd7c9a 2022-07-30 op # CFLAGS, additional LIBS.
329 0efd7c9a 2022-07-30 op
330 0efd7c9a 2022-07-30 op singletest() {
331 0efd7c9a 2022-07-30 op extralib=""
332 0efd7c9a 2022-07-30 op pkgcfs=""
333 0efd7c9a 2022-07-30 op pkglib=""
334 0efd7c9a 2022-07-30 op
335 0efd7c9a 2022-07-30 op cat 1>&3 <<EOF
336 0efd7c9a 2022-07-30 op ${1}: testing...
337 0efd7c9a 2022-07-30 op ${COMP} -DTEST_${2} ${3} -o test-${1} tests.c ${LDFLAGS} ${4}
338 0efd7c9a 2022-07-30 op EOF
339 0efd7c9a 2022-07-30 op if ${COMP} -DTEST_${2} ${3} -o "test-${1}" tests.c ${LDFLAGS} ${4} 1>&3 2>&3; then
340 0efd7c9a 2022-07-30 op echo "${1}: ${CC} succeeded" 1>&3
341 0efd7c9a 2022-07-30 op else
342 0efd7c9a 2022-07-30 op if [ -n "${5}" ] ; then
343 0efd7c9a 2022-07-30 op echo "${1}: ${CC} failed with $? (retrying)" 1>&3
344 0efd7c9a 2022-07-30 op cat 1>&3 <<EOF
345 0efd7c9a 2022-07-30 op ${1}: testing...
346 0efd7c9a 2022-07-30 op ${COMP} -DTEST_${2} ${3} -o test-${1} tests.c ${LDFLAGS} ${5}
347 0efd7c9a 2022-07-30 op EOF
348 0efd7c9a 2022-07-30 op if ${COMP} -DTEST_${2} ${3} -o "test-${1}" tests.c ${LDFLAGS} ${5} 1>&3 2>&3; then
349 0efd7c9a 2022-07-30 op echo "${1}: ${CC} succeeded" 1>&3
350 0efd7c9a 2022-07-30 op extralib="(with ${5})"
351 0efd7c9a 2022-07-30 op else
352 3a9f646c 2022-07-30 op test -n "${6}" && ${PKG_CONFIG} "$6"
353 0efd7c9a 2022-07-30 op if [ $? -eq 0 ]; then
354 0efd7c9a 2022-07-30 op echo "${1}: ${CC} failed with $? (retrying)" 1>&3
355 0efd7c9a 2022-07-30 op pkgcfs=$($PKG_CONFIG --cflags "${6}")
356 0efd7c9a 2022-07-30 op pkglib=$($PKG_CONFIG --libs "${6}")
357 0efd7c9a 2022-07-30 op cat 1>&3 <<EOF
358 0efd7c9a 2022-07-30 op ${1}: testing...
359 0efd7c9a 2022-07-30 op ${COMP} -DTEST_${2} ${3} ${pkgcfs} -o test-${1} tests.c ${LDFLAGS} ${pkglib}
360 0efd7c9a 2022-07-30 op EOF
361 0efd7c9a 2022-07-30 op if ${COMP} -DTEST_${2} ${3} ${pkgcfs} -o test-${1} tests.c ${LDFLAGS} ${pkglib} 1>&3 2>&3; then
362 0efd7c9a 2022-07-30 op echo "${1}: ${CC} succeeded" 1>&3
363 0efd7c9a 2022-07-30 op extralib="(with ${pkgcfs} ${pkglib})"
364 0efd7c9a 2022-07-30 op else
365 0efd7c9a 2022-07-30 op echo "${1}: ${CC} failed with $?" 1>&3
366 0efd7c9a 2022-07-30 op echo 1>&3
367 0efd7c9a 2022-07-30 op return 1
368 0efd7c9a 2022-07-30 op fi
369 0efd7c9a 2022-07-30 op else
370 0efd7c9a 2022-07-30 op echo "${1}: ${CC} failed with $?" 1>&3
371 0efd7c9a 2022-07-30 op echo 1>&3
372 0efd7c9a 2022-07-30 op return 1
373 0efd7c9a 2022-07-30 op fi
374 0efd7c9a 2022-07-30 op fi
375 0efd7c9a 2022-07-30 op else
376 0efd7c9a 2022-07-30 op echo "${1}: ${CC} failed with $?" 1>&3
377 0efd7c9a 2022-07-30 op echo 1>&3
378 0efd7c9a 2022-07-30 op return 1
379 0efd7c9a 2022-07-30 op fi
380 0efd7c9a 2022-07-30 op fi
381 0efd7c9a 2022-07-30 op
382 0efd7c9a 2022-07-30 op rm -f test-${1}.d
383 0efd7c9a 2022-07-30 op
384 0efd7c9a 2022-07-30 op if [ -n "${pkgcfs}" -o -n "${pkglib}" ]
385 0efd7c9a 2022-07-30 op then
386 0efd7c9a 2022-07-30 op CFLAGS="${CFLAGS} ${pkgcfs}"
387 0efd7c9a 2022-07-30 op eval "LDADD_${2}=\"${pkglib}\""
388 0efd7c9a 2022-07-30 op elif [ -n "${extralib}" ]
389 0efd7c9a 2022-07-30 op then
390 0efd7c9a 2022-07-30 op eval "LDADD_${2}=\"${5}\""
391 0efd7c9a 2022-07-30 op elif [ -n "${4}" ]
392 0efd7c9a 2022-07-30 op then
393 0efd7c9a 2022-07-30 op eval "LDADD_${2}=\"${4}\""
394 0efd7c9a 2022-07-30 op fi
395 0efd7c9a 2022-07-30 op
396 0efd7c9a 2022-07-30 op echo "${1}: yes ${extralib}" 1>&2
397 0efd7c9a 2022-07-30 op echo "${1}: yes ${extralib}" 1>&3
398 0efd7c9a 2022-07-30 op echo 1>&3
399 0efd7c9a 2022-07-30 op eval HAVE_${2}=1
400 0efd7c9a 2022-07-30 op rm "test-${1}"
401 0efd7c9a 2022-07-30 op return 0
402 0efd7c9a 2022-07-30 op }
403 0efd7c9a 2022-07-30 op
404 0efd7c9a 2022-07-30 op # Run a complete autoconfiguration test, including the check for
405 0efd7c9a 2022-07-30 op # a manual override and disabling the feature on failure.
406 0efd7c9a 2022-07-30 op # Arguments: lower case name, upper case name, additional CFLAGS,
407 0efd7c9a 2022-07-30 op # additional LDADD, alternative LDADD, pkg-config name.
408 0efd7c9a 2022-07-30 op
409 0efd7c9a 2022-07-30 op runtest() {
410 0efd7c9a 2022-07-30 op eval _manual=\${HAVE_${2}}
411 0efd7c9a 2022-07-30 op ismanual "${1}" "${2}" "${_manual}" && return 0
412 0efd7c9a 2022-07-30 op singletest "${1}" "${2}" "${3}" "${4}" "${5}" "${6}" && return 0
413 0efd7c9a 2022-07-30 op echo "${1}: no" 1>&2
414 0efd7c9a 2022-07-30 op eval HAVE_${2}=0
415 0efd7c9a 2022-07-30 op return 1
416 0efd7c9a 2022-07-30 op }
417 0efd7c9a 2022-07-30 op
418 0efd7c9a 2022-07-30 op #----------------------------------------------------------------------
419 0efd7c9a 2022-07-30 op # Begin running the tests themselves.
420 0efd7c9a 2022-07-30 op # All of your tests must be defined here.
421 0efd7c9a 2022-07-30 op # Please sort as the HAVE_xxxx values were defined.
422 0efd7c9a 2022-07-30 op # You WANT to change this.
423 0efd7c9a 2022-07-30 op # It consists of the following columns:
424 0efd7c9a 2022-07-30 op # runtest
425 0efd7c9a 2022-07-30 op # (1) test file
426 0efd7c9a 2022-07-30 op # (2) macro to set
427 0efd7c9a 2022-07-30 op # (3) argument to cc *before* -o
428 0efd7c9a 2022-07-30 op # (4) argument to cc *after*
429 0efd7c9a 2022-07-30 op # (5) alternative argument to cc *after*
430 0efd7c9a 2022-07-30 op # (6) name for pkg-config auto-discovery
431 0efd7c9a 2022-07-30 op #----------------------------------------------------------------------
432 0efd7c9a 2022-07-30 op
433 0efd7c9a 2022-07-30 op if runtest -MMD _MMD -MMD; then
434 0efd7c9a 2022-07-30 op CFLAGS="${CFLAGS} -MMD"
435 0efd7c9a 2022-07-30 op echo "adding -MMD to CFLAGS" 1>&2
436 0efd7c9a 2022-07-30 op echo "adding -MMD to CFLAGS" 1>&3
437 0efd7c9a 2022-07-30 op fi
438 0efd7c9a 2022-07-30 op
439 0efd7c9a 2022-07-30 op runtest getexecname GETEXECNAME || true
440 0efd7c9a 2022-07-30 op runtest getprogname GETPROGNAME || true
441 0efd7c9a 2022-07-30 op
442 0efd7c9a 2022-07-30 op runtest libevent LIBEVENT "" "" "-levent" || \
443 0efd7c9a 2022-07-30 op runtest libevent2 LIBEVENT2 "" "" "-levent_extra -levent_core" "libevent" || true
444 0efd7c9a 2022-07-30 op
445 0efd7c9a 2022-07-30 op runtest lib_socket LIB_SOCKET "" "" "-lsocket -lnsl" || true
446 0efd7c9a 2022-07-30 op runtest pledge PLEDGE || true
447 0efd7c9a 2022-07-30 op runtest program_invocation_short_name PROGRAM_INVOCATION_SHORT_NAME || true
448 0efd7c9a 2022-07-30 op runtest PR_SET_NAME PR_SET_NAME || true
449 cfe57149 2022-07-30 op runtest SO_SPLICE SO_SPLICE || true
450 0efd7c9a 2022-07-30 op runtest static STATIC "" "-static" || true
451 0efd7c9a 2022-07-30 op runtest strlcat STRLCAT || true
452 0efd7c9a 2022-07-30 op runtest strlcpy STRLCPY || true
453 0efd7c9a 2022-07-30 op runtest strtonum STRTONUM || true
454 0efd7c9a 2022-07-30 op runtest unveil UNVEIL || true
455 0efd7c9a 2022-07-30 op runtest __progname __PROGNAME || true
456 0efd7c9a 2022-07-30 op
457 a41ba086 2022-07-30 op if [ "${HAVE_LIBEVENT}" -eq 0 -a "${HAVE_LIBEVENT2:-0}" -eq 0 ]; then
458 0efd7c9a 2022-07-30 op echo "Fatal: missing libevent" 1>&2
459 0efd7c9a 2022-07-30 op echo "Fatal: missing libevent" 1>&3
460 0efd7c9a 2022-07-30 op exit 1
461 0efd7c9a 2022-07-30 op fi
462 0efd7c9a 2022-07-30 op
463 0efd7c9a 2022-07-30 op #----------------------------------------------------------------------
464 0efd7c9a 2022-07-30 op # Output writing: generate the config.h file.
465 0efd7c9a 2022-07-30 op # This file contains all of the HAVE_xxxx variables necessary for
466 0efd7c9a 2022-07-30 op # compiling your source.
467 0efd7c9a 2022-07-30 op # You must include "config.h" BEFORE any other variables.
468 0efd7c9a 2022-07-30 op # You WANT to change this.
469 0efd7c9a 2022-07-30 op #----------------------------------------------------------------------
470 0efd7c9a 2022-07-30 op
471 0efd7c9a 2022-07-30 op exec > config.h
472 0efd7c9a 2022-07-30 op
473 0efd7c9a 2022-07-30 op # Start with prologue.
474 0efd7c9a 2022-07-30 op
475 0efd7c9a 2022-07-30 op cat <<EOF
476 0efd7c9a 2022-07-30 op #ifndef OCONFIGURE_CONFIG_H
477 0efd7c9a 2022-07-30 op #define OCONFIGURE_CONFIG_H
478 0efd7c9a 2022-07-30 op
479 0efd7c9a 2022-07-30 op #ifdef __cplusplus
480 0efd7c9a 2022-07-30 op # error "Do not use C++: this is a C application."
481 0efd7c9a 2022-07-30 op #endif
482 0efd7c9a 2022-07-30 op #if !defined(__GNUC__) || (__GNUC__ < 4)
483 0efd7c9a 2022-07-30 op # define __attribute__(x)
484 0efd7c9a 2022-07-30 op #endif
485 0efd7c9a 2022-07-30 op #if defined(__linux__) || defined(__MINT__)
486 0efd7c9a 2022-07-30 op # define _GNU_SOURCE /* memmem, memrchr, setresuid... */
487 0efd7c9a 2022-07-30 op # define _DEFAULT_SOURCE /* le32toh, crypt, ... */
488 0efd7c9a 2022-07-30 op #endif
489 0efd7c9a 2022-07-30 op #if defined(__NetBSD__)
490 0efd7c9a 2022-07-30 op # define _OPENBSD_SOURCE /* reallocarray, etc. */
491 0efd7c9a 2022-07-30 op #endif
492 0efd7c9a 2022-07-30 op #if defined(__sun)
493 0efd7c9a 2022-07-30 op # ifndef _XOPEN_SOURCE /* SunOS already defines */
494 0efd7c9a 2022-07-30 op # define _XOPEN_SOURCE /* XPGx */
495 0efd7c9a 2022-07-30 op # endif
496 0efd7c9a 2022-07-30 op # define _XOPEN_SOURCE_EXTENDED 1 /* XPG4v2 */
497 0efd7c9a 2022-07-30 op # ifndef __EXTENSIONS__ /* SunOS already defines */
498 0efd7c9a 2022-07-30 op # define __EXTENSIONS__ /* reallocarray, etc. */
499 0efd7c9a 2022-07-30 op # endif
500 0efd7c9a 2022-07-30 op #endif
501 0efd7c9a 2022-07-30 op #if !defined(__BEGIN_DECLS)
502 0efd7c9a 2022-07-30 op # define __BEGIN_DECLS
503 0efd7c9a 2022-07-30 op #endif
504 0efd7c9a 2022-07-30 op #if !defined(__END_DECLS)
505 0efd7c9a 2022-07-30 op # define __END_DECLS
506 0efd7c9a 2022-07-30 op #endif
507 0efd7c9a 2022-07-30 op
508 0efd7c9a 2022-07-30 op EOF
509 0efd7c9a 2022-07-30 op
510 0efd7c9a 2022-07-30 op # This is just for size_t, mode_t, and dev_t.
511 0efd7c9a 2022-07-30 op # Most of these functions, in the real world, pull in <string.h> or
512 0efd7c9a 2022-07-30 op # someting that pulls in support for size_t.
513 0efd7c9a 2022-07-30 op # Our function declarations are standalone, so specify them here.
514 0efd7c9a 2022-07-30 op
515 0efd7c9a 2022-07-30 op if [ ${HAVE_STRLCAT} -eq 0 -o \
516 0efd7c9a 2022-07-30 op ${HAVE_STRLCPY} -eq 0 ]
517 0efd7c9a 2022-07-30 op then
518 0efd7c9a 2022-07-30 op echo "#include <sys/types.h> /* size_t, mode_t, dev_t */ "
519 0efd7c9a 2022-07-30 op echo
520 0efd7c9a 2022-07-30 op fi
521 0efd7c9a 2022-07-30 op
522 0efd7c9a 2022-07-30 op if [ ${HAVE_GETPROGNAME} -eq 0 ]; then
523 0efd7c9a 2022-07-30 op echo "#include <stdlib.h>"
524 0efd7c9a 2022-07-30 op echo
525 0efd7c9a 2022-07-30 op fi
526 0efd7c9a 2022-07-30 op
527 0efd7c9a 2022-07-30 op if [ ${HAVE_PLEDGE} -eq 0 -o ${HAVE_UNVEIL} -eq 0 ]; then
528 0efd7c9a 2022-07-30 op echo "#include <unistd.h>"
529 0efd7c9a 2022-07-30 op echo
530 0efd7c9a 2022-07-30 op fi
531 0efd7c9a 2022-07-30 op
532 a41ba086 2022-07-30 op if [ ${HAVE_LIBEVENT2:-0} -eq 1 ]; then
533 0efd7c9a 2022-07-30 op cat <<EOF
534 0efd7c9a 2022-07-30 op #include <event2/event.h>
535 0efd7c9a 2022-07-30 op #include <event2/event_compat.h>
536 0efd7c9a 2022-07-30 op #include <event2/event_struct.h>
537 0efd7c9a 2022-07-30 op #include <event2/buffer.h>
538 0efd7c9a 2022-07-30 op #include <event2/buffer_compat.h>
539 0efd7c9a 2022-07-30 op #include <event2/bufferevent.h>
540 0efd7c9a 2022-07-30 op #include <event2/bufferevent_struct.h>
541 0efd7c9a 2022-07-30 op #include <event2/bufferevent_compat.h>
542 0efd7c9a 2022-07-30 op EOF
543 0efd7c9a 2022-07-30 op fi
544 0efd7c9a 2022-07-30 op
545 0efd7c9a 2022-07-30 op if [ ${HAVE_LIBEVENT} -eq 1 ]; then
546 0efd7c9a 2022-07-30 op cat <<EOF
547 0efd7c9a 2022-07-30 op #include <event.h>
548 0efd7c9a 2022-07-30 op EOF
549 0efd7c9a 2022-07-30 op fi
550 0efd7c9a 2022-07-30 op
551 0efd7c9a 2022-07-30 op # Now we handle our HAVE_xxxx values.
552 0efd7c9a 2022-07-30 op # Most will just be defined as 0 or 1.
553 0efd7c9a 2022-07-30 op
554 0efd7c9a 2022-07-30 op cat <<EOF
555 0efd7c9a 2022-07-30 op
556 0efd7c9a 2022-07-30 op /*
557 0efd7c9a 2022-07-30 op * Results of configuration feature-testing.
558 0efd7c9a 2022-07-30 op */
559 0efd7c9a 2022-07-30 op #define HAVE_GETEXECNAME ${HAVE_GETEXECNAME}
560 0efd7c9a 2022-07-30 op #define HAVE_GETPROGNAME ${HAVE_GETPROGNAME}
561 0efd7c9a 2022-07-30 op #define HAVE_PLEDGE ${HAVE_PLEDGE}
562 0efd7c9a 2022-07-30 op #define HAVE_PROGRAM_INVOCATION_SHORT_NAME ${HAVE_PROGRAM_INVOCATION_SHORT_NAME}
563 0efd7c9a 2022-07-30 op #define HAVE_PR_SET_NAME ${HAVE_PR_SET_NAME}
564 cfe57149 2022-07-30 op #define HAVE_SO_SPLICE ${HAVE_SO_SPLICE}
565 0efd7c9a 2022-07-30 op #define HAVE_STRLCAT ${HAVE_STRLCAT}
566 0efd7c9a 2022-07-30 op #define HAVE_STRLCPY ${HAVE_STRLCPY}
567 0efd7c9a 2022-07-30 op #define HAVE_STRTONUM ${HAVE_STRTONUM}
568 0efd7c9a 2022-07-30 op #define HAVE_UNVEIL ${HAVE_UNVEIL}
569 0efd7c9a 2022-07-30 op #define HAVE___PROGNAME ${HAVE___PROGNAME}
570 0efd7c9a 2022-07-30 op
571 0efd7c9a 2022-07-30 op /* Now we do our function declarations for missing functions. */
572 0efd7c9a 2022-07-30 op
573 0efd7c9a 2022-07-30 op #if !HAVE_GETPROGNAME
574 0efd7c9a 2022-07-30 op extern const char *getprogname(void);
575 a41ba086 2022-07-30 op #endif
576 a41ba086 2022-07-30 op
577 a41ba086 2022-07-30 op #if !HAVE_PLEDGE
578 a41ba086 2022-07-30 op # define pledge(a, b) (0)
579 0efd7c9a 2022-07-30 op #endif
580 0efd7c9a 2022-07-30 op
581 0efd7c9a 2022-07-30 op #if !HAVE_STRLCAT
582 0efd7c9a 2022-07-30 op extern size_t strlcat(char *, const char *, size_t);
583 0efd7c9a 2022-07-30 op #endif
584 0efd7c9a 2022-07-30 op
585 0efd7c9a 2022-07-30 op #if !HAVE_STRLCPY
586 0efd7c9a 2022-07-30 op extern size_t strlcpy(char *, const char *, size_t);
587 0efd7c9a 2022-07-30 op #endif
588 0efd7c9a 2022-07-30 op
589 0efd7c9a 2022-07-30 op #if !HAVE_STRTONUM
590 0efd7c9a 2022-07-30 op extern long long strtonum(const char *, long long, long long, const char **);
591 0efd7c9a 2022-07-30 op #endif
592 0efd7c9a 2022-07-30 op
593 a41ba086 2022-07-30 op #if !HAVE_UNVEIL
594 a41ba086 2022-07-30 op # define unveil(a, b) (0)
595 a41ba086 2022-07-30 op #endif
596 a41ba086 2022-07-30 op
597 0efd7c9a 2022-07-30 op #ifndef __dead
598 0efd7c9a 2022-07-30 op # define __dead __attribute__((noreturn))
599 0efd7c9a 2022-07-30 op #endif
600 0efd7c9a 2022-07-30 op
601 9050e628 2022-07-30 op #define SSH_PROG "${SSH_PROG}"
602 9050e628 2022-07-30 op
603 0efd7c9a 2022-07-30 op #endif /*!OCONFIGURE_CONFIG_H*/
604 0efd7c9a 2022-07-30 op EOF
605 0efd7c9a 2022-07-30 op
606 0efd7c9a 2022-07-30 op echo "config.h: written" 1>&2
607 0efd7c9a 2022-07-30 op echo "config.h: written" 1>&3
608 0efd7c9a 2022-07-30 op
609 0efd7c9a 2022-07-30 op #----------------------------------------------------------------------
610 0efd7c9a 2022-07-30 op # Now we go to generate our Makefile.configure.
611 0efd7c9a 2022-07-30 op # This file is simply a bunch of Makefile variables.
612 0efd7c9a 2022-07-30 op # They'll work in both GNUmakefile and BSDmakefile.
613 0efd7c9a 2022-07-30 op # You MIGHT want to change this.
614 0efd7c9a 2022-07-30 op #----------------------------------------------------------------------
615 0efd7c9a 2022-07-30 op
616 0efd7c9a 2022-07-30 op exec > Makefile.configure
617 0efd7c9a 2022-07-30 op
618 0efd7c9a 2022-07-30 op [ -z "${BINDIR}" ] && BINDIR="${PREFIX}/bin"
619 0efd7c9a 2022-07-30 op [ -z "${SBINDIR}" ] && SBINDIR="${PREFIX}/sbin"
620 0efd7c9a 2022-07-30 op [ -z "${INCLUDEDIR}" ] && INCLUDEDIR="${PREFIX}/include"
621 0efd7c9a 2022-07-30 op [ -z "${LIBDIR}" ] && LIBDIR="${PREFIX}/lib"
622 0efd7c9a 2022-07-30 op [ -z "${MANDIR}" ] && MANDIR="${PREFIX}/man"
623 0efd7c9a 2022-07-30 op [ -z "${SHAREDIR}" ] && SHAREDIR="${PREFIX}/share"
624 0efd7c9a 2022-07-30 op
625 0efd7c9a 2022-07-30 op [ -z "${INSTALL_PROGRAM}" ] && INSTALL_PROGRAM="${INSTALL} -m 0555"
626 0efd7c9a 2022-07-30 op [ -z "${INSTALL_LIB}" ] && INSTALL_LIB="${INSTALL} -m 0444"
627 0efd7c9a 2022-07-30 op [ -z "${INSTALL_MAN}" ] && INSTALL_MAN="${INSTALL} -m 0444"
628 0efd7c9a 2022-07-30 op [ -z "${INSTALL_DATA}" ] && INSTALL_DATA="${INSTALL} -m 0444"
629 0efd7c9a 2022-07-30 op
630 0efd7c9a 2022-07-30 op cat <<EOF
631 0efd7c9a 2022-07-30 op CC = ${CC}
632 0efd7c9a 2022-07-30 op CFLAGS = ${CFLAGS}
633 0efd7c9a 2022-07-30 op CPPFLAGS = ${CPPFLAGS}
634 0efd7c9a 2022-07-30 op LDADD = ${LDADD} ${LDADD_LIB_SOCKET} ${LDADD_LIBEVENT} ${LDADD_LIBEVENT2}
635 0efd7c9a 2022-07-30 op LDADD_STATIC = ${LDADD_STATIC}
636 0efd7c9a 2022-07-30 op LDFLAGS = ${LDFLAGS}
637 0efd7c9a 2022-07-30 op PREFIX = ${PREFIX}
638 0efd7c9a 2022-07-30 op BINDIR = ${BINDIR}
639 0efd7c9a 2022-07-30 op SHAREDIR = ${SHAREDIR}
640 0efd7c9a 2022-07-30 op SBINDIR = ${SBINDIR}
641 0efd7c9a 2022-07-30 op INCLUDEDIR = ${INCLUDEDIR}
642 0efd7c9a 2022-07-30 op LIBDIR = ${LIBDIR}
643 0efd7c9a 2022-07-30 op MANDIR = ${MANDIR}
644 0efd7c9a 2022-07-30 op INSTALL = ${INSTALL}
645 0efd7c9a 2022-07-30 op INSTALL_PROGRAM = ${INSTALL_PROGRAM}
646 0efd7c9a 2022-07-30 op INSTALL_LIB = ${INSTALL_LIB}
647 0efd7c9a 2022-07-30 op INSTALL_MAN = ${INSTALL_MAN}
648 0efd7c9a 2022-07-30 op INSTALL_DATA = ${INSTALL_DATA}
649 0efd7c9a 2022-07-30 op EOF
650 0efd7c9a 2022-07-30 op
651 0efd7c9a 2022-07-30 op echo "Makefile.configure: written" 1>&2
652 0efd7c9a 2022-07-30 op echo "Makefile.configure: written" 1>&3
653 0efd7c9a 2022-07-30 op
654 0efd7c9a 2022-07-30 op exit 0