File: dont-mangle-cflags.patch

package info (click to toggle)
audacity 2.2.2-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 129,312 kB
  • sloc: ansic: 373,350; cpp: 276,880; sh: 56,060; python: 18,922; makefile: 10,309; lisp: 8,365; xml: 1,888; perl: 1,798; java: 1,551; asm: 545; pascal: 395; sed: 58; awk: 35
file content (42 lines) | stat: -rw-r--r-- 1,181 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
Index: configure.in
===================================================================
RCS file: /cvsroot/audacity/lib-src/sbsms/configure.in,v
retrieving revision 1.5
diff -u -r1.5 configure.in
--- configure.in	17 Jan 2009 21:50:37 -0000	1.5
+++ configure.in	12 Jul 2009 16:32:54 -0000
@@ -39,8 +39,18 @@
 AC_PROG_LIBTOOL
 AM_PROG_LIBTOOL
 
+# save $CXXFLAGS etc. since AC_PROG_CXX likes to insert "-g -O2"
+# if $CXXFLAGS is blank and it finds GCC
+cflags_save="$CFLAGS"
+cppflags_save="$CPPFLAGS"
+cxxflags_save="$CXXFLAGS"
 AC_LANG([C++])
 AC_PROG_CXX
+AC_PROG_CXXCPP
+# restore those variables back
+CFLAGS="$cflags_save"
+CPPFLAGS="$cppflags_save"
+CXXFLAGS="$cxxflags_save"
 
 AC_CHECK_FUNCS(malloc calloc free memcpy)
 
@@ -123,12 +133,10 @@
 fi
 AM_CONDITIONAL(ENABLE_PORTAUDIO, test x$enable_portaudio = xyes)
 
-CXXFLAGS=`echo $CXXFLAGS | sed -e "s/-g//" -e "s/-O2//"`
-
+# legitimately we can add -g to flags for debug builds, because they won't
+# be much use otherwise
 if test x$enable_debug = xyes; then
-   CXXFLAGS="$CXXFLAGS -g -O0"
-else
-   CXXFLAGS="$CXXFLAGS -O3 -fomit-frame-pointer"
+   CXXFLAGS="$CXXFLAGS -g"
 fi
 
 if test x$enable_static = xyes; then