dnl configure.in modified by INOUE Seiichiro<inoue@ainet.or.jp>
dnl Process this file with autoconf to produce a configure script.

AC_INIT(src/main.c)
AM_CONFIG_HEADER(config.h)
AM_INIT_AUTOMAKE(gtkdiff, 1.0.2)

AM_MAINTAINER_MODE

AM_ACLOCAL_INCLUDE(macros)

GNOME_INIT

dnl Checks for programs.
AC_ISC_POSIX
AC_PROG_CC
#AC_PROG_CC_WORKS

GNOME_COMPILE_WARNINGS
GNOME_X_CHECKS

dnl Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS(string.h,, [
AC_CHECK_HEADERS(strings.h,,)])
AC_CHECK_HEADERS(errno.h,, [
AC_CHECK_HEADERS(sys/errno.h,,)])

dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_C_INLINE

dnl Checks for library functions.
AC_FUNC_MMAP
AC_CHECK_FUNCS(strsep,, [
AC_CHECK_FUNCS(strtok_r,,)])

dnl Checks for commands.
AC_PATH_PROGS(DIFF, diff, :)
if test $DIFF = ":"; then
	AC_MSG_ERROR(Test for diff failed. Please install diff program.)
else
	AC_DEFINE_UNQUOTED(DIFF_PATH, "${DIFF}")
fi

AC_PATH_PROGS(CO, co)
AC_PATH_PROGS(RM, rm)
AC_PATH_PROGS(TR, tr)


#ALL_LINGUAS="de es fi fr hu it ko cs no ga pt sv ja ru"
ALL_LINGUAS="es fr ja"
AM_GNOME_GETTEXT

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

AC_OUTPUT([
gtkdiff.1
gtkdiff.spec
Makefile
intl/Makefile
po/Makefile.in
macros/Makefile
script/gtkdiff-rcs
script/Makefile
src/Makefile])
