Skip to content

Instantly share code, notes, and snippets.

@saml
Created April 23, 2011 02:51
Show Gist options
  • Save saml/938204 to your computer and use it in GitHub Desktop.
Save saml/938204 to your computer and use it in GitHub Desktop.
nginx build
#!/bin/bash
## Where nginx will be installed
prefix="$HOME/nginx"
## Put path to module source code
modules=(
"$HOME/code/ngx_devel_kit"
"$HOME/code/lua-nginx-module"
)
## These are for lua nginx module
#export LUA_LIB="$HOME/opt/lua/lib"
#export LUA_INC="$HOME/opt/lua/include"
export LUAJIT_LIB="$HOME/opt/luajit/lib"
export LUAJIT_INC="$HOME/opt/luajit/include/luajit-2.0"
# get --add-moduleparameters
modules_transformed=()
for x in "${modules[@]}"
do
modules_transformed+=("--add-module=$x")
done
./configure --prefix="$prefix" ${modules_transformed[@]} &&
make -j4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment