Rolf Badorek | ef2bf51 | 2019-08-20 11:17:15 +0300 | [diff] [blame] | 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]) |
Petri Ovaska | 63869e1 | 2021-09-17 11:54:21 +0300 | [diff] [blame] | 13 | m4_define([SDL_MINOR], [5]) |
Petri Ovaska | fefde50 | 2021-09-17 12:33:24 +0300 | [diff] [blame^] | 14 | m4_define([SDL_MICRO], [1]) |
Rolf Badorek | ef2bf51 | 2019-08-20 11:17:15 +0300 | [diff] [blame] | 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 | # |
Rolf Badorek | d2a7018 | 2019-11-08 11:44:00 +0200 | [diff] [blame] | 24 | # Never zero or decrease any of the ABI version number values. |
| 25 | # |
Rolf Badorek | ef2bf51 | 2019-08-20 11:17:15 +0300 | [diff] [blame] | 26 | # See https://autotools.io/libtool/version.html |
| 27 | # |
| 28 | # Change the numbers just before release. |
| 29 | |
Petri Ovaska | 63869e1 | 2021-09-17 11:54:21 +0300 | [diff] [blame] | 30 | m4_define([SDL_CURRENT], [5]) |
Petri Ovaska | fefde50 | 2021-09-17 12:33:24 +0300 | [diff] [blame^] | 31 | m4_define([SDL_REVISION], [13]) |
Petri Ovaska | ece6708 | 2021-04-15 11:08:13 +0300 | [diff] [blame] | 32 | m4_define([SDL_AGE], [0]) |
Rolf Badorek | ef2bf51 | 2019-08-20 11:17:15 +0300 | [diff] [blame] | 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]) |
Rolf Badorek | cc9244c | 2019-11-12 18:19:37 +0200 | [diff] [blame] | 39 | AC_CONFIG_FILES([rpm/sdl.spec]) |
| 40 | AC_CONFIG_FILES([debian/changelog]) |
Rolf Badorek | ef2bf51 | 2019-08-20 11:17:15 +0300 | [diff] [blame] | 41 | AC_CONFIG_FILES([run-tests.sh], [chmod +x run-tests.sh]) |
| 42 | AC_CONFIG_MACRO_DIR([m4]) |
| 43 | AM_INIT_AUTOMAKE([subdir-objects foreign 1.13 tar-pax -Wall -Werror]) |
| 44 | AM_PROG_AR |
| 45 | LT_INIT |
| 46 | AM_SILENT_RULES([yes]) |
| 47 | AC_PROG_CXX |
| 48 | AC_LANG([C++]) |
| 49 | AC_PROG_MKDIR_P |
| 50 | AM_PROG_LIBTOOL |
| 51 | AC_CONFIG_MACRO_DIR([m4]) |
| 52 | AX_CXX_COMPILE_STDCXX([11], [noext], [mandatory]) |
Rolf Badorek | ef2bf51 | 2019-08-20 11:17:15 +0300 | [diff] [blame] | 53 | AX_BOOST_BASE([1.53], [], [AC_MSG_ERROR(Unable to detect suitable boost library)]) |
| 54 | AX_BOOST_PROGRAM_OPTIONS |
| 55 | AX_BOOST_SYSTEM |
| 56 | AX_BOOST_FILESYSTEM |
| 57 | PKG_PROG_PKG_CONFIG |
| 58 | |
Rolf Badorek | 65fb3b1 | 2019-10-02 17:22:45 +0300 | [diff] [blame] | 59 | AC_DEFINE([HAVE_SYSTEMLOGGER], [0], [Have systemlogger]) |
| 60 | AM_CONDITIONAL([SYSTEMLOGGER], [test "xyes" = "xno"]) |
Rolf Badorek | ef2bf51 | 2019-08-20 11:17:15 +0300 | [diff] [blame] | 61 | |
| 62 | SDL_CONF_DIR=$sysconfdir/$PACKAGE_NAME.d |
| 63 | AC_SUBST(SDL_CONF_DIR) |
| 64 | |
| 65 | AC_DEFINE(HAVE_REDIS, [1], [Have redis]) |
| 66 | AM_CONDITIONAL([REDIS], [test xtrue]) |
Rolf Badorek | 8324d02 | 2019-09-17 16:47:20 +0300 | [diff] [blame] | 67 | |
Rolf Badorek | ef2bf51 | 2019-08-20 11:17:15 +0300 | [diff] [blame] | 68 | PKG_CHECK_MODULES([HIREDIS], [hiredis]) |
| 69 | AC_DEFINE(HAVE_HIREDIS, [1], [Have hiredis]) |
| 70 | AM_CONDITIONAL([HIREDIS], [test xtrue]) |
| 71 | # Redis cluster configuration is not supported in RIC currently (implementation is not compatible with current hiredis-vip version) |
| 72 | AC_DEFINE(HAVE_HIREDIS_VIP, [0], [Have hiredis-vip]) |
| 73 | AM_CONDITIONAL([HIREDIS_VIP], [test "xyes" = "xno"]) |
| 74 | |
Timo Tietavainen | 4c51683 | 2020-05-15 11:10:54 +0300 | [diff] [blame] | 75 | # |
| 76 | # Configuration option --with-rpm-dir=DIR |
| 77 | # If this option is given, rpm packages building is enabled and ready rpms are |
| 78 | # copied to the directory. |
| 79 | # |
| 80 | AC_ARG_WITH([rpm-dir], |
| 81 | AS_HELP_STRING([--with-rpm-dir=DIR], |
| 82 | [Directory for build rpm packages]), |
| 83 | [AC_CHECK_PROG(RPMBUILD, rpmbuild, "yes", "no") |
| 84 | AC_CHECK_PROG(RPM, rpm, "yes", "no") |
| 85 | AS_IF([test "x$RPMBUILD" != xyes], |
| 86 | [AC_MSG_ERROR([rpmbuild needs to be installed])], |
| 87 | [test "x$RPM" != xyes], |
| 88 | [AC_MSG_ERROR([rpm is needs to be installed])])], |
| 89 | [with_rpm_dir=no]) |
| 90 | |
| 91 | AC_MSG_CHECKING([rpm package]) |
| 92 | if test "x$with_rpm_dir" = "xno"; then |
| 93 | AC_MSG_RESULT([no]) |
| 94 | RPM_DIR="/tmp" |
| 95 | else |
| 96 | AC_MSG_RESULT([yes]) |
| 97 | AC_MSG_NOTICE([rpm directory: $with_rpm_dir]) |
| 98 | RPM_DIR="$with_rpm_dir" |
| 99 | fi |
| 100 | AC_SUBST(RPM_DIR) |
| 101 | AM_CONDITIONAL([ENABLE_RPM_BUILD],[test "x$with_rpm_dir" != "xno"]) |
| 102 | |
| 103 | |
| 104 | # |
| 105 | # Configuration option --with-deb-dir=DIR |
| 106 | # If this option is given, Debian packages packages building is enabled and ready |
| 107 | # packages are copied to the directory. |
| 108 | # |
| 109 | AC_ARG_WITH([deb-dir], |
| 110 | AS_HELP_STRING([--with-deb-dir=DIR], |
| 111 | [Directory for build Debian packages]), |
| 112 | [AC_CHECK_PROG(DEBUILD, dpkg-buildpackage, "yes", "no") |
| 113 | AS_IF([test "x$DEBUILD" != xyes], |
| 114 | [AC_MSG_ERROR([dpkg-buildpackage needs to be installed])], |
| 115 | [test "x$with_rpm_dir" != "xno"], |
| 116 | [AC_MSG_ERROR([--with-deb-dir and --with-rpm-dir are mutually exclusive])])], |
| 117 | [with_deb_dir=no]) |
| 118 | |
| 119 | AC_MSG_CHECKING([deb package]) |
| 120 | if test "x$with_deb_dir" = "xno"; then |
| 121 | AC_MSG_RESULT([no]) |
| 122 | DEB_DIR="/tmp" |
| 123 | else |
| 124 | AC_MSG_RESULT([yes]) |
| 125 | AC_MSG_NOTICE([deb directory: $with_deb_dir]) |
| 126 | DEB_DIR="$with_deb_dir" |
| 127 | fi |
| 128 | AC_SUBST(DEB_DIR) |
| 129 | AM_CONDITIONAL([ENABLE_DEB_BUILD],[test "x$with_deb_dir" != "xno"]) |
| 130 | |
| 131 | |
| 132 | # |
| 133 | # Configuration option --with-gcov-report-dir=DIR |
| 134 | # If this option is given, gcov unit test coverage analysis is enabled and |
| 135 | # results are copied to the directory. |
| 136 | # |
Timo Tietavainen | 931b2b0 | 2020-05-11 11:48:39 +0300 | [diff] [blame] | 137 | AC_ARG_WITH([gcov-report-dir], |
| 138 | AS_HELP_STRING([--with-gcov-report-dir=DIR], |
| 139 | [Directory for GCOV report files]), |
| 140 | [], |
| 141 | [with_gcov_report_dir=no]) |
| 142 | AC_MSG_CHECKING([gcov]) |
| 143 | if test "x$with_gcov_report_dir" = "xno"; then |
| 144 | AC_MSG_RESULT([no]) |
| 145 | GCOV_REPORT_DIR="gcov_report" |
| 146 | else |
| 147 | AC_MSG_RESULT([yes]) |
| 148 | AC_MSG_NOTICE([gcov report directory: $with_gcov_report_dir]) |
| 149 | GCOV_REPORT_DIR="$with_gcov_report_dir" |
| 150 | fi |
| 151 | AC_SUBST(GCOV_REPORT_DIR) |
| 152 | AM_CONDITIONAL([ENABLE_GCOV],[test "x$with_gcov_report_dir" != "xno"]) |
| 153 | |
Rolf Badorek | ef2bf51 | 2019-08-20 11:17:15 +0300 | [diff] [blame] | 154 | DX_DOT_FEATURE(ON) |
| 155 | DX_INIT_DOXYGEN([shareddatalayer], [Doxyfile], [doxygen-doc]) |
| 156 | SDL_LT_VERSION=m4_format("%d:%d:%d", SDL_CURRENT, SDL_REVISION, SDL_AGE) |
| 157 | AC_SUBST(SDL_LT_VERSION) |
| 158 | AC_OUTPUT |