mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
Fix --enable-logging
flag in autotools configure script.
We also never really tested this, because we run make distcheck, which does another configure with default flags instead of the ones we passed. Fixes #317.
This commit is contained in:
parent
029c4fb83f
commit
2dc2ac52b9
27
configure.ac
27
configure.ac
|
@ -34,7 +34,6 @@ BUILD_TESTING="yes"
|
||||||
|
|
||||||
TOX_LOGGER="no"
|
TOX_LOGGER="no"
|
||||||
TOX_DEBUG="no"
|
TOX_DEBUG="no"
|
||||||
LOGGING_OUTNAM="libtoxcore.log"
|
|
||||||
|
|
||||||
NCURSES_FOUND="no"
|
NCURSES_FOUND="no"
|
||||||
LIBCONFIG_FOUND="no"
|
LIBCONFIG_FOUND="no"
|
||||||
|
@ -88,9 +87,7 @@ AC_ARG_ENABLE([logging],
|
||||||
if test "x$enableval" = "xyes"; then
|
if test "x$enableval" = "xyes"; then
|
||||||
TOX_LOGGER="yes"
|
TOX_LOGGER="yes"
|
||||||
|
|
||||||
AC_DEFINE([TOX_LOGGER], [], [If logging enabled])
|
AC_DEFINE([MIN_LOGGER_LEVEL], [LOG_DEBUG], [LOG_LEVEL value])
|
||||||
AC_DEFINE([LOGGER_LEVEL], [LOG_DEBUG], [LOG_LEVEL value])
|
|
||||||
AC_DEFINE_UNQUOTED([LOGGER_OUTPUT_FILE], ["$LOGGING_OUTNAM"], [Output of logger])
|
|
||||||
fi
|
fi
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
|
@ -114,19 +111,19 @@ AC_ARG_WITH(log-level,
|
||||||
AC_MSG_WARN([Logging disabled!])
|
AC_MSG_WARN([Logging disabled!])
|
||||||
else
|
else
|
||||||
if test "x$withval" = "xTRACE"; then
|
if test "x$withval" = "xTRACE"; then
|
||||||
AC_DEFINE([LOGGER_LEVEL], [LOG_TRACE], [LOG_LEVEL value])
|
AC_DEFINE([MIN_LOGGER_LEVEL], [LOG_TRACE], [LOG_LEVEL value])
|
||||||
|
|
||||||
elif test "x$withval" = "xDEBUG"; then
|
elif test "x$withval" = "xDEBUG"; then
|
||||||
AC_DEFINE([LOGGER_LEVEL], [LOG_DEBUG], [LOG_LEVEL value])
|
AC_DEFINE([MIN_LOGGER_LEVEL], [LOG_DEBUG], [LOG_LEVEL value])
|
||||||
|
|
||||||
elif test "x$withval" = "xINFO"; then
|
elif test "x$withval" = "xINFO"; then
|
||||||
AC_DEFINE([LOGGER_LEVEL], [LOG_INFO], [LOG_LEVEL value])
|
AC_DEFINE([MIN_LOGGER_LEVEL], [LOG_INFO], [LOG_LEVEL value])
|
||||||
|
|
||||||
elif test "x$withval" = "xWARNING"; then
|
elif test "x$withval" = "xWARNING"; then
|
||||||
AC_DEFINE([LOGGER_LEVEL], [LOG_WARNING], [LOG_LEVEL value])
|
AC_DEFINE([MIN_LOGGER_LEVEL], [LOG_WARNING], [LOG_LEVEL value])
|
||||||
|
|
||||||
elif test "x$withval" = "xERROR"; then
|
elif test "x$withval" = "xERROR"; then
|
||||||
AC_DEFINE([LOGGER_LEVEL], [LOG_ERROR], [LOG_LEVEL value])
|
AC_DEFINE([MIN_LOGGER_LEVEL], [LOG_ERROR], [LOG_LEVEL value])
|
||||||
else
|
else
|
||||||
AC_MSG_WARN([Invalid logger level: $withval. Using default 'DEBUG'])
|
AC_MSG_WARN([Invalid logger level: $withval. Using default 'DEBUG'])
|
||||||
fi
|
fi
|
||||||
|
@ -134,18 +131,6 @@ AC_ARG_WITH(log-level,
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
|
|
||||||
AC_ARG_WITH(log-path,
|
|
||||||
AC_HELP_STRING([--with-log-path=DIR],
|
|
||||||
[Path of logger output]),
|
|
||||||
[
|
|
||||||
if test "x$TOX_LOGGER" = "xno"; then
|
|
||||||
AC_MSG_WARN([Logging disabled!])
|
|
||||||
else
|
|
||||||
AC_DEFINE_UNQUOTED([LOGGER_OUTPUT_FILE], ["$withval""/""$LOGGING_OUTNAM"], [Output of logger])
|
|
||||||
fi
|
|
||||||
]
|
|
||||||
)
|
|
||||||
|
|
||||||
PKG_PROG_PKG_CONFIG
|
PKG_PROG_PKG_CONFIG
|
||||||
|
|
||||||
AC_ARG_ENABLE([av],
|
AC_ARG_ENABLE([av],
|
||||||
|
|
|
@ -7,9 +7,11 @@
|
||||||
--with-libsodium-headers=$CACHE_DIR/include \
|
--with-libsodium-headers=$CACHE_DIR/include \
|
||||||
--enable-daemon \
|
--enable-daemon \
|
||||||
--enable-logging \
|
--enable-logging \
|
||||||
--enable-ntox
|
--enable-ntox \
|
||||||
|
--with-log-level=TRACE
|
||||||
|
|
||||||
# We use make instead of RUN $MAKE here, because the autotools build will only
|
# We use make instead of RUN $MAKE here, because the autotools build will only
|
||||||
# ever run natively on the Linux container, never on a Windows cross compilation
|
# ever run natively on the Linux container, never on a Windows cross compilation
|
||||||
# docker instance or an OSX machine.
|
# docker instance or an OSX machine.
|
||||||
|
make -j$NPROC -k
|
||||||
make distcheck -j$NPROC -k
|
make distcheck -j$NPROC -k
|
||||||
|
|
Loading…
Reference in New Issue
Block a user