[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: howto identify os
From: |
Nic Ferrier |
Subject: |
Re: howto identify os |
Date: |
Tue, 25 Jan 2005 10:53:38 +0000 |
Francesco Zappa Nardelli <address@hidden> writes:
> Hello.
>
> I am a novice user of autoconf, and I am sorry if my question is
> really silly.
>
> I am looking for a way to tell configure that the makefile it
> eventually generates should include the file "linux.mak" if we are
> building the software on Linux, and "macosx.mak" if we are building on
> Darwin.
You should say "GNU/Linux".
> How can I reliably detect the operating system of the machine the
> software is built on?
from the shell:
uname -a
will do what you want. So you could setup a make variable with that
in:
ISGNU:=$(shell uname -a | grep -i gnu)
However, if you check the autoconf macro archive you might be able to
find an AC macro to do it:
http://www.gnu.org/software/ac-archive/
--
Nic Ferrier
http://www.tapsellferrier.co.uk