#!/bin/sh
#
# Do not edit!
# This file was generated from configure.in by BSDBuild 3.2.
#
# To regenerate this file, get the latest BSDBuild release from
# http://bsdbuild.hypertriton.com/, and use the command:
#
# $ cat configure.in | mkconfigure > configure
#
echo 'BSDBuild 3.2 '
echo '#!/bin/sh' > config.status
echo '# Generated by BSDBuild 3.2.' >>config.status
echo 'Generated by BSDBuild 3.2.' >config.log
PACKAGE='Untitled'
VERSION=
RELEASE=
PROG_PREFIX=
PROG_SUFFIX=
PROG_TRANSFORM=s,x,x,
case "test" in
*)
bb_sed_test=`echo foo-.bar |sed 's/[-.]/_/g'`
if [ "$bb_sed_test" != "foo__bar" ]; then
echo "sed or $SHELL is not working correctly."
exit 1
fi
esac
bb_cr_letters='abcdefghijklmnopqrstuvwxyz'
bb_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
bb_cr_Letters=$bb_cr_letters$bb_cr_LETTERS
bb_cr_digits='0123456789'
bb_cr_alnum=$bb_cr_Letters$bb_cr_digits
optarg=
for arg
do
case "$arg" in
*=*)
optarg=`expr "X$arg" : '[^=]*=\(.*\)'`
;;
*)
optarg=
;;
esac
case "$arg" in
--build=*)
build_arg=$optarg
;;
--host=*)
host_arg=$optarg
;;
--target=*)
target=$optarg
;;
--emul-os=*)
PROJ_TARGET=$optarg
;;
--byte-order=*)
byte_order=$optarg
;;
--prefix=*)
prefix=$optarg
;;
--exec-prefix=*)
exec_prefix=$optarg
;;
--sysconfdir=*)
sysconfdir=$optarg
;;
--bindir=*)
bindir=$optarg
;;
--libdir=*)
libdir=$optarg
;;
--moduledir=*)
moduledir=$optarg
;;
--libexecdir=*)
libexecdir=$optarg
;;
--datadir=*)
datadir=$optarg
;;
--statedir=* | --localstatedir=*)
statedir=$optarg
;;
--localedir=*)
localedir=$optarg
;;
--mandir=*)
mandir=$optarg
;;
--infodir=* | --datarootdir=* | --docdir=* | --htmldir=* | --dvidir=* | --pdfdir=* | --psdir=* | --sharedstatedir=* | --sbindir=*)
;;
--enable-*)
option=`expr "x$arg" : 'x-*enable-\([^=]*\)'`
expr "x$option" : ".*[^-._$bb_cr_alnum]" >/dev/null &&
{ echo "Invalid option name: $option" >&2
{ (exit 1); exit 1; }; }
option=`echo $option | sed 's/[-.]/_/g'`
case "$arg" in
*=*)
eval "enable_${option}='$optarg'"
eval "prefix_${option}='$optarg'"
;;
*)
eval "enable_${option}=yes"
;;
esac
;;
--disable-*)
option=`expr "x$arg" : 'x-*disable-\([^=]*\)'`
expr "x$option" : ".*[^-._$bb_cr_alnum]" >/dev/null &&
{ echo "Invalid option name: $option" >&2
{ (exit 1); exit 1; }; }
option=`echo $option | sed 's/[-.]/_/g'`
eval "enable_${option}=no"
;;
--with-*)
option=`expr "x$arg" : 'x-*with-\([^=]*\)'`
expr "x$option" : ".*[^-._$bb_cr_alnum]" >/dev/null &&
{ echo "Invalid option name: $option" >&2
{ (exit 1); exit 1; }; }
option=`echo $option | sed 's/[-.]/_/g'`
case "$arg" in
*=*)
eval "with_${option}='$optarg'"
eval "prefix_${option}='$optarg'"
;;
*)
eval "with_${option}=yes"
;;
esac
;;
--without-*)
option=`expr "x$arg" : 'x-*without-\([^=]*\)'`
expr "x$option" : ".*[^-._$bb_cr_alnum]" >/dev/null &&
{ echo "Invalid option name: $option" >&2
{ (exit 1); exit 1; }; }
option=`echo $option | sed 's/-/_/g'`
eval "with_${option}=no"
;;
--x-includes=*)
with_x_includes=$optarg
;;
--x-libraries=*)
with_x_libraries=$optarg
;;
--program-prefix=*)
PROG_PREFIX=$optarg
;;
--program-suffix=*)
PROG_SUFFIX=$optarg
;;
--program-transform-name=*)
PROG_TRANSFORM=$optarg
;;
--help)
show_help=yes
;;
--version)
show_version=yes
;;
--srcdir=*)
srcdir=$optarg
;;
--testdir=*)
testdir=$optarg
;;
--cache=*)
cache=$optarg
;;
--includes=*)
includes=$optarg
;;
--cache-file=*)
;;
--config-cache | -C)
;;
*)
echo "Invalid argument: $arg, see ./configure --help"
exit 1
;;
esac
done
if [ -e "/bin/echo" ]; then
/bin/echo -n ""
if [ $? = 0 ]; then
ECHO_N='/bin/echo -n'
else
ECHO_N='echo -n'
fi
else
ECHO_N='echo -n'
fi
if [ "${PATH_SEPARATOR+set}" != set ]; then
echo '#!/bin/sh' > conftest$$.sh
echo 'exit 0' >> conftest$$.sh
chmod +x conftest$$.sh
if (PATH="/nonexistent;."; conftest$$.sh) >/dev/null 2>&1; then
PATH_SEPARATOR=';'
else
PATH_SEPARATOR=:
fi
rm -f conftest$$.sh
fi
bb_save_IFS=$IFS
IFS=$PATH_SEPARATOR
PERL=''
for path in $PATH; do
if [ -x "${path}/perl" ]; then
PERL="${path}/perl"
break
elif [ -e "${path}/perl.exe" ]; then
PERL="${path}/perl.exe"
break
fi
done
PKGCONFIG=''
for path in $PATH; do
if [ -x "${path}/pkg-config" ]; then
PKGCONFIG="${path}/pkg-config"
break
elif [ -e "${path}/pkg-config.exe" ]; then
PKGCONFIG="${path}/pkg-config.exe"
break
fi
done
IFS=$bb_save_IFS
if [ "${prefix}" != '' ]; then
PREFIX="$prefix"
else
PREFIX='/usr/local'
fi
if [ "${exec_prefix}" != '' ]; then
EXEC_PREFIX="$exec_prefix"
else
EXEC_PREFIX="${PREFIX}"
fi
if [ "${srcdir}" != '' ]; then
if [ "${PERL}" = '' ]; then
echo '*'
echo '* Separate build --srcdir requires perl, but there is'
echo '* no perl interpreter to be found in your PATH.'
echo '*'
exit 1
fi
SRC=${srcdir}
else
SRC=`pwd`
fi
BLD=`pwd`
SRCDIR="${SRC}"
BLDDIR="${BLD}"
if [ "${testdir}" != '' ]; then
echo "Configure tests will be executed in ${testdir}"
if [ ! -e "${testdir}" ]; then
echo "Creating ${testdir}"
mkdir ${testdir}
fi
else
testdir='.'
fi
if [ "${includes}" = '' ]; then
includes='yes'
fi
case "${includes}" in
yes|no)
;;
link)
if [ "${with_proj_generation}" ]; then
echo 'Cannot use --includes=link with --with-proj-generation'
exit 1
fi
;;
*)
echo 'Usage: --includes (yes|no|link)'
exit 1
;;
esac
if [ "${srcdir}" = '' ]; then
cat << EOT > configure.dep.pl
#!/usr/bin/env perl
# Public domain.
# Scan Makefiles for "include .depend" and generate empty ".depend" files,
# such that make can be run prior to an initial "make depend".
#
my %V = ();
sub MakefileIncludesDepend (\$\$)
{
my \$path = shift;
my \$cwd = shift;
if (!open(MF, \$path)) {
return (0);
}
my @lines = ();
foreach \$_ () {
chop;
if (/^(.+)\\\\\$/) { # Expansion
\$line .= \$1;
} else { # New line
if (\$line) {
push @lines, \$line . \$_;
\$line = '';
} else {
push @lines, \$_;
}
}
}
foreach \$_ (@lines) {
if (/^\\s*#/) { next; }
if (/^\\t/) { next; }
s/\\\$\\{(\\w+)\\}/\$V{\$1}/g;
if (/^\\s*(\\w+)\\s*=\\s*"(.+)"\$/ ||
/^\\s*(\\w+)\\s*=\\s*(.+)\$/) {
\$V{\$1} = \$2;
} elsif (/^\\s*(\\w+)\\s*\\+=\\s*"(.+)"\$/ ||
/^\\s*(\\w+)\\s*\\+=\\s*(.+)\$/) {
if (exists(\$V{\$1}) && \$V{\$1} ne '') {
\$V{\$1} .= ' '.\$2;
} else {
\$V{\$1} = \$2;
}
}
if (/^\\s*include\\s+(.+)\$/) {
if (\$1 eq '.depend' ||
MakefileIncludesDepend(\$cwd.'/'.\$1, \$cwd)) {
return (1);
}
}
}
close(MF);
return (0);
}
sub Scan (\$)
{
my \$dir = shift;
unless (opendir(CWD, \$dir)) {
print STDERR "\$dir: opendir: \$!; ignoring\\n";
return;
}
%V = ();
if (-e \$dir.'/Makefile' &&
MakefileIncludesDepend("\$dir/Makefile", \$dir)) {
if (open(OUT, ">\$dir/.depend")) {
close(OUT);
} else {
print STDERR "\$dir/.depend: \$!; ignoring\\n";
}
}
foreach my \$ent (readdir(CWD)) {
my \$file = \$dir.'/'.\$ent;
if (\$ent =~ /^\\./) {
next;
}
if (-d \$file) {
Scan(\$file);
next;
}
}
closedir(CWD);
}
if (@ARGV < 1) {
print STDERR "Usage: gen-dotdepend.pl [directory]\\n";
exit(1);
}
Scan(\$ARGV[0]);
EOT
if [ "${PERL}" != '' ]; then
${PERL} configure.dep.pl .
rm -f configure.dep.pl
else
echo '*'
echo '* Warning: No perl was found. Perl is required for automatic'
echo '* generation of .depend files. You may need to create empty'
echo '* .depend files where it is required.'
echo '*'
fi
fi
if [ "${show_help}" = "yes" ]; then
echo 'This configure script was generated by BSDBuild 3.2.'
echo ''
echo ''
echo 'Usage: ./configure [options]'
echo ''
echo 'Standard build options:'
echo ' --bindir=DIR Executables for common users [PREFIX/bin]'
echo ' --build=STRING Host environment for build [auto-detect]'
echo ' --byte-order=STRING Byte order for build [LE|BE] [auto-detect]'
echo ' --cache=DIR Cache ./configure results in directory [none]'
echo ' --datadir=DIR|NONE Data files for program use [PREFIX/share]'
echo ' --enable-nls Multi-language support [no]'
echo ' --exec-prefix=DIR Machine-dependent installation base [PREFIX]'
echo ' --host=STRING Cross-compile for target environment [BUILD]'
echo ' --includes=STRING Preprocess C headers [yes|no|link] [yes]'
echo ' --libdir=DIR System libraries [PREFIX/lib]'
echo ' --libexecdir=DIR Executables for program use [PREFIX/libexec]'
echo ' --localedir=DIR Multi-language support locales [DATADIR/locale]'
echo ' --mandir=DIR Manual page documentation [PREFIX/man]'
echo ' --moduledir=DIR|NONE Dynamically loaded modules [PREFIX/lib]'
echo ' --prefix=DIR Installation base [/usr/local]'
echo ' --program-prefix=STRING Prepend string to program name []'
echo ' --program-suffix=STRING Append string to program name []'
echo ' --program-transform-name=S Transform program name by expression [s,x,x,]'
echo ' --srcdir=DIR Source directory for concurrent build [.]'
echo ' --statedir=DIR|NONE Modifiable single-machine data [PREFIX/var]'
echo ' --sysconfdir=DIR|NONE System configuration files [PREFIX/etc]'
echo ' --testdir=DIR Execute all tests in this directory [.]'
echo ' --with-bundles Generate application/library bundles [yes]'
echo ' --with-catman Install cat files for manual pages [auto-detect]'
echo ' --with-ctags Generate ctags tag files [no]'
echo ' --with-docs Generate printable documentation [no]'
echo ' --with-gettext Use gettext for multi-language [auto-detect]'
echo ' --with-libtool Specify path to libtool [bundled]'
echo ' --with-manlinks Add manual entries for every function [no]'
echo ' --with-manpages Generate Unix manual pages [yes]'
echo ' --with-perl Embed the perl interpreter [default: check]'
echo ' --with-spamassassin Use Mail::SpamAssassin [default: check]'
echo ' --with-mailblockd Support for mailblockd [default: yes]'
echo ' --enable-warnings Compiler warnings [default: no]'
echo ' --enable-lmtp Support for LMTP Transport [default: no]'
echo ' --enable-policy Enable Postfix Policy Server [default: no]'
echo ' --enable-control Support for Control Socket [default: no]'
echo ' --enable-compat-qmail Emulate qmail pipe behavior [default: yes]'
echo ' --enable-debug Debug code [default: no]'
exit 1
fi;
if [ "${show_version}" = "yes" ]; then
echo 'BSDBuild 3.2'
exit 0
fi;
if [ "${build_arg}" != '' ]; then
build="${build_arg}"
else
if [ "${srcdir}" != '' ]; then
build_guessed=`sh ${srcdir}/mk/config.guess`
else
build_guessed=`sh mk/config.guess`
fi
if [ $? != 0 ]; then
echo 'mk/config.guess failed, please specify --build'
exit 1
fi
build="${build_guessed}"
fi
if [ "${host_arg}" != '' ]; then
host="${host_arg}"
else
host="${build}"
fi
if [ "${host}" != "${build}" ]; then
CROSS_COMPILING='yes'
else
CROSS_COMPILING='no'
fi
if [ "${with_bundles}" != "no" ]; then
case "${host}" in
arm-apple-darwin*)
PROG_BUNDLE='iOS'
;;
*-*-darwin*)
PROG_BUNDLE='OSX'
;;
esac
fi
if [ -e "Makefile.config" ]; then
echo '* Overwriting existing Makefile.config'
fi
echo '# Generated by BSDBuild 3.2 configure script.' >Makefile.config
echo '' >> Makefile.config
echo "BUILD=${build}" >> Makefile.config
echo "HOST=${host}" >> Makefile.config
echo "CROSS_COMPILING=${CROSS_COMPILING}" >> Makefile.config
echo "SRCDIR=${SRC}" >> Makefile.config
echo "BLDDIR=${BLD}" >> Makefile.config
$ECHO_N './configure' >>config.log
$ECHO_N './configure' >>config.status
for arg
do
$ECHO_N " $arg" >>config.log
$ECHO_N " $arg" >>config.status
done
echo '' >>config.log
echo '' >>config.status
if [ -e "config" ]; then
echo '* Overwriting config directory'
rm -fR "config"
fi
mkdir -p "config"
if [ $? != 0 ]; then
echo 'Could not create config directory.'
exit 1
fi
cat << EOT > conftest.1
.\" COMMENT
.Dd
.Dd NOVEMBER 23, 2009
.Dt TEST 1
.Os
.ds vT Test
.ds oS Test 1.0
.Sh NAME
.Nm test
.Nd Test document
.Sh DESCRIPTION
EOT
HAVE_MANDOC='no'
MANDOC=''
bb_save_IFS=$IFS
IFS=$PATH_SEPARATOR
for path in $PATH; do
if [ -x "${path}/mandoc" ]; then
cat conftest.1 | ${path}/mandoc -Tascii >/dev/null
if [ "$?" = '0' ]; then
HAVE_MANDOC='yes'
MANDOC="${path}/mandoc"
break;
fi
elif [ -e "${path}/mandoc.exe" ]; then
cat conftest.1 | ${path}/mandoc.exe -Tascii >/dev/null
if [ "$?" = '0' ]; then
HAVE_MANDOC='yes'
MANDOC="${path}/mandoc.exe"
break;
fi
elif [ -x "${path}/nroff" ]; then
cat conftest.1 | ${path}/nroff -Tmandoc >/dev/null
if [ "$?" = '0' ]; then
HAVE_MANDOC='yes'
MANDOC="${path}/nroff -Tmandoc"
break;
fi
elif [ -e "${path}/nroff.exe" ]; then
cat conftest.1 | ${path}/nroff.exe -Tmandoc >/dev/null
if [ "$?" = '0' ]; then
HAVE_MANDOC='yes'
MANDOC="${path}/nroff.exe -Tmandoc"
break;
fi
fi
done
IFS=$bb_save_IFS
rm -f conftest.1
if [ "${HAVE_MANDOC}" = 'no' ]; then
if [ "${with_manpages}" = 'yes' ]; then
echo '*'
echo '* --with-manpages was requested, but either the'
echo '* nroff/mandoc utility or the mdoc macro'
echo '* package were not found.'
echo '*'
exit 1
fi
echo 'HAVE_MANDOC=no' >> Makefile.config
echo 'NOMAN=yes' >> Makefile.config
echo 'NOMANLINKS=yes' >> Makefile.config
else
echo 'HAVE_MANDOC=yes' >> Makefile.config
echo "MANDOC=${MANDOC}" >> Makefile.config
if [ "${with_catman}" = "no" ]; then
echo 'NOCATMAN=yes' >> Makefile.config
else
if [ "${with_catman}" = "yes" ]; then
echo 'NOCATMAN=no' >> Makefile.config
else
case "${host}" in
*-*-freebsd*)
echo 'NOCATMAN=yes' >> Makefile.config
;;
*)
echo 'NOCATMAN=no' >> Makefile.config
;;
esac
fi
fi
if [ "${with_manpages}" = 'no' ]; then
echo 'NOMAN=yes' >> Makefile.config
echo 'NOMANLINKS=yes' >> Makefile.config
else
if [ "${with_manlinks}" != 'yes' ]; then
echo 'NOMANLINKS=yes' >> Makefile.config
fi
fi
fi
if [ "${with_docs}" = 'no' ]; then
echo 'NODOC=yes' >> Makefile.config
fi
if [ "${enable_nls}" = "yes" ]; then
ENABLE_NLS="yes"
echo '#ifndef ENABLE_NLS' > config/enable_nls.h
echo "#define ENABLE_NLS \"$ENABLE_NLS\"" >> config/enable_nls.h
echo '#endif' >> config/enable_nls.h
echo "hdefs[\"ENABLE_NLS\"] = \"$ENABLE_NLS\"" >>configure.lua
msgfmt=''
bb_save_IFS=$IFS
IFS=$PATH_SEPARATOR
for path in $PATH; do
if [ -x "${path}/msgfmt" ]; then
msgfmt=${path}/msgfmt
break
elif [ -e "${path}/msgfmt.exe" ]; then
msgfmt=${path}/msgfmt.exe
break
fi
done
IFS=$bb_save_IFS
if [ "${msgfmt}" != '' ]; then
HAVE_GETTEXT='yes'
else
HAVE_GETTEXT='no'
fi
echo '#ifndef ENABLE_NLS' > config/enable_nls.h
echo "#define ENABLE_NLS \"$ENABLE_NLS\"" >> config/enable_nls.h
echo '#endif' >> config/enable_nls.h
echo "hdefs[\"ENABLE_NLS\"] = \"$ENABLE_NLS\"" >>configure.lua
else
ENABLE_NLS="no"
HAVE_GETTEXT="no"
echo '#undef ENABLE_NLS' >config/enable_nls.h
echo 'hdefs["ENABLE_NLS"] = nil' >>configure.lua
fi;
CTAGS=''
bb_save_IFS=$IFS
IFS=$PATH_SEPARATOR
if [ "${with_ctags}" = 'yes' ]; then
for path in $PATH; do
if [ -x "${path}/ectags" ]; then
CTAGS="${path}/ectags"
break
elif [ -e "${path}/ectags.exe" ]; then
CTAGS="${path}/ectags.exe"
break
fi
done
if [ "${CTAGS}" = '' ]; then
for path in $PATH; do
if [ -x "${path}/ctags" ]; then
CTAGS="${path}/ctags"
break
elif [ -e "${path}/ctags.exe" ]; then
CTAGS="${path}/ctags.exe"
break
fi
done
fi
fi
IFS=$bb_save_IFS
echo "CTAGS=${CTAGS}" >> Makefile.config
if [ "${prefix_libtool}" != '' -a "${prefix_libtool}" != 'bundled' ]; then
LIBTOOL_BUNDLED='no'
LIBTOOL="${prefix_libtool}"
else
LIBTOOL_BUNDLED='yes'
LIBTOOL=\${TOP}/mk/libtool/libtool
fi
echo "LIBTOOL_BUNDLED=${LIBTOOL_BUNDLED}" >> Makefile.config
echo "LIBTOOL=${LIBTOOL}" >> Makefile.config
echo "PREFIX?=${PREFIX}" >> Makefile.config
echo '#ifndef PREFIX' > config/prefix.h
echo "#define PREFIX \"$PREFIX\"" >> config/prefix.h
echo '#endif' >> config/prefix.h
echo "hdefs[\"PREFIX\"] = \"$PREFIX\"" >>configure.lua
if [ "${bindir}" != '' ]; then
BINDIR="${bindir}"
BINDIR_SPECIFIED='yes'
else
BINDIR="${PREFIX}/bin"
fi
echo '#ifndef BINDIR' > config/bindir.h
echo "#define BINDIR \"$BINDIR\"" >> config/bindir.h
echo '#endif' >> config/bindir.h
echo "hdefs[\"BINDIR\"] = \"$BINDIR\"" >>configure.lua
if [ "${libdir}" != '' ]; then
LIBDIR="${libdir}"
LIBDIR_SPECIFIED='yes'
else
LIBDIR="${PREFIX}/lib"
fi
echo '#ifndef LIBDIR' > config/libdir.h
echo "#define LIBDIR \"$LIBDIR\"" >> config/libdir.h
echo '#endif' >> config/libdir.h
echo "hdefs[\"LIBDIR\"] = \"$LIBDIR\"" >>configure.lua
if [ "${moduledir}" != '' ]; then
MODULEDIR="${moduledir}"
MODULEDIR_SPECIFIED='yes'
else
MODULEDIR="${PREFIX}/lib"
fi
echo '#ifndef MODULEDIR' > config/moduledir.h
echo "#define MODULEDIR \"$MODULEDIR\"" >> config/moduledir.h
echo '#endif' >> config/moduledir.h
echo "hdefs[\"MODULEDIR\"] = \"$MODULEDIR\"" >>configure.lua
if [ "${libexecdir}" != '' ]; then
LIBEXECDIR="${libexecdir}"
LIBEXECDIR_SPECIFIED='yes'
else
LIBEXECDIR="${PREFIX}/libexec"
fi
echo '#ifndef LIBEXECDIR' > config/libexecdir.h
echo "#define LIBEXECDIR \"$LIBEXECDIR\"" >> config/libexecdir.h
echo '#endif' >> config/libexecdir.h
echo "hdefs[\"LIBEXECDIR\"] = \"$LIBEXECDIR\"" >>configure.lua
if [ "${datadir}" != '' ]; then
DATADIR="${datadir}"
DATADIR_SPECIFIED='yes'
else
DATADIR="${PREFIX}/share"
fi
echo '#ifndef DATADIR' > config/datadir.h
echo "#define DATADIR \"$DATADIR\"" >> config/datadir.h
echo '#endif' >> config/datadir.h
echo "hdefs[\"DATADIR\"] = \"$DATADIR\"" >>configure.lua
if [ "${statedir}" != '' ]; then
STATEDIR="${statedir}"
STATEDIR_SPECIFIED='yes'
else
STATEDIR="${PREFIX}/var"
fi
echo '#ifndef STATEDIR' > config/statedir.h
echo "#define STATEDIR \"$STATEDIR\"" >> config/statedir.h
echo '#endif' >> config/statedir.h
echo "hdefs[\"STATEDIR\"] = \"$STATEDIR\"" >>configure.lua
if [ "${sysconfdir}" != '' ]; then
SYSCONFDIR="${sysconfdir}"
SYSCONFDIR_SPECIFIED='yes'
else
SYSCONFDIR="${PREFIX}/etc"
fi
echo '#ifndef SYSCONFDIR' > config/sysconfdir.h
echo "#define SYSCONFDIR \"$SYSCONFDIR\"" >> config/sysconfdir.h
echo '#endif' >> config/sysconfdir.h
echo "hdefs[\"SYSCONFDIR\"] = \"$SYSCONFDIR\"" >>configure.lua
if [ "${localedir}" != '' ]; then
LOCALEDIR="${localedir}"
LOCALEDIR_SPECIFIED='yes'
else
LOCALEDIR="${DATADIR}/locale"
fi
echo '#ifndef LOCALEDIR' > config/localedir.h
echo "#define LOCALEDIR \"$LOCALEDIR\"" >> config/localedir.h
echo '#endif' >> config/localedir.h
echo "hdefs[\"LOCALEDIR\"] = \"$LOCALEDIR\"" >>configure.lua
if [ "${mandir}" != '' ]; then
MANDIR="${mandir}"
MANDIR_SPECIFIED='yes'
else
MANDIR="${PREFIX}/man"
fi
echo '#ifndef MANDIR' > config/mandir.h
echo "#define MANDIR \"$MANDIR\"" >> config/mandir.h
echo '#endif' >> config/mandir.h
echo "hdefs[\"MANDIR\"] = \"$MANDIR\"" >>configure.lua
PROGNAME="mailprocd"
echo '#ifndef PROGNAME' > config/progname.h
echo "#define PROGNAME \"$PROGNAME\"" >> config/progname.h
echo '#endif' >> config/progname.h
echo "hdefs[\"PROGNAME\"] = \"$PROGNAME\"" >>configure.lua
VERSION="1.3"
echo '#ifndef VERSION' > config/version.h
echo "#define VERSION \"$VERSION\"" >> config/version.h
echo '#endif' >> config/version.h
echo "hdefs[\"VERSION\"] = \"$VERSION\"" >>configure.lua
RELEASE="Emotional Moement"
echo '#ifndef RELEASE' > config/release.h
echo "#define RELEASE \"$RELEASE\"" >> config/release.h
echo '#endif' >> config/release.h
echo "hdefs[\"RELEASE\"] = \"$RELEASE\"" >>configure.lua
SHAREDIR="\${PREFIX}/share/mailprocd"
SHAREDIR="$PREFIX/share/mailprocd"
echo '#ifndef SHAREDIR' > config/sharedir.h
echo "#define SHAREDIR \"$SHAREDIR\"" >> config/sharedir.h
echo '#endif' >> config/sharedir.h
echo "hdefs[\"SHAREDIR\"] = \"$SHAREDIR\"" >>configure.lua
SYSCONFDIR="/etc/mailprocd"
SYSCONFDIR="/etc/mailprocd"
echo '#ifndef SYSCONFDIR' > config/sysconfdir.h
echo "#define SYSCONFDIR \"$SYSCONFDIR\"" >> config/sysconfdir.h
echo '#endif' >> config/sysconfdir.h
echo "hdefs[\"SYSCONFDIR\"] = \"$SYSCONFDIR\"" >>configure.lua
CFLAGS="$CFLAGS -I$SRC"
CXXFLAGS="$CXXFLAGS -I$SRC"
$ECHO_N 'checking for a C compiler...'
$ECHO_N 'checking for a C compiler...' >> config.log
if [ "$CROSS_COMPILING" = "yes" ]; then
CROSSPFX="${host}-"
else
CROSSPFX=''
fi
if [ "$CC" = '' ]; then
bb_save_IFS=$IFS
IFS=$PATH_SEPARATOR
for i in $PATH; do
if [ -x "${i}/${CROSSPFX}cc" ]; then
CC="${i}/${CROSSPFX}cc"
break
elif [ -x "${i}/${CROSSPFX}clang" ]; then
CC="${i}/${CROSSPFX}clang"
break
elif [ -x "${i}/${CROSSPFX}gcc" ]; then
CC="${i}/${CROSSPFX}gcc"
break
elif [ -e "${i}/${CROSSPFX}cc.exe" ]; then
CC="${i}/${CROSSPFX}cc.exe"
break
elif [ -e "${i}/${CROSSPFX}clang.exe" ]; then
CC="${i}/${CROSSPFX}clang.exe"
break
elif [ -e "${i}/${CROSSPFX}gcc.exe" ]; then
CC="${i}/${CROSSPFX}gcc.exe"
break
fi
done
IFS=$bb_save_IFS
if [ "$CC" = '' ]; then
echo "*"
echo "* Cannot find ${CROSSPFX}cc or ${CROSSPFX}gcc in default PATH."
echo "* You may need to set the CC environment variable."
echo "*"
echo "Cannot find ${CROSSPFX}cc or ${CROSSPFX}gcc in PATH." >> config.log
HAVE_CC="no"
echo "no"
else
HAVE_CC="yes"
echo "yes, ${CC}"
echo "yes, ${CC}" >> config.log
fi
else
HAVE_CC="yes"
echo "using ${CC}"
fi
if [ "${HAVE_CC}" = "yes" ]; then
$ECHO_N 'checking whether the C compiler works...'
$ECHO_N 'checking whether the C compiler works...' >> config.log
cat << 'EOT' > conftest.c
int main(int argc, char *argv[]) { return (0); }
EOT
$CC -o conftest conftest.c 2>>config.log
if [ $? != 0 ]; then
echo "no"
echo "no, compile failed" >> config.log
HAVE_CC="no"
else
HAVE_CC="yes"
fi
if [ "${HAVE_CC}" = "yes" ]; then
if [ "${EXECSUFFIX}" = '' ]; then
EXECSUFFIX=''
for OUTFILE in conftest.exe conftest conftest.*; do
if [ -f $OUTFILE ]; then
case $OUTFILE in
*.c | *.cc | *.m | *.o | *.obj | *.bb | *.bbg | *.d | *.pdb | *.tds | *.xcoff | *.dSYM | *.xSYM )
;;
*.* )
EXECSUFFIX=`expr "$OUTFILE" : '[^.]*\(\..*\)'`
break ;;
* )
break ;;
esac;
fi
done
if [ "$EXECSUFFIX" != '' ]; then
echo "yes, it outputs $EXECSUFFIX files"
echo "yes, it outputs $EXECSUFFIX files" >> config.log
else
echo "yes"
echo "yes" >> config.log
fi
echo '#ifndef EXECSUFFIX' > config/execsuffix.h
echo "#define EXECSUFFIX \"$EXECSUFFIX\"" >> config/execsuffix.h
echo '#endif' >> config/execsuffix.h
echo "hdefs[\"EXECSUFFIX\"] = \"$EXECSUFFIX\"" >>configure.lua
else
echo "yes"
echo "yes" >> config.log
fi
fi
rm -f conftest.c conftest$EXECSUFFIX
TEST_CFLAGS=''
fi
if [ "${HAVE_CC}" = "yes" ]; then
$ECHO_N 'cc: checking for compiler warning options...'
$ECHO_N 'cc: checking for compiler warning options...' >> config.log
MK_COMPILE_STATUS='OK'
cat << EOT > conftest$$.c
int main(int argc, char *argv[]) { return (0); }
EOT
echo "$CC $CFLAGS $TEST_CFLAGS -Wall -Werror -o $testdir/conftest conftest.c " >>config.log
$CC $CFLAGS $TEST_CFLAGS -Wall -Werror -o $testdir/conftest$$ conftest$$.c 2>>config.log
if [ $? != 0 ]; then
echo ": failed, code $?" >> config.log
MK_COMPILE_STATUS="FAIL $?"
fi
if [ "${MK_COMPILE_STATUS}" = 'OK' ]; then
echo 'yes'
echo 'yes' >> config.log
HAVE_CC_WARNINGS='yes'
echo '#ifndef HAVE_CC_WARNINGS' > config/have_cc_warnings.h
echo "#define HAVE_CC_WARNINGS \"$HAVE_CC_WARNINGS\"" >> config/have_cc_warnings.h
echo '#endif' >> config/have_cc_warnings.h
echo "hdefs[\"HAVE_CC_WARNINGS\"] = \"$HAVE_CC_WARNINGS\"" >>configure.lua
else
echo 'no'
echo 'no' >> config.log
HAVE_CC_WARNINGS='no'
echo '#undef HAVE_CC_WARNINGS' >config/have_cc_warnings.h
echo 'hdefs["HAVE_CC_WARNINGS"] = nil' >>configure.lua
fi;
rm -f conftest$$.c $testdir/conftest$$$EXECSUFFIX
if [ "${HAVE_CC_WARNINGS}" = "yes" ]; then
TEST_CFLAGS="-Wall -Werror"
fi;
$ECHO_N 'cc: checking for long double...'
$ECHO_N 'cc: checking for long double...' >> config.log
MK_COMPILE_STATUS='OK'
cat << EOT > conftest$$.c
#include
int
main(int argc, char *argv[])
{
long double ld = 0.1;
printf("%Lf", ld);
return (ld == 1.0);
}
EOT
echo "$CC $CFLAGS $TEST_CFLAGS -o $testdir/conftest conftest.c" >>config.log
$CC $CFLAGS $TEST_CFLAGS -o $testdir/conftest$$ conftest$$.c 2>>config.log
if [ $? != 0 ]; then
echo ": failed, code $?" >> config.log
MK_COMPILE_STATUS="FAIL $?"
fi
if [ "${MK_COMPILE_STATUS}" = 'OK' ]; then
echo 'yes'
echo 'yes' >> config.log
HAVE_LONG_DOUBLE='yes'
echo '#ifndef HAVE_LONG_DOUBLE' > config/have_long_double.h
echo "#define HAVE_LONG_DOUBLE \"$HAVE_LONG_DOUBLE\"" >> config/have_long_double.h
echo '#endif' >> config/have_long_double.h
echo "hdefs[\"HAVE_LONG_DOUBLE\"] = \"$HAVE_LONG_DOUBLE\"" >>configure.lua
else
echo 'no'
echo 'no' >> config.log
HAVE_LONG_DOUBLE='no'
echo '#undef HAVE_LONG_DOUBLE' >config/have_long_double.h
echo 'hdefs["HAVE_LONG_DOUBLE"] = nil' >>configure.lua
fi;
rm -f conftest$$.c $testdir/conftest$$$EXECSUFFIX
$ECHO_N 'cc: checking for long long...'
$ECHO_N 'cc: checking for long long...' >> config.log
MK_COMPILE_STATUS='OK'
cat << EOT > conftest$$.c
int
main(int argc, char *argv[])
{
long long ll = -1;
unsigned long long ull = 1;
return (ll != -1 || ull != 1);
}
EOT
echo "$CC $CFLAGS $TEST_CFLAGS -o $testdir/conftest conftest.c" >>config.log
$CC $CFLAGS $TEST_CFLAGS -o $testdir/conftest$$ conftest$$.c 2>>config.log
if [ $? != 0 ]; then
echo ": failed, code $?" >> config.log
MK_COMPILE_STATUS="FAIL $?"
fi
if [ "${MK_COMPILE_STATUS}" = 'OK' ]; then
echo 'yes'
echo 'yes' >> config.log
HAVE_LONG_LONG='yes'
echo '#ifndef HAVE_LONG_LONG' > config/have_long_long.h
echo "#define HAVE_LONG_LONG \"$HAVE_LONG_LONG\"" >> config/have_long_long.h
echo '#endif' >> config/have_long_long.h
echo "hdefs[\"HAVE_LONG_LONG\"] = \"$HAVE_LONG_LONG\"" >>configure.lua
else
echo 'no'
echo 'no' >> config.log
HAVE_LONG_LONG='no'
echo '#undef HAVE_LONG_LONG' >config/have_long_long.h
echo 'hdefs["HAVE_LONG_LONG"] = nil' >>configure.lua
fi;
rm -f conftest$$.c $testdir/conftest$$$EXECSUFFIX
$ECHO_N 'cc: checking for cygwin environment...'
$ECHO_N 'cc: checking for cygwin environment...' >> config.log
MK_COMPILE_STATUS='OK'
cat << EOT > conftest$$.c
#include
#include
#include
int
main(int argc, char *argv[]) {
struct stat sb;
DWORD rv;
rv = GetFileAttributes("foo");
stat("foo", &sb);
return (0);
}
EOT
echo "$CC $CFLAGS $TEST_CFLAGS -mcygwin -o $testdir/conftest conftest.c" >>config.log
$CC $CFLAGS $TEST_CFLAGS -mcygwin -o $testdir/conftest$$ conftest$$.c 2>>config.log
if [ $? != 0 ]; then
echo ": failed, code $?" >> config.log
MK_COMPILE_STATUS="FAIL $?"
fi
if [ "${MK_COMPILE_STATUS}" = 'OK' ]; then
echo 'yes'
echo 'yes' >> config.log
HAVE_CYGWIN='yes'
echo '#ifndef HAVE_CYGWIN' > config/have_cygwin.h
echo "#define HAVE_CYGWIN \"$HAVE_CYGWIN\"" >> config/have_cygwin.h
echo '#endif' >> config/have_cygwin.h
echo "hdefs[\"HAVE_CYGWIN\"] = \"$HAVE_CYGWIN\"" >>configure.lua
else
echo 'no'
echo 'no' >> config.log
HAVE_CYGWIN='no'
echo '#undef HAVE_CYGWIN' >config/have_cygwin.h
echo 'hdefs["HAVE_CYGWIN"] = nil' >>configure.lua
fi;
rm -f conftest$$.c $testdir/conftest$$$EXECSUFFIX
$ECHO_N 'cc: checking for -mwindows option...'
$ECHO_N 'cc: checking for -mwindows option...' >> config.log
MK_COMPILE_STATUS='OK'
cat << EOT > conftest$$.c
#include
int
main(int argc, char *argv[]) {
return GetFileAttributes("foo") ? 0 : 1;
}
EOT
echo "$CC $CFLAGS $TEST_CFLAGS -mwindows -o $testdir/conftest conftest.c" >>config.log
$CC $CFLAGS $TEST_CFLAGS -mwindows -o $testdir/conftest$$ conftest$$.c 2>>config.log
if [ $? != 0 ]; then
echo ": failed, code $?" >> config.log
MK_COMPILE_STATUS="FAIL $?"
fi
if [ "${MK_COMPILE_STATUS}" = 'OK' ]; then
echo 'yes'
echo 'yes' >> config.log
HAVE_CC_MWINDOWS='yes'
echo '#ifndef HAVE_CC_MWINDOWS' > config/have_cc_mwindows.h
echo "#define HAVE_CC_MWINDOWS \"$HAVE_CC_MWINDOWS\"" >> config/have_cc_mwindows.h
echo '#endif' >> config/have_cc_mwindows.h
echo "hdefs[\"HAVE_CC_MWINDOWS\"] = \"$HAVE_CC_MWINDOWS\"" >>configure.lua
else
echo 'no'
echo 'no' >> config.log
HAVE_CC_MWINDOWS='no'
echo '#undef HAVE_CC_MWINDOWS' >config/have_cc_mwindows.h
echo 'hdefs["HAVE_CC_MWINDOWS"] = nil' >>configure.lua
fi;
rm -f conftest$$.c $testdir/conftest$$$EXECSUFFIX
if [ "${HAVE_CC_MWINDOWS}" = "yes" ]; then
PROG_GUI_FLAGS="-mwindows"
else
PROG_GUI_FLAGS=""
fi;
$ECHO_N 'cc: checking for -mconsole option...'
$ECHO_N 'cc: checking for -mconsole option...' >> config.log
MK_COMPILE_STATUS='OK'
cat << EOT > conftest$$.c
#include
int
main(int argc, char *argv[]) {
return GetFileAttributes("foo") ? 0 : 1;
}
EOT
echo "$CC $CFLAGS $TEST_CFLAGS -mconsole -o $testdir/conftest conftest.c" >>config.log
$CC $CFLAGS $TEST_CFLAGS -mconsole -o $testdir/conftest$$ conftest$$.c 2>>config.log
if [ $? != 0 ]; then
echo ": failed, code $?" >> config.log
MK_COMPILE_STATUS="FAIL $?"
fi
if [ "${MK_COMPILE_STATUS}" = 'OK' ]; then
echo 'yes'
echo 'yes' >> config.log
HAVE_CC_MCONSOLE='yes'
echo '#ifndef HAVE_CC_MCONSOLE' > config/have_cc_mconsole.h
echo "#define HAVE_CC_MCONSOLE \"$HAVE_CC_MCONSOLE\"" >> config/have_cc_mconsole.h
echo '#endif' >> config/have_cc_mconsole.h
echo "hdefs[\"HAVE_CC_MCONSOLE\"] = \"$HAVE_CC_MCONSOLE\"" >>configure.lua
else
echo 'no'
echo 'no' >> config.log
HAVE_CC_MCONSOLE='no'
echo '#undef HAVE_CC_MCONSOLE' >config/have_cc_mconsole.h
echo 'hdefs["HAVE_CC_MCONSOLE"] = nil' >>configure.lua
fi;
rm -f conftest$$.c $testdir/conftest$$$EXECSUFFIX
if [ "${HAVE_CC_MCONSOLE}" = "yes" ]; then
PROG_CLI_FLAGS="-mconsole"
else
PROG_CLI_FLAGS=""
fi;
case "${host}" in
*-*-cygwin* | *-*-mingw32*)
$ECHO_N 'cc: checking for linker -no-undefined option...'
$ECHO_N 'cc: checking for linker -no-undefined option...' >> config.log
MK_COMPILE_STATUS='OK'
cat << EOT > conftest$$.c
int main(int argc, char *argv[]) { return (0); }
EOT
echo "$CC $CFLAGS $TEST_CFLAGS -Wl,--no-undefined -o $testdir/conftest conftest.c" >>config.log
$CC $CFLAGS $TEST_CFLAGS -Wl,--no-undefined -o $testdir/conftest$$ conftest$$.c 2>>config.log
if [ $? != 0 ]; then
echo ": failed, code $?" >> config.log
MK_COMPILE_STATUS="FAIL $?"
fi
if [ "${MK_COMPILE_STATUS}" = 'OK' ]; then
echo 'yes'
echo 'yes' >> config.log
HAVE_LD_NO_UNDEFINED='yes'
echo '#ifndef HAVE_LD_NO_UNDEFINED' > config/have_ld_no_undefined.h
echo "#define HAVE_LD_NO_UNDEFINED \"$HAVE_LD_NO_UNDEFINED\"" >> config/have_ld_no_undefined.h
echo '#endif' >> config/have_ld_no_undefined.h
echo "hdefs[\"HAVE_LD_NO_UNDEFINED\"] = \"$HAVE_LD_NO_UNDEFINED\"" >>configure.lua
else
echo 'no'
echo 'no' >> config.log
HAVE_LD_NO_UNDEFINED='no'
echo '#undef HAVE_LD_NO_UNDEFINED' >config/have_ld_no_undefined.h
echo 'hdefs["HAVE_LD_NO_UNDEFINED"] = nil' >>configure.lua
fi;
rm -f conftest$$.c $testdir/conftest$$$EXECSUFFIX
if [ "${HAVE_LD_NO_UNDEFINED}" = "yes" ]; then
LIBTOOLOPTS_SHARED="${LIBTOOLOPTS_SHARED} -no-undefined -Wl,--no-undefined"
fi;
$ECHO_N 'cc: checking for linker -static-libgcc option...'
$ECHO_N 'cc: checking for linker -static-libgcc option...' >> config.log
MK_COMPILE_STATUS='OK'
cat << EOT > conftest$$.c
int main(int argc, char *argv[]) { return (0); }
EOT
echo "$CC $CFLAGS $TEST_CFLAGS -static-libgcc -o $testdir/conftest conftest.c" >>config.log
$CC $CFLAGS $TEST_CFLAGS -static-libgcc -o $testdir/conftest$$ conftest$$.c 2>>config.log
if [ $? != 0 ]; then
echo ": failed, code $?" >> config.log
MK_COMPILE_STATUS="FAIL $?"
fi
if [ "${MK_COMPILE_STATUS}" = 'OK' ]; then
echo 'yes'
echo 'yes' >> config.log
HAVE_LD_STATIC_LIBGCC='yes'
echo '#ifndef HAVE_LD_STATIC_LIBGCC' > config/have_ld_static_libgcc.h
echo "#define HAVE_LD_STATIC_LIBGCC \"$HAVE_LD_STATIC_LIBGCC\"" >> config/have_ld_static_libgcc.h
echo '#endif' >> config/have_ld_static_libgcc.h
echo "hdefs[\"HAVE_LD_STATIC_LIBGCC\"] = \"$HAVE_LD_STATIC_LIBGCC\"" >>configure.lua
else
echo 'no'
echo 'no' >> config.log
HAVE_LD_STATIC_LIBGCC='no'
echo '#undef HAVE_LD_STATIC_LIBGCC' >config/have_ld_static_libgcc.h
echo 'hdefs["HAVE_LD_STATIC_LIBGCC"] = nil' >>configure.lua
fi;
rm -f conftest$$.c $testdir/conftest$$$EXECSUFFIX
if [ "${HAVE_LD_STATIC_LIBGCC}" = "yes" ]; then
LIBTOOLOPTS_SHARED="${LIBTOOLOPTS_SHARED} -XCClinker -static-libgcc"
fi;
;;
esac
fi;
if [ "${HAVE_CC}" != "yes" ]; then
echo '* '
echo '* ' >> config.log
echo '* This software requires cc installed on your system.'
echo '* This software requires cc installed on your system.' >> config.log
echo '* '
echo '* ' >> config.log
echo "configure failed!"
exit 1
fi;
$ECHO_N 'checking for aligned attribute...'
$ECHO_N 'checking for aligned attribute...' >> config.log
MK_COMPILE_STATUS='OK'
cat << EOT > conftest$$.c
int main(int argc, char *argv[])
{
struct s1 { int x,y,z; } __attribute__ ((aligned(16)));
return (0);
}
EOT
echo "$CC $CFLAGS $TEST_CFLAGS -Wall -Werror -o $testdir/conftest conftest.c" >>config.log
$CC $CFLAGS $TEST_CFLAGS -Wall -Werror -o $testdir/conftest$$ conftest$$.c 2>>config.log
if [ $? != 0 ]; then
echo ": failed, code $?" >> config.log
MK_COMPILE_STATUS="FAIL $?"
fi
if [ "${MK_COMPILE_STATUS}" = 'OK' ]; then
echo 'yes'
echo 'yes' >> config.log
HAVE_ALIGNED_ATTRIBUTE='yes'
echo '#ifndef HAVE_ALIGNED_ATTRIBUTE' > config/have_aligned_attribute.h
echo "#define HAVE_ALIGNED_ATTRIBUTE \"$HAVE_ALIGNED_ATTRIBUTE\"" >> config/have_aligned_attribute.h
echo '#endif' >> config/have_aligned_attribute.h
echo "hdefs[\"HAVE_ALIGNED_ATTRIBUTE\"] = \"$HAVE_ALIGNED_ATTRIBUTE\"" >>configure.lua
else
echo 'no'
echo 'no' >> config.log
HAVE_ALIGNED_ATTRIBUTE='no'
echo '#undef HAVE_ALIGNED_ATTRIBUTE' >config/have_aligned_attribute.h
echo 'hdefs["HAVE_ALIGNED_ATTRIBUTE"] = nil' >>configure.lua
fi;
rm -f conftest$$.c $testdir/conftest$$$EXECSUFFIX
$ECHO_N 'checking for __bounded__ attribute...'
$ECHO_N 'checking for __bounded__ attribute...' >> config.log
MK_COMPILE_STATUS='OK'
cat << EOT > conftest$$.c
void foostring(char *, int) __attribute__ ((__bounded__(__string__,1,2)));
void foostring(char *a, int c) { }
void foobuffer(void *, int) __attribute__ ((__bounded__(__buffer__,1,2)));
void foobuffer(void *a, int c) { }
int main(void)
{
char buf[32];
foostring(buf, sizeof(buf));
foobuffer(buf, sizeof(buf));
return (0);
}
EOT
echo "$CC $CFLAGS $TEST_CFLAGS -o $testdir/conftest conftest.c " >>config.log
$CC $CFLAGS $TEST_CFLAGS -o $testdir/conftest$$ conftest$$.c 2>>config.log
if [ $? != 0 ]; then
echo ": failed, code $?" >> config.log
MK_COMPILE_STATUS="FAIL $?"
fi
if [ "${MK_COMPILE_STATUS}" = 'OK' ]; then
echo 'yes'
echo 'yes' >> config.log
HAVE_BOUNDED_ATTRIBUTE='yes'
echo '#ifndef HAVE_BOUNDED_ATTRIBUTE' > config/have_bounded_attribute.h
echo "#define HAVE_BOUNDED_ATTRIBUTE \"$HAVE_BOUNDED_ATTRIBUTE\"" >> config/have_bounded_attribute.h
echo '#endif' >> config/have_bounded_attribute.h
echo "hdefs[\"HAVE_BOUNDED_ATTRIBUTE\"] = \"$HAVE_BOUNDED_ATTRIBUTE\"" >>configure.lua
else
echo 'no'
echo 'no' >> config.log
HAVE_BOUNDED_ATTRIBUTE='no'
echo '#undef HAVE_BOUNDED_ATTRIBUTE' >config/have_bounded_attribute.h
echo 'hdefs["HAVE_BOUNDED_ATTRIBUTE"] = nil' >>configure.lua
fi;
rm -f conftest$$.c $testdir/conftest$$$EXECSUFFIX
$ECHO_N 'checking for const attribute...'
$ECHO_N 'checking for const attribute...' >> config.log
MK_COMPILE_STATUS='OK'
cat << EOT > conftest$$.c
int foo(int) __attribute__ ((const));
int foo(int x) { return (x*x); }
int main(int argc, char *argv[])
{
int x = foo(1);
return (x);
}
EOT
echo "$CC $CFLAGS $TEST_CFLAGS -o $testdir/conftest conftest.c" >>config.log
$CC $CFLAGS $TEST_CFLAGS -o $testdir/conftest$$ conftest$$.c 2>>config.log
if [ $? != 0 ]; then
echo ": failed, code $?" >> config.log
MK_COMPILE_STATUS="FAIL $?"
fi
if [ "${MK_COMPILE_STATUS}" = 'OK' ]; then
echo 'yes'
echo 'yes' >> config.log
HAVE_CONST_ATTRIBUTE='yes'
echo '#ifndef HAVE_CONST_ATTRIBUTE' > config/have_const_attribute.h
echo "#define HAVE_CONST_ATTRIBUTE \"$HAVE_CONST_ATTRIBUTE\"" >> config/have_const_attribute.h
echo '#endif' >> config/have_const_attribute.h
echo "hdefs[\"HAVE_CONST_ATTRIBUTE\"] = \"$HAVE_CONST_ATTRIBUTE\"" >>configure.lua
else
echo 'no'
echo 'no' >> config.log
HAVE_CONST_ATTRIBUTE='no'
echo '#undef HAVE_CONST_ATTRIBUTE' >config/have_const_attribute.h
echo 'hdefs["HAVE_CONST_ATTRIBUTE"] = nil' >>configure.lua
fi;
rm -f conftest$$.c $testdir/conftest$$$EXECSUFFIX
$ECHO_N 'checking for deprecated attribute...'
$ECHO_N 'checking for deprecated attribute...' >> config.log
MK_COMPILE_STATUS='OK'
cat << EOT > conftest$$.c
void foo(void) __attribute__ ((deprecated));
void foo(void) { }
int main(int argc, char *argv[])
{
/* foo(); */
return (0);
}
EOT
echo "$CC $CFLAGS $TEST_CFLAGS -o $testdir/conftest conftest.c" >>config.log
$CC $CFLAGS $TEST_CFLAGS -o $testdir/conftest$$ conftest$$.c 2>>config.log
if [ $? != 0 ]; then
echo ": failed, code $?" >> config.log
MK_COMPILE_STATUS="FAIL $?"
fi
if [ "${MK_COMPILE_STATUS}" = 'OK' ]; then
echo 'yes'
echo 'yes' >> config.log
HAVE_DEPRECATED_ATTRIBUTE='yes'
echo '#ifndef HAVE_DEPRECATED_ATTRIBUTE' > config/have_deprecated_attribute.h
echo "#define HAVE_DEPRECATED_ATTRIBUTE \"$HAVE_DEPRECATED_ATTRIBUTE\"" >> config/have_deprecated_attribute.h
echo '#endif' >> config/have_deprecated_attribute.h
echo "hdefs[\"HAVE_DEPRECATED_ATTRIBUTE\"] = \"$HAVE_DEPRECATED_ATTRIBUTE\"" >>configure.lua
else
echo 'no'
echo 'no' >> config.log
HAVE_DEPRECATED_ATTRIBUTE='no'
echo '#undef HAVE_DEPRECATED_ATTRIBUTE' >config/have_deprecated_attribute.h
echo 'hdefs["HAVE_DEPRECATED_ATTRIBUTE"] = nil' >>configure.lua
fi;
rm -f conftest$$.c $testdir/conftest$$$EXECSUFFIX
$ECHO_N 'checking for __format__ attribute...'
$ECHO_N 'checking for __format__ attribute...' >> config.log
MK_COMPILE_STATUS='OK'
cat << EOT > conftest$$.c
#include
void foo1(char *, ...)
__attribute__((__format__ (printf, 1, 2)));
void foo2(char *, ...)
__attribute__((__format__ (__printf__, 1, 2)))
__attribute__((__nonnull__ (1)));
void foo1(char *a, ...) {}
void foo2(char *a, ...) {}
int main(int argc, char *argv[])
{
foo1("foo %s", "bar");
foo2("foo %d", 1);
return (0);
}
EOT
echo "$CC $CFLAGS $TEST_CFLAGS -o $testdir/conftest conftest.c " >>config.log
$CC $CFLAGS $TEST_CFLAGS -o $testdir/conftest$$ conftest$$.c 2>>config.log
if [ $? != 0 ]; then
echo ": failed, code $?" >> config.log
MK_COMPILE_STATUS="FAIL $?"
fi
if [ "${MK_COMPILE_STATUS}" = 'OK' ]; then
echo 'yes'
echo 'yes' >> config.log
HAVE_FORMAT_ATTRIBUTE='yes'
echo '#ifndef HAVE_FORMAT_ATTRIBUTE' > config/have_format_attribute.h
echo "#define HAVE_FORMAT_ATTRIBUTE \"$HAVE_FORMAT_ATTRIBUTE\"" >> config/have_format_attribute.h
echo '#endif' >> config/have_format_attribute.h
echo "hdefs[\"HAVE_FORMAT_ATTRIBUTE\"] = \"$HAVE_FORMAT_ATTRIBUTE\"" >>configure.lua
else
echo 'no'
echo 'no' >> config.log
HAVE_FORMAT_ATTRIBUTE='no'
echo '#undef HAVE_FORMAT_ATTRIBUTE' >config/have_format_attribute.h
echo 'hdefs["HAVE_FORMAT_ATTRIBUTE"] = nil' >>configure.lua
fi;
rm -f conftest$$.c $testdir/conftest$$$EXECSUFFIX
$ECHO_N 'checking for __nonnull__ attribute...'
$ECHO_N 'checking for __nonnull__ attribute...' >> config.log
MK_COMPILE_STATUS='OK'
cat << EOT > conftest$$.c
void foo(char *) __attribute__((__nonnull__ (1)));
void foo(char *a) { }
int main(int argc, char *argv[])
{
foo("foo");
return (0);
}
EOT
echo "$CC $CFLAGS $TEST_CFLAGS -Wall -Werror -o $testdir/conftest conftest.c" >>config.log
$CC $CFLAGS $TEST_CFLAGS -Wall -Werror -o $testdir/conftest$$ conftest$$.c 2>>config.log
if [ $? != 0 ]; then
echo ": failed, code $?" >> config.log
MK_COMPILE_STATUS="FAIL $?"
fi
if [ "${MK_COMPILE_STATUS}" = 'OK' ]; then
echo 'yes'
echo 'yes' >> config.log
HAVE_NONNULL_ATTRIBUTE='yes'
echo '#ifndef HAVE_NONNULL_ATTRIBUTE' > config/have_nonnull_attribute.h
echo "#define HAVE_NONNULL_ATTRIBUTE \"$HAVE_NONNULL_ATTRIBUTE\"" >> config/have_nonnull_attribute.h
echo '#endif' >> config/have_nonnull_attribute.h
echo "hdefs[\"HAVE_NONNULL_ATTRIBUTE\"] = \"$HAVE_NONNULL_ATTRIBUTE\"" >>configure.lua
else
echo 'no'
echo 'no' >> config.log
HAVE_NONNULL_ATTRIBUTE='no'
echo '#undef HAVE_NONNULL_ATTRIBUTE' >config/have_nonnull_attribute.h
echo 'hdefs["HAVE_NONNULL_ATTRIBUTE"] = nil' >>configure.lua
fi;
rm -f conftest$$.c $testdir/conftest$$$EXECSUFFIX
$ECHO_N 'checking for noreturn attribute...'
$ECHO_N 'checking for noreturn attribute...' >> config.log
MK_COMPILE_STATUS='OK'
cat << EOT > conftest$$.c
#include
#include
void foo(void) __attribute__ ((noreturn));
void foo(void) { _exit(0); }
int main(int argc, char *argv[])
{
foo();
}
EOT
echo "$CC $CFLAGS $TEST_CFLAGS -o $testdir/conftest conftest.c" >>config.log
$CC $CFLAGS $TEST_CFLAGS -o $testdir/conftest$$ conftest$$.c 2>>config.log
if [ $? != 0 ]; then
echo ": failed, code $?" >> config.log
MK_COMPILE_STATUS="FAIL $?"
fi
if [ "${MK_COMPILE_STATUS}" = 'OK' ]; then
echo 'yes'
echo 'yes' >> config.log
HAVE_NORETURN_ATTRIBUTE='yes'
echo '#ifndef HAVE_NORETURN_ATTRIBUTE' > config/have_noreturn_attribute.h
echo "#define HAVE_NORETURN_ATTRIBUTE \"$HAVE_NORETURN_ATTRIBUTE\"" >> config/have_noreturn_attribute.h
echo '#endif' >> config/have_noreturn_attribute.h
echo "hdefs[\"HAVE_NORETURN_ATTRIBUTE\"] = \"$HAVE_NORETURN_ATTRIBUTE\"" >>configure.lua
else
echo 'no'
echo 'no' >> config.log
HAVE_NORETURN_ATTRIBUTE='no'
echo '#undef HAVE_NORETURN_ATTRIBUTE' >config/have_noreturn_attribute.h
echo 'hdefs["HAVE_NORETURN_ATTRIBUTE"] = nil' >>configure.lua
fi;
rm -f conftest$$.c $testdir/conftest$$$EXECSUFFIX
$ECHO_N 'checking for packed attribute...'
$ECHO_N 'checking for packed attribute...' >> config.log
MK_COMPILE_STATUS='OK'
cat << EOT > conftest$$.c
int main(int argc, char *argv[])
{
struct s1 { char c; int x,y,z; } __attribute__ ((packed));
return (0);
}
EOT
echo "$CC $CFLAGS $TEST_CFLAGS -Wall -Werror -o $testdir/conftest conftest.c" >>config.log
$CC $CFLAGS $TEST_CFLAGS -Wall -Werror -o $testdir/conftest$$ conftest$$.c 2>>config.log
if [ $? != 0 ]; then
echo ": failed, code $?" >> config.log
MK_COMPILE_STATUS="FAIL $?"
fi
if [ "${MK_COMPILE_STATUS}" = 'OK' ]; then
echo 'yes'
echo 'yes' >> config.log
HAVE_PACKED_ATTRIBUTE='yes'
echo '#ifndef HAVE_PACKED_ATTRIBUTE' > config/have_packed_attribute.h
echo "#define HAVE_PACKED_ATTRIBUTE \"$HAVE_PACKED_ATTRIBUTE\"" >> config/have_packed_attribute.h
echo '#endif' >> config/have_packed_attribute.h
echo "hdefs[\"HAVE_PACKED_ATTRIBUTE\"] = \"$HAVE_PACKED_ATTRIBUTE\"" >>configure.lua
else
echo 'no'
echo 'no' >> config.log
HAVE_PACKED_ATTRIBUTE='no'
echo '#undef HAVE_PACKED_ATTRIBUTE' >config/have_packed_attribute.h
echo 'hdefs["HAVE_PACKED_ATTRIBUTE"] = nil' >>configure.lua
fi;
rm -f conftest$$.c $testdir/conftest$$$EXECSUFFIX
$ECHO_N 'checking for pure attribute...'
$ECHO_N 'checking for pure attribute...' >> config.log
MK_COMPILE_STATUS='OK'
cat << EOT > conftest$$.c
int foo(int) __attribute__ ((pure));
int foo(int x) { return (x*x); }
int main(int argc, char *argv[])
{
int x = foo(1);
return (x);
}
EOT
echo "$CC $CFLAGS $TEST_CFLAGS -o $testdir/conftest conftest.c" >>config.log
$CC $CFLAGS $TEST_CFLAGS -o $testdir/conftest$$ conftest$$.c 2>>config.log
if [ $? != 0 ]; then
echo ": failed, code $?" >> config.log
MK_COMPILE_STATUS="FAIL $?"
fi
if [ "${MK_COMPILE_STATUS}" = 'OK' ]; then
echo 'yes'
echo 'yes' >> config.log
HAVE_PURE_ATTRIBUTE='yes'
echo '#ifndef HAVE_PURE_ATTRIBUTE' > config/have_pure_attribute.h
echo "#define HAVE_PURE_ATTRIBUTE \"$HAVE_PURE_ATTRIBUTE\"" >> config/have_pure_attribute.h
echo '#endif' >> config/have_pure_attribute.h
echo "hdefs[\"HAVE_PURE_ATTRIBUTE\"] = \"$HAVE_PURE_ATTRIBUTE\"" >>configure.lua
else
echo 'no'
echo 'no' >> config.log
HAVE_PURE_ATTRIBUTE='no'
echo '#undef HAVE_PURE_ATTRIBUTE' >config/have_pure_attribute.h
echo 'hdefs["HAVE_PURE_ATTRIBUTE"] = nil' >>configure.lua
fi;
rm -f conftest$$.c $testdir/conftest$$$EXECSUFFIX
$ECHO_N 'checking for warn_unused_result attribute...'
$ECHO_N 'checking for warn_unused_result attribute...' >> config.log
MK_COMPILE_STATUS='OK'
cat << EOT > conftest$$.c
int foo(void) __attribute__ ((warn_unused_result));
int foo(void) { return (1); }
int main(int argc, char *argv[])
{
int rv = foo();
return (rv);
}
EOT
echo "$CC $CFLAGS $TEST_CFLAGS -o $testdir/conftest conftest.c" >>config.log
$CC $CFLAGS $TEST_CFLAGS -o $testdir/conftest$$ conftest$$.c 2>>config.log
if [ $? != 0 ]; then
echo ": failed, code $?" >> config.log
MK_COMPILE_STATUS="FAIL $?"
fi
if [ "${MK_COMPILE_STATUS}" = 'OK' ]; then
echo 'yes'
echo 'yes' >> config.log
HAVE_WARN_UNUSED_RESULT_ATTRIBUTE='yes'
echo '#ifndef HAVE_WARN_UNUSED_RESULT_ATTRIBUTE' > config/have_warn_unused_result_attribute.h
echo "#define HAVE_WARN_UNUSED_RESULT_ATTRIBUTE \"$HAVE_WARN_UNUSED_RESULT_ATTRIBUTE\"" >> config/have_warn_unused_result_attribute.h
echo '#endif' >> config/have_warn_unused_result_attribute.h
echo "hdefs[\"HAVE_WARN_UNUSED_RESULT_ATTRIBUTE\"] = \"$HAVE_WARN_UNUSED_RESULT_ATTRIBUTE\"" >>configure.lua
else
echo 'no'
echo 'no' >> config.log
HAVE_WARN_UNUSED_RESULT_ATTRIBUTE='no'
echo '#undef HAVE_WARN_UNUSED_RESULT_ATTRIBUTE' >config/have_warn_unused_result_attribute.h
echo 'hdefs["HAVE_WARN_UNUSED_RESULT_ATTRIBUTE"] = nil' >>configure.lua
fi;
rm -f conftest$$.c $testdir/conftest$$$EXECSUFFIX
$ECHO_N 'checking for unused variable attribute...'
$ECHO_N 'checking for unused variable attribute...' >> config.log
MK_COMPILE_STATUS='OK'
cat << EOT > conftest$$.c
int main(int argc, char *argv[])
{
int __attribute__ ((unused)) variable;
return (0);
}
EOT
echo "$CC $CFLAGS $TEST_CFLAGS -o $testdir/conftest conftest.c" >>config.log
$CC $CFLAGS $TEST_CFLAGS -o $testdir/conftest$$ conftest$$.c 2>>config.log
if [ $? != 0 ]; then
echo ": failed, code $?" >> config.log
MK_COMPILE_STATUS="FAIL $?"
fi
if [ "${MK_COMPILE_STATUS}" = 'OK' ]; then
echo 'yes'
echo 'yes' >> config.log
HAVE_UNUSED_VARIABLE_ATTRIBUTE='yes'
echo '#ifndef HAVE_UNUSED_VARIABLE_ATTRIBUTE' > config/have_unused_variable_attribute.h
echo "#define HAVE_UNUSED_VARIABLE_ATTRIBUTE \"$HAVE_UNUSED_VARIABLE_ATTRIBUTE\"" >> config/have_unused_variable_attribute.h
echo '#endif' >> config/have_unused_variable_attribute.h
echo "hdefs[\"HAVE_UNUSED_VARIABLE_ATTRIBUTE\"] = \"$HAVE_UNUSED_VARIABLE_ATTRIBUTE\"" >>configure.lua
else
echo 'no'
echo 'no' >> config.log
HAVE_UNUSED_VARIABLE_ATTRIBUTE='no'
echo '#undef HAVE_UNUSED_VARIABLE_ATTRIBUTE' >config/have_unused_variable_attribute.h
echo 'hdefs["HAVE_UNUSED_VARIABLE_ATTRIBUTE"] = nil' >>configure.lua
fi;
rm -f conftest$$.c $testdir/conftest$$$EXECSUFFIX
$ECHO_N 'checking for a setproctitle() function...'
$ECHO_N 'checking for a setproctitle() function...' >> config.log
MK_COMPILE_STATUS='OK'
cat << EOT > conftest$$.c
#include
#include
#include
int
main(int argc, char *argv[])
{
setproctitle("foo %d", 1);
return (0);
}
EOT
echo "$CC $CFLAGS $TEST_CFLAGS -o $testdir/conftest conftest.c" >>config.log
$CC $CFLAGS $TEST_CFLAGS -o $testdir/conftest$$ conftest$$.c 2>>config.log
if [ $? != 0 ]; then
echo ": failed, code $?" >> config.log
MK_COMPILE_STATUS="FAIL $?"
fi
if [ "${MK_COMPILE_STATUS}" = 'OK' ]; then
echo 'yes'
echo 'yes' >> config.log
HAVE_SETPROCTITLE='yes'
echo '#ifndef HAVE_SETPROCTITLE' > config/have_setproctitle.h
echo "#define HAVE_SETPROCTITLE \"$HAVE_SETPROCTITLE\"" >> config/have_setproctitle.h
echo '#endif' >> config/have_setproctitle.h
echo "hdefs[\"HAVE_SETPROCTITLE\"] = \"$HAVE_SETPROCTITLE\"" >>configure.lua
else
echo 'no'
echo 'no' >> config.log
HAVE_SETPROCTITLE='no'
echo '#undef HAVE_SETPROCTITLE' >config/have_setproctitle.h
echo 'hdefs["HAVE_SETPROCTITLE"] = nil' >>configure.lua
fi;
rm -f conftest$$.c $testdir/conftest$$$EXECSUFFIX
$ECHO_N 'checking for the flock() function...'
$ECHO_N 'checking for the flock() function...' >> config.log
MK_COMPILE_STATUS='OK'
cat << EOT > conftest$$.c
#include
int
main(int argc, char *argv[])
{
int fd = 0;
flock(fd, LOCK_EX);
flock(fd, LOCK_UN);
return (0);
}
EOT
echo "$CC $CFLAGS $TEST_CFLAGS -o $testdir/conftest conftest.c" >>config.log
$CC $CFLAGS $TEST_CFLAGS -o $testdir/conftest$$ conftest$$.c 2>>config.log
if [ $? != 0 ]; then
echo ": failed, code $?" >> config.log
MK_COMPILE_STATUS="FAIL $?"
fi
if [ "${MK_COMPILE_STATUS}" = 'OK' ]; then
echo 'yes'
echo 'yes' >> config.log
HAVE_FLOCK='yes'
echo '#ifndef HAVE_FLOCK' > config/have_flock.h
echo "#define HAVE_FLOCK \"$HAVE_FLOCK\"" >> config/have_flock.h
echo '#endif' >> config/have_flock.h
echo "hdefs[\"HAVE_FLOCK\"] = \"$HAVE_FLOCK\"" >>configure.lua
else
echo 'no'
echo 'no' >> config.log
HAVE_FLOCK='no'
echo '#undef HAVE_FLOCK' >config/have_flock.h
echo 'hdefs["HAVE_FLOCK"] = nil' >>configure.lua
fi;
rm -f conftest$$.c $testdir/conftest$$$EXECSUFFIX
$ECHO_N 'checking for the fgetln() function...'
$ECHO_N 'checking for the fgetln() function...' >> config.log
MK_COMPILE_STATUS='OK'
cat << EOT > conftest$$.c
#include
int
main(int argc, char *argv[])
{
FILE *f;
size_t size;
char *s;
f = fopen("foo", "r");
s = fgetln(f, &size);
printf("%s\n", s);
fclose(f);
return (0);
}
EOT
echo "$CC $CFLAGS $TEST_CFLAGS -o $testdir/conftest conftest.c" >>config.log
$CC $CFLAGS $TEST_CFLAGS -o $testdir/conftest$$ conftest$$.c 2>>config.log
if [ $? != 0 ]; then
echo ": failed, code $?" >> config.log
MK_COMPILE_STATUS="FAIL $?"
fi
if [ "${MK_COMPILE_STATUS}" = 'OK' ]; then
echo 'yes'
echo 'yes' >> config.log
HAVE_FGETLN='yes'
echo '#ifndef HAVE_FGETLN' > config/have_fgetln.h
echo "#define HAVE_FGETLN \"$HAVE_FGETLN\"" >> config/have_fgetln.h
echo '#endif' >> config/have_fgetln.h
echo "hdefs[\"HAVE_FGETLN\"] = \"$HAVE_FGETLN\"" >>configure.lua
else
echo 'no'
echo 'no' >> config.log
HAVE_FGETLN='no'
echo '#undef HAVE_FGETLN' >config/have_fgetln.h
echo 'hdefs["HAVE_FGETLN"] = nil' >>configure.lua
fi;
rm -f conftest$$.c $testdir/conftest$$$EXECSUFFIX
$ECHO_N 'checking for a strlcpy() function...'
$ECHO_N 'checking for a strlcpy() function...' >> config.log
MK_COMPILE_STATUS='OK'
cat << EOT > conftest$$.c
#include
int
main(int argc, char *argv[])
{
(void)strlcpy(NULL, NULL, 0);
return (0);
}
EOT
echo "$CC $CFLAGS $TEST_CFLAGS -o $testdir/conftest conftest.c" >>config.log
$CC $CFLAGS $TEST_CFLAGS -o $testdir/conftest$$ conftest$$.c 2>>config.log
if [ $? != 0 ]; then
echo ": failed, code $?" >> config.log
MK_COMPILE_STATUS="FAIL $?"
fi
if [ "${MK_COMPILE_STATUS}" = 'OK' ]; then
echo 'yes'
echo 'yes' >> config.log
HAVE_STRLCPY='yes'
echo '#ifndef HAVE_STRLCPY' > config/have_strlcpy.h
echo "#define HAVE_STRLCPY \"$HAVE_STRLCPY\"" >> config/have_strlcpy.h
echo '#endif' >> config/have_strlcpy.h
echo "hdefs[\"HAVE_STRLCPY\"] = \"$HAVE_STRLCPY\"" >>configure.lua
else
echo 'no'
echo 'no' >> config.log
HAVE_STRLCPY='no'
echo '#undef HAVE_STRLCPY' >config/have_strlcpy.h
echo 'hdefs["HAVE_STRLCPY"] = nil' >>configure.lua
fi;
rm -f conftest$$.c $testdir/conftest$$$EXECSUFFIX
$ECHO_N 'checking for a strlcat() function...'
$ECHO_N 'checking for a strlcat() function...' >> config.log
MK_COMPILE_STATUS='OK'
cat << EOT > conftest$$.c
#include
int
main(int argc, char *argv[])
{
(void)strlcat(NULL, NULL, 0);
return (0);
}
EOT
echo "$CC $CFLAGS $TEST_CFLAGS -o $testdir/conftest conftest.c" >>config.log
$CC $CFLAGS $TEST_CFLAGS -o $testdir/conftest$$ conftest$$.c 2>>config.log
if [ $? != 0 ]; then
echo ": failed, code $?" >> config.log
MK_COMPILE_STATUS="FAIL $?"
fi
if [ "${MK_COMPILE_STATUS}" = 'OK' ]; then
echo 'yes'
echo 'yes' >> config.log
HAVE_STRLCAT='yes'
echo '#ifndef HAVE_STRLCAT' > config/have_strlcat.h
echo "#define HAVE_STRLCAT \"$HAVE_STRLCAT\"" >> config/have_strlcat.h
echo '#endif' >> config/have_strlcat.h
echo "hdefs[\"HAVE_STRLCAT\"] = \"$HAVE_STRLCAT\"" >>configure.lua
else
echo 'no'
echo 'no' >> config.log
HAVE_STRLCAT='no'
echo '#undef HAVE_STRLCAT' >config/have_strlcat.h
echo 'hdefs["HAVE_STRLCAT"] = nil' >>configure.lua
fi;
rm -f conftest$$.c $testdir/conftest$$$EXECSUFFIX
$ECHO_N 'checking for the getpeereid() interface...'
$ECHO_N 'checking for the getpeereid() interface...' >> config.log
MK_COMPILE_STATUS='OK'
cat << EOT > conftest$$.c
#include
#include
#include
int
main(int argc, char *argv[])
{
uid_t uid;
gid_t gid;
int fd = 0;
int rv;
rv = getpeereid(fd, &uid, &gid);
if (rv != 0) { return (1); }
return (0);
}
EOT
echo "$CC $CFLAGS $TEST_CFLAGS -o $testdir/conftest conftest.c" >>config.log
$CC $CFLAGS $TEST_CFLAGS -o $testdir/conftest$$ conftest$$.c 2>>config.log
if [ $? != 0 ]; then
echo ": failed, code $?" >> config.log
MK_COMPILE_STATUS="FAIL $?"
fi
if [ "${MK_COMPILE_STATUS}" = 'OK' ]; then
echo 'yes'
echo 'yes' >> config.log
HAVE_GETPEEREID='yes'
echo '#ifndef HAVE_GETPEEREID' > config/have_getpeereid.h
echo "#define HAVE_GETPEEREID \"$HAVE_GETPEEREID\"" >> config/have_getpeereid.h
echo '#endif' >> config/have_getpeereid.h
echo "hdefs[\"HAVE_GETPEEREID\"] = \"$HAVE_GETPEEREID\"" >>configure.lua
else
echo 'no'
echo 'no' >> config.log
HAVE_GETPEEREID='no'
echo '#undef HAVE_GETPEEREID' >config/have_getpeereid.h
echo 'hdefs["HAVE_GETPEEREID"] = nil' >>configure.lua
fi;
rm -f conftest$$.c $testdir/conftest$$$EXECSUFFIX
$ECHO_N 'checking for the getpeerucred() interface...'
$ECHO_N 'checking for the getpeerucred() interface...' >> config.log
MK_COMPILE_STATUS='OK'
cat << EOT > conftest$$.c
#include
int
main(int argc, char *argv[])
{
int rv, fd = 0;
size_t size;
ucred_t *creds;
uid_t uid;
gid_t gid;
size = ucred_size();
rv = getpeerucred(fd, &creds);
if (rv != 0) { return (1); }
uid = ucred_getruid(creds);
gid = ucred_getrgid(creds);
ucred_free(creds);
return (0);
}
EOT
echo "$CC $CFLAGS $TEST_CFLAGS -o $testdir/conftest conftest.c" >>config.log
$CC $CFLAGS $TEST_CFLAGS -o $testdir/conftest$$ conftest$$.c 2>>config.log
if [ $? != 0 ]; then
echo ": failed, code $?" >> config.log
MK_COMPILE_STATUS="FAIL $?"
fi
if [ "${MK_COMPILE_STATUS}" = 'OK' ]; then
echo 'yes'
echo 'yes' >> config.log
HAVE_GETPEERUCRED='yes'
echo '#ifndef HAVE_GETPEERUCRED' > config/have_getpeerucred.h
echo "#define HAVE_GETPEERUCRED \"$HAVE_GETPEERUCRED\"" >> config/have_getpeerucred.h
echo '#endif' >> config/have_getpeerucred.h
echo "hdefs[\"HAVE_GETPEERUCRED\"] = \"$HAVE_GETPEERUCRED\"" >>configure.lua
else
echo 'no'
echo 'no' >> config.log
HAVE_GETPEERUCRED='no'
echo '#undef HAVE_GETPEERUCRED' >config/have_getpeerucred.h
echo 'hdefs["HAVE_GETPEERUCRED"] = nil' >>configure.lua
fi;
rm -f conftest$$.c $testdir/conftest$$$EXECSUFFIX
$ECHO_N 'checking for the SO_PEERCRED interface...'
$ECHO_N 'checking for the SO_PEERCRED interface...' >> config.log
MK_COMPILE_STATUS='OK'
cat << EOT > conftest$$.c
#include
#include
int
main(int argc, char *argv[])
{
struct ucred creds;
socklen_t socklen;
int fd = 0;
uid_t uid;
gid_t gid;
int rv;
socklen = sizeof(creds);
rv = getsockopt(fd, SOL_SOCKET, SO_PEERCRED, &creds, &socklen);
if (rv != 0) { return (1); }
uid = (uid_t)creds.uid;
gid = (gid_t)creds.gid;
return (0);
}
EOT
echo "$CC $CFLAGS $TEST_CFLAGS -o $testdir/conftest conftest.c" >>config.log
$CC $CFLAGS $TEST_CFLAGS -o $testdir/conftest$$ conftest$$.c 2>>config.log
if [ $? != 0 ]; then
echo ": failed, code $?" >> config.log
MK_COMPILE_STATUS="FAIL $?"
fi
if [ "${MK_COMPILE_STATUS}" = 'OK' ]; then
echo 'yes'
echo 'yes' >> config.log
HAVE_SO_PEERCRED='yes'
echo '#ifndef HAVE_SO_PEERCRED' > config/have_so_peercred.h
echo "#define HAVE_SO_PEERCRED \"$HAVE_SO_PEERCRED\"" >> config/have_so_peercred.h
echo '#endif' >> config/have_so_peercred.h
echo "hdefs[\"HAVE_SO_PEERCRED\"] = \"$HAVE_SO_PEERCRED\"" >>configure.lua
else
echo 'no'
echo 'no' >> config.log
HAVE_SO_PEERCRED='no'
echo '#undef HAVE_SO_PEERCRED' >config/have_so_peercred.h
echo 'hdefs["HAVE_SO_PEERCRED"] = nil' >>configure.lua
fi;
rm -f conftest$$.c $testdir/conftest$$$EXECSUFFIX
if [ "${with_perl}" != "no" ]
then
$ECHO_N 'checking for Perl...'
$ECHO_N 'checking for Perl...' >> config.log
MK_EXEC_FOUND='No'
if [ "" != '' ]; then
if [ -e "/bin/perl" ]; then
PERL_CFLAGS=`/bin/perl -MExtUtils::Embed -e ccopts`
MK_EXEC_FOUND='Yes'
elif [ -e "/bin/perl.exe" ]; then
PERL_CFLAGS=`/bin/perl.exe -MExtUtils::Embed -e ccopts`
MK_EXEC_FOUND='Yes'
fi
else
PERL_CFLAGS=''
bb_save_IFS=$IFS
IFS=$PATH_SEPARATOR
for path in $PATH; do
if [ -e "${path}/perl" ]; then
PERL_CFLAGS=`${path}/perl -MExtUtils::Embed -e ccopts`
MK_EXEC_FOUND='Yes'
break
elif [ -e "${path}/perl.exe" ]; then
PERL_CFLAGS=`${path}/perl.exe -MExtUtils::Embed -e ccopts`
MK_EXEC_FOUND='Yes'
break
fi
done
IFS=$bb_save_IFS
fi
MK_EXEC_FOUND='No'
if [ "" != '' ]; then
if [ -e "/bin/perl" ]; then
PERL_LIBS=`/bin/perl -MExtUtils::Embed -e ldopts`
MK_EXEC_FOUND='Yes'
elif [ -e "/bin/perl.exe" ]; then
PERL_LIBS=`/bin/perl.exe -MExtUtils::Embed -e ldopts`
MK_EXEC_FOUND='Yes'
fi
else
PERL_LIBS=''
bb_save_IFS=$IFS
IFS=$PATH_SEPARATOR
for path in $PATH; do
if [ -e "${path}/perl" ]; then
PERL_LIBS=`${path}/perl -MExtUtils::Embed -e ldopts`
MK_EXEC_FOUND='Yes'
break
elif [ -e "${path}/perl.exe" ]; then
PERL_LIBS=`${path}/perl.exe -MExtUtils::Embed -e ldopts`
MK_EXEC_FOUND='Yes'
break
fi
done
IFS=$bb_save_IFS
fi
if [ "${PERL_LIBS}" != "" ]; then
echo 'yes'
echo 'yes' >> config.log
$ECHO_N 'checking whether libperl works...'
$ECHO_N 'checking whether libperl works...' >> config.log
MK_COMPILE_STATUS='OK'
cat << EOT > conftest$$.c
#include
#include
static void xs_init (pTHX);
EXTERN_C void boot_DynaLoader(pTHX_ CV *cv);
EXTERN_C void xs_init(pTHX) {
char *file = __FILE__;
dXSUB_SYS;
newXS("DynaLoader::boot_DynaLoader", boot_DynaLoader, file);
}
int
main(int argc, char **argv, char **env)
{
PerlInterpreter *my_perl;
char *myArgv[] = { "", "foo.pl" };
PERL_SYS_INIT3(&argc, &argv, &env);
my_perl = perl_alloc();
perl_construct(my_perl);
perl_parse(my_perl, xs_init, 2, myArgv, (char **)NULL);
PL_exit_flags |= PERL_EXIT_DESTRUCT_END;
perl_run(my_perl);
return (0);
}
EOT
echo "$CC $CFLAGS $TEST_CFLAGS ${PERL_CFLAGS} -Wno-error -o $testdir/conftest conftest.c ${PERL_LIBS}" >>config.log
$CC $CFLAGS $TEST_CFLAGS ${PERL_CFLAGS} -Wno-error -o $testdir/conftest$$ conftest$$.c ${PERL_LIBS} 2>>config.log
if [ $? != 0 ]; then
echo ": failed, code $?" >> config.log
MK_COMPILE_STATUS="FAIL $?"
fi
if [ "${MK_COMPILE_STATUS}" = 'OK' ]; then
echo 'yes'
echo 'yes' >> config.log
HAVE_PERL='yes'
echo '#ifndef HAVE_PERL' > config/have_perl.h
echo "#define HAVE_PERL \"$HAVE_PERL\"" >> config/have_perl.h
echo '#endif' >> config/have_perl.h
echo "hdefs[\"HAVE_PERL\"] = \"$HAVE_PERL\"" >>configure.lua
else
echo 'no'
echo 'no' >> config.log
HAVE_PERL='no'
echo '#undef HAVE_PERL' >config/have_perl.h
echo 'hdefs["HAVE_PERL"] = nil' >>configure.lua
fi;
rm -f conftest$$.c $testdir/conftest$$$EXECSUFFIX
if [ "${HAVE_PERL}" = "yes" ]; then
echo '#ifndef PERL_CFLAGS' > config/perl_cflags.h
echo "#define PERL_CFLAGS \"$PERL_CFLAGS\"" >> config/perl_cflags.h
echo '#endif' >> config/perl_cflags.h
echo "hdefs[\"PERL_CFLAGS\"] = \"$PERL_CFLAGS\"" >>configure.lua
echo '#ifndef PERL_LIBS' > config/perl_libs.h
echo "#define PERL_LIBS \"$PERL_LIBS\"" >> config/perl_libs.h
echo '#endif' >> config/perl_libs.h
echo "hdefs[\"PERL_LIBS\"] = \"$PERL_LIBS\"" >>configure.lua
else
echo '#undef PERL_CFLAGS' >config/perl_cflags.h
echo 'hdefs["PERL_CFLAGS"] = nil' >>configure.lua
PERL_CFLAGS=""
echo '#undef PERL_LIBS' >config/perl_libs.h
echo 'hdefs["PERL_LIBS"] = nil' >>configure.lua
PERL_LIBS=""
fi;
else
echo 'no'
echo 'no' >> config.log
echo '#undef HAVE_PERL' >config/have_perl.h
echo 'hdefs["HAVE_PERL"] = nil' >>configure.lua
PERL="/usr/bin/perl"
fi;
if [ "${HAVE_PERL}" = "yes" ]
then
CFLAGS="$CFLAGS -DHAVE_PERL"
else
echo "*"
echo "* Warning: perl not found, compiling without embedded "
echo "* perl and spam filtering support."
echo "*"
fi
else
echo '#undef HAVE_PERL' >config/have_perl.h
echo 'hdefs["HAVE_PERL"] = nil' >>configure.lua
fi
if [ "${with_mailblockd}" != "no" ]
then
HAVE_MAILBLOCKD="Yes"
echo '#ifndef HAVE_MAILBLOCKD' > config/have_mailblockd.h
echo "#define HAVE_MAILBLOCKD \"$HAVE_MAILBLOCKD\"" >> config/have_mailblockd.h
echo '#endif' >> config/have_mailblockd.h
echo "hdefs[\"HAVE_MAILBLOCKD\"] = \"$HAVE_MAILBLOCKD\"" >>configure.lua
else
echo '#undef HAVE_MAILBLOCKD' >config/have_mailblockd.h
echo 'hdefs["HAVE_MAILBLOCKD"] = nil' >>configure.lua
fi
if [ "${with_spamassassin}" != "no" -a "${HAVE_PERL}" = "yes" ]
then
$ECHO_N 'checking for the Mail::SpamAssassin module...'
$ECHO_N 'checking for the Mail::SpamAssassin module...' >> config.log
cat << EOT > $testdir/conftest$$.pl
use strict;
use Fcntl;
use Sys::Hostname;
use Mail::SpamAssassin;
our \$Assassin = Mail::SpamAssassin->new({
'home_dir_for_helpers' => '.',
'local_tests_only' => 1});
require Mail::SpamAssassin::DBBasedAddrList;
our \$AddrListFactory = Mail::SpamAssassin::DBBasedAddrList->new();
\$Assassin->set_persistent_address_list_factory(\$AddrListFactory);
\$AddrListFactory->finish();
\$Assassin->finish();
EOT
(cd $testdir && perl conftest$$.pl) >> config.log
if [ "$?" = '0' ]; then
echo 'yes'
echo 'yes' >> config.log
HAVE_SPAMASSASSIN='yes'
echo '#ifndef HAVE_SPAMASSASSIN' > config/have_spamassassin.h
echo "#define HAVE_SPAMASSASSIN \"$HAVE_SPAMASSASSIN\"" >> config/have_spamassassin.h
echo '#endif' >> config/have_spamassassin.h
echo "hdefs[\"HAVE_SPAMASSASSIN\"] = \"$HAVE_SPAMASSASSIN\"" >>configure.lua
else
echo 'no (script failed)'
echo 'no (script failed)' >> config.log
HAVE_SPAMASSASSIN='no'
echo '#undef HAVE_SPAMASSASSIN' >config/have_spamassassin.h
echo 'hdefs["HAVE_SPAMASSASSIN"] = nil' >>configure.lua
fi;
rm -f $testdir/conftest$$.pl
if [ "${HAVE_SPAMASSASSIN}" = "yes" ]
then
CFLAGS="$CFLAGS -DHAVE_SA"
else
echo "*"
echo "* Warning: SpamAssassin not found, compiling without "
echo "* support for spam filtering."
echo "*"
fi
else
echo '#undef HAVE_SPAMASSASSIN' >config/have_spamassassin.h
echo 'hdefs["HAVE_SPAMASSASSIN"] = nil' >>configure.lua
fi
if [ "${enable_warnings}" = "yes" ]
then
CFLAGS="$CFLAGS -Wall -Werror -Wmissing-prototypes -Wno-unused-value"
fi
if [ "${enable_debug}" = "yes" ]
then
CFLAGS="$CFLAGS -DDEBUG"
fi
if [ "${enable_lmtp}" != "no" ]
then
HAVE_LMTP=""
echo '#ifndef HAVE_LMTP' > config/have_lmtp.h
echo "#define HAVE_LMTP \"$HAVE_LMTP\"" >> config/have_lmtp.h
echo '#endif' >> config/have_lmtp.h
echo "hdefs[\"HAVE_LMTP\"] = \"$HAVE_LMTP\"" >>configure.lua
else
echo '#undef HAVE_LMTP' >config/have_lmtp.h
echo 'hdefs["HAVE_LMTP"] = nil' >>configure.lua
fi
if [ "${enable_policy}" != "no" ]
then
HAVE_POLICY=""
echo '#ifndef HAVE_POLICY' > config/have_policy.h
echo "#define HAVE_POLICY \"$HAVE_POLICY\"" >> config/have_policy.h
echo '#endif' >> config/have_policy.h
echo "hdefs[\"HAVE_POLICY\"] = \"$HAVE_POLICY\"" >>configure.lua
else
echo '#undef HAVE_POLICY' >config/have_policy.h
echo 'hdefs["HAVE_POLICY"] = nil' >>configure.lua
fi
if [ "${enable_control}" != "no" ]
then
HAVE_CONTROL=""
echo '#ifndef HAVE_CONTROL' > config/have_control.h
echo "#define HAVE_CONTROL \"$HAVE_CONTROL\"" >> config/have_control.h
echo '#endif' >> config/have_control.h
echo "hdefs[\"HAVE_CONTROL\"] = \"$HAVE_CONTROL\"" >>configure.lua
else
echo '#undef HAVE_CONTROL' >config/have_control.h
echo 'hdefs["HAVE_CONTROL"] = nil' >>configure.lua
fi
if [ "${enable_compat_qmail}" != "no" ]
then
COMPAT_QMAIL=""
echo '#ifndef COMPAT_QMAIL' > config/compat_qmail.h
echo "#define COMPAT_QMAIL \"$COMPAT_QMAIL\"" >> config/compat_qmail.h
echo '#endif' >> config/compat_qmail.h
echo "hdefs[\"COMPAT_QMAIL\"] = \"$COMPAT_QMAIL\"" >>configure.lua
else
echo '#undef COMPAT_QMAIL' >config/compat_qmail.h
echo 'hdefs["COMPAT_QMAIL"] = nil' >>configure.lua
fi
echo "BINDIR=$BINDIR" >>Makefile.config
echo "mdefs[\"BINDIR\"] = \"$BINDIR\"" >>configure.lua
echo "CC=$CC" >>Makefile.config
echo "mdefs[\"CC\"] = \"$CC\"" >>configure.lua
echo "CFLAGS=$CFLAGS" >>Makefile.config
echo "mdefs[\"CFLAGS\"] = \"$CFLAGS\"" >>configure.lua
echo "CXXFLAGS=$CXXFLAGS" >>Makefile.config
echo "mdefs[\"CXXFLAGS\"] = \"$CXXFLAGS\"" >>configure.lua
echo "DATADIR=$DATADIR" >>Makefile.config
echo "mdefs[\"DATADIR\"] = \"$DATADIR\"" >>configure.lua
echo "ENABLE_NLS=$ENABLE_NLS" >>Makefile.config
echo "mdefs[\"ENABLE_NLS\"] = \"$ENABLE_NLS\"" >>configure.lua
echo "EXECSUFFIX=$EXECSUFFIX" >>Makefile.config
echo "mdefs[\"EXECSUFFIX\"] = \"$EXECSUFFIX\"" >>configure.lua
echo "HAVE_ALIGNED_ATTRIBUTE=$HAVE_ALIGNED_ATTRIBUTE" >>Makefile.config
echo "mdefs[\"HAVE_ALIGNED_ATTRIBUTE\"] = \"$HAVE_ALIGNED_ATTRIBUTE\"" >>configure.lua
echo "HAVE_BOUNDED_ATTRIBUTE=$HAVE_BOUNDED_ATTRIBUTE" >>Makefile.config
echo "mdefs[\"HAVE_BOUNDED_ATTRIBUTE\"] = \"$HAVE_BOUNDED_ATTRIBUTE\"" >>configure.lua
echo "HAVE_CC_MCONSOLE=$HAVE_CC_MCONSOLE" >>Makefile.config
echo "mdefs[\"HAVE_CC_MCONSOLE\"] = \"$HAVE_CC_MCONSOLE\"" >>configure.lua
echo "HAVE_CC_MWINDOWS=$HAVE_CC_MWINDOWS" >>Makefile.config
echo "mdefs[\"HAVE_CC_MWINDOWS\"] = \"$HAVE_CC_MWINDOWS\"" >>configure.lua
echo "HAVE_CC_WARNINGS=$HAVE_CC_WARNINGS" >>Makefile.config
echo "mdefs[\"HAVE_CC_WARNINGS\"] = \"$HAVE_CC_WARNINGS\"" >>configure.lua
echo "HAVE_CONST_ATTRIBUTE=$HAVE_CONST_ATTRIBUTE" >>Makefile.config
echo "mdefs[\"HAVE_CONST_ATTRIBUTE\"] = \"$HAVE_CONST_ATTRIBUTE\"" >>configure.lua
echo "HAVE_CYGWIN=$HAVE_CYGWIN" >>Makefile.config
echo "mdefs[\"HAVE_CYGWIN\"] = \"$HAVE_CYGWIN\"" >>configure.lua
echo "HAVE_DEPRECATED_ATTRIBUTE=$HAVE_DEPRECATED_ATTRIBUTE" >>Makefile.config
echo "mdefs[\"HAVE_DEPRECATED_ATTRIBUTE\"] = \"$HAVE_DEPRECATED_ATTRIBUTE\"" >>configure.lua
echo "HAVE_FORMAT_ATTRIBUTE=$HAVE_FORMAT_ATTRIBUTE" >>Makefile.config
echo "mdefs[\"HAVE_FORMAT_ATTRIBUTE\"] = \"$HAVE_FORMAT_ATTRIBUTE\"" >>configure.lua
echo "HAVE_GETTEXT=$HAVE_GETTEXT" >>Makefile.config
echo "mdefs[\"HAVE_GETTEXT\"] = \"$HAVE_GETTEXT\"" >>configure.lua
echo "HAVE_LD_NO_UNDEFINED=$HAVE_LD_NO_UNDEFINED" >>Makefile.config
echo "mdefs[\"HAVE_LD_NO_UNDEFINED\"] = \"$HAVE_LD_NO_UNDEFINED\"" >>configure.lua
echo "HAVE_LD_STATIC_LIBGCC=$HAVE_LD_STATIC_LIBGCC" >>Makefile.config
echo "mdefs[\"HAVE_LD_STATIC_LIBGCC\"] = \"$HAVE_LD_STATIC_LIBGCC\"" >>configure.lua
echo "HAVE_NONNULL_ATTRIBUTE=$HAVE_NONNULL_ATTRIBUTE" >>Makefile.config
echo "mdefs[\"HAVE_NONNULL_ATTRIBUTE\"] = \"$HAVE_NONNULL_ATTRIBUTE\"" >>configure.lua
echo "HAVE_NORETURN_ATTRIBUTE=$HAVE_NORETURN_ATTRIBUTE" >>Makefile.config
echo "mdefs[\"HAVE_NORETURN_ATTRIBUTE\"] = \"$HAVE_NORETURN_ATTRIBUTE\"" >>configure.lua
echo "HAVE_PACKED_ATTRIBUTE=$HAVE_PACKED_ATTRIBUTE" >>Makefile.config
echo "mdefs[\"HAVE_PACKED_ATTRIBUTE\"] = \"$HAVE_PACKED_ATTRIBUTE\"" >>configure.lua
echo "HAVE_PERL=$HAVE_PERL" >>Makefile.config
echo "mdefs[\"HAVE_PERL\"] = \"$HAVE_PERL\"" >>configure.lua
echo "HAVE_PURE_ATTRIBUTE=$HAVE_PURE_ATTRIBUTE" >>Makefile.config
echo "mdefs[\"HAVE_PURE_ATTRIBUTE\"] = \"$HAVE_PURE_ATTRIBUTE\"" >>configure.lua
echo "HAVE_SPAMASSASSIN=$HAVE_SPAMASSASSIN" >>Makefile.config
echo "mdefs[\"HAVE_SPAMASSASSIN\"] = \"$HAVE_SPAMASSASSIN\"" >>configure.lua
echo "HAVE_UNUSED_VARIABLE_ATTRIBUTE=$HAVE_UNUSED_VARIABLE_ATTRIBUTE" >>Makefile.config
echo "mdefs[\"HAVE_UNUSED_VARIABLE_ATTRIBUTE\"] = \"$HAVE_UNUSED_VARIABLE_ATTRIBUTE\"" >>configure.lua
echo "HAVE_WARN_UNUSED_RESULT_ATTRIBUTE=$HAVE_WARN_UNUSED_RESULT_ATTRIBUTE" >>Makefile.config
echo "mdefs[\"HAVE_WARN_UNUSED_RESULT_ATTRIBUTE\"] = \"$HAVE_WARN_UNUSED_RESULT_ATTRIBUTE\"" >>configure.lua
echo "LIBDIR=$LIBDIR" >>Makefile.config
echo "mdefs[\"LIBDIR\"] = \"$LIBDIR\"" >>configure.lua
echo "LIBEXECDIR=$LIBEXECDIR" >>Makefile.config
echo "mdefs[\"LIBEXECDIR\"] = \"$LIBEXECDIR\"" >>configure.lua
echo "LIBTOOLOPTS_SHARED=$LIBTOOLOPTS_SHARED" >>Makefile.config
echo "mdefs[\"LIBTOOLOPTS_SHARED\"] = \"$LIBTOOLOPTS_SHARED\"" >>configure.lua
echo "LOCALEDIR=$LOCALEDIR" >>Makefile.config
echo "mdefs[\"LOCALEDIR\"] = \"$LOCALEDIR\"" >>configure.lua
echo "MANDIR=$MANDIR" >>Makefile.config
echo "mdefs[\"MANDIR\"] = \"$MANDIR\"" >>configure.lua
echo "MODULEDIR=$MODULEDIR" >>Makefile.config
echo "mdefs[\"MODULEDIR\"] = \"$MODULEDIR\"" >>configure.lua
echo "PATH_SEPARATOR=$PATH_SEPARATOR" >>Makefile.config
echo "mdefs[\"PATH_SEPARATOR\"] = \"$PATH_SEPARATOR\"" >>configure.lua
echo "PERL=$PERL" >>Makefile.config
echo "mdefs[\"PERL\"] = \"$PERL\"" >>configure.lua
echo "PERL_CFLAGS=$PERL_CFLAGS" >>Makefile.config
echo "mdefs[\"PERL_CFLAGS\"] = \"$PERL_CFLAGS\"" >>configure.lua
echo "PERL_LIBS=$PERL_LIBS" >>Makefile.config
echo "mdefs[\"PERL_LIBS\"] = \"$PERL_LIBS\"" >>configure.lua
echo "PROG_BUNDLE=$PROG_BUNDLE" >>Makefile.config
echo "mdefs[\"PROG_BUNDLE\"] = \"$PROG_BUNDLE\"" >>configure.lua
echo "PROG_CLI_FLAGS=$PROG_CLI_FLAGS" >>Makefile.config
echo "mdefs[\"PROG_CLI_FLAGS\"] = \"$PROG_CLI_FLAGS\"" >>configure.lua
echo "PROG_GUI_FLAGS=$PROG_GUI_FLAGS" >>Makefile.config
echo "mdefs[\"PROG_GUI_FLAGS\"] = \"$PROG_GUI_FLAGS\"" >>configure.lua
echo "PROG_PREFIX=$PROG_PREFIX" >>Makefile.config
echo "mdefs[\"PROG_PREFIX\"] = \"$PROG_PREFIX\"" >>configure.lua
echo "PROG_SUFFIX=$PROG_SUFFIX" >>Makefile.config
echo "mdefs[\"PROG_SUFFIX\"] = \"$PROG_SUFFIX\"" >>configure.lua
echo "PROG_TRANSFORM=$PROG_TRANSFORM" >>Makefile.config
echo "mdefs[\"PROG_TRANSFORM\"] = \"$PROG_TRANSFORM\"" >>configure.lua
echo "SHAREDIR=$SHAREDIR" >>Makefile.config
echo "mdefs[\"SHAREDIR\"] = \"$SHAREDIR\"" >>configure.lua
echo "STATEDIR=$STATEDIR" >>Makefile.config
echo "mdefs[\"STATEDIR\"] = \"$STATEDIR\"" >>configure.lua
echo "SYSCONFDIR=$SYSCONFDIR" >>Makefile.config
echo "mdefs[\"SYSCONFDIR\"] = \"$SYSCONFDIR\"" >>configure.lua
if [ "${srcdir}" != '' ]; then
$ECHO_N "* Source is in ${srcdir}. Generating Makefiles..."
${PERL} ${SRC}/mk/mkconcurrent.pl ${SRC}
if [ $? != 0 ]; then
exit 1;
fi
echo 'done'
fi
echo '*'
echo '* Configuration successful. Use "make depend all" to compile,'
echo '* and "make install" to install this software under $PREFIX.'
echo '*'