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
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
25 dnl Checks for typedefs, structures and compiler characteristics
27 AC_ARG_ENABLE(sanitize,
30 [Compile with address sanitizer enabled],
31 )], [sanitize=$enableval], [sanitize="no"])
32 if test x"$sanitize" = x"yes"
34 CFLAGS="$CFLAGS -fsanitize=address -fsanitize=undefined"
35 CPPFLAGS="$CPPFLAGS -fsanitize=address -fsanitize=undefined"
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)
46 [werror=$enableval], [werror="no"])
47 if test x"$werror" = x"yes"
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"])
63 include/osmocom/Makefile
64 include/osmocom/bb/Makefile
65 include/osmocom/bb/virtphy/Makefile