Mercurial > hg > nginx-mail
comparison auto/lib/libatomic/conf @ 665:0b460e61bdcd default tip
Merge with nginx 1.0.0.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Mon, 25 Apr 2011 04:22:17 +0400 |
parents | 25255878df91 |
children |
comparison
equal
deleted
inserted
replaced
572:06419a2298a9 | 665:0b460e61bdcd |
---|---|
1 | |
2 # Copyright (C) Igor Sysoev | |
3 | |
4 | |
5 if [ $NGX_LIBATOMIC != YES ]; then | |
6 | |
7 have=NGX_HAVE_LIBATOMIC . auto/have | |
8 CORE_INCS="$CORE_INCS $NGX_LIBATOMIC/src" | |
9 LINK_DEPS="$LINK_DEPS $NGX_LIBATOMIC/src/libatomic_ops.a" | |
10 CORE_LIBS="$CORE_LIBS $NGX_LIBATOMIC/src/libatomic_ops.a" | |
11 | |
12 else | |
13 | |
14 ngx_feature="atomic_ops library" | |
15 ngx_feature_name=NGX_HAVE_LIBATOMIC | |
16 ngx_feature_run=yes | |
17 ngx_feature_incs="#define AO_REQUIRE_CAS | |
18 #include <atomic_ops.h>" | |
19 ngx_feature_path= | |
20 ngx_feature_libs="-latomic_ops" | |
21 ngx_feature_test="long n = 0; | |
22 if (!AO_compare_and_swap(&n, 0, 1)) | |
23 return 1; | |
24 if (AO_fetch_and_add(&n, 1) != 1) | |
25 return 1; | |
26 if (n != 2) | |
27 return 1; | |
28 AO_nop();" | |
29 . auto/feature | |
30 | |
31 if [ $ngx_found = yes ]; then | |
32 CORE_LIBS="$CORE_LIBS $ngx_feature_libs" | |
33 else | |
34 | |
35 cat << END | |
36 | |
37 $0: error: libatomic_ops library was not found. | |
38 | |
39 END | |
40 exit 1 | |
41 fi | |
42 fi |