# Process this file with autoconf to produce a configure script.
AC_INIT(obgnome)

cflags_set=${CFLAGS+set}

OBGNOME_MAJOR_VERSION=1
OBGNOME_MINOR_VERSION=0
OBGNOME_MICRO_VERSION=1
OBGNOME_VERSION=$OBGNOME_MAJOR_VERSION.$OBGNOME_MINOR_VERSION.$OBGNOME_MICRO_VERSION
AC_SUBST(OBGNOME_VERSION)
VERSION=$OBGNOME_VERSION
PACKAGE=gnome-objc

AM_INIT_AUTOMAKE($PACKAGE, $VERSION, no-define)

AM_CONFIG_HEADER(config.h)
AC_DEFINE_UNQUOTED(OBGNOME_MAJOR_VERSION, $OBGNOME_MAJOR_VERSION)
AC_DEFINE_UNQUOTED(OBGNOME_MINOR_VERSION, $OBGNOME_MINOR_VERSION)
AC_DEFINE_UNQUOTED(OBGNOME_MICRO_VERSION, $OBGNOME_MICRO_VERSION)

dnl Initialize libtool
AM_PROG_LIBTOOL

dnl Initialize maintainer mode
AM_MAINTAINER_MODE

AC_CANONICAL_HOST

AM_ACLOCAL_INCLUDE(macros)
GNOME_INIT

AC_ISC_POSIX
AC_PROG_CC
AC_PROG_CPP
AC_STDC_HEADERS
AC_ARG_PROGRAM
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_MAKE_SET

ALL_LINGUAS="es fr it no pt ru"

AM_GNOME_GETTEXT

OBGNOME_LIBDIR='-L$(libdir) '"$GNOME_LIBDIR"
echo "GNOME_INCLUDEDIR is $GNOME_INCLUDEDIR"
OBGNOME_INCLUDEDIR='-I$(includedir) '"$GNOME_INCLUDEDIR"
OBGTK_LIBS="-lobgtk"
OBGNOME_LIBS="-lobgnome $OBGTK_LIBS"
AC_SUBST(OBGNOME_LIBS)
AC_SUBST(OBGTK_LIBS)
AC_SUBST(OBGNOME_LIBDIR)
AC_SUBST(OBGNOME_INCLUDEDIR)
GNOME_X_CHECKS
GNOME_CHECK_OBJC

AC_CONFIG_SUBDIRS(obgtk)

if test "x$OBJECTIVE_C" != xyes; then
	AC_MSG_ERROR(Objective C compiler required but not found)
fi

AC_OUTPUT([
gnome-objc.spec
Makefile
obgnome-config
po/Makefile.in
macros/Makefile
obgnome/Makefile
],[chmod +x obgnome-config])
