You don't want to get the debug mode from PETSC_ARCH since there may not be 
a PETSC_ARCH (for PETSc --prefix installs) or because the user did not put the 
string in it.  You can check for the PETSC_USE_DEBUG symbol in the petscconf.h 
file by linking a C program against <petscsys.h> and #if 
defined(PETSC_USE_DEBUG). 


   Barry

> On Oct 11, 2016, at 3:12 PM, CLAUS HELLMUTH WARNER HETZER <[email protected]> 
> wrote:
> 
> Hi everybody-
> 
> Figured I’d ask this here before I go reinventing the wheel.
> 
> I’m writing an autoconf installer (the standard Linux configure/make package) 
> for an acoustic wave propagation modeling package that builds PETSc and SLEPc 
> as part of the installation process.  I’d like to be able to test for 
> instances of PETSc already being installed on the user’s machine and, if 
> possible, whether they’re the debug version.  I know I can check for the 
> existence of the PETSC_DIR environmental variable, and parse the PETSC_ARCH 
> variable for “debug”, and I’ll do that as a first pass, but has anybody 
> written any M4 tests that are more reliable than those (i.e. actually 
> attempting to link to the libraries)?  I had one user who had the libraries 
> installed in /usr/local/bin but didn’t have the environmental variables set 
> in their profile, so the linker was confused and it took a while to figure 
> out what was going weird with the install.
> 
> If not, I guess I’ll be putting on my Autoconf gloves and getting my hands 
> dirty.
> 
> Thanks
> -Claus Hetzer
> 
> ------------------
> Claus Hetzer
> Senior Research and Development Engineer
> National Center for Physical Acoustics
> The University of Mississippi
> 145 Hill Drive
> PO Box 1848
> University, MS 38677
> [email protected]
> 
> 
> 
> 
> 

Reply via email to