1dnl
2dnl autoconf for Agents
3dnl
4dnl License: GNU General Public License (GPL)
5
6dnl ===============================================
7dnl Bootstrap
8dnl ===============================================
9AC_PREREQ(2.63)
10
11dnl Suggested structure:
12dnl     information on the package
13dnl     checks for programs
14dnl     checks for libraries
15dnl     checks for header files
16dnl     checks for types
17dnl     checks for structures
18dnl     checks for compiler characteristics
19dnl     checks for library functions
20dnl     checks for system services
21
22AC_INIT([resource-agents],
23	m4_esyscmd([make/git-version-gen .tarball-version]),
24	[developers@clusterlabs.org])
25
26AC_USE_SYSTEM_EXTENSIONS
27
28CRM_DTD_VERSION="1.0"
29
30AC_CONFIG_AUX_DIR(.)
31AC_CONFIG_MACRO_DIR([m4])
32
33AC_CANONICAL_HOST
34
35dnl Where #defines go (e.g. `AC_CHECK_HEADERS' below)
36dnl
37dnl Internal header: include/config.h
38dnl   - Contains ALL defines
39dnl   - include/config.h.in is generated automatically by autoheader
40dnl   - NOT to be included in any header files except lha_internal.h
41dnl     (which is also not to be included in any other header files)
42dnl
43dnl External header: include/agent_config.h
44dnl   - Contains a subset of defines checked here
45dnl   - Manually edit include/agent_config.h.in to have configure include new defines
46dnl   - Should not include HAVE_* defines
47dnl   - Safe to include anywhere
48AM_CONFIG_HEADER(include/config.h include/agent_config.h)
49ALL_LINGUAS="en fr"
50
51AC_ARG_WITH(version,
52    [  --with-version=version   Override package version (if you're a packager needing to pretend) ],
53    [ PACKAGE_VERSION="$withval" ])
54
55AC_ARG_WITH(pkg-name,
56    [  --with-pkg-name=name     Override package name (if you're a packager needing to pretend) ],
57    [ PACKAGE_NAME="$withval" ])
58
59dnl
60dnl AM_INIT_AUTOMAKE([1.11.1 foreign dist-bzip2 dist-xz])
61dnl
62
63AM_INIT_AUTOMAKE([1.10.1 foreign dist-bzip2])
64
65AC_DEFINE_UNQUOTED(AGENTS_VERSION, "$PACKAGE_VERSION", Current agents version)
66
67CC_IN_CONFIGURE=yes
68export CC_IN_CONFIGURE
69
70LDD=ldd
71
72dnl ========================================================================
73dnl Compiler characteristics
74dnl ========================================================================
75
76# check stolen from gnulib/m4/gnu-make.m4
77if ! ${MAKE-make} --version /cannot/make/this >/dev/null 2>&1; then
78	AC_MSG_ERROR([you don't seem to have GNU make; it is required])
79fi
80
81AC_PROG_CC dnl Can force other with environment variable "CC".
82AM_PROG_CC_C_O
83AC_PROG_CC_STDC
84AC_PROG_AWK
85AC_PROG_LN_S
86AC_PROG_INSTALL
87AC_PROG_MAKE_SET
88
89AC_C_STRINGIZE
90AC_C_INLINE
91
92AC_TYPE_SIZE_T
93AC_TYPE_SSIZE_T
94AC_TYPE_UID_T
95AC_TYPE_UINT16_T
96AC_TYPE_UINT8_T
97AC_TYPE_UINT32_T
98
99AC_CHECK_SIZEOF(char)
100AC_CHECK_SIZEOF(short)
101AC_CHECK_SIZEOF(int)
102AC_CHECK_SIZEOF(long)
103AC_CHECK_SIZEOF(long long)
104AC_STRUCT_TIMEZONE
105
106dnl ===============================================
107dnl Helpers
108dnl ===============================================
109cc_supports_flag() {
110	local CPPFLAGS="$@"
111	AC_MSG_CHECKING(whether $CC supports "$@")
112	AC_PREPROC_IFELSE([AC_LANG_PROGRAM([])],
113			  [RC=0; AC_MSG_RESULT([yes])],
114			  [RC=1; AC_MSG_RESULT([no])])
115	return $RC
116}
117
118extract_header_define() {
119	  AC_MSG_CHECKING(for $2 in $1)
120	  Cfile=$srcdir/extract_define.$2.${$}
121	  printf "#include <stdio.h>\n" > ${Cfile}.c
122	  printf "#include <%s>\n" $1 >> ${Cfile}.c
123	  printf "int main(int argc, char **argv) { printf(\"%%s\", %s); return 0; }\n" $2 >> ${Cfile}.c
124	  $CC $CFLAGS ${Cfile}.c -o ${Cfile}
125	  value=`${Cfile}`
126	  AC_MSG_RESULT($value)
127	  printf $value
128	  rm -f ${Cfile}.c ${Cfile}
129	}
130
131AC_MSG_NOTICE(Sanitizing prefix: ${prefix})
132case $prefix in
133  NONE)
134	prefix=/usr
135	dnl Fix default variables - "prefix" variable if not specified
136	if test "$localstatedir" = "\${prefix}/var"; then
137		localstatedir="/var"
138	fi
139	if test "$sysconfdir" = "\${prefix}/etc"; then
140		sysconfdir="/etc"
141	fi
142	;;
143esac
144
145# ordering is important, PKG_PROG_PKG_CONFIG is to be invoked before any other PKG_* related stuff
146PKG_PROG_PKG_CONFIG(0.18)
147
148# PKG_CHECK_MODULES will fail if systemd is not found by default, so make sure
149# we set the proper vars and deal with it
150PKG_CHECK_MODULES([systemd], [systemd], [HAS_SYSTEMD=yes], [HAS_SYSTEMD=no])
151if test "x$HAS_SYSTEMD" == "xyes"; then
152	PKG_CHECK_VAR([SYSTEMD_UNIT_DIR], [systemd], [systemdsystemunitdir])
153	if test "x$SYSTEMD_UNIT_DIR" == "x"; then
154		AC_MSG_ERROR([Unable to detect systemd unit dir automatically])
155	fi
156
157	PKG_CHECK_VAR([SYSTEMD_TMPFILES_DIR], [systemd], [tmpfilesdir])
158	if test "x$SYSTEMD_TMPFILES_DIR" == "x"; then
159		AC_MSG_ERROR([Unable to detect systemd tmpfiles directory automatically])
160	fi
161
162	# sanitize systed vars when using non standard prefix
163	if test "$prefix" != "/usr"; then
164		SYSTEMD_UNIT_DIR="$prefix/$SYSTEMD_UNIT_DIR"
165		AC_SUBST([SYSTEMD_UNIT_DIR])
166		SYSTEMD_TMPFILES_DIR="$prefix/$SYSTEMD_TMPFILES_DIR"
167		AC_SUBST([SYSTEMD_TMPFILES_DIR])
168	fi
169
170fi
171AM_CONDITIONAL(HAVE_SYSTEMD, [test "x$HAS_SYSTEMD" == xyes ])
172
173
174dnl ===============================================
175dnl Configure Options
176dnl ===============================================
177
178dnl Some systems, like Solaris require a custom package name
179AC_ARG_WITH(pkgname,
180    [  --with-pkgname=name     name for pkg (typically for Solaris) ],
181    [ PKGNAME="$withval" ],
182    [ PKGNAME="LXHAhb" ],
183  )
184AC_SUBST(PKGNAME)
185
186AC_ARG_ENABLE([ansi],
187[  --enable-ansi force GCC to compile to ANSI/ANSI standard for older compilers.
188     [default=yes]])
189
190AC_ARG_ENABLE([fatal-warnings],
191[  --enable-fatal-warnings very pedantic and fatal warnings for gcc
192     [default=yes]])
193
194INITDIR=""
195AC_ARG_WITH(initdir,
196    [  --with-initdir=DIR      directory for init (rc) scripts [${INITDIR}]],
197    [ INITDIR="$withval" ])
198
199OCF_ROOT_DIR="${prefix}/lib/ocf"
200AC_ARG_WITH(ocf-root,
201    [  --with-ocf-root=DIR      directory for OCF scripts [${OCF_ROOT_DIR}]],
202    [ OCF_ROOT_DIR="$withval" ])
203HA_RSCTMPDIR=${localstatedir}/run/resource-agents
204AC_ARG_WITH(rsctmpdir,
205    [  --with-rsctmpdir=DIR      directory for resource agents state files [${HA_RSCTMPDIR}]],
206    [ HA_RSCTMPDIR="$withval" ])
207
208AC_ARG_ENABLE([libnet],
209 [  --enable-libnet 	Use libnet for ARP based funcationality, [default=try]],
210 [enable_libnet="$enableval"], [enable_libnet=try])
211
212BUILD_RGMANAGER=0
213BUILD_LINUX_HA=0
214
215RASSET=linux-ha
216AC_ARG_WITH(ras-set,
217    [  --with-ras-set=SET     build/install only linux-ha, rgmanager or all resource-agents [default: linux-ha]],
218    [ RASSET="$withval" ])
219
220if test x$RASSET = xyes || test x$RASSET = xall ; then
221	BUILD_RGMANAGER=1
222	BUILD_LINUX_HA=1
223fi
224
225if test x$RASSET = xlinux-ha; then
226	BUILD_LINUX_HA=1
227fi
228
229if test x$RASSET = xrgmanager; then
230	BUILD_RGMANAGER=1
231fi
232
233if test $BUILD_LINUX_HA -eq 0 && test $BUILD_RGMANAGER -eq 0; then
234	AC_MSG_ERROR([Are you really sure you want this package?])
235	exit 1
236fi
237
238AM_CONDITIONAL(BUILD_LINUX_HA, test $BUILD_LINUX_HA -eq 1)
239AM_CONDITIONAL(BUILD_RGMANAGER, test $BUILD_RGMANAGER -eq 1)
240
241AC_ARG_WITH(compat-habindir,
242    [  --with-compat-habindir      use HA_BIN directory with compatibility for the Heartbeat stack [${libexecdir}]],
243    [],
244    [with_compat_habindir=no])
245AM_CONDITIONAL(WITH_COMPAT_HABINDIR, test "x$with_compat_habindir" != "xno")
246
247
248dnl ===============================================
249dnl General Processing
250dnl ===============================================
251
252echo Our Host OS: $host_os/$host
253
254AC_MSG_NOTICE(Sanitizing exec_prefix: ${exec_prefix})
255case $exec_prefix in
256  dnl For consistency with Heartbeat, map NONE->$prefix
257  NONE)	  exec_prefix=$prefix;;
258  prefix) exec_prefix=$prefix;;
259esac
260
261AC_MSG_NOTICE(Sanitizing INITDIR: ${INITDIR})
262case $INITDIR in
263  prefix) INITDIR=$prefix;;
264  "")
265    AC_MSG_CHECKING(which init (rc) directory to use)
266      for initdir in /etc/init.d /etc/rc.d/init.d /sbin/init.d	\
267	   /usr/local/etc/rc.d /etc/rc.d
268      do
269        if
270          test -d $initdir
271        then
272          INITDIR=$initdir
273          break
274        fi
275      done
276      if
277      	 test -z $INITDIR
278      then
279          INITDIR=${sysconfdir}/init.d
280      fi
281      AC_MSG_RESULT($INITDIR);;
282esac
283AC_SUBST(INITDIR)
284
285if test "${prefix}" = "/usr"; then
286 INITDIRPREFIX="$INITDIR"
287else
288 INITDIRPREFIX="${prefix}/$INITDIR"
289fi
290
291AC_SUBST(INITDIRPREFIX)
292
293AC_MSG_NOTICE(Sanitizing libdir: ${libdir})
294case $libdir in
295  dnl For consistency with Heartbeat, map NONE->$prefix
296  *prefix*|NONE)
297    AC_MSG_CHECKING(which lib directory to use)
298    for aDir in lib64 lib
299    do
300      trydir="${exec_prefix}/${aDir}"
301      if
302        test -d ${trydir}
303      then
304        libdir=${trydir}
305        break
306      fi
307    done
308    AC_MSG_RESULT($libdir);
309    ;;
310esac
311
312if test "x$with_compat_habindir" != "xno" ; then
313  libexecdir=${libdir}
314fi
315
316dnl Expand autoconf variables so that we dont end up with '${prefix}'
317dnl in #defines and python scripts
318dnl NOTE: Autoconf deliberately leaves them unexpanded to allow
319dnl    make exec_prefix=/foo install
320dnl No longer being able to do this seems like no great loss to me...
321
322eval prefix="`eval echo ${prefix}`"
323eval exec_prefix="`eval echo ${exec_prefix}`"
324eval bindir="`eval echo ${bindir}`"
325eval sbindir="`eval echo ${sbindir}`"
326eval libexecdir="`eval echo ${libexecdir}`"
327eval datadir="`eval echo ${datadir}`"
328eval sysconfdir="`eval echo ${sysconfdir}`"
329eval sharedstatedir="`eval echo ${sharedstatedir}`"
330eval localstatedir="`eval echo ${localstatedir}`"
331eval libdir="`eval echo ${libdir}`"
332eval includedir="`eval echo ${includedir}`"
333eval oldincludedir="`eval echo ${oldincludedir}`"
334eval infodir="`eval echo ${infodir}`"
335eval mandir="`eval echo ${mandir}`"
336
337dnl docdir is a recent addition to autotools
338eval docdir="`eval echo ${docdir}`"
339if test "x$docdir" = "x"; then
340   docdir="`eval echo ${datadir}/doc`"
341fi
342AC_SUBST(docdir)
343
344dnl Home-grown variables
345eval INITDIR="${INITDIR}"
346
347for j in prefix exec_prefix bindir sbindir libexecdir datadir sysconfdir \
348    sharedstatedir localstatedir libdir includedir oldincludedir infodir \
349    mandir INITDIR docdir
350do
351  dirname=`eval echo '${'${j}'}'`
352  if
353    test ! -d "$dirname"
354  then
355    AC_MSG_WARN([$j directory ($dirname) does not exist!])
356  fi
357done
358
359dnl This OS-based decision-making is poor autotools practice;
360dnl feature-based mechanisms are strongly preferred.
361dnl
362dnl So keep this section to a bare minimum; regard as a "necessary evil".
363
364REBOOT_OPTIONS="-f"
365POWEROFF_OPTIONS="-f"
366
367case "$host_os" in
368*bsd*|*dragonfly*)		LIBS="-L/usr/local/lib"
369		CPPFLAGS="$CPPFLAGS -I/usr/local/include"
370		;;
371*solaris*)
372		REBOOT_OPTIONS="-n"
373		POWEROFF_OPTIONS="-n"
374		LDFLAGS+=" -lssp -lssp_nonshared"
375		;;
376*linux*)
377		AC_DEFINE_UNQUOTED(ON_LINUX, 1, Compiling for Linux platform)
378		POWEROFF_OPTIONS="-nf"
379		REBOOT_OPTIONS="-nf"
380 		;;
381darwin*)
382		AC_DEFINE_UNQUOTED(ON_DARWIN, 1, Compiling for Darwin platform)
383  		LIBS="$LIBS -L${prefix}/lib"
384  		CFLAGS="$CFLAGS -I${prefix}/include"
385		;;
386esac
387
388AC_DEFINE_UNQUOTED(HA_LOG_FACILITY, LOG_DAEMON, Default logging facility)
389
390AC_MSG_NOTICE(Host CPU: $host_cpu)
391
392case "$host_cpu" in
393  ppc64|powerpc64)
394    case $CFLAGS in
395     *powerpc64*)			;;
396     *)	if test "$GCC" = yes; then
397	  CFLAGS="$CFLAGS -m64"
398	fi				;;
399    esac
400esac
401
402AC_MSG_CHECKING(which format is needed to print uint64_t)
403case "$host_cpu" in
404  s390x)U64T="%lu";;
405  *64*) U64T="%lu";;
406  *)    U64T="%llu";;
407esac
408AC_MSG_RESULT($U64T)
409AC_DEFINE_UNQUOTED(U64T, "$U64T", Correct printf format for logging uint64_t)
410
411
412dnl Variables needed for substitution
413
414AC_CHECK_HEADERS(heartbeat/glue_config.h)
415
416if test "$ac_cv_header_heartbeat_glue_config_h" != "yes"; then
417  enable_libnet=no
418fi
419
420AC_DEFINE_UNQUOTED(OCF_ROOT_DIR,"$OCF_ROOT_DIR", OCF root directory - specified by the OCF standard)
421AC_SUBST(OCF_ROOT_DIR)
422
423GLUE_STATE_DIR=${localstatedir}/run
424AC_DEFINE_UNQUOTED(GLUE_STATE_DIR,"$GLUE_STATE_DIR", Where to keep state files and sockets)
425AC_SUBST(GLUE_STATE_DIR)
426
427AC_DEFINE_UNQUOTED(HA_VARRUNDIR,"$GLUE_STATE_DIR", Where Heartbeat keeps state files and sockets - old name)
428HA_VARRUNDIR="$GLUE_STATE_DIR"
429AC_SUBST(HA_VARRUNDIR)
430
431# Expand $prefix
432eval HA_RSCTMPDIR="`eval echo ${HA_RSCTMPDIR}`"
433AC_DEFINE_UNQUOTED(HA_RSCTMPDIR,"$HA_RSCTMPDIR", Where Resource agents keep state files)
434AC_SUBST(HA_RSCTMPDIR)
435
436dnl Eventually move out of the heartbeat dir tree and create symlinks when needed
437HA_VARLIBHBDIR=${localstatedir}/lib/heartbeat
438AC_DEFINE_UNQUOTED(HA_VARLIBHBDIR,"$HA_VARLIBHBDIR", Whatever this used to mean)
439AC_SUBST(HA_VARLIBHBDIR)
440
441OCF_RA_DIR="${OCF_ROOT_DIR}/resource.d"
442AC_DEFINE_UNQUOTED(OCF_RA_DIR,"$OCF_RA_DIR", Location for OCF RAs)
443AC_SUBST(OCF_RA_DIR)
444
445OCF_RA_DIR_PREFIX="$OCF_RA_DIR"
446AC_SUBST(OCF_RA_DIR_PREFIX)
447
448OCF_LIB_DIR="${OCF_ROOT_DIR}/lib"
449AC_DEFINE_UNQUOTED(OCF_LIB_DIR,"$OCF_LIB_DIR", Location for shared code for OCF RAs)
450AC_SUBST(OCF_LIB_DIR)
451
452OCF_LIB_DIR_PREFIX="$OCF_LIB_DIR"
453AC_SUBST(OCF_LIB_DIR_PREFIX)
454
455dnl ===============================================
456dnl rgmanager ras bits
457dnl ===============================================
458
459LOGDIR=${localstatedir}/log/cluster
460CLUSTERDATA=${datadir}/cluster
461
462AC_SUBST([LOGDIR])
463AC_SUBST([CLUSTERDATA])
464
465dnl ===============================================
466dnl Program Paths
467dnl ===============================================
468
469PATH="$PATH:/sbin:/usr/sbin:/usr/local/sbin:/usr/local/bin"
470export PATH
471
472AC_CHECK_PROGS(MAKE, gmake make)
473AC_PATH_PROGS(BASH_SHELL, bash)
474if test x"${BASH_SHELL}" = x""; then
475   AC_MSG_ERROR(You need bash installed in order to build ${PACKAGE})
476fi
477AC_PATH_PROGS(XSLTPROC, xsltproc)
478AM_CONDITIONAL(BUILD_DOC, test "x$XSLTPROC" != "x" )
479if test "x$XSLTPROC" = "x"; then
480   AC_MSG_WARN([xsltproc not installed, unable to (re-)build manual pages])
481fi
482AC_SUBST(XSLTPROC)
483AC_PATH_PROGS(XMLCATALOG, xmlcatalog)
484AC_PATH_PROGS(SSH, ssh, /usr/bin/ssh)
485AC_PATH_PROGS(SCP, scp, /usr/bin/scp)
486AC_PATH_PROGS(TAR, tar)
487AC_PATH_PROGS(MD5, md5)
488AC_PATH_PROGS(TEST, test)
489AC_PATH_PROGS(PING, ping, /bin/ping)
490AC_PATH_PROGS(IFCONFIG, ifconfig, /sbin/ifconfig)
491AC_PATH_PROGS(MAILCMD, mailx mail, mail)
492AC_PATH_PROGS(EGREP, egrep)
493AC_PATH_PROGS(RM, rm)
494
495AC_SUBST(BASH_SHELL)
496AC_SUBST(MAILCMD)
497AC_SUBST(EGREP)
498AC_SUBST(SHELL)
499AC_SUBST(PING)
500AC_SUBST(RM)
501AC_SUBST(TEST)
502
503dnl Ensure PYTHON is an absolute path
504AC_PATH_PROG([PYTHON], [$PYTHON])
505
506AM_PATH_PYTHON
507if test -z "$PYTHON"; then
508    echo "*** Essential program python not found" 1>&2
509fi
510
511AC_PYTHON_MODULE(googleapiclient)
512AC_PYTHON_MODULE(json)
513AC_PYTHON_MODULE(pyroute2)
514
515AS_VERSION_COMPARE([$PYTHON_VERSION], [2.7], [BUILD_OCF_PY=0], [BUILD_OCF_PY=1], [BUILD_OCF_PY=1])
516
517BUILD_AZURE_EVENTS=1
518if test -z "$PYTHON" || test $BUILD_OCF_PY -eq 0; then
519    BUILD_AZURE_EVENTS=0
520    AC_MSG_WARN("Not building azure-events")
521fi
522AM_CONDITIONAL(BUILD_AZURE_EVENTS, test $BUILD_AZURE_EVENTS -eq 1)
523
524BUILD_GCP_PD_MOVE=1
525if test -z "$PYTHON" || test "x${HAVE_PYMOD_GOOGLEAPICLIENT}" != xyes || test $BUILD_OCF_PY -eq 0; then
526    BUILD_GCP_PD_MOVE=0
527    AC_MSG_WARN("Not building gcp-pd-move")
528fi
529AM_CONDITIONAL(BUILD_GCP_PD_MOVE, test $BUILD_GCP_PD_MOVE -eq 1)
530
531BUILD_GCP_VPC_MOVE_ROUTE=1
532if test -z "$PYTHON" || test "x${HAVE_PYMOD_GOOGLEAPICLIENT}" != xyes || \
533   test "x${HAVE_PYMOD_PYROUTE2}" != xyes || test $BUILD_OCF_PY -eq 0; then
534    BUILD_GCP_VPC_MOVE_ROUTE=0
535    AC_MSG_WARN("Not building gcp-vpc-move-route")
536fi
537AM_CONDITIONAL(BUILD_GCP_VPC_MOVE_ROUTE, test $BUILD_GCP_VPC_MOVE_ROUTE -eq 1)
538
539BUILD_GCP_VPC_MOVE_VIP=1
540if test -z "$PYTHON" || test "x${HAVE_PYMOD_GOOGLEAPICLIENT}" != xyes || test $BUILD_OCF_PY -eq 0; then
541    BUILD_GCP_VPC_MOVE_VIP=0
542    AC_MSG_WARN("Not building gcp-vpc-move-vip")
543fi
544AM_CONDITIONAL(BUILD_GCP_VPC_MOVE_VIP, test $BUILD_GCP_VPC_MOVE_VIP -eq 1)
545
546AC_PATH_PROGS(ROUTE, route)
547AC_DEFINE_UNQUOTED(ROUTE, "$ROUTE", path to route command)
548
549AC_MSG_CHECKING(ifconfig option to list interfaces)
550for IFCONFIG_A_OPT in  "-A" "-a" ""
551do
552  $IFCONFIG $IFCONFIG_A_OPT > /dev/null 2>&1
553  if
554    test "$?" = 0
555  then
556    AC_DEFINE_UNQUOTED(IFCONFIG_A_OPT, "$IFCONFIG_A_OPT", option for ifconfig command)
557    AC_MSG_RESULT($IFCONFIG_A_OPT)
558    break
559  fi
560done
561
562AC_SUBST(IFCONFIG_A_OPT)
563
564if test x"${MAKE}" = x""; then
565   AC_MSG_ERROR(You need (g)make installed in order to build ${PACKAGE})
566fi
567
568STYLESHEET_PREFIX=""
569if test x"${XSLTPROC}" != x""; then
570    AC_MSG_CHECKING(docbook to manpage transform)
571    # first try to figure out correct template using xmlcatalog query,
572    # resort to extensive (semi-deterministic) file search if that fails
573    DOCBOOK_XSL_URI='http://docbook.sourceforge.net/release/xsl/current'
574    DOCBOOK_XSL_PATH='manpages/docbook.xsl'
575    STYLESHEET_PREFIX=$(${XMLCATALOG} "" ${DOCBOOK_XSL_URI} \
576                   | sed -n 's|^file://||p;q')
577    if test x"${STYLESHEET_PREFIX}" = x""; then
578        DIRS=$(find "${datadir}" -name $(basename $(dirname ${DOCBOOK_XSL_PATH})) \
579               -type d | LC_ALL=C sort)
580        if test x"${DIRS}" = x""; then
581            # when datadir is not standard OS path, we cannot find docbook.xsl
582            # use standard OS path as backup
583            DIRS=$(find "/usr/share" "/usr/local/share" -name $(basename $(dirname ${DOCBOOK_XSL_PATH})) \
584                   -type d | LC_ALL=C sort)
585        fi
586        XSLT=$(basename ${DOCBOOK_XSL_PATH})
587        for d in ${DIRS}; do
588            if test -f "${d}/${XSLT}"; then
589                 STYLESHEET_PREFIX=$(echo "${d}" | sed 's/\/manpages//')
590                 break
591            fi
592        done
593    fi
594    if test x"${STYLESHEET_PREFIX}" = x""; then
595        AC_MSG_ERROR(You need docbook-style-xsl installed in order to build ${PACKAGE})
596    fi
597fi
598AC_MSG_RESULT($STYLESHEET_PREFIX)
599AC_SUBST(STYLESHEET_PREFIX)
600
601dnl ===============================================
602dnl Libraries
603dnl ===============================================
604AC_CHECK_LIB(socket, socket)
605AC_CHECK_LIB(gnugetopt, getopt_long)		dnl if available
606
607if test "x${enable_thread_safe}" = "xyes"; then
608        GPKGNAME="gthread-2.0"
609else
610        GPKGNAME="glib-2.0"
611fi
612
613PKG_CHECK_MODULES([GLIB], [$GPKGNAME])
614CPPFLAGS="$CPPFLAGS $GLIB_CFLAGS"
615LIBS="$LIBS $GLIB_LIBS"
616
617dnl ========================================================================
618dnl Headers
619dnl ========================================================================
620
621AC_HEADER_STDC
622AC_CHECK_HEADERS(sys/socket.h)
623AC_CHECK_HEADERS(sys/sockio.h)
624AC_CHECK_HEADERS([arpa/inet.h])
625AC_CHECK_HEADERS([fcntl.h])
626AC_CHECK_HEADERS([limits.h])
627AC_CHECK_HEADERS([malloc.h])
628AC_CHECK_HEADERS([netdb.h])
629AC_CHECK_HEADERS([netinet/in.h])
630AC_CHECK_HEADERS([sys/file.h])
631AC_CHECK_HEADERS([sys/ioctl.h])
632AC_CHECK_HEADERS([sys/param.h])
633AC_CHECK_HEADERS([sys/time.h])
634AC_CHECK_HEADERS([syslog.h])
635
636dnl ========================================================================
637dnl Functions
638dnl ========================================================================
639
640AC_FUNC_FORK
641AC_FUNC_STRNLEN
642AC_CHECK_FUNCS([alarm gettimeofday inet_ntoa memset mkdir socket uname])
643AC_CHECK_FUNCS([strcasecmp strchr strdup strerror strrchr strspn strstr strtol strtoul])
644
645AC_PATH_PROGS(REBOOT, reboot, /sbin/reboot)
646AC_SUBST(REBOOT)
647AC_SUBST(REBOOT_OPTIONS)
648AC_DEFINE_UNQUOTED(REBOOT, "$REBOOT", path to the reboot command)
649AC_DEFINE_UNQUOTED(REBOOT_OPTIONS, "$REBOOT_OPTIONS", reboot options)
650
651AC_PATH_PROGS(POWEROFF_CMD, poweroff, /sbin/poweroff)
652AC_SUBST(POWEROFF_CMD)
653AC_SUBST(POWEROFF_OPTIONS)
654AC_DEFINE_UNQUOTED(POWEROFF_CMD, "$POWEROFF_CMD", path to the poweroff command)
655AC_DEFINE_UNQUOTED(POWEROFF_OPTIONS, "$POWEROFF_OPTIONS", poweroff options)
656
657AC_PATH_PROGS(POD2MAN, pod2man)
658AM_CONDITIONAL(BUILD_POD_DOC, test "x$POD2MAN" != "x" )
659if test "x$POD2MAN" = "x"; then
660   AC_MSG_WARN([pod2man not installed, unable to (re-)build ldirector manual page])
661fi
662AC_SUBST(POD2MAN)
663
664dnl ========================================================================
665dnl Functions
666dnl ========================================================================
667
668AC_CHECK_FUNCS(getopt, AC_DEFINE(HAVE_DECL_GETOPT,  1, [Have getopt function]))
669
670dnl ========================================================================
671dnl   sfex
672dnl ========================================================================
673
674build_sfex=no
675case $host_os in
676    *Linux*|*linux*)
677	if test "$ac_cv_header_heartbeat_glue_config_h" = "yes"; then
678	    build_sfex=yes
679	fi
680	;;
681esac
682
683AM_CONDITIONAL(BUILD_SFEX, test "$build_sfex" = "yes" )
684
685
686dnl ========================================================================
687dnl   tickle (needs port to BSD platforms)
688dnl ========================================================================
689
690AC_CHECK_MEMBERS([struct iphdr.saddr],,,[[#include <netinet/ip.h>]])
691AM_CONDITIONAL(BUILD_TICKLE, test "$ac_cv_member_struct_iphdr_saddr" = "yes" )
692
693dnl ========================================================================
694dnl   libnet
695dnl ========================================================================
696
697libnet=""
698libnet_version="none"
699LIBNETLIBS=""
700LIBNETDEFINES=""
701
702AC_MSG_CHECKING(if libnet is required)
703libnet_fatal=$enable_libnet
704case $enable_libnet in
705     no) ;;
706     yes|libnet10|libnet11|10|11) libnet_fatal=yes;;
707     try)
708	case $host_os in
709	     *Linux*|*linux*) libnet_fatal=no;;
710	     *) libnet_fatal=yes;; dnl legacy behavior
711	esac
712	;;
713     *) libnet_fatal=yes; enable_libnet=try;;
714esac
715AC_MSG_RESULT($libnet_fatal)
716
717if test "x$enable_libnet" != "xno"; then
718   AC_PATH_PROGS(LIBNETCONFIG, libnet-config)
719
720   AC_CHECK_LIB(nsl, t_open)			dnl -lnsl
721   AC_CHECK_LIB(socket, socket)			dnl -lsocket
722   AC_CHECK_LIB(net, libnet_get_hwaddr, LIBNETLIBS=" -lnet", [])
723 fi
724
725AC_MSG_CHECKING(for libnet)
726if test "x$LIBNETLIBS" != "x" -o "x$enable_libnet" = "xlibnet11"; then
727      LIBNETDEFINES=""
728      if test "$ac_cv_lib_nsl_t_open" = yes; then
729         LIBNETLIBS="-lnsl $LIBNETLIBS"
730      fi
731      if test "$ac_cv_lib_socket_socket" = yes; then
732         LIBNETLIBS="-lsocket $LIBNETLIBS"
733      fi
734
735      libnet=net
736      libnet_version="libnet1.1"
737fi
738
739if test "x$enable_libnet" = "xtry" -o "x$enable_libnet" = "xlibnet10"; then
740   if test "x$LIBNETLIBS" = x -a "x${LIBNETCONFIG}" != "x" ; then
741      LIBNETDEFINES="`$LIBNETCONFIG --defines` `$LIBNETCONFIG --cflags`";
742      LIBNETLIBS="`$LIBNETCONFIG --libs`";
743      libnet_version="libnet1.0 (old)"
744      case $LIBNETLIBS in
745        *-l*)	libnet=`echo $LIBNETLIBS | sed 's%.*-l%%'`;;
746        *)	libnet_version=none;;
747      esac
748
749      CPPFLAGS="$CPPFLAGS $LIBNETDEFINES"
750
751      AC_CHECK_HEADERS(libnet.h)
752      if test "$ac_cv_header_libnet_h" = no; then
753	libnet_version=none
754      fi
755   fi
756fi
757AC_MSG_RESULT(found $libnet_version)
758
759if test "$libnet_version" = none; then
760   LIBNETLIBS=""
761   LIBNETDEFINES=""
762   if test $libnet_fatal = yes; then
763        AC_MSG_ERROR(libnet not found)
764   fi
765
766else
767   AC_CHECK_LIB($libnet,libnet_init,
768      [new_libnet=yes; AC_DEFINE(HAVE_LIBNET_1_1_API, 1, Libnet 1.1 API)],
769      [new_libnet=no; AC_DEFINE(HAVE_LIBNET_1_0_API, 1, Libnet 1.0 API)],$LIBNETLIBS)
770   AC_SUBST(LIBNETLIBS)
771fi
772
773if test "$new_libnet" = yes; then
774   AC_MSG_CHECKING(for libnet API 1.1.4: )
775   save_CFLAGS="$CFLAGS"
776   CFLAGS="$CFLAGS -fgnu89-inline -Wall "
777   AC_COMPILE_IFELSE([
778	AC_LANG_SOURCE(#include <libnet.h>
779			  int main(){libnet_t *l=NULL; libnet_pblock_record_ip_offset(l, l->total_size); return(0); })],
780      [AC_MSG_RESULT(no)],
781      [AC_DEFINE(HAVE_LIBNET_1_1_4_API, 1, Libnet 1.1.4 API) AC_MSG_RESULT(yes)])
782   CFLAGS="$save_CFLAGS"
783fi
784
785sendarp_linux=0
786case $host_os in
787     *Linux*|*linux*) sendarp_linux=1;;
788esac
789
790AC_SUBST(LIBNETLIBS)
791AC_SUBST(LIBNETDEFINES)
792
793AM_CONDITIONAL(SENDARP_LINUX, test $sendarp_linux = 1 )
794AM_CONDITIONAL(USE_LIBNET, test "x$libnet_version" != "xnone" )
795
796dnl ************************************************************************
797dnl * Check for netinet/icmp6.h to enable the IPv6addr resource agent
798AC_CHECK_HEADERS(netinet/icmp6.h,[],[],[#include <sys/types.h>])
799AM_CONDITIONAL(USE_IPV6ADDR_AGENT, test "$ac_cv_header_netinet_icmp6_h" = yes && test "$ac_cv_header_heartbeat_glue_config_h" = yes)
800AM_CONDITIONAL(IPV6ADDR_COMPATIBLE, test "$ac_cv_header_netinet_icmp6_h" = yes)
801
802dnl ========================================================================
803dnl Compiler flags
804dnl ========================================================================
805
806dnl Make sure that CFLAGS is not exported. If the user did
807dnl not have CFLAGS in their environment then this should have
808dnl no effect. However if CFLAGS was exported from the user's
809dnl environment, then the new CFLAGS will also be exported
810dnl to sub processes.
811
812CC_ERRORS=""
813CC_EXTRAS=""
814
815if export -p | fgrep " CFLAGS=" > /dev/null; then
816	SAVED_CFLAGS="$CFLAGS"
817	unset CFLAGS
818	CFLAGS="$SAVED_CFLAGS"
819	unset SAVED_CFLAGS
820fi
821
822if test "$GCC" != yes; then
823        CFLAGS="$CFLAGS -g"
824	enable_fatal_warnings=no
825else
826        CFLAGS="$CFLAGS -ggdb3"
827
828	# We had to eliminate -Wnested-externs because of libtool changes
829	# Also remove -Waggregate-return because we use one libnet
830	# call which returns a struct
831        EXTRA_FLAGS="-fgnu89-inline
832		-fstack-protector-all
833		-Wall
834		-Wbad-function-cast
835		-Wcast-qual
836		-Wdeclaration-after-statement
837		-Wendif-labels
838		-Wfloat-equal
839		-Wformat=2
840		-Wformat-security
841		-Wformat-nonliteral
842		-Winline
843		-Wmissing-prototypes
844		-Wmissing-declarations
845		-Wmissing-format-attribute
846		-Wnested-externs
847		-Wno-long-long
848		-Wno-strict-aliasing
849		-Wpointer-arith
850		-Wstrict-prototypes
851		-Wunsigned-char
852		-Wwrite-strings"
853
854# Additional warnings it might be nice to enable one day
855#		-Wshadow
856#		-Wunreachable-code
857
858	for j in $EXTRA_FLAGS
859	do
860	  if
861	    cc_supports_flag $j
862	  then
863	    CC_EXTRAS="$CC_EXTRAS $j"
864	  fi
865	done
866
867dnl In lib/ais/Makefile.am there's a gcc option available as of v4.x
868
869	GCC_MAJOR=`gcc -v 2>&1 | awk 'END{print $3}' | sed 's/[.].*//'`
870	AM_CONDITIONAL(GCC_4, test "${GCC_MAJOR}" = 4)
871
872dnl System specific options
873
874	case "$host_os" in
875  	*linux*|*bsd*|*dragonfly*)
876		if test "${enable_fatal_warnings}" = "unknown"; then
877        		enable_fatal_warnings=yes
878        	fi
879          	;;
880	esac
881
882	if test "x${enable_fatal_warnings}" != xno && cc_supports_flag  ; then
883	   enable_fatal_warnings=yes
884	else
885	   enable_fatal_warnings=no
886        fi
887
888	if test "x${enable_ansi}" != xno && cc_supports_flag -std=iso9899:199409 ; then
889	  AC_MSG_NOTICE(Enabling ANSI Compatibility)
890	  CC_EXTRAS="$CC_EXTRAS -ansi -D_GNU_SOURCE -DANSI_ONLY"
891	fi
892
893  	AC_MSG_NOTICE(Activated additional gcc flags: ${CC_EXTRAS})
894fi
895
896CFLAGS="$CFLAGS $CC_EXTRAS"
897
898NON_FATAL_CFLAGS="$CFLAGS"
899AC_SUBST(NON_FATAL_CFLAGS)
900
901dnl
902dnl We reset CFLAGS to include our warnings *after* all function
903dnl checking goes on, so that our warning flags don't keep the
904dnl AC_*FUNCS() calls above from working.  In particular,  will
905dnl *always* cause us troubles if we set it before here.
906dnl
907dnl
908if test "x${enable_fatal_warnings}" = xyes ; then
909   AC_MSG_NOTICE(Enabling Fatal Warnings)
910   CFLAGS="$CFLAGS "
911fi
912AC_SUBST(CFLAGS)
913
914dnl This is useful for use in Makefiles that need to remove one specific flag
915CFLAGS_COPY="$CFLAGS"
916AC_SUBST(CFLAGS_COPY)
917
918AC_SUBST(LOCALE)
919
920AC_SUBST(CC)
921AC_SUBST(MAKE)
922
923dnl The Makefiles and shell scripts we output
924AC_CONFIG_FILES(Makefile				        \
925resource-agents.pc						\
926include/Makefile						\
927heartbeat/Makefile						\
928   heartbeat/ocf-binaries					\
929   heartbeat/ocf-directories					\
930   heartbeat/ocf-shellfuncs					\
931   heartbeat/shellfuncs						\
932systemd/Makefile						\
933   systemd/resource-agents.conf					\
934tools/Makefile							\
935   tools/ocf-tester						\
936   tools/ocft/Makefile						\
937   tools/ocft/ocft						\
938   tools/ocft/caselib						\
939   tools/ocft/README						\
940   tools/ocft/README.zh_CN					\
941ldirectord/Makefile						\
942ldirectord/ldirectord   					\
943	ldirectord/init.d/Makefile				\
944	ldirectord/init.d/ldirectord   				\
945	ldirectord/init.d/ldirectord.debian			\
946	ldirectord/init.d/ldirectord.debian.default		\
947	ldirectord/systemd/Makefile	\
948	ldirectord/systemd/ldirectord.service	\
949	ldirectord/logrotate.d/Makefile				\
950	ldirectord/OCF/Makefile					\
951	ldirectord/OCF/ldirectord				\
952doc/Makefile							\
953	doc/man/Makefile					\
954rgmanager/Makefile						\
955	rgmanager/src/Makefile					\
956	rgmanager/src/resources/Makefile			\
957		rgmanager/src/resources/ocf-shellfuncs		\
958		rgmanager/src/resources/svclib_nfslock		\
959		rgmanager/src/resources/lvm_by_lv.sh		\
960		rgmanager/src/resources/lvm_by_vg.sh		\
961	rgmanager/src/resources/utils/Makefile			\
962		rgmanager/src/resources/utils/fs-lib.sh		\
963		rgmanager/src/resources/utils/messages.sh	\
964		rgmanager/src/resources/utils/config-utils.sh	\
965		rgmanager/src/resources/utils/member_util.sh	\
966		rgmanager/src/resources/utils/ra-skelet.sh	\
967		)
968
969dnl Files we output that need to be executable
970AC_CONFIG_FILES([heartbeat/azure-events], [chmod +x heartbeat/azure-events])
971AC_CONFIG_FILES([heartbeat/AoEtarget], [chmod +x heartbeat/AoEtarget])
972AC_CONFIG_FILES([heartbeat/ManageRAID], [chmod +x heartbeat/ManageRAID])
973AC_CONFIG_FILES([heartbeat/ManageVE], [chmod +x heartbeat/ManageVE])
974AC_CONFIG_FILES([heartbeat/Squid], [chmod +x heartbeat/Squid])
975AC_CONFIG_FILES([heartbeat/SysInfo], [chmod +x heartbeat/SysInfo])
976AC_CONFIG_FILES([heartbeat/aws-vpc-route53], [chmod +x heartbeat/aws-vpc-route53])
977AC_CONFIG_FILES([heartbeat/clvm], [chmod +x heartbeat/clvm])
978AC_CONFIG_FILES([heartbeat/conntrackd], [chmod +x heartbeat/conntrackd])
979AC_CONFIG_FILES([heartbeat/dnsupdate], [chmod +x heartbeat/dnsupdate])
980AC_CONFIG_FILES([heartbeat/dummypy], [chmod +x heartbeat/dummypy])
981AC_CONFIG_FILES([heartbeat/eDir88], [chmod +x heartbeat/eDir88])
982AC_CONFIG_FILES([heartbeat/fio], [chmod +x heartbeat/fio])
983AC_CONFIG_FILES([heartbeat/galera], [chmod +x heartbeat/galera])
984AC_CONFIG_FILES([heartbeat/gcp-pd-move], [chmod +x heartbeat/gcp-pd-move])
985AC_CONFIG_FILES([heartbeat/gcp-vpc-move-ip], [chmod +x heartbeat/gcp-vpc-move-ip])
986AC_CONFIG_FILES([heartbeat/gcp-vpc-move-vip], [chmod +x heartbeat/gcp-vpc-move-vip])
987AC_CONFIG_FILES([heartbeat/gcp-vpc-move-route], [chmod +x heartbeat/gcp-vpc-move-route])
988AC_CONFIG_FILES([heartbeat/iSCSILogicalUnit], [chmod +x heartbeat/iSCSILogicalUnit])
989AC_CONFIG_FILES([heartbeat/iSCSITarget], [chmod +x heartbeat/iSCSITarget])
990AC_CONFIG_FILES([heartbeat/jira], [chmod +x heartbeat/jira])
991AC_CONFIG_FILES([heartbeat/kamailio], [chmod +x heartbeat/kamailio])
992AC_CONFIG_FILES([heartbeat/lxc], [chmod +x heartbeat/lxc])
993AC_CONFIG_FILES([heartbeat/lxd-info], [chmod +x heartbeat/lxd-info])
994AC_CONFIG_FILES([heartbeat/machine-info], [chmod +x heartbeat/machine-info])
995AC_CONFIG_FILES([heartbeat/mariadb], [chmod +x heartbeat/mariadb])
996AC_CONFIG_FILES([heartbeat/mpathpersist], [chmod +x heartbeat/mpathpersist])
997AC_CONFIG_FILES([heartbeat/nfsnotify], [chmod +x heartbeat/nfsnotify])
998AC_CONFIG_FILES([heartbeat/openstack-info], [chmod +x heartbeat/openstack-info])
999AC_CONFIG_FILES([heartbeat/rabbitmq-cluster], [chmod +x heartbeat/rabbitmq-cluster])
1000AC_CONFIG_FILES([heartbeat/redis], [chmod +x heartbeat/redis])
1001AC_CONFIG_FILES([heartbeat/rsyslog], [chmod +x heartbeat/rsyslog])
1002AC_CONFIG_FILES([heartbeat/smb-share], [chmod +x heartbeat/smb-share])
1003AC_CONFIG_FILES([heartbeat/sg_persist], [chmod +x heartbeat/sg_persist])
1004AC_CONFIG_FILES([heartbeat/slapd], [chmod +x heartbeat/slapd])
1005AC_CONFIG_FILES([heartbeat/storage-mon], [chmod +x heartbeat/storage-mon])
1006AC_CONFIG_FILES([heartbeat/sybaseASE], [chmod +x heartbeat/sybaseASE])
1007AC_CONFIG_FILES([heartbeat/syslog-ng], [chmod +x heartbeat/syslog-ng])
1008AC_CONFIG_FILES([heartbeat/vsftpd], [chmod +x heartbeat/vsftpd])
1009AC_CONFIG_FILES([heartbeat/CTDB], [chmod +x heartbeat/CTDB])
1010AC_CONFIG_FILES([rgmanager/src/resources/ASEHAagent.sh], [chmod +x rgmanager/src/resources/ASEHAagent.sh])
1011AC_CONFIG_FILES([rgmanager/src/resources/apache.sh], [chmod +x rgmanager/src/resources/apache.sh])
1012AC_CONFIG_FILES([rgmanager/src/resources/bind-mount.sh], [chmod +x rgmanager/src/resources/bind-mount.sh])
1013AC_CONFIG_FILES([rgmanager/src/resources/clusterfs.sh], [chmod +x rgmanager/src/resources/clusterfs.sh])
1014AC_CONFIG_FILES([rgmanager/src/resources/db2.sh], [chmod +x rgmanager/src/resources/db2.sh])
1015AC_CONFIG_FILES([rgmanager/src/resources/drbd.sh], [chmod +x rgmanager/src/resources/drbd.sh])
1016AC_CONFIG_FILES([rgmanager/src/resources/fs.sh], [chmod +x rgmanager/src/resources/fs.sh])
1017AC_CONFIG_FILES([rgmanager/src/resources/ip.sh], [chmod +x rgmanager/src/resources/ip.sh])
1018AC_CONFIG_FILES([rgmanager/src/resources/lvm.sh], [chmod +x rgmanager/src/resources/lvm.sh])
1019AC_CONFIG_FILES([rgmanager/src/resources/mysql.sh], [chmod +x rgmanager/src/resources/mysql.sh])
1020AC_CONFIG_FILES([rgmanager/src/resources/named.sh], [chmod +x rgmanager/src/resources/named.sh])
1021AC_CONFIG_FILES([rgmanager/src/resources/netfs.sh], [chmod +x rgmanager/src/resources/netfs.sh])
1022AC_CONFIG_FILES([rgmanager/src/resources/nfsclient.sh], [chmod +x rgmanager/src/resources/nfsclient.sh])
1023AC_CONFIG_FILES([rgmanager/src/resources/nfsexport.sh], [chmod +x rgmanager/src/resources/nfsexport.sh])
1024AC_CONFIG_FILES([rgmanager/src/resources/nfsserver.sh], [chmod +x rgmanager/src/resources/nfsserver.sh])
1025AC_CONFIG_FILES([rgmanager/src/resources/openldap.sh], [chmod +x rgmanager/src/resources/openldap.sh])
1026AC_CONFIG_FILES([rgmanager/src/resources/oracledb.sh], [chmod +x rgmanager/src/resources/oracledb.sh])
1027AC_CONFIG_FILES([rgmanager/src/resources/oradg.sh], [chmod +x rgmanager/src/resources/oradg.sh])
1028AC_CONFIG_FILES([rgmanager/src/resources/orainstance.sh], [chmod +x rgmanager/src/resources/orainstance.sh])
1029AC_CONFIG_FILES([rgmanager/src/resources/oralistener.sh], [chmod +x rgmanager/src/resources/oralistener.sh])
1030AC_CONFIG_FILES([rgmanager/src/resources/postgres-8.sh], [chmod +x rgmanager/src/resources/postgres-8.sh])
1031AC_CONFIG_FILES([rgmanager/src/resources/samba.sh], [chmod +x rgmanager/src/resources/samba.sh])
1032AC_CONFIG_FILES([rgmanager/src/resources/script.sh], [chmod +x rgmanager/src/resources/script.sh])
1033AC_CONFIG_FILES([rgmanager/src/resources/service.sh], [chmod +x rgmanager/src/resources/service.sh])
1034AC_CONFIG_FILES([rgmanager/src/resources/smb.sh], [chmod +x rgmanager/src/resources/smb.sh])
1035AC_CONFIG_FILES([rgmanager/src/resources/tomcat-5.sh], [chmod +x rgmanager/src/resources/tomcat-5.sh])
1036AC_CONFIG_FILES([rgmanager/src/resources/tomcat-6.sh], [chmod +x rgmanager/src/resources/tomcat-6.sh])
1037AC_CONFIG_FILES([rgmanager/src/resources/vm.sh], [chmod +x rgmanager/src/resources/vm.sh])
1038
1039dnl Now process the entire list of files added by previous
1040dnl  calls to AC_CONFIG_FILES()
1041AC_OUTPUT()
1042
1043dnl *****************
1044dnl Configure summary
1045dnl *****************
1046
1047AC_MSG_RESULT([])
1048AC_MSG_RESULT([$PACKAGE configuration:])
1049AC_MSG_RESULT([  Version                  = ${VERSION}])
1050AC_MSG_RESULT([  Build Version            = 55a4e2c91cb846b2f35490645a1ebe832b7bdde9])
1051AC_MSG_RESULT([])
1052AC_MSG_RESULT([  Prefix                   = ${prefix}])
1053AC_MSG_RESULT([  Executables              = ${sbindir}])
1054AC_MSG_RESULT([  Man pages                = ${mandir}])
1055AC_MSG_RESULT([  Libraries                = ${libdir}])
1056AC_MSG_RESULT([  Header files             = ${includedir}])
1057AC_MSG_RESULT([  Arch-independent files   = ${datadir}])
1058AC_MSG_RESULT([  Documentation            = ${docdir}])
1059AC_MSG_RESULT([  State information        = ${localstatedir}])
1060AC_MSG_RESULT([  System configuration     = ${sysconfdir}])
1061AC_MSG_RESULT([  HA_BIN directory prefix  = ${libexecdir}])
1062AC_MSG_RESULT([  RA state files           = ${HA_RSCTMPDIR}])
1063AC_MSG_RESULT([  AIS Plugins              = ${LCRSODIR}])
1064AC_MSG_RESULT([])
1065AC_MSG_RESULT([  CPPFLAGS                 = ${CPPFLAGS}])
1066AC_MSG_RESULT([  CFLAGS                   = ${CFLAGS}])
1067AC_MSG_RESULT([  Libraries                = ${LIBS}])
1068AC_MSG_RESULT([  Stack Libraries          = ${CLUSTERLIBS}])
1069
1070