forked from mochi-hpc/mochi-sdsdkv
-
Notifications
You must be signed in to change notification settings - Fork 1
/
configure.ac
143 lines (119 loc) · 3.83 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
#
# Copyright (c) 2018 Los Alamos National Security, LLC
# All rights reserved.
#
# This file is part of the sdsdkv project. See the LICENSE file at the
# top-level directory of this distribution.
#
AC_PREREQ([2.60])
AC_INIT([sdsdkv],
[0.1-alpha],
[sdsdkv],
[https://xgitlab.cels.anl.gov/sds/sdsdkv])
#dnl TODO(skg) add project URL.
AC_CONFIG_MACRO_DIR([config])
AC_CONFIG_SRCDIR([src])
AX_SDSDKV_LIBTOOL_VERSION
################################################################################
# AC_CANONICAL_*
################################################################################
# Must be in between AC_INIT and AM_INIT_AUTOMAKE.
AC_CANONICAL_BUILD
AC_CANONICAL_HOST
AC_CANONICAL_TARGET
################################################################################
# Automake things
################################################################################
# note: -Wall -Werror are automake options. they are NOT compiler flags
AM_INIT_AUTOMAKE([1.11 -Wall -Werror foreign])
# Build using AM_SILENT_RULES
AM_SILENT_RULES([yes])
AM_CONFIG_HEADER([config.h])
################################################################################
# C++ Language Support
################################################################################
AC_USE_SYSTEM_EXTENSIONS
AC_PROG_CXX
AX_CXX_COMPILE_STDCXX_11([], [mandatory])
AC_PROG_CXXCPP
AC_PROG_CXX_C_O
AX_PROG_MPICXX
AS_IF([test "x$AX_PROG_MPICXX_HAVE_MPICXX" != "x1"],dnl
[AC_MSG_ERROR(
[*** CXX cannot compile MPI apps. set CXX to something that can. ***])])
################################################################################
# Libtool things
################################################################################
AM_PROG_AR
LT_PREREQ([2.4.2])
LT_INIT
# checks for typedefs, structures, and compiler characteristics.
AC_TYPE_PID_T
AC_TYPE_SIZE_T
################################################################################
# Header checks.
################################################################################
AC_CHECK_HEADERS([\
inttypes.h sys/types.h unistd.h stdint.h
])
################################################################################
# External package dependencies
################################################################################
# Sets SDSKV_SERVER_CFLAGS
# SDSKV_SERVER_LIBS
PKG_CHECK_MODULES(
[SDSKV_SERVER],dnl
[sdskv-server],dnl
[], dnl
[AC_MSG_ERROR([sdskv-server pkg-config not found. ***])]
)
# Sets SDSKV_CLIENT_CFLAGS
# SDSKV_CLIENT_LIBS
PKG_CHECK_MODULES(
[SDSKV_CLIENT],dnl
[sdskv-client],dnl
[], dnl
[AC_MSG_ERROR([sdskv-client pkg-config not found. ***])]
)
# Sets SSG_CFLAGS
# SSG_LIBS
PKG_CHECK_MODULES(
[SSG],dnl
[ssg],dnl
[], dnl
[AC_MSG_ERROR([ssg pkg-config not found. ***])]
)
# Sets CH_PLACEMENT_CFLAGS
# CH_PLACEMENT_LIBS
PKG_CHECK_MODULES(
[CH_PLACEMENT],dnl
[ch-placement],dnl
[], dnl
[AC_MSG_ERROR([ch-placement pkg-config not found. ***])]
)
CXXFLAGS="${CXXFLAGS} ${SDSKV_SERVER_CFLAGS} ${SSG_CFLAGS} ${CH_PLACEMENT_CFLAGS}"
LIBS="${LIBS} ${SDSKV_SERVER_LIBS} ${SSG_LIBS} ${CH_PLACEMENT_LIBS}"
AC_CONFIG_FILES([
Makefile
src/Makefile
tests/Makefile
pkgconfig/Makefile
pkgconfig/sdsdkv.pc
])
AC_OUTPUT
# let the user know the configuration
cat << EOF
+-------------------------------------------------------------------------------
| sdsdkv Configuration :::::::::::::::::::::::::::::::::::::::::::::::::::::::
+-------------------------------------------------------------------------------
| version : ${VERSION}
| target : ${target}
| CXX : ${CXX}
| CXXFLAGS : ${CXXFLAGS}
| CPP : ${CPP}
| CPPFLAGS : ${CPPFLAGS}
| LDFLAGS : ${LDFLAGS}
| LIBS : ${LIBS}
+-------------------------------------------------------------------------------
EOF