630afe3b1e9cfddb738dadfd77bcde6b74c15dbf
hiram
  Sat Jan 5 16:20:18 2019 -0800
using some static libraries on ubuntu with gcc-7 no redmine

diff --git src/inc/common.mk src/inc/common.mk
index b8cf5c28..276f61b 100644
--- src/inc/common.mk
+++ src/inc/common.mk
@@ -71,32 +71,36 @@
 
 
 # libssl: disabled by default
 ifneq (${SSL_DIR}, "/usr/include/openssl")
   ifneq ($(UNAME_S),Darwin)
     ifneq ($(wildcard ${SSL_DIR}),)
       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 /usr/lib/x86_64-linux-gnu/libssl.a),)
+	L+=/usr/lib/x86_64-linux-gnu/libssl.a -lcrypto
+   else
 	L+=-lssl -lcrypto
    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
@@ -128,30 +132,35 @@
       PNGINCL=-I/opt/local/include
   else
       PNGINCL := $(shell libpng-config --I_opts  || true)
 #       $(info using libpng-config to set PNGINCL: ${PNGINCL})
   endif
 endif
 
 # autodetect where mysql includes and libraries are installed
 # do not need to do this during 'clean' target (this is very slow for 'clean')
 ifneq ($(MAKECMDGOALS),clean)
   # on hgwdev, use the static library.
   ifeq (${IS_HGWDEV},yes)
     MYSQLINC=/usr/include/mysql
     MYSQLLIBS=/usr/lib64/libmysqlclient.a /usr/lib64/libssl.a /usr/lib64/libcrypto.a -lkrb5 -ldl -lz
   endif
+  ifeq (${MYSQLLIBS},)
+    ifneq ($(wildcard /usr/lib/x86_64-linux-gnu/libmysqlclient.a),)
+	  MYSQLLIBS=/usr/lib/x86_64-linux-gnu/libmysqlclient.a -ldl
+    endif
+  endif
   # this does *not* work on Mac OSX with the dynamic libraries
   ifneq ($(UNAME_S),Darwin)
     ifeq (${MYSQLLIBS},)
       MYSQLLIBS := $(shell mysql_config --libs || true)
 #        $(info using mysql_config to set MYSQLLIBS: ${MYSQLLIBS})
     endif
   endif
 
   ifeq (${MYSQLINC},)
     MYSQLINC := $(shell mysql_config --include | sed -e 's/-I//' || true)
 #        $(info using mysql_config to set MYSQLINC: ${MYSQLINC})
   endif
   ifeq (${MYSQLINC},)
     ifneq ($(wildcard /usr/local/mysql/include/mysql.h),)
 	  MYSQLINC=/usr/local/mysql/include