openbsd-ports/net/transmission/patches/patch-configure_ac
sthen f953b38803 Check for evhttp.h instead of event-config.h to detect an installed
libevent; if it's not present, continue using the bundled copy.
Fixes the build with a forthcoming libevent update.
Suggested by NicM@, ok naddy@
2010-04-21 06:57:24 +00:00

108 lines
4.2 KiB
Plaintext

$OpenBSD: patch-configure_ac,v 1.2 2010/04/21 06:57:24 sthen Exp $
--- configure.ac.orig Fri Mar 12 02:04:38 2010
+++ configure.ac Tue Apr 20 22:42:38 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
@@ -211,7 +211,7 @@ 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
@@ -293,10 +293,13 @@ if test "x$build_gtk" = "xyes"; then
AS_HELP_STRING([--enable-libnotify],[enable notifications]),,
[enable_libnotify=yes])
use_libnotify=no
- if test "x$enable_libnotify" = "xyes" ; then
- if test "x$have_libnotify" = "xyes"; then
+ if test "x$have_libnotify" = "xyes"; then
+ if test "x$enable_libnotify" = "xyes" ; then
use_libnotify=yes
AC_DEFINE([HAVE_LIBNOTIFY], 1)
+ else
+ LIBNOTIFY_CFLAGS=
+ LIBNOTIFY_LIBS=
fi
fi
@@ -309,12 +312,13 @@ if test "x$build_gtk" = "xyes"; then
AS_HELP_STRING([--enable-libappindicator],[enable AppIndicator support]),,
[enable_libappindicator=yes])
use_libappindicator=no
- if test "x$enable_libappindicator" = "xyes" ; then
- if test "x$have_libappindicator" = "xyes"; then
+ if test "x$have_libappindicator" = "xyes"; then
+ if test "x$enable_libappindicator" = "xyes" ; then
use_libappindicator=yes
- AC_SUBST(LIBAPPINDICATOR_LIBS)
- AC_SUBST(LIBAPPINDICATOR_CFLAGS)
AC_DEFINE([HAVE_LIBAPPINDICATOR], 1)
+ else
+ LIBAPPINDICATOR_CFLAGS=
+ LIBAPPINDICATOR_LIBS=
fi
fi
@@ -325,10 +329,13 @@ if test "x$build_gtk" = "xyes"; then
AC_ARG_ENABLE([libcanberra],
AS_HELP_STRING([--enable-libcanberra],[enable sounds]),,
[enable_libcanberra=yes])
- if test "x$enable_libcanberra" = "xyes" ; then
- if test "x$have_libcanberra" = "xyes"; then
+ if test "x$have_libcanberra" = "xyes"; then
+ if test "x$enable_libcanberra" = "xyes" ; then
use_canberra=yes
AC_DEFINE([HAVE_LIBCANBERRA], 1)
+ else
+ LIBCANBERRA_CFLAGS=
+ LIBCANBERRA_LIBS=
fi
fi
@@ -339,10 +346,13 @@ if test "x$build_gtk" = "xyes"; then
AC_ARG_ENABLE([gconf2],
AS_HELP_STRING([--enable-libgconf],[enable GConf support]),,
[enable_libgconf=yes])
- if test "x$enable_libgconf" = "xyes" ; then
- if test "x$have_libgconf" = "xyes"; then
+ if test "x$have_libgconf" = "xyes"; then
+ if test "x$enable_libgconf" = "xyes" ; then
use_libgconf=yes
AC_DEFINE([HAVE_LIBGCONF], 1)
+ else
+ LIBGCONF_CFLAGS=
+ LIBGCONF_LIBS=
fi
fi