Browse Source

Use system libbloom on USE_SYSTEM_SHARED_LIB

pull/1352/head
Felix Yan 7 years ago
committed by Max Lv
parent
commit
0334e73c2b
3 changed files with 9 additions and 10 deletions
  1. 2
      Makefile.am
  2. 9
      configure.ac
  3. 8
      src/Makefile.am

2
Makefile.am

@ -1,5 +1,5 @@
if USE_SYSTEM_SHARED_LIB if USE_SYSTEM_SHARED_LIB
SUBDIRS = src libbloom
SUBDIRS = src
else else
SUBDIRS = libcork libipset libbloom src SUBDIRS = libcork libipset libbloom src
endif endif

9
configure.ac

@ -46,9 +46,9 @@ AM_CONDITIONAL([ENABLE_DOCUMENTATION], [test x$disable_documentation = xfalse])
AM_COND_IF([ENABLE_DOCUMENTATION], [ AM_COND_IF([ENABLE_DOCUMENTATION], [
AC_PATH_PROG([ASCIIDOC], [asciidoc]) AC_PATH_PROG([ASCIIDOC], [asciidoc])
test x"${ASCIIDOC}" != x || AC_MSG_ERROR([Cannot find `asciidoc` in PATH.])
test x"${ASCIIDOC}" != x || AC_MSG_ERROR([Cannot find `asciidoc` in PATH.])
AC_PATH_PROG([XMLTO], [xmlto]) AC_PATH_PROG([XMLTO], [xmlto])
test x"$XMLTO" != x || AC_MSG_ERROR([Cannot find `xmlto` in PATH.])
test x"$XMLTO" != x || AC_MSG_ERROR([Cannot find `xmlto` in PATH.])
AC_PATH_PROG([GZIP], [gzip], [gzip]) AC_PATH_PROG([GZIP], [gzip], [gzip])
AC_PATH_PROG([MV], [mv], [mv]) AC_PATH_PROG([MV], [mv], [mv])
AC_PROG_SED AC_PROG_SED
@ -230,12 +230,11 @@ AC_CHECK_LIB([ev], [ev_loop_destroy], [LIBS="-lev $LIBS"], [AC_MSG_ERROR([Couldn
AC_CONFIG_FILES([shadowsocks-libev.pc AC_CONFIG_FILES([shadowsocks-libev.pc
Makefile Makefile
src/Makefile
libbloom/Makefile])
src/Makefile])
AM_COND_IF([USE_SYSTEM_SHARED_LIB], AM_COND_IF([USE_SYSTEM_SHARED_LIB],
[AC_DEFINE([USE_SYSTEM_SHARED_LIB], [1], [Define if use system shared lib.])], [AC_DEFINE([USE_SYSTEM_SHARED_LIB], [1], [Define if use system shared lib.])],
[AC_CONFIG_FILES([libcork/Makefile libipset/Makefile])])
[AC_CONFIG_FILES([libbloom/Makefile libcork/Makefile libipset/Makefile])])
AM_COND_IF([ENABLE_DOCUMENTATION], AM_COND_IF([ENABLE_DOCUMENTATION],
[AC_CONFIG_FILES([doc/Makefile]) [AC_CONFIG_FILES([doc/Makefile])

8
src/Makefile.am

@ -2,20 +2,20 @@ VERSION_INFO = 2:0:0
AM_CFLAGS = -g -O2 -Wall -Werror -Wno-deprecated-declarations -fno-strict-aliasing -std=gnu99 -D_GNU_SOURCE AM_CFLAGS = -g -O2 -Wall -Werror -Wno-deprecated-declarations -fno-strict-aliasing -std=gnu99 -D_GNU_SOURCE
AM_CFLAGS += $(PTHREAD_CFLAGS) AM_CFLAGS += $(PTHREAD_CFLAGS)
AM_CFLAGS += -I$(top_srcdir)/libbloom
if !USE_SYSTEM_SHARED_LIB if !USE_SYSTEM_SHARED_LIB
AM_CFLAGS += -I$(top_srcdir)/libbloom
AM_CFLAGS += -I$(top_srcdir)/libipset/include AM_CFLAGS += -I$(top_srcdir)/libipset/include
AM_CFLAGS += -I$(top_srcdir)/libcork/include AM_CFLAGS += -I$(top_srcdir)/libcork/include
endif endif
AM_CFLAGS += $(LIBPCRE_CFLAGS) AM_CFLAGS += $(LIBPCRE_CFLAGS)
SS_COMMON_LIBS = $(INET_NTOP_LIB) $(LIBPCRE_LIBS) SS_COMMON_LIBS = $(INET_NTOP_LIB) $(LIBPCRE_LIBS)
SS_COMMON_LIBS += $(top_builddir)/libbloom/libbloom.la
if !USE_SYSTEM_SHARED_LIB if !USE_SYSTEM_SHARED_LIB
SS_COMMON_LIBS += $(top_builddir)/libipset/libipset.la \
SS_COMMON_LIBS += $(top_builddir)/libbloom/libbloom.la \
$(top_builddir)/libipset/libipset.la \
$(top_builddir)/libcork/libcork.la $(top_builddir)/libcork/libcork.la
else else
SS_COMMON_LIBS += -lcork -lcorkipset
SS_COMMON_LIBS += -lbloom -lcork -lcorkipset
endif endif
SS_COMMON_LIBS += -lev -lsodium -lm SS_COMMON_LIBS += -lev -lsodium -lm

Loading…
Cancel
Save