+ifneq (,$(findstring backtrace,$(DEB_BUILD_OPTIONS)))
+ CFLAGS+= -rdynamic -D_GNU_SOURCE -MD -MP
+ LDFLAGS+=-Wl,--no-undefined -Wl,--as-needed
+ EXTRA_ARGS += --with-backtrace
+endif
+
+ifneq (,$(findstring threadoff,$(DEB_BUILD_OPTIONS)))
+ THREAD_ARGS=--without-threaded-client
+ CFLAGS += -D WITH_THREADLOG
+else
+ THREAD_ARGS=
+endif
+
+
+ifneq (,$(findstring rss,$(DEB_BUILD_OPTIONS)))
+ CFLAGS += -D DEBUG_RSS
+endif
+
+ifneq (,$(findstring cares,$(DEB_BUILD_OPTIONS)))
+ CFLAGS += -D DEBUG_CARES
+endif
+
+ifneq (,$(findstring iodbg,$(DEB_BUILD_OPTIONS)))
+ CFLAGS += -D BIGBAD_IODBG -D LDAP_INITIALIZE
+endif
+
+ifneq (,$(findstring gcov,$(DEB_BUILD_OPTIONS)))
+ CFLAGS += -fprofile-arcs -ftest-coverage
+ LDFLAGS += -fprofile-arcs -ftest-coverage
+endif
+