Skip to content

Commit

Permalink
Remove useless includes
Browse files Browse the repository at this point in the history
These useless includes prevented compile on kfreebsd
Close #1002
  • Loading branch information
razvancrainea committed Apr 14, 2017
1 parent 040e73a commit 50c406b
Show file tree
Hide file tree
Showing 18 changed files with 78 additions and 21 deletions.
3 changes: 0 additions & 3 deletions modules/auth_aaa/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,4 @@
include ../../Makefile.defs
auto_gen=
NAME=auth_aaa.so
DEFS+=-I$(LOCALBASE)/include
LIBS=

include ../../Makefile.modules
4 changes: 4 additions & 0 deletions modules/cachedb_couchbase/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@ include ../../Makefile.defs
auto_gen=
NAME=cachedb_couchbase.so

ifeq ($(CROSS_COMPILE),)
LIB=-lcouchbase
else
DEFS+=-I$(LOCALBASE)/include
LIBS=-L$(LOCALBASE)/lib -lcouchbase
endif

include ../../Makefile.modules
5 changes: 5 additions & 0 deletions modules/cachedb_memcached/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,12 @@
include ../../Makefile.defs
auto_gen=
NAME=cachedb_memcached.so

ifeq ($(CROSS_COMPILE),)
LIBS=-lmemcached
else
DEFS+=-I$(LOCALBASE)/include
LIBS=-L$(LOCALBASE)/lib -lmemcached
endif

include ../../Makefile.modules
4 changes: 4 additions & 0 deletions modules/cachedb_redis/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@ include ../../Makefile.defs
auto_gen=
NAME=cachedb_redis.so

ifeq ($(CROSS_COMPILE),)
LIBS=-lhiredis
else
DEFS+=-I$(LOCALBASE)/include
LIBS=-L$(LOCALBASE)/lib -lhiredis
endif

include ../../Makefile.modules
9 changes: 7 additions & 2 deletions modules/db_berkeley/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ NAME=db_berkeley.so
SCRIPTS_DIR?=../../scripts/
UTILS_DIR?=../../utils/


ifeq ($(CROSS_COMPILE),)
DB_LIB?=ldb
else
DEFS +=-I$(LOCALBASE)/include -I$(LOCALBASE)/BerkeleyDB.4.6/include \
-I$(SYSBASE)/include -I$(LOCALBASE)/include/db46

Expand All @@ -25,9 +29,10 @@ ifeq ($(IS_BSD), yes)
else
DB_LIB=ldb
endif
LIBS=-L$(LOCALBASE)/lib -L$(SYSBASE)/lib -L$(LOCALBASE)/BerkeleyDB.4.6/lib
endif

LIBS=-L$(LOCALBASE)/lib -L$(SYSBASE)/lib -L$(LOCALBASE)/BerkeleyDB.4.6/lib \
-$(DB_LIB)
LIBS+=-$(DB_LIB)

include ../../Makefile.modules

Expand Down
5 changes: 4 additions & 1 deletion modules/db_http/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,20 @@ include ../../Makefile.defs
auto_gen=
NAME=db_http.so

ifeq ($(CROSS_COMPILE),)
HAS_BUILDER = $(shell if which curl-config >/dev/null 2>/dev/null;then echo YES; fi)

ifeq ($(HAS_BUILDER),YES)
# use autodetection
DEFS += $(shell curl-config --cflags)
LIBS = $(shell curl-config --libs)
else
LIBS = -lcurl
endif
else
# use standard know paths
DEFS +=-I$(LOCALBASE)/include
LIBS =-L$(LOCALBASE)/lib -lcurl
endif


include ../../Makefile.modules
4 changes: 4 additions & 0 deletions modules/db_unixodbc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,15 @@ include ../../Makefile.defs
auto_gen=
NAME=db_unixodbc.so

