Skip site navigation (1)Skip section navigation (2)
Date:      02 Oct 2001 10:18:45 +0100
From:      Wayne Pascoe <wayne.pascoe@ehsrealtime.com>
To:        freebsd-questions@freebsd.org
Subject:   autoconf project problem - OS detection / definition
Message-ID:  <86snd2wgay.fsf@pan.ehsrealtime.com>

next in thread | raw e-mail | index | archive | help
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 <wayne.pascoe@ehsrealtime.com>

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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?86snd2wgay.fsf>