Skip to content
Open
3 changes: 3 additions & 0 deletions config/config.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,9 @@
/* RLP library support */
#undef USE_RLP

/* SCWS library support */
#undef USE_SCWS

/* define to use POSIX Syslog for logging */
#undef USE_SYSLOG

Expand Down
48 changes: 48 additions & 0 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -608,6 +608,8 @@ LTLIBOBJS
CONFDIR
USE_RLP_FALSE
USE_RLP_TRUE
USE_SCWS_FALSE
USE_SCWS_TRUE
USE_RE2_FALSE
USE_RE2_TRUE
LIBRE2_PATH
Expand Down Expand Up @@ -653,6 +655,7 @@ DEPDIR
OBJEXT
EXEEXT
ac_ct_CC
ac_cv_use_scws
CPPFLAGS
LDFLAGS
CFLAGS
Expand Down Expand Up @@ -745,6 +748,7 @@ with_re2
with_re2_includes
with_re2_libs
with_rlp
with_scws
with_iconv
with_unixodbc
enable_mem_override
Expand Down Expand Up @@ -1417,6 +1421,8 @@ Optional Packages:
--with-re2-libs path to RE2 libraries
--with-rlp compile with RLP library support (default is
disabled)
--with-scws compile with scws library support (default is
disabled)
--with-iconv compile with iconv support (default is autodetect)
--with-unixodbc compile with UnixODBC support (default is
autodetect)
Expand Down Expand Up @@ -8222,6 +8228,44 @@ fi



# Check whether --with-scws was given.
if test "${with_scws+set}" = set; then :
withval=$with_scws; ac_cv_use_scws=$withval
else
ac_cv_use_scws=no

fi


{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to compile with scws library support" >&5
$as_echo_n "checking whether to compile with scws library support... " >&6; }
if test x$ac_cv_use_scws != xno; then
if test -d $withval && test -f $withval/include/scws/scws.h; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }

$as_echo "#define USE_SCWS 1" >>confdefs.h

else
as_fn_error $? "missing SCWS sources from libscws" "$LINENO" 5
fi
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }

$as_echo "#define USE_SCWS 0" >>confdefs.h

fi
if test x$ac_cv_use_scws != xno; then
USE_SCWS_TRUE=
USE_SCWS_FALSE='#'
else
USE_SCWS_TRUE='#'
USE_SCWS_FALSE=
fi




got_expat=0
dl_expat=0
Expand Down Expand Up @@ -9102,6 +9146,10 @@ if test -z "${USE_RLP_TRUE}" && test -z "${USE_RLP_FALSE}"; then
as_fn_error $? "conditional \"USE_RLP\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${USE_SCWS_TRUE}" && test -z "${USE_SCWS_FALSE}"; then
as_fn_error $? "conditional \"USE_SCWS\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi

: "${CONFIG_STATUS=./config.status}"
ac_write_fail=0
Expand Down
22 changes: 22 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -551,6 +551,28 @@ fi
AM_CONDITIONAL(USE_RLP, test x$ac_cv_use_rlp != xno)


dnl ---

AC_ARG_WITH([scws],
AC_HELP_STRING([--with-scws], [compile with scws library support (default is disabled)]),
[ac_cv_use_scws=$withval], [ac_cv_use_scws=no]
)

AC_MSG_CHECKING([whether to compile with scws library support])
if test x$ac_cv_use_scws != xno; then
if test -d $ac_cv_use_scws && test -f $ac_cv_use_scws/include/scws/scws.h; then
AC_MSG_RESULT([yes])
AC_DEFINE(USE_SCWS, 1, [scws library support])
else
AC_MSG_ERROR([missing scws sources from libscws])
fi
else
AC_MSG_RESULT([no])
AC_DEFINE(USE_SCWS, 0, [scws library support])
fi
AM_CONDITIONAL(USE_SCWS, test x$ac_cv_use_scws != xno)


dnl ---

got_expat=0
Expand Down
14 changes: 11 additions & 3 deletions src/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ SRC_SPHINX = sphinx.cpp sphinxexcerpt.cpp sphinxquery.cpp \
sphinxutils.cpp sphinxstd.cpp sphinxsort.cpp sphinxexpr.cpp sphinxfilter.cpp \
sphinxsearch.cpp sphinxrt.cpp sphinxjson.cpp sphinxudf.c sphinxaot.cpp sphinxplugin.cpp

