the configure script clobbers the user CFLAGS which can break builds when the CFLAGS contain critical flags (like ones that control the ABI)
the simple fix is to append CFLAGS in the configure script rather than set it. there is no need to explicitly set CFLAGS to -O2 as autoconf does this by default.
@@ -44,10 +44,9 @@ dnl Configure debug facilities
AC_ARG_WITH(debug,[ --with-debug=level Debug level],
if test "$debug_level" != ""; then
AC_DEFINE_UNQUOTED([OBEX_DEBUG],$debug_level, [debug level])
- CFLAGS="-g -O1"
+ CFLAGS="$CFLAGS -g -O1"
AC_ARG_WITH(dump,[ --with-dump=level Dump level],