configure.ac 6.3 KB
Newer Older
Jonh Wendell S. Santana's avatar
Jonh Wendell S. Santana committed
1
# Process this file with autoconf to produce a configure script.
Jonh Wendell S. Santana's avatar
Jonh Wendell S. Santana committed
2

Jonh Wendell's avatar
Jonh Wendell committed
3
AC_INIT(vinagre, 2.29.1, http://projects.gnome.org/vinagre/)
Jonh Wendell S. Santana's avatar
Jonh Wendell S. Santana committed
4

5
6
7
VINAGRE_API_VERSION=1.0
AC_SUBST(VINAGRE_API_VERSION)

Jonh Wendell S. Santana's avatar
Jonh Wendell S. Santana committed
8
9
10
11
AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)
AM_CONFIG_HEADER(config.h)
AM_MAINTAINER_MODE

12
13
14
# Use the silent-rules feature when possible.
m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])

Jonh Wendell S. Santana's avatar
Jonh Wendell S. Santana committed
15
16
17
18
19
20
21
dnl make sure we keep ACLOCAL_FLAGS around for maintainer builds to work
AC_SUBST(ACLOCAL_AMFLAGS, "\${ACLOCAL_FLAGS}")

AC_ISC_POSIX
AC_PROG_CC
AM_PROG_CC_STDC
AC_HEADER_STDC
22
AM_DISABLE_STATIC
Jonh Wendell S. Santana's avatar
Jonh Wendell S. Santana committed
23
AM_PROG_LIBTOOL
24
AM_PROG_CC_C_O
Jonh Wendell S. Santana's avatar
Jonh Wendell S. Santana committed
25

26
GNOME_COMPILE_WARNINGS(yes)
Jonh Wendell S. Santana's avatar
Jonh Wendell S. Santana committed
27

Jonh Wendell S. Santana's avatar
Jonh Wendell S. Santana committed
28
29
30
#*******************************************************************************
# Internationalization
#*******************************************************************************
Jonh Wendell S. Santana's avatar
Jonh Wendell S. Santana committed
31
32
33
34
35
36
37
GETTEXT_PACKAGE=vinagre
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [GETTEXT package name])

IT_PROG_INTLTOOL([0.35.0])
AM_GLIB_GNU_GETTEXT

38
GNOME_DOC_INIT
Jonh Wendell S. Santana's avatar
Jonh Wendell S. Santana committed
39

Jonh Wendell S. Santana's avatar
Jonh Wendell S. Santana committed
40
41
42
#*******************************************************************************
# Check required GNOME libraries
#*******************************************************************************
Jonh Wendell S. Santana's avatar
Jonh Wendell S. Santana committed
43

44
45
GLIB_REQUIRED=2.17.0
GTK_REQUIRED=2.13.1
Jonh Wendell S. Santana's avatar
Jonh Wendell S. Santana committed
46
GCONF_REQUIRED=2.16.0
47
GTHREAD_REQUIRED=2.0.0
48
GTK_VNC_REQUIRED=0.3.10
49
AVAHI_REQUIRED=0.6.22
Jonh Wendell's avatar
Jonh Wendell committed
50
PANEL_REQUIRED_VERSION=2.0.0
51
TELEPATHY_GLIB_REQUIRED=0.7.31
52
XML_REQUIRED=2.6.31
53
VTE_REQUIRED=0.20
Jonh Wendell S. Santana's avatar
Jonh Wendell S. Santana committed
54

55
56
57
# Check for avahi
AC_ARG_ENABLE(avahi,
              AC_HELP_STRING([--disable-avahi],
58
59
                             [Do not use avahi for auto-discover machines [default=no]]),
              enable_avahi=${enableval},
60
61
62
63
64
65
66
67
68
69
70
71
              enable_avahi=yes)

if test "x$enable_avahi" = "xyes" ; then
  PKG_CHECK_MODULES(AVAHI,\
  avahi-ui >= $AVAHI_REQUIRED\
  avahi-gobject >= $AVAHI_REQUIRED)
  AC_SUBST(AVAHI_CFLAGS)
  AC_SUBST(AVAHI_LIBS)
  AC_DEFINE([VINAGRE_ENABLE_AVAHI],[1],[We want avahi support])
fi
AM_CONDITIONAL(AVAHI, test "x$enable_avahi" = "xyes")

