Tag version 4.05
[platform/upstream/openconnect.git] / configure.ac
1 AC_INIT(openconnect, 4.05)
2 PKG_PROG_PKG_CONFIG
3 AC_LANG_C
4 AC_CANONICAL_HOST
5 AM_MAINTAINER_MODE([enable])
6 AM_INIT_AUTOMAKE([foreign])
7 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
8
9 # Define htmldir and localedir for users of ancient autoconf building from git
10 AC_PREREQ([2.59c], [], [AC_SUBST([htmldir], [m4_ifset([AC_PACKAGE_TARNAME],
11           ['${datadir}/doc/${PACKAGE_TARNAME}'],
12           ['${datadir}/doc/${PACKAGE}'])
13 ])])
14
15 AC_PREREQ([2.60], [], [AC_SUBST([localedir], ['$(datadir)/locale'])])
16
17 # Upstream's pkg.m4 (since 0.27) offers this now, but define our own
18 # compatible version in case the local version of pkgconfig isn't new enough.
19 # https://bugs.freedesktop.org/show_bug.cgi?id=48743
20 m4_ifdef([PKG_INSTALLDIR], [PKG_INSTALLDIR],
21           [AC_ARG_WITH([pkgconfigdir],
22                        [AS_HELP_STRING([--with-pkgconfigdir],
23                        [install directory for openconnect.pc pkg-config file])],
24                         [],[with_pkgconfigdir='$(libdir)/pkgconfig'])
25            AC_SUBST([pkgconfigdir], [${with_pkgconfigdir}])])
26
27 AC_ARG_WITH([vpnc-script],
28         [AS_HELP_STRING([--with-vpnc-script],
29           [default location of vpnc-script helper])])
30
31 if test "$with_vpnc_script" = "yes" || test "$with_vpnc_script" = ""; then
32    with_vpnc_script=/etc/vpnc/vpnc-script
33    if ! test -x "$with_vpnc_script"; then
34       AC_MSG_ERROR([${with_vpnc_script} does not seem to be executable.]
35     [OpenConnect will not function correctly without a vpnc-script.]
36     [See http://www.infradead.org/openconnect/vpnc-script.html for more details.]
37     []
38     [If you are building a distribution package, please ensure that your]
39     [packaging is correct, and that a vpnc-script will be installed when the]
40     [user installs your package. You should provide a --with-vpnc-script=]
41     [argument to this configure script, giving the full path where the script]
42     [will be installed.]
43     []
44     [The standard location is ${with_vpnc_script}. To bypass this error and]
45     [build OpenConnect to use the script from this location, even though it's]
46     [not present at the time you are building OpenConnect, pass the argument]
47     ["--with-vpnc-script=${with_vpnc_script}"])
48   fi
49 elif test "$with_vpnc_script" = "no"; then
50    AC_ERROR([You cannot disable vpnc-script.]
51    [OpenConnect will not function correctly without it.]
52    [See http://www.infradead.org/openconnect/vpnc-script.html])
53 fi
54
55 AC_DEFINE_UNQUOTED(DEFAULT_VPNCSCRIPT, "${with_vpnc_script}")
56 AC_SUBST(DEFAULT_VPNCSCRIPT, "${with_vpnc_script}")
57
58 case $host_os in
59  *linux* | *gnu*)
60     AC_MSG_NOTICE([Applying feature macros for GNU build])
61     AC_DEFINE(_POSIX_C_SOURCE, 200112L)
62     # For strcasecmp() 
63     AC_DEFINE(_BSD_SOURCE)
64     # For asprintf()
65     AC_DEFINE(_GNU_SOURCE)
66     ;;
67  *netbsd*)
68     AC_MSG_NOTICE([Applying feature macros for NetBSD build])
69     AC_DEFINE(_POSIX_C_SOURCE, 200112L)
70     AC_DEFINE(_NETBSD_SOURCE)
71     ;;
72  *)
73     # On FreeBSD the only way to get vsyslog() visible is to define
74     #  *nothing*, which makes absolutely everything visible.
75     # On Darwin enabling _POSIX_C_SOURCE breaks <sys/mount.h> because
76     # u_long and other types don't get defined. OpenBSD is similar.
77     ;;
78 esac
79
80 symver_time=
81 symver_getline=
82 symver_asprintf=
83
84 case $host_os in
85  *solaris*|*sunos*)
86     symver_time="openconnect__time;"
87     ;;
88 esac
89
90 AC_CHECK_FUNC(fdevname_r, [AC_DEFINE(HAVE_FDEVNAME_R, 1)], [])
91 AC_CHECK_FUNC(getline, [AC_DEFINE(HAVE_GETLINE, 1)], [symver_getline="openconnect__getline;"])
92 AC_CHECK_FUNC(strcasestr, [AC_DEFINE(HAVE_STRCASESTR, 1)], [])
93 AC_CHECK_FUNC(asprintf, [AC_DEFINE(HAVE_ASPRINTF, 1)], [symver_asprintf="openconnect__asprintf;"])
94 if test -n "$symver_asprintf"; then
95   AC_MSG_CHECKING([for va_copy])
96   AC_LINK_IFELSE([AC_LANG_PROGRAM([
97         #include <stdarg.h>
98         va_list a;],[
99         va_list b;
100         va_copy(b,a);
101         va_end(b);])],
102         [AC_DEFINE(HAVE_VA_COPY, 1)
103         AC_MSG_RESULT(va_copy)],
104         [AC_LINK_IFELSE([AC_LANG_PROGRAM([
105                 #include <stdarg.h>
106                 va_list a;],[
107                 va_list b;
108                 __va_copy(b,a);
109                 va_end(b);])],
110                 [AC_DEFINE(HAVE___VA_COPY, 1)
111                 AC_MSG_RESULT(__va_copy)],
112                 [AC_MSG_RESULT(no)
113                 AC_MSG_ERROR([Your system lacks asprintf() and va_copy()])])
114         ])
115 fi
116 AC_SUBST(SYMVER_TIME, $symver_time)
117 AC_SUBST(SYMVER_GETLINE, $symver_getline)
118 AC_SUBST(SYMVER_ASPRINTF, $symver_asprintf)
119
120 AS_COMPILER_FLAGS(CFLAGS,
121         "-Wall
122          -Wextra
123          -Wno-missing-field-initializers
124          -Wno-sign-compare
125          -Wno-unused-parameter
126          -Werror=pointer-to-int-cast
127          -Wdeclaration-after-statement
128          -Werror-implicit-function-declaration
129          -Wformat-nonliteral
130          -Wformat-security
131          -Winit-self
132          -Wmissing-declarations
133          -Wmissing-include-dirs
134          -Wnested-externs
135          -Wpointer-arith
136          -Wwrite-strings")
137
138 AC_ENABLE_SHARED
139 AC_DISABLE_STATIC
140
141 AC_ARG_ENABLE([nls],
142         [  --disable-nls           do not use Native Language Support],
143         [USE_NLS=$enableval], [USE_NLS=yes])
144 LIBINTL=
145 if test "$USE_NLS" = "yes"; then
146    AC_PATH_PROG(MSGFMT, msgfmt)
147    if test "$MSGFMT" = ""; then
148       AC_ERROR([msgfmt could not be found. Try configuring with --disable-nls])
149    fi
150 fi
151 LIBINTL=
152 if test "$USE_NLS" = "yes"; then
153    AC_MSG_CHECKING([for functional NLS support])
154    AC_LINK_IFELSE([AC_LANG_PROGRAM([
155     #include <locale.h>
156     #include <libintl.h>],[
157     setlocale(LC_ALL, "");
158     bindtextdomain("openconnect", "/tmp");
159     (void)dgettext("openconnect", "foo");])],
160     [AC_MSG_RESULT(yes)],
161     [oldLIBS="$LIBS"
162      LIBS="$LIBS -lintl"
163      AC_LINK_IFELSE([AC_LANG_PROGRAM([
164       #include <locale.h>
165       #include <libintl.h>],[
166       setlocale(LC_ALL, "");
167       bindtextdomain("openconnect", "/tmp");
168       (void)dgettext("openconnect", "foo");])],
169       [AC_MSG_RESULT(yes (with -lintl))]
170        LIBINTL="-lintl",
171       [AC_MSG_RESULT(no)
172        USE_NLS=no])
173      LIBS="$oldLIBS"])
174 fi
175
176 if test "$USE_NLS" = "yes"; then
177    AC_SUBST(LIBINTL)
178    AC_DEFINE(ENABLE_NLS, 1)
179 fi
180 AM_CONDITIONAL(USE_NLS, [test "$USE_NLS" = "yes"])
181
182 # We will use GnuTLS if it's requested, and if GnuTLS doesn't have DTLS
183 # support then we'll *also* use OpenSSL for that, but it appears *only*
184 # only in the openconnect executable and not the library (hence shouldn't
185 # be a problem for GPL'd programs using libopenconnect).
186 #
187 # If built with --with-gnutls --without-openssl then we'll even eschew
188 # OpenSSL for DTLS support and will build without any DTLS support at all
189 # if GnuTLS cannot manage.
190 #
191 # The default (for now) is to use OpenSSL for everything.
192
193 AC_ARG_WITH([gnutls],
194         AS_HELP_STRING([--with-gnutls], 
195                        [Use GnuTLS instead of OpenSSL (EXPERIMENTAL)]))
196 AC_ARG_WITH([openssl],
197             AS_HELP_STRING([--with-openssl],
198                            [Location of OpenSSL build dir]))
199 ssl_library=
200
201 if test "$with_gnutls" = "yes"; then
202     PKG_CHECK_MODULES(GNUTLS, gnutls)
203     if ! $PKG_CONFIG --atleast-version=2.12.16 gnutls; then
204        AC_MSG_ERROR([Your GnuTLS is too old. At least v2.12.16 is required])
205     fi
206     oldlibs="$LIBS"
207     LIBS="$LIBS $GNUTLS_LIBS"
208     AC_CHECK_FUNC(gnutls_dtls_set_data_mtu,
209                  [AC_DEFINE(HAVE_GNUTLS_DTLS_SET_DATA_MTU, 1)], [])
210     AC_CHECK_FUNC(gnutls_certificate_set_x509_system_trust,
211                  [AC_DEFINE(HAVE_GNUTLS_CERTIFICATE_SET_X509_SYSTEM_TRUST, 1)], [])
212     AC_CHECK_FUNC(gnutls_pkcs12_simple_parse,
213                  [AC_DEFINE(HAVE_GNUTLS_PKCS12_SIMPLE_PARSE, 1)], [])
214     AC_CHECK_FUNC(gnutls_certificate_set_key,
215                  [AC_DEFINE(HAVE_GNUTLS_CERTIFICATE_SET_KEY, 1)], [])
216     if test "$with_openssl" = "" || test "$with_openssl" = "no"; then
217         AC_CHECK_FUNC(gnutls_session_set_premaster,
218                  [have_gnutls_dtls=yes], [have_gnutls_dtls=no])
219     else
220         have_gnutls_dtls=no
221     fi
222     if test "$have_gnutls_dtls" = "yes"; then
223         if test "$with_openssl" = "" || test "$with_openssl" = "no"; then
224             # They either said no OpenSSL or didn't specify, and GnuTLS can
225             # do DTLS, so just use GnuTLS.
226             AC_DEFINE(HAVE_GNUTLS_SESSION_SET_PREMASTER, 1)    
227             ssl_library=gnutls
228             with_openssl=no
229         else
230             # They specifically asked for OpenSSL, so use it for DTLS even
231             # though GnuTLS could manage.
232             ssl_library=both
233         fi
234     else
235         if test "$with_openssl" = "no"; then
236             # GnuTLS doesn't have DTLS, but they don't want OpenSSL. So build
237             # without DTLS support at all.
238             ssl_library=gnutls
239         else
240             # GnuTLS doesn't have DTLS so use OpenSSL for it, but GnuTLS for
241             # the TCP connection (and thus in the library).
242             ssl_library=both
243         fi
244     fi
245     AC_CHECK_FUNC(gnutls_pkcs11_add_provider,
246                  [PKG_CHECK_MODULES(P11KIT, p11-kit-1, [AC_DEFINE(HAVE_P11KIT)
247                                           AC_SUBST(P11KIT_PC, p11-kit-1)], [:])], [])
248     LIBS="$oldlibs -ltspi"
249     AC_MSG_CHECKING([for tss library])
250     AC_LINK_IFELSE([AC_LANG_PROGRAM([
251                    #include <trousers/tss.h>
252                    #include <trousers/trousers.h>],[
253                    int err = Tspi_Context_Create((void *)0);
254                    Trspi_Error_String(err);])],
255                   [AC_MSG_RESULT(yes)
256                    AC_SUBST([TSS_LIBS], [-ltspi])
257                    AC_SUBST([TSS_CFLAGS], [])
258                    AC_DEFINE(HAVE_TROUSERS, 1)],
259                   [AC_MSG_RESULT(no)])
260     LIBS="$oldlibs"
261 elif test "$with_gnutls" != "" && test "$with_gnutls" != "no"; then
262     AC_MSG_ERROR([Values other than 'yes' or 'no' for --with-gnutls are not supported])
263 fi
264 if test "$with_openssl" = "yes" || test "$with_openssl" = "" || test "$ssl_library" = "both"; then
265     PKG_CHECK_MODULES(OPENSSL, openssl, [],
266         [oldLIBS="$LIBS"
267          LIBS="$LIBS -lssl -lcrypto"
268          AC_MSG_CHECKING([for OpenSSL without pkg-config])
269          AC_LINK_IFELSE([AC_LANG_PROGRAM([
270                                 #include <openssl/ssl.h>
271                                 #include <openssl/err.h>],[
272                                 SSL_library_init();
273                                 ERR_clear_error();
274                                 SSL_load_error_strings();
275                                 OpenSSL_add_all_algorithms();])],
276                         [AC_MSG_RESULT(yes)
277                          AC_SUBST([OPENSSL_LIBS], ["-lssl -lcrypto"])
278                          AC_SUBST([OPENSSL_CFLAGS], [])],
279                         [AC_MSG_RESULT(no)
280                          if test "$ssl_library" = "both"; then
281                              ssl_library="gnutls";
282                          else
283                              AC_ERROR([Could not build against OpenSSL]);
284                          fi])
285          LIBS="$oldLIBS"])
286     if test "$ssl_library" != "both" && test "$ssl_library" != "gnutls"; then
287         ssl_library=openssl
288     fi
289 elif test "$with_openssl" != "no" ; then
290     OPENSSL_CFLAGS="-I${with_openssl}/include"
291     OPENSSL_LIBS="${with_openssl}/libssl.a ${with_openssl}/libcrypto.a -ldl -lz"
292     AC_SUBST(OPENSSL_CFLAGS)
293     AC_SUBST(OPENSSL_LIBS)
294     enable_static=yes
295     enable_shared=no
296     AC_DEFINE(DTLS_OPENSSL, 1)
297     if test "$ssl_library" != "both"; then
298         ssl_library=openssl
299     fi
300 fi
301
302 case "$ssl_library" in
303     gnutls)
304         AC_DEFINE(OPENCONNECT_GNUTLS, 1)
305         AC_DEFINE(DTLS_GNUTLS, 1)
306         AC_SUBST(SSL_LIBRARY, [gnutls])
307         AC_SUBST(SSL_LIBS, ['$(GNUTLS_LIBS)'])
308         AC_SUBST(SSL_CFLAGS, ['$(GNUTLS_CFLAGS)'])
309         ;;
310     openssl)
311         AC_DEFINE(OPENCONNECT_OPENSSL, 1)
312         AC_DEFINE(DTLS_OPENSSL, 1)
313         AC_SUBST(SSL_LIBRARY, [openssl])
314         AC_SUBST(SSL_LIBS, ['$(OPENSSL_LIBS)'])
315         AC_SUBST(SSL_CFLAGS, ['$(OPENSSL_CFLAGS)'])
316         AC_SUBST(SYMVER_PRINT_ERR, ["openconnect_print_err_cb;"])
317         ;;
318     both)
319         # GnuTLS for TCP, OpenSSL for DTLS
320         AC_DEFINE(OPENCONNECT_GNUTLS, 1)
321         AC_DEFINE(DTLS_OPENSSL, 1)
322         AC_SUBST(SSL_LIBRARY, [gnutls])
323         AC_SUBST(SSL_LIBS, ['$(GNUTLS_LIBS)'])
324         AC_SUBST(SSL_CFLAGS, ['$(GNUTLS_CFLAGS)'])
325         AC_SUBST(DTLS_SSL_LIBS, ['$(OPENSSL_LIBS)'])
326         AC_SUBST(DTLS_SSL_CFLAGS, ['$(OPENSSL_CFLAGS)'])
327         AC_SUBST(SYMVER_PRINT_ERR, ["openconnect_print_err_cb;"])
328         ;;
329     *)
330         AC_MSG_ERROR([Neither OpenSSL nor GnuTLS selected for SSL.])
331         ;;
332 esac
333 AM_CONDITIONAL(OPENCONNECT_GNUTLS,  [ test "$ssl_library" != "openssl" ])
334 AM_CONDITIONAL(OPENCONNECT_OPENSSL, [ test "$ssl_library" = "openssl" ])
335
336 # Needs to happen after we default to static/shared libraries based on OpenSSL
337 AC_PROG_LIBTOOL
338
339 # Ick. This seems like it's likely to be very fragile, but I can't see a better
340 # way. I shall console myself with the observation that the failure mode isn't
341 # particularly horrible — you just don't get symbol versioning if it fails.
342 symvers=no
343 if test "$enable_shared" = "yes" ; then
344    AC_MSG_CHECKING([if library symbol versioning is available]);
345    echo 'FOO { global: foo; local: *; };' > conftest.map
346    echo 'int foo = 0;' > conftest.$ac_ext
347    if AC_TRY_EVAL(ac_compile); then
348       soname=conftest
349       libobjs=conftest.$ac_objext
350       if AC_TRY_EVAL(archive_cmds ${wl}--version-script ${wl}conftest.map); then
351          AC_SUBST(VERSION_SCRIPT_ARG, [--version-script])
352          symvers="yes (with --version-script)"
353       elif AC_TRY_EVAL(archive_cmds ${wl}-M ${wl}conftest.map); then
354          AC_SUBST(VERSION_SCRIPT_ARG, [-M])
355          symvers="yes (with -M)"
356       fi
357    fi
358    AC_MSG_RESULT(${symvers})
359 fi
360 AM_CONDITIONAL(HAVE_SYMBOL_VERSIONING, [test "${symvers}" != "no"])
361
362 PKG_CHECK_MODULES(LIBXML2, libxml-2.0)
363
364 PKG_CHECK_MODULES(ZLIB, zlib, [AC_SUBST(ZLIB_PC, [zlib])],
365                   [oldLIBS="$LIBS"
366                   LIBS="$LIBS -lz" 
367                   AC_MSG_CHECKING([for zlib without pkg-config])
368                   AC_LINK_IFELSE([AC_LANG_PROGRAM([
369                    #include <zlib.h>],[
370                    z_stream zs;
371                    deflateInit2(&zs, Z_DEFAULT_COMPRESSION, Z_DEFLATED,
372                                 -12, 9, Z_DEFAULT_STRATEGY);])],
373                   [AC_MSG_RESULT(yes)
374                    AC_SUBST([ZLIB_LIBS], [-lz])
375                    AC_SUBST([ZLIB_CFLAGS], [])],
376                   [AC_MSG_RESULT(no)
377                    AC_ERROR([Could not build against zlib])])
378                   LIBS="$oldLIBS"])
379
380 PKG_CHECK_MODULES(LIBPROXY, libproxy-1.0,
381                 [AC_SUBST(LIBPROXY_PC, libproxy-1.0)
382                  AC_DEFINE([LIBPROXY_HDR], ["proxy.h"])
383                  libproxy_pkg=yes],
384                  libproxy_pkg=no)
385 dnl Libproxy *can* exist without a .pc file, and its header may be called
386 dnl libproxy.h in that case.
387 if (test "$libproxy_pkg" = "no"); then
388    AC_MSG_CHECKING([for libproxy])
389    oldLIBS="$LIBS"
390    LIBS="$LIBS -lproxy"
391    AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <libproxy.h>],
392                            [(void)px_proxy_factory_new();])],
393           [AC_MSG_RESULT(yes (with libproxy.h))
394            AC_DEFINE([LIBPROXY_HDR], ["libproxy.h"])
395            AC_SUBST([LIBPROXY_LIBS], [-lproxy])],
396           [AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <proxy.h>],
397                                   [(void)px_proxy_factory_new();])],
398                   [AC_MSG_RESULT(yes (with proxy.h))
399                    AC_DEFINE([LIBPROXY_HDR], ["proxy.h"])
400                    AC_SUBST([LIBPROXY_LIBS], [-lproxy])],
401                    [AC_MSG_RESULT(no)])])
402    LIBS="$oldLIBS"
403 fi
404
405 AC_CHECK_HEADER([if_tun.h],
406     [AC_DEFINE([IF_TUN_HDR], ["if_tun.h"])],
407     [AC_CHECK_HEADER([linux/if_tun.h],
408         [AC_DEFINE([IF_TUN_HDR], ["linux/if_tun.h"])],
409         [AC_CHECK_HEADER([net/if_tun.h],
410             [AC_DEFINE([IF_TUN_HDR], ["net/if_tun.h"])],
411             [AC_CHECK_HEADER([net/tun/if_tun.h],
412                 [AC_DEFINE([IF_TUN_HDR], ["net/tun/if_tun.h"])])])])])
413
414 if test "$ssl_library" = "openssl" || test "$ssl_library" = "both"; then
415     oldLIBS="$LIBS"
416     LIBS="$LIBS $OPENSSL_LIBS"
417
418     if test "$ssl_library" = "openssl"; then
419         AC_MSG_CHECKING([for ENGINE_by_id() in OpenSSL])
420         AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <openssl/engine.h>],
421                                         [ENGINE_by_id("foo");])],
422                        [AC_MSG_RESULT(yes)
423                         AC_DEFINE(HAVE_ENGINE, [1], [OpenSSL has ENGINE support])],
424                        [AC_MSG_RESULT(no)
425                         AC_MSG_NOTICE([Building without OpenSSL TPM ENGINE support])])
426     fi
427
428     AC_MSG_CHECKING([for dtls1_stop_timer() in OpenSSL])
429     AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <openssl/ssl.h>
430                                      #include <stdlib.h>
431                                      extern void dtls1_stop_timer(SSL *);],
432                                     [dtls1_stop_timer(NULL);])],
433                    [AC_MSG_RESULT(yes)
434                     AC_DEFINE(HAVE_DTLS1_STOP_TIMER, [1], [OpenSSL has dtls1_stop_timer() function])],
435                    [AC_MSG_RESULT(no)])
436     LIBS="$oldLIBS"
437 fi
438
439 AC_PATH_PROG(PYTHON, [python], [], $PATH:/bin:/usr/bin)
440 if (test -n "${ac_cv_path_PYTHON}"); then
441    AC_SUBST(PYTHON, ${ac_cv_path_PYTHON})
442 else
443    AC_MSG_NOTICE([Python not found; not building HTML pages])
444 fi
445 AM_CONDITIONAL(BUILD_WWW, [test -n "${ac_cv_path_PYTHON}"])
446
447 AC_SUBST([CONFIG_STATUS_DEPENDENCIES], ['$(top_srcdir)/po/LINGUAS $(top_srcdir)/openconnect.h ${top_srcdir}/libopenconnect.map.in'])
448 RAWLINGUAS=`sed -e "/^#/d" -e "s/#.*//" "${srcdir}/po/LINGUAS"`
449 # Remove newlines
450 LINGUAS=`echo $RAWLINGUAS`
451 AC_SUBST(LINGUAS)
452
453 APIMAJOR="`sed -n 's/^#define OPENCONNECT_API_VERSION_MAJOR \(.*\)/\1/p' ${srcdir}/openconnect.h`"
454 APIMINOR="`sed -n 's/^#define OPENCONNECT_API_VERSION_MINOR \(.*\)/\1/p' ${srcdir}/openconnect.h`"
455 AC_SUBST(APIMAJOR)
456 AC_SUBST(APIMINOR)
457
458 # We want version.c to depend on the files that would affect the
459 # output of version.sh. But we cannot assume that they'll exist,
460 # and we cannot use $(wildcard) in a non-GNU makefile. So we just
461 # depend on the files which happen to exist at configure time.
462 GITVERSIONDEPS=
463 for a in ${srcdir}/.git/index ${srcdir}/.git/packed-refs \
464          ${srcdir}/.git/refs/tags ${srcdir}/.git/HEAD; do
465     if test -r $a ; then
466        GITVERSIONDEPS="$GITVERSIONDEPS $a"
467     fi
468 done
469 AC_SUBST(GITVERSIONDEPS)
470
471 AC_OUTPUT(Makefile openconnect.pc po/Makefile www/Makefile libopenconnect.map \
472           openconnect.8 www/styles/Makefile www/inc/Makefile www/images/Makefile)