$OpenBSD: patch-configure,v 1.58 2018/09/05 07:01:50 ajacoutot Exp $

- Fix curses test to work on OpenBSD
- More appropriate CFLAGS handling

Index: configure
--- configure.orig
+++ configure
@@ -3371,6 +3371,7 @@ if test "$curses" != "no" ; then
   fi
   curses_found=no
   cat > $TMPC << EOF
+#define _XOPEN_SOURCE_EXTENDED
 #include <locale.h>
 #include <curses.h>
 #include <wchar.h>
@@ -5554,10 +5555,6 @@ write_c_skeleton
 if test "$gcov" = "yes" ; then
   CFLAGS="-fprofile-arcs -ftest-coverage -g $CFLAGS"
   LDFLAGS="-fprofile-arcs -ftest-coverage $LDFLAGS"
-elif test "$fortify_source" = "yes" ; then
-  CFLAGS="-O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 $CFLAGS"
-elif test "$debug" = "no"; then
-  CFLAGS="-O2 $CFLAGS"
 fi
 
 if test "$have_asan" = "yes"; then