Jonh Wendell S. Santana's avatar
Jonh Wendell S. Santana committed
72
73
PKG_CHECK_MODULES(VINAGRE, \ 
  glib-2.0 >= $GLIB_REQUIRED \
74
  gio-2.0 >= $GLIB_REQUIRED \
Jonh Wendell S. Santana's avatar
Jonh Wendell S. Santana committed
75
  gtk+-2.0 >= $GTK_REQUIRED \ 
Jonh Wendell S. Santana's avatar
Stuff    
Jonh Wendell S. Santana committed
76
  gconf-2.0 >= $GCONF_REQUIRED \
77
  gthread-2.0 >= $GTHREAD_REQUIRED \
78
  gnome-keyring-1 \
79
  libxml-2.0 >= $XML_REQUIRED
80
)
Jonh Wendell S. Santana's avatar
Jonh Wendell S. Santana committed
81
82
83
AC_SUBST(VINAGRE_CFLAGS)
AC_SUBST(VINAGRE_LIBS)

84
85
PKG_CHECK_MODULES(VNC, \
  gtk-vnc-1.0 >= $GTK_VNC_REQUIRED \
86
  libxml-2.0 >= $XML_REQUIRED
87
88
89
90
)
AC_SUBST(VNC_CFLAGS)
AC_SUBST(VNC_LIBS)

91
92
93
94
95
96
97
98
99
# Check for SSH
AC_ARG_ENABLE(ssh,
              AS_HELP_STRING([--enable-ssh],
                             [Enable SSH plugin (default=no)]),
              enable_ssh=${enableval},
              enable_ssh=no)

if test "x$enable_ssh" = "xyes" ; then
  PKG_CHECK_MODULES(SSH,\
100
101
  vte >= $VTE_REQUIRED \
  libxml-2.0 >= $XML_REQUIRED)
102
103
104
105
106
107
  AC_SUBST(VTE_CFLAGS)
  AC_SUBST(VTE_LIBS)
  AC_DEFINE([VINAGRE_ENABLE_SSH],[1],[We want ssh support])
fi
AM_CONDITIONAL(SSH, test "x$enable_ssh" = "xyes")

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
# Check for telepathy
AC_ARG_ENABLE(telepathy,
              AS_HELP_STRING([--enable-telepathy=@<:@no/yes/auto@:>@],
                             [Enable telepathy checking]), ,
                             enable_telepathy=auto)

if test "x$enable_telepathy" != "xno"; then
   PKG_CHECK_MODULES(TELEPATHY,
   [
      telepathy-glib >= $TELEPATHY_GLIB_REQUIRED
   ], have_telepathy="yes", have_telepathy="no")
   if test "x$have_telepathy" = "xyes"; then
      AC_SUBST(TELEPATHY_CFLAGS)
      AC_SUBST(TELEPATHY_LIBS)
      AC_DEFINE(HAVE_TELEPATHY, [], [Define if you have telepathy])
   fi
else
   have_telepathy=no
fi

