1 # Autoconf configuration file for groff.
2 # Copyright (C) 1989-2018 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 ANY
12 # 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 'x.yy.3',
30 # where x and yy are MAJOR_VERSION and MINOR_VERSION, respectively.
31 AC_SUBST([SHORT_VERSION],
32 m4_bregexp(AC_PACKAGE_VERSION,[^\(\w+\.\w+\.\w+\).*$],[\1]))
34 # Directories where the helper scripts should be found. This must be consistent
35 # with the variable build_aux in bootstrap.conf
36 AC_CONFIG_AUX_DIR([build-aux])
38 AC_CONFIG_HEADERS([src/include/config.h:src/include/config.hin])
39 AC_CONFIG_SRCDIR([src/roff/groff/groff.cpp])
41 AC_USE_SYSTEM_EXTENSIONS
43 AM_INIT_AUTOMAKE([subdir-objects])
45 AM_SILENT_RULES([yes])
57 GROFF_APPRESDIR_OPTION
58 GROFF_APPRESDIR_DEFAULT
59 GROFF_LIBPROGRAMDIR_DEFAULT
60 GROFF_GROFFERDIR_OPTION
61 GROFF_GROFFERDIR_DEFAULT
62 GROFF_GLILYPONDDIR_DEFAULT
63 GROFF_GPINYINDIR_DEFAULT
68 GROFF_REFERDIR_DEFAULT
85 # use a dummy substitution if no csh hack is necessary to avoid errors
86 # with non-GNU sed programs
87 GROFF_CSH_HACK([SH_SCRIPT_SED_CMD='1s/.*/:/'], [SH_SCRIPT_SED_CMD='1s/a/a/'])
88 AC_SUBST([SH_SCRIPT_SED_CMD])
91 AC_CHECK_HEADERS([stddef.h stdlib.h unistd.h dirent.h limits.h sys/dir.h \
92 string.h strings.h math.h 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 strsep])
143 AC_CHECK_DECLS([sys_siglist, getc_unlocked])
146 # checks for compiler characteristics
148 GROFF_TRADITIONAL_CPP
150 # checks for operating system services
153 # URW fonts extra dir
157 GROFF_BROKEN_SPOOLER_FLAGS
161 GROFF_WITH_COMPATIBILITY_WRAPPERS
162 GROFF_TARGET_PATH_SEPARATOR
164 GROFF_PDFDOC_PROGRAMS
165 GROFF_PNMTOPS_NOSETPAGE
168 GROFF_HAVE_TEST_EF_OPTION
173 # checks for presence of URW fonts (requires ghostscript, which is
174 # checked in GROFF_HTML_PROGRAMS
177 AM_CONDITIONAL([BUILD_WINSCRIPTS], [test -n "$make_winscripts"])
179 # If X11 is not available, don't build:
184 # src/devices/xditview
187 AM_CONDITIONAL([WITHOUT_X11], [test "x$groff_no_x" = "xyes"])
189 # make builtin variable RM
190 AM_CONDITIONAL([MAKE_DONT_HAVE_RM], [test "x$groff_is_rm_defined" = "xno"])
192 # Some programs have a "g" prefix if an existing groff installation is detected
193 AM_CONDITIONAL([USEPROGRAMPREFIX], [test x$g = xg])
195 AM_CONDITIONAL([BUILD_INFODOC], [test -n "$make_infodoc"])
196 AM_CONDITIONAL([BUILD_HTML], [test -n "$make_htmldoc"])
197 AM_CONDITIONAL([BUILD_HTMLEXAMPLES], [test -n "$make_htmlexamples"])
198 AM_CONDITIONAL([BUILD_PDFDOC], [test -n "$make_pdfdoc"])
199 AM_CONDITIONAL([BUILD_PDFEXAMPLES], [test -n "$make_pdfexamples"])
200 AM_CONDITIONAL([BUILD_OTHERDOC], [test -n "$make_otherdoc"])
201 AM_CONDITIONAL([BUILD_EXAMPLES], [test -n "$make_examples"])
202 AM_CONDITIONAL([INSTALL_SHIPPED_HTML], [test -n "$make_install_shipped_htmldoc"])
203 AM_CONDITIONAL([HAVE_PDFTOOLS], [test "x$groff_have_pdftools" = "xyes" ])
204 AM_CONDITIONAL([HAVE_TEXI2DVI], [test "x$groff_have_texi2dvi" = "xyes" ])
206 AC_CONFIG_FILES([Makefile])
207 AC_CONFIG_FILES([test-groff], [chmod +x test-groff])
211 ${PACKAGE_NAME} version ${PACKAGE_VERSION}
212 ----------------------------------------------------------------------
214 Compiler : ${CC} ${CFLAGS} ${CPPFLAGS}"
215 if test "x$groff_no_x" = "xyes"; then
221 X11 resources dir : $appresdir"
223 if test "x$doc" = x; then
231 URW fonts for pdf : $groff_have_urw_fonts
232 Use uchardet library for preconv: $groff_have_uchardet
233 pdftools for distcheck : $groff_have_pdftools"
235 ----------------------------------------------------------------------"
237 GROFF_APPRESDIR_CHECK
238 GROFF_URW_FONTS_CHECK