ARFLAGS = crU
ARFLAGS = cr
noinst_LIBRARIES = libsphinx.a
libsphinx_a_SOURCES = $(SRC_SPHINX)

Expand All @@ -30,6 +30,14 @@ RLP_LIBS =
RLP_INC =
endif

AM_CPPFLAGS = $(LIBRE2_CFLAGS) $(RLP_INC) -DSYSCONFDIR="\"$(sysconfdir)\"" -DDATADIR="\"$(localstatedir)/data\""
COMMON_LIBS = libsphinx.a $(LIBSTEMMER_LIBS) $(MYSQL_LIBS) $(PGSQL_LIBS) $(LIBRE2_LIBS) $(RLP_LIBS)
if USE_SCWS
SCWS_LIBS = @ac_cv_use_scws@/lib/libscws.a
SCWS_INC = -I@ac_cv_use_scws@/include
else
SCWS_LIBS =
SCWS_INC =
endif

AM_CPPFLAGS = $(LIBRE2_CFLAGS) $(RLP_INC) $(SCWS_INC) -DSYSCONFDIR="\"$(sysconfdir)\"" -DDATADIR="\"$(localstatedir)/data\""
COMMON_LIBS = libsphinx.a $(LIBSTEMMER_LIBS) $(MYSQL_LIBS) $S(CWS_LIBS) $(PGSQL_LIBS) $(LIBRE2_LIBS) $(RLP_LIBS) $(SCWS_LIBS)
LDADD = $(COMMON_LIBS)
10 changes: 7 additions & 3 deletions src/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ SRC_SPHINX = sphinx.cpp sphinxexcerpt.cpp sphinxquery.cpp \
sphinxutils.cpp sphinxstd.cpp sphinxsort.cpp sphinxexpr.cpp sphinxfilter.cpp \
sphinxsearch.cpp sphinxrt.cpp sphinxjson.cpp sphinxudf.c sphinxaot.cpp sphinxplugin.cpp

ARFLAGS = crU
ARFLAGS = cr
noinst_LIBRARIES = libsphinx.a
libsphinx_a_SOURCES = $(SRC_SPHINX)
indexer_SOURCES = indexer.cpp
Expand All @@ -237,8 +237,12 @@ BUILT_SOURCES = extract-version
@USE_RLP_TRUE@RLP_LIBS = -L$(top_srcdir)/rlp/lib/amd64-glibc25-gcc42 -lbtrlpc -lbtrlpcore -lbtutils
@USE_RLP_FALSE@RLP_INC =
@USE_RLP_TRUE@RLP_INC = -I$(top_srcdir)/rlp/rlp/include -I$(top_srcdir)/rlp/utilities/include -D_REENTRANT
AM_CPPFLAGS = $(LIBRE2_CFLAGS) $(RLP_INC) -DSYSCONFDIR="\"$(sysconfdir)\"" -DDATADIR="\"$(localstatedir)/data\""
COMMON_LIBS = libsphinx.a $(LIBSTEMMER_LIBS) $(MYSQL_LIBS) $(PGSQL_LIBS) $(LIBRE2_LIBS) $(RLP_LIBS)
@USE_SCWS_FALSE@SCWS_LIBS =
@USE_SCWS_TRUE@SCWS_LIBS = @ac_cv_use_scws@/lib/libscws.a
@USE_SCWS_FALSE@SCWS_INC =
@USE_SCWS_TRUE@SCWS_INC = -I@ac_cv_use_scws@/include
AM_CPPFLAGS = $(LIBRE2_CFLAGS) $(RLP_INC) $(SCWS_INC) -DSYSCONFDIR="\"$(sysconfdir)\"" -DDATADIR="\"$(localstatedir)/data\""
COMMON_LIBS = libsphinx.a $(LIBSTEMMER_LIBS) $(MYSQL_LIBS) $(SCWS_LIBS) $(PGSQL_LIBS) $(LIBRE2_LIBS) $(RLP_LIBS) $(SCWS_LIBS)
LDADD = $(COMMON_LIBS)
all: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) all-am
Expand Down
Loading