Skip to content

Commit

Permalink
- Improved logging support (#15), misc fixes
Browse files Browse the repository at this point in the history
- Improved logging support (uses spdlog)
- VS build files now use vcpkg
- Linux build fixes
- MinGW (32/64) build with autoconf now is fully working, doesn't need qmake anymore
  • Loading branch information
mridoni committed Jun 16, 2022
1 parent fa576dd commit 6b8ca51
Show file tree
Hide file tree
Showing 154 changed files with 27,212 additions and 1,121 deletions.
2 changes: 1 addition & 1 deletion Makefile.am
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## Process this file with automake to generate Makefile.in
ACLOCAL_AMFLAGS = -I m4
SUBDIRS = libcpputils libgixpp gixpp runtime/libgixsql
SUBDIRS = spdlog libcpputils libgixpp gixpp runtime/libgixsql
EXTRA_DIST = copy/SQLCA.cpy misc/gixsql-wrapper
CLEANFILES = *~

Expand Down
46 changes: 41 additions & 5 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Process this file with autoconf to produce a configure script.

AC_PREREQ([2.69])
AC_INIT([gixsql], [1.0.16dev1], [[email protected]])
AC_INIT([gixsql], [1.0.16dev2], [[email protected]])
AC_CONFIG_SRCDIR([config.h.in])
AC_CONFIG_HEADERS([config.h])
AM_INIT_AUTOMAKE([1.9.6 -Wall -Werror dist-bzip2])
Expand Down Expand Up @@ -40,6 +40,34 @@ AC_TYPE_UINT64_T
AC_TYPE_UINT8_T
AC_CHECK_TYPES([ptrdiff_t])

# AC_CANONICAL_HOST is needed to access the 'host_os' variable
AC_CANONICAL_HOST

build_linux=no
build_windows=no
build_mac=no

# Detect the target system
case "${host_os}" in
linux*)
build_linux=yes
;;
cygwin*|mingw*)
build_windows=yes
;;
darwin*)
build_mac=yes
;;
*)
AC_MSG_ERROR(["OS $host_os is not supported"])
;;
esac

# Pass the conditionals to automake
AM_CONDITIONAL([BUILD_LINUX], [test "$build_linux" = "yes"])
AM_CONDITIONAL([BUILD_WINDOWS], [test "$build_windows" = "yes"])
AM_CONDITIONAL([BUILD_OSX], [test "$build_mac" = "yes"])

# Checks for libraries.
PKG_PROG_PKG_CONFIG

Expand All @@ -62,6 +90,14 @@ AS_IF([test "$enable_mysql" != "no"],
[PKG_CHECK_MODULES([MYSQL],
[mysqlclient],
[enable_mysql=yes],
[AS_IF([test "$enable_mysql" = "yes"],
[AC_MSG_ERROR([libmysqlclient required, but not found.])],
[enable_mysql=maybenot])])])

