~ubuntu-branches/debian/sid/kamailio/sid

« back to all changes in this revision

Viewing changes to .pc/no_lib64_on_64_bits.patch/Makefile.defs

  • Committer: Package Import Robot
  • Author(s): Victor Seva
  • Date: 2014-01-06 11:47:13 UTC
  • mfrom: (1.1.5)
  • Revision ID: package-import@ubuntu.com-20140106114713-t8xidp4arzrnyeya
Tags: 4.1.1-1
* New upstream release
* debian/patches:
  - add upstream fixes
* Added tls outbound websocket autheph dnssec modules
  - openssl exception added to their license
* removing sparc and ia64 from supported archs
  for mono module (Closes: #728915)

Show diffs side-by-side

added added

removed removed

Lines of Context:
155
155
 
156
156
# application server support on
157
157
WITHAS ?= 1
 
158
# enable core hooks for SCTP
 
159
SCTP ?= 1
158
160
 
159
161
# what to install
160
162
INSTALL_FLAVOUR=$(FLAVOUR)
161
163
 
162
 
#version number
 
164
# version number
163
165
VERSION = 4
164
 
PATCHLEVEL = 0
165
 
SUBLEVEL = 4
166
 
EXTRAVERSION = 
 
166
PATCHLEVEL = 1
 
167
SUBLEVEL =  1
 
168
EXTRAVERSION =
167
169
 
168
170
# memory manager switcher
169
171
# 0 - f_malloc (fast malloc)
172
174
# memory debugger switcher
173
175
# 0 - off (no-debug mode)
174
176
# 1 - on (debug mode)
175
 
MEMDBG ?= 0
 
177
MEMDBG ?= 1
176
178
 
177
179
SER_VER = $(shell expr $(VERSION) \* 1000000 + $(PATCHLEVEL) \* 1000 + \
178
180
                        $(SUBLEVEL) )
271
273
                                        else \
272
274
                                                $(CC) -V 2>&1 ; \
273
275
                                        fi )
 
276
CC_OPT ?= -O9
274
277
MKTAGS=ctags
275
278
 
276
279
#find-out the compiler's name
332
335
        CC_FULLVER:=$(shell echo "$(CC_LONGVER)" | head -n 1 |  sed -e 's/.*version \([0-9]\.[0-9]\).*/\1/g' )
333
336
        CC_SHORTVER:=$(shell echo "$(CC_FULLVER)" | cut -d. -f1,2 )
334
337
        CC_VER=$(CC) $(CC_FULLVER)
 
338
        CC_OPT=-O3
335
339
        MKDEP=$(CC) -MM 
336
340
endif
337
341
 
647
651
# -DPROFILING
648
652
#               if enabled profiling will be enabled for child processes
649
653
#               Don't forget to set PROFILE (see below)
650
 
# -DUSE_STUN
651
 
#               compiles in stun support
652
654
# -DNO_SIG_DEBUG
653
655
#        turns off debugging messages in signal handlers (which might be 
654
656
#         unsafe)
682
684
         -DPKG_MALLOC \
683
685
         -DSHM_MEM  -DSHM_MMAP \
684
686
         -DDNS_IP_HACK \
685
 
         -DUSE_IPV6 \
686
687
         -DUSE_MCAST \
687
688
         -DUSE_TCP \
688
689
         -DDISABLE_NAGLE \
752
753
        C_DEFS+= -DWITH_AS_SUPPORT
753
754
endif
754
755
 
755
 
ifneq ($(STUN),)
756
 
        C_DEFS+= -DUSE_STUN
757
 
endif
758
 
 
759
756
ifeq ($(mode),)
760
757
        mode = release
761
758
endif
843
840
 
844
841
ifeq ($(ARCH), arm6)
845
842
        use_fast_lock=yes
 
843
        C_DEFS+=-DNOSMP # very unlikely to have an smp arm
846
844
endif
847
845
 
