Code

patches: Added CXXFLAGS.dpatch to remove -O3 from CXXFLAGS.
[pkg-pfstmo.git] / debian / patches / CXXFLAGS.dpatch
1 #! /bin/sh /usr/share/dpatch/dpatch-run
2 ## CXXFLAGS.dpatch by Sebastian Harl <tokkee@debian.org>
3 ##
4 ## DP: Remove -O3 from CXXFLAGS.
6 @DPATCH@
8 diff a/configure b/configure
9 --- a/configure
10 +++ b/configure
11 @@ -19378,8 +19378,6 @@ fi
12  # Check whether --enable-debug was given.
13  if test "${enable_debug+set}" = set; then
14    enableval=$enable_debug; if test "$enable_debug" = "yes" ; then
15 -                     temp_CXXFLAGS=`echo $CXXFLAGS | sed "s/-O./ /; s/-g//"`
16 -                    CXXFLAGS="-g $temp_CXXFLAGS"
17                      cat >>confdefs.h <<\_ACEOF
18  #define DEBUG 1
19  _ACEOF
20 @@ -19387,8 +19385,6 @@ _ACEOF
21                   fi
22  else
23    enable_debug="no"
24 -                     temp_CXXFLAGS=`echo $CXXFLAGS | sed "s/-O./ /; s/-g//"`
25 -                    CXXFLAGS="-O3 $temp_CXXFLAGS"
26  
27  cat >>confdefs.h <<\_ACEOF
28  #define NDEBUG 1
29 diff a/configure.ac b/configure.ac
30 --- a/configure.ac
31 +++ b/configure.ac
32 @@ -37,13 +37,9 @@ AC_ARG_ENABLE(debug,
33                 AC_HELP_STRING([--enable-debug],
34                                  [Enable debug symbols and asserts]),
35                  [if test "$enable_debug" = "yes" ; then
36 -                     temp_CXXFLAGS=`echo $CXXFLAGS | sed "s/-O./ /; s/-g//"`
37 -                    CXXFLAGS="-g $temp_CXXFLAGS"
38                      AC_DEFINE([DEBUG])
39                   fi],
40                    [enable_debug="no"
41 -                     temp_CXXFLAGS=`echo $CXXFLAGS | sed "s/-O./ /; s/-g//"`
42 -                    CXXFLAGS="-O3 $temp_CXXFLAGS"
43                       AC_DEFINE(NDEBUG, 1, [Disable assertion checks])
44  
45