2 AM_INIT_AUTOMAKE([doldaconnect], [0.1])
3 AM_CONFIG_HEADER(config.h)
8 AM_GNU_GETTEXT_VERSION(0.12.1)
9 AM_GNU_GETTEXT([external])
12 AC_CHECK_LIB(pam, pam_start, , AC_MSG_ERROR([*** must have PAM]))
13 AC_CHECK_LIB(dl, dlopen, , AC_MSG_ERROR([*** PAM requires a working dynamic loader (libdl)]))
14 AC_CHECK_LIB(z, deflate, , AC_MSG_ERROR([*** must have zlib]))
15 AC_CHECK_LIB(bz2, BZ2_bzWriteOpen, , AC_MSG_ERROR([*** must have bzlib]))
21 AC_CHECK_PROG([PKG_CONFIG], pkg-config, yes, no)
23 AC_ARG_WITH(gtk2, [ --with-gtk2 Enable GTK2 support])
24 if test "$with_gtk2" = no; then
27 if test "$HAS_GTK2" != no; then
28 if test "$PKG_CONFIG" = yes; then
29 AC_MSG_CHECKING([for GTK2 package information])
30 if pkg-config --modversion gtk+-2.0 >/dev/null 2>&1; then
36 if test "$HAS_GTK2" != no; then
37 AC_CHECK_LIB(gtk-x11-2.0, gtk_init, [HAS_GTK2=yes], [HAS_GTK2=no], `pkg-config --libs gtk+-2.0`)
39 if test "$HAS_GTK2" = yes; then
41 CPPFLAGS="$CPPFLAGS `pkg-config --cflags gtk+-2.0`"
42 AC_CHECK_HEADER(gtk/gtk.h, [], [HAS_GTK2=no])
49 if test "$with_gtk2" = yes -a "$HAS_GTK2" = no; then
50 AC_MSG_ERROR([*** cannot find GTK2 on this system])
54 AC_ARG_ENABLE(gtk2ui, [ --enable-gtk2ui Enable the GTK2 user interface])
55 if test "$enable_gtk2ui" = yes -a "$HAS_GTK2" = no; then
56 AC_MSG_ERROR([*** cannot build the GTK2 UI without a GTK2 library])
58 if test "$enable_gtk2ui" != no -a "$HAS_GTK2" = yes; then
59 clients="$clients gtk2"
64 AH_TEMPLATE(ENABLE_GTK2PBAR, [define to compile GTK2 progress bars (experimental)])
65 AC_ARG_ENABLE(gtk2pbar, [ --enable-gtk2pbar Enable GTK2 progress bars (experimental)])
66 if test "$enable_gtk2pbar" = yes; then
67 if test "$HAS_GTK2" = no; then
68 AC_MSG_ERROR([*** cannot build GTK2 progress bars without GTK2])
72 AC_DEFINE(ENABLE_GTK2PBAR)
76 AC_ARG_ENABLE(gnomeapplet, [ --enable-gnomeapplet Enable GNOME transfer applet (experimental)])
77 if test "$enable_gnomeapplet" = yes; then
80 clients="$clients gnome-trans-applet"
84 if test "$with_guile" = yes; then
86 extlibs="$extlibs guile"
91 AH_TEMPLATE(HAVE_KRB5, [define to compile support for Kerberos 5 (not GSS-API) authentication])
92 AC_ARG_WITH(krb5, [ --with-krb5[=PATH] Enable Kerberos 5 (not GSSAPI) authentication])
93 if test "$with_krb5" != no; then
96 if test "$with_krb5" != yes; then
97 CPPFLAGS="$CPPFLAGS -I${with_krb5}/include"
98 LDFLAGS="$LDFLAGS -L${with_krb5}/lib"
100 AC_CHECK_LIB(krb5, krb5_init_context, [HAS_KRB5=yes], [HAS_KRB5=no])
101 if test "$HAS_KRB5" = yes; then
102 AC_CHECK_HEADER(com_err.h, [HAS_COMERR=yes], [HAS_COMERR=no])
103 if test "$HAS_COMERR" = no; then
104 AC_CHECK_HEADER(et/com_err.h, [HAS_COMERR=yes; CPPFLAGS="$CPPFLAGS -I/usr/include/et"], [])
107 if test "$HAS_COMERR" = no; then
110 if test "$HAS_KRB5" = no; then
116 if test -n "$with_krb5" -a "$with_krb5" != no -a "$HAS_KRB5" != yes; then
117 AC_MSG_ERROR([*** cannot find Kerberos 5 on this system - try passing --with-krb5=/path/to/kerberos])
119 if test "$with_krb5" != no -a "$HAS_KRB5" = yes; then
124 AC_SUBST([KRB5_LDADD])
126 AC_CHECK_FUNC(vswprintf, , AC_MSG_ERROR([*** must have vswprintf]))
127 AH_TEMPLATE(HAVE_WCSCASECMP, [define if your system implements wcscasecmp])
128 AC_CHECK_FUNC(wcscasecmp, [ AC_DEFINE(HAVE_WCSCASECMP) ])
130 AH_TEMPLATE(HAVE_LINUX_SOCKIOS_H, [define if you have linux/sockios.h on your system])
131 AC_CHECK_HEADER([linux/sockios.h], [ AC_DEFINE(HAVE_LINUX_SOCKIOS_H) ])
133 AH_TEMPLATE(HAVE_IPV6, [define if your system supports IPv6 and you wish to compile with support for it])
134 AC_CHECK_MEMBER(struct sockaddr_in6.sin6_family, [ AC_DEFINE(HAVE_IPV6) ], , [#include <netinet/in.h>])
136 AH_TEMPLATE(HAVE_RESOLVER, [define if your system supports the res_* functions to fetch DNS RRs])
137 AC_CHECK_LIB(resolv, res_query, [ AC_DEFINE(HAVE_RESOLVER)
138 LDFLAGS="$LDFLAGS -lresolv" ])
149 CPPFLAGS="-I\$(top_srcdir)/include $CPPFLAGS"
151 AC_SUBST([clients extlibs])
158 lib/guile/dolcon/Makefile
160 clients/gtk2/Makefile
161 clients/gnome-trans-applet/Makefile
165 autopackage/dolcon.apspec
166 autopackage/dcuilib.apspec
167 autopackage/dcguile.apspec
171 echo "Dolda Connect has been configured with the following settings:"
173 echo " Kerberos 5 support: $krb_msg"
174 echo " GTK2 user interface: $gtk2ui_msg"
175 echo " GTK2 progress bars: $gtk2pbar_msg"
176 echo " Guile extension library: $guile_msg"
177 echo " GNOME transfer applet: $gnometrapplet_msg"
180 if tput bold >/dev/null 2>&1 && tty <&2 >/dev/null 2>&1; then
183 if test "$HAS_GTK2" = no -a "$with_gtk2" != no -a "$enable_gtk2ui" != no; then
184 if test "$hastput" = y; then
186 tput setf 4 2>/dev/null
188 echo -n " Warning: " >&2
189 if test "$hastput" = y; then
192 echo "Could not find a GTK2 development installation on this system." >&2
193 echo " That means you won't get a UI." >&2
194 echo " Make absolutely sure this is what you want!" >&2
195 if test "$hastput" = y; then
200 if test "$experimental" = yes; then
201 if test "$hastput" = y; then
203 tput setf 4 2>/dev/null
205 echo -n " Warning: " >&2
206 if test "$hastput" = y; then
209 echo "You have enabled one or more experimental features!" >&2
210 echo " Please don't complain that it doesn't work, unless" >&2
211 echo " you have something constructive to add about the situation." >&2
212 if test "$hastput" = y; then