Skip to content

Commit

Permalink
add compiler options for Sun Studio compilers with --enable-threads (…
Browse files Browse the repository at this point in the history
…Trond Norbye)

git-svn-id: http://code.sixapart.com/svn/memcached/trunk/server@702 b0b603af-a30f-0410-a34e-baf09ae79d0b
  • Loading branch information
dormando committed Feb 18, 2008
1 parent 00eb260 commit 6831dd7
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,18 @@ 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
#ifdef __SUNPRO_C
return 0;
#else
return 1;
#endif
])
],[
CFLAGS="-mt $CFLAGS"
])
else
AC_MSG_ERROR([Can't enable threads without the POSIX thread library.])
fi
Expand Down

0 comments on commit 6831dd7

Please sign in to comment.