title: AIO not found while compiling nginx
body: <p>I am trying to compile nginx on ubuntu and I am using the following config parameters:</p>
  
  <pre><code>./configure \
    --prefix=/usr/share/nginx \
    --conf-path=/etc/nginx/nginx.conf \
    --http-log-path=/var/log/nginx/access.log \
    --error-log-path=/var/log/nginx/error.log \
    --lock-path=/var/lock/nginx.lock \
    --pid-path=/run/nginx.pid \
    --http-client-body-temp-path=/var/lib/nginx/body \
    --http-fastcgi-temp-path=/var/lib/nginx/fastcgi \
    --http-proxy-temp-path=/var/lib/nginx/proxy \
    --http-scgi-temp-path=/var/lib/nginx/scgi \
    --http-uwsgi-temp-path=/var/lib/nginx/uwsgi \
    --with-debug \
    --with-pcre-jit \
    --with-http_ssl_module \
    --with-http_stub_status_module \
    --with-http_realip_module \
    --with-http_auth_request_module \
    --with-http_addition_module \
    --with-http_dav_module \
    --with-http_geoip_module \
    --with-http_gzip_static_module \
    --with-http_sub_module \
    --with-http_v2_module \
    --with-stream \
    --with-stream_ssl_module \
    --with-stream_ssl_preread_module \
    --with-threads \
    --with-file-aio \
    --without-mail_pop3_module \
    --without-mail_smtp_module \
    --without-mail_imap_module \
    --without-http_uwsgi_module \
    --without-http_scgi_module \
    --with-cc-opt='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic' \
    --add-module="$BUILD_PATH/ngx_devel_kit-$NDK_VERSION" \
    --add-module="$BUILD_PATH/set-misc-nginx-module-$SETMISC_VERSION" \
    --add-module="$BUILD_PATH/nginx-module-vts-$VTS_VERSION" \
    --add-module="$BUILD_PATH/lua-nginx-module-$LUA_VERSION" \
    --add-module="$BUILD_PATH/headers-more-nginx-module-$MORE_HEADERS_VERSION" \
    --add-module="$BUILD_PATH/nginx-goodies-nginx-sticky-module-ng-$STICKY_SESSIONS_VERSION" \
    --add-module="$BUILD_PATH/nginx-http-auth-digest-$NGINX_DIGEST_AUTH" \
    --add-module="$BUILD_PATH/ngx_http_substitutions_filter_module-$NGINX_SUBSTITUTIONS" \
    --add-module="$BUILD_PATH/lua-upstream-nginx-module-$LUA_UPSTREAM_VERSION" || exit 1 \
    &amp;&amp; make || exit 1 \
    &amp;&amp; make install || exit 1
  </code></pre>
  
  <p>Now, when I am trying to compile it, here is the error I am getting:</p>
  
  <pre><code>checking for gcc -pipe switch ... found
  checking for -Wl,-E switch ... not found
  checking for gcc builtin atomic operations ... not found
  checking for C99 variadic macros ... not found
  checking for gcc variadic macros ... not found
  checking for gcc builtin 64 bit byteswap ... not found
  checking for unistd.h ... found
  checking for inttypes.h ... found
  checking for limits.h ... found
  checking for sys/filio.h ... not found
  checking for sys/param.h ... found
  checking for sys/mount.h ... found
  checking for sys/statvfs.h ... found
  checking for crypt.h ... found
  checking for Linux specific features
  checking for epoll ... not found
  checking for O_PATH ... not found
  checking for sendfile() ... not found
  checking for sendfile64() ... not found
  checking for sys/prctl.h ... found
  checking for prctl(PR_SET_DUMPABLE) ... not found
  checking for sched_setaffinity() ... not found
  checking for crypt_r() ... not found
  checking for sys/vfs.h ... found
  checking for nobody group ... not found
  checking for nogroup group ... found
  checking for poll() ... not found
  checking for /dev/poll ... not found
  checking for kqueue ... not found
  checking for crypt() ... not found
  checking for crypt() in libcrypt ... not found
  checking for F_READAHEAD ... not found
  checking for posix_fadvise() ... not found
  checking for O_DIRECT ... not found
  checking for F_NOCACHE ... not found
  checking for directio() ... not found
  checking for statfs() ... not found
  checking for statvfs() ... not found
  checking for dlopen() ... not found
  checking for dlopen() in libdl ... not found
  checking for sched_yield() ... not found
  checking for sched_yield() in librt ... not found
  checking for SO_SETFIB ... not found
  checking for SO_REUSEPORT ... not found
  checking for SO_ACCEPTFILTER ... not found
  checking for SO_BINDANY ... not found
  checking for IP_BIND_ADDRESS_NO_PORT ... not found
  checking for IP_TRANSPARENT ... not found
  checking for IP_BINDANY ... not found
  checking for IP_RECVDSTADDR ... not found
  checking for IP_PKTINFO ... not found
  checking for IPV6_RECVPKTINFO ... not found
  checking for TCP_DEFER_ACCEPT ... not found
  checking for TCP_KEEPIDLE ... not found
  checking for TCP_FASTOPEN ... not found
  checking for TCP_INFO ... not found
  checking for accept4() ... not found
  checking for kqueue AIO support ... not found
  checking for Linux AIO support ... not found
  checking for Linux AIO support (SYS_eventfd) ... not found
  
  ./configure: no supported file AIO was found
  Currently file AIO is supported on FreeBSD 4.3+ and Linux 2.6.22+ only
  </code></pre>
  
  <p>Now, when I remove the -with-cc-opt line, I don't get this error and it find the AIO. I am installing libaio1 and libaio-dev, so the libraries are there, still I am getting this error. Can you please help me figure it out. TIA.</p>