1 # Process this file with autoconf to produce a configure script.
5 AC_CONFIG_HEADERS([src/include/config.h:src/include/config.hin])
6 AC_CONFIG_SRCDIR([src/roff/groff/groff.cpp])
15 GROFF_APPRESDIR_OPTION
16 GROFF_APPRESDIR_DEFAULT
18 AC_PATH_PROG([PERLPATH], [perl], [/usr/bin/perl])
26 # use a dummy substitution if no csh hack is necessary to avoid errors
27 # with non-GNU sed programs
28 GROFF_CSH_HACK([SH_SCRIPT_SED_CMD='1s/.*/:/'], [SH_SCRIPT_SED_CMD='1s/a/a/'])
29 AC_SUBST([SH_SCRIPT_SED_CMD])
32 AC_CHECK_HEADERS([stdlib.h unistd.h dirent.h limits.h sys/dir.h \
33 string.h strings.h math.h sys/time.h direct.h process.h])
37 # checks for header stuff
39 GROFF_NEED_DECLARATION([gettimeofday])
40 GROFF_NEED_DECLARATION([hypot])
41 GROFF_NEED_DECLARATION([popen])
42 GROFF_NEED_DECLARATION([pclose])
43 GROFF_NEED_DECLARATION([putenv])
44 GROFF_NEED_DECLARATION([rand])
45 GROFF_NEED_DECLARATION([snprintf])
46 GROFF_NEED_DECLARATION([srand])
47 GROFF_NEED_DECLARATION([strcasecmp])
48 GROFF_NEED_DECLARATION([strncasecmp])
49 GROFF_NEED_DECLARATION([vfprintf])
50 GROFF_NEED_DECLARATION([vsnprintf])
58 GROFF_UNSIGNED_LONG_LONG
62 GROFF_STRUCT_EXCEPTION
64 # checks for libraries
68 # checks for functions
71 LIBS="$LIBS $LIBC $LIBM"
72 AC_REPLACE_FUNCS([fmod getcwd putenv snprintf strcasecmp \
73 strerror strncasecmp strtol])
74 # vsnprintf is in the same source file as snprintf
75 AC_CHECK_FUNCS([vsnprintf], [], [AC_LIBOBJ([snprintf])])
77 AC_CHECK_FUNCS([gettimeofday isatty kill rename setlocale strsep])
79 AC_CHECK_DECLS([sys_siglist])
81 # checks for compiler characteristics
85 # checks for operating system services
89 GROFF_BROKEN_SPOOLER_FLAGS
93 GROFF_TARGET_PATH_SEPARATOR
96 GROFF_PNMTOPS_NOSETPAGE
98 AC_CONFIG_FILES([stamp-h], [echo timestamp > stamp-h])
99 AC_CONFIG_FILES([Makefile doc/Makefile src/utils/xtotroff/Makefile])
100 AC_CONFIG_FILES([contrib/gdiffmk/tests/runtests],
101 [chmod +x contrib/gdiffmk/tests/runtests])
102 AC_CONFIG_FILES([test-groff], [chmod +x test-groff])
105 GROFF_APPRESDIR_CHECK