Received: by 10.224.112.6 with SMTP id u6mr5338815qap.17.1262787478898; Wed, 06 Jan 2010 06:17:58 -0800 (PST) Received: by 10.224.112.6 with SMTP id u6mr5338814qap.17.1262787478851; Wed, 06 Jan 2010 06:17:58 -0800 (PST) Return-Path: Received: from menubar.gnome.org (menubar.gnome.org [209.132.180.169]) by gmr-mx.google.com with ESMTP id 24si6462594qyk.10.2010.01.06.06.17.58; Wed, 06 Jan 2010 06:17:58 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of vala-list-boun...@gnome.org designates 209.132.180.169 as permitted sender) client-ip=209.132.180.169; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: best guess record for domain of vala-list-boun...@gnome.org designates 209.132.180.169 as permitted sender) smtp.mail=vala-list-boun...@gnome.org Received: from menubar.gnome.org (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id DF1C075013D; Wed, 6 Jan 2010 14:17:57 +0000 (GMT) X-Original-To: vala-l...@gnome.org Delivered-To: vala-l...@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 9D24E750100 for ; Wed, 6 Jan 2010 14:17:55 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -2.599 X-Spam-Level: X-Spam-Status: No, score=-2.599 tagged_above=-999 required=2 tests=[BAYES_00=-2.599] autolearn=ham Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id vyO1wOKYQlr4 for ; Wed, 6 Jan 2010 14:17:45 +0000 (GMT) Received: from smtpauth13.prod.mesa1.secureserver.net (smtpauth13.prod.mesa1.secureserver.net [64.202.165.37]) by menubar.gnome.org (Postfix) with SMTP id 37A9F7500F6 for ; Wed, 6 Jan 2010 14:17:36 +0000 (GMT) Received: (qmail 31373 invoked from network); 6 Jan 2010 14:17:28 -0000 Received: from unknown (151.20.248.254) by smtpauth13.prod.mesa1.secureserver.net (64.202.165.37) with ESMTP; 06 Jan 2010 14:17:28 -0000 Received: (nullmailer pid 24588 invoked by uid 1000); Wed, 06 Jan 2010 14:17:59 -0000 Date: Wed, 6 Jan 2010 15:17:59 +0100 From: Andrea Bolognani To: vala-l...@gnome.org Message-ID: <20100106141759.GK1545@lagann> References: <1055bbf21001060120q60c0469fq8398eff1f7c54...@mail.gmail.com> <4B445E50.9080...@gmx.net> MIME-Version: 1.0 In-Reply-To: <4B445E50.9080...@gmx.net> User-Agent: Mutt/1.5.20 (2009-06-14) Subject: Re: [Vala] Accessing build-time config from Vala (was: Vala-list Digest, Vol 26, Issue 8) X-BeenThere: vala-l...@gnome.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Vala compiler development and discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============0871550188==" Sender: vala-list-boun...@gnome.org Errors-To: vala-list-boun...@gnome.org --===============0871550188== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="z9sQuz+HmDh2hVO4" Content-Disposition: inline --z9sQuz+HmDh2hVO4 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jan 06, 2010 at 10:56:32AM +0100, Frederik wrote: > golnaz nilieh wrote: > > Thanks to all. I defined an empty constructor for Global, and called it= in > > main function. also I changed dataDir to a constant variable. > > But a new question: Is there a way to pass the installation path to dat= aDir? > > I use this macro in configure.ac: > >=20 > > AC_PREFIX_DEFAULT(/usr/local) > >=20 > > can i use it as a variable in a vala source file? >=20 > Yes, all you need is a small vapi file for your 'config.h', e.g.: > http://code.google.com/p/xnoise/source/browse/vapi/config.vapi >=20 > Use it with >=20 > --pkg config --vapidir path/to/my/vapi >=20 > and access it via >=20 > Config.DATADIR I like this solution. Only, I can't seem to find a way to get DATADIR defined in config.h. Looking at xnoise, I was unable to find any obvious spot where the magic happens. Is that done by gnome-autogen? I have a custom autogen.sh. Or am I missing something hidden in plain sight? --=20 Andrea Bolognani Resistance is futile, you will be garbage collected. --z9sQuz+HmDh2hVO4 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iEYEARECAAYFAktEm5cACgkQDGNHFtuwOpTT+gCeI0jBdeFfUG7BIDJ2SBMu47ej VhIAnAzVIYiczm3/kytI//X+qlGbKIrA =2aP4 -----END PGP SIGNATURE----- --z9sQuz+HmDh2hVO4-- --===============0871550188== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Vala-list mailing list Vala-l...@gnome.org http://mail.gnome.org/mailman/listinfo/vala-list --===============0871550188==--