#!/bin/sh
#
-# $Id: configure,v 1.77 2020/07/20 16:57:30 schwarze Exp $
+# $Id: configure,v 1.81 2021/09/20 10:19:51 schwarze Exp $
#
-# Copyright (c) 2014-2020 Ingo Schwarze <schwarze@openbsd.org>
+# Copyright (c) 2014-2021 Ingo Schwarze <schwarze@openbsd.org>
#
# Permission to use, copy, modify, and distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
OSNAME=
UTF8_LOCALE=
+AR=ar
CC=cc
CFLAGS=
FATAL=0
HAVE_ISBLANK=
HAVE_LESS_T=
HAVE_MKDTEMP=
+HAVE_MKSTEMPS=
HAVE_NANOSLEEP=
HAVE_NTOHL=
HAVE_O_DIRECTORY=
INCLUDEDIR=
LIBDIR=
MANDIR=
-HOMEBREWDIR=
+READ_ALLOWED_PATH=
WWWPREFIX="/var/www"
HTDOCDIR=
else
COMP="${CC} ${DEFCFLAGS} -Wno-unused -Werror"
fi
-echo -n "tested ${CC} -W: " 1>&2
-echo -n "testing ${CC} -W: " 1>&3
+printf "%s" "tested ${CC} -W: " 1>&2
+printf "%s" "testing ${CC} -W: " 1>&3
runtest noop WFLAG || true
if [ -n "${CFLAGS}" ]; then
runtest getsubopt GETSUBOPT "" -D_GNU_SOURCE || true
runtest isblank ISBLANK || true
runtest mkdtemp MKDTEMP || true
+runtest mkstemps MKSTEMPS || true
runtest nanosleep NANOSLEEP "${LD_NANOSLEEP}" "-lrt" || true
runtest ntohl NTOHL || true
runtest O_DIRECTORY O_DIRECTORY || true
echo "#define OSENUM ${OSENUM}"
[ -n "${OSNAME}" ] && echo "#define OSNAME \"${OSNAME}\""
[ -n "${UTF8_LOCALE}" ] && echo "#define UTF8_LOCALE \"${UTF8_LOCALE}\""
-[ -n "${HOMEBREWDIR}" ] && echo "#define HOMEBREWDIR \"${HOMEBREWDIR}\""
+[ -n "${READ_ALLOWED_PATH}" ] \
+ && echo "#define READ_ALLOWED_PATH \"${READ_ALLOWED_PATH}\""
[ ${HAVE_ATTRIBUTE} -eq 0 ] && echo "#define __attribute__(x)"
[ ${HAVE_EFTYPE} -eq 0 ] && echo "#define EFTYPE EINVAL"
[ ${HAVE_O_DIRECTORY} -eq 0 ] && echo "#define O_DIRECTORY 0"
#define HAVE_ISBLANK ${HAVE_ISBLANK}
#define HAVE_LESS_T ${HAVE_LESS_T}
#define HAVE_MKDTEMP ${HAVE_MKDTEMP}
+#define HAVE_MKSTEMPS ${HAVE_MKSTEMPS}
#define HAVE_NTOHL ${HAVE_NTOHL}
#define HAVE_PLEDGE ${HAVE_PLEDGE}
#define HAVE_PROGNAME ${HAVE_PROGNAME}
echo "extern char *mkdtemp(char *);"
MANDOC_COBJS="${MANDOC_COBJS} compat_mkdtemp.o"
fi
+if [ ${HAVE_MKSTEMPS} -eq 0 ]; then
+ echo "extern int mkstemps(char *, int);"
+ MANDOC_COBJS="${MANDOC_COBJS} compat_mkstemps.o"
+fi
if [ ${HAVE_OHASH} -eq 0 ]; then
MANDOC_COBJS="${MANDOC_COBJS} compat_ohash.o"
fi
cat << __HEREDOC__
BUILD_TARGETS = ${BUILD_TARGETS}
INSTALL_TARGETS = ${INSTALL_TARGETS}
+AR = ${AR}
CC = ${CC}
CFLAGS = ${CFLAGS}
LDADD = ${LDADD}