Page Menu
Home
ClusterLabs Projects
Search
Configure Global Search
Log In
Files
F3152743
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
28 KB
Referenced Files
None
Subscribers
None
View Options
diff --git a/configure.in b/configure.in
index 8d52d7ad1..dc5194298 100644
--- a/configure.in
+++ b/configure.in
@@ -1,1002 +1,1013 @@
dnl
dnl autoconf for heartbeat
dnl Started by David Lee <T.D.Lee@durham.ac.uk> December 2000
dnl automake stuff
dnl added by Michael Moerz <e9625136@stud3.tuwien.ac.at> February 2001
dnl Initialiase, with sanity check of a unique file in the hierarchy
-AC_REVISION($Revision: 1.119 $) dnl cvs revision
+AC_REVISION($Revision: 1.120 $) dnl cvs revision
AC_INIT(heartbeat.spec.in)
AC_CONFIG_AUX_DIR(.)
AC_CANONICAL_HOST
dnl Some scripts require options to "echo"
dnl This configure is already determining and using "ac_n" and "ac_c"
dnl for internal use, so make available externally.
dnl (Not sure how "future proof" this is, but it at least seems clean.)
ECHO_N="$ac_n"
ECHO_C="$ac_c"
case $ac_n in
-n) ECHO_E="-e";;
*) ECHO_E="";;
esac
ECHO_CMD="echo"
if
test -x /usr/linux/bin/echo
then
# This is for AIX. I'm not sure it's necessary...
ECHO_CMD="/usr/linux/bin/echo"
ECHO_N="-n"
ECHO_E="-e"
fi
AC_SUBST(ECHO_N)
AC_SUBST(ECHO_C)
AC_SUBST(ECHO_E)
AC_SUBST(ECHO_CMD)
dnl Where #defines go (e.g. `AC_CHECK_HEADERS' below)
AM_CONFIG_HEADER(linux-ha/config.h)
AM_INIT_AUTOMAKE(heartbeat, 0.4.9d)
RPMREL=1
AC_SUBST(RPMREL)
dnl
dnl
dnl Don't ya just hate working around buggy code?
dnl
dnl At least code that doesn't do what you want...
dnl
dnl This is to make substitutions work right in RPM specfiles.
dnl
dnl Horms says "This is pretty ugly".
dnl Alanr says: "It works. s/ ugly//"
dnl
dnl Patches are being accepted...
dnl
prefix=`eval echo "$prefix"`
case $prefix in
NONE) prefix=/usr/local;;
esac
var() {
case $1 in
*'${'*) res=`eval echo "$1"`;;
*) res="$1";;
esac
case "$res" in
""|NONE) echo "$2";;
*) echo "$res";;
esac
}
exec_prefix=`var "$exec_prefix" "$prefix"`
bindir=`var "$bindir" "$exec_prefix/bin"`
sbindir=`var "$sbindir" "$exec_prefix/sbin"`
libexecdir=`var "$libexecdir" "$exec_prefix/libexec"`
datadir=`var "$datadir" "$prefix/share"`
sysconfdir=`var "$sysconfdir" "$prefix/etc"`
sharedstatedir=`var "$sharedstatedir" "$prefix/com"`
localstatedir=`var "$localstatedir" "$prefix/var"`
libdir=`var "$libdir" "$exec_prefix/lib"`
includedir=`var "$includedir" "$exec_prefix/include"`
oldincludedir=`var "$oldincludedir" "$exec_prefix/include"`
infodir=`var "$infodir" "$prefix/info"`
mandir=`var "$mandir" "$exec_prefix/man"`
pils_includedir=$includedir/pils
stonith_includedir=$includedir/stonith
AC_SUBST(pils_includedir)
AC_SUBST(stonith_includedir)
#
# Other interesting variables: ${host_vendor} and ${host_os}
# sample values: suse linux
#
dnl We use this in the RPM specfile...
AC_SUBST(ac_configure_args)
dnl *************************************************************************
PATH="$PATH:/sbin:/usr/sbin:/usr/local/sbin:/usr/local/bin"
export PATH
dnl checks for programs
dnl
dnl Which C compiler?
dnl Defaults to GNU C compiler if available.
dnl Always tries to set the compiler to ANSI C via options (AM)
dnl Can force other with environment variable "CC".
AC_PROG_CC
AM_PROG_CC_STDC
AC_LIBTOOL_DLOPEN dnl Enable dlopen support...
AC_LIBLTDL_CONVENIENCE dnl make libltdl a convenience lib
AM_PROG_LIBTOOL
AC_CHECK_PROG(MAKE, gmake, gmake, make)
AC_MSG_CHECKING(for gmake or make)
if test x"${MAKE}" = x""; then
AC_MSG_ERROR(You need the gmake to build heartbeat.
You can get the source from ftp://www.gnu.org/pub/gnu/
or you can locate it via http://www.gnu.org/software/make/)
else
AC_MSG_RESULT("$MAKE has been found.")
fi
AC_CHECK_PROG(HTML2TXT, lynx, lynx)
AC_CHECK_PROG(POD2MAN, pod2man, pod2man)
AC_PATH_PROGS(ROUTE, route)
AC_PATH_PROGS(RPM, rpm)
AC_DEFINE_UNQUOTED(ROUTE, "$ROUTE", path to route command)
AC_PATH_PROGS(NETSTAT, netstat)
AC_DEFINE_UNQUOTED(NETSTAT, "$NETSTAT", path to the netstat command)
AC_PATH_PROGS(PING, ping)
AC_PATH_PROGS(IFCONFIG, ifconfig)
AC_PATH_PROGS(SSH, ssh)
AC_PATH_PROGS(SCP, scp)
AC_PATH_PROGS(PYTHON, python)
AC_DEFINE_UNQUOTED(IFCONFIG, "$IFCONFIG", path to the ifconfig command)
AC_PATH_PROGS(GLIBCONFIG, glib-config, glib12-config)
AC_PATH_PROGS(GLIBCONFIG, glib12-config, glib13-config)
AC_PATH_PROGS(GLIBCONFIG, glib13-config)
AC_PATH_PROGS(BLOCKDEV, blockdev)
AC_PATH_PROGS(FUSER, fuser)
AC_PATH_PROGS(MOUNT, mount)
AC_PATH_PROGS(UMOUNT, umount)
AC_PATH_PROGS(FSCK, fsck)
AC_PATH_PROGS(MODPROBE, modprobe)
AC_PATH_PROGS(RAIDSTART, raidstart)
AC_PATH_PROGS(RAIDSTOP, raidstop)
AC_PATH_PROGS(LIBNETCONFIG, libnet-config)
+AC_PATH_PROGS(GETENT, getent)
AC_MSG_CHECKING(which glib config exists)
if test x"${GLIBCONFIG}" = x""; then
AC_MSG_ERROR(You need the glib development package to continue.
You can get the source from ftp://ftp.gtk.org/pub/gtk/v1.2/
or you can locate it via http://www.gtk.org/download/)
else
AC_MSG_RESULT("using $GLIBCONFIG")
fi
if test x"${LIBNETCONFIG}" = x""; then
AC_MSG_ERROR(You need libnet to continue. You can get libnet from http://www.packetfactory.net/libnet)
else
LIBNETDEFINES="`$LIBNETCONFIG --defines` `$LIBNETCONFIG --cflags`";
LIBNETLIBS="`$LIBNETCONFIG --libs`";
AC_MSG_RESULT("using $LIBNETCONFIG")
fi
AC_SUBST(LIBNETDEFINES)
AC_SUBST(LIBNETLIBS)
AC_MSG_CHECKING(where is python installed)
if test "x${PYTHON}" = x; then
PYTHON="/usr/bin/env python";
fi
AC_MSG_RESULT("using $PYTHON");
AC_MSG_CHECKING(if netstat supports -f inet flag)
$NETSTAT -rn -f inet > /dev/null 2>&1
if test x"$?" = x"0"; then
AC_DEFINE(NETSTATPARM, "-rn -f inet ", parameters to netstat to retrieve route information)
AC_MSG_RESULT("yes")
else
AC_DEFINE(NETSTATPARM, "-rn ", parameters to netstat to retrieve route information)
AC_MSG_RESULT("no")
fi
dnl Determine if we use -w1 or -t1 for ping (in PYTHON Scripts)
AC_MSG_CHECKING(ping option for timeout - w or t)
for PING_TIMEOUT_OPT in "-w1" "-t1"
do
$PING -nq -c1 $PING_TIMEOUT_OPT localhost > /dev/null 2>&1
if
test "$?" = 0
then
AC_DEFINE_UNQUOTED(PING_TIMEOUT_OPT, "$PING_TIMEOUT_OPT", option for ping timeout)
AC_MSG_RESULT($PING_TIMEOUT_OPT)
break
fi
done
AC_SUBST(PING_TIMEOUT_OPT)
dnl Determining a route (particularly for "findif").
dnl There are various mechanisms on different systems.
dnl Some mechanisms require root access to evaluate, but configure is often
dnl (indeed, some say should be always) running non-root.
dnl
dnl Therefore much of the determination has to be run-time.
dnl So the principle here, at configure time, is to explore what might be
dnl available, and offer as much as possible to run-time.
dnl
AC_DEFINE(ROUTEPARM, "-n get", paramters for route to retrieve route information)
AC_DEFINE(PROCROUTE, "/proc/net/route", path were to find route information in proc)
AC_MSG_CHECKING(ifconfig option to list interfaces)
for IFCONFIG_A_OPT in "" "-a"
do
$IFCONFIG $IFCONFIG_A_OPT > /dev/null 2>&1
if
test "$?" = 0
then
AC_DEFINE_UNQUOTED(IFCONFIG_A_OPT, "$IFCONFIG_A_OPT", option for ifconfig command)
AC_MSG_RESULT($IFCONFIG_A_OPT)
break
fi
done
AC_MSG_CHECKING(for the location of the lock directory)
for TTY_LOCK_D in /var/lock /var/spool/lock /var/spool/locks
do
if
test -d "$TTY_LOCK_D"
then
AC_MSG_RESULT($TTY_LOCK_D)
AC_DEFINE_UNQUOTED(TTY_LOCK_D, "$TTY_LOCK_D", tty lock file directory)
break
fi
done
AC_SUBST(IFCONFIG_A_OPT)
AC_SUBST(HTML2TXT)
AC_SUBST(POD2MAN)
AC_SUBST(ROUTEPARM)
AC_SUBST(PROCROUTE)
dnl Locales check - is a real ugly workaround for now til I find
dnl something more useful
dnl
dnl "Eric Z. Ayers" wrote:
dnl >
dnl > Here are some more data points:
dnl >
dnl > SUN: /usr/lib/locale/
dnl > HP : /usr/lib/nls/loc/
dnl > OSF: /usr/lib/nls/loc/
dnl > LINUX: /usr/share/locale/
dnl > UNIXWARE: /usr/lib/locale/
dnl > FREEBSD: /usr/share/locale
dnl > VMS: just kidding
dnl
FindADir() {
type="$1"
whatfor="$2"
shift; shift;
AC_MSG_CHECKING(for $whatfor directory)
for dir
do
if
test -d "$dir"
then
AC_MSG_RESULT($dir)
echo $dir
return 0
fi
done
AC_MSG_RESULT(not found)
return 1
}
locale_locations="/usr/share/locale /usr/lib/locale /usr/lib/nls/loc"
LOCALE=`FindADir error "locale" $locale_locations`
if
test "X$LOCALE" = X
then
AC_MSG_ERROR(Locale directory is mandantory.)
fi
RPMDIR=`FindADir warn "RPM" /usr/src/packages /usr/src/redhat`
dnl
dnl Look for #define CLK_TCK in limits.h (Solaris)
dnl
AC_MSG_CHECKING("for CLK_TCK in limits.h")
AC_EGREP_CPP(FoundClkTck,
[
#include <limits.h>
#ifdef CLK_TCK
FoundClkTck
#endif
],
[
AC_DEFINE(CLK_TCK_IN_LIMITS_H,1)
AC_MSG_RESULT("Yes")
],
AC_MSG_RESULT("No"))
dnl
dnl Look for #define CLK_TCK in time.h (Linux)
dnl
AC_MSG_CHECKING("for CLK_TCK in time.h")
AC_EGREP_CPP(FoundClkTck,
[#include <time.h>
#ifdef CLK_TCK
FoundClkTck
#endif
], [
AC_DEFINE(CLK_TCK_IN_TIME_H,1)
AC_MSG_RESULT("Yes")
],
AC_MSG_RESULT("No"))
dnl ************************************************************************
dnl checks for libraries
dnl
AC_CHECK_LIB(nsl, t_open) dnl -lnsl
AC_CHECK_LIB(socket, socket) dnl -lsocket
AC_CHECK_LIB(posix4, sched_getscheduler) dnl -lposix4
AC_CHECK_LIB(c, dlopen) dnl if dlopen is in libc...
AC_CHECK_LIB(dl, dlopen) dnl -ldl (for Linux)
AC_CHECK_LIB(rt, sched_getscheduler) dnl -lrt (for Tru64)
#
# Where is dlopen?
#
if test "$ac_cv_lib_c_dlopen" = yes; then
LIBADD_DL=""
elif test "$ac_cv_lib_dl_dlopen" = yes; then
LIBADD_DL=-ldl
else
LIBADD_DL=${lt_cv_dlopen_libs}
fi
dnl
dnl Check for location of gettext
dnl
dnl On at least Solaris 2.x, where it is in libc, specifying lintl causes
dnl grief. Ensure minimal result, not the sum of all possibilities.
dnl And do libc first.
dnl Known examples:
dnl c: Linux, Solaris 2.6+
dnl intl: BSD, AIX
FunIsInLib() {
fun=$1
lib=$2
lib_var1="ac_cv_lib_${lib}_$fun"
lib_var2="ac_cv_lib_${lib}___$fun"
for v in $lib_var1 $lib_var2
do
var=`eval echo '${'${v}'}'`
case $var in
yes) return 0;;
no) return 1;;
esac
done
return 0
}
for gt_test_lib in c intl
do
AC_CHECK_LIB($gt_test_lib, gettext)
if FunIsInLib gettext $gt_test_lib; then
break
fi
done
#
# Where is gettext()?
#
if FunIsInLib gettext c ; then
LIBADD_INTL=""
elif FunIsInLib gettext intl ; then
LIBADD_INTL=-lintl
elif test -f /usr/local/lib/libintl.so -a -s /usr/local/lib/libintl.so; then
# This was added for FreeBSD
LIBADD_INTL="-L/usr/local/lib -lintl"
else
AC_MSG_ERROR(no library providing gettext found)
fi
AC_MSG_CHECKING(whether we need to include /usr/local/include)
dnl
dnl this is mainly for FreeBSD...
if
test ! -f /usr/include/libintl.h -a -f /usr/local/include/libintl.h
then
AC_MSG_RESULT(yes)
CPPFLAGS="$CPPFLAGS -I/usr/local/include"
else
AC_MSG_RESULT(no)
fi
dnl
dnl Glib allows its headers/libraries to be installed anywhere.
dnl And they provide a command to let you know where they are.
dnl This is nice, but having them in standard places is nicer ;-)
dnl
AC_MSG_CHECKING(for special glib includes: )
GLHEAD=`$GLIBCONFIG --cflags`
AC_MSG_RESULT($GLHEAD)
CPPFLAGS="$CPPFLAGS $GLHEAD"
dnl Note: Not bundling "GLIBLIB" with general "LIBS".
dnl 1. Only very few programs require GLIBLIB
dnl 2. Danger of creating run-time dependency on build-time LD_LIBRARY_PATH
AC_MSG_CHECKING(for glib library flags)
GLIBLIB=`$GLIBCONFIG --libs`
AC_MSG_RESULT($GLIBLIB)
AC_SUBST(GLIBLIB)
dnl ************************************************************************
dnl checks for header files
dnl
dnl check for ANSI *.h files first
dnl asm/page.h: Linux, for system PAGE_SIZE
AC_HEADER_STDC
AC_CHECK_HEADERS(db.h asm/page.h time.h stdarg.h)
AC_CHECK_HEADERS(netinet/in_systm.h)
AC_CHECK_HEADERS(netinet/ip_var.h netinet/ip.h netinet/ip_compat.h netinet/ip_fw.h)
AC_CHECK_HEADERS(sys/sockio.h)
AC_CHECK_HEADERS(libintl.h)
AC_CHECK_HEADERS(sys/types.h sys/socket.h netinet/in.h arpa/inet.h)
dnl ************************************************************************
dnl checks for headers needed by clplumbing On BSD
AC_CHECK_HEADERS(sys/syslimits.h sys/ucred.h)
dnl ************************************************************************
dnl checks for headers needed by clplumbing On Solaris
AC_CHECK_HEADERS(sys/cred.h xti.h)
dnl ************************************************************************
dnl checks for headers needed by clplumbing On FreeBSD/Solaris
AC_CHECK_HEADERS(sys/filio.h)
dnl
dnl These next two are used to help us figure out whether to include
dnl some optional STONITH plugins...
dnl
AC_CHECK_HEADERS(vacm_client_api.h)
AC_CHECK_HEADERS(ucd-snmp/snmp.h)
dnl
dnl Could check for the libraries, but if you have the headers,
dnl you're a dolt for not having installed the libs ;-)
dnl
AM_CONDITIONAL(USE_VACM, test "$ac_cv_header_vacm_client_h" = yes)
AM_CONDITIONAL(USE_UCD_SNMP, test "$ac_cv_header_ucd_snmp_snmp_h" = yes)
dnl ************************************************************************
dnl checks for typedefs
dnl
dnl ************************************************************************
dnl checks for structures
dnl
dnl Check TERMIOS for components (e.g. c_line not present on Solaris)
dnl
AC_CACHE_CHECK([for c_line in termios],samba_cv_HAVE_TERMIOS_C_LINE,[
AC_TRY_COMPILE([#include <sys/types.h>
#include <sys/termios.h>],
[struct termios ti; ti.c_line = 'a';],
samba_cv_HAVE_TERMIOS_C_LINE=yes,samba_cv_HAVE_TERMIOS_C_LINE=no,samba_cv_HAVE_TERMIOS_C_LINE=cross)])
if test x"$samba_cv_HAVE_TERMIOS_C_LINE" = x"yes"; then
AC_DEFINE(HAVE_TERMIOS_C_LINE)
fi
dnl Check sockaddr_in for components (e.g. sin_len not present on Solaris)
dnl
AC_CACHE_CHECK([for sin_len in sockaddr_in],samba_cv_HAVE_SOCKADDR_IN_SIN_LEN,[
AC_TRY_COMPILE([#include <sys/types.h>
#include <netinet/in.h>],
[struct sockaddr_in si; si.sin_len = 1;],
samba_cv_HAVE_SOCKADDR_IN_SIN_LEN=yes,samba_cv_HAVE_SOCKADDR_IN_SIN_LEN=no,samba_cv_HAVE_SOCKADDR_IN_SIN_LEN=cross)])
if test x"$samba_cv_HAVE_SOCKADDR_IN_SIN_LEN" = x"yes"; then
AC_DEFINE(HAVE_SOCKADDR_IN_SIN_LEN)
fi
dnl Check msghdr for components (e.g. msg_control/msg_controlen not present on Solaris)
dnl
AC_CACHE_CHECK([for msg_control in msghdr],samba_cv_HAVE_MSG_CONTROL_MSGHDR,[
AC_TRY_COMPILE([#include <sys/types.h>
#include <sys/socket.h>
],
[struct msghdr mh; mh.msg_control = (void *)0;],
samba_cv_HAVE_MSG_CONTROL_MSGHDR=yes,samba_cv_HAVE_MSG_CONTROL_MSGHDR=no,samba_cv_HAVE_MSG_CONTROL_MSGHDR=cross)])
if test x"$samba_cv_HAVE_MSG_CONTROL_MSGHDR" = x"yes"; then
MSGHDR_TYPE="msghdr"
IPCSOCKET_C="ipcsocket.c"
IPCSOCKET_LO="ipcsocket.lo"
else
MSGHDR_TYPE="nmsghdr"
IPCSOCKET_C=""
IPCSOCKET_LO=""
fi
dnl
dnl Check for ALIGN in /sys/param.h
dnl
AC_MSG_CHECKING("for ALIGN in sys/param.h")
AC_EGREP_CPP(FoundAlign,
[#include <sys/param.h>
#ifdef ALIGN
FoundAlign
#endif
], [
ALIGN="ALIGN"
AC_MSG_RESULT("Yes")
],
AC_MSG_RESULT("No"))
AC_MSG_CHECKING("for T_ALIGN in xti.h")
AC_EGREP_CPP(FoundAlign,
[#include <xti.h>
#ifdef T_ALIGN
FoundAlign
#endif
], [
ALIGN="T_ALIGN"
AC_MSG_RESULT("Yes")
],
AC_MSG_RESULT("No"))
AC_SUBST(IPCSOCKET_C)
AC_SUBST(IPCSOCKET_LO)
AC_SUBST(ALIGN)
AC_SUBST(MSGHDR_TYPE)
dnl ************************************************************************
dnl checks for compiler characteristics
dnl
dnl Warnings for C compilers. Note: generic, portable warnings only.
dnl Things likely to be specific to a particular OS or module should be
dnl carefully handled afterwards.
AC_C_STRINGIZE
CC_WARNINGS=""
if test "$GCC" = yes; then
dnl
dnl We make sure warnings are carefully scrubbed out of the output if
dnl you're running on some platforms. You can enable that behavior with
dnl the option "fatal_warnings", by specifying --enable-fatal_warnings.
dnl Or, you can disable it with --disable-fatal_warnings.
dnl
dnl Horms 10th August 2001
dnl Don't do this, it seems to cause configure in
dnl the libltdl/ directory to die under Debian Woody
dnl I'm suspecting it will be a problem on other systems too.
dnl For this reason it now defaults to off.
dnl AlanR 11 August 2001
dnl Show no mercy to broken OSes and other software. If you have broken
dnl software, turn this feature off.
dnl NO warnings WHATSOVER will be tolerated without good reason.
dnl A distribution being broken isn't a good reason.
dnl The cure for that is fix the distribution, not destroy the integrity
dnl of the entire project by defaulting it to "off".
dnl In my experience, there are ways of making individual warnings go
dnl away.
dnl The only way I know to keep them out is to make them an absolute
dnl pain to deal with. Otherwise they're a pain to fix.
dnl This policy is not an accident, nor was it chosen without significant
dnl thought and experience.
dnl
case "$host_os" in
*linux*)
if test "$enable_fatal_warnings" = ""; then
echo "defaulting --enable-fatal_warnings on this platform"
enable_fatal_warnings=yes
fi
;;
esac
EXTRA_WARNINGS=""
if test "$enable_fatal_warnings" = yes; then
EXTRA_WARNINGS="-Werror"
fi
if test "$enable_traditional_warning" = yes; then
EXTRA_WARNINGS="$EXTRA_WARNINGS -Wtraditional"
fi
# had to eliminate -Wnested-externs because of libtool changes
CC_WARNINGS="-Wall -Wmissing-prototypes \
-Wmissing-declarations \
-Wstrict-prototypes \
-Wpointer-arith \
-Wwrite-strings \
-Wcast-qual -Wcast-align \
-Winline $EXTRA_WARNINGS"
fi
INIT_EXT=""
USE_MODULES=0
case "$host_os" in
solaris*) HEARTBEAT_LIBS="-lposix4"
# I don't think this is necessary any more...
;;
*bsd*) LIBS="$LIBS -L/usr/local/lib"
INIT_EXT=".sh"
;;
*linux*) USE_MODULES=1
;;
esac
AC_MSG_CHECKING(which init (rc) directory to use)
INITDIR=""
for initdir in /etc/init.d /etc/rc.d/init.d /sbin/init.d /usr/local/etc/rc.d
do
if
test -d $initdir
then
INITDIR=$initdir
AC_MSG_RESULT($INITDIR);
break
fi
done
if
test "X$INITDIR" = X
then
AC_MSG_ERROR(Could not locate init directory)
fi
AC_SUBST(INITDIR)
AC_SUBST(INIT_EXT)
AC_SUBST(USE_MODULES)
dnl **********************************************************************
dnl checks for group to install fifos as
dnl
dnl These checks aren't right. We need to locate the lowest
dnl unused group id if haclient isn't in the /etc/group file
dnl and no one has overridden group-id with a --with-group-id
dnl option.
dnl
AC_ARG_WITH(
group-name,
[ --with-group-name=GROUP_NAME
GROUP_NAME to own API fifos. [default=haclient] ],
[ APIGROUP="$withval" ],
[ APIGROUP="haclient" ],
)
AC_DEFINE_UNQUOTED(APIGROUP, "$APIGROUP", Group to own API fifos)
AC_SUBST(APIGROUP)
+if
+ test -z "${GETENT}" -o ! -x "${GETENT}"
+then
+ GETENT=getent
+ getent() {
+ grep "^${2}:" /etc/$1
+ }
+fi
+
+
AC_ARG_WITH(
group-id,
[ --with-group-id=GROUP_ID GROUP_ID to own API fifos. [default=60] ],
[ APIGID=$withval ],
[ APIGID=65 ],
)
if
getent group ${APIGROUP} > /dev/null
then
APIGID=`getent group ${APIGROUP} | cut -d: -f3`
fi
AC_DEFINE_UNQUOTED(APIGID, $APIGID, GID to own API fifos)
AC_SUBST(APIGID)
AC_ARG_WITH(
ccmuser-name,
[ --with-ccmuser-name=CCMUSER_NAME
CCMUSER_NAME to own API fifos. [default=hacluster] ],
[ CCMUSER="$withval" ],
[ CCMUSER="hacluster" ],
)
AC_DEFINE_UNQUOTED(CCMUSER, "$CCMUSER", User to own CCM fifos)
AC_SUBST(CCMUSER)
AC_ARG_WITH(
ccmuser-id,
[ --with-ccmuser-id=CCMUSER_ID USER_ID to own CCM fifos. [default=17] ],
[ CCMUID=$withval ],
[ CCMUID=17 ],
)
if
getent passwd ${CCMUSER} >/dev/null
then
CCMUID=`getent passwd ${CCMUSER} | cut -d: -f3`
fi
AC_DEFINE_UNQUOTED(CCMUID, $CCMUID, UID to own CCM fifos)
AC_SUBST(CCMUID)
#
# Priority for starting via init startup scripts
#
AC_ARG_WITH(
start-init-priority,
[ --with-start-init-priority=number Init start priority. [default=75] ],
[ INITSTARTPRI=$withval ],
[ INITSTARTPRI=75 ],
)
AC_DEFINE_UNQUOTED(INITSTARTPRI, $INITSTARTPRI, Init start priority)
AC_SUBST(INITSTARTPRI)
#
# Priority for stopping via init shutdown scripts
#
AC_ARG_WITH(
stop-init-priority,
[ --with-stop-init-priority=number Init stop priority. [default=5] ],
[ INITSTOPPRI=$withval ],
[ INITSTOPPRI=05 ],
)
AC_DEFINE_UNQUOTED(INITSTOPPRI, $INITSTOPPRI, Init stop priority)
AC_SUBST(INITSTOPPRI)
#
# Name of UCD-SNMP development package
#
AC_ARG_WITH(
ucd-snmp-devel,
[ --with-snmp-init-priority=name of ucd snmp developemnt RPM. [default=ucd-snmp-devel] ],
[ UCDSNMPDEVEL=$withval ],
[ UCDSNMPDEVEL=ucd-snmp-devel ],
)
AC_DEFINE_UNQUOTED(UCDSNMPDEVEL, $UCDSNMPDEVEL, Name of UCD SNMP development package)
AC_SUBST(UCDSNMPDEVEL)
dnl ************************************************************************
dnl checks for library functions
dnl
dnl sigignore: Only on Solaris.
dnl it is a solaris replacement for signal(s,SIG_IGN).
dnl
dnl scandir: Only on BSD.
dnl System-V systems may have it, but hidden and/or deprecated.
dnl A replacement function is supplied for it.
dnl
dnl setenv: is some bsdish function that should also be avoided (use
dnl putenv instead)
dnl On the other hand, putenv doesn't provide the right API for the
dnl code and has memory leaks designed in (sigh...) Fortunately this
dnl
dnl NoSuchFunctionName:
dnl is a dummy function which no system supplies. It is here to make
dnl the system compile semi-correctly on OpenBSD which doesn't know
dnl how to create an empty archive
AC_CHECK_FUNCS(scandir)
AC_CHECK_FUNCS(strerror)
AC_CHECK_FUNCS(inet_aton)
AC_CHECK_FUNCS(flock fcntl)
AC_CHECK_FUNCS(sigignore)
AC_CHECK_FUNCS(setenv scandir inet_pton NoSuchFunctionName)
AC_REPLACE_FUNCS(setenv scandir inet_pton NoSuchFunctionName)
dnl **********************************************************************
dnl Check for various argv[] replacing functions on various OSs
dnl
dnl Borrowed from Proftpd
dnl Proftpd is Licenced under the terms of the GNU General Public Licence
dnl and is available from http://www.proftpd.org/
dnl
AC_CHECK_FUNCS(setproctitle)
AC_CHECK_HEADERS(libutil.h)
AC_CHECK_LIB(util, setproctitle,
[AC_DEFINE(HAVE_SETPROCTITLE)
ac_cv_func_setproctitle="yes" ; LIBS="$LIBS -lutil"])
if test "$ac_cv_func_setproctitle" = "yes"; then
AC_DEFINE(PF_ARGV_TYPE, PF_ARGV_NONE)
else
pf_argv_set="no"
AC_CHECK_HEADERS(sys/pstat.h,have_pstat_h="yes",have_pstat_h="no")
if test "$have_pstat_h" = "yes"; then
AC_CHECK_FUNCS(pstat)
if test "$ac_cv_func_pstat" = "yes"; then
AC_DEFINE(PF_ARGV_TYPE, PF_ARGV_PSTAT)
else
AC_DEFINE(PF_ARGV_TYPE, PF_ARGV_WRITABLE)
fi
pf_argv_set="yes"
fi
if test "$pf_argv_set" = "no"; then
AC_EGREP_HEADER([#define.*PS_STRINGS.*],sys/exec.h,
have_psstrings="yes",have_psstrings="no")
if test "$have_psstrings" = "yes"; then
AC_DEFINE(PF_ARGV_TYPE, PF_ARGV_PSSTRINGS)
pf_argv_set="yes"
fi
fi
if test "$pf_argv_set" = "no"; then
AC_CACHE_CHECK(whether __progname and __progname_full are available,
pf_cv_var_progname,
AC_TRY_LINK([extern char *__progname, *__progname_full;],
[__progname = "foo"; __progname_full = "foo bar";],
pf_cv_var_progname="yes", pf_cv_var_progname="no"))
if test "$pf_cv_var_progname" = "yes"; then
AC_DEFINE(HAVE___PROGNAME)
fi
AC_CACHE_CHECK(which argv replacement method to use,
pf_cv_argv_type,
AC_EGREP_CPP(yes,[
#if defined(__GNU_HURD__)
yes
#endif
],pf_cv_argv_type="new", pf_cv_argv_type="writeable"))
if test "$pf_cv_argv_type" = "new"; then
AC_DEFINE(PF_ARGV_TYPE, PF_ARGV_NEW)
pf_argv_set="yes"
fi
if test "$pf_argv_set" = "no"; then
AC_DEFINE(PF_ARGV_TYPE, PF_ARGV_WRITEABLE)
fi
fi
fi
dnl End of tests borrowed from Proftpd
dnl **********************************************************************
dnl Check the size of the integer types
dnl So we can have integers of known sizes as needed
dnl
AC_CHECK_SIZEOF(char)
AC_CHECK_SIZEOF(short)
AC_CHECK_SIZEOF(int)
AC_CHECK_SIZEOF(long)
dnl
dnl We reset CFLAGS to include our warnings *after* all function
dnl checking goes on, so that our warning flags don't keep the
dnl AC_*FUNCS() calls above from working. In particular, -Werror will
dnl *always* cause us troubles if we set it before here.
dnl
dnl
CFLAGS="$CFLAGS $CC_WARNINGS"
dnl
dnl Make sure that CFLAGS is not exported. If the user did
dnl not have CFLAGS in their environment then this should have
dnl no effect. However if CFLAGS was exported from the user's
dnl envornment, then the new CFLAGS will also be exported
dnl to sub processes. This causes a problem when configure
dnl is run in the libltdl directory. Horms 16th July 2002
dnl
if export | fgrep " CFLAGS=" > /dev/null; then
export -n CFLAGS || true # We don't want to bomb out if this fails
fi
if test "$GCC" = yes; then
CFLAGS="$CFLAGS -ggdb3 $CC_WARNINGS"
else
CFLAGS="$CFLAGS -g $CC_WARNINGS"
fi
dnl AC_SUBST(CC_WARNINGS)
dnl ************************************************************************
dnl pre AC_OUTPUT stuff
dnl
dnl th aux dir (for holding config & autogenerated stuff)
dnl AC_SUBST(ac_aux_dir)
dnl for libtool to work LTLIBOJS is needed (currently bug of autoconf)
Xsed="sed -e s/^X//"
# This line breaks on every single version other than the newest Suse (United Linux)
# Commented out per converstion with Alan.
# LTLIBOBJS=`echo X"$LIB@&t@OBJS"|[$Xsed -e "s,\.[^.]* ,.lo ,g;s,\.[^.]*$,.lo,"]`
LTLIBOBJS=`echo X"$LIBOBJS"|[$Xsed -e "s,\.[^.]* ,.lo ,g;s,\.[^.]*$,.lo,"]`
AC_SUBST(LTLIBOBJS)
AC_SUBST(LIBADD_DL) dnl extra flags for dynamic linking libraries
AC_SUBST(LIBADD_INTL) dnl extra flags for GNU gettext stuff...
AC_SUBST(LOCALE)
HEARTBEAT_RC_DIR=$sysconfdir/ha.d/rc.d
AC_DEFINE_UNQUOTED(HEARTBEAT_RC_DIR, "$HEARTBEAT_RC_DIR", heartbeat rc script directory)
HEARTBEATPKG=heartbeat
AC_SUBST(HEARTBEATPKG)
STONITHPKG=stonith
AC_SUBST(STONITHPKG)
dnl libltdl additions
AC_SUBST(INCLTDL)
AC_SUBST(LIBLTDL)
dnl **********************************************************************
dnl Enable optional, experimental directories here...
dnl
XPERIMENTALDIRS="telecom"
AC_SUBST(XPERIMENTALDIRS)
AC_CONFIG_SUBDIRS(libltdl)
dnl The Makefiles and shell scripts we output
AC_OUTPUT(heartbeat.spec \
Makefile \
cts/Makefile \
cts/CM_fs.py \
cts/CM_hb.py \
cts/CTS.py \
cts/CTSaudits.py \
cts/CTSlab.py \
cts/CTStests.py \
debian/Makefile \
doc/Makefile \
cts/CM_fs.py \
cts/CM_hb.py \
cts/CTS.py \
cts/CTSaudits.py \
cts/CTSlab.py \
cts/CTStests.py \
include/Makefile \
include/clplumbing/Makefile \
include/pils/Makefile \
include/stonith/Makefile \
replace/Makefile \
linux-ha/Makefile \
lib/Makefile \
lib/apphb/Makefile \
lib/clplumbing/Makefile \
lib/pils/Makefile \
lib/plugins/Makefile \
lib/plugins/InterfaceMgr/Makefile \
lib/plugins/HBauth/Makefile \
lib/plugins/HBcomm/Makefile \
stonith/Makefile \
heartbeat/Makefile \
heartbeat/rc.d/Makefile \
heartbeat/rc.d/ask_resources \
heartbeat/init.d/Makefile \
heartbeat/init.d/heartbeat \
heartbeat/lib/Makefile \
heartbeat/lib/hb_standby \
heartbeat/lib/mach_down \
heartbeat/lib/req_resource \
heartbeat/lib/ResourceManager \
heartbeat/resource.d/Makefile \
heartbeat/resource.d/apache \
heartbeat/resource.d/AudibleAlarm \
heartbeat/resource.d/db2 \
heartbeat/resource.d/Filesystem \
heartbeat/resource.d/ICP \
heartbeat/resource.d/IPaddr \
heartbeat/resource.d/LinuxSCSI \
heartbeat/resource.d/LVM \
heartbeat/resource.d/MailTo \
heartbeat/resource.d/Raid1 \
heartbeat/resource.d/ServeRAID \
heartbeat/resource.d/WAS \
heartbeat/resource.d/WinPopup \
heartbeat/shellfuncs \
heartbeat/logrotate.d/Makefile \
ldirectord/Makefile \
ldirectord/init.d/Makefile \
ldirectord/logrotate.d/Makefile \
membership/Makefile \
membership/ccm/Makefile \
telecom/Makefile \
telecom/apphbd/Makefile \
)
dnl subpackages configuration - perhaps configure it properly some other time
dnl when it has been discussed at linux-ha-dev
dnl AC_CONFIG_SUBDIRS(stonith heartbeat)
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Tue, Feb 25, 2:58 AM (1 d, 8 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1464629
Default Alt Text
(28 KB)
Attached To
Mode
rR Resource Agents
Attached
Detach File
Event Timeline
Log In to Comment