848
846
ifeq ($(ARCH), ppc)
891
889
ifeq            ($(CC_NAME), gcc) 
892
890
                                C_DEFS+=-DCC_GCC_LIKE_ASM
893
891
                                #common stuff
894
 
                                CFLAGS=-g -O9 -funroll-loops  -Wcast-align $(PROFILE)
 
892
                                CFLAGS=-g $(CC_OPT) -funroll-loops  -Wcast-align $(PROFILE)
895
893
                        #if gcc 4.5+ or 4.2+
896
894
ifeq (,$(strip $(filter-out 4.2+ 4.5+,$(CC_SHORTVER))))
897
895
$(call                          set_if_empty,CPU,athlon64)
949
947
$(call                          set_if_empty,CPU,athlon64)
950
948
                                        C_DEFS+=-DCC_GCC_LIKE_ASM
951
949
                                        CFLAGS+=-m32
952
 
                                                -O9      \
953
 
                                                         \
 
950
                                                $(CC_OPT) \
 
951
                                                          \
954
952
                                                -mtune=$(CPU)
955
953
                                        LDFLAGS+=-m32
956
954
else                    # CC_NAME, clang
976
974
ifeq            ($(CC_NAME), gcc)
977
975
                                C_DEFS+=-DCC_GCC_LIKE_ASM
978
976
                                #common stuff
979
 
                                CFLAGS=-g -O9 -funroll-loops  -Wcast-align $(PROFILE)
 
977
                                CFLAGS=-g $(CC_OPT) -funroll-loops  -Wcast-align $(PROFILE)
980
978
                        #if gcc 4.5+
981
979
                        # don't add '-mtune=$(CPU)' - gcc failure
982
980
ifeq                    ($(CC_SHORTVER), 4.5+)
1045
1043
$(call                          set_if_empty,CPU,opteron)
1046
1044
                                        C_DEFS+=-DCC_GCC_LIKE_ASM
1047
1045
                                        CFLAGS+=-m64 \
1048
 
                                                -O9        
 
1046
                                                $(CC_OPT)        
1049
1047
                                        LDFLAGS+=-m64
1050
1048
else            # CC_NAME, clang
1051
1049
ifeq            ($(CC_NAME), icc)
1070
1068
ifeq            ($(CC_NAME), gcc)
1071
1069
                                C_DEFS+=-DCC_GCC_LIKE_ASM -DSPARC64_MODE
1072
1070
                                #common stuff
1073
 
                                CFLAGS=-g -O9 -funroll-loops  $(PROFILE) \
 
1071
                                CFLAGS=-g $(CC_OPT) -funroll-loops  $(PROFILE) \
1074
1072
                                        #-Wcast-align \
1075
1073
                                        #-Wmissing-prototypes 
1076
1074
                                #if gcc 4.5+ or 4.2+
1161
1159
ifeq            ($(CC_NAME), gcc)
1162
1160
                                C_DEFS+=-DCC_GCC_LIKE_ASM
1163
1161
                                #common stuff
1164
 
                                CFLAGS=-g -O9 -funroll-loops  $(PROFILE) \
 
1162
                                CFLAGS=-g $(CC_OPT) -funroll-loops  $(PROFILE) \
1165
1163
                                        #-Wcast-align \
1166
1164
                                        #-Wmissing-prototypes 
1167
1165
                                #if gcc 4.5+ or 4.2+
1226
1224
ifeq            ($(CC_NAME), gcc)
1227
1225
                                C_DEFS+=-DCC_GCC_LIKE_ASM
1228
1226
                                #common stuff
1229
 
                                CFLAGS=-marm -march=armv5t -O9 -funroll-loops -fsigned-char $(PROFILE)
 
1227
                                CFLAGS=-marm -march=armv5t $(CC_OPT) -funroll-loops -fsigned-char $(PROFILE)
1230
1228
                        #if gcc 4.5+ or 4.2+
