aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
blob: 7dc7e0baa6e4a0d23bbb9e3884c6fbe490bf6c0e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
# file      : configure.ac
# author    : Boris Kolpackov <boris@codesynthesis.com>
# copyright : Copyright (c) 2009-2011 Code Synthesis Tools CC
# license   : GNU GPL v3; see accompanying LICENSE file

AC_PREREQ(2.60)
AC_INIT([odb], [__value__(version)], [odb-users@codesynthesis.com])
AC_CONFIG_AUX_DIR([config])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_SRCDIR([odb/version.hxx])

AM_INIT_AUTOMAKE([-Wall -Werror foreign nostdinc subdir-objects dist-bzip2 dist-zip tar-ustar])

LT_INIT([disable-static])

AC_CANONICAL_HOST

# Check for C++ compiler and use it to compile the tests.
#
AC_PROG_CXX
AC_LANG(C++)

# See if we are building static plugin.
#
static_plugin="$enable_static"

AS_IF([test x$static_plugin = xyes],
  AC_DEFINE([STATIC_PLUGIN], [1], [Building static plugin.]))

# Check for plugin support in GCC unless we are building a static plugin.
#
AS_IF([test x$static_plugin = xno], GCC_PLUGIN)

# G++ name.
#
AC_ARG_WITH(
  [gxx-name],
  [AC_HELP_STRING([--with-gxx-name=NAME], [g++ binary to embed in the driver])],
  [case $withval in
     no)
       gxx_name=
       ;;
     yes)
       gxx_name=$CXX
       ;;
     *)
       gxx_name="$withval"
       ;;
   esac],
  [gxx_name=$CXX])

AS_IF(
  [test "x$gxx_name" != x],
  [AC_DEFINE_UNQUOTED([GXX_NAME], ["$gxx_name"], [g++ binary.])])

# Default options file.
#
AC_ARG_WITH(
  [options-file],
  [AC_HELP_STRING([--with-options-file=PATH], [default options file path to embed in the driver])],
  [case $withval in
     no)
       options_file=
       ;;
     yes)
       options_file=../etc/odb/default.options
       ;;
     *)
       options_file="$withval"
       ;;
   esac],
  [options_file=])

AS_IF(
  [test "x$options_file" != x],
  [AC_DEFINE_UNQUOTED([DEFAULT_OPTIONS_FILE], ["$options_file"], [default options file path.])])

# Create the libtool executable so that we can use it in further tests.
#
LT_OUTPUT


# Check for libcutl.
#
LIBCUTL([],[AC_MSG_ERROR([libcutl is not found; consider using --with-libcutl=DIR])])


# Check if we should disable rpath.
#
DISABLE_RPATH

# Output.
#
AC_CONFIG_HEADERS([odb/config.h])
AC_CONFIG_FILES([__path__(config_files)])
AC_OUTPUT