configure

This commit is contained in:
Wengier
2021-03-07 04:42:41 -05:00
parent a13ff3b34c
commit c136cc1052

View File

@@ -240,7 +240,7 @@ LIBS_BACKUP=$LIBS;
LIBS="$LIBS -lm";
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <math.h>]],[[
powf(1.0f, 1.0f);
]])], [AC_MSG_RESULT(yes)], [AC_DEFINE([DB_HAVE_NO_POWF],[1],[libm doesnt include powf])])
]])], [AC_MSG_RESULT(yes)], [AC_DEFINE([DB_HAVE_NO_POWF],[1],[libm does not include powf])])
LIBS=$LIBS_BACKUP
dnl Look for clock_gettime, a DB_HAVE_CLOCK_GETTIME is set when present
@@ -602,6 +602,10 @@ dnl LIBRARY TEST: libpcap
AC_CHECK_HEADER(pcap.h,have_pcap_h=yes,)
AC_CHECK_LIB(pcap, pcap_open_live, have_pcap_lib=yes, ,-lz)
dnl LIBRARY TEST: libslirp
AC_CHECK_HEADER(slirp/libslirp.h,have_slirp_h=yes,)
AC_CHECK_LIB(slirp, slirp_input, have_slirp_lib=yes, ,-lz)
dnl LIBRARY TEST: libiconv
dnl This may be provided by glibc itself, -liconv may not be needed.
AC_CHECK_HEADER(iconv.h,have_iconv_h=yes,)
@@ -649,10 +653,10 @@ AM_CONDITIONAL(C_FREETYPE, test "x$enable_freetype" = "xyes")
if test x$enable_freetype = xyes; then
AC_MSG_CHECKING(for freetype)
if test x$INTERNAL_FREETYPE = x1; then
CFLAGS="-I$pwd/vs2015/freetype/linux-host/include/freetype2 $CFLAGS"
LDFLAGS="-L$top/vs2015/freetype/linux-host/lib -lfreetype $LDFLAGS"
CPPFLAGS="-I$pwd/vs2015/freetype/linux-host/include/freetype2 $CPPFLAGS"
CXXFLAGS="-I$pwd/vs2015/freetype/linux-host/include/freetype2 $CXXFLAGS"
CFLAGS="$CFLAGS -I$pwd/vs2015/freetype/linux-host/include/freetype2"
LDFLAGS="$LDFLAGS -L$top/vs2015/freetype/linux-host/lib -lfreetype"
CPPFLAGS="$CPPFLAGS -I$pwd/vs2015/freetype/linux-host/include/freetype2"
CXXFLAGS="$CXXFLAGS -I$pwd/vs2015/freetype/linux-host/include/freetype2"
else
pkg-config --exists freetype2; RES=$?
if test x$RES = x0; then
@@ -660,10 +664,10 @@ if test x$enable_freetype = xyes; then
CPPFLAGS="$CPPFLAGS "`pkg-config freetype2 --cflags`
LIBS="$LIBS "`pkg-config freetype2 --libs`
else
CFLAGS="-I$pwd/vs2015/freetype/linux-host/include/freetype2 $CFLAGS"
LDFLAGS="-L$top/vs2015/freetype/linux-host/lib -lfreetype $LDFLAGS"
CPPFLAGS="-I$pwd/vs2015/freetype/linux-host/include/freetype2 $CPPFLAGS"
CXXFLAGS="-I$pwd/vs2015/freetype/linux-host/include/freetype2 $CXXFLAGS"
CFLAGS="$CFLAGS -I$pwd/vs2015/freetype/linux-host/include/freetype2"
LDFLAGS="$LDFLAGS -L$top/vs2015/freetype/linux-host/lib -lfreetype"
CPPFLAGS="$CPPFLAGS -I$pwd/vs2015/freetype/linux-host/include/freetype2"
CXXFLAGS="$CXXFLAGS -I$pwd/vs2015/freetype/linux-host/include/freetype2"
fi
AC_DEFINE(C_FREETYPE,1)
AC_MSG_RESULT(yes)
@@ -993,14 +997,16 @@ esac
dnl FEATURE: Whether to use libslirp, and enable userspace TCP/IP emulation
AH_TEMPLATE(C_SLIRP, [Define to 1 to enable userspace TCP/IP emulation, requires libslirp])
PKG_CHECK_MODULES(libslirp, slirp, [
have_slirp=yes
AC_DEFINE(C_SLIRP,1)
LIBS="$LIBS ${libslirp_LIBS}"
CFLAGS="$CFLAGS ${libslirp_CFLAGS}"
CPPFLAGS="$CPPFLAGS ${libslirp_CFLAGS}"], [
have_slirp=no
AC_MSG_WARN([Can't find libslirp, userspace TCP/IP emulation disabled])])
if test x$have_slirp_lib = xyes -a x$have_slirp_h = xyes ; then
have_slirp=yes
AC_DEFINE(C_SLIRP,1)
LIBS="$LIBS ${libslirp_LIBS}"
CFLAGS="$CFLAGS ${libslirp_CFLAGS}"
CPPFLAGS="$CPPFLAGS ${libslirp_CFLAGS}"
else
have_slirp=no
AC_MSG_WARN([Can't find libslirp, userspace TCP/IP emulation disabled])
fi
case "$host" in
*-*-cygwin* | *-*-mingw32*)
if test x$have_slirp = xyes; then