@@ -450,22 +450,41 @@ ngx_feature_test='struct sigaction act;
450
450
451
451
. auto/feature
452
452
453
- if [ $PCRE != NO -a $PCRE != YES ]; then
454
- # force pcre_version symbol to be undefined when PCRE is statically linked
453
+ if [ $USE_PCRE = YES -o $PCRE != NONE ] && [ $PCRE != NO -a $PCRE != YES ]; then
454
+ # force pcre_version symbol to be required when PCRE is statically linked
455
+ case "$NGX_PLATFORM" in
456
+ Darwin:*)
457
+ ngx_feature="require defined symbols (-u)"
458
+ ngx_feature_name=
459
+ ngx_feature_path=
460
+ ngx_feature_libs="-Wl,-u,_strerror"
461
+ ngx_feature_run=no
462
+ ngx_feature_incs="#include <stdio.h>"
463
+ ngx_feature_test='printf("hello");'
455
464
456
- ngx_feature="force undefined symbols (--undefined)"
457
- ngx_feature_libs="-Wl,--undefined=printf"
458
- ngx_feature_name=
459
- ngx_feature_run=no
460
- ngx_feature_incs="#include <stdio.h>"
461
- ngx_feature_path=
462
- ngx_feature_test='printf("hello");'
465
+ . auto/feature
463
466
464
- . auto/feature
467
+ if [ $ngx_found = yes ]; then
468
+ CORE_LIBS="-Wl,-u,_pcre_version $CORE_LIBS"
469
+ fi
470
+ ;;
465
471
466
- if [ $ngx_found = yes ]; then
467
- CORE_LIBS="$CORE_LIBS -Wl,--undefined=pcre_version"
468
- fi
472
+ *)
473
+ ngx_feature="require defined symbols (--require-defined)"
474
+ ngx_feature_name=
475
+ ngx_feature_path=
476
+ ngx_feature_libs="-Wl,--require-defined=strerror"
477
+ ngx_feature_run=no
478
+ ngx_feature_incs="#include <stdio.h>"
479
+ ngx_feature_test='printf("hello");'
480
+
481
+ . auto/feature
482
+
483
+ if [ $ngx_found = yes ]; then
484
+ CORE_LIBS="-Wl,--require-defined=pcre_version $CORE_LIBS"
485
+ fi
486
+ ;;
487
+ esac
469
488
fi
470
489
471
490
#CFLAGS=$"$CFLAGS -DLUA_DEFAULT_PATH='\"/usr/local/openresty/lualib/?.lua\"'"
0 commit comments