From owner-freebsd-hackers@FreeBSD.ORG Mon Jan 12 14:56:23 2009 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CC2B2106566C for ; Mon, 12 Jan 2009 14:56:23 +0000 (UTC) (envelope-from brampton@gmail.com) Received: from mail-bw0-f20.google.com (mail-bw0-f20.google.com [209.85.218.20]) by mx1.freebsd.org (Postfix) with ESMTP id 24EC08FC24 for ; Mon, 12 Jan 2009 14:56:22 +0000 (UTC) (envelope-from brampton@gmail.com) Received: by bwz13 with SMTP id 13so6346517bwz.19 for ; Mon, 12 Jan 2009 06:56:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:sender :to:subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references :x-google-sender-auth; bh=xpo1JsABI/SOGuB2Fj1ySmvuwtRdYOTTirRtHlBVE7E=; b=GiTe5MrDJpArGKvhJiG7qO9qt8Pn71MLylEjWtPVAomr0UAYGPUeqpMj9sGQthE2EM jhLHvo/noqNd79Hwgk6sU8JhNnhGwf1P7tAM+tzj4/Z2R7TH69KZMdDQxtfL+HtgL4Mj joQJaqB3bW5WAZe5IEC3O98nvGOgkuMnEMIxA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references:x-google-sender-auth; b=P9l9HRCpWQvdxQqbe8qus4zmxCEuRsyzn0FS1szE7ccywHX//mfjoBoa44Sb+JIOa2 KddvHVcCqdSaCY9a7mIZTByRx1CNVzWLjRQKVf+/H0v46MIhmv0Ge7HTQaqvpxxg04UV h546orxmptIyNGEnBXIf+/nP1ixgOAhGJ+64c= Received: by 10.223.114.2 with SMTP id c2mr21281659faq.85.1231772181764; Mon, 12 Jan 2009 06:56:21 -0800 (PST) Received: by 10.223.110.209 with HTTP; Mon, 12 Jan 2009 06:56:21 -0800 (PST) Message-ID: Date: Mon, 12 Jan 2009 14:56:21 +0000 From: "Andrew Brampton" Sender: brampton@gmail.com To: "Eugene Grosbein" In-Reply-To: <20090112145131.GA4375@svzserv.kemerovo.su> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20090112145131.GA4375@svzserv.kemerovo.su> X-Google-Sender-Auth: d606bc5103930637 Cc: hackers@freebsd.org Subject: Re: Determine if a kernel is built with a specific option? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jan 2009 14:56:24 -0000 2009/1/12 Eugene Grosbein : >> I was wondering how a autoconf configure script can determine if the >> kernel is built with a particular option. In this case the code I have >> can make use of the FreeBSD polling driver, which by default isn't >> built into a kernel. So I want my configure script to determine if the >> kernel supports it, if so sets a #define, otherwise doesn't. > > You should not assume that compiled code does not need polling support > just because _buildbox_ doesn't have it enabled in time of build. > If the code builds here, it does not mean it will run here. > > Eugene Grosbein > Thanks for your comments Eugene. I know that is a bad assumption to make, but I'm basically updating someone else's software which already had that assumption for Linux. If you were going to do this, would you make it a configure flag... ie --enable-polling... That way it doesn't matter if the build box is different? thanks Andrew