-AC_ARG_ENABLE([debuginfo], [AC_HELP_STRING([--disable-debuginfo], [disable the debuginfo feature])], [], [enable_debuginfo=yes])
+AS_IF([test "x$DEFAULT_ENABLE_DEBUGINFO" = xyes],
+ [AC_ARG_ENABLE([debuginfo], [AC_HELP_STRING([--disable-debuginfo], [disable the debuginfo feature])], [], [enable_debuginfo=yes])],
+ [AC_ARG_ENABLE([debuginfo], [AC_HELP_STRING([--enable-debuginfo], [enable the debuginfo feature])], [], [enable_debuginfo=no])]
+)