mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-22 20:03:02 +01:00
add --with-system-re2 configure option for using system-wide libre2 (#6964)
This commit is contained in:
parent
03e3604e49
commit
f6cb4a7aa9
@ -170,8 +170,10 @@ external:
|
|||||||
$(MAKE) -C $(ROOT)/extern/decNumber
|
$(MAKE) -C $(ROOT)/extern/decNumber
|
||||||
ln -sf $(ROOT)/extern/decNumber/libdecFloat.a $(LIB)
|
ln -sf $(ROOT)/extern/decNumber/libdecFloat.a $(LIB)
|
||||||
|
|
||||||
|
ifeq ($(RE2_BUILD_FLG),Y)
|
||||||
CXXFLAGS="-O3 -g -fPIC" $(MAKE) -C $(ROOT)/extern/re2
|
CXXFLAGS="-O3 -g -fPIC" $(MAKE) -C $(ROOT)/extern/re2
|
||||||
ln -sf $(ROOT)/extern/re2/obj/libre2.a $(LIB)
|
ln -sf $(ROOT)/extern/re2/obj/libre2.a $(LIB)
|
||||||
|
endif
|
||||||
|
|
||||||
ifeq ($(TOMMATH_BUILD_FLG),Y)
|
ifeq ($(TOMMATH_BUILD_FLG),Y)
|
||||||
CFLAGS="$(CFLAGS)" $(MAKE) -C $(ROOT)/extern/libtommath -f makefile.shared GCC=$(GCC)
|
CFLAGS="$(CFLAGS)" $(MAKE) -C $(ROOT)/extern/libtommath -f makefile.shared GCC=$(GCC)
|
||||||
|
@ -50,6 +50,7 @@ EXA_ROOT=$(ROOT)/examples
|
|||||||
IsCross=@IS_CROSS@
|
IsCross=@IS_CROSS@
|
||||||
TOMMATH_BUILD_FLG=@TOMMATH_BUILD@
|
TOMMATH_BUILD_FLG=@TOMMATH_BUILD@
|
||||||
TOMCRYPT_BUILD_FLG=@TOMCRYPT_BUILD@
|
TOMCRYPT_BUILD_FLG=@TOMCRYPT_BUILD@
|
||||||
|
RE2_BUILD_FLG=@RE2_BUILD@
|
||||||
|
|
||||||
FB_BUILD=$(GEN_ROOT)/$(TARGET)/firebird
|
FB_BUILD=$(GEN_ROOT)/$(TARGET)/firebird
|
||||||
ifeq ($(IsCross), Y)
|
ifeq ($(IsCross), Y)
|
||||||
|
@ -32,7 +32,7 @@
|
|||||||
|
|
||||||
|
|
||||||
# Please don't use compiler/platform specific flags here - nmcc 02-Nov-2002
|
# Please don't use compiler/platform specific flags here - nmcc 02-Nov-2002
|
||||||
WFLAGS =-I$(SRC_ROOT)/include/gen -I$(SRC_ROOT)/include -I$(ROOT)/extern/re2 $(CPPFLAGS) $(LTCSOURCE)
|
WFLAGS =-I$(SRC_ROOT)/include/gen -I$(SRC_ROOT)/include $(CPPFLAGS) $(LTCSOURCE)
|
||||||
|
|
||||||
ifeq ($(TOMMATH_BUILD_FLG),Y)
|
ifeq ($(TOMMATH_BUILD_FLG),Y)
|
||||||
WFLAGS += -I$(TOMMATH_INC)
|
WFLAGS += -I$(TOMMATH_INC)
|
||||||
@ -42,6 +42,10 @@ ifeq ($(TOMCRYPT_BUILD_FLG),Y)
|
|||||||
WFLAGS += -I$(TOMCRYPT_INC)
|
WFLAGS += -I$(TOMCRYPT_INC)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifeq ($(RE2_BUILD_FLG),Y)
|
||||||
|
WFLAGS += -I$(ROOT)/extern/re2
|
||||||
|
endif
|
||||||
|
|
||||||
ifeq ($(LSB_FLG),Y)
|
ifeq ($(LSB_FLG),Y)
|
||||||
WFLAGS += -DLSB_BUILD
|
WFLAGS += -DLSB_BUILD
|
||||||
endif
|
endif
|
||||||
|
18
configure.ac
18
configure.ac
@ -554,6 +554,12 @@ AC_ARG_WITH(termlib,
|
|||||||
[ --with-termlib build with explicitly specified termcap support library],
|
[ --with-termlib build with explicitly specified termcap support library],
|
||||||
[TERMLIB=${withval}])
|
[TERMLIB=${withval}])
|
||||||
|
|
||||||
|
RE2_BUILD=Y
|
||||||
|
AC_ARG_WITH(system-re2,
|
||||||
|
[ --with-system-re2 use system-wide re2 library instead of embedded copy],
|
||||||
|
[RE2_BUILD=N])
|
||||||
|
AC_SUBST(RE2_BUILD)
|
||||||
|
|
||||||
dnl Avoid dumb '-g -O2' autoconf's default
|
dnl Avoid dumb '-g -O2' autoconf's default
|
||||||
dnl Debugging information and optimization flags should be set in prefix.$platform file
|
dnl Debugging information and optimization flags should be set in prefix.$platform file
|
||||||
dnl Should be replaced with AC_PROG_GCC_DEFAULT_FLAGS() when available
|
dnl Should be replaced with AC_PROG_GCC_DEFAULT_FLAGS() when available
|
||||||
@ -609,6 +615,7 @@ if test "$LSB_FLG" = "Y"; then
|
|||||||
CXXFLAGS="$CXXFLAGS --lsb-besteffort --lsb-shared-libs=fbclient:ib_util:tommath:tomcrypt --lsb-target-version=4.1"
|
CXXFLAGS="$CXXFLAGS --lsb-besteffort --lsb-shared-libs=fbclient:ib_util:tommath:tomcrypt --lsb-target-version=4.1"
|
||||||
AC_SUBST(TOMMATH_BUILD, Y)
|
AC_SUBST(TOMMATH_BUILD, Y)
|
||||||
AC_SUBST(TOMCRYPT_BUILD, Y)
|
AC_SUBST(TOMCRYPT_BUILD, Y)
|
||||||
|
AC_SUBST(RE2_BUILD, Y)
|
||||||
AC_PATH_PROG(CC, lsbcc, "", [$PATH$PATH_SEPARATOR/opt/lsb/bin$PATH_SEPARATOR])
|
AC_PATH_PROG(CC, lsbcc, "", [$PATH$PATH_SEPARATOR/opt/lsb/bin$PATH_SEPARATOR])
|
||||||
AC_PATH_PROG(CXX, lsbc++, "", [$PATH$PATH_SEPARATOR/opt/lsb/bin$PATH_SEPARATOR])
|
AC_PATH_PROG(CXX, lsbc++, "", [$PATH$PATH_SEPARATOR/opt/lsb/bin$PATH_SEPARATOR])
|
||||||
if test "x$CC" = "x" || test "x$CXX" = "x" ; then
|
if test "x$CC" = "x" || test "x$CXX" = "x" ; then
|
||||||
@ -874,6 +881,17 @@ if test "$EDITLINE_FLG" = "Y"; then
|
|||||||
AC_SUBST(TERMLIB)
|
AC_SUBST(TERMLIB)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
dnl check for re2 presence
|
||||||
|
if test "$RE2_BUILD" != "Y"; then
|
||||||
|
XE_SAVE_ENV()
|
||||||
|
AC_LANG_PUSH(C++)
|
||||||
|
AC_CHECK_HEADER(re2/re2.h, RE2LIB=-lre2,
|
||||||
|
AC_MSG_ERROR(Include file for re2 not found - please install development re2 package or drop --with-system-re2))
|
||||||
|
AC_LANG_POP(C++)
|
||||||
|
XE_RESTORE_ENV()
|
||||||
|
fi
|
||||||
|
AC_SUBST(RE2LIB)
|
||||||
|
|
||||||
dnl Check for libraries
|
dnl Check for libraries
|
||||||
AC_SEARCH_LIBS(dlopen, dl)
|
AC_SEARCH_LIBS(dlopen, dl)
|
||||||
AC_CHECK_LIB(m, main)
|
AC_CHECK_LIB(m, main)
|
||||||
|
Loading…
Reference in New Issue
Block a user