diff --git a/configure b/configure index db0df2a27e..1e6d7e668e 100755 --- a/configure +++ b/configure @@ -6260,12 +6260,22 @@ case $enable_debug in CPPFLAGS="$CPPFLAGS" ;; "yes") - CPPFLAGS="$CPPFLAGS -g -DDEBUG" - LDFLAGS="$LDFLAGS -g" + if test $ac_cv_prog_cc_g = yes; then + CPPFLAGS="$CPPFLAGS -g -DDEBUG" + LDFLAGS="$LDFLAGS -g" + else + echo "error: --enable-debug flag=$enable_debug entered but the compiler does not support -g" + exit 1 + fi ;; "gdb") - CPPFLAGS="$CPPFLAGS -ggdb -DDEBUG" - LDFLAGS="$LDFLAGS -g" + if test $ac_cv_prog_cc_g = yes; then + CPPFLAGS="$CPPFLAGS -ggdb -DDEBUG" + LDFLAGS="$LDFLAGS -g" + else + echo "error: --enable-debug flag=$enable_debug entered but the compiler does not support -g" + exit 1 + fi ;; esac diff --git a/configure.in b/configure.in index 8394dd3c09..ee81fa369f 100644 --- a/configure.in +++ b/configure.in @@ -940,12 +940,22 @@ case $enable_debug in CPPFLAGS="$CPPFLAGS" ;; "yes") - CPPFLAGS="$CPPFLAGS -g -DDEBUG" - LDFLAGS="$LDFLAGS -g" + if test $ac_cv_prog_cc_g = yes; then + CPPFLAGS="$CPPFLAGS -g -DDEBUG" + LDFLAGS="$LDFLAGS -g" + else + echo "error: --enable-debug flag=$enable_debug entered but the compiler does not support -g" + exit 1 + fi ;; "gdb") - CPPFLAGS="$CPPFLAGS -ggdb -DDEBUG" - LDFLAGS="$LDFLAGS -g" + if test $ac_cv_prog_cc_g = yes; then + CPPFLAGS="$CPPFLAGS -ggdb -DDEBUG" + LDFLAGS="$LDFLAGS -g" + else + echo "error: --enable-debug flag=$enable_debug entered but the compiler does not support -g" + exit 1 + fi ;; esac diff --git a/npc/test/infinite_warp.txt b/npc/test/infinite_warp.txt index 4deffa1ad3..aa73e4a7ee 100644 --- a/npc/test/infinite_warp.txt +++ b/npc/test/infinite_warp.txt @@ -8,6 +8,15 @@ //= Tests infinite warp loop prevention. //============================================================ -e_tower,74,116,0 warp #inf_warp1 2,2,e_tower,81,108 -e_tower,81,108,0 warp #inf_warp2 2,2,e_tower,75,84 -e_tower,75,84,0 warp #inf_warp3 2,2,e_tower,74,116 +//test 1, looping in same map +e_tower,74,116,0 warp #inf_warp1_1 2,2,e_tower,81,108 +e_tower,81,108,0 warp #inf_warp1_2 2,2,e_tower,75,84 +e_tower,75,84,0 warp #inf_warp1_3 2,2,e_tower,74,116 + +//test 2, looping in different map +e_tower,76,95,0 warp #inf_warp2_1 2,2,alb2trea,84,48 +alb2trea,84,48,0 warp #inf_warp2_2 2,2,guild_vs5,58,50 +guild_vs5,58,50,0 warp #inf_warp2_3 2,2,e_tower,76,95 + +//test 3, looping due to not available cell +ecl_tdun04,26,31,0 warp #inf_warp3_1 20,20,prontera,100,100