AS_IF([test "$enable_mysql" != "no" && test "$enable_mysql" != "yes"],
[PKG_CHECK_MODULES([MARIADB],
[libmariadb],
[enable_mysql=yes],
[AS_IF([test "$enable_mysql" = "yes"],
[AC_MSG_ERROR([libmysqlclient required, but not found.])],
[enable_mysql=no])])])
Expand Down Expand Up @@ -92,13 +128,12 @@ AS_IF([test "$with_default_driver" == "none" || test "$with_default_driver" == "

num_drivers=0
cur_driver=
AS_IF([test "$enable_odbc" = "yes"], [ num_drivers=$(($numdrivers+1)) ; cur_driver=odbc ])
AS_IF([test "$enable_mysql" = "yes"], [ num_drivers=$(($numdrivers+1)) ; cur_driver=mysql ])
AS_IF([test "$enable_pgsql" = "yes"], [ num_drivers=$(($numdrivers+1)) ; cur_driver=pgsql ])
AS_IF([test "$enable_odbc" = "yes"], [ ((num_drivers++)) ; cur_driver=odbc ])
AS_IF([test "$enable_mysql" = "yes"], [ ((num_drivers++)) ; cur_driver=mysql ])
AS_IF([test "$enable_pgsql" = "yes"], [ ((num_drivers++)) ; cur_driver=pgsql ])

AS_IF([test "$num_drivers" = "0" ], [ AC_MSG_ERROR([At least one DBMS driver must be enabled]) ])


AS_IF([test x$with_default_driver != xnone ],
[
echo "setting ${with_default_driver} as default driver"
Expand Down Expand Up @@ -141,6 +176,7 @@ AC_FUNC_MALLOC
AC_CHECK_FUNCS([localeconv memmove memset select strcasecmp strdup strndup strrchr strstr strtoull])

AC_CONFIG_FILES([Makefile
spdlog/Makefile
libcpputils/Makefile
libgixpp/Makefile
gixpp/Makefile
Expand Down
44 changes: 0 additions & 44 deletions gixpp/gixpp.pro

This file was deleted.

2 changes: 1 addition & 1 deletion gixpp/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ USA.
#define PATH_LIST_SEP ":"
#endif

#define GIXPP_VER "1.0.16dev1"
#define GIXPP_VER "1.0.16dev2"

using namespace popl;

Expand Down
42 changes: 0 additions & 42 deletions gixsql.pro

This file was deleted.

45 changes: 40 additions & 5 deletions gixsql.sln
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,15 @@ MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "runtime", "runtime", "{CA214231-A8B6-4FBA-B3AE-3FE5CAF64A38}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libgixsql", "runtime\libgixsql\libgixsql-cpp.vcxproj", "{F501313D-9C68-4164-80C3-E21CA3837E47}"
ProjectSection(ProjectDependencies) = postProject
{C9ED4948-CA5B-4E8A-A4A8-EF54C13B19EA} = {C9ED4948-CA5B-4E8A-A4A8-EF54C13B19EA}
{C8BB29A7-CC21-4811-95DE-14C24A64DF5E} = {C8BB29A7-CC21-4811-95DE-14C24A64DF5E}
{63FDBCCD-8254-479C-A19F-5DAC3A0B9910} = {63FDBCCD-8254-479C-A19F-5DAC3A0B9910}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libgixsql-mysql", "runtime\libgixsql-mysql\libgixsql-mysql.vcxproj", "{63FDBCCD-8254-479C-A19F-5DAC3A0B9910}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libgixsql-odbc", "runtime\libgixsql-odbc\libgixsql-odbc.vcxproj", "{C8BB29A7-CC21-4811-95DE-14C24A64DF5E}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libgixsql-pgsql", "runtime\libgixsql-pgsql\libgixsql-pgsql.vcxproj", "{C9ED4948-CA5B-4E8A-A4A8-EF54C13B19EA}"
ProjectSection(ProjectDependencies) = postProject
{F501313D-9C68-4164-80C3-E21CA3837E47} = {F501313D-9C68-4164-80C3-E21CA3837E47}
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{03E0162F-A04E-40F0-94A8-6E897A00EFB7}"
EndProject
Expand All @@ -36,6 +34,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gixpp", "gixpp\gixpp.vcxpro
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "gixsql-tests", "gixsql-tests\gixsql-tests.csproj", "{2DC3D86A-319C-4656-9CE6-A09DB069EABF}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "spdlog", "spdlog\spdlog.vcxproj", "{D3FD3860-9F56-4C47-ADF6-B48D9C8BC47A}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug_5.15.2|Any CPU = Debug_5.15.2|Any CPU
Expand Down Expand Up @@ -315,6 +315,40 @@ Global
{2DC3D86A-319C-4656-9CE6-A09DB069EABF}.Test_Release|Win32.Build.0 = Release|Any CPU
{2DC3D86A-319C-4656-9CE6-A09DB069EABF}.Test_Release|x64.ActiveCfg = Release|Any CPU
{2DC3D86A-319C-4656-9CE6-A09DB069EABF}.Test_Release|x64.Build.0 = Release|Any CPU
{D3FD3860-9F56-4C47-ADF6-B48D9C8BC47A}.Debug_5.15.2|Any CPU.ActiveCfg = Debug|Win32
{D3FD3860-9F56-4C47-ADF6-B48D9C8BC47A}.Debug_5.15.2|Any CPU.Build.0 = Debug|Win32
{D3FD3860-9F56-4C47-ADF6-B48D9C8BC47A}.Debug_5.15.2|Win32.ActiveCfg = Debug|Win32
{D3FD3860-9F56-4C47-ADF6-B48D9C8BC47A}.Debug_5.15.2|Win32.Build.0 = Debug|Win32
{D3FD3860-9F56-4C47-ADF6-B48D9C8BC47A}.Debug_5.15.2|x64.ActiveCfg = Debug|x64
{D3FD3860-9F56-4C47-ADF6-B48D9C8BC47A}.Debug_5.15.2|x64.Build.0 = Debug|x64
{D3FD3860-9F56-4C47-ADF6-B48D9C8BC47A}.Debug|Any CPU.ActiveCfg = Debug|Win32
{D3FD3860-9F56-4C47-ADF6-B48D9C8BC47A}.Debug|Win32.ActiveCfg = Debug|Win32
{D3FD3860-9F56-4C47-ADF6-B48D9C8BC47A}.Debug|Win32.Build.0 = Debug|Win32
{D3FD3860-9F56-4C47-ADF6-B48D9C8BC47A}.Debug|x64.ActiveCfg = Debug|x64
{D3FD3860-9F56-4C47-ADF6-B48D9C8BC47A}.Debug|x64.Build.0 = Debug|x64
{D3FD3860-9F56-4C47-ADF6-B48D9C8BC47A}.Release_NoRuntime|Any CPU.ActiveCfg = Debug|Win32
{D3FD3860-9F56-4C47-ADF6-B48D9C8BC47A}.Release_NoRuntime|Any CPU.Build.0 = Debug|Win32
{D3FD3860-9F56-4C47-ADF6-B48D9C8BC47A}.Release_NoRuntime|Win32.ActiveCfg = Release|Win32
{D3FD3860-9F56-4C47-ADF6-B48D9C8BC47A}.Release_NoRuntime|Win32.Build.0 = Release|Win32
{D3FD3860-9F56-4C47-ADF6-B48D9C8BC47A}.Release_NoRuntime|x64.ActiveCfg = Release|x64
{D3FD3860-9F56-4C47-ADF6-B48D9C8BC47A}.Release_NoRuntime|x64.Build.0 = Release|x64
{D3FD3860-9F56-4C47-ADF6-B48D9C8BC47A}.Release|Any CPU.ActiveCfg = Release|Win32
{D3FD3860-9F56-4C47-ADF6-B48D9C8BC47A}.Release|Win32.ActiveCfg = Release|Win32
{D3FD3860-9F56-4C47-ADF6-B48D9C8BC47A}.Release|Win32.Build.0 = Release|Win32
{D3FD3860-9F56-4C47-ADF6-B48D9C8BC47A}.Release|x64.ActiveCfg = Release|x64
{D3FD3860-9F56-4C47-ADF6-B48D9C8BC47A}.Release|x64.Build.0 = Release|x64
{D3FD3860-9F56-4C47-ADF6-B48D9C8BC47A}.Test_Debug|Any CPU.ActiveCfg = Debug|Win32
{D3FD3860-9F56-4C47-ADF6-B48D9C8BC47A}.Test_Debug|Any CPU.Build.0 = Debug|Win32
{D3FD3860-9F56-4C47-ADF6-B48D9C8BC47A}.Test_Debug|Win32.ActiveCfg = Debug|Win32
{D3FD3860-9F56-4C47-ADF6-B48D9C8BC47A}.Test_Debug|Win32.Build.0 = Debug|Win32
{D3FD3860-9F56-4C47-ADF6-B48D9C8BC47A}.Test_Debug|x64.ActiveCfg = Debug|x64
{D3FD3860-9F56-4C47-ADF6-B48D9C8BC47A}.Test_Debug|x64.Build.0 = Debug|x64
{D3FD3860-9F56-4C47-ADF6-B48D9C8BC47A}.Test_Release|Any CPU.ActiveCfg = Debug|Win32
{D3FD3860-9F56-4C47-ADF6-B48D9C8BC47A}.Test_Release|Any CPU.Build.0 = Debug|Win32
{D3FD3860-9F56-4C47-ADF6-B48D9C8BC47A}.Test_Release|Win32.ActiveCfg = Release|Win32
{D3FD3860-9F56-4C47-ADF6-B48D9C8BC47A}.Test_Release|Win32.Build.0 = Release|Win32
{D3FD3860-9F56-4C47-ADF6-B48D9C8BC47A}.Test_Release|x64.ActiveCfg = Release|x64
{D3FD3860-9F56-4C47-ADF6-B48D9C8BC47A}.Test_Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand All @@ -327,6 +361,7 @@ Global
{7C58891C-47A9-4269-97BE-4F3945B8F595} = {DFBBE7C7-A0DF-4483-8B6B-2EDCDC67F4EA}
{2D9B2EB8-CA93-410C-9359-CD44B5F9DD18} = {DFBBE7C7-A0DF-4483-8B6B-2EDCDC67F4EA}
{1BA5A886-6EC9-434A-8B66-AF29211B4499} = {03E0162F-A04E-40F0-94A8-6E897A00EFB7}
{D3FD3860-9F56-4C47-ADF6-B48D9C8BC47A} = {DFBBE7C7-A0DF-4483-8B6B-2EDCDC67F4EA}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {0D846CBC-2353-409E-B512-D9DF7822A67A}
Expand Down
28 changes: 0 additions & 28 deletions libcpputils/libcpputils.pro

This file was deleted.

2 changes: 1 addition & 1 deletion libgixpp/libgixpp.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#pragma once

#define LIBGIXPP_VER "1.0.16dev1"
#define LIBGIXPP_VER "1.0.16dev2"
56 changes: 0 additions & 56 deletions libgixpp/libgixpp.pro

This file was deleted.

Loading

0 comments on commit 6b8ca51

Please sign in to comment.