This repository has been archived by the owner on Feb 8, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 12
/
configure.ac
59 lines (44 loc) · 1.49 KB
/
configure.ac
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#second is version number
# third is bug report address
AC_INIT([cortx-motr-app], [1.0])
# i.e. this program doesn't follow the gnu coding standards, and doesn't have
# ChangeLog, COPYING, AUTHORS, INSTALL, README etc. files.
AM_INIT_AUTOMAKE([-Wall -Werror -Wno-portability foreign])
#
# Checking for Platform support -------------------------------------------{{{1
#
ARCH=
AC_CANONICAL_HOST
AS_CASE([$host_cpu],
[aarch64], [ARCH=aarch64],
[x86_64], [ARCH=x86_64],
[AC_MSG_ERROR("Only X86_64 and aarch64 are platforms supported")]
)
castxml=`which castxml`
src_dir_exist=`test -d "/usr/include/motr"`
M0_SRC_DIR=
AS_IF([test x$src_dir_exist = x1],
[
M0_SRC_DIR="/usr/include/motr"
],[ M0_SRC_DIR=]
)
AM_CONDITIONAL(M0_SRC_DIR_EXIST, [test "x$src_dir_exist" = "x1"])
AM_CONDITIONAL(CASTXML, [test "x$castxml" != "x"])
PAGE_SIZE=$(getconf PAGE_SIZE)
PAGE_SHIFT=$(( $((PAGE_SIZE==4096)) ? 12 : $(($((PAGE_SIZE==65536)) ? 16 : 14)) ))
M0_CFLAGS="-DPAGE_SIZE=$PAGE_SIZE"UL
AC_SUBST(M0_CFLAGS)
AC_SUBST(M0_SRC_DIR)
# Check for C compiler
AC_PROG_CC
# Checks for libraries.
AC_CHECK_LIB([ssl], [main],[SSL=-lssl],echo "Error: Required library
ssl not found. Install openssl development package and try again" &&
exit 1 )
AC_CHECK_LIB([crypto], [main],[CRYPTO=-lcrypto],echo "Error: Required
library crypto not found. Install openssl development package and try
again" && exit 1)
# AC_CONFIG_HEADERS([config.h])
AC_CONFIG_FILES([Makefile])
# Generate the output
AC_OUTPUT