autoconf
[Top][All Lists]
Advanced

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

Re: Configure.ac script for Acousto


From: David A. Wheeler
Subject: Re: Configure.ac script for Acousto
Date: Fri, 17 Jan 2014 13:27:07 -0500 (EST)

address@hidden said:
> To: address@hidden
> Subject: Configure.ac script for Acousto
> Message-ID: <address@hidden>
> Content-Type: text/plain;     charset=utf-8
> 
> Hello AutoConf community,
> 
> I?ve been attempting to get Acousto (the one and only open source 
> Boundary-Element-Method acoustic simulator: 
> http://acousto.sourceforge.net/index.php) to build on Mavericks 
> (http://acousto.sourceforge.net/user_manual/html/UserManualse32.html#x61-87000F.3)
> I found that the configure.ac was very difficult to comprehend, and appears 
> to contain logic errors.
> So I've spent the day attempting to rewrite it; I will paste my code below.  
> However, I am a newcomer to autoconf, and my attempt is certainly not going 
> to be optimal, definitely going to be buggy, and potentially may be 
> fundamentally flawed in several places.
> Code is here: http://mathpad.wikidot.com/acousto-configure-ac
> I would be very grateful if someone in the community with experience would 
> care to have a look through it and point out any glaring mistakes or better 
> ways of doing things.
> 
> The script specifies:
> #-----------------------------------
> # Check for supported OS
> #-----------------------------------
> AC_CANONICAL_HOST
> case $host in
>     *linux*)
>         ;;
>     *solaris*)
>         ;;
>     *darwin*)
>         ;;
>     *cygwin*)
>         ;;
>     *)
>         AC_MSG_ERROR([$host not supported])
>         ;;
> esac  
> 
> So it needs to run on these platforms, which may constrain the language that 
> can be used.
> 
> I hope this post is not inappropriate; the aim here is to bring some 
> robustness to a valuable and unique open source project.

The usual way to use autoconf is to *NOT* try to do things based on the name of 
the "canonical host", but instead, identify specific feature sets and figure 
out how to get them.  That way, if version "X" doesn't have the feature but 
version "Y" does, you're okay.  For example, there are lots of variations 
between linux systems... your users will more likely have success if you look 
for the specific features.

You mention you're new to the autotools. You might try out this short intro 
tutorial that I created:
 http://www.dwheeler.com/autotools/
It's only an intro, so it won't answer every question, but it might help you 
get started.

--- David A. Wheeler



reply via email to

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