[sheepdog] [PATCH v3 01/15] sheepfs: modify configure file to work with sheepfs

Liu Yuan namei.unix at gmail.com
Mon May 21 17:25:45 CEST 2012


From: Liu Yuan <tailai.ly at taobao.com>


Signed-off-by: Liu Yuan <tailai.ly at taobao.com>
---
 Makefile.am         |    2 +-
 configure.ac        |   13 +++++++++++++
 sheepfs/Makefile.am |   46 ++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 60 insertions(+), 1 deletion(-)
 create mode 100644 sheepfs/Makefile.am

diff --git a/Makefile.am b/Makefile.am
index c896316..80716e6 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -17,7 +17,7 @@ sheepdogsysconfdir	= ${SHEEPDOGCONFDIR}
 
 sheepdogsysconf_DATA	= 
 
-SUBDIRS			= lib collie sheep include script man tests
+SUBDIRS			= lib collie sheep sheepfs include script man tests
 
 install-exec-local:
 	$(INSTALL) -d $(DESTDIR)/${localstatedir}/lib/sheepdog
diff --git a/configure.ac b/configure.ac
index 50b5d9f..d3bd0eb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -125,6 +125,7 @@ AC_CHECK_FUNCS([alarm alphasort atexit bzero dup2 endgrent endpwent fcntl \
 AC_CONFIG_FILES([Makefile
 		collie/Makefile
 		sheep/Makefile
+		sheepfs/Makefile
 		include/Makefile
 		script/Makefile
 		lib/Makefile
@@ -208,6 +209,11 @@ AC_ARG_ENABLE([trace],
 	[ enable_trace="no" ],)
 AM_CONDITIONAL(BUILD_TRACE, test x$enable_trace = xyes)
 
+AC_ARG_ENABLE([sheepfs],
+	[  --enable-sheepfs         : enable sheepfs],,
+	[ enable_sheepfs="yes" ],)
+AM_CONDITIONAL(BUILD_SHEEPFS, test x$enable_sheepfs = xyes)
+
 CP=cp
 OS_LDL="-ldl"
 case "$host_os" in
@@ -285,6 +291,13 @@ if test "x${enable_trace}" = xyes; then
 	PACKAGE_FEATURES="$PACKAGE_FEATURES trace"
 fi
 
+if test "x${enable_sheepfs}" = xyes; then
+	PKG_CHECK_MODULES([fuse],[fuse])
+	AC_DEFINE_UNQUOTED([HAVE_SHEEPFS], 1, [have sheepfs])
+	PACKAGE_FEATURES="$PACKAGE_FEATURES sheepfs"
+fi
+
+
 # extra warnings
 EXTRA_WARNINGS=""
 
diff --git a/sheepfs/Makefile.am b/sheepfs/Makefile.am
new file mode 100644
index 0000000..0d4a42c
--- /dev/null
+++ b/sheepfs/Makefile.am
@@ -0,0 +1,46 @@
+#
+# Copyright 2010 Red Hat, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; see the file COPYING.  If not, write to
+# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+#
+
+MAINTAINERCLEANFILES	= Makefile.in
+
+AM_CFLAGS		=
+
+INCLUDES		= -I$(top_builddir)/include -I$(top_srcdir)/include
+
+sbin_PROGRAMS		= sheepfs
+
+sheepfs_SOURCES		=
+
+sheepfs_LDADD	  	= ../lib/libsheepdog.a
+sheepfs_DEPENDENCIES	= ../lib/libsheepdog.a
+
+noinst_HEADERS		=
+
+EXTRA_DIST		=
+
+lint:
+	-splint $(INCLUDES) $(LINT_FLAGS) $(CFLAGS) *.c
+
+all-local:
+	@echo Built sheepfs
+
+clean-local:
+	rm -f sheepfs *.o gmon.out *.da *.bb *.bbg
+
+# support for GNU Flymake
+check-syntax:
+	$(COMPILE) -fsyntax-only $(CHK_SOURCES)
-- 
1.7.10.2




More information about the sheepdog mailing list