SQLR_VERSION = @SQLR_VERSION@
SONAME_VERSION_INFO = @SONAME_VERSION_INFO@

SQLRELAY_ENABLE_SHARED = @enable_shared@

SQLR=@SQLR@
SQLRELAY=@SQLRELAY@

# installation directories
prefix = @prefix@
exec_prefix= @exec_prefix@
includedir = @includedir@
libdir = @libdir@
javadir = ${exec_prefix}/java
dotnetdir = $(libdir)
libexecdir = @libexecdir@/$(SQLRELAY)
bindir = @bindir@
localstatedir = @localstatedir@
sysconfdir = @sysconfdir@
mandir = @mandir@
datadir = @datadir@
docdir = ${datadir}/doc/$(SQLRELAY)
licensedir = ${datadir}/licenses/$(SQLRELAY)
EXAMPLEDIR = ${datadir}/$(SQLRELAY)/examples
tmpdir = ${localstatedir}/$(SQLRELAY)/tmp
cachedir = ${localstatedir}/$(SQLRELAY)/cache
debugdir = ${localstatedir}/$(SQLRELAY)/debug
logdir = ${localstatedir}/$(SQLRELAY)/log
initscript_prefix = @initscript_prefix@


# command separator
AND = ;


# "this directory" prefix
THISDIR = ./


# script extension
SCRIPTEXT = .sh


# slash
SLASH = /


# shell
SHELL = @SHELL@


# libtool command
LIBTOOL = @LIBTOOL@


# compile commands
LTCOMPILE = $(LIBTOOL) --mode=compile
CC = @CC@
CXX = @CXX@
COMPILE = -c
OUT = -o 
BASECPPFLAGS = @CPPFLAGS@
EXTRACPPFLAGS =
CXXFLAGS = @CXXFLAGS@ @WALL@ @PIPE@ @WNOLONGDOUBLE@ @WNOOVERLOADEDVIRTUAL@
CFLAGS = @CFLAGS@ @WALL@ @PIPE@ @WNOLONGDOUBLE@ @WNOOVERLOADEDVIRTUAL@
WERROR = @WERROR@
WNOUNKNOWNPRAGMAS = @WNOUNKNOWNPRAGMAS@
WNOMISMATCHEDTAGS = @WNOMISMATCHEDTAGS@
INC = -I
OBJ = lo
DIRCPPFLAG = -DBINDIR=\"$(bindir)/\" -DLOCALSTATEDIR=\"$(localstatedir)/\" -DSYSCONFDIR=\"$(sysconfdir)/\" -DLIBEXECDIR=\"$(libexecdir)/\"


# linker flags
LTLINK = $(LIBTOOL) --mode=link
LINK = @CXX@
CCLINK = @CC@
AR = @AR@
LDFLAGS = @LDFLAGS@
LINKFLAGS = -rpath $(libdir) -version-info $(SONAME_VERSION_INFO) -no-undefined
MODLINKFLAGS = -rpath $(libexecdir) -avoid-version -module -no-undefined
INSTALLLIB = installlib
UNINSTALLLIB = uninstalllib
LIBEXT = la


# install commands
LTINSTALL = $(LIBTOOL) --mode=install
MV = mv
CP = cp
CHMOD = chmod
MKINSTALLDIRS = $(top_builddir)/mkinstalldirs
LTFINISH = $(LIBTOOL) --mode=finish
REPLACE = $(top_builddir)/replace.sh


#uninstall/clean commands
LTUNINSTALL = $(LIBTOOL) --mode=uninstall
LTCLEAN = $(LIBTOOL) --mode=clean
RM = rm -f
RMTREE = rm -rf
RMDIR = rmdir


# command to create a symbolic link
SYMLINK = ln -s


# uname -s
UNAME = @UNAME@


# client/server rpath flags
CLIENTUSERPATH = @CLIENTUSERPATH@
SERVERUSERPATH = @SERVERUSERPATH@


# math library
MATHLIB = @MATHLIB@


# extra libs
EXTRALIBS = @LIBS@


# windows environment
MINGW32 = @MINGW32@
CYGWIN = @CYGWIN@
UWIN = @UWIN@
MICROSOFT = @MICROSOFT@


# rudiments library
RUDIMENTSPATH = @RUDIMENTSPATH@
RUDIMENTSINCLUDES = @RUDIMENTSINCLUDES@
RUDIMENTSLIBS = @RUDIMENTSLIBS@
RUDIMENTSLIBSPATH = @RUDIMENTSLIBSPATH@ 


#iconv
HAVE_ICONV = @HAVE_ICONV@
ICONVINCLUDES = @ICONVINCLUDES@
ICONVLIBS = @ICONVLIBS@


# dmalloc
LIBDMALLOC = @LIBDMALLOC@


# ElectricFence
LIBEFENCE = @LIBEFENCE@


# c++
ENABLE_CPP = @ENABLE_CPP@
CPPCPPFLAGS = $(WERROR) $(BASECPPFLAGS) -I./ -I$(top_builddir)/ -I$(top_builddir)/src/common $(RUDIMENTSINCLUDES)
CPPLIBS = $(RUDIMENTSLIBS) $(LIBDMALLOC) $(LIBEFENCE)


# c
CUSERPATH = @CUSERPATH@
CCPPFLAGS = $(WERROR) $(BASECPPFLAGS) $(WNOMISMATCHEDTAGS) -I./ -I$(top_builddir)/ -I$(top_builddir)/src/api/c++ $(RUDIMENTSINCLUDES)
CLIBS = -L$(top_builddir)/src/api/c++ -l$(SQLR)client $(RUDIMENTSLIBS) $(LIBDMALLOC) $(LIBEFENCE)
ifneq ($(strip $(libdir)),)
ifeq ($(CUSERPATH),yes)
CLIBS += -R $(libdir)
endif
endif


# c#
HAVE_MONO = @HAVE_MONO@
CSC = @CSC@
CSCFLAGS = @CSCFLAGS@
SN = @SN@
ILDASM = @ILDASM@
ILDASMOUT = > 
ILASM = @ILASM@
GACUTIL = @GACUTIL@


