Igor Sysoev | 85dd8fc | 2008-03-18 10:36:27 +0000 | [diff] [blame] | 1 | |
| 2 | # Copyright (C) Igor Sysoev |
Maxim Konovalov | f8d59e3 | 2012-01-18 15:07:43 +0000 | [diff] [blame] | 3 | # Copyright (C) Nginx, Inc. |
Igor Sysoev | 85dd8fc | 2008-03-18 10:36:27 +0000 | [diff] [blame] | 4 | |
| 5 | |
| 6 | ngx_feature="Google perftools" |
| 7 | ngx_feature_name= |
| 8 | ngx_feature_run=no |
| 9 | ngx_feature_incs= |
| 10 | ngx_feature_path= |
| 11 | ngx_feature_libs="-lprofiler" |
| 12 | ngx_feature_test="ProfilerStop()" |
| 13 | . auto/feature |
| 14 | |
| 15 | |
| 16 | if [ $ngx_found = no ]; then |
| 17 | |
| 18 | # FreeBSD port |
| 19 | |
| 20 | ngx_feature="Google perftools in /usr/local/" |
| 21 | |
| 22 | if [ $NGX_RPATH = YES ]; then |
| 23 | ngx_feature_libs="-R/usr/local/lib -L/usr/local/lib -lprofiler" |
| 24 | else |
| 25 | ngx_feature_libs="-L/usr/local/lib -lprofiler" |
| 26 | fi |
| 27 | |
| 28 | . auto/feature |
| 29 | fi |
| 30 | |
| 31 | |
Ruslan Ermilov | 835ad6b | 2012-06-26 08:15:40 +0000 | [diff] [blame] | 32 | if [ $ngx_found = no ]; then |
| 33 | |
| 34 | # MacPorts |
| 35 | |
| 36 | ngx_feature="Google perftools in /opt/local/" |
| 37 | |
| 38 | if [ $NGX_RPATH = YES ]; then |
| 39 | ngx_feature_libs="-R/opt/local/lib -L/opt/local/lib -lprofiler" |
| 40 | else |
| 41 | ngx_feature_libs="-L/opt/local/lib -lprofiler" |
| 42 | fi |
| 43 | |
| 44 | . auto/feature |
| 45 | fi |
| 46 | |
| 47 | |
Igor Sysoev | 85dd8fc | 2008-03-18 10:36:27 +0000 | [diff] [blame] | 48 | if [ $ngx_found = yes ]; then |
| 49 | CORE_LIBS="$CORE_LIBS $ngx_feature_libs" |
Igor Sysoev | da85fe6 | 2009-05-26 14:28:49 +0000 | [diff] [blame] | 50 | |
| 51 | else |
| 52 | |
| 53 | cat << END |
| 54 | |
Maxim Dounin | 1efe4fa | 2014-04-30 19:16:30 +0400 | [diff] [blame] | 55 | $0: error: the Google perftools module requires the Google perftools |
Igor Sysoev | da85fe6 | 2009-05-26 14:28:49 +0000 | [diff] [blame] | 56 | library. You can either do not enable the module or install the library. |
| 57 | |
| 58 | END |
| 59 | |
| 60 | exit 1 |
Igor Sysoev | 85dd8fc | 2008-03-18 10:36:27 +0000 | [diff] [blame] | 61 | fi |