From owner-freebsd-questions Tue Oct 2 2:20:24 2001 Delivered-To: freebsd-questions@freebsd.org Received: from clientmail.realtime.co.uk (simian.ehsrealtime.com [213.52.146.137]) by hub.freebsd.org (Postfix) with ESMTP id CB2A637B425 for ; Tue, 2 Oct 2001 02:20:10 -0700 (PDT) Received: from pan.ehsrealtime.com ([213.52.146.196]) by clientmail.realtime.co.uk with esmtp (Exim 3.20 #1) id 15oLij-0006k6-01 for freebsd-questions@freebsd.org; Tue, 02 Oct 2001 10:20:09 +0100 Received: from waynep by pan.ehsrealtime.com with local (Exim 3.22 #1) id 15oLhO-0000NL-00 for freebsd-questions@freebsd.org; Tue, 02 Oct 2001 10:18:46 +0100 From: Wayne Pascoe To: freebsd-questions@freebsd.org Subject: autoconf project problem - OS detection / definition Reply-To: wayne.pascoe@ehsrealtime.com Date: 02 Oct 2001 10:18:45 +0100 Message-ID: <86snd2wgay.fsf@pan.ehsrealtime.com> Lines: 32 User-Agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.1 (Cuyahoga Valley) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Hi all, I'm trying to convert a project that I have to use autoconf. The main problem that I am having at the moment is OS detection. I see that I can use config.guess and that will make the os available as ${target_os} to my configure scripts. My problem is that in my code I have several sections like #ifdef HAVE_LINUX do stuff . . #endif #ifdef HAVE_FREEBSD do other stuff . . #endif How do I use the ${target_os} to define the OS in my config.h file ? I don't need it to be HAVE_FREEBSD or HAVE_LINUX, it just needs to be a unique def for each OS. TIA, -- Wayne Pascoe Things fall apart; the center cannot hold; Mere anarchy is loosed upon the world. - Yeats To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message