Welcome to mirror list, hosted at ThFree Co, Russian Federation.

configure.ac « remmina-plugins - gitlab.com/Remmina/Remmina.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: fb332a7474cc01b785824e7e16bb05334783829c (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
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
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
#                                               -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.

AC_PREREQ(2.60)
AC_INIT(remmina-plugins, 0.9.99.1)
AM_INIT_AUTOMAKE
AC_CONFIG_SRCDIR([common/remminaplugincommon.h])
AC_CONFIG_HEADER([config.h])

# Checks for programs.
AC_ISC_POSIX
AC_PROG_CC
AC_PROG_LIBTOOL
AC_PROG_INSTALL
AC_PROG_MAKE_SET

# Disable optimization if we enable debug
AC_ARG_ENABLE(debug,
    [AS_HELP_STRING([--enable-debug], [Enable compiling in debug mode])], [
    if test "x$enableval" = "xyes"; then
        CFLAGS="-g -O0"
    fi]
)

# Only use -Wall if we have gcc
if test "x$GCC" = "xyes"; then
    if test -z "`echo "$CFLAGS" | grep "\-Wall" 2> /dev/null`" ; then
        CFLAGS="$CFLAGS -Wall"
    fi
fi

IT_PROG_INTLTOOL([0.35.0])

GETTEXT_PACKAGE=remmina-plugins
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [The gettext package])

if test "x$USE_NLS" != "xno"; then
    ALL_LINGUAS="bg cs da de el es eu fr hu id it kk lt nl pl pt_BR pt_PT ru sk sv th tr uk zh_CN"
    nls_support="yes"
else
    ALL_LINGUAS=""
    nls_support="disabled."
fi

AM_GLIB_GNU_GETTEXT

remmina_localedir='${datadir}/locale'
AC_SUBST(remmina_localedir)

remmina_plugindir='${libdir}/remmina/plugins'
AC_SUBST(remmina_plugindir)

remmina_datadir='${datadir}/remmina'
AC_SUBST(remmina_datadir)

# Checks for libraries.
PKG_CHECK_MODULES(REMMINA_PLUGINS, [
    gtk+-3.0
    remmina >= 0.9.99
])
AC_SUBST(REMMINA_PLUGINS_CFLAGS)
AC_SUBST(REMMINA_PLUGINS_LIBS)

