Barak A. Pearlmutter

Merge remote-tracking branch 'upstream/master'

... ... @@ -32,9 +32,9 @@ to/
# autotools build debris
/.deps/
/aclocal.m4
/autoconfig.h.in
/autoconfig.h
/autoconfig.h*
/autom4te.cache/
/config.h.in
/config.log
/config.status
/configure
... ...
... ... @@ -4,14 +4,6 @@ clsync_SOURCES = sync.c cluster.c main.c output.c fileutils.c malloc.c
main.o: revision.h
if PARANOID
AM_CPPFLAGS += -DPARANOID
endif
if VERYPARANOID
AM_CPPFLAGS += -DVERYPARANOID
endif
man_MANS = man/man1/clsync.1
doc_DATA = CONTRIB DEVELOPING LICENSE README.md TODO
... ...
... ... @@ -71,12 +71,6 @@
#define MAX(a,b) ((a)>(b)?(a):(b))
#endif
#ifdef VERYPARANOID
#ifndef PARANOID
#define PARANOID
#endif
#endif
#ifndef IN_CREATE_SELF
#define IN_CREATE_SELF IN_CREATE
#endif
... ...
... ... @@ -7,43 +7,33 @@ AC_CONFIG_SRCDIR([sync.c])
AM_INIT_AUTOMAKE([1.11 -Wall foreign])
AC_CONFIG_HEADERS([autoconfig.h])
# --enable-debug
dnl --enable-debug
AC_ARG_ENABLE(debug,
AS_HELP_STRING([--enable-debug],
[enable debugging, default: no]),
[case "${enableval}" in
yes) debug=true ;;
no) debug=false ;;
*) AC_MSG_ERROR([bad value ${enableval} for --enable-debug]) ;;
esac],
[debug=false])
AM_CONDITIONAL(DEBUG, test x"$debug" = x"true")
AS_HELP_STRING(--enable-debug,
[enable debugging, default: no]))
# --paranoid-level
dnl -Werror disables std autodetection, so we must specify it here
AS_IF([test "x$enable_debug" = "xyes"],
[CFLAGS+=" -std=gnu11 -pipe -Wall -Werror -ggdb3 -Wno-error=unused-variable"])
dnl --paranoid-level
AC_ARG_ENABLE(paranoid,
AS_HELP_STRING([--enable-paranoid],
[set paranoid level of code security, default: 1, values: 0, 1, 2]),
[set paranoid level of code security, default: 1, values: 0, 1, 2]),
[case "${enableval}" in
0) paranoid=0 ;;
1) paranoid=1 ;;
2) paranoid=2 ;;
*) AC_MSG_ERROR([bad value ${enableval} for --paranoid-level]) ;;
(0|"no") paranoid=0 ;;
(1|"yes") paranoid=1 ;;
(2) paranoid=2 ;;
(*) AC_MSG_ERROR([bad value ${enableval} for --paranoid-level]) ;;
esac],
[paranoid=1])
AM_CONDITIONAL(PARANOID, test x"$paranoid" = x"1")
AM_CONDITIONAL(VERYPARANOID, test x"$paranoid" = x"2")
AS_IF([test $paranoid -ge 1], [CPPFLAGS+=" -DPARANOID"])
AS_IF([test $paranoid -eq 2], [CPPFLAGS+=" -DVERY_PARANOID"])
# Checks for programs.
AC_PROG_CC_C99
AC_PROG_INSTALL
AC_PROG_MAKE_SET
PKG_PROG_PKG_CONFIG([0.20])
# Checks for libraries.
... ... @@ -53,26 +43,5 @@ LIBS="${GLIB_LIBS} ${LIBS}"
AM_CPPFLAGS="${GLIB_CFLAGS}"
AC_SUBST(AM_CPPFLAGS)
# Checks for header files.
AC_CHECK_HEADERS([arpa/inet.h fcntl.h limits.h netinet/in.h stdint.h stdlib.h string.h strings.h sys/socket.h sys/time.h unistd.h])
# Checks for typedefs, structures, and compiler characteristics.
AC_C_INLINE
AC_TYPE_MODE_T
AC_TYPE_PID_T
AC_TYPE_SIZE_T
AC_TYPE_SSIZE_T
AC_TYPE_UINT16_T
AC_TYPE_UINT32_T
AC_TYPE_UINT8_T
# Checks for library functions.
AC_FUNC_ALLOCA
AC_FUNC_FORK
AC_FUNC_MALLOC
AC_FUNC_REALLOC
AC_CHECK_FUNCS([alarm memset mkdir realpath regcomp socket strdup strerror uname])
AC_CONFIG_FILES([Makefile])
AC_OUTPUT
... ...