summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2004-06-01 15:56:22 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:56:24 -0500
commitc6dfa0cc3dee62374bc1e5d6554fbcd1a8891a64 (patch)
tree755ed5c9bc89fbafa628e462a4b53e595495e9b3 /source4
parent9318fdbb3346da0374ab859055ea399dff86a861 (diff)
downloadsamba-c6dfa0cc3dee62374bc1e5d6554fbcd1a8891a64.tar.gz
samba-c6dfa0cc3dee62374bc1e5d6554fbcd1a8891a64.tar.bz2
samba-c6dfa0cc3dee62374bc1e5d6554fbcd1a8891a64.zip
r968: use sinlcude() and no function, that's more portable between
autoconf versions metze (This used to be commit 9fa83ca022f2ca2e9e5d3d738beefcf9f90cfcff)
Diffstat (limited to 'source4')
-rw-r--r--source4/aclocal.m48
-rw-r--r--source4/build/smb_build/check_cc.m4115
-rw-r--r--source4/build/smb_build/check_ld.m420
-rw-r--r--source4/build/smb_build/check_path.m416
-rw-r--r--source4/build/smb_build/check_perl.m429
-rw-r--r--source4/build/smb_build/check_shld.m415
-rw-r--r--source4/build/smb_build/check_types.m481
-rw-r--r--source4/build/smb_build/env.m442
-rw-r--r--source4/configure.in2
9 files changed, 105 insertions, 223 deletions
diff --git a/source4/aclocal.m4 b/source4/aclocal.m4
index e63ee54d8d..c3c721bf2b 100644
--- a/source4/aclocal.m4
+++ b/source4/aclocal.m4
@@ -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)
diff --git a/source4/build/smb_build/check_cc.m4 b/source4/build/smb_build/check_cc.m4
index 0a430a4fcf..098c089642 100644
--- a/source4/build/smb_build/check_cc.m4
+++ b/source4/build/smb_build/check_cc.m4
@@ -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
diff --git a/source4/build/smb_build/check_ld.m4 b/source4/build/smb_build/check_ld.m4
index 94311e02de..79a8432d11 100644
--- a/source4/build/smb_build/check_ld.m4
+++ b/source4/build/smb_build/check_ld.m4
@@ -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
diff --git a/source4/build/smb_build/check_path.m4 b/source4/build/smb_build/check_path.m4
index 316df59f31..8ec67eab3a 100644
--- a/source4/build/smb_build/check_path.m4
+++ b/source4/build/smb_build/check_path.m4
@@ -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 ])
-
-])
diff --git a/source4/build/smb_build/check_perl.m4 b/source4/build/smb_build/check_perl.m4
index ff43650b3e..5f5f614f84 100644
--- a/source4/build/smb_build/check_perl.m4
+++ b/source4/build/smb_build/check_perl.m4
@@ -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
diff --git a/source4/build/smb_build/check_shld.m4 b/source4/build/smb_build/check_shld.m4
index ffeb2ca1cf..de43aa0298 100644
--- a/source4/build/smb_build/check_shld.m4
+++ b/source4/build/smb_build/check_shld.m4
@@ -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],
-[
-
-])
diff --git a/source4/build/smb_build/check_types.m4 b/source4/build/smb_build/check_types.m4
index 40d00fa820..b4c7b5ed1c 100644
--- a/source4/build/smb_build/check_types.m4
+++ b/source4/build/smb_build/check_types.m4
@@ -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)
diff --git a/source4/build/smb_build/env.m4 b/source4/build/smb_build/env.m4
index ef9aa5e514..ec2b18a6ba 100644
--- a/source4/build/smb_build/env.m4
+++ b/source4/build/smb_build/env.m4
@@ -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)
diff --git a/source4/configure.in b/source4/configure.in
index 5e4313093c..4a1fd7a7bf 100644
--- a/source4/configure.in
+++ b/source4/configure.in
@@ -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)