summaryrefslogtreecommitdiff
path: root/source4/lib/tdb/aclocal.m4
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2005-09-24 04:56:51 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:38:49 -0500
commitd98b913aa9a0dd40a9373d65882f1cb742d033af (patch)
tree6746c6fc2e9418d8a81a90f176bf691093d1ad81 /source4/lib/tdb/aclocal.m4
parent5860aef9cd53da572bef1b86a62a3a5e86da84b0 (diff)
downloadsamba-d98b913aa9a0dd40a9373d65882f1cb742d033af.tar.gz
samba-d98b913aa9a0dd40a9373d65882f1cb742d033af.tar.bz2
samba-d98b913aa9a0dd40a9373d65882f1cb742d033af.zip
r10466: work around missing pread/pwrite declaration on openbsd
(This used to be commit e615f36733966f9992670e3650fbe9b20d7d218c)
Diffstat (limited to 'source4/lib/tdb/aclocal.m4')
-rw-r--r--source4/lib/tdb/aclocal.m412
1 files changed, 12 insertions, 0 deletions
diff --git a/source4/lib/tdb/aclocal.m4 b/source4/lib/tdb/aclocal.m4
new file mode 100644
index 0000000000..cdc2a2fa52
--- /dev/null
+++ b/source4/lib/tdb/aclocal.m4
@@ -0,0 +1,12 @@
+dnl see if a declaration exists for a function or variable
+dnl defines HAVE_function_DECL if it exists
+dnl AC_HAVE_DECL(var, includes)
+AC_DEFUN(AC_HAVE_DECL,
+[
+ AC_CACHE_CHECK([for $1 declaration],ac_cv_have_$1_decl,[
+ AC_TRY_COMPILE([$2],[int i = (int)$1],
+ ac_cv_have_$1_decl=yes,ac_cv_have_$1_decl=no)])
+ if test x"$ac_cv_have_$1_decl" = x"yes"; then
+ AC_DEFINE([HAVE_]translit([$1], [a-z], [A-Z])[_DECL],1,[Whether $1() is available])
+ fi
+])