~brianaker/libmemcached/1164440

« back to all changes in this revision

Viewing changes to configure.ac

Merge working tree with build tree.

Show diffs side-by-side

added added

removed removed

Lines of Context:
67
67
m4_include([m4/memcached_sasl.m4])
68
68
m4_include([m4/gearmand.m4])
69
69
m4_include([m4/libgearman.m4])
 
70
m4_include([memcached/version.m4])
70
71
 
71
72
AM_CONDITIONAL(BUILDING_LIBMEMCACHED, true)
72
73
AM_CONDITIONAL(HAVE_LIBMEMCACHED, false)
134
135
 
135
136
AC_CHECK_HEADERS([sys/sysctl.h])
136
137
 
 
138
AC_CHECK_HEADER(umem.h, [
 
139
   AC_DEFINE([HAVE_UMEM_H], 1,
 
140
         [Define this if you have umem.h])
 
141
   build_cache=no
 
142
], [build_cache=yes])
 
143
 
 
144
AM_CONDITIONAL([BUILD_CACHE], [test "x$build_cache" = "xyes"])
 
145
 
137
146
AX_COMPILER_VENDOR
138
147
 
139
148
AC_FUNC_ALLOCA
195
204
              ])
196
205
 
197
206
AC_CHECK_LIB([m], [floor])
 
207
AC_CHECK_FUNCS([sigignore])
198
208
 
199
209
AC_CHECK_HEADERS([atomic.h])
200
210
AS_IF([test "x$ac_cv_header_atomic_h" = "xyes"],[
214
224
AC_DEFINE([HAVE_MEMCACHED_LIGHT_BINARY], [1], [Support for memcached_light])
215
225
AC_DEFINE([MEMCACHED_LIGHT_BINARY], ["example/memcached_light"], [Support for memcached_light])
216
226
 
 
227
dnl Check for the requirements for running memcached with less privileges
 
228
dnl than the default privilege set. On Solaris we need setppriv and priv.h
 
229
dnl If you want to add support for other platforms you should check for
 
230
dnl your requirements, define HAVE_DROP_PRIVILEGES, and make sure you add
 
231
dnl the source file containing the implementation into memcached_SOURCE
 
232
dnl in Makefile.am
 
233
AC_CHECK_FUNCS(setppriv, [
 
234
   AC_CHECK_HEADER(priv.h, [
 
235
      AC_DEFINE([HAVE_DROP_PRIVILEGES], 1,
 
236
         [Define this if you have an implementation of drop_privileges()])
 
237
      build_solaris_privs=yes
 
238
   ], [])
 
239
],[])
 
240
 
217
241
AC_CHECK_HEADERS_ONCE(winsock2.h poll.h sys/wait.h fnmatch.h)
218
242
AM_CONDITIONAL(BUILD_POLL, test "x$ac_cv_header_poll_h" = "xno")
219
243
AM_CONDITIONAL(BUILD_WIN32_WRAPPERS, test "x$ac_cv_header_winsock2_h" = "xyes")
233
257
                  ])
234
258
AM_CONDITIONAL(HAVE_LIBEVENT, test "x${ax_cv_have_LIBEVENT}" = "xyes")
235
259
 
 
260
dnl Check if we're a little-endian or a big-endian system, needed by hash code
 
261
AC_DEFUN([AC_C_ENDIAN],
 
262
[AC_CACHE_CHECK(for endianness, ac_cv_c_endian,
 
263
[
 
264
  AC_RUN_IFELSE(
 
265
    [AC_LANG_PROGRAM([], [dnl
 
266
        long val = 1;
 
267
        char *c = (char *) &val;
 
268
        exit(*c == 1);
 
269
    ])
 
270
  ],[
 
271
    ac_cv_c_endian=big
 
272
  ],[
 
273
    ac_cv_c_endian=little
 
274
  ])
 
275
])
 
276
if test $ac_cv_c_endian = big; then
 
277
  AC_DEFINE(ENDIAN_BIG, 1, [machine is bigendian])
 
278
fi
 
279
if test $ac_cv_c_endian = little; then
 
280
  AC_DEFINE(ENDIAN_LITTLE, 1, [machine is littleendian])
 
281
fi
 
282
])
 
283
 
 
284
AC_C_ENDIAN
 
285
 
236
286
AC_CONFIG_FILES([
237
287
  Makefile
238
288
  docs/conf.py