X-Authentication-Warning: delorie.com: mail set sender to geda-user-bounces using -f X-Recipient: geda-user AT delorie DOT com Date: Tue, 14 Jul 2015 13:54:06 +0200 (CEST) X-X-Sender: igor2 AT igor2priv To: "Peter Stuge (peter AT stuge DOT se) [via geda-user AT delorie DOT com]" X-Debug: to=geda-user AT delorie DOT com from="gedau AT igor2 DOT repo DOT hu" From: gedau AT igor2 DOT repo DOT hu Subject: Re: [geda-user] geda-gaf on FreeBSD and probably other architectures In-Reply-To: <20150714113014.4928.qmail@stuge.se> Message-ID: References: <20150714103959 DOT GA17565 AT localhost DOT localdomain> <20150714113014 DOT 4928 DOT qmail AT stuge DOT se> User-Agent: Alpine 2.00 (DEB 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Reply-To: geda-user AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: geda-user AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On Tue, 14 Jul 2015, Peter Stuge (peter AT stuge DOT se) [via geda-user AT delorie DOT com] wrote: > gedau AT igor2 DOT repo DOT hu wrote: >> In your specific case, a similar trick could work. A C fewliners around >> strftime() would be small, simple and reliable. Strftime is C89 for most >> features (don't use timezones and you'll be fine). The C code could compile >> with $(CC) directly into an executable in one step, without any extra >> configuration. > > Windows is very different, in many ways. > > Also, cross-compilation support is a lot of fun to implement in a > configuration system. Fairly mature and popular alternatives such as > cmake still do not come close to autotools+pkg-config. My scconfig handles cross-compilation well. The trick is to separate the host env from the target env and make it just one of the cases when they happen to be the same. If you need "date -d" during compilation to include the build date in the "about" dialog, or something similar, it's just a host thing. The strftime suggestion works as long as you use the host C compiler (and not the target C compiler which would be a cross-compiler in cross-compilation). I am sure autotools supports this host/target approach (but the terminology may differ). Regards, Igor2