X-Git-Url: http://git.dolda2000.com/gitweb/?a=blobdiff_plain;f=configure.in;h=c2fbcc8b38e92da22811170d2edca02beccbb73d;hb=protodoc;hp=3952c66be434262dc1ea7f9eae43f82f3ccd8df4;hpb=05fe12f8b0ff970b8fa04b6c4b68ae20c48c4e09;p=doldaconnect.git diff --git a/configure.in b/configure.in index 3952c66..c2fbcc8 100644 --- a/configure.in +++ b/configure.in @@ -1,26 +1,32 @@ AC_INIT(daemon/main.c) -AM_INIT_AUTOMAKE([doldaconnect], [0.3]) +AM_INIT_AUTOMAKE([doldaconnect], [0.4]) AM_CONFIG_HEADER(config.h) AC_PROG_CC +AC_PROG_CC_C_O +AM_PROG_CC_C_O AC_PROG_INSTALL AM_GNU_GETTEXT_VERSION(0.12.1) AM_GNU_GETTEXT([external]) -AM_PROG_LIBTOOL + +# Temporary hack to make libtool not check for g++ or g77 +m4_defun([_LT_AC_LANG_CXX_CONFIG], true) +m4_defun([_LT_AC_LANG_F77_CONFIG], true) +AC_PROG_LIBTOOL AC_CHECK_LIB(pam, pam_start, , AC_MSG_ERROR([*** must have PAM])) -AC_CHECK_LIB(dl, dlopen, , AC_MSG_ERROR([*** PAM requires a working dynamic loader (libdl)])) AC_CHECK_LIB(z, deflate, , AC_MSG_ERROR([*** must have zlib])) AC_CHECK_LIB(bz2, BZ2_bzWriteOpen, , AC_MSG_ERROR([*** must have bzlib])) AC_CHECK_LIB(gdbm, gdbm_open, , AC_MSG_ERROR([*** must have gdbm])) -clients= +clients=tty extlibs= experimental=no AC_CHECK_PROG([PKG_CONFIG], pkg-config, yes, no) +# Gtk 2.0 check AC_ARG_WITH(gtk2, [ --with-gtk2 Enable GTK2 support]) if test "$with_gtk2" = no; then HAS_GTK2=no @@ -34,12 +40,14 @@ if test "$HAS_GTK2" != no; then AC_MSG_RESULT(no) HAS_GTK2=no fi + GTK2_LDADD="`pkg-config --libs gtk+-2.0`" + GTK2_CFLAGS="`pkg-config --cflags gtk+-2.0`" if test "$HAS_GTK2" != no; then - AC_CHECK_LIB(gtk-x11-2.0, gtk_init, [HAS_GTK2=yes], [HAS_GTK2=no], `pkg-config --libs gtk+-2.0`) + AC_CHECK_LIB(gtk-x11-2.0, gtk_init, [HAS_GTK2=yes], [HAS_GTK2=no], "$GTK2_LDADD") fi if test "$HAS_GTK2" = yes; then cpp_bak="$CPPFLAGS" - CPPFLAGS="$CPPFLAGS `pkg-config --cflags gtk+-2.0`" + CPPFLAGS="$CPPFLAGS $GTK2_CFLAGS" AC_CHECK_HEADER(gtk/gtk.h, [], [HAS_GTK2=no]) CPPFLAGS="$cpp_bak" fi @@ -50,17 +58,75 @@ fi if test "$with_gtk2" = yes -a "$HAS_GTK2" = no; then AC_MSG_ERROR([*** cannot find GTK2 on this system]) fi +AC_SUBST([GTK2_LDADD GTK2_CFLAGS]) + +# libxml2 check +AC_MSG_CHECKING([for libxml2 package information]) +if test "$PKG_CONFIG" = yes; then + if pkg-config --modversion libxml-2.0 >/dev/null 2>&1; then + AC_MSG_RESULT(yes) + else + AC_MSG_RESULT(no) + HAS_LIBXML=no + fi + LIBXML_LDADD="`pkg-config --libs libxml-2.0`" + LIBXML_CFLAGS="`pkg-config --cflags libxml-2.0`" + if test "$HAS_LIBXML" != no; then + AC_CHECK_LIB(xml2, xmlReadFile, [HAS_LIBXML=yes], [HAS_LIBXML=no], "$LIBXML_LDADD") + fi +else + AC_MSG_RESULT(no) + HAS_LIBXML=no +fi +AC_SUBST([LIBXML_LDADD LIBXML_CFLAGS]) + +# libnotify check +AC_MSG_CHECKING([for libnotify package information]) +if test "$PKG_CONFIG" = yes; then + if pkg-config --modversion libnotify >/dev/null 2>&1; then + AC_MSG_RESULT(yes) + else + AC_MSG_RESULT(no) + HAS_LIBNOTIFY=no + fi +else + AC_MSG_RESULT(no) + HAS_LIBNOTIFY=no +fi +if test "$HAS_LIBNOTIFY" != no; then + AC_CHECK_LIB(notify, notify_init, [HAS_LIBNOTIFY=yes], [HAS_LIBNOTIFY=no], `pkg-config --libs libnotify`) +fi +# Gtk GUI check gtk2ui_msg=No AC_ARG_ENABLE(gtk2ui, [ --enable-gtk2ui Enable the GTK2 user interface]) -if test "$enable_gtk2ui" = yes -a "$HAS_GTK2" = no; then - AC_MSG_ERROR([*** cannot build the GTK2 UI without a GTK2 library]) +if test "$enable_gtk2ui" = yes; then + if test "$HAS_GTK2" = no; then + AC_MSG_ERROR([*** cannot build the GTK2 UI without a GTK2 library]) + fi + if test "$HAS_LIBXML" = no; then + AC_MSG_ERROR([*** the GTK2 UI needs libxml2]) + fi fi if test "$enable_gtk2ui" != no -a "$HAS_GTK2" = yes; then clients="$clients gtk2" gtk2ui_msg=Yes fi +# Dolconf check +dolconf_msg=No +AC_ARG_ENABLE(dolconf, [ --enable-dolconf Build the configuration helper]) +if test "$enable_dolconf" = yes -a "$HAS_GTK2" = no; then + AC_MSG_ERROR([*** cannot build dolconf without GTK2]) +fi +if test "$enable_dolconf" != no -a "$HAS_GTK2" = yes; then + AM_CONDITIONAL(DOLCONF, true) + dolconf_msg=Yes +else + AM_CONDITIONAL(DOLCONF, false) +fi + +# Gtk progress bar check gtk2pbar_msg=No AH_TEMPLATE(ENABLE_GTK2PBAR, [define to compile GTK2 progress bars (experimental)]) AC_ARG_ENABLE(gtk2pbar, [ --enable-gtk2pbar Enable GTK2 progress bars (experimental)]) @@ -73,6 +139,7 @@ if test "$enable_gtk2pbar" = yes; then AC_DEFINE(ENABLE_GTK2PBAR) fi +# Gnome applet check gnometrapplet_msg=No AC_ARG_ENABLE(gnomeapplet, [ --enable-gnomeapplet Enable GNOME transfer applet (experimental)]) if test "$enable_gnomeapplet" = yes; then @@ -81,6 +148,7 @@ if test "$enable_gnomeapplet" = yes; then clients="$clients gnome-trans-applet" fi +# Gaim plugin check gaimplugin_msg=No AC_ARG_ENABLE(gaimplugin, [ --enable-gaimplugin Enable GNOME transfer applet (experimental)]) if test "$enable_gaimplugin" = yes; then @@ -89,6 +157,7 @@ if test "$enable_gaimplugin" = yes; then clients="$clients gaim" fi +# Guile check (XXX: Shouldn't have to be enabled manually) guile_msg=No if test "$with_guile" = yes; then GUILE_FLAGS @@ -96,6 +165,11 @@ if test "$with_guile" = yes; then guile_msg=Yes fi +# Check whether to install baseconv +AC_ARG_ENABLE(baseconv, [ --enable-baseconv Install the baseconv utility]) +AM_CONDITIONAL(BASECONV, test "$enable_baseconv" = yes) + +# Kerberos check krb_msg=No AH_TEMPLATE(HAVE_KRB5, [define to compile support for Kerberos 5 (not GSS-API) authentication]) AC_ARG_WITH(krb5, [ --with-krb5[=PATH] Enable Kerberos 5 (not GSSAPI) authentication]) @@ -132,6 +206,7 @@ if test "$with_krb5" != no -a "$HAS_KRB5" = yes; then fi AC_SUBST([KRB5_LDADD]) +# Misc. functions checks AC_CHECK_FUNC(vswprintf, , AC_MSG_ERROR([*** must have vswprintf])) AH_TEMPLATE(HAVE_WCSCASECMP, [define if your system implements wcscasecmp]) AC_CHECK_FUNC(wcscasecmp, [ AC_DEFINE(HAVE_WCSCASECMP) ]) @@ -149,6 +224,21 @@ AH_TEMPLATE(HAVE_KEYUTILS, [define if your system supports the Linux keyring fun AC_CHECK_LIB(keyutils, keyctl_search, [ AC_DEFINE(HAVE_KEYUTILS) LDFLAGS="$LDFLAGS -lkeyutils" ]) +# Unix credentials selector +AH_TEMPLATE(UNIX_AUTH_STYLE, [undefine for no Unix auth, 1 for Linux style, 2 for BSD style]) +AC_CHECK_MEMBER(struct ucred.pid, [ linuxcreds=y ], [ linuxcreds=n ], [#include ]) +AC_CHECK_FUNC(getpeereid, [ bsdcreds=y ], [ bsdcreds=n ]) +AC_MSG_CHECKING([for Unix auth style]) +if test $linuxcreds = y; then + AC_DEFINE(UNIX_AUTH_STYLE, 1) + AC_MSG_RESULT(linux) +elif test $bsdcreds = y; then + AC_DEFINE(UNIX_AUTH_STYLE, 2) + AC_MSG_RESULT(bsd) +else + AC_MSG_RESULT(none) +fi + AC_HEADER_STDC AC_HEADER_DIRENT AC_HEADER_SYS_WAIT @@ -164,17 +254,24 @@ AC_SUBST([clients extlibs]) AC_OUTPUT([ Makefile autopackage/Makefile +common/Makefile daemon/Makefile lib/Makefile lib/guile/Makefile lib/guile/dolcon/Makefile clients/Makefile clients/gtk2/Makefile +clients/tty/Makefile clients/gnome-trans-applet/Makefile clients/gaim/Makefile include/Makefile +include/doldaconnect/Makefile +doc/Makefile +doc/man/Makefile +doc/protocol/Makefile po/Makefile.in config/Makefile +contrib/Makefile autopackage/dolcon.apspec autopackage/dcuilib.apspec autopackage/dcguile.apspec @@ -186,6 +283,7 @@ echo echo " Kerberos 5 support: $krb_msg" echo " GTK2 user interface: $gtk2ui_msg" echo " GTK2 progress bars: $gtk2pbar_msg" +echo " Dolconf configurator: $dolconf_msg" echo " Guile extension library: $guile_msg" echo " GNOME transfer applet: $gnometrapplet_msg" echo " Gaim chat plugin: $gaimplugin_msg"