#!/bin/sh
#
# Do not edit!
# This file was generated from configure.in by BSDbuild 2.1.
#
# To regenerate this file, get the latest BSDbuild release from
# http://hypertriton.com/bsdbuild/, and use the command:
#
# $ cat configure.in | mkconfigure > configure
#
# Copyright (c) 2001-2007 Hypertriton, Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR
# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
# USE OF THIS SOFTWARE EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
optarg=
for arg
do
case "$arg" in
-*=*)
optarg=`echo "$arg" | sed 's/[-_a-zA-Z0-9]*=//'`
;;
*)
optarg=
;;
esac
case "$arg" in
--prefix=*)
prefix=$optarg
;;
--sysconfdir=*)
sysconfdir=$optarg
;;
--bindir=*)
bindir=$optarg
;;
--libdir=*)
libdir=$optarg
;;
--sharedir=*)
sharedir=$optarg
;;
--localedir=*)
localedir=$optarg
;;
--mandir=*)
mandir=$optarg
;;
--infodir=*)
infodir=$optarg
;;
--enable-*)
option=`echo $arg | sed -e 's/--enable-//' -e 's/=.*//'`
option=`echo $option | sed 's/-/_/g'`
case "$arg" in
*=*)
eval "enable_${option}='$optarg'"
;;
*)
eval "enable_${option}=yes"
;;
esac
;;
--disable-*)
option=`echo $arg | sed -e 's/--disable-//'`;
option=`echo $option | sed 's/-/_/g'`
eval "enable_${option}=no"
;;
--with-*)
option=`echo $arg | sed -e 's/--with-//' -e 's/=.*//'`
option=`echo $option | sed 's/-/_/g'`
case "$arg" in
*=*)
eval "with_${option}='$optarg'"
;;
*)
eval "with_${option}=yes"
;;
esac
;;
--without-*)
option=`echo $arg | sed -e 's/--without-//'`;
option=`echo $option | sed 's/-/_/g'`
eval "with_${option}=no"
;;
--help)
help=yes
;;
--srcdir=*)
srcdir=$optarg
;;
--testdir=*)
testdir=$optarg
;;
*)
echo "invalid argument: $arg"
echo "try ./configure --help"
exit 1
;;
esac
done
if [ "${prefix}" != "" ]; then
PREFIX="$prefix"
else
PREFIX="/usr/local"
fi
if [ "${srcdir}" != "" ]; then
echo "concurrent build (source in ${srcdir})"
SRC=${srcdir}
perl ${SRC}/mk/mkconcurrent.pl ${SRC}
if [ $? != 0 ]; then
exit 1;
fi
else
SRC=`pwd`
fi
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 [ "${help}" = "yes" ]; then
echo "Usage: ./configure [args]"
echo " --prefix Installation prefix [/usr/local]"
echo " --sysconfdir System-wide configuration prefix [/etc]"
echo " --bindir Executable directory [$PREFIX/bin]"
echo " --libdir Library directory [$PREFIX/lib]"
echo " --sharedir Share directory [$PREFIX/share]"
echo " --localedir Locale directory [$PREFIX/share/locale]"
echo " --mandir Manpage directory [$PREFIX/share/man]"
echo " --infodir Info directory [$PREFIX/share/info]"
echo " --srcdir Source tree for concurrent build [.]"
echo " --testdir Directory in which to execute tests [.]"
echo " --help Display this message"
echo " --enable-nls Native Language Support [no]"
echo " --with-gettext Use gettext tools (msgmerge, ...) [check]"
echo " --with-libtool Specify path to libtool [bundled]"
echo " --with-cygwin Add cygwin dependencies under cygwin [no]"
echo " --with-manpages Manual pages (-mdoc) [yes]"
echo " --with-manlinks Manual pages links for functions [no]"
echo " --with-docs Printable docs (-me/tbl/eqn/pic/refer) [no]"
echo " --enable-debug Include debugging code [no]"
echo " --enable-warnings Compiler warnings [default: no]"
echo " --enable-debug Debug code [default: no]"
exit 1
fi
MACHINE=`uname -m 2>/dev/null` || MACHINE=unknown
OSRELEASE=`uname -r 2>/dev/null` || OSRELEASE=unknown
SYSTEM=`uname -s 2>/dev/null` || SYSTEM=unknown
HOST="$SYSTEM-$OSRELEASE-$MACHINE"
echo "Host: $HOST"
echo "# File generated by configure script (BSDbuild 2.1)." > Makefile.config
echo "Machine: $MACHINE" > config.log
echo "Release: $OSRELEASE" >> config.log
echo "System: $SYSTEM" >> config.log
for arg
do
echo "Argument: $arg" >> config.log
done
mkdir config 1>/dev/null 2>&1
HAVE_MANDOC="no"
NROFF=""
for path in `echo $PATH | sed 's/:/ /g'`; do
if [ -x "${path}/nroff" ]; then
NROFF="${path}/nroff"
fi
done
if [ "${NROFF}" != "" ]; then
echo | ${NROFF} -Tmandoc >/dev/null
if [ "$?" = "0" ]; then
HAVE_MANDOC="yes"
fi
fi
if [ "${HAVE_MANDOC}" = "no" ]; then
if [ "${with_manpages}" = "yes" ]; then
echo "*"
echo "* --with-manpages was requested, but either the nroff(1)"
echo "* utility or the mdoc(7) macro package was 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
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_debug}" = "yes" ]; then
echo "LDFLAGS+=-g" >> Makefile.config
echo "#ifndef DEBUG" > config/debug.h
echo "#define DEBUG 1" >> config/debug.h
echo "#endif /* DEBUG */" >> config/debug.h
else
echo "#undef DEBUG" > config/debug.h
fi
if [ "${enable_nls}" = "yes" ]; then
ENABLE_NLS="yes"
echo "#ifndef ENABLE_NLS" > config/enable_nls.h
echo "#define ENABLE_NLS 1" >> config/enable_nls.h
echo "#endif /* ENABLE_NLS */" >> config/enable_nls.h
msgfmt=""
for path in `echo $PATH | sed 's/:/ /g'`; do
if [ -x "${path}/msgfmt" ]; then
msgfmt=${path}/msgfmt
fi
done
if [ "${msgfmt}" != "" ]; then
HAVE_GETTEXT="yes"
else
HAVE_GETTEXT="no"
fi
else
ENABLE_NLS="no"
HAVE_GETTEXT="no"
echo "#undef ENABLE_NLS" > config/enable_nls.h
fi
echo "ENABLE_NLS=${ENABLE_NLS}" >> Makefile.config
echo "HAVE_GETTEXT=${HAVE_GETTEXT}" >> Makefile.config
LIBTOOL_BUNDLED="yes"
LIBTOOL=\${TOP}/mk/libtool/libtool
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 /* PREFIX */" >> config/prefix.h
if [ "${bindir}" != "" ]; then
BINDIR="${bindir}"
else
BINDIR="${PREFIX}/bin"
fi
echo "BINDIR=${BINDIR}" >> Makefile.config
echo "#ifndef BINDIR" > config/bindir.h
echo "#define BINDIR \"${BINDIR}\"" >> config/bindir.h
echo "#endif /* BINDIR */" >> config/bindir.h
if [ "${libdir}" != "" ]; then
LIBDIR="${libdir}"
else
LIBDIR="${PREFIX}/lib"
fi
echo "LIBDIR=${LIBDIR}" >> Makefile.config
echo "#ifndef LIBDIR" > config/libdir.h
echo "#define LIBDIR \"${LIBDIR}\"" >> config/libdir.h
echo "#endif /* LIBDIR */" >> config/libdir.h
if [ "${sharedir}" != "" ]; then
SHAREDIR="${sharedir}"
else
SHAREDIR="${PREFIX}/share"
fi
echo "SHAREDIR=${SHAREDIR}" >> Makefile.config
echo "#ifndef SHAREDIR" > config/sharedir.h
echo "#define SHAREDIR \"${SHAREDIR}\"" >> config/sharedir.h
echo "#endif /* SHAREDIR */" >> config/sharedir.h
if [ "${localedir}" != "" ]; then
LOCALEDIR="${localedir}"
else
LOCALEDIR="${SHAREDIR}/locale"
fi
echo "LOCALEDIR=${LOCALEDIR}" >> Makefile.config
echo "#ifndef LOCALEDIR" > config/localedir.h
echo "#define LOCALEDIR \"${LOCALEDIR}\"" >> config/localedir.h
echo "#endif /* LOCALEDIR */" >> config/localedir.h
if [ "${mandir}" != "" ]; then
MANDIR="${mandir}"
else
MANDIR="${SHAREDIR}/man"
fi
echo "MANDIR=${MANDIR}" >> Makefile.config
echo "#ifndef MANDIR" > config/mandir.h
echo "#define MANDIR \"${MANDIR}\"" >> config/mandir.h
echo "#endif /* MANDIR */" >> config/mandir.h
if [ "${infodir}" != "" ]; then
INFODIR="${infodir}"
else
INFODIR="${SHAREDIR}/info"
fi
echo "INFODIR=${INFODIR}" >> Makefile.config
echo "#ifndef INFODIR" > config/infodir.h
echo "#define INFODIR \"${INFODIR}\"" >> config/infodir.h
echo "#endif /* INFODIR */" >> config/infodir.h
if [ "${sysconfdir}" != "" ]; then
SYSCONFDIR="${sysconfdir}"
else
SYSCONFDIR="${PREFIX}/etc"
fi
echo "SYSCONFDIR=${SYSCONFDIR}" >> Makefile.config
echo "#ifndef SYSCONFDIR" > config/sysconfdir.h
echo "#define SYSCONFDIR \"${SYSCONFDIR}\"" >> config/sysconfdir.h
echo "#endif /* SYSCONFDIR */" >> config/sysconfdir.h
PROGNAME="mailmond"
echo "#ifndef PROGNAME" > config/progname.h
echo "#define PROGNAME \"$PROGNAME\"" >> config/progname.h
echo "#endif" >> config/progname.h
echo "hdefs[\"PROGNAME\"] = \"$PROGNAME\"" >>configure.lua
SHAREDIR="\${PREFIX}/share/mailmond"
echo "SHAREDIR=$SHAREDIR" >>Makefile.config
echo "mdefs[\"SHAREDIR\"] = \"$SHAREDIR\"" >>configure.lua
SHAREDIR="$PREFIX/share/mailmond"
echo "#ifndef SHAREDIR" > config/sharedir.h
echo "#define SHAREDIR \"$SHAREDIR\"" >> config/sharedir.h
echo "#endif" >> config/sharedir.h
echo "hdefs[\"SHAREDIR\"] = \"$SHAREDIR\"" >>configure.lua
CFLAGS="$CFLAGS -I$SRC"
CXXFLAGS="$CXXFLAGS -I$SRC"
echo "CFLAGS=$CFLAGS" >>Makefile.config
echo "mdefs[\"CFLAGS\"] = \"$CFLAGS\"" >>configure.lua
echo "CXXFLAGS=$CXXFLAGS" >>Makefile.config
echo "mdefs[\"CXXFLAGS\"] = \"$CXXFLAGS\"" >>configure.lua
echo -n "checking for a usable C compiler..."
echo -n "checking for a usable C compiler..." >> config.log
if [ "$CC" = "" ]; then
for i in `echo $PATH |sed 's/:/ /g'`; do
if [ -x "${i}/cc" ]; then
CC="${i}/cc"
elif [ -x "${i}/gcc" ]; then
CC="${i}/gcc"
fi
done
if [ "$CC" = "" ]; then
echo "Could not find a C compiler, try setting CC."
echo "CC is unset and cc/gcc is not in PATH." >> config.log
exit 1
fi
fi
cat << 'EOT' > cc-test.c
int
main(int argc, char *argv[])
{
return (0);
}
EOT
$CC -o cc-test cc-test.c 2>>config.log
if [ $? != 0 ]; then
echo "no"
echo "The test C program failed to compile."
rm -f cc-test cc-test.c
exit 1
fi
echo "yes"
rm -f cc-test cc-test.c
TEST_CFLAGS=""
echo -n "checking for compiler warnings..."
echo -n "checking for compiler warnings..." >> config.log
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 "yes"
echo "yes" >> config.log
compile="ok"
HAVE_CC_WARNINGS="yes"
echo "HAVE_CC_WARNINGS=$HAVE_CC_WARNINGS" >>Makefile.config
echo "mdefs[\"HAVE_CC_WARNINGS\"] = \"$HAVE_CC_WARNINGS\"" >>configure.lua
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
compile="failed"
HAVE_CC_WARNINGS="no"
echo "HAVE_CC_WARNINGS=$HAVE_CC_WARNINGS" >>Makefile.config
echo "mdefs[\"HAVE_CC_WARNINGS\"] = \"$HAVE_CC_WARNINGS\"" >>configure.lua
echo "#undef HAVE_CC_WARNINGS" >config/have_cc_warnings.h
echo "hdefs[\"HAVE_CC_WARNINGS\"] = nil" >>configure.lua
fi;
rm -f $testdir/conftest conftest.c
if [ "${HAVE_CC_WARNINGS}" = "yes" ]; then
TEST_CFLAGS="-Wall -Werror"
fi;
echo -n "checking for IEEE754 floating point..."
echo -n "checking for IEEE754 floating point..." >> config.log
cat << EOT > conftest.c
int
main(int argc, char *argv[])
{
float f = 1.5;
double d = 2.5;
f = 0;
d = 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 "yes"
echo "yes" >> config.log
compile="ok"
HAVE_IEEE754="yes"
echo "HAVE_IEEE754=$HAVE_IEEE754" >>Makefile.config
echo "mdefs[\"HAVE_IEEE754\"] = \"$HAVE_IEEE754\"" >>configure.lua
echo "#ifndef HAVE_IEEE754" > config/have_ieee754.h
echo "#define HAVE_IEEE754 \"$HAVE_IEEE754\"" >> config/have_ieee754.h
echo "#endif" >> config/have_ieee754.h
echo "hdefs[\"HAVE_IEEE754\"] = \"$HAVE_IEEE754\"" >>configure.lua
else
echo "no"
echo "no" >> config.log
compile="failed"
HAVE_IEEE754="no"
echo "HAVE_IEEE754=$HAVE_IEEE754" >>Makefile.config
echo "mdefs[\"HAVE_IEEE754\"] = \"$HAVE_IEEE754\"" >>configure.lua
echo "#undef HAVE_IEEE754" >config/have_ieee754.h
echo "hdefs[\"HAVE_IEEE754\"] = nil" >>configure.lua
fi;
rm -f $testdir/conftest conftest.c
echo -n "checking __bounded__ attribute..."
echo -n "checking __bounded__ attribute..." >> config.log
cat << EOT > conftest.c
void foo(char *, int) __attribute__ ((__bounded__(__string__,1,2)));
void foo(char *a, int c) { }
int main(int argc, char *argv[])
{
char buf[32];
foo(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 "yes"
echo "yes" >> config.log
compile="ok"
HAVE_BOUNDED_ATTRIBUTE="yes"
echo "HAVE_BOUNDED_ATTRIBUTE=$HAVE_BOUNDED_ATTRIBUTE" >>Makefile.config
echo "mdefs[\"HAVE_BOUNDED_ATTRIBUTE\"] = \"$HAVE_BOUNDED_ATTRIBUTE\"" >>configure.lua
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
compile="failed"
HAVE_BOUNDED_ATTRIBUTE="no"
echo "HAVE_BOUNDED_ATTRIBUTE=$HAVE_BOUNDED_ATTRIBUTE" >>Makefile.config
echo "mdefs[\"HAVE_BOUNDED_ATTRIBUTE\"] = \"$HAVE_BOUNDED_ATTRIBUTE\"" >>configure.lua
echo "#undef HAVE_BOUNDED_ATTRIBUTE" >config/have_bounded_attribute.h
echo "hdefs[\"HAVE_BOUNDED_ATTRIBUTE\"] = nil" >>configure.lua
fi;
rm -f $testdir/conftest conftest.c
echo -n "checking __format__ attribute..."
echo -n "checking __format__ attribute..." >> config.log
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 "yes"
echo "yes" >> config.log
compile="ok"
HAVE_FORMAT_ATTRIBUTE="yes"
echo "HAVE_FORMAT_ATTRIBUTE=$HAVE_FORMAT_ATTRIBUTE" >>Makefile.config
echo "mdefs[\"HAVE_FORMAT_ATTRIBUTE\"] = \"$HAVE_FORMAT_ATTRIBUTE\"" >>configure.lua
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
compile="failed"
HAVE_FORMAT_ATTRIBUTE="no"
echo "HAVE_FORMAT_ATTRIBUTE=$HAVE_FORMAT_ATTRIBUTE" >>Makefile.config
echo "mdefs[\"HAVE_FORMAT_ATTRIBUTE\"] = \"$HAVE_FORMAT_ATTRIBUTE\"" >>configure.lua
echo "#undef HAVE_FORMAT_ATTRIBUTE" >config/have_format_attribute.h
echo "hdefs[\"HAVE_FORMAT_ATTRIBUTE\"] = nil" >>configure.lua
fi;
rm -f $testdir/conftest conftest.c
echo -n "checking __nonnull__ attribute..."
echo -n "checking __nonnull__ attribute..." >> config.log
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
compile="ok"
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 ($?)" >> config.log
compile="failed"
fi
rm -f $testdir/conftest conftest.c
if [ "${compile}" = "ok" ]; then
echo "yes"
echo "yes" >> config.log
HAVE_NONNULL_ATTRIBUTE="yes"
echo "HAVE_NONNULL_ATTRIBUTE=$HAVE_NONNULL_ATTRIBUTE" >>Makefile.config
echo "mdefs[\"HAVE_NONNULL_ATTRIBUTE\"] = \"$HAVE_NONNULL_ATTRIBUTE\"" >>configure.lua
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 "HAVE_NONNULL_ATTRIBUTE=$HAVE_NONNULL_ATTRIBUTE" >>Makefile.config
echo "mdefs[\"HAVE_NONNULL_ATTRIBUTE\"] = \"$HAVE_NONNULL_ATTRIBUTE\"" >>configure.lua
echo "#undef HAVE_NONNULL_ATTRIBUTE" >config/have_nonnull_attribute.h
echo "hdefs[\"HAVE_NONNULL_ATTRIBUTE\"] = nil" >>configure.lua
fi;
echo -n "checking __aligned__ attribute..."
echo -n "checking __aligned__ attribute..." >> config.log
cat << EOT > conftest.c
int main(int argc, char *argv[])
{
struct s1 { int x,y,z; } __attribute__ ((aligned(16)));
return (0);
}
EOT
compile="ok"
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 ($?)" >> config.log
compile="failed"
fi
rm -f $testdir/conftest conftest.c
if [ "${compile}" = "ok" ]; then
echo "yes"
echo "yes" >> config.log
HAVE_ALIGNED_ATTRIBUTE="yes"
echo "HAVE_ALIGNED_ATTRIBUTE=$HAVE_ALIGNED_ATTRIBUTE" >>Makefile.config
echo "mdefs[\"HAVE_ALIGNED_ATTRIBUTE\"] = \"$HAVE_ALIGNED_ATTRIBUTE\"" >>configure.lua
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 "HAVE_ALIGNED_ATTRIBUTE=$HAVE_ALIGNED_ATTRIBUTE" >>Makefile.config
echo "mdefs[\"HAVE_ALIGNED_ATTRIBUTE\"] = \"$HAVE_ALIGNED_ATTRIBUTE\"" >>configure.lua
echo "#undef HAVE_ALIGNED_ATTRIBUTE" >config/have_aligned_attribute.h
echo "hdefs[\"HAVE_ALIGNED_ATTRIBUTE\"] = nil" >>configure.lua
fi;
echo -n "checking __packed__ attribute..."
echo -n "checking __packed__ attribute..." >> config.log
cat << EOT > conftest.c
int main(int argc, char *argv[])
{
struct s1 { char c; int x,y,z; } __attribute__ ((packed));
return (0);
}
EOT
compile="ok"
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 ($?)" >> config.log
compile="failed"
fi
rm -f $testdir/conftest conftest.c
if [ "${compile}" = "ok" ]; then
echo "yes"
echo "yes" >> config.log
HAVE_PACKED_ATTRIBUTE="yes"
echo "HAVE_PACKED_ATTRIBUTE=$HAVE_PACKED_ATTRIBUTE" >>Makefile.config
echo "mdefs[\"HAVE_PACKED_ATTRIBUTE\"] = \"$HAVE_PACKED_ATTRIBUTE\"" >>configure.lua
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 "HAVE_PACKED_ATTRIBUTE=$HAVE_PACKED_ATTRIBUTE" >>Makefile.config
echo "mdefs[\"HAVE_PACKED_ATTRIBUTE\"] = \"$HAVE_PACKED_ATTRIBUTE\"" >>configure.lua
echo "#undef HAVE_PACKED_ATTRIBUTE" >config/have_packed_attribute.h
echo "hdefs[\"HAVE_PACKED_ATTRIBUTE\"] = nil" >>configure.lua
fi;
echo -n "checking for long double..."
echo -n "checking for long double..." >> config.log
cat << EOT > conftest.c
int
main(int argc, char *argv[])
{
long double ld = 0.1;
ld = 0;
return (0);
}
EOT
compile="ok"
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 ($?)" >> config.log
compile="failed"
fi
rm -f $testdir/conftest conftest.c
if [ "${compile}" = "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;
echo -n "checking for long long..."
echo -n "checking for long long..." >> config.log
cat << EOT > conftest.c
int
main(int argc, char *argv[])
{
long long ll = 0.0;
unsigned long long ull = 0.0;
ll = 1.0;
ull = 1.0;
return (0);
}
EOT
compile="ok"
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 ($?)" >> config.log
compile="failed"
fi
rm -f $testdir/conftest conftest.c
if [ "${compile}" = "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;
echo -n "checking for cygwin environment..."
echo -n "checking for cygwin environment..." >> config.log
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
compile="ok"
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 ($?)" >> config.log
compile="failed"
fi
rm -f $testdir/conftest conftest.c
if [ "${compile}" = "ok" ]; then
echo "yes"
echo "yes" >> config.log
HAVE_CYGWIN="yes"
echo "HAVE_CYGWIN=$HAVE_CYGWIN" >>Makefile.config
echo "mdefs[\"HAVE_CYGWIN\"] = \"$HAVE_CYGWIN\"" >>configure.lua
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 "HAVE_CYGWIN=$HAVE_CYGWIN" >>Makefile.config
echo "mdefs[\"HAVE_CYGWIN\"] = \"$HAVE_CYGWIN\"" >>configure.lua
echo "#undef HAVE_CYGWIN" >config/have_cygwin.h
echo "hdefs[\"HAVE_CYGWIN\"] = nil" >>configure.lua
fi;
if [ "${compile}" = "ok" ]; then
if [ "${with_cygwin}" != "yes" ]; then
CFLAGS="$CFLAGS -mno-cygwin"
echo "CFLAGS=$CFLAGS" >> Makefile.config
fi
fi
echo -n "checking for a setproctitle() function..."
echo -n "checking for a setproctitle() function..." >> config.log
cat << EOT > conftest.c
#include
#include
#include
int
main(int argc, char *argv[])
{
setproctitle("foo %d", 1);
return (0);
}
EOT
compile="ok"
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 ($?)" >> config.log
compile="failed"
fi
rm -f $testdir/conftest conftest.c
if [ "${compile}" = "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;
if [ "${enable_warnings}" = "yes" ]
then
CFLAGS="$CFLAGS -Wall -Werror -Wmissing-prototypes"
echo "CFLAGS=$CFLAGS" >>Makefile.config
echo "mdefs[\"CFLAGS\"] = \"$CFLAGS\"" >>configure.lua
fi
if [ "${enable_debug}" = "yes" ]
then
CFLAGS="$CFLAGS -DDEBUG"
echo "CFLAGS=$CFLAGS" >>Makefile.config
echo "mdefs[\"CFLAGS\"] = \"$CFLAGS\"" >>configure.lua
fi
echo "Don't forget to run \"make depend\"."
echo "Don't forget to run \"make depend\"." >> config.log