message: Macos build fixes with unixodbc
diff: find_path(ODBC_INCLUDE_DIRECTORIES
  NAMES sql.h
  PATHS
  - /usr/include
  - /usr/include/odbc
  - /usr/include/iodbc
  /usr/local/include/libiodbc
  /usr/local/include
  /usr/local/include/odbc
  /usr/local/include/iodbc
  /usr/local/odbc/include
  /usr/local/iodbc/include
  + /usr/include
  + /usr/include/odbc
  + /usr/include/iodbc
  "C:/Program Files/ODBC/include"
  "C:/Program Files/Microsoft SDKs/Windows/v7.0/include"
  "C:/Program Files/Microsoft SDKs/Windows/v6.0a/include"
  @@ -35,25 +35,30 @@ find_path(ODBC_INCLUDE_DIRECTORIES
  )
  set(ODBC_LIBRARIES_PATHS
  - /usr/lib
  - /usr/lib/odbc
  - /usr/lib/iodbc
  /usr/local/lib
  /usr/local/lib/odbc
  /usr/local/lib/iodbc
  /usr/local/odbc/lib
  /usr/local/iodbc/lib
  + /usr/lib
  + /usr/lib/odbc
  + /usr/lib/iodbc
  "C:/Program Files/ODBC/lib"
  "C:/ODBC/lib/debug"
  "C:/Program Files (x86)/Microsoft SDKs/Windows/v7.0A/Lib"
  )
  find_library(ODBC_LIBRARIES
  - NAMES iodbc odbc odbc32
  + NAMES odbc odbc32
  PATHS ${ODBC_LIBRARIES_PATHS}
  DOC "Specify the ODBC driver manager library here."
  )
  +# Macos cheat: libiodbc is always installed, but sometimes we want to build with unixodbc, so searching iodbc after unixodbc:
  +if (NOT ODBC_LIBRARIES)
  + find_library(ODBC_LIBRARIES NAMES iodbc PATHS ${ODBC_LIBRARIES_PATHS})
  +endif()
  +
  if(NOT WIN32)
  if(ODBC_LIBRARIES MATCHES "iodbc")
  set(ODBC_IODBC 1)
  @@ -65,8 +70,11 @@ if(NOT WIN32)
  endif()
  -if (NOT WIN32 AND ODBC_IODBC OR (NOT UNICODE AND ODBC_UNIXODBC) )
  - find_library(ODBCINST_LIBRARIES NAMES iodbcinst odbcinst PATHS ${ODBC_LIBRARIES_PATHS})
  +if(NOT WIN32)
  + find_library(ODBCINST_LIBRARIES NAMES odbcinst PATHS ${ODBC_LIBRARIES_PATHS})
  + if(NOT ODBCINST_LIBRARIES)
  + find_library(ODBCINST_LIBRARIES NAMES iodbcinst PATHS ${ODBC_LIBRARIES_PATHS})
  + endif()
  list(APPEND ODBC_LIBRARIES ${ODBCINST_LIBRARIES})
  list(APPEND ODBC_LIBRARIES ${LTDL_LIBRARY})
  endif()
  @@ -86,4 +94,4 @@ find_package_handle_standard_args(ODBC
  mark_as_advanced(ODBC_FOUND ODBC_LIBRARIES ODBC_INCLUDE_DIRECTORIES)
  -message (STATUS "Using odbc: ${ODBC_INCLUDE_DIRECTORIES} : ${ODBC_LIBRARIES}")
  +message (STATUS "Using odbc: ${ODBC_INCLUDE_DIRECTORIES} : ${ODBC_LIBRARIES} ODBC_IODBC=${ODBC_IODBC} ODBC_UNIXODBC=${ODBC_UNIXODBC}")
  