1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00

build: Remove configure checks for ctdb headers

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Michael Adam <obnox@samba.org>
This commit is contained in:
Amitay Isaacs 2014-10-10 14:25:34 +11:00 committed by Amitay Isaacs
parent 0d5ecaa2e3
commit e67c4b977a
4 changed files with 2 additions and 106 deletions

View File

@ -20,18 +20,11 @@
#include <tdb.h>
#include "cluster_support.h"
#ifdef HAVE_CTDB_H
#ifdef CLUSTER_SUPPORT
#include <ctdb.h>
#define CLUSTER_SUPPORT 1
#endif
#ifdef HAVE_CTDB_PROTOCOL_H
#include <ctdb_protocol.h>
#else
#ifdef HAVE_CTDB_PRIVATE_H
#include <ctdb_private.h>
#endif
#endif
bool cluster_support_available(void)
{
@ -53,15 +46,6 @@ const char *cluster_support_features(void)
#else
" NONE\n"
#endif
#ifdef HAVE_CTDB_H
_LINE_DEF(HAVE_CTDB_H)
#endif
#ifdef HAVE_CTDB_PRIVATE_H
_LINE_DEF(HAVE_CTDB_PRIVATE_H)
#endif
#ifdef HAVE_CTDB_PROTOCOL_H
_LINE_DEF(HAVE_CTDB_PROTOCOL_H)
#endif
#ifdef CTDB_SOCKET
_LINE_STR(CTDB_SOCKET)
#endif

View File

@ -23,11 +23,7 @@
#include <tdb.h>
#ifdef HAVE_CTDB_PROTOCOL_H
#include <ctdb_protocol.h>
#else
#include <ctdb_private.h>
#endif
#include "lib/async_req/async_sock.h"

View File

@ -25,11 +25,7 @@
#include "lib/util/tevent_unix.h"
#include "tdb.h"
#ifdef HAVE_CTDB_PROTOCOL_H
#include "ctdb_protocol.h"
#else
#include "ctdb_private.h"
#endif
#include "messages.h"

View File

@ -1488,89 +1488,9 @@ main() {
if not conf.env.USING_SYSTEM_TALLOC:
includes = includes + ' ' + srcdir + '/lib/talloc'
ok = conf.CHECK_CODE('''
#define NO_CONFIG_H
#include "replace.h"
#include "system/wait.h"
#include "system/network.h"
#define private #error __USED_RESERVED_WORD_private__
#include <talloc.h>
#include <tdb.h>
#include <ctdb.h>
int main(void)
{
return 0;
}
''',
'HAVE_CTDB_CHECK_CODE',
addmain=False,
includes=includes,
msg='Checking for header ctdb.h')
if ok:
CTDB_CFLAGS += ' -DHAVE_CTDB_H=1'
else:
have_cluster_support = False
ctdb_broken = "ctdb.h is required for cluster support"
conf.CONFIG_RESET('HAVE_CTDB_CHECK_CODE')
if have_cluster_support:
ok = conf.CHECK_CODE('''
#define NO_CONFIG_H
#include "replace.h"
#include "system/wait.h"
#include "system/network.h"
#define private #error __USED_RESERVED_WORD_private__
#include <talloc.h>
#include <tdb.h>
#include <ctdb.h>
#include <ctdb_private.h>
int main(void)
{
return 0;
}
''',
'HAVE_CTDB_CHECK_CODE',
addmain=False,
includes=includes,
msg='Checking for header ctdb_private.h')
if ok:
CTDB_CFLAGS += ' -DHAVE_CTDB_PRIVATE_H=1'
else:
have_cluster_support = False
ctdb_broken = "ctdb_private.h is required for cluster support"
conf.CONFIG_RESET('HAVE_CTDB_CHECK_CODE')
if have_cluster_support:
ok = conf.CHECK_CODE('''
#define NO_CONFIG_H
#include "replace.h"
#include "system/wait.h"
#include "system/network.h"
#define private #error __USED_RESERVED_WORD_private__
#include <talloc.h>
#include <tdb.h>
#include <ctdb.h>
#include <ctdb_protocol.h>
int main(void)
{
return 0;
}
''',
'HAVE_CTDB_CHECK_CODE',
addmain=False,
includes=includes,
msg='Checking for header ctdb_protocol.h')
if ok:
CTDB_CFLAGS += ' -DHAVE_CTDB_PROTOCOL_H=1'
conf.CONFIG_RESET('HAVE_CTDB_CHECK_CODE')
conf.undefine('HAVE_CTDB_CHECK_CODE')
if have_cluster_support:
Logs.info("building with cluster support")
conf.env['CTDB_CFLAGS'] = CTDB_CFLAGS
conf.env['CTDB_CFLAGS'] = '-DCLUSTER_SUPPORT=1'
conf.env['CTDB_INCLUDE'] = CTDB_INCLUDE
else:
if Options.options.with_cluster_support == False: