~ubuntu-branches/ubuntu/maverick/texinfo/maverick

« back to all changes in this revision

Viewing changes to configure.ac

  • Committer: Bazaar Package Importer
  • Author(s): Norbert Preining
  • Date: 2005-10-28 15:10:30 UTC
  • mto: (2.1.1 dapper) (3.1.4 hardy)
  • mto: This revision was merged to the branch mainline in revision 3.
  • Revision ID: james.westby@ubuntu.com-20051028151030-9nsf2s2k2z3fktjt
Tags: upstream-4.8
ImportĀ upstreamĀ versionĀ 4.8

Show diffs side-by-side

added added

removed removed

Lines of Context:
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 $
3
 
dnl
4
 
AC_INIT
 
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 $
 
3
#
 
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.
 
7
#
 
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.
 
11
#
 
12
AC_PREREQ(2.59)# Minimum Autoconf version required.
 
13
#
 
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.
8
 
 
9
 
AM_INIT_AUTOMAKE([texinfo], [4.1])
10
 
AM_CONDITIONAL(TEXINFO_MAINT, test -n "$TEXINFO_MAINT")
11
 
 
12
 
dnl Checks for programs.
 
17
AM_INIT_AUTOMAKE([dist-bzip2])
 
18
 
 
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.
 
22
AM_MAINTAINER_MODE
 
23
 
 
24
# Checks for programs.
13
25
AC_PROG_CC
14
26
AC_PROG_GCC_TRADITIONAL
15
27
AC_PROG_INSTALL
 
28
AC_PROG_MAKE_SET
16
29
AC_PROG_RANLIB
 
30
AM_MISSING_PROG(HELP2MAN, help2man)
17
31
 
18
32
AC_ISC_POSIX
19
33
AC_MINIX
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))
23
37
 
24
 
# Some GNU/Linux systems (e.g., SuSE 4.3, 1996) don't have curses, but
25
 
# rather ncurses.  So we check for it.
26
 
TERMLIBS=
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])
31
 
done
32
 
 
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
 
fi
 
38
# Checks for header files.
39
39
AC_HEADER_STAT
40
40
AC_HEADER_STDC
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)
 
44
 
 
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>
 
49
#endif
 
50
])
 
51
 
44
52
AC_SYS_POSIX_TERMIOS
45
53
AC_HEADER_TIOCGWINSZ
46
54
 
47
 
dnl Checks for typedefs, structures, and compiler characteristics.
 
55
# Checks for typedefs, structures, and compiler characteristics.
48
56
AC_TYPE_OFF_T
49
57
AC_TYPE_SIGNAL
50
58
AC_C_CONST
51
59
AC_STRUCT_TM
52
60
 
53
 
dnl Checks for function declarations.
54
 
txi_CHECK_DECLS
 
61
# Checks for function declarations.
 
62
AC_CHECK_DECLS([memchr, strcoll, strerror])
55
63
 
56
 
dnl Checks for library functions.
 
64
# Checks for library functions.
57
65
AC_FUNC_ALLOCA
58
66
AC_FUNC_STRCOLL
59
67
AC_FUNC_VPRINTF
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)
66
 
 
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 \
 
72
               sigsetmask strchr)
 
73
AC_REPLACE_FUNCS(memcpy memmove strdup strerror)
 
74
 
 
75
# strcasecmp and strncasecmp, gnulib-style.
 
76
gl_STRCASE
 
77
 
 
78
# We want to recognize djgpp to avoid the useless warning about no
 
79
# term library.
 
80
AC_CANONICAL_BUILD
 
81
 
 
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
 
84
# install-info.
 
85
 
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.
 
92
#
 
93
if test "$cross_compiling" = no; then
 
94
  native_tools=
 
95
else
 
96
  native_tools=tools
 
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".
 
101
  rm -f config.status
 
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}" \
 
108
      PATH="${PATH}" \
 
109
      tools_only=1 \
 
110
    ${confdir}/configure --build=${build} --host=${build} \
 
