2008-01-28 02:12:20 +00:00
|
|
|
# -*- Autoconf -*-
|
|
|
|
# Process this file with autoconf to produce a configure script.
|
|
|
|
|
2008-03-05 20:28:22 +00:00
|
|
|
# Autoconf
|
2008-02-25 18:04:01 +00:00
|
|
|
AC_PREREQ(2.59)
|
2008-01-28 02:12:20 +00:00
|
|
|
AC_INIT([Ceph distributed file system], [.1],
|
|
|
|
[Sage Weil <sage@newdream.net>],
|
|
|
|
[ceph])
|
2008-03-05 20:28:22 +00:00
|
|
|
|
|
|
|
# Environment
|
|
|
|
AC_CANONICAL_HOST
|
|
|
|
AC_CANONICAL_TARGET
|
|
|
|
|
|
|
|
# Automake
|
2009-10-06 17:44:36 +00:00
|
|
|
AM_INIT_AUTOMAKE(ceph, 0.16.1)
|
2008-03-22 18:38:08 +00:00
|
|
|
AM_PROG_CC_C_O
|
2009-05-12 04:06:14 +00:00
|
|
|
AM_PROG_LIBTOOL
|
2008-01-28 02:12:20 +00:00
|
|
|
|
2008-03-05 20:28:22 +00:00
|
|
|
# Platform
|
|
|
|
case "${target_os}" in
|
|
|
|
darwin*)
|
|
|
|
AC_DEFINE([DARWIN], [1], [Define if darwin/osx])
|
|
|
|
esac
|
|
|
|
|
2008-01-28 02:12:20 +00:00
|
|
|
# Checks for programs.
|
|
|
|
AC_PROG_CXX
|
2008-03-22 18:38:08 +00:00
|
|
|
#AC_PROG_CC
|
2009-05-12 04:06:14 +00:00
|
|
|
#AC_PROG_RANLIB
|
2008-01-28 19:05:29 +00:00
|
|
|
AC_PROG_MAKE_SET
|
2009-05-12 04:06:14 +00:00
|
|
|
AC_PROG_LIBTOOL
|
2008-01-28 19:05:29 +00:00
|
|
|
|
2008-01-28 02:12:20 +00:00
|
|
|
# Checks for libraries.
|
2008-01-28 19:05:29 +00:00
|
|
|
AC_CHECK_LIB([m], [pow])
|
|
|
|
AC_CHECK_LIB([pthread], [pthread_create])
|
|
|
|
|
2008-07-11 00:12:34 +00:00
|
|
|
# debug crap?
|
|
|
|
AC_ARG_WITH([debug],
|
|
|
|
[AS_HELP_STRING([--with-debug], [build extra debug binaries])],
|
2008-10-31 18:52:25 +00:00
|
|
|
[with_debug=yes],
|
2008-07-11 04:21:37 +00:00
|
|
|
[with_debug=no])
|
2008-10-31 18:52:25 +00:00
|
|
|
AM_CONDITIONAL(WITH_DEBUG, test "$with_debug" = "yes")
|
2008-07-11 00:12:34 +00:00
|
|
|
|
2009-08-13 18:23:54 +00:00
|
|
|
# radosgw?
|
|
|
|
AC_ARG_WITH([radosgw],
|
|
|
|
[AS_HELP_STRING([--with-radosgw], [build RADOS gateway])],
|
|
|
|
[],
|
|
|
|
[with_radosgw=check])
|
2009-08-20 23:02:46 +00:00
|
|
|
RADOSGW=1
|
2009-08-13 18:23:54 +00:00
|
|
|
AS_IF([test "x$with_radosgw" != xno],
|
2009-07-09 23:28:18 +00:00
|
|
|
[AC_CHECK_LIB([fcgi], [FCGX_Init],
|
2009-09-16 17:34:04 +00:00
|
|
|
[true],
|
2009-09-25 15:43:03 +00:00
|
|
|
[RADOSGW=0
|
|
|
|
if test "x$with_radosgw" != "xcheck"; then
|
2009-09-25 16:06:30 +00:00
|
|
|
AC_MSG_FAILURE([--with-radosgw was given but libfcgi (libfcgi-dev on debian) not found])
|
2009-09-25 15:43:03 +00:00
|
|
|
fi])
|
2009-08-20 23:02:46 +00:00
|
|
|
AC_CHECK_LIB([expat], [XML_Parse],
|
2009-09-16 17:34:04 +00:00
|
|
|
[true],
|
2009-09-25 15:43:03 +00:00
|
|
|
[RADOSGW=0
|
|
|
|
if test "x$with_radosgw" != "xcheck"; then
|
2009-09-25 16:06:30 +00:00
|
|
|
AC_MSG_FAILURE([--with-radosgw was given but libexpat (libexpat1-dev on debian) not found])
|
2009-09-25 15:43:03 +00:00
|
|
|
fi])])
|
2009-08-20 23:02:46 +00:00
|
|
|
AM_CONDITIONAL(WITH_RADOSGW, test "$RADOSGW" = "1")
|
2009-07-09 23:28:18 +00:00
|
|
|
|
2008-01-28 19:05:29 +00:00
|
|
|
# fuse?
|
|
|
|
AC_ARG_WITH([fuse],
|
2008-01-28 19:39:51 +00:00
|
|
|
[AS_HELP_STRING([--with-fuse], [use FUSE library for client])],
|
2008-01-28 19:05:29 +00:00
|
|
|
[],
|
|
|
|
[with_fuse=check])
|
|
|
|
LIBFUSE=
|
|
|
|
AS_IF([test "x$with_fuse" != xno],
|
|
|
|
[AC_CHECK_LIB([fuse], [fuse_main],
|
|
|
|
[AC_SUBST([LIBFUSE], ["-lfuse"])
|
|
|
|
AC_DEFINE([HAVE_LIBFUSE], [1],
|
|
|
|
[Define if you have fuse])
|
|
|
|
HAVE_LIBFUSE=1
|
|
|
|
],
|
|
|
|
[if test "x$with_fuse" != xcheck; then
|
|
|
|
AC_MSG_FAILURE(
|
2009-09-25 16:06:30 +00:00
|
|
|
[--with-fuse was given but test failed])
|
2008-01-28 19:05:29 +00:00
|
|
|
fi
|
|
|
|
])])
|
|
|
|
AM_CONDITIONAL(WITH_FUSE, [test "$HAVE_LIBFUSE" = "1"])
|
|
|
|
|
2009-07-23 23:17:41 +00:00
|
|
|
# jni?
|
|
|
|
AC_ARG_WITH([hadoop],
|
|
|
|
[AS_HELP_STRING([--with-hadoop], [build hadoop client])],
|
|
|
|
[],
|
|
|
|
[with_hadoop=check])
|
|
|
|
AS_IF([test "x$with_hadoop" != xno],
|
|
|
|
[AC_CHECK_HEADER([jni.h],
|
|
|
|
[HAVE_JNI=1],
|
|
|
|
[if test "x$with_hadoop" != xcheck; then
|
|
|
|
AC_MSG_FAILURE(
|
2009-09-25 16:06:30 +00:00
|
|
|
[--with-hadoop was given but jni.h not found])
|
2009-07-23 23:17:41 +00:00
|
|
|
fi
|
|
|
|
])])
|
|
|
|
AM_CONDITIONAL(WITH_HADOOPCLIENT, [test "$HAVE_JNI" = "1"])
|
|
|
|
|
2008-01-28 19:05:29 +00:00
|
|
|
# CommonC++?
|
|
|
|
AC_ARG_WITH([ccgnu],
|
2008-01-28 19:39:51 +00:00
|
|
|
[AS_HELP_STRING([--with-ccgnu],
|
2008-01-28 19:05:29 +00:00
|
|
|
[use CommonC++ library for fast thread-safe reference counting])],
|
|
|
|
[],
|
|
|
|
[with_ccgnu=check])
|
|
|
|
LIBCCGNU2=
|
2008-05-02 18:47:52 +00:00
|
|
|
AS_IF([test "x$with_ccgnu" == xyes],
|
2008-01-28 19:05:29 +00:00
|
|
|
[AC_CHECK_LIB([ccgnu2], [main],
|
|
|
|
[AC_SUBST([LIBCCGNU2], ["-lccgnu2"])
|
|
|
|
AC_DEFINE([WITH_CCGNU], [1],
|
|
|
|
[Define if you have ccgnu])
|
2008-02-01 17:59:44 +00:00
|
|
|
LIBS="-lccgnu2 -ldl $LIBS"
|
2008-01-28 19:05:29 +00:00
|
|
|
],
|
|
|
|
[if test "x$with_ccgnu" != xcheck; then
|
|
|
|
AC_MSG_FAILURE(
|
2009-09-25 16:06:30 +00:00
|
|
|
[--with-ccgnu was given but test failed])
|
2008-01-28 19:05:29 +00:00
|
|
|
fi
|
|
|
|
], [-ldl -lpthread])])
|
|
|
|
AM_CONDITIONAL(WITH_CCGNU, test "WITH_CCGNU" = "1")
|
|
|
|
|
|
|
|
# newsyn? requires mpi.
|
2008-01-28 19:39:51 +00:00
|
|
|
#AC_ARG_WITH([newsyn],
|
2009-09-25 16:07:58 +00:00
|
|
|
# [AS_HELP_STRING([--with-newsyn], [build newsyn target requires mpi])],
|
2008-01-28 19:39:51 +00:00
|
|
|
# [],
|
|
|
|
# [with_newsyn=no])
|
2008-01-28 02:12:20 +00:00
|
|
|
|
|
|
|
# Checks for header files.
|
|
|
|
AC_HEADER_DIRENT
|
|
|
|
AC_HEADER_STDC
|
|
|
|
AC_HEADER_SYS_WAIT
|
2008-04-09 21:39:25 +00:00
|
|
|
|
|
|
|
# spirit?
|
|
|
|
AC_LANG([C++])
|
|
|
|
AC_DEFINE([HAVE_BOOST_SPIRIT_CORE_HPP], [], [Description])
|
|
|
|
AC_CHECK_HEADER([boost/spirit.hpp],
|
|
|
|
[AC_DEFINE([HAVE_BOOST_SPIRIT_CORE_HPP])],
|
2009-09-25 16:07:58 +00:00
|
|
|
[AC_MSG_ERROR([Sorry you need to install the Boost spirit parser library (libboost-dev on debian)])])
|
2008-04-09 21:39:25 +00:00
|
|
|
|
|
|
|
AC_LANG([C])
|
2009-03-17 17:26:16 +00:00
|
|
|
|
|
|
|
AC_CHECK_HEADER([histedit.h],
|
|
|
|
[],
|
2009-09-25 16:07:58 +00:00
|
|
|
[AC_MSG_ERROR([Sorry you need histedit.h (libedit-dev on debian)])])
|
2009-03-17 17:26:16 +00:00
|
|
|
|
2009-05-29 21:39:12 +00:00
|
|
|
AC_CHECK_HEADER([openssl/md5.h],
|
|
|
|
[],
|
2009-09-25 16:07:58 +00:00
|
|
|
[AC_MSG_ERROR([Sorry you need openssl dev files (libssl-dev on debian)])])
|
2009-05-29 21:39:12 +00:00
|
|
|
|
2009-03-04 00:45:58 +00:00
|
|
|
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])
|
2008-01-28 02:12:20 +00:00
|
|
|
|
|
|
|
# Checks for typedefs, structures, and compiler characteristics.
|
2009-03-04 00:45:58 +00:00
|
|
|
#AC_HEADER_STDBOOL
|
|
|
|
#AC_C_CONST
|
|
|
|
#AC_TYPE_UID_T
|
|
|
|
#AC_C_INLINE
|
|
|
|
#AC_TYPE_INT16_T
|
|
|
|
#AC_TYPE_INT32_T
|
|
|
|
#AC_TYPE_INT64_T
|
|
|
|
#AC_TYPE_INT8_T
|
|
|
|
#AC_TYPE_MODE_T
|
|
|
|
#AC_TYPE_OFF_T
|
|
|
|
#AC_TYPE_PID_T
|
|
|
|
#AC_TYPE_SIZE_T
|
|
|
|
#AC_TYPE_SSIZE_T
|
|
|
|
#AC_CHECK_MEMBERS([struct stat.st_blksize])
|
|
|
|
#AC_STRUCT_ST_BLOCKS
|
|
|
|
#AC_CHECK_MEMBERS([struct stat.st_rdev])
|
|
|
|
#AC_HEADER_TIME
|
|
|
|
#AC_STRUCT_TM
|
|
|
|
#AC_TYPE_UINT16_T
|
|
|
|
#AC_TYPE_UINT32_T
|
|
|
|
#AC_TYPE_UINT64_T
|
|
|
|
#AC_TYPE_UINT8_T
|
2008-01-28 02:12:20 +00:00
|
|
|
|
|
|
|
# Checks for library functions.
|
2008-03-13 02:36:54 +00:00
|
|
|
#AC_FUNC_CHOWN
|
|
|
|
#AC_FUNC_CLOSEDIR_VOID
|
|
|
|
#AC_FUNC_ERROR_AT_LINE
|
|
|
|
#AC_FUNC_FORK
|
|
|
|
#AC_PROG_GCC_TRADITIONAL
|
|
|
|
#AC_FUNC_LSTAT
|
|
|
|
#AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK
|
2008-02-01 17:59:44 +00:00
|
|
|
#AC_FUNC_MALLOC # this causes annoying rpl_malloc error on some machines; skip it
|
2008-03-13 02:36:54 +00:00
|
|
|
#AC_FUNC_MEMCMP
|
|
|
|
#AC_FUNC_MMAP
|
|
|
|
#AC_FUNC_REALLOC
|
|
|
|
#AC_FUNC_SELECT_ARGTYPES
|
|
|
|
#AC_TYPE_SIGNAL
|
|
|
|
#AC_FUNC_STAT
|
|
|
|
#AC_FUNC_UTIME_NULL
|
|
|
|
#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])
|
2008-01-28 02:12:20 +00:00
|
|
|
|
|
|
|
AC_CONFIG_HEADERS([src/acconfig.h])
|
|
|
|
AC_CONFIG_FILES([Makefile
|
2008-07-11 22:56:28 +00:00
|
|
|
src/Makefile
|
2009-03-10 21:39:54 +00:00
|
|
|
man/Makefile
|
2008-07-11 22:56:28 +00:00
|
|
|
ceph.spec])
|
2008-01-28 02:12:20 +00:00
|
|
|
AC_OUTPUT
|
|
|
|
|
|
|
|
AM_INIT_AUTOMAKE
|