# perl
HAVE_PERL = @HAVE_PERL@
PERL = @PERL@
PERLPREFIX = @PERLPREFIX@
PERLLIB = @PERLLIB@
PERLINC = @PERLINC@
PERLCCFLAGS = @PERLCCFLAGS@ @PERL500@ @PERLREALLYOLD@
PERLOPTIMIZE = @PERLOPTIMIZE@
PERLSITEARCH = @PERLSITEARCH@
PERLSITELIB = @PERLSITELIB@
PERLARCHLIBEXP = @PERLARCHLIBEXP@
PERLINSTALLMAN3DIR = @PERLINSTALLMAN3DIR@
PERLMAN3EXT = @PERLMAN3EXT@
PERLMANCLASSSEPARATOR = ::
XSUBPP = @XSUBPP@
POD2MAN = @POD2MAN@
OVERRIDEPERLSITEARCH = @OVERRIDEPERLSITEARCH@
OVERRIDEPERLSITELIB = @OVERRIDEPERLSITELIB@
OVERRIDEPERLINSTALLMAN3DIR = @OVERRIDEPERLINSTALLMAN3DIR@
OVERRIDEPERLMAN3EXT = @OVERRIDEPERLMAN3EXT@
PERLCCFLAGS_LOCAL = $(shell echo "$(PERLCCFLAGS)" | sed -e 's| -belf||g' -e 's|-KPIC||g' -e 's|-x.* | |g' -e 's|-x.*$$||g' -e "s|UNKNOWN||g" -e "s|-Dbool=char||g" -e "s|-mtune=.* | |g" -e "s|-arch .* ||g" -e "s|-Kalloca ||g")
PERLOPTIMIZE_LOCAL = $(shell echo "$(PERLOPTIMIZE)" | sed -e 's| -belf||g' -e 's|-KPIC||g' -e 's|-x.* | |g' -e 's|-x.*$$||g' -e "s|UNKNOWN||g" -e "s|-Dbool=char||g" -e "s|-mtune=.* | |g")
ifeq ($(OVERRIDEPERLSITEARCH),)
PERLSITEARCH_LOCAL = $(DESTDIR)$(shell echo "$(PERLSITEARCH)" | sed -e "s|UNKNOWN||g" )
else
PERLSITEARCH_LOCAL = $(DESTDIR)$(OVERRIDEPERLSITEARCH)
endif
ifeq ($(OVERRIDEPERLSITELIB),)
PERLSITELIB_LOCAL = $(DESTDIR)$(shell echo "$(PERLSITELIB)" | sed -e "s|UNKNOWN||g" )
else
PERLSITELIB_LOCAL = $(DESTDIR)$(OVERRIDEPERLSITELIB)
endif
PERLINC_LOCAL = $(DESTDIR)$(shell echo "$(PERLINC)" | sed -e "s|UNKNOWN||g" )
ifeq ($(OVERRIDEPERLINSTALLMAN3DIR),)
PERLINSTALLMAN3DIR_LOCAL = $(DESTDIR)$(shell echo "$(PERLINSTALLMAN3DIR)" | sed -e "s|UNKNOWN||g" )
else
PERLINSTALLMAN3DIR_LOCAL = $(DESTDIR)$(OVERRIDEPERLINSTALLMAN3DIR)
endif
ifeq ($(OVERRIDEPERLMAN3EXT),)
PERLMAN3EXT_LOCAL = $(shell echo "$(PERLMAN3EXT)" | sed -e "s|UNKNOWN||g" )
else
PERLMAN3EXT_LOCAL = $(OVERRIDEPERLMAN3EXT)
endif
PERLCPPFLAGS = $(BASECPPFLAGS) $(PERLOPTIMIZE_LOCAL) $(PERLCCFLAGS_LOCAL) -I$(top_builddir) -I$(top_builddir)/src/api/c++ $(RUDIMENTSINCLUDES) $(PERLINC_LOCAL)
PERLCONLIBS = $(PERLLIB) -L$(top_builddir)/src/api/c++ -l$(SQLR)client $(RUDIMENTSLIBS) $(LIBDMALLOC) $(LIBEFENCE) -rpath $(PERLSITEARCH_LOCAL)/auto/SQLRelay/Connection
PERLCURLIBS = $(PERLLIB) -L$(top_builddir)/src/api/c++ -l$(SQLR)client $(RUDIMENTSLIBS) $(LIBDMALLOC) $(LIBEFENCE) -rpath $(PERLSITEARCH_LOCAL)/auto/SQLRelay/Cursor
ifneq ($(strip $(libdir)),)
ifeq ($(PERLUSERPATH),yes)
PERLCONLIBS += -R $(libdir)
PERLCURLIBS += -R $(libdir)
endif
endif
PERLINSTALLMAN =
ifneq ($(POD2MAN),)
ifneq ($(PERLINSTALLMAN3DIR_LOCAL),)
PERLINSTALLMAN = installman
endif
endif


# python
HAVE_PYTHON = @HAVE_PYTHON@
PYTHONINCLUDES = @PYTHONFRAMEWORK@ @PYTHONINCLUDES@
PYTHONDIR = @PYTHONDIR@
PYTHONSITEDIR = @PYTHONSITEDIR@
PYTHONUSERPATH = @PYTHONUSERPATH@
PYTHONLIB = @PYTHONLIB@
PYTHONCPPFLAGS = -DHAVE_CONFIG $(BASECPPFLAGS) $(PYTHONINCLUDES) -I$(top_builddir)/src/common -I$(top_builddir)/src/api/c++ $(RUDIMENTSINCLUDES)
PYTHONLIBS = $(PYTHONLIB) -L$(top_builddir)/src/api/c++ -l$(SQLR)client $(RUDIMENTSLIBS) $(LIBDMALLOC) $(LIBEFENCE) -rpath $(PYTHONDIR)/$(PYTHONSITEDIR)/SQLRelay
ifneq ($(strip $(libdir)),)
ifeq ($(PYTHONUSERPATH),yes)
PYTHONLIBS += -R $(libdir)
endif
endif
IMPORTEXCEPTIONS = @IMPORTEXCEPTIONS@
EXCEPTIONSSTANDARDERROR = @EXCEPTIONSSTANDARDERROR@


# ruby
HAVE_RUBY = @HAVE_RUBY@
RUBY = @RUBY@
RUBYLIB = @RUBYLIB@
OVERRIDERUBYSITEARCHDIR = @OVERRIDERUBYSITEARCHDIR@

