Barak A. Pearlmutter

add option ./configure --enable-debug; when engaged, define PARANOID

... ... @@ -4,6 +4,10 @@ clsync_SOURCES = sync.c cluster.c main.c output.c fileutils.c malloc.c
main.o: revision.h
if DEBUG
AM_CPPFLAGS += -DPARANOID
endif
man_MANS = man/man1/clsync.1
doc_DATA = CONTRIB DEVELOPING LICENSE README.md TODO
... ...
... ... @@ -7,6 +7,18 @@ AC_CONFIG_SRCDIR([sync.c])
AM_INIT_AUTOMAKE([1.11 -Wall foreign])
AC_CONFIG_HEADERS([autoconfig.h])
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")
# Checks for programs.
AC_PROG_CC
AC_PROG_INSTALL
... ... @@ -17,7 +29,7 @@ PKG_PROG_PKG_CONFIG([0.20])
AC_CHECK_LIB([pthread], [pthread_create])
PKG_CHECK_MODULES(GLIB, [glib-2.0])
LIBS="${GLIB_LIBS} ${LIBS}"
AM_CPPFLAGS="${GLIB_CFLAGS} -DPARANOID"
AM_CPPFLAGS="${GLIB_CFLAGS}"
AC_SUBST(AM_CPPFLAGS)
... ...