autoconf
[Top][All Lists]
Advanced

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

RE: howto identify os


From: Guus Leeuw jr.
Subject: RE: howto identify os
Date: Tue, 25 Jan 2005 06:41:01 +0100

> -----Original Message-----
> From: address@hidden [mailto:autoconf-
> address@hidden On Behalf Of Francesco Zappa Nardelli
> Sent: lundi 24 janvier 2005 20:54
> 
> 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.

configure.in:
...
case $host_os in
        linux*)
                PACKAGE_extra_makefile_include="linux.mak"
                ;;
        Darwin*)
                PACKAGE_extra_makefile_include="macosx.mak"
                ;;
        *)
                PACKAGE_extra_makefile_include=""
                ;;
esac
AC_SUBST(PACKAGE_extra_makefile_include)
...

Makefile.am:
...
include @PACKAGE_extra_makefile_include@
...

*But*:
Depending on what you want the extra .mak file to do, it is probably better
to have configure figure this OS dependent stuff out by itself and have the
Makefile.am written accordingly.

Guus


-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.300 / Virus Database: 265.7.2 - Release Date: 21/01/2005
 



-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.300 / Virus Database: 265.7.2 - Release Date: 21/01/2005





reply via email to

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