* Makefile.in (dist): Don't use soft links but copy files to
[s-roff.git] / configure.ac
blob5f99a3d10bae89e39bc7e8a256a62526f30df058
1 # Autoconf configuration file for groff.
2 # Copyright (C) 1989-1995, 2001, 2002, 2003, 2004, 2005, 2006, 2007
3 # Free Software Foundation, Inc.
5 # This file is part of groff.
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.
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.
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.
21 # Process this file with autoconf to produce a configure script.
23 AC_INIT
24 AC_PREREQ(2.59)
26 AC_CONFIG_HEADERS([src/include/config.h:src/include/config.hin])
27 AC_CONFIG_SRCDIR([src/roff/groff/groff.cpp])
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_PROG_EGREP
40 AC_PATH_PROG([PERLPATH], [perl], [/usr/bin/perl])
41 GROFF_PROG_YACC
42 GROFF_MAKEINFO
43 AC_PROG_RANLIB
44 GROFF_INSTALL_SH
45 GROFF_INSTALL_INFO
46 AC_PROG_INSTALL
47 AC_PROG_LN_S
49 # use a dummy substitution if no csh hack is necessary to avoid errors
50 # with non-GNU sed programs
51 GROFF_CSH_HACK([SH_SCRIPT_SED_CMD='1s/.*/:/'], [SH_SCRIPT_SED_CMD='1s/a/a/'])
52 AC_SUBST([SH_SCRIPT_SED_CMD])
54 # checks for headers
55 AC_CHECK_HEADERS([stddef.h stdlib.h unistd.h dirent.h limits.h sys/dir.h \
56                   string.h strings.h math.h sys/time.h direct.h process.h])
57 GROFF_ISC_SYSV3
58 GROFF_POSIX
60 # checks for header stuff
61 GROFF_SRAND
62 GROFF_NEED_DECLARATION([gettimeofday])
63 GROFF_NEED_DECLARATION([hypot])
64 GROFF_NEED_DECLARATION([popen])
65 GROFF_NEED_DECLARATION([pclose])
66 GROFF_NEED_DECLARATION([putenv])
67 GROFF_NEED_DECLARATION([rand])
68 GROFF_NEED_DECLARATION([snprintf])
69 GROFF_NEED_DECLARATION([srand])
70 GROFF_NEED_DECLARATION([strcasecmp])
71 GROFF_NEED_DECLARATION([strncasecmp])
72 GROFF_NEED_DECLARATION([vfprintf])
73 GROFF_NEED_DECLARATION([vsnprintf])
74 GROFF_SYS_NERR
75 GROFF_SYS_ERRLIST
76 GROFF_OSFCN_H
77 GROFF_LIMITS_H
78 GROFF_INTTYPES_H
80 # checks for typedefs
81 GROFF_UNSIGNED_LONG_LONG
82 GROFF_UINTMAX_T
83 GROFF_TIME_T
84 GROFF_TYPE_SIGNAL
85 GROFF_STRUCT_EXCEPTION
87 # check endianness
88 AC_C_BIGENDIAN
90 # checks for libraries
91 GROFF_LIBC
92 GROFF_LIBM
93 AM_ICONV
95 # checks for functions
96 AC_FUNC_MMAP
97 saved_libs="$LIBS"
98 LIBS="$LIBS $LIBC $LIBM"
99 AC_REPLACE_FUNCS([fmod getcwd putenv snprintf strcasecmp \
100                   strerror strncasecmp strtol])
101 # vsnprintf is in the same source file as snprintf
102 AC_CHECK_FUNCS([vsnprintf], [], [AC_LIBOBJ([snprintf])])
103 LIBS="$saved_libs"
104 AC_CHECK_FUNCS([gettimeofday isatty kill rename setlocale strsep])
105 GROFF_MKSTEMP
106 AC_CHECK_DECLS([sys_siglist, getc_unlocked])
107 AM_LANGINFO_CODESET
109 # checks for compiler characteristics
110 GROFF_ARRAY_DELETE
111 GROFF_TRADITIONAL_CPP
113 # checks for operating system services
114 GROFF_WCOREFLAG
116 # other random stuff
117 GROFF_BROKEN_SPOOLER_FLAGS
118 GROFF_PAGE
119 GROFF_G
120 GROFF_TMAC
121 GROFF_TARGET_PATH_SEPARATOR
122 GROFF_HTML_PROGRAMS
123 GROFF_PDFDOC_PROGRAMS
124 GROFF_PNMTOPS_NOSETPAGE
125 gl_GLIBC21
127 AC_CONFIG_FILES([stamp-h], [echo timestamp > stamp-h])
128 AC_CONFIG_FILES([Makefile doc/Makefile src/utils/xtotroff/Makefile])
129 AC_CONFIG_FILES([contrib/gdiffmk/tests/runtests],
130                 [chmod +x contrib/gdiffmk/tests/runtests])
131 AC_CONFIG_FILES([test-groff], [chmod +x test-groff])
132 AC_OUTPUT
134 GROFF_APPRESDIR_CHECK