#!/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 '# BSDBuild 3.2 ' > config.log
echo '# ex:syn=sh' >> config.log
echo '#!/bin/sh' >config.status
echo >>config.status
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
;;
--keep-conftest)
keep_conftest=yes
;;
--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
SH='sh'
for path in $PATH; do
if [ -x "${path}/sh" ]; then
SH="${path}/sh"
break
elif [ -e "${path}/sh.exe" ]; then
SH="${path}/sh.exe"
break
fi
done
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 ''
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 ' --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 ' --keep-conftest Preserve output files from last test'
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=STRING Use GNU libtool [path or "bundled"]'
echo ' --with-manlinks Add manual entries for every function [no]'
echo ' --with-manpages Generate Unix manual pages [yes]'
echo ''
echo 'Options specific to Vislak:'
echo ' --enable-debug General debugging [no]'
echo ' --enable-warnings Suggested compiler warnings [default: no]'
echo ' --with-agar[=PREFIX] Specify Agar location [default: auto-detect]'
echo ' --with-jpeg[=PREFIX] Specify libjpeg location [default: auto-detect]'
echo ' --with-alsa[=PREFIX] Specify ALSA location [default: auto-detect]'
echo ' --with-sndfile[=PREFIX] Specify libsndfile location [default: auto-detect]'
echo ' --with-portaudio[=PREFIX] Use portaudio library [check]'
echo ' --with-pthreads[=PREFIX] Specify libpthreads location [check]'
echo ''
echo 'Some influential environment variables:'
echo ' CC C compiler command'
echo ' CFLAGS C compiler flags'
echo ' CPP C preprocessor'
echo ' CPPFLAGS C preprocessor flags'
echo ' LDFLAGS C linker flags'
echo ' LIBS Libraries to link against'
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
host_machine=`echo ${host} | cut -d- -f 1`
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
if [ "${SUDO}" != "" ]; then
if [ -e "${PREFIX}" ]; then
bb_test_file="${PREFIX}/bsdbuild_test_file$$"
$ECHO_N "# checking the writeability of ${PREFIX}..." >>config.log
echo "echo 'Test' > '${bb_test_file}'" > conftest$$.sh
${SH} conftest$$.sh 2>/dev/null
if [ -e "${bb_test_file}" ]; then
rm -f "${bb_test_file}"
echo "yes (ignoring SUDO)" >>config.log
echo "SUDO=" >> Makefile.config
else
echo "no (honoring ${SUDO})" >>config.log
fi
rm -f conftest$$.sh
fi
fi
$ECHO_N 'env ' >>config.log
$ECHO_N 'env ' >>config.status
if [ "$CC" != "" ]; then
$ECHO_N 'CC="' >> config.log
$ECHO_N 'CC="' >> config.status
$ECHO_N "${CC}" >> config.log
$ECHO_N "${CC}" >> config.status
$ECHO_N '" ' >> config.log
$ECHO_N '" ' >> config.status
fi
if [ "$CFLAGS" != "" ]; then
$ECHO_N 'CFLAGS="' >> config.log
$ECHO_N 'CFLAGS="' >> config.status
$ECHO_N "${CFLAGS}" >> config.log
$ECHO_N "${CFLAGS}" >> config.status
$ECHO_N '" ' >> config.log
$ECHO_N '" ' >> config.status
fi
if [ "$CPP" != "" ]; then
$ECHO_N 'CPP="' >> config.log
$ECHO_N 'CPP="' >> config.status
$ECHO_N "${CPP}" >> config.log
$ECHO_N "${CPP}" >> config.status
$ECHO_N '" ' >> config.log
$ECHO_N '" ' >> config.status
fi
if [ "$CPPFLAGS" != "" ]; then
$ECHO_N 'CPPFLAGS="' >> config.log
$ECHO_N 'CPPFLAGS="' >> config.status
$ECHO_N "${CPPFLAGS}" >> config.log
$ECHO_N "${CPPFLAGS}" >> config.status
$ECHO_N '" ' >> config.log
$ECHO_N '" ' >> config.status
fi
if [ "$LDFLAGS" != "" ]; then
$ECHO_N 'LDFLAGS="' >> config.log
$ECHO_N 'LDFLAGS="' >> config.status
$ECHO_N "${LDFLAGS}" >> config.log
$ECHO_N "${LDFLAGS}" >> config.status
$ECHO_N '" ' >> config.log
$ECHO_N '" ' >> config.status
fi
if [ "$LIBS" != "" ]; then
$ECHO_N 'LIBS="' >> config.log
$ECHO_N 'LIBS="' >> config.status
$ECHO_N "${LIBS}" >> config.log
$ECHO_N "${LIBS}" >> config.status
$ECHO_N '" ' >> config.log
$ECHO_N '" ' >> config.status
fi
$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
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 "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 "hdefs[\"ENABLE_NLS\"] = \"$ENABLE_NLS\"" >>configure.lua
else
ENABLE_NLS="no"
HAVE_GETTEXT="no"
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 [ "${with_libtool}" = "yes" ]; then
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 "USE_LIBTOOL=Yes" >> Makefile.config
echo "LIBTOOL_BUNDLED=${LIBTOOL_BUNDLED}" >> Makefile.config
echo "LIBTOOL=${LIBTOOL}" >> Makefile.config
else
echo "USE_LIBTOOL=No" >> Makefile.config
fi
echo "PREFIX?=${PREFIX}" >> Makefile.config
echo "LDFLAGS?=${LDFLAGS}" >> Makefile.config
if [ "${PKGCONFIG}" != "" ]; then
case "${host}" in
*-*-freebsd* | *-*-dragonfly*)
PKGCONFIG_LIBDIR="\${PREFIX}/libdata/pkgconfig"
;;
*)
PKGCONFIG_LIBDIR="\${PREFIX}/lib/pkgconfig"
;;
esac
fi
echo "hdefs[\"PREFIX\"] = \"$PREFIX\"" >>configure.lua
if [ "${bindir}" != '' ]; then
BINDIR="${bindir}"
BINDIR_SPECIFIED='yes'
else
BINDIR="${PREFIX}/bin"
fi
echo "hdefs[\"BINDIR\"] = \"$BINDIR\"" >>configure.lua
if [ "${libdir}" != '' ]; then
LIBDIR="${libdir}"
LIBDIR_SPECIFIED='yes'
else
LIBDIR="${PREFIX}/lib"
fi
echo "hdefs[\"LIBDIR\"] = \"$LIBDIR\"" >>configure.lua
if [ "${moduledir}" != '' ]; then
MODULEDIR="${moduledir}"
MODULEDIR_SPECIFIED='yes'
else
MODULEDIR="${PREFIX}/lib"
fi
echo "hdefs[\"MODULEDIR\"] = \"$MODULEDIR\"" >>configure.lua
if [ "${libexecdir}" != '' ]; then
LIBEXECDIR="${libexecdir}"
LIBEXECDIR_SPECIFIED='yes'
else
LIBEXECDIR="${PREFIX}/libexec"
fi
echo "hdefs[\"LIBEXECDIR\"] = \"$LIBEXECDIR\"" >>configure.lua
if [ "${datadir}" != '' ]; then
DATADIR="${datadir}"
DATADIR_SPECIFIED='yes'
else
DATADIR="${PREFIX}/share"
fi
echo "hdefs[\"DATADIR\"] = \"$DATADIR\"" >>configure.lua
if [ "${statedir}" != '' ]; then
STATEDIR="${statedir}"
STATEDIR_SPECIFIED='yes'
else
STATEDIR="${PREFIX}/var"
fi
echo "hdefs[\"STATEDIR\"] = \"$STATEDIR\"" >>configure.lua
if [ "${sysconfdir}" != '' ]; then
SYSCONFDIR="${sysconfdir}"
SYSCONFDIR_SPECIFIED='yes'
else
SYSCONFDIR="${PREFIX}/etc"
fi
echo "hdefs[\"SYSCONFDIR\"] = \"$SYSCONFDIR\"" >>configure.lua
if [ "${localedir}" != '' ]; then
LOCALEDIR="${localedir}"
LOCALEDIR_SPECIFIED='yes'
else
LOCALEDIR="${DATADIR}/locale"
fi
echo "hdefs[\"LOCALEDIR\"] = \"$LOCALEDIR\"" >>configure.lua
if [ "${mandir}" != '' ]; then
MANDIR="${mandir}"
MANDIR_SPECIFIED='yes'
else
MANDIR="${PREFIX}/man"
fi
echo "hdefs[\"MANDIR\"] = \"$MANDIR\"" >>configure.lua
PACKAGE="Vislak"
echo "hdefs[\"PACKAGE\"] = \"$PACKAGE\"" >>configure.lua
VERSION="1.0-beta"
echo "hdefs[\"VERSION\"] = \"$VERSION\"" >>configure.lua
RELEASE="5l45H! 4TT4CK! 3NT3R! K3Y!"
echo "hdefs[\"RELEASE\"] = \"$RELEASE\"" >>configure.lua
CFLAGS="$CFLAGS -D_VS_INTERNAL"
CXXFLAGS="$CXXFLAGS -D_VS_INTERNAL"
CFLAGS="$CFLAGS -D_BSD_SOURCE"
CXXFLAGS="$CXXFLAGS -D_BSD_SOURCE"
CFLAGS="$CFLAGS -D_USE_AGAR_CORE"
CXXFLAGS="$CXXFLAGS -D_USE_AGAR_CORE"
CFLAGS="$CFLAGS -D_USE_AGAR_QUEUE"
CXXFLAGS="$CXXFLAGS -D_USE_AGAR_QUEUE"
CFLAGS="$CFLAGS -D_USE_AGAR_STD"
CXXFLAGS="$CXXFLAGS -D_USE_AGAR_STD"
CFLAGS="$CFLAGS -D_USE_AGAR_TYPES"
CXXFLAGS="$CXXFLAGS -D_USE_AGAR_TYPES"
CFLAGS="$CFLAGS -D_USE_AGAR_GUI"
CXXFLAGS="$CXXFLAGS -D_USE_AGAR_GUI"
$ECHO_N 'checking for a C compiler...'
$ECHO_N '# checking for a C compiler...' >>config.log
# BEGIN cc
if [ "$CROSS_COMPILING" = "yes" ]; then
CROSSPFX="${host}-"
else
CROSSPFX=""
fi
HAVE_CC65="no"
if [ "$CC" = "" ]; then
case "${host}" in
apple2 | apple2enh | atari | atmos | c16 | c64 | c128 | cbm510 | cbm610 | geos | lunix | lynx | nes | pet | plus4 | supervision | vic20)
bb_save_IFS=$IFS
IFS=$PATH_SEPARATOR
for i in $PATH; do
if [ -x "${i}/cc65" ]; then
CC="${i}/cc65"
HAVE_CC65="yes"
CROSS_COMPILING="yes"
break
elif [ -x "${i}/cc65.exe" ]; then
CC="${i}/cc65.exe"
HAVE_CC65="yes"
CROSS_COMPILING="yes"
break
fi
done
IFS=$bb_save_IFS
;;
*)
bb_save_IFS=$IFS
IFS=$PATH_SEPARATOR
for i in $PATH; do
if [ -x "${i}/${CROSSPFX}clang" ]; then
CC="${i}/${CROSSPFX}clang"
break
elif [ -x "${i}/${CROSSPFX}clang70" ]; then
CC="${i}/${CROSSPFX}clang70"
break
elif [ -x "${i}/${CROSSPFX}clang60" ]; then
CC="${i}/${CROSSPFX}clang60"
break
elif [ -x "${i}/${CROSSPFX}cc" ]; then
CC="${i}/${CROSSPFX}cc"
break
elif [ -x "${i}/${CROSSPFX}gcc" ]; then
CC="${i}/${CROSSPFX}gcc"
break
elif [ -x "${i}/${CROSSPFX}gcc-6" ]; then
CC="${i}/${CROSSPFX}gcc-6"
break
elif [ -x "${i}/${CROSSPFX}gcc7" ]; then
CC="${i}/${CROSSPFX}gcc7"
break
elif [ -x "${i}/${CROSSPFX}gcc8" ]; then
CC="${i}/${CROSSPFX}gcc8"
break
elif [ -x "${i}/${CROSSPFX}gcc5" ]; then
CC="${i}/${CROSSPFX}gcc5"
break
elif [ -x "${i}/${CROSSPFX}gcc49" ]; then
CC="${i}/${CROSSPFX}gcc49"
break
elif [ -x "${i}/${CROSSPFX}gcc48" ]; then
CC="${i}/${CROSSPFX}gcc48"
break
elif [ -x "${i}/${CROSSPFX}clang.exe" ]; then
CC="${i}/${CROSSPFX}clang.exe"
break
elif [ -x "${i}/${CROSSPFX}cc.exe" ]; then
CC="${i}/${CROSSPFX}cc.exe"
break
elif [ -x "${i}/${CROSSPFX}gcc.exe" ]; then
CC="${i}/${CROSSPFX}gcc.exe"
break
fi
done
IFS=$bb_save_IFS
;;
esac
if [ "$CC" = '' ]; then
if [ "$HAVE_CC65" = "yes" ]; then
echo "*"
echo "* Cannot find cc65 in PATH. You may need to set CC."
echo "* You can download cc65 from: https://www.cc65.org/."
echo "*"
echo "Cannot find cc65 in PATH." >>config.log
else
echo "*"
echo "* Cannot find one of clang, clang70, clang60, cc, gcc, gcc-6, gcc7, gcc8, gcc5, gcc49, gcc48, clang.exe, cc.exe, gcc.exe"
echo "* under the current PATH, which is:"
echo "* $PATH"
echo "*"
echo "* You may need to set the CC environment variable."
echo "*"
echo "Cannot find C compiler in PATH." >>config.log
fi
HAVE_CC="no"
echo "no"
echo "no" >>config.log
else
HAVE_CC="yes"
echo "yes, ${CC}"
echo "yes, ${CC}" >>config.log
fi
else
HAVE_CC="yes"
if ${CC} -V 2>&1 |grep -q ^cc65; then
echo "using cc65 (${CC})"
echo "using cc65 (${CC})" >>config.log
HAVE_CC65="yes"
CROSS_COMPILING="yes"
else
echo "using ${CC}"
echo "using ${CC}" >>config.log
fi
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, compilation 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 "hdefs[\"EXECSUFFIX\"] = \"$EXECSUFFIX\"" >>configure.lua
else
echo "yes"
echo "yes" >>config.log
fi
fi
if [ "${keep_conftest}" != "yes" ]; then
rm -f conftest.c conftest$EXECSUFFIX
fi
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 >>config.log
echo '# C: HAVE_CC_WARNINGS' >>config.log
echo "cat << EOT >conftest$$.c" >>config.log
cat conftest$$.c>>config.log
echo EOT >>config.log
echo "$CC $CFLAGS $TEST_CFLAGS -Wall -o $testdir/conftest$$ conftest$$.c 2>>config.log">>config.log
$CC $CFLAGS $TEST_CFLAGS -Wall -o $testdir/conftest$$ conftest$$.c 2>>config.log
if [ "$?" != "0" ]; then
echo "# failed $?" >>config.log
MK_COMPILE_STATUS="FAIL $?"
fi
if [ "${MK_COMPILE_STATUS}" = "OK" ]; then
echo 'yes'
echo '# yes' >>config.log
HAVE_CC_WARNINGS=yes
echo "hdefs[\"HAVE_CC_WARNINGS\"] = \"$HAVE_CC_WARNINGS\"" >>configure.lua
else
echo 'no'
echo '# no' >>config.log
HAVE_CC_WARNINGS=no
echo 'hdefs["HAVE_CC_WARNINGS"] = nil' >>configure.lua
fi
if [ "${keep_conftest}" != "yes" ]; then
rm -f conftest$$.c $testdir/conftest$$$EXECSUFFIX
fi
if [ "${HAVE_CC_WARNINGS}" = "yes" ]; then
TEST_CFLAGS="-Wall"
fi
$ECHO_N 'cc: checking for float and double...'
$ECHO_N '# cc: checking for float and double...' >>config.log
MK_COMPILE_STATUS=OK
cat << EOT >conftest$$.c
#include
int
main(int argc, char *argv[])
{
float f = 0.1f;
double d = 0.2;
printf("%f", f);
return ((double)f + d) > 0.2 ? 1 : 0;
}
EOT
echo >>config.log
echo '# C: HAVE_FLOAT' >>config.log
echo "cat << EOT >conftest$$.c" >>config.log
cat conftest$$.c>>config.log
echo EOT >>config.log
echo "$CC $CFLAGS $TEST_CFLAGS -o $testdir/conftest$$ conftest$$.c 2>>config.log">>config.log
$CC $CFLAGS $TEST_CFLAGS -o $testdir/conftest$$ conftest$$.c 2>>config.log
if [ "$?" != "0" ]; then
echo "# failed $?" >>config.log
MK_COMPILE_STATUS="FAIL $?"
fi
if [ "${MK_COMPILE_STATUS}" = "OK" ]; then
echo 'yes'
echo '# yes' >>config.log
HAVE_FLOAT=yes
echo "hdefs[\"HAVE_FLOAT\"] = \"$HAVE_FLOAT\"" >>configure.lua
else
echo 'no'
echo '# no' >>config.log
HAVE_FLOAT=no
echo 'hdefs["HAVE_FLOAT"] = nil' >>configure.lua
fi
if [ "${keep_conftest}" != "yes" ]; then
rm -f conftest$$.c $testdir/conftest$$$EXECSUFFIX
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 + 0.1) > 0.2 ? 1 : 0;
}
EOT
echo >>config.log
echo '# C: HAVE_LONG_DOUBLE' >>config.log
echo "cat << EOT >conftest$$.c" >>config.log
cat conftest$$.c>>config.log
echo EOT >>config.log
echo "$CC $CFLAGS $TEST_CFLAGS -o $testdir/conftest$$ conftest$$.c 2>>config.log">>config.log
$CC $CFLAGS $TEST_CFLAGS -o $testdir/conftest$$ conftest$$.c 2>>config.log
if [ "$?" != "0" ]; then
echo "# failed $?" >>config.log
MK_COMPILE_STATUS="FAIL $?"
fi
if [ "${MK_COMPILE_STATUS}" = "OK" ]; then
echo 'yes'
echo '# yes' >>config.log
HAVE_LONG_DOUBLE=yes
echo "hdefs[\"HAVE_LONG_DOUBLE\"] = \"$HAVE_LONG_DOUBLE\"" >>configure.lua
else
echo 'no'
echo '# no' >>config.log
HAVE_LONG_DOUBLE=no
echo 'hdefs["HAVE_LONG_DOUBLE"] = nil' >>configure.lua
fi
if [ "${keep_conftest}" != "yes" ]; then
rm -f conftest$$.c $testdir/conftest$$$EXECSUFFIX
fi
$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 >>config.log
echo '# C: HAVE_LONG_LONG' >>config.log
echo "cat << EOT >conftest$$.c" >>config.log
cat conftest$$.c>>config.log
echo EOT >>config.log
echo "$CC $CFLAGS $TEST_CFLAGS -o $testdir/conftest$$ conftest$$.c 2>>config.log">>config.log
$CC $CFLAGS $TEST_CFLAGS -o $testdir/conftest$$ conftest$$.c 2>>config.log
if [ "$?" != "0" ]; then
echo "# failed $?" >>config.log
MK_COMPILE_STATUS="FAIL $?"
fi
if [ "${MK_COMPILE_STATUS}" = "OK" ]; then
echo 'yes'
echo '# yes' >>config.log
HAVE_LONG_LONG=yes
echo "hdefs[\"HAVE_LONG_LONG\"] = \"$HAVE_LONG_LONG\"" >>configure.lua
else
echo 'no'
echo '# no' >>config.log
HAVE_LONG_LONG=no
echo 'hdefs["HAVE_LONG_LONG"] = nil' >>configure.lua
fi
if [ "${keep_conftest}" != "yes" ]; then
rm -f conftest$$.c $testdir/conftest$$$EXECSUFFIX
fi
$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 >>config.log
echo '# C: HAVE_CYGWIN' >>config.log
echo "cat << EOT >conftest$$.c" >>config.log
cat conftest$$.c>>config.log
echo EOT >>config.log
echo "$CC $CFLAGS $TEST_CFLAGS -mcygwin -o $testdir/conftest$$ conftest$$.c 2>>config.log">>config.log
$CC $CFLAGS $TEST_CFLAGS -mcygwin -o $testdir/conftest$$ conftest$$.c 2>>config.log
if [ "$?" != "0" ]; then
echo "# failed $?" >>config.log
MK_COMPILE_STATUS="FAIL $?"
fi
if [ "${MK_COMPILE_STATUS}" = "OK" ]; then
echo 'yes'
echo '# yes' >>config.log
HAVE_CYGWIN=yes
echo "hdefs[\"HAVE_CYGWIN\"] = \"$HAVE_CYGWIN\"" >>configure.lua
else
echo 'no'
echo '# no' >>config.log
HAVE_CYGWIN=no
echo 'hdefs["HAVE_CYGWIN"] = nil' >>configure.lua
fi
if [ "${keep_conftest}" != "yes" ]; then
rm -f conftest$$.c $testdir/conftest$$$EXECSUFFIX
fi
$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 >>config.log
echo '# C: HAVE_CC_MWINDOWS' >>config.log
echo "cat << EOT >conftest$$.c" >>config.log
cat conftest$$.c>>config.log
echo EOT >>config.log
echo "$CC $CFLAGS $TEST_CFLAGS -mwindows -o $testdir/conftest$$ conftest$$.c 2>>config.log">>config.log
$CC $CFLAGS $TEST_CFLAGS -mwindows -o $testdir/conftest$$ conftest$$.c 2>>config.log
if [ "$?" != "0" ]; then
echo "# failed $?" >>config.log
MK_COMPILE_STATUS="FAIL $?"
fi
if [ "${MK_COMPILE_STATUS}" = "OK" ]; then
echo 'yes'
echo '# yes' >>config.log
HAVE_CC_MWINDOWS=yes
echo "hdefs[\"HAVE_CC_MWINDOWS\"] = \"$HAVE_CC_MWINDOWS\"" >>configure.lua
else
echo 'no'
echo '# no' >>config.log
HAVE_CC_MWINDOWS=no
echo 'hdefs["HAVE_CC_MWINDOWS"] = nil' >>configure.lua
fi
if [ "${keep_conftest}" != "yes" ]; then
rm -f conftest$$.c $testdir/conftest$$$EXECSUFFIX
fi
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 >>config.log
echo '# C: HAVE_CC_MCONSOLE' >>config.log
echo "cat << EOT >conftest$$.c" >>config.log
cat conftest$$.c>>config.log
echo EOT >>config.log
echo "$CC $CFLAGS $TEST_CFLAGS -mconsole -o $testdir/conftest$$ conftest$$.c 2>>config.log">>config.log
$CC $CFLAGS $TEST_CFLAGS -mconsole -o $testdir/conftest$$ conftest$$.c 2>>config.log
if [ "$?" != "0" ]; then
echo "# failed $?" >>config.log
MK_COMPILE_STATUS="FAIL $?"
fi
if [ "${MK_COMPILE_STATUS}" = "OK" ]; then
echo 'yes'
echo '# yes' >>config.log
HAVE_CC_MCONSOLE=yes
echo "hdefs[\"HAVE_CC_MCONSOLE\"] = \"$HAVE_CC_MCONSOLE\"" >>configure.lua
else
echo 'no'
echo '# no' >>config.log
HAVE_CC_MCONSOLE=no
echo 'hdefs["HAVE_CC_MCONSOLE"] = nil' >>configure.lua
fi
if [ "${keep_conftest}" != "yes" ]; then
rm -f conftest$$.c $testdir/conftest$$$EXECSUFFIX
fi
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 >>config.log
echo '# C: HAVE_LD_NO_UNDEFINED' >>config.log
echo "cat << EOT >conftest$$.c" >>config.log
cat conftest$$.c>>config.log
echo EOT >>config.log
echo "$CC $CFLAGS $TEST_CFLAGS -Wl,--no-undefined -o $testdir/conftest$$ conftest$$.c 2>>config.log">>config.log
$CC $CFLAGS $TEST_CFLAGS -Wl,--no-undefined -o $testdir/conftest$$ conftest$$.c 2>>config.log
if [ "$?" != "0" ]; then
echo "# failed $?" >>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 "hdefs[\"HAVE_LD_NO_UNDEFINED\"] = \"$HAVE_LD_NO_UNDEFINED\"" >>configure.lua
else
echo 'no'
echo '# no' >>config.log
HAVE_LD_NO_UNDEFINED=no
echo 'hdefs["HAVE_LD_NO_UNDEFINED"] = nil' >>configure.lua
fi
if [ "${keep_conftest}" != "yes" ]; then
rm -f conftest$$.c $testdir/conftest$$$EXECSUFFIX
fi
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 >>config.log
echo '# C: HAVE_LD_STATIC_LIBGCC' >>config.log
echo "cat << EOT >conftest$$.c" >>config.log
cat conftest$$.c>>config.log
echo EOT >>config.log
echo "$CC $CFLAGS $TEST_CFLAGS -static-libgcc -o $testdir/conftest$$ conftest$$.c 2>>config.log">>config.log
$CC $CFLAGS $TEST_CFLAGS -static-libgcc -o $testdir/conftest$$ conftest$$.c 2>>config.log
if [ "$?" != "0" ]; then
echo "# failed $?" >>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 "hdefs[\"HAVE_LD_STATIC_LIBGCC\"] = \"$HAVE_LD_STATIC_LIBGCC\"" >>configure.lua
else
echo 'no'
echo '# no' >>config.log
HAVE_LD_STATIC_LIBGCC=no
echo 'hdefs["HAVE_LD_STATIC_LIBGCC"] = nil' >>configure.lua
fi
if [ "${keep_conftest}" != "yes" ]; then
rm -f conftest$$.c $testdir/conftest$$$EXECSUFFIX
fi
if [ "${HAVE_LD_STATIC_LIBGCC}" = "yes" ]; then
LIBTOOLOPTS_SHARED="${LIBTOOLOPTS_SHARED} -XCClinker -static-libgcc"
fi
;;
esac
echo "hdefs[\"HAVE_CC\"] = \"$HAVE_CC\"" >>configure.lua
if [ "${HAVE_CC65}" = "yes" ]; then
CC_COMPILE=""
echo "hdefs[\"HAVE_CC65\"] = \"$HAVE_CC65\"" >>configure.lua
else
CC_COMPILE="-c"
echo 'hdefs["HAVE_CC65"] = nil' >>configure.lua
fi
else
HAVE_CC="no"
HAVE_CC65="no"
HAVE_CC_WARNINGS="no"
PROG_GUI_FLAGS=""
PROG_CLI_FLAGS=""
LIBTOOLOPTS_SHARED=""
TEST_CFLAGS=""
echo 'hdefs["HAVE_CC"] = nil' >>configure.lua
echo 'hdefs["HAVE_CC65"] = nil' >>configure.lua
echo 'hdefs["HAVE_CC_WARNINGS"] = nil' >>configure.lua
echo 'hdefs["HAVE_FLOAT"] = nil' >>configure.lua
echo 'hdefs["HAVE_LONG_DOUBLE"] = nil' >>configure.lua
echo 'hdefs["HAVE_LONG_LONG"] = nil' >>configure.lua
echo 'hdefs["HAVE_CYGWIN"] = nil' >>configure.lua
echo 'hdefs["HAVE_CC_MWINDOWS"] = nil' >>configure.lua
echo 'hdefs["HAVE_CC_MCONSOLE"] = nil' >>configure.lua
echo 'hdefs["HAVE_LD_NO_UNDEFINED"] = nil' >>configure.lua
echo 'hdefs["HAVE_LD_STATIC_LIBGCC"] = nil' >>configure.lua
fi
# END cc
if [ "${HAVE_CC}" != "yes" ]; then
echo '* '
echo '# * ' >>config.log
echo '* This software requires a C compiler'
echo '# * This software requires a C compiler' >>config.log
echo '* '
echo '# * ' >>config.log
echo "***"
echo "*** ERROR: Required dependency cc not found"
echo "*** Failed! See ./config.log for more details."
echo "***"
exit 1
fi
$ECHO_N 'checking for Agar...'
$ECHO_N '# checking for Agar...' >>config.log
# BEGIN agar(1.4.1 ${prefix_agar})
AGAR_VERSION=
if [ "${prefix_agar}" != "" ]; then
if [ -e "${prefix_agar}/bin/agar-config" ]; then
AGAR_VERSION=`${prefix_agar}/bin/agar-config --version`
MK_EXEC_FOUND=Yes
MK_EXEC_PATH="${prefix_agar}/bin/agar-config"
fi
else
bb_save_IFS=$IFS
IFS=$PATH_SEPARATOR
for path in $PATH; do
if [ -e "${path}/agar-config" ]; then
AGAR_VERSION=`${path}/agar-config --version`
MK_EXEC_FOUND=Yes
MK_EXEC_PATH="${path}/agar-config"
break
elif [ -e "${path}/agar-config.exe" ]; then
AGAR_VERSION=`${path}/agar-config.exe --version`
MK_EXEC_FOUND=Yes
MK_EXEC_PATH="${path}/agar-config.exe"
break
fi
done
IFS=$bb_save_IFS
fi
if [ "${AGAR_VERSION}" != "" ]; then
if [ "${prefix_agar}" != "" ]; then
echo "yes ($AGAR_VERSION in ${prefix_agar})"
echo "# yes ($AGAR_VERSION in ${prefix_agar})" >>config.log
else
echo "yes ($AGAR_VERSION)"
echo "# yes ($AGAR_VERSION)" >>config.log
fi
MK_VERSION_MAJOR=`echo "$AGAR_VERSION" |sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\).*/\1/'`;
MK_VERSION_MINOR=`echo "$AGAR_VERSION" |sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\).*/\2/'`;
MK_VERSION_MICRO=`echo "$AGAR_VERSION" |sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\).*/\3/'`;
MK_VERSION_OK=no
if [ $MK_VERSION_MAJOR -gt 1 ]; then
MK_VERSION_OK=yes
elif [ $MK_VERSION_MAJOR -eq 1 ]; then
if [ "$MK_VERSION_MINOR" = '' ]; then
MK_VERSION_OK=yes
else
if [ $MK_VERSION_MINOR -gt 4 ]; then
MK_VERSION_OK=yes
elif [ $MK_VERSION_MINOR -eq 4 ]; then
if [ "$MK_VERSION_MICRO" = '' ]; then
MK_VERSION_OK=yes
else
if [ $MK_VERSION_MICRO -ge 1 ]; then
MK_VERSION_OK=yes
fi
fi
fi
fi
fi
if [ "${MK_VERSION_OK}" = "no" ]; then
echo '*'
echo '# *' >>config.log
echo "* Minimum required version is 1.4.1 (found $AGAR_VERSION)"
echo "# * Minimum required version is 1.4.1 (found $AGAR_VERSION)" >>config.log
echo '*'
echo '# *' >>config.log
fi
else
if [ "${prefix_agar}" != "" ]; then
echo "no (not in ${prefix_agar})"
echo "# no (not in ${prefix_agar})" >>config.log
else
echo 'no'
echo '# no' >>config.log
fi
MK_VERSION_OK="no"
fi
if [ "${MK_VERSION_OK}" = "yes" ]; then
$ECHO_N 'checking whether Agar works...'
$ECHO_N '# checking whether Agar works...' >>config.log
AGAR_CFLAGS=
if [ "${prefix_agar}" != "" ]; then
if [ -e "${prefix_agar}/bin/agar-config" ]; then
AGAR_CFLAGS=`${prefix_agar}/bin/agar-config --cflags`
MK_EXEC_FOUND=Yes
MK_EXEC_PATH="${prefix_agar}/bin/agar-config"
fi
else
bb_save_IFS=$IFS
IFS=$PATH_SEPARATOR
for path in $PATH; do
if [ -e "${path}/agar-config" ]; then
AGAR_CFLAGS=`${path}/agar-config --cflags`
MK_EXEC_FOUND=Yes
MK_EXEC_PATH="${path}/agar-config"
break
elif [ -e "${path}/agar-config.exe" ]; then
AGAR_CFLAGS=`${path}/agar-config.exe --cflags`
MK_EXEC_FOUND=Yes
MK_EXEC_PATH="${path}/agar-config.exe"
break
fi
done
IFS=$bb_save_IFS
fi
AGAR_LIBS=
if [ "${prefix_agar}" != "" ]; then
if [ -e "${prefix_agar}/bin/agar-config" ]; then
AGAR_LIBS=`${prefix_agar}/bin/agar-config --libs`
MK_EXEC_FOUND=Yes
MK_EXEC_PATH="${prefix_agar}/bin/agar-config"
fi
else
bb_save_IFS=$IFS
IFS=$PATH_SEPARATOR
for path in $PATH; do
if [ -e "${path}/agar-config" ]; then
AGAR_LIBS=`${path}/agar-config --libs`
MK_EXEC_FOUND=Yes
MK_EXEC_PATH="${path}/agar-config"
break
elif [ -e "${path}/agar-config.exe" ]; then
AGAR_LIBS=`${path}/agar-config.exe --libs`
MK_EXEC_FOUND=Yes
MK_EXEC_PATH="${path}/agar-config.exe"
break
fi
done
IFS=$bb_save_IFS
fi
MK_COMPILE_STATUS=OK
cat << EOT >conftest$$.c
#include
#include
int
main(int argc, char *argv[])
{
AG_InitCore("conf-test", 0);
AG_InitGraphics(AG_NULL);
#ifdef AG_EVENT_LOOP
AG_EventLoop();
#endif
AG_Quit();
return (0);
}
EOT
echo >>config.log
echo '# C: HAVE_AGAR' >>config.log
echo "cat << EOT >conftest$$.c" >>config.log
cat conftest$$.c>>config.log
echo EOT >>config.log
echo "$CC $CFLAGS $TEST_CFLAGS ${AGAR_CFLAGS} -o $testdir/conftest$$ conftest$$.c ${AGAR_LIBS} 2>>config.log">>config.log
$CC $CFLAGS $TEST_CFLAGS ${AGAR_CFLAGS} -o $testdir/conftest$$ conftest$$.c ${AGAR_LIBS} 2>>config.log
if [ "$?" != "0" ]; then
echo "# failed $?" >>config.log
MK_COMPILE_STATUS="FAIL $?"
fi
if [ "${MK_COMPILE_STATUS}" = "OK" ]; then
echo 'yes'
echo '# yes' >>config.log
HAVE_AGAR=yes
echo "hdefs[\"HAVE_AGAR\"] = \"$HAVE_AGAR\"" >>configure.lua
else
echo 'no'
echo '# no' >>config.log
HAVE_AGAR=no
echo 'hdefs["HAVE_AGAR"] = nil' >>configure.lua
fi
if [ "${keep_conftest}" != "yes" ]; then
rm -f conftest$$.c $testdir/conftest$$$EXECSUFFIX
fi
if [ "${HAVE_AGAR}" = "yes" ]; then
echo "hdefs[\"AGAR_CFLAGS\"] = \"$AGAR_CFLAGS\"" >>configure.lua
echo "hdefs[\"AGAR_LIBS\"] = \"$AGAR_LIBS\"" >>configure.lua
else
echo 'hdefs["AGAR_CFLAGS"] = nil' >>configure.lua
AGAR_CFLAGS=""
echo 'hdefs["AGAR_LIBS"] = nil' >>configure.lua
AGAR_LIBS=""
fi
else
HAVE_AGAR="no"
AGAR_CFLAGS=""
AGAR_LIBS=""
echo 'hdefs["HAVE_AGAR"] = nil' >>configure.lua
echo 'hdefs["AGAR_CFLAGS"] = nil' >>configure.lua
echo 'hdefs["AGAR_LIBS"] = nil' >>configure.lua
fi
# END agar
if [ "${HAVE_AGAR}" != "yes" ]; then
echo '* '
echo '# * ' >>config.log
echo "* $PACKAGE requires Agar (version 1.4.1 or newer)."
echo "# * $PACKAGE requires Agar (version 1.4.1 or newer)." >>config.log
echo '* WWW: http://libagar.org'
echo '# * WWW: http://libagar.org' >>config.log
echo '* '
echo '# * ' >>config.log
echo "***"
echo "*** ERROR: Required dependency agar not found"
echo "*** Failed! See ./config.log for more details."
echo "***"
exit 1
fi
if [ "${MK_VERSION_OK}" != "yes" ]; then
echo '* '
echo '# * ' >>config.log
echo '* This software requires agar version >= 1.4.1,'
echo '# * This software requires agar version >= 1.4.1,' >>config.log
echo '* please update that package and try again.'
echo '# * please update that package and try again.' >>config.log
echo '* WWW: http://libagar.org'
echo '# * WWW: http://libagar.org' >>config.log
echo '* '
echo '# * ' >>config.log
echo "***"
echo "*** ERROR: Required dependency agar version mismatch"
echo "*** Failed! See ./config.log for more details."
echo "***"
exit 1
fi
$ECHO_N 'checking for Agar-Math...'
$ECHO_N '# checking for Agar-Math...' >>config.log
# BEGIN agar-math(1.4.1 ${prefix_agar})
AGAR_MATH_VERSION=
if [ "${prefix_agar}" != "" ]; then
if [ -e "${prefix_agar}/bin/agar-math-config" ]; then
AGAR_MATH_VERSION=`${prefix_agar}/bin/agar-math-config --version`
MK_EXEC_FOUND=Yes
MK_EXEC_PATH="${prefix_agar}/bin/agar-math-config"
fi
else
bb_save_IFS=$IFS
IFS=$PATH_SEPARATOR
for path in $PATH; do
if [ -e "${path}/agar-math-config" ]; then
AGAR_MATH_VERSION=`${path}/agar-math-config --version`
MK_EXEC_FOUND=Yes
MK_EXEC_PATH="${path}/agar-math-config"
break
elif [ -e "${path}/agar-math-config.exe" ]; then
AGAR_MATH_VERSION=`${path}/agar-math-config.exe --version`
MK_EXEC_FOUND=Yes
MK_EXEC_PATH="${path}/agar-math-config.exe"
break
fi
done
IFS=$bb_save_IFS
fi
if [ "${AGAR_MATH_VERSION}" != "" ]; then
if [ "${prefix_agar}" != "" ]; then
echo "yes ($AGAR_MATH_VERSION in ${prefix_agar})"
echo "# yes ($AGAR_MATH_VERSION in ${prefix_agar})" >>config.log
else
echo "yes ($AGAR_MATH_VERSION)"
echo "# yes ($AGAR_MATH_VERSION)" >>config.log
fi
MK_VERSION_MAJOR=`echo "$AGAR_MATH_VERSION" |sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\).*/\1/'`;
MK_VERSION_MINOR=`echo "$AGAR_MATH_VERSION" |sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\).*/\2/'`;
MK_VERSION_MICRO=`echo "$AGAR_MATH_VERSION" |sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\).*/\3/'`;
MK_VERSION_OK=no
if [ $MK_VERSION_MAJOR -gt 1 ]; then
MK_VERSION_OK=yes
elif [ $MK_VERSION_MAJOR -eq 1 ]; then
if [ "$MK_VERSION_MINOR" = '' ]; then
MK_VERSION_OK=yes
else
if [ $MK_VERSION_MINOR -gt 4 ]; then
MK_VERSION_OK=yes
elif [ $MK_VERSION_MINOR -eq 4 ]; then
if [ "$MK_VERSION_MICRO" = '' ]; then
MK_VERSION_OK=yes
else
if [ $MK_VERSION_MICRO -ge 1 ]; then
MK_VERSION_OK=yes
fi
fi
fi
fi
fi
if [ "${MK_VERSION_OK}" = "no" ]; then
echo '*'
echo '# *' >>config.log
echo "* Minimum required version is 1.4.1 (found $AGAR_MATH_VERSION)"
echo "# * Minimum required version is 1.4.1 (found $AGAR_MATH_VERSION)" >>config.log
echo '*'
echo '# *' >>config.log
fi
else
if [ "${prefix_agar}" != "" ]; then
echo "no (not in ${prefix_agar})"
echo "# no (not in ${prefix_agar})" >>config.log
else
echo 'no'
echo '# no' >>config.log
fi
MK_VERSION_OK="no"
fi
if [ "${MK_VERSION_OK}" = "yes" ]; then
$ECHO_N 'checking whether Agar-Math works...'
$ECHO_N '# checking whether Agar-Math works...' >>config.log
AGAR_CFLAGS=
if [ "${prefix_agar}" != "" ]; then
if [ -e "${prefix_agar}/bin/agar-config" ]; then
AGAR_CFLAGS=`${prefix_agar}/bin/agar-config --cflags`
MK_EXEC_FOUND=Yes
MK_EXEC_PATH="${prefix_agar}/bin/agar-config"
fi
else
bb_save_IFS=$IFS
IFS=$PATH_SEPARATOR
for path in $PATH; do
if [ -e "${path}/agar-config" ]; then
AGAR_CFLAGS=`${path}/agar-config --cflags`
MK_EXEC_FOUND=Yes
MK_EXEC_PATH="${path}/agar-config"
break
elif [ -e "${path}/agar-config.exe" ]; then
AGAR_CFLAGS=`${path}/agar-config.exe --cflags`
MK_EXEC_FOUND=Yes
MK_EXEC_PATH="${path}/agar-config.exe"
break
fi
done
IFS=$bb_save_IFS
fi
AGAR_LIBS=
if [ "${prefix_agar}" != "" ]; then
if [ -e "${prefix_agar}/bin/agar-config" ]; then
AGAR_LIBS=`${prefix_agar}/bin/agar-config --libs`
MK_EXEC_FOUND=Yes
MK_EXEC_PATH="${prefix_agar}/bin/agar-config"
fi
else
bb_save_IFS=$IFS
IFS=$PATH_SEPARATOR
for path in $PATH; do
if [ -e "${path}/agar-config" ]; then
AGAR_LIBS=`${path}/agar-config --libs`
MK_EXEC_FOUND=Yes
MK_EXEC_PATH="${path}/agar-config"
break
elif [ -e "${path}/agar-config.exe" ]; then
AGAR_LIBS=`${path}/agar-config.exe --libs`
MK_EXEC_FOUND=Yes
MK_EXEC_PATH="${path}/agar-config.exe"
break
fi
done
IFS=$bb_save_IFS
fi
AGAR_MATH_CFLAGS=
if [ "${prefix_agar}" != "" ]; then
if [ -e "${prefix_agar}/bin/agar-math-config" ]; then
AGAR_MATH_CFLAGS=`${prefix_agar}/bin/agar-math-config --cflags`
MK_EXEC_FOUND=Yes
MK_EXEC_PATH="${prefix_agar}/bin/agar-math-config"
fi
else
bb_save_IFS=$IFS
IFS=$PATH_SEPARATOR
for path in $PATH; do
if [ -e "${path}/agar-math-config" ]; then
AGAR_MATH_CFLAGS=`${path}/agar-math-config --cflags`
MK_EXEC_FOUND=Yes
MK_EXEC_PATH="${path}/agar-math-config"
break
elif [ -e "${path}/agar-math-config.exe" ]; then
AGAR_MATH_CFLAGS=`${path}/agar-math-config.exe --cflags`
MK_EXEC_FOUND=Yes
MK_EXEC_PATH="${path}/agar-math-config.exe"
break
fi
done
IFS=$bb_save_IFS
fi
AGAR_MATH_LIBS=
if [ "${prefix_agar}" != "" ]; then
if [ -e "${prefix_agar}/bin/agar-math-config" ]; then
AGAR_MATH_LIBS=`${prefix_agar}/bin/agar-math-config --libs`
MK_EXEC_FOUND=Yes
MK_EXEC_PATH="${prefix_agar}/bin/agar-math-config"
fi
else
bb_save_IFS=$IFS
IFS=$PATH_SEPARATOR
for path in $PATH; do
if [ -e "${path}/agar-math-config" ]; then
AGAR_MATH_LIBS=`${path}/agar-math-config --libs`
MK_EXEC_FOUND=Yes
MK_EXEC_PATH="${path}/agar-math-config"
break
elif [ -e "${path}/agar-math-config.exe" ]; then
AGAR_MATH_LIBS=`${path}/agar-math-config.exe --libs`
MK_EXEC_FOUND=Yes
MK_EXEC_PATH="${path}/agar-math-config.exe"
break
fi
done
IFS=$bb_save_IFS
fi
MK_COMPILE_STATUS=OK
cat << EOT >conftest$$.c
#include
#include
int main(int argc, char *argv[]) {
M_Matrix *A = M_New(2,2);
AG_InitCore("test", 0);
M_InitSubsystem();
M_SetIdentity(A);
AG_Destroy();
return (0);
}
EOT
echo >>config.log
echo '# C: HAVE_AGAR_MATH' >>config.log
echo "cat << EOT >conftest$$.c" >>config.log
cat conftest$$.c>>config.log
echo EOT >>config.log
echo "$CC $CFLAGS $TEST_CFLAGS ${AGAR_MATH_CFLAGS} ${AGAR_CFLAGS} -o $testdir/conftest$$ conftest$$.c ${AGAR_MATH_LIBS} ${AGAR_LIBS} 2>>config.log">>config.log
$CC $CFLAGS $TEST_CFLAGS ${AGAR_MATH_CFLAGS} ${AGAR_CFLAGS} -o $testdir/conftest$$ conftest$$.c ${AGAR_MATH_LIBS} ${AGAR_LIBS} 2>>config.log
if [ "$?" != "0" ]; then
echo "# failed $?" >>config.log
MK_COMPILE_STATUS="FAIL $?"
fi
if [ "${MK_COMPILE_STATUS}" = "OK" ]; then
echo 'yes'
echo '# yes' >>config.log
HAVE_AGAR_MATH=yes
echo "hdefs[\"HAVE_AGAR_MATH\"] = \"$HAVE_AGAR_MATH\"" >>configure.lua
else
echo 'no'
echo '# no' >>config.log
HAVE_AGAR_MATH=no
echo 'hdefs["HAVE_AGAR_MATH"] = nil' >>configure.lua
fi
if [ "${keep_conftest}" != "yes" ]; then
rm -f conftest$$.c $testdir/conftest$$$EXECSUFFIX
fi
if [ "${HAVE_AGAR_MATH}" = "yes" ]; then
echo "hdefs[\"AGAR_MATH_CFLAGS\"] = \"$AGAR_MATH_CFLAGS\"" >>configure.lua
echo "hdefs[\"AGAR_MATH_LIBS\"] = \"$AGAR_MATH_LIBS\"" >>configure.lua
else
echo 'hdefs["AGAR_MATH_CFLAGS"] = nil' >>configure.lua
AGAR_MATH_CFLAGS=""
echo 'hdefs["AGAR_MATH_LIBS"] = nil' >>configure.lua
AGAR_MATH_LIBS=""
fi
else
HAVE_AGAR_MATH="no"
AGAR_MATH_CFLAGS=""
AGAR_MATH_LIBS=""
echo 'hdefs["HAVE_AGAR_MATH"] = nil' >>configure.lua
echo 'hdefs["AGAR_MATH_CFLAGS"] = nil' >>configure.lua
echo 'hdefs["AGAR_MATH_LIBS"] = nil' >>configure.lua
fi
# END agar-math
if [ "${HAVE_AGAR_MATH}" != "yes" ]; then
echo '* '
echo '# * ' >>config.log
echo "* $PACKAGE requires Agar-Math (version 1.4.1 or newer)."
echo "# * $PACKAGE requires Agar-Math (version 1.4.1 or newer)." >>config.log
echo '* WWW: http://libagar.org'
echo '# * WWW: http://libagar.org' >>config.log
echo '* '
echo '# * ' >>config.log
echo "***"
echo "*** ERROR: Required dependency agar-math not found"
echo "*** Failed! See ./config.log for more details."
echo "***"
exit 1
fi
if [ "${MK_VERSION_OK}" != "yes" ]; then
echo '* '
echo '# * ' >>config.log
echo '* This software requires agar-math version >= 1.4.1,'
echo '# * This software requires agar-math version >= 1.4.1,' >>config.log
echo '* please update that package and try again.'
echo '# * please update that package and try again.' >>config.log
echo '* WWW: http://libagar.org'
echo '# * WWW: http://libagar.org' >>config.log
echo '* '
echo '# * ' >>config.log
echo "***"
echo "*** ERROR: Required dependency agar-math version mismatch"
echo "*** Failed! See ./config.log for more details."
echo "***"
exit 1
fi
$ECHO_N 'checking for libjpeg...'
$ECHO_N '# checking for libjpeg...' >>config.log
# BEGIN jpeg(6 ${prefix_jpeg})
JPEG_CFLAGS=""
if [ "${prefix_jpeg}" != "" ]; then
if [ -e "${prefix_jpeg}/include/jpeglib.h" ]; then
JPEG_CFLAGS="-I${prefix_jpeg}/include"
JPEG_LIBS="-L${prefix_jpeg}/lib -ljpeg"
fi
else
if [ -e "/usr/local/include/jpeglib.h" ]; then
JPEG_CFLAGS="-I/usr/local/include"
JPEG_LIBS="-L/usr/local/lib -ljpeg"
fi
if [ -e "/usr/X11R6/include/jpeglib.h" ]; then
JPEG_CFLAGS="-I/usr/X11R6/include"
JPEG_LIBS="-L/usr/X11R6/lib -ljpeg"
fi
if [ -e "/usr/include/jpeglib.h" ]; then
JPEG_CFLAGS="-I/usr/include"
JPEG_LIBS="-L/usr/lib -ljpeg"
fi
if [ -e "/usr/pkg/include/jpeglib.h" ]; then
JPEG_CFLAGS="-I/usr/pkg/include"
JPEG_LIBS="-L/usr/pkg/lib -ljpeg"
fi
if [ -e "/opt/local/include/jpeglib.h" ]; then
JPEG_CFLAGS="-I/opt/local/include"
JPEG_LIBS="-L/opt/local/lib -ljpeg"
fi
if [ -e "/opt/include/jpeglib.h" ]; then
JPEG_CFLAGS="-I/opt/include"
JPEG_LIBS="-L/opt/lib -ljpeg"
fi
fi
if [ "${JPEG_LIBS}" != "" ]; then
echo 'yes'
echo '# yes' >>config.log
$ECHO_N 'checking whether libjpeg works...'
$ECHO_N '# checking whether libjpeg works...' >>config.log
MK_COMPILE_STATUS=OK
cat << EOT >conftest$$.c
#include
#include
struct jpeg_error_mgr jerr;
struct jpeg_compress_struct jcomp;
int
main(int argc, char *argv[])
{
jcomp.err = jpeg_std_error(&jerr);
jpeg_create_compress(&jcomp);
jcomp.image_width = 32;
jcomp.image_height = 32;
jcomp.input_components = 3;
jcomp.in_color_space = JCS_RGB;
jpeg_set_defaults(&jcomp);
jpeg_set_quality(&jcomp, 75, TRUE);
jpeg_destroy_compress(&jcomp);
return (0);
}
EOT
echo >>config.log
echo '# C: HAVE_JPEG' >>config.log
echo "cat << EOT >conftest$$.c" >>config.log
cat conftest$$.c>>config.log
echo EOT >>config.log
echo "$CC $CFLAGS $TEST_CFLAGS ${JPEG_CFLAGS} -o $testdir/conftest$$ conftest$$.c ${JPEG_LIBS} 2>>config.log">>config.log
$CC $CFLAGS $TEST_CFLAGS ${JPEG_CFLAGS} -o $testdir/conftest$$ conftest$$.c ${JPEG_LIBS} 2>>config.log
if [ "$?" != "0" ]; then
echo "# failed $?" >>config.log
MK_COMPILE_STATUS="FAIL $?"
fi
if [ "${MK_COMPILE_STATUS}" = "OK" ]; then
echo 'yes'
echo '# yes' >>config.log
HAVE_JPEG=yes
echo "hdefs[\"HAVE_JPEG\"] = \"$HAVE_JPEG\"" >>configure.lua
else
echo 'no'
echo '# no' >>config.log
HAVE_JPEG=no
echo 'hdefs["HAVE_JPEG"] = nil' >>configure.lua
fi
if [ "${keep_conftest}" != "yes" ]; then
rm -f conftest$$.c $testdir/conftest$$$EXECSUFFIX
fi
if [ "${HAVE_JPEG}" = "yes" ]; then
echo "hdefs[\"JPEG_CFLAGS\"] = \"$JPEG_CFLAGS\"" >>configure.lua
echo "hdefs[\"JPEG_LIBS\"] = \"$JPEG_LIBS\"" >>configure.lua
else
echo 'hdefs["JPEG_CFLAGS"] = nil' >>configure.lua
JPEG_CFLAGS=""
echo 'hdefs["JPEG_LIBS"] = nil' >>configure.lua
JPEG_LIBS=""
fi
else
echo 'no'
echo '# no' >>config.log
HAVE_JPEG="no"
JPEG_CFLAGS=""
JPEG_LIBS=""
JPEG_PC=""
echo 'hdefs["HAVE_JPEG"] = nil' >>configure.lua
echo 'hdefs["JPEG_CFLAGS"] = nil' >>configure.lua
echo 'hdefs["JPEG_LIBS"] = nil' >>configure.lua
fi
if [ "${HAVE_JPEG}" = "yes" ]; then
JPEG_PC="libjpeg"
else
JPEG_PC=""
fi
# END jpeg
$ECHO_N 'checking for ALSA...'
$ECHO_N '# checking for ALSA...' >>config.log
# BEGIN alsa(0 ${prefix_alsa})
ALSA_CFLAGS=""
ALSA_LIBS=""
if [ "${prefix_alsa}" != "" ]; then
if [ -e "${prefix_alsa}/include/alsa" ]; then
ALSA_CFLAGS="-I${prefix_alsa}/include"
fi
if [ -e "${prefix_alsa}/lib" ]; then
ALSA_LIBS="-L${prefix_alsa}/lib -lasound"
fi
else
if [ -e "/usr/include/alsa" ]; then
ALSA_CFLAGS="${ALSA_CFLAGS} -I/usr/include"
fi
if [ -e "/usr/local/include/alsa" ]; then
ALSA_CFLAGS="${ALSA_CFLAGS} -I/usr/local/include"
fi
if [ -e "/usr/lib" ]; then
ALSA_LIBS="${ALSA_LIBS} -L/usr/lib -lasound"
fi
if [ -e "/usr/local/lib" ]; then
ALSA_LIBS="${ALSA_LIBS} -L/usr/local/lib -lasound"
fi
fi
if [ "${ALSA_LIBS}" != "" ]; then
echo 'yes'
echo '# yes' >>config.log
$ECHO_N 'checking whether ALSA works...'
$ECHO_N '# checking whether ALSA works...' >>config.log
MK_COMPILE_STATUS=OK
cat << EOT >conftest$$.c
#include
int main(int argc, char *argv[]) {
int rv;
snd_rawmidi_t *h = 0;
rv = snd_rawmidi_open(&h, NULL, "foo", 0);
return (0);
}
EOT
echo >>config.log
echo '# C: HAVE_ALSA' >>config.log
echo "cat << EOT >conftest$$.c" >>config.log
cat conftest$$.c>>config.log
echo EOT >>config.log
echo "$CC $CFLAGS $TEST_CFLAGS ${ALSA_CFLAGS} -o $testdir/conftest$$ conftest$$.c ${ALSA_LIBS} 2>>config.log">>config.log
$CC $CFLAGS $TEST_CFLAGS ${ALSA_CFLAGS} -o $testdir/conftest$$ conftest$$.c ${ALSA_LIBS} 2>>config.log
if [ "$?" != "0" ]; then
echo "# failed $?" >>config.log
MK_COMPILE_STATUS="FAIL $?"
fi
if [ "${MK_COMPILE_STATUS}" = "OK" ]; then
echo 'yes'
echo '# yes' >>config.log
HAVE_ALSA=yes
echo "hdefs[\"HAVE_ALSA\"] = \"$HAVE_ALSA\"" >>configure.lua
else
echo 'no'
echo '# no' >>config.log
HAVE_ALSA=no
echo 'hdefs["HAVE_ALSA"] = nil' >>configure.lua
fi
if [ "${keep_conftest}" != "yes" ]; then
rm -f conftest$$.c $testdir/conftest$$$EXECSUFFIX
fi
if [ "${HAVE_ALSA}" = "yes" ]; then
echo "hdefs[\"ALSA_CFLAGS\"] = \"$ALSA_CFLAGS\"" >>configure.lua
echo "hdefs[\"ALSA_LIBS\"] = \"$ALSA_LIBS\"" >>configure.lua
else
echo 'hdefs["ALSA_CFLAGS"] = nil' >>configure.lua
ALSA_CFLAGS=""
echo 'hdefs["ALSA_LIBS"] = nil' >>configure.lua
ALSA_LIBS=""
fi
else
echo 'no'
echo '# no' >>config.log
fi
# END alsa
$ECHO_N 'checking for libsndfile...'
$ECHO_N '# checking for libsndfile...' >>config.log
# BEGIN sndfile(0 ${prefix_sndfile})
if [ "$pfx" != "" ]; then
MK_EXEC_PKGPREFIX=`$PKGCONFIG --variable=prefix sndfile 2>/dev/null`
if [ "$MK_EXEC_PKGPREFIX" != "$pfx" ]; then
echo "* "
echo "# * " >>config.log
echo "* ERROR: According to pkg-config, sndfile is installed in prefix: "
echo "# * ERROR: According to pkg-config, sndfile is installed in prefix: " >>config.log
echo "* $MK_EXEC_PKGPREFIX, but the prefix ${prefix_sndfile} was given."
echo "# * $MK_EXEC_PKGPREFIX, but the prefix ${prefix_sndfile} was given." >>config.log
echo "* "
echo "# * " >>config.log
echo "* Please indicate correct sndfile prefix (or omit for autodetect)."
echo "# * Please indicate correct sndfile prefix (or omit for autodetect)." >>config.log
echo "* "
echo "# * " >>config.log
echo "***"
echo "*** ERROR: Package prefix mismatch"
echo "*** Failed! See ./config.log for more details."
echo "***"
exit 1
fi
fi
SNDFILE_VERSION=`$PKGCONFIG sndfile --modversion 2>/dev/null`
if [ "$pfx" != "" ]; then
MK_EXEC_PKGPREFIX=`$PKGCONFIG --variable=prefix sndfile 2>/dev/null`
if [ "$MK_EXEC_PKGPREFIX" != "$pfx" ]; then
echo "* "
echo "# * " >>config.log
echo "* ERROR: According to pkg-config, sndfile is installed in prefix: "
echo "# * ERROR: According to pkg-config, sndfile is installed in prefix: " >>config.log
echo "* $MK_EXEC_PKGPREFIX, but the prefix ${prefix_sndfile} was given."
echo "# * $MK_EXEC_PKGPREFIX, but the prefix ${prefix_sndfile} was given." >>config.log
echo "* "
echo "# * " >>config.log
echo "* Please indicate correct sndfile prefix (or omit for autodetect)."
echo "# * Please indicate correct sndfile prefix (or omit for autodetect)." >>config.log
echo "* "
echo "# * " >>config.log
echo "***"
echo "*** ERROR: Package prefix mismatch"
echo "*** Failed! See ./config.log for more details."
echo "***"
exit 1
fi
fi
SNDFILE_CFLAGS=`$PKGCONFIG sndfile --cflags 2>/dev/null`
if [ "$pfx" != "" ]; then
MK_EXEC_PKGPREFIX=`$PKGCONFIG --variable=prefix sndfile 2>/dev/null`
if [ "$MK_EXEC_PKGPREFIX" != "$pfx" ]; then
echo "* "
echo "# * " >>config.log
echo "* ERROR: According to pkg-config, sndfile is installed in prefix: "
echo "# * ERROR: According to pkg-config, sndfile is installed in prefix: " >>config.log
echo "* $MK_EXEC_PKGPREFIX, but the prefix ${prefix_sndfile} was given."
echo "# * $MK_EXEC_PKGPREFIX, but the prefix ${prefix_sndfile} was given." >>config.log
echo "* "
echo "# * " >>config.log
echo "* Please indicate correct sndfile prefix (or omit for autodetect)."
echo "# * Please indicate correct sndfile prefix (or omit for autodetect)." >>config.log
echo "* "
echo "# * " >>config.log
echo "***"
echo "*** ERROR: Package prefix mismatch"
echo "*** Failed! See ./config.log for more details."
echo "***"
exit 1
fi
fi
SNDFILE_LIBS=`$PKGCONFIG sndfile --libs 2>/dev/null`
if [ "${SNDFILE_VERSION}" != "" ]; then
if [ "${prefix_sndfile}" != "" ]; then
echo "yes ($SNDFILE_VERSION in ${prefix_sndfile})"
echo "# yes ($SNDFILE_VERSION in ${prefix_sndfile})" >>config.log
else
echo "yes ($SNDFILE_VERSION)"
echo "# yes ($SNDFILE_VERSION)" >>config.log
fi
if [ "${MK_VERSION_OK}" = "no" ]; then
echo '*'
echo '# *' >>config.log
echo "* Minimum required version is 0 (found $SNDFILE_VERSION)"
echo "# * Minimum required version is 0 (found $SNDFILE_VERSION)" >>config.log
echo '*'
echo '# *' >>config.log
fi
else
if [ "${prefix_sndfile}" != "" ]; then
echo "no (not in ${prefix_sndfile})"
echo "# no (not in ${prefix_sndfile})" >>config.log
else
echo 'no'
echo '# no' >>config.log
fi
MK_VERSION_OK="no"
fi
if [ "${MK_VERSION_OK}" = "yes" ]; then
$ECHO_N 'checking whether libsndfile works...'
$ECHO_N '# checking whether libsndfile works...' >>config.log
MK_COMPILE_STATUS=OK
cat << EOT >conftest$$.c
#include
#include
int main(int argc, char *argv[]) {
SNDFILE *sf;
SF_INFO sfi;
sfi.format = 0;
sf = sf_open("foo", 0, &sfi);
sf_close(sf);
return (0);
}
EOT
echo >>config.log
echo '# C: HAVE_SNDFILE' >>config.log
echo "cat << EOT >conftest$$.c" >>config.log
cat conftest$$.c>>config.log
echo EOT >>config.log
echo "$CC $CFLAGS $TEST_CFLAGS ${SNDFILE_CFLAGS} -o $testdir/conftest$$ conftest$$.c ${SNDFILE_LIBS} 2>>config.log">>config.log
$CC $CFLAGS $TEST_CFLAGS ${SNDFILE_CFLAGS} -o $testdir/conftest$$ conftest$$.c ${SNDFILE_LIBS} 2>>config.log
if [ "$?" != "0" ]; then
echo "# failed $?" >>config.log
MK_COMPILE_STATUS="FAIL $?"
fi
if [ "${MK_COMPILE_STATUS}" = "OK" ]; then
echo 'yes'
echo '# yes' >>config.log
HAVE_SNDFILE=yes
echo "hdefs[\"HAVE_SNDFILE\"] = \"$HAVE_SNDFILE\"" >>configure.lua
else
echo 'no'
echo '# no' >>config.log
HAVE_SNDFILE=no
echo 'hdefs["HAVE_SNDFILE"] = nil' >>configure.lua
fi
if [ "${keep_conftest}" != "yes" ]; then
rm -f conftest$$.c $testdir/conftest$$$EXECSUFFIX
fi
if [ "${HAVE_SNDFILE}" = "yes" ]; then
echo "hdefs[\"SNDFILE_CFLAGS\"] = \"$SNDFILE_CFLAGS\"" >>configure.lua
echo "hdefs[\"SNDFILE_LIBS\"] = \"$SNDFILE_LIBS\"" >>configure.lua
else
echo 'hdefs["SNDFILE_CFLAGS"] = nil' >>configure.lua
SNDFILE_CFLAGS=""
echo 'hdefs["SNDFILE_LIBS"] = nil' >>configure.lua
SNDFILE_LIBS=""
fi
else
echo 'hdefs["HAVE_SNDFILE"] = nil' >>configure.lua
fi
if [ "${HAVE_SNDFILE}" = "yes" ]; then
SNDFILE_PC="sndfile"
else
SNDFILE_PC=""
fi
# END sndfile
if [ "${HAVE_SNDFILE}" != "yes" ]; then
echo '* '
echo '# * ' >>config.log
echo '* This software requires libsndfile'
echo '# * This software requires libsndfile' >>config.log
echo '* WWW: http://www.mega-nerd.com/libsndfile'
echo '# * WWW: http://www.mega-nerd.com/libsndfile' >>config.log
echo '* '
echo '# * ' >>config.log
echo "***"
echo "*** ERROR: Required dependency sndfile not found"
echo "*** Failed! See ./config.log for more details."
echo "***"
exit 1
fi
$ECHO_N 'checking for POSIX threads...'
$ECHO_N '# checking for POSIX threads...' >>config.log
# BEGIN pthreads(${prefix_pthreads})
if [ "" != "" ]; then
PTHREADS_CFLAGS="-I/include"
PTHREADS_LIBS="-L/lib -lpthread"
else
PTHREADS_CFLAGS=""
PTHREADS_LIBS="-lpthread"
fi
MK_COMPILE_STATUS=OK
cat << EOT >conftest$$.c
#include
#include
static void *start_routine(void *arg)
{
return (NULL);
}
int main(int argc, char *argv[])
{
pthread_mutex_t mutex;
pthread_t thread;
pthread_mutex_init(&mutex, NULL);
pthread_mutex_lock(&mutex);
pthread_mutex_unlock(&mutex);
pthread_mutex_destroy(&mutex);
pthread_create(&thread, NULL, start_routine, NULL);
return (0);
}
EOT
echo >>config.log
echo '# C: HAVE_PTHREADS' >>config.log
echo "cat << EOT >conftest$$.c" >>config.log
cat conftest$$.c>>config.log
echo EOT >>config.log
echo "$CC $CFLAGS $TEST_CFLAGS ${PTHREADS_CFLAGS} -o $testdir/conftest$$ conftest$$.c ${PTHREADS_LIBS} 2>>config.log">>config.log
$CC $CFLAGS $TEST_CFLAGS ${PTHREADS_CFLAGS} -o $testdir/conftest$$ conftest$$.c ${PTHREADS_LIBS} 2>>config.log
if [ "$?" != "0" ]; then
echo "# failed $?" >>config.log
MK_COMPILE_STATUS="FAIL $?"
fi
if [ "${MK_COMPILE_STATUS}" = "OK" ]; then
echo 'yes'
echo '# yes' >>config.log
HAVE_PTHREADS=yes
echo "hdefs[\"HAVE_PTHREADS\"] = \"$HAVE_PTHREADS\"" >>configure.lua
else
echo 'no'
echo '# no' >>config.log
HAVE_PTHREADS=no
echo 'hdefs["HAVE_PTHREADS"] = nil' >>configure.lua
fi
if [ "${keep_conftest}" != "yes" ]; then
rm -f conftest$$.c $testdir/conftest$$$EXECSUFFIX
fi
if [ "${HAVE_PTHREADS}" = "yes" ]; then
CFLAGS="${CFLAGS} ${PTHREADS_CFLAGS}"
echo "hdefs[\"PTHREADS_CFLAGS\"] = \"$PTHREADS_CFLAGS\"" >>configure.lua
echo "hdefs[\"PTHREADS_LIBS\"] = \"$PTHREADS_LIBS\"" >>configure.lua
else
$ECHO_N 'checking for -pthread...'
$ECHO_N '# checking for -pthread...' >>config.log
PTHREADS_LIBS="-pthread"
MK_COMPILE_STATUS=OK
cat << EOT >conftest$$.c
#include
#include
static void *start_routine(void *arg)
{
return (NULL);
}
int main(int argc, char *argv[])
{
pthread_mutex_t mutex;
pthread_t thread;
pthread_mutex_init(&mutex, NULL);
pthread_mutex_lock(&mutex);
pthread_mutex_unlock(&mutex);
pthread_mutex_destroy(&mutex);
pthread_create(&thread, NULL, start_routine, NULL);
return (0);
}
EOT
echo >>config.log
echo '# C: HAVE_PTHREADS' >>config.log
echo "cat << EOT >conftest$$.c" >>config.log
cat conftest$$.c>>config.log
echo EOT >>config.log
echo "$CC $CFLAGS $TEST_CFLAGS ${PTHREADS_CFLAGS} -o $testdir/conftest$$ conftest$$.c ${PTHREADS_LIBS} 2>>config.log">>config.log
$CC $CFLAGS $TEST_CFLAGS ${PTHREADS_CFLAGS} -o $testdir/conftest$$ conftest$$.c ${PTHREADS_LIBS} 2>>config.log
if [ "$?" != "0" ]; then
echo "# failed $?" >>config.log
MK_COMPILE_STATUS="FAIL $?"
fi
if [ "${MK_COMPILE_STATUS}" = "OK" ]; then
echo 'yes'
echo '# yes' >>config.log
HAVE_PTHREADS=yes
echo "hdefs[\"HAVE_PTHREADS\"] = \"$HAVE_PTHREADS\"" >>configure.lua
else
echo 'no'
echo '# no' >>config.log
HAVE_PTHREADS=no
echo 'hdefs["HAVE_PTHREADS"] = nil' >>configure.lua
fi
if [ "${keep_conftest}" != "yes" ]; then
rm -f conftest$$.c $testdir/conftest$$$EXECSUFFIX
fi
if [ "${HAVE_PTHREADS}" = "yes" ]; then
CFLAGS="${CFLAGS} ${PTHREADS_CFLAGS}"
echo "hdefs[\"PTHREADS_CFLAGS\"] = \"$PTHREADS_CFLAGS\"" >>configure.lua
echo "hdefs[\"PTHREADS_LIBS\"] = \"$PTHREADS_LIBS\"" >>configure.lua
else
PTHREADS_CFLAGS=""
PTHREADS_LIBS=""
$ECHO_N 'checking for -pthread (common paths)...'
$ECHO_N '# checking for -pthread (common paths)...' >>config.log
if [ -e "/lib/pthread.h" ]; then
PTHREADS_CFLAGS="-I/lib"
fi
if [ -e "/usr/include/pthreads/pthread.h" ]; then
PTHREADS_CFLAGS="-I/usr/include/pthreads"
fi
if [ -e "/usr/local/include/pthread.h" ]; then
PTHREADS_CFLAGS="-I/usr/local/include"
fi
if [ -e "/usr/local/include/pthreads/pthread.h" ]; then
PTHREADS_CFLAGS="-I/usr/local/include/pthreads"
fi
if [ -e "/lib/libpthread.a" ]; then
PTHREADS_LIBS="-L/lib -lpthread"
fi
if [ -e "/lib/libpthreadGC1.a" ]; then
PTHREADS_LIBS="-L/lib -lpthreadGC1"
fi
if [ -e "/lib/libpthreadGC1d.a" ]; then
PTHREADS_LIBS="-L/lib -lpthreadGC1d"
fi
if [ -e "/lib/libpthreadGCE1.a" ]; then
PTHREADS_LIBS="-L/lib -lpthreadGCE1"
fi
if [ -e "/lib/libpthreadGCE1d.a" ]; then
PTHREADS_LIBS="-L/lib -lpthreadGCE1d"
fi
if [ -e "/lib/libpthreadGC2.a" ]; then
PTHREADS_LIBS="-L/lib -lpthreadGC2"
fi
if [ -e "/lib/libpthreadGC2d.a" ]; then
PTHREADS_LIBS="-L/lib -lpthreadGC2d"
fi
if [ -e "/lib/libpthreadGCE2.a" ]; then
PTHREADS_LIBS="-L/lib -lpthreadGCE2"
fi
if [ -e "/lib/libpthreadGCE2d.a" ]; then
PTHREADS_LIBS="-L/lib -lpthreadGCE2d"
fi
if [ -e "/usr/local/lib/libpthread.a" ]; then
PTHREADS_LIBS="-L/usr/local/lib -lpthread"
fi
if [ -e "/usr/local/lib/libpthreadGC1.a" ]; then
PTHREADS_LIBS="-L/usr/local/lib -lpthreadGC1"
fi
if [ -e "/usr/local/lib/libpthreadGC1d.a" ]; then
PTHREADS_LIBS="-L/usr/local/lib -lpthreadGC1d"
fi
if [ -e "/usr/local/lib/libpthreadGCE1.a" ]; then
PTHREADS_LIBS="-L/usr/local/lib -lpthreadGCE1"
fi
if [ -e "/usr/local/lib/libpthreadGCE1d.a" ]; then
PTHREADS_LIBS="-L/usr/local/lib -lpthreadGCE1d"
fi
if [ -e "/usr/local/lib/libpthreadGC2.a" ]; then
PTHREADS_LIBS="-L/usr/local/lib -lpthreadGC2"
fi
if [ -e "/usr/local/lib/libpthreadGC2d.a" ]; then
PTHREADS_LIBS="-L/usr/local/lib -lpthreadGC2d"
fi
if [ -e "/usr/local/lib/libpthreadGCE2.a" ]; then
PTHREADS_LIBS="-L/usr/local/lib -lpthreadGCE2"
fi
if [ -e "/usr/local/lib/libpthreadGCE2d.a" ]; then
PTHREADS_LIBS="-L/usr/local/lib -lpthreadGCE2d"
fi
MK_COMPILE_STATUS=OK
cat << EOT >conftest$$.c
#include
#include
static void *start_routine(void *arg)
{
return (NULL);
}
int main(int argc, char *argv[])
{
pthread_mutex_t mutex;
pthread_t thread;
pthread_mutex_init(&mutex, NULL);
pthread_mutex_lock(&mutex);
pthread_mutex_unlock(&mutex);
pthread_mutex_destroy(&mutex);
pthread_create(&thread, NULL, start_routine, NULL);
return (0);
}
EOT
echo >>config.log
echo '# C: HAVE_PTHREADS' >>config.log
echo "cat << EOT >conftest$$.c" >>config.log
cat conftest$$.c>>config.log
echo EOT >>config.log
echo "$CC $CFLAGS $TEST_CFLAGS ${PTHREADS_CFLAGS} -o $testdir/conftest$$ conftest$$.c ${PTHREADS_LIBS} 2>>config.log">>config.log
$CC $CFLAGS $TEST_CFLAGS ${PTHREADS_CFLAGS} -o $testdir/conftest$$ conftest$$.c ${PTHREADS_LIBS} 2>>config.log
if [ "$?" != "0" ]; then
echo "# failed $?" >>config.log
MK_COMPILE_STATUS="FAIL $?"
fi
if [ "${MK_COMPILE_STATUS}" = "OK" ]; then
echo 'yes'
echo '# yes' >>config.log
HAVE_PTHREADS=yes
echo "hdefs[\"HAVE_PTHREADS\"] = \"$HAVE_PTHREADS\"" >>configure.lua
else
echo 'no'
echo '# no' >>config.log
HAVE_PTHREADS=no
echo 'hdefs["HAVE_PTHREADS"] = nil' >>configure.lua
fi
if [ "${keep_conftest}" != "yes" ]; then
rm -f conftest$$.c $testdir/conftest$$$EXECSUFFIX
fi
if [ "${HAVE_PTHREADS}" = "yes" ]; then
CFLAGS="${CFLAGS} ${PTHREADS_CFLAGS}"
echo "hdefs[\"PTHREADS_CFLAGS\"] = \"$PTHREADS_CFLAGS\"" >>configure.lua
echo "hdefs[\"PTHREADS_LIBS\"] = \"$PTHREADS_LIBS\"" >>configure.lua
fi
fi
fi
$ECHO_N 'checking for the X/Open Threads Extension...'
$ECHO_N '# checking for the X/Open Threads Extension...' >>config.log
case "${host}" in
*-*-freebsd* | *-*-dragonfly*)
PTHREADS_XOPEN_CFLAGS=""
;;
*)
PTHREADS_XOPEN_CFLAGS="-U_XOPEN_SOURCE -D_XOPEN_SOURCE=600"
;;
esac
if [ "" != "" ]; then
PTHREADS_XOPEN_LIBS="-L/lib -lpthread"
else
PTHREADS_XOPEN_LIBS="-lpthread"
fi
MK_COMPILE_STATUS=OK
cat << EOT >conftest$$.c
#include
#include
int main(int argc, char *argv[])
{
pthread_mutex_t mutex;
pthread_mutexattr_t mutexattr;
pthread_mutexattr_settype(&mutexattr, PTHREAD_MUTEX_RECURSIVE);
pthread_mutex_init(&mutex, &mutexattr);
return (0);
}
EOT
echo >>config.log
echo '# C: HAVE_PTHREADS_XOPEN' >>config.log
echo "cat << EOT >conftest$$.c" >>config.log
cat conftest$$.c>>config.log
echo EOT >>config.log
echo "$CC $CFLAGS $TEST_CFLAGS ${PTHREADS_XOPEN_CFLAGS} -o $testdir/conftest$$ conftest$$.c ${PTHREADS_XOPEN_LIBS} 2>>config.log">>config.log
$CC $CFLAGS $TEST_CFLAGS ${PTHREADS_XOPEN_CFLAGS} -o $testdir/conftest$$ conftest$$.c ${PTHREADS_XOPEN_LIBS} 2>>config.log
if [ "$?" != "0" ]; then
echo "# failed $?" >>config.log
MK_COMPILE_STATUS="FAIL $?"
fi
if [ "${MK_COMPILE_STATUS}" = "OK" ]; then
echo 'yes'
echo '# yes' >>config.log
HAVE_PTHREADS_XOPEN=yes
echo "hdefs[\"HAVE_PTHREADS_XOPEN\"] = \"$HAVE_PTHREADS_XOPEN\"" >>configure.lua
else
echo 'no'
echo '# no' >>config.log
HAVE_PTHREADS_XOPEN=no
echo 'hdefs["HAVE_PTHREADS_XOPEN"] = nil' >>configure.lua
fi
if [ "${keep_conftest}" != "yes" ]; then
rm -f conftest$$.c $testdir/conftest$$$EXECSUFFIX
fi
if [ "${HAVE_PTHREADS_XOPEN}" = "yes" ]; then
echo "hdefs[\"HAVE_PTHREADS_XOPEN\"] = \"$HAVE_PTHREADS_XOPEN\"" >>configure.lua
echo "hdefs[\"PTHREADS_XOPEN_CFLAGS\"] = \"$PTHREADS_XOPEN_CFLAGS\"" >>configure.lua
echo "hdefs[\"PTHREADS_XOPEN_LIBS\"] = \"$PTHREADS_XOPEN_LIBS\"" >>configure.lua
else
PTHREADS_XOPEN_LIBS=""
$ECHO_N 'checking for the X/Open Threads Extension (common paths)...'
$ECHO_N '# checking for the X/Open Threads Extension (common paths)...' >>config.log
if [ -e "/lib/libpthread.a" ]; then
PTHREADS_XOPEN_LIBS="-L/lib -lpthread"
fi
if [ -e "/lib/libpthreadGC1.a" ]; then
PTHREADS_XOPEN_LIBS="-L/lib -lpthreadGC1"
fi
if [ -e "/lib/libpthreadGC1d.a" ]; then
PTHREADS_XOPEN_LIBS="-L/lib -lpthreadGC1d"
fi
if [ -e "/lib/libpthreadGCE1.a" ]; then
PTHREADS_XOPEN_LIBS="-L/lib -lpthreadGCE1"
fi
if [ -e "/lib/libpthreadGCE1d.a" ]; then
PTHREADS_XOPEN_LIBS="-L/lib -lpthreadGCE1d"
fi
if [ -e "/lib/libpthreadGC2.a" ]; then
PTHREADS_XOPEN_LIBS="-L/lib -lpthreadGC2"
fi
if [ -e "/lib/libpthreadGC2d.a" ]; then
PTHREADS_XOPEN_LIBS="-L/lib -lpthreadGC2d"
fi
if [ -e "/lib/libpthreadGCE2.a" ]; then
PTHREADS_XOPEN_LIBS="-L/lib -lpthreadGCE2"
fi
if [ -e "/lib/libpthreadGCE2d.a" ]; then
PTHREADS_XOPEN_LIBS="-L/lib -lpthreadGCE2d"
fi
if [ -e "/usr/local/lib/libpthread.a" ]; then
PTHREADS_XOPEN_LIBS="-L/usr/local/lib -lpthread"
fi
if [ -e "/usr/local/lib/libpthreadGC1.a" ]; then
PTHREADS_XOPEN_LIBS="-L/usr/local/lib -lpthreadGC1"
fi
if [ -e "/usr/local/lib/libpthreadGC1d.a" ]; then
PTHREADS_XOPEN_LIBS="-L/usr/local/lib -lpthreadGC1d"
fi
if [ -e "/usr/local/lib/libpthreadGCE1.a" ]; then
PTHREADS_XOPEN_LIBS="-L/usr/local/lib -lpthreadGCE1"
fi
if [ -e "/usr/local/lib/libpthreadGCE1d.a" ]; then
PTHREADS_XOPEN_LIBS="-L/usr/local/lib -lpthreadGCE1d"
fi
if [ -e "/usr/local/lib/libpthreadGC2.a" ]; then
PTHREADS_XOPEN_LIBS="-L/usr/local/lib -lpthreadGC2"
fi
if [ -e "/usr/local/lib/libpthreadGC2d.a" ]; then
PTHREADS_XOPEN_LIBS="-L/usr/local/lib -lpthreadGC2d"
fi
if [ -e "/usr/local/lib/libpthreadGCE2.a" ]; then
PTHREADS_XOPEN_LIBS="-L/usr/local/lib -lpthreadGCE2"
fi
if [ -e "/usr/local/lib/libpthreadGCE2d.a" ]; then
PTHREADS_XOPEN_LIBS="-L/usr/local/lib -lpthreadGCE2d"
fi
if [ -e "/lib/pthread.h" ]; then
PTHREADS_CFLAGS="-I/lib"
fi
if [ -e "/usr/include/pthreads/pthread.h" ]; then
PTHREADS_CFLAGS="-I/usr/include/pthreads"
fi
if [ -e "/usr/local/include/pthread.h" ]; then
PTHREADS_CFLAGS="-I/usr/local/include"
fi
if [ -e "/usr/local/include/pthreads/pthread.h" ]; then
PTHREADS_CFLAGS="-I/usr/local/include/pthreads"
fi
MK_COMPILE_STATUS=OK
cat << EOT >conftest$$.c
#include
#include
int main(int argc, char *argv[])
{
pthread_mutex_t mutex;
pthread_mutexattr_t mutexattr;
pthread_mutexattr_settype(&mutexattr, PTHREAD_MUTEX_RECURSIVE);
pthread_mutex_init(&mutex, &mutexattr);
return (0);
}
EOT
echo >>config.log
echo '# C: HAVE_PTHREADS_XOPEN' >>config.log
echo "cat << EOT >conftest$$.c" >>config.log
cat conftest$$.c>>config.log
echo EOT >>config.log
echo "$CC $CFLAGS $TEST_CFLAGS ${PTHREADS_XOPEN_CFLAGS} -o $testdir/conftest$$ conftest$$.c ${PTHREADS_XOPEN_LIBS} 2>>config.log">>config.log
$CC $CFLAGS $TEST_CFLAGS ${PTHREADS_XOPEN_CFLAGS} -o $testdir/conftest$$ conftest$$.c ${PTHREADS_XOPEN_LIBS} 2>>config.log
if [ "$?" != "0" ]; then
echo "# failed $?" >>config.log
MK_COMPILE_STATUS="FAIL $?"
fi
if [ "${MK_COMPILE_STATUS}" = "OK" ]; then
echo 'yes'
echo '# yes' >>config.log
HAVE_PTHREADS_XOPEN=yes
echo "hdefs[\"HAVE_PTHREADS_XOPEN\"] = \"$HAVE_PTHREADS_XOPEN\"" >>configure.lua
else
echo 'no'
echo '# no' >>config.log
HAVE_PTHREADS_XOPEN=no
echo 'hdefs["HAVE_PTHREADS_XOPEN"] = nil' >>configure.lua
fi
if [ "${keep_conftest}" != "yes" ]; then
rm -f conftest$$.c $testdir/conftest$$$EXECSUFFIX
fi
if [ "${HAVE_PTHREADS_XOPEN}" = "yes" ]; then
echo "hdefs[\"HAVE_PTHREADS_XOPEN\"] = \"$HAVE_PTHREADS_XOPEN\"" >>configure.lua
echo "hdefs[\"PTHREADS_XOPEN_CFLAGS\"] = \"$PTHREADS_XOPEN_CFLAGS\"" >>configure.lua
echo "hdefs[\"PTHREADS_XOPEN_LIBS\"] = \"$PTHREADS_XOPEN_LIBS\"" >>configure.lua
else
echo 'hdefs["HAVE_PTHREADS_XOPEN"] = nil' >>configure.lua
fi
fi
$ECHO_N 'checking for PTHREAD_MUTEX_RECURSIVE...'
$ECHO_N '# checking for PTHREAD_MUTEX_RECURSIVE...' >>config.log
MK_COMPILE_STATUS=OK
cat << EOT >conftest$$.c
#include
#include
int main(int argc, char *argv[])
{
pthread_mutex_t mutex;
pthread_mutexattr_t mutexattr;
pthread_mutexattr_settype(&mutexattr, PTHREAD_MUTEX_RECURSIVE);
pthread_mutex_init(&mutex, &mutexattr);
return (0);
}
EOT
echo >>config.log
echo '# C: HAVE_PTHREAD_MUTEX_RECURSIVE' >>config.log
echo "cat << EOT >conftest$$.c" >>config.log
cat conftest$$.c>>config.log
echo EOT >>config.log
echo "$CC $CFLAGS $TEST_CFLAGS ${PTHREADS_CFLAGS} -o $testdir/conftest$$ conftest$$.c ${PTHREADS_LIBS} 2>>config.log">>config.log
$CC $CFLAGS $TEST_CFLAGS ${PTHREADS_CFLAGS} -o $testdir/conftest$$ conftest$$.c ${PTHREADS_LIBS} 2>>config.log
if [ "$?" != "0" ]; then
echo "# failed $?" >>config.log
MK_COMPILE_STATUS="FAIL $?"
fi
if [ "${MK_COMPILE_STATUS}" = "OK" ]; then
echo 'yes'
echo '# yes' >>config.log
HAVE_PTHREAD_MUTEX_RECURSIVE=yes
echo "hdefs[\"HAVE_PTHREAD_MUTEX_RECURSIVE\"] = \"$HAVE_PTHREAD_MUTEX_RECURSIVE\"" >>configure.lua
else
echo 'no'
echo '# no' >>config.log
HAVE_PTHREAD_MUTEX_RECURSIVE=no
echo 'hdefs["HAVE_PTHREAD_MUTEX_RECURSIVE"] = nil' >>configure.lua
fi
if [ "${keep_conftest}" != "yes" ]; then
rm -f conftest$$.c $testdir/conftest$$$EXECSUFFIX
fi
if [ "${HAVE_PTHREAD_MUTEX_RECURSIVE}" = "yes" ]; then
echo "hdefs[\"HAVE_PTHREAD_MUTEX_RECURSIVE\"] = \"$HAVE_PTHREAD_MUTEX_RECURSIVE\"" >>configure.lua
else
echo 'hdefs["HAVE_PTHREAD_MUTEX_RECURSIVE"] = nil' >>configure.lua
fi
$ECHO_N 'checking for PTHREAD_MUTEX_RECURSIVE_NP...'
$ECHO_N '# checking for PTHREAD_MUTEX_RECURSIVE_NP...' >>config.log
MK_COMPILE_STATUS=OK
cat << EOT >conftest$$.c
#include
#include
int main(int argc, char *argv[])
{
pthread_mutex_t mutex;
pthread_mutexattr_t mutexattr;
pthread_mutexattr_settype(&mutexattr, PTHREAD_MUTEX_RECURSIVE_NP);
pthread_mutex_init(&mutex, &mutexattr);
return (0);
}
EOT
echo >>config.log
echo '# C: HAVE_PTHREAD_MUTEX_RECURSIVE_NP' >>config.log
echo "cat << EOT >conftest$$.c" >>config.log
cat conftest$$.c>>config.log
echo EOT >>config.log
echo "$CC $CFLAGS $TEST_CFLAGS ${PTHREADS_CFLAGS} -o $testdir/conftest$$ conftest$$.c ${PTHREADS_LIBS} 2>>config.log">>config.log
$CC $CFLAGS $TEST_CFLAGS ${PTHREADS_CFLAGS} -o $testdir/conftest$$ conftest$$.c ${PTHREADS_LIBS} 2>>config.log
if [ "$?" != "0" ]; then
echo "# failed $?" >>config.log
MK_COMPILE_STATUS="FAIL $?"
fi
if [ "${MK_COMPILE_STATUS}" = "OK" ]; then
echo 'yes'
echo '# yes' >>config.log
HAVE_PTHREAD_MUTEX_RECURSIVE_NP=yes
echo "hdefs[\"HAVE_PTHREAD_MUTEX_RECURSIVE_NP\"] = \"$HAVE_PTHREAD_MUTEX_RECURSIVE_NP\"" >>configure.lua
else
echo 'no'
echo '# no' >>config.log
HAVE_PTHREAD_MUTEX_RECURSIVE_NP=no
echo 'hdefs["HAVE_PTHREAD_MUTEX_RECURSIVE_NP"] = nil' >>configure.lua
fi
if [ "${keep_conftest}" != "yes" ]; then
rm -f conftest$$.c $testdir/conftest$$$EXECSUFFIX
fi
if [ "${HAVE_PTHREAD_MUTEX_RECURSIVE_NP}" = "yes" ]; then
echo "hdefs[\"HAVE_PTHREAD_MUTEX_RECURSIVE_NP\"] = \"$HAVE_PTHREAD_MUTEX_RECURSIVE_NP\"" >>configure.lua
else
echo 'hdefs["HAVE_PTHREAD_MUTEX_RECURSIVE_NP"] = nil' >>configure.lua
fi
$ECHO_N 'checking whether pthread_mutex_t is a pointer...'
$ECHO_N '# checking whether pthread_mutex_t is a pointer...' >>config.log
MK_COMPILE_STATUS=OK
cat << EOT >conftest$$.c
#include
int main(int argc, char *argv[])
{
pthread_mutex_t mutex = NULL;
pthread_mutex_init(&mutex, NULL);
return (mutex != NULL);
}
EOT
echo >>config.log
echo '# C: HAVE_PTHREAD_MUTEX_T_POINTER' >>config.log
echo "cat << EOT >conftest$$.c" >>config.log
cat conftest$$.c>>config.log
echo EOT >>config.log
echo "$CC $CFLAGS $TEST_CFLAGS ${PTHREADS_CFLAGS} -o $testdir/conftest$$ conftest$$.c ${PTHREADS_LIBS} 2>>config.log">>config.log
$CC $CFLAGS $TEST_CFLAGS ${PTHREADS_CFLAGS} -o $testdir/conftest$$ conftest$$.c ${PTHREADS_LIBS} 2>>config.log
if [ "$?" != "0" ]; then
echo "# failed $?" >>config.log
MK_COMPILE_STATUS="FAIL $?"
fi
if [ "${MK_COMPILE_STATUS}" = "OK" ]; then
echo 'yes'
echo '# yes' >>config.log
HAVE_PTHREAD_MUTEX_T_POINTER=yes
echo "hdefs[\"HAVE_PTHREAD_MUTEX_T_POINTER\"] = \"$HAVE_PTHREAD_MUTEX_T_POINTER\"" >>configure.lua
else
echo 'no'
echo '# no' >>config.log
HAVE_PTHREAD_MUTEX_T_POINTER=no
echo 'hdefs["HAVE_PTHREAD_MUTEX_T_POINTER"] = nil' >>configure.lua
fi
if [ "${keep_conftest}" != "yes" ]; then
rm -f conftest$$.c $testdir/conftest$$$EXECSUFFIX
fi
$ECHO_N 'checking whether pthread_cond_t is a pointer...'
$ECHO_N '# checking whether pthread_cond_t is a pointer...' >>config.log
MK_COMPILE_STATUS=OK
cat << EOT >conftest$$.c
#include
int main(int argc, char *argv[])
{
pthread_cond_t cond = NULL;
pthread_cond_init(&cond, NULL);
return (cond != NULL);
}
EOT
echo >>config.log
echo '# C: HAVE_PTHREAD_COND_T_POINTER' >>config.log
echo "cat << EOT >conftest$$.c" >>config.log
cat conftest$$.c>>config.log
echo EOT >>config.log
echo "$CC $CFLAGS $TEST_CFLAGS ${PTHREADS_CFLAGS} -o $testdir/conftest$$ conftest$$.c ${PTHREADS_LIBS} 2>>config.log">>config.log
$CC $CFLAGS $TEST_CFLAGS ${PTHREADS_CFLAGS} -o $testdir/conftest$$ conftest$$.c ${PTHREADS_LIBS} 2>>config.log
if [ "$?" != "0" ]; then
echo "# failed $?" >>config.log
MK_COMPILE_STATUS="FAIL $?"
fi
if [ "${MK_COMPILE_STATUS}" = "OK" ]; then
echo 'yes'
echo '# yes' >>config.log
HAVE_PTHREAD_COND_T_POINTER=yes
echo "hdefs[\"HAVE_PTHREAD_COND_T_POINTER\"] = \"$HAVE_PTHREAD_COND_T_POINTER\"" >>configure.lua
else
echo 'no'
echo '# no' >>config.log
HAVE_PTHREAD_COND_T_POINTER=no
echo 'hdefs["HAVE_PTHREAD_COND_T_POINTER"] = nil' >>configure.lua
fi
if [ "${keep_conftest}" != "yes" ]; then
rm -f conftest$$.c $testdir/conftest$$$EXECSUFFIX
fi
$ECHO_N 'checking whether pthread_t is a pointer...'
$ECHO_N '# checking whether pthread_t is a pointer...' >>config.log
MK_COMPILE_STATUS=OK
cat << EOT >conftest$$.c
#include
static void *start_routine(void *arg) { return (NULL); }
int main(int argc, char *argv[])
{
pthread_t th = NULL;
return pthread_create(&th, NULL, start_routine, NULL);
}
EOT
echo >>config.log
echo '# C: HAVE_PTHREAD_T_POINTER' >>config.log
echo "cat << EOT >conftest$$.c" >>config.log
cat conftest$$.c>>config.log
echo EOT >>config.log
echo "$CC $CFLAGS $TEST_CFLAGS ${PTHREADS_CFLAGS} -o $testdir/conftest$$ conftest$$.c ${PTHREADS_LIBS} 2>>config.log">>config.log
$CC $CFLAGS $TEST_CFLAGS ${PTHREADS_CFLAGS} -o $testdir/conftest$$ conftest$$.c ${PTHREADS_LIBS} 2>>config.log
if [ "$?" != "0" ]; then
echo "# failed $?" >>config.log
MK_COMPILE_STATUS="FAIL $?"
fi
if [ "${MK_COMPILE_STATUS}" = "OK" ]; then
echo 'yes'
echo '# yes' >>config.log
HAVE_PTHREAD_T_POINTER=yes
echo "hdefs[\"HAVE_PTHREAD_T_POINTER\"] = \"$HAVE_PTHREAD_T_POINTER\"" >>configure.lua
else
echo 'no'
echo '# no' >>config.log
HAVE_PTHREAD_T_POINTER=no
echo 'hdefs["HAVE_PTHREAD_T_POINTER"] = nil' >>configure.lua
fi
if [ "${keep_conftest}" != "yes" ]; then
rm -f conftest$$.c $testdir/conftest$$$EXECSUFFIX
fi
# END pthreads
$ECHO_N 'checking for PortAudio2...'
$ECHO_N '# checking for PortAudio2...' >>config.log
# BEGIN portaudio(19.0 ${prefix_portaudio})
PORTAUDIO_VERSION=""
if [ "${PKGCONFIG}" != '' -a "`${PKGCONFIG} --variable=prefix portaudio-2.0 2>/dev/null`" != '' ]; then
if [ "$pfx" != "" ]; then
MK_EXEC_PKGPREFIX=`$PKGCONFIG --variable=prefix portaudio-2.0 2>/dev/null`
if [ "$MK_EXEC_PKGPREFIX" != "$pfx" ]; then
echo "* "
echo "# * " >>config.log
echo "* ERROR: According to pkg-config, portaudio-2.0 is installed in prefix: "
echo "# * ERROR: According to pkg-config, portaudio-2.0 is installed in prefix: " >>config.log
echo "* $MK_EXEC_PKGPREFIX, but the prefix ${prefix_portaudio} was given."
echo "# * $MK_EXEC_PKGPREFIX, but the prefix ${prefix_portaudio} was given." >>config.log
echo "* "
echo "# * " >>config.log
echo "* Please indicate correct portaudio-2.0 prefix (or omit for autodetect)."
echo "# * Please indicate correct portaudio-2.0 prefix (or omit for autodetect)." >>config.log
echo "* "
echo "# * " >>config.log
echo "***"
echo "*** ERROR: Package prefix mismatch"
echo "*** Failed! See ./config.log for more details."
echo "***"
exit 1
fi
fi
PORTAUDIO_VERSION=`$PKGCONFIG portaudio-2.0 --modversion 2>/dev/null`
if [ "$pfx" != "" ]; then
MK_EXEC_PKGPREFIX=`$PKGCONFIG --variable=prefix portaudio-2.0 2>/dev/null`
if [ "$MK_EXEC_PKGPREFIX" != "$pfx" ]; then
echo "* "
echo "# * " >>config.log
echo "* ERROR: According to pkg-config, portaudio-2.0 is installed in prefix: "
echo "# * ERROR: According to pkg-config, portaudio-2.0 is installed in prefix: " >>config.log
echo "* $MK_EXEC_PKGPREFIX, but the prefix ${prefix_portaudio} was given."
echo "# * $MK_EXEC_PKGPREFIX, but the prefix ${prefix_portaudio} was given." >>config.log
echo "* "
echo "# * " >>config.log
echo "* Please indicate correct portaudio-2.0 prefix (or omit for autodetect)."
echo "# * Please indicate correct portaudio-2.0 prefix (or omit for autodetect)." >>config.log
echo "* "
echo "# * " >>config.log
echo "***"
echo "*** ERROR: Package prefix mismatch"
echo "*** Failed! See ./config.log for more details."
echo "***"
exit 1
fi
fi
PORTAUDIO_CFLAGS=`$PKGCONFIG portaudio-2.0 --cflags 2>/dev/null`
if [ "$pfx" != "" ]; then
MK_EXEC_PKGPREFIX=`$PKGCONFIG --variable=prefix portaudio-2.0 2>/dev/null`
if [ "$MK_EXEC_PKGPREFIX" != "$pfx" ]; then
echo "* "
echo "# * " >>config.log
echo "* ERROR: According to pkg-config, portaudio-2.0 is installed in prefix: "
echo "# * ERROR: According to pkg-config, portaudio-2.0 is installed in prefix: " >>config.log
echo "* $MK_EXEC_PKGPREFIX, but the prefix ${prefix_portaudio} was given."
echo "# * $MK_EXEC_PKGPREFIX, but the prefix ${prefix_portaudio} was given." >>config.log
echo "* "
echo "# * " >>config.log
echo "* Please indicate correct portaudio-2.0 prefix (or omit for autodetect)."
echo "# * Please indicate correct portaudio-2.0 prefix (or omit for autodetect)." >>config.log
echo "* "
echo "# * " >>config.log
echo "***"
echo "*** ERROR: Package prefix mismatch"
echo "*** Failed! See ./config.log for more details."
echo "***"
exit 1
fi
fi
PORTAUDIO_LIBS=`$PKGCONFIG portaudio-2.0 --libs 2>/dev/null`
if [ "${PORTAUDIO_VERSION}" != "" ]; then
PORTAUDIO_VERSION="${PORTAUDIO_VERSION}.0"
fi
if [ -e "/usr/local/include/portaudio2/portaudio.h" ]; then
PORTAUDIO_CFLAGS="-I/usr/local/include/portaudio2 ${PORTAUDIO_CFLAGS}"
fi
if [ -e "/usr/include/portaudio2/portaudio.h" ]; then
PORTAUDIO_CFLAGS="-I/usr/include/portaudio2 ${PORTAUDIO_CFLAGS}"
fi
if [ -e "/opt/local/include/portaudio2/portaudio.h" ]; then
PORTAUDIO_CFLAGS="-I/opt/local/include/portaudio2 ${PORTAUDIO_CFLAGS}"
fi
if [ -e "/opt/include/portaudio2/portaudio.h" ]; then
PORTAUDIO_CFLAGS="-I/opt/include/portaudio2 ${PORTAUDIO_CFLAGS}"
fi
if [ -e "/usr/pkg/include/portaudio2/portaudio.h" ]; then
PORTAUDIO_CFLAGS="-I/usr/pkg/include/portaudio2 ${PORTAUDIO_CFLAGS}"
fi
else
PORTAUDIO_CFLAGS=""
PORTAUDIO_LIBS=""
if [ "${prefix_portaudio}" != "" ]; then
if [ -e "${prefix_portaudio}/include/portaudio.h" ]; then
PORTAUDIO_CFLAGS="-I${prefix_portaudio}/include ${PTHREADS_CFLAGS}"
PORTAUDIO_LIBS="-L${prefix_portaudio}/lib -lportaudio ${PTHREADS_LIBS}"
PORTAUDIO_VERSION="18.0"
fi
else
if [ -e "/usr/local/include/portaudio.h" ]; then
PORTAUDIO_CFLAGS="-I/usr/local/include ${PTHREADS_CFLAGS}"
PORTAUDIO_LIBS="-L/usr/local/lib -lportaudio ${PTHREADS_LIBS}"
PORTAUDIO_VERSION="18.0"
fi
if [ -e "/usr/include/portaudio.h" ]; then
PORTAUDIO_CFLAGS="-I/usr/include ${PTHREADS_CFLAGS}"
PORTAUDIO_LIBS="-L/usr/lib -lportaudio ${PTHREADS_LIBS}"
PORTAUDIO_VERSION="18.0"
fi
if [ -e "/opt/local/include/portaudio.h" ]; then
PORTAUDIO_CFLAGS="-I/opt/local/include ${PTHREADS_CFLAGS}"
PORTAUDIO_LIBS="-L/opt/local/lib -lportaudio ${PTHREADS_LIBS}"
PORTAUDIO_VERSION="18.0"
fi
if [ -e "/opt/include/portaudio.h" ]; then
PORTAUDIO_CFLAGS="-I/opt/include ${PTHREADS_CFLAGS}"
PORTAUDIO_LIBS="-L/opt/lib -lportaudio ${PTHREADS_LIBS}"
PORTAUDIO_VERSION="18.0"
fi
if [ -e "/usr/pkg/include/portaudio.h" ]; then
PORTAUDIO_CFLAGS="-I/usr/pkg/include ${PTHREADS_CFLAGS}"
PORTAUDIO_LIBS="-L/usr/pkg/lib -lportaudio ${PTHREADS_LIBS}"
PORTAUDIO_VERSION="18.0"
fi
fi
fi
if [ "${PORTAUDIO_VERSION}" != "" ]; then
if [ "${prefix_portaudio}" != "" ]; then
echo "yes ($PORTAUDIO_VERSION in ${prefix_portaudio})"
echo "# yes ($PORTAUDIO_VERSION in ${prefix_portaudio})" >>config.log
else
echo "yes ($PORTAUDIO_VERSION)"
echo "# yes ($PORTAUDIO_VERSION)" >>config.log
fi
MK_VERSION_MAJOR=`echo "$PORTAUDIO_VERSION" |sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\).*/\1/'`;
MK_VERSION_MINOR=`echo "$PORTAUDIO_VERSION" |sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\).*/\2/'`;
MK_VERSION_OK=no
if [ $MK_VERSION_MAJOR -gt 19 ]; then
MK_VERSION_OK=yes
elif [ $MK_VERSION_MAJOR -eq 19 ]; then
if [ "$MK_VERSION_MINOR" = '' ]; then
MK_VERSION_OK=yes
else
if [ $MK_VERSION_MINOR -ge 0 ]; then
MK_VERSION_OK=yes
fi
fi
fi
if [ "${MK_VERSION_OK}" = "no" ]; then
echo '*'
echo '# *' >>config.log
echo "* Minimum required version is 19.0 (found $PORTAUDIO_VERSION)"
echo "# * Minimum required version is 19.0 (found $PORTAUDIO_VERSION)" >>config.log
echo '*'
echo '# *' >>config.log
fi
else
if [ "${prefix_portaudio}" != "" ]; then
echo "no (not in ${prefix_portaudio})"
echo "# no (not in ${prefix_portaudio})" >>config.log
else
echo 'no'
echo '# no' >>config.log
fi
MK_VERSION_OK="no"
fi
if [ "${MK_VERSION_OK}" = "yes" ]; then
$ECHO_N 'checking whether PortAudio2 works...'
$ECHO_N '# checking whether PortAudio2 works...' >>config.log
MK_COMPILE_STATUS=OK
cat << EOT >conftest$$.c
#include
#include
int
main(int argc, char *argv[])
{
int rv;
if ((rv = Pa_Initialize()) != paNoError) {
if (Pa_IsFormatSupported(NULL, NULL, 48000.0) != 0) {
return (0);
} else {
return (rv);
}
} else {
Pa_Terminate();
return (0);
}
}
EOT
echo >>config.log
echo '# C: HAVE_PORTAUDIO' >>config.log
echo "cat << EOT >conftest$$.c" >>config.log
cat conftest$$.c>>config.log
echo EOT >>config.log
echo "$CC $CFLAGS $TEST_CFLAGS ${PORTAUDIO_CFLAGS} -o $testdir/conftest$$ conftest$$.c ${PORTAUDIO_LIBS} 2>>config.log">>config.log
$CC $CFLAGS $TEST_CFLAGS ${PORTAUDIO_CFLAGS} -o $testdir/conftest$$ conftest$$.c ${PORTAUDIO_LIBS} 2>>config.log
if [ "$?" != "0" ]; then
echo "# failed $?" >>config.log
MK_COMPILE_STATUS="FAIL $?"
fi
if [ "${MK_COMPILE_STATUS}" = "OK" ]; then
echo 'yes'
echo '# yes' >>config.log
HAVE_PORTAUDIO=yes
echo "hdefs[\"HAVE_PORTAUDIO\"] = \"$HAVE_PORTAUDIO\"" >>configure.lua
else
echo 'no'
echo '# no' >>config.log
HAVE_PORTAUDIO=no
echo 'hdefs["HAVE_PORTAUDIO"] = nil' >>configure.lua
fi
if [ "${keep_conftest}" != "yes" ]; then
rm -f conftest$$.c $testdir/conftest$$$EXECSUFFIX
fi
if [ "${HAVE_PORTAUDIO}" = "yes" ]; then
echo "hdefs[\"PORTAUDIO_CFLAGS\"] = \"$PORTAUDIO_CFLAGS\"" >>configure.lua
echo "hdefs[\"PORTAUDIO_LIBS\"] = \"$PORTAUDIO_LIBS\"" >>configure.lua
else
echo 'hdefs["PORTAUDIO_CFLAGS"] = nil' >>configure.lua
PORTAUDIO_CFLAGS=""
echo 'hdefs["PORTAUDIO_LIBS"] = nil' >>configure.lua
PORTAUDIO_LIBS=""
fi
else
echo 'hdefs["HAVE_PORTAUDIO"] = nil' >>configure.lua
echo 'hdefs["PORTAUDIO_CFLAGS"] = nil' >>configure.lua
echo 'hdefs["PORTAUDIO_LIBS"] = nil' >>configure.lua
fi
if [ "${HAVE_PORTAUDIO}" = "yes" ]; then
PORTAUDIO_PC="portaudio-2.0"
else
PORTAUDIO_PC=""
fi
# END portaudio
if [ "${HAVE_PORTAUDIO}" != "yes" ]; then
echo '* '
echo '# * ' >>config.log
echo "* $PACKAGE requires PortAudio2 (version 19.0 or newer)."
echo "# * $PACKAGE requires PortAudio2 (version 19.0 or newer)." >>config.log
echo '* WWW: http://www.portaudio.com'
echo '# * WWW: http://www.portaudio.com' >>config.log
echo '* '
echo '# * ' >>config.log
echo "***"
echo "*** ERROR: Required dependency portaudio not found"
echo "*** Failed! See ./config.log for more details."
echo "***"
exit 1
fi
if [ "${MK_VERSION_OK}" != "yes" ]; then
echo '* '
echo '# * ' >>config.log
echo '* This software requires portaudio version >= 19.0,'
echo '# * This software requires portaudio version >= 19.0,' >>config.log
echo '* please update that package and try again.'
echo '# * please update that package and try again.' >>config.log
echo '* WWW: http://www.portaudio.com'
echo '# * WWW: http://www.portaudio.com' >>config.log
echo '* '
echo '# * ' >>config.log
echo "***"
echo "*** ERROR: Required dependency portaudio version mismatch"
echo "*** Failed! See ./config.log for more details."
echo "***"
exit 1
fi
LIBDIR="$PREFIX/lib/vislak"
LIBDIR="$PREFIX/lib/vislak"
echo "hdefs[\"LIBDIR\"] = \"$LIBDIR\"" >>configure.lua
SHAREDIR="$PREFIX/share/vislak"
SHAREDIR="$PREFIX/share/vislak"
echo "hdefs[\"SHAREDIR\"] = \"$SHAREDIR\"" >>configure.lua
MODULEDIR="$PREFIX/lib/vislak"
MODULEDIR="$PREFIX/lib/vislak"
echo "hdefs[\"MODULEDIR\"] = \"$MODULEDIR\"" >>configure.lua
CFLAGS="$CFLAGS -I$SRC"
CXXFLAGS="$CXXFLAGS -I$SRC"
if [ "${enable_warnings}" = "yes" ]
then
CFLAGS="$CFLAGS -Wall"
CXXFLAGS="$CXXFLAGS -Wall"
CFLAGS="$CFLAGS -Werror"
CXXFLAGS="$CXXFLAGS -Werror"
CFLAGS="$CFLAGS -Wno-unused"
CXXFLAGS="$CXXFLAGS -Wno-unused"
CFLAGS="$CFLAGS -Wmissing-prototypes"
CXXFLAGS="$CXXFLAGS -Wmissing-prototypes"
fi
if [ "${enable_debug}" = "yes" ]
then
CFLAGS="${CFLAGS} -g -DVS_DEBUG"
fi
if [ "${enable_nls}" = "yes" ]
then
$ECHO_N 'checking for a gettext library in libc...'
$ECHO_N '# checking for a gettext library in libc...' >>config.log
# BEGIN gettext(0 ${prefix_gettext})
GETTEXT_CFLAGS=""
GETTEXT_LIBS=""
MK_COMPILE_STATUS=OK
cat << EOT >conftest$$.c
#include
int main(int argc, char *argv[])
{
char *s;
bindtextdomain("foo", "/foo");
textdomain("foo");
s = gettext("string");
s = dgettext("foo","string");
return (s != NULL);
}
EOT
echo >>config.log
echo '# C: HAVE_GETTEXT' >>config.log
echo "cat << EOT >conftest$$.c" >>config.log
cat conftest$$.c>>config.log
echo EOT >>config.log
echo "$CC $CFLAGS $TEST_CFLAGS ${GETTEXT_CFLAGS} -o $testdir/conftest$$ conftest$$.c ${GETTEXT_LIBS} 2>>config.log">>config.log
$CC $CFLAGS $TEST_CFLAGS ${GETTEXT_CFLAGS} -o $testdir/conftest$$ conftest$$.c ${GETTEXT_LIBS} 2>>config.log
if [ "$?" != "0" ]; then
echo "# failed $?" >>config.log
MK_COMPILE_STATUS="FAIL $?"
fi
if [ "${MK_COMPILE_STATUS}" = "OK" ]; then
echo 'yes'
echo '# yes' >>config.log
HAVE_GETTEXT=yes
echo "hdefs[\"HAVE_GETTEXT\"] = \"$HAVE_GETTEXT\"" >>configure.lua
else
echo 'no'
echo '# no' >>config.log
HAVE_GETTEXT=no
echo 'hdefs["HAVE_GETTEXT"] = nil' >>configure.lua
fi
if [ "${keep_conftest}" != "yes" ]; then
rm -f conftest$$.c $testdir/conftest$$$EXECSUFFIX
fi
if [ "${HAVE_GETTEXT}" = "no" ]; then
$ECHO_N 'checking for a gettext library in -lintl...'
$ECHO_N '# checking for a gettext library in -lintl...' >>config.log
if [ "${prefix_gettext}" != "" ]; then
if [ -e "${prefix_gettext}/include/libintl.h" ]; then
GETTEXT_CFLAGS="-I${prefix_gettext}/include"
GETTEXT_LIBS="-L${prefix_gettext}/lib -lintl"
fi
else
if [ -e "${prefix_gettext}/include/libintl.h" ]; then
GETTEXT_CFLAGS="-I${prefix_gettext}/include"
GETTEXT_LIBS="-L${prefix_gettext}/lib -lintl"
fi
if [ -e "/usr/include/libintl.h" ]; then
GETTEXT_CFLAGS="-I/usr/include"
GETTEXT_LIBS="-L/usr/lib -lintl"
fi
if [ -e "/usr/local/include/libintl.h" ]; then
GETTEXT_CFLAGS="-I/usr/local/include"
GETTEXT_LIBS="-L/usr/local/lib -lintl"
fi
if [ -e "/opt/include/libintl.h" ]; then
GETTEXT_CFLAGS="-I/opt/include"
GETTEXT_LIBS="-L/opt/lib -lintl"
fi
if [ -e "/opt/local/include/libintl.h" ]; then
GETTEXT_CFLAGS="-I/opt/local/include"
GETTEXT_LIBS="-L/opt/local/lib -lintl"
fi
if [ -e "/usr/pkg/include/libintl.h" ]; then
GETTEXT_CFLAGS="-I/usr/pkg/include"
GETTEXT_LIBS="-L/usr/pkg/lib -lintl"
fi
fi
MK_COMPILE_STATUS=OK
cat << EOT >conftest$$.c
#include
int main(int argc, char *argv[])
{
char *s;
bindtextdomain("foo", "/foo");
textdomain("foo");
s = gettext("string");
s = dgettext("foo","string");
return (s != NULL);
}
EOT
echo >>config.log
echo '# C: HAVE_GETTEXT' >>config.log
echo "cat << EOT >conftest$$.c" >>config.log
cat conftest$$.c>>config.log
echo EOT >>config.log
echo "$CC $CFLAGS $TEST_CFLAGS ${GETTEXT_CFLAGS} -o $testdir/conftest$$ conftest$$.c ${GETTEXT_LIBS} 2>>config.log">>config.log
$CC $CFLAGS $TEST_CFLAGS ${GETTEXT_CFLAGS} -o $testdir/conftest$$ conftest$$.c ${GETTEXT_LIBS} 2>>config.log
if [ "$?" != "0" ]; then
echo "# failed $?" >>config.log
MK_COMPILE_STATUS="FAIL $?"
fi
if [ "${MK_COMPILE_STATUS}" = "OK" ]; then
echo 'yes'
echo '# yes' >>config.log
HAVE_GETTEXT=yes
echo "hdefs[\"HAVE_GETTEXT\"] = \"$HAVE_GETTEXT\"" >>configure.lua
else
echo 'no'
echo '# no' >>config.log
HAVE_GETTEXT=no
echo 'hdefs["HAVE_GETTEXT"] = nil' >>configure.lua
fi
if [ "${keep_conftest}" != "yes" ]; then
rm -f conftest$$.c $testdir/conftest$$$EXECSUFFIX
fi
if [ "${HAVE_GETTEXT}" = "yes" ]; then
echo "hdefs[\"GETTEXT_CFLAGS\"] = \"$GETTEXT_CFLAGS\"" >>configure.lua
echo "hdefs[\"GETTEXT_LIBS\"] = \"$GETTEXT_LIBS\"" >>configure.lua
else
$ECHO_N 'checking whether -lintl requires -liconv...'
$ECHO_N '# checking whether -lintl requires -liconv...' >>config.log
if [ "${prefix_gettext}" != "" ]; then
if [ -e "${prefix_gettext}/include/iconv.h" ]; then
GETTEXT_CFLAGS="${GETTEXT_CFLAGS} -I${prefix_gettext}/include"
GETTEXT_LIBS="${GETTEXT_LIBS} -L${prefix_gettext}/lib -liconv"
fi
else
if [ -e "${prefix_gettext}/include/iconv.h" ]; then
GETTEXT_CFLAGS="${GETTEXT_CFLAGS} -I${prefix_gettext}/include"
GETTEXT_LIBS="${GETTEXT_LIBS} -L${prefix_gettext}/lib -liconv"
fi
if [ -e "/usr/include/iconv.h" ]; then
GETTEXT_CFLAGS="${GETTEXT_CFLAGS} -I/usr/include"
GETTEXT_LIBS="${GETTEXT_LIBS} -L/usr/lib -liconv"
fi
if [ -e "/usr/local/include/iconv.h" ]; then
GETTEXT_CFLAGS="${GETTEXT_CFLAGS} -I/usr/local/include"
GETTEXT_LIBS="${GETTEXT_LIBS} -L/usr/local/lib -liconv"
fi
if [ -e "/opt/include/iconv.h" ]; then
GETTEXT_CFLAGS="${GETTEXT_CFLAGS} -I/opt/include"
GETTEXT_LIBS="${GETTEXT_LIBS} -L/opt/lib -liconv"
fi
if [ -e "/opt/local/include/iconv.h" ]; then
GETTEXT_CFLAGS="${GETTEXT_CFLAGS} -I/opt/local/include"
GETTEXT_LIBS="${GETTEXT_LIBS} -L/opt/local/lib -liconv"
fi
if [ -e "/usr/pkg/include/iconv.h" ]; then
GETTEXT_CFLAGS="${GETTEXT_CFLAGS} -I/usr/pkg/include"
GETTEXT_LIBS="${GETTEXT_LIBS} -L/usr/pkg/lib -liconv"
fi
fi
MK_COMPILE_STATUS=OK
cat << EOT >conftest$$.c
#include
int main(int argc, char *argv[])
{
char *s;
bindtextdomain("foo", "/foo");
textdomain("foo");
s = gettext("string");
s = dgettext("foo","string");
return (s != NULL);
}
EOT
echo >>config.log
echo '# C: HAVE_GETTEXT' >>config.log
echo "cat << EOT >conftest$$.c" >>config.log
cat conftest$$.c>>config.log
echo EOT >>config.log
echo "$CC $CFLAGS $TEST_CFLAGS ${GETTEXT_CFLAGS} -o $testdir/conftest$$ conftest$$.c ${GETTEXT_LIBS} 2>>config.log">>config.log
$CC $CFLAGS $TEST_CFLAGS ${GETTEXT_CFLAGS} -o $testdir/conftest$$ conftest$$.c ${GETTEXT_LIBS} 2>>config.log
if [ "$?" != "0" ]; then
echo "# failed $?" >>config.log
MK_COMPILE_STATUS="FAIL $?"
fi
if [ "${MK_COMPILE_STATUS}" = "OK" ]; then
echo 'yes'
echo '# yes' >>config.log
HAVE_GETTEXT=yes
echo "hdefs[\"HAVE_GETTEXT\"] = \"$HAVE_GETTEXT\"" >>configure.lua
else
echo 'no'
echo '# no' >>config.log
HAVE_GETTEXT=no
echo 'hdefs["HAVE_GETTEXT"] = nil' >>configure.lua
fi
if [ "${keep_conftest}" != "yes" ]; then
rm -f conftest$$.c $testdir/conftest$$$EXECSUFFIX
fi
if [ "${HAVE_GETTEXT}" = "yes" ]; then
echo "hdefs[\"GETTEXT_CFLAGS\"] = \"$GETTEXT_CFLAGS\"" >>configure.lua
echo "hdefs[\"GETTEXT_LIBS\"] = \"$GETTEXT_LIBS\"" >>configure.lua
else
echo 'hdefs["GETTEXT_CFLAGS"] = nil' >>configure.lua
GETTEXT_CFLAGS=""
echo 'hdefs["GETTEXT_LIBS"] = nil' >>configure.lua
GETTEXT_LIBS=""
fi
fi
else
echo 'hdefs["GETTEXT_CFLAGS"] = nil' >>configure.lua
echo 'hdefs["GETTEXT_LIBS"] = nil' >>configure.lua
fi
# END gettext
if [ "${HAVE_GETTEXT}" != "yes" ]
then
echo "*"
echo "* --enable-nls was given but gettext was not found. Try"
echo "* running configure again without this option."
echo "*"
exit 1
fi
fi
echo "*"
echo "* Configuration successful."
echo "* Use make && make install to build and install Vislak."
echo "*"
echo "AGAR_CFLAGS=$AGAR_CFLAGS" >>Makefile.config
echo "mdefs[\"AGAR_CFLAGS\"] = \"$AGAR_CFLAGS\"" >>configure.lua
echo "AGAR_LIBS=$AGAR_LIBS" >>Makefile.config
echo "mdefs[\"AGAR_LIBS\"] = \"$AGAR_LIBS\"" >>configure.lua
echo "AGAR_MATH_CFLAGS=$AGAR_MATH_CFLAGS" >>Makefile.config
echo "mdefs[\"AGAR_MATH_CFLAGS\"] = \"$AGAR_MATH_CFLAGS\"" >>configure.lua
echo "AGAR_MATH_LIBS=$AGAR_MATH_LIBS" >>Makefile.config
echo "mdefs[\"AGAR_MATH_LIBS\"] = \"$AGAR_MATH_LIBS\"" >>configure.lua
echo "ALSA_CFLAGS=$ALSA_CFLAGS" >>Makefile.config
echo "mdefs[\"ALSA_CFLAGS\"] = \"$ALSA_CFLAGS\"" >>configure.lua
echo "ALSA_LIBS=$ALSA_LIBS" >>Makefile.config
echo "mdefs[\"ALSA_LIBS\"] = \"$ALSA_LIBS\"" >>configure.lua
echo "BINDIR=$BINDIR" >>Makefile.config
echo "mdefs[\"BINDIR\"] = \"$BINDIR\"" >>configure.lua
echo "CC=$CC" >>Makefile.config
echo "mdefs[\"CC\"] = \"$CC\"" >>configure.lua
echo "CC_COMPILE=$CC_COMPILE" >>Makefile.config
echo "mdefs[\"CC_COMPILE\"] = \"$CC_COMPILE\"" >>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 "GETTEXT_CFLAGS=$GETTEXT_CFLAGS" >>Makefile.config
echo "mdefs[\"GETTEXT_CFLAGS\"] = \"$GETTEXT_CFLAGS\"" >>configure.lua
echo "GETTEXT_LIBS=$GETTEXT_LIBS" >>Makefile.config
echo "mdefs[\"GETTEXT_LIBS\"] = \"$GETTEXT_LIBS\"" >>configure.lua
echo "HAVE_AGAR=$HAVE_AGAR" >>Makefile.config
echo "mdefs[\"HAVE_AGAR\"] = \"$HAVE_AGAR\"" >>configure.lua
echo "HAVE_AGAR_MATH=$HAVE_AGAR_MATH" >>Makefile.config
echo "mdefs[\"HAVE_AGAR_MATH\"] = \"$HAVE_AGAR_MATH\"" >>configure.lua
echo "HAVE_ALSA=$HAVE_ALSA" >>Makefile.config
echo "mdefs[\"HAVE_ALSA\"] = \"$HAVE_ALSA\"" >>configure.lua
echo "HAVE_CC=$HAVE_CC" >>Makefile.config
echo "mdefs[\"HAVE_CC\"] = \"$HAVE_CC\"" >>configure.lua
echo "HAVE_CC65=$HAVE_CC65" >>Makefile.config
echo "mdefs[\"HAVE_CC65\"] = \"$HAVE_CC65\"" >>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_CYGWIN=$HAVE_CYGWIN" >>Makefile.config
echo "mdefs[\"HAVE_CYGWIN\"] = \"$HAVE_CYGWIN\"" >>configure.lua
echo "HAVE_GETTEXT=$HAVE_GETTEXT" >>Makefile.config
echo "mdefs[\"HAVE_GETTEXT\"] = \"$HAVE_GETTEXT\"" >>configure.lua
echo "HAVE_JPEG=$HAVE_JPEG" >>Makefile.config
echo "mdefs[\"HAVE_JPEG\"] = \"$HAVE_JPEG\"" >>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_PORTAUDIO=$HAVE_PORTAUDIO" >>Makefile.config
echo "mdefs[\"HAVE_PORTAUDIO\"] = \"$HAVE_PORTAUDIO\"" >>configure.lua
echo "HAVE_PTHREADS=$HAVE_PTHREADS" >>Makefile.config
echo "mdefs[\"HAVE_PTHREADS\"] = \"$HAVE_PTHREADS\"" >>configure.lua
echo "HAVE_PTHREADS_XOPEN=$HAVE_PTHREADS_XOPEN" >>Makefile.config
echo "mdefs[\"HAVE_PTHREADS_XOPEN\"] = \"$HAVE_PTHREADS_XOPEN\"" >>configure.lua
echo "HAVE_PTHREAD_COND_T_POINTER=$HAVE_PTHREAD_COND_T_POINTER" >>Makefile.config
echo "mdefs[\"HAVE_PTHREAD_COND_T_POINTER\"] = \"$HAVE_PTHREAD_COND_T_POINTER\"" >>configure.lua
echo "HAVE_PTHREAD_MUTEX_RECURSIVE=$HAVE_PTHREAD_MUTEX_RECURSIVE" >>Makefile.config
echo "mdefs[\"HAVE_PTHREAD_MUTEX_RECURSIVE\"] = \"$HAVE_PTHREAD_MUTEX_RECURSIVE\"" >>configure.lua
echo "HAVE_PTHREAD_MUTEX_RECURSIVE_NP=$HAVE_PTHREAD_MUTEX_RECURSIVE_NP" >>Makefile.config
echo "mdefs[\"HAVE_PTHREAD_MUTEX_RECURSIVE_NP\"] = \"$HAVE_PTHREAD_MUTEX_RECURSIVE_NP\"" >>configure.lua
echo "HAVE_PTHREAD_MUTEX_T_POINTER=$HAVE_PTHREAD_MUTEX_T_POINTER" >>Makefile.config
echo "mdefs[\"HAVE_PTHREAD_MUTEX_T_POINTER\"] = \"$HAVE_PTHREAD_MUTEX_T_POINTER\"" >>configure.lua
echo "HAVE_PTHREAD_T_POINTER=$HAVE_PTHREAD_T_POINTER" >>Makefile.config
echo "mdefs[\"HAVE_PTHREAD_T_POINTER\"] = \"$HAVE_PTHREAD_T_POINTER\"" >>configure.lua
echo "HAVE_SNDFILE=$HAVE_SNDFILE" >>Makefile.config
echo "mdefs[\"HAVE_SNDFILE\"] = \"$HAVE_SNDFILE\"" >>configure.lua
echo "JPEG_CFLAGS=$JPEG_CFLAGS" >>Makefile.config
echo "mdefs[\"JPEG_CFLAGS\"] = \"$JPEG_CFLAGS\"" >>configure.lua
echo "JPEG_LIBS=$JPEG_LIBS" >>Makefile.config
echo "mdefs[\"JPEG_LIBS\"] = \"$JPEG_LIBS\"" >>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 "PACKAGE=$PACKAGE" >>Makefile.config
echo "mdefs[\"PACKAGE\"] = \"$PACKAGE\"" >>configure.lua
echo "PATH_SEPARATOR=$PATH_SEPARATOR" >>Makefile.config
echo "mdefs[\"PATH_SEPARATOR\"] = \"$PATH_SEPARATOR\"" >>configure.lua
echo "PKGCONFIG=$PKGCONFIG" >>Makefile.config
echo "mdefs[\"PKGCONFIG\"] = \"$PKGCONFIG\"" >>configure.lua
echo "PKGCONFIG_LIBDIR=$PKGCONFIG_LIBDIR" >>Makefile.config
echo "mdefs[\"PKGCONFIG_LIBDIR\"] = \"$PKGCONFIG_LIBDIR\"" >>configure.lua
echo "PORTAUDIO_CFLAGS=$PORTAUDIO_CFLAGS" >>Makefile.config
echo "mdefs[\"PORTAUDIO_CFLAGS\"] = \"$PORTAUDIO_CFLAGS\"" >>configure.lua
echo "PORTAUDIO_LIBS=$PORTAUDIO_LIBS" >>Makefile.config
echo "mdefs[\"PORTAUDIO_LIBS\"] = \"$PORTAUDIO_LIBS\"" >>configure.lua
echo "PROG_BUNDLE=$PROG_BUNDLE" >>Makefile.config
echo "mdefs[\"PROG_BUNDLE\"] = \"$PROG_BUNDLE\"" >>configure.lua
echo "PROG_CLI_CFLAGS=$PROG_CLI_CFLAGS" >>Makefile.config
echo "mdefs[\"PROG_CLI_CFLAGS\"] = \"$PROG_CLI_CFLAGS\"" >>configure.lua
echo "PROG_CLI_FLAGS=$PROG_CLI_FLAGS" >>Makefile.config
echo "mdefs[\"PROG_CLI_FLAGS\"] = \"$PROG_CLI_FLAGS\"" >>configure.lua
echo "PROG_GUI_CFLAGS=$PROG_GUI_CFLAGS" >>Makefile.config
echo "mdefs[\"PROG_GUI_CFLAGS\"] = \"$PROG_GUI_CFLAGS\"" >>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 "PTHREADS_CFLAGS=$PTHREADS_CFLAGS" >>Makefile.config
echo "mdefs[\"PTHREADS_CFLAGS\"] = \"$PTHREADS_CFLAGS\"" >>configure.lua
echo "PTHREADS_LIBS=$PTHREADS_LIBS" >>Makefile.config
echo "mdefs[\"PTHREADS_LIBS\"] = \"$PTHREADS_LIBS\"" >>configure.lua
echo "PTHREADS_XOPEN_CFLAGS=$PTHREADS_XOPEN_CFLAGS" >>Makefile.config
echo "mdefs[\"PTHREADS_XOPEN_CFLAGS\"] = \"$PTHREADS_XOPEN_CFLAGS\"" >>configure.lua
echo "PTHREADS_XOPEN_LIBS=$PTHREADS_XOPEN_LIBS" >>Makefile.config
echo "mdefs[\"PTHREADS_XOPEN_LIBS\"] = \"$PTHREADS_XOPEN_LIBS\"" >>configure.lua
echo "RELEASE=$RELEASE" >>Makefile.config
echo "mdefs[\"RELEASE\"] = \"$RELEASE\"" >>configure.lua
echo "SHAREDIR=$SHAREDIR" >>Makefile.config
echo "mdefs[\"SHAREDIR\"] = \"$SHAREDIR\"" >>configure.lua
echo "SNDFILE_CFLAGS=$SNDFILE_CFLAGS" >>Makefile.config
echo "mdefs[\"SNDFILE_CFLAGS\"] = \"$SNDFILE_CFLAGS\"" >>configure.lua
echo "SNDFILE_LIBS=$SNDFILE_LIBS" >>Makefile.config
echo "mdefs[\"SNDFILE_LIBS\"] = \"$SNDFILE_LIBS\"" >>configure.lua
echo "STATEDIR=$STATEDIR" >>Makefile.config
echo "mdefs[\"STATEDIR\"] = \"$STATEDIR\"" >>configure.lua
echo "SYSCONFDIR=$SYSCONFDIR" >>Makefile.config
echo "mdefs[\"SYSCONFDIR\"] = \"$SYSCONFDIR\"" >>configure.lua
echo "VERSION=$VERSION" >>Makefile.config
echo "mdefs[\"VERSION\"] = \"$VERSION\"" >>configure.lua
if [ "${srcdir}" != '' ]; then
$ECHO_N "preparing build environment (source in ${srcdir})..."
${PERL} ${SRC}/mk/mkconcurrent.pl ${SRC}
if [ $? != 0 ]; then
exit 1;
fi
echo 'ok'
fi
echo '**'
echo '** Configuration successful!'
echo '**'
echo '** Use "make depend all" to compile. When finished,'
$ECHO_N '** run "make install" to install under '
echo "${PREFIX}."
echo '**'