RUBYCFLAGS = $(shell LANG=POSIX $(RUBY) getcflags.rb | sed -e "s|-x.* | |g" -e "s|-belf||g" -e "s|-mtune=.* | |g" | $(MAKE) -s -f - | grep -v Entering | grep -v Leaving )

ifeq ($(OVERRIDERUBYSITEARCHDIR),)
RUBYSITEARCHDIR = $(shell LANG=POSIX $(RUBY) getsitearchdir.rb | $(MAKE) -s -f - | grep -v Entering | grep -v Leaving )
else
RUBYSITEARCHDIR = $(OVERRIDERUBYSITEARCHDIR)
endif

RUBYCPPFLAGS = -DHAVE_CONFIG $(BASECPPFLAGS) $(RUBYCFLAGS) -I./ -I$(top_builddir)/src/api/c++ $(RUDIMENTSINCLUDES)
RUBYLIBS = $(RUBYLIB) -L$(top_builddir)/src/api/c++ -l$(SQLR)client $(RUDIMENTSLIBS) $(LIBDMALLOC) $(LIBEFENCE) -rpath $(RUBYSITEARCHDIR)
ifneq ($(strip $(libdir)),)
ifeq ($(RUBYUSERPATH),yes)
RUBYLIBS += -R $(libdir)
endif
endif


# php
HAVE_PHP = @HAVE_PHP@
PHPINCLUDES = @PHPINCLUDES@
PHPEXTDIR = @PHPEXTDIR@
PHPUSERPATH = @PHPUSERPATH@
PHPVERSION = @PHPVERSION@
PHPMAJORVERSION = @PHPMAJORVERSION@
PHPLIB = @PHPLIB@
PHPCONFDIR = @PHPCONFDIR@
PHPCONFSTYLE = @PHPCONFSTYLE@
HAVE_PHP_PDO = @HAVE_PHP_PDO@
PHPCPPFLAGS = $(BASECPPFLAGS) -I$(top_builddir) -I$(top_builddir)/src/api/c++ $(RUDIMENTSINCLUDES) $(PHPINCLUDES) -DCOMPILE_DL=1
PHPLIBS = $(PHPLIB) -L$(top_builddir)/src/api/c++ -l$(SQLR)client $(RUDIMENTSLIBS) -rpath $(PHPEXTDIR)
ifneq ($(strip $(libdir)),)
ifeq ($(PHPUSERPATH),yes)
PHPLIBS += -R $(libdir)
endif
endif
PHPPDOCPPFLAGS = $(BASECPPFLAGS) -I$(top_builddir) -I$(top_builddir)/src/common -I$(top_builddir)/src/api/c++ $(RUDIMENTSINCLUDES) $(PHPINCLUDES) -DCOMPILE_DL=1
PHPPDOLIBS = $(PHPLIB) -L$(top_builddir)/src/api/c++ -l$(SQLR)client $(RUDIMENTSLIBS) -rpath $(PHPEXTDIR)
ifneq ($(strip $(libdir)),)
ifeq ($(PHPUSERPATH),yes)
PHPPDOLIBS += -R $(libdir)
endif
endif


# java
HAVE_JAVA = @HAVE_JAVA@
JAVAC = @JAVAC@
JAR = @JAR@
JAVAINCLUDES = @JAVAINCLUDES@
JAVAUSERPATH = @JAVAUSERPATH@
JAVACPPFLAGS = $(WERROR) $(WNOUNKNOWNPRAGMAS) $(BASECPPFLAGS) -I./ -I$(top_builddir) -I$(top_builddir)/src/api/c++ $(RUDIMENTSINCLUDES) $(JAVAINCLUDES)
JAVALIBS = -L$(top_builddir)/src/api/c++ -l$(SQLR)client $(RUDIMENTSLIBS) -rpath $(javadir)/com/firstworks/sqlrelay
CURSORCLASSPATH=@CURSORCLASSPATH@
ifneq ($(strip $(libdir)),)
ifeq ($(JAVAUSERPATH),yes)
JAVALIBS += -R $(libdir)
endif
endif


# tcl
HAVE_TCL = @HAVE_TCL@
TCLINCLUDE = @TCLINCLUDE@
TCLLIB = @TCLLIB@
TCLLIBSPATH = @TCLLIBSPATH@
TCLUSERPATH = @TCLUSERPATH@
TCLCPPFLAGS = -DHAVE_CONFIG $(BASECPPFLAGS) $(TCLINCLUDE) -I$(top_builddir) -I$(top_builddir)/src/api/c++ $(RUDIMENTSINCLUDES)
TCLLIBS = $(TCLLIB) -L$(top_builddir)/src/api/c++ -l$(SQLR)client $(RUDIMENTSLIBS) $(LIBDMALLOC) $(LIBEFENCE) -rpath $(TCLLIBSPATH)/sqlrelay
ifneq ($(strip $(libdir)),)
ifeq ($(TCLUSERPATH),yes)
TCLLIBS += -R $(libdir)
endif
endif


# erlang
HAVE_ERLANG = @HAVE_ERLANG@
ERLC = ERLC_EMULATOR=@ERL@ @ERLC@
ERLCFLAGS = @ERLCFLAGS@
ERLANGINCLUDES = @ERLANGINCLUDES@
ERLANGLIB = @ERLANGLIBS@
ERLANG_ROOT_DIR = @ERLANG_ROOT_DIR@
ERLANG_LIB_DIR = @ERLANG_LIB_DIR@
ERLANG_INSTALL_LIB_DIR = @ERLANG_INSTALL_LIB_DIR@
ERLANGUSERPATH = @ERLANGUSERPATH@
ERLANGCPPFLAGS = -DHAVE_CONFIG $(BASECPPFLAGS) $(ERLANGINCLUDES) -I$(top_builddir)/src/common -I$(top_builddir)/src/api/c -I$(top_builddir)/src/api/c++ $(RUDIMENTSINCLUDES)
ERLANGLIBS = $(ERLANGLIB) -L$(top_builddir)/src/api/c -L$(top_builddir)/src/api/c++ -l$(SQLR)clientwrapper -l$(SQLR)client $(RUDIMENTSLIBS) $(LIBDMALLOC) $(LIBEFENCE)
ifneq ($(strip $(libdir)),)
ifeq ($(ERLANGUSERPATH),yes)
ERLANGLIBS += -R $(libdir)
endif
endif


