summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorToru Maesaka <dev@torum.net>2008-04-28 17:05:59 +0900
committerToru Maesaka <dev@torum.net>2008-04-28 17:05:59 +0900
commita9dcd9aceb17ed502345742e77fd5d2cd89d9869 (patch)
treefd1c08012e96659b7c5e3e78ab48856cf9fb6e90 /configure.ac
parent3bc1b80e821fc5987ac9da0f5111620ef4cc5cc6 (diff)
downloadmemcached-a9dcd9aceb17ed502345742e77fd5d2cd89d9869.tar.gz
Code modified to only build and run under multi-threaded mode.
Macros for aliasing "do_" or "mt_" functions removed and "mt_" prefix stripped from the multi-thread wrappers, so that the core server can directly use them. configure.ac and server files modified to suit the changes.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac31
1 files changed, 13 insertions, 18 deletions
diff --git a/configure.ac b/configure.ac
index b31281a..5c7ae82 100644
--- a/configure.ac
+++ b/configure.ac
@@ -174,28 +174,23 @@ fi
AC_C_ENDIAN
-dnl Check whether the user wants threads or not
-AC_ARG_ENABLE(threads,
- [AS_HELP_STRING([--enable-threads],[support multithreaded execution])])
-if test "x$enable_threads" == "xyes"; then
- AC_SEARCH_LIBS(pthread_create, pthread)
- if test "x$ac_cv_search_pthread_create" != "xno"; then
- AC_DEFINE([USE_THREADS],,[Define this if you want to use pthreads])
- dnl Sun compilers need the -mt flag!
- AC_RUN_IFELSE(
- [AC_LANG_PROGRAM([], [dnl
+dnl Check whether the user's system supports pthread
+AC_SEARCH_LIBS(pthread_create, pthread)
+if test "x$ac_cv_search_pthread_create" != "xno"; then
+ dnl Sun compilers need the -mt flag!
+ AC_RUN_IFELSE(
+ [AC_LANG_PROGRAM([], [dnl
#ifdef __SUNPRO_C
- return 0;
+ return 0;
#else
- return 1;
+ return 1;
#endif
- ])
- ],[
- CFLAGS="-mt $CFLAGS"
])
- else
- AC_MSG_ERROR([Can't enable threads without the POSIX thread library.])
- fi
+ ],[
+ CFLAGS="-mt $CFLAGS"
+ ])
+else
+ AC_MSG_ERROR([Can't enable threads without the POSIX thread library.])
fi
AC_CHECK_FUNCS(mlockall)