AC_INIT(gnometalk)

AM_CONFIG_HEADER(config.h)
AM_INIT_AUTOMAKE(gnome-network, 1.0.2)
AM_MAINTAINER_MODE
AM_ACLOCAL_INCLUDE(macros)

GNOME_INIT

AC_ISC_POSIX
AC_PROG_CC
AC_STDC_HEADERS
AC_ARG_PROGRAM
AM_PROG_LIBTOOL

GNOME_X_CHECKS

GNOME_CHECK_OBJC
if test $OBJECTIVE_C = yes; then
  GNOME_INIT_OBJC
fi
GNOME_CHECK_GUILE

GNOMETALK=""
AC_CHECK_HEADER(protocol/talkd.h,GNOMETALK=gnometalk)
AC_SUBST(GNOMETALK)

dnl Checks for gnome-sync.
AC_CHECK_HEADER(limits.h)
AC_C_BIGENDIAN
dnl the SleepyCat db2 library has a compatibility header for db 1.85.
AC_CHECK_HEADERS(db_185.h db.h)
AC_CHECK_TYPE(umode_t, mode_t)

dnl Checks for gnome-ppp
AC_CHECK_HEADERS(socketbits.h)

dnl
dnl Gnome Talk and Gnome PPP
dnl
ZVT_LIBS=`$GNOME_CONFIG --libs zvt`
AC_SUBST(ZVT_LIBS)

dnl
dnl Gnome PPP Applet
dnl
#Broken:
#AC_CHECK_HEADERS(applet-widget.h)
AC_DEFINE(HAVE_APPLET_WIDGET_H)
GNOME_APPLETS_LIBS=`$GNOME_CONFIG --libs applets`
AC_SUBST(GNOME_APPLETS_LIBS)

ALL_LINGUAS="de es fr ga it ko no pt ru"
AM_GNOME_GETTEXT
AC_CHECK_LIB(pthread, pthread_create, PTHREAD_LIB="-lpthread")

AC_SUBST(CFLAGS)
AC_SUBST(CPPFLAGS)
AC_SUBST(LDFLAGS)

AC_OUTPUT([
Makefile
gnome-network.spec
po/Makefile.in
macros/Makefile
network-utilities/Makefile
girc/Makefile
sync/Makefile
gmailman/Makefile
gnome-ppp/Makefile
gnome-ppp/C/Makefile
gnome-ppp/libgnome_ppp/Makefile
gnome-ppp/gnome-ppp-chat/Makefile
gnome-ppp/gnome-ppp-cmd/Makefile
gnome-ppp/gnome-ppp-applet/Makefile
gnome-ppp/gnome-ppp-applet/images/Makefile
gnometalk/Makefile
comlink/Makefile
comlink/gui/Makefile
comlink/gui/pixmaps/Makefile])