ifeq ($(CROSS_COMPILE),)
LIBS= -lodbc
else
# sql.h locations (freebsd,openbsd solaris)
DEFS += -I$(LOCALBASE)/include -I$(LOCALBASE)/include/odbc

# libodbc locations on RH/Suse, Solaris /OpenBSD, FreeBSD
# (Debian does the right thing and puts it in /usr/lib)
LIBS= -L$(LOCALBASE)/lib -lodbc
endif

include ../../Makefile.modules
11 changes: 5 additions & 6 deletions modules/event_rabbitmq/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,15 @@ RABBITMQ_BUILDER = $(shell \
if pkg-config --exists librabbitmq; then \
echo 'pkg-config librabbitmq'; \
fi)
endif

ifeq ($(RABBITMQ_BUILDER),)
DEFS+=-I$(LOCALBASE)/include
LIBS=-L$(LOCALBASE)/lib -lrabbitmq
else
ifneq ($(RABBITMQ_BUILDER),)
DEFS += $(shell $(RABBITMQ_BUILDER) --cflags)
LIBS += $(shell $(RABBITMQ_BUILDER) --libs)
endif

else
DEFS+=-I$(LOCALBASE)/include
LIBS=-L$(LOCALBASE)/lib -lrabbitmq
endif

include ../../Makefile.modules

4 changes: 4 additions & 0 deletions modules/jabber/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,12 @@ NAME=jabber.so
DEFS+=-DXJ_EXTRA_DEBUG
# -DHAVE_IHTTP

ifeq ($(CROSS_COMPILE),)
LIBS=-lexpat
else
# expat.h location
DEFS+=-I$(LOCALBASE)/include
LIBS=-L$(LOCALBASE)/lib -lexpat
endif

