Skip to content

Commit

Permalink
When compiling Nginx, link -lm after -lstdc++ and -lpthread. Fixes is…
Browse files Browse the repository at this point in the history
…sue phusion#704.
  • Loading branch information
FooBarWidget committed Nov 26, 2011
1 parent 49cb7b5 commit 5160c21
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions ext/nginx/config
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,6 @@ if ! test -f "$ngx_addon_dir/../common/libpassenger_common.a" || \
echo "*** Phusion Passenger support files have been successfully compiled. ***"
fi

ngx_feature="Math library"
ngx_feature_name=
ngx_feature_run=no
ngx_feature_incs="#include <math.h>"
ngx_feature_path=
ngx_feature_libs="-lm"
ngx_feature_test="pow(1, 2)"
. auto/feature
if [ $ngx_found = yes ]; then
CORE_LIBS="$CORE_LIBS -lm"
fi

ngx_addon_name=ngx_http_passenger_module
HTTP_MODULES="$HTTP_MODULES ngx_http_passenger_module"
NGX_ADDON_SRCS="$NGX_ADDON_SRCS \
Expand All @@ -43,6 +31,18 @@ CORE_LIBS="$CORE_LIBS \
${ngx_addon_dir}/../common/libboost_oxt.a \
-lstdc++ -lpthread"

ngx_feature="Math library"
ngx_feature_name=
ngx_feature_run=no
ngx_feature_incs="#include <math.h>"
ngx_feature_path=
ngx_feature_libs="-lm"
ngx_feature_test="pow(1, 2)"
. auto/feature
if [ $ngx_found = yes ]; then
CORE_LIBS="$CORE_LIBS -lm"
fi

nginx_version=`grep 'NGINX_VERSION ' src/core/nginx.h | awk '{ print $3 }' | sed 's/"//g'`

nginx_major_version=`echo "$nginx_version" | cut -d . -f 1`
Expand Down

0 comments on commit 5160c21

Please sign in to comment.