# node.js
HAVE_NODEJS = @HAVE_NODEJS@
NODE = @NODE@
NODEGYP = @NODEGYP@
NODEMODULEDIR = @NODEMODULEDIR@
NODEJSCFLAGS = @NODEJSCXXFLAGS@ -I@TOP_BUILDDIR_ABS@/src/api/c++ $(RUDIMENTSINCLUDES)
NODEJSLIBS = -L@TOP_BUILDDIR_ABS@/src/api/c++/.libs -l$(SQLR)client $(RUDIMENTSLIBS)


# mysql drop-in
ENABLE_MYSQL_DROP_IN = @ENABLE_MYSQL_DROP_IN@


# postgresql drop-in
ENABLE_POSTGRESQL_DROP_IN = @ENABLE_POSTGRESQL_DROP_IN@
PSQLUSERPATH = @PSQLUSERPATH@


# libsocket
SOCKETLIBS = @SOCKETLIBS@


# oracle
ORACLEINCLUDES = @ORACLEINCLUDES@
ORACLELIBS = @ORACLELIBS@
ORACLELIBSPATH = @ORACLELIBSPATH@
ORACLEUSERPATH = @ORACLEUSERPATH@
ifneq ($(strip $(ORACLELIBS)),)
ifneq ($(strip $(ORACLELIBSPATH)),)
ifeq ($(ORACLEUSERPATH),yes)
ORACLELIBS += -R $(ORACLELIBSPATH)
endif
endif
endif


# mysql
MYSQLINCLUDES = @MYSQLINCLUDES@
MYSQLLIBS = @MYSQLLIBS@
MYSQLLIBSPATH = @MYSQLLIBSPATH@
MYSQLUSERPATH = @MYSQLUSERPATH@
ifneq ($(strip $(MYSQLLIBS)),)
ifneq ($(strip $(MYSQLLIBSPATH)),)
ifeq ($(MYSQLUSERPATH),yes)
MYSQLLIBS += -R $(MYSQLLIBSPATH)
endif
endif
endif
MYSQLDRLIBCPPFLAGS = $(WERROR) $(BASECPPFLAGS) -I./ -I$(top_builddir)/ -I$(top_builddir)/src/common -I$(top_builddir)/src/api/c++ $(RUDIMENTSINCLUDES)
MYSQLDRLIBLIBS = -L$(top_builddir)/src/api/c++ -l$(SQLR)client $(RUDIMENTSLIBS)
ifneq ($(strip $(libdir)),)
ifeq ($(MYSQLUSERPATH),yes)
MYSQLDRLIBLIBS = -R $(libdir)
endif
endif


# postgresql
POSTGRESQLINCLUDES = @POSTGRESQLINCLUDES@
POSTGRESQLLIBS = @POSTGRESQLLIBS@
POSTGRESQLLIBSPATH = @POSTGRESQLLIBSPATH@
POSTGRESQLUSERPATH = @POSTGRESQLUSERPATH@
ifneq ($(strip $(POSTGRESQLLIBS)),)
ifneq ($(strip $(POSTGRESQLLIBSPATH)),)
ifeq ($(POSTGRESQLUSERPATH),yes)
POSTGRESQLLIBS += -R $(POSTGRESQLLIBSPATH)
endif
endif
endif
POSTGRESQLDRLIBCPPFLAGS = $(WERROR) $(BASECPPFLAGS) -I./ -I$(top_builddir)/ -I$(top_builddir)/src/common -I$(top_builddir)/src/api/c++ $(RUDIMENTSINCLUDES)
POSTGRESQLDRLIBLIBS = -L$(top_builddir)/src/api/c++ -l$(SQLR)client $(RUDIMENTSLIBS)
ifneq ($(strip $(libdir)),)
ifeq ($(PSQLUSERPATH),yes)
POSTGRESQLDRLIBLIBS += -R $(libdir)
endif
endif


# sqlite
SQLITEINCLUDES = @SQLITEINCLUDES@
SQLITELIBS = @SQLITELIBS@
SQLITELIBSPATH = @SQLITELIBSPATH@
SQLITEUSERPATH = @SQLITEUSERPATH@
ifneq ($(strip $(SQLITELIBS)),)
ifneq ($(strip $(SQLITELIBSPATH)),)
ifeq ($(SQLITEUSERPATH),yes)
SQLITELIBS += -R $(SQLITELIBSPATH)
endif
endif
endif


# freetds
FREETDSINCLUDES = @FREETDSINCLUDES@
FREETDSLIBS = @FREETDSLIBS@
FREETDSLIBSPATH = @FREETDSLIBSPATH@
FREETDSUSERPATH = @FREETDSUSERPATH@
ifneq ($(strip $(FREETDSLIBS)),)
ifneq ($(strip $(FREETDSLIBSPATH)),)
ifeq ($(FREETDSUSERPATH),yes)
FREETDSLIBS += -R $(FREETDSLIBSPATH)
endif
endif
endif


# sap/sybase
SYBASEINCLUDES = @SYBASEINCLUDES@
SYBASELIBS = @SYBASELIBS@
SYBASELIBSPATH = @SYBASELIBSPATH@
SYBASEUSERPATH = @SYBASEUSERPATH@
ifneq ($(strip $(SYBASELIBS)),)
ifneq ($(strip $(SYBASELIBSPATH)),)
ifeq ($(SYBASEUSERPATH),yes)
SYBASELIBS += -R $(SYBASELIBSPATH)
endif
endif
endif


