#                                               -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.57])
AC_INIT([sysarch],[2.2.13],[opticsoft@head.cfa.harvard.edu],[sysarch])
AC_CONFIG_SRCDIR([sysarch/sysarch.in])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_AUX_DIR([build-aux])
AM_INIT_AUTOMAKE([ check-news subdir-objects silent-rules color-tests parallel-tests ])

# Checks for programs.
AC_PATH_PROG(PERL,perl)
AC_CHECK_PROG([POD2USAGE],[pod2usage],[yes],[no])
AC_PROG_INSTALL
AC_PROG_SED
AC_PROG_LN_S

AS_IF([test $POD2USAGE = no],
      [AC_MSG_ERROR("pod2usage is required; please install; Aborting.")]
)

MST_DOSUBST

MST_AM_INIT
MST_PERL_LIBDIR
MST_POD_GEN_DOCS

# Checks for library functions.
AC_CONFIG_FILES([Makefile])

MST_TESTDEP_SETUP
MST_PROG_TESTSHELL
PKG_CHECK_MODULES([testlib_sh],[testlib_sh],[],
	[MST_TESTDEP_FLAG([no],[testlib_sh not found])])
MST_TESTDEP_STATUS

AC_CONFIG_FILES(tests/hosts, [chmod +x tests/hosts] )
AC_CONFIG_FILES(tests/pathsubst, [chmod +x tests/pathsubst] )
AC_CONFIG_FILES(tests/sysarch_pm, [chmod +x tests/sysarch_pm] )

AC_OUTPUT