# Check libpthread
AC_CHECK_LIB(pthread, pthread_create, [
    AC_CHECK_HEADER(pthread.h, [
        pthread_support="yes"
        AC_DEFINE([HAVE_PTHREAD], [1], [Define to 1 if you have the `pthread' library (-lpthread).])
    ], pthread_support="no. libpthread-dev required.")
],[
    pthread_support="no. libpthread required."
])

# Check libssh
AC_ARG_ENABLE(ssh,
    [AS_HELP_STRING([--disable-ssh], [Disable SSH])],
    [ssh_support=$enableval],
    [ssh_support="yes"]
)
if test "x$ssh_support" != "xno"; then
    if test "$pthread_support" = "yes"; then
        AC_CHECK_LIB(ssh, ssh_options_set, [
            AC_CHECK_HEADER(libssh/libssh.h, [
                ssh_support="yes"
                AC_DEFINE([HAVE_LIBSSH], [1], [Define to 1 if you have the `ssh' library (-lssh).])
                SSH_LIBS="-lssh"
                AC_SUBST(SSH_LIBS)
            ], ssh_support="no. libssh-dev required.")
        ], ssh_support="no. libssh >= 0.4 required.")
    else
        ssh_support="no. Multi-threaded support required."
    fi
else
    ssh_support="disabled."
fi

# Check libxkbfile
PKG_CHECK_MODULES(XKBFILE, [xkbfile], [xkbfile_support="yes"], [xkbfile_support="no. libxkbfile-dev required."])

# Check remmina executable
if test "x$prefix" = "xNONE"; then
    remminabin=$ac_default_prefix/bin/remmina
else
    remminabin=$prefix/bin/remmina
fi
AC_CHECK_FILE($remminabin,
    [remminabin_found="yes"],
    [remminabin_found="no. (If you are packaging the plugins, please make sure it uses the same prefix as remmina and ignore this)"])

REMMINA_PLUGINS_SUBDIRS="common po"

# Check RDP dependencies
AC_ARG_ENABLE(rdp,
    [AS_HELP_STRING([--disable-rdp], [Disable RDP])],
    [rdp_plugin=$enableval],
    [rdp_plugin="yes"]
)
if test "x$rdp_plugin" != "xno"; then
    PKG_CHECK_MODULES(RDP, [freerdp], [
        REMMINA_PLUGINS_SUBDIRS="$REMMINA_PLUGINS_SUBDIRS rdp"
    ], [
        rdp_plugin="no. freerdp-dev rquired."
    ])
else
    rdp_plugin="disabled."
fi

# Check VNC dependencies
AC_ARG_ENABLE(vnc,
    [AS_HELP_STRING([--disable-vnc], [Disable VNC])],
    [vnc_plugin=$enableval],
    [vnc_plugin="yes"]
)
if test "x$vnc_plugin" != "xno"; then
    if test "x$vnc_plugin" = "xdl"; then
        AC_CHECK_LIB(vncclient, rfbGetClient, [
            AC_CHECK_HEADER(rfb/rfbclient.h, [
                vnc_plugin="link to libvncclient externally"
                VNC_CFLAGS=""
                VNC_LIBS="-lvncclient"
                AC_SUBST(VNC_CFLAGS)
                AC_SUBST(VNC_LIBS)
                AC_DEFINE([HAVE_LIBVNCCLIENT], [1], [Define to 1 if you have libvncclient.])
                REMMINA_PLUGINS_SUBDIRS="$REMMINA_PLUGINS_SUBDIRS vnc"
            ], vnc_plugin="no. libvncclient(libvncserver)-dev required.")
        ],[
            vnc_plugin="no. libvncclient(libvncserver) required."
        ])
    else
        vnc_plugin=""
    fi
else
    vnc_plugin="disabled."
fi
if test "x$vnc_plugin" = "x"; then
    AC_CHECK_LIB(z, deflate, , vnc_plugin="no. zlib required.")
fi
if test "x$vnc_plugin" = "x"; then
    AC_CHECK_HEADER(zlib.h, , vnc_plugin="no. zlib-dev required.")
fi
if test "x$vnc_plugin" = "x"; then
    AC_CHECK_LIB(jpeg, jpeg_CreateCompress, , vnc_plugin="no. libjpeg required.")
fi
if test "x$vnc_plugin" = "x"; then
    AC_CHECK_HEADER(jpeglib.h, , vnc_plugin="no. libjpeg-dev required.")
fi
if test "x$vnc_plugin" = "x"; then
    AM_PATH_LIBGCRYPT(1.4.0, , vnc_support="no. libgcrypt-dev required.")
fi
if test "x$vnc_plugin" = "x"; then
    PKG_CHECK_MODULES(GNUTLS, gnutls >= 2.4.0, , vnc_plugin="no. libgnutls-dev required.")
fi
if test "x$vnc_plugin" = "x"; then
    AX_PREFIX_CONFIG_H([libvncserver/rfb/rfbconfig.h], [LIBVNCSERVER])
    REMMINA_PLUGINS_SUBDIRS="$REMMINA_PLUGINS_SUBDIRS libvncserver vnc"
    VNC_CFLAGS="-I../libvncserver $LIBGCRYPT_CFLAGS $GNUTLS_CFLAGS"
    VNC_LIBS="../libvncserver/libvncclient.la -ljpeg -lz $LIBGCRYPT_LIBS $GNUTLS_LIBS"
    AC_SUBST(VNC_CFLAGS)
    AC_SUBST(VNC_LIBS)
    AC_DEFINE([WITH_CLIENT_GCRYPT], [1], [Enable support for gcrypt in libvncclient])
    AC_DEFINE([WITH_CLIENT_TLS], [1], [Enable support for gnutls in libvncclient])
    AC_DEFINE([HAVE_LIBVNCCLIENT], [1], [Define to 1 if you have libvncclient.])
    AC_DEFINE([IPv6], [1], [Enable support for IPv6 in libvncclient])
    vnc_plugin="yes"
fi

# Check XDMCP dependencies
AC_ARG_ENABLE(xdmcp,
    [AS_HELP_STRING([--disable-xdmcp], [Disable XDMCP])],
    [xdmcp_plugin=$enableval],
    [xdmcp_plugin="yes"]
)
if test "x$xdmcp_plugin" != "xno"; then
    REMMINA_PLUGINS_SUBDIRS="$REMMINA_PLUGINS_SUBDIRS xdmcp"
else
    xdmcp_plugin="disabled."
fi

# Check NX dependencies
if test "x$ssh_support" = "xyes"; then
    if test "x$xkbfile_support" = "xyes"; then
        AC_ARG_ENABLE(nx,
            [AS_HELP_STRING([--disable-nx], [Disable NX])],
            [nx_plugin=$enableval],
            [nx_plugin="yes"]
        )
        if test "x$nx_plugin" != "xno"; then
            REMMINA_PLUGINS_SUBDIRS="$REMMINA_PLUGINS_SUBDIRS nx"
        else
            nx_plugin="disabled."
        fi
    else
        nx_plugin="no. libxkbfile required."
    fi
else
    nx_plugin="no. libssh required."
fi

# Check Telepathy dependencies
AC_ARG_ENABLE(telepathy,
    [AS_HELP_STRING([--disable-telepathy], [Disable Telepathy])],
    [telepathy_plugin=$enableval],
    [telepathy_plugin="yes"]
)
if test "x$telepathy_plugin" != "xno"; then
    PKG_CHECK_MODULES(TELEPATHY, [telepathy-glib >= 0.9.0], [
        REMMINA_PLUGINS_SUBDIRS="$REMMINA_PLUGINS_SUBDIRS telepathy"
    ], [
        telepathy_plugin="no. telepathy-glib-dev rquired."
    ])
else
    telepathy_plugin="disabled."
fi

# Checks for header files.
AC_CHECK_HEADERS_ONCE(
    netdb.h
    arpa/inet.h
    netinet/in.h
    sys/socket.h
    sys/un.h
    fcntl.h
    errno.h
)

AC_SUBST(REMMINA_PLUGINS_SUBDIRS)

AC_CONFIG_FILES([
Makefile
common/Makefile
po/Makefile.in
rdp/Makefile
libvncserver/Makefile
vnc/Makefile
xdmcp/Makefile
nx/Makefile
telepathy/Makefile
])

AC_OUTPUT

echo
echo "Remmina-Plugins configure result:"
echo
echo "* Remmina main program: $remminabin_found"
echo "* NLS support: $nls_support"
echo "* Multi-threaded support: $pthread_support"
echo "* SSH support: $ssh_support"
echo "* XKB support: $xkbfile_support"
echo
echo "* RDP plugin: $rdp_plugin"
echo "* VNC plugin: $vnc_plugin"
echo "* XDMCP plugin: $xdmcp_plugin"
echo "* NX plugin: $nx_plugin"
echo "* Telepathy plugin: $telepathy_plugin"
echo
echo "Type \"make\" to compile remmina-plugins."
echo