1 # Autoconf configuration file for groff.
2 # Copyright (C) 1989-2023 Free Software Foundation, Inc.
4 # This file is part of groff.
6 # groff is free software; you can redistribute it and/or modify it under
7 # the terms of the GNU General Public License as published by the Free
8 # Software Foundation, either version 3 of the License, or
9 # (at your option) any later version.
11 # groff is distributed in the hope that it will be useful, but WITHOUT
12 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
16 # You should have received a copy of the GNU General Public License
17 # along with this program. If not, see <http://www.gnu.org/licenses/>.
19 # Process this file with autoconf to produce a configure script.
22 m4_esyscmd([build-aux/git-version-gen --prefix "" .tarball-version]),
23 http://savannah.gnu.org/bugs/?group=groff,
28 # SHORT_VERSION contains only the number of REVISION before the first
29 # '.'; e.g., if REVISION is '3.real.434-5aafd' then SHORT_VERSION is
30 # 'x.yy.3', where x and yy are MAJOR_VERSION and MINOR_VERSION,
32 AC_SUBST([SHORT_VERSION],
33 m4_bregexp(AC_PACKAGE_VERSION,[^\(\w+\.\w+\.\w+\).*$],[\1]))
35 # Directories where the helper scripts should be found. This must be
36 # consistent with the variable build_aux in bootstrap.conf.
37 AC_CONFIG_AUX_DIR([build-aux])
39 AC_CONFIG_HEADERS([src/include/config.h:src/include/config.hin])
40 AC_CONFIG_SRCDIR([src/roff/groff/groff.cpp])
42 AC_USE_SYSTEM_EXTENSIONS
44 AM_INIT_AUTOMAKE([subdir-objects])
46 AM_SILENT_RULES([yes])
58 GROFF_APPDEFDIR_OPTION
59 GROFF_APPDEFDIR_DEFAULT
60 GROFF_LIBPROGRAMDIR_DEFAULT
61 GROFF_GLILYPONDDIR_DEFAULT
62 GROFF_GPINYINDIR_DEFAULT
66 GROFF_REFERDIR_DEFAULT
83 # use a dummy substitution if no csh hack is necessary to avoid errors
84 # with non-GNU sed programs
85 GROFF_CSH_HACK([SH_SCRIPT_SED_CMD='1s/.*/:/'],
86 [SH_SCRIPT_SED_CMD='1s/a/a/'])
87 AC_SUBST([SH_SCRIPT_SED_CMD])
90 AC_CHECK_HEADERS([stdbool.h stddef.h stdlib.h unistd.h dirent.h \
91 limits.h sys/dir.h string.h strings.h math.h \
92 sys/time.h direct.h process.h])
96 # checks for header stuff
98 GROFF_NEED_DECLARATION([gettimeofday])
99 GROFF_NEED_DECLARATION([popen])
100 GROFF_NEED_DECLARATION([pclose])
101 GROFF_NEED_DECLARATION([putenv])
102 GROFF_NEED_DECLARATION([rand])
103 GROFF_NEED_DECLARATION([srand])
104 GROFF_NEED_DECLARATION([strcasecmp])
105 GROFF_NEED_DECLARATION([strncasecmp])
106 GROFF_NEED_DECLARATION([vfprintf])
113 # checks for typedefs
114 GROFF_UNSIGNED_LONG_LONG
118 GROFF_STRUCT_EXCEPTION
123 # checks for libraries
132 AC_SUBST([LIBEXT],[$acl_libext])
134 # checks for functions
137 LIBS="$LIBS $LIBC $LIBM"
138 AC_REPLACE_FUNCS([fmod getcwd putenv strcasecmp \
139 strerror strncasecmp strtol])
141 AC_CHECK_FUNCS([gettimeofday isatty kill rename setlocale strdup \
144 AC_CHECK_DECLS([strsignal, getc_unlocked])
145 AC_CHECK_DECLS([sys_siglist, getc_unlocked])
148 # checks for compiler characteristics
150 GROFF_TRADITIONAL_CPP
152 # checks for operating system services
155 # URW fonts extra dir
158 # use groff's own malloc-based allocator for C++ new/delete operators
159 GROFF_USE_GROFF_ALLOCATOR
162 GROFF_BROKEN_SPOOLER_FLAGS
166 GROFF_WITH_COMPATIBILITY_WRAPPERS
167 GROFF_TARGET_PATH_SEPARATOR
168 GROFF_CHECK_GROHTML_PROGRAMS
169 GROFF_PDFROFF_DEPENDENCIES_CHECK
170 GROFF_GROPDF_DEPENDENCIES_CHECK
171 GROFF_PNMTOOLS_CAN_BE_QUIET
172 GROFF_PNMTOPS_NOSETPAGE
173 GROFF_MAKE_DEFINES_RM
175 GROFF_HAVE_TEST_EF_OPTION
177 GROFF_GHOSTSCRIPT_VERSION_CHECK
181 AM_CONDITIONAL([BUILD_WINSCRIPTS], [test -n "$make_winscripts"])
183 # If X11 is not available, don't build:
188 # src/devices/xditview
191 AM_CONDITIONAL([WITHOUT_X11], [test "$groff_no_x" = yes])
193 AM_CONDITIONAL([MAKE_DEFINES_RM], [test "$groff_make_defines_rm" = yes])
195 # Some programs have a "g" prefix if an existing troff installation is
197 AM_CONDITIONAL([USEPROGRAMPREFIX], [test "$g" = g])
199 AM_CONDITIONAL([USE_GROHTML], [test "$use_grohtml" = yes])
200 AM_CONDITIONAL([USE_PDFROFF], [test "$use_pdfroff" = yes])
201 AM_CONDITIONAL([USE_GROPDF], [test "$use_gropdf" = yes])
202 AM_CONDITIONAL([USE_GROFF_ALLOCATOR],
203 [test "$groff_use_own_allocator" = yes])
204 AM_CONDITIONAL([HAVE_GHOSTSCRIPT], [test "$GHOSTSCRIPT" != no \
205 && test "$GHOSTSCRIPT" != missing])
206 AM_CONDITIONAL([HAVE_URW_FONTS], [test "$groff_have_urw_fonts" = yes ])
207 AM_CONDITIONAL([HAVE_TEXI2DVI], [test "$groff_have_texi2dvi" = yes ])
208 AM_CONDITIONAL([USE_TEX], [test "$groff_use_tex" = yes ])
210 AC_CONFIG_FILES([Makefile])
211 AC_CONFIG_FILES([test-groff], [chmod +x test-groff])
215 $PACKAGE_NAME version $PACKAGE_VERSION
216 ----------------------------------------------------------------------
217 installation directory prefix : $prefix"
221 command name prefix : $g"
222 if test -n "$tmac_wrap"
225 prefix used for macro packages : $tmac_wrap"
229 C++ compiler and options : $CXX $CXXFLAGS $CPPFLAGS
230 use libgroff's memory allocator : $groff_use_own_allocator
231 C compiler and options : $CC $CFLAGS $CPPFLAGS
232 Perl interpreter version : $perl_version"
233 if test "$groff_no_x" = yes
236 X11 support : disabled"
239 X11 support : enabled
240 X11 app defaults directory : $appdefdir"
243 'groff -l' uses print spooler : $groff_have_spooler
244 use URW fonts for PDF output : $groff_have_urw_fonts"
245 if test "$groff_have_urw_fonts" = yes
248 URW fonts directory : $urwfontsdir"
251 preconv can use uchardet library : $groff_have_uchardet
252 can build groff.dvi, groff.pdf : $groff_use_tex
253 ----------------------------------------------------------------------"
255 GROFF_APPDEFDIR_NOTICE
257 GROFF_GHOSTSCRIPT_AVAILABILITY_NOTICE
258 GROFF_GHOSTSCRIPT_VERSION_NOTICE
259 GROFF_URW_FONTS_NOTICE
260 GROFF_UCHARDET_NOTICE
261 GROFF_GROHTML_PROGRAM_NOTICE
262 GROFF_PDFROFF_PROGRAM_NOTICE
263 GROFF_GROPDF_PROGRAM_NOTICE