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

POSIX build with support for --enable-client-only and --without-tomcrypt.

This commit is contained in:
Adriano dos Santos Fernandes 2022-11-27 11:24:13 -03:00
parent a791ccd02e
commit 0c5db1d2a3
10 changed files with 227 additions and 136 deletions

View File

@ -248,7 +248,7 @@ copyFiles() {
chown root:wheel ${TargetDir}@FB_PLUGDIR@/*.so*
chmod 0755 ${TargetDir}@FB_PLUGDIR@/*.so*
makeDirs ${TargetDir}@FB_TZDATADIR@
makeDirs @FB_TZDATADIR@
cp $BuiltFBDir/tzdata/*.res ${TargetDir}@FB_TZDATADIR@
chmod 0444 ${TargetDir}@FB_TZDATADIR@/*.res

View File

@ -42,6 +42,8 @@ include $(ROOT)/gen/make.shared.variables
# root of the build tree.
BuildRoot=$(GEN_ROOT)
CLIENT_ONLY_FLG=@CLIENT_ONLY_FLG@
WITH_TOMCRYPT=@WITH_TOMCRYPT@
InstallRoot=.
@ -112,8 +114,10 @@ buildImageDir: buildDebugInfo
buildTarDir: buildImageDir
mkdir -p $(GEN_ROOT)/$(TarDir)
ifeq ($(CLIENT_ONLY_FLG),N)
cp -r $(GEN_ROOT)/install/install.sh $(GEN_ROOT)/$(TarDir)
chmod a+x $(GEN_ROOT)/$(TarDir)/*.sh
endif
(cd $(GEN_ROOT)/$(TarDir); tar -C ../buildroot -czf buildroot.tar.gz . )
(cd $(GEN_ROOT)/$(TarDir); tar -tzf buildroot.tar.gz > manifest.txt )

View File

@ -38,6 +38,8 @@ SecurityDatabase=security5.fdb
TomMathBuild="@TOMMATH_BUILD@"
TomCryptBuild="@TOMCRYPT_BUILD@"
OBJDUMP=@OBJDUMP@
CLIENT_ONLY_FLG=@CLIENT_ONLY_FLG@
WITH_TOMCRYPT=@WITH_TOMCRYPT@
#------------------------------------------------------------------------
# addLibs
@ -161,89 +163,102 @@ copyFiles() {
fi
#directories
makeDirs "@FB_BINDIR@ @FB_SBINDIR@ @FB_CONFDIR@ @FB_LIBDIR@ @FB_INCDIR@/firebird @FB_DOCDIR@/sql.extensions \
@FB_SAMPLEDIR@ @FB_SAMPLEDBDIR@ @FB_INTLDIR@ @FB_MISCDIR@ @FB_SECDBDIR@ @FB_MSGDIR@ @FB_LOGDIR@ \
@FB_GUARDDIR@ @FB_PLUGDIR@ @FB_TZDATADIR@"
for i in udf; do
makeDirs @FB_MISCDIR@/upgrade/$i
done
makeDirs "@FB_CONFDIR@ @FB_LIBDIR@ @FB_INCDIR@/firebird @FB_MSGDIR@ @FB_TZDATADIR@"
makeDirs /usr/include
if [ "$CLIENT_ONLY_FLG" = "N" ] || [ "$WITH_TOMCRYPT" = "Y" ]; then
makeDirs "@FB_PLUGDIR@"
fi
#bin
cp $BuiltFBDir/bin/gbak ${TargetDir}@FB_BINDIR@/gbak
cp $BuiltFBDir/bin/gfix ${TargetDir}@FB_BINDIR@/gfix
cp $BuiltFBDir/bin/gpre ${TargetDir}@FB_BINDIR@/gpre
cp $BuiltFBDir/bin/gsec ${TargetDir}@FB_BINDIR@/gsec
cp $BuiltFBDir/bin/nbackup ${TargetDir}@FB_BINDIR@/nbackup
copyIfExists $BuiltFBDir/bin/gsplit ${TargetDir}@FB_BINDIR@
cp $BuiltFBDir/bin/gstat ${TargetDir}@FB_BINDIR@/gstat
copyIfExists $BuiltFBDir/bin/fbsvcmgr ${TargetDir}@FB_BINDIR@
copyIfExists $BuiltFBDir/bin/fbtracemgr ${TargetDir}@FB_BINDIR@
cp $BuiltFBDir/bin/isql ${TargetDir}@FB_BINDIR@/isql
if [ "$CLIENT_ONLY_FLG" = "N" ]; then
makeDirs "@FB_BINDIR@ @FB_SBINDIR@ @FB_DOCDIR@/sql.extensions @FB_SAMPLEDIR@ @FB_SAMPLEDBDIR@ @FB_INTLDIR@ \
@FB_MISCDIR@ @FB_SECDBDIR@ @FB_LOGDIR@ @FB_GUARDDIR@"
chmod 0755 ${TargetDir}@FB_BINDIR@/*
for i in udf; do
makeDirs @FB_MISCDIR@/upgrade/$i
done
fi
#sbin
cp -f $BuiltFBDir/bin/firebird ${TargetDir}@FB_SBINDIR@/firebird
cp -f $BuiltFBDir/bin/fbguard ${TargetDir}@FB_SBINDIR@
copyIfExists $BuiltFBDir/bin/fb_lock_print ${TargetDir}@FB_SBINDIR@
makeDirs /usr/include
addLibs $BuiltFBDir/bin changeServerMode.sh ${TargetDir}@FB_SBINDIR@
cp $BuiltFBDir/bin/registerDatabase.sh ${TargetDir}@FB_SBINDIR@
cp $BuiltFBDir/bin/fb_config ${TargetDir}@FB_SBINDIR@
addLibs $BuiltFBDir/bin FirebirdUninstall.sh ${TargetDir}@FB_SBINDIR@
if [ "$CLIENT_ONLY_FLG" = "N" ]; then
#bin
cp $BuiltFBDir/bin/gbak ${TargetDir}@FB_BINDIR@/gbak
cp $BuiltFBDir/bin/gfix ${TargetDir}@FB_BINDIR@/gfix
cp $BuiltFBDir/bin/gpre ${TargetDir}@FB_BINDIR@/gpre
cp $BuiltFBDir/bin/gsec ${TargetDir}@FB_BINDIR@/gsec
cp $BuiltFBDir/bin/nbackup ${TargetDir}@FB_BINDIR@/nbackup
copyIfExists $BuiltFBDir/bin/gsplit ${TargetDir}@FB_BINDIR@
cp $BuiltFBDir/bin/gstat ${TargetDir}@FB_BINDIR@/gstat
copyIfExists $BuiltFBDir/bin/fbsvcmgr ${TargetDir}@FB_BINDIR@
copyIfExists $BuiltFBDir/bin/fbtracemgr ${TargetDir}@FB_BINDIR@
cp $BuiltFBDir/bin/isql ${TargetDir}@FB_BINDIR@/isql
chmod 0755 ${TargetDir}@FB_SBINDIR@/*
chmod 0700 ${TargetDir}@FB_SBINDIR@/*.sh
chmod 0755 ${TargetDir}@FB_BINDIR@/*
#install script
addLibs $BuiltFBDir/bin install.sh $BuildRootDir/gen/install
#sbin
cp -f $BuiltFBDir/bin/firebird ${TargetDir}@FB_SBINDIR@/firebird
cp -f $BuiltFBDir/bin/fbguard ${TargetDir}@FB_SBINDIR@
copyIfExists $BuiltFBDir/bin/fb_lock_print ${TargetDir}@FB_SBINDIR@
#examples - copy only if we have them
exampleFiles=`find $BuiltFBDir/examples/README -type f -print`
if [ -z "$exampleFiles" ]; then
echo "Example files have not been built!"
else
(cd $BuiltFBDir/examples; tar cf - .) | (cd ${TargetDir}@FB_SAMPLEDIR@; tar xf -)
rm -rf ${TargetDir}@FB_SAMPLEDIR@/empbuild
addLibs $BuiltFBDir/bin changeServerMode.sh ${TargetDir}@FB_SBINDIR@
cp $BuiltFBDir/bin/registerDatabase.sh ${TargetDir}@FB_SBINDIR@
cp $BuiltFBDir/bin/fb_config ${TargetDir}@FB_SBINDIR@
addLibs $BuiltFBDir/bin FirebirdUninstall.sh ${TargetDir}@FB_SBINDIR@
makeDirs @FB_SAMPLEDBDIR@
cp $BuiltFBDir/examples/empbuild/*.fdb ${TargetDir}@FB_SAMPLEDBDIR@
chmod 0755 ${TargetDir}@FB_SBINDIR@/*
chmod 0700 ${TargetDir}@FB_SBINDIR@/*.sh
ReadOnlyTree ${TargetDir}@FB_SAMPLEDIR@
chmod 0664 ${TargetDir}@FB_SAMPLEDBDIR@/*.fdb
#install script
addLibs $BuiltFBDir/bin install.sh $BuildRootDir/gen/install
#plugins samples
makeDirs ${TargetDir}@FB_SAMPLEDIR@/prebuilt
cp $BuiltFBDir/plugins/*fbSample* ${TargetDir}@FB_SAMPLEDIR@/prebuilt/plugins
cp $BuiltFBDir/bin/*fbSample* ${TargetDir}@FB_SAMPLEDIR@/prebuilt/bin
chmod 0644 ${TargetDir}@FB_SAMPLEDIR@/prebuilt/plugins/*
#examples - copy only if we have them
exampleFiles=`find $BuiltFBDir/examples/README -type f -print`
if [ -z "$exampleFiles" ]; then
echo "Example files have not been built!"
else
(cd $BuiltFBDir/examples; tar cf - .) | (cd ${TargetDir}@FB_SAMPLEDIR@; tar xf -)
rm -rf ${TargetDir}@FB_SAMPLEDIR@/empbuild
# exec bit for sample binaries
chmod 0755 ${TargetDir}@FB_SAMPLEDIR@/prebuilt/bin/*
fi
makeDirs @FB_SAMPLEDBDIR@
cp $BuiltFBDir/examples/empbuild/*.fdb ${TargetDir}@FB_SAMPLEDBDIR@
ReadOnlyTree ${TargetDir}@FB_SAMPLEDIR@
chmod 0664 ${TargetDir}@FB_SAMPLEDBDIR@/*.fdb
#plugins samples
makeDirs @FB_SAMPLEDIR@/prebuilt
cp $BuiltFBDir/plugins/*fbSample* ${TargetDir}@FB_SAMPLEDIR@/prebuilt/plugins
cp $BuiltFBDir/bin/*fbSample* ${TargetDir}@FB_SAMPLEDIR@/prebuilt/bin
chmod 0644 ${TargetDir}@FB_SAMPLEDIR@/prebuilt/plugins/*
# exec bit for sample binaries
chmod 0755 ${TargetDir}@FB_SAMPLEDIR@/prebuilt/bin/*
fi
#secureDB (access rights will be set at install time)
cp $BuiltFBDir/$SecurityDatabase ${TargetDir}@FB_SECDBDIR@
fi
#message file
cp $BuiltFBDir/*.msg ${TargetDir}@FB_MSGDIR@
cp $BuiltFBDir/*.msg ${TargetDir}@FB_MSGDIR@
chmod 0444 ${TargetDir}@FB_MSGDIR@/*.msg
#secureDB (access rights will be set at install time)
cp $BuiltFBDir/$SecurityDatabase ${TargetDir}@FB_SECDBDIR@
#include (.h .pas files)
cp $BuiltFBDir/include/*.h ${TargetDir}@FB_INCDIR@
cp $BuildRootDir/src/include/firebird/*.h ${TargetDir}@FB_INCDIR@/firebird
tar -C $BuildRootDir/src/include/firebird -cf - impl | tar -C ${TargetDir}@FB_INCDIR@/firebird -x
cp $BuildRootDir/src/include/gen/Firebird.pas ${TargetDir}@FB_INCDIR@/firebird
cp $BuiltFBDir/include/*.h ${TargetDir}@FB_INCDIR@
cp $BuildRootDir/src/include/firebird/*.h ${TargetDir}@FB_INCDIR@/firebird
tar -C $BuildRootDir/src/include/firebird -cf - impl | tar -C ${TargetDir}@FB_INCDIR@/firebird -x
if [ "$CLIENT_ONLY_FLG" = "N" ]; then
cp $BuildRootDir/src/include/gen/Firebird.pas ${TargetDir}@FB_INCDIR@/firebird
fi
ReadOnlyTree ${TargetDir}@FB_INCDIR@
#lib
cp -df $BuiltFBDir/lib/libfbclient.so* ${TargetDir}@FB_LIBDIR@
cp -f $BuiltFBDir/lib/libib_util.so ${TargetDir}@FB_LIBDIR@/libib_util.so
cp -df $BuiltFBDir/lib/libfbclient.so* ${TargetDir}@FB_LIBDIR@
if [ "$CLIENT_ONLY_FLG" = "N" ]; then
cp -f $BuiltFBDir/lib/libib_util.so ${TargetDir}@FB_LIBDIR@/libib_util.so
fi
if [ "$TomMathBuild" = "Y" ]; then
makeDirs @FB_LIBDIR@/.tm
@ -257,55 +272,64 @@ copyFiles() {
chmod 0755 ${TargetDir}@FB_LIBDIR@/*.so*
#plugins
(cd $BuiltFBDir/plugins;tar cf - --exclude='*fbSample*' .) | (cd ${TargetDir}@FB_PLUGDIR@; tar xvf -)
if [ "$CLIENT_ONLY_FLG" = "N" ] || [ "$WITH_TOMCRYPT" = "Y" ]; then
(cd $BuiltFBDir/plugins;tar cf - --exclude='*fbSample*' .) | (cd ${TargetDir}@FB_PLUGDIR@; tar xvf -)
fi
for file in `find ${TargetDir}@FB_PLUGDIR@ -name '*.so*' -print`; do
chmod 0755 ${file}
done
makeDirs ${TargetDir}@FB_TZDATADIR@
makeDirs @FB_TZDATADIR@
cp $BuiltFBDir/tzdata/*.res ${TargetDir}@FB_TZDATADIR@
chmod 0444 ${TargetDir}@FB_TZDATADIR@/*.res
#intl
cp $BuiltFBDir/intl/libfbintl.so ${TargetDir}@FB_INTLDIR@/fbintl
cp $BuiltFBDir/intl/fbintl.conf ${TargetDir}@FB_INTLDIR@
if [ "$CLIENT_ONLY_FLG" = "N" ]; then
#intl
cp $BuiltFBDir/intl/libfbintl.so ${TargetDir}@FB_INTLDIR@/fbintl
cp $BuiltFBDir/intl/fbintl.conf ${TargetDir}@FB_INTLDIR@
chmod 0755 ${TargetDir}@FB_INTLDIR@/fbintl
chmod 0644 ${TargetDir}@FB_INTLDIR@/fbintl.conf
chmod 0755 ${TargetDir}@FB_INTLDIR@/fbintl
chmod 0644 ${TargetDir}@FB_INTLDIR@/fbintl.conf
# Note that the following items copy files from outside the build tree.
# Copy the sql-declarations into the UDF-directory
# Note that the following items copy files from outside the build tree.
# Copy the sql-declarations into the UDF-directory
#doc
cp $BuildRootDir/doc/*.pdf ${TargetDir}@FB_DOCDIR@
cp $BuildRootDir/doc/README.* ${TargetDir}@FB_DOCDIR@
cp $BuildRootDir/doc/sql.extensions/README* ${TargetDir}@FB_DOCDIR@/sql.extensions
cp $BuildRootDir/*.md ${TargetDir}@FB_CONFDIR@
#doc
cp $BuildRootDir/doc/*.pdf ${TargetDir}@FB_DOCDIR@
cp $BuildRootDir/doc/README.* ${TargetDir}@FB_DOCDIR@
cp $BuildRootDir/doc/sql.extensions/README* ${TargetDir}@FB_DOCDIR@/sql.extensions
cp $BuildRootDir/*.md ${TargetDir}@FB_CONFDIR@
for i in `find ${TargetDir}@FB_MISCDIR@ -print`; do
if [ -d $i ]; then
chmod 0755 $i
else
chmod 0644 $i
fi
done
for i in `find ${TargetDir}@FB_MISCDIR@ -print`; do
if [ -d $i ]; then
chmod 0755 $i
else
chmod 0644 $i
fi
done
#misc
cp $BuildRootDir/src/misc/intl.sql ${TargetDir}@FB_MISCDIR@
cp $BuildRootDir/src/misc/upgrade/v4.0/udf_replace* ${TargetDir}@FB_MISCDIR@/upgrade/udf
cp $BuildRootDir/gen/install/misc/firebird.init.d.* ${TargetDir}@FB_MISCDIR@
cp $BuildRootDir/gen/install/misc/rc.config.firebird ${TargetDir}@FB_MISCDIR@
cp $BuildRootDir/gen/install/misc/firebird.service ${TargetDir}@FB_MISCDIR@
#misc
cp $BuildRootDir/src/misc/intl.sql ${TargetDir}@FB_MISCDIR@
cp $BuildRootDir/src/misc/upgrade/v4.0/udf_replace* ${TargetDir}@FB_MISCDIR@/upgrade/udf
cp $BuildRootDir/gen/install/misc/firebird.init.d.* ${TargetDir}@FB_MISCDIR@
cp $BuildRootDir/gen/install/misc/rc.config.firebird ${TargetDir}@FB_MISCDIR@
cp $BuildRootDir/gen/install/misc/firebird.service ${TargetDir}@FB_MISCDIR@
chmod -R go-rwx ${TargetDir}@FB_MISCDIR@
chmod -R go-rwx ${TargetDir}@FB_MISCDIR@
#conf
cp $BuiltFBDir/databases.conf ${TargetDir}@FB_CONFDIR@
cp $BuiltFBDir/fbtrace.conf ${TargetDir}@FB_CONFDIR@
cp $BuiltFBDir/replication.conf ${TargetDir}@FB_CONFDIR@
fi
#conf
cp $BuiltFBDir/firebird.conf ${TargetDir}@FB_CONFDIR@
cp $BuiltFBDir/databases.conf ${TargetDir}@FB_CONFDIR@
cp $BuiltFBDir/fbtrace.conf ${TargetDir}@FB_CONFDIR@
cp $BuiltFBDir/plugins.conf ${TargetDir}@FB_CONFDIR@
cp $BuiltFBDir/replication.conf ${TargetDir}@FB_CONFDIR@
cp $BuiltFBDir/firebird.conf ${TargetDir}@FB_CONFDIR@
if [ "$CLIENT_ONLY_FLG" = "N" ] || [ "$WITH_TOMCRYPT" = "Y" ]; then
cp $BuiltFBDir/plugins.conf ${TargetDir}@FB_CONFDIR@
fi
chmod 0644 ${TargetDir}@FB_CONFDIR@/*.conf
@ -314,7 +338,7 @@ copyFiles() {
chmod 0444 ${TargetDir}@FB_CONFDIR@/*License.txt
# link include files to /usr/include
# link include files to /usr/include
linkFiles "@FB_INCDIR@" "firebird iberror.h ibase.h ib_util.h" "${TargetDir}/usr/include" "${TargetDir}@FB_INCDIR@"
}

View File

@ -181,7 +181,10 @@ $(GEN_ROOT)/Make.Version : $(SRC_ROOT)/misc/writeBuildNum.sh
#
external:
ifeq ($(CLIENT_ONLY_FLG),N)
CC="$(CC)" CFLAGS="$(CFLAGS)" AR="$(AR)" $(MAKE) -C $(ROOT)/extern/btyacc
endif
CXX="$(CXX)" CXXFLAGS="$(CXXFLAGS)" $(MAKE) -C $(ROOT)/extern/cloop TARGET=release WITH_FPC=0 BUILD_DIR=$(TMP_ROOT)/cloop OUT_DIR=$(GEN_ROOT)/$(TARGET)/cloop core
CC="$(CC)" CFLAGS="$(CFLAGS)" AR="$(AR)" $(MAKE) -C $(ROOT)/extern/decNumber
@ -192,12 +195,14 @@ ifeq ($(ABSEIL_BUILD_FLG),Y)
ln -sf $(ROOT)/extern/int128/absl/numeric/libi128.a $(LIB)
endif
ifeq ($(CLIENT_ONLY_FLG),N)
ifeq ($(RE2_BUILD_FLG),Y)
CXX="$(CXX)" CXXFLAGS="$(CXXFLAGS) -O3 -g -fPIC" AR="$(AR)" $(MAKE) -C $(ROOT)/extern/re2
ln -sf $(ROOT)/extern/re2/obj/libre2.a $(LIB)
endif
$(MAKE) libcds
endif
ifeq ($(TOMMATH_BUILD_FLG),Y)
CC="$(CC)" CFLAGS="$(CFLAGS)" AR="$(AR)" $(MAKE) -C $(ROOT)/extern/libtommath -f makefile.shared GCC="$(CC)"
@ -223,11 +228,13 @@ else
endif
endif
ifeq ($(CLIENT_ONLY_FLG),N)
ifeq ($(STD_EDITLINE),false)
ifeq ($(EDITLINE_FLG),Y)
CC="$(CC)" CFLAGS="$(CFLAGS)" AR="$(AR)" $(MAKE) -f $(GEN_ROOT)/Makefile.extern.editline
endif
endif
endif
#___________________________________________________________________________
@ -317,8 +324,16 @@ master_process:
$(MAKE) export_lists
$(MAKE) external
$(MAKE) updateCloopInterfaces
$(MAKE) boot
$(MAKE) rest
$(MAKE) yvalve
ifeq ($(CLIENT_ONLY_FLG),Y)
ifeq ($(WITH_TOMCRYPT),Y)
$(MAKE) chacha
endif
$(MAKE) include_generic
endif
ifeq ($(CLIENT_ONLY_FLG),N)
$(MAKE) boot
$(MAKE) engine
$(MAKE) fbintl
$(MAKE) utilities
@ -331,7 +346,7 @@ master_process:
(cd $(BIN); $(LN) $(notdir $(GPRE)) $(notdir $(GPRE_CURRENT)))
$(MAKE) plugins
$(MAKE) examples
$(MAKE) rest
endif
cross_process:
@ -344,6 +359,7 @@ cross1:
$(MAKE) export_lists
$(MAKE) external
$(MAKE) updateCloopInterfaces
ifeq ($(CLIENT_ONLY_FLG),N)
$(MAKE) boot
$(MAKE) yvalve
$(MAKE) engine
@ -358,26 +374,39 @@ cross1:
(cd $(BIN); $(LN) $(notdir $(RUN_GPRE)) $(notdir $(GPRE_CURRENT)))
$(MAKE) include_generic
$(MAKE) -f Makefile.examples -C $(GEN_ROOT)/examples/
endif
cross2:
ln -sf $(SRC_ROOT)/include/cross/$(CROSS_CONFIG) $(SRC_ROOT)/include/gen/autoconfig.h
$(MAKE) prerequisites
$(MAKE) tommath
ifeq ($(WITH_TOMCRYPT),Y)
$(MAKE) LTCSOURCE=-DLTC_SOURCE tomcrypt
endif
ifeq ($(CLIENT_ONLY_FLG),N)
$(MAKE) re2
$(MAKE) libcds
endif
CC="$(CC)" CFLAGS="$(CFLAGS)" AR="$(AR)" $(MAKE) -C $(ROOT)/extern/decNumber
ln -sf $(ROOT)/extern/decNumber/libdecFloat$(CROSS).a $(LIB)
CXX="$(CXX)" CXXFLAGS="$(CXXFLAGS)" $(MAKE) -C $(ROOT)/extern/int128/absl/numeric
ln -sf $(ROOT)/extern/int128/absl/numeric/libi128$(CROSS).a $(LIB)
$(MAKE) libcds
$(MAKE) cross_rest
$(MAKE) yvalve
ifeq ($(CLIENT_ONLY_FLG),Y)
ifeq ($(WITH_TOMCRYPT),Y)
$(MAKE) chacha
endif
$(MAKE) include_generic
endif
ifeq ($(CLIENT_ONLY_FLG),N)
$(MAKE) engine
$(MAKE) fbintl
$(MAKE) utilities
$(MAKE) $(GPRE)
$(MAKE) plugins
$(MAKE) -f Makefile.plugins_examples
$(MAKE) cross_rest
endif
#___________________________________________________________________________
@ -538,7 +567,7 @@ $(FBTRACEMGR): $(FBTRACEMGR_Objects) $(COMMON_LIB)
gbak: $(GBAK)
$(GBAK): $(GBAK_Objects) $(COMMON_LIB)
$(EXE_LINK) $(EXE_LINK_OPTIONS) $^ -o $@ $(FIREBIRD_LIBRARY_LINK) $(LINK_LIBS)
$(EXE_LINK) $(EXE_LINK_OPTIONS) $^ -o $@ $(FIREBIRD_LIBRARY_LINK) $(LINK_LIBS) $(RE2LIB)
gsplit: $(GSPLIT)
@ -606,7 +635,7 @@ $(UDR_PLUGIN): $(UDRENG_Objects) $(COMMON_LIB)
legacy_user_management: $(LEGACY_USER_MANAGER)
$(LEGACY_USER_MANAGER): $(LEGACY_USERS_MANAGE_Objects) $(COMMON_LIB)
$(LINK_PLUGIN) $(call LIB_LINK_SONAME,$(notdir $@).0) -o $@ $^ $(LINK_PLUG_LIBS) $(FIREBIRD_LIBRARY_LINK)\
$(LINK_PLUGIN) $(call LIB_LINK_SONAME,$(notdir $@).0) -o $@ $^ $(LINK_PLUG_LIBS) $(RE2LIB) $(FIREBIRD_LIBRARY_LINK)\
$(call LIB_LINK_DARWIN_INSTALL_NAME,plugins/libLegacy_UserManager.$(SHRLIB_EXT))
chacha: $(CHACHA)
@ -630,7 +659,7 @@ $(PROFILER): $(Profiler_Objects) $(COMMON_LIB)
trace: $(FBTRACE)
$(FBTRACE): $(FBTRACE_UTIL_Objects) $(COMMON_LIB)
$(LINK_TRACE) -o $@ $^ $(FIREBIRD_LIBRARY_LINK) $(LINK_TRACE_LIBS) $(call LIB_LINK_DARWIN_INSTALL_NAME,plugins/libfbtrace.$(SHRLIB_EXT))
$(LINK_TRACE) -o $@ $^ $(RE2LIB) $(FIREBIRD_LIBRARY_LINK) $(LINK_TRACE_LIBS) $(call LIB_LINK_DARWIN_INSTALL_NAME,plugins/libfbtrace.$(SHRLIB_EXT))
auth_debug: $(AUTH_DEBUGGER)

View File

@ -41,7 +41,7 @@ DEV_FLAGS=$(COMMON_FLAGS) $(WARN_FLAGS)
CROSS_CONFIG=android.arm64
LDFLAGS += -static-libstdc++
DroidLibs := -lm -ldl $(DECLIB) $(RE2LIB) $(I128LIB) $(LIBCDSLIB)
DroidLibs := -lm -ldl $(DECLIB) $(I128LIB)
UDR_SUPPORT_LIBS :=
LINK_LIBS = $(DroidLibs)

View File

@ -41,7 +41,7 @@ DEV_FLAGS=$(COMMON_FLAGS) $(WARN_FLAGS)
CROSS_CONFIG=android.arme
LDFLAGS += -static-libstdc++
DroidLibs := -lm -ldl $(DECLIB) $(RE2LIB) $(I128LIB) $(LIBCDSLIB)
DroidLibs := -lm -ldl $(DECLIB) $(I128LIB)
UDR_SUPPORT_LIBS :=
LINK_LIBS = $(DroidLibs)

View File

@ -41,7 +41,7 @@ DEV_FLAGS=$(COMMON_FLAGS) $(WARN_FLAGS)
CROSS_CONFIG=android.x86
LDFLAGS += -static-libstdc++
DroidLibs := -lm -ldl $(DECLIB) $(RE2LIB) $(I128LIB) $(LIBCDSLIB)
DroidLibs := -lm -ldl $(DECLIB) $(I128LIB)
UDR_SUPPORT_LIBS :=
LINK_LIBS = $(DroidLibs)

View File

@ -41,7 +41,7 @@ DEV_FLAGS=$(COMMON_FLAGS) $(WARN_FLAGS)
CROSS_CONFIG=android.x86_64
LDFLAGS += -static-libstdc++
DroidLibs := -lm -ldl $(DECLIB) $(RE2LIB) $(I128LIB) $(LIBCDSLIB)
DroidLibs := -lm -ldl $(DECLIB) $(I128LIB)
UDR_SUPPORT_LIBS :=
LINK_LIBS = $(DroidLibs)

View File

@ -110,6 +110,8 @@ PLUSPLUS_FLAGS:= -fno-rtti -std=c++17
# If this is defined then we use special rules useful for developers only
IsDeveloper = @DEVEL_FLG@
CLIENT_ONLY_FLG=@CLIENT_ONLY_FLG@
WITH_TOMCRYPT=@WITH_TOMCRYPT@
CpuType=@CPU_TYPE@
PLATFORM=@PLATFORM@
@ -206,8 +208,8 @@ endif
STATICLIB_LINK = $(AR) crus
LINK_LIBS = @LIBS@ $(DECLIB) $(RE2LIB) $(I128LIB) $(LIBCDSLIB)
SO_LINK_LIBS = @LIBS@ $(DECLIB) $(RE2LIB) $(I128LIB) $(LIBCDSLIB)
LINK_LIBS = @LIBS@ $(DECLIB) $(I128LIB)
SO_LINK_LIBS = @LIBS@ $(DECLIB) $(I128LIB)
# Default extensions
@ -381,11 +383,11 @@ LINK_TRACE_LIBS = -L$(LIB) $(SO_LINK_LIBS)
LINK_FIREBIRD = $(LIB_LINK) $(LINK_FIREBIRD_SYMBOLS) $(LIB_LINK_OPTIONS) $(LIB_FIREBIRD_OPTIONS) $(UNDEF_FLAGS)\
$(call LIB_LINK_SONAME,$(LibrarySoName)) $(call LIB_LINK_RPATH,lib) $(call LINK_DARWIN_RPATH,..)
LINK_FIREBIRD_LIBS = -L$(LIB) $(LIB_GUI) $(SO_LINK_LIBS) $(MATHLIB) $(CRYPTLIB)
LINK_FIREBIRD_LIBS = -L$(LIB) $(LIB_GUI) $(SO_LINK_LIBS) $(MATHLIB)
LINK_ENGINE = $(LIB_LINK) $(LINK_PLUGIN_SYMBOLS) $(LIB_LINK_OPTIONS) $(LIB_FIREBIRD_OPTIONS) $(UNDEF_FLAGS)\
$(call LIB_LINK_SONAME,$(EngineSoName)) $(call LIB_LINK_RPATH,lib) $(call LINK_DARWIN_RPATH,..)
LINK_ENGINE_LIBS = $(LINK_FIREBIRD_LIBS) $(FIREBIRD_LIBRARY_LINK)
LINK_ENGINE_LIBS = $(LINK_FIREBIRD_LIBS) $(RE2LIB) $(LIBCDSLIB) $(FIREBIRD_LIBRARY_LINK)
LINK_UDRENG = $(LIB_LINK) $(LINK_PLUGIN_SYMBOLS) $(LIB_LINK_OPTIONS) $(call LIB_LINK_RPATH,lib) $(UNDEF_FLAGS)\
$(call LINK_DARWIN_RPATH,..)

View File

@ -565,6 +565,16 @@ AC_ARG_ENABLE(developer,
esac])
AC_SUBST(DEVEL_FLG)
CLIENT_ONLY_FLG=N
AC_ARG_ENABLE(client-only,
[ --enable-client-only use client-only mode rules (default=no)],
[case "$enableval" in
yes) CLIENT_ONLY_FLG=Y;;
no) CLIENT_ONLY_FLG=N;;
*) AC_MSG_ERROR(bad value '${enableval}' for --enable-client-only);;
esac])
AC_SUBST(CLIENT_ONLY_FLG)
CROSS=
IS_CROSS=N
AC_ARG_WITH(cross-build,
@ -579,9 +589,19 @@ AC_ARG_WITH(builtin-tommath,
[TOMMATH_BUILD=Y])
AC_SUBST(TOMMATH_BUILD)
WITH_TOMCRYPT=Y
AC_ARG_WITH(tomcrypt,
[ --without-tomcrypt do not use libtomcrypt (allowed with --enable-client-only)],
[case "$withval" in
yes) WITH_TOMCRYPT=Y;;
no) WITH_TOMCRYPT=N;;
*) AC_MSG_ERROR(bad value '${withval}' for --with-tomcrypt);;
esac])
AC_SUBST(WITH_TOMCRYPT)
TOMCRYPT_BUILD=N
AC_ARG_WITH(builtin-tomcrypt,
[ --with-builtin-tomcrypt build libtomcrypt library from firebird tree],
[ --with-builtin-tomcrypt build libtomcrypt library from firebird tree],
[TOMCRYPT_BUILD=Y])
AC_SUBST(TOMCRYPT_BUILD)
@ -592,7 +612,7 @@ AC_ARG_WITH(termlib,
RE2_BUILD=Y
AC_ARG_WITH(system-re2,
[ --with-system-re2 use system-wide re2 library instead of embedded copy],
[ --with-system-re2 use system-wide re2 library instead of embedded copy],
[RE2_BUILD=N])
AC_SUBST(RE2_BUILD)
@ -910,16 +930,18 @@ dnl check for tomcrypt presence
if test "$TOMCRYPT_BUILD" = "Y"; then
CRYPTLIB=-ltomcrypt
else
XE_SAVE_ENV()
CFLAGS="$CFLAGS -DLTC_NO_ASM"
AC_CHECK_HEADER(tomcrypt.h,,
AC_MSG_ERROR(Include file for tomcrypt not found - please install development tomcrypt package or use --with-builtin-tomcrypt))
XE_RESTORE_ENV()
XE_SAVE_ENV()
LIBS=
AC_CHECK_LIB(tomcrypt, sha1_init, CRYPTLIB=-ltomcrypt,
AC_MSG_ERROR(Library tomcrypt not found - please install development tomcrypt package or use --with-builtin-tomcrypt))
XE_RESTORE_ENV()
if test "$WITH_TOMCRYPT" = "Y"; then
XE_SAVE_ENV()
CFLAGS="$CFLAGS -DLTC_NO_ASM"
AC_CHECK_HEADER(tomcrypt.h,,
AC_MSG_ERROR(Include file for tomcrypt not found - please install development tomcrypt package or use --with-builtin-tomcrypt))
XE_RESTORE_ENV()
XE_SAVE_ENV()
LIBS=
AC_CHECK_LIB(tomcrypt, sha1_init, CRYPTLIB=-ltomcrypt,
AC_MSG_ERROR(Library tomcrypt not found - please install development tomcrypt package or use --with-builtin-tomcrypt))
XE_RESTORE_ENV()
fi
fi
AC_SUBST(CRYPTLIB)
@ -935,16 +957,18 @@ if test "$EDITLINE_FLG" = "Y"; then
AC_SUBST(TERMLIB)
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()
if test "$CLIENT_ONLY_FLG" = "N"; then
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)
fi
AC_SUBST(RE2LIB)
dnl Check for libraries
AC_SEARCH_LIBS(dlopen, dl)
@ -1324,7 +1348,13 @@ for fb_tgt in \$FB_TARGETS; do
dnl # output
mkdir -p gen/\$fb_tgt/firebird/bin
mkdir -p gen/\$fb_tgt/firebird/include/firebird/impl
mkdir -p gen/\$fb_tgt/firebird/lib
mkdir -p gen/\$fb_tgt/firebird/tests
if test "$CLIENT_ONLY_FLG" = "N" || test "$WITH_TOMCRYPT" = "Y"; then
mkdir -p gen/\$fb_tgt/firebird/plugins
fi
if test "$CLIENT_ONLY_FLG" = "N"; then
mkdir -p gen/\$fb_tgt/firebird/plugins/udr
mkdir -p gen/\$fb_tgt/firebird/examples/api
mkdir -p gen/\$fb_tgt/firebird/examples/dbcrypt
@ -1340,10 +1370,8 @@ dnl # output
mkdir -p gen/\$fb_tgt/firebird/examples/udr
mkdir -p gen/\$fb_tgt/firebird/examples/prebuilt/bin
mkdir -p gen/\$fb_tgt/firebird/examples/prebuilt/plugins
mkdir -p gen/\$fb_tgt/firebird/include/firebird/impl
mkdir -p gen/\$fb_tgt/firebird/lib
mkdir -p gen/\$fb_tgt/firebird/misc
mkdir -p gen/\$fb_tgt/firebird/tests
fi
dnl ### TEMP ### directories for generated .cpp, .o and .d by module name
for src_dir in `cd src; ls -R -1 * | grep : | tr -d : | tr "\n" " "; cd ..`; do
@ -1370,12 +1398,16 @@ dnl TODO: fix "arch-specific/linux/" paths for common posix scripts with SVN
for fb_tgt in $FB_TARGETS; do
AC_CONFIG_FILES([
gen/$fb_tgt/firebird/firebird.conf:builds/install/misc/firebird.conf
gen/$fb_tgt/firebird/plugins.conf:builds/install/misc/plugins.conf
])
if test "$CLIENT_ONLY_FLG" = "N"; then
AC_CONFIG_FILES([
gen/$fb_tgt/firebird/databases.conf:builds/install/misc/databases.conf
gen/$fb_tgt/firebird/fbtrace.conf:src/utilities/ntrace/fbtrace.conf
gen/$fb_tgt/firebird/intl/fbintl.conf:builds/install/misc/fbintl.conf
gen/$fb_tgt/firebird/plugins.conf:builds/install/misc/plugins.conf
gen/$fb_tgt/firebird/replication.conf:builds/install/misc/replication.conf
])
fi
done
if test "x$CROSS" != "x"; then