b29f1fbf93c9df5aa65fed050d9f8132dc6a2c73
braney
  Tue Nov 24 14:20:10 2015 -0800
support htslib for sam/bam/cram/tabix support  #14717

diff --git src/inc/common.mk src/inc/common.mk
index 5251214..c7603bb 100644
--- src/inc/common.mk
+++ src/inc/common.mk
@@ -205,30 +205,46 @@
 # OK to add -lstdc++ to all MYSQLLIBS just in case it is
 #    MySQL version 5.6 libraries, but no 'librt' on Mac OSX
 ifeq (${FULLWARN},hgwdev)
   MYSQLLIBS += /usr/lib/gcc/x86_64-redhat-linux/4.4.4/libstdc++.a /usr/lib/debug/usr/lib64/librt.a
 else
   ifeq ($(UNAME_S),Darwin)
     MYSQLLIBS += -lstdc++
   else
     MYSQLLIBS += -lstdc++ -lrt
   endif
 endif
 
 L+=${PNGLIB}
 HG_INC+=${PNGINCL}
 
+# autodetect UCSC installation of htslib:
+ifeq (${HTSDIR},"NOTNOW")
+    HTSDIR = /hive/groups/browser/htslib
+    ifneq ($(wildcard ${HTSDIR}),)
+        ifeq (${USE_HTS},)
+            USE_HTS=1
+            USE_TABIX=1
+            USE_SAMTABIX=1
+            SAMTABIXDIR = /hive/groups/browser/htslib
+            SAMTABIXLIB=/hive/groups/browser/htslib/libhts.a
+            HG_DEFS+=-DUSE_HTS
+        endif
+    endif
+endif
+
+
 # autodetect UCSC installation of samtabix:
 ifeq (${SAMTABIXDIR},)
     SAMTABIXDIR = /hive/data/outside/samtabix/${MACHTYPE}
     ifneq ($(wildcard ${SAMTABIXDIR}),)
         ifeq (${USE_SAMTABIX},)
           USE_SAMTABIX=1
         endif
     endif
 endif
 
 # pass through COREDUMP
 ifneq (${COREDUMP},)
     HG_DEFS+=-DCOREDUMP
 endif