2022-08-02 20:29:03 +00:00
|
|
|
AC_INIT([libosmo-gprs],
|
|
|
|
m4_esyscmd([./git-version-gen .tarball-version]),
|
|
|
|
[osmocom-net-gprs@lists.osmocom.org])
|
|
|
|
|
|
|
|
AC_CONFIG_AUX_DIR([.])
|
|
|
|
AC_CONFIG_MACRO_DIRS([m4])
|
2022-08-04 22:36:07 +00:00
|
|
|
AC_CONFIG_TESTDIR(tests)
|
2022-08-02 20:29:03 +00:00
|
|
|
|
|
|
|
AM_INIT_AUTOMAKE([dist-bzip2])
|
|
|
|
|
|
|
|
CFLAGS="$CFLAGS -std=gnu11"
|
|
|
|
|
|
|
|
dnl kernel style compile messages
|
|
|
|
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
|
|
|
|
|
|
|
|
dnl include release helper
|
|
|
|
RELMAKE='-include osmo-release.mk'
|
|
|
|
AC_SUBST([RELMAKE])
|
|
|
|
|
|
|
|
dnl checks for programs
|
|
|
|
AC_PROG_MAKE_SET
|
|
|
|
AC_PROG_CC
|
|
|
|
AC_PROG_INSTALL
|
|
|
|
LT_INIT
|
|
|
|
|
2023-08-24 11:04:17 +00:00
|
|
|
dnl patching ${archive_cmds} to affect generation of file "libtool" to fix linking with clang
|
|
|
|
AS_CASE(["$LD"],[*clang*],
|
|
|
|
[AS_CASE(["${host_os}"],
|
|
|
|
[*linux*],[archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'])])
|
|
|
|
|
2022-08-02 20:29:03 +00:00
|
|
|
dnl check for pkg-config (explained in detail in libosmocore/configure.ac)
|
|
|
|
AC_PATH_PROG(PKG_CONFIG_INSTALLED, pkg-config, no)
|
|
|
|
if test "x$PKG_CONFIG_INSTALLED" = "xno"; then
|
|
|
|
AC_MSG_WARN([You need to install pkg-config])
|
|
|
|
fi
|
|
|
|
PKG_PROG_PKG_CONFIG([0.20])
|
|
|
|
|
|
|
|
dnl checks for libraries
|
|
|
|
PKG_CHECK_MODULES(LIBOSMOCORE, libosmocore >= 1.7.0)
|
2022-12-20 20:41:03 +00:00
|
|
|
PKG_CHECK_MODULES(LIBOSMOGSM, libosmogsm >= 1.7.0)
|
2022-08-02 20:29:03 +00:00
|
|
|
|
|
|
|
dnl checks for header files
|
|
|
|
AC_HEADER_STDC
|
|
|
|
|
|
|
|
dnl Checks for typedefs, structures and compiler characteristics
|
|
|
|
|
|
|
|
AC_ARG_ENABLE(sanitize,
|
|
|
|
[AS_HELP_STRING(
|
|
|
|
[--enable-sanitize],
|
|
|
|
[Compile with address sanitizer enabled],
|
|
|
|
)],
|
|
|
|
[sanitize=$enableval], [sanitize="no"])
|
|
|
|
if test x"$sanitize" = x"yes"
|
|
|
|
then
|
|
|
|
CFLAGS="$CFLAGS -fsanitize=address -fsanitize=undefined"
|
|
|
|
CPPFLAGS="$CPPFLAGS -fsanitize=address -fsanitize=undefined"
|
|
|
|
fi
|
|
|
|
|
|
|
|
AC_ARG_ENABLE(werror,
|
|
|
|
[AS_HELP_STRING(
|
|
|
|
[--enable-werror],
|
|
|
|
[Turn all compiler warnings into errors, with exceptions:
|
|
|
|
a) deprecation (allow upstream to mark deprecation without breaking builds);
|
|
|
|
b) "#warning" pragmas (allow to remind ourselves of errors without breaking builds)
|
|
|
|
]
|
|
|
|
)],
|
|
|
|
[werror=$enableval], [werror="no"])
|
|
|
|
if test x"$werror" = x"yes"
|
|
|
|
then
|
|
|
|
WERROR_FLAGS="-Werror"
|
2022-11-04 20:52:41 +00:00
|
|
|
WERROR_FLAGS+=" -Werror=implicit-int -Werror=int-conversion -Werror=old-style-definition"
|
2022-08-02 20:29:03 +00:00
|
|
|
WERROR_FLAGS+=" -Wno-error=deprecated -Wno-error=deprecated-declarations"
|
|
|
|
WERROR_FLAGS+=" -Wno-error=cpp" # "#warning"
|
|
|
|
CFLAGS="$CFLAGS $WERROR_FLAGS"
|
|
|
|
CPPFLAGS="$CPPFLAGS $WERROR_FLAGS"
|
|
|
|
fi
|
|
|
|
|
|
|
|
AC_MSG_RESULT([CFLAGS="$CFLAGS"])
|
|
|
|
AC_MSG_RESULT([CPPFLAGS="$CPPFLAGS"])
|
|
|
|
|
|
|
|
AC_CONFIG_HEADERS([config.h])
|
|
|
|
AC_CONFIG_FILES([libosmo-csn1.pc
|
2023-03-14 16:14:53 +00:00
|
|
|
libosmo-gprs-gmm.pc
|
2022-08-25 23:11:08 +00:00
|
|
|
libosmo-gprs-llc.pc
|
2022-08-04 00:17:59 +00:00
|
|
|
libosmo-gprs-rlcmac.pc
|
2022-12-05 13:01:36 +00:00
|
|
|
libosmo-gprs-sndcp.pc
|
2023-03-24 16:05:09 +00:00
|
|
|
libosmo-gprs-sm.pc
|
2022-08-02 20:29:03 +00:00
|
|
|
include/Makefile
|
|
|
|
include/osmocom/Makefile
|
|
|
|
include/osmocom/csn1/Makefile
|
2022-08-04 00:17:59 +00:00
|
|
|
include/osmocom/gprs/Makefile
|
2023-03-14 16:14:53 +00:00
|
|
|
include/osmocom/gprs/gmm/Makefile
|
2022-08-25 23:11:08 +00:00
|
|
|
include/osmocom/gprs/llc/Makefile
|
2022-08-04 00:17:59 +00:00
|
|
|
include/osmocom/gprs/rlcmac/Makefile
|
2022-12-05 13:01:36 +00:00
|
|
|
include/osmocom/gprs/sndcp/Makefile
|
2023-03-24 16:05:09 +00:00
|
|
|
include/osmocom/gprs/sm/Makefile
|
2022-08-02 20:29:03 +00:00
|
|
|
src/Makefile
|
2023-07-27 14:09:10 +00:00
|
|
|
src/common/Makefile
|
2022-08-02 20:29:03 +00:00
|
|
|
src/csn1/Makefile
|
2023-03-14 16:14:53 +00:00
|
|
|
src/gmm/Makefile
|
2022-08-25 23:11:08 +00:00
|
|
|
src/llc/Makefile
|
2022-08-04 00:17:59 +00:00
|
|
|
src/rlcmac/Makefile
|
2022-12-05 13:01:36 +00:00
|
|
|
src/sndcp/Makefile
|
2023-03-24 16:05:09 +00:00
|
|
|
src/sm/Makefile
|
2022-08-04 22:36:07 +00:00
|
|
|
tests/Makefile
|
2023-03-14 16:14:53 +00:00
|
|
|
tests/gmm/Makefile
|
2022-09-18 15:18:31 +00:00
|
|
|
tests/llc/Makefile
|
|
|
|
tests/rlcmac/Makefile
|
2022-12-05 13:01:36 +00:00
|
|
|
tests/sndcp/Makefile
|
2023-03-24 16:05:09 +00:00
|
|
|
tests/sm/Makefile
|
2022-08-17 22:27:18 +00:00
|
|
|
Makefile
|
|
|
|
contrib/libosmo-gprs.spec])
|
2022-08-02 20:29:03 +00:00
|
|
|
AC_OUTPUT
|