~connman-maintainers/connman/head

« back to all changes in this revision

Viewing changes to configure.ac

  • Committer: Marcel Holtmann
  • Author(s): Denis Kenzior
  • Date: 2023-09-16 12:17:45 UTC
  • Revision ID: git-v1:1a6cbdfa30da24de385ab4fba322055a21647189
build: Make sure --disable-optimization works

acinclude.m4 still adds -O2 and various FORTIFY_SOURCE flags, even if
--disable-optimization is used during configure.  Fix that.

While here, add -fsigned-char and -fno-exceptions flags.

Show diffs side-by-side

added added

removed removed

Lines of Context:
42
42
AC_ARG_ENABLE(optimization, AS_HELP_STRING([--disable-optimization],
43
43
                        [disable code optimization through compiler]), [
44
44
        if (test "${enableval}" = "no"); then
45
 
                CFLAGS="$CFLAGS -O0 -U_FORTIFY_SOURCE"
 
45
                CFLAGS="$CFLAGS -O0"
46
46
        fi
47
47
])
48
48
 
 
49
if (test "${enable_optimization}" != "no"); then
 
50
        CFLAGS+=" -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2"
 
51
fi
 
52
 
49
53
AC_ARG_ENABLE(debug, AS_HELP_STRING([--enable-debug],
50
54
                        [enable compiling with debugging information]), [
51
55
        if (test "${enableval}" = "yes" &&