1# Autoconf configuration file for groff. 2# Copyright (C) 1989-1995, 2001, 2002, 2003, 2004, 2005 3# Free Software Foundation, Inc. 4# 5# This file is part of groff. 6# 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. 11# 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. 16# 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. 20# 21# Process this file with autoconf to produce a configure script. 22 23AC_INIT 24AC_PREREQ(2.59) 25 26AC_CONFIG_HEADERS([src/include/config.h:src/include/config.hin]) 27AC_CONFIG_SRCDIR([src/roff/groff/groff.cpp]) 28 29# checks for programs 30AC_PROG_CC 31AC_PROG_CXX 32GROFF_CXX_CHECK 33GROFF_EBCDIC 34GROFF_OS390 35GROFF_X11 36GROFF_APPRESDIR_OPTION 37GROFF_APPRESDIR_DEFAULT 38GROFF_PRINT 39AC_PATH_PROG([PERLPATH], [perl], [/usr/bin/perl]) 40GROFF_PROG_YACC 41AC_PROG_RANLIB 42GROFF_INSTALL_SH 43GROFF_INSTALL_INFO 44AC_PROG_INSTALL 45AC_PROG_LN_S 46 47# use a dummy substitution if no csh hack is necessary to avoid errors 48# with non-GNU sed programs 49GROFF_CSH_HACK([SH_SCRIPT_SED_CMD='1s/.*/:/'], [SH_SCRIPT_SED_CMD='1s/a/a/']) 50AC_SUBST([SH_SCRIPT_SED_CMD]) 51 52# checks for headers 53AC_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]) 55GROFF_ISC_SYSV3 56GROFF_POSIX 57 58# checks for header stuff 59GROFF_SRAND 60GROFF_NEED_DECLARATION([gettimeofday]) 61GROFF_NEED_DECLARATION([hypot]) 62GROFF_NEED_DECLARATION([popen]) 63GROFF_NEED_DECLARATION([pclose]) 64GROFF_NEED_DECLARATION([putenv]) 65GROFF_NEED_DECLARATION([rand]) 66GROFF_NEED_DECLARATION([snprintf]) 67GROFF_NEED_DECLARATION([srand]) 68GROFF_NEED_DECLARATION([strcasecmp]) 69GROFF_NEED_DECLARATION([strncasecmp]) 70GROFF_NEED_DECLARATION([vfprintf]) 71GROFF_NEED_DECLARATION([vsnprintf]) 72GROFF_SYS_NERR 73GROFF_SYS_ERRLIST 74GROFF_OSFCN_H 75GROFF_LIMITS_H 76GROFF_INTTYPES_H 77 78# checks for typedefs 79GROFF_UNSIGNED_LONG_LONG 80GROFF_UINTMAX_T 81GROFF_TIME_T 82GROFF_TYPE_SIGNAL 83GROFF_STRUCT_EXCEPTION 84 85# checks for libraries 86GROFF_LIBC 87GROFF_LIBM 88 89# checks for functions 90AC_FUNC_MMAP 91saved_libs="$LIBS" 92LIBS="$LIBS $LIBC $LIBM" 93AC_REPLACE_FUNCS([fmod getcwd putenv snprintf strcasecmp \ 94 strerror strncasecmp strtol]) 95# vsnprintf is in the same source file as snprintf 96AC_CHECK_FUNCS([vsnprintf], [], [AC_LIBOBJ([snprintf])]) 97LIBS="$saved_libs" 98AC_CHECK_FUNCS([gettimeofday isatty kill rename setlocale strsep]) 99GROFF_MKSTEMP 100AC_CHECK_DECLS([sys_siglist]) 101 102# checks for compiler characteristics 103GROFF_ARRAY_DELETE 104GROFF_TRADITIONAL_CPP 105 106# checks for operating system services 107GROFF_WCOREFLAG 108 109# other random stuff 110GROFF_BROKEN_SPOOLER_FLAGS 111GROFF_PAGE 112GROFF_G 113GROFF_TMAC 114GROFF_TARGET_PATH_SEPARATOR 115GROFF_HTML_PROGRAMS 116GROFF_PDFDOC_PROGRAMS 117GROFF_PNMTOPS_NOSETPAGE 118 119AC_CONFIG_FILES([stamp-h], [echo timestamp > stamp-h]) 120AC_CONFIG_FILES([Makefile doc/Makefile src/utils/xtotroff/Makefile]) 121AC_CONFIG_FILES([contrib/gdiffmk/tests/runtests], 122 [chmod +x contrib/gdiffmk/tests/runtests]) 123AC_CONFIG_FILES([test-groff], [chmod +x test-groff]) 124AC_OUTPUT 125 126GROFF_APPRESDIR_CHECK 127