mirror of
https://github.com/samba-team/samba.git
synced 2025-01-22 22:04:08 +03:00
r968: use sinlcude() and no function, that's more portable between
autoconf versions metze
This commit is contained in:
parent
2d109074e8
commit
9fa83ca022
8
source/aclocal.m4
vendored
8
source/aclocal.m4
vendored
@ -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)
|
||||
|
@ -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 #######################################################
|
||||
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
|
||||
|
||||
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
|
||||
|
||||
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
|
||||
|
||||
# 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 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)
|
||||
|
||||
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_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)
|
||||
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
|
||||
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
|
||||
])
|
||||
AC_C_CONST
|
||||
AC_C_INLINE
|
||||
|
@ -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
|
||||
|
@ -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 ])
|
||||
|
||||
])
|
||||
|
@ -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
|
||||
|
@ -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],
|
||||
[
|
||||
|
||||
])
|
||||
|
@ -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 Add #include for broken IRIX header files
|
||||
case "$host_os" in
|
||||
*irix6*) AC_ADD_INCLUDE(<standards.h>)
|
||||
;;
|
||||
esac
|
||||
|
||||
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_C_BIGENDIAN
|
||||
AC_HEADER_STDC
|
||||
|
||||
AC_HEADER_STDC
|
||||
AC_CHECK_HEADERS(stdbool.h)
|
||||
|
||||
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)
|
||||
|
||||
])
|
||||
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)
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user