aboutsummaryrefslogtreecommitdiff
path: root/m4/odb.m4
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2010-09-06 14:26:25 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2010-09-06 14:26:25 +0200
commit921c4c14c2999a03b9e649b5c9adec73b5cae0de (patch)
treec3a0015286ded8b59f2f44fd7b22be2748e16098 /m4/odb.m4
parent0f9123ae095d3da7f2fb55d95af49ec3aa0a9c17 (diff)
Add automake build support
Diffstat (limited to 'm4/odb.m4')
-rw-r--r--m4/odb.m445
1 files changed, 45 insertions, 0 deletions
diff --git a/m4/odb.m4 b/m4/odb.m4
new file mode 100644
index 0000000..b632f8c
--- /dev/null
+++ b/m4/odb.m4
@@ -0,0 +1,45 @@
+dnl file : m4/odb.m4
+dnl author : Boris Kolpackov <boris@codesynthesis.com>
+dnl copyright : Copyright (c) 2009-2010 Code Synthesis Tools CC
+dnl license : GNU GPL v2; see accompanying LICENSE file
+dnl
+dnl ODB_COMPILER([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
+dnl
+AC_DEFUN([ODB_COMPILER], [
+odb_found=no
+
+AC_ARG_VAR([ODB],[ODB compiler command])
+AC_ARG_VAR([ODBFLAGS],[ODB compiler flags])
+AC_ARG_VAR([ODBCPPFLAGS],[ODB-specific C++ preprocessor flags])
+
+AC_ARG_WITH(
+ [odb],
+ [AC_HELP_STRING([--with-odb=DIR],[location of odb build directory])],
+ [odb_dir=${withval}],
+ [odb_dir=])
+
+AC_MSG_CHECKING([for odb])
+
+save_ODB="$ODB"
+
+if test x"$ODB" = x; then
+ if test x"$odb_dir" != x; then
+ AS_SET_CATFILE([abs_odb_dir], [$ac_pwd], [$odb_dir])
+ ODB="$abs_odb_dir/odb/odb"
+ else
+ ODB=odb
+ fi
+fi
+
+$ODB --version 2>/dev/null 1>&2
+
+if test x"$?" = x0; then
+ AC_MSG_RESULT([$ODB])
+ $1
+else
+ AC_MSG_RESULT([no])
+ ODB="$save_ODB"
+ $2
+fi
+
+])dnl