summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwlemb <wlemb>2000-05-31 14:18:41 +0000
committerwlemb <wlemb>2000-05-31 14:18:41 +0000
commit8e3dd5967e77a57e8e2359e80421686ed0f9c622 (patch)
tree0ebf8d45f42e54635deeba0dcbeba2e68e368490
parentbbc23036e5152f165a47f9247c4bfbed293bfd31 (diff)
downloadgroff-8e3dd5967e77a57e8e2359e80421686ed0f9c622.tar.gz
* src/devices/grolbp/lbp.cc (set_papersizes): Add declaration of
strncasecmp(). * aclocal.m4 (GROFF_SRAND): New function to test the return value of srand() -- at least SunOS 4.1.3 uses `int' instead of `void'. * configure.in: Use it. * src/preproc/pic/pic.y, src/preproc/pic/pic.cc: Use it. * configure, Makefile.in: Updated. * configure.in: Add test for strncasecmp(). * src/include/lib.h: Use it.
-rw-r--r--ChangeLog16
-rw-r--r--Makefile.in1
-rw-r--r--aclocal.m413
-rwxr-xr-xconfigure159
-rwxr-xr-xconfigure.in3
-rwxr-xr-xsrc/devices/grohtml/ChangeLog4
-rwxr-xr-xsrc/devices/grohtml/html.cc5
-rw-r--r--src/devices/grolbp/lbp.cc6
-rw-r--r--src/include/lib.h4
-rwxr-xr-xsrc/preproc/pic/pic.cc6
-rw-r--r--src/preproc/pic/pic.y4
11 files changed, 159 insertions, 62 deletions
diff --git a/ChangeLog b/ChangeLog
index e2a9e744..da5ea954 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,19 @@
+2000-05-31 Keith Thompson <kst@sdsc.edu>
+
+ * src/devices/grolbp/lbp.cc (set_papersizes): Add declaration of
+ strncasecmp().
+
+2000-05-31 Werner LEMBERG <wl@gnu.org>
+
+ * aclocal.m4 (GROFF_SRAND): New function to test the return value
+ of srand() -- at least SunOS 4.1.3 uses `int' instead of `void'.
+ * configure.in: Use it.
+ * src/preproc/pic/pic.y, src/preproc/pic/pic.cc: Use it.
+ * configure, Makefile.in: Updated.
+
+ * configure.in: Add test for strncasecmp().
+ * src/include/lib.h: Use it.
+
2000-05-29 Andrej Borsenkow <Andrej.Borsenkow@mow.siemens.ru>
* src/preproc/grn/Makefile.sub: Add MLIB.
diff --git a/Makefile.in b/Makefile.in
index 5eeeb34b..43bbb3be 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -173,6 +173,7 @@ man7dir=$(manroot)/man$(man7ext)
# -DSTDLIB_H_DECLARES_PUTENV if your C++ <stdlib.h> declares putenv()
# -DSTDIO_H_DECLARES_POPEN if your C++ <stdio.h> declares popen()
# -DSTDIO_H_DECLARES_PCLOSE if your C++ <stdio.h> declares pclose()
+# -DRET_TYPE_SRAND_IS_VOID if your srand() returns void or int
# -DHAVE_SYS_NERR if you have sysnerr in <errno.h> or <stdio.h>
# -DHAVE_SYS_ERRLIST if you have sys_errlist in <errno.h> or
# <stdio.h>
diff --git a/aclocal.m4 b/aclocal.m4
index 77a4d800..8bc06f50 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -136,6 +136,19 @@ AC_MSG_RESULT(yes);AC_DEFINE(STDIO_H_DECLARES_PCLOSE))
AC_LANG_RESTORE])dnl
dnl
dnl
+dnl srand() of SunOS 4.1.3 has return type int instead of void
+dnl
+AC_DEFUN(GROFF_SRAND,
+[AC_LANG_SAVE
+AC_LANG_CPLUSPLUS
+AC_MSG_CHECKING([for return type of srand])
+AC_TRY_COMPILE([#include <stdlib.h>
+extern "C" { void srand(unsigned int); }],,
+AC_MSG_RESULT(void);AC_DEFINE(RET_TYPE_SRAND_IS_VOID),
+AC_MSG_RESULT(int))
+AC_LANG_RESTORE])dnl
+dnl
+dnl
AC_DEFUN(GROFF_SYS_NERR,
[AC_LANG_SAVE
AC_LANG_CPLUSPLUS
diff --git a/configure b/configure
index d5a2d335..bdbb33be 100755
--- a/configure
+++ b/configure
@@ -1689,18 +1689,57 @@ ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cxx_cross
-echo $ac_n "checking for sys_nerr in <errno.h> or <stdio.h>""... $ac_c" 1>&6
-echo "configure:1694: checking for sys_nerr in <errno.h> or <stdio.h>" >&5
+echo $ac_n "checking for return type of srand""... $ac_c" 1>&6
+echo "configure:1694: checking for return type of srand" >&5
cat > conftest.$ac_ext <<EOF
#line 1696 "configure"
#include "confdefs.h"
+#include <stdlib.h>
+extern "C" { void srand(unsigned int); }
+int main() {
+
+; return 0; }
+EOF
+if { (eval echo configure:1704: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ echo "$ac_t""void" 1>&6;cat >> confdefs.h <<\EOF
+#define RET_TYPE_SRAND_IS_VOID 1
+EOF
+
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ echo "$ac_t""int" 1>&6
+fi
+rm -f conftest*
+ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+
+ac_ext=C
+# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cxx_cross
+
+echo $ac_n "checking for sys_nerr in <errno.h> or <stdio.h>""... $ac_c" 1>&6
+echo "configure:1733: checking for sys_nerr in <errno.h> or <stdio.h>" >&5
+cat > conftest.$ac_ext <<EOF
+#line 1735 "configure"
+#include "confdefs.h"
#include <errno.h>
#include <stdio.h>
int main() {
int k; k = sys_nerr;
; return 0; }
EOF
-if { (eval echo configure:1704: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1743: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
echo "$ac_t""yes" 1>&6;cat >> confdefs.h <<\EOF
#define HAVE_SYS_NERR 1
@@ -1729,9 +1768,9 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes
cross_compiling=$ac_cv_prog_cxx_cross
echo $ac_n "checking for sys_errlist in <errno.h> or <stdio.h>""... $ac_c" 1>&6
-echo "configure:1733: checking for sys_errlist in <errno.h> or <stdio.h>" >&5
+echo "configure:1772: checking for sys_errlist in <errno.h> or <stdio.h>" >&5
cat > conftest.$ac_ext <<EOF
-#line 1735 "configure"
+#line 1774 "configure"
#include "confdefs.h"
#include <errno.h>
#include <stdio.h>
@@ -1739,7 +1778,7 @@ int main() {
int k; k = (int)sys_errlist[0];
; return 0; }
EOF
-if { (eval echo configure:1743: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1782: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
echo "$ac_t""yes" 1>&6;cat >> confdefs.h <<\EOF
#define HAVE_SYS_ERRLIST 1
@@ -1768,9 +1807,9 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes
cross_compiling=$ac_cv_prog_cxx_cross
echo $ac_n "checking declaration of hypot""... $ac_c" 1>&6
-echo "configure:1772: checking declaration of hypot" >&5
+echo "configure:1811: checking declaration of hypot" >&5
cat > conftest.$ac_ext <<EOF
-#line 1774 "configure"
+#line 1813 "configure"
#include "confdefs.h"
#include <math.h>
extern "C" { double hypot(double,double); }
@@ -1778,7 +1817,7 @@ int main() {
; return 0; }
EOF
-if { (eval echo configure:1782: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1821: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
echo "$ac_t""no" 1>&6
else
@@ -1807,16 +1846,16 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes
cross_compiling=$ac_cv_prog_cxx_cross
echo $ac_n "checking C++ <osfcn.h>""... $ac_c" 1>&6
-echo "configure:1811: checking C++ <osfcn.h>" >&5
+echo "configure:1850: checking C++ <osfcn.h>" >&5
cat > conftest.$ac_ext <<EOF
-#line 1813 "configure"
+#line 1852 "configure"
#include "confdefs.h"
#include <osfcn.h>
int main() {
read(0, 0, 0); open(0, 0);
; return 0; }
EOF
-if { (eval echo configure:1820: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1859: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
echo "$ac_t""yes" 1>&6;cat >> confdefs.h <<\EOF
#define HAVE_CC_OSFCN_H 1
@@ -1845,16 +1884,16 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes
cross_compiling=$ac_cv_prog_cxx_cross
echo $ac_n "checking C++ <limits.h>""... $ac_c" 1>&6
-echo "configure:1849: checking C++ <limits.h>" >&5
+echo "configure:1888: checking C++ <limits.h>" >&5
cat > conftest.$ac_ext <<EOF
-#line 1851 "configure"
+#line 1890 "configure"
#include "confdefs.h"
#include <limits.h>
int main() {
int x = INT_MIN; int y = INT_MAX; int z = UCHAR_MAX;
; return 0; }
EOF
-if { (eval echo configure:1858: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1897: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
echo "$ac_t""yes" 1>&6;cat >> confdefs.h <<\EOF
#define HAVE_CC_LIMITS_H 1
@@ -1883,16 +1922,16 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes
cross_compiling=$ac_cv_prog_cxx_cross
echo $ac_n "checking for declaration of time_t""... $ac_c" 1>&6
-echo "configure:1887: checking for declaration of time_t" >&5
+echo "configure:1926: checking for declaration of time_t" >&5
cat > conftest.$ac_ext <<EOF
-#line 1889 "configure"
+#line 1928 "configure"
#include "confdefs.h"
#include <time.h>
int main() {
time_t t = time(0); struct tm *p = localtime(&t);
; return 0; }
EOF
-if { (eval echo configure:1896: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1935: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
echo "$ac_t""yes" 1>&6
else
@@ -1913,12 +1952,12 @@ ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$a
cross_compiling=$ac_cv_prog_cc_cross
echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
-echo "configure:1917: checking return type of signal handlers" >&5
+echo "configure:1956: checking return type of signal handlers" >&5
if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1922 "configure"
+#line 1961 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <signal.h>
@@ -1935,7 +1974,7 @@ int main() {
int i;
; return 0; }
EOF
-if { (eval echo configure:1939: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1978: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_type_signal=void
else
@@ -1954,16 +1993,16 @@ EOF
echo $ac_n "checking struct exception""... $ac_c" 1>&6
-echo "configure:1958: checking struct exception" >&5
+echo "configure:1997: checking struct exception" >&5
cat > conftest.$ac_ext <<EOF
-#line 1960 "configure"
+#line 1999 "configure"
#include "confdefs.h"
#include <math.h>
int main() {
struct exception e;
; return 0; }
EOF
-if { (eval echo configure:1967: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2006: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
echo "$ac_t""yes" 1>&6;cat >> confdefs.h <<\EOF
#define HAVE_STRUCT_EXCEPTION 1
@@ -1977,7 +2016,7 @@ else
fi
rm -f conftest*
echo $ac_n "checking for sin in -lm""... $ac_c" 1>&6
-echo "configure:1981: checking for sin in -lm" >&5
+echo "configure:2020: checking for sin in -lm" >&5
ac_lib_var=`echo m'_'sin | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -1985,7 +2024,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lm $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 1989 "configure"
+#line 2028 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -1996,7 +2035,7 @@ int main() {
sin()
; return 0; }
EOF
-if { (eval echo configure:2000: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2039: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -2021,17 +2060,17 @@ for ac_hdr in unistd.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2025: checking for $ac_hdr" >&5
+echo "configure:2064: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2030 "configure"
+#line 2069 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2035: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2074: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -2060,12 +2099,12 @@ done
for ac_func in getpagesize
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2064: checking for $ac_func" >&5
+echo "configure:2103: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2069 "configure"
+#line 2108 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -2088,7 +2127,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:2092: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2131: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -2113,7 +2152,7 @@ fi
done
echo $ac_n "checking for working mmap""... $ac_c" 1>&6
-echo "configure:2117: checking for working mmap" >&5
+echo "configure:2156: checking for working mmap" >&5
if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2121,7 +2160,7 @@ else
ac_cv_func_mmap_fixed_mapped=no
else
cat > conftest.$ac_ext <<EOF
-#line 2125 "configure"
+#line 2164 "configure"
#include "confdefs.h"
/* Thanks to Mike Haertel and Jim Avera for this test.
@@ -2261,7 +2300,7 @@ main()
}
EOF
-if { (eval echo configure:2265: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2304: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_func_mmap_fixed_mapped=yes
else
@@ -2288,12 +2327,12 @@ LIBS="$LIBS -lc $LIBM"
for ac_func in fmod strtol getcwd strerror putenv
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2292: checking for $ac_func" >&5
+echo "configure:2331: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2297 "configure"
+#line 2336 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -2316,7 +2355,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:2320: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2359: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -2343,15 +2382,15 @@ done
LIBS="$saved_libs"
-for ac_func in rename mkstemp strcasecmp strsep strdup
+for ac_func in rename mkstemp strcasecmp strncasecmp strsep strdup
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2350: checking for $ac_func" >&5
+echo "configure:2389: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2355 "configure"
+#line 2394 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -2374,7 +2413,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:2378: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2417: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -2399,12 +2438,12 @@ fi
done
echo $ac_n "checking for sys_siglist declaration in signal.h or unistd.h""... $ac_c" 1>&6
-echo "configure:2403: checking for sys_siglist declaration in signal.h or unistd.h" >&5
+echo "configure:2442: checking for sys_siglist declaration in signal.h or unistd.h" >&5
if eval "test \"`echo '$''{'ac_cv_decl_sys_siglist'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2408 "configure"
+#line 2447 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <signal.h>
@@ -2416,7 +2455,7 @@ int main() {
char *msg = *(sys_siglist + 1);
; return 0; }
EOF
-if { (eval echo configure:2420: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2459: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_decl_sys_siglist=yes
else
@@ -2445,16 +2484,16 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes
cross_compiling=$ac_cv_prog_cxx_cross
echo $ac_n "checking whether ANSI array delete syntax supported""... $ac_c" 1>&6
-echo "configure:2449: checking whether ANSI array delete syntax supported" >&5
+echo "configure:2488: checking whether ANSI array delete syntax supported" >&5
cat > conftest.$ac_ext <<EOF
-#line 2451 "configure"
+#line 2490 "configure"
#include "confdefs.h"
int main() {
char *p = new char[5]; delete [] p;
; return 0; }
EOF
-if { (eval echo configure:2458: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2497: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
echo "$ac_t""yes" 1>&6
else
@@ -2483,16 +2522,16 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes
cross_compiling=$ac_cv_prog_cxx_cross
echo $ac_n "checking traditional preprocessor""... $ac_c" 1>&6
-echo "configure:2487: checking traditional preprocessor" >&5
+echo "configure:2526: checking traditional preprocessor" >&5
cat > conftest.$ac_ext <<EOF
-#line 2489 "configure"
+#line 2528 "configure"
#include "confdefs.h"
#define name2(a,b) a/**/b
int main() {
int name2(foo,bar);
; return 0; }
EOF
-if { (eval echo configure:2496: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2535: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
echo "$ac_t""yes" 1>&6;cat >> confdefs.h <<\EOF
#define TRADITIONAL_CPP 1
@@ -2513,12 +2552,12 @@ ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$a
cross_compiling=$ac_cv_prog_cc_cross
echo $ac_n "checking w_coredump""... $ac_c" 1>&6
-echo "configure:2517: checking w_coredump" >&5
+echo "configure:2556: checking w_coredump" >&5
if test "$cross_compiling" = yes; then
echo "$ac_t""no" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2522 "configure"
+#line 2561 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/wait.h>
@@ -2533,7 +2572,7 @@ main()
#endif
}
EOF
-if { (eval echo configure:2537: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2576: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
echo "$ac_t""yes" 1>&6;cat >> confdefs.h <<\EOF
#define WCOREFLAG 0200
@@ -2549,12 +2588,12 @@ rm -fr conftest*
fi
echo $ac_n "checking default value for grops -b option""... $ac_c" 1>&6
-echo "configure:2553: checking default value for grops -b option" >&5
+echo "configure:2592: checking default value for grops -b option" >&5
test -n "${BROKEN_SPOOLER_FLAGS}" || BROKEN_SPOOLER_FLAGS=7
echo "$ac_t""$BROKEN_SPOOLER_FLAGS" 1>&6
echo $ac_n "checking default paper size""... $ac_c" 1>&6
-echo "configure:2558: checking default paper size" >&5
+echo "configure:2597: checking default paper size" >&5
if test -z "$PAGE"; then
descfile=
if test -r $prefix/share/groff/font/devps/DESC; then
@@ -2589,7 +2628,7 @@ test -n "$PAGE" || PAGE=letter
echo "$ac_t""$PAGE" 1>&6
echo $ac_n "checking for existing troff installation""... $ac_c" 1>&6
-echo "configure:2593: checking for existing troff installation" >&5
+echo "configure:2632: checking for existing troff installation" >&5
if test "x`(echo .tm '|n(.g' | tr '|' '\\\\' | troff -z -i 2>&1) 2>/dev/null`" = x0; then
echo "$ac_t""yes" 1>&6
g=g
@@ -2599,7 +2638,7 @@ else
fi
echo $ac_n "checking for prefix of system macro packages""... $ac_c" 1>&6
-echo "configure:2603: checking for prefix of system macro packages" >&5
+echo "configure:2642: checking for prefix of system macro packages" >&5
sys_tmac_prefix=
sys_tmac_file_prefix=
for d in /usr/share/lib/tmac /usr/lib/tmac; do
@@ -2619,7 +2658,7 @@ echo "$ac_t""$sys_tmac_prefix" 1>&6
tmac_wrap=
echo $ac_n "checking which system macro packages should be made available""... $ac_c" 1>&6
-echo "configure:2623: checking which system macro packages should be made available" >&5
+echo "configure:2662: checking which system macro packages should be made available" >&5
if test "x$sys_tmac_file_prefix" = "xtmac."; then
for f in $sys_tmac_prefix*; do
suff=`echo $f | sed -e "s;$sys_tmac_prefix;;"`
diff --git a/configure.in b/configure.in
index 0521b8ff..6d12d542 100755
--- a/configure.in
+++ b/configure.in
@@ -24,6 +24,7 @@ GROFF_POSIX
GROFF_PUTENV
GROFF_POPEN
GROFF_PCLOSE
+GROFF_SRAND
GROFF_SYS_NERR
GROFF_SYS_ERRLIST
GROFF_HYPOT
@@ -41,7 +42,7 @@ saved_libs="$LIBS"
LIBS="$LIBS -lc $LIBM"
AC_REPLACE_FUNCS(fmod strtol getcwd strerror putenv)
LIBS="$saved_libs"
-AC_CHECK_FUNCS(rename mkstemp strcasecmp strsep strdup)
+AC_CHECK_FUNCS(rename mkstemp strcasecmp strncasecmp strsep strdup)
AC_DECL_SYS_SIGLIST
dnl checks for compiler characteristics
GROFF_ARRAY_DELETE
diff --git a/src/devices/grohtml/ChangeLog b/src/devices/grohtml/ChangeLog
index c631190d..65627e3a 100755
--- a/src/devices/grohtml/ChangeLog
+++ b/src/devices/grohtml/ChangeLog
@@ -1,3 +1,7 @@
+2000-05-31 Keith Thompson <kst@SDSC.EDU>
+
+ * html.cc: Added declaration of mktemp() as needed for SunOS 4.1.3.
+
2000-05-11 Werner LEMBERG <wl@gnu.org>
* output.cc (simple_output::simple_output): Reordering of
diff --git a/src/devices/grohtml/html.cc b/src/devices/grohtml/html.cc
index f63b0af4..8c033ad1 100755
--- a/src/devices/grohtml/html.cc
+++ b/src/devices/grohtml/html.cc
@@ -35,6 +35,11 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include <unistd.h>
#endif
+extern "C" {
+ // SunOS 4.1.3 fails to declare this in stdlib.h
+ char *mktemp(char *);
+}
+
#include <stdio.h>
#include <fcntl.h>
diff --git a/src/devices/grolbp/lbp.cc b/src/devices/grolbp/lbp.cc
index faab20e4..db64a9b0 100644
--- a/src/devices/grolbp/lbp.cc
+++ b/src/devices/grolbp/lbp.cc
@@ -31,6 +31,12 @@ TODO
#include "lbp.h"
#include "charset.h"
+#ifdef HAVE_STRNCASECMP
+extern "C" {
+ // SunOS's string.h fails to declare this.
+ int strncasecmp(const char *, const char *, int);
+}
+#endif
static short int papersize = -1, // papersize
orientation = -1 , // orientation
diff --git a/src/include/lib.h b/src/include/lib.h
index 19471709..bfc57c35 100644
--- a/src/include/lib.h
+++ b/src/include/lib.h
@@ -61,6 +61,10 @@ inline int illegal_input_char(int c)
#define strcasecmp(a,b) strcmp((a),(b))
#endif
+#ifndef HAVE_STRNCASECMP
+#define strncasecmp(a,b,c) strncmp((a),(b),(c))
+#endif
+
#ifdef HAVE_CC_LIMITS_H
#include <limits.h>
#else /* not HAVE_CC_LIMITS_H */
diff --git a/src/preproc/pic/pic.cc b/src/preproc/pic/pic.cc
index 045d5d24..1130fdce 100755
--- a/src/preproc/pic/pic.cc
+++ b/src/preproc/pic/pic.cc
@@ -1,6 +1,6 @@
#ifndef lint
/*static char yysccsid[] = "from: @(#)yaccpar 1.9 (Berkeley) 02/21/93";*/
-static char yyrcsid[] = "$Id: pic.cc,v 1.1 2000/02/06 09:38:22 wlemb Exp $";
+static char yyrcsid[] = "$Id: pic.cc,v 1.2 2000/05/31 14:18:50 wlemb Exp $";
#endif
#define YYBYACC 1
#define YYMAJOR 1
@@ -33,7 +33,11 @@ extern "C" {
#undef srand
extern "C" {
int rand();
+#ifdef RET_TYPE_SRAND_IS_VOID
void srand(unsigned int);
+#else
+ int srand(unsigned int);
+#endif
}
/* Maximum number of characters produced by printf("%g") */
diff --git a/src/preproc/pic/pic.y b/src/preproc/pic/pic.y
index 2477085c..d9191b45 100644
--- a/src/preproc/pic/pic.y
+++ b/src/preproc/pic/pic.y
@@ -40,7 +40,11 @@ extern "C" {
#undef srand
extern "C" {
int rand();
+#ifdef RET_TYPE_SRAND_IS_VOID
void srand(unsigned int);
+#else
+ int srand(unsigned int);
+#endif
}
/* Maximum number of characters produced by printf("%g") */