8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-22 18:43:02 +01:00

Added configure switches to build with OS-wide editline and/or ICU

This commit is contained in:
alexpeshkoff 2007-04-03 08:25:55 +00:00
parent cacac2a9c5
commit 29815559fc
7 changed files with 63 additions and 14 deletions

View File

@ -58,7 +58,7 @@ Dependencies = $(AllObjects:.o=.d)
isql : $(LIBFBCLIENT_SO) $(ISQL) isql : $(LIBFBCLIENT_SO) $(ISQL)
$(ISQL): $(ISQL_Objects) $(CLUMPLETS_Objects) $(FBCOMMON_Objects) $(FBCLASSES_Objects) $(ISQL): $(ISQL_Objects) $(CLUMPLETS_Objects) $(FBCOMMON_Objects) $(FBCLASSES_Objects)
$(LD) $(LINK_OPTS) $^ -o $@ -L$(LIB) -lfbclient $(LINK_LIBS) @PTHREAD_CFLAGS@ @PTHREAD_LIBS@ $(LD) $(LINK_OPTS) $^ -o $@ -L$(LIB) -lfbclient $(LINK_LIBS) @PTHREAD_CFLAGS@ @PTHREAD_LIBS@ $(LIBEDITLINE)
include $(ROOT)/gen/make.shared.targets include $(ROOT)/gen/make.shared.targets

View File

@ -61,7 +61,7 @@ Dependencies = $(AllObjects:.o=.d)
isql : $(LIBFBEMBED_SO) $(ISQL) isql : $(LIBFBEMBED_SO) $(ISQL)
$(ISQL): $(ISQL_Objects) $(CLUMPLETS_Objects) $(FBCOMMON_Objects) $(FBCLASSES_Objects) $(ISQL): $(ISQL_Objects) $(CLUMPLETS_Objects) $(FBCOMMON_Objects) $(FBCLASSES_Objects)
$(LD) $(LINK_OPTS) $^ -o $@ $(FBEMBED_LINK) $(LINK_LIBS) $(LD) $(LINK_OPTS) $^ -o $@ $(FBEMBED_LINK) $(LINK_LIBS) $(LIBEDITLINE)
include $(ROOT)/gen/make.shared.targets include $(ROOT)/gen/make.shared.targets

View File

@ -185,10 +185,14 @@ $(GEN_ROOT)/Make.Version : $(SRC_ROOT)/misc/writeBuildNum.sh
# #
external_libraries: external_libraries:
ifeq ($(STD_ICU),false)
$(MAKE) -f $(GEN_ROOT)/Makefile.extern.icu $(MAKE) -f $(GEN_ROOT)/Makefile.extern.icu
endif
ifeq ($(STD_EDITLINE),false)
ifeq ($(EDITLINE_FLG),Y) ifeq ($(EDITLINE_FLG),Y)
$(MAKE) -f $(GEN_ROOT)/Makefile.extern.editline $(MAKE) -f $(GEN_ROOT)/Makefile.extern.editline
endif endif
endif
btyacc_binary: $(BTYACC) btyacc_binary: $(BTYACC)

View File

@ -58,7 +58,7 @@ Dependencies = $(AllObjects:.o=.d)
isql_static : $(ISQL_STATIC) isql_static : $(ISQL_STATIC)
$(ISQL_STATIC): $(ISQL_Objects) $(COMMON_Objects) $(LIBFBSTATIC_A) $(ISQL_STATIC): $(ISQL_Objects) $(COMMON_Objects) $(LIBFBSTATIC_A)
$(LD) $(LINK_OPTS) $(ISQL_Objects) $(COMMON_Objects) -o $@ -L$(LIB) -lfbstatic $(LINK_LIBS) $(ICU_LIBS) $(LD) $(LINK_OPTS) $(ISQL_Objects) $(COMMON_Objects) -o $@ -L$(LIB) -lfbstatic $(LINK_LIBS) $(ICU_LIBS) $(LIBEDITLINE)
include $(ROOT)/gen/make.shared.targets include $(ROOT)/gen/make.shared.targets

View File

