source: trunk/third/texinfo/configure.ac @ 17660

Revision 17660, 3.9 KB checked in by zacheiss, 23 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r17659, which included commits to RCS files with non-trunk default branches.
Line 
1dnl Process this file with autoconf to produce a configure script.
2dnl $Id: configure.ac,v 1.1.1.1 2002-06-05 22:17:44 zacheiss Exp $
3dnl
4AC_PREREQ(2.52)dnl Minimum Autoconf version required.
5dnl
6AC_INIT([GNU Texinfo], [4.2])
7AC_CONFIG_SRCDIR([makeinfo/makeinfo.c])
8AM_CONFIG_HEADER(config.h:config.in)dnl Keep filename to 8.3 for MS-DOS.
9AM_INIT_AUTOMAKE
10dnl
11AM_CONDITIONAL(TEXINFO_MAINT, test -n "$TEXINFO_MAINT")
12
13dnl Checks for programs.
14AC_PROG_CC
15AC_PROG_GCC_TRADITIONAL
16AC_PROG_INSTALL
17AC_PROG_RANLIB
18
19AC_ISC_POSIX
20AC_MINIX
21
22# Needed on sysV68 for sigblock, sigsetmask.  But check for it in libc first.
23AC_CHECK_FUNC(sigblock, , AC_CHECK_LIB(bsd, sigblock))
24
25dnl Checks for header files.
26dnl Do not use <ncurses/termcap.h> unless we're linking with ncurses.
27if 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)
30fi
31AC_HEADER_STAT
32AC_HEADER_STDC
33AC_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)
36AC_SYS_POSIX_TERMIOS
37AC_HEADER_TIOCGWINSZ
38
39dnl Checks for typedefs, structures, and compiler characteristics.
40AC_TYPE_OFF_T
41AC_TYPE_SIGNAL
42AC_C_CONST
43AC_STRUCT_TM
44
45dnl Checks for function declarations.
46txi_CHECK_DECLS
47
48dnl Checks for library functions.
49AC_FUNC_ALLOCA
50AC_FUNC_STRCOLL
51AC_FUNC_VPRINTF
52dnl in theory only pre-sysvr3 systems needed this and it's not likely
53dnl that anyone compiling new texinfo still has such a thing? we'll see.
54dnl AC_FUNC_SETVBUF_REVERSED
55AC_CHECK_FUNCS(setvbuf getcwd memset bzero strchr sigprocmask sigsetmask)
56dnl strerror, xmalloc, xrealloc, probably others should be added.
57AC_REPLACE_FUNCS(memcpy memmove strdup strcasecmp strerror strncasecmp)
58
59dnl We want to recognize djgpp to avoid the useless warning about no
60dnl term library.
61AC_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.
65TERMLIBS=
66# Check for termlib before termcap because Solaris termcap needs libucb.
67TERMLIB_VARIANTS="ncurses curses termlib termcap terminfo"
68for termlib in ${TERMLIB_VARIANTS}; do
69  AC_CHECK_LIB(${termlib}, tgetent,
70     [TERMLIBS="${TERMLIBS} -l${termlib}"; break])
71done
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.
74if test -z "$TERMLIBS" && echo "$build" | grep -v djgpp >/dev/null; then
75  AC_MSG_WARN([probably need a terminal library, one of: ${TERMLIB_VARIANTS}])
76fi
77
78dnl Checks for variables.
79# HP-UX 9 (at least) needs -lncurses which defines termcap variables PC etc.
80AC_MSG_CHECKING(for library with termcap variables)
81AC_CACHE_VAL(ac_cv_var_ospeed,
82oldLIBS=$LIBS
83for 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
97char *BC;
98char **UP;
99char PC;     
100short 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.  */
105BC++;
106UP++
107PC++;
108return ospeed != 0;
109, ac_cv_var_ospeed=$trylib; break)
110done
111LIBS=$oldLIBS
112)
113AC_MSG_RESULT($ac_cv_var_ospeed)
114if test -n "$ac_cv_var_ospeed" \
115   && test "x$termlib" != "x$ac_cv_var_ospeed"; then
116  TERMLIBS="${TERMLIBS} -l${ac_cv_var_ospeed}"
117fi
118AC_SUBST(TERMLIBS)dnl
119
120dnl i18n support.
121AM_GNU_GETTEXT()
122
123AC_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           ])
134AC_OUTPUT
Note: See TracBrowser for help on using the repository browser.