-
Notifications
You must be signed in to change notification settings - Fork 19
/
configure.ac
157 lines (125 loc) · 4.53 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
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
AC_PREREQ(2.63.0)
m4_define([aravis_version_major], [0])
m4_define([aravis_version_minor], [3])
m4_define([aravis_version_micro], [1])
m4_define([aravis_version], [aravis_version_major.aravis_version_minor.aravis_version_micro])
AC_INIT([aravis],[aravis_version],[http://bugzilla.gnome.org/enter_bug.cgi?product=aravis],[aravis])
AM_INIT_AUTOMAKE([-Wno-portability dist-bzip2])
AM_MAINTAINER_MODE
AC_CONFIG_HEADERS([src/arvconfig.h])
AC_CONFIG_MACRO_DIR([m4])
m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
AC_SUBST([ARAVIS_API_VERSION], [0.4])
AC_SUBST([ARAVIS_API_VERSION_U],[AS_TR_SH([$ARAVIS_API_VERSION])])
AC_SEARCH_LIBS([strerror],[cposix])
AC_PROG_CC
AC_PROG_CXX
AC_HEADER_STDC
AC_SUBST(GETTEXT_PACKAGE, aravis-${ARAVIS_API_VERSION})
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [GETTEXT package name])
AM_GLIB_GNU_GETTEXT
IT_PROG_INTLTOOL([0.31.2])
LT_INIT()
AC_ARG_ENABLE(gst_plugin,
[ --enable-gst-plugin build gstreamer plugin],
[enable_gst_plugin=$enableval],
[enable_gst_plugin=no])
AC_ARG_ENABLE(viewer,
[ --enable-viewer build viewer],
[enable_viewer=$enableval],
[enable_viewer=no])
AC_ARG_ENABLE(gtk3,
[ --enable-gtk3 build viewer with gtk+-3.0],
[enable_gtk3=$enableval],
[enable_gtk3=no])
AC_ARG_ENABLE(notify,
[ --enable-notify build viewer with libnotify],
[enable_notify=$enableval],
[enable_notify=no])
AC_ARG_ENABLE(cpp_test,
[ --enable-cpp-test build c++ test],
[enable_cpp_test=$enableval],
[enable_cpp_test=no])
PKG_PROG_PKG_CONFIG([0.14])
ARAVIS_REQUIREMENTS="glib-2.0 >= 2.26 gobject-2.0 gio-2.0 libxml-2.0 gthread-2.0"
ARAVIS_GSTREAMER_REQUIREMENTS="gstreamer-base-0.10 >= 0.10.31 gstreamer-app-0.10 gstreamer-interfaces-0.10"
PKG_CHECK_MODULES(ARAVIS, [$ARAVIS_REQUIREMENTS])
# Standard math library doesn't come with a pkgconfig file.
ARAVIS_LIBS="-lm ${ARAVIS_LIBS}"
AC_SUBST(ARAVIS_CFLAGS)
AC_SUBST(ARAVIS_LIBS)
AC_SUBST(aravis_datadir, '$(datadir)/aravis-$(ARAVIS_API_VERSION)')
ARAVIS_VIEWER_REQUIREMENTS=$ARAVIS_GSTREAMER_REQUIREMENTS
if test "x$enable_gtk3" = "xyes"; then
ARAVIS_VIEWER_REQUIREMENTS+=" gtk+-3.0"
else
ARAVIS_VIEWER_REQUIREMENTS+=" gtk+-2.0 >= 2.14"
fi
AM_CONDITIONAL(ARAVIS_WITH_GTK3, test "x$enable_gtk3" = "xyes")
if test "x$enable_notify" = "xyes"; then
PKG_CHECK_MODULES(Notify, "libnotify")
ARAVIS_VIEWER_REQUIREMENTS+=" libnotify"
AC_DEFINE([ARAVIS_WITH_NOTIFY], 1, [Use libnotify])
fi
AM_CONDITIONAL(ARAVIS_WITH_NOTIFY, test "x$enable_notify" = "xyes")
build_viewer=no
if test "x$enable_viewer" = "xyes"; then
PKG_CHECK_MODULES([ARAVIS_VIEWER], [$ARAVIS_VIEWER_REQUIREMENTS],
[AC_DEFINE([ARAVIS_BUILD_VIEWER], [1], [Build viewer])
build_viewer=yes],
[echo -n])
fi
AM_CONDITIONAL(ARAVIS_BUILD_VIEWER, test "x$build_viewer" = "xyes")
# Standard math library doesn't come with a pkgconfig file.
ARAVIS_VIEWER_LIBS="-lm ${ARAVIS_VIEWER_LIBS}"
AC_SUBST(ARAVIS_VIEWER_CFLAGS)
AC_SUBST(ARAVIS_VIEWER_LIBS)
build_gst_plugin=no
if test "x$enable_gst_plugin" = "xyes"; then
PKG_CHECK_MODULES([ARAVIS_GST_PLUGIN], [$ARAVIS_GSTREAMER_REQUIREMENTS],
[AC_DEFINE([ARAVIS_BUILD_GST_PLUGIN], [1], [Build gstreamer plugin])
build_gst_plugin=yes],
[echo -n])
fi
AM_CONDITIONAL(ARAVIS_BUILD_GST_PLUGIN, test "x$build_gst_plugin" = "xyes")
AM_CONDITIONAL(ARAVIS_BUILD_CPP_TEST, test "x$enable_cpp_test" = "xyes")
# Standard math library doesn't come with a pkgconfig file.
ARAVIS_GST_PLUGIN_LIBS="-lm ${ARAVIS_GST_PLUGIN_LIBS}"
AC_SUBST(ARAVIS_GST_PLUGIN_CFLAGS)
AC_SUBST(ARAVIS_GST_PLUGIN_LIBS)
if test "x${prefix}" = "x$HOME"; then
gstplugindir="$HOME/.gstreamer-0.10/plugins"
else
gstplugindir="\$(libdir)/gstreamer-0.10"
fi
AC_SUBST(gstplugindir)
GST_PLUGIN_LDFLAGS='-module -avoid-version -export-symbols-regex [_]*\(gst_\|Gst\|GST_\).*'
AC_SUBST(GST_PLUGIN_LDFLAGS)
AC_PATH_PROG(GLIB_MKENUMS, glib-mkenums)
GOBJECT_INTROSPECTION_CHECK([0.10.0])
GTK_DOC_CHECK([1.14],[--flavour no-tmpl])
AM_CONDITIONAL([BUILD_GTK_DOC], [test "x$enable_gtk_doc" = "xyes" || test ! -f "autogen.sh"])
AC_CONFIG_FILES([
Makefile
src/Makefile
viewer/Makefile
viewer/data/arv-viewer.desktop.in
gst/Makefile
tests/Makefile
po/Makefile.in
docs/Makefile
docs/reference/Makefile
docs/reference/aravis/Makefile
aravis.pc
])
AC_OUTPUT
echo ""
echo "Configuration:"
echo ""
echo " Compiler: ${CC}"
echo " Compiler flags: ${ARAVIS_CFLAGS}"
echo " Linker flags: ${ARAVIS_LIBS}"
echo ""
echo " Build viewer: $build_viewer"
echo " Build gstreamer plugin: $build_gst_plugin"
echo ""