Remove AX_PTHREAD autoconf macro
[ric-plt/sdl.git] / configure.ac
1 # SDL version
2 #
3 # 1. If no interface changes has been made, increment SDL_MICRO.
4 # 2. Else, if new interfaces have been added but existing interfaces have not
5 #    been changed, increment SDL_MINOR and zero SDL_MICRO. (Backward compatible
6 #    interface change.)
7 # 3. Else, increment SDL_MAJOR and zero both SDL_MINOR and SDL_MICRO. (Backward
8 #    incompatible interface change.)
9 #
10 # Change the numbers just before release.
11
12 m4_define([SDL_MAJOR], [1])
13 m4_define([SDL_MINOR], [0])
14 m4_define([SDL_MICRO], [3])
15
16 # SDL ABI version with libtool
17 #
18 # 1. Always increase the revision value.
19 # 2. Increase the current value whenever an interface has been added, removed
20 #    or changed.
21 # 3. Increase the age value only if the changes made to the ABI are backward
22 #    compatible.
23 #
24 # Never zero or decrease any of the ABI version number values.
25 #
26 # See https://autotools.io/libtool/version.html
27 #
28 # Change the numbers just before release.
29
30 m4_define([SDL_CURRENT], [1])
31 m4_define([SDL_REVISION], [3])
32 m4_define([SDL_AGE], [0])
33
34 AC_INIT([shareddatalayer], [SDL_MAJOR.SDL_MINOR.SDL_MICRO], [], [], [https://gerrit.o-ran-sc.org/r/admin/repos/ric-plt/sdl])
35 AC_CONFIG_HEADERS([include/config.h])
36 AC_CONFIG_AUX_DIR([build-aux])
37 AC_CONFIG_FILES([Makefile])
38 AC_CONFIG_FILES([Doxyfile])
39 AC_CONFIG_FILES([run-tests.sh], [chmod +x run-tests.sh])
40 AC_CONFIG_MACRO_DIR([m4])
41 AM_INIT_AUTOMAKE([subdir-objects foreign 1.13 tar-pax -Wall -Werror])
42 AM_PROG_AR
43 LT_INIT
44 AM_SILENT_RULES([yes])
45 AC_PROG_CXX
46 AC_LANG([C++])
47 AC_PROG_MKDIR_P
48 AM_PROG_LIBTOOL
49 AC_CONFIG_MACRO_DIR([m4])
50 AX_CXX_COMPILE_STDCXX([11], [noext], [mandatory])
51 AX_BOOST_BASE([1.53], [], [AC_MSG_ERROR(Unable to detect suitable boost library)])
52 AX_BOOST_PROGRAM_OPTIONS
53 AX_BOOST_SYSTEM
54 AX_BOOST_FILESYSTEM
55 PKG_PROG_PKG_CONFIG
56
57 AC_DEFINE([HAVE_SYSTEMLOGGER], [0], [Have systemlogger])
58 AM_CONDITIONAL([SYSTEMLOGGER], [test "xyes" = "xno"])
59
60 SDL_CONF_DIR=$sysconfdir/$PACKAGE_NAME.d
61 AC_SUBST(SDL_CONF_DIR)
62
63 AC_DEFINE(HAVE_REDIS, [1], [Have redis])
64 AM_CONDITIONAL([REDIS], [test xtrue])
65
66 PKG_CHECK_MODULES([HIREDIS], [hiredis])
67 AC_DEFINE(HAVE_HIREDIS, [1], [Have hiredis])
68 AM_CONDITIONAL([HIREDIS], [test xtrue])
69 # Redis cluster configuration is not supported in RIC currently (implementation is not compatible with current hiredis-vip version)
70 AC_DEFINE(HAVE_HIREDIS_VIP, [0], [Have hiredis-vip])
71 AM_CONDITIONAL([HIREDIS_VIP], [test "xyes" = "xno"])
72
73 DX_DOT_FEATURE(ON)
74 DX_INIT_DOXYGEN([shareddatalayer], [Doxyfile], [doxygen-doc])
75 SDL_LT_VERSION=m4_format("%d:%d:%d", SDL_CURRENT, SDL_REVISION, SDL_AGE)
76 AC_SUBST(SDL_LT_VERSION)
77 AC_OUTPUT