1 | # -*- Autoconf -*-
|
---|
2 | # Process this file with autoconf to produce a configure script.
|
---|
3 | #
|
---|
4 | # Compile with debug symbols:
|
---|
5 | # CFLAGS="-ggdb -pedandic -O0" ./configure
|
---|
6 | # CFLAGS="-ggdb -Wall -Wextra -pedantic -O0" ./configure
|
---|
7 | #
|
---|
8 | # Verbose output can be enabled with
|
---|
9 | # "./configure --disable-silent-rules" or "make V=1"
|
---|
10 | #
|
---|
11 |
|
---|
12 | AC_PREREQ(2.61)
|
---|
13 | AC_INIT(libedit, [EL_RELEASE],, libedit-[EL_TIMESTAMP])
|
---|
14 | AC_CONFIG_SRCDIR([src/strlcat.c])
|
---|
15 | AC_CONFIG_HEADER([config.h])
|
---|
16 |
|
---|
17 | # features of Posix that are extensions to C (define _GNU_SOURCE)
|
---|
18 | AC_USE_SYSTEM_EXTENSIONS
|
---|
19 |
|
---|
20 | AM_INIT_AUTOMAKE
|
---|
21 | AC_PROG_LIBTOOL
|
---|
22 |
|
---|
23 | # libtool -version-info
|
---|
24 | AC_SUBST(LT_VERSION, [0:36:0])
|
---|
25 |
|
---|
26 | m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
|
---|
27 |
|
---|
28 | # Checks for programs.
|
---|
29 | AC_PROG_CC_C99
|
---|
30 | #AC_PROG_CC
|
---|
31 | AC_PROG_LN_S
|
---|
32 | AC_PROG_AWK
|
---|
33 | EL_MANTYPE
|
---|
34 |
|
---|
35 |
|
---|
36 | AC_CHECK_LIB(curses, tgetent,,
|
---|
37 | [AC_CHECK_LIB(ncurses, tgetent,,
|
---|
38 | [AC_MSG_ERROR([libcurses or libncurses are required!])] )] )
|
---|
39 |
|
---|
40 |
|
---|
41 | ### use option --enable-widec to turn on use of wide-character support
|
---|
42 | EL_ENABLE_WIDEC
|
---|
43 |
|
---|
44 | # Checks for header files.
|
---|
45 | AC_FUNC_ALLOCA
|
---|
46 | AC_HEADER_DIRENT
|
---|
47 | AC_HEADER_STDC
|
---|
48 | AC_HEADER_SYS_WAIT
|
---|
49 | AC_CHECK_HEADERS([fcntl.h limits.h malloc.h stdlib.h string.h sys/ioctl.h sys/param.h unistd.h curses.h ncurses.h sys/cdefs.h])
|
---|
50 |
|
---|
51 | AC_CHECK_HEADER([termios.h], [], [AC_MSG_ERROR([termios.h is required!])],[])
|
---|
52 |
|
---|
53 | ## include curses.h to prevent "Present But Cannot Be Compiled"
|
---|
54 | AC_CHECK_HEADERS([term.h],,,
|
---|
55 | [[#if HAVE_CURSES_H
|
---|
56 | # include <curses.h>
|
---|
57 | #elif HAVE_NCURSES_H
|
---|
58 | # include <ncurses.h>
|
---|
59 | #endif
|
---|
60 | ]])
|
---|
61 |
|
---|
62 | # Checks for typedefs, structures, and compiler characteristics.
|
---|
63 | AC_C_CONST
|
---|
64 | AC_TYPE_PID_T
|
---|
65 | AC_TYPE_SIZE_T
|
---|
66 | AC_CHECK_TYPES([u_int32_t])
|
---|
67 |
|
---|
68 | # Checks for library functions.
|
---|
69 | AC_FUNC_CLOSEDIR_VOID
|
---|
70 | AC_FUNC_FORK
|
---|
71 | AC_PROG_GCC_TRADITIONAL
|
---|
72 | ## _AIX is offended by rpl_malloc and rpl_realloc
|
---|
73 | #AC_FUNC_MALLOC
|
---|
74 | #AC_FUNC_REALLOC
|
---|
75 | AC_TYPE_SIGNAL
|
---|
76 | AC_FUNC_STAT
|
---|
77 | AC_CHECK_FUNCS([endpwent isascii memchr memset re_comp regcomp strcasecmp strchr strcspn strdup strerror strrchr strstr strtol issetugid wcsdup])
|
---|
78 | EL_GETPW_R_POSIX
|
---|
79 | EL_GETPW_R_DRAFT
|
---|
80 |
|
---|
81 |
|
---|
82 | AH_BOTTOM([
|
---|
83 | #include "sys.h"
|
---|
84 | #define SCCSID
|
---|
85 | #undef LIBC_SCCS
|
---|
86 | #define lint
|
---|
87 | ])
|
---|
88 |
|
---|
89 | AC_CONFIG_FILES([Makefile
|
---|
90 | src/Makefile
|
---|
91 | ])
|
---|
92 | AC_OUTPUT
|
---|