Commit b2b37ef
committed
Respect user-provided CFLAGS (closes #836)
- configure.ac: Saves whether the user set CFLAGS before AC_PROG_CC runs,
uses a new LIBMODBUSCFLAGS variable for project-specific flags instead of
overwriting CFLAGS/CXXFLAGS
- removes unused CXXFLAGS handling (pure C library)
- src/Makefile.am and tests/Makefile.am: Include $(LIBMODBUSCFLAGS) in
AM_CFLAGS
The result is that CFLAGS="-O3 -march=native" ./configure now works as
expected, while the default behavior (-O2 or -g -O0 with --enable-debug) is
preserved.
Thank you Henrik Brodin @hbrodin1 parent a01439c commit b2b37ef
3 files changed
Lines changed: 16 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
33 | 37 | | |
34 | 38 | | |
35 | 39 | | |
| |||
178 | 182 | | |
179 | 183 | | |
180 | 184 | | |
| 185 | + | |
| 186 | + | |
181 | 187 | | |
182 | | - | |
183 | | - | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
184 | 193 | | |
185 | | - | |
186 | | - | |
| 194 | + | |
187 | 195 | | |
| 196 | + | |
188 | 197 | | |
189 | 198 | | |
190 | 199 | | |
| |||
197 | 206 | | |
198 | 207 | | |
199 | 208 | | |
200 | | - | |
| 209 | + | |
201 | 210 | | |
202 | 211 | | |
203 | 212 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
| 47 | + | |
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| |||
0 commit comments