svn commit: samba r18221 - in branches/SAMBA_4_0/source: build/m4 lib/replace

tridge at samba.org tridge at samba.org
Thu Sep 7 13:11:47 GMT 2006


Author: tridge
Date: 2006-09-07 13:11:47 +0000 (Thu, 07 Sep 2006)
New Revision: 18221

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=18221

Log:

moved more configure checks into lib/replace/

Modified:
   branches/SAMBA_4_0/source/build/m4/check_cc.m4
   branches/SAMBA_4_0/source/build/m4/check_types.m4
   branches/SAMBA_4_0/source/lib/replace/libreplace.m4


Changeset:
Modified: branches/SAMBA_4_0/source/build/m4/check_cc.m4
===================================================================
--- branches/SAMBA_4_0/source/build/m4/check_cc.m4	2006-09-07 12:40:29 UTC (rev 18220)
+++ branches/SAMBA_4_0/source/build/m4/check_cc.m4	2006-09-07 13:11:47 UTC (rev 18221)
@@ -23,63 +23,8 @@
 	CFLAGS="${CFLAGS} -g"
 fi
 
-dnl needed before AC_TRY_COMPILE
-AC_ISC_POSIX
 
-AC_C_INLINE
-
-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
-
 ############################################
-# check if the compiler can do immediate structures
-AC_CACHE_CHECK([for immediate structures],samba_cv_immediate_structures, [
-    AC_TRY_COMPILE([
-#include <stdio.h>],
-[
-   typedef struct {unsigned x;} FOOBAR;
-   #define X_FOOBAR(x) ((FOOBAR) { x })
-   #define FOO_ONE X_FOOBAR(1)
-   FOOBAR f = FOO_ONE;   
-   static struct {
-	FOOBAR y; 
-	} f2[] = {
-		{FOO_ONE}
-	};   
-],
-	samba_cv_immediate_structures=yes,samba_cv_immediate_structures=no)])
-if test x"$samba_cv_immediate_structures" = x"yes"; then
-   AC_DEFINE(HAVE_IMMEDIATE_STRUCTURES,1,[Whether the compiler supports immediate structures])
-fi
-AC_SUBST(samba_cv_immediate_structures)
-
-############################################
-# check if the compiler handles c99 struct initialization
-LIBREPLACE_C99_STRUCT_INIT(samba_cv_c99_struct_initialization=yes,
-		    samba_cv_c99_struct_initialization=no)
-
-if test x"$samba_cv_c99_struct_initialization" != x"yes"; then
-	AC_MSG_WARN([C compiler does not support c99 struct initialization!])
-	AC_MSG_ERROR([Please Install gcc from http://gcc.gnu.org/])
-fi
-
-############################################
 # check if the compiler can handle negative enum values
 # and don't truncate the values to INT_MAX
 # a runtime test is needed here

Modified: branches/SAMBA_4_0/source/build/m4/check_types.m4
===================================================================
--- branches/SAMBA_4_0/source/build/m4/check_types.m4	2006-09-07 12:40:29 UTC (rev 18220)
+++ branches/SAMBA_4_0/source/build/m4/check_types.m4	2006-09-07 13:11:47 UTC (rev 18221)
@@ -5,16 +5,6 @@
 dnl -------------------------------------------------------
 dnl
 
-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_SIZEOF(short,cross)
 AC_CHECK_SIZEOF(int,cross)
 AC_CHECK_SIZEOF(long,cross)

Modified: branches/SAMBA_4_0/source/lib/replace/libreplace.m4
===================================================================
--- branches/SAMBA_4_0/source/lib/replace/libreplace.m4	2006-09-07 12:40:29 UTC (rev 18220)
+++ branches/SAMBA_4_0/source/lib/replace/libreplace.m4	2006-09-07 13:11:47 UTC (rev 18221)
@@ -1,4 +1,8 @@
+dnl needed before AC_TRY_COMPILE
+AC_ISC_POSIX
 
+AC_C_INLINE
+
 LIBREPLACE_C99_STRUCT_INIT([],[])
 
 dnl find the libreplace sources. This is meant to work both for 
@@ -16,6 +20,16 @@
 
 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 @@
 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



More information about the samba-cvs mailing list