X-Git-Url: http://git.dolda2000.com/gitweb/?a=blobdiff_plain;f=configure.in;h=2d2017f155d36a1dfa3a4d3aa9ac18907fe795af;hb=cf3b4208d4252a4fb8e30457ef0e903466609606;hp=691b9e22c65daf0f4cc21e585238d61913f7e1da;hpb=a8c5ada654f0ff7b7c8bb9542fcae9c4a917f353;p=doldaconnect.git diff --git a/configure.in b/configure.in index 691b9e2..2d2017f 100644 --- a/configure.in +++ b/configure.in @@ -3,6 +3,8 @@ 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) @@ -11,14 +13,13 @@ AM_GNU_GETTEXT([external]) # 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) -AM_PROG_LIBTOOL +AC_PROG_LIBTOOL AC_CHECK_LIB(pam, pam_start, , AC_MSG_ERROR([*** must have PAM])) 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=tty extlibs= experimental=no @@ -38,12 +39,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 @@ -54,6 +57,7 @@ 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]) @@ -64,13 +68,16 @@ if test "$PKG_CONFIG" = yes; then 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], `pkg-config --libs libxml-2.0`) + 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]) @@ -100,10 +107,10 @@ if test "$enable_gtk2ui" = yes; then AC_MSG_ERROR([*** the GTK2 UI needs libxml2]) fi fi -if test "$enable_gtk2ui" != no -a "$HAS_GTK2" = yes; then - clients="$clients gtk2" +if test "$enable_gtk2ui" != no -a "$HAS_GTK2" = yes -a "$HAS_LIBXML" = yes; then gtk2ui_msg=Yes fi +AM_CONDITIONAL(CLI_GTK2, test "$gtk2ui_msg" = Yes) # Dolconf check dolconf_msg=No @@ -112,11 +119,9 @@ 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 +AM_CONDITIONAL(DOLCONF, test "$dolconf_msg" = Yes) # Gtk progress bar check gtk2pbar_msg=No @@ -137,8 +142,8 @@ AC_ARG_ENABLE(gnomeapplet, [ --enable-gnomeapplet Enable GNOME transfer appl if test "$enable_gnomeapplet" = yes; then experimental=yes gnometrapplet_msg=Yes - clients="$clients gnome-trans-applet" fi +AM_CONDITIONAL(CLI_GNOMEAPPLET, test "$gnometrapplet_msg" = Yes) # Gaim plugin check gaimplugin_msg=No @@ -146,8 +151,8 @@ AC_ARG_ENABLE(gaimplugin, [ --enable-gaimplugin Enable GNOME transfer apple if test "$enable_gaimplugin" = yes; then experimental=yes gaimplugin_msg=Yes - clients="$clients gaim" fi +AM_CONDITIONAL(CLI_GAIM, test "$gaimplugin_msg" = Yes) # Guile check (XXX: Shouldn't have to be enabled manually) guile_msg=No @@ -242,7 +247,7 @@ AC_TYPE_SIGNAL CPPFLAGS="-I\$(top_srcdir)/include $CPPFLAGS" -AC_SUBST([clients extlibs]) +AC_SUBST([extlibs]) AC_OUTPUT([ Makefile autopackage/Makefile