Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ autom4te.cache
/src/.libs
/src/sysbench
/src/drivers/mysql/.deps
src/drivers/sqlserver/.deps
/src/drivers/oracle/.deps
/src/drivers/pgsql/.deps
/src/tests/cpu/.deps
Expand Down
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,11 @@ build and use an older 0.5 release on Windows.
### Debian/Ubuntu
``` shell
apt -y install make automake libtool pkg-config libaio-dev
# For SQL Server support
curl https://packages.microsoft.com/keys/microsoft.asc | sudo tee /etc/apt/trusted.gpg.d/microsoft.asc
curl https://packages.microsoft.com/config/ubuntu/$(lsb_release -rs)/prod.list | sudo tee /etc/apt/sources.list.d/mssql-release.list
sudo apt-get update
sudo ACCEPT_EULA=Y apt-get install -y msodbcsql18 sqlcmd
# For MySQL support
apt -y install libmysqlclient-dev libssl-dev
# For PostgreSQL support
Expand Down Expand Up @@ -180,7 +185,8 @@ Assuming you have Xcode (or Xcode Command Line Tools) and Homebrew installed:
``` shell
./autogen.sh
# Add --with-pgsql to build with PostgreSQL support
./configure
# Add --with-sqlserver --without-mysql to build with SQL Server support
./configure
make -j
make install
```
Expand Down
23 changes: 23 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,17 @@ AS_IF([test "x$with_pgsql" != "xno"],
[pgsql_support=no])
AC_MSG_RESULT([$pgsql_support])

# Check if we should compile with SQL Server support
AC_ARG_WITH([sqlserver],
AS_HELP_STRING([--with-sqlserver],
[compile with SQL Server support (default is disabled)]),
[], [with_sqlserver=no])
AC_MSG_CHECKING([whether to compile with SQL Server support])
AS_IF([test "x$with_sqlserver" != "xno"],
[sqlserver_support=yes],
[sqlserver_support=no])
AC_MSG_RESULT([$sqlserver_support])

# Set LuaJIT flags
SB_LUAJIT

Expand Down Expand Up @@ -199,6 +210,16 @@ AC_SUBST([USE_PGSQL])
AC_CHECK_AIO
AM_CONDITIONAL(USE_AIO, test x$enable_aio = xyes)

AS_IF([test x$with_sqlserver != xno], [
AC_CHECK_SQLSERVER([$with_sqlserver])
USE_SQLSERVER=1
AC_DEFINE(USE_SQLSERVER,1,[Define to 1 if you want to compile with SQL Server support])
AC_SUBST([SQLSERVER_LIBS])
AC_SUBST([SQLSERVER_CFLAGS])
])
AM_CONDITIONAL(USE_SQLSERVER, test x$with_sqlserver != xno)
AC_SUBST([USE_SQLSERVER])

# Checks for header files.
AC_HEADER_STDC

Expand Down Expand Up @@ -398,6 +419,7 @@ src/Makefile
src/drivers/Makefile
src/drivers/mysql/Makefile
src/drivers/pgsql/Makefile
src/drivers/sqlserver/Makefile
src/tests/Makefile
src/tests/cpu/Makefile
src/tests/fileio/Makefile
Expand Down Expand Up @@ -428,6 +450,7 @@ AC_MSG_RESULT([datadir : $(eval echo ${datadir})])
AC_MSG_RESULT([])
AC_MSG_RESULT([MySQL support : ${mysql_support}])
AC_MSG_RESULT([PostgreSQL support : ${pgsql_support}])
AC_MSG_RESULT([SQL Server support : ${sqlserver_support}])
AC_MSG_RESULT([])
AC_MSG_RESULT([LuaJIT : ${sb_use_luajit}])
AC_MSG_RESULT([LUAJIT_CFLAGS : ${LUAJIT_CFLAGS}])
Expand Down
Loading