mobile: fix -Wmaybe-uninitialized in gsm48_rr_tx_meas_rep()
[osmocom-bb.git] / src / host / virt_phy / configure.ac
blob19e4bc7ac9212d8fa54c1ec352dfab7d6ef2f70c
1 dnl Process this file with autoconf to produce a configure script
2 AC_INIT([virtphy], 0.0.0)
3 AM_CONFIG_HEADER([config.h])
4 AM_INIT_AUTOMAKE([foreign dist-bzip2 subdir-objects])
6 CFLAGS="$CFLAGS -std=gnu11"
8 dnl kernel style compile messages
9 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
11 dnl checks for programs
12 AC_PROG_MAKE_SET
13 AC_PROG_CC
14 AC_PROG_INSTALL
16 dnl checks for libraries
17 dnl TODO: insert libosmocore version with GSMTAP_CHANNEL_VOICE: PKG_CHECK_MODULES(LIBOSMOCORE, libosmocore >= 1.4.0)
18 dnl       (at time of writing not released yet)
19 PKG_CHECK_MODULES(LIBOSMOCORE, libosmocore)
20 PKG_CHECK_MODULES(LIBOSMOGSM, libosmogsm)
22 dnl checks for header files
23 AC_HEADER_STDC
25 dnl Checks for typedefs, structures and compiler characteristics
27 AC_ARG_ENABLE(sanitize,
28         [AS_HELP_STRING(
29                 [--enable-sanitize],
30                 [Compile with address sanitizer enabled],
31         )], [sanitize=$enableval], [sanitize="no"])
32 if test x"$sanitize" = x"yes"
33 then
34         CFLAGS="$CFLAGS -fsanitize=address -fsanitize=undefined"
35         CPPFLAGS="$CPPFLAGS -fsanitize=address -fsanitize=undefined"
38 AC_ARG_ENABLE(werror,
39         [AS_HELP_STRING(
40                 [--enable-werror],
41                 [Turn all compiler warnings into errors, with exceptions:
42                  a) deprecation (allow upstream to mark deprecation without breaking builds);
43                  b) "#warning" pragmas (allow to remind ourselves of errors without breaking builds)
44                 ]
45         )],
46         [werror=$enableval], [werror="no"])
47 if test x"$werror" = x"yes"
48 then
49         WERROR_FLAGS="-Werror"
50         WERROR_FLAGS+=" -Werror=implicit-int -Werror=int-conversion -Werror=old-style-definition"
51         WERROR_FLAGS+=" -Wno-error=deprecated -Wno-error=deprecated-declarations"
52         WERROR_FLAGS+=" -Wno-error=cpp" # "#warning"
53         CFLAGS="$CFLAGS $WERROR_FLAGS"
54         CPPFLAGS="$CPPFLAGS $WERROR_FLAGS"
57 AC_MSG_RESULT([CFLAGS="$CFLAGS"])
58 AC_MSG_RESULT([CPPFLAGS="$CPPFLAGS"])
60 AC_CONFIG_FILES([
61  Makefile
62  include/Makefile
63  include/osmocom/Makefile
64  include/osmocom/bb/Makefile
65  include/osmocom/bb/virtphy/Makefile
66  src/Makefile
68 AC_OUTPUT