Skip to content

Commit

Permalink
Separate --enable-debug from --enable-opt in configure. (#700)
Browse files Browse the repository at this point in the history
This makes -g -O2 the default build mode.
  • Loading branch information
JonathanLennox committed Apr 14, 2024
1 parent 5106d51 commit d45b53f
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,15 @@ AC_ARG_ENABLE(debug,
enable_debug=$enableval,enable_debug=yes)
if test x$enable_debug = xyes; then
AC_DEFINE(SCTP_DEBUG, 1, [Provide debug information])
CFLAGS="$CFLAGS -g -O0"
CFLAGS="$CFLAGS -g"
fi

AC_ARG_ENABLE(opt,
AC_HELP_STRING( [--enable-opt],
[optimize code @<:@default=yes@:>@]),
enable_opt=$enableval,enable_opt=yes)
if test x$enable_opt != xyes; then
CFLAGS="$CFLAGS -O0"
fi

AC_ARG_ENABLE(inet,
Expand Down

0 comments on commit d45b53f

Please sign in to comment.