summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adam@chlipala.net>2011-05-29 13:31:53 -0400
committerGravatar Adam Chlipala <adam@chlipala.net>2011-05-29 13:31:53 -0400
commitac03a2629057969e5aaf707c3af3123b74617af3 (patch)
tree76290b06cad4c9de9bc458c5ae7372f666d98226 /src
parentc6b4e9ff771cf8e697ea36dd31230c03cacf5442 (diff)
Configuration detects proper header files for database dev libraries
Diffstat (limited to 'src')
-rw-r--r--src/c/Makefile.in3
-rw-r--r--src/config.sig4
-rw-r--r--src/config.sml.in4
-rw-r--r--src/mysql.sml2
-rw-r--r--src/postgres.sml2
-rw-r--r--src/sqlite.sml2
6 files changed, 14 insertions, 3 deletions
diff --git a/src/c/Makefile.in b/src/c/Makefile.in
index 813b300c..b13b94f9 100644
--- a/src/c/Makefile.in
+++ b/src/c/Makefile.in
@@ -151,6 +151,7 @@ MKDIR_P = @MKDIR_P@
MLLEX = @MLLEX@
MLTON = @MLTON@
MLYACC = @MLYACC@
+MSHEADER = @MSHEADER@
NM = @NM@
NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
@@ -168,12 +169,14 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
+PGHEADER = @PGHEADER@
PKG_CONFIG = @PKG_CONFIG@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
SITELISP = @SITELISP@
+SQHEADER = @SQHEADER@
STRIP = @STRIP@
VERSION = @VERSION@
abs_builddir = @abs_builddir@
diff --git a/src/config.sig b/src/config.sig
index 6afd9910..28479ef0 100644
--- a/src/config.sig
+++ b/src/config.sig
@@ -10,4 +10,8 @@ signature CONFIG = sig
val gccArgs : string
val openssl : string
+
+ val pgheader : string
+ val msheader : string
+ val sqheader : string
end
diff --git a/src/config.sml.in b/src/config.sml.in
index bb76ea73..fa4bd5fa 100644
--- a/src/config.sml.in
+++ b/src/config.sml.in
@@ -15,4 +15,8 @@ val libJs = OS.Path.joinDirFile {dir = lib,
val gccArgs = "@GCCARGS@"
val openssl = "@OPENSSL_LDFLAGS@ @OPENSSL_LIBS@"
+val pgheader = "@PGHEADER@"
+val msheader = "@MSHEADER@"
+val sqheader = "@SQHEADER@"
+
end
diff --git a/src/mysql.sml b/src/mysql.sml
index 6077eb5c..a8a10da7 100644
--- a/src/mysql.sml
+++ b/src/mysql.sml
@@ -1526,7 +1526,7 @@ fun p_cast (s, _) = s
fun p_blank _ = "?"
val () = addDbms {name = "mysql",
- header = "mysql/mysql.h",
+ header = Config.msheader,
link = "-lmysqlclient",
init = init,
p_sql_type = p_sql_type,
diff --git a/src/postgres.sml b/src/postgres.sml
index f713c753..9b64935c 100644
--- a/src/postgres.sml
+++ b/src/postgres.sml
@@ -1026,7 +1026,7 @@ fun p_cast (s, t) = s ^ "::" ^ p_sql_type t
fun p_blank (n, t) = p_cast ("$" ^ Int.toString n, t)
val () = addDbms {name = "postgres",
- header = "postgresql/libpq-fe.h",
+ header = Config.pgheader,
link = "-lpq",
p_sql_type = p_sql_type,
init = init,
diff --git a/src/sqlite.sml b/src/sqlite.sml
index efa6eb12..d6f5ffec 100644
--- a/src/sqlite.sml
+++ b/src/sqlite.sml
@@ -820,7 +820,7 @@ fun p_cast (s, _) = s
fun p_blank _ = "?"
val () = addDbms {name = "sqlite",
- header = "sqlite3.h",
+ header = Config.sqheader,
link = "-lsqlite3",
init = init,
p_sql_type = p_sql_type,