djview: don't mess with CFLAGS on --enable-debug

This commit is contained in:
Đoàn Trần Công Danh 2021-11-15 08:43:49 +07:00
parent 2c3baf1290
commit 06a2380e67
1 changed files with 28 additions and 0 deletions

View File

@ -0,0 +1,28 @@
Index: djview4-4.12/config/acinclude.m4
===================================================================
--- djview4-4.12.orig/config/acinclude.m4
+++ djview4-4.12/config/acinclude.m4
@@ -73,23 +73,6 @@ AC_DEFUN([AC_CXX_OPTIMIZE],[
[ac_debug=$enableval],[ac_debug=no])
OPTS=
AC_SUBST(OPTS)
- saved_CXXFLAGS="$CXXFLAGS"
- saved_CFLAGS="$CFLAGS"
- CXXFLAGS=
- CFLAGS=
- for opt in $saved_CXXFLAGS ; do
- case $opt in
- -g*) test $ac_debug != no && OPTS="$OPTS $opt" ;;
- -O*) ;;
- *) CXXFLAGS="$CXXFLAGS $opt" ;;
- esac
- done
- for opt in $saved_CFLAGS ; do
- case $opt in
- -O*|-g*) ;;
- *) CFLAGS="$CFLAGS $opt" ;;
- esac
- done
if test x$ac_debug = xno ; then
OPTS=-DNDEBUG
AC_CHECK_CXX_OPT([-Wall],[OPTS="$OPTS -Wall"])