mirror of
https://github.com/radareorg/radare2.git
synced 2024-11-23 13:19:54 +00:00
Use latest acr to support BSDs pkgconf tool and more cleanups
This commit is contained in:
parent
b2be57f9f7
commit
dcc17e7f32
9
Makefile
9
Makefile
@ -218,10 +218,10 @@ install-doc-symlink:
|
||||
for FILE in $(shell cd doc ; ls) ; do \
|
||||
ln -fs "$(PWD)/doc/$$FILE" "${DESTDIR}${DOCDIR}" ; done
|
||||
|
||||
install love: install-doc install-man install-www install-pkgconfig
|
||||
cd libr && ${MAKE} install
|
||||
cd binr && ${MAKE} install
|
||||
cd shlr && ${MAKE} install
|
||||
install: install-doc install-man install-www install-pkgconfig
|
||||
$(MAKE) -C libr install
|
||||
$(MAKE) -C binr install
|
||||
$(MAKE) -C shlr install
|
||||
for DIR in ${DATADIRS} ; do $(MAKE) -C "$$DIR" install ; done
|
||||
cd "$(DESTDIR)$(LIBDIR)/radare2/" ;\
|
||||
rm -f last ; ln -fs $(VERSION) last
|
||||
@ -234,7 +234,6 @@ install love: install-doc install-man install-www install-pkgconfig
|
||||
#${INSTALL_SCRIPT} "${PWD}/sys/r1-docker.sh" "${DESTDIR}${BINDIR}/r2-docker"
|
||||
cp -f doc/hud "${DESTDIR}${DATADIR}/radare2/${VERSION}/hud/main"
|
||||
mkdir -p "${DESTDIR}${DATADIR}/radare2/${VERSION}/"
|
||||
$(SHELL) sys/ldconfig.sh
|
||||
$(SHELL) ./configure-plugins --rm-static $(DESTDIR)$(LIBDIR)/radare2/last/
|
||||
|
||||
install-www:
|
||||
|
41
configure
vendored
41
configure
vendored
@ -1,5 +1,5 @@
|
||||
#!/bin/sh
|
||||
# This script was automatically generated by ACR v1.9.4
|
||||
# This script was automatically generated by ACR v1.9.5
|
||||
# @author: pancake <nopcode.org>
|
||||
# @url: http://www.nopcode.org
|
||||
# @repo: git clone https://github.com/radare/acr
|
||||
@ -237,7 +237,7 @@ if [ "$QUIET" = 1 ]; then
|
||||
echo "4.6.0-git"
|
||||
exit 0
|
||||
fi
|
||||
echo "radare2-4.6.0-git configuration script done with acr v1.9.4.
|
||||
echo "radare2-4.6.0-git configuration script done with acr v1.9.5.
|
||||
The 'Free Software Foundation' message is only for autodetection.
|
||||
Originally written by pancake <nopcode.org>."
|
||||
exit 0
|
||||
@ -355,7 +355,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 VERSION VERSION_MAJOR VERSION_MINOR VERSION_PATCH VERSION_NUMBER PKGNAME VPATH 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 CSNEXT LOADLIBS WANT_DYLINK HAVE_FORK WANT_PTRACE_WRAP 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_DECL___GLIBC__ HAVE_ARC4RANDOM_UNIFORM HAVE_EXPLICIT_BZERO HAVE_EXPLICIT_MEMSET HAVE_CLOCK_NANOSLEEP HAVE_SIGACTION HAVE_CLOCK_GETTIME CLOCK_LDFLAGS SUPPORT_GNU99 NEWSHELL_CFLAGS SUPPORT_C99 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 WANT_R2R 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 VERSION VERSION_MAJOR VERSION_MINOR VERSION_PATCH VERSION_NUMBER PKGNAME VPATH CONTACT CONTACT_NAME CONTACT_MAIL CC CFLAGS CPPFLAGS LDFLAGS HAVE_LANG_C DEBUGGER HAVE_LIB_DL DL_LIBS PKGCONFIG HAVE_PATCH PATCH HAVE_GIT GIT HAVE_LIB_MAGIC USE_MAGIC USE_LIB_MAGIC LIBMAGIC CSNEXT LOADLIBS WANT_DYLINK HAVE_FORK WANT_PTRACE_WRAP 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_DECL___GLIBC__ HAVE_ARC4RANDOM_UNIFORM HAVE_EXPLICIT_BZERO HAVE_EXPLICIT_MEMSET HAVE_CLOCK_NANOSLEEP HAVE_SIGACTION HAVE_CLOCK_GETTIME CLOCK_LDFLAGS SUPPORT_GNU99 NEWSHELL_CFLAGS SUPPORT_C99 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 WANT_R2R R_CHECKS_LEVEL"
|
||||
|
||||
create_environ
|
||||
|
||||
@ -400,6 +400,31 @@ else
|
||||
DL_LIBS=""
|
||||
echo "libc"
|
||||
fi
|
||||
ochof "checking for pkg-config... "
|
||||
if [ -n "$PKGCONFIG" ]; then
|
||||
if [ -x "$PKGCONFIG" ]; then
|
||||
_HAVE_PKGCONFIG="${PKGCONFIG}"
|
||||
else
|
||||
ocho "PKGCONFIG env is not executable"
|
||||
PKGCONFIG=""
|
||||
fi
|
||||
else
|
||||
IFS=:
|
||||
for A in ${PATH} ; do
|
||||
if [ -x "${A}/pkg-config" ]; then
|
||||
PKGCONFIG="${A}/pkg-config"
|
||||
elif [ -x "${A}/pkgconf" ]; then
|
||||
PKGCONFIG="${A}/pkgconf"
|
||||
else
|
||||
continue
|
||||
fi
|
||||
break
|
||||
done
|
||||
unset IFS
|
||||
fi
|
||||
if [ -n "${PKGCONFIG}" ]; then
|
||||
ocho ${PKGCONFIG}
|
||||
else ocho no; fi
|
||||
ochof "checking for patch... "
|
||||
if [ -x "${PATCH}" ]; then
|
||||
FIND=${PATCH}
|
||||
@ -486,8 +511,8 @@ else
|
||||
USE_LIB_MAGIC="0"
|
||||
LIBMAGIC=""; fi
|
||||
if [ "$WITH_CAPSTONE" = "1" ]; then
|
||||
[ -z "${PKGCONFIG}" ] && PKGCONFIG=pkg-config
|
||||
type ${PKGCONFIG} > /dev/null 2>&1 || echo "ERROR: Cannot find PKGCONFIG ${PKGCONFIG}"
|
||||
if [ -z "${PKGCONFIG}" ]; then pkg-config --version >/dev/null 2>&1 ; if [ 0 = 0 ]; then PKGCONFIG=pkg-config ; else PKGCONFIG=pkgconf ; fi; fi
|
||||
type ${PKGCONFIG} > /dev/null 2>&1 || echo "ERROR: Cannot find valid PKGCONFIG, pkg-config or pkgconf in PATH"
|
||||
echo 'Using PKGCONFIG: '${PKGCONFIG}
|
||||
printf 'checking pkg-config flags for capstone... '
|
||||
tmp=`${PKGCONFIG} --cflags capstone 2>/dev/null`
|
||||
@ -607,7 +632,7 @@ if [ "$SUPPORT_C99" = "1" ]; then
|
||||
NEWSHELL_CFLAGS="${NEWSHELL_CFLAGS} '-std=c99'"; fi; fi
|
||||
HAVE_LIB_GMP="0"
|
||||
check_library HAVE_LIB_SSL ssl 0
|
||||
[ -z "${PKGCONFIG}" ] && PKGCONFIG=pkg-config
|
||||
if [ -z "${PKGCONFIG}" ]; then pkg-config --version >/dev/null 2>&1 ; if [ 0 = 0 ]; then PKGCONFIG=pkg-config ; else PKGCONFIG=pkgconf ; fi; fi
|
||||
printf 'checking pkg-config flags for openssl... '
|
||||
tmp=`${PKGCONFIG} --cflags openssl 2>/dev/null`
|
||||
if [ $? != 0 ]; then echo no ; HAVE_PKGCFG_OPENSSL=0;
|
||||
@ -636,7 +661,7 @@ ${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
|
||||
if [ -z "${PKGCONFIG}" ]; then pkg-config --version >/dev/null 2>&1 ; if [ 0 = 0 ]; then PKGCONFIG=pkg-config ; else PKGCONFIG=pkgconf ; fi; fi
|
||||
printf 'checking pkg-config flags for libuv... '
|
||||
tmp=`${PKGCONFIG} --cflags libuv 2>/dev/null`
|
||||
if [ $? != 0 ]; then echo no ; HAVE_PKGCFG_LIBUV=0;
|
||||
@ -776,7 +801,7 @@ do_remove
|
||||
if [ "$QUIET" = 0 ]; then
|
||||
echo
|
||||
echo "Final report:"
|
||||
for A in R_CHECKS_LEVEL WANT_R2R PREFIX HAVE_LIB_GMP HAVE_OPENSSL HAVE_LIBUV USE_CAPSTONE HAVE_PTRACE USE_PTRACE_WRAP HAVE_FORK VERSION USE_LIB_ZIP USE_LIB_MAGIC USE_LIB_XXHASH DEBUGGER CC USERCC HAVE_ARC4RANDOM_UNIFORM HAVE_EXPLICIT_BZERO HAVE_EXPLICIT_MEMSET WANT_DYLINK USEROSTYPE LIBVERSION BUILD HOST TARGET ; do
|
||||
for A in R_CHECKS_LEVEL WANT_R2R PREFIX HAVE_LIB_GMP HAVE_OPENSSL HAVE_LIBUV USE_CAPSTONE HAVE_PTRACE USE_PTRACE_WRAP HAVE_FORK VERSION USE_LIB_ZIP USE_LIB_MAGIC USE_LIB_XXHASH DEBUGGER CC USERCC HAVE_ARC4RANDOM_UNIFORM PKGCONFIG HAVE_EXPLICIT_BZERO HAVE_EXPLICIT_MEMSET WANT_DYLINK USEROSTYPE LIBVERSION BUILD HOST TARGET ; do
|
||||
eval VAL="\$${A}"
|
||||
[ -z "${VAL}" ] && VAL="(null)"
|
||||
echo " - ${A} = ${VAL}"
|
||||
|
@ -9,6 +9,8 @@ ARG_DISABLE DEBUGGER debugger disable native debugger features ;
|
||||
(( -ldl -dynamic ... ))
|
||||
USE_DL
|
||||
|
||||
USE_PKGCONFIG
|
||||
|
||||
CHKPRG! PATCH patch
|
||||
CHKPRG GIT git
|
||||
CHKLIB magic
|
||||
@ -242,9 +244,12 @@ ARG_WITHOUT WANT_R2R r2r build without r2r for regression testing ;
|
||||
|
||||
ARG_WITH R_CHECKS_LEVEL=2 checks-level value between 0 and 3 to enable different level of assert (see R_CHECKS_LEVEL) ;
|
||||
|
||||
REPORT R_CHECKS_LEVEL WANT_R2R PREFIX HAVE_LIB_GMP HAVE_OPENSSL HAVE_LIBUV USE_CAPSTONE HAVE_PTRACE USE_PTRACE_WRAP HAVE_FORK
|
||||
VERSION USE_LIB_ZIP USE_LIB_MAGIC USE_LIB_XXHASH DEBUGGER CC USERCC HAVE_ARC4RANDOM_UNIFORM
|
||||
HAVE_EXPLICIT_BZERO HAVE_EXPLICIT_MEMSET WANT_DYLINK USEROSTYPE LIBVERSION BUILD HOST TARGET ;
|
||||
REPORT R_CHECKS_LEVEL WANT_R2R PREFIX HAVE_LIB_GMP HAVE_OPENSSL HAVE_LIBUV
|
||||
USE_CAPSTONE HAVE_PTRACE USE_PTRACE_WRAP HAVE_FORK
|
||||
VERSION USE_LIB_ZIP USE_LIB_MAGIC USE_LIB_XXHASH DEBUGGER
|
||||
CC USERCC HAVE_ARC4RANDOM_UNIFORM PKGCONFIG
|
||||
HAVE_EXPLICIT_BZERO HAVE_EXPLICIT_MEMSET WANT_DYLINK USEROSTYPE
|
||||
LIBVERSION BUILD HOST TARGET ;
|
||||
|
||||
(( TODO: Add the rest of .pc files here.. add a rule for acr? ))
|
||||
SUBDIRS ./config-user.mk
|
||||
|
@ -27,8 +27,13 @@ while : ; do
|
||||
shift
|
||||
continue
|
||||
;;
|
||||
-*)
|
||||
# penguin face just for flags
|
||||
ARGS="${ARGS} $1"
|
||||
;;
|
||||
*)
|
||||
ARGS="${ARGS} $1"
|
||||
PREFIX="$1"
|
||||
;;
|
||||
esac
|
||||
shift
|
||||
@ -73,6 +78,10 @@ fi
|
||||
umask 0002
|
||||
|
||||
export NOSUDO
|
||||
|
||||
if [ -w "${PREFIX}" ]; then
|
||||
NOSUDO=1
|
||||
fi
|
||||
if [ -n "${NOSUDO}" ]; then
|
||||
SUDO=""
|
||||
else
|
||||
@ -92,15 +101,18 @@ if [ "${USE_SU}" = 1 ]; then
|
||||
fi
|
||||
|
||||
if [ "${M32}" = 1 ]; then
|
||||
./sys/build-m32.sh ${ARGS} || exit 1
|
||||
${SHELL} ./sys/build-m32.sh ${ARGS} || exit 1
|
||||
elif [ "${HARDEN}" = 1 ]; then
|
||||
# shellcheck disable=SC2048
|
||||
# shellcheck disable=SC2086
|
||||
./sys/build-harden.sh ${ARGS} || exit 1
|
||||
${SHELL} ./sys/build-harden.sh ${ARGS} || exit 1
|
||||
else
|
||||
# shellcheck disable=SC2048
|
||||
# shellcheck disable=SC2086
|
||||
./sys/build.sh ${ARGS} || exit 1
|
||||
${SHELL} ./sys/build.sh ${ARGS} || exit 1
|
||||
fi
|
||||
|
||||
${SUDO} ${MAKE} ${INSTALL_TARGET} || exit 1
|
||||
if [ -z "${NOSUDO}" ]; then
|
||||
${SHELL} ./sys/ldconfig.sh
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user