if test "x$enable_telepathy" = "xyes" -a "x$have_telepathy" != "xyes"; then
   AC_MSG_ERROR([Couldn't find telepathy dependencies.])
fi

AM_CONDITIONAL(TELEPATHY, test "x$have_telepathy" = "xyes")

134
135
136
137
138
139
140
141
142
143
144
145
# Enable/disable gnome-panel applet
AC_ARG_ENABLE(applet,
              AS_HELP_STRING([--disable-applet], [Do not build the panel applet @<:@default=enabled@:>@]),
              enable_applet=$enableval,
              enable_applet=yes)

if test "x$enable_applet" = "xyes";then
   PKG_CHECK_MODULES(APPLET, libpanelapplet-2.0 >= $PANEL_REQUIRED_VERSION)
   AC_SUBST(APPLET_CFLAGS)
   AC_SUBST(APPLET_LIBS)
fi
AM_CONDITIONAL(APPLET, test "x$enable_applet" = "xyes")
Jonh Wendell's avatar
Jonh Wendell committed
146

Jonh Wendell's avatar
Jonh Wendell committed
147
148
149
150
151
152
153
dnl ================================================================
dnl GConf related settings
dnl ================================================================

AC_PATH_PROG(GCONFTOOL, gconftool-2)
AM_GCONF_SOURCE_2

154
155
dnl Check for bind in libsocket (needed on Solaris)
AC_CHECK_LIB(socket, bind)
Jonh Wendell's avatar
Jonh Wendell committed
156

157
158
159
160
161
162
163
164
165
dnl define a MAINT-like variable REBUILD which is set
dnl if Perl, so autogenerated sources can be rebuilt
AC_PATH_PROGS(PERL, perl5 perl)
AC_ARG_ENABLE(rebuilds, [  --disable-rebuilds      disable all source autogeneration rules],,enable_rebuilds=yes)
REBUILD=\#
if test "x$enable_rebuilds" = "xyes" && \
     test -n "$PERL" && \
     $PERL -e 'exit !($] >= 5.002)' > /dev/null 2>&1 ; then
  REBUILD=
Jonh Wendell S. Santana's avatar
Jonh Wendell S. Santana committed
166
fi
167
AC_SUBST(REBUILD)
Jonh Wendell S. Santana's avatar
Jonh Wendell S. Santana committed
168

Jorge Pereira's avatar
Jorge Pereira committed
169
# Plugins
Jonh Wendell S. Santana's avatar
Jonh Wendell S. Santana committed
170
#*******************************************************************************
Jorge Pereira's avatar
Jorge Pereira committed
171
172
#
dnl active plugins for vinagre.schemas
Jonh Wendell's avatar
Jonh Wendell committed
173
ACTIVE_PLUGINS="vnc"
174
175
176
if test "x$enable_ssh" = "xyes" ; then
ACTIVE_PLUGINS="$ACTIVE_PLUGINS,ssh"
fi
Jorge Pereira's avatar
Jorge Pereira committed
177
AC_SUBST(ACTIVE_PLUGINS)
Jonh Wendell S. Santana's avatar
Jonh Wendell S. Santana committed
178

179
VINAGRE_IMPLIB="-lvinagre-${VINAGRE_API_VERSION}"
Jorge Pereira's avatar
Jorge Pereira committed
180
181
182
183
184
185
186
PLUGIN_LIBTOOL_FLAGS="-module -avoid-version"
LOADER_LIBTOOL_FLAGS="-module -avoid-version"

AC_SUBST(VINAGRE_IMPLIB)
AC_SUBST(PLUGIN_LIBTOOL_FLAGS)
AC_SUBST(LOADER_LIBTOOL_FLAGS)

187
VINAGRE_PLUGINS_DATA_DIR="$datadir/vinagre-1/plugins"
Jorge Pereira's avatar
Jorge Pereira committed
188
189
AC_SUBST(VINAGRE_PLUGINS_DATA_DIR)

190
VINAGRE_PLUGINS_LIBS_DIR="$libdir/vinagre-1/plugins"
Jorge Pereira's avatar
Jorge Pereira committed
191
192
193
AC_SUBST(VINAGRE_PLUGINS_LIBS_DIR)

#*******************************************************************************
Jonh Wendell S. Santana's avatar
Jonh Wendell S. Santana committed
194
195
196
197
AC_OUTPUT([
Makefile
data/Makefile
data/vinagre.desktop.in
Jonh Wendell S. Santana's avatar
Jonh Wendell S. Santana committed
198
data/vinagre-file.desktop.in
199
data/vinagre.pc
Jonh Wendell's avatar
Jonh Wendell committed
200
data/vinagre.schemas.in
201
data/icons/Makefile
202
help/Makefile
Jonh Wendell S. Santana's avatar
Jonh Wendell S. Santana committed
203
po/Makefile.in
Jorge Pereira's avatar
Jorge Pereira committed
204
205
206
plugin-loaders/Makefile
plugin-loaders/c/Makefile
plugins/Makefile
Jonh Wendell's avatar
Jonh Wendell committed
207
plugins/vnc/Makefile
208
plugins/ssh/Makefile
Jorge Pereira's avatar
Jorge Pereira committed
209
210
vinagre/Makefile
vinagre/view/Makefile
Jonh Wendell S. Santana's avatar
Jonh Wendell S. Santana committed
211
])
Jonh Wendell S. Santana's avatar
Jonh Wendell S. Santana committed
212
213
214
215

#*******************************************************************************

echo "
216
217
218

This is vinagre version AC_PACKAGE_VERSION

Jonh Wendell S. Santana's avatar
Jonh Wendell S. Santana committed
219
220
221
222
Configure summary:

	Compiler ...................:  ${CC} 
	Compiler Flags .............:  ${CFLAGS}
223
224

	Avahi enabled ..............:  ${enable_avahi}
225
	GNOME Panel applet..........:  ${enable_applet}
226
	Telepathy support ..........:  ${have_telepathy}
227
	SSH plugin .................:  ${enable_ssh}
Jonh Wendell S. Santana's avatar
Jonh Wendell S. Santana committed
228
"