1231
1229
ifeq (,$(strip $(filter-out 4.2+ 4.5+,$(CC_SHORTVER))))
1232
1230
                                        CFLAGS+= -ftree-vectorize -fno-strict-overflow
1274
1272
ifeq            ($(CC_NAME), gcc)
1275
1273
                                C_DEFS+=-DCC_GCC_LIKE_ASM
1276
1274
                                #common stuff
1277
 
                                CFLAGS=-march=armv6 -O9 -funroll-loops -fsigned-char \
 
1275
                                CFLAGS=-march=armv6 $(CC_OPT) -funroll-loops -fsigned-char \
1278
1276
                                                $(PROFILE)
1279
1277
                        #if gcc 4.5+ or 4.2+
1280
1278
ifeq (,$(strip $(filter-out 4.2+ 4.5+,$(CC_SHORTVER))))
1321
1319
ifeq            ($(CC_NAME), gcc)
1322
1320
                                C_DEFS+=-DCC_GCC_LIKE_ASM
1323
1321
                                #common stuff
1324
 
                                CFLAGS=-O9 -funroll-loops  $(PROFILE)
 
1322
                                CFLAGS=$(CC_OPT) -funroll-loops  $(PROFILE)
1325
1323
                        #if gcc 4.5+ or 4.2+
1326
1324
ifeq (,$(strip $(filter-out 4.2+ 4.5+,$(CC_SHORTVER))))
1327
1325
                                        CFLAGS+=-march=r3000 -minline-all-stringops \
1368
1366
ifeq            ($(CC_NAME), gcc)
1369
1367
                                C_DEFS+=-DCC_GCC_LIKE_ASM
1370
1368
                                #common stuff
1371
 
                                CFLAGS= -mips2 -O9 -funroll-loops $(PROFILE)
 
1369
                                CFLAGS= -mips2 $(CC_OPT) -funroll-loops $(PROFILE)
1372
1370
                        #if gcc 4.5+ or 4.2+
1373
1371
ifeq (,$(strip $(filter-out 4.2+ 4.5+,$(CC_SHORTVER))))
1374
1372
                                        CFLAGS+=-minline-all-stringops -ftree-vectorize \
1413
1411
ifeq            ($(CC_NAME), gcc)
1414
1412
                                C_DEFS+=-DCC_GCC_LIKE_ASM
1415
1413
                                #common stuff
1416
 
                                CFLAGS= -mips64 -O9 -funroll-loops $(PROFILE)
 
1414
                                CFLAGS= -mips64 $(CC_OPT) -funroll-loops $(PROFILE)
1417
1415
                        #if gcc 4.5+ or 4.2+
1418
1416
ifeq (,$(strip $(filter-out 4.2+ 4.5+,$(CC_SHORTVER))))
1419
1417
                                        CFLAGS+=-minline-all-stringops -ftree-vectorize \
1458
1456
ifeq            ($(CC_NAME), gcc)
1459
1457
                                C_DEFS+=-DCC_GCC_LIKE_ASM
1460
1458
                                #common stuff
1461
 
                                CFLAGS= -O9 -funroll-loops $(PROFILE)
 
1459
                                CFLAGS= $(CC_OPT) -funroll-loops $(PROFILE)
1462
1460
                        #if gcc 4.5 or 4.2+
1463
1461
ifeq (,$(strip $(filter-out 4.2+ 4.5+,$(CC_SHORTVER))))
1464
1462
                                        CFLAGS+= -fno-strict-overflow
1504
1502
ifeq            ($(CC_NAME), gcc)
1505
1503
                                C_DEFS+=-DCC_GCC_LIKE_ASM
1506
1504
                                #common stuff
1507
 
                                CFLAGS= -O9 -funroll-loops -fsigned-char $(PROFILE)
 
1505
                                CFLAGS= $(CC_OPT) -funroll-loops -fsigned-char $(PROFILE)