include ../../Makefile.modules
9 changes: 7 additions & 2 deletions modules/lua/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,13 @@ FLAGS_LUA = $(shell pkg-config --cflags lua5.1 2> /dev/null) $(shell pkg-config
ifeq (,$(findstring -l,$(LIB_LUA)))
LIB_LUA = -llua
endif
DEFS += $(shell $(MYSQLCFG) --include | sed 's/\(-I.*\)\/mysql/\1/g' ) -I/usr/include/lua5.1/ -I$(LOCALBASE)/include/memcached $(FLAGS_LUA)
LIBS += $(shell $(MYSQLCFG) --libs) -L/usr/lib/ -L/usr/local/lib/ -lmemcached $(LIB_LUA)
DEFS += $(shell $(MYSQLCFG) --include | sed 's/\(-I.*\)\/mysql/\1/g' ) -I/usr/include/lua5.1/ $(FLAGS_LUA)
LIBS += $(shell $(MYSQLCFG) --libs) -lmemcached $(LIB_LUA)

ifneq ($(CROSS_COMPILE),)
DEFS += -I$(LOCALBASE)/include/memcached
LIBS = -L$(LOCALBASE)/lib $(LIBS)
endif

include ../../Makefile.modules

Expand Down
7 changes: 6 additions & 1 deletion modules/mmgeoip/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,12 @@
include ../../Makefile.defs
auto_gen=
NAME=mmgeoip.so
#LIBS+=-lGeoIP

ifeq ($(CROSS_COMPILE),)
LIBS=-lGeoIP
else
LIBS=-L$(LOCALBASE)/lib -lGeoIP
DEFS+=-I$(LOCALBASE)/include
endif

include ../../Makefile.modules
3 changes: 1 addition & 2 deletions modules/peering/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
include ../../Makefile.defs
auto_gen=
NAME=peering.so
DEFS+= -DWITH_RADIUS_SUPPORT -I$(LOCALBASE)/include
LIBS=
DEFS+= -DWITH_RADIUS_SUPPORT

include ../../Makefile.modules
5 changes: 5 additions & 0 deletions modules/presence/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,13 @@ include ../../Makefile.defs
auto_gen=
NAME=presence.so

ifeq ($(CROSS_COMPILE),)
LIBS=-lxml2
DEFS+=-I$(SYSBASE)/include/libxml2
else
DEFS+=-I$(SYSBASE)/include/libxml2 -I$(LOCALBASE)/include/libxml2 \
-I$(LOCALBASE)/include
LIBS=-L$(SYSBASE)/include/lib -L$(LOCALBASE)/lib -lxml2
endif

include ../../Makefile.modules
5 changes: 5 additions & 0 deletions modules/presence_xml/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,13 @@ include ../../Makefile.defs
auto_gen=
NAME=presence_xml.so

ifeq ($(CROSS_COMPILE),)
LIBS=-lxml2
DEFS+=-I$(SYSBASE)/include/libxml2
else
DEFS+=-I$(SYSBASE)/include/libxml2 -I$(LOCALBASE)/include/libxml2 \
-I$(LOCALBASE)/include
LIBS=-L$(SYSBASE)/include/lib -L$(LOCALBASE)/lib -lxml2
endif

include ../../Makefile.modules
5 changes: 5 additions & 0 deletions modules/pua_dialoginfo/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,13 @@ include ../../Makefile.defs
auto_gen=
NAME=pua_dialoginfo.so

ifeq ($(CROSS_COMPILE),)
LIBS=-lxml2
DEFS+=-I$(SYSBASE)/include/libxml2
else
DEFS+=-I$(SYSBASE)/include/libxml2 -I$(LOCALBASE)/include/libxml2 \
-I$(LOCALBASE)/include
LIBS=-L$(SYSBASE)/include/lib -L$(LOCALBASE)/lib -lxml2
endif

include ../../Makefile.modules
4 changes: 2 additions & 2 deletions modules/snmpstats/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,13 @@ include ../../Makefile.defs

HAS_BUILDER = $(shell if which net-snmp-config >/dev/null 2>/dev/null;then echo YES; fi)

ifeq ($(CROSS_COMPILE),)
ifeq ($(HAS_BUILDER),YES)
# use autodetection
DEFS += $(shell net-snmp-config --cflags)
LIBS = $(shell net-snmp-config --netsnmp-agent-libs --external-agent-libs)
INSTALLMIBDIR = $(cfg_prefix)$(shell net-snmp-config --prefix)/share/snmp/mibs
endif
else
# use standard know paths
DEFS +=-I$(LOCALBASE)/include
Expand All @@ -19,12 +21,10 @@ else
INSTALLMIBDIR = $(cfg_prefix)/share/snmp/mibs
endif


CFLAGS+=
auto_gen=
NAME=snmpstats.so


include ../../Makefile.modules

install_module_custom:
Expand Down
8 changes: 6 additions & 2 deletions modules/xmpp/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,12 @@ auto_gen=
NAME=xmpp.so
LIBS=

ifeq ($(CROSS_COMPILE),)
LIBS=-lexpat
else
# expat.h location
DEFS += -I$(LOCALBASE)/include
LIBS = -L$(LOCALBASE)/lib -lexpat
DEFS+=-I$(LOCALBASE)/include
LIBS=-L$(LOCALBASE)/lib -lexpat
endif

include ../../Makefile.modules
4 changes: 4 additions & 0 deletions utils/db_berkeley/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,16 @@ NAME=bdb_recover

include ../../Makefile.sources

ifeq ($(CROSS_COMPILE),)
LIBS=-ldb
else
# if you want to tune or reset flags
#DEFS:=-DEXTRA_DEBUG -I$(LOCALBASE)/BerkeleyDB.4.6/include
DEFS+=-I$(LOCALBASE)/include -I$(LOCALBASE)/BerkeleyDB.4.6/include \
-I$(SYSBASE)/include

LIBS=-L$(LOCALBASE)/lib -L$(SYSBASE)/lib -L$(LOCALBASE)/BerkeleyDB.4.6/lib -ldb
endif

include ../../Makefile.rules

Expand Down

0 comments on commit 50c406b

Please sign in to comment.