# odbc
ENABLE_ODBC_DRIVER = @ENABLE_ODBC_DRIVER@
ODBCINCLUDES = @ODBCINCLUDES@
ODBCLIBS = @ODBCLIBS@
ODBCLIBSPATH = @ODBCLIBSPATH@
ODBCUSERPATH = @ODBCUSERPATH@
ifneq ($(strip $(ODBCLIBS)),)
ifneq ($(strip $(ODBCLIBSPATH)),)
ifeq ($(ODBCUSERPATH),yes)
ODBCLIBS += -R $(ODBCLIBSPATH)
endif
endif
endif
ODBCUNICODE = @ODBCUNICODE@
ODBCDRIVERCPPFLAGS = $(BASECPPFLAGS) -I$(top_builddir)/ -I$(top_builddir)/src/common -I$(top_builddir)/src/api/c++ $(RUDIMENTSINCLUDES) $(ODBCINCLUDES)
ODBCDRIVERLIBS = -L$(top_builddir)/src/api/c++ -l$(SQLR)client $(RUDIMENTSLIBS) $(ODBCLIBS)
ifneq ($(strip $(libdir)),)
ifeq ($(ODBCUSERPATH),yes)
ODBCDRIVERLIBS += -R $(libdir)
endif
endif


# mdbtools
MDBTOOLSINCLUDES = @MDBTOOLSINCLUDES@
MDBTOOLSLIBS = @MDBTOOLSLIBS@
MDBTOOLSLIBSPATH = @MDBTOOLSLIBSPATH@
MDBTOOLSUSERPATH = @MDBTOOLSUSERPATH@
ifneq ($(strip $(MDBTOOLSLIBS)),)
ifneq ($(strip $(MDBTOOLSLIBSPATH)),)
ifeq ($(MDBTOOLSUSERPATH),yes)
MDBTOOLSLIBS += -R $(MDBTOOLSLIBSPATH)
endif
endif
endif


# db2
DB2INCLUDES = @DB2INCLUDES@
DB2LIBS = @DB2LIBS@
DB2LIBSPATH = @DB2LIBSPATH@
DB2USERPATH = @DB2USERPATH@
ifneq ($(strip $(DB2LIBS)),)
ifneq ($(strip $(DB2LIBSPATH)),)
ifeq ($(DB2USERPATH),yes)
DB2LIBS += -R $(DB2LIBSPATH)
endif
endif
endif


# firebird
FIREBIRDINCLUDES = @FIREBIRDINCLUDES@
FIREBIRDLIBS = @FIREBIRDLIBS@
FIREBIRDLIBSPATH = @FIREBIRDLIBSPATH@
FIREBIRDUSERPATH = @FIREBIRDUSERPATH@
ifneq ($(strip $(FIREBIRDLIBS)),)
ifneq ($(strip $(FIREBIRDLIBSPATH)),)
ifeq ($(FIREBIRDUSERPATH),yes)
FIREBIRDLIBS += -R $(FIREBIRDLIBSPATH)
endif
endif
endif


# informix
INFORMIXINCLUDES = @INFORMIXINCLUDES@
INFORMIXLIBS = @INFORMIXLIBS@
INFORMIXCLILIBSPATH = @INFORMIXCLILIBSPATH@
INFORMIXESQLLIBSPATH = @INFORMIXESQLLIBSPATH@
INFORMIXUSERPATH = @INFORMIXUSERPATH@
ifneq ($(strip $(INFORMIXLIBS)),)
ifneq ($(strip $(INFORMIXCLILIBSPATH)),)
ifeq ($(INFORMIXUSERPATH),yes)
INFORMIXLIBS += -R $(INFORMIXCLILIBSPATH)
endif
endif
endif
ifneq ($(strip $(INFORMIXLIBS)),)
ifneq ($(strip $(INFORMIXESQLLIBSPATH)),)
ifeq ($(INFORMIXUSERPATH),yes)
INFORMIXLIBS += -R $(INFORMIXESQLLIBSPATH)
endif
endif
endif


# router
ENABLE_ROUTER = @ENABLE_ROUTER@
ROUTERLIBSPATH =
ROUTERUSERPATH =


# auth modules
AUTHALLOPTIONALTARGETS =
AUTHINSTALLSHAREDLIBOPTIONALTARGETS =
ifneq ($(ENABLE_CPP),)
AUTHALLOPTIONALTARGETS += all-sqlrelay
ifeq ($(SQLRELAY_ENABLE_SHARED),yes)
AUTHINSTALLSHAREDLIBOPTIONALTARGETS += installsharedlib-sqlrelay
endif
endif


# util
ifeq ($(SQLRELAY_ENABLE_SHARED),no)
STATICUTILPLUGINSRCS = sqlrconfigdeclarations.cpp \
			sqlrconfigassignments.cpp