@ -92,7 +92,8 @@ endif
# link with readline libraries - set by configure # link with readline libraries - set by configure
EDITLINE_FLG=@EDITLINE_FLG@ EDITLINE_FLG=@EDITLINE_FLG@
STD_EDITLINE=@STD_EDITLINE@
STD_ICU=@STD_ICU@
# Default programs and tools to be used in the build process # Default programs and tools to be used in the build process
@ -146,9 +147,9 @@ STATICLIB_LINK= ar cruvs
EXE_LINK = @CXX@ EXE_LINK = @CXX@
STATICEXE_LINK = @CXX@ STATICEXE_LINK = @CXX@
LINK_LIBS = @LIBS@ @EDITLINE_A@ LINK_LIBS = @LIBS@
ICU_LIBS = -licuuc -licudata -licui18n ICU_LIBS = -licuuc -licudata -licui18n
STATICLINK_LIBS = @LIBS@ @EDITLINE_A@ STATICLINK_LIBS = @LIBS@
SO_LINK_LIBS = @LIBS@ SO_LINK_LIBS = @LIBS@
# Default extensions # Default extensions
@ -215,7 +216,15 @@ LIBFBCLIENT_SONAME=$(LIB)/$(ClientLibraryName)
LIBFBINTL_SO = $(FIREBIRD)/intl/$(LIB_PREFIX)fbintl.$(SHRLIB_EXT) LIBFBINTL_SO = $(FIREBIRD)/intl/$(LIB_PREFIX)fbintl.$(SHRLIB_EXT)
LIBFBSTATIC_A = $(LIB)/libfbstatic.a LIBFBSTATIC_A = $(LIB)/libfbstatic.a
LIBEDITLINE_A = $(LIB)/libeditline.a
ifeq ($(EDITLINE_FLG),Y)
ifeq ($(STD_EDITLINE), true)
LIBEDITLINE := -leditline
else
LIBEDITLINE := $(LIB)/libeditline.a
endif
endif
LIBICU_SO = $(LIB)/$(LIB_PREFIX)icuuc.$(SHRLIB_EXT) \ LIBICU_SO = $(LIB)/$(LIB_PREFIX)icuuc.$(SHRLIB_EXT) \
$(LIB)/$(LIB_PREFIX)icudata.$(SHRLIB_EXT) \ $(LIB)/$(LIB_PREFIX)icudata.$(SHRLIB_EXT) \
$(LIB)/$(LIB_PREFIX)icui18n.$(SHRLIB_EXT) $(LIB)/$(LIB_PREFIX)icui18n.$(SHRLIB_EXT)

View File

@ -32,7 +32,10 @@
# 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
CFLAGS:= $(CFLAGS) -I$(SRC_ROOT)/include/gen -I$(SRC_ROOT)/include -I$(SRC_ROOT)/vulcan -I$(ROOT)/extern/icu/source/common -I$(ROOT)/extern/icu/source/i18n -DNAMESPACE=Vulcan CFLAGS:= $(CFLAGS) -I$(SRC_ROOT)/include/gen -I$(SRC_ROOT)/include -I$(SRC_ROOT)/vulcan -DNAMESPACE=Vulcan
ifeq ($(STD_ICU),false)
CFLAGS:= $(CFLAGS) -I$(ROOT)/extern/icu/source/common -I$(ROOT)/extern/icu/source/i18n
endif
ifeq ($(IsProdTypeBuild),Y) ifeq ($(IsProdTypeBuild),Y)
CFLAGS:= $(CFLAGS) $(PROD_FLAGS) -DPROD_BUILD CFLAGS:= $(CFLAGS) $(PROD_FLAGS) -DPROD_BUILD

View File

