diff options
author | Ronnie Sahlberg <sahlberg@ronnie> | 2007-07-14 15:16:52 +1000 |
---|---|---|
committer | Ronnie Sahlberg <sahlberg@ronnie> | 2007-07-14 15:16:52 +1000 |
commit | e7738e9a4bde8c7803d84431fdd823122a70c814 (patch) | |
tree | d476120787c52e286c85cddbaa9e7348ea2dba90 | |
parent | 217142d1e97bab1289064640ad91265335818a7e (diff) | |
download | samba-e7738e9a4bde8c7803d84431fdd823122a70c814.tar.gz |
add some configure magic to make it configure and build properly on
linux and aix
(This used to be ctdb commit 6a422e53a60829c7c8d97e31e6ed14ee38cc2d2d)
-rw-r--r-- | ctdb/Makefile.in | 13 | ||||
-rw-r--r-- | ctdb/configure.ac | 20 |
2 files changed, 23 insertions, 10 deletions
diff --git a/ctdb/Makefile.in b/ctdb/Makefile.in index dbd650e6db4..9692241da1a 100644 --- a/ctdb/Makefile.in +++ b/ctdb/Makefile.in @@ -1,11 +1,4 @@ #!gmake -# -# Linux -CTDB_SYSTEM_OBJ = common/system_linux.o -SCSI_IO = bin/scsi_io -# AIX -#CTDB_SYSTEM_OBJ = common/system_aix.o -#PCAP_LIB = -lpcap CC = @CC@ prefix = @prefix@ @@ -35,14 +28,14 @@ CFLAGS=-g -I$(srcdir)/include -Iinclude -Ilib -Ilib/util -I$(srcdir) \ -DVARDIR=\"$(localstatedir)\" -DETCDIR=\"$(etcdir)\" \ -DUSE_MMAP=1 @CFLAGS@ $(POPT_CFLAGS) -LIB_FLAGS=@LDFLAGS@ -Llib @LIBS@ $(POPT_LIBS) @INFINIBAND_LIBS@ $(PCAP_LIB) +LIB_FLAGS=@LDFLAGS@ -Llib @LIBS@ $(POPT_LIBS) @INFINIBAND_LIBS@ @CTDB_PCAP_LDFLAGS@ UTIL_OBJ = lib/util/idtree.o lib/util/db_wrap.o lib/util/strlist.o lib/util/util.o \ lib/util/util_time.o lib/util/util_file.o CTDB_COMMON_OBJ = common/ctdb_io.o common/ctdb_util.o \ common/ctdb_ltdb.o common/ctdb_message.o common/cmdline.o \ - lib/util/debug.o $(CTDB_SYSTEM_OBJ) + lib/util/debug.o @CTDB_SYSTEM_OBJ@ CTDB_TCP_OBJ = tcp/tcp_connect.o tcp/tcp_io.o tcp/tcp_init.o @@ -58,7 +51,7 @@ CTDB_SERVER_OBJ = server/ctdbd.o server/ctdb_daemon.o server/ctdb_lockwait.o \ $(CTDB_CLIENT_OBJ) $(CTDB_TCP_OBJ) @INFINIBAND_WRAPPER_OBJ@ TEST_BINS=bin/ctdb_bench bin/ctdb_fetch bin/ctdb_store @INFINIBAND_BINS@ -BINS = bin/ctdb $(SCSI_IO) +BINS = bin/ctdb @CTDB_SCSI_IO@ SBINS = bin/ctdbd DIRS = lib bin diff --git a/ctdb/configure.ac b/ctdb/configure.ac index 86a70d157d5..63ebc28c91b 100644 --- a/ctdb/configure.ac +++ b/ctdb/configure.ac @@ -14,6 +14,23 @@ AC_DEFUN([SMB_ENABLE], [echo -n ""]) AC_INIT(ctdb.h) AC_CONFIG_SRCDIR([server/ctdbd.c]) +case `uname` in + Linux*) + CTDB_SYSTEM_OBJ=common/system_linux.o + CTDB_SCSI_IO=bin/scsi_io + CTDB_PCAP_LDFLAGS= + ;; + AIX*) + CTDB_SYSTEM_OBJ=common/system_aix.o + CTDB_SCSI_IO= + CTDB_PCAP_LDFLAGS=-lpcap + ;; + *) + echo unknown system cant configure + exit + ;; +esac + AC_LIBREPLACE_ALL_CHECKS if test "$ac_cv_prog_gcc" = yes; then @@ -44,5 +61,8 @@ if test x"$ctdb_cv_HAVE_SOCK_SIN_LEN" = x"yes"; then fi AC_SUBST(EXTRA_OBJ) +AC_SUBST(CTDB_SYSTEM_OBJ) +AC_SUBST(CTDB_SCSI_IO) +AC_SUBST(CTDB_PCAP_LDFLAGS) AC_OUTPUT(Makefile) |