Fix compilation warning on deprecated macro

A warning was printed even if the deprecation didn't apply to
libosmocore because it is still allowed to use it internally.
This patch fixes this case while still printing a warning if external
projects build using libosmocore headers.

Change-Id: I32212f20756f828af1017482a71e29e4b3adbad4
diff --git a/configure.ac b/configure.ac
index 04d126e..340a896 100644
--- a/configure.ac
+++ b/configure.ac
@@ -235,6 +235,9 @@
 	CPPFLAGS+=" -fsanitize=address -fsanitize=undefined"
 fi
 
+CFLAGS+=" -DBUILDING_LIBOSMOCORE"
+CPPFLAGS+=" -DBUILDING_LIBOSMOCORE"
+
 AC_ARG_ENABLE(simd,
 	[AS_HELP_STRING(
 		[--disable-simd],