From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tristan Colgate Newsgroups: gmane.lisp.guile.devel Subject: [PATCH 1/2] Fix struct ip_mreq detection Date: Tue, 19 Oct 2010 16:31:18 +0100 Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1287502329 28265 80.91.229.12 (19 Oct 2010 15:32:09 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 19 Oct 2010 15:32:09 +0000 (UTC) To: guile-devel@gnu.org Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Tue Oct 19 17:32:07 2010 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1P8EAX-0008BD-NA for guile-devel@m.gmane.org; Tue, 19 Oct 2010 17:32:06 +0200 Original-Received: from localhost ([127.0.0.1]:44053 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P8EAW-0003Um-SJ for guile-devel@m.gmane.org; Tue, 19 Oct 2010 11:32:04 -0400 Original-Received: from [140.186.70.92] (port=41583 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P8EAA-0003S6-DQ for guile-devel@gnu.org; Tue, 19 Oct 2010 11:32:02 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1P8E9o-0006k8-Nj for guile-devel@gnu.org; Tue, 19 Oct 2010 11:31:42 -0400 Original-Received: from mail-fx0-f41.google.com ([209.85.161.41]:43519) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1P8E9o-0006jz-J5 for guile-devel@gnu.org; Tue, 19 Oct 2010 11:31:20 -0400 Original-Received: by fxm2 with SMTP id 2so1863175fxm.0 for ; Tue, 19 Oct 2010 08:31:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:date:message-id :subject:from:to:content-type:content-transfer-encoding; bh=U4xheNKZ59u0HUrcDsFmofnyX9H47HK0HJ3109XYYBw=; b=PtDDqY+hH6tmPG3Yl59LLT3Vu2BQvXx0CO6pV9eWZwLcfPJRQ10CmU/d8cgEMkQhmv yeSF+V9fGqlTdgn1gtqllRbB/9e+f8a2UARoPJjP7Ok3QQUs549xMOPd1CJ3YS4XJFJp PY/f1tg/fGNqnOgikyQCfRlYW0zMPU8GPYJ/c= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type :content-transfer-encoding; b=vIqVh7Z+MVQt+M/pjuH8V/KvHWdVdzt1yDHBMH8qQQtKkzaPC39cxIb91Hq96zQ8F1 5xufz71QcMOwuNjTbRMQkPTqJL79FJ9CcGmbf6vr29xsj/9UZ3dZwE3ZIMkt8aeLwuVa iPcpyw3tHjQ67J7j/pG42HWqtiO2Ukdll3Aw0= Original-Received: by 10.216.30.10 with SMTP id j10mr6876393wea.8.1287502278322; Tue, 19 Oct 2010 08:31:18 -0700 (PDT) Original-Received: by 10.216.166.84 with HTTP; Tue, 19 Oct 2010 08:31:18 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:11055 Archived-At: Probably not the ideal fix, I tried using AC_CHECK_TYPE and adding netinet/in.h but it didn't work. I've just copied the approach used for LINGER --=20 Tristan Colgate-McFarlane ---- =A0 "You can get all your daily vitamins from 52 pints of guiness, and a glass of milk" configure.ac | 17 ++++++++++++++++- 1 files changed, 16 insertions(+), 1 deletions(-) diff --git a/configure.ac b/configure.ac index 34ec603..ec82791 100644 --- a/configure.ac +++ b/configure.ac @@ -673,7 +673,22 @@ AC_CHECK_TYPE(socklen_t, , #endif #include ]) -AC_CHECK_TYPE(struct ip_mreq) + +AC_MSG_CHECKING(for struct ip_mreq) +AC_CACHE_VAL(scm_cv_struct_ip_mreq, + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ +#include +#include +#include ]], + [[struct ip_mreq req;]])], + [scm_cv_struct_ip_mreq=3D"yes"], + [scm_cv_struct_ip_mreq=3D"no"])) +AC_MSG_RESULT($scm_cv_struct_ip_mreq) +if test $scm_cv_struct_ip_mreq =3D yes; then + AC_DEFINE([HAVE_STRUCT_IP_MREQ], 1, + [Define this if your system defines struct ip_mreq, for use with= the + setsockopt system call.]) +fi GUILE_HEADER_LIBC_WITH_UNISTD --=20 1.7.2.3