diff --git a/configure.ac b/configure.ac index 2e0ec34e..e26cae90 100644 --- a/configure.ac +++ b/configure.ac @@ -261,7 +261,8 @@ AM_CONDITIONAL(HAVE_EMULATOR, [test x"$EMULATOR" != x]) AC_ARG_ENABLE([debug], [AS_HELP_STRING([--enable-debug],[enable debugging])], [ - CFLAGS="-O0 -g -pthread -Wall -Wextra" + CFLAGS="-Og -g -pthread -Wall -Wextra" + AC_CHECK_CC_OPT([-rdynamic], CFLAGS="$CFLAGS -rdynamic", []) ], []) diff --git a/makedist.sh b/makedist.sh index 64179815..32e225eb 100755 --- a/makedist.sh +++ b/makedist.sh @@ -1,26 +1,36 @@ #!/bin/sh # +CHECK=check +DEBUG= + +if test "x$1" = "x-f"; then +CHECK=clean +fi + +if test "x$1" = "x-d"; then +CHECK=clean +DEBUG=--enable-debug +fi + make distclean # Reconfigure (with force) to get the latest revision from git autoreconf -f -if ! ./configure.windows-x86; then +if ! ./configure.windows-x86 $DEBUG; then exit 1 fi -if ! test "x$1" = "x-f"; then - if ! make check; then - exit 1 - fi +if ! make $CHECK; then + exit 1 fi if ! make distwindows-x86 distclean; then exit 1 fi -if ! ./configure.windows-x64; then +if ! ./configure.windows-x64 $DEBUG; then exit 1 fi