1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65
|
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.61)
AC_INIT(hexec, 0.2.1, ablock at blocksoftware.net)
AM_INIT_AUTOMAKE
AC_CONFIG_SRCDIR([common/args.c])
AM_CONFIG_HEADER([config.h])
if test "x$prefix" = "xNONE"; then
prefix="/usr/local"
fi
# Checks for programs.
AC_PROG_INSTALL
AC_PROG_CC
AC_PROG_CPP
AC_PROG_CXX
AM_PROG_CC_C_O
AC_PROG_LN_S
AC_PROG_YACC
AC_PROG_MAKE_SET
AC_PROG_RANLIB
AC_PROG_LIBTOOL
AC_CHECK_PROG([YODL2MAN], [yodl2man], 1)
#if test "" = "${YODL2MAN}"; then
# AC_MSG_ERROR([You need yodl2man to build the man pages])
#fi
# Checks for libraries.
AC_CHECK_LIB([c], [main])
AC_CHECK_LIB([dl], [dlsym])
AC_CHECK_LIB([rt], [main])
# Checks for header files.
AC_FUNC_ALLOCA
AC_HEADER_STDC
AC_HEADER_SYS_WAIT
AC_CHECK_HEADERS([fcntl.h stdlib.h string.h unistd.h libintl.h malloc.h stddef.h libgen.h ctype.h])
# Checks for typedefs, structures, and compiler characteristics.
AC_HEADER_STDBOOL
AC_C_CONST
AC_TYPE_SIZE_T
# Checks for library functions.
AC_REPLACE_FNMATCH
AC_FUNC_FORK
AC_FUNC_MALLOC
AC_FUNC_MMAP
AC_FUNC_REALLOC
AC_CHECK_FUNCS([ftruncate memmove memset munmap setenv strchr strdup strstr basename tolower])
# Config defines
AH_TEMPLATE([HEXEC_LIBDIR])
hexec_libdir="$prefix/lib/hexec"
AC_DEFINE_UNQUOTED(HEXEC_LIBDIR, "$hexec_libdir")
AC_CONFIG_FILES([Makefile
hexec/Makefile
common/Makefile
hook/Makefile])
AC_OUTPUT
|