File: MySQL.make

package info (click to toggle)
poco 1.14.2-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 56,460 kB
  • sloc: cpp: 340,542; ansic: 245,601; makefile: 1,742; yacc: 1,005; sh: 698; sql: 312; lex: 282; xml: 128; perl: 29; python: 24
file content (61 lines) | stat: -rw-r--r-- 1,763 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#
# MySQL.make
#
# Makefile fragment for finding MySQL headers and library
#

ifeq ($(OSNAME),Darwin)
  POCO_MYSQL_CONFIG = $(shell whereis -bq mysql_config)
else
  ifeq ($(OSNAME),Linux)
    POCO_MYSQL_CONFIG = $(shell which mysql_config)
  endif
endif

ifneq (, $(POCO_MYSQL_CONFIG))
  ifndef POCO_MYSQL_INCLUDE
    POCO_MYSQL_INCLUDE = $(shell mysql_config --include)
  endif
  ifndef POCO_MYSQL_LIB
    POCO_MYSQL_LIB = $(shell mysql_config --libs)
  endif
else
  ifndef POCO_MYSQL_INCLUDE
    ifeq (0, $(shell test -d /usr/local/include/mysql; echo $$?))
      POCO_MYSQL_INCLUDE = /usr/local/include
    else
      ifeq (0, $(shell test -d /usr/local/opt/mysql-client/include/mysql; echo $$?))
        POCO_MYSQL_INCLUDE = /usr/local/opt/mysql-client/include/mysql
      else
        ifeq (0, $(shell test -d /usr/local/opt/mysql-client/include; echo $$?))
          POCO_MYSQL_INCLUDE = /usr/local/opt/mysql-client/include
        else
          ifeq (0, $(shell test -d /opt/homebrew/opt/mysql-client/include; echo $$?))
            POCO_MYSQL_INCLUDE = /opt/homebrew/opt/mysql-client/include
          endif
        endif
      endif
    endif
  endif

  ifndef POCO_MYSQL_LIB
    ifeq (0, $(shell test -d /usr/local/include/mysql; echo $$?))
      POCO_MYSQL_LIB = /usr/local/lib
    else
      ifeq (0, $(shell test -d /usr/local/opt/mysql-client/lib; echo $$?))
        POCO_MYSQL_LIB = /usr/local/opt/mysql-client/lib
      else
        ifeq (0, $(shell test -d /opt/homebrew/opt/mysql-client/lib; echo $$?))
          POCO_MYSQL_LIB = /opt/homebrew/opt/mysql-client/lib
        endif
      endif
    endif
  endif
endif

ifdef POCO_MYSQL_INCLUDE
  INCLUDE += -I$(POCO_MYSQL_INCLUDE)
endif
ifdef POCO_MYSQL_LIB
  SYSLIBS += -L$(POCO_MYSQL_LIB)
endif