Fix #12834 - Set minimum version for libuv to 1.0.0 ##build

This commit is contained in:
Florian Märkl 2019-01-20 00:06:34 +01:00 committed by radare
parent d3b487f265
commit 6a10d9d6f7
3 changed files with 30 additions and 24 deletions

32
configure vendored
View File

@ -1,5 +1,5 @@
#!/bin/sh
# This script was automatically generated by ACR v1.7.0
# This script was automatically generated by ACR v1.7.1
# @author: pancake <nopcode.org>
# @url: http://www.nopcode.org
# @repo: git clone https://github.com/radare/acr
@ -164,8 +164,7 @@ System types:
--target=TARGET configure for building compilers for TARGET [HOST]
EOF2
printf "
Optional Features:
printf "\nOptional Features:
--disable-debugger disable native debugger features
--with-sysmagic force to use system's magic
--disable-loadlibs disable loading plugins
@ -182,10 +181,8 @@ Optional Features:
--with-ostype Choose OS type ( gnulinux windows darwin haiku ) (USEROSTYPE=auto)
--with-libversion specify different libversion (LIBVERSION=xxx)
--without-jemalloc build without jemalloc
--with-checks-level value between 0 and 3 to enable different level of assert (see R_CHECKS_LEVEL) (R_CHECKS_LEVEL=2)
"
printf "
Some influential environment variables:
--with-checks-level value between 0 and 3 to enable different level of assert (see R_CHECKS_LEVEL) (R_CHECKS_LEVEL=2)\n"
printf "\nSome influential environment variables:
CC C compiler command
CFLAGS C compiler flags
CPPFLAGS C preprocessor flags
@ -193,10 +190,8 @@ Some influential environment variables:
nonstandard directory <lib dir>
CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
headers in a nonstandard directory <include dir>
CPP C preprocessor
"
printf "
Report bugs to: pancake <pancake@nopcode.org>"
CPP C preprocessor\n"
printf "\nReport bugs to: pancake <pancake@nopcode.org>"
echo ""
exit 0
}
@ -209,7 +204,7 @@ take_environ() {
}
show_version() {
echo "radare2-3.3.0-git configuration script done with acr v1.7.0.
echo "radare2-3.3.0-git configuration script done with acr v1.7.1.
The 'Free Software Foundation' message is only for autodetection.
Originally written by pancake <nopcode.org>."
exit 0
@ -236,7 +231,7 @@ echo "PKGNAME: radare2"
echo "VERSION: 3.3.0-git"
echo "LANGS: c"
echo "REQUIRED: libdl"
echo "OPTIONAL: libmagic libz libzip libxxhash libssl liblibuv"
echo "OPTIONAL: libmagic libz libzip libxxhash libssl liblibuv>=1.0.0"
echo "PKG-CONFIG: capstone openssl libuv"
echo "FLAGS: --disable-debugger --with-sysmagic --disable-loadlibs --without-fork --with-libr --with-syscapstone --with-syszip --with-sysxxhash --without-gpl --with-openssl --without-libuv --with-rpath --with-compiler=gcc --with-ostype=auto --with-libversion=xxx --without-jemalloc --with-checks-level=2"
exit 0
@ -318,7 +313,7 @@ parse_options "$1"
shift
done
ENVWORDS="MANDIR INFODIR LIBDIR INCLUDEDIR LOCALSTATEDIR SYSCONFDIR DATADIR DOCDIR LIBEXECDIR SBINDIR BINDIR EPREFIX PREFIX SPREFIX TARGET HOST BUILD INSTALL INSTALL_LIB INSTALL_MAN INSTALL_PROGRAM INSTALL_PROGRAM_STRIP INSTALL_DIR INSTALL_SCRIPT INSTALL_DATA HOST_OS HOST_CPU BUILD_OS BUILD_CPU TARGET_OS TARGET_CPU PKGNAME VPATH VERSION CONTACT CONTACT_NAME CONTACT_MAIL CC CFLAGS CPPFLAGS LDFLAGS HAVE_LANG_C DEBUGGER HAVE_LIB_DL DL_LIBS HAVE_PATCH PATCH HAVE_GIT GIT HAVE_LIB_MAGIC USE_MAGIC USE_LIB_MAGIC LIBMAGIC LOADLIBS HAVE_FORK WITH_LIBR WITH_CAPSTONE CAPSTONE_CFLAGS CAPSTONE_LDFLAGS HAVE_PKGCFG_CAPSTONE USE_CAPSTONE HAVE_LIB_Z HAVE_LIB_ZIP USE_ZIP USE_LIB_ZIP LIBZIP HAVE_LIB_XXHASH USE_XXHASH USE_LIB_XXHASH LIBXXHASH WITH_GPL HAVE_DECL_ADDR_NO_RANDOMIZE HAVE_ARC4RANDOM_UNIFORM HAVE_EXPLICIT_BZERO HAVE_EXPLICIT_MEMSET HAVE_CLOCK_NANOSLEEP HAVE_LIB_GMP HAVE_LIB_SSL SSL_CFLAGS SSL_LDFLAGS HAVE_PKGCFG_OPENSSL HAVE_OPENSSL WANT_OPENSSL HAVE_LIB_LIBUV LIBUV_CFLAGS LIBUV_LDFLAGS HAVE_PKGCFG_LIBUV HAVE_LIBUV WANT_LIBUV USE_RPATH USERCC USEROSTYPE LIBVERSION HAVE_JEMALLOC HAVE_PTRACE USE_PTRACE_WRAP R_CHECKS_LEVEL"
ENVWORDS="MANDIR INFODIR LIBDIR INCLUDEDIR LOCALSTATEDIR SYSCONFDIR DATADIR DOCDIR LIBEXECDIR SBINDIR BINDIR EPREFIX PREFIX SPREFIX TARGET HOST BUILD INSTALL INSTALL_LIB INSTALL_MAN INSTALL_PROGRAM INSTALL_PROGRAM_STRIP INSTALL_DIR INSTALL_SCRIPT INSTALL_DATA HOST_OS HOST_CPU BUILD_OS BUILD_CPU TARGET_OS TARGET_CPU PKGNAME VPATH VERSION CONTACT CONTACT_NAME CONTACT_MAIL CC CFLAGS CPPFLAGS LDFLAGS HAVE_LANG_C DEBUGGER HAVE_LIB_DL DL_LIBS HAVE_PATCH PATCH HAVE_GIT GIT HAVE_LIB_MAGIC USE_MAGIC USE_LIB_MAGIC LIBMAGIC LOADLIBS HAVE_FORK WITH_LIBR WITH_CAPSTONE CAPSTONE_CFLAGS CAPSTONE_LDFLAGS HAVE_PKGCFG_CAPSTONE USE_CAPSTONE HAVE_LIB_Z HAVE_LIB_ZIP USE_ZIP USE_LIB_ZIP LIBZIP HAVE_LIB_XXHASH USE_XXHASH USE_LIB_XXHASH LIBXXHASH WITH_GPL HAVE_DECL_ADDR_NO_RANDOMIZE HAVE_ARC4RANDOM_UNIFORM HAVE_EXPLICIT_BZERO HAVE_EXPLICIT_MEMSET HAVE_CLOCK_NANOSLEEP HAVE_LIB_GMP HAVE_LIB_SSL SSL_CFLAGS SSL_LDFLAGS HAVE_PKGCFG_OPENSSL HAVE_OPENSSL WANT_OPENSSL HAVE_LIBUV_VERSION_1_0_0 LIBUV_CFLAGS LIBUV_LDFLAGS HAVE_PKGCFG_LIBUV HAVE_LIBUV WANT_LIBUV USE_RPATH USERCC USEROSTYPE LIBVERSION HAVE_JEMALLOC HAVE_PTRACE USE_PTRACE_WRAP R_CHECKS_LEVEL"
create_environ
@ -541,7 +536,12 @@ if [ "$HAVE_LIB_SSL" = "0" ]; then
HAVE_OPENSSL="0"
else
SSL_LDFLAGS="-lssl"; fi; fi
check_library HAVE_LIB_LIBUV libuv 0
HAVE_LIBUV_VERSION_1_0_0=0
printf "checking version of library libuv >= 1.0.0... "
${PKGCONFIG} --atleast-version=1.0.0 libuv >/dev/null 2>&1
if [ $? = 0 ]; then HAVE_LIBUV_VERSION_1_0_0=1 ; echo ok; else
echo "no" ; fi
if [ "$HAVE_LIBUV_VERSION_1_0_0" = "1" ]; then
[ -z "${PKGCONFIG}" ] && PKGCONFIG=pkg-config
printf 'checking pkg-config flags for libuv... '
tmp=`${PKGCONFIG} --cflags libuv 2>/dev/null`
@ -559,6 +559,8 @@ else
HAVE_LIBUV="0"; fi
if [ "$WANT_LIBUV" = "0" ]; then
HAVE_LIBUV="0"; fi
else
HAVE_LIBUV="0"; fi
if [ "$USEROSTYPE" = "auto" ]; then
if [ "$HOST_OS" = "mingw32_nt-6.2" ]; then
USEROSTYPE="mingw32"

View File

@ -100,17 +100,21 @@ IFNULL SSL_LDFLAGS {
}
}
CHKLIB libuv
PKGCFG LIBUV_CFLAGS LIBUV_LDFLAGS libuv
IFNOTNULL LIBUV_LDFLAGS {
HAVE_LIBUV = 1 ;
CHKVER libuv 1.0.0
IF HAVE_LIBUV_VERSION_1_0_0 {
PKGCFG LIBUV_CFLAGS LIBUV_LDFLAGS libuv
IFNOTNULL LIBUV_LDFLAGS {
HAVE_LIBUV = 1 ;
}{
HAVE_LIBUV = 0 ;
}
ARG_WITHOUT WANT_LIBUV libuv disable libuv dependency ;
IFNOT WANT_LIBUV {
HAVE_LIBUV = 0 ;
}
}{
HAVE_LIBUV = 0 ;
}
ARG_WITHOUT WANT_LIBUV libuv disable libuv dependency ;
IFNOT WANT_LIBUV {
HAVE_LIBUV = 0 ;
}
ARG_WITH USE_RPATH rpath use rpath to build ;

View File

@ -252,7 +252,7 @@ endif
# handle libuv library
if get_option('use_libuv')
libuv_dep = dependency('libuv', required: false)
libuv_dep = dependency('libuv', version: '>=1.0.0', required: false)
use_libuv = libuv_dep.found()
if not libuv_dep.found()
warning('use_libuv option was set to true, but libuv was not found.')