Add defines for all 3 db backends.

This commit is contained in:
Relintai 2020-11-28 14:51:42 +01:00
parent 4a81108677
commit 07b262c841
3 changed files with 7 additions and 0 deletions

View File

@ -58,11 +58,14 @@ def configure(env):
if not mariadb_error: if not mariadb_error:
env.ParseConfig("pkg-config mariadb --cflags --libs") env.ParseConfig("pkg-config mariadb --cflags --libs")
env.Append(CPPDEFINES=["MYSQL_PRESENT"])
return return
if not mysql_error: if not mysql_error:
env.ParseConfig("pkg-config mysql --cflags --libs") env.ParseConfig("pkg-config mysql --cflags --libs")
env.Append(CPPDEFINES=["MYSQL_PRESENT"])
# Link those statically for portability # Link those statically for portability
#if env["use_static_cpp"]: #if env["use_static_cpp"]:
#env.Append(LINKFLAGS=["-static-libgcc", "-static-libstdc++"]) #env.Append(LINKFLAGS=["-static-libgcc", "-static-libstdc++"])

View File

@ -48,6 +48,8 @@ def get_flags():
def configure(env): def configure(env):
env.ParseConfig("pkg-config libpq --cflags --libs") env.ParseConfig("pkg-config libpq --cflags --libs")
env.Append(CPPDEFINES=["PGSQL_PRESENT"])
# Link those statically for portability # Link those statically for portability
#if env["use_static_cpp"]: #if env["use_static_cpp"]:
#env.Append(LINKFLAGS=["-static-libgcc", "-static-libstdc++"]) #env.Append(LINKFLAGS=["-static-libgcc", "-static-libstdc++"])

View File

@ -48,6 +48,8 @@ def get_flags():
def configure(env): def configure(env):
env.ParseConfig("pkg-config sqlite3 --cflags --libs") env.ParseConfig("pkg-config sqlite3 --cflags --libs")
env.Append(CPPDEFINES=["SQLITE_PRESENT"])
# Link those statically for portability # Link those statically for portability
#if env["use_static_cpp"]: #if env["use_static_cpp"]:
#env.Append(LINKFLAGS=["-static-libgcc", "-static-libstdc++"]) #env.Append(LINKFLAGS=["-static-libgcc", "-static-libstdc++"])