configure.ac 5.07 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.27.2, 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
12
13
14
15
16
17
18
AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)
AM_CONFIG_HEADER(config.h)
AM_MAINTAINER_MODE

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
Jonh Wendell S. Santana's avatar
Jonh Wendell S. Santana committed
19
AM_PROG_LIBTOOL
20
AM_PROG_CC_C_O
Jonh Wendell S. Santana's avatar
Jonh Wendell S. Santana committed
21

22
GNOME_COMPILE_WARNINGS(yes)
Jonh Wendell S. Santana's avatar
Jonh Wendell S. Santana committed
23

Jonh Wendell S. Santana's avatar
Jonh Wendell S. Santana committed
24
25
26
#*******************************************************************************
# Internationalization
#*******************************************************************************
Jonh Wendell S. Santana's avatar
Jonh Wendell S. Santana committed
27
28
29
30
31
32
33
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

34
GNOME_DOC_INIT
Jonh Wendell S. Santana's avatar
Jonh Wendell S. Santana committed
35

Jonh Wendell S. Santana's avatar
Jonh Wendell S. Santana committed
36
37
38
#*******************************************************************************
# Check required GNOME libraries
#*******************************************************************************
Jonh Wendell S. Santana's avatar
Jonh Wendell S. Santana committed
39

40
41
GLIB_REQUIRED=2.17.0
GTK_REQUIRED=2.13.1
Jonh Wendell S. Santana's avatar
Jonh Wendell S. Santana committed
42
43
LIBGLADE_REQUIRED=2.6.0
GCONF_REQUIRED=2.16.0
44
GTHREAD_REQUIRED=2.0.0
45
GTK_VNC_REQUIRED=0.3.8
46
AVAHI_REQUIRED=0.6.22
Jonh Wendell's avatar
Jonh Wendell committed
47
PANEL_REQUIRED_VERSION=2.0.0
48
TELEPATHY_GLIB_REQUIRED=0.7.31
Jonh Wendell S. Santana's avatar
Jonh Wendell S. Santana committed
49

50
51
52
# Check for avahi
AC_ARG_ENABLE(avahi,
              AC_HELP_STRING([--disable-avahi],
53
54
                             [Do not use avahi for auto-discover machines [default=no]]),
              enable_avahi=${enableval},
55
56
57
58
59
60
61
62
63
64
65
66
              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
67
68
PKG_CHECK_MODULES(VINAGRE, \ 
  glib-2.0 >= $GLIB_REQUIRED \
69
  gio-2.0 >= $GLIB_REQUIRED \
Jonh Wendell S. Santana's avatar
Jonh Wendell S. Santana committed
70
71
  gtk+-2.0 >= $GTK_REQUIRED \ 
  libglade-2.0 >= $LIBGLADE_REQUIRED \
Jonh Wendell S. Santana's avatar
Stuff    
Jonh Wendell S. Santana committed
72
  gconf-2.0 >= $GCONF_REQUIRED \
73
  gthread-2.0 >= $GTHREAD_REQUIRED \
74
  gnome-keyring-1 \
75
  gtk-vnc-1.0 >= $GTK_VNC_REQUIRED)
Jonh Wendell S. Santana's avatar
Jonh Wendell S. Santana committed
76
77
78
AC_SUBST(VINAGRE_CFLAGS)
AC_SUBST(VINAGRE_LIBS)

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
# 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")


Jonh Wendell's avatar
Jonh Wendell committed
106
107
108
109
110
PKG_CHECK_MODULES(APPLET, \ 
  libpanelapplet-2.0 >= $PANEL_REQUIRED_VERSION)
AC_SUBST(APPLET_CFLAGS)
AC_SUBST(APPLET_LIBS)

Jonh Wendell's avatar
Jonh Wendell committed
111
112
113
114
115
116
117
dnl ================================================================
dnl GConf related settings
dnl ================================================================

AC_PATH_PROG(GCONFTOOL, gconftool-2)
AM_GCONF_SOURCE_2

118
119
dnl Check for bind in libsocket (needed on Solaris)
AC_CHECK_LIB(socket, bind)
Jonh Wendell's avatar
Jonh Wendell committed
120

121
122
123
124
125
126
127
128
129
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
130
fi
131
AC_SUBST(REBUILD)
Jonh Wendell S. Santana's avatar
Jonh Wendell S. Santana committed
132

Jorge Pereira's avatar
Jorge Pereira committed
133
# Plugins
Jonh Wendell S. Santana's avatar
Jonh Wendell S. Santana committed
134
#*******************************************************************************
Jorge Pereira's avatar
Jorge Pereira committed
135
136
137
138
#
dnl active plugins for vinagre.schemas
ACTIVE_PLUGINS="dummy"
AC_SUBST(ACTIVE_PLUGINS)
Jonh Wendell S. Santana's avatar
Jonh Wendell S. Santana committed
139

140
VINAGRE_IMPLIB="-lvinagre-${VINAGRE_API_VERSION}"
Jorge Pereira's avatar
Jorge Pereira committed
141
142
143
144
145
146
147
148
149
150
151
152
153
154
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)

VINAGRE_PLUGINS_DATA_DIR="$datadir/vinagre/plugins"
AC_SUBST(VINAGRE_PLUGINS_DATA_DIR)

VINAGRE_PLUGINS_LIBS_DIR="$libdir/vinagre/plugins"
AC_SUBST(VINAGRE_PLUGINS_LIBS_DIR)

#*******************************************************************************
Jonh Wendell S. Santana's avatar
Jonh Wendell S. Santana committed
155
156
157
158
AC_OUTPUT([
Makefile
data/Makefile
data/vinagre.desktop.in
Jonh Wendell S. Santana's avatar
Jonh Wendell S. Santana committed
159
data/vinagre-file.desktop.in
160
data/vinagre.pc
161
data/icons/Makefile
Jorge Pereira's avatar
Jorge Pereira committed
162
data/pixmaps/Makefile
163
help/Makefile
Jonh Wendell S. Santana's avatar
Jonh Wendell S. Santana committed
164
po/Makefile.in
Jorge Pereira's avatar
Jorge Pereira committed
165
166
167
168
169
170
plugin-loaders/Makefile
plugin-loaders/c/Makefile
plugins/Makefile
plugins/dummy/Makefile
vinagre/Makefile
vinagre/view/Makefile
Jonh Wendell S. Santana's avatar
Jonh Wendell S. Santana committed
171
])
Jonh Wendell S. Santana's avatar
Jonh Wendell S. Santana committed
172
173
174
175

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

echo "
176
177
178

This is vinagre version AC_PACKAGE_VERSION

Jonh Wendell S. Santana's avatar
Jonh Wendell S. Santana committed
179
180
181
182
Configure summary:

	Compiler ...................:  ${CC} 
	Compiler Flags .............:  ${CFLAGS}
183
184

	Avahi enabled ..............:  ${enable_avahi}
185
	Telepathy support ..........:  ${have_telepathy}
Jonh Wendell S. Santana's avatar
Jonh Wendell S. Santana committed
186
"