http://ftp.netbsd.org/pub/pkgsrc/current/pkgsrc/chat/jabberd2/patches/patch-configure https://github.com/jabberd2/jabberd2/issues/34 --- configure.orig 2015-10-30 03:53:19.000000000 -0500 +++ configure 2015-11-08 22:27:21.000000000 -0600 @@ -11830,7 +11830,7 @@ # check for optimisation level { $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGS optimization level" >&5 $as_echo_n "checking CFLAGS optimization level... " >&6; } -if echo $CFLAGS | grep '.*-O[3s].*' >/dev/null 2>&1; then +if echo $CFLAGS | grep '.*-O[3].*' >/dev/null 2>&1; then as_fn_error $? "maximum allowed optimization level is -O2" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: fine" >&5