3 # $Id: configure,v 1.80 2021/09/19 15:05:39 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"
65 HAVE_FTS_COMPARE_CONST
=
117 BINM_APROPOS
="apropos"
119 BINM_MAKEWHATIS
="makewhatis"
125 MANM_MANCONF
="man.conf"
138 # --- manual settings from configure.local -----------------------------
140 if [ -r .
/configure.
local ]; then
141 echo "file configure.local: reading..." 1>&2
142 echo "file configure.local: reading..." 1>&3
143 cat .
/configure.
local 1>&3
146 echo "file configure.local: no (fully automatic configuration)" 1>&2
147 echo "file configure.local: no (fully automatic configuration)" 1>&3
151 # --- tests functions --------------------------------------------------
153 # Check whether this HAVE_ setting is manually overridden.
154 # If yes, use the override, if no, do not decide anything yet.
155 # Arguments: test file name, test var name, manual value
157 [ -z "${3}" ] && return 1
158 echo "tested ${1}: HAVE_${2}=${3} (manual)" 1>&2
159 echo "tested ${1}: HAVE_${2}=${3} (manual)" 1>&3
164 # Run a single autoconfiguration test.
165 # In case of success, enable the feature.
166 # In case of failure, do not decide anything yet.
167 # Arguments: test file name, test var name, additional CFLAGS
170 cat 1>&3 << __HEREDOC__
172 ${COMP} -o test-${1} test-${1}.c ${3}
175 if ${COMP} -o "test-${1}" "${SOURCEDIR}/test-${1}.c" ${3} 1>&3 2>&3
177 echo "partial result of ${n}: ${CC} succeeded" 1>&3
179 echo "tested ${n}: no (compilation failed)" 1>&2
180 echo "result of ${n}: ${CC} failed with exit status $?" 1>&3
181 echo "result of compiling ${n}: no" 1>&3
186 if .
/test-${1} 1>&3 2>&3; then
187 echo "tested ${n}: yes" 1>&2
188 echo "result of running ${n}: yes" 1>&3
191 [ "${3}" = "-D_GNU_SOURCE" ] && NEED_GNU_SOURCE
=1
192 [ "${3}" = "-D_OPENBSD_SOURCE" ] && NEED_OPENBSD_SOURCE
=1
193 [ "${3}" = "-D_XPG4_2" ] && NEED_XPG4_2
=1
194 [ "${3}" = "-lrt" ] && LD_NANOSLEEP
="-lrt"
195 [ "${3}" = "-lsocket" ] && LD_RECVMSG
="-lsocket"
196 [ "${3}" = "-lutil" ] && LD_OHASH
="-lutil"
200 echo "tested ${n}: no (execution failed)" 1>&2
201 echo "result of ${n}: execution failed with exit status $?" 1>&3
202 echo "result of running ${n}: no" 1>&3
209 # Run a complete autoconfiguration test, including the check for
210 # a manual override and disabling the feature on failure.
211 # Arguments: test file name, test var name, additional CFLAGS
212 # The final argument can optionally be repeated a second time.
214 eval _manual
=\
${HAVE_${2}}
215 ismanual
"${1}" "${2}" "${_manual}" && return 0
216 singletest
"${1}" "${2}" "${3}" && return 0
217 [ -n "${4}" ] && singletest
"${1}" "${2}" "${4}" && return 0
222 # Select a UTF-8 locale.
224 [ -n "${HAVE_WCHAR}" ] && [ "${HAVE_WCHAR}" -eq 0 ] && return 0
225 ismanual UTF8_LOCALE UTF8_LOCALE
"${UTF8_LOCALE}" && return 0
226 echo "testing UTF8_LOCALE ..." 1>&3
227 UTF8_LOCALE
=`locale -a | grep -i '^en_US\.UTF-*8$' | head -n 1`
228 if [ -z "${UTF8_LOCALE}" ]; then
229 UTF8_LOCALE
=`locale -a | grep -i '\.UTF-*8' | head -n 1`
230 [ -n "${UTF8_LOCALE}" ] || return 1
232 echo "selected UTF8_LOCALE=${UTF8_LOCALE}" 1>&2
233 echo "selected UTF8_LOCALE=${UTF8_LOCALE}" 1>&3
238 # --- operating system -------------------------------------------------
240 if [ -n "${OSENUM}" ]; then
241 echo "OSENUM specified manually: ${OSENUM}" 1>&2
242 echo "OSENUM specified manually: ${OSENUM}" 1>&3
245 if [ "${OSDETECT}" = "NetBSD" ]; then
246 OSENUM
=MANDOC_OS_NETBSD
247 elif [ "${OSDETECT}" = "OpenBSD" ]; then
248 OSENUM
=MANDOC_OS_OPENBSD
250 OSENUM
=MANDOC_OS_OTHER
252 echo "tested operating system: ${OSDETECT} -> OSENUM=${OSENUM}" 1>&2
253 echo "tested operating system: ${OSDETECT} -> OSENUM=${OSENUM}" 1>&3
258 # --- compiler options -------------------------------------------------
260 DEFCFLAGS
="-g -W -Wall -Wmissing-prototypes -Wstrict-prototypes -Wwrite-strings -Wno-unused-parameter"
262 if [ -n "${CFLAGS}" ]; then
263 COMP
="${CC} ${CFLAGS} -Wno-unused -Werror"
265 COMP
="${CC} ${DEFCFLAGS} -Wno-unused -Werror"
267 printf "%s" "tested ${CC} -W: " 1>&2
268 printf "%s" "testing ${CC} -W: " 1>&3
269 runtest noop WFLAG
|| true
271 if [ -n "${CFLAGS}" ]; then
272 echo "CFLAGS specified manually:" 1>&3
273 elif [ ${HAVE_WFLAG} -eq 0 ]; then
276 CFLAGS
="${DEFCFLAGS}"
278 echo "selected CFLAGS=\"${CFLAGS}\"" 1>&2
279 echo "selected CFLAGS=\"${CFLAGS}\"" 1>&3
282 COMP
="${CC} ${CFLAGS}"
283 [ ${HAVE_WFLAG} -eq 0 ] || COMP
="${COMP} -Wno-unused -Werror"
285 if [ -n "${STATIC}" ]; then
286 echo "selected STATIC=\"${STATIC}\" (manual)" 1>&2
287 echo "selected STATIC=\"${STATIC}\" (manual)" 1>&3
290 runtest noop STATIC
-static || true
291 [ ${HAVE_STATIC} -eq 0 ] || STATIC
="-static"
292 echo "selected STATIC=\"${STATIC}\"" 1>&2
293 echo "selected STATIC=\"${STATIC}\"" 1>&3
297 # --- tests for config.h ----------------------------------------------
299 # --- library functions ---
300 runtest attribute ATTRIBUTE
|| true
301 runtest cmsg CMSG
"" "-D_XPG4_2" || true
302 runtest dirent
-namlen DIRENT_NAMLEN
|| true
303 runtest be32toh ENDIAN
|| true
304 runtest be32toh SYS_ENDIAN
-DSYS_ENDIAN || true
305 runtest EFTYPE EFTYPE
|| true
306 runtest err ERR
|| true
307 runtest getline GETLINE
|| true
308 runtest getsubopt GETSUBOPT
"" -D_GNU_SOURCE || true
309 runtest isblank ISBLANK
|| true
310 runtest mkdtemp MKDTEMP
|| true
311 runtest mkstemps MKSTEMPS
|| true
312 runtest nanosleep NANOSLEEP
"${LD_NANOSLEEP}" "-lrt" || true
313 runtest ntohl NTOHL
|| true
314 runtest O_DIRECTORY O_DIRECTORY
|| true
315 runtest PATH_MAX PATH_MAX
|| true
316 runtest pledge PLEDGE
|| true
317 runtest sandbox_init SANDBOX_INIT
|| true
318 runtest progname PROGNAME
|| true
319 runtest reallocarray REALLOCARRAY
"" -D_OPENBSD_SOURCE || true
320 runtest recallocarray RECALLOCARRAY
"" -D_OPENBSD_SOURCE || true
321 runtest recvmsg RECVMSG
"${LD_RECVMSG}" "-lsocket" || true
322 runtest rewb
-bsd REWB_BSD
|| true
323 runtest rewb
-sysv REWB_SYSV
|| true
324 runtest strcasestr STRCASESTR
"" -D_GNU_SOURCE || true
325 runtest stringlist STRINGLIST
|| true
326 runtest strlcat STRLCAT
|| true
327 runtest strlcpy STRLCPY
|| true
328 runtest strndup STRNDUP
|| true
329 runtest strptime STRPTIME
"" -D_GNU_SOURCE || true
330 runtest strsep STRSEP
|| true
331 runtest strtonum STRTONUM
"" -D_OPENBSD_SOURCE || true
332 runtest vasprintf VASPRINTF
"" -D_GNU_SOURCE || true
335 if [ "${1}" = "-depend" ]; then
337 HAVE_FTS_COMPARE_CONST
=0
338 echo "tested fts: HAVE_FTS=0 (for make depend)" 1>&2
339 echo "tested fts: HAVE_FTS=0 (for make depend)" 1>&3
341 elif ismanual fts FTS
${HAVE_FTS}; then
342 HAVE_FTS_COMPARE_CONST
=0
343 elif runtest fts FTS_COMPARE_CONST
-DFTS_COMPARE_CONST; then
346 runtest fts FTS
|| true
351 if [ -n "${BINM_PAGER}" ]; then
353 elif less test-noop.c
1>/dev
/null
2>&3; then
355 echo "tested less: yes" 1>&2
356 echo "tested less: yes" 1>&3
359 echo "tested less: no" 1>&2
360 echo "tested less: no" 1>&3
362 echo "selected BINM_PAGER=${BINM_PAGER}${manual}" 1>&2
363 echo "selected BINM_PAGER=${BINM_PAGER}${manual}" 1>&3
365 # --- tagging support in the pager ---
366 if ismanual
"${BINM_PAGER} -T" LESS_T
${HAVE_LESS_T}; then
368 elif ${BINM_PAGER} -T /dev
/null
test-noop.c
1>/dev
/null
2>&3; then
370 echo "tested ${BINM_PAGER} -T: yes" 1>&2
371 echo "tested ${BINM_PAGER} -T: yes" 1>&3
375 echo "tested ${BINM_PAGER} -T: no" 1>&2
376 echo "tested ${BINM_PAGER} -T: no" 1>&3
380 # --- wide character and locale support ---
382 runtest wchar WCHAR
"-DUTF8_LOCALE=\"${UTF8_LOCALE}\"" \
383 "-D_GNU_SOURCE -DUTF8_LOCALE=\"${UTF8_LOCALE}\"" || true
386 echo "tested wchar: no (no UTF8_LOCALE)" 1>&2
387 echo "tested wchar: no (no UTF8_LOCALE)" 1>&3
392 if [ "${1}" = "-depend" ]; then
394 echo "tested ohash: HAVE_OHASH=0 (for make depend)" 1>&2
395 echo "tested ohash: HAVE_OHASH=0 (for make depend)" 1>&3
398 runtest ohash OHASH
"${LD_OHASH}" "-lutil" || true
400 if [ "${HAVE_OHASH}" -eq 0 ]; then
404 # --- required functions ---
405 if [ ${HAVE_ENDIAN} -eq 0 -a \
406 ${HAVE_SYS_ENDIAN} -eq 0 -a \
407 ${HAVE_NTOHL} -eq 0 ]; then
408 echo "FATAL: no endian conversion functions found" 1>&2
409 echo "FATAL: no endian conversion functions found" 1>&3
412 if [ "${HAVE_NANOSLEEP}" -eq 0 ]; then
413 echo "FATAL: nanosleep: no" 1>&2
414 echo "FATAL: nanosleep: no" 1>&3
417 if [ ${BUILD_CATMAN} -gt 0 -a "${HAVE_RECVMSG}" -eq 0 ]; then
418 echo "FATAL: recvmsg: no" 1>&2
419 echo "FATAL: recvmsg: no" 1>&3
420 echo "Without recvmsg(2), you cannot BUILD_CATMAN." 1>&2
423 if [ ${BUILD_CATMAN} -gt 0 -a "${HAVE_CMSG}" -eq 0 ]; then
424 echo "FATAL: cmsg: no" 1>&2
425 echo "FATAL: cmsg: no" 1>&3
426 echo "Without CMSG_FIRSTHDR(3), you cannot BUILD_CATMAN." 1>&2
429 [ "${FATAL}" -eq 0 ] || exit 1
432 LDADD
="${LDADD} ${LD_NANOSLEEP} ${LD_RECVMSG} ${LD_OHASH} -lz"
433 echo "selected LDADD=\"${LDADD}\"" 1>&2
434 echo "selected LDADD=\"${LDADD}\"" 1>&3
437 # --- write config.h ---
443 #error "Do not use C++. See the INSTALL file."
448 [ ${NEED_GNU_SOURCE} -eq 0 ] || echo "#define _GNU_SOURCE"
449 [ ${NEED_OPENBSD_SOURCE} -eq 0 ] || echo "#define _OPENBSD_SOURCE"
451 [ ${HAVE_GETLINE} -eq 0 -o \
452 ${HAVE_REALLOCARRAY} -eq 0 -o ${HAVE_RECALLOCARRAY} -eq 0 -o \
453 ${HAVE_STRLCAT} -eq 0 -o ${HAVE_STRLCPY} -eq 0 -o \
454 ${HAVE_STRNDUP} -eq 0 ] \
455 && echo "#include <sys/types.h>"
456 [ ${HAVE_VASPRINTF} -eq 0 ] && echo "#include <stdarg.h>"
457 [ ${HAVE_GETLINE} -eq 0 ] && echo "#include <stdio.h>"
460 echo "#define MAN_CONF_FILE \"/etc/${MANM_MANCONF}\""
461 echo "#define MANPATH_BASE \"${MANPATH_BASE}\""
462 echo "#define MANPATH_DEFAULT \"${MANPATH_DEFAULT}\""
463 echo "#define OSENUM ${OSENUM}"
464 [ -n "${OSNAME}" ] && echo "#define OSNAME \"${OSNAME}\""
465 [ -n "${UTF8_LOCALE}" ] && echo "#define UTF8_LOCALE \"${UTF8_LOCALE}\""
466 [ -n "${READ_ALLOWED_PATH}" ] \
467 && echo "#define READ_ALLOWED_PATH \"${READ_ALLOWED_PATH}\""
468 [ ${HAVE_ATTRIBUTE} -eq 0 ] && echo "#define __attribute__(x)"
469 [ ${HAVE_EFTYPE} -eq 0 ] && echo "#define EFTYPE EINVAL"
470 [ ${HAVE_O_DIRECTORY} -eq 0 ] && echo "#define O_DIRECTORY 0"
471 [ ${HAVE_PATH_MAX} -eq 0 ] && echo "#define PATH_MAX 4096"
472 if [ ${HAVE_ENDIAN} -eq 0 -a ${HAVE_SYS_ENDIAN} -eq 0 ]; then
473 echo "#define be32toh ntohl"
474 echo "#define htobe32 htonl"
478 #define HAVE_DIRENT_NAMLEN ${HAVE_DIRENT_NAMLEN}
479 #define HAVE_ENDIAN ${HAVE_ENDIAN}
480 #define HAVE_ERR ${HAVE_ERR}
481 #define HAVE_FTS ${HAVE_FTS}
482 #define HAVE_FTS_COMPARE_CONST ${HAVE_FTS_COMPARE_CONST}
483 #define HAVE_GETLINE ${HAVE_GETLINE}
484 #define HAVE_GETSUBOPT ${HAVE_GETSUBOPT}
485 #define HAVE_ISBLANK ${HAVE_ISBLANK}
486 #define HAVE_LESS_T ${HAVE_LESS_T}
487 #define HAVE_MKDTEMP ${HAVE_MKDTEMP}
488 #define HAVE_MKSTEMPS ${HAVE_MKSTEMPS}
489 #define HAVE_NTOHL ${HAVE_NTOHL}
490 #define HAVE_PLEDGE ${HAVE_PLEDGE}
491 #define HAVE_PROGNAME ${HAVE_PROGNAME}
492 #define HAVE_REALLOCARRAY ${HAVE_REALLOCARRAY}
493 #define HAVE_RECALLOCARRAY ${HAVE_RECALLOCARRAY}
494 #define HAVE_REWB_BSD ${HAVE_REWB_BSD}
495 #define HAVE_REWB_SYSV ${HAVE_REWB_SYSV}
496 #define HAVE_SANDBOX_INIT ${HAVE_SANDBOX_INIT}
497 #define HAVE_STRCASESTR ${HAVE_STRCASESTR}
498 #define HAVE_STRINGLIST ${HAVE_STRINGLIST}
499 #define HAVE_STRLCAT ${HAVE_STRLCAT}
500 #define HAVE_STRLCPY ${HAVE_STRLCPY}
501 #define HAVE_STRNDUP ${HAVE_STRNDUP}
502 #define HAVE_STRPTIME ${HAVE_STRPTIME}
503 #define HAVE_STRSEP ${HAVE_STRSEP}
504 #define HAVE_STRTONUM ${HAVE_STRTONUM}
505 #define HAVE_SYS_ENDIAN ${HAVE_SYS_ENDIAN}
506 #define HAVE_VASPRINTF ${HAVE_VASPRINTF}
507 #define HAVE_WCHAR ${HAVE_WCHAR}
508 #define HAVE_OHASH ${HAVE_OHASH}
509 #define NEED_XPG4_2 ${NEED_XPG4_2}
511 #define BINM_APROPOS "${BINM_APROPOS}"
512 #define BINM_CATMAN "${BINM_CATMAN}"
513 #define BINM_MAKEWHATIS "${BINM_MAKEWHATIS}"
514 #define BINM_MAN "${BINM_MAN}"
515 #define BINM_SOELIM "${BINM_SOELIM}"
516 #define BINM_WHATIS "${BINM_WHATIS}"
517 #define BINM_PAGER "${BINM_PAGER}"
521 if [ ${HAVE_ERR} -eq 0 ]; then
522 echo "extern void err(int, const char *, ...);"
523 echo "extern void errx(int, const char *, ...);"
524 echo "extern void warn(const char *, ...);"
525 echo "extern void warnx(const char *, ...);"
526 MANDOC_COBJS
="${MANDOC_COBJS} compat_err.o"
527 SOELIM_COBJS
="${SOELIM_COBJS} compat_err.o"
529 if [ ${HAVE_FTS} -eq 0 ]; then
530 MANDOC_COBJS
="${MANDOC_COBJS} compat_fts.o"
532 if [ ${HAVE_GETLINE} -eq 0 ]; then
533 echo "extern ssize_t getline(char **, size_t *, FILE *);"
534 MANDOC_COBJS
="${MANDOC_COBJS} compat_getline.o"
535 SOELIM_COBJS
="${SOELIM_COBJS} compat_getline.o"
537 if [ ${HAVE_GETSUBOPT} -eq 0 ]; then
538 echo "extern int getsubopt(char **, char * const *, char **);"
539 MANDOC_COBJS
="${MANDOC_COBJS} compat_getsubopt.o"
541 if [ ${HAVE_ISBLANK} -eq 0 ]; then
542 echo "extern int isblank(int);"
543 MANDOC_COBJS
="${MANDOC_COBJS} compat_isblank.o"
545 if [ ${HAVE_MKDTEMP} -eq 0 ]; then
546 echo "extern char *mkdtemp(char *);"
547 MANDOC_COBJS
="${MANDOC_COBJS} compat_mkdtemp.o"
549 if [ ${HAVE_MKSTEMPS} -eq 0 ]; then
550 echo "extern int mkstemps(char *, int);"
551 MANDOC_COBJS
="${MANDOC_COBJS} compat_mkstemps.o"
553 if [ ${HAVE_OHASH} -eq 0 ]; then
554 MANDOC_COBJS
="${MANDOC_COBJS} compat_ohash.o"
556 if [ ${HAVE_PROGNAME} -eq 0 ]; then
557 echo "extern const char *getprogname(void);"
558 echo "extern void setprogname(const char *);"
559 MANDOC_COBJS
="${MANDOC_COBJS} compat_progname.o"
560 SOELIM_COBJS
="${SOELIM_COBJS} compat_progname.o"
562 if [ ${HAVE_REALLOCARRAY} -eq 0 ]; then
563 echo "extern void *reallocarray(void *, size_t, size_t);"
564 MANDOC_COBJS
="${MANDOC_COBJS} compat_reallocarray.o"
565 SOELIM_COBJS
="${SOELIM_COBJS} compat_reallocarray.o"
567 if [ ${HAVE_RECALLOCARRAY} -eq 0 ]; then
568 echo "extern void *recallocarray(void *, size_t, size_t, size_t);"
569 MANDOC_COBJS
="${MANDOC_COBJS} compat_recallocarray.o"
571 if [ ${HAVE_STRCASESTR} -eq 0 ]; then
572 echo "extern char *strcasestr(const char *, const char *);"
573 MANDOC_COBJS
="${MANDOC_COBJS} compat_strcasestr.o"
575 if [ ${HAVE_STRINGLIST} -eq 0 ]; then
576 SOELIM_COBJS
="${SOELIM_COBJS} compat_stringlist.o"
578 if [ ${HAVE_STRLCAT} -eq 0 ]; then
579 echo "extern size_t strlcat(char *, const char *, size_t);"
580 MANDOC_COBJS
="${MANDOC_COBJS} compat_strlcat.o"
582 if [ ${HAVE_STRLCPY} -eq 0 ]; then
583 echo "extern size_t strlcpy(char *, const char *, size_t);"
584 MANDOC_COBJS
="${MANDOC_COBJS} compat_strlcpy.o"
586 if [ ${HAVE_STRNDUP} -eq 0 ]; then
587 echo "extern char *strndup(const char *, size_t);"
588 MANDOC_COBJS
="${MANDOC_COBJS} compat_strndup.o"
590 if [ ${HAVE_STRSEP} -eq 0 ]; then
591 echo "extern char *strsep(char **, const char *);"
592 MANDOC_COBJS
="${MANDOC_COBJS} compat_strsep.o"
594 if [ ${HAVE_STRTONUM} -eq 0 ]; then
595 echo "extern long long strtonum(const char *, long long, long long, const char **);"
596 MANDOC_COBJS
="${MANDOC_COBJS} compat_strtonum.o"
598 if [ ${HAVE_VASPRINTF} -eq 0 ]; then
599 echo "extern int vasprintf(char **, const char *, va_list);"
600 MANDOC_COBJS
="${MANDOC_COBJS} compat_vasprintf.o"
602 echo "file config.h: written" 1>&2
603 echo "file config.h: written" 1>&3
605 # --- tests for Makefile.local -----------------------------------------
607 exec > Makefile.
local
609 [ -z "${BINDIR}" ] && BINDIR
="${PREFIX}/bin"
610 [ -z "${SBINDIR}" ] && SBINDIR
="${PREFIX}/sbin"
611 [ -z "${BIN_FROM_SBIN}" ] && BIN_FROM_SBIN
="../bin"
612 [ -z "${INCLUDEDIR}" ] && INCLUDEDIR
="${PREFIX}/include/mandoc"
613 [ -z "${LIBDIR}" ] && LIBDIR
="${PREFIX}/lib/mandoc"
614 [ -z "${MANDIR}" ] && MANDIR
="${PREFIX}/man"
616 [ -z "${HTDOCDIR}" ] && HTDOCDIR
="${WWWPREFIX}/htdocs"
617 [ -z "${CGIBINDIR}" ] && CGIBINDIR
="${WWWPREFIX}/cgi-bin"
619 [ -z "${INSTALL_PROGRAM}" ] && INSTALL_PROGRAM
="${INSTALL} -m 0555"
620 [ -z "${INSTALL_LIB}" ] && INSTALL_LIB
="${INSTALL} -m 0444"
621 [ -z "${INSTALL_MAN}" ] && INSTALL_MAN
="${INSTALL} -m 0444"
622 [ -z "${INSTALL_DATA}" ] && INSTALL_DATA
="${INSTALL} -m 0444"
625 [ ${BUILD_CGI} -gt 0 ] && BUILD_TARGETS
="man.cgi"
626 [ ${BUILD_CATMAN} -gt 0 ] && \
627 BUILD_TARGETS
="${BUILD_TARGETS} mandocd catman"
629 [ ${INSTALL_LIBMANDOC} -gt 0 ] && INSTALL_TARGETS
="lib-install"
630 [ ${BUILD_CGI} -gt 0 ] && INSTALL_TARGETS
="${INSTALL_TARGETS} cgi-install"
631 [ ${BUILD_CATMAN} -gt 0 ] && \
632 INSTALL_TARGETS
="${INSTALL_TARGETS} catman-install"
635 BUILD_TARGETS = ${BUILD_TARGETS}
636 INSTALL_TARGETS = ${INSTALL_TARGETS}
641 MANDOC_COBJS = ${MANDOC_COBJS}
642 SOELIM_COBJS = ${SOELIM_COBJS}
647 BIN_FROM_SBIN = ${BIN_FROM_SBIN}
648 INCLUDEDIR = ${INCLUDEDIR}
651 WWWPREFIX = ${WWWPREFIX}
652 HTDOCDIR = ${HTDOCDIR}
653 CGIBINDIR = ${CGIBINDIR}
654 BINM_APROPOS = ${BINM_APROPOS}
655 BINM_CATMAN = ${BINM_CATMAN}
656 BINM_MAKEWHATIS = ${BINM_MAKEWHATIS}
657 BINM_MAN = ${BINM_MAN}
658 BINM_SOELIM = ${BINM_SOELIM}
659 BINM_WHATIS = ${BINM_WHATIS}
660 MANM_MAN = ${MANM_MAN}
661 MANM_MANCONF = ${MANM_MANCONF}
662 MANM_MDOC = ${MANM_MDOC}
663 MANM_ROFF = ${MANM_ROFF}
664 MANM_EQN = ${MANM_EQN}
665 MANM_TBL = ${MANM_TBL}
667 INSTALL_PROGRAM = ${INSTALL_PROGRAM}
668 INSTALL_LIB = ${INSTALL_LIB}
669 INSTALL_MAN = ${INSTALL_MAN}
670 INSTALL_DATA = ${INSTALL_DATA}
674 echo "file Makefile.local: written" 1>&2
675 echo "file Makefile.local: written" 1>&3