dnl
dnl Process this file with autoconf to produce a configure script.
-AC_INIT
-AC_PREREQ(2.53)
-AC_CONFIG_AUX_DIR(cfgaux)
-AM_INIT_AUTOMAKE(setup, 0)
+AC_INIT([setup], [0], [cygwin-apps@cygwin.com])
+AC_PREREQ(2.60)
+AC_CONFIG_AUX_DIR([cfgaux])
+AM_INIT_AUTOMAKE([dist-bzip2 subdir-objects 1.9 foreign no-define -Wall -Wno-portability])
dnl AM_CONFIG_HEADER(include/autoconf.h)
AM_MAINTAINER_MODE
AC_CONFIG_SRCDIR([Makefile.in])
AC_REVISION($Revision$)dnl
+AC_MSG_CHECKING([Whether to build inilint])
+AC_ARG_ENABLE(inilint,
+ AC_HELP_STRING([--enable-inilint],
+ [Build the inilint tool]),
+ ac_cv_enable_inilint=$enableval, ac_cv_enable_inilint=no)
+AC_MSG_RESULT([$ac_cv_enable_inilint])
+if test $ac_cv_enable_inilint = yes; then
+ INILINT="inilint\$(EXEEXT)"
+else
+ INILINT=
+fi
+AC_SUBST(INILINT)
+
AC_LANG_CPLUSPLUS
AC_PROG_CXX
AM_PROG_CC_C_O
AC_CHECK_LIB(mingw32,main)
-AC_CHECK_HEADERS(alloca.h, \
- errno.h, \
+AC_CHECK_HEADERS(alloca.h \
+ errno.h \
string \
- string.h)
+ string.h )
+
+dnl override configure of sub-libraries
+ac_cv_path_GPG_ERROR_CONFIG="${ac_abs_confdir}/gpg-error-config-fake --dir=$ac_pwd"
+
+AC_CONFIG_SUBDIRS(libgetopt++ libgpg-error libgcrypt)
-AC_CONFIG_SUBDIRS(zlib)
-AC_CONFIG_SUBDIRS(bz2lib)
-AC_CONFIG_SUBDIRS(libgetopt++)
+dnl add portability sources to inilint
+case "$host_os" in
+mingw32)
+ AM_CONDITIONAL(MINGWTARGET, true)
+ ;;
+*)
+ AM_CONDITIONAL(MINGWTARGET, false)
+ ;;
+esac
-AC_CONFIG_FILES([Makefile])
+AC_CONFIG_FILES([Makefile tests/Makefile])
AC_OUTPUT