~mathiaz/+junk/ceph-new-pkg-review

« back to all changes in this revision

Viewing changes to configure.ac

  • Committer: Mathias Gug
  • Date: 2010-07-29 03:10:42 UTC
  • Revision ID: mathias.gug@canonical.com-20100729031042-n9n8kky962qb4onb
Import ceph_0.21-0ubuntu1 from https://launchpad.net/~clint-fewbar/+archive/ceph/+packages.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#                                               -*- Autoconf -*-
 
2
# Process this file with autoconf to produce a configure script.
 
3
 
 
4
# Autoconf
 
5
AC_PREREQ(2.59)
 
6
AC_INIT([Ceph distributed file system], [.1], 
 
7
              [Sage Weil <sage@newdream.net>],
 
8
              [ceph])
 
9
 
 
10
# Environment
 
11
AC_CANONICAL_HOST
 
12
AC_CANONICAL_TARGET
 
13
 
 
14
# Automake
 
15
AM_INIT_AUTOMAKE(ceph, 0.21)
 
16
AM_PROG_CC_C_O
 
17
AM_PROG_LIBTOOL
 
18
 
 
19
# Platform
 
20
case "${target_os}" in
 
21
darwin*)
 
22
        AC_DEFINE([DARWIN], [1], [Define if darwin/osx])
 
23
esac
 
24
 
 
25
# Checks for programs.
 
26
AC_PROG_CXX
 
27
#AC_PROG_CC
 
28
#AC_PROG_RANLIB
 
29
AC_PROG_MAKE_SET
 
30
AC_PROG_LIBTOOL
 
31
 
 
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]))
 
35
 
 
36
# debug crap?
 
37
AC_ARG_WITH([debug],
 
38
            [AS_HELP_STRING([--with-debug], [build extra debug binaries])],
 
39
            [with_debug=yes],
 
40
            [with_debug=no])
 
41
AM_CONDITIONAL(WITH_DEBUG, test "$with_debug" = "yes")
 
42
 
 
43
# radosgw?
 
44
AC_ARG_WITH([radosgw],
 
45
            [AS_HELP_STRING([--with-radosgw], [build RADOS gateway])],
 
46
            [],
 
47
            [with_radosgw=check])
 
48
RADOSGW=0
 
49
AS_IF([test "x$with_radosgw" != xno],
 
50
            [AC_CHECK_LIB([fcgi], [FCGX_Init],
 
51
             [AC_CHECK_LIB([expat], [XML_Parse],
 
52
              [RADOSGW=1],
 
53
              [if test "x$with_radosgw" != "xcheck"; then
 
54
                   AC_MSG_FAILURE([--with-radosgw was given but libexpat (libexpat1-dev on debian) not found])
 
55
              fi])
 
56
             ],
 
57
             [if test "x$with_radosgw" != "xcheck"; then
 
58
                AC_MSG_FAILURE([--with-radosgw was given but libfcgi (libfcgi-dev on debian) not found])
 
59
             fi])])
 
60
AM_CONDITIONAL(WITH_RADOSGW, test "$RADOSGW" = "1")
 
61
 
 
62
# fuse?
 
63
AC_ARG_WITH([fuse],
 
64
            [AS_HELP_STRING([--with-fuse], [use FUSE library for client])],
 
65
            [],
 
66
            [with_fuse=check])
 
67
LIBFUSE=
 
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])
 
73
               HAVE_LIBFUSE=1
 
74
              ],
 
75
             [if test "x$with_fuse" != xcheck; then
 
76
                 AC_MSG_FAILURE(
 
77
                   [--with-fuse was given but test failed])
 
78
               fi
 
79
             ])])
 
80
AM_CONDITIONAL(WITH_FUSE, [test "$HAVE_LIBFUSE" = "1"])
 
81
 
 
82
# jni?
 
83
AC_ARG_WITH([hadoop],
 
84
            [AS_HELP_STRING([--with-hadoop], [build hadoop client])],
 
85
            [],
 
86
            [with_hadoop=check])
 
87
AS_IF([test "x$with_hadoop" != xno],
 
88
            [AC_CHECK_HEADER([jni.h],
 
89
             [HAVE_JNI=1],
 
90
             [if test "x$with_hadoop" != xcheck; then
 
91
                 AC_MSG_FAILURE(
 
92
                   [--with-hadoop was given but jni.h not found])
 
93
               fi
 
94
             ])])
 
