3 # $Id: configure,v 1.77 2020/07/20 16:57:30 schwarze Exp $
5 # Copyright (c) 2014-2020 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
=
116 BINM_APROPOS
="apropos"
118 BINM_MAKEWHATIS
="makewhatis"
124 MANM_MANCONF
="man.conf"
137 # --- manual settings from configure.local -----------------------------
139 if [ -r .
/configure.
local ]; then
140 echo "file configure.local: reading..." 1>&2
141 echo "file configure.local: reading..." 1>&3
142 cat .
/configure.
local 1>&3
145 echo "file configure.local: no (fully automatic configuration)" 1>&2
146 echo "file configure.local: no (fully automatic configuration)" 1>&3
150 # --- tests functions --------------------------------------------------
152 # Check whether this HAVE_ setting is manually overridden.
153 # If yes, use the override, if no, do not decide anything yet.
154 # Arguments: test file name, test var name, manual value
156 [ -z "${3}" ] && return 1
157 echo "tested ${1}: HAVE_${2}=${3} (manual)" 1>&2
158 echo "tested ${1}: HAVE_${2}=${3} (manual)" 1>&3
163 # Run a single autoconfiguration test.
164 # In case of success, enable the feature.
165 # In case of failure, do not decide anything yet.
166 # Arguments: test file name, test var name, additional CFLAGS
169 cat 1>&3 << __HEREDOC__
171 ${COMP} -o test-${1} test-${1}.c ${3}
174 if ${COMP} -o "test-${1}" "${SOURCEDIR}/test-${1}.c" ${3} 1>&3 2>&3
176 echo "partial result of ${n}: ${CC} succeeded" 1>&3
178 echo "tested ${n}: no (compilation failed)" 1>&2
179 echo "result of ${n}: ${CC} failed with exit status $?" 1>&3
180 echo "result of compiling ${n}: no" 1>&3
185 if .
/test-${1} 1>&3 2>&3; then
186 echo "tested ${n}: yes" 1>&2
187 echo "result of running ${n}: yes" 1>&3
190 [ "${3}" = "-D_GNU_SOURCE" ] && NEED_GNU_SOURCE
=1
191 [ "${3}" = "-D_OPENBSD_SOURCE" ] && NEED_OPENBSD_SOURCE
=1
192 [ "${3}" = "-D_XPG4_2" ] && NEED_XPG4_2
=1
193 [ "${3}" = "-lrt" ] && LD_NANOSLEEP
="-lrt"
194 [ "${3}" = "-lsocket" ] && LD_RECVMSG
="-lsocket"
195 [ "${3}" = "-lutil" ] && LD_OHASH
="-lutil"
199 echo "tested ${n}: no (execution failed)" 1>&2
200 echo "result of ${n}: execution failed with exit status $?" 1>&3
201 echo "result of running ${n}: no" 1>&3
208 # Run a complete autoconfiguration test, including the check for
209 # a manual override and disabling the feature on failure.
210 # Arguments: test file name, test var name, additional CFLAGS
211 # The final argument can optionally be repeated a second time.
213 eval _manual
=\
${HAVE_${2}}
214 ismanual
"${1}" "${2}" "${_manual}" && return 0
215 singletest
"${1}" "${2}" "${3}" && return 0
216 [ -n "${4}" ] && singletest
"${1}" "${2}" "${4}" && return 0
221 # Select a UTF-8 locale.
223 [ -n "${HAVE_WCHAR}" ] && [ "${HAVE_WCHAR}" -eq 0 ] && return 0
224 ismanual UTF8_LOCALE UTF8_LOCALE
"${UTF8_LOCALE}" && return 0
225 echo "testing UTF8_LOCALE ..." 1>&3
226 UTF8_LOCALE
=`locale -a | grep -i '^en_US\.UTF-*8$' | head -n 1`
227 if [ -z "${UTF8_LOCALE}" ]; then
228 UTF8_LOCALE
=`locale -a | grep -i '\.UTF-*8' | head -n 1`
229 [ -n "${UTF8_LOCALE}" ] || return 1
231 echo "selected UTF8_LOCALE=${UTF8_LOCALE}" 1>&2
232 echo "selected UTF8_LOCALE=${UTF8_LOCALE}" 1>&3
237 # --- operating system -------------------------------------------------
239 if [ -n "${OSENUM}" ]; then
240 echo "OSENUM specified manually: ${OSENUM}" 1>&2
241 echo "OSENUM specified manually: ${OSENUM}" 1>&3
244 if [ "${OSDETECT}" = "NetBSD" ]; then
245 OSENUM
=MANDOC_OS_NETBSD
246 elif [ "${OSDETECT}" = "OpenBSD" ]; then
247 OSENUM
=MANDOC_OS_OPENBSD
249 OSENUM
=MANDOC_OS_OTHER
251 echo "tested operating system: ${OSDETECT} -> OSENUM=${OSENUM}" 1>&2
252 echo "tested operating system: ${OSDETECT} -> OSENUM=${OSENUM}" 1>&3
257 # --- compiler options -------------------------------------------------
259 DEFCFLAGS
="-g -W -Wall -Wmissing-prototypes -Wstrict-prototypes -Wwrite-strings -Wno-unused-parameter"
261 if [ -n "${CFLAGS}" ]; then
262 COMP
="${CC} ${CFLAGS} -Wno-unused -Werror"
264 COMP
="${CC} ${DEFCFLAGS} -Wno-unused -Werror"
266 echo -n "tested ${CC} -W: " 1>&2
267 echo -n "testing ${CC} -W: " 1>&3
268 runtest noop WFLAG
|| true
270 if [ -n "${CFLAGS}" ]; then
271 echo "CFLAGS specified manually:" 1>&3
272 elif [ ${HAVE_WFLAG} -eq 0 ]; then
275 CFLAGS
="${DEFCFLAGS}"
277 echo "selected CFLAGS=\"${CFLAGS}\"" 1>&2
278 echo "selected CFLAGS=\"${CFLAGS}\"" 1>&3
281 COMP
="${CC} ${CFLAGS}"
282 [ ${HAVE_WFLAG} -eq 0 ] || COMP
="${COMP} -Wno-unused -Werror"
284 if [ -n "${STATIC}" ]; then
285 echo "selected STATIC=\"${STATIC}\" (manual)" 1>&2
286 echo "selected STATIC=\"${STATIC}\" (manual)" 1>&3
289 runtest noop STATIC
-static || true
290 [ ${HAVE_STATIC} -eq 0 ] || STATIC
="-static"
291 echo "selected STATIC=\"${STATIC}\"" 1>&2
292 echo "selected STATIC=\"${STATIC}\"" 1>&3
296 # --- tests for config.h ----------------------------------------------
298 # --- library functions ---
299 runtest attribute ATTRIBUTE
|| true
300 runtest cmsg CMSG
"" "-D_XPG4_2" || true
301 runtest dirent
-namlen DIRENT_NAMLEN
|| true
302 runtest be32toh ENDIAN
|| true
303 runtest be32toh SYS_ENDIAN
-DSYS_ENDIAN || true
304 runtest EFTYPE EFTYPE
|| true
305 runtest err ERR
|| true
306 runtest getline GETLINE
|| true
307 runtest getsubopt GETSUBOPT
"" -D_GNU_SOURCE || true
308 runtest isblank ISBLANK
|| true
309 runtest mkdtemp MKDTEMP
|| true
310 runtest nanosleep NANOSLEEP
"${LD_NANOSLEEP}" "-lrt" || true
311 runtest ntohl NTOHL
|| true
312 runtest O_DIRECTORY O_DIRECTORY
|| true
313 runtest PATH_MAX PATH_MAX
|| true
314 runtest pledge PLEDGE
|| true
315 runtest sandbox_init SANDBOX_INIT
|| true
316 runtest progname PROGNAME
|| true
317 runtest reallocarray REALLOCARRAY
"" -D_OPENBSD_SOURCE || true
318 runtest recallocarray RECALLOCARRAY
"" -D_OPENBSD_SOURCE || true
319 runtest recvmsg RECVMSG
"${LD_RECVMSG}" "-lsocket" || true
320 runtest rewb
-bsd REWB_BSD
|| true
321 runtest rewb
-sysv REWB_SYSV
|| true
322 runtest strcasestr STRCASESTR
"" -D_GNU_SOURCE || true
323 runtest stringlist STRINGLIST
|| true
324 runtest strlcat STRLCAT
|| true
325 runtest strlcpy STRLCPY
|| true
326 runtest strndup STRNDUP
|| true
327 runtest strptime STRPTIME
"" -D_GNU_SOURCE || true
328 runtest strsep STRSEP
|| true
329 runtest strtonum STRTONUM
"" -D_OPENBSD_SOURCE || true
330 runtest vasprintf VASPRINTF
"" -D_GNU_SOURCE || true
333 if [ "${1}" = "-depend" ]; then
335 HAVE_FTS_COMPARE_CONST
=0
336 echo "tested fts: HAVE_FTS=0 (for make depend)" 1>&2
337 echo "tested fts: HAVE_FTS=0 (for make depend)" 1>&3
339 elif ismanual fts FTS
${HAVE_FTS}; then
340 HAVE_FTS_COMPARE_CONST
=0
341 elif runtest fts FTS_COMPARE_CONST
-DFTS_COMPARE_CONST; then
344 runtest fts FTS
|| true
349 if [ -n "${BINM_PAGER}" ]; then
351 elif less test-noop.c
1>/dev
/null
2>&3; then
353 echo "tested less: yes" 1>&2
354 echo "tested less: yes" 1>&3
357 echo "tested less: no" 1>&2
358 echo "tested less: no" 1>&3
360 echo "selected BINM_PAGER=${BINM_PAGER}${manual}" 1>&2
361 echo "selected BINM_PAGER=${BINM_PAGER}${manual}" 1>&3
363 # --- tagging support in the pager ---
364 if ismanual
"${BINM_PAGER} -T" LESS_T
${HAVE_LESS_T}; then
366 elif ${BINM_PAGER} -T /dev
/null
test-noop.c
1>/dev
/null
2>&3; then
368 echo "tested ${BINM_PAGER} -T: yes" 1>&2
369 echo "tested ${BINM_PAGER} -T: yes" 1>&3
373 echo "tested ${BINM_PAGER} -T: no" 1>&2
374 echo "tested ${BINM_PAGER} -T: no" 1>&3
378 # --- wide character and locale support ---
380 runtest wchar WCHAR
"-DUTF8_LOCALE=\"${UTF8_LOCALE}\"" \
381 "-D_GNU_SOURCE -DUTF8_LOCALE=\"${UTF8_LOCALE}\"" || true
384 echo "tested wchar: no (no UTF8_LOCALE)" 1>&2
385 echo "tested wchar: no (no UTF8_LOCALE)" 1>&3
390 if [ "${1}" = "-depend" ]; then
392 echo "tested ohash: HAVE_OHASH=0 (for make depend)" 1>&2
393 echo "tested ohash: HAVE_OHASH=0 (for make depend)" 1>&3
396 runtest ohash OHASH
"${LD_OHASH}" "-lutil" || true
398 if [ "${HAVE_OHASH}" -eq 0 ]; then
402 # --- required functions ---
403 if [ ${HAVE_ENDIAN} -eq 0 -a \
404 ${HAVE_SYS_ENDIAN} -eq 0 -a \
405 ${HAVE_NTOHL} -eq 0 ]; then
406 echo "FATAL: no endian conversion functions found" 1>&2
407 echo "FATAL: no endian conversion functions found" 1>&3
410 if [ "${HAVE_NANOSLEEP}" -eq 0 ]; then
411 echo "FATAL: nanosleep: no" 1>&2
412 echo "FATAL: nanosleep: no" 1>&3
415 if [ ${BUILD_CATMAN} -gt 0 -a "${HAVE_RECVMSG}" -eq 0 ]; then
416 echo "FATAL: recvmsg: no" 1>&2
417 echo "FATAL: recvmsg: no" 1>&3
418 echo "Without recvmsg(2), you cannot BUILD_CATMAN." 1>&2
421 if [ ${BUILD_CATMAN} -gt 0 -a "${HAVE_CMSG}" -eq 0 ]; then
422 echo "FATAL: cmsg: no" 1>&2
423 echo "FATAL: cmsg: no" 1>&3
424 echo "Without CMSG_FIRSTHDR(3), you cannot BUILD_CATMAN." 1>&2
427 [ "${FATAL}" -eq 0 ] || exit 1
430 LDADD
="${LDADD} ${LD_NANOSLEEP} ${LD_RECVMSG} ${LD_OHASH} -lz"
431 echo "selected LDADD=\"${LDADD}\"" 1>&2
432 echo "selected LDADD=\"${LDADD}\"" 1>&3
435 # --- write config.h ---
441 #error "Do not use C++. See the INSTALL file."
446 [ ${NEED_GNU_SOURCE} -eq 0 ] || echo "#define _GNU_SOURCE"
447 [ ${NEED_OPENBSD_SOURCE} -eq 0 ] || echo "#define _OPENBSD_SOURCE"
449 [ ${HAVE_GETLINE} -eq 0 -o \
450 ${HAVE_REALLOCARRAY} -eq 0 -o ${HAVE_RECALLOCARRAY} -eq 0 -o \
451 ${HAVE_STRLCAT} -eq 0 -o ${HAVE_STRLCPY} -eq 0 -o \
452 ${HAVE_STRNDUP} -eq 0 ] \
453 && echo "#include <sys/types.h>"
454 [ ${HAVE_VASPRINTF} -eq 0 ] && echo "#include <stdarg.h>"
455 [ ${HAVE_GETLINE} -eq 0 ] && echo "#include <stdio.h>"
458 echo "#define MAN_CONF_FILE \"/etc/${MANM_MANCONF}\""
459 echo "#define MANPATH_BASE \"${MANPATH_BASE}\""
460 echo "#define MANPATH_DEFAULT \"${MANPATH_DEFAULT}\""
461 echo "#define OSENUM ${OSENUM}"
462 [ -n "${OSNAME}" ] && echo "#define OSNAME \"${OSNAME}\""
463 [ -n "${UTF8_LOCALE}" ] && echo "#define UTF8_LOCALE \"${UTF8_LOCALE}\""
464 [ -n "${HOMEBREWDIR}" ] && echo "#define HOMEBREWDIR \"${HOMEBREWDIR}\""
465 [ ${HAVE_ATTRIBUTE} -eq 0 ] && echo "#define __attribute__(x)"
466 [ ${HAVE_EFTYPE} -eq 0 ] && echo "#define EFTYPE EINVAL"
467 [ ${HAVE_O_DIRECTORY} -eq 0 ] && echo "#define O_DIRECTORY 0"
468 [ ${HAVE_PATH_MAX} -eq 0 ] && echo "#define PATH_MAX 4096"
469 if [ ${HAVE_ENDIAN} -eq 0 -a ${HAVE_SYS_ENDIAN} -eq 0 ]; then
470 echo "#define be32toh ntohl"
471 echo "#define htobe32 htonl"
475 #define HAVE_DIRENT_NAMLEN ${HAVE_DIRENT_NAMLEN}
476 #define HAVE_ENDIAN ${HAVE_ENDIAN}
477 #define HAVE_ERR ${HAVE_ERR}
478 #define HAVE_FTS ${HAVE_FTS}
479 #define HAVE_FTS_COMPARE_CONST ${HAVE_FTS_COMPARE_CONST}
480 #define HAVE_GETLINE ${HAVE_GETLINE}
481 #define HAVE_GETSUBOPT ${HAVE_GETSUBOPT}
482 #define HAVE_ISBLANK ${HAVE_ISBLANK}
483 #define HAVE_LESS_T ${HAVE_LESS_T}
484 #define HAVE_MKDTEMP ${HAVE_MKDTEMP}
485 #define HAVE_NTOHL ${HAVE_NTOHL}
486 #define HAVE_PLEDGE ${HAVE_PLEDGE}
487 #define HAVE_PROGNAME ${HAVE_PROGNAME}
488 #define HAVE_REALLOCARRAY ${HAVE_REALLOCARRAY}
489 #define HAVE_RECALLOCARRAY ${HAVE_RECALLOCARRAY}
490 #define HAVE_REWB_BSD ${HAVE_REWB_BSD}
491 #define HAVE_REWB_SYSV ${HAVE_REWB_SYSV}
492 #define HAVE_SANDBOX_INIT ${HAVE_SANDBOX_INIT}
493 #define HAVE_STRCASESTR ${HAVE_STRCASESTR}
494 #define HAVE_STRINGLIST ${HAVE_STRINGLIST}
495 #define HAVE_STRLCAT ${HAVE_STRLCAT}
496 #define HAVE_STRLCPY ${HAVE_STRLCPY}
497 #define HAVE_STRNDUP ${HAVE_STRNDUP}
498 #define HAVE_STRPTIME ${HAVE_STRPTIME}
499 #define HAVE_STRSEP ${HAVE_STRSEP}
500 #define HAVE_STRTONUM ${HAVE_STRTONUM}
501 #define HAVE_SYS_ENDIAN ${HAVE_SYS_ENDIAN}
502 #define HAVE_VASPRINTF ${HAVE_VASPRINTF}
503 #define HAVE_WCHAR ${HAVE_WCHAR}
504 #define HAVE_OHASH ${HAVE_OHASH}
505 #define NEED_XPG4_2 ${NEED_XPG4_2}
507 #define BINM_APROPOS "${BINM_APROPOS}"
508 #define BINM_CATMAN "${BINM_CATMAN}"
509 #define BINM_MAKEWHATIS "${BINM_MAKEWHATIS}"
510 #define BINM_MAN "${BINM_MAN}"
511 #define BINM_SOELIM "${BINM_SOELIM}"
512 #define BINM_WHATIS "${BINM_WHATIS}"
513 #define BINM_PAGER "${BINM_PAGER}"
517 if [ ${HAVE_ERR} -eq 0 ]; then
518 echo "extern void err(int, const char *, ...);"
519 echo "extern void errx(int, const char *, ...);"
520 echo "extern void warn(const char *, ...);"
521 echo "extern void warnx(const char *, ...);"
522 MANDOC_COBJS
="${MANDOC_COBJS} compat_err.o"
523 SOELIM_COBJS
="${SOELIM_COBJS} compat_err.o"
525 if [ ${HAVE_FTS} -eq 0 ]; then
526 MANDOC_COBJS
="${MANDOC_COBJS} compat_fts.o"
528 if [ ${HAVE_GETLINE} -eq 0 ]; then
529 echo "extern ssize_t getline(char **, size_t *, FILE *);"
530 MANDOC_COBJS
="${MANDOC_COBJS} compat_getline.o"
531 SOELIM_COBJS
="${SOELIM_COBJS} compat_getline.o"
533 if [ ${HAVE_GETSUBOPT} -eq 0 ]; then
534 echo "extern int getsubopt(char **, char * const *, char **);"
535 MANDOC_COBJS
="${MANDOC_COBJS} compat_getsubopt.o"
537 if [ ${HAVE_ISBLANK} -eq 0 ]; then
538 echo "extern int isblank(int);"
539 MANDOC_COBJS
="${MANDOC_COBJS} compat_isblank.o"
541 if [ ${HAVE_MKDTEMP} -eq 0 ]; then
542 echo "extern char *mkdtemp(char *);"
543 MANDOC_COBJS
="${MANDOC_COBJS} compat_mkdtemp.o"
545 if [ ${HAVE_OHASH} -eq 0 ]; then
546 MANDOC_COBJS
="${MANDOC_COBJS} compat_ohash.o"
548 if [ ${HAVE_PROGNAME} -eq 0 ]; then
549 echo "extern const char *getprogname(void);"
550 echo "extern void setprogname(const char *);"
551 MANDOC_COBJS
="${MANDOC_COBJS} compat_progname.o"
552 SOELIM_COBJS
="${SOELIM_COBJS} compat_progname.o"
554 if [ ${HAVE_REALLOCARRAY} -eq 0 ]; then
555 echo "extern void *reallocarray(void *, size_t, size_t);"
556 MANDOC_COBJS
="${MANDOC_COBJS} compat_reallocarray.o"
557 SOELIM_COBJS
="${SOELIM_COBJS} compat_reallocarray.o"
559 if [ ${HAVE_RECALLOCARRAY} -eq 0 ]; then
560 echo "extern void *recallocarray(void *, size_t, size_t, size_t);"
561 MANDOC_COBJS
="${MANDOC_COBJS} compat_recallocarray.o"
563 if [ ${HAVE_STRCASESTR} -eq 0 ]; then
564 echo "extern char *strcasestr(const char *, const char *);"
565 MANDOC_COBJS
="${MANDOC_COBJS} compat_strcasestr.o"
567 if [ ${HAVE_STRINGLIST} -eq 0 ]; then
568 SOELIM_COBJS
="${SOELIM_COBJS} compat_stringlist.o"
570 if [ ${HAVE_STRLCAT} -eq 0 ]; then
571 echo "extern size_t strlcat(char *, const char *, size_t);"
572 MANDOC_COBJS
="${MANDOC_COBJS} compat_strlcat.o"
574 if [ ${HAVE_STRLCPY} -eq 0 ]; then
575 echo "extern size_t strlcpy(char *, const char *, size_t);"
576 MANDOC_COBJS
="${MANDOC_COBJS} compat_strlcpy.o"
578 if [ ${HAVE_STRNDUP} -eq 0 ]; then
579 echo "extern char *strndup(const char *, size_t);"
580 MANDOC_COBJS
="${MANDOC_COBJS} compat_strndup.o"
582 if [ ${HAVE_STRSEP} -eq 0 ]; then
583 echo "extern char *strsep(char **, const char *);"
584 MANDOC_COBJS
="${MANDOC_COBJS} compat_strsep.o"
586 if [ ${HAVE_STRTONUM} -eq 0 ]; then
587 echo "extern long long strtonum(const char *, long long, long long, const char **);"
588 MANDOC_COBJS
="${MANDOC_COBJS} compat_strtonum.o"
590 if [ ${HAVE_VASPRINTF} -eq 0 ]; then
591 echo "extern int vasprintf(char **, const char *, va_list);"
592 MANDOC_COBJS
="${MANDOC_COBJS} compat_vasprintf.o"
594 echo "file config.h: written" 1>&2
595 echo "file config.h: written" 1>&3
597 # --- tests for Makefile.local -----------------------------------------
599 exec > Makefile.
local
601 [ -z "${BINDIR}" ] && BINDIR
="${PREFIX}/bin"
602 [ -z "${SBINDIR}" ] && SBINDIR
="${PREFIX}/sbin"
603 [ -z "${BIN_FROM_SBIN}" ] && BIN_FROM_SBIN
="../bin"
604 [ -z "${INCLUDEDIR}" ] && INCLUDEDIR
="${PREFIX}/include/mandoc"
605 [ -z "${LIBDIR}" ] && LIBDIR
="${PREFIX}/lib/mandoc"
606 [ -z "${MANDIR}" ] && MANDIR
="${PREFIX}/man"
608 [ -z "${HTDOCDIR}" ] && HTDOCDIR
="${WWWPREFIX}/htdocs"
609 [ -z "${CGIBINDIR}" ] && CGIBINDIR
="${WWWPREFIX}/cgi-bin"
611 [ -z "${INSTALL_PROGRAM}" ] && INSTALL_PROGRAM
="${INSTALL} -m 0555"
612 [ -z "${INSTALL_LIB}" ] && INSTALL_LIB
="${INSTALL} -m 0444"
613 [ -z "${INSTALL_MAN}" ] && INSTALL_MAN
="${INSTALL} -m 0444"
614 [ -z "${INSTALL_DATA}" ] && INSTALL_DATA
="${INSTALL} -m 0444"
617 [ ${BUILD_CGI} -gt 0 ] && BUILD_TARGETS
="man.cgi"
618 [ ${BUILD_CATMAN} -gt 0 ] && \
619 BUILD_TARGETS
="${BUILD_TARGETS} mandocd catman"
621 [ ${INSTALL_LIBMANDOC} -gt 0 ] && INSTALL_TARGETS
="lib-install"
622 [ ${BUILD_CGI} -gt 0 ] && INSTALL_TARGETS
="${INSTALL_TARGETS} cgi-install"
623 [ ${BUILD_CATMAN} -gt 0 ] && \
624 INSTALL_TARGETS
="${INSTALL_TARGETS} catman-install"
627 BUILD_TARGETS = ${BUILD_TARGETS}
628 INSTALL_TARGETS = ${INSTALL_TARGETS}
633 MANDOC_COBJS = ${MANDOC_COBJS}
634 SOELIM_COBJS = ${SOELIM_COBJS}
639 BIN_FROM_SBIN = ${BIN_FROM_SBIN}
640 INCLUDEDIR = ${INCLUDEDIR}
643 WWWPREFIX = ${WWWPREFIX}
644 HTDOCDIR = ${HTDOCDIR}
645 CGIBINDIR = ${CGIBINDIR}
646 BINM_APROPOS = ${BINM_APROPOS}
647 BINM_CATMAN = ${BINM_CATMAN}
648 BINM_MAKEWHATIS = ${BINM_MAKEWHATIS}
649 BINM_MAN = ${BINM_MAN}
650 BINM_SOELIM = ${BINM_SOELIM}
651 BINM_WHATIS = ${BINM_WHATIS}
652 MANM_MAN = ${MANM_MAN}
653 MANM_MANCONF = ${MANM_MANCONF}
654 MANM_MDOC = ${MANM_MDOC}
655 MANM_ROFF = ${MANM_ROFF}
656 MANM_EQN = ${MANM_EQN}
657 MANM_TBL = ${MANM_TBL}
659 INSTALL_PROGRAM = ${INSTALL_PROGRAM}
660 INSTALL_LIB = ${INSTALL_LIB}
661 INSTALL_MAN = ${INSTALL_MAN}
662 INSTALL_DATA = ${INSTALL_DATA}
666 echo "file Makefile.local: written" 1>&2
667 echo "file Makefile.local: written" 1>&3