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
|
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.61)
AC_INIT
# Install prefix
AC_PREFIX_DEFAULT(/usr/local)
# Checks for programs.
AC_PROG_CC
# Checks for header files.
AC_HEADER_DIRENT
AC_HEADER_STDC
AC_CHECK_HEADERS([stdlib.h string.h])
# Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_TYPE_SIZE_T
# Check for functions
AC_CHECK_FUNCS([strdup strtol])
# Macros
CFLAGS="$CFLAGS -Wall"
AC_ARG_ENABLE([debug],
[AC_HELP_STRING([--enable-debug], [Enable debugging output])],
[CFLAGS="$CFLAGS -g3 -DDEBUG"],
[CFLAGS="$CFLAGS -O3"])
AC_SUBST(CFLAGS)
AC_FUNC_CLOSEDIR_VOID
AC_FUNC_MALLOC
AC_FUNC_MEMCMP
AC_FUNC_REALLOC
AC_CHECK_FUNCS([memset mkdir strchr strrchr strstr])
AC_CONFIG_FILES([Makefile])
AC_OUTPUT
|