test invalid --with-ld-opt in right place
diff --git a/auto/cc/conf b/auto/cc/conf
index a7c8a09..09ab9d3 100644
--- a/auto/cc/conf
+++ b/auto/cc/conf
@@ -104,6 +104,7 @@
 fi
 
 CFLAGS="$CFLAGS $NGX_CC_OPT"
+NGX_TEST_LD_OPT="$NGX_LD_OPT"
 
 if [ "$NGX_PLATFORM" != win32 ]; then