111
                         --disable-rpath --disable-nls
 
112
  cd .. || exit 1
 
113
  AC_MSG_NOTICE([[Continuing with main configure (${host}).]])
 
114
fi
 
115
AC_SUBST(native_tools)
 
116
AM_CONDITIONAL(TOOLS_ONLY, [[test "x$tools_only" = x1]])
 
117
 
 
118
# Some GNU/Linux systems (e.g., SuSE 4.3, 1996) don't have curses, but
 
119
# rather ncurses.  So we check for it.
 
120
TERMLIBS=
 
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])
 
126
done
 
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}])
 
131
fi
 
132
 
 
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,
71
 
oldLIBS=$LIBS 
72
 
for trylib in $termlib ncurses curses termlib termcap terminfo; do
 
137
oldLIBS=$LIBS
 
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"
75
141
   else
76
142
     LIBS="$oldLIBS -l$termlib"
77
143
   fi
78
 
   AC_TRY_LINK(, 
79
 
#ifdef HAVE_NCURSES_TERMCAP_H
 
144
   AC_TRY_LINK(,
 
145
[#ifdef HAVE_NCURSES_TERMCAP_H
80
146
#include <ncurses/termcap.h>
81
147
#else
82
148
#ifdef HAVE_TERMCAP_H
85
151
#undef PC
86
152
char *BC;
87
153
char **UP;
88
 
char PC;      
89
 
short ospeed; 
 
154
char PC;
 
155
short ospeed;
90
156
#endif
91
157
#endif
92
158
/* Make sure all variables actually exist.  AIX 4.3 has ospeed but no BC.
93
 
   --Andreas Ley <andy@rz.uni-karlsruhe.de>, 24 Aug 2000.  */
 
159
   --Andreas Ley <andy@rz.uni-karlsruhe.de> 24 Aug 2000.  */
94
160
BC++;
95
 
UP++
 
161
UP++;
96
162
PC++;
97
163
return ospeed != 0;
98
 
, ac_cv_var_ospeed=$trylib; break)
 
164
], ac_cv_var_ospeed=$trylib; break)
99
165
done
100
166
LIBS=$oldLIBS
101
167
)
104
170
   && test "x$termlib" != "x$ac_cv_var_ospeed"; then
105
171
  TERMLIBS="${TERMLIBS} -l${ac_cv_var_ospeed}"
106
172
fi
107
 
AC_SUBST(TERMLIBS)
108
 
 
109
 
dnl i18n support.
 
173
AC_SUBST(TERMLIBS)#
 
174
 
 
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)
 
180
fi
 
181
 
 
182
# gnulib.
 
183
gl_FUNC_MKSTEMP
 
184
 
 
185
# For teTeX and TeX Live.
 
186
AC_CANONICAL_HOST
 
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"
 
193
 
 
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) ;;
 
202
   esac],
 
203
   [install_warnings=true])
 
204
AM_CONDITIONAL(INSTALL_WARNINGS,
 
205
   test x"$install_warnings" = xtrue || test x"$install_warnings" = xyes)
 
206
 
 
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)
110
210
AM_GNU_GETTEXT()
111
211
 
112
 
AC_CONFIG_FILES([Makefile          \
113
 
           doc/Makefile            \
114
 
           info/Makefile           \
115
 
           intl/Makefile           \
116
 
           lib/Makefile            \
117
 
           m4/Makefile             \
118
 
           makeinfo/Makefile       \
119
 
           makeinfo/tests/Makefile \
120
 
           po/Makefile.in          \
121
 
           util/Makefile           \
122
 
           ])
 
212
AC_CONFIG_FILES([
 
213
  Makefile
 
214
  doc/Makefile
 
215
  info/Makefile
 
216
  intl/Makefile
 
217
  lib/Makefile
 
218
  m4/Makefile
 
219
  makeinfo/Makefile
 
220
  makeinfo/tests/Makefile
 
221
  po/Makefile.in
 
222
  util/Makefile
 
223
])
123
224
AC_OUTPUT