summaryrefslogtreecommitdiff
path: root/aclocal.m4
diff options
context:
space:
mode:
authorwlemb <wlemb>2003-12-06 13:09:40 +0000
committerwlemb <wlemb>2003-12-06 13:09:40 +0000
commita0ec1c694798a91a3df34eee89c5547dac90e432 (patch)
treeed2273a0aeb7c3e0d154ae74294e5e864fc32b9a /aclocal.m4
parent0c132242916f13129299fe6739b1be939a85d456 (diff)
downloadgroff-a0ec1c694798a91a3df34eee89c5547dac90e432.tar.gz
Use path separator character of target platform for compiled-in
default paths. * aclocal.m4 (GROFF_TARGET_PATH_SEPARATOR): New macro. * configure.ac: Use GROFF_TARGET_PATH_SEPARATOR. * configure: Regenerated. * Makefile.in (SEP): Use GROFF_PATH_SEPARATOR. * src/include/nonposix.h (PATH_SEP_CHAR): New definition. Replace `PATH_SEP[0]' with `PATH_SEP_CHAR' everywhere.
Diffstat (limited to 'aclocal.m4')
-rw-r--r--aclocal.m430
1 files changed, 30 insertions, 0 deletions
diff --git a/aclocal.m4 b/aclocal.m4
index e755a638..dff9a478 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -832,3 +832,33 @@ AC_DEFUN([GROFF_UINTMAX_T],
[Define uintmax_t to `unsigned long' or `unsigned long long' if
<inttypes.h> does not exist.])
fi])
+
+# Identify PATH_SEPARATOR character to use in GROFF_FONT_PATH and
+# GROFF_TMAC_PATH which is appropriate for the target system (POSIX=':',
+# MS-DOS/Win32=';').
+#
+# The logic to resolve this test is already encapsulated in
+# `${srcdir}/src/include/nonposix.h'.
+
+AC_DEFUN([GROFF_TARGET_PATH_SEPARATOR],
+ [AC_MSG_CHECKING([separator character to use in groff search paths])
+ cp ${srcdir}/src/include/nonposix.h conftest.h
+ AC_COMPILE_IFELSE([
+ AC_LANG_PROGRAM([[
+
+#include <ctype.h>
+#include "conftest.h"
+
+ ]],
+ [[
+
+#if PATH_SEP_CHAR == ';'
+make an error "Path separator is ';'"
+#endif
+
+ ]])
+ ],
+ [GROFF_PATH_SEPARATOR=":"],
+ [GROFF_PATH_SEPARATOR=";"])
+ AC_MSG_RESULT([$GROFF_PATH_SEPARATOR])
+ AC_SUBST(GROFF_PATH_SEPARATOR)])