dnl First check for acl_get_file in libc
dnl
AC_CHECK_FUNC(acl_get_file,
- [
- have_acl=yes
- ]
- )
+ [
+ have_acl=yes
+ ])
dnl
dnl Check for acl_get_file in libacl (Linux)
dnl
if test $have_acl = no; then
AC_CHECK_LIB(acl, acl_get_file,
- [
- have_acl=yes
- if test $have_afs = yes; then
- dnl
- dnl Because of possible naming conflict with AFS libacl make sure we use the one in /usr/lib64 or /usr/lib !!!
- dnl
- if test -d /usr/lib64/; then
- FDLIBS="-L/usr/lib64 -lacl $FDLIBS"
- else
- FDLIBS="-L/usr/lib -lacl $FDLIBS"
- fi
- else
- FDLIBS="-lacl $FDLIBS"
- fi
- ]
- )
+ [
+ have_acl=yes
+ if test $have_afs = yes; then
+ dnl
+ dnl Because of possible naming conflict with AFS libacl make sure we use the one in /usr/lib64 or /usr/lib !!!
+ dnl
+ if test -d /usr/lib64/; then
+ FDLIBS="-L/usr/lib64 -lacl $FDLIBS"
+ else
+ FDLIBS="-L/usr/lib -lacl $FDLIBS"
+ fi
+ else
+ FDLIBS="-lacl $FDLIBS"
+ fi
+ ])
fi
dnl
dnl Check for acl_get_file in libpacl (OSF1)
dnl and if ACL_TYPE_DEFAULT_DIR is defined.
dnl
- if test $have_acl = no -a \
- x${HAVE_OSF1_OS_TRUE} = x; then
+ if test $have_acl = no -a x${HAVE_OSF1_OS_TRUE} = x; then
AC_CHECK_LIB(pacl, acl_get_file,
- [
- have_acl=yes
- FDLIBS="-lpacl $FDLIBS"
- ]
- )
+ [
+ have_acl=yes
+ FDLIBS="-lpacl $FDLIBS"
+ ])
AC_MSG_CHECKING(for ACL_TYPE_DEFAULT_DIR in acl.h include file)
grep ACL_TYPE_DEFAULT_DIR /usr/include/sys/acl.h > /dev/null 2>&1
if test $? = 0; then
- AC_DEFINE(HAVE_ACL_TYPE_DEFAULT_DIR,1,[Defines if your system have the ACL_TYPE_DEFAULT_DIR acl type])
- AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_ACL_TYPE_DEFAULT_DIR,1,[Defines if your system have the ACL_TYPE_DEFAULT_DIR acl type])
+ AC_MSG_RESULT(yes)
else
- AC_MSG_RESULT(no)
+ AC_MSG_RESULT(no)
fi
fi
dnl
dnl On OSX check for availability of ACL_TYPE_EXTENDED
dnl
- if test $have_acl = yes -a \
- x${HAVE_DARWIN_OS_TRUE} = x; then
+ if test $have_acl = yes -a x${HAVE_DARWIN_OS_TRUE} = x; then
AC_MSG_CHECKING(for ACL_TYPE_EXTENDED in acl.h include file)
grep ACL_TYPE_EXTENDED /usr/include/sys/acl.h > /dev/null 2>&1
if test $? = 0; then
- AC_DEFINE(HAVE_ACL_TYPE_EXTENDED,1,[Defines if your system have the ACL_TYPE_EXTENDED acl type])
- AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_ACL_TYPE_EXTENDED,1,[Defines if your system have the ACL_TYPE_EXTENDED acl type])
+ AC_MSG_RESULT(yes)
else
- AC_MSG_RESULT(no)
+ AC_MSG_RESULT(no)
fi
fi
dnl On FreeBSD check for availability of ACL_TYPE_NFS4
dnl
if test $have_acl = yes -a \
- x${HAVE_FREEBSD_OS_TRUE} = x; then
+ x${HAVE_FREEBSD_OS_TRUE} = x; then
AC_MSG_CHECKING(for ACL_TYPE_NFS4 in acl.h include file)
grep ACL_TYPE_NFS4 /usr/include/sys/acl.h > /dev/null 2>&1
if test $? = 0; then
- AC_DEFINE(HAVE_ACL_TYPE_NFS4,1,[Defines if your system have the ACL_TYPE_NFS4 acl type])
- AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_ACL_TYPE_NFS4,1,[Defines if your system have the ACL_TYPE_NFS4 acl type])
+ AC_MSG_RESULT(yes)
else
- AC_MSG_RESULT(no)
+ AC_MSG_RESULT(no)
fi
fi
dnl Check for acltotext and acl_totext (Solaris)
dnl
if test $have_acl = no -a \
- x${HAVE_SUN_OS_TRUE} = x; then
+ x${HAVE_SUN_OS_TRUE} = x; then
AC_CHECK_LIB(sec, acltotext,
- [
- have_acl=yes
- FDLIBS="-lsec $FDLIBS"
+ [
+ have_acl=yes
+ FDLIBS="-lsec $FDLIBS"
- AC_CHECK_LIB(sec, acl_totext,
- [
- have_extended_acl=yes
- ]
- )
- ]
+ AC_CHECK_LIB(sec, acl_totext,
+ [
+ have_extended_acl=yes
+ ]
+ )
+ ]
)
fi
)
fi
+ACLOBJS=
if test x$support_acl = xyes -a $have_acl != yes; then
AC_MSG_ERROR([acl support explicitly enabled but no supported acl implementation found,
please either load the acl libraries or rerun configure without --enable-acl])
else
if test $have_acl = yes; then
- AC_DEFINE([HAVE_ACL],1,[Normal acl support])
+ AC_DEFINE([HAVE_ACL],1,[Normal acl support])
+ dnl
+ dnl Prepare obj building
+ dnl
+ if test x${HAVE_LINUX_OS_TRUE} = x; then
+ ACLOBJS="bacl.c bacl_linux.c"
+ fi
+ if test x${HAVE_SUN_OS_TRUE} = x; then
+ ACLOBJS="bacl.c bacl_solaris.c"
+ fi
+ if test x${HAVE_FREEBSD_OS_TRUE} = x; then
+ ACLOBJS="bacl.c bacl_freebsd.c"
+ fi
+ if test x${HAVE_DARWIN_OS_TRUE} = x; then
+ ACLOBJS="bacl.c bacl_osx.c"
+ fi
fi
-
if test $have_extended_acl = yes; then
- AC_DEFINE([HAVE_EXTENDED_ACL],1,[Extended acl support])
+ AC_DEFINE([HAVE_EXTENDED_ACL],1,[Extended acl support])
fi
fi
fi
+AC_SUBST(ACLOBJS)
dnl
dnl Check for XATTR support
fi
fi
+XATTROBJS=
if test x$support_xattr = xyes -a $have_xattr != yes; then
AC_MSG_ERROR([xattr support explicitly enabled but no supported xattr implementation found,
please either load the xattr libraries or rerun configure without --enable-xattr])
else
if test $have_xattr = yes; then
- AC_DEFINE([HAVE_XATTR],1,[Extended Attributes support])
+ AC_DEFINE([HAVE_XATTR],1,[Extended Attributes support])
+ dnl
+ dnl Prepare obj building
+ dnl
+ if test x${HAVE_LINUX_OS_TRUE} = x; then
+ XATTROBJS="bxattr.c bxattr_linux.c"
+ fi
+ if test x${HAVE_SUN_OS_TRUE} = x; then
+ XATTROBJS="bxattr.c bxattr_solaris.c"
+ fi
+ if test x${HAVE_FREEBSD_OS_TRUE} = x; then
+ XATTROBJS="bxattr.c bxattr_freebsd.c"
+ fi
+ if test x${HAVE_DARWIN_OS_TRUE} = x; then
+ XATTROBJS="bxattr.c bxattr_osx.c"
+ fi
fi
fi
fi
+AC_SUBST(XATTROBJS)
dnl
dnl Check for pthread libraries
DEBUG
FDLIBS
CAP_LIBS
+XATTROBJS
+ACLOBJS
LZO_LIBS
LZO_INC
AFS_LIBS
ac_fn_c_check_func "$LINENO" "acl_get_file" "ac_cv_func_acl_get_file"
if test "x$ac_cv_func_acl_get_file" = xyes; then :
- have_acl=yes
-
+ have_acl=yes
fi
$as_echo "$ac_cv_lib_acl_acl_get_file" >&6; }
if test "x$ac_cv_lib_acl_acl_get_file" = xyes; then :
- have_acl=yes
- if test $have_afs = yes; then
- if test -d /usr/lib64/; then
- FDLIBS="-L/usr/lib64 -lacl $FDLIBS"
- else
- FDLIBS="-L/usr/lib -lacl $FDLIBS"
- fi
- else
- FDLIBS="-lacl $FDLIBS"
- fi
-
+ have_acl=yes
+ if test $have_afs = yes; then
+ if test -d /usr/lib64/; then
+ FDLIBS="-L/usr/lib64 -lacl $FDLIBS"
+ else
+ FDLIBS="-L/usr/lib -lacl $FDLIBS"
+ fi
+ else
+ FDLIBS="-lacl $FDLIBS"
+ fi
fi
fi
- if test $have_acl = no -a \
- x${HAVE_OSF1_OS_TRUE} = x; then
+ if test $have_acl = no -a x${HAVE_OSF1_OS_TRUE} = x; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for acl_get_file in -lpacl" >&5
$as_echo_n "checking for acl_get_file in -lpacl... " >&6; }
if ${ac_cv_lib_pacl_acl_get_file+:} false; then :
$as_echo "$ac_cv_lib_pacl_acl_get_file" >&6; }
if test "x$ac_cv_lib_pacl_acl_get_file" = xyes; then :
- have_acl=yes
- FDLIBS="-lpacl $FDLIBS"
-
+ have_acl=yes
+ FDLIBS="-lpacl $FDLIBS"
fi
$as_echo "#define HAVE_ACL_TYPE_DEFAULT_DIR 1" >>confdefs.h
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
fi
- if test $have_acl = yes -a \
- x${HAVE_DARWIN_OS_TRUE} = x; then
+ if test $have_acl = yes -a x${HAVE_DARWIN_OS_TRUE} = x; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ACL_TYPE_EXTENDED in acl.h include file" >&5
$as_echo_n "checking for ACL_TYPE_EXTENDED in acl.h include file... " >&6; }
grep ACL_TYPE_EXTENDED /usr/include/sys/acl.h > /dev/null 2>&1
$as_echo "#define HAVE_ACL_TYPE_EXTENDED 1" >>confdefs.h
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
fi
if test $have_acl = yes -a \
- x${HAVE_FREEBSD_OS_TRUE} = x; then
+ x${HAVE_FREEBSD_OS_TRUE} = x; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ACL_TYPE_NFS4 in acl.h include file" >&5
$as_echo_n "checking for ACL_TYPE_NFS4 in acl.h include file... " >&6; }
grep ACL_TYPE_NFS4 /usr/include/sys/acl.h > /dev/null 2>&1
$as_echo "#define HAVE_ACL_TYPE_NFS4 1" >>confdefs.h
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
fi
if test $have_acl = no -a \
- x${HAVE_SUN_OS_TRUE} = x; then
+ x${HAVE_SUN_OS_TRUE} = x; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for acltotext in -lsec" >&5
$as_echo_n "checking for acltotext in -lsec... " >&6; }
if ${ac_cv_lib_sec_acltotext+:} false; then :
$as_echo "$ac_cv_lib_sec_acltotext" >&6; }
if test "x$ac_cv_lib_sec_acltotext" = xyes; then :
- have_acl=yes
- FDLIBS="-lsec $FDLIBS"
+ have_acl=yes
+ FDLIBS="-lsec $FDLIBS"
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for acl_totext in -lsec" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for acl_totext in -lsec" >&5
$as_echo_n "checking for acl_totext in -lsec... " >&6; }
if ${ac_cv_lib_sec_acl_totext+:} false; then :
$as_echo_n "(cached) " >&6
$as_echo "$ac_cv_lib_sec_acl_totext" >&6; }
if test "x$ac_cv_lib_sec_acl_totext" = xyes; then :
- have_extended_acl=yes
+ have_extended_acl=yes
fi
fi
+ACLOBJS=
if test x$support_acl = xyes -a $have_acl != yes; then
as_fn_error $? "acl support explicitly enabled but no supported acl implementation found,
please either load the acl libraries or rerun configure without --enable-acl" "$LINENO" 5
$as_echo "#define HAVE_ACL 1" >>confdefs.h
+ if test x${HAVE_LINUX_OS_TRUE} = x; then
+ ACLOBJS="bacl.c bacl_linux.c"
+ fi
+ if test x${HAVE_SUN_OS_TRUE} = x; then
+ ACLOBJS="bacl.c bacl_solaris.c"
+ fi
+ if test x${HAVE_FREEBSD_OS_TRUE} = x; then
+ ACLOBJS="bacl.c bacl_freebsd.c"
+ fi
+ if test x${HAVE_DARWIN_OS_TRUE} = x; then
+ ACLOBJS="bacl.c bacl_osx.c"
+ fi
fi
-
if test $have_extended_acl = yes; then
$as_echo "#define HAVE_EXTENDED_ACL 1" >>confdefs.h
fi
fi
+
support_xattr=auto
# Check whether --enable-xattr was given.
if test "${enable_xattr+set}" = set; then :
fi
fi
+XATTROBJS=
if test x$support_xattr = xyes -a $have_xattr != yes; then
as_fn_error $? "xattr support explicitly enabled but no supported xattr implementation found,
please either load the xattr libraries or rerun configure without --enable-xattr" "$LINENO" 5
$as_echo "#define HAVE_XATTR 1" >>confdefs.h
+ if test x${HAVE_LINUX_OS_TRUE} = x; then
+ XATTROBJS="bxattr.c bxattr_linux.c"
+ fi
+ if test x${HAVE_SUN_OS_TRUE} = x; then
+ XATTROBJS="bxattr.c bxattr_solaris.c"
+ fi
+ if test x${HAVE_FREEBSD_OS_TRUE} = x; then
+ XATTROBJS="bxattr.c bxattr_freebsd.c"
+ fi
+ if test x${HAVE_DARWIN_OS_TRUE} = x; then
+ XATTROBJS="bxattr.c bxattr_osx.c"
+ fi
fi
fi
fi
+
PTHREAD_LIB=""
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
AFS_CFLAGS = @AFS_CFLAGS@
AFS_LIBS = @AFS_LIBS@
+ACLOBJS = @ACLOBJS@
+XATTROBJS=@XATTROBJS@
first_rule: all
dummy:
fd_plugins.c accurate.c \
filed_conf.c heartbeat.c hello.c job.c fd_snapshot.c \
restore.c status.c verify.c verify_vol.c \
- bacl.c bacl_linux.c bacl_osx.c bacl_solaris.c bacl_freebsd.c \
- bxattr.c bxattr_linux.c bxattr_osx.c bxattr_solaris.c bxattr_freebsd.c
+ $(ACLOBJS) $(XATTROBJS)
+
SVROBJS = $(SVRSRCS:.c=.o)
JSONOBJS = bfdjson.o filed_conf.o