ports/sysutils/heartbeat/files/patch-configure.in
2013-02-18 21:25:28 +00:00

80 lines
2.7 KiB
Text

--- configure.in.orig 2008-08-18 07:32:19.000000000 -0500
+++ configure.in 2011-09-07 16:36:38.000000000 -0500
@@ -65,6 +65,13 @@
pf_argv_set=""
case "$host_os" in
+*freebsd*)
+ LIBS="-L/usr/local/lib"
+ CPPFLAGS="$CPPFLAGS -I/usr/local/include"
+ INIT_EXT=""
+ REBOOT_OPTIONS="-d"
+ POWEROFF_OPTIONS="-p"
+ ;;
*bsd*) LIBS="-L/usr/local/lib"
CPPFLAGS="$CPPFLAGS -I/usr/local/include"
INIT_EXT=".sh"
@@ -224,7 +231,7 @@
oldincludedir=`var "$oldincludedir" "$exec_prefix/include"`
infodir=`var "$infodir" "$prefix/info"`
mandir=`var "$mandir" "$exec_prefix/man"`
-docdir=${datadir}/doc/${HB_PKG}-${VERSION}
+docdir=${datadir}/doc/heartbeat
libdir=`var "$libdir" "$exec_prefix/lib"`
libexecdir=`var "$libexecdir" "$exec_prefix/libexec"`
noarchlibdir=`var "$noarchlibdir" "$prefix/lib"`
@@ -237,6 +244,7 @@
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_C_O
AC_PROG_CC_STDC
dnl ************************************************************************
@@ -542,7 +550,7 @@
AC_PATH_PROGS(MAILCMD, mail, mailx)
AC_SUBST(MAILCMD)
AC_DEFINE_UNQUOTED(IFCONFIG, "$IFCONFIG", path to the ifconfig command)
-AC_PATH_PROGS(LIBNETCONFIG, libnet-config)
+AC_PATH_PROGS(LIBNETCONFIG, libnet11-config)
AC_PATH_PROGS(GETENT, getent)
AC_PATH_PROGS(IP2UTIL, ip, /sbin/ip)
AC_PATH_PROGS(XML2CONFIG, xml2-config)
@@ -1718,6 +1726,7 @@
AC_CHECK_SIZEOF(int)
AC_CHECK_SIZEOF(long)
AC_CHECK_SIZEOF(long long)
+AC_CHECK_SIZEOF(clock_t, [], [#include <sys/times.h>])
AC_ARG_ENABLE([all],
[ --enable-all Activate ALL features
@@ -2381,7 +2390,7 @@
AC_MSG_CHECKING(if clock_t is long enough)
-if test $ac_cv_sizeof_long -ge 8; then
+if test $ac_cv_sizeof_clock_t -ge 8; then
AC_MSG_RESULT(yes)
AC_DEFINE(CLOCK_T_IS_LONG_ENOUGH, 1, [Set if CLOCK_T is adequate by itself for the "indefinite future" (>= 100 years)])
else
@@ -2393,13 +2402,13 @@
dnl Note: reduce LIBS; in particular, ltdl can cause confusion.
dnl Possibly better: move 'LIBS="$LIBS -lltdl"' from above to beyond here.
dnl
-AC_MSG_CHECKING(for getpid() consistency in multi-process/threads program)
-ac_save_LIBS=$LIBS
-LIBS="-lpthread"
-AC_TRY_RUN(`cat $srcdir/config/pidtest.c`,
-AC_MSG_RESULT(ok),
-[AC_MSG_RESULT(fail); AC_DEFINE(GETPID_INCONSISTENT, 1 , [pid inconsistent])],)
-LIBS=$ac_save_LIBS
+dnl AC_MSG_CHECKING(for getpid() consistency in multi-process/threads program)
+dnl ac_save_LIBS=$LIBS
+dnl LIBS="-lpthread"
+dnl AC_TRY_RUN(`cat $srcdir/config/pidtest.c`,
+dnl AC_MSG_RESULT(ok),
+dnl [AC_MSG_RESULT(fail); AC_DEFINE(GETPID_INCONSISTENT, 1 , [pid inconsistent])],)
+dnl LIBS=$ac_save_LIBS
dnl check byte order
AC_MSG_CHECKING(for byteorder)