diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2007-02-16 15:35:26 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:18:01 -0500 |
commit | 3e5219d8ec7be0fae5c53297817f1f58ce7a5f8c (patch) | |
tree | c59da1c346143ffdebc1f3538f6365de307d75fe /source3 | |
parent | 637b01b63d799af5b66cd6d62f56b2f0b00c935f (diff) | |
download | samba-3e5219d8ec7be0fae5c53297817f1f58ce7a5f8c.tar.gz samba-3e5219d8ec7be0fae5c53297817f1f58ce7a5f8c.tar.xz samba-3e5219d8ec7be0fae5c53297817f1f58ce7a5f8c.zip |
r21388: Merge support for providing replacement system headers.
(This used to be commit 78d6c88f10d600e05c4346affbba1d95c614dc34)
Diffstat (limited to 'source3')
-rw-r--r-- | source3/lib/replace/README | 4 | ||||
-rw-r--r-- | source3/lib/replace/libreplace.m4 | 5 | ||||
-rw-r--r-- | source3/lib/replace/libreplace_macros.m4 | 9 |
3 files changed, 17 insertions, 1 deletions
diff --git a/source3/lib/replace/README b/source3/lib/replace/README index a313984c8ea..21cd0051c70 100644 --- a/source3/lib/replace/README +++ b/source3/lib/replace/README @@ -81,6 +81,10 @@ MIN MAX QSORT_CAST +Headers: +stdint.h +stdbool.h + Prerequisites: memset (for bzero) syslog (for vsyslog) diff --git a/source3/lib/replace/libreplace.m4 b/source3/lib/replace/libreplace.m4 index 3328dea95e8..805cdc6cb59 100644 --- a/source3/lib/replace/libreplace.m4 +++ b/source3/lib/replace/libreplace.m4 @@ -61,9 +61,12 @@ AC_FUNC_MEMCMP AC_CHECK_FUNCS(pipe strftime srandom random srand rand usleep setbuffer lstat getpgrp) -AC_CHECK_HEADERS(stdbool.h sys/select.h) +AC_CHECK_HEADERS(stdbool.h stdint.h sys/select.h) AC_CHECK_HEADERS(setjmp.h) +LIBREPLACE_PROVIDE_HEADER([stdint.h]) +LIBREPLACE_PROVIDE_HEADER([stdbool.h]) + AC_CHECK_TYPE(bool, [AC_DEFINE(HAVE_BOOL, 1, [Whether the bool type is available])],, [ diff --git a/source3/lib/replace/libreplace_macros.m4 b/source3/lib/replace/libreplace_macros.m4 index 0669c10c2a0..f262b9b6eb0 100644 --- a/source3/lib/replace/libreplace_macros.m4 +++ b/source3/lib/replace/libreplace_macros.m4 @@ -306,3 +306,12 @@ AC_DEFUN(AC_VERIFY_C_PROTOTYPE, ) AS_IF([test $AS_TR_SH([ac_cv_c_prototype_$1]) = yes],[$3],[$4]) ]) + +AC_DEFUN(LIBREPLACE_PROVIDE_HEADER, +[AC_CHECK_HEADER([$1], + [ AC_CONFIG_COMMANDS(rm-$1, [rm -f $libreplacedir/$1], [libreplacedir=$libreplacedir]) ], + [ AC_CONFIG_COMMANDS(mk-$1, [echo "#include \"replace.h\"" > $libreplacedir/$1], [libreplacedir=$libreplacedir]) ] + ) +]) + + |