1 # Autoconf configuration file for groff.
2 # Copyright (C) 1989-1995, 2001, 2002, 2003, 2004, 2005
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
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
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.
26 AC_CONFIG_HEADERS([src/include/config.h:src/include/config.hin])
27 AC_CONFIG_SRCDIR([src/roff/groff/groff.cpp])
36 GROFF_APPRESDIR_OPTION
37 GROFF_APPRESDIR_DEFAULT
39 AC_PATH_PROG([PERLPATH], [perl], [/usr/bin/perl])
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])
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])
58 # checks for header stuff
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])
79 GROFF_UNSIGNED_LONG_LONG
83 GROFF_STRUCT_EXCEPTION
85 # checks for libraries
89 # checks for functions
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])])
98 AC_CHECK_FUNCS([gettimeofday isatty kill rename setlocale strsep])
100 AC_CHECK_DECLS([sys_siglist])
102 # checks for compiler characteristics
104 GROFF_TRADITIONAL_CPP
106 # checks for operating system services
110 GROFF_BROKEN_SPOOLER_FLAGS
114 GROFF_TARGET_PATH_SEPARATOR
116 GROFF_PDFDOC_PROGRAMS
117 GROFF_PNMTOPS_NOSETPAGE
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])
126 GROFF_APPRESDIR_CHECK