$OpenBSD: patch-configure_ac,v 1.4 2010/05/03 17:39:33 naddy Exp $
--- configure.ac.orig	Fri Mar 12 03:04:38 2010
+++ configure.ac	Sat May  1 03:12:59 2010
@@ -24,8 +24,8 @@ AC_PROG_LIBTOOL
 if test m4_substr(peer_id_prefix,6,1) = "0"; then
   supported_build=yes
   if test "x$GCC" = "xyes" ; then
-    CFLAGS="$CFLAGS -g -O3 "
-    CXXFLAGS="$CXXFLAGS -g -O3 "
+    : CFLAGS="$CFLAGS -g -O3 "
+    : CXXFLAGS="$CXXFLAGS -g -O3 "
   fi
   CPPFLAGS="$CPPFLAGS -DNDEBUG"
 else
@@ -89,7 +89,7 @@ AC_PROG_CXX
 AC_C_INLINE
 if test "x$GCC" = "xyes" ; then
 
-    CFLAGS="$CFLAGS -std=gnu99 -ggdb3 -Wall -W -Wpointer-arith -Wformat-security -Wcast-align -Wundef -Wcast-align -Wstrict-prototypes -Wmissing-declarations -Wmissing-format-attribute -Wredundant-decls -Wnested-externs -Wunused-parameter -Wwrite-strings"
+    : CFLAGS="$CFLAGS -std=gnu99 -ggdb3 -Wall -W -Wpointer-arith -Wformat-security -Wcast-align -Wundef -Wcast-align -Wstrict-prototypes -Wmissing-declarations -Wmissing-format-attribute -Wredundant-decls -Wnested-externs -Wunused-parameter -Wwrite-strings"
 
     dnl figure out gcc version
     AC_MSG_CHECKING([gcc version])
@@ -101,7 +101,7 @@ if test "x$GCC" = "xyes" ; then
     AC_MSG_RESULT($GCC_VERSION)
     if test $GCC_VERSION_NUM -ge 304; then
         dnl these were added in 3.4
-        CFLAGS="$CFLAGS -Wextra -Wdeclaration-after-statement -Winit-self"
+        : CFLAGS="$CFLAGS -Wextra -Wdeclaration-after-statement -Winit-self"
     fi
 fi
 
@@ -205,13 +205,13 @@ AC_CHECK_LIB([rt],
 dnl build our copy of libevent whether we use it or not,
 dnl because "make dist" needs its Makefiles to exist, and
 dnl AM_CONDITIONAL + AC_CONFIG_SUBDIRS don't seem to play nice
-AC_CONFIG_SUBDIRS([third-party/libevent])
+dnl AC_CONFIG_SUBDIRS([third-party/libevent])
 libevent_source=bundled
 AC_CHECK_LIB([event],[evutil_vsnprintf],
              [libevent_found=yes],
              [libevent_found=no],
              [$libevent_extra_libs])
-AC_CHECK_HEADER([event-config.h],
+AC_CHECK_HEADER([evhttp.h],
                 [libevent_headers_found=yes],
                 [libevent_headers_found=no])
 libevent_source=bundled
@@ -227,7 +227,7 @@ if test "x$libevent_source" = "xbundled"; then
     LIBEVENT_LIBS="\$(top_builddir)/third-party/libevent/libevent.la"
 else
     LIBEVENT_CFLAGS=""
-    LIBEVENT_LIBS="-levent $libevent_extra_libs"
+    LIBEVENT_LIBS="-leventextra -levent $libevent_extra_libs"
 fi
 AC_ARG_VAR([LIBEVENT_CFLAGS], [C compiler flags for LIBEVENT, overriding pkg-config])dnl
 AC_ARG_VAR([LIBEVENT_LIBS], [linker flags for LIBEVENT, overriding pkg-config])dnl