1508
1506
                        #if gcc 4.5+ or 4.2+
1509
1507
ifeq (,$(strip $(filter-out 4.2+ 4.5+,$(CC_SHORTVER))))
1510
1508
$(call                          set_if_empty,CPU,powerpc)
1553
1551
ifeq            ($(CC_NAME), gcc)
1554
1552
                                C_DEFS+=-DCC_GCC_LIKE_ASM
1555
1553
                                #common stuff
1556
 
                                CFLAGS= -O9 -funroll-loops -fsigned-char $(PROFILE)
 
1554
                                CFLAGS= $(CC_OPT) -funroll-loops -fsigned-char $(PROFILE)
1557
1555
                        #if gcc 4.5+ or 4.2+
1558
1556
ifeq (,$(strip $(filter-out 4.2+ 4.5+,$(CC_SHORTVER))))
1559
1557
$(call                          set_if_empty,CPU,powerpc64)
1765
1763
                        LIBS+=-lpthread
1766
1764
                endif
1767
1765
        endif
1768
 
        ifneq (,$(findstring -DUSE_DNSSEC, $(C_DEFS)))
1769
 
                LIBS+=-lval-threads -lcrypto -lsres -lpthread
1770
 
$(info "using libval for DNSSEC validation")
1771
 
        endif
1772
1766
        # check for >= 2.5.44
1773
1767
 
1774
1768
        ifeq ($(shell [ $(OSREL_N) -ge 2005044 ] && echo has_epoll), has_epoll)
1794
1788
        ifeq ($(NO_SELECT),)
1795
1789
                C_DEFS+=-DHAVE_SELECT
1796
1790
        endif
1797
 
        # sctp support
1798
 
        ifeq ($(SCTP),1)
1799
 
                # test to see if the devfiles and lib are installed
1800
 
                sctp_dev_locations := /usr/include/netinet/sctp.h \
1801
 
                                                                $(LOCALBASE)/include/netinet/sctp.h
1802
 
                sctp_lib_locations := /usr/lib/libsctp.so \
1803
 
                                                                /usr/lib64/libsctp.so \
1804
 
                                                                $(LOCALBASE)/usr/local/lib/libsctp.so
1805
 
                sctp_dev_path := $(wildcard $(sctp_dev_locations))
1806
 
                sctp_lib_path := $(wildcard $(sctp_lib_locations))
1807
 
                ifeq ($(sctp_dev_path),)
1808
 
$(info "sctp development files not installed -- sctp disabled")
1809
 
                        override SCTP := 
1810
 
                endif
1811
 
                ifeq ($(sctp_lib_path),)
1812
 
$(info "sctp libraries not installed -- sctp disabled")
1813
 
                        override SCTP := 
1814
 
                endif
1815
 
                
1816
 
                ifeq ($(SCTP),1)
1817
 
                        # use lksctp
1818
 
                        C_DEFS+=-DUSE_SCTP
1819
 
                        LIBS+=-lsctp
1820
 
                endif
1821
 
        endif # SCTP
1822
1791
endif
1823
1792
 
1824
1793
ifeq  ($(OS), solaris)
1893
1862
                C_DEFS+=-DHAVE_SELECT
1894
1863
        endif
1895
1864
        YACC=yacc
1896
 
        # sctp support
1897
 
        ifeq ($(SCTP),1)
1898
 
                # test to see if the devfiles and lib are installed
1899
 
                sctp_dev_locations := /usr/include/netinet/sctp.h \
1900
 
                                                                $(LOCALBASE)/include/netinet/sctp.h
1901
 
                sctp_dev_path := $(wildcard $(sctp_dev_locations))
1902
 
                ifeq ($(sctp_dev_path),)
1903
 
$(info "sctp development files not installed -- sctp disabled")
1904
 
                        override SCTP := 
1905
 
                endif
1906
 
                ifeq ($(shell [ $(OSREL_N) -lt 7000 ] && echo sctp), sctp)
