823025651ec0baffef2fc7037f3b478d62dd4052
jcasper
  Thu Mar 26 14:28:25 2020 -0700
Fixing libs build for machines without C++ libs; added USE_HIC option to makes, refs #24414

diff --git src/hg/lib/hic.c src/hg/lib/hic.c
index 1552570..bfbc6d5 100644
--- src/hg/lib/hic.c
+++ src/hg/lib/hic.c
@@ -1,29 +1,31 @@
 /* hic.c contains a few helpful wrapper functions for managing Hi-C data. */
 
 #include "common.h"
 #include "linefile.h"
 #include "dystring.h"
 #include "jksql.h"
 #include "hic.h"
 #include "hdb.h"
 #include "trackHub.h"
 #include "Cstraw.h"
 #include "hash.h"
 #include "chromAlias.h"
 #include "interact.h"
 
+#ifdef USE_HIC
+
 void mangleName(char *ucscName, char mangledUcscName[], int size)
 /* Generate a version of an assembly's chromosome name that matches
  * the mangling performed by the Juicer .hic creation tool (strip any initial
  * "chr" and capitalize the rest). */
 {
     int offset = 0;
     char workingName[size];
     safef(workingName, sizeof(workingName), "%s", ucscName);
     touppers(workingName);
     if (startsWith("CHR", workingName))
         offset = 3;
     safencpy(mangledUcscName, size, workingName+offset, strlen(workingName+offset));
 }
 
 
@@ -185,15 +187,29 @@
         continue;
         }
 
     struct interact *new = interactFromHic(chrom1, x[i], chrom2, y[i], resolution, counts[i]);
     slAddHead(resultPtr, new);
 
     if (differentWord(chrom1, chrom2))
         {
         // a second interact structure must be created on the other chromosome
         new = interactFromHic(chrom2, y[i], chrom1, x[i], resolution, counts[i]);
         slAddHead(resultPtr, new);
         }
     }
 return networkErrMsg;
 }
+
+#else // USE_HIC
+
+char *hicLoadHeader(char *filename, struct hicMeta **header, char *ucscAssembly)
+{
+return cloneString("Hi-C support not compiled in");
+}
+
+char *hicLoadData(struct hicMeta *fileInfo, int resolution, char *normalization, char *chrom1, int start1,
+         int end1, char *chrom2, int start2, int end2, struct interact **resultPtr)
+{
+return cloneString("Hi-C support not compiled in");
+}
+#endif // USE_HIC