1
dnl Process this file with autoconf to produce a configure script.
2
dnl $Id: configure.ac,v 1.101 2002/03/04 15:54:57 karl Exp $
1
# Process this file with autoconf to produce a configure script.
2
# $Id: configure.ac,v 1.50 2004/12/22 13:29:44 karl Exp $
4
# This file is free software; as a special exception the author gives
5
# unlimited permission to copy and/or distribute it, with or without
6
# modifications, as long as this notice is preserved.
8
# This program is distributed in the hope that it will be useful, but
9
# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
10
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
12
AC_PREREQ(2.59)# Minimum Autoconf version required.
14
AC_INIT([GNU Texinfo], [4.8])
15
AC_CONFIG_HEADERS(config.h:config.in)# Keep filename to 8.3 for MS-DOS.
5
16
AC_CONFIG_SRCDIR([makeinfo/makeinfo.c])
6
AC_PREREQ(2.52)dnl Minimum Autoconf version required.
7
AM_CONFIG_HEADER(config.h:config.in)dnl Keep filename to 8.3 for MS-DOS.
9
AM_INIT_AUTOMAKE([texinfo], [4.1])
10
AM_CONDITIONAL(TEXINFO_MAINT, test -n "$TEXINFO_MAINT")
12
dnl Checks for programs.
17
AM_INIT_AUTOMAKE([dist-bzip2])
19
# When the Texinfo source is imported into other repositories
20
# (NetBSD and TeX Live), timestamps are generally not preserved. This
21
# causes lots of annoyance, so --enable-maintainer-mode. Sorry.
24
# Checks for programs.
14
26
AC_PROG_GCC_TRADITIONAL
30
AM_MISSING_PROG(HELP2MAN, help2man)
21
35
# Needed on sysV68 for sigblock, sigsetmask. But check for it in libc first.
22
36
AC_CHECK_FUNC(sigblock, , AC_CHECK_LIB(bsd, sigblock))
24
# Some GNU/Linux systems (e.g., SuSE 4.3, 1996) don't have curses, but
25
# rather ncurses. So we check for it.
27
# Check for termlib before termcap because Solaris termcap needs libucb.
28
for termlib in ncurses curses termlib termcap terminfo; do
29
AC_CHECK_LIB(${termlib}, tgetent,
30
[TERMLIBS="${TERMLIBS} -l${termlib}"; break])
33
dnl Checks for header files.
34
dnl Do not use <ncurses/termcap.h> unless we're linking with ncurses.
35
if test "x$termlib" = xncurses; then
36
dnl Use AC_CHECK_HEADERS so the HAVE_*_H symbol gets defined.
37
AC_CHECK_HEADERS(ncurses/termcap.h)
38
# Checks for header files.
41
41
AC_CHECK_HEADERS(fcntl.h io.h limits.h pwd.h string.h strings.h \
42
42
termcap.h termio.h termios.h unistd.h \
43
sys/fcntl.h sys/file.h sys/ptem.h sys/time.h sys/ttold.h sys/wait.h)
43
sys/fcntl.h sys/file.h sys/stream.h sys/time.h sys/ttold.h sys/wait.h)
45
# sys/ptem.h requires sys/stream.h for mblk_t on Solaris.
46
AC_CHECK_HEADERS([sys/ptem.h],,,
47
[#if HAVE_SYS_STREAM_H
48
#include <sys/stream.h>
44
52
AC_SYS_POSIX_TERMIOS
45
53
AC_HEADER_TIOCGWINSZ
47
dnl Checks for typedefs, structures, and compiler characteristics.
55
# Checks for typedefs, structures, and compiler characteristics.
53
dnl Checks for function declarations.
61
# Checks for function declarations.
62
AC_CHECK_DECLS([memchr, strcoll, strerror])
56
dnl Checks for library functions.
64
# Checks for library functions.
60
dnl in theory only pre-sysvr3 systems needed this and it's not likely
61
dnl that anyone compiling new texinfo still has such a thing? we'll see.
62
dnl AC_FUNC_SETVBUF_REVERSED
63
AC_CHECK_FUNCS(setvbuf getcwd memset bzero strchr sigprocmask sigsetmask)
64
dnl strerror, xmalloc, xrealloc, probably others should be added.
65
AC_REPLACE_FUNCS(memcpy memmove strdup strcasecmp strerror strncasecmp)
67
dnl Checks for variables.
68
# in theory only pre-sysvr3 systems needed this and it's not likely
69
# that anyone compiling new texinfo still has such a thing? we'll see.
70
# AC_FUNC_SETVBUF_REVERSED
71
AC_CHECK_FUNCS(bzero getcwd memset setvbuf sigaction sigprocmask \
73
AC_REPLACE_FUNCS(memcpy memmove strdup strerror)
75
# strcasecmp and strncasecmp, gnulib-style.
78
# We want to recognize djgpp to avoid the useless warning about no
82
# We need to run some of our own binaries, most notably makedoc, but as
83
# long as we have this process, we also use our own makeinfo and
86
# This means that if we are cross compiling, we have to configure the
87
# package twice: once with the native compiler (this is done in a
88
# subdirectory $native_tools), and once with the cross compiler.
89
# The former is invoked automatically here, with --host=$build.
90
# $native_tools is also added to SUBDIRS in the main Makefile.am,
91
# so that make compiles the native tools first.
93
if test "$cross_compiling" = no; then
97
test -d "$native_tools" || mkdir "$native_tools"
98
confdir=`(cd "$srcdir";pwd)`
99
# Make sure the secondary configure won't fail with
100
# "error: source directory already configured".
102
AC_MSG_NOTICE([[Doing configure of native tools (${build}).]])
103
cd "$native_tools" || exit 1
104
# Run secondary configure in alternate environment or
105
# it gets the wrong CC etc. env -i gives this build host configure
106
# a clean environment.
107
env -i CC="${BUILD_CC}" AR="${BUILD_AR}" RANLIB="${BUILD_RANLIB}" \
110
${confdir}/configure --build=${build} --host=${build} \
111
--disable-rpath --disable-nls
113
AC_MSG_NOTICE([[Continuing with main configure (${host}).]])
115
AC_SUBST(native_tools)
116
AM_CONDITIONAL(TOOLS_ONLY, [[test "x$tools_only" = x1]])
118
# Some GNU/Linux systems (e.g., SuSE 4.3, 1996) don't have curses, but
119
# rather ncurses. So we check for it.
121
# Check for termlib before termcap because Solaris termcap needs libucb.
122
TERMLIB_VARIANTS="ncurses curses termlib termcap terminfo"
123
for termlib in ${TERMLIB_VARIANTS}; do
124
AC_CHECK_LIB(${termlib}, tgetent,
125
[TERMLIBS="${TERMLIBS} -l${termlib}"; break])
127
# don't bother warning on djgpp, it doesn't have a term library, it
128
# ports each termcap-needing program separately according to its needs.
129
if test -z "$TERMLIBS" && echo "$build" | grep -v djgpp >/dev/null; then
130
AC_MSG_WARN([probably need a terminal library, one of: ${TERMLIB_VARIANTS}])
133
# Checks for variables.
68
134
# HP-UX 9 (at least) needs -lncurses which defines termcap variables PC etc.
69
135
AC_MSG_CHECKING(for library with termcap variables)
70
136
AC_CACHE_VAL(ac_cv_var_ospeed,
72
for trylib in $termlib ncurses curses termlib termcap terminfo; do
138
for trylib in $termlib ${TERMLIB_VARIANTS}; do
73
139
if test "x$trylib" != "x$termlib"; then
74
140
LIBS="$oldLIBS -l$termlib -l$trylib"
76
142
LIBS="$oldLIBS -l$termlib"
79
#ifdef HAVE_NCURSES_TERMCAP_H
145
[#ifdef HAVE_NCURSES_TERMCAP_H
80
146
#include <ncurses/termcap.h>
82
148
#ifdef HAVE_TERMCAP_H
104
170
&& test "x$termlib" != "x$ac_cv_var_ospeed"; then
105
171
TERMLIBS="${TERMLIBS} -l${ac_cv_var_ospeed}"
175
# Do not use <ncurses/termcap.h> unless we're linking with ncurses.
176
# Must come after the termlib tests.
177
if test "x$termlib" = xncurses; then
178
# Use AC_CHECK_HEADERS so the HAVE_*_H symbol gets defined.
179
AC_CHECK_HEADERS(ncurses/termcap.h)
185
# For teTeX and TeX Live.
187
AC_ARG_ENABLE(multiplatform,
188
[ --enable-multiplatform put executables in bin/PLATFORM])
189
# if enable_multiplatform is set in the environment, use that.
190
test "x$enable_multiplatform" = xyes \
191
&& test "x$bindir" = 'x${exec_prefix}/bin' \
192
&& bindir="$bindir/$host"
194
# Taken from the example in
195
# http://www.gnu.org/software/automake/manual/html_node/Conditionals.html.
196
AC_ARG_ENABLE(install-warnings,
197
[ --disable-install-warnings omit make install warnings about TeX files],
198
[case "${enableval}" in
199
yes) install_warnings=true ;;
200
no) install_warnings=false ;;
201
*) AC_MSG_ERROR(bad value ${enableval} for --enable-install-warnings) ;;
203
[install_warnings=true])
204
AM_CONDITIONAL(INSTALL_WARNINGS,
205
test x"$install_warnings" = xtrue || test x"$install_warnings" = xyes)
207
# i18n support. To update to a new version of gettext, run:
208
# gettextize -f -c --intl
209
AM_GNU_GETTEXT_VERSION(0.14.1)
112
AC_CONFIG_FILES([Makefile \
119
makeinfo/tests/Makefile \
220
makeinfo/tests/Makefile