-
Notifications
You must be signed in to change notification settings - Fork 17
/
configure.ac
134 lines (110 loc) · 3.27 KB
/
configure.ac
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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
AC_INIT([libdmtx], [0.7.3], [mike@dragonflylogic.com])
AM_INIT_AUTOMAKE([-Wall -Werror gnu])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_FILES([
Makefile
])
AC_PROG_CC
AC_PROG_LIBTOOL
AM_PROG_CC_C_O
AC_SEARCH_LIBS([atan2], [m] ,[], AC_MSG_ERROR([libdmtx requires libm]))
AC_ARG_ENABLE(
[cocoa],
AS_HELP_STRING([--enable-cocoa], [enable Cocoa bindings]),
[enable_cocoa="$enableval"],
[enable_cocoa="no"]
)
AM_CONDITIONAL(ENABLE_COCOA, [test x$enable_cocoa = xyes])
if test x$enable_cocoa = xyes; then
AC_MSG_WARN([Building the Cocoa wrapper though the libdmtx build system is not yet supported])
fi
AC_ARG_ENABLE(
[java],
AS_HELP_STRING([--enable-java], [enable Java bindings]),
[enable_java="$enableval"],
[enable_java="no"]
)
AM_CONDITIONAL(ENABLE_JAVA, [test x$enable_java = xyes])
if test x$enable_java = xyes; then
AC_MSG_WARN([Building the Java wrapper though the libdmtx build system is not yet supported])
fi
AC_ARG_ENABLE(
[net],
AS_HELP_STRING([--enable-net], [enable .NET bindings]),
[enable_net="$enableval"],
[enable_net="no"]
)
AM_CONDITIONAL(ENABLE_NET, [test x$enable_net = xyes])
if test x$enable_net = xyes; then
AC_MSG_WARN([Building the .NET wrapper though the libdmtx build system is not yet supported])
fi
AC_ARG_ENABLE(
[php],
AS_HELP_STRING([--enable-php], [enable PHP bindings]),
[enable_php="$enableval"],
[enable_php="no"]
)
AM_CONDITIONAL([ENABLE_PHP], [test x$enable_php = xyes])
if test x$enable_php = xyes; then
AC_PATH_PROG([PHPIZE], [phpize])
if test ! -e "$PHPIZE"; then
AC_ERROR([phpize is required to generate the PHP bindings.])
fi
AC_MSG_WARN([Building the PHP wrapper will break make uninstall])
dmtx_dir=`pwd`
cd php && \
$PHPIZE && \
./configure --prefix=${prefix} && \
cd $dmtx_dir
fi
AC_ARG_ENABLE(
[python],
AS_HELP_STRING([--enable-python], [enable Python bindings]),
[enable_python="$enableval"],
[enable_python="no"]
)
AM_CONDITIONAL(ENABLE_PYTHON, [test x$enable_python = xyes])
if test x$enable_python = xyes; then
AM_PATH_PYTHON
AC_MSG_WARN([Building the Python wrapper will break make uninstall])
fi
AC_ARG_ENABLE(
[ruby],
AS_HELP_STRING([--enable-ruby], [enable Ruby bindings]),
[enable_ruby="$enableval"],
[enable_ruby="no"]
)
AM_CONDITIONAL(ENABLE_RUBY, [test x$enable_ruby = xyes])
if test x$enable_ruby = xyes; then
AC_PATH_PROG([RUBY], [ruby])
if test ! -e "$RUBY"; then
AC_ERROR([ruby is required to generate the Ruby bindings.])
fi
AC_MSG_WARN([Building the Ruby wrapper will break make uninstall])
dmtx_dir=`pwd`
cd ruby && \
$RUBY extconf.rb --with-dmtx-dir=${prefix}
cd $dmtx_dir
fi
AC_ARG_ENABLE(
[vala],
AS_HELP_STRING([--enable-vala], [enable Vala bindings]),
[enable_vala="$enableval"],
[enable_vala="no"]
)
AM_CONDITIONAL(ENABLE_VALA, [test x$enable_vala = xyes])
if test x$enable_vala = xyes; then
PKG_PROG_PKG_CONFIG
PKG_CHECK_EXISTS(
[vala-1.0],
[VALA_VAPIDIR=`$PKG_CONFIG --variable=vapidir vala-1.0`],
[
#AC_MSG_WARN([Can't find vala development files, guessing where to install vala bindings...])
VALA_VAPIDIR='${prefix}/share/vala/vapi'
]
)
AC_SUBST(VALA_VAPIDIR)
AC_CONFIG_FILES([vala/Makefile])
fi
AC_OUTPUT