From ripley at stats.ox.ac.uk  Sat May 10 08:49:37 2003
From: ripley at stats.ox.ac.uk (Prof Brian Ripley)
Date: Sat May 10 08:49:47 2003
Subject: [Rd] debugging packages
In-Reply-To: <OF59E70F77.8E917966-ON85256D21.00763D94-85256D21.0076E342@EU.novartis.net>
Message-ID: <Pine.LNX.4.44.0305100745330.25570-100000@gannet.stats>

On Fri, 9 May 2003 clayton.springer@pharma.novartis.com wrote:

> I am debugging my package with printf statements and I would like to 
> remove -O2 from the compiler options.

Why?  That should not affect the operation of printf (but if may well 
confuse source-code debuggers).

> Can I do with a switch on ./configure or is it necessary to set the 
> environment variables

If it is just your package, then the CFLAGS are taken from 
R_HOME/etc/Makeconf.  You can either edit that, or you can create a 
Makefile in your package's src directory which would give you complete 
control.  (We don't recommend the later for packages which are distributed 
as it is tricky to get cross-platform features right.)

-- 
Brian D. Ripley,                  ripley@stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595


[Rd] debugging packages
Prof Brian Ripley