-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfigure.ac
721 lines (624 loc) · 22.2 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
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
# -*- OpenSAF -*-
#
# (C) Copyright 2008 The OpenSAF Foundation
# Copyright Ericsson AB 2008, 2017 - All Rights Reserved.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# or FITNESS FOR A PARTICULAR PURPOSE. This file and program are licensed
# under the GNU Lesser General Public License Version 2.1, February 1999.
# The complete license can be accessed from the following location:
# http://opensource.org/licenses/lgpl-license.php
# See the Copying file included with the OpenSAF distribution for full
# licensing terms.
#
# Author(s): Wind River Systems
#
AC_PREREQ([2.64])
AC_INIT([opensaf], [5.24.02], [[email protected]], [opensaf], [http://opensaf.sourceforge.net/])
AC_CONFIG_AUX_DIR([.])
AC_CANONICAL_SYSTEM
AC_CONFIG_SRCDIR([opensaf.spec.in])
AC_CONFIG_HEADER([src/osaf/config.h])
AC_CONFIG_MACRO_DIR([m4])
AM_INIT_AUTOMAKE([1.11.1 subdir-objects])
m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
AC_USE_SYSTEM_EXTENSIONS
# (major version) = (first number) - (third number)
# (minor version) = (third number)
# (patch version) = (second number)
OPENSAF_LIB_VERSION=0:0:0
AC_SUBST([OPENSAF_LIB_VERSION])
INTERNAL_VERSION_ID=@OSAF_LONG_GIT_REV@
AC_SUBST([INTERNAL_VERSION_ID])
# FIXME: Until the m4 macro gets cleaned for DSO symbol tests and not executable
AM_CONDITIONAL(HAVE_LD_VERSION_SCRIPT, test "yes" = "yes")
#m4_include([m4/linker-script.m4])
#gl_LINKER_SCRIPT
OPENSAF_RELEASE=$PACKAGE_VERSION
OPENSAF_BUGREPORT=$PACKAGE_BUGREPORT
AC_SUBST([OPENSAF_RELEASE])
AC_SUBST([OPENSAF_BUGREPORT])
AC_SUBST([ac_configure_args])
#
# Check if rpath is enabled
#
AC_MSG_CHECKING([whether to build with rpath enabled])
AC_ARG_ENABLE([rpath],
[AC_HELP_STRING([--disable-rpath],
[patches libtool to not use rpath in the libraries produced.
[Default=no]])],
[],
[enable_rpath=yes])
AC_MSG_RESULT([$enable_rpath])
LT_PREREQ([2.2.6])
LT_INIT([disable-static pic-only])
AC_CONFIG_COMMANDS([libtool-rpath-patch],
[if test "$libtool_patch_use_rpath" = "no"; then
sed < libtool > libtool-2 's/^hardcode_libdir_flag_spec.*$'/'hardcode_libdir_flag_spec=""/'
mv libtool-2 libtool
sed < libtool > libtool-2 's/^runpath_var=LD_RUN_PATH$'/'runpath_var=DIE_RPATH_DIE/'
mv libtool-2 libtool
chmod 755 libtool
fi],
[libtool_patch_use_rpath=$enable_rpath])
#
# The RPM spec file has a container for the package release number (default to
# one), it is possible to customize that value with this configure option.
#
AC_ARG_WITH([rpm-release],
[AS_HELP_STRING([--with-rpm-release=@<:@ARG@:>@],
[set the RPM release value to be current timestamp (ARG=timestamp);
set the RPM release value to be the global revision (ARG=global-rev);
set the RPM release value to be the local revision (ARG=local-rev);
set the RPM release value to be <val> (ARG=<val>, [default=1])])],
[
if test "$withval" = timestamp; then
with_rpm_release=`date +%Y%m%d%H%M`
elif test "$withval" = global-rev; then
with_rpm_release=`git rev-parse HEAD`
elif test "$withval" = local-rev; then
with_rpm_release=`git rev-parse HEAD`
else
with_rpm_release=$withval
fi
],
[with_rpm_release=1])
AC_SUBST([OPENSAF_RPM_RELEASE], ["$with_rpm_release"])
#
# OpenSAF supports linking with various SAHPI interface version, by default it
# will autodetect the version by looking at the SaHpi.h used at compilation,
# when cross-compiling this is not possible, it's possible to provide the
# version manually
#
AC_ARG_WITH([hpi-interface],
[AS_HELP_STRING([--with-hpi-interface=@<:@ARG@:>@],
[autodetect the SAHPI_INTERFACE_VERSION (ARG=check [default]);
set the SAHPI_INTERFACE_VERSION to A.01.01 (ARG=A01);
set the SAHPI_INTERFACE_VERSION to B.01.01 (ARG=B01);
set the SAHPI_INTERFACE_VERSION to B.02.01 (ARG=B02);
set the SAHPI_INTERFACE_VERSION to B.03.01 (ARG=B03)])],
[
if test "$withval" = A01; then
with_hpi_interface=check
elif test "$withval" = A01; then
with_hpi_interface=A01
AC_DEFINE([HAVE_HPI_A01], 1)
elif test "$withval" = B01; then
with_hpi_interface=B01
AC_DEFINE([HAVE_HPI_B01], 1)
elif test "$withval" = B02; then
with_hpi_interface=B02
AC_DEFINE([HAVE_HPI_B02], 1)
elif test "$withval" = B03; then
with_hpi_interface=B03
AC_DEFINE([HAVE_HPI_B03], 1)
else
AC_ERROR([Invalid SAHPI_INTERFACE_VERSION specified])
fi
],
[with_hpi_interface=check])
AC_SUBST([WITH_HPI_INTERFACE], ["$with_hpi_interface"])
#
# Some build systems support their own 'make rpm' rule, offer the possibility to
# disable the one provided with OpenSAF
#
AC_MSG_CHECKING([whether to enable the make rpm target])
AC_ARG_ENABLE([rpm-target],
[AS_HELP_STRING([--disable-rpm-target],
[disable support for the "make rpm" target [default=no]])],
[],
[enable_rpm_target=yes])
AC_MSG_RESULT([$enable_rpm_target])
AM_CONDITIONAL([ENABLE_RPM_TARGET], [test "$enable_rpm_target" = yes])
#
# Many distros use different init.d directory depending on their LSB compliance
# support. Use this option to point to the init.d directory used by your distro.
# Default to /etc/init.d
#
AC_ARG_WITH([initscriptdir],
[AS_HELP_STRING([--with-initscriptdir=@<:@DIR@:>@],
[use DIR as the directory containing the init.d scripts.
[default=/etc/init.d]])],
[
if test -d $withval; then
with_initscriptdir=$withval
else
AC_ERROR([$withval is an invalid path])
fi
],
[with_initscriptdir=/etc/init.d])
AC_SUBST([initscriptdir], ["$with_initscriptdir"])
#
# Enable/disable experimental code
#
AC_MSG_CHECKING([whether to build experimental code])
AC_ARG_ENABLE([experimental],
[AS_HELP_STRING([--enable-experimental],
[enable experimental code [default=no]])],
[],
[enable_experimental=no])
AC_MSG_RESULT([$enable_experimental])
if test "$enable_experimental" = yes; then
AC_DEFINE([HAVE_EXPERIMENTAL], 1, [Define if experimental code is enabled])
fi
AM_CONDITIONAL([ENABLE_EXPERIMENTAL], [test "$enable_experimental" = yes])
AC_SUBST([EXPERIMENTAL_ENABLED], ["$enable_experimental"])
#
# Enable/disable gcov
#
AC_MSG_CHECKING([whether to build with gcov])
AC_ARG_ENABLE([gcov],
[AS_HELP_STRING([--enable-gcov],
[enable building with gcov [default=no]])],
[],
[enable_gcov=no])
AC_MSG_RESULT([$enable_gcov])
if test "$enable_gcov" = yes; then
AC_DEFINE([ENABLE_GCOV], 1, [Define if gcov is enabled])
fi
AM_CONDITIONAL([ENABLE_GCOV], [test "$enable_gcov" = yes])
AC_SUBST([GCOV_ENABLED], ["$enable_gcov"])
#
# Enable/disable the Python AIS bindings
#
AC_MSG_CHECKING([whether to enable the Python AIS bindings])
AC_ARG_ENABLE([python],
[AS_HELP_STRING([--enable-python],
[enable the Python AIS bindings [default=no]])],
[],
[enable_python=no])
AC_MSG_RESULT([$enable_python])
AM_CONDITIONAL([ENABLE_PYTHON], [test "$enable_python" = yes])
AC_SUBST([PYTHON_ENABLED], ["$enable_python"])
#
# If the AM4J API library isn't in the standard CLASSPATH, it can be configured
# with a parameter instead
AC_ARG_WITH([am4j-api-jar],
[AS_HELP_STRING([--with-am4j-api-jar=@<:@FILE@:>@],
[use FILE as the AM4J API JAR])],
[
if test -f $withval; then
with_am4j_api_jar=$withval
else
AC_ERROR([$withval is an invalid filename])
fi
],
[with_am4j_api_jar=no])
#
# Enable/disable the Java AIS interface mapping components
#
m4_include([m4/java.m4])
AC_MSG_CHECKING([whether to enable the Java AIS interface mapping])
AC_ARG_ENABLE([java],
[AS_HELP_STRING([--enable-java],
[enable the Java AIS interface mapping [default=no]])],
[],
[enable_java=no])
AC_MSG_RESULT([$enable_java])
AM_CONDITIONAL([ENABLE_JAVA], [test "$enable_java" = yes])
AC_SUBST([JAVA_ENABLED], ["$enable_java"])
#
# Enable/disable the AM4J agent
#
AC_MSG_CHECKING([whether to enable the AM4J agent])
AC_ARG_ENABLE([am4j],
[AS_HELP_STRING([--enable-am4j],
[enable the AM4J agent [default=no]])],
[],
[enable_am4j=no])
AC_MSG_RESULT([$enable_am4j])
AM_CONDITIONAL([ENABLE_AM4J], [test "$enable_am4j" = yes])
AC_SUBST([AM4J_ENABLED], ["$enable_am4j"])
#
# Enable/disable TIPC transport
#
AC_MSG_CHECKING([whether to use TIPC as the transport])
AC_ARG_ENABLE([tipc],
[AS_HELP_STRING([--enable-tipc],
[enable building the TIPC [default=no]])],
[],
[enable_tipc=no])
AC_MSG_RESULT([$enable_tipc])
if test "$enable_tipc" = yes; then
AC_DEFINE([ENABLE_TIPC_TRANSPORT], 1, [Define if TIPC is enabled])
fi
AM_CONDITIONAL([ENABLE_TIPC_TRANSPORT], [test "$enable_tipc" = yes])
AC_SUBST([TIPC_TRANSPORT_ENABLED], ["$enable_tipc"])
#
# Enable/disable use of systemd
#
PKG_CHECK_MODULES([SYSTEMD], [systemd >= 219], [enable_systemd=yes],
[enable_systemd=no])
if test "$enable_systemd" = yes; then
AC_DEFINE([ENABLE_SYSTEMD], 1, [Define if systemd is enabled])
systemdunitdir=$(pkg-config --variable=systemdsystemunitdir systemd)
systemdversion=$(pkg-config --modversion systemd)
if test "$systemdversion" -ge 227; then
systemdtasksmax="TasksMax=infinity"$'\n'
else
systemdtasksmax=""
fi
fi
AM_CONDITIONAL([ENABLE_SYSTEMD], [test "$enable_systemd" = yes])
AC_SUBST([SYSTEMD_ENABLED], ["$enable_systemd"])
AC_SUBST([systemdsystemunitdir], ["$systemdunitdir"])
AC_SUBST([systemdmodversion], ["$systemdversion"])
AC_SUBST([systemdtasksmax], ["$systemdtasksmax"])
AM_SUBST_NOTMAKE([systemdtasksmax])
#
# Enable/disable building the OpenSAF tests
#
AC_MSG_CHECKING([whether to enable building the OpenSAF tests])
AC_ARG_ENABLE([tests],
[AS_HELP_STRING([--enable-tests],
[enable building the OpenSAF testing programs [default=no]])],
[],
[enable_tests=no])
AC_MSG_RESULT([$enable_tests])
#
# If tests are enabled, then compile not just test programs but any code
# anywhere bracketed by "HAVE_TESTS"
#
if test "$enable_tests" = yes; then
AC_DEFINE([HAVE_TESTS], 1, [Define if we built OpenSAF tests])
fi
AM_CONDITIONAL([ENABLE_TESTS], [test "$enable_tests" = yes])
AC_SUBST([TESTS_ENABLED], ["$enable_tests"])
#
# Enable/disable IMM Persistent Back End
#
AC_MSG_CHECKING([whether to use the IMM Persistent Back End])
AC_ARG_ENABLE([imm-pbe],
[AS_HELP_STRING([--enable-imm-pbe],
[enable the IMM Persistent Back End Interface [default=no]])],
[],
[enable_imm_pbe=no])
AC_MSG_RESULT([$enable_imm_pbe])
if test "$enable_imm_pbe" = yes; then
AC_DEFINE([HAVE_IMM_PBE], 1, [Define if we have IMM_PBE enabled])
fi
AM_CONDITIONAL([ENABLE_IMM_PBE], [test "$enable_imm_pbe" = yes])
AC_SUBST([IMM_PBE_ENABLED], ["$enable_imm_pbe"])
#
# Enable/disable NTF Information Model Change Notifier (ntf-imcn)
#
AC_MSG_CHECKING([whether to use the Information Model Change Notifier])
AC_ARG_ENABLE([ntf-imcn],
[AS_HELP_STRING([--enable-ntf-imcn],
[enable the NTF Information Model Notification producer [default=no]])],
[],
[enable_ntf_imcn=no])
AC_MSG_RESULT([$enable_ntf_imcn])
if test "$enable_ntf_imcn" = yes; then
AC_DEFINE([HAVE_NTFIMCN], 1, [Define if we have NTFIMCN enabled])
fi
AM_CONDITIONAL([ENABLE_NTFIMCN], [test "$enable_ntf_imcn" = yes])
AC_SUBST([NTFIMCN_ENABLED], ["$enable_ntf_imcn"])
#
# Enable/disable building some of the OpenSAF AIS Services
#
AC_MSG_CHECKING([whether to build the SAI-AIS-CKPT service])
AC_ARG_ENABLE([ais-ckpt],
[AS_HELP_STRING([--disable-ais-ckpt],
[disable building the SAI-AIS-CKPT service [default=no]])],
[],
[enable_ais_ckpt=yes])
AC_MSG_RESULT([$enable_ais_ckpt])
AM_CONDITIONAL([ENABLE_AIS_CKPT], [test "$enable_ais_ckpt" = yes])
AC_SUBST([AIS_CKPT_ENABLED], ["$enable_ais_ckpt"])
AC_MSG_CHECKING([whether to build the SAI-AIS-EVT service])
AC_ARG_ENABLE([ais-evt],
[AS_HELP_STRING([--disable-ais-evt],
[disable building the SAI-AIS-EVT service [default=no]])],
[],
[enable_ais_evt=yes])
AC_MSG_RESULT([$enable_ais_evt])
AM_CONDITIONAL([ENABLE_AIS_EVT], [test "$enable_ais_evt" = yes])
AC_SUBST([AIS_EVT_ENABLED], ["$enable_ais_evt"])
AC_MSG_CHECKING([whether to build the SAI-AIS-LCK service])
AC_ARG_ENABLE([ais-lck],
[AS_HELP_STRING([--disable-ais-lck],
[disable building the SAI-AIS-LCK service [default=no]])],
[],
[enable_ais_lck=yes])
AC_MSG_RESULT([$enable_ais_lck])
AM_CONDITIONAL([ENABLE_AIS_LCK], [test "$enable_ais_lck" = yes])
AC_SUBST([AIS_LCK_ENABLED], ["$enable_ais_lck"])
AC_MSG_CHECKING([whether to build the SAI-AIS-MSG service])
AC_ARG_ENABLE([ais-msg],
[AS_HELP_STRING([--disable-ais-msg],
[disable building the SAI-AIS-MSG service [default=no]])],
[],
[enable_ais_msg=yes])
AC_MSG_RESULT([$enable_ais_msg])
AM_CONDITIONAL([ENABLE_AIS_MSG], [test "$enable_ais_msg" = yes])
AC_SUBST([AIS_MSG_ENABLED], ["$enable_ais_msg"])
AC_MSG_CHECKING([whether to build the SAI-AIS-SMF service])
AC_ARG_ENABLE([ais-smf],
[AS_HELP_STRING([--disable-ais-smf],
[disable building the SAI-AIS-SMF service [default=no]])],
[],
[enable_ais_smf=yes])
AC_MSG_RESULT([$enable_ais_smf])
AM_CONDITIONAL([ENABLE_AIS_SMF], [test "$enable_ais_smf" = yes])
AC_SUBST([AIS_SMF_ENABLED], ["$enable_ais_smf"])
AC_MSG_CHECKING([whether to build the SAI-AIS-PLM service])
AC_ARG_ENABLE([ais-plm],
[AS_HELP_STRING([--disable-ais-plm],
[disable building the SAI-AIS-PLM service [default=yes]])],
[],
[enable_ais_plm=no])
AC_MSG_RESULT([$enable_ais_plm])
if test "$enable_ais_plm" = yes; then
AC_DEFINE([ENABLE_AIS_PLM], 1, [Define if PLM is enabled])
fi
AM_CONDITIONAL([ENABLE_AIS_PLM], [test "$enable_ais_plm" = yes])
AC_SUBST([AIS_PLM_ENABLED], ["$enable_ais_plm"])
AC_MSG_CHECKING([whether to install the immxml tools])
AC_ARG_ENABLE([immxml],
[AS_HELP_STRING([--disable-immxml],
[disable installing the immxml tools [default=no]])],
[],
[enable_immxml=yes])
AC_MSG_RESULT([$enable_immxml])
AM_CONDITIONAL([ENABLE_IMMXML], [test "$enable_immxml" = yes])
AC_SUBST([IMMXML_ENABLED], ["$enable_immxml"])
#
# unless explicitly set, drop previx from sysconfdir
# and localstatedir
#
if test "$sysconfdir" = '${prefix}/etc' ; then
if test "$prefix" = 'NONE' ; then
sysconfdir="/etc"
else
sysconfdir="$prefix"/etc
fi
fi
AC_SUBST([sysconfdir])
if test "$localstatedir" = '${prefix}/var' ; then
if test "$prefix" = 'NONE' ; then
localstatedir="/var"
else
localstatedir="$prefix"/var
fi
fi
AC_SUBST([localstatedir])
#############################################
# Checks for programs.
#############################################
AC_PROG_CC
AC_PROG_CXX
AC_PROG_INSTALL
AC_PROG_LIBTOOL
AC_PROG_MAKE_SET
AM_PROG_CC_C_O
if test "$enable_python" = yes; then
AM_PATH_PYTHON([2.7])
fi
if test "$enable_java" = yes; then
AC_JAVA_WITH_JDK
if test "$ac_java_jvm_dir" != ""; then
AC_SUBST([JAVAC], [$ac_java_jvm_dir"bin/javac"])
AC_SUBST([JAVADOC], [$ac_java_jvm_dir"bin/javadoc"])
else
AC_PROG_JAVAC
AC_PROG_JAVADOC
fi
AC_JAVA_ANT
AC_SUBST([JAVA_HOME], [$ac_java_jvm_dir])
# Only handle AM4J if it's enabled explicitly or by configuring the AM4J API jar
if test "$enable_am4j" = yes || test "$with_am4j_api_jar" != no ; then
enable_am4j=yes
AC_PROG_AM4J_API
AC_SUBST([AM4J_API_JAR], ["$with_am4j_api_jar"])
AM_CONDITIONAL([ENABLE_AM4J], [test "$enable_am4j" = yes])
AC_SUBST([AM4J_ENABLED], ["$enable_am4j"])
fi
fi
if test "$enable_java" = no; then
if test "$with_am4j_api_jar" != no || test "$enable_am4j" != no; then
AC_ERROR([Can't build AM4J support without enabling Java])
fi
fi
#############################################
# Checks for libraries.
#############################################
PKG_CHECK_MODULES([XML2], [libxml-2.0])
if test "$enable_ais_plm" = yes; then
PKG_CHECK_MODULES([HPI], [openhpi])
PKG_CHECK_MODULES([LIBVIRT], [libvirt])
PKG_CHECK_MODULES([LIBSYSTEMD], [libsystemd])
if test "$with_hpi_interface" = check; then
if test "$cross_compiling" = no; then
# Test for the SAHPI_INTERFACE_VERSION
AC_RUN_IFELSE(
[AC_LANG_PROGRAM(
[#include <openhpi/SaHpi.h>],
[if (SAHPI_INTERFACE_VERSION != 0x010101) return 1;]
)],
AC_DEFINE(
[HAVE_HPI_A01], 1, [SAHPI_INTERFACE_VERSION == A01]
)
)
AC_RUN_IFELSE(
[AC_LANG_PROGRAM(
[#include <openhpi/SaHpi.h>],
[if (SAHPI_INTERFACE_VERSION != 0x020101) return 1;]
)],
AC_DEFINE(
[HAVE_HPI_B01], 1, [SAHPI_INTERFACE_VERSION == B01]
)
)
AC_RUN_IFELSE(
[AC_LANG_PROGRAM(
[#include <openhpi/SaHpi.h>],
[if (SAHPI_INTERFACE_VERSION != 0x020201) return 1;]
)],
AC_DEFINE(
[HAVE_HPI_B02], 1, [SAHPI_INTERFACE_VERSION == B02]
)
)
AC_RUN_IFELSE(
[AC_LANG_PROGRAM(
[#include <openhpi/SaHpi.h>],
[if (SAHPI_INTERFACE_VERSION != 0x020301) return 1;]
)],
AC_DEFINE(
[HAVE_HPI_B03], 1, [SAHPI_INTERFACE_VERSION == B03]
)
)
else
AC_ERROR([Autodecting HPI interface version isn't supported while
cross-compiling, force --with-hpi-version])
fi
fi
fi
if test "$enable_imm_pbe" = yes; then
PKG_CHECK_MODULES([SQLITE3], [sqlite3])
fi
if test -z "$OSAF_HARDEN_FLAGS"; then
# _FORTIFY_SOURCE requires optimization, so only enable it in optimized
# builds, i.e. when -O is present in both CFLAGS and CXXFLAGS.
if echo "${CFLAGS}" | grep -q -- -O; then
if echo "${CXXFLAGS}" | grep -q -- -O; then
OSAF_HARDEN_FLAGS="-D_FORTIFY_SOURCE=2"
fi
fi
# Also check for -O0 (which explicitly disables optimisation)
if echo "${CFLAGS} ${CXXFLAGS}" | grep -q -- -O0; then
OSAF_HARDEN_FLAGS=""
fi
OSAF_HARDEN_FLAGS="${OSAF_HARDEN_FLAGS} -fstack-protector --param ssp-buffer-size=4 -fPIE -pie -zrelro -znow"
fi
AC_SUBST(OSAF_HARDEN_FLAGS)
#############################################
# List the output Makefiles
#############################################
AC_CONFIG_FILES([
src/ais/lib/opensaf-amf.pc
src/ais/lib/opensaf-ckpt.pc
src/ais/lib/opensaf-clm.pc
src/ais/lib/opensaf-evt.pc
src/ais/lib/opensaf-imm.pc
src/ais/lib/opensaf-lck.pc
src/ais/lib/opensaf-log.pc
src/ais/lib/opensaf-msg.pc
src/ais/lib/opensaf-ntf.pc
src/ais/lib/opensaf-plm.pc
src/ais/lib/opensaf-smf.pc
src/amf/amfd/osaf-amfd
src/amf/amfnd/osaf-amfnd
src/amf/amfwd/osaf-amfwd
src/ckpt/ckptd/osaf-ckptd
src/ckpt/ckptnd/osaf-ckptnd
src/clm/clmd/osaf-clmd
src/clm/clmnd/osaf-clmna
src/dtm/dtmnd/osaf-dtm
src/dtm/transport/osaf-transport
src/evt/evtd/osaf-evtd
src/fm/fmd/osaf-fmd
src/imm/immd/osaf-immd
src/imm/immnd/osaf-immnd
src/lck/lckd/osaf-lckd
src/lck/lcknd/osaf-lcknd
src/log/logd/osaf-logd
src/msg/msgd/osaf-msgd
src/msg/msgnd/osaf-msgnd
src/nid/configure_tipc
src/nid/opensafd
src/nid/opensafd.service
src/ntf/ntfd/osaf-ntfd
src/plm/plmcd/plmcboot
src/plm/plmcd/plmcboot.service
src/plm/plmcd/plmcd
src/plm/plmcd/plmcd.service
src/plm/plmd/osaf-plmd
src/rde/rded/osaf-rded
src/smf/smfd/osaf-smfd
src/smf/smfnd/osaf-smfnd
Doxyfile
Makefile
opensaf.spec
pkgconfig/opensaf.pc])
AC_OUTPUT
echo ""
echo "======================================================="
echo "OpenSAF Build Configuration Summary"
echo "======================================================="
echo " Version: $VERSION"
echo " Release: $OPENSAF_RPM_RELEASE"
echo ""
echo " Installation Directories:"
echo "${ECHO_T} prefix: ${prefix}"
echo "${ECHO_T} exec_prefix: ${exec_prefix}"
echo "${ECHO_T} bindir: ${bindir}"
echo "${ECHO_T} sbindir: ${sbindir}"
echo "${ECHO_T} datadir: ${datadir}"
echo "${ECHO_T} sysconfdir: ${sysconfdir}"
echo "${ECHO_T} docdir: ${docdir}"
echo "${ECHO_T} localstatedir: ${localstatedir}"
echo "${ECHO_T} includedir: ${includedir}"
echo "${ECHO_T} libdir: ${libdir}"
echo ""
echo " Compiling Options:"
echo "${ECHO_T} C Compiler: ${CC}"
echo "${ECHO_T} C++ Compiler: ${CXX}"
echo "${ECHO_T} CPPFLAGS: ${CPPFLAGS} ${AM_CPPFLAGS}"
echo "${ECHO_T} CFLAGS: ${CFLAGS} ${AM_CFLAGS}"
echo "${ECHO_T} CXXFLAGS: ${CXXFLAGS} ${AM_CXXFLAGS}"
echo "${ECHO_T} OSAF_HARDEN_FLAGS: ${OSAF_HARDEN_FLAGS}"
echo "${ECHO_T} LDFLAGS: ${LDFLAGS}"
echo "${ECHO_T} Enable RPATH: ${enable_rpath}"
if test "$srcdir" == "."; then
echo "${ECHO_T} Using VPATH: no"
else
echo "${ECHO_T} Using VPATH: yes"
fi
AM_CONDITIONAL([WITH_VPATH], [test "$srcdir" != "."])
echo ""
echo " Dependencies Options:"
if test "$enable_ais_plm" = yes; then
echo "${ECHO_T} HPI_CFLAGS: ${HPI_CFLAGS}"
echo "${ECHO_T} HPI_LIBS: ${HPI_LIBS}"
echo "${ECHO_T} LIBVIRT_CFLAGS: ${LIBVIRT_CFLAGS}"
echo "${ECHO_T} LIBVIRT_LIBS: ${LIBVIRT_LIBS}"
echo "${ECHO_T} SYSTEMD_CFLAGS: ${LIBSYSTEMD_CFLAGS}"
echo "${ECHO_T} SYSTEMD_LIBS: ${LIBSYSTEMD_LIBS}"
fi
if test "$enable_imm_pbe" = yes; then
echo "${ECHO_T} SQLITE3_CFLAGS: ${SQLITE3_CFLAGS}"
echo "${ECHO_T} SQLITE3_LIBS: ${SQLITE3_LIBS}"
fi
echo "${ECHO_T} XML2_CFLAGS: ${XML2_CFLAGS}"
echo "${ECHO_T} XML2_LIBS: ${XML2_LIBS}"
echo ""
echo " OpenSAF Options:"
echo "${ECHO_T} Enable Python AIS Bindings: ${enable_python}"
echo "${ECHO_T} Enable Java AIS Mapping: ${enable_java}"
echo "${ECHO_T} Enable AM4J: ${enable_am4j}"
echo "${ECHO_T} Enable PLM support: ${enable_ais_plm}"
echo "${ECHO_T} Enable TIPC transport: ${enable_tipc}"
echo "${ECHO_T} Enable systemd: ${enable_systemd}"
echo "======================================================="
echo ""