]> CyberLeo.Net >> Repos - FreeBSD/releng/9.2.git/blob - contrib/groff/configure.ac
- Copy stable/9 to releng/9.2 as part of the 9.2-RELEASE cycle.
[FreeBSD/releng/9.2.git] / contrib / groff / configure.ac
1 # Autoconf configuration file for groff.
2 # Copyright (C) 1989-1995, 2001, 2002, 2003, 2004, 2005
3 # Free Software Foundation, Inc.
4 #
5 # This file is part of groff.
6 #
7 # groff is free software; you can redistribute it and/or modify it under
8 # the terms of the GNU General Public License as published by the Free
9 # Software Foundation; either version 2, or (at your option) any later
10 # version.
11 #
12 # groff is distributed in the hope that it will be useful, but WITHOUT ANY
13 # WARRANTY; without even the implied warranty of MERCHANTABILITY or
14 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
15 # for more details.
16 #
17 # You should have received a copy of the GNU General Public License along
18 # with groff; see the file COPYING.  If not, write to the Free Software
19 # Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA.
20 #
21 # Process this file with autoconf to produce a configure script.
22
23 AC_INIT
24 AC_PREREQ(2.59)
25
26 AC_CONFIG_HEADERS([src/include/config.h:src/include/config.hin])
27 AC_CONFIG_SRCDIR([src/roff/groff/groff.cpp])
28
29 # checks for programs
30 AC_PROG_CC
31 AC_PROG_CXX
32 GROFF_CXX_CHECK
33 GROFF_EBCDIC
34 GROFF_OS390
35 GROFF_X11
36 GROFF_APPRESDIR_OPTION
37 GROFF_APPRESDIR_DEFAULT
38 GROFF_PRINT
39 AC_PATH_PROG([PERLPATH], [perl], [/usr/bin/perl])
40 GROFF_PROG_YACC
41 AC_PROG_RANLIB
42 GROFF_INSTALL_SH
43 GROFF_INSTALL_INFO
44 AC_PROG_INSTALL
45 AC_PROG_LN_S
46
47 # use a dummy substitution if no csh hack is necessary to avoid errors
48 # with non-GNU sed programs
49 GROFF_CSH_HACK([SH_SCRIPT_SED_CMD='1s/.*/:/'], [SH_SCRIPT_SED_CMD='1s/a/a/'])
50 AC_SUBST([SH_SCRIPT_SED_CMD])
51
52 # checks for headers
53 AC_CHECK_HEADERS([stdlib.h unistd.h dirent.h limits.h sys/dir.h \
54                   string.h strings.h math.h sys/time.h direct.h process.h])
55 GROFF_ISC_SYSV3
56 GROFF_POSIX
57
58 # checks for header stuff
59 GROFF_SRAND
60 GROFF_NEED_DECLARATION([gettimeofday])
61 GROFF_NEED_DECLARATION([hypot])
62 GROFF_NEED_DECLARATION([popen])
63 GROFF_NEED_DECLARATION([pclose])
64 GROFF_NEED_DECLARATION([putenv])
65 GROFF_NEED_DECLARATION([rand])
66 GROFF_NEED_DECLARATION([snprintf])
67 GROFF_NEED_DECLARATION([srand])
68 GROFF_NEED_DECLARATION([strcasecmp])
69 GROFF_NEED_DECLARATION([strncasecmp])
70 GROFF_NEED_DECLARATION([vfprintf])
71 GROFF_NEED_DECLARATION([vsnprintf])
72 GROFF_SYS_NERR
73 GROFF_SYS_ERRLIST
74 GROFF_OSFCN_H
75 GROFF_LIMITS_H
76 GROFF_INTTYPES_H
77
78 # checks for typedefs
79 GROFF_UNSIGNED_LONG_LONG
80 GROFF_UINTMAX_T
81 GROFF_TIME_T
82 GROFF_TYPE_SIGNAL
83 GROFF_STRUCT_EXCEPTION
84
85 # checks for libraries
86 GROFF_LIBC
87 GROFF_LIBM
88
89 # checks for functions
90 AC_FUNC_MMAP
91 saved_libs="$LIBS"
92 LIBS="$LIBS $LIBC $LIBM"
93 AC_REPLACE_FUNCS([fmod getcwd putenv snprintf strcasecmp \
94                   strerror strncasecmp strtol])
95 # vsnprintf is in the same source file as snprintf
96 AC_CHECK_FUNCS([vsnprintf], [], [AC_LIBOBJ([snprintf])])
97 LIBS="$saved_libs"
98 AC_CHECK_FUNCS([gettimeofday isatty kill rename setlocale strsep])
99 GROFF_MKSTEMP
100 AC_CHECK_DECLS([sys_siglist])
101
102 # checks for compiler characteristics
103 GROFF_ARRAY_DELETE
104 GROFF_TRADITIONAL_CPP
105
106 # checks for operating system services
107 GROFF_WCOREFLAG
108
109 # other random stuff
110 GROFF_BROKEN_SPOOLER_FLAGS
111 GROFF_PAGE
112 GROFF_G
113 GROFF_TMAC
114 GROFF_TARGET_PATH_SEPARATOR
115 GROFF_HTML_PROGRAMS
116 GROFF_PDFDOC_PROGRAMS
117 GROFF_PNMTOPS_NOSETPAGE
118
119 AC_CONFIG_FILES([stamp-h], [echo timestamp > stamp-h])
120 AC_CONFIG_FILES([Makefile doc/Makefile src/utils/xtotroff/Makefile])
121 AC_CONFIG_FILES([contrib/gdiffmk/tests/runtests],
122                 [chmod +x contrib/gdiffmk/tests/runtests])
123 AC_CONFIG_FILES([test-groff], [chmod +x test-groff])
124 AC_OUTPUT
125
126 GROFF_APPRESDIR_CHECK