blob: f70ead0dcce46fdaa224b367a40529e3f1e42cf4 [file] [log] [blame]
Pablo Neira Ayuso14506662014-02-20 18:43:15 +01001dnl Process this file with autoconf to create configure.
2
Harald Weltedd1e2f22017-11-12 23:27:30 +09003AC_INIT([libgtpnl], [1.1.0])
Pablo Neira Ayuso14506662014-02-20 18:43:15 +01004AC_CONFIG_AUX_DIR([build-aux])
5AC_CANONICAL_HOST
6AC_CONFIG_MACRO_DIR([m4])
7AC_CONFIG_HEADERS([config.h])
8AM_INIT_AUTOMAKE([foreign tar-pax no-dist-gzip dist-bzip2 1.6 subdir-objects])
9
10dnl kernel style compile messages
11m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
12
13dnl Dependencies
14PKG_CHECK_MODULES([LIBMNL], [libmnl >= 1.0.0])
15
Harald Welte51c10b72017-11-12 23:25:00 +090016dnl include release helper
17RELMAKE='-include osmo-release.mk'
18AC_SUBST([RELMAKE])
19
Pablo Neira Ayuso14506662014-02-20 18:43:15 +010020AC_PROG_CC
21AM_PROG_CC_C_O
22AC_EXEEXT
23AC_DISABLE_STATIC
24LT_INIT
25CHECK_GCC_FVISIBILITY
26case "$host" in
27*-*-linux* | *-*-uclinux*) ;;
28*) AC_MSG_ERROR([Linux only, dude!]);;
29esac
30
Harald Welte134d0a32017-11-12 22:41:54 +090031AC_ARG_ENABLE(sanitize,
32 [AS_HELP_STRING(
33 [--enable-sanitize],
34 [Compile with address sanitizer enabled],
35 )],
36 [sanitize=$enableval], [sanitize="no"])
37if test x"$sanitize" = x"yes"
38then
39 CFLAGS="$CFLAGS -fsanitize=address -fsanitize=undefined"
40 CPPFLAGS="$CPPFLAGS -fsanitize=address -fsanitize=undefined"
41fi
42
Pablo Neira Ayuso14506662014-02-20 18:43:15 +010043regular_CPPFLAGS="-D_FILE_OFFSET_BITS=64 -D_REENTRANT"
44regular_CFLAGS="-Wall -Waggregate-return -Wmissing-declarations \
45 -Wmissing-prototypes -Wshadow -Wstrict-prototypes \
46 -Wformat=2 -pipe"
47AC_SUBST([regular_CPPFLAGS])
48AC_SUBST([regular_CFLAGS])
49AC_CONFIG_FILES([Makefile src/Makefile include/Makefile include/libgtpnl/Makefile include/linux/Makefile tools/Makefile libgtpnl.pc])
50AC_OUTPUT