Bump to 1.23.0
[platform/upstream/groff.git] / configure.ac
index 28e75f1..4b1e92f 100644 (file)
@@ -1,5 +1,5 @@
 # Autoconf configuration file for groff.
-# Copyright (C) 1989-2018 Free Software Foundation, Inc.
+# Copyright (C) 1989-2023 Free Software Foundation, Inc.
 #
 # This file is part of groff.
 #
@@ -8,8 +8,8 @@
 # Software Foundation, either version 3 of the License, or
 # (at your option) any later version.
 #
-# groff is distributed in the hope that it will be useful, but WITHOUT ANY
-# WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# groff is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
 # for more details.
 #
 #
 # Process this file with autoconf to produce a configure script.
 
-AC_INIT([GNU Troff],
+AC_INIT([GNU roff],
         m4_esyscmd([build-aux/git-version-gen --prefix "" .tarball-version]),
         http://savannah.gnu.org/bugs/?group=groff,
         [groff])
 
-AC_PREREQ([2.62])
+AC_PREREQ([2.64])
 
-# SHORT_VERSION contains only the number of REVISION before the first '.',
-# e.g. if REVISION is '3.real.434-5aafd' then SHORT_VERSION is 'x.yy.3',
-# where x and yy are MAJOR_VERSION and MINOR_VERSION, respectively.
+# SHORT_VERSION contains only the number of REVISION before the first
+# '.'; e.g., if REVISION is '3.real.434-5aafd' then SHORT_VERSION is
+# 'x.yy.3', where x and yy are MAJOR_VERSION and MINOR_VERSION,
+# respectively.
 AC_SUBST([SHORT_VERSION],
        m4_bregexp(AC_PACKAGE_VERSION,[^\(\w+\.\w+\.\w+\).*$],[\1]))
 
-# Directories where the helper scripts should be found. This must be consistent
-# with the variable build_aux in bootstrap.conf
+# Directories where the helper scripts should be found. This must be
+# consistent with the variable build_aux in bootstrap.conf.
 AC_CONFIG_AUX_DIR([build-aux])
 
 AC_CONFIG_HEADERS([src/include/config.h:src/include/config.hin])
@@ -54,23 +55,21 @@ GROFF_EBCDIC
 GROFF_OS390
 GROFF_CMD_FILES
 GROFF_X11
-GROFF_APPRESDIR_OPTION
-GROFF_APPRESDIR_DEFAULT
+GROFF_APPDEFDIR_OPTION
+GROFF_APPDEFDIR_DEFAULT
 GROFF_LIBPROGRAMDIR_DEFAULT
-GROFF_GROFFERDIR_OPTION
-GROFF_GROFFERDIR_DEFAULT
 GROFF_GLILYPONDDIR_DEFAULT
 GROFF_GPINYINDIR_DEFAULT
-GROFF_GROGDIR_DEFAULT
 GROFF_PERL
 GROFF_PRINT
 # GROFF_REFER
 GROFF_REFERDIR_DEFAULT
 AC_PROG_EGREP
 GROFF_PROG_YACC
-GROFF_DOC_CHECK
-GROFF_MAKEINFO
-GROFF_TEXI2DVI
+GROFF_PROG_M4
+GROFF_PROG_MAKEINFO
+GROFF_PROG_TEXI2DVI
+GROFF_USE_TEX_CHECK
 AC_PROG_RANLIB
 GROFF_INSTALL_SH
 GROFF_INSTALL_INFO
@@ -80,16 +79,17 @@ AC_PROG_MKDIR_P
 GROFF_PROG_XPMTOPPM
 PKG_PROG_PKG_CONFIG
 GROFF_UCHARDET
-GROFF_PDFTOOLS
 
 # use a dummy substitution if no csh hack is necessary to avoid errors
 # with non-GNU sed programs
-GROFF_CSH_HACK([SH_SCRIPT_SED_CMD='1s/.*/:/'], [SH_SCRIPT_SED_CMD='1s/a/a/'])
+GROFF_CSH_HACK([SH_SCRIPT_SED_CMD='1s/.*/:/'],
+               [SH_SCRIPT_SED_CMD='1s/a/a/'])
 AC_SUBST([SH_SCRIPT_SED_CMD])
 
 # checks for headers
-AC_CHECK_HEADERS([stddef.h stdlib.h unistd.h dirent.h limits.h sys/dir.h \
-                  string.h strings.h math.h sys/time.h direct.h process.h])
+AC_CHECK_HEADERS([stdbool.h stddef.h stdlib.h unistd.h dirent.h \
+                  limits.h sys/dir.h string.h strings.h math.h \
+                  sys/time.h direct.h process.h])
 GROFF_ISC_SYSV3
 GROFF_POSIX
 
@@ -138,8 +138,10 @@ LIBS="$LIBS $LIBC $LIBM"
 AC_REPLACE_FUNCS([fmod getcwd putenv strcasecmp \
                   strerror strncasecmp strtol])
 LIBS="$saved_libs"
-AC_CHECK_FUNCS([gettimeofday isatty kill rename setlocale strsep])
+AC_CHECK_FUNCS([gettimeofday isatty kill rename setlocale strdup \
+                strsep])
 GROFF_MKSTEMP
+AC_CHECK_DECLS([strsignal, getc_unlocked])
 AC_CHECK_DECLS([sys_siglist, getc_unlocked])
 AM_LANGINFO_CODESET
 
@@ -153,6 +155,9 @@ GROFF_WCOREFLAG
 # URW fonts extra dir
 GROFF_URW_FONTS_PATH
 
+# use groff's own malloc-based allocator for C++ new/delete operators
+GROFF_USE_GROFF_ALLOCATOR
+
 # other random stuff
 GROFF_BROKEN_SPOOLER_FLAGS
 GROFF_PAGE
@@ -160,80 +165,99 @@ GROFF_G
 GROFF_TMAC
 GROFF_WITH_COMPATIBILITY_WRAPPERS
 GROFF_TARGET_PATH_SEPARATOR
-GROFF_HTML_PROGRAMS
-GROFF_PDFDOC_PROGRAMS
+GROFF_CHECK_GROHTML_PROGRAMS
+GROFF_PDFROFF_DEPENDENCIES_CHECK
+GROFF_GROPDF_DEPENDENCIES_CHECK
+GROFF_PNMTOOLS_CAN_BE_QUIET
 GROFF_PNMTOPS_NOSETPAGE
-GROFF_MAKE_RM
+GROFF_MAKE_DEFINES_RM
 GROFF_DIFF_D
 GROFF_HAVE_TEST_EF_OPTION
 GROFF_BASH
+GROFF_GHOSTSCRIPT_VERSION_CHECK
 gl_GLIBC21
 gl_LOCALCHARSET
 
-# checks for presence of URW fonts (requires ghostscript, which is
-# checked in GROFF_HTML_PROGRAMS
-GROFF_URW_FONTS
-
 AM_CONDITIONAL([BUILD_WINSCRIPTS], [test -n "$make_winscripts"])
 
 # If X11 is not available, don't build:
-# font/devX75 
+# font/devX75
 # font/devX75-12
 # font/devX100
 # font/devX100-12
-# src/devices/xditview 
+# src/devices/xditview
 # src/utils/xtotroff
 # src/libs/libxutil
-AM_CONDITIONAL([WITHOUT_X11], [test "x$groff_no_x" = "xyes"])
+AM_CONDITIONAL([WITHOUT_X11], [test "$groff_no_x" = yes])
 
-# make builtin variable RM
-AM_CONDITIONAL([MAKE_DONT_HAVE_RM], [test "x$groff_is_rm_defined" = "xno"])
+AM_CONDITIONAL([MAKE_DEFINES_RM], [test "$groff_make_defines_rm" = yes])
 
-# Some programs have a "g" prefix if an existing groff installation is detected
-AM_CONDITIONAL([USEPROGRAMPREFIX], [test x$g = xg])
+# Some programs have a "g" prefix if an existing troff installation is
+# detected.
+AM_CONDITIONAL([USEPROGRAMPREFIX], [test "$g" = g])
 
-AM_CONDITIONAL([BUILD_INFODOC], [test -n "$make_infodoc"])
-AM_CONDITIONAL([BUILD_HTML], [test -n "$make_htmldoc"])
-AM_CONDITIONAL([BUILD_HTMLEXAMPLES], [test -n "$make_htmlexamples"])
-AM_CONDITIONAL([BUILD_PDFDOC], [test -n "$make_pdfdoc"])
-AM_CONDITIONAL([BUILD_PDFEXAMPLES], [test -n "$make_pdfexamples"])
-AM_CONDITIONAL([BUILD_OTHERDOC], [test -n "$make_otherdoc"])
-AM_CONDITIONAL([BUILD_EXAMPLES], [test -n "$make_examples"])
-AM_CONDITIONAL([INSTALL_SHIPPED_HTML], [test -n "$make_install_shipped_htmldoc"])
-AM_CONDITIONAL([HAVE_PDFTOOLS], [test "x$groff_have_pdftools" = "xyes" ])
-AM_CONDITIONAL([HAVE_TEXI2DVI], [test "x$groff_have_texi2dvi" = "xyes" ])
+AM_CONDITIONAL([USE_GROHTML], [test "$use_grohtml" = yes])
+AM_CONDITIONAL([USE_PDFROFF], [test "$use_pdfroff" = yes])
+AM_CONDITIONAL([USE_GROPDF], [test "$use_gropdf" = yes])
+AM_CONDITIONAL([USE_GROFF_ALLOCATOR],
+               [test "$groff_use_own_allocator" = yes])
+AM_CONDITIONAL([HAVE_GHOSTSCRIPT], [test "$GHOSTSCRIPT" != no \
+                && test "$GHOSTSCRIPT" != missing])
+AM_CONDITIONAL([HAVE_URW_FONTS], [test "$groff_have_urw_fonts" = yes ])
+AM_CONDITIONAL([HAVE_TEXI2DVI], [test "$groff_have_texi2dvi" = yes ])
+AM_CONDITIONAL([USE_TEX], [test "$groff_use_tex" = yes ])
 
 AC_CONFIG_FILES([Makefile])
 AC_CONFIG_FILES([test-groff], [chmod +x test-groff])
 AC_OUTPUT
 
 echo "
-${PACKAGE_NAME} version ${PACKAGE_VERSION}
+$PACKAGE_NAME version $PACKAGE_VERSION
 ----------------------------------------------------------------------
- Prefix                          : ${prefix}
- Compiler                        : ${CC} ${CFLAGS} ${CPPFLAGS}"
-if test "x$groff_no_x" = "xyes"; then
-echo "\
- X11 support                     : no"
-else
-echo "\
- X11 support                     : yes
- X11 resources dir               : $appresdir"
+ installation directory prefix    : $prefix"
+if test -n "$g"
+then
+  echo "\
+ command name prefix              : $g"
+  if test -n "$tmac_wrap"
+  then
+  echo "\
+ prefix used for macro packages   : $tmac_wrap"
+  fi
 fi
-if test "x$doc" = x; then
 echo "\
- Doc build                       : no"
+ C++ compiler and options         : $CXX $CXXFLAGS $CPPFLAGS
+ use libgroff's memory allocator  : $groff_use_own_allocator
+ C compiler and options           : $CC $CFLAGS $CPPFLAGS
+ Perl interpreter version         : $perl_version"
+if test "$groff_no_x" = yes
+then
+  echo "\
+ X11 support                      : disabled"
 else
-echo "\
- Doc build                       : ${doc} "
+  echo "\
+ X11 support                      : enabled
+ X11 app defaults directory       : $appdefdir"
 fi
 echo "\
- URW fonts for pdf               : $groff_have_urw_fonts
- Use uchardet library for preconv: $groff_have_uchardet
- pdftools for distcheck          : $groff_have_pdftools"
+ 'groff -l' uses print spooler    : $groff_have_spooler
+ use URW fonts for PDF output     : $groff_have_urw_fonts"
+if test "$groff_have_urw_fonts" = yes
+then
+ echo "\
+ URW fonts directory              : $urwfontsdir"
+fi
 echo "\
+ preconv can use uchardet library : $groff_have_uchardet
+ can build groff.dvi, groff.pdf   : $groff_use_tex
 ----------------------------------------------------------------------"
 
-GROFF_APPRESDIR_CHECK
-GROFF_URW_FONTS_CHECK
-GROFF_UCHARDET_CHECK
+GROFF_APPDEFDIR_NOTICE
+GROFF_AWK_NOTICE
+GROFF_GHOSTSCRIPT_AVAILABILITY_NOTICE
+GROFF_GHOSTSCRIPT_VERSION_NOTICE
+GROFF_URW_FONTS_NOTICE
+GROFF_UCHARDET_NOTICE
+GROFF_GROHTML_PROGRAM_NOTICE
+GROFF_PDFROFF_PROGRAM_NOTICE
+GROFF_GROPDF_PROGRAM_NOTICE