libtommath: Fix possible integer overflow CVE-2023-36328
[heimdal.git] / lib / libedit / configure.ac
blobb94bafc6b9ea611c67f6be06ed0249a862842d69
1 #                                               -*- Autoconf -*-
2 # Process this file with autoconf to produce a configure script.
4 # Compile with debug symbols:
5 #    CFLAGS="-ggdb -pedandic -O0" ./configure
6 #    CFLAGS="-ggdb -Wall -Wextra -pedantic -O0" ./configure
8 # Verbose output can be enabled with
9 #    "./configure --disable-silent-rules" or "make V=1"
12 AC_PREREQ(2.61)
13 AC_INIT(libedit, [EL_RELEASE],, libedit-[EL_TIMESTAMP])
14 AC_CONFIG_SRCDIR([src/el.c])
15 AC_CONFIG_HEADER([config.h])
17 # features of Posix that are extensions to C (define _GNU_SOURCE)
18 AC_USE_SYSTEM_EXTENSIONS
20 AM_INIT_AUTOMAKE
21 AM_MAINTAINER_MODE
22 AC_PROG_LIBTOOL
24 # libtool -version-info
25 AC_SUBST(LT_VERSION, [0:36:0])
27 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
29 # Checks for programs.
30 AC_PROG_CC_C99
31 #AC_PROG_CC
32 AC_PROG_LN_S
33 AC_PROG_AWK
34 EL_MANTYPE
37 AC_CHECK_LIB(curses, tgetent,,
38    [AC_CHECK_LIB(ncurses, tgetent,,
39       [AC_CHECK_LIB(tinfo, tgetent,,
40          [AC_MSG_ERROR([libcurses, libncurses, or tinfo are required!])] )] )] )
43 # Checks for header files.
44 AC_HEADER_DIRENT
45 AC_HEADER_STDC
46 AC_HEADER_SYS_WAIT
47 AC_CHECK_HEADERS([fcntl.h limits.h stdint.h stdlib.h string.h sys/ioctl.h sys/param.h unistd.h curses.h ncurses.h sys/cdefs.h])
49 AC_CHECK_HEADER([termios.h], [], [AC_MSG_ERROR([termios.h is required!])],[])
51 ## include curses.h to prevent "Present But Cannot Be Compiled"
52 AC_CHECK_HEADERS([term.h],,,
53 [[#if HAVE_CURSES_H
54 # include <curses.h>
55 #elif HAVE_NCURSES_H
56 # include <ncurses.h>
57 #endif
58 ]])
60 # Checks for typedefs, structures, and compiler characteristics.
61 AC_C_CONST
62 AC_TYPE_PID_T
63 AC_TYPE_SIZE_T
64 AC_CHECK_TYPES([u_int32_t])
66 AC_TRY_COMPILE([
67 #include <limits.h>
68 #include <stddef.h>
69 #if HAVE_STDINT_H
70 # include <stdint.h>
71 #endif
73 [size_t x = SIZE_MAX;],
74 [have_size_max=yes],
75 [have_size_max=no])
76 if test "$have_size_max" = yes; then
77     AC_DEFINE([HAVE_SIZE_MAX], [1],
78               [Define to 1 if if your system has SIZE_MAX])
81 # Checks for library functions.
82 AC_FUNC_FORK
83 AC_PROG_GCC_TRADITIONAL
84 ## _AIX is offended by rpl_malloc and rpl_realloc
85 #AC_FUNC_MALLOC
86 #AC_FUNC_REALLOC
87 AC_TYPE_SIGNAL
88 AC_FUNC_STAT
89 AC_CHECK_FUNCS([getline isascii issetugid wcsdup])
90 EL_GETPW_R_POSIX
91 EL_GETPW_R_DRAFT
93 AC_CHECK_MEMBER(struct dirent.d_namlen,
94 AC_DEFINE([HAVE_STRUCT_DIRENT_D_NAMLEN],[1],
95 [Define to 1 if struct dirent has member d_namlen]),,
96 [#if HAVE_DIRENT_H
97 #include <dirent.h>
98 #endif
101 AH_BOTTOM([
102 #include "sys.h"
103 #define SCCSID
104 #undef LIBC_SCCS
105 #define lint
108 AC_CONFIG_FILES([Makefile
109                  src/Makefile
111 AC_OUTPUT