#                                               -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.

AC_REVISION($Revision$)

AC_PREREQ(2.61)
AC_INIT(imvirt, 0.9.6, liske@ibh.de)
AM_INIT_AUTOMAKE
AC_CONFIG_SRCDIR([helper/detect.c])
AC_CONFIG_HEADER([helper/config.h])

# Checks for programs.
AC_PROG_CC

# Checks for libraries.

# Checks for header files.
AC_HEADER_STDC
AC_HEADER_SYS_WAIT
AC_CHECK_HEADERS([stdint.h stdlib.h string.h unistd.h])

# Checks for typedefs, structures, and compiler characteristics.
AC_TYPE_PID_T
AC_TYPE_UINT16_T
AC_TYPE_UINT32_T

# Checks for library functions.
AC_FUNC_FORK
AC_TYPE_SIGNAL

# Check architecture
AC_MSG_CHECKING(x86 platform)
case `uname -m` in
    x86_64) x86arch=true ;;
    i686) x86arch=true ;;
    *) x86arch=false ;;
esac
AC_MSG_RESULT($x86arch)
AM_CONDITIONAL([X86ARCH], [test x$x86arch = xtrue ])

MYDIR=$libexecdir
AC_SUBST(MYDIR)

AC_CONFIG_FILES([
Makefile
dist/Makefile
helper/Makefile
man/Makefile
imvirt.spec
perl/lib/ImVirt.pm
])

AC_OUTPUT
