autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: howto identify os


From: Chris Albertson
Subject: Re: howto identify os
Date: Tue, 25 Jan 2005 09:54:09 -0800
User-agent: Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:1.7.5) Gecko/20041221


In general you do not want to do this.  As an example my code needs to
run on various versions of Solaris.  Newer versions have the C library
functin "strlcpy" both versions have "strncpy".  I want to use the "l'
version if it is available. So rather then testing for the Solaris version I test if the strlcpy function is available. This is nice
because after I put a bunch of this  kind of tests in, my software
"just works" with Linux and maybe even on Darwin or other OSes I don't
have access to.

My advice is to figure out what it is about Darwin and Linux that
is different and test for those differences.  The pay off will
come when they change something in either Darwin or Linux.

Direct answer to your question:  Read "man uname".


Francesco Zappa Nardelli wrote:
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.
How can I reliably detect the operating system of the machine the
software is built on?
Thank you in advance.

Regards,
-francesco

ps: please, cc me as I am not subscribed to the list.


_______________________________________________
Autoconf mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/autoconf






reply via email to

[Prev in Thread] Current Thread [Next in Thread]