1907
 
$(info "old freebsd version (>= 7.0 needed) -- sctp disabled")
1908
 
                        override SCTP := 
1909
 
                endif
1910
 
                
1911
 
                ifeq ($(SCTP),1)
1912
 
                        C_DEFS+=-DUSE_SCTP
1913
 
                        LIBS+=  # no extra libs needed on freebsd
1914
 
                endif
1915
 
        endif # SCTP
1916
1865
endif
1917
1866
 
1918
1867
ifeq ($(OS), dragonfly)
1935
1884
                C_DEFS+=-DHAVE_SELECT
1936
1885
        endif
1937
1886
        YACC=yacc
1938
 
        # sctp support
1939
 
        ifeq ($(SCTP),1)
1940
 
                # test to see if the devfiles and lib are installed
1941
 
                sctp_dev_locations := /usr/include/netinet/sctp.h \
1942
 
                                                                $(LOCALBASE)/include/netinet/sctp.h
1943
 
                sctp_dev_path := $(wildcard $(sctp_dev_locations))
1944
 
                ifeq ($(sctp_dev_path),)
1945
 
$(info "sctp development files not installed -- sctp disabled")
1946
 
                        override SCTP :=
1947
 
                endif
1948
 
                # FIXME: don't know what's the status of SCTP on dragonfly
1949
 
                #        (we suppose the 2.6 version is >= the version in
1950
 
                #         in freebsd 7.0)
1951
 
                ifeq ($(shell [ $(OSREL_N) -lt 2006 ] && echo sctp), sctp)
1952
 
$(info "old dragonfly version (>= 2.6 needed) -- sctp disabled")
1953
 
                        override SCTP :=
1954
 
                endif
1955
 
                
1956
 
                ifeq ($(SCTP),1)
1957
 
                        C_DEFS+=-DUSE_SCTP
1958
 
                        LIBS+=  # no extra libs needed on freebsd
1959
 
                endif
1960
 
        endif # SCTP
1961
1887
endif
1962
1888
 
1963
1889
ifeq ($(OS), openbsd)
2064
1990
endif
2065
1991
 
2066
1992
ifneq (,$(findstring cygwin, $(OS)))
2067
 
        # cygwin doesn't support IPV6 and doesn't support fd passing so no TCP
2068
 
        #C_DEFS:=$(filter-out -DUSE_IPV6 -DUSE_TCP, $(C_DEFS))
2069
 
        DEFS_RM+=-DUSE_IPV6 -DUSE_TCP
 
1993
        # cygwin does support IPV6 starting from version 1.7, but (still?) doesn't support fd passing so no TCP
 
1994
        #C_DEFS:=$(filter-out -DUSE_TCP, $(C_DEFS))
 
1995
        DEFS_RM+=-DUSE_TCP
2070
1996
        C_DEFS+=-DHAVE_UNION_SEMUN -DHAVE_SCHED_YIELD \
2071
1997
                        -DHAVE_MSG_NOSIGNAL -DHAVE_MSGHDR_MSG_CONTROL -DHAVE_ALLOCA_H \
2072
1998
                        -DHAVE_TIMEGM -DHAVE_SCHED_SETSCHEDULER
2100
2026
#       E.g.: make CORE_TLS=1 EXTRA_TLS_LIBS="-lz -lkrb5"
2101
2027
endif
2102
2028
 
2103
 
ifneq ($(STUN),)
2104
 
C_INCLUDES+= -I$(LOCALBASE)/ssl/include
2105
 
LIBS+= -L$(LOCALBASE)/lib -L$(LOCALBASE)/ssl/lib -lcrypto
2106
 
endif
2107
 
 
2108
2029
ifneq ($(found_lock_method), yes)
2109
2030
$(warning       No locking method found so far, trying SYS V sems)
2110
2031
                C_DEFS+= -DUSE_SYSV_SEM  # try sys v sems