summaryrefslogtreecommitdiff
path: root/source4/lib/replace
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2006-09-07 13:11:47 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:17:52 -0500
commitafe2fde6fd842f86166e48c2d008e8cf040eec72 (patch)
tree288dea83cdedb16a66ed722b537895e6a1e4aae5 /source4/lib/replace
parent817d153870b4ecfe3a0063a0f0086831ace7f46a (diff)
downloadsamba-afe2fde6fd842f86166e48c2d008e8cf040eec72.tar.gz
samba-afe2fde6fd842f86166e48c2d008e8cf040eec72.tar.bz2
samba-afe2fde6fd842f86166e48c2d008e8cf040eec72.zip
r18221: moved more configure checks into lib/replace/
(This used to be commit d853dcfda771888f80a80e14ffabb1c0e58a340e)
Diffstat (limited to 'source4/lib/replace')
-rw-r--r--source4/lib/replace/libreplace.m432
1 files changed, 32 insertions, 0 deletions
diff --git a/source4/lib/replace/libreplace.m4 b/source4/lib/replace/libreplace.m4
index c72de29b1e..cdd83113ed 100644
--- a/source4/lib/replace/libreplace.m4
+++ b/source4/lib/replace/libreplace.m4
@@ -1,3 +1,7 @@
+dnl needed before AC_TRY_COMPILE
+AC_ISC_POSIX
+
+AC_C_INLINE
LIBREPLACE_C99_STRUCT_INIT([],[])
@@ -16,6 +20,16 @@ AC_SUBST(LIBREPLACEOBJ)
AC_SYS_LARGEFILE
+dnl Add #include for broken IRIX header files
+case "$host_os" in
+ *irix6*) AC_ADD_INCLUDE(<standards.h>)
+ ;;
+esac
+
+AC_C_BIGENDIAN
+AC_HEADER_STDC
+
+
AC_CHECK_HEADERS([stdint.h inttypes.h])
AC_CHECK_TYPE(uint_t, unsigned int)
AC_CHECK_TYPE(uint8_t, unsigned char)
@@ -260,3 +274,21 @@ if test x"$samba_cv_HAVE_OPEN_O_DIRECT" = x"yes"; then
fi
+AC_CACHE_CHECK([that the C compiler can precompile header files],samba_cv_precompiled_headers, [
+ dnl Check whether the compiler can generate precompiled headers
+ touch conftest.h
+ if ${CC-cc} conftest.h 2> /dev/null && test -f conftest.h.gch; then
+ precompiled_headers=yes
+ else
+ precompiled_headers=no
+ fi])
+AC_SUBST(precompiled_headers)
+
+
+dnl Check if the C compiler understands volatile (it should, being ANSI).
+AC_CACHE_CHECK([that the C compiler understands volatile],samba_cv_volatile, [
+ AC_TRY_COMPILE([#include <sys/types.h>],[volatile int i = 0],
+ samba_cv_volatile=yes,samba_cv_volatile=no)])
+if test x"$samba_cv_volatile" = x"yes"; then
+ AC_DEFINE(HAVE_VOLATILE, 1, [Whether the C compiler understands volatile])
+fi