3 # $Id: configure,v 1.81 2021/09/20 10:19:51 schwarze Exp $
5 # Copyright (c) 2014-2021 Ingo Schwarze <schwarze@openbsd.org>
7 # Permission to use, copy, modify, and distribute this software for any
8 # purpose with or without fee is hereby granted, provided that the above
9 # copyright notice and this permission notice appear in all copies.
11 # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
12 # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
13 # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
14 # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
15 # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
16 # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
17 # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
21 [ -w config.log
] && mv config.log config.log.old
22 [ -w config.h
] && mv config.h config.h.old
24 # Output file descriptor usage:
25 # 1 (stdout): config.h, Makefile.local
26 # 2 (stderr): original stderr, usually to the console
30 echo "file config.log: writing..."
32 # --- default settings -------------------------------------------------
33 # Initialize all variables here,
34 # such that nothing can leak in from the environment.
36 SOURCEDIR
=`dirname "${0}"`
38 MANPATH_BASE
="/usr/share/man:/usr/X11R6/man"
39 MANPATH_DEFAULT
="/usr/share/man:/usr/X11R6/man:/usr/local/man"
66 HAVE_FTS_COMPARE_CONST
=
118 BINM_APROPOS
="apropos"
120 BINM_MAKEWHATIS
="makewhatis"
126 MANM_MANCONF
="man.conf"
139 # --- manual settings from configure.local -----------------------------
141 if [ -r .
/configure.
local ]; then
142 echo "file configure.local: reading..." 1>&2
143 echo "file configure.local: reading..." 1>&3
144 cat .
/configure.
local 1>&3
147 echo "file configure.local: no (fully automatic configuration)" 1>&2
148 echo "file configure.local: no (fully automatic configuration)" 1>&3
152 # --- tests functions --------------------------------------------------
154 # Check whether this HAVE_ setting is manually overridden.
155 # If yes, use the override, if no, do not decide anything yet.
156 # Arguments: test file name, test var name, manual value
158 [ -z "${3}" ] && return 1
159 echo "tested ${1}: HAVE_${2}=${3} (manual)" 1>&2
160 echo "tested ${1}: HAVE_${2}=${3} (manual)" 1>&3
165 # Run a single autoconfiguration test.
166 # In case of success, enable the feature.
167 # In case of failure, do not decide anything yet.
168 # Arguments: test file name, test var name, additional CFLAGS
171 cat 1>&3 << __HEREDOC__
173 ${COMP} -o test-${1} test-${1}.c ${3}
176 if ${COMP} -o "test-${1}" "${SOURCEDIR}/test-${1}.c" ${3} 1>&3 2>&3
178 echo "partial result of ${n}: ${CC} succeeded" 1>&3
180 echo "tested ${n}: no (compilation failed)" 1>&2
181 echo "result of ${n}: ${CC} failed with exit status $?" 1>&3
182 echo "result of compiling ${n}: no" 1>&3
187 if .
/test-${1} 1>&3 2>&3; then
188 echo "tested ${n}: yes" 1>&2
189 echo "result of running ${n}: yes" 1>&3
192 [ "${3}" = "-D_GNU_SOURCE" ] && NEED_GNU_SOURCE
=1
193 [ "${3}" = "-D_OPENBSD_SOURCE" ] && NEED_OPENBSD_SOURCE
=1
194 [ "${3}" = "-D_XPG4_2" ] && NEED_XPG4_2
=1
195 [ "${3}" = "-lrt" ] && LD_NANOSLEEP
="-lrt"
196 [ "${3}" = "-lsocket" ] && LD_RECVMSG
="-lsocket"
197 [ "${3}" = "-lutil" ] && LD_OHASH
="-lutil"
201 echo "tested ${n}: no (execution failed)" 1>&2
202 echo "result of ${n}: execution failed with exit status $?" 1>&3
203 echo "result of running ${n}: no" 1>&3
210 # Run a complete autoconfiguration test, including the check for
211 # a manual override and disabling the feature on failure.
212 # Arguments: test file name, test var name, additional CFLAGS
213 # The final argument can optionally be repeated a second time.
215 eval _manual
=\
${HAVE_${2}}
216 ismanual
"${1}" "${2}" "${_manual}" && return 0
217 singletest
"${1}" "${2}" "${3}" && return 0
218 [ -n "${4}" ] && singletest
"${1}" "${2}" "${4}" && return 0
223 # Select a UTF-8 locale.
225 [ -n "${HAVE_WCHAR}" ] && [ "${HAVE_WCHAR}" -eq 0 ] && return 0
226 ismanual UTF8_LOCALE UTF8_LOCALE
"${UTF8_LOCALE}" && return 0
227 echo "testing UTF8_LOCALE ..." 1>&3
228 UTF8_LOCALE
=`locale -a | grep -i '^en_US\.UTF-*8$' | head -n 1`
229 if [ -z "${UTF8_LOCALE}" ]; then
230 UTF8_LOCALE
=`locale -a | grep -i '\.UTF-*8' | head -n 1`
231 [ -n "${UTF8_LOCALE}" ] || return 1
233 echo "selected UTF8_LOCALE=${UTF8_LOCALE}" 1>&2
234 echo "selected UTF8_LOCALE=${UTF8_LOCALE}" 1>&3
239 # --- operating system -------------------------------------------------
241 if [ -n "${OSENUM}" ]; then
242 echo "OSENUM specified manually: ${OSENUM}" 1>&2
243 echo "OSENUM specified manually: ${OSENUM}" 1>&3
246 if [ "${OSDETECT}" = "NetBSD" ]; then
247 OSENUM
=MANDOC_OS_NETBSD
248 elif [ "${OSDETECT}" = "OpenBSD" ]; then
249 OSENUM
=MANDOC_OS_OPENBSD
251 OSENUM
=MANDOC_OS_OTHER
253 echo "tested operating system: ${OSDETECT} -> OSENUM=${OSENUM}" 1>&2
254 echo "tested operating system: ${OSDETECT} -> OSENUM=${OSENUM}" 1>&3
259 # --- compiler options -------------------------------------------------
261 DEFCFLAGS
="-g -W -Wall -Wmissing-prototypes -Wstrict-prototypes -Wwrite-strings -Wno-unused-parameter"
263 if [ -n "${CFLAGS}" ]; then
264 COMP
="${CC} ${CFLAGS} -Wno-unused -Werror"
266 COMP
="${CC} ${DEFCFLAGS} -Wno-unused -Werror"
268 printf "%s" "tested ${CC} -W: " 1>&2
269 printf "%s" "testing ${CC} -W: " 1>&3
270 runtest noop WFLAG
|| true
272 if [ -n "${CFLAGS}" ]; then
273 echo "CFLAGS specified manually:" 1>&3
274 elif [ ${HAVE_WFLAG} -eq 0 ]; then
277 CFLAGS
="${DEFCFLAGS}"
279 echo "selected CFLAGS=\"${CFLAGS}\"" 1>&2
280 echo "selected CFLAGS=\"${CFLAGS}\"" 1>&3
283 COMP
="${CC} ${CFLAGS}"
284 [ ${HAVE_WFLAG} -eq 0 ] || COMP
="${COMP} -Wno-unused -Werror"
286 if [ -n "${STATIC}" ]; then
287 echo "selected STATIC=\"${STATIC}\" (manual)" 1>&2
288 echo "selected STATIC=\"${STATIC}\" (manual)" 1>&3
291 runtest noop STATIC
-static || true
292 [ ${HAVE_STATIC} -eq 0 ] || STATIC
="-static"
293 echo "selected STATIC=\"${STATIC}\"" 1>&2
294 echo "selected STATIC=\"${STATIC}\"" 1>&3
298 # --- tests for config.h ----------------------------------------------
300 # --- library functions ---
301 runtest attribute ATTRIBUTE
|| true
302 runtest cmsg CMSG
"" "-D_XPG4_2" || true
303 runtest dirent
-namlen DIRENT_NAMLEN
|| true
304 runtest be32toh ENDIAN
|| true
305 runtest be32toh SYS_ENDIAN
-DSYS_ENDIAN || true
306 runtest EFTYPE EFTYPE
|| true
307 runtest err ERR
|| true
308 runtest getline GETLINE
|| true
309 runtest getsubopt GETSUBOPT
"" -D_GNU_SOURCE || true
310 runtest isblank ISBLANK
|| true
311 runtest mkdtemp MKDTEMP
|| true
312 runtest mkstemps MKSTEMPS
|| true
313 runtest nanosleep NANOSLEEP
"${LD_NANOSLEEP}" "-lrt" || true
314 runtest ntohl NTOHL
|| true
315 runtest O_DIRECTORY O_DIRECTORY
|| true
316 runtest PATH_MAX PATH_MAX
|| true
317 runtest pledge PLEDGE
|| true
318 runtest sandbox_init SANDBOX_INIT
|| true
319 runtest progname PROGNAME
|| true
320 runtest reallocarray REALLOCARRAY
"" -D_OPENBSD_SOURCE || true
321 runtest recallocarray RECALLOCARRAY
"" -D_OPENBSD_SOURCE || true
322 runtest recvmsg RECVMSG
"${LD_RECVMSG}" "-lsocket" || true
323 runtest rewb
-bsd REWB_BSD
|| true
324 runtest rewb
-sysv REWB_SYSV
|| true
325 runtest strcasestr STRCASESTR
"" -D_GNU_SOURCE || true
326 runtest stringlist STRINGLIST
|| true
327 runtest strlcat STRLCAT
|| true
328 runtest strlcpy STRLCPY
|| true
329 runtest strndup STRNDUP
|| true
330 runtest strptime STRPTIME
"" -D_GNU_SOURCE || true
331 runtest strsep STRSEP
|| true
332 runtest strtonum STRTONUM
"" -D_OPENBSD_SOURCE || true
333 runtest vasprintf VASPRINTF
"" -D_GNU_SOURCE || true
336 if [ "${1}" = "-depend" ]; then
338 HAVE_FTS_COMPARE_CONST
=0
339 echo "tested fts: HAVE_FTS=0 (for make depend)" 1>&2
340 echo "tested fts: HAVE_FTS=0 (for make depend)" 1>&3
342 elif ismanual fts FTS
${HAVE_FTS}; then
343 HAVE_FTS_COMPARE_CONST
=0
344 elif runtest fts FTS_COMPARE_CONST
-DFTS_COMPARE_CONST; then
347 runtest fts FTS
|| true
352 if [ -n "${BINM_PAGER}" ]; then
354 elif less test-noop.c
1>/dev
/null
2>&3; then
356 echo "tested less: yes" 1>&2
357 echo "tested less: yes" 1>&3
360 echo "tested less: no" 1>&2
361 echo "tested less: no" 1>&3
363 echo "selected BINM_PAGER=${BINM_PAGER}${manual}" 1>&2
364 echo "selected BINM_PAGER=${BINM_PAGER}${manual}" 1>&3
366 # --- tagging support in the pager ---
367 if ismanual
"${BINM_PAGER} -T" LESS_T
${HAVE_LESS_T}; then
369 elif ${BINM_PAGER} -T /dev
/null
test-noop.c
1>/dev
/null
2>&3; then
371 echo "tested ${BINM_PAGER} -T: yes" 1>&2
372 echo "tested ${BINM_PAGER} -T: yes" 1>&3
376 echo "tested ${BINM_PAGER} -T: no" 1>&2
377 echo "tested ${BINM_PAGER} -T: no" 1>&3
381 # --- wide character and locale support ---
383 runtest wchar WCHAR
"-DUTF8_LOCALE=\"${UTF8_LOCALE}\"" \
384 "-D_GNU_SOURCE -DUTF8_LOCALE=\"${UTF8_LOCALE}\"" || true
387 echo "tested wchar: no (no UTF8_LOCALE)" 1>&2
388 echo "tested wchar: no (no UTF8_LOCALE)" 1>&3
393 if [ "${1}" = "-depend" ]; then
395 echo "tested ohash: HAVE_OHASH=0 (for make depend)" 1>&2
396 echo "tested ohash: HAVE_OHASH=0 (for make depend)" 1>&3
399 runtest ohash OHASH
"${LD_OHASH}" "-lutil" || true
401 if [ "${HAVE_OHASH}" -eq 0 ]; then
405 # --- required functions ---
406 if [ ${HAVE_ENDIAN} -eq 0 -a \
407 ${HAVE_SYS_ENDIAN} -eq 0 -a \
408 ${HAVE_NTOHL} -eq 0 ]; then
409 echo "FATAL: no endian conversion functions found" 1>&2
410 echo "FATAL: no endian conversion functions found" 1>&3
413 if [ "${HAVE_NANOSLEEP}" -eq 0 ]; then
414 echo "FATAL: nanosleep: no" 1>&2
415 echo "FATAL: nanosleep: no" 1>&3
418 if [ ${BUILD_CATMAN} -gt 0 -a "${HAVE_RECVMSG}" -eq 0 ]; then
419 echo "FATAL: recvmsg: no" 1>&2
420 echo "FATAL: recvmsg: no" 1>&3
421 echo "Without recvmsg(2), you cannot BUILD_CATMAN." 1>&2
424 if [ ${BUILD_CATMAN} -gt 0 -a "${HAVE_CMSG}" -eq 0 ]; then
425 echo "FATAL: cmsg: no" 1>&2
426 echo "FATAL: cmsg: no" 1>&3
427 echo "Without CMSG_FIRSTHDR(3), you cannot BUILD_CATMAN." 1>&2
430 [ "${FATAL}" -eq 0 ] || exit 1
433 LDADD
="${LDADD} ${LD_NANOSLEEP} ${LD_RECVMSG} ${LD_OHASH} -lz"
434 echo "selected LDADD=\"${LDADD}\"" 1>&2
435 echo "selected LDADD=\"${LDADD}\"" 1>&3
438 # --- write config.h ---
444 #error "Do not use C++. See the INSTALL file."
449 [ ${NEED_GNU_SOURCE} -eq 0 ] || echo "#define _GNU_SOURCE"
450 [ ${NEED_OPENBSD_SOURCE} -eq 0 ] || echo "#define _OPENBSD_SOURCE"
452 [ ${HAVE_GETLINE} -eq 0 -o \
453 ${HAVE_REALLOCARRAY} -eq 0 -o ${HAVE_RECALLOCARRAY} -eq 0 -o \
454 ${HAVE_STRLCAT} -eq 0 -o ${HAVE_STRLCPY} -eq 0 -o \
455 ${HAVE_STRNDUP} -eq 0 ] \
456 && echo "#include <sys/types.h>"
457 [ ${HAVE_VASPRINTF} -eq 0 ] && echo "#include <stdarg.h>"
458 [ ${HAVE_GETLINE} -eq 0 ] && echo "#include <stdio.h>"
461 echo "#define MAN_CONF_FILE \"/etc/${MANM_MANCONF}\""
462 echo "#define MANPATH_BASE \"${MANPATH_BASE}\""
463 echo "#define MANPATH_DEFAULT \"${MANPATH_DEFAULT}\""
464 echo "#define OSENUM ${OSENUM}"
465 [ -n "${OSNAME}" ] && echo "#define OSNAME \"${OSNAME}\""
466 [ -n "${UTF8_LOCALE}" ] && echo "#define UTF8_LOCALE \"${UTF8_LOCALE}\""
467 [ -n "${READ_ALLOWED_PATH}" ] \
468 && echo "#define READ_ALLOWED_PATH \"${READ_ALLOWED_PATH}\""
469 [ ${HAVE_ATTRIBUTE} -eq 0 ] && echo "#define __attribute__(x)"
470 [ ${HAVE_EFTYPE} -eq 0 ] && echo "#define EFTYPE EINVAL"
471 [ ${HAVE_O_DIRECTORY} -eq 0 ] && echo "#define O_DIRECTORY 0"
472 [ ${HAVE_PATH_MAX} -eq 0 ] && echo "#define PATH_MAX 4096"
473 if [ ${HAVE_ENDIAN} -eq 0 -a ${HAVE_SYS_ENDIAN} -eq 0 ]; then
474 echo "#define be32toh ntohl"
475 echo "#define htobe32 htonl"
479 #define HAVE_DIRENT_NAMLEN ${HAVE_DIRENT_NAMLEN}
480 #define HAVE_ENDIAN ${HAVE_ENDIAN}
481 #define HAVE_ERR ${HAVE_ERR}
482 #define HAVE_FTS ${HAVE_FTS}
483 #define HAVE_FTS_COMPARE_CONST ${HAVE_FTS_COMPARE_CONST}
484 #define HAVE_GETLINE ${HAVE_GETLINE}
485 #define HAVE_GETSUBOPT ${HAVE_GETSUBOPT}
486 #define HAVE_ISBLANK ${HAVE_ISBLANK}
487 #define HAVE_LESS_T ${HAVE_LESS_T}
488 #define HAVE_MKDTEMP ${HAVE_MKDTEMP}
489 #define HAVE_MKSTEMPS ${HAVE_MKSTEMPS}
490 #define HAVE_NTOHL ${HAVE_NTOHL}
491 #define HAVE_PLEDGE ${HAVE_PLEDGE}
492 #define HAVE_PROGNAME ${HAVE_PROGNAME}
493 #define HAVE_REALLOCARRAY ${HAVE_REALLOCARRAY}
494 #define HAVE_RECALLOCARRAY ${HAVE_RECALLOCARRAY}
495 #define HAVE_REWB_BSD ${HAVE_REWB_BSD}
496 #define HAVE_REWB_SYSV ${HAVE_REWB_SYSV}
497 #define HAVE_SANDBOX_INIT ${HAVE_SANDBOX_INIT}
498 #define HAVE_STRCASESTR ${HAVE_STRCASESTR}
499 #define HAVE_STRINGLIST ${HAVE_STRINGLIST}
500 #define HAVE_STRLCAT ${HAVE_STRLCAT}
501 #define HAVE_STRLCPY ${HAVE_STRLCPY}
502 #define HAVE_STRNDUP ${HAVE_STRNDUP}
503 #define HAVE_STRPTIME ${HAVE_STRPTIME}
504 #define HAVE_STRSEP ${HAVE_STRSEP}
505 #define HAVE_STRTONUM ${HAVE_STRTONUM}
506 #define HAVE_SYS_ENDIAN ${HAVE_SYS_ENDIAN}
507 #define HAVE_VASPRINTF ${HAVE_VASPRINTF}
508 #define HAVE_WCHAR ${HAVE_WCHAR}
509 #define HAVE_OHASH ${HAVE_OHASH}
510 #define NEED_XPG4_2 ${NEED_XPG4_2}
512 #define BINM_APROPOS "${BINM_APROPOS}"
513 #define BINM_CATMAN "${BINM_CATMAN}"
514 #define BINM_MAKEWHATIS "${BINM_MAKEWHATIS}"
515 #define BINM_MAN "${BINM_MAN}"
516 #define BINM_SOELIM "${BINM_SOELIM}"
517 #define BINM_WHATIS "${BINM_WHATIS}"
518 #define BINM_PAGER "${BINM_PAGER}"
522 if [ ${HAVE_ERR} -eq 0 ]; then
523 echo "extern void err(int, const char *, ...);"
524 echo "extern void errx(int, const char *, ...);"
525 echo "extern void warn(const char *, ...);"
526 echo "extern void warnx(const char *, ...);"
527 MANDOC_COBJS
="${MANDOC_COBJS} compat_err.o"
528 SOELIM_COBJS
="${SOELIM_COBJS} compat_err.o"
530 if [ ${HAVE_FTS} -eq 0 ]; then
531 MANDOC_COBJS
="${MANDOC_COBJS} compat_fts.o"
533 if [ ${HAVE_GETLINE} -eq 0 ]; then
534 echo "extern ssize_t getline(char **, size_t *, FILE *);"
535 MANDOC_COBJS
="${MANDOC_COBJS} compat_getline.o"
536 SOELIM_COBJS
="${SOELIM_COBJS} compat_getline.o"
538 if [ ${HAVE_GETSUBOPT} -eq 0 ]; then
539 echo "extern int getsubopt(char **, char * const *, char **);"
540 MANDOC_COBJS
="${MANDOC_COBJS} compat_getsubopt.o"
542 if [ ${HAVE_ISBLANK} -eq 0 ]; then
543 echo "extern int isblank(int);"
544 MANDOC_COBJS
="${MANDOC_COBJS} compat_isblank.o"
546 if [ ${HAVE_MKDTEMP} -eq 0 ]; then
547 echo "extern char *mkdtemp(char *);"
548 MANDOC_COBJS
="${MANDOC_COBJS} compat_mkdtemp.o"
550 if [ ${HAVE_MKSTEMPS} -eq 0 ]; then
551 echo "extern int mkstemps(char *, int);"
552 MANDOC_COBJS
="${MANDOC_COBJS} compat_mkstemps.o"
554 if [ ${HAVE_OHASH} -eq 0 ]; then
555 MANDOC_COBJS
="${MANDOC_COBJS} compat_ohash.o"
557 if [ ${HAVE_PROGNAME} -eq 0 ]; then
558 echo "extern const char *getprogname(void);"
559 echo "extern void setprogname(const char *);"
560 MANDOC_COBJS
="${MANDOC_COBJS} compat_progname.o"
561 SOELIM_COBJS
="${SOELIM_COBJS} compat_progname.o"
563 if [ ${HAVE_REALLOCARRAY} -eq 0 ]; then
564 echo "extern void *reallocarray(void *, size_t, size_t);"
565 MANDOC_COBJS
="${MANDOC_COBJS} compat_reallocarray.o"
566 SOELIM_COBJS
="${SOELIM_COBJS} compat_reallocarray.o"
568 if [ ${HAVE_RECALLOCARRAY} -eq 0 ]; then
569 echo "extern void *recallocarray(void *, size_t, size_t, size_t);"
570 MANDOC_COBJS
="${MANDOC_COBJS} compat_recallocarray.o"
572 if [ ${HAVE_STRCASESTR} -eq 0 ]; then
573 echo "extern char *strcasestr(const char *, const char *);"
574 MANDOC_COBJS
="${MANDOC_COBJS} compat_strcasestr.o"
576 if [ ${HAVE_STRINGLIST} -eq 0 ]; then
577 SOELIM_COBJS
="${SOELIM_COBJS} compat_stringlist.o"
579 if [ ${HAVE_STRLCAT} -eq 0 ]; then
580 echo "extern size_t strlcat(char *, const char *, size_t);"
581 MANDOC_COBJS
="${MANDOC_COBJS} compat_strlcat.o"
583 if [ ${HAVE_STRLCPY} -eq 0 ]; then
584 echo "extern size_t strlcpy(char *, const char *, size_t);"
585 MANDOC_COBJS
="${MANDOC_COBJS} compat_strlcpy.o"
587 if [ ${HAVE_STRNDUP} -eq 0 ]; then
588 echo "extern char *strndup(const char *, size_t);"
589 MANDOC_COBJS
="${MANDOC_COBJS} compat_strndup.o"
591 if [ ${HAVE_STRSEP} -eq 0 ]; then
592 echo "extern char *strsep(char **, const char *);"
593 MANDOC_COBJS
="${MANDOC_COBJS} compat_strsep.o"
595 if [ ${HAVE_STRTONUM} -eq 0 ]; then
596 echo "extern long long strtonum(const char *, long long, long long, const char **);"
597 MANDOC_COBJS
="${MANDOC_COBJS} compat_strtonum.o"
599 if [ ${HAVE_VASPRINTF} -eq 0 ]; then
600 echo "extern int vasprintf(char **, const char *, va_list);"
601 MANDOC_COBJS
="${MANDOC_COBJS} compat_vasprintf.o"
603 echo "file config.h: written" 1>&2
604 echo "file config.h: written" 1>&3
606 # --- tests for Makefile.local -----------------------------------------
608 exec > Makefile.
local
610 [ -z "${BINDIR}" ] && BINDIR
="${PREFIX}/bin"
611 [ -z "${SBINDIR}" ] && SBINDIR
="${PREFIX}/sbin"
612 [ -z "${BIN_FROM_SBIN}" ] && BIN_FROM_SBIN
="../bin"
613 [ -z "${INCLUDEDIR}" ] && INCLUDEDIR
="${PREFIX}/include/mandoc"
614 [ -z "${LIBDIR}" ] && LIBDIR
="${PREFIX}/lib/mandoc"
615 [ -z "${MANDIR}" ] && MANDIR
="${PREFIX}/man"
617 [ -z "${HTDOCDIR}" ] && HTDOCDIR
="${WWWPREFIX}/htdocs"
618 [ -z "${CGIBINDIR}" ] && CGIBINDIR
="${WWWPREFIX}/cgi-bin"
620 [ -z "${INSTALL_PROGRAM}" ] && INSTALL_PROGRAM
="${INSTALL} -m 0555"
621 [ -z "${INSTALL_LIB}" ] && INSTALL_LIB
="${INSTALL} -m 0444"
622 [ -z "${INSTALL_MAN}" ] && INSTALL_MAN
="${INSTALL} -m 0444"
623 [ -z "${INSTALL_DATA}" ] && INSTALL_DATA
="${INSTALL} -m 0444"
626 [ ${BUILD_CGI} -gt 0 ] && BUILD_TARGETS
="man.cgi"
627 [ ${BUILD_CATMAN} -gt 0 ] && \
628 BUILD_TARGETS
="${BUILD_TARGETS} mandocd catman"
630 [ ${INSTALL_LIBMANDOC} -gt 0 ] && INSTALL_TARGETS
="lib-install"
631 [ ${BUILD_CGI} -gt 0 ] && INSTALL_TARGETS
="${INSTALL_TARGETS} cgi-install"
632 [ ${BUILD_CATMAN} -gt 0 ] && \
633 INSTALL_TARGETS
="${INSTALL_TARGETS} catman-install"
636 BUILD_TARGETS = ${BUILD_TARGETS}
637 INSTALL_TARGETS = ${INSTALL_TARGETS}
643 MANDOC_COBJS = ${MANDOC_COBJS}
644 SOELIM_COBJS = ${SOELIM_COBJS}
649 BIN_FROM_SBIN = ${BIN_FROM_SBIN}
650 INCLUDEDIR = ${INCLUDEDIR}
653 WWWPREFIX = ${WWWPREFIX}
654 HTDOCDIR = ${HTDOCDIR}
655 CGIBINDIR = ${CGIBINDIR}
656 BINM_APROPOS = ${BINM_APROPOS}
657 BINM_CATMAN = ${BINM_CATMAN}
658 BINM_MAKEWHATIS = ${BINM_MAKEWHATIS}
659 BINM_MAN = ${BINM_MAN}
660 BINM_SOELIM = ${BINM_SOELIM}
661 BINM_WHATIS = ${BINM_WHATIS}
662 MANM_MAN = ${MANM_MAN}
663 MANM_MANCONF = ${MANM_MANCONF}
664 MANM_MDOC = ${MANM_MDOC}
665 MANM_ROFF = ${MANM_ROFF}
666 MANM_EQN = ${MANM_EQN}
667 MANM_TBL = ${MANM_TBL}
669 INSTALL_PROGRAM = ${INSTALL_PROGRAM}
670 INSTALL_LIB = ${INSTALL_LIB}
671 INSTALL_MAN = ${INSTALL_MAN}
672 INSTALL_DATA = ${INSTALL_DATA}
676 echo "file Makefile.local: written" 1>&2
677 echo "file Makefile.local: written" 1>&3