anchor.diff:  ! Initialize PNT
   pnt = 0.0d0
   
  -! Use LAPACK eigensystem solver if it is available. Otherwise, return zeros.
  -! TODO: Algebraically compute eigenvectors and eigenvalues for 3x3 matrix if LAPACK is not installed
  -
  -#ifdef USE_LAPACK
   
   ! Convert moment tensor from spherical coordinates to local east-north-vertical coordinates, where
   ! r=up, t=south, and p=east
  
positive.code: pnt(9) = m_enz(3,3)
  
  ! Eigenvalues are in the w array
  pnt(10) = w(1)
  pnt(11) = w(2)
  pnt(12) = w(3)
  
  #else
  
  ! Return zeros
  write(stderr,*) 'mij2pnt: Hdef installed without LAPACK; returning pnt with zeros'
  pnt = 0.0d0
  
  #endif
  
  
negative.code: 
  use io, only: stderr
  
  #ifndef USE_LAPACK
  ! Without LAPACK, we need the eigen routines from the algebra module
  use algebra, only: jacobi, eig_sort
  #endif
  
  
  implicit none
  
  ! Arguments
  double precision :: mrr, mtt, mpp, mrt, mrp, mtp, pnt(12)
  
  ! Local variables
  double precision :: m_enz(3,3), eigvals(3)
  
  
  #ifdef USE_LAPACK
  
  ! Variables for running LAPACK dysev (double precision symmetric matrix eigen analysis)
  integer :: info, lwork
  double precision, allocatable :: work(:)
  
  #else
  
  ! Variables for running Numerical Recipes jacobi (symmetric matrix eigen analysis) and eig_sort
  integer :: nrot, ierr
  double precision :: eigvecs(3,3)
  
  #endif
  
  