summaryrefslogtreecommitdiff
path: root/lib/replace
diff options
context:
space:
mode:
authorBjörn Jacke <bj@sernet.de>2010-08-13 14:53:22 +0200
committerBjörn Jacke <bj@sernet.de>2010-08-13 14:57:44 +0200
commit5390baeb6b97acbfde89bdb6a2c678a516a0e360 (patch)
tree04e115352ba9abf008d461d4975faced32bb096b /lib/replace
parent37177f1c05398e1d4a59bebcdb3cd16dd6e8382b (diff)
downloadsamba-5390baeb6b97acbfde89bdb6a2c678a516a0e360.tar.gz
samba-5390baeb6b97acbfde89bdb6a2c678a516a0e360.tar.bz2
samba-5390baeb6b97acbfde89bdb6a2c678a516a0e360.zip
tdb: add TDB_DEPS variable filled with required libraries
This is required for Solaris, which needs to link in librt to make use of fdatasync().
Diffstat (limited to 'lib/replace')
-rw-r--r--lib/replace/libreplace.m48
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/replace/libreplace.m4 b/lib/replace/libreplace.m4
index 6da209db8a..2303641d94 100644
--- a/lib/replace/libreplace.m4
+++ b/lib/replace/libreplace.m4
@@ -108,7 +108,13 @@ AC_CHECK_FUNCS(seteuid setresuid setegid setresgid chroot bzero strerror strerro
AC_CHECK_FUNCS(vsyslog setlinebuf mktime ftruncate chsize rename)
AC_CHECK_FUNCS(waitpid wait4 strlcpy strlcat initgroups memmove strdup)
AC_CHECK_FUNCS(pread pwrite strndup strcasestr strtok_r mkdtemp dup2 dprintf vdprintf)
-AC_CHECK_FUNCS(isatty chown lchown link readlink symlink realpath fdatasync)
+AC_CHECK_FUNCS(isatty chown lchown link readlink symlink realpath)
+AC_CHECK_FUNCS(fdatasync,,[
+ # if we didn't find it, look in librt (Solaris hides it there...)
+ AC_CHECK_LIB(rt, fdatasync,
+ [libreplace_cv_HAVE_FDATASYNC_IN_LIBRT=yes
+ AC_DEFINE(HAVE_FDATASYNC, 1, Define to 1 if there is support for fdatasync)])
+])
AC_CHECK_FUNCS(get_current_dir_name)
AC_HAVE_DECL(setresuid, [#include <unistd.h>])
AC_HAVE_DECL(setresgid, [#include <unistd.h>])