clean up spec file for packaging
[profile/ivi/libedit.git] / configure.ac
1 #                                               -*- Autoconf -*-
2 # Process this file with autoconf to produce a configure script.
3
4 AC_INIT(libedit, [EL_RELEASE],, libedit-[EL_TIMESTAMP_CVSEXPORT])
5 AC_CONFIG_SRCDIR([src/strlcat.c])
6 AC_CONFIG_HEADER([config.h])
7
8 AM_INIT_AUTOMAKE
9 AC_PROG_LIBTOOL
10
11 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
12
13 # libtool -version-info
14 AC_SUBST(LT_VERSION, [0:34:0])
15
16 # Checks for programs.
17 AC_PROG_CXX
18 AC_PROG_CC
19 AC_PROG_LN_S
20 AC_PROG_AWK
21 EL_MANTYPE
22
23 AC_CHECK_LIB(curses, tgetent,,
24    [AC_CHECK_LIB(ncurses, tgetent,,
25       [AC_MSG_ERROR([libtermcap, libcurses or libncurses are required!])] )] )
26
27 # Checks for header files.
28 AC_FUNC_ALLOCA
29 AC_HEADER_DIRENT
30 AC_HEADER_STDC
31 AC_HEADER_SYS_WAIT
32 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])
33
34 AC_CHECK_HEADER([termios.h], [], [AC_MSG_ERROR([termios.h is required!])],[])
35
36 ## include curses.h to prevent "Present But Cannot Be Compiled"
37 AC_CHECK_HEADERS([term.h],,,
38 [[#if HAVE_CURSES_H
39 # include <curses.h>
40 #elif HAVE_NCURSES_H
41 # include <ncurses.h>
42 #endif
43 ]])
44
45 # Checks for typedefs, structures, and compiler characteristics.
46 AC_C_CONST
47 AC_TYPE_PID_T
48 AC_TYPE_SIZE_T
49 AC_CHECK_TYPES([u_int32_t])
50
51 # Checks for library functions.
52 AC_FUNC_CLOSEDIR_VOID
53 AC_FUNC_FORK
54 AC_PROG_GCC_TRADITIONAL
55 ## _AIX is offended by rpl_malloc and rpl_realloc
56 #AC_FUNC_MALLOC
57 #AC_FUNC_REALLOC
58 AC_TYPE_SIGNAL
59 AC_FUNC_STAT
60 AC_CHECK_FUNCS([endpwent isascii memchr memset re_comp regcomp strcasecmp strchr strcspn strdup strerror strrchr strstr strtol issetugid])
61 EL_GETPW_R_POSIX
62 EL_GETPW_R_DRAFT
63
64 AH_BOTTOM([
65 #include <sys.h>
66 #define SCCSID
67 #undef LIBC_SCCS
68 ])
69
70 AC_CONFIG_FILES([Makefile
71                  libedit.pc
72                  src/Makefile
73                  doc/Makefile
74                  examples/Makefile])
75 AC_OUTPUT