1 | dnl Process this file with autoconf to produce a configure script. |
---|
2 | dnl $Id: configure.ac,v 1.1.1.1 2002-06-05 22:17:44 zacheiss Exp $ |
---|
3 | dnl |
---|
4 | AC_PREREQ(2.52)dnl Minimum Autoconf version required. |
---|
5 | dnl |
---|
6 | AC_INIT([GNU Texinfo], [4.2]) |
---|
7 | AC_CONFIG_SRCDIR([makeinfo/makeinfo.c]) |
---|
8 | AM_CONFIG_HEADER(config.h:config.in)dnl Keep filename to 8.3 for MS-DOS. |
---|
9 | AM_INIT_AUTOMAKE |
---|
10 | dnl |
---|
11 | AM_CONDITIONAL(TEXINFO_MAINT, test -n "$TEXINFO_MAINT") |
---|
12 | |
---|
13 | dnl Checks for programs. |
---|
14 | AC_PROG_CC |
---|
15 | AC_PROG_GCC_TRADITIONAL |
---|
16 | AC_PROG_INSTALL |
---|
17 | AC_PROG_RANLIB |
---|
18 | |
---|
19 | AC_ISC_POSIX |
---|
20 | AC_MINIX |
---|
21 | |
---|
22 | # Needed on sysV68 for sigblock, sigsetmask. But check for it in libc first. |
---|
23 | AC_CHECK_FUNC(sigblock, , AC_CHECK_LIB(bsd, sigblock)) |
---|
24 | |
---|
25 | dnl Checks for header files. |
---|
26 | dnl Do not use <ncurses/termcap.h> unless we're linking with ncurses. |
---|
27 | if test "x$termlib" = xncurses; then |
---|
28 | dnl Use AC_CHECK_HEADERS so the HAVE_*_H symbol gets defined. |
---|
29 | AC_CHECK_HEADERS(ncurses/termcap.h) |
---|
30 | fi |
---|
31 | AC_HEADER_STAT |
---|
32 | AC_HEADER_STDC |
---|
33 | AC_CHECK_HEADERS(fcntl.h io.h limits.h pwd.h string.h strings.h \ |
---|
34 | termcap.h termio.h termios.h unistd.h \ |
---|
35 | sys/fcntl.h sys/file.h sys/ptem.h sys/time.h sys/ttold.h sys/wait.h) |
---|
36 | AC_SYS_POSIX_TERMIOS |
---|
37 | AC_HEADER_TIOCGWINSZ |
---|
38 | |
---|
39 | dnl Checks for typedefs, structures, and compiler characteristics. |
---|
40 | AC_TYPE_OFF_T |
---|
41 | AC_TYPE_SIGNAL |
---|
42 | AC_C_CONST |
---|
43 | AC_STRUCT_TM |
---|
44 | |
---|
45 | dnl Checks for function declarations. |
---|
46 | txi_CHECK_DECLS |
---|
47 | |
---|
48 | dnl Checks for library functions. |
---|
49 | AC_FUNC_ALLOCA |
---|
50 | AC_FUNC_STRCOLL |
---|
51 | AC_FUNC_VPRINTF |
---|
52 | dnl in theory only pre-sysvr3 systems needed this and it's not likely |
---|
53 | dnl that anyone compiling new texinfo still has such a thing? we'll see. |
---|
54 | dnl AC_FUNC_SETVBUF_REVERSED |
---|
55 | AC_CHECK_FUNCS(setvbuf getcwd memset bzero strchr sigprocmask sigsetmask) |
---|
56 | dnl strerror, xmalloc, xrealloc, probably others should be added. |
---|
57 | AC_REPLACE_FUNCS(memcpy memmove strdup strcasecmp strerror strncasecmp) |
---|
58 | |
---|
59 | dnl We want to recognize djgpp to avoid the useless warning about no |
---|
60 | dnl term library. |
---|
61 | AC_CANONICAL_BUILD |
---|
62 | |
---|
63 | # Some GNU/Linux systems (e.g., SuSE 4.3, 1996) don't have curses, but |
---|
64 | # rather ncurses. So we check for it. |
---|
65 | TERMLIBS= |
---|
66 | # Check for termlib before termcap because Solaris termcap needs libucb. |
---|
67 | TERMLIB_VARIANTS="ncurses curses termlib termcap terminfo" |
---|
68 | for termlib in ${TERMLIB_VARIANTS}; do |
---|
69 | AC_CHECK_LIB(${termlib}, tgetent, |
---|
70 | [TERMLIBS="${TERMLIBS} -l${termlib}"; break]) |
---|
71 | done |
---|
72 | # don't bother warning on djgpp, it doesn't have a term library, it |
---|
73 | # ports each termcap-needing program separately according to its needs. |
---|
74 | if test -z "$TERMLIBS" && echo "$build" | grep -v djgpp >/dev/null; then |
---|
75 | AC_MSG_WARN([probably need a terminal library, one of: ${TERMLIB_VARIANTS}]) |
---|
76 | fi |
---|
77 | |
---|
78 | dnl Checks for variables. |
---|
79 | # HP-UX 9 (at least) needs -lncurses which defines termcap variables PC etc. |
---|
80 | AC_MSG_CHECKING(for library with termcap variables) |
---|
81 | AC_CACHE_VAL(ac_cv_var_ospeed, |
---|
82 | oldLIBS=$LIBS |
---|
83 | for trylib in $termlib ${TERMLIB_VARIANTS}; do |
---|
84 | if test "x$trylib" != "x$termlib"; then |
---|
85 | LIBS="$oldLIBS -l$termlib -l$trylib" |
---|
86 | else |
---|
87 | LIBS="$oldLIBS -l$termlib" |
---|
88 | fi |
---|
89 | AC_TRY_LINK(, |
---|
90 | #ifdef HAVE_NCURSES_TERMCAP_H |
---|
91 | #include <ncurses/termcap.h> |
---|
92 | #else |
---|
93 | #ifdef HAVE_TERMCAP_H |
---|
94 | #include <termcap.h> |
---|
95 | #else |
---|
96 | #undef PC |
---|
97 | char *BC; |
---|
98 | char **UP; |
---|
99 | char PC; |
---|
100 | short ospeed; |
---|
101 | #endif |
---|
102 | #endif |
---|
103 | /* Make sure all variables actually exist. AIX 4.3 has ospeed but no BC. |
---|
104 | --Andreas Ley <andy@rz.uni-karlsruhe.de>, 24 Aug 2000. */ |
---|
105 | BC++; |
---|
106 | UP++ |
---|
107 | PC++; |
---|
108 | return ospeed != 0; |
---|
109 | , ac_cv_var_ospeed=$trylib; break) |
---|
110 | done |
---|
111 | LIBS=$oldLIBS |
---|
112 | ) |
---|
113 | AC_MSG_RESULT($ac_cv_var_ospeed) |
---|
114 | if test -n "$ac_cv_var_ospeed" \ |
---|
115 | && test "x$termlib" != "x$ac_cv_var_ospeed"; then |
---|
116 | TERMLIBS="${TERMLIBS} -l${ac_cv_var_ospeed}" |
---|
117 | fi |
---|
118 | AC_SUBST(TERMLIBS)dnl |
---|
119 | |
---|
120 | dnl i18n support. |
---|
121 | AM_GNU_GETTEXT() |
---|
122 | |
---|
123 | AC_CONFIG_FILES([Makefile \ |
---|
124 | doc/Makefile \ |
---|
125 | info/Makefile \ |
---|
126 | intl/Makefile \ |
---|
127 | lib/Makefile \ |
---|
128 | m4/Makefile \ |
---|
129 | makeinfo/Makefile \ |
---|
130 | makeinfo/tests/Makefile \ |
---|
131 | po/Makefile.in \ |
---|
132 | util/Makefile \ |
---|
133 | ]) |
---|
134 | AC_OUTPUT |
---|