2
# Process this file with autoconf to produce a configure script.
6
AC_INIT([Ceph distributed file system], [.1],
7
[Sage Weil <sage@newdream.net>],
15
AM_INIT_AUTOMAKE(ceph, 0.21)
20
case "${target_os}" in
22
AC_DEFINE([DARWIN], [1], [Define if darwin/osx])
25
# Checks for programs.
32
# Checks for libraries.
33
AC_CHECK_LIB([m], [pow], [true], AC_MSG_FAILURE([libm not found]))
34
AC_CHECK_LIB([pthread], [pthread_create], [true], AC_MSG_FAILURE([libpthread not found]))
38
[AS_HELP_STRING([--with-debug], [build extra debug binaries])],
41
AM_CONDITIONAL(WITH_DEBUG, test "$with_debug" = "yes")
44
AC_ARG_WITH([radosgw],
45
[AS_HELP_STRING([--with-radosgw], [build RADOS gateway])],
49
AS_IF([test "x$with_radosgw" != xno],
50
[AC_CHECK_LIB([fcgi], [FCGX_Init],
51
[AC_CHECK_LIB([expat], [XML_Parse],
53
[if test "x$with_radosgw" != "xcheck"; then
54
AC_MSG_FAILURE([--with-radosgw was given but libexpat (libexpat1-dev on debian) not found])
57
[if test "x$with_radosgw" != "xcheck"; then
58
AC_MSG_FAILURE([--with-radosgw was given but libfcgi (libfcgi-dev on debian) not found])
60
AM_CONDITIONAL(WITH_RADOSGW, test "$RADOSGW" = "1")
64
[AS_HELP_STRING([--with-fuse], [use FUSE library for client])],
68
AS_IF([test "x$with_fuse" != xno],
69
[AC_CHECK_LIB([fuse], [fuse_main],
70
[AC_SUBST([LIBFUSE], ["-lfuse"])
71
AC_DEFINE([HAVE_LIBFUSE], [1],
72
[Define if you have fuse])
75
[if test "x$with_fuse" != xcheck; then
77
[--with-fuse was given but test failed])
80
AM_CONDITIONAL(WITH_FUSE, [test "$HAVE_LIBFUSE" = "1"])
84
[AS_HELP_STRING([--with-hadoop], [build hadoop client])],
87
AS_IF([test "x$with_hadoop" != xno],
88
[AC_CHECK_HEADER([jni.h],
90
[if test "x$with_hadoop" != xcheck; then
92
[--with-hadoop was given but jni.h not found])
95
AM_CONDITIONAL(WITH_HADOOPCLIENT, [test "$HAVE_JNI" = "1"])
97
#libatomic-ops? You want it!
98
AC_ARG_WITH([libatomic-ops],
99
[AS_HELP_STRING([--with-libatomic-ops],
100
[use libatomic-ops to build Ceph's atomic_t type])],
102
[with_libatomic_ops=check])
103
AS_IF([test "x$with_libatomic_ops" != xno],
104
[AC_CHECK_HEADER([atomic_ops.h],
106
[if test "x$with_libatomic_ops" != xcheck; then
108
[--with-libatomic-ops was given but atomic_ops.h not found])
111
AS_IF([test "$HAVE_ATOMIC_OPS" = "1"],
113
AC_DEFINE([NO_ATOMIC_OPS], [1], [Defined if you don't have atomic_ops]))
114
AM_CONDITIONAL(WITH_LIBATOMIC, [test "$HAVE_ATOMIC_OPS" = "1"])
116
# newsyn? requires mpi.
117
#AC_ARG_WITH([newsyn],
118
# [AS_HELP_STRING([--with-newsyn], [build newsyn target requires mpi])],
122
# Checks for header files.
129
AC_DEFINE([HAVE_BOOST_SPIRIT_CORE_HPP], [], [Description])
130
AC_CHECK_HEADER([boost/spirit.hpp],
131
[AC_DEFINE([HAVE_BOOST_SPIRIT_CORE_HPP])],
132
[AC_MSG_ERROR([Sorry you need to install the Boost spirit parser library (libboost-dev on debian)])])
136
AC_CHECK_HEADER([histedit.h],
138
[AC_MSG_ERROR([Sorry you need histedit.h (libedit-dev on debian)])])
140
AC_CHECK_HEADER([openssl/md5.h],
142
[AC_MSG_ERROR([Sorry you need openssl dev files (libssl-dev on debian)])])
144
AC_CHECK_HEADERS([sys/xattr.h arpa/inet.h netdb.h netinet/in.h sys/file.h sys/ioctl.h sys/mount.h sys/param.h sys/socket.h sys/statvfs.h sys/time.h sys/vfs.h syslog.h utime.h])
147
AC_CHECK_FUNC([sync_file_range],
148
[AC_DEFINE([HAVE_SYNC_FILE_RANGE], [], [sync_file_range(2) is supported])],
151
# Checks for typedefs, structures, and compiler characteristics.
165
#AC_CHECK_MEMBERS([struct stat.st_blksize])
167
#AC_CHECK_MEMBERS([struct stat.st_rdev])
175
# Checks for library functions.
177
#AC_FUNC_CLOSEDIR_VOID
178
#AC_FUNC_ERROR_AT_LINE
180
#AC_PROG_GCC_TRADITIONAL
182
#AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK
183
#AC_FUNC_MALLOC # this causes annoying rpl_malloc error on some machines; skip it
187
#AC_FUNC_SELECT_ARGTYPES
191
#AC_CHECK_FUNCS([bzero fchdir fdatasync floor ftruncate getcwd gethostbyname gethostname gettimeofday inet_ntoa localtime_r memmove memset mkdir munmap pow rmdir select socket sqrt strcasecmp strchr strerror strstr utime])
193
AC_CONFIG_HEADERS([src/acconfig.h])
194
AC_CONFIG_FILES([Makefile