6e49b6de0de742e4e8cb8057440a63ece6e7ec53
hiram
  Sun May 10 12:27:57 2020 -0700
updates to work with Mac OSX Catalina and brew install of mariadb and openssl no redmine

diff --git src/inc/common.mk src/inc/common.mk
index 1183f83..8d4dfa2 100644
--- src/inc/common.mk
+++ src/inc/common.mk
@@ -97,39 +97,47 @@
       L+=-L${SSL_DIR}/lib
     endif
   endif
     HG_INC+=-I${SSL_DIR}/include
 endif
 # on hgwdev, already using the static library with mysqllient.
 ifeq (${IS_HGWDEV},yes)
    L+=/usr/lib64/libssl.a /usr/lib64/libcrypto.a -lkrb5 -lk5crypto -ldl
 else
    ifneq ($(wildcard /opt/local/lib/libssl.a),)
        L+=/opt/local/lib/libssl.a
    else
      ifneq ($(wildcard /usr/lib/x86_64-linux-gnu/libssl.a),)
 	L+=/usr/lib/x86_64-linux-gnu/libssl.a
      else
+        ifneq ($(wildcard /usr/local/opt/openssl/lib/libssl.a),)
+           L+=/usr/local/opt/openssl/lib/libssl.a
+        else
            L+=-lssl
         endif
      endif
+   endif
    ifneq ($(wildcard /opt/local/lib/libcrypto.a),)
        L+=/opt/local/lib/libcrypto.a
    else
+        ifneq ($(wildcard /usr/local/opt/openssl/lib/libcrypto.a),)
+           L+=/usr/local/opt/openssl/lib/libcrypto.a
+        else
            L+=-lcrypto
         endif
    endif
+endif
 
 # autodetect where libm is installed
 ifeq (${MLIB},)
   ifneq ($(wildcard /usr/lib64/libm.a),)
       MLIB=-lm
   endif
 endif
 ifeq (${MLIB},)
   MLIB=-lm
 endif
 
 # autodetect where png is installed
 ifeq (${PNGLIB},)
   ifneq ($(wildcard /usr/lib64/libpng.a),)
       PNGLIB=/usr/lib64/libpng.a
@@ -289,30 +297,39 @@
 ifeq (${ZLIB},)
   ZLIB=-lz
   ifneq ($(wildcard /opt/local/lib/libz.a),)
     ZLIB=/opt/local/lib/libz.a
   endif
   ifneq ($(wildcard /usr/lib64/libz.a),)
     ZLIB=/usr/lib64/libz.a
   endif
 endif
 
 #global external libraries
 L += $(kentSrc)/htslib/libhts.a
 
 L+=${PNGLIB} ${MLIB} ${ZLIB} ${ICONVLIB}
 HG_INC+=${PNGINCL}
+ifneq ($(wildcard /usr/local/Cellar/mariadb/10.4.12/include/mysql/mysql.h),)
+  HG_INC+=-I/usr/local/Cellar/mariadb/10.4.12/include/mysql
+endif
+ifneq ($(wildcard /usr/local/opt/openssl/include/openssl/hmac.h),)
+  HG_INC+=-I/usr/local/opt/openssl/include
+endif
+ifneq ($(wildcard /usr/local/Cellar/mariadb/10.4.12/lib/libmariadbclient.a),)
+  L+=/usr/local/Cellar/mariadb/10.4.12/lib/libmariadbclient.a
+endif
 
 # pass through COREDUMP
 ifneq (${COREDUMP},)
     HG_DEFS+=-DCOREDUMP
 endif
 
 # autodetect UCSC additional source code with password for some external tracks on gbib
 GBIBDIR = /hive/groups/browser/gbib/
 ifneq ($(wildcard ${GBIBDIR}/*.c),)
   HG_DEFS+=-DUSE_GBIB_PWD
   HG_INC += -I${GBIBDIR}
 endif
 
 SYS = $(shell uname -s)