And this listing is really immaterial. You need to track down why configure doesn't like to execute the commands that are in it. It is a simple script, and it's failing to run starting with the first command in the script, which your output clearly illustrates. That command is:
Code:
NGX_CONFIGURE=`echo $@ | sed 's/"/\\\\"/g'`
So you need to start with why that is failing.