95
AM_CONDITIONAL(WITH_HADOOPCLIENT, [test "$HAVE_JNI" = "1"])
 
96
 
 
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])],
 
101
            [],
 
102
            [with_libatomic_ops=check])
 
103
AS_IF([test "x$with_libatomic_ops" != xno],
 
104
            [AC_CHECK_HEADER([atomic_ops.h],
 
105
             [HAVE_ATOMIC_OPS=1],
 
106
             [if test "x$with_libatomic_ops" != xcheck; then
 
107
                 AC_MSG_FAILURE(
 
108
                   [--with-libatomic-ops was given but atomic_ops.h not found])
 
109
               fi
 
110
             ])])
 
111
AS_IF([test "$HAVE_ATOMIC_OPS" = "1"],
 
112
        [],
 
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"])
 
115
 
 
116
# newsyn?  requires mpi.
 
117
#AC_ARG_WITH([newsyn],
 
118
#            [AS_HELP_STRING([--with-newsyn], [build newsyn target requires mpi])],
 
119
#            [],
 
120
#            [with_newsyn=no])
 
121
 
 
122
# Checks for header files.
 
123
AC_HEADER_DIRENT
 
124
AC_HEADER_STDC
 
125
AC_HEADER_SYS_WAIT
 
126
 
 
127
# spirit?
 
128
AC_LANG([C++])
 
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)])])
 
133
 
 
134
AC_LANG([C])
 
135
 
 
136
AC_CHECK_HEADER([histedit.h],
 
137
        [],
 
138
        [AC_MSG_ERROR([Sorry you need histedit.h (libedit-dev on debian)])])
 
139
 
 
140
AC_CHECK_HEADER([openssl/md5.h],
 
141
        [],
 
142
        [AC_MSG_ERROR([Sorry you need openssl dev files (libssl-dev on debian)])])
 
143
 
 
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])
 
145
 
 
146
# sync_file_range
 
147
AC_CHECK_FUNC([sync_file_range],
 
148
        [AC_DEFINE([HAVE_SYNC_FILE_RANGE], [], [sync_file_range(2) is supported])],
 
149
        [])
 
150
 
 
151
# Checks for typedefs, structures, and compiler characteristics.
 
152
#AC_HEADER_STDBOOL
 
153
#AC_C_CONST
 
154
#AC_TYPE_UID_T
 
155
#AC_C_INLINE
 
156
#AC_TYPE_INT16_T
 
157
#AC_TYPE_INT32_T
 
158
#AC_TYPE_INT64_T
 
159
#AC_TYPE_INT8_T
 
160
#AC_TYPE_MODE_T
 
161
#AC_TYPE_OFF_T
 
162
#AC_TYPE_PID_T
 
163
#AC_TYPE_SIZE_T
 
164
#AC_TYPE_SSIZE_T
 
165
#AC_CHECK_MEMBERS([struct stat.st_blksize])
 
166
#AC_STRUCT_ST_BLOCKS
 
167
#AC_CHECK_MEMBERS([struct stat.st_rdev])
 
168
#AC_HEADER_TIME
 
169
#AC_STRUCT_TM
 
170
#AC_TYPE_UINT16_T
 
171
#AC_TYPE_UINT32_T
 
172
#AC_TYPE_UINT64_T
 
173
#AC_TYPE_UINT8_T
 
174
 
 
175
# Checks for library functions.
 
176
#AC_FUNC_CHOWN
 
177
#AC_FUNC_CLOSEDIR_VOID
 
178
#AC_FUNC_ERROR_AT_LINE
 
179
#AC_FUNC_FORK
 
180
#AC_PROG_GCC_TRADITIONAL
 
181
#AC_FUNC_LSTAT
 
182
#AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK
 
183
#AC_FUNC_MALLOC   # this causes annoying rpl_malloc error on some machines; skip it
 
184
#AC_FUNC_MEMCMP
 
185
#AC_FUNC_MMAP
 
186
#AC_FUNC_REALLOC
 
187
#AC_FUNC_SELECT_ARGTYPES
 
188
#AC_TYPE_SIGNAL
 
189
#AC_FUNC_STAT
 
190
#AC_FUNC_UTIME_NULL
 
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])
 
192
 
 
193
AC_CONFIG_HEADERS([src/acconfig.h])
 
194
AC_CONFIG_FILES([Makefile
 
195
        src/Makefile
 
196
        man/Makefile
 
197
        ceph.spec])
 
198
AC_OUTPUT
 
199