@ -39,6 +39,9 @@ dnl Should Classic Server run services as thread or as process?
dnl Default - run as processes (empty value). dnl Default - run as processes (empty value).
service_thread_CS="" service_thread_CS=""
dnl Should system editline and/or icu be used
STD_EDITLINE=false
STD_ICU=false
case "$target" in case "$target" in
*-*-darwin*) *-*-darwin*)
@ -304,8 +307,33 @@ AC_ARG_WITH(editline,
no) EDITLINE_FLG=N;; no) EDITLINE_FLG=N;;
*) AC_MSG_ERROR(bad value '${withval}' for --with-editline);; *) AC_MSG_ERROR(bad value '${withval}' for --with-editline);;
esac]) esac])
AC_ARG_WITH(system-editline,
[ --with-system-editline use OS supplied libeditline],
[case "$withval" in
yes) STD_EDITLINE=true;;
no) STD_EDITLINE=false;;
*) AC_MSG_ERROR(bad value '${withval}' for --with-system-editline);;
esac])
# not need editline in default libs, but need to test for it's ptresence
saveLIBS=$LIBS
if test "$STD_EDITLINE" = "true"; then
AC_CHECK_LIB(editline, readline, EDITLINE_FLG=Y, STD_EDITLINE=false)
fi
LIBS=$saveLIBS
AC_SUBST(STD_EDITLINE)
AC_SUBST(EDITLINE_FLG) AC_SUBST(EDITLINE_FLG)
AC_ARG_WITH(system-icu,
[ --with-system-icu use OS supplied ICU],
[case "$withval" in
yes) STD_ICU=true;;
no) STD_ICU=false;;
*) AC_MSG_ERROR(bad value '${withval}' for --with-system-icu);;
esac])
AC_SUBST(STD_ICU)
FB_SERVICE_NAME=gds_db FB_SERVICE_NAME=gds_db
FB_SERVICE_PORT=3050 FB_SERVICE_PORT=3050
FB_IPC_NAME=FirebirdIPI FB_IPC_NAME=FirebirdIPI
@ -417,7 +445,7 @@ AC_CHECK_HEADERS(signal.h sys/signal.h sys/siginfo.h)
if test "$EDITLINE_FLG" = "Y"; then if test "$EDITLINE_FLG" = "Y"; then
AC_CHECK_HEADERS(termio.h termios.h) AC_CHECK_HEADERS(termio.h termios.h)
AC_HEADER_DIRENT AC_HEADER_DIRENT
AC_DEFINE(HAVE_EDITLINE_H, 1, [Define this if internal editline.h is in use]) AC_DEFINE(HAVE_EDITLINE_H, 1, [Define this if editline is in use])
fi fi
AC_CHECK_HEADERS(unistd.h) AC_CHECK_HEADERS(unistd.h)
if test "$ac_cv_header_unistd_h" = "yes"; then if test "$ac_cv_header_unistd_h" = "yes"; then
@ -458,7 +486,6 @@ if test "$EDITLINE_FLG" = "Y"; then
AC_CHECK_LIB(termcap, tgetent, , \ AC_CHECK_LIB(termcap, tgetent, , \
AC_CHECK_LIB(tinfo, tgetent, , \ AC_CHECK_LIB(tinfo, tgetent, , \
AC_MSG_ERROR(termcap support not found))))) AC_MSG_ERROR(termcap support not found)))))
AC_SUBST(EDITLINE_A, -leditline)
fi fi
dnl AC_CHECK_LIB(stdc++, main,,, $LIBS) dnl AC_CHECK_LIB(stdc++, main,,, $LIBS)
@ -845,7 +872,6 @@ mkdir -p temp/std/utilities/ibmgr
mkdir -p temp/std/utilities/install mkdir -p temp/std/utilities/install
mkdir -p temp/std/utilities/rebuild mkdir -p temp/std/utilities/rebuild
mkdir -p temp/std/vulcan mkdir -p temp/std/vulcan
mkdir -p temp/std/extern/editline
mkdir -p temp/superclient/alice mkdir -p temp/superclient/alice
mkdir -p temp/superclient/auth/trusted mkdir -p temp/superclient/auth/trusted
@ -1061,9 +1087,13 @@ gen/Makefile.embed.qli:${MAKE_SRC_DIR}/Makefile.in.embed.qli
gen/Makefile.embed.gpre:${MAKE_SRC_DIR}/Makefile.in.embed.gpre gen/Makefile.embed.gpre:${MAKE_SRC_DIR}/Makefile.in.embed.gpre
gen/Makefile.install:builds/install/arch-specific/${INSTALL_PREFIX}/Makefile.in gen/Makefile.install:builds/install/arch-specific/${INSTALL_PREFIX}/Makefile.in
Makefile:Makefile.in Makefile:Makefile.in
gen/Makefile.extern.editline:${MAKE_SRC_DIR}/Makefile.in.extern.editline
gen/Makefile.extern.icu:${MAKE_SRC_DIR}/Makefile.in.extern.icu
) )
if test "$STD_EDITLINE" = "false"; then
AC_CONFIG_FILES(gen/Makefile.extern.editline:${MAKE_SRC_DIR}/Makefile.in.extern.editline)
fi
if test "$STD_ICU" = "false"; then
AC_CONFIG_FILES(gen/Makefile.extern.icu:${MAKE_SRC_DIR}/Makefile.in.extern.icu)
fi
@ -1071,11 +1101,14 @@ if test "$PROD_BUILD_FLG" = N; then
DEBUG_ICU=--enable-debug DEBUG_ICU=--enable-debug
fi fi
if test "$STD_ICU" = "true"; then
AC_OUTPUT
else
AC_OUTPUT AC_OUTPUT
(cd extern/icu/source (cd extern/icu/source
chmod +x runConfigureICU configure install-sh chmod +x runConfigureICU configure install-sh
./runConfigureICU "$ICU_PLATFORM" "$DEBUG_ICU" --prefix=`pwd`/..) ./runConfigureICU "$ICU_PLATFORM" "$DEBUG_ICU" --prefix=`pwd`/..)
fi
dnl Print out the build configuration (the most interesting thing) dnl Print out the build configuration (the most interesting thing)
echo echo