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 Autoconf@xxxxxxx http://lists.gnu.org/mailman/listinfo/autoconf
_______________________________________________ Autoconf mailing list Autoconf@xxxxxxx http://lists.gnu.org/mailman/listinfo/autoconf