Ignore:
Timestamp:
Nov 20, 2014, 2:25:34 PM (7 years ago)
Author:
Peter
Message:

Make configure htslib aware. Header detection changed to look for
'sam.h', 'htslib/sam.h', 'bam/sam.h', and 'samtools/sam.h'; if second
alternative is detected, YAT_HAVE_HTSLIB_SAM_H is
#defined. YAT_SAM_HEADER is defined appropriately; since 'bam.h'
doesn't exist in htslib, YAT_BAM_HEADER is not defined (users should
#include YAT_SAM_HEADER instead). Likewise linker test is modified so
it tries '-lhts' before trying '-lbam'.

Note, configure now works against htslib, but compilation still fails
due to API changes between bamlib and htslib. For that reason
configure also checks if header 'hts.h' is available and #defined
YAT_HAVE_HTSLIB, which will be used for conditional implementations.

#refs 794

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/yat/omic/config_bam.h

    r3068 r3350  
    3434#include "yat/utility/config_public.h"
    3535
    36 #ifdef YAT_HAVE_BAM_H
     36#ifdef YAT_HAVE_SAM_H
    3737# define YAT_BAM_HEADER "bam.h"
    3838# define YAT_SAM_HEADER "sam.h"
    3939#else
    40 # ifdef YAT_HAVE_BAM_BAM_H
    41 #  define YAT_BAM_HEADER "bam/bam.h"
    42 #  define YAT_SAM_HEADER "bam/sam.h"
     40# ifdef YAT_HAVE_HTSLIB_SAM_H
     41#  define YAT_SAM_HEADER "htslib/sam.h"
    4342# else
    44 #  ifdef YAT_HAVE_SAMTOOLS_BAM_H
    45 #   define YAT_BAM_HEADER "samtools/bam.h"
    46 #   define YAT_SAM_HEADER "samtools/sam.h"
     43#  ifdef YAT_HAVE_BAM_SAM_H
     44#   define YAT_BAM_HEADER "bam/bam.h"
     45#   define YAT_SAM_HEADER "bam/sam.h"
     46#  else
     47#   ifdef YAT_HAVE_SAMTOOLS_SAM_H
     48#    define YAT_BAM_HEADER "samtools/bam.h"
     49#    define YAT_SAM_HEADER "samtools/sam.h"
     50#   endif
    4751#  endif
    4852# endif
    4953#endif
    5054
    51 #ifndef YAT_BAM_HEADER
     55#ifndef YAT_SAM_HEADER
    5256#error This file requires samtools header files and cannot be used when \
    5357yat was configured with switch '--without-samtools'.
Note: See TracChangeset for help on using the changeset viewer.