diff options
author | Sergey Kandaurov <pluknet@nginx.com> | 2017-09-27 18:34:23 +0300 |
---|---|---|
committer | Sergey Kandaurov <pluknet@nginx.com> | 2017-09-27 18:34:23 +0300 |
commit | aac0f06f3d548cf02107687d637c25e54b186b68 (patch) | |
tree | 110f7fbada2e93118d265d8b56a632bfc671dbc6 /auto/shmem | |
parent | 4f4647e1875e18cb24572add07f9438dbeb99caf (diff) | |
download | unit-aac0f06f3d548cf02107687d637c25e54b186b68.tar.gz unit-aac0f06f3d548cf02107687d637c25e54b186b68.tar.bz2 |
Better checking for shm_open() during configure.
Diffstat (limited to 'auto/shmem')
-rw-r--r-- | auto/shmem | 22 |
1 files changed, 15 insertions, 7 deletions
@@ -3,19 +3,13 @@ # Copyright (C) NGINX, Inc. -# Linux, FreeBSD, MacOSX +# FreeBSD, Solaris, MacOSX nxt_feature="shm_open()" nxt_feature_name=NXT_HAVE_SHM_OPEN nxt_feature_run=yes nxt_feature_incs= nxt_feature_libs= - -if [ "$NXT_SYSTEM" = "Linux" ]; then - nxt_feature_libs=-lrt - NXT_LIBRT=-lrt -fi - nxt_feature_test="#include <sys/mman.h> #include <fcntl.h> #include <sys/stat.h> @@ -37,6 +31,20 @@ nxt_feature_test="#include <sys/mman.h> . auto/feature +if [ $nxt_found = no ]; then + + # Linux and NetBSD 7.0 shm_open() are in librt. + + nxt_feature="shm_open() in librt" + nxt_feature_libs="-lrt" + . auto/feature + + if [ $nxt_found = yes ]; then + NXT_LIBRT=$nxt_feature_libs + fi +fi + + # Linux nxt_feature="memfd_create()" |