r968: use sinlcude() and no function, that's more portable between
authorStefan Metzmacher <metze@samba.org>
Tue, 1 Jun 2004 15:56:22 +0000 (15:56 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 17:56:24 +0000 (12:56 -0500)
autoconf versions

metze

source/aclocal.m4
source/build/smb_build/check_cc.m4
source/build/smb_build/check_ld.m4
source/build/smb_build/check_path.m4
source/build/smb_build/check_perl.m4
source/build/smb_build/check_shld.m4
source/build/smb_build/check_types.m4
source/build/smb_build/env.m4
source/configure.in

index e63ee54d8de5b3815fe11dbb1667b561a28fd7ab..c3c721bf2ba31d6a964ce59260e9914aeb1ef837 100644 (file)
@@ -3,6 +3,7 @@ dnl if the cache file is inconsistent with the current host,
 dnl target and build system types, execute CMD or print a default
 dnl error message.
 AC_DEFUN(AC_VALIDATE_CACHE_SYSTEM_TYPE, [
+    AC_REQUIRE([AC_CANONICAL_TARGET])
     AC_MSG_CHECKING([config.cache system type])
     if { test x"${ac_cv_host_system_type+set}" = x"set" &&
          test x"$ac_cv_host_system_type" != x"$host"; } ||
@@ -561,10 +562,3 @@ fi
 
 sinclude(build/smb_build/public.m4)
 sinclude(build/smb_build/core.m4)
-sinclude(build/smb_build/env.m4)
-sinclude(build/smb_build/check_path.m4)
-sinclude(build/smb_build/check_perl.m4)
-sinclude(build/smb_build/check_cc.m4)
-sinclude(build/smb_build/check_ld.m4)
-sinclude(build/smb_build/check_shld.m4)
-sinclude(build/smb_build/check_types.m4)
index 0a430a4fcfa2ddd9caf80978d3afca620ca5198d..098c089642f5ef634478da20a8ef5438287e6c8d 100644 (file)
@@ -4,70 +4,55 @@ dnl  Copyright (C) Stefan (metze) Metzmacher 2004
 dnl  Released under the GNU GPL
 dnl -------------------------------------------------------
 dnl
-dnl _SMB_BUILD_CHECK_CC(
-dnl            1:dummy
-dnl            )
 
-dnl #######################################################
-dnl ### And now the implementation                     ###
-dnl #######################################################
-
-dnl _SMB_BUILD_CHECK_CC(
-dnl            1:dummy
-dnl            )
-AC_DEFUN([_SMB_BUILD_CHECK_CC],
-[
-       AC_PROG_CC
-       if test x"$CC" = x""; then
-               AC_MSG_WARN([No c compiler was not found!])
-               AC_MSG_ERROR([Please Install gcc from http://gcc.gnu.org/])
-       fi
-
-       AC_PROG_CC_STDC
-
-       # compile with optimization and without debugging by default, but
-       # allow people to set their own preference.
-       if test "x$CFLAGS" = x; then
-               CFLAGS="-O ${CFLAGS}"
-       fi
-
-       dnl needed before AC_TRY_COMPILE
-       AC_ISC_POSIX
-
-       dnl Check if C compiler understands -c and -o at the same time
-       AC_PROG_CC_C_O
-       if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = no"; then
-               BROKEN_CC=
+AC_PROG_CC
+if test x"$CC" = x""; then
+       AC_MSG_WARN([No c compiler was not found!])
+       AC_MSG_ERROR([Please Install gcc from http://gcc.gnu.org/])
+fi
+
+AC_PROG_CC_STDC
+
+# compile with optimization and without debugging by default, but
+# allow people to set their own preference.
+if test "x$CFLAGS" = x; then
+       CFLAGS="-O ${CFLAGS}"
+fi
+
+dnl needed before AC_TRY_COMPILE
+AC_ISC_POSIX
+
+dnl Check if C compiler understands -c and -o at the same time
+AC_PROG_CC_C_O
+if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = no"; then
+       BROKEN_CC=
+else
+       BROKEN_CC=#
+fi
+AC_SUBST(BROKEN_CC)
+
+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
+               samba_cv_precompiled_headers=yes
        else
-               BROKEN_CC=#
-       fi
-       AC_SUBST(BROKEN_CC)
-
-       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
-                       samba_cv_precompiled_headers=yes
-               else
-                       samba_cv_precompiled_headers=no
-               fi])
-       PCH_AVAILABLE="#"
-       if test x"$samba_cv_precompiled_headers" = x"yes"; then
-               PCH_AVAILABLE=""
-       fi
-       AC_SUBST(PCH_AVAILABLE)
-
-
-       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
-
-       AC_C_CONST
-       AC_C_INLINE
-
-       AC_PROG_CPP
-])
+               samba_cv_precompiled_headers=no
+       fi])
+PCH_AVAILABLE="#"
+if test x"$samba_cv_precompiled_headers" = x"yes"; then
+       PCH_AVAILABLE=""
+fi
+AC_SUBST(PCH_AVAILABLE)
+
+
+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
+
+AC_C_CONST
+AC_C_INLINE
index 94311e02de34e10dc548b34120fa466bfc3fb00f..79a8432d11b2aacf970d41c6f69cdf2a5184f29f 100644 (file)
@@ -4,20 +4,6 @@ dnl  Copyright (C) Stefan (metze) Metzmacher 2004
 dnl  Released under the GNU GPL
 dnl -------------------------------------------------------
 dnl
-dnl _SMB_BUILD_CHECK_LD(
-dnl            1:dummy
-dnl            )
-
-dnl #######################################################
-dnl ### And now the implementation                     ###
-dnl #######################################################
-
-dnl _SMB_BUILD_CHECK_LD(
-dnl            1:dummy
-dnl            )
-AC_DEFUN([_SMB_BUILD_CHECK_LD],
-[
-       dnl Check if we use GNU ld
-       AC_PATH_PROG(LD, ld)
-       AC_PROG_LD_GNU
-])
+dnl Check if we use GNU ld
+AC_PATH_PROG(LD, ld)
+AC_PROG_LD_GNU
index 316df59f31059e032d681a3583b9f35d5b818d93..8ec67eab3a5dabfd929c3d2541529a82b138db03 100644 (file)
@@ -4,19 +4,7 @@ dnl  Copyright (C) Stefan (metze) Metzmacher 2004
 dnl  Released under the GNU GPL
 dnl -------------------------------------------------------
 dnl
-dnl _SMB_BUILD_CHECK_PATH(
-dnl            1:dummy
-dnl            )
-
-dnl #######################################################
-dnl ### And now the implementation                     ###
-dnl #######################################################
-
-dnl _SMB_BUILD_CHECK_PATH(
-dnl            1:dummy
-dnl            )
-AC_DEFUN([_SMB_BUILD_CHECK_PATH],
-[
+
 #################################################
 # Directory handling stuff to support both the
 # legacy SAMBA directories and FHS compliant
@@ -185,5 +173,3 @@ AC_ARG_WITH(static-modules,
                eval SMB_MODULE_$i=STATIC
        done
 fi ])
-
-])
index ff43650b3ef47c551fd83db6232adce0d93b46c1..5f5f614f84315b2be67f41139353d838453d3c36 100644 (file)
@@ -4,25 +4,12 @@ dnl  Copyright (C) Stefan (metze) Metzmacher 2004
 dnl  Released under the GNU GPL
 dnl -------------------------------------------------------
 dnl
-dnl _SMB_BUILD_CHECK_PERL(
-dnl            1:dummy
-dnl            )
 
-dnl #######################################################
-dnl ### And now the implementation                     ###
-dnl #######################################################
-
-dnl _SMB_BUILD_CHECK_PERL(
-dnl            1:dummy
-dnl            )
-AC_DEFUN([_SMB_BUILD_CHECK_PERL],
-[
-       AC_PATH_PROG(PERL, perl)
-       if test x"$PERL" = x""; then
-               AC_MSG_WARN([No version of perl was not found!])
-               AC_MSG_ERROR([Please Install perl from http://www.perl.com/])
-       fi
-       if test x"$debug" = x"yes";then
-               PERL="$PERL -W"
-       fi
-])
+AC_PATH_PROG(PERL, perl)
+if test x"$PERL" = x""; then
+       AC_MSG_WARN([No version of perl was not found!])
+       AC_MSG_ERROR([Please Install perl from http://www.perl.com/])
+fi
+if test x"$debug" = x"yes";then
+       PERL="$PERL -W"
+fi
index ffeb2ca1cf73f91a25cd86607c385a0430917b26..de43aa02984f07eadd2b2f4ba9144308ef8c350d 100644 (file)
@@ -4,18 +4,3 @@ dnl  Copyright (C) Stefan (metze) Metzmacher 2004
 dnl  Released under the GNU GPL
 dnl -------------------------------------------------------
 dnl
-dnl _SMB_BUILD_CHECK_SHLD(
-dnl            1:dummy
-dnl            )
-
-dnl #######################################################
-dnl ### And now the implementation                     ###
-dnl #######################################################
-
-dnl _SMB_BUILD_CHECK_SHLD(
-dnl            1:dummy
-dnl            )
-AC_DEFUN([_SMB_BUILD_CHECK_SHLD],
-[
-
-])
index 40d00fa8206276f366ca066feb57d2890abfbc68..b4c7b5ed1cd626f9edbf5a24ad24ced1f2ee634b 100644 (file)
@@ -4,53 +4,36 @@ dnl  Copyright (C) Stefan (metze) Metzmacher 2004
 dnl  Released under the GNU GPL
 dnl -------------------------------------------------------
 dnl
-dnl _SMB_BUILD_CHECK_TYPES(
-dnl            1:dummy
-dnl            )
 
-dnl #######################################################
-dnl ### And now the implementation                     ###
-dnl #######################################################
-
-dnl _SMB_BUILD_CHECK_TYPES(
-dnl            1:dummy
-dnl            )
-AC_DEFUN([_SMB_BUILD_CHECK_TYPES],
-[
-       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
-
-       dnl This should be removed and fixed cleanly --metze
-       _AC_INCLUDES_DEFAULT_REQUIREMENTS
-
-       AC_CHECK_HEADERS(stdbool.h)
-
-       AC_CHECK_SIZEOF(short,cross)
-       AC_CHECK_SIZEOF(int,cross)
-       AC_CHECK_SIZEOF(long,cross)
-       AC_CHECK_SIZEOF(long long,cross)
-       if test x"$ac_cv_type_long_long" != x"yes";then
-               AC_MSG_ERROR([Sorry we need type 'long long'])
-       fi
-       if test $ac_cv_sizeof_long_long -lt 8;then
-               AC_MSG_ERROR([Sorry we need sizeof(long long) >= 8])
-       fi
-       AC_CHECK_TYPE(_Bool)
-       AC_CHECK_TYPE(uint_t, unsigned int)
-       AC_CHECK_TYPE(int8_t, signed char)
-       AC_CHECK_TYPE(uint8_t, unsigned char)
-       AC_CHECK_TYPE(int16_t, short)
-       AC_CHECK_TYPE(uint16_t, unsigned short)
-       AC_CHECK_TYPE(int32_t, long)
-       AC_CHECK_TYPE(uint32_t, unsigned long)
-       AC_CHECK_TYPE(int64_t, long long)
-       AC_CHECK_TYPE(uint64_t, unsigned long long)
-
-])
+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(stdbool.h)
+
+AC_CHECK_SIZEOF(short,cross)
+AC_CHECK_SIZEOF(int,cross)
+AC_CHECK_SIZEOF(long,cross)
+AC_CHECK_SIZEOF(long long,cross)
+if test x"$ac_cv_type_long_long" != x"yes";then
+       AC_MSG_ERROR([Sorry we need type 'long long'])
+fi
+if test $ac_cv_sizeof_long_long -lt 8;then
+       AC_MSG_ERROR([Sorry we need sizeof(long long) >= 8])
+fi
+AC_CHECK_TYPE(_Bool)
+AC_CHECK_TYPE(uint_t, unsigned int)
+AC_CHECK_TYPE(int8_t, signed char)
+AC_CHECK_TYPE(uint8_t, unsigned char)
+AC_CHECK_TYPE(int16_t, short)
+AC_CHECK_TYPE(uint16_t, unsigned short)
+AC_CHECK_TYPE(int32_t, long)
+AC_CHECK_TYPE(uint32_t, unsigned long)
+AC_CHECK_TYPE(int64_t, long long)
+AC_CHECK_TYPE(uint64_t, unsigned long long)
index ef9aa5e514ea8e877f7b1838c3d3f4851590739a..ec2b18a6ba1109b890fe590305c99443ebe40ff0 100644 (file)
@@ -4,39 +4,15 @@ dnl  Copyright (C) Stefan (metze) Metzmacher 2004
 dnl  Released under the GNU GPL
 dnl -------------------------------------------------------
 dnl
-dnl _SMB_BUILD_ENV(
-dnl            1:dummy
-dnl            )
 
-dnl #######################################################
-dnl ### And now the implementation                     ###
-dnl #######################################################
+SMB_VERSION_STRING=`cat include/version.h | grep 'SAMBA_VERSION_OFFICIAL_STRING' | cut -d '"' -f2`
+echo "SAMBA VERSION: ${SMB_VERSION_STRING}"
 
-dnl _SMB_BUILD_ENV(
-dnl            1:dummy
-dnl            )
-AC_DEFUN([_SMB_BUILD_ENV],
-[
-       SMB_VERSION_STRING=`cat include/version.h | grep 'SAMBA_VERSION_OFFICIAL_STRING' | cut -d '"' -f2`
-       echo "SAMBA VERSION: ${SMB_VERSION_STRING}"
+AC_VALIDATE_CACHE_SYSTEM_TYPE
 
-       _SMB_BUILD_CHECK_PATH([])
-
-       _SMB_BUILD_CHECK_PERL([])
-
-       _SMB_BUILD_CHECK_CC([])
-
-       _SMB_BUILD_CHECK_LD([])
-
-       _SMB_BUILD_CHECK_SHLD([])
-
-       AC_CANONICAL_BUILD
-       AC_CANONICAL_HOST
-       AC_CANONICAL_TARGET
-       
-       AC_VALIDATE_CACHE_SYSTEM_TYPE
-
-       _SMB_BUILD_CHECK_TYPES([])
-
-       AC_PROG_INSTALL
-])
+sinclude(build/smb_build/check_path.m4)
+sinclude(build/smb_build/check_perl.m4)
+sinclude(build/smb_build/check_cc.m4)
+sinclude(build/smb_build/check_ld.m4)
+sinclude(build/smb_build/check_shld.m4)
+sinclude(build/smb_build/check_types.m4)
index 5e4313093cb857dc76c4c465d36fbc20321113cb..4a1fd7a7bfe9319cefcfbc9c598b995e5118ecda 100644 (file)
@@ -7,7 +7,7 @@ dnl AC_PREREQ(2.53)
 AC_INIT(include/includes.h)
 AC_CONFIG_HEADER(include/config.h)
 
-SMB_ENV_CHECK([])
+sinclude(build/smb_build/env.m4)
 
 SMB_INCLUDE_M4(build/m4/rewrite.m4)