mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
Merge pull request #815 from jin-eld/nacl-fix-3
More NaCl related fixes
This commit is contained in:
commit
3b841b0860
24
configure.ac
24
configure.ac
|
@ -38,6 +38,7 @@ NCURSES_FOUND="no"
|
||||||
LIBCONFIG_FOUND="no"
|
LIBCONFIG_FOUND="no"
|
||||||
LIBCHECK_FOUND="no"
|
LIBCHECK_FOUND="no"
|
||||||
WANT_NACL="no"
|
WANT_NACL="no"
|
||||||
|
ADD_NACL_OBJECTS_TO_PKGCONFIG="yes"
|
||||||
|
|
||||||
TOXCORE_LT_LDFLAGS="-version-info $LIBTOXCORE_LT_VERSION"
|
TOXCORE_LT_LDFLAGS="-version-info $LIBTOXCORE_LT_VERSION"
|
||||||
TOXAV_LT_LDFLAGS="-version-info $LIBTOXAV_LT_VERSION"
|
TOXAV_LT_LDFLAGS="-version-info $LIBTOXAV_LT_VERSION"
|
||||||
|
@ -207,6 +208,11 @@ AC_ARG_WITH(libsodium-libs,
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if test "x$WANT_NACL" = "xyes"; then
|
||||||
|
enable_shared=no
|
||||||
|
enable_static=yes
|
||||||
|
fi
|
||||||
|
|
||||||
# Checks for programs.
|
# Checks for programs.
|
||||||
AC_PROG_CC
|
AC_PROG_CC
|
||||||
AM_PROG_CC_C_O
|
AM_PROG_CC_C_O
|
||||||
|
@ -214,12 +220,6 @@ m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
|
||||||
AC_LIBTOOL_WIN32_DLL
|
AC_LIBTOOL_WIN32_DLL
|
||||||
AC_PROG_LIBTOOL
|
AC_PROG_LIBTOOL
|
||||||
|
|
||||||
if test "x$WANT_NACL" = "xyes"; then
|
|
||||||
disable_shared=yes
|
|
||||||
enable_static=yes
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
WIN32=no
|
WIN32=no
|
||||||
AC_CANONICAL_HOST
|
AC_CANONICAL_HOST
|
||||||
case $host_os in
|
case $host_os in
|
||||||
|
@ -234,6 +234,7 @@ case $host_os in
|
||||||
LDFLAGS="$LDFLAGS -L/usr/local/lib"
|
LDFLAGS="$LDFLAGS -L/usr/local/lib"
|
||||||
CFLAGS="$CFLAGS -I/usr/local/include"
|
CFLAGS="$CFLAGS -I/usr/local/include"
|
||||||
CPPFLAGS="$CPPFLAGS -I/usr/local/include"
|
CPPFLAGS="$CPPFLAGS -I/usr/local/include"
|
||||||
|
ADD_NACL_OBJECTS_TO_PKGCONFIG="no"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
AM_CONDITIONAL(WIN32, test "x$WIN32" = "xyes")
|
AM_CONDITIONAL(WIN32, test "x$WIN32" = "xyes")
|
||||||
|
@ -245,6 +246,8 @@ AC_SUBST(EXTRA_LT_LDFLAGS)
|
||||||
if test "x$WANT_NACL" = "xyes"; then
|
if test "x$WANT_NACL" = "xyes"; then
|
||||||
NACL_LIBS=
|
NACL_LIBS=
|
||||||
NACL_LDFLAGS=
|
NACL_LDFLAGS=
|
||||||
|
NACL_OBJECTS=
|
||||||
|
NACL_OBJECTS_PKGCONFIG=
|
||||||
LDFLAGS_SAVE="$LDFLAGS"
|
LDFLAGS_SAVE="$LDFLAGS"
|
||||||
if test -n "$NACL_SEARCH_LIBS"; then
|
if test -n "$NACL_SEARCH_LIBS"; then
|
||||||
LDFLAGS="-L$NACL_SEARCH_LIBS $LDFLAGS"
|
LDFLAGS="-L$NACL_SEARCH_LIBS $LDFLAGS"
|
||||||
|
@ -268,14 +271,19 @@ if test "x$WANT_NACL" = "xyes"; then
|
||||||
|
|
||||||
if (test -f "$NACL_SEARCH_LIBS/cpucycles.o") &&
|
if (test -f "$NACL_SEARCH_LIBS/cpucycles.o") &&
|
||||||
(test -f "$NACL_SEARCH_LIBS/randombytes.o"); then
|
(test -f "$NACL_SEARCH_LIBS/randombytes.o"); then
|
||||||
NACL_LIBS="$NACL_LIBS $NACL_SEARCH_LIBS/cpucycles.o $NACL_SEARCH_LIBS/randombytes.o"
|
NACL_OBJECTS="$NACL_SEARCH_LIBS/cpucycles.o $NACL_SEARCH_LIBS/randombytes.o"
|
||||||
|
if test "x$ADD_NACL_OBJECTS_TO_PKGCONFIG" = "xyes"; then
|
||||||
|
NACL_OBJECTS_PKGCONFIG="$NACL_OBJECTS"
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
AC_MSG_ERROR([nacl weirdness: required object files cpucycles.o randombytes.o not found])
|
AC_MSG_ERROR([required NaCl object files cpucycles.o randombytes.o not found, please specify their location using the --with-nacl-libs parameter])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
LDFLAGS="$LDFLAGS_SAVE"
|
LDFLAGS="$LDFLAGS_SAVE"
|
||||||
AC_SUBST(NACL_LIBS)
|
AC_SUBST(NACL_LIBS)
|
||||||
AC_SUBST(NACL_LDFLAGS)
|
AC_SUBST(NACL_LDFLAGS)
|
||||||
|
AC_SUBST(NACL_OBJECTS)
|
||||||
|
AC_SUBST(NACL_OBJECTS_PKGCONFIG)
|
||||||
else
|
else
|
||||||
LIBSODIUM_LIBS=
|
LIBSODIUM_LIBS=
|
||||||
LIBSODIUM_LDFLAGS=
|
LIBSODIUM_LDFLAGS=
|
||||||
|
|
|
@ -7,5 +7,5 @@ Name: libtoxcore
|
||||||
Description: Tox protocol library
|
Description: Tox protocol library
|
||||||
Requires:
|
Requires:
|
||||||
Version: @PACKAGE_VERSION@
|
Version: @PACKAGE_VERSION@
|
||||||
Libs: -L${libdir} @NACL_LDFLAGS@ -ltoxcore @NACL_LIBS@ @LIBS@
|
Libs: @NACL_OBJECTS_PKGCONFIG@ -L${libdir} @NACL_LDFLAGS@ -ltoxcore @NACL_LIBS@ @LIBS@
|
||||||
Cflags: -I${includedir}
|
Cflags: -I${includedir}
|
||||||
|
|
|
@ -12,6 +12,7 @@ DHT_bootstrap_LDADD = $(LIBSODIUM_LDFLAGS) \
|
||||||
$(NACL_LDFLAGS) \
|
$(NACL_LDFLAGS) \
|
||||||
libtoxcore.la \
|
libtoxcore.la \
|
||||||
$(LIBSODIUM_LIBS) \
|
$(LIBSODIUM_LIBS) \
|
||||||
|
$(NACL_OBJECTS) \
|
||||||
$(NACL_LIBS) \
|
$(NACL_LIBS) \
|
||||||
$(WINSOCK2_LIBS)
|
$(WINSOCK2_LIBS)
|
||||||
|
|
||||||
|
|
|
@ -36,6 +36,7 @@ DHT_test_LDADD = $(LIBSODIUM_LDFLAGS) \
|
||||||
$(NACL_LDFLAGS) \
|
$(NACL_LDFLAGS) \
|
||||||
libtoxcore.la \
|
libtoxcore.la \
|
||||||
$(LIBSODIUM_LIBS) \
|
$(LIBSODIUM_LIBS) \
|
||||||
|
$(NACL_OBJECTS) \
|
||||||
$(NACL_LIBS) \
|
$(NACL_LIBS) \
|
||||||
$(WINSOCK2_LIBS)
|
$(WINSOCK2_LIBS)
|
||||||
|
|
||||||
|
@ -52,6 +53,7 @@ Lossless_UDP_testclient_LDADD = \
|
||||||
$(NACL_LDFLAGS) \
|
$(NACL_LDFLAGS) \
|
||||||
libtoxcore.la \
|
libtoxcore.la \
|
||||||
$(LIBSODIUM_LIBS) \
|
$(LIBSODIUM_LIBS) \
|
||||||
|
$(NACL_OBJECTS) \
|
||||||
$(NACL_LIBS) \
|
$(NACL_LIBS) \
|
||||||
$(WINSOCK2_LIBS)
|
$(WINSOCK2_LIBS)
|
||||||
|
|
||||||
|
@ -68,6 +70,7 @@ Lossless_UDP_testserver_LDADD = \
|
||||||
$(NACL_LDFLAGS) \
|
$(NACL_LDFLAGS) \
|
||||||
libtoxcore.la \
|
libtoxcore.la \
|
||||||
$(LIBSODIUM_LIBS) \
|
$(LIBSODIUM_LIBS) \
|
||||||
|
$(NACL_OBJECTS) \
|
||||||
$(NACL_LIBS) \
|
$(NACL_LIBS) \
|
||||||
$(WINSOCK2_LIBS)
|
$(WINSOCK2_LIBS)
|
||||||
|
|
||||||
|
@ -82,6 +85,7 @@ Messenger_test_LDADD = $(LIBSODIUM_LDFLAGS) \
|
||||||
$(NACL_LDFLAGS) \
|
$(NACL_LDFLAGS) \
|
||||||
libtoxcore.la \
|
libtoxcore.la \
|
||||||
$(LIBSODIUM_LIBS) \
|
$(LIBSODIUM_LIBS) \
|
||||||
|
$(NACL_OBJECTS) \
|
||||||
$(NACL_LIBS) \
|
$(NACL_LIBS) \
|
||||||
$(WINSOCK2_LIBS)
|
$(WINSOCK2_LIBS)
|
||||||
|
|
||||||
|
@ -98,6 +102,7 @@ crypto_speed_test_LDADD = \
|
||||||
$(NACL_LDFLAGS) \
|
$(NACL_LDFLAGS) \
|
||||||
libtoxcore.la \
|
libtoxcore.la \
|
||||||
$(LIBSODIUM_LIBS) \
|
$(LIBSODIUM_LIBS) \
|
||||||
|
$(NACL_OBJECTS) \
|
||||||
$(NACL_LIBS) \
|
$(NACL_LIBS) \
|
||||||
$(WINSOCK2_LIBS)
|
$(WINSOCK2_LIBS)
|
||||||
|
|
||||||
|
@ -114,6 +119,7 @@ tox_sync_LDADD = $(LIBSODIUM_LDFLAGS) \
|
||||||
$(NACL_LDFLAGS) \
|
$(NACL_LDFLAGS) \
|
||||||
libtoxcore.la \
|
libtoxcore.la \
|
||||||
$(LIBSODIUM_LIBS) \
|
$(LIBSODIUM_LIBS) \
|
||||||
|
$(NACL_OBJECTS) \
|
||||||
$(NACL_LIBS) \
|
$(NACL_LIBS) \
|
||||||
$(WINSOCK2_LIBS)
|
$(WINSOCK2_LIBS)
|
||||||
endif
|
endif
|
||||||
|
|
|
@ -49,4 +49,5 @@ libtoxcore_la_LDFLAGS = $(TOXCORE_LT_LDFLAGS) \
|
||||||
$(WINSOCK2_LIBS)
|
$(WINSOCK2_LIBS)
|
||||||
|
|
||||||
libtoxcore_la_LIBADD = $(LIBSODIUM_LIBS) \
|
libtoxcore_la_LIBADD = $(LIBSODIUM_LIBS) \
|
||||||
|
$(NACL_OBJECTS) \
|
||||||
$(NAC_LIBS)
|
$(NAC_LIBS)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user