STATICUTILPLUGINLOBJS = $(shell ls ../configs/*.$(OBJ))
endif
UTILCPPFLAGS = $(WERROR) $(BASECPPFLAGS) $(DIRCPPFLAG) -I./ -I$(top_builddir)/ -I$(top_builddir)/src/common $(RUDIMENTSINCLUDES)
UTILLIBS = $(RUDIMENTSLIBS)


# cmdline
ENABLE_CMDLINE = @ENABLE_CMDLINE@
CMDLINECPPFLAGS = $(WERROR) $(BASECPPFLAGS) -I$(top_builddir)/ -I$(top_builddir)/src/common -I$(top_builddir)/src/util -I$(top_builddir)/src/server -I$(top_builddir)/src/api/c++ $(RUDIMENTSINCLUDES)
CMDLINELIBS = -L$(top_builddir)/src/util -l$(SQLR)util -L$(top_builddir)/src/api/c++ -l$(SQLR)client $(RUDIMENTSLIBS) $(EXTRALIBS) $(LIBDMALLOC) $(LIBEFENCE)


# util
ENABLE_UTIL = @ENABLE_UTIL@


# server
ENABLE_SERVER = @ENABLE_SERVER@
ifeq ($(SQLRELAY_ENABLE_SHARED),no)
STATICPLUGINSRCS = sqlrserverconnectiondeclarations.cpp \
		sqlrserverconnectionassignments.cpp \
		sqlrprotocoldeclarations.cpp \
		sqlrprotocolassignments.cpp \
		sqlrparserdeclarations.cpp \
		sqlrparserassignments.cpp \
		sqlrloggerdeclarations.cpp \
		sqlrloggerassignments.cpp \
		sqlrpwdencdeclarations.cpp \
		sqlrpwdencassignments.cpp \
		sqlrauthdeclarations.cpp \
		sqlrauthassignments.cpp \
		sqlrtranslationdeclarations.cpp \
		sqlrtranslationassignments.cpp \
		sqlrresultsettranslationdeclarations.cpp \
		sqlrresultsettranslationassignments.cpp \
		sqlrresultsetrowtranslationdeclarations.cpp \
		sqlrresultsetrowtranslationassignments.cpp \
		sqlrfilterdeclarations.cpp \
		sqlrfilterassignments.cpp \
		sqlrquerydeclarations.cpp \
		sqlrqueryassignments.cpp
STATICPLUGINLOBJS = $(shell ls ../connections/*.$(OBJ)) \
		$(shell ls ../protocols/*.$(OBJ)) \
		$(shell ls ../parsers/*.$(OBJ)) \
		$(shell ls ../loggers/*.$(OBJ)) \
		$(shell ls ../notifications/*.$(OBJ)) \
		$(shell ls ../schedules/*.$(OBJ)) \
		$(shell ls ../routers/*.$(OBJ)) \
		$(shell ls ../pwdencs/*.$(OBJ)) \
		$(shell ls ../auths/*.$(OBJ)) \
		$(shell ls ../translations/*.$(OBJ)) \
		$(shell ls ../resultsettranslations/*.$(OBJ)) \
		$(shell ls ../resultsetrowtranslations/*.$(OBJ)) \
		$(shell ls ../filters/*.$(OBJ)) \
		$(shell ls ../queries/*.$(OBJ))
STATICPLUGINLIBS =
STATICPLUGINLIBS += $(DB2LIBS)
STATICPLUGINLIBS += $(FIREBIRDLIBS)
STATICPLUGINLIBS += $(FREETDSLIBS)
STATICPLUGINLIBS += $(MDBTOOLSLIBS)
STATICPLUGINLIBS += $(MYSQLLIBS)
STATICPLUGINLIBS += $(ODBCLIBS)
STATICPLUGINLIBS += $(ORACLELIBS)
STATICPLUGINLIBS += $(POSTGRESQLLIBS)
STATICPLUGINLIBS += $(SQLITELIBS)
STATICPLUGINLIBS += $(SYBASELIBS)
STATICPLUGINLIBS += -L$(top_builddir)/src/api/c++ -l$(SQLR)client
endif

SERVERCPPFLAGS = $(WERROR) $(BASECPPFLAGS) -I./ -I$(top_builddir)/ -I$(top_builddir)/src/common -I$(top_builddir)/src/util $(RUDIMENTSINCLUDES)
LIBSQLRSERVERLIBS = -L$(top_builddir)/src/util -l$(SQLR)util
SERVERLIBS = -L./ -l$(SQLR)server $(STATICPLUGINLIBS) -L$(top_builddir)/src/util -l$(SQLR)util $(RUDIMENTSLIBS) $(MATHLIB) $(EXTRALIBS) $(LIBDMALLOC) $(LIBEFENCE)
ifneq ($(strip $(libdir)),)
ifeq ($(SERVERUSERPATH),yes)
	SERVERLIBS += -R $(libdir)
endif
endif


# plugins
PLUGINCPPFLAGS = $(BASECPPFLAGS) -I$(top_builddir) -I$(top_builddir)/src/util -I$(top_builddir)/src/server -I$(top_builddir)/src/api/c++ -I$(top_builddir)/src/common $(RUDIMENTSINCLUDES)
PLUGINLIBS = -L$(top_builddir)/src/server -l$(SQLR)server -L$(top_builddir)/src/util -l$(SQLR)util $(RUDIMENTSLIBS) $(EXTRALIBS)
CONFIGPLUGINLIBS = -L$(top_builddir)/src/util -l$(SQLR)util $(RUDIMENTSLIBS) $(EXTRALIBS)

AUTHCPPFLAGS = $(PLUGINCPPFLAGS) -I$(top_builddir)/src/api/c++
SQLRAUTH_SQLRELAYLIBS = -L$(top_builddir)/src/api/c++ -l$(SQLR)client

ifeq ($(SQLRELAY_ENABLE_SHARED),yes)
INSTALLSHAREDLIB = installsharedlib
else
INSTALLSHAREDLIB =
endif


# connections
CONNECTIONCPPFLAGS = $(BASECPPFLAGS) -I$(top_builddir)/ -I$(top_builddir)/src/common -I$(top_builddir)/src/util -I$(top_builddir)/src/server $(RUDIMENTSINCLUDES)
CONNECTIONLIBS = -L$(top_builddir)/src/server -l$(SQLR)server -L$(top_builddir)/src/util -l$(SQLR)util $(RUDIMENTSLIBS) $(MATHLIB) $(EXTRALIBS)

DB2CONNECTIONCPPFLAGS = $(CONNECTIONCPPFLAGS) $(DB2INCLUDES)
DB2CONNECTIONLIBS = $(DB2LIBS) $(CONNECTIONLIBS)

FIREBIRDCONNECTIONCPPFLAGS = $(CONNECTIONCPPFLAGS) $(FIREBIRDINCLUDES)
FIREBIRDCONNECTIONLIBS = $(FIREBIRDLIBS) $(CONNECTIONLIBS)

FREETDSCONNECTIONCPPFLAGS = $(CONNECTIONCPPFLAGS) $(FREETDSINCLUDES)
FREETDSCONNECTIONLIBS = $(FREETDSLIBS) $(CONNECTIONLIBS)

INFORMIXCONNECTIONCPPFLAGS = $(CONNECTIONCPPFLAGS) $(INFORMIXINCLUDES)
INFORMIXCONNECTIONLIBS = $(INFORMIXLIBS) $(CONNECTIONLIBS)

MDBTOOLSCONNECTIONCPPFLAGS = $(CONNECTIONCPPFLAGS) $(MDBTOOLSINCLUDES)
MDBTOOLSCONNECTIONLIBS = $(MDBTOOLSLIBS) $(CONNECTIONLIBS)

MYSQLCONNECTIONCPPFLAGS = $(CONNECTIONCPPFLAGS) $(MYSQLINCLUDES)
MYSQLCONNECTIONLIBS = $(MYSQLLIBS) $(CONNECTIONLIBS)

ODBCCONNECTIONCPPFLAGS = $(CONNECTIONCPPFLAGS) $(ODBCINCLUDES) $(ICONVINCLUDES)
ODBCCONNECTIONLIBS = $(ODBCLIBS) $(ICONVLIBS) $(CONNECTIONLIBS)

ORACLECONNECTIONCPPFLAGS = $(CONNECTIONCPPFLAGS) $(ORACLEINCLUDES)
ORACLECONNECTIONLIBS = $(ORACLELIBS) $(CONNECTIONLIBS)

POSTGRESQLCONNECTIONCPPFLAGS = $(CONNECTIONCPPFLAGS) $(POSTGRESQLINCLUDES)
POSTGRESQLCONNECTIONLIBS = $(POSTGRESQLLIBS) $(CONNECTIONLIBS)

ROUTERCONNECTIONCPPFLAGS = -I$(top_builddir)/src/api/c++ $(CONNECTIONCPPFLAGS)
ROUTERCONNECTIONLIBS = -L$(top_builddir)/src/api/c++ -l$(SQLR)client $(CONNECTIONLIBS)
ifneq ($(strip $(ROUTERLIBSPATH)),)
ifeq ($(ROUTERUSERPATH),yes)
ROUTERCONNECTIONLIBS += -R $(ROUTERLIBSPATH)
endif
endif

SQLITECONNECTIONCPPFLAGS = $(CONNECTIONCPPFLAGS) $(SQLITEINCLUDES)
SQLITECONNECTIONLIBS = $(SQLITELIBS) $(CONNECTIONLIBS)

SYBASECONNECTIONCPPFLAGS = $(CONNECTIONCPPFLAGS) $(SYBASEINCLUDES)
SYBASECONNECTIONLIBS = $(SYBASELIBS) $(CONNECTIONLIBS)


# connections
CONNECTIONSALLTARGETS =
CONNECTIONSINSTALLTARGETS =

ifneq ($(strip $(DB2LIBS)),)
CONNECTIONSALLTARGETS += all-db2
CONNECTIONSINSTALLTARGETS += installsharedlib-db2
endif
ifneq ($(strip $(FREETDSLIBS)),)
CONNECTIONSALLTARGETS += all-freetds
CONNECTIONSINSTALLTARGETS += installsharedlib-freetds
endif
ifneq ($(strip $(FIREBIRDLIBS)),)
CONNECTIONSALLTARGETS += all-firebird
CONNECTIONSINSTALLTARGETS += installsharedlib-firebird
endif
ifneq ($(strip $(INFORMIXLIBS)),)
CONNECTIONSALLTARGETS += all-informix
CONNECTIONSINSTALLTARGETS += installsharedlib-informix
endif
ifneq ($(strip $(MDBTOOLSLIBS)),)
CONNECTIONSALLTARGETS += all-mdbtools
CONNECTIONSINSTALLTARGETS += installsharedlib-mdbtools
endif
ifneq ($(strip $(MYSQLLIBS)),)
CONNECTIONSALLTARGETS += all-mysql
CONNECTIONSINSTALLTARGETS += installsharedlib-mysql
endif
ifneq ($(strip $(ODBCLIBS)),)
ifneq ($(strip $(ODBCUNICODE)),)
CONNECTIONSALLTARGETS += all-odbc
CONNECTIONSINSTALLTARGETS += installsharedlib-odbc
endif
endif
ifneq ($(strip $(ORACLELIBS)),)
CONNECTIONSALLTARGETS += all-oracle
CONNECTIONSINSTALLTARGETS += installsharedlib-oracle
endif
ifneq ($(strip $(POSTGRESQLLIBS)),)
CONNECTIONSALLTARGETS += all-postgresql
CONNECTIONSINSTALLTARGETS += installsharedlib-postgresql
endif
ifneq ($(strip $(SQLITELIBS)),)
CONNECTIONSALLTARGETS += all-sqlite
CONNECTIONSINSTALLTARGETS += installsharedlib-sqlite
endif
ifneq ($(strip $(SYBASELIBS)),)
CONNECTIONSALLTARGETS += all-sap
CONNECTIONSINSTALLTARGETS += installsharedlib-sap
endif
ifneq ($(strip $(ENABLE_ROUTER)),)
CONNECTIONSALLTARGETS += all-router
CONNECTIONSINSTALLTARGETS += installsharedlib-router
endif


# config scripts
INSTALLCONFIG =
ifneq ($(ENABLE_CPP),)
INSTALLCONFIG += install-clientconfig
endif
ifneq ($(ENABLE_SERVER),)
INSTALLCONFIG += install-serverconfig
endif


# tests
TESTALLSUBDIRS = all-c all-cpp all-java all-stress all-tcl
ifneq ($(HAVE_MONO),)
	TESTALLSUBDIRS += all-cs
endif

CPPTESTCPPFLAGS = $(BASECPPFLAGS) -I$(includedir) $(RUDIMENTSINCLUDES)
CPPTESTLIBS = -L$(libdir) -l$(SQLR)client $(RUDIMENTSLIBS) $(LIBEFENCE)

CTESTCPPFLAGS = $(BASECPPFLAGS) -I$(includedir) $(RUDIMENTSINCLUDES)
CTESTLIBS = -L$(libdir) -l$(SQLR)client -l$(SQLR)clientwrapper $(RUDIMENTSLIBS) $(LIBEFENCE)

ODBCTESTCPPFLAGS = $(BASECPPFLAGS) -I$(includedir) $(ODBCINCLUDES)
ODBCTESTLIBS = $(RUDIMENTSLIBS) $(ODBCLIBS) $(LIBEFENCE)

DROPTINTESTTARGETS = 
ifneq ($(strip $(MYSQLLIBS)),)
	DROPINTESTTARGETS += mysql
endif
ifneq ($(strip $(POSTGRESQLLIBS)),)
	DROPINTESTTARGETS += postgresql
endif
DROPINTESTCPPFLAGS = $(BASECPPFLAGS) -I$(top_builddir) -I$(includedir) $(RUDIMENTSINCLUDES)
DROPINTESTLIBS = $(RUDIMENTSLIBS)


# bench
BENCHCPPFLAGS = $(BASECPPFLAGS) $(RUDIMENTSINCLUDES) -I$(top_builddir)/src/api/c++
BENCHLIBS = $(RUDIMENTSLIBS) $(EXTRALIBS)


# stress tests
STRESSCPPFLAGS = $(BASECPPFLAGS) -I$(includedir) $(RUDIMENTSINCLUDES)
STRESSLIBS = -L$(libdir) -l$(SQLR)client $(RUDIMENTSLIBS) $(LIBEFENCE)


# docs
ENABLE_DOC = @ENABLE_DOC@


# microsoft-specific
EXE = @EXE@


# shared object and module
SOSUFFIX = @SOSUFFIX@
MODULESUFFIX = @MODULESUFFIX@
JNISUFFIX = @JNISUFFIX@
MODULERENAME = $(top_builddir)/modulerename.sh


# build directories
INSTALLSUBDIRS = install-src install-bin install-etc install-init install-license
ifeq ($(ENABLE_CPP),yes)
INSTALLSUBDIRS += install-pkgconfig
endif
ifeq ($(ENABLE_DOC),yes)
INSTALLSUBDIRS += install-man install-doc
endif
UNINSTALLSUBDIRS = uninstall-src uninstall-bin uninstall-etc uninstall-init uninstall-license uninstall-pkgconfig uninstall-man uninstall-doc

ifeq ($(SQLRELAY_ENABLE_SHARED),yes)
SRCALLSUBDIRS = all-api
SRCINSTALLSUBDIRS = install-api
ifeq ($(ENABLE_UTIL),yes)
SRCALLSUBDIRS += all-util all-configs
SRCINSTALLSUBDIRS += install-util install-configs
endif
ifeq ($(ENABLE_SERVER),yes)
SRCALLSUBDIRS += all-server all-parsers all-queries all-loggers all-notifications all-schedules all-routers all-protocols all-pwdencs all-auths all-translations all-resultsettranslations all-resultsetrowtranslations all-filters all-connections
SRCINSTALLSUBDIRS += install-server install-parsers install-queries install-loggers install-notifications install-schedules install-routers install-protocols install-pwdencs install-auths install-translations install-resultsettranslations install-resultsetrowtranslations install-filters install-connections
endif
else
SRCALLSUBDIRS = all-api
SRCINSTALLSUBDIRS = install-api
ifeq ($(ENABLE_UTIL),yes)
SRCALLSUBDIRS += all-configs all-util
SRCINSTALLSUBDIRS += install-configs install-util
endif
ifeq ($(ENABLE_SERVER),yes)
SRCALLSUBDIRS += all-parsers all-queries all-loggers all-notifications all-schedules all-routers all-protocols all-pwdencs all-auths all-translations all-resultsettranslations all-resultsetrowtranslations all-filters all-connections all-server
SRCINSTALLSUBDIRS += install-parsers install-queries install-loggers install-notifications install-schedules install-routers install-protocols install-pwdencs install-auths install-translations install-resultsettranslations install-resultsetrowtranslations install-filters install-connections install-server
endif
endif
ifeq ($(ENABLE_CMDLINE),yes)
SRCALLSUBDIRS += all-cmdline
SRCINSTALLSUBDIRS += install-cmdline
endif


APIALLSUBDIRS =
APICLEANSUBDIRS = clean-cpp clean-c clean-cs clean-mysql clean-postgresql clean-odbc clean-python clean-perl clean-ruby clean-php clean-phppdo clean-java clean-tcl clean-erlang
APIINSTALLSUBDIRS =
APIUNINSTALLSUBDIRS = uninstall-cpp uninstall-c uninstall-cs uninstall-mysql uninstall-postgresql uninstall-odbc uninstall-java
ifneq ($(ENABLE_CPP),)
APIALLSUBDIRS += all-cpp all-c
APIINSTALLSUBDIRS += install-cpp install-c
endif
ifneq ($(HAVE_MONO),)
APIALLSUBDIRS += all-cs
APIINSTALLSUBDIRS += install-cs
endif
ifeq ($(SQLRELAY_ENABLE_SHARED),yes)
ifeq ($(ENABLE_MYSQL_DROP_IN),yes)
APIALLSUBDIRS += all-mysql
APIINSTALLSUBDIRS += install-mysql
endif
ifeq ($(ENABLE_POSTGRESQL_DROP_IN),yes)
APIALLSUBDIRS += all-postgresql
APIINSTALLSUBDIRS += install-postgresql
endif
ifneq ($(ENABLE_ODBC_DRIVER),)
ifneq ($(ODBCLIBS),)
APIALLSUBDIRS += all-odbc
APIINSTALLSUBDIRS += install-odbc
endif
endif
ifneq ($(HAVE_PYTHON),)
APIALLSUBDIRS += all-python
APIINSTALLSUBDIRS += install-python
APIUNINSTALLSUBDIRS += uninstall-python
endif
ifneq ($(HAVE_PERL),)
APIALLSUBDIRS += all-perl
APIINSTALLSUBDIRS += install-perl
APIUNINSTALLSUBDIRS += uninstall-perl
endif
ifneq ($(HAVE_RUBY),)
APIALLSUBDIRS += all-ruby
APIINSTALLSUBDIRS += install-ruby
APIUNINSTALLSUBDIRS += uninstall-ruby
endif
ifneq ($(HAVE_PHP),)
APIALLSUBDIRS += all-php
APIINSTALLSUBDIRS += install-php
APIUNINSTALLSUBDIRS += uninstall-php
endif
ifneq ($(HAVE_PHP_PDO),)
APIALLSUBDIRS += all-phppdo
APIINSTALLSUBDIRS += install-phppdo
APIUNINSTALLSUBDIRS += uninstall-phppdo
endif
ifneq ($(HAVE_JAVA),)
APIALLSUBDIRS += all-java
APIINSTALLSUBDIRS += install-java
endif
ifneq ($(HAVE_TCL),)
APIALLSUBDIRS += all-tcl
APIINSTALLSUBDIRS += install-tcl
APIUNINSTALLSUBDIRS += uninstall-tcl
endif
ifneq ($(HAVE_ERLANG),)
APIALLSUBDIRS += all-erlang
APIINSTALLSUBDIRS += install-erlang
APIUNINSTALLSUBDIRS += uninstall-erlang
endif
ifneq ($(HAVE_NODEJS),)
APIALLSUBDIRS += all-nodejs
APICLEANSUBDIRS += clean-nodejs
APIINSTALLSUBDIRS += install-nodejs
APIUNINSTALLSUBDIRS += uninstall-nodejs
endif
endif
