summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwl <wl>2006-01-03 23:57:03 +0000
committerwl <wl>2006-01-03 23:57:03 +0000
commitd934ff6d9368d954c0b532cd4c23f4d4c3591cce (patch)
tree0d41502d8780d600bc3ff86604bf05f6d2312c86
parent1768e1210ff633038445e4eafb3027d53712c2b4 (diff)
downloadgroff-d934ff6d9368d954c0b532cd4c23f4d4c3591cce.tar.gz
* m4/groff.m4: Renamed from aclocal.m4.
* m4/codeset.m4: New file, from gnulib. * m4/iconv.m4: New file, from gnulib. * m4/lib-ld.m4, m4/lib-link.m4, m4/lib-prefix.m4: New files, from gnulib. * config.rpath: New file, from gnulib. * config.guess, config.sub: New files, from gnulib. * Makefile.sub (M4MACROS): New variable. (configure): Fix typo. (aclocal.m4): New rule. (stamp-h.in): Depend on aclocal.m4. * configure.ac: Invoke AM_ICONV and AM_LANGINFO_CODESET. * Makefile.in (LIBICONV): New variable. (MDEFINES): Pass it to recursive makes. * src/preproc/preconv/preconv.cpp: Use HAVE_LANGINFO_CODESET and HAVE_ICONV instead of I18N macro. * src/preproc/preconv/Makefile.sub (EXTRA_LDFLAGS): New variable. * aclocal.m4, configure, src/include/config.hin: (Re)generated. * doc/Makefile.in (webpage.html): Simplify. * doc/Makefile.sub (webpage.html): Synchronize with doc/Makefile.in. * doc/webpage.ms, tmac/groff_www.man, tmac/www.tmac: Minor updates.
-rw-r--r--ChangeLog48
-rw-r--r--Makefile.in5
-rw-r--r--Makefile.sub13
-rw-r--r--aclocal.m41224
-rwxr-xr-xconfig.guess1479
-rwxr-xr-xconfig.rpath571
-rwxr-xr-xconfig.sub1606
-rwxr-xr-xconfigure951
-rw-r--r--configure.ac2
-rw-r--r--doc/Makefile.in6
-rw-r--r--doc/Makefile.sub6
-rw-r--r--doc/webpage.ms24
-rw-r--r--m4/codeset.m421
-rw-r--r--m4/groff.m41205
-rw-r--r--m4/iconv.m4101
-rw-r--r--m4/lib-ld.m4110
-rw-r--r--m4/lib-link.m4554
-rw-r--r--m4/lib-prefix.m4185
-rw-r--r--src/include/config.hin9
-rw-r--r--src/preproc/preconv/Makefile.sub1
-rw-r--r--src/preproc/preconv/preconv.cpp22
-rw-r--r--tmac/groff_www.man43
-rw-r--r--tmac/www.tmac178
23 files changed, 7037 insertions, 1327 deletions
diff --git a/ChangeLog b/ChangeLog
index 1b30d4a6..1378cc15 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,31 @@
+2006-01-03 Bruno Haible <bruno@clisp.org>
+
+ * m4/groff.m4: Renamed from aclocal.m4.
+ * m4/codeset.m4: New file, from gnulib.
+ * m4/iconv.m4: New file, from gnulib.
+ * m4/lib-ld.m4, m4/lib-link.m4, m4/lib-prefix.m4: New files, from
+ gnulib.
+ * config.rpath: New file, from gnulib.
+ * config.guess, config.sub: New files, from gnulib.
+ * Makefile.sub (M4MACROS): New variable.
+ (configure): Fix typo.
+ (aclocal.m4): New rule.
+ (stamp-h.in): Depend on aclocal.m4.
+ * configure.ac: Invoke AM_ICONV and AM_LANGINFO_CODESET.
+ * Makefile.in (LIBICONV): New variable.
+ (MDEFINES): Pass it to recursive makes.
+ * src/preproc/preconv/preconv.cpp: Use HAVE_LANGINFO_CODESET and
+ HAVE_ICONV instead of I18N macro.
+ * src/preproc/preconv/Makefile.sub (EXTRA_LDFLAGS): New variable.
+
+ * aclocal.m4, configure, src/include/config.hin: (Re)generated.
+
+2006-01-03 Werner LEMBERG <wl@gnu.org>
+
+ * doc/Makefile.in (webpage.html): Simplify.
+ * doc/Makefile.sub (webpage.html): Synchronize with doc/Makefile.in.
+ * doc/webpage.ms, tmac/groff_www.man, tmac/www.tmac: Minor updates.
+
2006-01-01 Werner LEMBERG <wl@gnu.org>
* tmac/doc-common (Os): Add some Darwin versions.
@@ -100,21 +128,21 @@
2005-11-28 Gaius Mulley <gaius@glam.ac.uk>
- * doc/Makefile.in: separate rule for webpage.html so that extra
- command line options can be passed to grohtml.
- * doc/groff.css: changed all margins to 0%.
- * doc/webpage.ms: now uses new macros ALN, LNS and LNE
- so that left navigation is exploited. Also updated webpage to
- contain new sections on licences, mailing lists, cvs/ftp
- access, groff dependencies and bug reports.
- * tmac/groff_www.man: documented the new macros ALN, LNS and LNE.
- * tmac/www.tmac: implemented the new macros ALN, LNS and LNE.
+ * doc/Makefile.in: Separate rule for webpage.html so that extra
+ command line options can be passed to grohtml.
+ * doc/groff.css: Change all margins to 0%.
+ * doc/webpage.ms: Now use new macros ALN, LNS, and LNE so that left
+ navigation is exploited. Also update webpage to contain new
+ sections on licences, mailing lists, cvs/ftp access, groff
+ dependencies, and bug reports.
+ * tmac/groff_www.man: Document the new macros ALN, LNS, and LNE.
+ * tmac/www.tmac: Implement the new macros ALN, LNS, and LNE.
2005-11-25 Gaius Mulley <gaius@glam.ac.uk>
* src/devices/grohtml/post-html.cpp
(html_printer::do_file_components): Add fputs calls to emit the
- head contents and shutdown the head tag whenever a new file
+ head contents and shut down the head tag whenever a new file
component is generated.
2005-11-22 Gaius Mulley <gaius@glam.ac.uk>
diff --git a/Makefile.in b/Makefile.in
index 463b1e47..57160d06 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -278,8 +278,10 @@ make_install_pdfdoc=@make_install_pdfdoc@
# -DHAVE_FMOD if you have fmod()
# -DHAVE_GETCWD if you have getcwd()
# -DHAVE_GETTIMEOFDAY if you have gettimeofday()
+# -DHAVE_ICONV if you have iconv()
# -DHAVE_ISATTY if you have isatty()
# -DHAVE_KILL if you have kill()
+# -DHAVE_LANGINFO_CODESET if you have nl_langinfo()
# -DHAVE_MKSTEMP if you have mkstemp()
# -DHAVE_MMAP if you have mmap()
# -DHAVE_PUTENV if you have putenv()
@@ -324,6 +326,7 @@ make_install_pdfdoc=@make_install_pdfdoc@
# -DLONG_FOR_TIME_T if localtime() takes a long * not a time_t *
# -DHAVE_STRUCT_EXCEPTION if <math.h> defines struct exception
# -DRETSIGTYPE=int if signal handlers return int not void
+# -DICONV_CONST=const if declaration of iconv() needs const
# -DIS_EBCDIC_HOST if the host's encoding is EBCDIC
# -DPAGE=A4 if the the printer's page size is A4
# -DGHOSTSCRIPT=gs the name (and directory if required) of the
@@ -368,6 +371,7 @@ OBJEXT=@OBJEXT@
LIBEXT=`case $(OBJEXT) in obj) echo lib;; *) echo a;; esac`
LIBS=@LIBS@
LIBM=@LIBM@
+LIBICONV=@LIBICONV@
RANLIB=@RANLIB@
INSTALL=@INSTALL@
INSTALL_PROGRAM=@INSTALL_PROGRAM@
@@ -422,6 +426,7 @@ MDEFINES= \
"INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \
"LDFLAGS=$(LDFLAGS)" \
"LIBEXT=$(LIBEXT)" \
+ "LIBICONV=$(LIBICONV)" \
"LIBM=$(LIBM)" \
"LIBOBJS=$(LIBOBJS)" \
"LIBS=$(LIBS)" \
diff --git a/Makefile.sub b/Makefile.sub
index 26523630..26dfda11 100644
--- a/Makefile.sub
+++ b/Makefile.sub
@@ -12,17 +12,26 @@ DISTCLEANFILES=\
groff.log
CLEANADD=Makefile.cfg conftest*
+M4MACROS = \
+ $(srcdir)/m4/groff.m4 \
+ $(srcdir)/m4/codeset.m4 \
+ $(srcdir)/m4/iconv.m4 \
+ $(srcdir)/m4/lib-link.m4 $(srcdir)/m4/lib-ld.m4 $(srcdir)/m4/lib-prefix.m4
+
distfiles: configure
-$(scrdir)/configure: configure.ac aclocal.m4
+$(srcdir)/configure: configure.ac $(srcdir)/aclocal.m4
cd $(srcdir) && autoconf
+$(srcdir)/aclocal.m4: $(M4MACROS)
+ cd $(srcdir) && aclocal -I m4
+
config.status: configure
$(SHELL) config.status --recheck
# autoheader might not change config.hin, so touch a stamp file.
$(srcdir)/config.hin: stamp-h.in
-$(srcdir)/stamp-h.in: configure.ac aclocal.m4
+$(srcdir)/stamp-h.in: configure.ac $(srcdir)/aclocal.m4
cd $(srcdir) && autoheader
echo timestamp > $(srcdir)/stamp-h.in
diff --git a/aclocal.m4 b/aclocal.m4
index ce88f550..705b6d91 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -1,1205 +1,19 @@
-# Autoconf macros for groff.
-# Copyright (C) 1989-1995, 2001, 2002, 2003, 2004, 2005
-# Free Software Foundation, Inc.
-#
-# This file is part of groff.
-#
-# groff is free software; you can redistribute it and/or modify it under
-# the terms of the GNU General Public License as published by the Free
-# Software Foundation; either version 2, 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
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with groff; see the file COPYING. If not, write to the Free Software
-# Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA.
-
-AC_DEFUN([GROFF_PRINT],
- [if test -z "$PSPRINT"; then
- AC_CHECK_PROGS([LPR], [lpr])
- AC_CHECK_PROGS([LP], [lp])
- if test -n "$LPR" && test -n "$LP"; then
- # HP-UX provides an lpr command that emulates lpr using lp,
- # but it doesn't have lpq; in this case we want to use lp
- # rather than lpr.
- AC_CHECK_PROGS([LPQ], [lpq])
- test -n "$LPQ" || LPR=
- fi
- if test -n "$LPR"; then
- PSPRINT="$LPR"
- elif test -n "$LP"; then
- PSPRINT="$LP"
- fi
- fi
- AC_SUBST([PSPRINT])
- AC_MSG_CHECKING([for command to use for printing PostScript files])
- AC_MSG_RESULT([$PSPRINT])
-
- # Figure out DVIPRINT from PSPRINT.
- AC_MSG_CHECKING([for command to use for printing dvi files])
- if test -n "$PSPRINT" && test -z "$DVIPRINT"; then
- if test "x$PSPRINT" = "xlpr"; then
- DVIPRINT="lpr -d"
- else
- DVIPRINT="$PSPRINT"
- fi
- fi
- AC_SUBST([DVIPRINT])
- AC_MSG_RESULT([$DVIPRINT])])
-
-# Bison generated parsers have problems with C++ compilers other than g++.
-# So byacc is preferred over bison.
-
-AC_DEFUN([GROFF_PROG_YACC],
- [AC_CHECK_PROGS([YACC], [byacc 'bison -y'], [yacc])])
-
-# We need makeinfo 4.8 or newer.
-
-AC_DEFUN([GROFF_MAKEINFO],
- [missing=
- AC_CHECK_PROG([MAKEINFO], [makeinfo], [makeinfo])
- if test -z "$MAKEINFO"; then
- missing="\`makeinfo' is missing."
- else
- AC_MSG_CHECKING([for makeinfo version])
- # We need an additional level of quoting to make sed's regexps work.
- [makeinfo_version=`$MAKEINFO --version 2>&1 \
- | sed -e 's/^.* \([^ ][^ ]*\)$/\1/' -e '1q'`]
- AC_MSG_RESULT([$makeinfo_version])
- # Consider only the first two numbers in version number string.
- [makeinfo_version_major=`echo $makeinfo_version \
- | sed 's/^\([0-9]*\).*$/\1/'`]
- if test -z "$makeinfo_version_major"; then
- makeinfo_version_major=0
- makeinfo_version_minor=0
- else
- [makeinfo_version_minor=`echo $makeinfo_version \
- | sed 's/^[^.][^.]*\(.*\)$/\1/'`]
- # No minor version number at all?
- if test -z "$makeinfo_version_minor"; then
- makeinfo_version_minor=0
- else
- [makeinfo_version_minor=`echo $makeinfo_version_minor \
- | sed 's/\.\([0-9]*\).*$/\1/'`]
- if test -z "$makeinfo_version_minor"; then
- makeinfo_version_minor=0
- fi
- fi
- fi
- fi
- makeinfo_version_numeric=`expr $makeinfo_version_major '*' 1000 \
- '+' $makeinfo_version_minor`
- if test $makeinfo_version_numeric -lt 4008; then
- missing="\`makeinfo' is too old."
- fi
-
- if test -n "$missing"; then
- if test ! -f doc/groff.info \
- || test ${srcdir}/doc/groff.texinfo -nt doc/groff.info; then
- AC_MSG_ERROR($missing
-[Get the `texinfo' package version 4.8 or newer.])
- else
- AC_MSG_WARN($missing
-[Get the `texinfo' package version 4.8 or newer if you want to convert
-`groff.texinfo' into a PDF or HTML document.])
- fi
- fi
- AC_SUBST([MAKEINFO])])
-
-# The following programs are needed for grohtml.
-
-AC_DEFUN([GROFF_HTML_PROGRAMS],
- [AC_REQUIRE([GROFF_GHOSTSCRIPT_PATH])
- make_html=html
- make_install_html=install_html
-
- missing=
- AC_FOREACH([groff_prog],
- [pnmcut pnmcrop pnmtopng psselect pnmtops],
- [AC_CHECK_PROG(groff_prog, groff_prog, [found], [missing])
- if test $[]groff_prog = missing; then
- missing="$missing \`groff_prog'"
- fi;])
-
- test "$GHOSTSCRIPT" = "missing" && missing="$missing \`gs'"
-
- if test -n "$missing"; then
- plural=`set $missing; test $[#] -gt 1 && echo s`
- missing=`set $missing
- missing=""
- while test $[#] -gt 0
- do
- case $[#] in
- 1) missing="$missing$[1]" ;;
- 2) missing="$missing$[1] and " ;;
- *) missing="$missing$[1], " ;;
- esac
- shift
- done
- echo $missing`
-
- make_html=
- make_install_html=
-
- AC_MSG_WARN([missing program$plural:
-
- The program$plural
- $missing
- cannot be found in the PATH.
- Consequently, groff's HTML backend (grohtml) will not work properly;
- therefore, it will neither be possible to prepare, nor to install,
- documentation in HTML format.
- ])
- fi
-
- AC_SUBST([make_html])
- AC_SUBST([make_install_html])])
-
-# To produce PDF docs, we need both awk and ghostscript.
-
-AC_DEFUN([GROFF_PDFDOC_PROGRAMS],
- [AC_REQUIRE([GROFF_AWK_PATH])
- AC_REQUIRE([GROFF_GHOSTSCRIPT_PATH])
-
- make_pdfdoc=pdfdoc
- make_install_pdfdoc=install_pdfdoc
-
- missing=""
- test "$AWK" = missing && missing="\`awk'"
- test "$GHOSTSCRIPT" = missing && missing="$missing \`gs'"
- if test -n "$missing"; then
- plural=`set $missing; test $[#] -eq 2 && echo s`
- test x$plural = xs \
- && missing=`set $missing; echo "$[1] and $[2]"` \
- || missing=`echo $missing`
-
- make_pdfdoc=
- make_install_pdfdoc=
-
- AC_MSG_WARN([missing program$plural:
-
- The program$plural $missing cannot be found in the PATH.
- Consequently, groff's PDF formatter (pdfroff) will not work properly;
- therefore, it will neither be possible to prepare, nor to install,
- documentation in PDF format.
- ])
- fi
-
- AC_SUBST([make_pdfdoc])
- AC_SUBST([make_install_pdfdoc])])
-
-# Check whether pnmtops can handle the -nosetpage option.
-
-AC_DEFUN([GROFF_PNMTOPS_NOSETPAGE],
- [AC_MSG_CHECKING([whether pnmtops can handle the -nosetpage option])
- if echo P2 2 2 255 0 1 2 0 | pnmtops -nosetpage > /dev/null 2>&1 ; then
- AC_MSG_RESULT([yes])
- pnmtops_nosetpage="pnmtops -nosetpage"
- else
- AC_MSG_RESULT([no])
- pnmtops_nosetpage="pnmtops"
- fi
- AC_SUBST([pnmtops_nosetpage])])
-
-# Check location of `gs'; allow `--with-gs=PROG' option to override.
-
-AC_DEFUN([GROFF_GHOSTSCRIPT_PATH],
- [AC_REQUIRE([GROFF_GHOSTSCRIPT_PREFS])
- AC_ARG_WITH([gs],
- [AS_HELP_STRING([--with-gs=PROG],
- [actual [/path/]name of ghostscript executable])],
- [GHOSTSCRIPT=$withval],
- [AC_CHECK_TOOLS(GHOSTSCRIPT, [$ALT_GHOSTSCRIPT_PROGS], [missing])])
- test "$GHOSTSCRIPT" = "no" && GHOSTSCRIPT=missing])
-
-# Preferences for choice of `gs' program...
-# (allow --with-alt-gs="LIST" to override).
-
-AC_DEFUN([GROFF_GHOSTSCRIPT_PREFS],
- [AC_ARG_WITH([alt-gs],
- [AS_HELP_STRING([--with-alt-gs=LIST],
- [alternative names for ghostscript executable])],
- [ALT_GHOSTSCRIPT_PROGS="$withval"],
- [ALT_GHOSTSCRIPT_PROGS="gs gswin32c gsos2"])
- AC_SUBST([ALT_GHOSTSCRIPT_PROGS])])
-
-# Check location of `awk'; allow `--with-awk=PROG' option to override.
-
-AC_DEFUN([GROFF_AWK_PATH],
- [AC_REQUIRE([GROFF_AWK_PREFS])
- AC_ARG_WITH([awk],
- [AS_HELP_STRING([--with-awk=PROG],
- [actual [/path/]name of awk executable])],
- [AWK=$withval],
- [AC_CHECK_TOOLS(AWK, [$ALT_AWK_PROGS], [missing])])
- test "$AWK" = "no" && AWK=missing])
-
-# Preferences for choice of `awk' program; allow --with-alt-awk="LIST"
-# to override.
-
-AC_DEFUN([GROFF_AWK_PREFS],
- [AC_ARG_WITH([alt-awk],
- [AS_HELP_STRING([--with-alt-awk=LIST],
- [alternative names for awk executable])],
- [ALT_AWK_PROGS="$withval"],
- [ALT_AWK_PROGS="gawk mawk nawk awk"])
- AC_SUBST([ALT_AWK_PROGS])])
-
-# GROFF_CSH_HACK(if hack present, if not present)
-
-AC_DEFUN([GROFF_CSH_HACK],
- [AC_MSG_CHECKING([for csh hash hack])
-
-cat <<EOF >conftest.sh
-#! /bin/sh
-true || exit 0
-export PATH || exit 0
-exit 1
-EOF
-
- chmod +x conftest.sh
- if echo ./conftest.sh | (csh >/dev/null 2>&1) >/dev/null 2>&1; then
- AC_MSG_RESULT([yes])
- $1
- else
- AC_MSG_RESULT([no])
- $2
- fi
- rm -f conftest.sh])
-
-# From udodo!hans@relay.NL.net (Hans Zuidam)
-
-AC_DEFUN([GROFF_ISC_SYSV3],
- [AC_MSG_CHECKING([for ISC 3.x or 4.x])
- if grep ['[34]\.'] /usr/options/cb.name >/dev/null 2>&1
- then
- AC_MSG_RESULT([yes])
- AC_DEFINE([_SYSV3], [1], [Define if you have ISC 3.x or 4.x.])
- else
- AC_MSG_RESULT([no])
- fi])
-
-AC_DEFUN([GROFF_POSIX],
- [AC_MSG_CHECKING([whether -D_POSIX_SOURCE is necessary])
- AC_LANG_PUSH([C++])
- AC_COMPILE_IFELSE([
- AC_LANG_PROGRAM([[
-
-#include <stdio.h>
-extern "C" { void fileno(int); }
-
- ]])
- ],
- [AC_MSG_RESULT([yes])
- AC_DEFINE([_POSIX_SOURCE], [1],
- [Define if -D_POSIX_SOURCE is necessary.])],
- [AC_MSG_RESULT([no])])
- AC_LANG_POP([C++])])
-
-# srand() of SunOS 4.1.3 has return type int instead of void
-
-AC_DEFUN([GROFF_SRAND],
- [AC_LANG_PUSH([C++])
- AC_MSG_CHECKING([for return type of srand])
- AC_COMPILE_IFELSE([
- AC_LANG_PROGRAM([[
-
-#include <stdlib.h>
-extern "C" { void srand(unsigned int); }
-
- ]])
- ],
- [AC_MSG_RESULT([void])
- AC_DEFINE([RET_TYPE_SRAND_IS_VOID], [1],
- [Define if srand() returns void not int.])],
- [AC_MSG_RESULT([int])])
- AC_LANG_POP([C++])])
-
-# In April 2005, autoconf's AC_TYPE_SIGNAL is still broken.
-
-AC_DEFUN([GROFF_TYPE_SIGNAL],
- [AC_MSG_CHECKING([for return type of signal handlers])
- for groff_declaration in \
- 'extern "C" void (*signal (int, void (*)(int)))(int);' \
- 'extern "C" void (*signal (int, void (*)(int)) throw ())(int);' \
- 'void (*signal ()) ();'
- do
- AC_COMPILE_IFELSE([
- AC_LANG_PROGRAM([[
-
-#include <sys/types.h>
-#include <signal.h>
-#ifdef signal
-# undef signal
-#endif
-$groff_declaration
-
- ]],
- [[
-
-int i;
-
- ]])
- ],
- [break],
- [continue])
- done
-
- if test -n "$groff_declaration"; then
- AC_MSG_RESULT([void])
- AC_DEFINE([RETSIGTYPE], [void],
- [Define as the return type of signal handlers
- (`int' or `void').])
- else
- AC_MSG_RESULT([int])
- AC_DEFINE([RETSIGTYPE], [int],
- [Define as the return type of signal handlers
- (`int' or `void').])
- fi])
-
-AC_DEFUN([GROFF_SYS_NERR],
- [AC_LANG_PUSH([C++])
- AC_MSG_CHECKING([for sys_nerr in <errno.h>, <stdio.h>, or <stdlib.h>])
- AC_COMPILE_IFELSE([
- AC_LANG_PROGRAM([[
-
-#include <errno.h>
-#include <stdio.h>
-#include <stdlib.h>
-
- ]],
- [[
-
-int k;
-k = sys_nerr;
-
- ]])
- ],
- [AC_MSG_RESULT([yes])
- AC_DEFINE([HAVE_SYS_NERR], [1],
- [Define if you have sys_nerr in <errno.h>, <stdio.h>, or <stdio.h>.])],
- [AC_MSG_RESULT([no])])
- AC_LANG_POP([C++])])
-
-AC_DEFUN([GROFF_SYS_ERRLIST],
- [AC_MSG_CHECKING([for sys_errlist[] in <errno.h>, <stdio.h>, or <stdlib.h>])
- AC_COMPILE_IFELSE([
- AC_LANG_PROGRAM([[
-
-#include <errno.h>
-#include <stdio.h>
-#include <stdlib.h>
-
- ]],
- [[
-
-int k;
-k = (int)sys_errlist[0];
-
- ]])
- ],
- [AC_MSG_RESULT([yes])
- AC_DEFINE([HAVE_SYS_ERRLIST], [1],
- [Define if you have sys_errlist in <errno.h>, <stdio.h>, or <stdlib.h>.])],
- [AC_MSG_RESULT([no])])])
-
-AC_DEFUN([GROFF_OSFCN_H],
- [AC_LANG_PUSH([C++])
- AC_MSG_CHECKING([C++ <osfcn.h>])
- AC_COMPILE_IFELSE([
- AC_LANG_PROGRAM([[
-
-#include <osfcn.h>
-
- ]],
- [[
-
-read(0, 0, 0);
-open(0, 0);
-
- ]])
- ],
- [AC_MSG_RESULT([yes])
- AC_DEFINE([HAVE_CC_OSFCN_H], [1],
- [Define if you have a C++ <osfcn.h>.])],
- [AC_MSG_RESULT([no])])
- AC_LANG_POP([C++])])
-
-AC_DEFUN([GROFF_LIMITS_H],
- [AC_LANG_PUSH([C++])
- AC_MSG_CHECKING([C++ <limits.h>])
- AC_COMPILE_IFELSE([
- AC_LANG_PROGRAM([[
-
-#include <limits.h>
-
- ]],
- [[
-
-int x = INT_MIN;
-int y = INT_MAX;
-int z = UCHAR_MAX;
-
- ]])
- ],
- [AC_MSG_RESULT([yes])
- AC_DEFINE([HAVE_CC_LIMITS_H], [1],
- [Define if you have a C++ <limits.h>.])],
- [AC_MSG_RESULT([no])])
- AC_LANG_POP([C++])])
-
-AC_DEFUN([GROFF_TIME_T],
- [AC_LANG_PUSH([C++])
- AC_MSG_CHECKING([for declaration of time_t])
- AC_COMPILE_IFELSE([
- AC_LANG_PROGRAM([[
-
-#include <time.h>
-
- ]],
- [[
-
-time_t t = time(0);
-struct tm *p = localtime(&t);
-
- ]])
- ],
- [AC_MSG_RESULT([yes])],
- [AC_MSG_RESULT([no])
- AC_DEFINE([LONG_FOR_TIME_T], [1],
- [Define if localtime() takes a long * not a time_t *.])])
- AC_LANG_POP([C++])])
-
-AC_DEFUN([GROFF_STRUCT_EXCEPTION],
- [AC_MSG_CHECKING([struct exception])
- AC_COMPILE_IFELSE([
- AC_LANG_PROGRAM([[
-
-#include <math.h>
-
- ]],
- [[
-
-struct exception e;
-
- ]])
- ],
- [AC_MSG_RESULT([yes])
- AC_DEFINE([HAVE_STRUCT_EXCEPTION], [1],
- [Define if <math.h> defines struct exception.])],
- [AC_MSG_RESULT([no])])])
-
-AC_DEFUN([GROFF_ARRAY_DELETE],
- [AC_LANG_PUSH([C++])
- AC_MSG_CHECKING([whether ANSI array delete syntax is supported])
- AC_COMPILE_IFELSE([
- AC_LANG_PROGRAM(, [[
-
-char *p = new char[5];
-delete [] p;
-
- ]])
- ],
- [AC_MSG_RESULT([yes])],
- [AC_MSG_RESULT([no])
- AC_DEFINE([ARRAY_DELETE_NEEDS_SIZE], [1],
- [Define if your C++ doesn't understand `delete []'.])])
- AC_LANG_POP([C++])])
-
-AC_DEFUN([GROFF_TRADITIONAL_CPP],
- [AC_LANG_PUSH([C++])
- AC_MSG_CHECKING([traditional preprocessor])
- AC_COMPILE_IFELSE([
- AC_LANG_PROGRAM([[
-
-#define name2(a, b) a/**/b
-
- ]],
- [[
-
-int name2(foo, bar);
-
- ]])
- ],
- [AC_MSG_RESULT([yes])
- AC_DEFINE([TRADITIONAL_CPP], [1],
- [Define if your C++ compiler uses a traditional (Reiser) preprocessor.])],
- [AC_MSG_RESULT([no])])
- AC_LANG_POP([C++])])
-
-AC_DEFUN([GROFF_WCOREFLAG],
- [AC_MSG_CHECKING([w_coredump])
- AC_RUN_IFELSE([
- AC_LANG_PROGRAM([[
-
-#include <sys/types.h>
-#include <sys/wait.h>
-
- ]],
- [[
-
-main()
-{
-#ifdef WCOREFLAG
- exit(1);
-#else
- int i = 0;
- ((union wait *)&i)->w_coredump = 1;
- exit(i != 0200);
-#endif
-}
-
- ]])
- ],
- [AC_MSG_RESULT([yes])
- AC_DEFINE(WCOREFLAG, 0200,
- [Define if the 0200 bit of the status returned by wait() indicates
- whether a core image was produced for a process that was terminated
- by a signal.])],
- [AC_MSG_RESULT([no])],
- [AC_MSG_RESULT([no])])])
-
-AC_DEFUN([GROFF_BROKEN_SPOOLER_FLAGS],
- [AC_MSG_CHECKING([default value for grops -b option])
- test -n "${BROKEN_SPOOLER_FLAGS}" || BROKEN_SPOOLER_FLAGS=0
- AC_MSG_RESULT([$BROKEN_SPOOLER_FLAGS])
- AC_SUBST([BROKEN_SPOOLER_FLAGS])])
-
-AC_DEFUN([GROFF_PAGE],
- [AC_MSG_CHECKING([default paper size])
- groff_prefix=$prefix
- test "x$prefix" = "xNONE" && groff_prefix=$ac_default_prefix
- if test -z "$PAGE"; then
- descfile=
- if test -r $groff_prefix/share/groff/font/devps/DESC; then
- descfile=$groff_prefix/share/groff/font/devps/DESC
- elif test -r $groff_prefix/lib/groff/font/devps/DESC; then
- descfile=$groff_prefix/lib/groff/font/devps/DESC
- else
- for f in $groff_prefix/share/groff/*/font/devps/DESC; do
- if test -r $f; then
- descfile=$f
- break
- fi
- done
- fi
-
- if test -n "$descfile"; then
- if grep ['^paperlength[ ]\+841890'] $descfile >/dev/null 2>&1; then
- PAGE=A4
- elif grep ['^papersize[ ]\+[aA]4'] $descfile >/dev/null 2>&1; then
- PAGE=A4
- fi
- fi
- fi
-
- if test -z "$PAGE"; then
- dom=`awk '([$]1 == "dom" || [$]1 == "search") { print [$]2; exit}' \
- /etc/resolv.conf 2>/dev/null`
- if test -z "$dom"; then
- dom=`(domainname) 2>/dev/null | tr -d '+'`
- if test -z "$dom" \
- || test "$dom" = '(none)'; then
- dom=`(hostname) 2>/dev/null | grep '\.'`
- fi
- fi
- # If the top-level domain is two letters and it's not `us' or `ca'
- # then they probably use A4 paper.
- case "$dom" in
- [*.[Uu][Ss]|*.[Cc][Aa])]
- ;;
- [*.[A-Za-z][A-Za-z])]
- PAGE=A4 ;;
- esac
- fi
-
- test -n "$PAGE" || PAGE=letter
- if test "x$PAGE" = "xA4"; then
- AC_DEFINE([PAGEA4], [1],
- [Define if the printer's page size is A4.])
- fi
- AC_MSG_RESULT([$PAGE])
- AC_SUBST([PAGE])])
-
-AC_DEFUN([GROFF_CXX_CHECK],
- [AC_REQUIRE([AC_PROG_CXX])
- AC_LANG_PUSH([C++])
- if test "$cross_compiling" = no; then
- AC_MSG_CHECKING([that C++ compiler can compile simple program])
- fi
- AC_RUN_IFELSE([
- AC_LANG_SOURCE([[
-
-int main() {
- return 0;
-}
-
- ]])
- ],
- [AC_MSG_RESULT([yes])],
- [AC_MSG_RESULT([no])
- AC_MSG_ERROR([a working C++ compiler is required])],
- [:])
-
- if test "$cross_compiling" = no; then
- AC_MSG_CHECKING([that C++ static constructors and destructors are called])
- fi
- AC_RUN_IFELSE([
- AC_LANG_SOURCE([[
-
-extern "C" {
- void _exit(int);
-}
-
-int i;
-struct A {
- char dummy;
- A() { i = 1; }
- ~A() { if (i == 1) _exit(0); }
-};
-
-A a;
-
-int main()
-{
- return 1;
-}
-
- ]])
- ],
- [AC_MSG_RESULT([yes])],
- [AC_MSG_RESULT([no])
- AC_MSG_ERROR([a working C++ compiler is required])],
- [:])
-
- AC_MSG_CHECKING([that header files support C++])
- AC_LINK_IFELSE([
- AC_LANG_PROGRAM([[
-
-#include <stdio.h>
-
- ]],
- [[
-
-fopen(0, 0);
-
- ]])
- ],
- [AC_MSG_RESULT([yes])],
- [AC_MSG_RESULT([no])
- AC_MSG_ERROR([header files do not support C++
- (if you are using a version of gcc/g++ earlier than 2.5,
- you should install libg++)])])
- AC_LANG_POP([C++])])
-
-AC_DEFUN([GROFF_TMAC],
- [AC_MSG_CHECKING([for prefix of system macro packages])
- sys_tmac_prefix=
- sys_tmac_file_prefix=
- for d in /usr/share/lib/tmac /usr/lib/tmac; do
- for t in "" tmac.; do
- for m in an s m; do
- f=$d/$t$m
- if test -z "$sys_tmac_prefix" \
- && test -f $f \
- && grep '^\.if' $f >/dev/null 2>&1; then
- sys_tmac_prefix=$d/$t
- sys_tmac_file_prefix=$t
- fi
- done
- done
- done
- AC_MSG_RESULT([$sys_tmac_prefix])
- AC_SUBST([sys_tmac_prefix])
-
- AC_MSG_CHECKING([which system macro packages should be made available])
- tmac_wrap=
- 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;;"`
- case "$suff" in
- e)
- ;;
- *)
- grep "Copyright.*Free Software Foundation" $f >/dev/null \
- || tmac_wrap="$tmac_wrap $suff" ;;
- esac
- done
- elif test -n "$sys_tmac_prefix"; then
- files=`echo $sys_tmac_prefix*`
- grep "\\.so" $files >conftest.sol
- for f in $files; do
- case "$f" in
- ${sys_tmac_prefix}e)
- ;;
- *.me)
- ;;
- */ms.*)
- ;;
- *)
- b=`basename $f`
- if grep "\\.so.*/$b\$" conftest.sol >/dev/null \
- || grep -l "Copyright.*Free Software Foundation" $f >/dev/null; then
- :
- else
- suff=`echo $f | sed -e "s;$sys_tmac_prefix;;"`
- case "$suff" in
- tmac.*)
- ;;
- *)
- tmac_wrap="$tmac_wrap $suff" ;;
- esac
- fi
- esac
- done
- rm -f conftest.sol
- fi
- AC_MSG_RESULT([$tmac_wrap])
- AC_SUBST([tmac_wrap])])
-
-AC_DEFUN([GROFF_G],
- [AC_MSG_CHECKING([for existing troff installation])
- if test "x`(echo .tm '|n(.g' | tr '|' '\\\\' | troff -z -i 2>&1) 2>/dev/null`" = x0; then
- AC_MSG_RESULT([yes])
- g=g
- else
- AC_MSG_RESULT([no])
- g=
- fi
- AC_SUBST([g])])
-
-# We need the path to install-sh to be absolute.
-
-AC_DEFUN([GROFF_INSTALL_SH],
- [AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])
- ac_dir=`cd $ac_aux_dir; pwd`
- ac_install_sh="$ac_dir/install-sh -c"])
-
-# Test whether install-info is available.
-
-AC_DEFUN([GROFF_INSTALL_INFO],
- [AC_CHECK_PROGS([INSTALL_INFO], [install-info], [:])])
-
-# At least one UNIX system, Apple Macintosh Rhapsody 5.5,
-# does not have -lm ...
-
-AC_DEFUN([GROFF_LIBM],
- [AC_CHECK_LIB([m], [sin], [LIBM=-lm])
- AC_SUBST([LIBM])])
-
-# ... while the MinGW implementation of GCC for Microsoft Win32
-# does not seem to have -lc.
-
-AC_DEFUN([GROFF_LIBC],
- [AC_CHECK_LIB([c], [main], [LIBC=-lc])
- AC_SUBST([LIBC])])
-
-# Check for EBCDIC -- stolen from the OS390 Unix LYNX port
-
-AC_DEFUN([GROFF_EBCDIC],
- [AC_MSG_CHECKING([whether character set is EBCDIC])
- AC_COMPILE_IFELSE([
- AC_LANG_PROGRAM([[
-
-/* Treat any failure as ASCII for compatibility with existing art.
- Use compile-time rather than run-time tests for cross-compiler
- tolerance. */
-#if '0' != 240
-make an error "Character set is not EBCDIC"
-#endif
-
- ]])
- ],
- [groff_cv_ebcdic="yes"
- TTYDEVDIRS="font/devcp1047"
- AC_MSG_RESULT([yes])
- AC_DEFINE(IS_EBCDIC_HOST, 1,
- [Define if the host's encoding is EBCDIC.])],
- [groff_cv_ebcdic="no"
- TTYDEVDIRS="font/devascii font/devlatin1"
- OTHERDEVDIRS="font/devlj4 font/devlbp"
- AC_MSG_RESULT([no])])
- AC_SUBST([TTYDEVDIRS])
- AC_SUBST([OTHERDEVDIRS])])
-
-# Check for OS/390 Unix. We test for EBCDIC also -- the Linux port (with
-# gcc) to OS/390 uses ASCII internally.
-
-AC_DEFUN([GROFF_OS390],
- [if test "$groff_cv_ebcdic" = "yes"; then
- AC_MSG_CHECKING([for OS/390 Unix])
- case `uname` in
- OS/390)
- CFLAGS="$CFLAGS -D_ALL_SOURCE"
- AC_MSG_RESULT([yes]) ;;
- *)
- AC_MSG_RESULT([no]) ;;
- esac
- fi])
-
-# Check whether we need a declaration for a function.
-#
-# Stolen from GNU bfd.
-
-AC_DEFUN([GROFF_NEED_DECLARATION],
- [AC_MSG_CHECKING([whether $1 must be declared])
- AC_LANG_PUSH([C++])
- AC_CACHE_VAL([groff_cv_decl_needed_$1],
- [AC_COMPILE_IFELSE([
- AC_LANG_PROGRAM([[
-
-#include <stdio.h>
-#ifdef HAVE_STRING_H
-#include <string.h>
-#endif
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
-#ifdef HAVE_SYS_TIME_H
-#include <sys/time.h>
-#endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-#ifdef HAVE_MATH_H
-#include <math.h>
-#endif
-
- ]],
- [[
-
-#ifndef $1
- char *p = (char *) $1;
-#endif
-
- ]])
- ],
- [groff_cv_decl_needed_$1=no],
- [groff_cv_decl_needed_$1=yes])])
- AC_MSG_RESULT([$groff_cv_decl_needed_$1])
- if test $groff_cv_decl_needed_$1 = yes; then
- AC_DEFINE([NEED_DECLARATION_]translit($1, [a-z], [A-Z]), [1],
- [Define if your C++ doesn't declare ]$1[().])
- fi
- AC_LANG_POP([C++])])
-
-# If mkstemp() isn't available, use our own mkstemp.cpp file.
-
-AC_DEFUN([GROFF_MKSTEMP],
- [AC_MSG_CHECKING([for mkstemp])
- AC_LANG_PUSH([C++])
- AC_LIBSOURCE([mkstemp.cpp])
- AC_LINK_IFELSE([
- AC_LANG_PROGRAM([[
-
-#include <stdlib.h>
-#include <unistd.h>
-int (*f) (char *);
-
- ]],
- [[
-
-f = mkstemp;
-
- ]])
- ],
- [AC_MSG_RESULT([yes])
- AC_DEFINE([HAVE_MKSTEMP], [1], [Define if you have mkstemp().])],
- [AC_MSG_RESULT([no])
- _AC_LIBOBJ([mkstemp])])
- AC_LANG_POP([C++])])
-
-# Test whether <inttypes.h> exists, doesn't clash with <sys/types.h>,
-# and declares uintmax_t. Taken from the fileutils package.
-
-AC_DEFUN([GROFF_INTTYPES_H],
- [AC_LANG_PUSH([C++])
- AC_MSG_CHECKING([C++ <inttypes.h>])
- AC_COMPILE_IFELSE([
- AC_LANG_PROGRAM([[
-
-#include <sys/types.h>
-#include <inttypes.h>
-
- ]],
- [[
-
-uintmax_t i = (uintmax_t)-1;
-
- ]])
- ],
- [groff_cv_header_inttypes_h=yes
- AC_DEFINE([HAVE_CC_INTTYPES_H], [1],
- [Define if you have a C++ <inttypes.h>.])],
- [groff_cv_header_inttypes_h=no])
- AC_MSG_RESULT([$groff_cv_header_inttypes_h])
- AC_LANG_POP([C++])])
-
-# Test for working `unsigned long long'. Taken from the fileutils package.
-
-AC_DEFUN([GROFF_UNSIGNED_LONG_LONG],
- [AC_LANG_PUSH([C++])
- AC_MSG_CHECKING([for unsigned long long])
- AC_LINK_IFELSE([
- AC_LANG_PROGRAM([[
-
-unsigned long long ull = 1;
-int i = 63;
-unsigned long long ullmax = (unsigned long long)-1;
-
- ]],
- [[
-
-return ull << i | ull >> i | ullmax / ull | ullmax % ull;
-
- ]])
- ],
- [groff_cv_type_unsigned_long_long=yes],
- [groff_cv_type_unsigned_long_long=no])
- AC_MSG_RESULT([$groff_cv_type_unsigned_long_long])
- AC_LANG_POP([C++])])
-
-# Define uintmax_t to `unsigned long' or `unsigned long long'
-# if <inttypes.h> does not exist. Taken from the fileutils package.
-
-AC_DEFUN([GROFF_UINTMAX_T],
- [AC_REQUIRE([GROFF_INTTYPES_H])
- if test $groff_cv_header_inttypes_h = no; then
- AC_REQUIRE([GROFF_UNSIGNED_LONG_LONG])
- test $groff_cv_type_unsigned_long_long = yes \
- && ac_type='unsigned long long' \
- || ac_type='unsigned long'
- AC_DEFINE_UNQUOTED([uintmax_t], [$ac_type],
- [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)])
-
-# Check for X11.
-
-AC_DEFUN([GROFF_X11],
- [AC_REQUIRE([AC_PATH_XTRA])
- groff_no_x=$no_x
- if test -z "$groff_no_x"; then
- OLDCFLAGS=$CFLAGS
- OLDLDFLAGS=$LDFLAGS
- OLDLIBS=$LIBS
- CFLAGS="$CFLAGS $X_CFLAGS"
- LDFLAGS="$LDFLAGS $X_LIBS"
- LIBS="$LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS"
-
- LIBS="$LIBS -lXaw"
- AC_MSG_CHECKING([for Xaw library and header files])
- AC_LINK_IFELSE([
- AC_LANG_PROGRAM([[
-
-#include <X11/Intrinsic.h>
-#include <X11/Xaw/Simple.h>
-
- ]],
- [])
- ],
- [AC_MSG_RESULT([yes])],
- [AC_MSG_RESULT([no])
- groff_no_x="yes"])
-
- LIBS="$LIBS -lXmu"
- AC_MSG_CHECKING([for Xmu library and header files])
- AC_LINK_IFELSE([
- AC_LANG_PROGRAM([[
-
-#include <X11/Intrinsic.h>
-#include <X11/Xmu/Converters.h>
-
- ]],
- [])
- ],
- [AC_MSG_RESULT([yes])],
- [AC_MSG_RESULT([no])
- groff_no_x="yes"])
-
- CFLAGS=$OLDCFLAGS
- LDFLAGS=$OLDLDFLAGS
- LIBS=$OLDLIBS
- fi
-
- if test "x$groff_no_x" = "xyes"; then
- AC_MSG_NOTICE([gxditview and xtotroff won't be built])
- else
- XDEVDIRS="font/devX75 font/devX75-12 font/devX100 font/devX100-12"
- XPROGDIRS="src/devices/xditview src/utils/xtotroff"
- XLIBDIRS="src/libs/libxutil"
- fi
-
- AC_SUBST([XDEVDIRS])
- AC_SUBST([XPROGDIRS])
- AC_SUBST([XLIBDIRS])])
-
-# Set up the `--with-appresdir' command line option.
-
-AC_DEFUN([GROFF_APPRESDIR_OPTION],
- [AC_ARG_WITH([appresdir],
- dnl Don't quote AS_HELP_STRING!
- AS_HELP_STRING([--with-appresdir=DIR],
- [X11 application resource files]))])
-
-# Get a default value for the application resource directory.
-#
-# We ignore the `XAPPLRES' and `XUSERFILESEARCHPATH' environment variables.
-#
-# The goal is to find the `root' of X11. Under most systems this is
-# `/usr/X11/lib'. Application default files are then in
-# `/usr/X11/lib/X11/app-defaults'.
-#
-# Based on autoconf's AC_PATH_X macro.
-
-AC_DEFUN([GROFF_APPRESDIR_DEFAULT],
- [if test -z "$groff_no_x"; then
- # Create an Imakefile, run `xmkmf', then `make'.
- rm -f -r conftest.dir
- if mkdir conftest.dir; then
- cd conftest.dir
- # Make sure to not put `make' in the Imakefile rules,
- # since we grep it out.
- cat >Imakefile <<'EOF'
-
-xlibdirs:
- @echo 'groff_x_usrlibdir="${USRLIBDIR}"; groff_x_libdir="${LIBDIR}"'
-EOF
-
- if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
- # GNU make sometimes prints "make[1]: Entering...",
- # which would confuse us.
- eval `${MAKE-make} xlibdirs 2>/dev/null | grep -v make`
-
- # Open Windows `xmkmf' reportedly sets LIBDIR instead of USRLIBDIR.
- for groff_extension in a so sl; do
- if test ! -f $groff_x_usrlibdir/libX11.$groff_extension &&
- test -f $groff_x_libdir/libX11.$groff_extension; then
- groff_x_usrlibdir=$groff_x_libdir
- break
- fi
- done
- fi
-
- cd ..
- rm -f -r conftest.dir
- fi
-
- # In case the test with `xmkmf' wasn't successful, try a suite of
- # standard directories. Check `X11' before `X11Rn' because it is often
- # a symlink to the current release.
- groff_x_libdirs='
- /usr/X11/lib
- /usr/X11R6/lib
- /usr/X11R5/lib
- /usr/X11R4/lib
-
- /usr/lib/X11
- /usr/lib/X11R6
- /usr/lib/X11R5
- /usr/lib/X11R4
-
- /usr/local/X11/lib
- /usr/local/X11R6/lib
- /usr/local/X11R5/lib
- /usr/local/X11R4/lib
-
- /usr/local/lib/X11
- /usr/local/lib/X11R6
- /usr/local/lib/X11R5
- /usr/local/lib/X11R4
-
- /usr/X386/lib
- /usr/x386/lib
- /usr/XFree86/lib/X11
-
- /usr/lib
- /usr/local/lib
- /usr/unsupported/lib
- /usr/athena/lib
- /usr/local/x11r5/lib
- /usr/lpp/Xamples/lib
-
- /usr/openwin/lib
- /usr/openwin/share/lib'
-
- if test -z "$groff_x_usrlibdir"; then
- # We only test whether libX11 exists.
- for groff_dir in $groff_x_libdirs; do
- for groff_extension in a so sl; do
- if test ! -r $groff_dir/libX11.$groff_extension; then
- groff_x_usrlibdir=$groff_dir
- break 2
- fi
- done
- done
- fi
-
- if test "x$with_appresdir" = "x"; then
- appresdir=$groff_x_usrlibdir/X11/app-defaults
- else
- appresdir=$with_appresdir
- fi
- fi
- AC_SUBST([appresdir])])
-
-
-# Emit warning if --with-appresdir hasn't been used.
-
-AC_DEFUN([GROFF_APPRESDIR_CHECK],
- [if test -z "$groff_no_x"; then
- if test "x$with_appresdir" = "x"; then
- AC_MSG_NOTICE([
-
- The application resource file for gxditview will be installed as
-
- $appresdir/GXditview
-
- (an existing file will be saved as `GXditview.old').
- To install it into a different directory, say, `/etc/gxditview',
- add `--with-appresdir=/etc/gxditview' to the configure script
- command line options and rerun it. The environment variable
- `APPLRESDIR' must then be set to `/etc/' (note the trailing slash),
- omitting the `gxditview' part which is automatically appended by
- the X11 searching routines for resource files. More details can be
- found in the X(7) manual page.
- ])
- fi
- fi])
+# generated automatically by aclocal 1.9.6 -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+# 2005 Free Software Foundation, Inc.
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+m4_include([m4/codeset.m4])
+m4_include([m4/groff.m4])
+m4_include([m4/iconv.m4])
+m4_include([m4/lib-ld.m4])
+m4_include([m4/lib-link.m4])
+m4_include([m4/lib-prefix.m4])
diff --git a/config.guess b/config.guess
new file mode 100755
index 00000000..17690aea
--- /dev/null
+++ b/config.guess
@@ -0,0 +1,1479 @@
+#! /bin/sh
+# Attempt to guess a canonical system name.
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+
+timestamp='2006-01-02'
+
+# This file is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program 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.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
+# 02110-1301, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+
+# Originally written by Per Bothner <per@bothner.com>.
+# Please send patches to <config-patches@gnu.org>. Submit a context
+# diff and a properly formatted ChangeLog entry.
+#
+# This script attempts to guess a canonical system name similar to
+# config.sub. If it succeeds, it prints the system name on stdout, and
+# exits with 0. Otherwise, it exits with 1.
+#
+# The plan is that this can be called by configure scripts if you
+# don't specify an explicit build system type.
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION]
+
+Output the configuration name of the system \`$me' is run on.
+
+Operation modes:
+ -h, --help print this help, then exit
+ -t, --time-stamp print date of last modification, then exit
+ -v, --version print version number, then exit
+
+Report bugs and patches to <config-patches@gnu.org>."
+
+version="\
+GNU config.guess ($timestamp)
+
+Originally written by Per Bothner.
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
+Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions. There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+ case $1 in
+ --time-stamp | --time* | -t )
+ echo "$timestamp" ; exit ;;
+ --version | -v )
+ echo "$version" ; exit ;;
+ --help | --h* | -h )
+ echo "$usage"; exit ;;
+ -- ) # Stop option processing
+ shift; break ;;
+ - ) # Use stdin as input.
+ break ;;
+ -* )
+ echo "$me: invalid option $1$help" >&2
+ exit 1 ;;
+ * )
+ break ;;
+ esac
+done
+
+if test $# != 0; then
+ echo "$me: too many arguments$help" >&2
+ exit 1
+fi
+
+trap 'exit 1' 1 2 15
+
+# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
+# compiler to aid in system detection is discouraged as it requires
+# temporary files to be created and, as you can see below, it is a
+# headache to deal with in a portable fashion.
+
+# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
+# use `HOST_CC' if defined, but it is deprecated.
+
+# Portable tmp directory creation inspired by the Autoconf team.
+
+set_cc_for_build='
+trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
+trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
+: ${TMPDIR=/tmp} ;
+ { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
+ { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
+ { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
+ { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
+dummy=$tmp/dummy ;
+tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
+case $CC_FOR_BUILD,$HOST_CC,$CC in
+ ,,) echo "int x;" > $dummy.c ;
+ for c in cc gcc c89 c99 ; do
+ if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
+ CC_FOR_BUILD="$c"; break ;
+ fi ;
+ done ;
+ if test x"$CC_FOR_BUILD" = x ; then
+ CC_FOR_BUILD=no_compiler_found ;
+ fi
+ ;;
+ ,,*) CC_FOR_BUILD=$CC ;;
+ ,*,*) CC_FOR_BUILD=$HOST_CC ;;
+esac ; set_cc_for_build= ;'
+
+# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
+# (ghazi@noc.rutgers.edu 1994-08-24)
+if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
+ PATH=$PATH:/.attbin ; export PATH
+fi
+
+UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
+UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
+UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
+UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
+
+# Note: order is significant - the case branches are not exclusive.
+
+case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
+ *:NetBSD:*:*)
+ # NetBSD (nbsd) targets should (where applicable) match one or
+ # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
+ # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
+ # switched to ELF, *-*-netbsd* would select the old
+ # object file format. This provides both forward
+ # compatibility and a consistent mechanism for selecting the
+ # object file format.
+ #
+ # Note: NetBSD doesn't particularly care about the vendor
+ # portion of the name. We always set it to "unknown".
+ sysctl="sysctl -n hw.machine_arch"
+ UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
+ /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
+ case "${UNAME_MACHINE_ARCH}" in
+ armeb) machine=armeb-unknown ;;
+ arm*) machine=arm-unknown ;;
+ sh3el) machine=shl-unknown ;;
+ sh3eb) machine=sh-unknown ;;
+ *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
+ esac
+ # The Operating System including object format, if it has switched
+ # to ELF recently, or will in the future.
+ case "${UNAME_MACHINE_ARCH}" in
+ arm*|i386|m68k|ns32k|sh3*|sparc|vax)
+ eval $set_cc_for_build
+ if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
+ | grep __ELF__ >/dev/null
+ then
+ # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
+ # Return netbsd for either. FIX?
+ os=netbsd
+ else
+ os=netbsdelf
+ fi
+ ;;
+ *)
+ os=netbsd
+ ;;
+ esac
+ # The OS release
+ # Debian GNU/NetBSD machines have a different userland, and
+ # thus, need a distinct triplet. However, they do not need
+ # kernel version information, so it can be replaced with a
+ # suitable tag, in the style of linux-gnu.
+ case "${UNAME_VERSION}" in
+ Debian*)
+ release='-gnu'
+ ;;
+ *)
+ release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+ ;;
+ esac
+ # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
+ # contains redundant information, the shorter form:
+ # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
+ echo "${machine}-${os}${release}"
+ exit ;;
+ *:OpenBSD:*:*)
+ UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
+ echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
+ exit ;;
+ *:ekkoBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
+ exit ;;
+ *:SolidBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
+ exit ;;
+ macppc:MirBSD:*:*)
+ echo powerppc-unknown-mirbsd${UNAME_RELEASE}
+ exit ;;
+ *:MirBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
+ exit ;;
+ alpha:OSF1:*:*)
+ case $UNAME_RELEASE in
+ *4.0)
+ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
+ ;;
+ *5.*)
+ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
+ ;;
+ esac
+ # According to Compaq, /usr/sbin/psrinfo has been available on
+ # OSF/1 and Tru64 systems produced since 1995. I hope that
+ # covers most systems running today. This code pipes the CPU
+ # types through head -n 1, so we only detect the type of CPU 0.
+ ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`
+ case "$ALPHA_CPU_TYPE" in
+ "EV4 (21064)")
+ UNAME_MACHINE="alpha" ;;
+ "EV4.5 (21064)")
+ UNAME_MACHINE="alpha" ;;
+ "LCA4 (21066/21068)")
+ UNAME_MACHINE="alpha" ;;
+ "EV5 (21164)")
+ UNAME_MACHINE="alphaev5" ;;
+ "EV5.6 (21164A)")
+ UNAME_MACHINE="alphaev56" ;;
+ "EV5.6 (21164PC)")
+ UNAME_MACHINE="alphapca56" ;;
+ "EV5.7 (21164PC)")
+ UNAME_MACHINE="alphapca57" ;;
+ "EV6 (21264)")
+ UNAME_MACHINE="alphaev6" ;;
+ "EV6.7 (21264A)")
+ UNAME_MACHINE="alphaev67" ;;
+ "EV6.8CB (21264C)")
+ UNAME_MACHINE="alphaev68" ;;
+ "EV6.8AL (21264B)")
+ UNAME_MACHINE="alphaev68" ;;
+ "EV6.8CX (21264D)")
+ UNAME_MACHINE="alphaev68" ;;
+ "EV6.9A (21264/EV69A)")
+ UNAME_MACHINE="alphaev69" ;;
+ "EV7 (21364)")
+ UNAME_MACHINE="alphaev7" ;;
+ "EV7.9 (21364A)")
+ UNAME_MACHINE="alphaev79" ;;
+ esac
+ # A Pn.n version is a patched version.
+ # A Vn.n version is a released version.
+ # A Tn.n version is a released field test version.
+ # A Xn.n version is an unreleased experimental baselevel.
+ # 1.2 uses "1.2" for uname -r.
+ echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ exit ;;
+ Alpha\ *:Windows_NT*:*)
+ # How do we know it's Interix rather than the generic POSIX subsystem?
+ # Should we change UNAME_MACHINE based on the output of uname instead
+ # of the specific Alpha model?
+ echo alpha-pc-interix
+ exit ;;
+ 21064:Windows_NT:50:3)
+ echo alpha-dec-winnt3.5
+ exit ;;
+ Amiga*:UNIX_System_V:4.0:*)
+ echo m68k-unknown-sysv4
+ exit ;;
+ *:[Aa]miga[Oo][Ss]:*:*)
+ echo ${UNAME_MACHINE}-unknown-amigaos
+ exit ;;
+ *:[Mm]orph[Oo][Ss]:*:*)
+ echo ${UNAME_MACHINE}-unknown-morphos
+ exit ;;
+ *:OS/390:*:*)
+ echo i370-ibm-openedition
+ exit ;;
+ *:z/VM:*:*)
+ echo s390-ibm-zvmoe
+ exit ;;
+ *:OS400:*:*)
+ echo powerpc-ibm-os400
+ exit ;;
+ arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
+ echo arm-acorn-riscix${UNAME_RELEASE}
+ exit ;;
+ arm:riscos:*:*|arm:RISCOS:*:*)
+ echo arm-unknown-riscos
+ exit ;;
+ SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
+ echo hppa1.1-hitachi-hiuxmpp
+ exit ;;
+ Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
+ # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
+ if test "`(/bin/universe) 2>/dev/null`" = att ; then
+ echo pyramid-pyramid-sysv3
+ else
+ echo pyramid-pyramid-bsd
+ fi
+ exit ;;
+ NILE*:*:*:dcosx)
+ echo pyramid-pyramid-svr4
+ exit ;;
+ DRS?6000:unix:4.0:6*)
+ echo sparc-icl-nx6
+ exit ;;
+ DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
+ case `/usr/bin/uname -p` in
+ sparc) echo sparc-icl-nx7; exit ;;
+ esac ;;
+ sun4H:SunOS:5.*:*)
+ echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
+ echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ i86pc:SunOS:5.*:*)
+ echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ sun4*:SunOS:6*:*)
+ # According to config.sub, this is the proper way to canonicalize
+ # SunOS6. Hard to guess exactly what SunOS6 will be like, but
+ # it's likely to be more like Solaris than SunOS4.
+ echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ sun4*:SunOS:*:*)
+ case "`/usr/bin/arch -k`" in
+ Series*|S4*)
+ UNAME_RELEASE=`uname -v`
+ ;;
+ esac
+ # Japanese Language versions have a version number like `4.1.3-JL'.
+ echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
+ exit ;;
+ sun3*:SunOS:*:*)
+ echo m68k-sun-sunos${UNAME_RELEASE}
+ exit ;;
+ sun*:*:4.2BSD:*)
+ UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
+ test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
+ case "`/bin/arch`" in
+ sun3)
+ echo m68k-sun-sunos${UNAME_RELEASE}
+ ;;
+ sun4)
+ echo sparc-sun-sunos${UNAME_RELEASE}
+ ;;
+ esac
+ exit ;;
+ aushp:SunOS:*:*)
+ echo sparc-auspex-sunos${UNAME_RELEASE}
+ exit ;;
+ # The situation for MiNT is a little confusing. The machine name
+ # can be virtually everything (everything which is not
+ # "atarist" or "atariste" at least should have a processor
+ # > m68000). The system name ranges from "MiNT" over "FreeMiNT"
+ # to the lowercase version "mint" (or "freemint"). Finally
+ # the system name "TOS" denotes a system which is actually not
+ # MiNT. But MiNT is downward compatible to TOS, so this should
+ # be no problem.
+ atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
+ echo m68k-atari-mint${UNAME_RELEASE}
+ exit ;;
+ atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
+ echo m68k-atari-mint${UNAME_RELEASE}
+ exit ;;
+ *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
+ echo m68k-atari-mint${UNAME_RELEASE}
+ exit ;;
+ milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
+ echo m68k-milan-mint${UNAME_RELEASE}
+ exit ;;
+ hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
+ echo m68k-hades-mint${UNAME_RELEASE}
+ exit ;;
+ *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
+ echo m68k-unknown-mint${UNAME_RELEASE}
+ exit ;;
+ m68k:machten:*:*)
+ echo m68k-apple-machten${UNAME_RELEASE}
+ exit ;;
+ powerpc:machten:*:*)
+ echo powerpc-apple-machten${UNAME_RELEASE}
+ exit ;;
+ RISC*:Mach:*:*)
+ echo mips-dec-mach_bsd4.3
+ exit ;;
+ RISC*:ULTRIX:*:*)
+ echo mips-dec-ultrix${UNAME_RELEASE}
+ exit ;;
+ VAX*:ULTRIX*:*:*)
+ echo vax-dec-ultrix${UNAME_RELEASE}
+ exit ;;
+ 2020:CLIX:*:* | 2430:CLIX:*:*)
+ echo clipper-intergraph-clix${UNAME_RELEASE}
+ exit ;;
+ mips:*:*:UMIPS | mips:*:*:RISCos)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+#ifdef __cplusplus
+#include <stdio.h> /* for printf() prototype */
+ int main (int argc, char *argv[]) {
+#else
+ int main (argc, argv) int argc; char *argv[]; {
+#endif
+ #if defined (host_mips) && defined (MIPSEB)
+ #if defined (SYSTYPE_SYSV)
+ printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
+ #endif
+ #if defined (SYSTYPE_SVR4)
+ printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
+ #endif
+ #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
+ printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
+ #endif
+ #endif
+ exit (-1);
+ }
+EOF
+ $CC_FOR_BUILD -o $dummy $dummy.c &&
+ dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
+ SYSTEM_NAME=`$dummy $dummyarg` &&
+ { echo "$SYSTEM_NAME"; exit; }
+ echo mips-mips-riscos${UNAME_RELEASE}
+ exit ;;
+ Motorola:PowerMAX_OS:*:*)
+ echo powerpc-motorola-powermax
+ exit ;;
+ Motorola:*:4.3:PL8-*)
+ echo powerpc-harris-powermax
+ exit ;;
+ Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
+ echo powerpc-harris-powermax
+ exit ;;
+ Night_Hawk:Power_UNIX:*:*)
+ echo powerpc-harris-powerunix
+ exit ;;
+ m88k:CX/UX:7*:*)
+ echo m88k-harris-cxux7
+ exit ;;
+ m88k:*:4*:R4*)
+ echo m88k-motorola-sysv4
+ exit ;;
+ m88k:*:3*:R3*)
+ echo m88k-motorola-sysv3
+ exit ;;
+ AViiON:dgux:*:*)
+ # DG/UX returns AViiON for all architectures
+ UNAME_PROCESSOR=`/usr/bin/uname -p`
+ if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
+ then
+ if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
+ [ ${TARGET_BINARY_INTERFACE}x = x ]
+ then
+ echo m88k-dg-dgux${UNAME_RELEASE}
+ else
+ echo m88k-dg-dguxbcs${UNAME_RELEASE}
+ fi
+ else
+ echo i586-dg-dgux${UNAME_RELEASE}
+ fi
+ exit ;;
+ M88*:DolphinOS:*:*) # DolphinOS (SVR3)
+ echo m88k-dolphin-sysv3
+ exit ;;
+ M88*:*:R3*:*)
+ # Delta 88k system running SVR3
+ echo m88k-motorola-sysv3
+ exit ;;
+ XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
+ echo m88k-tektronix-sysv3
+ exit ;;
+ Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
+ echo m68k-tektronix-bsd
+ exit ;;
+ *:IRIX*:*:*)
+ echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
+ exit ;;
+ ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
+ echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
+ exit ;; # Note that: echo "'`uname -s`'" gives 'AIX '
+ i*86:AIX:*:*)
+ echo i386-ibm-aix
+ exit ;;
+ ia64:AIX:*:*)
+ if [ -x /usr/bin/oslevel ] ; then
+ IBM_REV=`/usr/bin/oslevel`
+ else
+ IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+ fi
+ echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
+ exit ;;
+ *:AIX:2:3)
+ if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #include <sys/systemcfg.h>
+
+ main()
+ {
+ if (!__power_pc())
+ exit(1);
+ puts("powerpc-ibm-aix3.2.5");
+ exit(0);
+ }
+EOF
+ if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
+ then
+ echo "$SYSTEM_NAME"
+ else
+ echo rs6000-ibm-aix3.2.5
+ fi
+ elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
+ echo rs6000-ibm-aix3.2.4
+ else
+ echo rs6000-ibm-aix3.2
+ fi
+ exit ;;
+ *:AIX:*:[45])
+ IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
+ if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
+ IBM_ARCH=rs6000
+ else
+ IBM_ARCH=powerpc
+ fi
+ if [ -x /usr/bin/oslevel ] ; then
+ IBM_REV=`/usr/bin/oslevel`
+ else
+ IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+ fi
+ echo ${IBM_ARCH}-ibm-aix${IBM_REV}
+ exit ;;
+ *:AIX:*:*)
+ echo rs6000-ibm-aix
+ exit ;;
+ ibmrt:4.4BSD:*|romp-ibm:BSD:*)
+ echo romp-ibm-bsd4.4
+ exit ;;
+ ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and
+ echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to
+ exit ;; # report: romp-ibm BSD 4.3
+ *:BOSX:*:*)
+ echo rs6000-bull-bosx
+ exit ;;
+ DPX/2?00:B.O.S.:*:*)
+ echo m68k-bull-sysv3
+ exit ;;
+ 9000/[34]??:4.3bsd:1.*:*)
+ echo m68k-hp-bsd
+ exit ;;
+ hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
+ echo m68k-hp-bsd4.4
+ exit ;;
+ 9000/[34678]??:HP-UX:*:*)
+ HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+ case "${UNAME_MACHINE}" in
+ 9000/31? ) HP_ARCH=m68000 ;;
+ 9000/[34]?? ) HP_ARCH=m68k ;;
+ 9000/[678][0-9][0-9])
+ if [ -x /usr/bin/getconf ]; then
+ sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
+ sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
+ case "${sc_cpu_version}" in
+ 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
+ 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
+ 532) # CPU_PA_RISC2_0
+ case "${sc_kernel_bits}" in
+ 32) HP_ARCH="hppa2.0n" ;;
+ 64) HP_ARCH="hppa2.0w" ;;
+ '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20
+ esac ;;
+ esac
+ fi
+ if [ "${HP_ARCH}" = "" ]; then
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+
+ #define _HPUX_SOURCE
+ #include <stdlib.h>
+ #include <unistd.h>
+
+ int main ()
+ {
+ #if defined(_SC_KERNEL_BITS)
+ long bits = sysconf(_SC_KERNEL_BITS);
+ #endif
+ long cpu = sysconf (_SC_CPU_VERSION);
+
+ switch (cpu)
+ {
+ case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
+ case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
+ case CPU_PA_RISC2_0:
+ #if defined(_SC_KERNEL_BITS)
+ switch (bits)
+ {
+ case 64: puts ("hppa2.0w"); break;
+ case 32: puts ("hppa2.0n"); break;
+ default: puts ("hppa2.0"); break;
+ } break;
+ #else /* !defined(_SC_KERNEL_BITS) */
+ puts ("hppa2.0"); break;
+ #endif
+ default: puts ("hppa1.0"); break;
+ }
+ exit (0);
+ }
+EOF
+ (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
+ test -z "$HP_ARCH" && HP_ARCH=hppa
+ fi ;;
+ esac
+ if [ ${HP_ARCH} = "hppa2.0w" ]
+ then
+ eval $set_cc_for_build
+
+ # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
+ # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler
+ # generating 64-bit code. GNU and HP use different nomenclature:
+ #
+ # $ CC_FOR_BUILD=cc ./config.guess
+ # => hppa2.0w-hp-hpux11.23
+ # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
+ # => hppa64-hp-hpux11.23
+
+ if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
+ grep __LP64__ >/dev/null
+ then
+ HP_ARCH="hppa2.0w"
+ else
+ HP_ARCH="hppa64"
+ fi
+ fi
+ echo ${HP_ARCH}-hp-hpux${HPUX_REV}
+ exit ;;
+ ia64:HP-UX:*:*)
+ HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+ echo ia64-hp-hpux${HPUX_REV}
+ exit ;;
+ 3050*:HI-UX:*:*)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #include <unistd.h>
+ int
+ main ()
+ {
+ long cpu = sysconf (_SC_CPU_VERSION);
+ /* The order matters, because CPU_IS_HP_MC68K erroneously returns
+ true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct
+ results, however. */
+ if (CPU_IS_PA_RISC (cpu))
+ {
+ switch (cpu)
+ {
+ case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
+ case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
+ case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
+ default: puts ("hppa-hitachi-hiuxwe2"); break;
+ }
+ }
+ else if (CPU_IS_HP_MC68K (cpu))
+ puts ("m68k-hitachi-hiuxwe2");
+ else puts ("unknown-hitachi-hiuxwe2");
+ exit (0);
+ }
+EOF
+ $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
+ { echo "$SYSTEM_NAME"; exit; }
+ echo unknown-hitachi-hiuxwe2
+ exit ;;
+ 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
+ echo hppa1.1-hp-bsd
+ exit ;;
+ 9000/8??:4.3bsd:*:*)
+ echo hppa1.0-hp-bsd
+ exit ;;
+ *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
+ echo hppa1.0-hp-mpeix
+ exit ;;
+ hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
+ echo hppa1.1-hp-osf
+ exit ;;
+ hp8??:OSF1:*:*)
+ echo hppa1.0-hp-osf
+ exit ;;
+ i*86:OSF1:*:*)
+ if [ -x /usr/sbin/sysversion ] ; then
+ echo ${UNAME_MACHINE}-unknown-osf1mk
+ else
+ echo ${UNAME_MACHINE}-unknown-osf1
+ fi
+ exit ;;
+ parisc*:Lites*:*:*)
+ echo hppa1.1-hp-lites
+ exit ;;
+ C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
+ echo c1-convex-bsd
+ exit ;;
+ C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
+ if getsysinfo -f scalar_acc
+ then echo c32-convex-bsd
+ else echo c2-convex-bsd
+ fi
+ exit ;;
+ C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
+ echo c34-convex-bsd
+ exit ;;
+ C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
+ echo c38-convex-bsd
+ exit ;;
+ C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
+ echo c4-convex-bsd
+ exit ;;
+ CRAY*Y-MP:*:*:*)
+ echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ CRAY*[A-Z]90:*:*:*)
+ echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
+ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
+ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
+ -e 's/\.[^.]*$/.X/'
+ exit ;;
+ CRAY*TS:*:*:*)
+ echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ CRAY*T3E:*:*:*)
+ echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ CRAY*SV1:*:*:*)
+ echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ *:UNICOS/mp:*:*)
+ echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
+ FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+ FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
+ echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+ exit ;;
+ 5000:UNIX_System_V:4.*:*)
+ FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+ FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
+ echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+ exit ;;
+ i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
+ echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
+ exit ;;
+ sparc*:BSD/OS:*:*)
+ echo sparc-unknown-bsdi${UNAME_RELEASE}
+ exit ;;
+ *:BSD/OS:*:*)
+ echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
+ exit ;;
+ *:FreeBSD:*:*)
+ case ${UNAME_MACHINE} in
+ pc98)
+ echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+ *)
+ echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+ esac
+ exit ;;
+ i*:CYGWIN*:*)
+ echo ${UNAME_MACHINE}-pc-cygwin
+ exit ;;
+ i*:MINGW*:*)
+ echo ${UNAME_MACHINE}-pc-mingw32
+ exit ;;
+ i*:windows32*:*)
+ # uname -m includes "-pc" on this system.
+ echo ${UNAME_MACHINE}-mingw32
+ exit ;;
+ i*:PW*:*)
+ echo ${UNAME_MACHINE}-pc-pw32
+ exit ;;
+ x86:Interix*:[345]*)
+ echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//'
+ exit ;;
+ [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
+ echo i${UNAME_MACHINE}-pc-mks
+ exit ;;
+ i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
+ # How do we know it's Interix rather than the generic POSIX subsystem?
+ # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
+ # UNAME_MACHINE based on the output of uname instead of i386?
+ echo i586-pc-interix
+ exit ;;
+ i*:UWIN*:*)
+ echo ${UNAME_MACHINE}-pc-uwin
+ exit ;;
+ amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
+ echo x86_64-unknown-cygwin
+ exit ;;
+ p*:CYGWIN*:*)
+ echo powerpcle-unknown-cygwin
+ exit ;;
+ prep*:SunOS:5.*:*)
+ echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ *:GNU:*:*)
+ # the GNU system
+ echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
+ exit ;;
+ *:GNU/*:*:*)
+ # other systems with GNU libc and userland
+ echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
+ exit ;;
+ i*86:Minix:*:*)
+ echo ${UNAME_MACHINE}-pc-minix
+ exit ;;
+ arm*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ cris:Linux:*:*)
+ echo cris-axis-linux-gnu
+ exit ;;
+ crisv32:Linux:*:*)
+ echo crisv32-axis-linux-gnu
+ exit ;;
+ frv:Linux:*:*)
+ echo frv-unknown-linux-gnu
+ exit ;;
+ ia64:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ m32r*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ m68*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ mips:Linux:*:*)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #undef CPU
+ #undef mips
+ #undef mipsel
+ #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
+ CPU=mipsel
+ #else
+ #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
+ CPU=mips
+ #else
+ CPU=
+ #endif
+ #endif
+EOF
+ eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '/^CPU/{s: ::g;p;}'`"
+ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
+ ;;
+ mips64:Linux:*:*)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #undef CPU
+ #undef mips64
+ #undef mips64el
+ #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
+ CPU=mips64el
+ #else
+ #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
+ CPU=mips64
+ #else
+ CPU=
+ #endif
+ #endif
+EOF
+ eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '/^CPU/{s: ::g;p;}'`"
+ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
+ ;;
+ or32:Linux:*:*)
+ echo or32-unknown-linux-gnu
+ exit ;;
+ ppc:Linux:*:*)
+ echo powerpc-unknown-linux-gnu
+ exit ;;
+ ppc64:Linux:*:*)
+ echo powerpc64-unknown-linux-gnu
+ exit ;;
+ alpha:Linux:*:*)
+ case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
+ EV5) UNAME_MACHINE=alphaev5 ;;
+ EV56) UNAME_MACHINE=alphaev56 ;;
+ PCA56) UNAME_MACHINE=alphapca56 ;;
+ PCA57) UNAME_MACHINE=alphapca56 ;;
+ EV6) UNAME_MACHINE=alphaev6 ;;
+ EV67) UNAME_MACHINE=alphaev67 ;;
+ EV68*) UNAME_MACHINE=alphaev68 ;;
+ esac
+ objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
+ if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
+ echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
+ exit ;;
+ parisc:Linux:*:* | hppa:Linux:*:*)
+ # Look for CPU level
+ case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
+ PA7*) echo hppa1.1-unknown-linux-gnu ;;
+ PA8*) echo hppa2.0-unknown-linux-gnu ;;
+ *) echo hppa-unknown-linux-gnu ;;
+ esac
+ exit ;;
+ parisc64:Linux:*:* | hppa64:Linux:*:*)
+ echo hppa64-unknown-linux-gnu
+ exit ;;
+ s390:Linux:*:* | s390x:Linux:*:*)
+ echo ${UNAME_MACHINE}-ibm-linux
+ exit ;;
+ sh64*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ sh*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ sparc:Linux:*:* | sparc64:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ vax:Linux:*:*)
+ echo ${UNAME_MACHINE}-dec-linux-gnu
+ exit ;;
+ x86_64:Linux:*:*)
+ echo x86_64-unknown-linux-gnu
+ exit ;;
+ i*86:Linux:*:*)
+ # The BFD linker knows what the default object file format is, so
+ # first see if it will tell us. cd to the root directory to prevent
+ # problems with other programs or directories called `ld' in the path.
+ # Set LC_ALL=C to ensure ld outputs messages in English.
+ ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
+ | sed -ne '/supported targets:/!d
+ s/[ ][ ]*/ /g
+ s/.*supported targets: *//
+ s/ .*//
+ p'`
+ case "$ld_supported_targets" in
+ elf32-i386)
+ TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
+ ;;
+ a.out-i386-linux)
+ echo "${UNAME_MACHINE}-pc-linux-gnuaout"
+ exit ;;
+ coff-i386)
+ echo "${UNAME_MACHINE}-pc-linux-gnucoff"
+ exit ;;
+ "")
+ # Either a pre-BFD a.out linker (linux-gnuoldld) or
+ # one that does not give us useful --help.
+ echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
+ exit ;;
+ esac
+ # Determine whether the default compiler is a.out or elf
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #include <features.h>
+ #ifdef __ELF__
+ # ifdef __GLIBC__
+ # if __GLIBC__ >= 2
+ LIBC=gnu
+ # else
+ LIBC=gnulibc1
+ # endif
+ # else
+ LIBC=gnulibc1
+ # endif
+ #else
+ #if defined(__INTEL_COMPILER) || defined(__PGI)
+ LIBC=gnu
+ #else
+ LIBC=gnuaout
+ #endif
+ #endif
+ #ifdef __dietlibc__
+ LIBC=dietlibc
+ #endif
+EOF
+ eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '/^LIBC/{s: ::g;p;}'`"
+ test x"${LIBC}" != x && {
+ echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
+ exit
+ }
+ test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; }
+ ;;
+ i*86:DYNIX/ptx:4*:*)
+ # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
+ # earlier versions are messed up and put the nodename in both
+ # sysname and nodename.
+ echo i386-sequent-sysv4
+ exit ;;
+ i*86:UNIX_SV:4.2MP:2.*)
+ # Unixware is an offshoot of SVR4, but it has its own version
+ # number series starting with 2...
+ # I am not positive that other SVR4 systems won't match this,
+ # I just have to hope. -- rms.
+ # Use sysv4.2uw... so that sysv4* matches it.
+ echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
+ exit ;;
+ i*86:OS/2:*:*)
+ # If we were able to find `uname', then EMX Unix compatibility
+ # is probably installed.
+ echo ${UNAME_MACHINE}-pc-os2-emx
+ exit ;;
+ i*86:XTS-300:*:STOP)
+ echo ${UNAME_MACHINE}-unknown-stop
+ exit ;;
+ i*86:atheos:*:*)
+ echo ${UNAME_MACHINE}-unknown-atheos
+ exit ;;
+ i*86:syllable:*:*)
+ echo ${UNAME_MACHINE}-pc-syllable
+ exit ;;
+ i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
+ echo i386-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ i*86:*DOS:*:*)
+ echo ${UNAME_MACHINE}-pc-msdosdjgpp
+ exit ;;
+ i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
+ UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
+ if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
+ echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
+ else
+ echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
+ fi
+ exit ;;
+ i*86:*:5:[678]*)
+ # UnixWare 7.x, OpenUNIX and OpenServer 6.
+ case `/bin/uname -X | grep "^Machine"` in
+ *486*) UNAME_MACHINE=i486 ;;
+ *Pentium) UNAME_MACHINE=i586 ;;
+ *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
+ esac
+ echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
+ exit ;;
+ i*86:*:3.2:*)
+ if test -f /usr/options/cb.name; then
+ UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
+ echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
+ elif /bin/uname -X 2>/dev/null >/dev/null ; then
+ UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
+ (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
+ (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
+ && UNAME_MACHINE=i586
+ (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
+ && UNAME_MACHINE=i686
+ (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
+ && UNAME_MACHINE=i686
+ echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
+ else
+ echo ${UNAME_MACHINE}-pc-sysv32
+ fi
+ exit ;;
+ pc:*:*:*)
+ # Left here for compatibility:
+ # uname -m prints for DJGPP always 'pc', but it prints nothing about
+ # the processor, so we play safe by assuming i386.
+ echo i386-pc-msdosdjgpp
+ exit ;;
+ Intel:Mach:3*:*)
+ echo i386-pc-mach3
+ exit ;;
+ paragon:*:*:*)
+ echo i860-intel-osf1
+ exit ;;
+ i860:*:4.*:*) # i860-SVR4
+ if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
+ echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
+ else # Add other i860-SVR4 vendors below as they are discovered.
+ echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4
+ fi
+ exit ;;
+ mini*:CTIX:SYS*5:*)
+ # "miniframe"
+ echo m68010-convergent-sysv
+ exit ;;
+ mc68k:UNIX:SYSTEM5:3.51m)
+ echo m68k-convergent-sysv
+ exit ;;
+ M680?0:D-NIX:5.3:*)
+ echo m68k-diab-dnix
+ exit ;;
+ M68*:*:R3V[5678]*:*)
+ test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
+ 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
+ OS_REL=''
+ test -r /etc/.relid \
+ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+ && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
+ /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
+ 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+ && { echo i486-ncr-sysv4; exit; } ;;
+ m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
+ echo m68k-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ mc68030:UNIX_System_V:4.*:*)
+ echo m68k-atari-sysv4
+ exit ;;
+ TSUNAMI:LynxOS:2.*:*)
+ echo sparc-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ rs6000:LynxOS:2.*:*)
+ echo rs6000-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
+ echo powerpc-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ SM[BE]S:UNIX_SV:*:*)
+ echo mips-dde-sysv${UNAME_RELEASE}
+ exit ;;
+ RM*:ReliantUNIX-*:*:*)
+ echo mips-sni-sysv4
+ exit ;;
+ RM*:SINIX-*:*:*)
+ echo mips-sni-sysv4
+ exit ;;
+ *:SINIX-*:*:*)
+ if uname -p 2>/dev/null >/dev/null ; then
+ UNAME_MACHINE=`(uname -p) 2>/dev/null`
+ echo ${UNAME_MACHINE}-sni-sysv4
+ else
+ echo ns32k-sni-sysv
+ fi
+ exit ;;
+ PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
+ # says <Richard.M.Bartel@ccMail.Census.GOV>
+ echo i586-unisys-sysv4
+ exit ;;
+ *:UNIX_System_V:4*:FTX*)
+ # From Gerald Hewes <hewes@openmarket.com>.
+ # How about differentiating between stratus architectures? -djm
+ echo hppa1.1-stratus-sysv4
+ exit ;;
+ *:*:*:FTX*)
+ # From seanf@swdc.stratus.com.
+ echo i860-stratus-sysv4
+ exit ;;
+ i*86:VOS:*:*)
+ # From Paul.Green@stratus.com.
+ echo ${UNAME_MACHINE}-stratus-vos
+ exit ;;
+ *:VOS:*:*)
+ # From Paul.Green@stratus.com.
+ echo hppa1.1-stratus-vos
+ exit ;;
+ mc68*:A/UX:*:*)
+ echo m68k-apple-aux${UNAME_RELEASE}
+ exit ;;
+ news*:NEWS-OS:6*:*)
+ echo mips-sony-newsos6
+ exit ;;
+ R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
+ if [ -d /usr/nec ]; then
+ echo mips-nec-sysv${UNAME_RELEASE}
+ else
+ echo mips-unknown-sysv${UNAME_RELEASE}
+ fi
+ exit ;;
+ BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
+ echo powerpc-be-beos
+ exit ;;
+ BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
+ echo powerpc-apple-beos
+ exit ;;
+ BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
+ echo i586-pc-beos
+ exit ;;
+ SX-4:SUPER-UX:*:*)
+ echo sx4-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-5:SUPER-UX:*:*)
+ echo sx5-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-6:SUPER-UX:*:*)
+ echo sx6-nec-superux${UNAME_RELEASE}
+ exit ;;
+ Power*:Rhapsody:*:*)
+ echo powerpc-apple-rhapsody${UNAME_RELEASE}
+ exit ;;
+ *:Rhapsody:*:*)
+ echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
+ exit ;;
+ *:Darwin:*:*)
+ UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
+ case $UNAME_PROCESSOR in
+ unknown) UNAME_PROCESSOR=powerpc ;;
+ esac
+ echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
+ exit ;;
+ *:procnto*:*:* | *:QNX:[0123456789]*:*)
+ UNAME_PROCESSOR=`uname -p`
+ if test "$UNAME_PROCESSOR" = "x86"; then
+ UNAME_PROCESSOR=i386
+ UNAME_MACHINE=pc
+ fi
+ echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
+ exit ;;
+ *:QNX:*:4*)
+ echo i386-pc-qnx
+ exit ;;
+ NSE-?:NONSTOP_KERNEL:*:*)
+ echo nse-tandem-nsk${UNAME_RELEASE}
+ exit ;;
+ NSR-?:NONSTOP_KERNEL:*:*)
+ echo nsr-tandem-nsk${UNAME_RELEASE}
+ exit ;;
+ *:NonStop-UX:*:*)
+ echo mips-compaq-nonstopux
+ exit ;;
+ BS2000:POSIX*:*:*)
+ echo bs2000-siemens-sysv
+ exit ;;
+ DS/*:UNIX_System_V:*:*)
+ echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
+ exit ;;
+ *:Plan9:*:*)
+ # "uname -m" is not consistent, so use $cputype instead. 386
+ # is converted to i386 for consistency with other x86
+ # operating systems.
+ if test "$cputype" = "386"; then
+ UNAME_MACHINE=i386
+ else
+ UNAME_MACHINE="$cputype"
+ fi
+ echo ${UNAME_MACHINE}-unknown-plan9
+ exit ;;
+ *:TOPS-10:*:*)
+ echo pdp10-unknown-tops10
+ exit ;;
+ *:TENEX:*:*)
+ echo pdp10-unknown-tenex
+ exit ;;
+ KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
+ echo pdp10-dec-tops20
+ exit ;;
+ XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
+ echo pdp10-xkl-tops20
+ exit ;;
+ *:TOPS-20:*:*)
+ echo pdp10-unknown-tops20
+ exit ;;
+ *:ITS:*:*)
+ echo pdp10-unknown-its
+ exit ;;
+ SEI:*:*:SEIUX)
+ echo mips-sei-seiux${UNAME_RELEASE}
+ exit ;;
+ *:DragonFly:*:*)
+ echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
+ exit ;;
+ *:*VMS:*:*)
+ UNAME_MACHINE=`(uname -p) 2>/dev/null`
+ case "${UNAME_MACHINE}" in
+ A*) echo alpha-dec-vms ; exit ;;
+ I*) echo ia64-dec-vms ; exit ;;
+ V*) echo vax-dec-vms ; exit ;;
+ esac ;;
+ *:XENIX:*:SysV)
+ echo i386-pc-xenix
+ exit ;;
+ i*86:skyos:*:*)
+ echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
+ exit ;;
+ i*86:rdos:*:*)
+ echo ${UNAME_MACHINE}-pc-rdos
+ exit ;;
+esac
+
+#echo '(No uname command or uname output not recognized.)' 1>&2
+#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
+
+eval $set_cc_for_build
+cat >$dummy.c <<EOF
+#ifdef _SEQUENT_
+# include <sys/types.h>
+# include <sys/utsname.h>
+#endif
+main ()
+{
+#if defined (sony)
+#if defined (MIPSEB)
+ /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,
+ I don't know.... */
+ printf ("mips-sony-bsd\n"); exit (0);
+#else
+#include <sys/param.h>
+ printf ("m68k-sony-newsos%s\n",
+#ifdef NEWSOS4
+ "4"
+#else
+ ""
+#endif
+ ); exit (0);
+#endif
+#endif
+
+#if defined (__arm) && defined (__acorn) && defined (__unix)
+ printf ("arm-acorn-riscix\n"); exit (0);
+#endif
+
+#if defined (hp300) && !defined (hpux)
+ printf ("m68k-hp-bsd\n"); exit (0);
+#endif
+
+#if defined (NeXT)
+#if !defined (__ARCHITECTURE__)
+#define __ARCHITECTURE__ "m68k"
+#endif
+ int version;
+ version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
+ if (version < 4)
+ printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
+ else
+ printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
+ exit (0);
+#endif
+
+#if defined (MULTIMAX) || defined (n16)
+#if defined (UMAXV)
+ printf ("ns32k-encore-sysv\n"); exit (0);
+#else
+#if defined (CMU)
+ printf ("ns32k-encore-mach\n"); exit (0);
+#else
+ printf ("ns32k-encore-bsd\n"); exit (0);
+#endif
+#endif
+#endif
+
+#if defined (__386BSD__)
+ printf ("i386-pc-bsd\n"); exit (0);
+#endif
+
+#if defined (sequent)
+#if defined (i386)
+ printf ("i386-sequent-dynix\n"); exit (0);
+#endif
+#if defined (ns32000)
+ printf ("ns32k-sequent-dynix\n"); exit (0);
+#endif
+#endif
+
+#if defined (_SEQUENT_)
+ struct utsname un;
+
+ uname(&un);
+
+ if (strncmp(un.version, "V2", 2) == 0) {
+ printf ("i386-sequent-ptx2\n"); exit (0);
+ }
+ if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
+ printf ("i386-sequent-ptx1\n"); exit (0);
+ }
+ printf ("i386-sequent-ptx\n"); exit (0);
+
+#endif
+
+#if defined (vax)
+# if !defined (ultrix)
+# include <sys/param.h>
+# if defined (BSD)
+# if BSD == 43
+ printf ("vax-dec-bsd4.3\n"); exit (0);
+# else
+# if BSD == 199006
+ printf ("vax-dec-bsd4.3reno\n"); exit (0);
+# else
+ printf ("vax-dec-bsd\n"); exit (0);
+# endif
+# endif
+# else
+ printf ("vax-dec-bsd\n"); exit (0);
+# endif
+# else
+ printf ("vax-dec-ultrix\n"); exit (0);
+# endif
+#endif
+
+#if defined (alliant) && defined (i860)
+ printf ("i860-alliant-bsd\n"); exit (0);
+#endif
+
+ exit (1);
+}
+EOF
+
+$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
+ { echo "$SYSTEM_NAME"; exit; }
+
+# Apollos put the system type in the environment.
+
+test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
+
+# Convex versions that predate uname can use getsysinfo(1)
+
+if [ -x /usr/convex/getsysinfo ]
+then
+ case `getsysinfo -f cpu_type` in
+ c1*)
+ echo c1-convex-bsd
+ exit ;;
+ c2*)
+ if getsysinfo -f scalar_acc
+ then echo c32-convex-bsd
+ else echo c2-convex-bsd
+ fi
+ exit ;;
+ c34*)
+ echo c34-convex-bsd
+ exit ;;
+ c38*)
+ echo c38-convex-bsd
+ exit ;;
+ c4*)
+ echo c4-convex-bsd
+ exit ;;
+ esac
+fi
+
+cat >&2 <<EOF
+$0: unable to guess system type
+
+This script, last modified $timestamp, has failed to recognize
+the operating system you are using. It is advised that you
+download the most up to date version of the config scripts from
+
+ http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess
+and
+ http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub
+
+If the version you run ($0) is already up to date, please
+send the following data and any information you think might be
+pertinent to <config-patches@gnu.org> in order to provide the needed
+information to handle your system.
+
+config.guess timestamp = $timestamp
+
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
+/bin/uname -X = `(/bin/uname -X) 2>/dev/null`
+
+hostinfo = `(hostinfo) 2>/dev/null`
+/bin/universe = `(/bin/universe) 2>/dev/null`
+/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null`
+/bin/arch = `(/bin/arch) 2>/dev/null`
+/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
+
+UNAME_MACHINE = ${UNAME_MACHINE}
+UNAME_RELEASE = ${UNAME_RELEASE}
+UNAME_SYSTEM = ${UNAME_SYSTEM}
+UNAME_VERSION = ${UNAME_VERSION}
+EOF
+
+exit 1
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
diff --git a/config.rpath b/config.rpath
new file mode 100755
index 00000000..3f1bef34
--- /dev/null
+++ b/config.rpath
@@ -0,0 +1,571 @@
+#! /bin/sh
+# Output a system dependent set of variables, describing how to set the
+# run time search path of shared libraries in an executable.
+#
+# Copyright 1996-2005 Free Software Foundation, Inc.
+# Taken from GNU libtool, 2001
+# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
+#
+# This file is free software; the Free Software Foundation gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved.
+#
+# The first argument passed to this file is the canonical host specification,
+# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
+# or
+# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
+# The environment variables CC, GCC, LDFLAGS, LD, with_gnu_ld
+# should be set by the caller.
+#
+# The set of defined variables is at the end of this script.
+
+# Known limitations:
+# - On IRIX 6.5 with CC="cc", the run time search patch must not be longer
+# than 256 bytes, otherwise the compiler driver will dump core. The only
+# known workaround is to choose shorter directory names for the build
+# directory and/or the installation directory.
+
+# All known linkers require a `.a' archive for static linking (except M$VC,
+# which needs '.lib').
+libext=a
+shrext=.so
+
+host="$1"
+host_cpu=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+host_vendor=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+host_os=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+
+cc_basename=`echo "$CC" | sed -e 's%^.*/%%'`
+
+# Code taken from libtool.m4's AC_LIBTOOL_PROG_COMPILER_PIC.
+
+wl=
+if test "$GCC" = yes; then
+ wl='-Wl,'
+else
+ case "$host_os" in
+ aix*)
+ wl='-Wl,'
+ ;;
+ darwin*)
+ case "$cc_basename" in
+ xlc*)
+ wl='-Wl,'
+ ;;
+ esac
+ ;;
+ mingw* | pw32* | os2*)
+ ;;
+ hpux9* | hpux10* | hpux11*)
+ wl='-Wl,'
+ ;;
+ irix5* | irix6* | nonstopux*)
+ wl='-Wl,'
+ ;;
+ newsos6)
+ ;;
+ linux*)
+ case $cc_basename in
+ icc* | ecc*)
+ wl='-Wl,'
+ ;;
+ pgcc | pgf77 | pgf90)
+ wl='-Wl,'
+ ;;
+ ccc*)
+ wl='-Wl,'
+ ;;
+ como)
+ wl='-lopt='
+ ;;
+ esac
+ ;;
+ osf3* | osf4* | osf5*)
+ wl='-Wl,'
+ ;;
+ sco3.2v5*)
+ ;;
+ solaris*)
+ wl='-Wl,'
+ ;;
+ sunos4*)
+ wl='-Qoption ld '
+ ;;
+ sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+ wl='-Wl,'
+ ;;
+ sysv4*MP*)
+ ;;
+ unicos*)
+ wl='-Wl,'
+ ;;
+ uts4*)
+ ;;
+ esac
+fi
+
+# Code taken from libtool.m4's AC_LIBTOOL_PROG_LD_SHLIBS.
+
+hardcode_libdir_flag_spec=
+hardcode_libdir_separator=
+hardcode_direct=no
+hardcode_minus_L=no
+
+case "$host_os" in
+ cygwin* | mingw* | pw32*)
+ # FIXME: the MSVC++ port hasn't been tested in a loooong time
+ # When not using gcc, we currently assume that we are using
+ # Microsoft Visual C++.
+ if test "$GCC" != yes; then
+ with_gnu_ld=no
+ fi
+ ;;
+ openbsd*)
+ with_gnu_ld=no
+ ;;
+esac
+
+ld_shlibs=yes
+if test "$with_gnu_ld" = yes; then
+ case "$host_os" in
+ aix3* | aix4* | aix5*)
+ # On AIX/PPC, the GNU linker is very broken
+ if test "$host_cpu" != ia64; then
+ ld_shlibs=no
+ fi
+ ;;
+ amigaos*)
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_minus_L=yes
+ # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
+ # that the semantics of dynamic libraries on AmigaOS, at least up
+ # to version 4, is to share data among multiple programs linked
+ # with the same dynamic library. Since this doesn't match the
+ # behavior of shared libraries on other platforms, we cannot use
+ # them.
+ ld_shlibs=no
+ ;;
+ beos*)
+ if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+ :
+ else
+ ld_shlibs=no
+ fi
+ ;;
+ cygwin* | mingw* | pw32*)
+ # hardcode_libdir_flag_spec is actually meaningless, as there is
+ # no search path for DLLs.
+ hardcode_libdir_flag_spec='-L$libdir'
+ if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
+ :
+ else
+ ld_shlibs=no
+ fi
+ ;;
+ netbsd*)
+ ;;
+ solaris* | sysv5*)
+ if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
+ ld_shlibs=no
+ elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+ :
+ else
+ ld_shlibs=no
+ fi
+ ;;
+ sunos4*)
+ hardcode_direct=yes
+ ;;
+ linux*)
+ if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+ :
+ else
+ ld_shlibs=no
+ fi
+ ;;
+ *)
+ if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+ :
+ else
+ ld_shlibs=no
+ fi
+ ;;
+ esac
+ if test "$ld_shlibs" = yes; then
+ # Unlike libtool, we use -rpath here, not --rpath, since the documented
+ # option of GNU ld is called -rpath, not --rpath.
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ fi
+else
+ case "$host_os" in
+ aix3*)
+ # Note: this linker hardcodes the directories in LIBPATH if there
+ # are no directories specified by -L.
+ hardcode_minus_L=yes
+ if test "$GCC" = yes; then
+ # Neither direct hardcoding nor static linking is supported with a
+ # broken collect2.
+ hardcode_direct=unsupported
+ fi
+ ;;
+ aix4* | aix5*)
+ if test "$host_cpu" = ia64; then
+ # On IA64, the linker does run time linking by default, so we don't
+ # have to do anything special.
+ aix_use_runtimelinking=no
+ else
+ aix_use_runtimelinking=no
+ # Test if we are trying to use run time linking or normal
+ # AIX style linking. If -brtl is somewhere in LDFLAGS, we
+ # need to do runtime linking.
+ case $host_os in aix4.[23]|aix4.[23].*|aix5*)
+ for ld_flag in $LDFLAGS; do
+ if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
+ aix_use_runtimelinking=yes
+ break
+ fi
+ done
+ esac
+ fi
+ hardcode_direct=yes
+ hardcode_libdir_separator=':'
+ if test "$GCC" = yes; then
+ case $host_os in aix4.[012]|aix4.[012].*)
+ collect2name=`${CC} -print-prog-name=collect2`
+ if test -f "$collect2name" && \
+ strings "$collect2name" | grep resolve_lib_name >/dev/null
+ then
+ # We have reworked collect2
+ hardcode_direct=yes
+ else
+ # We have old collect2
+ hardcode_direct=unsupported
+ hardcode_minus_L=yes
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_libdir_separator=
+ fi
+ esac
+ fi
+ # Begin _LT_AC_SYS_LIBPATH_AIX.
+ echo 'int main () { return 0; }' > conftest.c
+ ${CC} ${LDFLAGS} conftest.c -o conftest
+ aix_libpath=`dump -H conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
+}'`
+ if test -z "$aix_libpath"; then
+ aix_libpath=`dump -HX64 conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
+}'`
+ fi
+ if test -z "$aix_libpath"; then
+ aix_libpath="/usr/lib:/lib"
+ fi
+ rm -f conftest.c conftest
+ # End _LT_AC_SYS_LIBPATH_AIX.
+ if test "$aix_use_runtimelinking" = yes; then
+ hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
+ else
+ if test "$host_cpu" = ia64; then
+ hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
+ else
+ hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
+ fi
+ fi
+ ;;
+ amigaos*)
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_minus_L=yes
+ # see comment about different semantics on the GNU ld section
+ ld_shlibs=no
+ ;;
+ bsdi[45]*)
+ ;;
+ cygwin* | mingw* | pw32*)
+ # When not using gcc, we currently assume that we are using
+ # Microsoft Visual C++.
+ # hardcode_libdir_flag_spec is actually meaningless, as there is
+ # no search path for DLLs.
+ hardcode_libdir_flag_spec=' '
+ libext=lib
+ ;;
+ darwin* | rhapsody*)
+ hardcode_direct=no
+ if test "$GCC" = yes ; then
+ :
+ else
+ case "$cc_basename" in
+ xlc*)
+ ;;
+ *)
+ ld_shlibs=no
+ ;;
+ esac
+ fi
+ ;;
+ dgux*)
+ hardcode_libdir_flag_spec='-L$libdir'
+ ;;
+ freebsd1*)
+ ld_shlibs=no
+ ;;
+ freebsd2.2*)
+ hardcode_libdir_flag_spec='-R$libdir'
+ hardcode_direct=yes
+ ;;
+ freebsd2*)
+ hardcode_direct=yes
+ hardcode_minus_L=yes
+ ;;
+ freebsd* | kfreebsd*-gnu | dragonfly*)
+ hardcode_libdir_flag_spec='-R$libdir'
+ hardcode_direct=yes
+ ;;
+ hpux9*)
+ hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+ hardcode_libdir_separator=:
+ hardcode_direct=yes
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ hardcode_minus_L=yes
+ ;;
+ hpux10* | hpux11*)
+ if test "$with_gnu_ld" = no; then
+ case "$host_cpu" in
+ hppa*64*)
+ hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+ hardcode_libdir_separator=:
+ hardcode_direct=no
+ ;;
+ ia64*)
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_direct=no
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ hardcode_minus_L=yes
+ ;;
+ *)
+ hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+ hardcode_libdir_separator=:
+ hardcode_direct=yes
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ hardcode_minus_L=yes
+ ;;
+ esac
+ fi
+ ;;
+ irix5* | irix6* | nonstopux*)
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ hardcode_libdir_separator=:
+ ;;
+ netbsd*)
+ hardcode_libdir_flag_spec='-R$libdir'
+ hardcode_direct=yes
+ ;;
+ newsos6)
+ hardcode_direct=yes
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ hardcode_libdir_separator=:
+ ;;
+ openbsd*)
+ hardcode_direct=yes
+ if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+ else
+ case "$host_os" in
+ openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
+ hardcode_libdir_flag_spec='-R$libdir'
+ ;;
+ *)
+ hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+ ;;
+ esac
+ fi
+ ;;
+ os2*)
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_minus_L=yes
+ ;;
+ osf3*)
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ hardcode_libdir_separator=:
+ ;;
+ osf4* | osf5*)
+ if test "$GCC" = yes; then
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ else
+ # Both cc and cxx compiler support -rpath directly
+ hardcode_libdir_flag_spec='-rpath $libdir'
+ fi
+ hardcode_libdir_separator=:
+ ;;
+ sco3.2v5*)
+ ;;
+ solaris*)
+ hardcode_libdir_flag_spec='-R$libdir'
+ ;;
+ sunos4*)
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_direct=yes
+ hardcode_minus_L=yes
+ ;;
+ sysv4)
+ case $host_vendor in
+ sni)
+ hardcode_direct=yes # is this really true???
+ ;;
+ siemens)
+ hardcode_direct=no
+ ;;
+ motorola)
+ hardcode_direct=no #Motorola manual says yes, but my tests say they lie
+ ;;
+ esac
+ ;;
+ sysv4.3*)
+ ;;
+ sysv4*MP*)
+ if test -d /usr/nec; then
+ ld_shlibs=yes
+ fi
+ ;;
+ sysv4.2uw2*)
+ hardcode_direct=yes
+ hardcode_minus_L=no
+ ;;
+ sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7*)
+ ;;
+ sysv5*)
+ hardcode_libdir_flag_spec=
+ ;;
+ uts4*)
+ hardcode_libdir_flag_spec='-L$libdir'
+ ;;
+ *)
+ ld_shlibs=no
+ ;;
+ esac
+fi
+
+# Check dynamic linker characteristics
+# Code taken from libtool.m4's AC_LIBTOOL_SYS_DYNAMIC_LINKER.
+libname_spec='lib$name'
+case "$host_os" in
+ aix3*)
+ ;;
+ aix4* | aix5*)
+ ;;
+ amigaos*)
+ ;;
+ beos*)
+ ;;
+ bsdi[45]*)
+ ;;
+ cygwin* | mingw* | pw32*)
+ shrext=.dll
+ ;;
+ darwin* | rhapsody*)
+ shrext=.dylib
+ ;;
+ dgux*)
+ ;;
+ freebsd1*)
+ ;;
+ kfreebsd*-gnu)
+ ;;
+ freebsd*)
+ ;;
+ gnu*)
+ ;;
+ hpux9* | hpux10* | hpux11*)
+ case "$host_cpu" in
+ ia64*)
+ shrext=.so
+ ;;
+ hppa*64*)
+ shrext=.sl
+ ;;
+ *)
+ shrext=.sl
+ ;;
+ esac
+ ;;
+ irix5* | irix6* | nonstopux*)
+ case "$host_os" in
+ irix5* | nonstopux*)
+ libsuff= shlibsuff=
+ ;;
+ *)
+ case $LD in
+ *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= ;;
+ *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 ;;
+ *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 ;;
+ *) libsuff= shlibsuff= ;;
+ esac
+ ;;
+ esac
+ ;;
+ linux*oldld* | linux*aout* | linux*coff*)
+ ;;
+ linux*)
+ ;;
+ knetbsd*-gnu)
+ ;;
+ netbsd*)
+ ;;
+ newsos6)
+ ;;
+ nto-qnx*)
+ ;;
+ openbsd*)
+ ;;
+ os2*)
+ libname_spec='$name'
+ shrext=.dll
+ ;;
+ osf3* | osf4* | osf5*)
+ ;;
+ sco3.2v5*)
+ ;;
+ solaris*)
+ ;;
+ sunos4*)
+ ;;
+ sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+ ;;
+ sysv4*MP*)
+ ;;
+ uts4*)
+ ;;
+esac
+
+sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
+escaped_wl=`echo "X$wl" | sed -e 's/^X//' -e "$sed_quote_subst"`
+shlibext=`echo "$shrext" | sed -e 's,^\.,,'`
+escaped_hardcode_libdir_flag_spec=`echo "X$hardcode_libdir_flag_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
+
+LC_ALL=C sed -e 's/^\([a-zA-Z0-9_]*\)=/acl_cv_\1=/' <<EOF
+
+# How to pass a linker flag through the compiler.
+wl="$escaped_wl"
+
+# Static library suffix (normally "a").
+libext="$libext"
+
+# Shared library suffix (normally "so").
+shlibext="$shlibext"
+
+# Flag to hardcode \$libdir into a binary during linking.
+# This must work even if \$libdir does not exist.
+hardcode_libdir_flag_spec="$escaped_hardcode_libdir_flag_spec"
+
+# Whether we need a single -rpath flag with a separated argument.
+hardcode_libdir_separator="$hardcode_libdir_separator"
+
+# Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
+# resulting binary.
+hardcode_direct="$hardcode_direct"
+
+# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
+# resulting binary.
+hardcode_minus_L="$hardcode_minus_L"
+
+EOF
diff --git a/config.sub b/config.sub
new file mode 100755
index 00000000..a4e8a94a
--- /dev/null
+++ b/config.sub
@@ -0,0 +1,1606 @@
+#! /bin/sh
+# Configuration validation subroutine script.
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+
+timestamp='2006-01-02'
+
+# This file is (in principle) common to ALL GNU software.
+# The presence of a machine in this file suggests that SOME GNU software
+# can handle that machine. It does not imply ALL GNU software can.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program 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.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
+# 02110-1301, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+
+# Please send patches to <config-patches@gnu.org>. Submit a context
+# diff and a properly formatted ChangeLog entry.
+#
+# Configuration subroutine to validate and canonicalize a configuration type.
+# Supply the specified configuration type as an argument.
+# If it is invalid, we print an error message on stderr and exit with code 1.
+# Otherwise, we print the canonical config type on stdout and succeed.
+
+# This file is supposed to be the same for all GNU packages
+# and recognize all the CPU types, system types and aliases
+# that are meaningful with *any* GNU software.
+# Each package is responsible for reporting which valid configurations
+# it does not support. The user should be able to distinguish
+# a failure to support a valid configuration from a meaningless
+# configuration.
+
+# The goal of this file is to map all the various variations of a given
+# machine specification into a single specification in the form:
+# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
+# or in some cases, the newer four-part form:
+# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
+# It is wrong to echo any other type of specification.
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION] CPU-MFR-OPSYS
+ $0 [OPTION] ALIAS
+
+Canonicalize a configuration name.
+
+Operation modes:
+ -h, --help print this help, then exit
+ -t, --time-stamp print date of last modification, then exit
+ -v, --version print version number, then exit
+
+Report bugs and patches to <config-patches@gnu.org>."
+
+version="\
+GNU config.sub ($timestamp)
+
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
+Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions. There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+ case $1 in
+ --time-stamp | --time* | -t )
+ echo "$timestamp" ; exit ;;
+ --version | -v )
+ echo "$version" ; exit ;;
+ --help | --h* | -h )
+ echo "$usage"; exit ;;
+ -- ) # Stop option processing
+ shift; break ;;
+ - ) # Use stdin as input.
+ break ;;
+ -* )
+ echo "$me: invalid option $1$help"
+ exit 1 ;;
+
+ *local*)
+ # First pass through any local machine types.
+ echo $1
+ exit ;;
+
+ * )
+ break ;;
+ esac
+done
+
+case $# in
+ 0) echo "$me: missing argument$help" >&2
+ exit 1;;
+ 1) ;;
+ *) echo "$me: too many arguments$help" >&2
+ exit 1;;
+esac
+
+# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
+# Here we must recognize all the valid KERNEL-OS combinations.
+maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
+case $maybe_os in
+ nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
+ uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
+ storm-chaos* | os2-emx* | rtmk-nova*)
+ os=-$maybe_os
+ basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
+ ;;
+ *)
+ basic_machine=`echo $1 | sed 's/-[^-]*$//'`
+ if [ $basic_machine != $1 ]
+ then os=`echo $1 | sed 's/.*-/-/'`
+ else os=; fi
+ ;;
+esac
+
+### Let's recognize common machines as not being operating systems so
+### that things like config.sub decstation-3100 work. We also
+### recognize some manufacturers as not being operating systems, so we
+### can provide default operating systems below.
+case $os in
+ -sun*os*)
+ # Prevent following clause from handling this invalid input.
+ ;;
+ -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
+ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
+ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
+ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
+ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
+ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
+ -apple | -axis | -knuth | -cray)
+ os=
+ basic_machine=$1
+ ;;
+ -sim | -cisco | -oki | -wec | -winbond)
+ os=
+ basic_machine=$1
+ ;;
+ -scout)
+ ;;
+ -wrs)
+ os=-vxworks
+ basic_machine=$1
+ ;;
+ -chorusos*)
+ os=-chorusos
+ basic_machine=$1
+ ;;
+ -chorusrdb)
+ os=-chorusrdb
+ basic_machine=$1
+ ;;
+ -hiux*)
+ os=-hiuxwe2
+ ;;
+ -sco6)
+ os=-sco5v6
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco5)
+ os=-sco3.2v5
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco4)
+ os=-sco3.2v4
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco3.2.[4-9]*)
+ os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco3.2v[4-9]*)
+ # Don't forget version if it is 3.2v4 or newer.
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco5v6*)
+ # Don't forget version if it is 3.2v4 or newer.
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco*)
+ os=-sco3.2v2
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -udk*)
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -isc)
+ os=-isc2.2
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -clix*)
+ basic_machine=clipper-intergraph
+ ;;
+ -isc*)
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -lynx*)
+ os=-lynxos
+ ;;
+ -ptx*)
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
+ ;;
+ -windowsnt*)
+ os=`echo $os | sed -e 's/windowsnt/winnt/'`
+ ;;
+ -psos*)
+ os=-psos
+ ;;
+ -mint | -mint[0-9]*)
+ basic_machine=m68k-atari
+ os=-mint
+ ;;
+esac
+
+# Decode aliases for certain CPU-COMPANY combinations.
+case $basic_machine in
+ # Recognize the basic CPU types without company name.
+ # Some are omitted here because they have special meanings below.
+ 1750a | 580 \
+ | a29k \
+ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
+ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
+ | am33_2.0 \
+ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
+ | bfin \
+ | c4x | clipper \
+ | d10v | d30v | dlx | dsp16xx \
+ | fr30 | frv \
+ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
+ | i370 | i860 | i960 | ia64 \
+ | ip2k | iq2000 \
+ | m32r | m32rle | m68000 | m68k | m88k | maxq | mb | microblaze | mcore \
+ | mips | mipsbe | mipseb | mipsel | mipsle \
+ | mips16 \
+ | mips64 | mips64el \
+ | mips64vr | mips64vrel \
+ | mips64orion | mips64orionel \
+ | mips64vr4100 | mips64vr4100el \
+ | mips64vr4300 | mips64vr4300el \
+ | mips64vr5000 | mips64vr5000el \
+ | mips64vr5900 | mips64vr5900el \
+ | mipsisa32 | mipsisa32el \
+ | mipsisa32r2 | mipsisa32r2el \
+ | mipsisa64 | mipsisa64el \
+ | mipsisa64r2 | mipsisa64r2el \
+ | mipsisa64sb1 | mipsisa64sb1el \
+ | mipsisa64sr71k | mipsisa64sr71kel \
+ | mipstx39 | mipstx39el \
+ | mn10200 | mn10300 \
+ | mt \
+ | msp430 \
+ | ns16k | ns32k \
+ | or32 \
+ | pdp10 | pdp11 | pj | pjl \
+ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
+ | pyramid \
+ | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
+ | sh64 | sh64le \
+ | sparc | sparc64 | sparc64b | sparc86x | sparclet | sparclite \
+ | sparcv8 | sparcv9 | sparcv9b \
+ | strongarm \
+ | tahoe | thumb | tic4x | tic80 | tron \
+ | v850 | v850e \
+ | we32k \
+ | x86 | xscale | xscalee[bl] | xstormy16 | xtensa \
+ | z8k)
+ basic_machine=$basic_machine-unknown
+ ;;
+ m32c)
+ basic_machine=$basic_machine-unknown
+ ;;
+ m6811 | m68hc11 | m6812 | m68hc12)
+ # Motorola 68HC11/12.
+ basic_machine=$basic_machine-unknown
+ os=-none
+ ;;
+ m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
+ ;;
+ ms1)
+ basic_machine=mt-unknown
+ ;;
+
+ # We use `pc' rather than `unknown'
+ # because (1) that's what they normally are, and
+ # (2) the word "unknown" tends to confuse beginning users.
+ i*86 | x86_64)
+ basic_machine=$basic_machine-pc
+ ;;
+ # Object if more than one company name word.
+ *-*-*)
+ echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+ exit 1
+ ;;
+ # Recognize the basic CPU types with company name.
+ 580-* \
+ | a29k-* \
+ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
+ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
+ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
+ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \
+ | avr-* \
+ | bfin-* | bs2000-* \
+ | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
+ | clipper-* | craynv-* | cydra-* \
+ | d10v-* | d30v-* | dlx-* \
+ | elxsi-* \
+ | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
+ | h8300-* | h8500-* \
+ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
+ | i*86-* | i860-* | i960-* | ia64-* \
+ | ip2k-* | iq2000-* \
+ | m32r-* | m32rle-* \
+ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
+ | m88110-* | m88k-* | maxq-* | mcore-* \
+ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
+ | mips16-* \
+ | mips64-* | mips64el-* \
+ | mips64vr-* | mips64vrel-* \
+ | mips64orion-* | mips64orionel-* \
+ | mips64vr4100-* | mips64vr4100el-* \
+ | mips64vr4300-* | mips64vr4300el-* \
+ | mips64vr5000-* | mips64vr5000el-* \
+ | mips64vr5900-* | mips64vr5900el-* \
+ | mipsisa32-* | mipsisa32el-* \
+ | mipsisa32r2-* | mipsisa32r2el-* \
+ | mipsisa64-* | mipsisa64el-* \
+ | mipsisa64r2-* | mipsisa64r2el-* \
+ | mipsisa64sb1-* | mipsisa64sb1el-* \
+ | mipsisa64sr71k-* | mipsisa64sr71kel-* \
+ | mipstx39-* | mipstx39el-* \
+ | mmix-* \
+ | mt-* \
+ | msp430-* \
+ | none-* | np1-* | ns16k-* | ns32k-* \
+ | orion-* \
+ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
+ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
+ | pyramid-* \
+ | romp-* | rs6000-* \
+ | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | shbe-* \
+ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
+ | sparc-* | sparc64-* | sparc64b-* | sparc86x-* | sparclet-* \
+ | sparclite-* \
+ | sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
+ | tahoe-* | thumb-* \
+ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
+ | tron-* \
+ | v850-* | v850e-* | vax-* \
+ | we32k-* \
+ | x86-* | x86_64-* | xps100-* | xscale-* | xscalee[bl]-* \
+ | xstormy16-* | xtensa-* \
+ | ymp-* \
+ | z8k-*)
+ ;;
+ m32c-*)
+ ;;
+ # Recognize the various machine names and aliases which stand
+ # for a CPU type and a company and sometimes even an OS.
+ 386bsd)
+ basic_machine=i386-unknown
+ os=-bsd
+ ;;
+ 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
+ basic_machine=m68000-att
+ ;;
+ 3b*)
+ basic_machine=we32k-att
+ ;;
+ a29khif)
+ basic_machine=a29k-amd
+ os=-udi
+ ;;
+ abacus)
+ basic_machine=abacus-unknown
+ ;;
+ adobe68k)
+ basic_machine=m68010-adobe
+ os=-scout
+ ;;
+ alliant | fx80)
+ basic_machine=fx80-alliant
+ ;;
+ altos | altos3068)
+ basic_machine=m68k-altos
+ ;;
+ am29k)
+ basic_machine=a29k-none
+ os=-bsd
+ ;;
+ amd64)
+ basic_machine=x86_64-pc
+ ;;
+ amd64-*)
+ basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ amdahl)
+ basic_machine=580-amdahl
+ os=-sysv
+ ;;
+ amiga | amiga-*)
+ basic_machine=m68k-unknown
+ ;;
+ amigaos | amigados)
+ basic_machine=m68k-unknown
+ os=-amigaos
+ ;;
+ amigaunix | amix)
+ basic_machine=m68k-unknown
+ os=-sysv4
+ ;;
+ apollo68)
+ basic_machine=m68k-apollo
+ os=-sysv
+ ;;
+ apollo68bsd)
+ basic_machine=m68k-apollo
+ os=-bsd
+ ;;
+ aux)
+ basic_machine=m68k-apple
+ os=-aux
+ ;;
+ balance)
+ basic_machine=ns32k-sequent
+ os=-dynix
+ ;;
+ c90)
+ basic_machine=c90-cray
+ os=-unicos
+ ;;
+ convex-c1)
+ basic_machine=c1-convex
+ os=-bsd
+ ;;
+ convex-c2)
+ basic_machine=c2-convex
+ os=-bsd
+ ;;
+ convex-c32)
+ basic_machine=c32-convex
+ os=-bsd
+ ;;
+ convex-c34)
+ basic_machine=c34-convex
+ os=-bsd
+ ;;
+ convex-c38)
+ basic_machine=c38-convex
+ os=-bsd
+ ;;
+ cray | j90)
+ basic_machine=j90-cray
+ os=-unicos
+ ;;
+ craynv)
+ basic_machine=craynv-cray
+ os=-unicosmp
+ ;;
+ cr16c)
+ basic_machine=cr16c-unknown
+ os=-elf
+ ;;
+ crds | unos)
+ basic_machine=m68k-crds
+ ;;
+ crisv32 | crisv32-* | etraxfs*)
+ basic_machine=crisv32-axis
+ ;;
+ cris | cris-* | etrax*)
+ basic_machine=cris-axis
+ ;;
+ crx)
+ basic_machine=crx-unknown
+ os=-elf
+ ;;
+ da30 | da30-*)
+ basic_machine=m68k-da30
+ ;;
+ decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
+ basic_machine=mips-dec
+ ;;
+ decsystem10* | dec10*)
+ basic_machine=pdp10-dec
+ os=-tops10
+ ;;
+ decsystem20* | dec20*)
+ basic_machine=pdp10-dec
+ os=-tops20
+ ;;
+ delta | 3300 | motorola-3300 | motorola-delta \
+ | 3300-motorola | delta-motorola)
+ basic_machine=m68k-motorola
+ ;;
+ delta88)
+ basic_machine=m88k-motorola
+ os=-sysv3
+ ;;
+ djgpp)
+ basic_machine=i586-pc
+ os=-msdosdjgpp
+ ;;
+ dpx20 | dpx20-*)
+ basic_machine=rs6000-bull
+ os=-bosx
+ ;;
+ dpx2* | dpx2*-bull)
+ basic_machine=m68k-bull
+ os=-sysv3
+ ;;
+ ebmon29k)
+ basic_machine=a29k-amd
+ os=-ebmon
+ ;;
+ elxsi)
+ basic_machine=elxsi-elxsi
+ os=-bsd
+ ;;
+ encore | umax | mmax)
+ basic_machine=ns32k-encore
+ ;;
+ es1800 | OSE68k | ose68k | ose | OSE)
+ basic_machine=m68k-ericsson
+ os=-ose
+ ;;
+ fx2800)
+ basic_machine=i860-alliant
+ ;;
+ genix)
+ basic_machine=ns32k-ns
+ ;;
+ gmicro)
+ basic_machine=tron-gmicro
+ os=-sysv
+ ;;
+ go32)
+ basic_machine=i386-pc
+ os=-go32
+ ;;
+ h3050r* | hiux*)
+ basic_machine=hppa1.1-hitachi
+ os=-hiuxwe2
+ ;;
+ h8300hms)
+ basic_machine=h8300-hitachi
+ os=-hms
+ ;;
+ h8300xray)
+ basic_machine=h8300-hitachi
+ os=-xray
+ ;;
+ h8500hms)
+ basic_machine=h8500-hitachi
+ os=-hms
+ ;;
+ harris)
+ basic_machine=m88k-harris
+ os=-sysv3
+ ;;
+ hp300-*)
+ basic_machine=m68k-hp
+ ;;
+ hp300bsd)
+ basic_machine=m68k-hp
+ os=-bsd
+ ;;
+ hp300hpux)
+ basic_machine=m68k-hp
+ os=-hpux
+ ;;
+ hp3k9[0-9][0-9] | hp9[0-9][0-9])
+ basic_machine=hppa1.0-hp
+ ;;
+ hp9k2[0-9][0-9] | hp9k31[0-9])
+ basic_machine=m68000-hp
+ ;;
+ hp9k3[2-9][0-9])
+ basic_machine=m68k-hp
+ ;;
+ hp9k6[0-9][0-9] | hp6[0-9][0-9])
+ basic_machine=hppa1.0-hp
+ ;;
+ hp9k7[0-79][0-9] | hp7[0-79][0-9])
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k78[0-9] | hp78[0-9])
+ # FIXME: really hppa2.0-hp
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
+ # FIXME: really hppa2.0-hp
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k8[0-9][13679] | hp8[0-9][13679])
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k8[0-9][0-9] | hp8[0-9][0-9])
+ basic_machine=hppa1.0-hp
+ ;;
+ hppa-next)
+ os=-nextstep3
+ ;;
+ hppaosf)
+ basic_machine=hppa1.1-hp
+ os=-osf
+ ;;
+ hppro)
+ basic_machine=hppa1.1-hp
+ os=-proelf
+ ;;
+ i370-ibm* | ibm*)
+ basic_machine=i370-ibm
+ ;;
+# I'm not sure what "Sysv32" means. Should this be sysv3.2?
+ i*86v32)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-sysv32
+ ;;
+ i*86v4*)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-sysv4
+ ;;
+ i*86v)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-sysv
+ ;;
+ i*86sol2)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-solaris2
+ ;;
+ i386mach)
+ basic_machine=i386-mach
+ os=-mach
+ ;;
+ i386-vsta | vsta)
+ basic_machine=i386-unknown
+ os=-vsta
+ ;;
+ iris | iris4d)
+ basic_machine=mips-sgi
+ case $os in
+ -irix*)
+ ;;
+ *)
+ os=-irix4
+ ;;
+ esac
+ ;;
+ isi68 | isi)
+ basic_machine=m68k-isi
+ os=-sysv
+ ;;
+ m88k-omron*)
+ basic_machine=m88k-omron
+ ;;
+ magnum | m3230)
+ basic_machine=mips-mips
+ os=-sysv
+ ;;
+ merlin)
+ basic_machine=ns32k-utek
+ os=-sysv
+ ;;
+ mingw32)
+ basic_machine=i386-pc
+ os=-mingw32
+ ;;
+ miniframe)
+ basic_machine=m68000-convergent
+ ;;
+ *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
+ basic_machine=m68k-atari
+ os=-mint
+ ;;
+ mips3*-*)
+ basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
+ ;;
+ mips3*)
+ basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
+ ;;
+ monitor)
+ basic_machine=m68k-rom68k
+ os=-coff
+ ;;
+ morphos)
+ basic_machine=powerpc-unknown
+ os=-morphos
+ ;;
+ msdos)
+ basic_machine=i386-pc
+ os=-msdos
+ ;;
+ ms1-*)
+ basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
+ ;;
+ mvs)
+ basic_machine=i370-ibm
+ os=-mvs
+ ;;
+ ncr3000)
+ basic_machine=i486-ncr
+ os=-sysv4
+ ;;
+ netbsd386)
+ basic_machine=i386-unknown
+ os=-netbsd
+ ;;
+ netwinder)
+ basic_machine=armv4l-rebel
+ os=-linux
+ ;;
+ news | news700 | news800 | news900)
+ basic_machine=m68k-sony
+ os=-newsos
+ ;;
+ news1000)
+ basic_machine=m68030-sony
+ os=-newsos
+ ;;
+ news-3600 | risc-news)
+ basic_machine=mips-sony
+ os=-newsos
+ ;;
+ necv70)
+ basic_machine=v70-nec
+ os=-sysv
+ ;;
+ next | m*-next )
+ basic_machine=m68k-next
+ case $os in
+ -nextstep* )
+ ;;
+ -ns2*)
+ os=-nextstep2
+ ;;
+ *)
+ os=-nextstep3
+ ;;
+ esac
+ ;;
+ nh3000)
+ basic_machine=m68k-harris
+ os=-cxux
+ ;;
+ nh[45]000)
+ basic_machine=m88k-harris
+ os=-cxux
+ ;;
+ nindy960)
+ basic_machine=i960-intel
+ os=-nindy
+ ;;
+ mon960)
+ basic_machine=i960-intel
+ os=-mon960
+ ;;
+ nonstopux)
+ basic_machine=mips-compaq
+ os=-nonstopux
+ ;;
+ np1)
+ basic_machine=np1-gould
+ ;;
+ nsr-tandem)
+ basic_machine=nsr-tandem
+ ;;
+ op50n-* | op60c-*)
+ basic_machine=hppa1.1-oki
+ os=-proelf
+ ;;
+ openrisc | openrisc-*)
+ basic_machine=or32-unknown
+ ;;
+ os400)
+ basic_machine=powerpc-ibm
+ os=-os400
+ ;;
+ OSE68000 | ose68000)
+ basic_machine=m68000-ericsson
+ os=-ose
+ ;;
+ os68k)
+ basic_machine=m68k-none
+ os=-os68k
+ ;;
+ pa-hitachi)
+ basic_machine=hppa1.1-hitachi
+ os=-hiuxwe2
+ ;;
+ paragon)
+ basic_machine=i860-intel
+ os=-osf
+ ;;
+ pbd)
+ basic_machine=sparc-tti
+ ;;
+ pbb)
+ basic_machine=m68k-tti
+ ;;
+ pc532 | pc532-*)
+ basic_machine=ns32k-pc532
+ ;;
+ pc98)
+ basic_machine=i386-pc
+ ;;
+ pc98-*)
+ basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentium | p5 | k5 | k6 | nexgen | viac3)
+ basic_machine=i586-pc
+ ;;
+ pentiumpro | p6 | 6x86 | athlon | athlon_*)
+ basic_machine=i686-pc
+ ;;
+ pentiumii | pentium2 | pentiumiii | pentium3)
+ basic_machine=i686-pc
+ ;;
+ pentium4)
+ basic_machine=i786-pc
+ ;;
+ pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
+ basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentiumpro-* | p6-* | 6x86-* | athlon-*)
+ basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
+ basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentium4-*)
+ basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pn)
+ basic_machine=pn-gould
+ ;;
+ power) basic_machine=power-ibm
+ ;;
+ ppc) basic_machine=powerpc-unknown
+ ;;
+ ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ppcle | powerpclittle | ppc-le | powerpc-little)
+ basic_machine=powerpcle-unknown
+ ;;
+ ppcle-* | powerpclittle-*)
+ basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ppc64) basic_machine=powerpc64-unknown
+ ;;
+ ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ppc64le | powerpc64little | ppc64-le | powerpc64-little)
+ basic_machine=powerpc64le-unknown
+ ;;
+ ppc64le-* | powerpc64little-*)
+ basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ps2)
+ basic_machine=i386-ibm
+ ;;
+ pw32)
+ basic_machine=i586-unknown
+ os=-pw32
+ ;;
+ rdos)
+ basic_machine=i386-pc
+ os=-rdos
+ ;;
+ rom68k)
+ basic_machine=m68k-rom68k
+ os=-coff
+ ;;
+ rm[46]00)
+ basic_machine=mips-siemens
+ ;;
+ rtpc | rtpc-*)
+ basic_machine=romp-ibm
+ ;;
+ s390 | s390-*)
+ basic_machine=s390-ibm
+ ;;
+ s390x | s390x-*)
+ basic_machine=s390x-ibm
+ ;;
+ sa29200)
+ basic_machine=a29k-amd
+ os=-udi
+ ;;
+ sb1)
+ basic_machine=mipsisa64sb1-unknown
+ ;;
+ sb1el)
+ basic_machine=mipsisa64sb1el-unknown
+ ;;
+ sei)
+ basic_machine=mips-sei
+ os=-seiux
+ ;;
+ sequent)
+ basic_machine=i386-sequent
+ ;;
+ sh)
+ basic_machine=sh-hitachi
+ os=-hms
+ ;;
+ sh64)
+ basic_machine=sh64-unknown
+ ;;
+ sparclite-wrs | simso-wrs)
+ basic_machine=sparclite-wrs
+ os=-vxworks
+ ;;
+ sps7)
+ basic_machine=m68k-bull
+ os=-sysv2
+ ;;
+ spur)
+ basic_machine=spur-unknown
+ ;;
+ st2000)
+ basic_machine=m68k-tandem
+ ;;
+ stratus)
+ basic_machine=i860-stratus
+ os=-sysv4
+ ;;
+ sun2)
+ basic_machine=m68000-sun
+ ;;
+ sun2os3)
+ basic_machine=m68000-sun
+ os=-sunos3
+ ;;
+ sun2os4)
+ basic_machine=m68000-sun
+ os=-sunos4
+ ;;
+ sun3os3)
+ basic_machine=m68k-sun
+ os=-sunos3
+ ;;
+ sun3os4)
+ basic_machine=m68k-sun
+ os=-sunos4
+ ;;
+ sun4os3)
+ basic_machine=sparc-sun
+ os=-sunos3
+ ;;
+ sun4os4)
+ basic_machine=sparc-sun
+ os=-sunos4
+ ;;
+ sun4sol2)
+ basic_machine=sparc-sun
+ os=-solaris2
+ ;;
+ sun3 | sun3-*)
+ basic_machine=m68k-sun
+ ;;
+ sun4)
+ basic_machine=sparc-sun
+ ;;
+ sun386 | sun386i | roadrunner)
+ basic_machine=i386-sun
+ ;;
+ sv1)
+ basic_machine=sv1-cray
+ os=-unicos
+ ;;
+ symmetry)
+ basic_machine=i386-sequent
+ os=-dynix
+ ;;
+ t3e)
+ basic_machine=alphaev5-cray
+ os=-unicos
+ ;;
+ t90)
+ basic_machine=t90-cray
+ os=-unicos
+ ;;
+ tic54x | c54x*)
+ basic_machine=tic54x-unknown
+ os=-coff
+ ;;
+ tic55x | c55x*)
+ basic_machine=tic55x-unknown
+ os=-coff
+ ;;
+ tic6x | c6x*)
+ basic_machine=tic6x-unknown
+ os=-coff
+ ;;
+ tx39)
+ basic_machine=mipstx39-unknown
+ ;;
+ tx39el)
+ basic_machine=mipstx39el-unknown
+ ;;
+ toad1)
+ basic_machine=pdp10-xkl
+ os=-tops20
+ ;;
+ tower | tower-32)
+ basic_machine=m68k-ncr
+ ;;
+ tpf)
+ basic_machine=s390x-ibm
+ os=-tpf
+ ;;
+ udi29k)
+ basic_machine=a29k-amd
+ os=-udi
+ ;;
+ ultra3)
+ basic_machine=a29k-nyu
+ os=-sym1
+ ;;
+ v810 | necv810)
+ basic_machine=v810-nec
+ os=-none
+ ;;
+ vaxv)
+ basic_machine=vax-dec
+ os=-sysv
+ ;;
+ vms)
+ basic_machine=vax-dec
+ os=-vms
+ ;;
+ vpp*|vx|vx-*)
+ basic_machine=f301-fujitsu
+ ;;
+ vxworks960)
+ basic_machine=i960-wrs
+ os=-vxworks
+ ;;
+ vxworks68)
+ basic_machine=m68k-wrs
+ os=-vxworks
+ ;;
+ vxworks29k)
+ basic_machine=a29k-wrs
+ os=-vxworks
+ ;;
+ w65*)
+ basic_machine=w65-wdc
+ os=-none
+ ;;
+ w89k-*)
+ basic_machine=hppa1.1-winbond
+ os=-proelf
+ ;;
+ xbox)
+ basic_machine=i686-pc
+ os=-mingw32
+ ;;
+ xps | xps100)
+ basic_machine=xps100-honeywell
+ ;;
+ ymp)
+ basic_machine=ymp-cray
+ os=-unicos
+ ;;
+ z8k-*-coff)
+ basic_machine=z8k-unknown
+ os=-sim
+ ;;
+ none)
+ basic_machine=none-none
+ os=-none
+ ;;
+
+# Here we handle the default manufacturer of certain CPU types. It is in
+# some cases the only manufacturer, in others, it is the most popular.
+ w89k)
+ basic_machine=hppa1.1-winbond
+ ;;
+ op50n)
+ basic_machine=hppa1.1-oki
+ ;;
+ op60c)
+ basic_machine=hppa1.1-oki
+ ;;
+ romp)
+ basic_machine=romp-ibm
+ ;;
+ mmix)
+ basic_machine=mmix-knuth
+ ;;
+ rs6000)
+ basic_machine=rs6000-ibm
+ ;;
+ vax)
+ basic_machine=vax-dec
+ ;;
+ pdp10)
+ # there are many clones, so DEC is not a safe bet
+ basic_machine=pdp10-unknown
+ ;;
+ pdp11)
+ basic_machine=pdp11-dec
+ ;;
+ we32k)
+ basic_machine=we32k-att
+ ;;
+ sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele)
+ basic_machine=sh-unknown
+ ;;
+ sparc | sparcv8 | sparcv9 | sparcv9b)
+ basic_machine=sparc-sun
+ ;;
+ cydra)
+ basic_machine=cydra-cydrome
+ ;;
+ orion)
+ basic_machine=orion-highlevel
+ ;;
+ orion105)
+ basic_machine=clipper-highlevel
+ ;;
+ mac | mpw | mac-mpw)
+ basic_machine=m68k-apple
+ ;;
+ pmac | pmac-mpw)
+ basic_machine=powerpc-apple
+ ;;
+ *-unknown)
+ # Make sure to match an already-canonicalized machine name.
+ ;;
+ *)
+ echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+ exit 1
+ ;;
+esac
+
+# Here we canonicalize certain aliases for manufacturers.
+case $basic_machine in
+ *-digital*)
+ basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
+ ;;
+ *-commodore*)
+ basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
+ ;;
+ *)
+ ;;
+esac
+
+# Decode manufacturer-specific aliases for certain operating systems.
+
+if [ x"$os" != x"" ]
+then
+case $os in
+ # First match some system type aliases
+ # that might get confused with valid system types.
+ # -solaris* is a basic system type, with this one exception.
+ -solaris1 | -solaris1.*)
+ os=`echo $os | sed -e 's|solaris1|sunos4|'`
+ ;;
+ -solaris)
+ os=-solaris2
+ ;;
+ -svr4*)
+ os=-sysv4
+ ;;
+ -unixware*)
+ os=-sysv4.2uw
+ ;;
+ -gnu/linux*)
+ os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
+ ;;
+ # First accept the basic system types.
+ # The portable systems comes first.
+ # Each alternative MUST END IN A *, to match a version number.
+ # -sysv* is not here because it comes later, after sysvr4.
+ -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
+ | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
+ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
+ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
+ | -aos* \
+ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
+ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
+ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
+ | -openbsd* | -solidbsd* \
+ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
+ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
+ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
+ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
+ | -chorusos* | -chorusrdb* \
+ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
+ | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
+ | -uxpv* | -beos* | -mpeix* | -udk* \
+ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
+ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
+ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
+ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
+ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
+ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
+ | -skyos* | -haiku* | -rdos*)
+ # Remember, each alternative MUST END IN *, to match a version number.
+ ;;
+ -qnx*)
+ case $basic_machine in
+ x86-* | i*86-*)
+ ;;
+ *)
+ os=-nto$os
+ ;;
+ esac
+ ;;
+ -nto-qnx*)
+ ;;
+ -nto*)
+ os=`echo $os | sed -e 's|nto|nto-qnx|'`
+ ;;
+ -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
+ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
+ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
+ ;;
+ -mac*)
+ os=`echo $os | sed -e 's|mac|macos|'`
+ ;;
+ -linux-dietlibc)
+ os=-linux-dietlibc
+ ;;
+ -linux*)
+ os=`echo $os | sed -e 's|linux|linux-gnu|'`
+ ;;
+ -sunos5*)
+ os=`echo $os | sed -e 's|sunos5|solaris2|'`
+ ;;
+ -sunos6*)
+ os=`echo $os | sed -e 's|sunos6|solaris3|'`
+ ;;
+ -opened*)
+ os=-openedition
+ ;;
+ -os400*)
+ os=-os400
+ ;;
+ -wince*)
+ os=-wince
+ ;;
+ -osfrose*)
+ os=-osfrose
+ ;;
+ -osf*)
+ os=-osf
+ ;;
+ -utek*)
+ os=-bsd
+ ;;
+ -dynix*)
+ os=-bsd
+ ;;
+ -acis*)
+ os=-aos
+ ;;
+ -atheos*)
+ os=-atheos
+ ;;
+ -syllable*)
+ os=-syllable
+ ;;
+ -386bsd)
+ os=-bsd
+ ;;
+ -ctix* | -uts*)
+ os=-sysv
+ ;;
+ -nova*)
+ os=-rtmk-nova
+ ;;
+ -ns2 )
+ os=-nextstep2
+ ;;
+ -nsk*)
+ os=-nsk
+ ;;
+ # Preserve the version number of sinix5.
+ -sinix5.*)
+ os=`echo $os | sed -e 's|sinix|sysv|'`
+ ;;
+ -sinix*)
+ os=-sysv4
+ ;;
+ -tpf*)
+ os=-tpf
+ ;;
+ -triton*)
+ os=-sysv3
+ ;;
+ -oss*)
+ os=-sysv3
+ ;;
+ -svr4)
+ os=-sysv4
+ ;;
+ -svr3)
+ os=-sysv3
+ ;;
+ -sysvr4)
+ os=-sysv4
+ ;;
+ # This must come after -sysvr4.
+ -sysv*)
+ ;;
+ -ose*)
+ os=-ose
+ ;;
+ -es1800*)
+ os=-ose
+ ;;
+ -xenix)
+ os=-xenix
+ ;;
+ -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+ os=-mint
+ ;;
+ -aros*)
+ os=-aros
+ ;;
+ -kaos*)
+ os=-kaos
+ ;;
+ -zvmoe)
+ os=-zvmoe
+ ;;
+ -none)
+ ;;
+ *)
+ # Get rid of the `-' at the beginning of $os.
+ os=`echo $os | sed 's/[^-]*-//'`
+ echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
+ exit 1
+ ;;
+esac
+else
+
+# Here we handle the default operating systems that come with various machines.
+# The value should be what the vendor currently ships out the door with their
+# machine or put another way, the most popular os provided with the machine.
+
+# Note that if you're going to try to match "-MANUFACTURER" here (say,
+# "-sun"), then you have to tell the case statement up towards the top
+# that MANUFACTURER isn't an operating system. Otherwise, code above
+# will signal an error saying that MANUFACTURER isn't an operating
+# system, and we'll never get to this point.
+
+case $basic_machine in
+ *-acorn)
+ os=-riscix1.2
+ ;;
+ arm*-rebel)
+ os=-linux
+ ;;
+ arm*-semi)
+ os=-aout
+ ;;
+ c4x-* | tic4x-*)
+ os=-coff
+ ;;
+ # This must come before the *-dec entry.
+ pdp10-*)
+ os=-tops20
+ ;;
+ pdp11-*)
+ os=-none
+ ;;
+ *-dec | vax-*)
+ os=-ultrix4.2
+ ;;
+ m68*-apollo)
+ os=-domain
+ ;;
+ i386-sun)
+ os=-sunos4.0.2
+ ;;
+ m68000-sun)
+ os=-sunos3
+ # This also exists in the configure program, but was not the
+ # default.
+ # os=-sunos4
+ ;;
+ m68*-cisco)
+ os=-aout
+ ;;
+ mips*-cisco)
+ os=-elf
+ ;;
+ mips*-*)
+ os=-elf
+ ;;
+ or32-*)
+ os=-coff
+ ;;
+ *-tti) # must be before sparc entry or we get the wrong os.
+ os=-sysv3
+ ;;
+ sparc-* | *-sun)
+ os=-sunos4.1.1
+ ;;
+ *-be)
+ os=-beos
+ ;;
+ *-haiku)
+ os=-haiku
+ ;;
+ *-ibm)
+ os=-aix
+ ;;
+ *-knuth)
+ os=-mmixware
+ ;;
+ *-wec)
+ os=-proelf
+ ;;
+ *-winbond)
+ os=-proelf
+ ;;
+ *-oki)
+ os=-proelf
+ ;;
+ *-hp)
+ os=-hpux
+ ;;
+ *-hitachi)
+ os=-hiux
+ ;;
+ i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
+ os=-sysv
+ ;;
+ *-cbm)
+ os=-amigaos
+ ;;
+ *-dg)
+ os=-dgux
+ ;;
+ *-dolphin)
+ os=-sysv3
+ ;;
+ m68k-ccur)
+ os=-rtu
+ ;;
+ m88k-omron*)
+ os=-luna
+ ;;
+ *-next )
+ os=-nextstep
+ ;;
+ *-sequent)
+ os=-ptx
+ ;;
+ *-crds)
+ os=-unos
+ ;;
+ *-ns)
+ os=-genix
+ ;;
+ i370-*)
+ os=-mvs
+ ;;
+ *-next)
+ os=-nextstep3
+ ;;
+ *-gould)
+ os=-sysv
+ ;;
+ *-highlevel)
+ os=-bsd
+ ;;
+ *-encore)
+ os=-bsd
+ ;;
+ *-sgi)
+ os=-irix
+ ;;
+ *-siemens)
+ os=-sysv4
+ ;;
+ *-masscomp)
+ os=-rtu
+ ;;
+ f30[01]-fujitsu | f700-fujitsu)
+ os=-uxpv
+ ;;
+ *-rom68k)
+ os=-coff
+ ;;
+ *-*bug)
+ os=-coff
+ ;;
+ *-apple)
+ os=-macos
+ ;;
+ *-atari*)
+ os=-mint
+ ;;
+ *)
+ os=-none
+ ;;
+esac
+fi
+
+# Here we handle the case where we know the os, and the CPU type, but not the
+# manufacturer. We pick the logical manufacturer.
+vendor=unknown
+case $basic_machine in
+ *-unknown)
+ case $os in
+ -riscix*)
+ vendor=acorn
+ ;;
+ -sunos*)
+ vendor=sun
+ ;;
+ -aix*)
+ vendor=ibm
+ ;;
+ -beos*)
+ vendor=be
+ ;;
+ -hpux*)
+ vendor=hp
+ ;;
+ -mpeix*)
+ vendor=hp
+ ;;
+ -hiux*)
+ vendor=hitachi
+ ;;
+ -unos*)
+ vendor=crds
+ ;;
+ -dgux*)
+ vendor=dg
+ ;;
+ -luna*)
+ vendor=omron
+ ;;
+ -genix*)
+ vendor=ns
+ ;;
+ -mvs* | -opened*)
+ vendor=ibm
+ ;;
+ -os400*)
+ vendor=ibm
+ ;;
+ -ptx*)
+ vendor=sequent
+ ;;
+ -tpf*)
+ vendor=ibm
+ ;;
+ -vxsim* | -vxworks* | -windiss*)
+ vendor=wrs
+ ;;
+ -aux*)
+ vendor=apple
+ ;;
+ -hms*)
+ vendor=hitachi
+ ;;
+ -mpw* | -macos*)
+ vendor=apple
+ ;;
+ -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+ vendor=atari
+ ;;
+ -vos*)
+ vendor=stratus
+ ;;
+ esac
+ basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
+ ;;
+esac
+
+echo $basic_machine$os
+exit
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
diff --git a/configure b/configure
index 71f1540c..deaee51b 100755
--- a/configure
+++ b/configure
@@ -540,7 +540,7 @@ ac_includes_default="\
# include <unistd.h>
#endif"
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CXX CXXFLAGS ac_ct_CXX TTYDEVDIRS OTHERDEVDIRS CPP X_CFLAGS X_PRE_LIBS X_LIBS X_EXTRA_LIBS XDEVDIRS XPROGDIRS XLIBDIRS appresdir LPR LP LPQ PSPRINT DVIPRINT PERLPATH YACC MAKEINFO RANLIB ac_ct_RANLIB INSTALL_INFO INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN_S SH_SCRIPT_SED_CMD GREP EGREP LIBC LIBM LIBOBJS BROKEN_SPOOLER_FLAGS PAGE g sys_tmac_prefix tmac_wrap GROFF_PATH_SEPARATOR ALT_GHOSTSCRIPT_PROGS GHOSTSCRIPT ac_ct_GHOSTSCRIPT pnmcut pnmcrop pnmtopng psselect pnmtops make_html make_install_html ALT_AWK_PROGS AWK ac_ct_AWK make_pdfdoc make_install_pdfdoc pnmtops_nosetpage LTLIBOBJS'
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CXX CXXFLAGS ac_ct_CXX TTYDEVDIRS OTHERDEVDIRS CPP X_CFLAGS X_PRE_LIBS X_LIBS X_EXTRA_LIBS XDEVDIRS XPROGDIRS XLIBDIRS appresdir LPR LP LPQ PSPRINT DVIPRINT PERLPATH YACC MAKEINFO RANLIB ac_ct_RANLIB INSTALL_INFO INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN_S SH_SCRIPT_SED_CMD GREP EGREP LIBC LIBM build build_cpu build_vendor build_os host host_cpu host_vendor host_os LIBICONV LTLIBICONV LIBOBJS BROKEN_SPOOLER_FLAGS PAGE g sys_tmac_prefix tmac_wrap GROFF_PATH_SEPARATOR ALT_GHOSTSCRIPT_PROGS GHOSTSCRIPT ac_ct_GHOSTSCRIPT pnmcut pnmcrop pnmtopng psselect pnmtops make_html make_install_html ALT_AWK_PROGS AWK ac_ct_AWK make_pdfdoc make_install_pdfdoc pnmtops_nosetpage LTLIBOBJS'
ac_subst_files=''
# Initialize some variables set by options.
@@ -1076,6 +1076,10 @@ _ACEOF
X features:
--x-includes=DIR X include files are in DIR
--x-libraries=DIR X library files are in DIR
+
+System types:
+ --build=BUILD configure for building on BUILD [guessed]
+ --host=HOST cross-compile to build programs to run on HOST [BUILD]
_ACEOF
fi
@@ -1083,11 +1087,19 @@ if test -n "$ac_init_help"; then
cat <<\_ACEOF
+Optional Features:
+ --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
+ --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
+ --disable-rpath do not hardcode runtime library paths
+
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
--with-x use the X Window System
--with-appresdir=DIR X11 application resource files
+ --with-gnu-ld assume the C compiler uses GNU ld default=no
+ --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib
+ --without-libiconv-prefix don't search for libiconv in includedir and libdir
--with-alt-gs=LIST alternative names for ghostscript executable
--with-gs=PROG actual [/path/]name of ghostscript executable
--with-alt-awk=LIST alternative names for awk executable
@@ -8898,6 +8910,869 @@ fi
+ if test "X$prefix" = "XNONE"; then
+ acl_final_prefix="$ac_default_prefix"
+ else
+ acl_final_prefix="$prefix"
+ fi
+ if test "X$exec_prefix" = "XNONE"; then
+ acl_final_exec_prefix='${prefix}'
+ else
+ acl_final_exec_prefix="$exec_prefix"
+ fi
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
+ prefix="$acl_save_prefix"
+
+# Make sure we can run config.sub.
+$ac_config_sub sun4 >/dev/null 2>&1 ||
+ { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
+echo "$as_me: error: cannot run $ac_config_sub" >&2;}
+ { (exit 1); exit 1; }; }
+
+echo "$as_me:$LINENO: checking build system type" >&5
+echo $ECHO_N "checking build system type... $ECHO_C" >&6
+if test "${ac_cv_build+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_build_alias=$build_alias
+test -z "$ac_cv_build_alias" &&
+ ac_cv_build_alias=`$ac_config_guess`
+test -z "$ac_cv_build_alias" &&
+ { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
+echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
+ { (exit 1); exit 1; }; }
+ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
+ { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
+echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
+ { (exit 1); exit 1; }; }
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_build" >&5
+echo "${ECHO_T}$ac_cv_build" >&6
+build=$ac_cv_build
+build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+
+
+echo "$as_me:$LINENO: checking host system type" >&5
+echo $ECHO_N "checking host system type... $ECHO_C" >&6
+if test "${ac_cv_host+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_host_alias=$host_alias
+test -z "$ac_cv_host_alias" &&
+ ac_cv_host_alias=$ac_cv_build_alias
+ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
+ { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
+echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
+ { (exit 1); exit 1; }; }
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_host" >&5
+echo "${ECHO_T}$ac_cv_host" >&6
+host=$ac_cv_host
+host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+
+
+
+# Check whether --with-gnu-ld or --without-gnu-ld was given.
+if test "${with_gnu_ld+set}" = set; then
+ withval="$with_gnu_ld"
+ test "$withval" = no || with_gnu_ld=yes
+else
+ with_gnu_ld=no
+fi;
+# Prepare PATH_SEPARATOR.
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ echo "#! /bin/sh" >conf$$.sh
+ echo "exit 0" >>conf$$.sh
+ chmod +x conf$$.sh
+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+ PATH_SEPARATOR=';'
+ else
+ PATH_SEPARATOR=:
+ fi
+ rm -f conf$$.sh
+fi
+ac_prog=ld
+if test "$GCC" = yes; then
+ # Check if gcc -print-prog-name=ld gives a path.
+ echo "$as_me:$LINENO: checking for ld used by GCC" >&5
+echo $ECHO_N "checking for ld used by GCC... $ECHO_C" >&6
+ case $host in
+ *-*-mingw*)
+ # gcc leaves a trailing carriage return which upsets mingw
+ ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
+ *)
+ ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
+ esac
+ case $ac_prog in
+ # Accept absolute paths.
+ [\\/]* | [A-Za-z]:[\\/]*)
+ re_direlt='/[^/][^/]*/\.\./'
+ # Canonicalize the path of ld
+ ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
+ while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
+ ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
+ done
+ test -z "$LD" && LD="$ac_prog"
+ ;;
+ "")
+ # If it fails, then pretend we aren't using GCC.
+ ac_prog=ld
+ ;;
+ *)
+ # If it is relative, then search for the first ld in PATH.
+ with_gnu_ld=unknown
+ ;;
+ esac
+elif test "$with_gnu_ld" = yes; then
+ echo "$as_me:$LINENO: checking for GNU ld" >&5
+echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6
+else
+ echo "$as_me:$LINENO: checking for non-GNU ld" >&5
+echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6
+fi
+if test "${acl_cv_path_LD+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -z "$LD"; then
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
+ for ac_dir in $PATH; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
+ acl_cv_path_LD="$ac_dir/$ac_prog"
+ # Check to see if the program is GNU ld. I'd rather use --version,
+ # but apparently some GNU ld's only accept -v.
+ # Break only if it was the GNU/non-GNU ld that we prefer.
+ case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in
+ *GNU* | *'with BFD'*)
+ test "$with_gnu_ld" != no && break ;;
+ *)
+ test "$with_gnu_ld" != yes && break ;;
+ esac
+ fi
+ done
+ IFS="$ac_save_ifs"
+else
+ acl_cv_path_LD="$LD" # Let the user override the test with a path.
+fi
+fi
+
+LD="$acl_cv_path_LD"
+if test -n "$LD"; then
+ echo "$as_me:$LINENO: result: $LD" >&5
+echo "${ECHO_T}$LD" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
+echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
+ { (exit 1); exit 1; }; }
+echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
+echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6
+if test "${acl_cv_prog_gnu_ld+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ # I'd rather use --version here, but apparently some GNU ld's only accept -v.
+case `$LD -v 2>&1 </dev/null` in
+*GNU* | *'with BFD'*)
+ acl_cv_prog_gnu_ld=yes ;;
+*)
+ acl_cv_prog_gnu_ld=no ;;
+esac
+fi
+echo "$as_me:$LINENO: result: $acl_cv_prog_gnu_ld" >&5
+echo "${ECHO_T}$acl_cv_prog_gnu_ld" >&6
+with_gnu_ld=$acl_cv_prog_gnu_ld
+
+
+
+
+ echo "$as_me:$LINENO: checking for shared library run path origin" >&5
+echo $ECHO_N "checking for shared library run path origin... $ECHO_C" >&6
+if test "${acl_cv_rpath+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
+ ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
+ . ./conftest.sh
+ rm -f ./conftest.sh
+ acl_cv_rpath=done
+
+fi
+echo "$as_me:$LINENO: result: $acl_cv_rpath" >&5
+echo "${ECHO_T}$acl_cv_rpath" >&6
+ wl="$acl_cv_wl"
+ libext="$acl_cv_libext"
+ shlibext="$acl_cv_shlibext"
+ hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
+ hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
+ hardcode_direct="$acl_cv_hardcode_direct"
+ hardcode_minus_L="$acl_cv_hardcode_minus_L"
+ # Check whether --enable-rpath or --disable-rpath was given.
+if test "${enable_rpath+set}" = set; then
+ enableval="$enable_rpath"
+ :
+else
+ enable_rpath=yes
+fi;
+
+
+ acl_libdirstem=lib
+ searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
+ if test -n "$searchpath"; then
+ acl_save_IFS="${IFS= }"; IFS=":"
+ for searchdir in $searchpath; do
+ if test -d "$searchdir"; then
+ case "$searchdir" in
+ */lib64/ | */lib64 ) acl_libdirstem=lib64 ;;
+ *) searchdir=`cd "$searchdir" && pwd`
+ case "$searchdir" in
+ */lib64 ) acl_libdirstem=lib64 ;;
+ esac ;;
+ esac
+ fi
+ done
+ IFS="$acl_save_IFS"
+ fi
+
+
+
+
+
+
+
+
+ use_additional=yes
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+
+ eval additional_includedir=\"$includedir\"
+ eval additional_libdir=\"$libdir\"
+
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+
+# Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
+if test "${with_libiconv_prefix+set}" = set; then
+ withval="$with_libiconv_prefix"
+
+ if test "X$withval" = "Xno"; then
+ use_additional=no
+ else
+ if test "X$withval" = "X"; then
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+
+ eval additional_includedir=\"$includedir\"
+ eval additional_libdir=\"$libdir\"
+
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+ else
+ additional_includedir="$withval/include"
+ additional_libdir="$withval/$acl_libdirstem"
+ fi
+ fi
+
+fi;
+ LIBICONV=
+ LTLIBICONV=
+ INCICONV=
+ rpathdirs=
+ ltrpathdirs=
+ names_already_handled=
+ names_next_round='iconv '
+ while test -n "$names_next_round"; do
+ names_this_round="$names_next_round"
+ names_next_round=
+ for name in $names_this_round; do
+ already_handled=
+ for n in $names_already_handled; do
+ if test "$n" = "$name"; then
+ already_handled=yes
+ break
+ fi
+ done
+ if test -z "$already_handled"; then
+ names_already_handled="$names_already_handled $name"
+ uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
+ eval value=\"\$HAVE_LIB$uppername\"
+ if test -n "$value"; then
+ if test "$value" = yes; then
+ eval value=\"\$LIB$uppername\"
+ test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value"
+ eval value=\"\$LTLIB$uppername\"
+ test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value"
+ else
+ :
+ fi
+ else
+ found_dir=
+ found_la=
+ found_so=
+ found_a=
+ if test $use_additional = yes; then
+ if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
+ found_dir="$additional_libdir"
+ found_so="$additional_libdir/lib$name.$shlibext"
+ if test -f "$additional_libdir/lib$name.la"; then
+ found_la="$additional_libdir/lib$name.la"
+ fi
+ else
+ if test -f "$additional_libdir/lib$name.$libext"; then
+ found_dir="$additional_libdir"
+ found_a="$additional_libdir/lib$name.$libext"
+ if test -f "$additional_libdir/lib$name.la"; then
+ found_la="$additional_libdir/lib$name.la"
+ fi
+ fi
+ fi
+ fi
+ if test "X$found_dir" = "X"; then
+ for x in $LDFLAGS $LTLIBICONV; do
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+ eval x=\"$x\"
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+ case "$x" in
+ -L*)
+ dir=`echo "X$x" | sed -e 's/^X-L//'`
+ if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
+ found_dir="$dir"
+ found_so="$dir/lib$name.$shlibext"
+ if test -f "$dir/lib$name.la"; then
+ found_la="$dir/lib$name.la"
+ fi
+ else
+ if test -f "$dir/lib$name.$libext"; then
+ found_dir="$dir"
+ found_a="$dir/lib$name.$libext"
+ if test -f "$dir/lib$name.la"; then
+ found_la="$dir/lib$name.la"
+ fi
+ fi
+ fi
+ ;;
+ esac
+ if test "X$found_dir" != "X"; then
+ break
+ fi
+ done
+ fi
+ if test "X$found_dir" != "X"; then
+ LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
+ if test "X$found_so" != "X"; then
+ if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/$acl_libdirstem"; then
+ LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
+ else
+ haveit=
+ for x in $ltrpathdirs; do
+ if test "X$x" = "X$found_dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ ltrpathdirs="$ltrpathdirs $found_dir"
+ fi
+ if test "$hardcode_direct" = yes; then
+ LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
+ else
+ if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
+ LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
+ haveit=
+ for x in $rpathdirs; do
+ if test "X$x" = "X$found_dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ rpathdirs="$rpathdirs $found_dir"
+ fi
+ else
+ haveit=
+ for x in $LDFLAGS $LIBICONV; do
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+ eval x=\"$x\"
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+ if test "X$x" = "X-L$found_dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
+ fi
+ if test "$hardcode_minus_L" != no; then
+ LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
+ else
+ LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
+ fi
+ fi
+ fi
+ fi
+ else
+ if test "X$found_a" != "X"; then
+ LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a"
+ else
+ LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name"
+ fi
+ fi
+ additional_includedir=
+ case "$found_dir" in
+ */$acl_libdirstem | */$acl_libdirstem/)
+ basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
+ additional_includedir="$basedir/include"
+ ;;
+ esac
+ if test "X$additional_includedir" != "X"; then
+ if test "X$additional_includedir" != "X/usr/include"; then
+ haveit=
+ if test "X$additional_includedir" = "X/usr/local/include"; then
+ if test -n "$GCC"; then
+ case $host_os in
+ linux* | gnu* | k*bsd*-gnu) haveit=yes;;
+ esac
+ fi
+ fi
+ if test -z "$haveit"; then
+ for x in $CPPFLAGS $INCICONV; do
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+ eval x=\"$x\"
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+ if test "X$x" = "X-I$additional_includedir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ if test -d "$additional_includedir"; then
+ INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir"
+ fi
+ fi
+ fi
+ fi
+ fi
+ if test -n "$found_la"; then
+ save_libdir="$libdir"
+ case "$found_la" in
+ */* | *\\*) . "$found_la" ;;
+ *) . "./$found_la" ;;
+ esac
+ libdir="$save_libdir"
+ for dep in $dependency_libs; do
+ case "$dep" in
+ -L*)
+ additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
+ if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then
+ haveit=
+ if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then
+ if test -n "$GCC"; then
+ case $host_os in
+ linux* | gnu* | k*bsd*-gnu) haveit=yes;;
+ esac
+ fi
+ fi
+ if test -z "$haveit"; then
+ haveit=
+ for x in $LDFLAGS $LIBICONV; do
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+ eval x=\"$x\"
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+ if test "X$x" = "X-L$additional_libdir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ if test -d "$additional_libdir"; then
+ LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir"
+ fi
+ fi
+ haveit=
+ for x in $LDFLAGS $LTLIBICONV; do
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+ eval x=\"$x\"
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+ if test "X$x" = "X-L$additional_libdir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ if test -d "$additional_libdir"; then
+ LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir"
+ fi
+ fi
+ fi
+ fi
+ ;;
+ -R*)
+ dir=`echo "X$dep" | sed -e 's/^X-R//'`
+ if test "$enable_rpath" != no; then
+ haveit=
+ for x in $rpathdirs; do
+ if test "X$x" = "X$dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ rpathdirs="$rpathdirs $dir"
+ fi
+ haveit=
+ for x in $ltrpathdirs; do
+ if test "X$x" = "X$dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ ltrpathdirs="$ltrpathdirs $dir"
+ fi
+ fi
+ ;;
+ -l*)
+ names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
+ ;;
+ *.la)
+ names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
+ ;;
+ *)
+ LIBICONV="${LIBICONV}${LIBICONV:+ }$dep"
+ LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep"
+ ;;
+ esac
+ done
+ fi
+ else
+ LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
+ LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
+ fi
+ fi
+ fi
+ done
+ done
+ if test "X$rpathdirs" != "X"; then
+ if test -n "$hardcode_libdir_separator"; then
+ alldirs=
+ for found_dir in $rpathdirs; do
+ alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
+ done
+ acl_save_libdir="$libdir"
+ libdir="$alldirs"
+ eval flag=\"$hardcode_libdir_flag_spec\"
+ libdir="$acl_save_libdir"
+ LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
+ else
+ for found_dir in $rpathdirs; do
+ acl_save_libdir="$libdir"
+ libdir="$found_dir"
+ eval flag=\"$hardcode_libdir_flag_spec\"
+ libdir="$acl_save_libdir"
+ LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
+ done
+ fi
+ fi
+ if test "X$ltrpathdirs" != "X"; then
+ for found_dir in $ltrpathdirs; do
+ LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir"
+ done
+ fi
+
+
+
+
+
+
+
+ am_save_CPPFLAGS="$CPPFLAGS"
+
+ for element in $INCICONV; do
+ haveit=
+ for x in $CPPFLAGS; do
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+ eval x=\"$x\"
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+ if test "X$x" = "X$element"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
+ fi
+ done
+
+
+ echo "$as_me:$LINENO: checking for iconv" >&5
+echo $ECHO_N "checking for iconv... $ECHO_C" >&6
+if test "${am_cv_func_iconv+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ am_cv_func_iconv="no, consider installing GNU libiconv"
+ am_cv_lib_iconv=no
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdlib.h>
+#include <iconv.h>
+int
+main ()
+{
+iconv_t cd = iconv_open("","");
+ iconv(cd,NULL,NULL,NULL,NULL);
+ iconv_close(cd);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ am_cv_func_iconv=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ if test "$am_cv_func_iconv" != yes; then
+ am_save_LIBS="$LIBS"
+ LIBS="$LIBS $LIBICONV"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdlib.h>
+#include <iconv.h>
+int
+main ()
+{
+iconv_t cd = iconv_open("","");
+ iconv(cd,NULL,NULL,NULL,NULL);
+ iconv_close(cd);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ am_cv_lib_iconv=yes
+ am_cv_func_iconv=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LIBS="$am_save_LIBS"
+ fi
+
+fi
+echo "$as_me:$LINENO: result: $am_cv_func_iconv" >&5
+echo "${ECHO_T}$am_cv_func_iconv" >&6
+ if test "$am_cv_func_iconv" = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_ICONV 1
+_ACEOF
+
+ fi
+ if test "$am_cv_lib_iconv" = yes; then
+ echo "$as_me:$LINENO: checking how to link with libiconv" >&5
+echo $ECHO_N "checking how to link with libiconv... $ECHO_C" >&6
+ echo "$as_me:$LINENO: result: $LIBICONV" >&5
+echo "${ECHO_T}$LIBICONV" >&6
+ else
+ CPPFLAGS="$am_save_CPPFLAGS"
+ LIBICONV=
+ LTLIBICONV=
+ fi
+
+
+
+ if test "$am_cv_func_iconv" = yes; then
+ echo "$as_me:$LINENO: checking for iconv declaration" >&5
+echo $ECHO_N "checking for iconv declaration... $ECHO_C" >&6
+ if test "${am_cv_proto_iconv+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#include <stdlib.h>
+#include <iconv.h>
+extern
+#ifdef __cplusplus
+"C"
+#endif
+#if defined(__STDC__) || defined(__cplusplus)
+size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
+#else
+size_t iconv();
+#endif
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ am_cv_proto_iconv_arg1=""
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+am_cv_proto_iconv_arg1="const"
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"
+fi
+
+ am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
+ echo "$as_me:$LINENO: result: ${ac_t:-
+ }$am_cv_proto_iconv" >&5
+echo "${ECHO_T}${ac_t:-
+ }$am_cv_proto_iconv" >&6
+
+cat >>confdefs.h <<_ACEOF
+#define ICONV_CONST $am_cv_proto_iconv_arg1
+_ACEOF
+
+ fi
+
+
# checks for functions
@@ -9830,6 +10705,70 @@ fi
+ echo "$as_me:$LINENO: checking for nl_langinfo and CODESET" >&5
+echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
+if test "${am_cv_langinfo_codeset+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <langinfo.h>
+int
+main ()
+{
+char* cs = nl_langinfo(CODESET);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ am_cv_langinfo_codeset=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+am_cv_langinfo_codeset=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+
+fi
+echo "$as_me:$LINENO: result: $am_cv_langinfo_codeset" >&5
+echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
+ if test $am_cv_langinfo_codeset = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_LANGINFO_CODESET 1
+_ACEOF
+
+ fi
+
+
# checks for compiler characteristics
ac_ext=cc
ac_cpp='$CXXCPP $CPPFLAGS'
@@ -11434,6 +12373,16 @@ s,@GREP@,$GREP,;t t
s,@EGREP@,$EGREP,;t t
s,@LIBC@,$LIBC,;t t
s,@LIBM@,$LIBM,;t t
+s,@build@,$build,;t t
+s,@build_cpu@,$build_cpu,;t t
+s,@build_vendor@,$build_vendor,;t t
+s,@build_os@,$build_os,;t t
+s,@host@,$host,;t t
+s,@host_cpu@,$host_cpu,;t t
+s,@host_vendor@,$host_vendor,;t t
+s,@host_os@,$host_os,;t t
+s,@LIBICONV@,$LIBICONV,;t t
+s,@LTLIBICONV@,$LTLIBICONV,;t t
s,@LIBOBJS@,$LIBOBJS,;t t
s,@BROKEN_SPOOLER_FLAGS@,$BROKEN_SPOOLER_FLAGS,;t t
s,@PAGE@,$PAGE,;t t
diff --git a/configure.ac b/configure.ac
index 0388ae87..beaaba8b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -89,6 +89,7 @@ AC_C_BIGENDIAN
# checks for libraries
GROFF_LIBC
GROFF_LIBM
+AM_ICONV
# checks for functions
AC_FUNC_MMAP
@@ -102,6 +103,7 @@ LIBS="$saved_libs"
AC_CHECK_FUNCS([gettimeofday isatty kill rename setlocale strsep])
GROFF_MKSTEMP
AC_CHECK_DECLS([sys_siglist])
+AM_LANGINFO_CODESET
# checks for compiler characteristics
GROFF_ARRAY_DELETE
diff --git a/doc/Makefile.in b/doc/Makefile.in
index 4de9e5df..e52a7926 100644
--- a/doc/Makefile.in
+++ b/doc/Makefile.in
@@ -1,4 +1,4 @@
-# Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
# Written by Werner Lemberg <wl@gnu.org>
#
# This file is part of groff.
@@ -128,8 +128,8 @@ pic.html: pic.ms
webpage.html: webpage.ms gnu.png gnu.eps groff.css
$(GROFF) -P-j`basename $< | sed -e 's|.ms$$||'` \
- -P-n -P-r -P-p -P-b -P-I`basename $< | sed -e 's|.ms$$||'` \
- -P-D$(imagedir) -Thtml -ms >$@
+ -P-nrpb -P-I`basename $< | sed -e 's|.ms$$||'` \
+ -P-D$(imagedir) -Thtml -ms >$@
webpage.ps: gnu.eps
diff --git a/doc/Makefile.sub b/doc/Makefile.sub
index 0e90c596..0856d6a6 100644
--- a/doc/Makefile.sub
+++ b/doc/Makefile.sub
@@ -1,4 +1,4 @@
-# Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
# Written by Werner Lemberg <wl@gnu.org>
#
# This file is part of groff.
@@ -153,6 +153,10 @@ pic.html: pic.ms
-Thtml -ms >$@
webpage.html: webpage.ms gnu.png groff.css
+ $(GROFF) -P-j`basename $< | sed -e 's|.ms$$||'` \
+ -P-nrpb -P-I`basename $< | sed -e 's|.ms$$||'` \
+ -P-D$(imagedir) -Thtml -ms >$@
+
webpage.ps: gnu.eps
grnexmpl.ps: grnexmpl.me grnexmpl.g
diff --git a/doc/webpage.ms b/doc/webpage.ms
index 4a9a827b..442c456f 100644
--- a/doc/webpage.ms
+++ b/doc/webpage.ms
@@ -51,8 +51,10 @@ Home of Groff (GNU Troff).
.DC T HIS mydarkred
is the home page for groff (\c
.URL http://\:www.gnu.org/ GNU
-Troff). Groff is a software typesetting package which reads plain
-text mixed with formatting commands and produces formatted output.
+Troff).
+.
+Groff is a software typesetting package which reads plain text mixed with
+formatting commands and produces formatted output.
.
The source code of the currently released versions of groff is
available at the
@@ -91,7 +93,9 @@ Technical issues lead:
The image at the top has been contributed by Imogen Mulley (born 1991),
based on a similar picture found on the
.URL http://www.gnu.org "GNU server" .
+.
.HR
+.
.SH
Licence
.LP
@@ -144,13 +148,13 @@ executing the commands
.nf
.ft C
cd ~/cvswork
-CVS_RSH=ssh; export CVS_RSH
-cvs -d:ext:anoncvs@savannah.gnu.org/cvsroot/groff -z5 co groff
+cvs -d:pserver:anoncvs@savannah.gnu.org:/cvsroot/groff login
+cvs -d:pserver:anoncvs@savannah.gnu.org:/cvsroot/groff -z5 co groff
.ft P
.fi
.in
-(Note that you need an SSH client for security reasons.)
+When asked for a password during the `login' call, simply press Enter.
This will create a subdirectory, ~/cvswork/groff, with a `checked out'
copy of the CVS repository.
@@ -161,7 +165,7 @@ achieved, at any later time by invoking the commands
.nf
.ft C
cd ~/cvswork/groff
-CVS_RSH=ssh cvs -z5 update -dP
+cvs -z5 update -dP
.ft P
.fi
.in
@@ -258,8 +262,9 @@ for general discussion of groff
a read-only list showing commitments to the CVS repository
.ULE
-You can post mails directly to the `bug-groff' list, without subscribing;
-to post mails to the `groff' list you must subscribe to it.
+You can post mails directly to the `bug-groff' list, without subscribing
+(this fact makes the list contain many spam files); to post mails to the
+`groff' list you must subscribe to it.
To subscribe, send e-mail to \[la]list\[ra]-request@\[la]domain\[ra]
(example:
@@ -282,7 +287,8 @@ postings to the corresponding mailing list.
.SH
NEWS VERSION 1.19.2
.LP
-.SH 2 troff
+.SH 2
+troff
.ULS
.LI
diff --git a/m4/codeset.m4 b/m4/codeset.m4
new file mode 100644
index 00000000..a6e67ec4
--- /dev/null
+++ b/m4/codeset.m4
@@ -0,0 +1,21 @@
+# codeset.m4 serial AM1 (gettext-0.10.40)
+dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Bruno Haible.
+
+AC_DEFUN([AM_LANGINFO_CODESET],
+[
+ AC_CACHE_CHECK([for nl_langinfo and CODESET], am_cv_langinfo_codeset,
+ [AC_TRY_LINK([#include <langinfo.h>],
+ [char* cs = nl_langinfo(CODESET);],
+ am_cv_langinfo_codeset=yes,
+ am_cv_langinfo_codeset=no)
+ ])
+ if test $am_cv_langinfo_codeset = yes; then
+ AC_DEFINE(HAVE_LANGINFO_CODESET, 1,
+ [Define if you have <langinfo.h> and nl_langinfo(CODESET).])
+ fi
+])
diff --git a/m4/groff.m4 b/m4/groff.m4
new file mode 100644
index 00000000..ce88f550
--- /dev/null
+++ b/m4/groff.m4
@@ -0,0 +1,1205 @@
+# Autoconf macros for groff.
+# Copyright (C) 1989-1995, 2001, 2002, 2003, 2004, 2005
+# Free Software Foundation, Inc.
+#
+# This file is part of groff.
+#
+# groff is free software; you can redistribute it and/or modify it under
+# the terms of the GNU General Public License as published by the Free
+# Software Foundation; either version 2, 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
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with groff; see the file COPYING. If not, write to the Free Software
+# Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA.
+
+AC_DEFUN([GROFF_PRINT],
+ [if test -z "$PSPRINT"; then
+ AC_CHECK_PROGS([LPR], [lpr])
+ AC_CHECK_PROGS([LP], [lp])
+ if test -n "$LPR" && test -n "$LP"; then
+ # HP-UX provides an lpr command that emulates lpr using lp,
+ # but it doesn't have lpq; in this case we want to use lp
+ # rather than lpr.
+ AC_CHECK_PROGS([LPQ], [lpq])
+ test -n "$LPQ" || LPR=
+ fi
+ if test -n "$LPR"; then
+ PSPRINT="$LPR"
+ elif test -n "$LP"; then
+ PSPRINT="$LP"
+ fi
+ fi
+ AC_SUBST([PSPRINT])
+ AC_MSG_CHECKING([for command to use for printing PostScript files])
+ AC_MSG_RESULT([$PSPRINT])
+
+ # Figure out DVIPRINT from PSPRINT.
+ AC_MSG_CHECKING([for command to use for printing dvi files])
+ if test -n "$PSPRINT" && test -z "$DVIPRINT"; then
+ if test "x$PSPRINT" = "xlpr"; then
+ DVIPRINT="lpr -d"
+ else
+ DVIPRINT="$PSPRINT"
+ fi
+ fi
+ AC_SUBST([DVIPRINT])
+ AC_MSG_RESULT([$DVIPRINT])])
+
+# Bison generated parsers have problems with C++ compilers other than g++.
+# So byacc is preferred over bison.
+
+AC_DEFUN([GROFF_PROG_YACC],
+ [AC_CHECK_PROGS([YACC], [byacc 'bison -y'], [yacc])])
+
+# We need makeinfo 4.8 or newer.
+
+AC_DEFUN([GROFF_MAKEINFO],
+ [missing=
+ AC_CHECK_PROG([MAKEINFO], [makeinfo], [makeinfo])
+ if test -z "$MAKEINFO"; then
+ missing="\`makeinfo' is missing."
+ else
+ AC_MSG_CHECKING([for makeinfo version])
+ # We need an additional level of quoting to make sed's regexps work.
+ [makeinfo_version=`$MAKEINFO --version 2>&1 \
+ | sed -e 's/^.* \([^ ][^ ]*\)$/\1/' -e '1q'`]
+ AC_MSG_RESULT([$makeinfo_version])
+ # Consider only the first two numbers in version number string.
+ [makeinfo_version_major=`echo $makeinfo_version \
+ | sed 's/^\([0-9]*\).*$/\1/'`]
+ if test -z "$makeinfo_version_major"; then
+ makeinfo_version_major=0
+ makeinfo_version_minor=0
+ else
+ [makeinfo_version_minor=`echo $makeinfo_version \
+ | sed 's/^[^.][^.]*\(.*\)$/\1/'`]
+ # No minor version number at all?
+ if test -z "$makeinfo_version_minor"; then
+ makeinfo_version_minor=0
+ else
+ [makeinfo_version_minor=`echo $makeinfo_version_minor \
+ | sed 's/\.\([0-9]*\).*$/\1/'`]
+ if test -z "$makeinfo_version_minor"; then
+ makeinfo_version_minor=0
+ fi
+ fi
+ fi
+ fi
+ makeinfo_version_numeric=`expr $makeinfo_version_major '*' 1000 \
+ '+' $makeinfo_version_minor`
+ if test $makeinfo_version_numeric -lt 4008; then
+ missing="\`makeinfo' is too old."
+ fi
+
+ if test -n "$missing"; then
+ if test ! -f doc/groff.info \
+ || test ${srcdir}/doc/groff.texinfo -nt doc/groff.info; then
+ AC_MSG_ERROR($missing
+[Get the `texinfo' package version 4.8 or newer.])
+ else
+ AC_MSG_WARN($missing
+[Get the `texinfo' package version 4.8 or newer if you want to convert
+`groff.texinfo' into a PDF or HTML document.])
+ fi
+ fi
+ AC_SUBST([MAKEINFO])])
+
+# The following programs are needed for grohtml.
+
+AC_DEFUN([GROFF_HTML_PROGRAMS],
+ [AC_REQUIRE([GROFF_GHOSTSCRIPT_PATH])
+ make_html=html
+ make_install_html=install_html
+
+ missing=
+ AC_FOREACH([groff_prog],
+ [pnmcut pnmcrop pnmtopng psselect pnmtops],
+ [AC_CHECK_PROG(groff_prog, groff_prog, [found], [missing])
+ if test $[]groff_prog = missing; then
+ missing="$missing \`groff_prog'"
+ fi;])
+
+ test "$GHOSTSCRIPT" = "missing" && missing="$missing \`gs'"
+
+ if test -n "$missing"; then
+ plural=`set $missing; test $[#] -gt 1 && echo s`
+ missing=`set $missing
+ missing=""
+ while test $[#] -gt 0
+ do
+ case $[#] in
+ 1) missing="$missing$[1]" ;;
+ 2) missing="$missing$[1] and " ;;
+ *) missing="$missing$[1], " ;;
+ esac
+ shift
+ done
+ echo $missing`
+
+ make_html=
+ make_install_html=
+
+ AC_MSG_WARN([missing program$plural:
+
+ The program$plural
+ $missing
+ cannot be found in the PATH.
+ Consequently, groff's HTML backend (grohtml) will not work properly;
+ therefore, it will neither be possible to prepare, nor to install,
+ documentation in HTML format.
+ ])
+ fi
+
+ AC_SUBST([make_html])
+ AC_SUBST([make_install_html])])
+
+# To produce PDF docs, we need both awk and ghostscript.
+
+AC_DEFUN([GROFF_PDFDOC_PROGRAMS],
+ [AC_REQUIRE([GROFF_AWK_PATH])
+ AC_REQUIRE([GROFF_GHOSTSCRIPT_PATH])
+
+ make_pdfdoc=pdfdoc
+ make_install_pdfdoc=install_pdfdoc
+
+ missing=""
+ test "$AWK" = missing && missing="\`awk'"
+ test "$GHOSTSCRIPT" = missing && missing="$missing \`gs'"
+ if test -n "$missing"; then
+ plural=`set $missing; test $[#] -eq 2 && echo s`
+ test x$plural = xs \
+ && missing=`set $missing; echo "$[1] and $[2]"` \
+ || missing=`echo $missing`
+
+ make_pdfdoc=
+ make_install_pdfdoc=
+
+ AC_MSG_WARN([missing program$plural:
+
+ The program$plural $missing cannot be found in the PATH.
+ Consequently, groff's PDF formatter (pdfroff) will not work properly;
+ therefore, it will neither be possible to prepare, nor to install,
+ documentation in PDF format.
+ ])
+ fi
+
+ AC_SUBST([make_pdfdoc])
+ AC_SUBST([make_install_pdfdoc])])
+
+# Check whether pnmtops can handle the -nosetpage option.
+
+AC_DEFUN([GROFF_PNMTOPS_NOSETPAGE],
+ [AC_MSG_CHECKING([whether pnmtops can handle the -nosetpage option])
+ if echo P2 2 2 255 0 1 2 0 | pnmtops -nosetpage > /dev/null 2>&1 ; then
+ AC_MSG_RESULT([yes])
+ pnmtops_nosetpage="pnmtops -nosetpage"
+ else
+ AC_MSG_RESULT([no])
+ pnmtops_nosetpage="pnmtops"
+ fi
+ AC_SUBST([pnmtops_nosetpage])])
+
+# Check location of `gs'; allow `--with-gs=PROG' option to override.
+
+AC_DEFUN([GROFF_GHOSTSCRIPT_PATH],
+ [AC_REQUIRE([GROFF_GHOSTSCRIPT_PREFS])
+ AC_ARG_WITH([gs],
+ [AS_HELP_STRING([--with-gs=PROG],
+ [actual [/path/]name of ghostscript executable])],
+ [GHOSTSCRIPT=$withval],
+ [AC_CHECK_TOOLS(GHOSTSCRIPT, [$ALT_GHOSTSCRIPT_PROGS], [missing])])
+ test "$GHOSTSCRIPT" = "no" && GHOSTSCRIPT=missing])
+
+# Preferences for choice of `gs' program...
+# (allow --with-alt-gs="LIST" to override).
+
+AC_DEFUN([GROFF_GHOSTSCRIPT_PREFS],
+ [AC_ARG_WITH([alt-gs],
+ [AS_HELP_STRING([--with-alt-gs=LIST],
+ [alternative names for ghostscript executable])],
+ [ALT_GHOSTSCRIPT_PROGS="$withval"],
+ [ALT_GHOSTSCRIPT_PROGS="gs gswin32c gsos2"])
+ AC_SUBST([ALT_GHOSTSCRIPT_PROGS])])
+
+# Check location of `awk'; allow `--with-awk=PROG' option to override.
+
+AC_DEFUN([GROFF_AWK_PATH],
+ [AC_REQUIRE([GROFF_AWK_PREFS])
+ AC_ARG_WITH([awk],
+ [AS_HELP_STRING([--with-awk=PROG],
+ [actual [/path/]name of awk executable])],
+ [AWK=$withval],
+ [AC_CHECK_TOOLS(AWK, [$ALT_AWK_PROGS], [missing])])
+ test "$AWK" = "no" && AWK=missing])
+
+# Preferences for choice of `awk' program; allow --with-alt-awk="LIST"
+# to override.
+
+AC_DEFUN([GROFF_AWK_PREFS],
+ [AC_ARG_WITH([alt-awk],
+ [AS_HELP_STRING([--with-alt-awk=LIST],
+ [alternative names for awk executable])],
+ [ALT_AWK_PROGS="$withval"],
+ [ALT_AWK_PROGS="gawk mawk nawk awk"])
+ AC_SUBST([ALT_AWK_PROGS])])
+
+# GROFF_CSH_HACK(if hack present, if not present)
+
+AC_DEFUN([GROFF_CSH_HACK],
+ [AC_MSG_CHECKING([for csh hash hack])
+
+cat <<EOF >conftest.sh
+#! /bin/sh
+true || exit 0
+export PATH || exit 0
+exit 1
+EOF
+
+ chmod +x conftest.sh
+ if echo ./conftest.sh | (csh >/dev/null 2>&1) >/dev/null 2>&1; then
+ AC_MSG_RESULT([yes])
+ $1
+ else
+ AC_MSG_RESULT([no])
+ $2
+ fi
+ rm -f conftest.sh])
+
+# From udodo!hans@relay.NL.net (Hans Zuidam)
+
+AC_DEFUN([GROFF_ISC_SYSV3],
+ [AC_MSG_CHECKING([for ISC 3.x or 4.x])
+ if grep ['[34]\.'] /usr/options/cb.name >/dev/null 2>&1
+ then
+ AC_MSG_RESULT([yes])
+ AC_DEFINE([_SYSV3], [1], [Define if you have ISC 3.x or 4.x.])
+ else
+ AC_MSG_RESULT([no])
+ fi])
+
+AC_DEFUN([GROFF_POSIX],
+ [AC_MSG_CHECKING([whether -D_POSIX_SOURCE is necessary])
+ AC_LANG_PUSH([C++])
+ AC_COMPILE_IFELSE([
+ AC_LANG_PROGRAM([[
+
+#include <stdio.h>
+extern "C" { void fileno(int); }
+
+ ]])
+ ],
+ [AC_MSG_RESULT([yes])
+ AC_DEFINE([_POSIX_SOURCE], [1],
+ [Define if -D_POSIX_SOURCE is necessary.])],
+ [AC_MSG_RESULT([no])])
+ AC_LANG_POP([C++])])
+
+# srand() of SunOS 4.1.3 has return type int instead of void
+
+AC_DEFUN([GROFF_SRAND],
+ [AC_LANG_PUSH([C++])
+ AC_MSG_CHECKING([for return type of srand])
+ AC_COMPILE_IFELSE([
+ AC_LANG_PROGRAM([[
+
+#include <stdlib.h>
+extern "C" { void srand(unsigned int); }
+
+ ]])
+ ],
+ [AC_MSG_RESULT([void])
+ AC_DEFINE([RET_TYPE_SRAND_IS_VOID], [1],
+ [Define if srand() returns void not int.])],
+ [AC_MSG_RESULT([int])])
+ AC_LANG_POP([C++])])
+
+# In April 2005, autoconf's AC_TYPE_SIGNAL is still broken.
+
+AC_DEFUN([GROFF_TYPE_SIGNAL],
+ [AC_MSG_CHECKING([for return type of signal handlers])
+ for groff_declaration in \
+ 'extern "C" void (*signal (int, void (*)(int)))(int);' \
+ 'extern "C" void (*signal (int, void (*)(int)) throw ())(int);' \
+ 'void (*signal ()) ();'
+ do
+ AC_COMPILE_IFELSE([
+ AC_LANG_PROGRAM([[
+
+#include <sys/types.h>
+#include <signal.h>
+#ifdef signal
+# undef signal
+#endif
+$groff_declaration
+
+ ]],
+ [[
+
+int i;
+
+ ]])
+ ],
+ [break],
+ [continue])
+ done
+
+ if test -n "$groff_declaration"; then
+ AC_MSG_RESULT([void])
+ AC_DEFINE([RETSIGTYPE], [void],
+ [Define as the return type of signal handlers
+ (`int' or `void').])
+ else
+ AC_MSG_RESULT([int])
+ AC_DEFINE([RETSIGTYPE], [int],
+ [Define as the return type of signal handlers
+ (`int' or `void').])
+ fi])
+
+AC_DEFUN([GROFF_SYS_NERR],
+ [AC_LANG_PUSH([C++])
+ AC_MSG_CHECKING([for sys_nerr in <errno.h>, <stdio.h>, or <stdlib.h>])
+ AC_COMPILE_IFELSE([
+ AC_LANG_PROGRAM([[
+
+#include <errno.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+ ]],
+ [[
+
+int k;
+k = sys_nerr;
+
+ ]])
+ ],
+ [AC_MSG_RESULT([yes])
+ AC_DEFINE([HAVE_SYS_NERR], [1],
+ [Define if you have sys_nerr in <errno.h>, <stdio.h>, or <stdio.h>.])],
+ [AC_MSG_RESULT([no])])
+ AC_LANG_POP([C++])])
+
+AC_DEFUN([GROFF_SYS_ERRLIST],
+ [AC_MSG_CHECKING([for sys_errlist[] in <errno.h>, <stdio.h>, or <stdlib.h>])
+ AC_COMPILE_IFELSE([
+ AC_LANG_PROGRAM([[
+
+#include <errno.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+ ]],
+ [[
+
+int k;
+k = (int)sys_errlist[0];
+
+ ]])
+ ],
+ [AC_MSG_RESULT([yes])
+ AC_DEFINE([HAVE_SYS_ERRLIST], [1],
+ [Define if you have sys_errlist in <errno.h>, <stdio.h>, or <stdlib.h>.])],
+ [AC_MSG_RESULT([no])])])
+
+AC_DEFUN([GROFF_OSFCN_H],
+ [AC_LANG_PUSH([C++])
+ AC_MSG_CHECKING([C++ <osfcn.h>])
+ AC_COMPILE_IFELSE([
+ AC_LANG_PROGRAM([[
+
+#include <osfcn.h>
+
+ ]],
+ [[
+
+read(0, 0, 0);
+open(0, 0);
+
+ ]])
+ ],
+ [AC_MSG_RESULT([yes])
+ AC_DEFINE([HAVE_CC_OSFCN_H], [1],
+ [Define if you have a C++ <osfcn.h>.])],
+ [AC_MSG_RESULT([no])])
+ AC_LANG_POP([C++])])
+
+AC_DEFUN([GROFF_LIMITS_H],
+ [AC_LANG_PUSH([C++])
+ AC_MSG_CHECKING([C++ <limits.h>])
+ AC_COMPILE_IFELSE([
+ AC_LANG_PROGRAM([[
+
+#include <limits.h>
+
+ ]],
+ [[
+
+int x = INT_MIN;
+int y = INT_MAX;
+int z = UCHAR_MAX;
+
+ ]])
+ ],
+ [AC_MSG_RESULT([yes])
+ AC_DEFINE([HAVE_CC_LIMITS_H], [1],
+ [Define if you have a C++ <limits.h>.])],
+ [AC_MSG_RESULT([no])])
+ AC_LANG_POP([C++])])
+
+AC_DEFUN([GROFF_TIME_T],
+ [AC_LANG_PUSH([C++])
+ AC_MSG_CHECKING([for declaration of time_t])
+ AC_COMPILE_IFELSE([
+ AC_LANG_PROGRAM([[
+
+#include <time.h>
+
+ ]],
+ [[
+
+time_t t = time(0);
+struct tm *p = localtime(&t);
+
+ ]])
+ ],
+ [AC_MSG_RESULT([yes])],
+ [AC_MSG_RESULT([no])
+ AC_DEFINE([LONG_FOR_TIME_T], [1],
+ [Define if localtime() takes a long * not a time_t *.])])
+ AC_LANG_POP([C++])])
+
+AC_DEFUN([GROFF_STRUCT_EXCEPTION],
+ [AC_MSG_CHECKING([struct exception])
+ AC_COMPILE_IFELSE([
+ AC_LANG_PROGRAM([[
+
+#include <math.h>
+
+ ]],
+ [[
+
+struct exception e;
+
+ ]])
+ ],
+ [AC_MSG_RESULT([yes])
+ AC_DEFINE([HAVE_STRUCT_EXCEPTION], [1],
+ [Define if <math.h> defines struct exception.])],
+ [AC_MSG_RESULT([no])])])
+
+AC_DEFUN([GROFF_ARRAY_DELETE],
+ [AC_LANG_PUSH([C++])
+ AC_MSG_CHECKING([whether ANSI array delete syntax is supported])
+ AC_COMPILE_IFELSE([
+ AC_LANG_PROGRAM(, [[
+
+char *p = new char[5];
+delete [] p;
+
+ ]])
+ ],
+ [AC_MSG_RESULT([yes])],
+ [AC_MSG_RESULT([no])
+ AC_DEFINE([ARRAY_DELETE_NEEDS_SIZE], [1],
+ [Define if your C++ doesn't understand `delete []'.])])
+ AC_LANG_POP([C++])])
+
+AC_DEFUN([GROFF_TRADITIONAL_CPP],
+ [AC_LANG_PUSH([C++])
+ AC_MSG_CHECKING([traditional preprocessor])
+ AC_COMPILE_IFELSE([
+ AC_LANG_PROGRAM([[
+
+#define name2(a, b) a/**/b
+
+ ]],
+ [[
+
+int name2(foo, bar);
+
+ ]])
+ ],
+ [AC_MSG_RESULT([yes])
+ AC_DEFINE([TRADITIONAL_CPP], [1],
+ [Define if your C++ compiler uses a traditional (Reiser) preprocessor.])],
+ [AC_MSG_RESULT([no])])
+ AC_LANG_POP([C++])])
+
+AC_DEFUN([GROFF_WCOREFLAG],
+ [AC_MSG_CHECKING([w_coredump])
+ AC_RUN_IFELSE([
+ AC_LANG_PROGRAM([[
+
+#include <sys/types.h>
+#include <sys/wait.h>
+
+ ]],
+ [[
+
+main()
+{
+#ifdef WCOREFLAG
+ exit(1);
+#else
+ int i = 0;
+ ((union wait *)&i)->w_coredump = 1;
+ exit(i != 0200);
+#endif
+}
+
+ ]])
+ ],
+ [AC_MSG_RESULT([yes])
+ AC_DEFINE(WCOREFLAG, 0200,
+ [Define if the 0200 bit of the status returned by wait() indicates
+ whether a core image was produced for a process that was terminated
+ by a signal.])],
+ [AC_MSG_RESULT([no])],
+ [AC_MSG_RESULT([no])])])
+
+AC_DEFUN([GROFF_BROKEN_SPOOLER_FLAGS],
+ [AC_MSG_CHECKING([default value for grops -b option])
+ test -n "${BROKEN_SPOOLER_FLAGS}" || BROKEN_SPOOLER_FLAGS=0
+ AC_MSG_RESULT([$BROKEN_SPOOLER_FLAGS])
+ AC_SUBST([BROKEN_SPOOLER_FLAGS])])
+
+AC_DEFUN([GROFF_PAGE],
+ [AC_MSG_CHECKING([default paper size])
+ groff_prefix=$prefix
+ test "x$prefix" = "xNONE" && groff_prefix=$ac_default_prefix
+ if test -z "$PAGE"; then
+ descfile=
+ if test -r $groff_prefix/share/groff/font/devps/DESC; then
+ descfile=$groff_prefix/share/groff/font/devps/DESC
+ elif test -r $groff_prefix/lib/groff/font/devps/DESC; then
+ descfile=$groff_prefix/lib/groff/font/devps/DESC
+ else
+ for f in $groff_prefix/share/groff/*/font/devps/DESC; do
+ if test -r $f; then
+ descfile=$f
+ break
+ fi
+ done
+ fi
+
+ if test -n "$descfile"; then
+ if grep ['^paperlength[ ]\+841890'] $descfile >/dev/null 2>&1; then
+ PAGE=A4
+ elif grep ['^papersize[ ]\+[aA]4'] $descfile >/dev/null 2>&1; then
+ PAGE=A4
+ fi
+ fi
+ fi
+
+ if test -z "$PAGE"; then
+ dom=`awk '([$]1 == "dom" || [$]1 == "search") { print [$]2; exit}' \
+ /etc/resolv.conf 2>/dev/null`
+ if test -z "$dom"; then
+ dom=`(domainname) 2>/dev/null | tr -d '+'`
+ if test -z "$dom" \
+ || test "$dom" = '(none)'; then
+ dom=`(hostname) 2>/dev/null | grep '\.'`
+ fi
+ fi
+ # If the top-level domain is two letters and it's not `us' or `ca'
+ # then they probably use A4 paper.
+ case "$dom" in
+ [*.[Uu][Ss]|*.[Cc][Aa])]
+ ;;
+ [*.[A-Za-z][A-Za-z])]
+ PAGE=A4 ;;
+ esac
+ fi
+
+ test -n "$PAGE" || PAGE=letter
+ if test "x$PAGE" = "xA4"; then
+ AC_DEFINE([PAGEA4], [1],
+ [Define if the printer's page size is A4.])
+ fi
+ AC_MSG_RESULT([$PAGE])
+ AC_SUBST([PAGE])])
+
+AC_DEFUN([GROFF_CXX_CHECK],
+ [AC_REQUIRE([AC_PROG_CXX])
+ AC_LANG_PUSH([C++])
+ if test "$cross_compiling" = no; then
+ AC_MSG_CHECKING([that C++ compiler can compile simple program])
+ fi
+ AC_RUN_IFELSE([
+ AC_LANG_SOURCE([[
+
+int main() {
+ return 0;
+}
+
+ ]])
+ ],
+ [AC_MSG_RESULT([yes])],
+ [AC_MSG_RESULT([no])
+ AC_MSG_ERROR([a working C++ compiler is required])],
+ [:])
+
+ if test "$cross_compiling" = no; then
+ AC_MSG_CHECKING([that C++ static constructors and destructors are called])
+ fi
+ AC_RUN_IFELSE([
+ AC_LANG_SOURCE([[
+
+extern "C" {
+ void _exit(int);
+}
+
+int i;
+struct A {
+ char dummy;
+ A() { i = 1; }
+ ~A() { if (i == 1) _exit(0); }
+};
+
+A a;
+
+int main()
+{
+ return 1;
+}
+
+ ]])
+ ],
+ [AC_MSG_RESULT([yes])],
+ [AC_MSG_RESULT([no])
+ AC_MSG_ERROR([a working C++ compiler is required])],
+ [:])
+
+ AC_MSG_CHECKING([that header files support C++])
+ AC_LINK_IFELSE([
+ AC_LANG_PROGRAM([[
+
+#include <stdio.h>
+
+ ]],
+ [[
+
+fopen(0, 0);
+
+ ]])
+ ],
+ [AC_MSG_RESULT([yes])],
+ [AC_MSG_RESULT([no])
+ AC_MSG_ERROR([header files do not support C++
+ (if you are using a version of gcc/g++ earlier than 2.5,
+ you should install libg++)])])
+ AC_LANG_POP([C++])])
+
+AC_DEFUN([GROFF_TMAC],
+ [AC_MSG_CHECKING([for prefix of system macro packages])
+ sys_tmac_prefix=
+ sys_tmac_file_prefix=
+ for d in /usr/share/lib/tmac /usr/lib/tmac; do
+ for t in "" tmac.; do
+ for m in an s m; do
+ f=$d/$t$m
+ if test -z "$sys_tmac_prefix" \
+ && test -f $f \
+ && grep '^\.if' $f >/dev/null 2>&1; then
+ sys_tmac_prefix=$d/$t
+ sys_tmac_file_prefix=$t
+ fi
+ done
+ done
+ done
+ AC_MSG_RESULT([$sys_tmac_prefix])
+ AC_SUBST([sys_tmac_prefix])
+
+ AC_MSG_CHECKING([which system macro packages should be made available])
+ tmac_wrap=
+ 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;;"`
+ case "$suff" in
+ e)
+ ;;
+ *)
+ grep "Copyright.*Free Software Foundation" $f >/dev/null \
+ || tmac_wrap="$tmac_wrap $suff" ;;
+ esac
+ done
+ elif test -n "$sys_tmac_prefix"; then
+ files=`echo $sys_tmac_prefix*`
+ grep "\\.so" $files >conftest.sol
+ for f in $files; do
+ case "$f" in
+ ${sys_tmac_prefix}e)
+ ;;
+ *.me)
+ ;;
+ */ms.*)
+ ;;
+ *)
+ b=`basename $f`
+ if grep "\\.so.*/$b\$" conftest.sol >/dev/null \
+ || grep -l "Copyright.*Free Software Foundation" $f >/dev/null; then
+ :
+ else
+ suff=`echo $f | sed -e "s;$sys_tmac_prefix;;"`
+ case "$suff" in
+ tmac.*)
+ ;;
+ *)
+ tmac_wrap="$tmac_wrap $suff" ;;
+ esac
+ fi
+ esac
+ done
+ rm -f conftest.sol
+ fi
+ AC_MSG_RESULT([$tmac_wrap])
+ AC_SUBST([tmac_wrap])])
+
+AC_DEFUN([GROFF_G],
+ [AC_MSG_CHECKING([for existing troff installation])
+ if test "x`(echo .tm '|n(.g' | tr '|' '\\\\' | troff -z -i 2>&1) 2>/dev/null`" = x0; then
+ AC_MSG_RESULT([yes])
+ g=g
+ else
+ AC_MSG_RESULT([no])
+ g=
+ fi
+ AC_SUBST([g])])
+
+# We need the path to install-sh to be absolute.
+
+AC_DEFUN([GROFF_INSTALL_SH],
+ [AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])
+ ac_dir=`cd $ac_aux_dir; pwd`
+ ac_install_sh="$ac_dir/install-sh -c"])
+
+# Test whether install-info is available.
+
+AC_DEFUN([GROFF_INSTALL_INFO],
+ [AC_CHECK_PROGS([INSTALL_INFO], [install-info], [:])])
+
+# At least one UNIX system, Apple Macintosh Rhapsody 5.5,
+# does not have -lm ...
+
+AC_DEFUN([GROFF_LIBM],
+ [AC_CHECK_LIB([m], [sin], [LIBM=-lm])
+ AC_SUBST([LIBM])])
+
+# ... while the MinGW implementation of GCC for Microsoft Win32
+# does not seem to have -lc.
+
+AC_DEFUN([GROFF_LIBC],
+ [AC_CHECK_LIB([c], [main], [LIBC=-lc])
+ AC_SUBST([LIBC])])
+
+# Check for EBCDIC -- stolen from the OS390 Unix LYNX port
+
+AC_DEFUN([GROFF_EBCDIC],
+ [AC_MSG_CHECKING([whether character set is EBCDIC])
+ AC_COMPILE_IFELSE([
+ AC_LANG_PROGRAM([[
+
+/* Treat any failure as ASCII for compatibility with existing art.
+ Use compile-time rather than run-time tests for cross-compiler
+ tolerance. */
+#if '0' != 240
+make an error "Character set is not EBCDIC"
+#endif
+
+ ]])
+ ],
+ [groff_cv_ebcdic="yes"
+ TTYDEVDIRS="font/devcp1047"
+ AC_MSG_RESULT([yes])
+ AC_DEFINE(IS_EBCDIC_HOST, 1,
+ [Define if the host's encoding is EBCDIC.])],
+ [groff_cv_ebcdic="no"
+ TTYDEVDIRS="font/devascii font/devlatin1"
+ OTHERDEVDIRS="font/devlj4 font/devlbp"
+ AC_MSG_RESULT([no])])
+ AC_SUBST([TTYDEVDIRS])
+ AC_SUBST([OTHERDEVDIRS])])
+
+# Check for OS/390 Unix. We test for EBCDIC also -- the Linux port (with
+# gcc) to OS/390 uses ASCII internally.
+
+AC_DEFUN([GROFF_OS390],
+ [if test "$groff_cv_ebcdic" = "yes"; then
+ AC_MSG_CHECKING([for OS/390 Unix])
+ case `uname` in
+ OS/390)
+ CFLAGS="$CFLAGS -D_ALL_SOURCE"
+ AC_MSG_RESULT([yes]) ;;
+ *)
+ AC_MSG_RESULT([no]) ;;
+ esac
+ fi])
+
+# Check whether we need a declaration for a function.
+#
+# Stolen from GNU bfd.
+
+AC_DEFUN([GROFF_NEED_DECLARATION],
+ [AC_MSG_CHECKING([whether $1 must be declared])
+ AC_LANG_PUSH([C++])
+ AC_CACHE_VAL([groff_cv_decl_needed_$1],
+ [AC_COMPILE_IFELSE([
+ AC_LANG_PROGRAM([[
+
+#include <stdio.h>
+#ifdef HAVE_STRING_H
+#include <string.h>
+#endif
+#ifdef HAVE_STRINGS_H
+#include <strings.h>
+#endif
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+#ifdef HAVE_SYS_TIME_H
+#include <sys/time.h>
+#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#ifdef HAVE_MATH_H
+#include <math.h>
+#endif
+
+ ]],
+ [[
+
+#ifndef $1
+ char *p = (char *) $1;
+#endif
+
+ ]])
+ ],
+ [groff_cv_decl_needed_$1=no],
+ [groff_cv_decl_needed_$1=yes])])
+ AC_MSG_RESULT([$groff_cv_decl_needed_$1])
+ if test $groff_cv_decl_needed_$1 = yes; then
+ AC_DEFINE([NEED_DECLARATION_]translit($1, [a-z], [A-Z]), [1],
+ [Define if your C++ doesn't declare ]$1[().])
+ fi
+ AC_LANG_POP([C++])])
+
+# If mkstemp() isn't available, use our own mkstemp.cpp file.
+
+AC_DEFUN([GROFF_MKSTEMP],
+ [AC_MSG_CHECKING([for mkstemp])
+ AC_LANG_PUSH([C++])
+ AC_LIBSOURCE([mkstemp.cpp])
+ AC_LINK_IFELSE([
+ AC_LANG_PROGRAM([[
+
+#include <stdlib.h>
+#include <unistd.h>
+int (*f) (char *);
+
+ ]],
+ [[
+
+f = mkstemp;
+
+ ]])
+ ],
+ [AC_MSG_RESULT([yes])
+ AC_DEFINE([HAVE_MKSTEMP], [1], [Define if you have mkstemp().])],
+ [AC_MSG_RESULT([no])
+ _AC_LIBOBJ([mkstemp])])
+ AC_LANG_POP([C++])])
+
+# Test whether <inttypes.h> exists, doesn't clash with <sys/types.h>,
+# and declares uintmax_t. Taken from the fileutils package.
+
+AC_DEFUN([GROFF_INTTYPES_H],
+ [AC_LANG_PUSH([C++])
+ AC_MSG_CHECKING([C++ <inttypes.h>])
+ AC_COMPILE_IFELSE([
+ AC_LANG_PROGRAM([[
+
+#include <sys/types.h>
+#include <inttypes.h>
+
+ ]],
+ [[
+
+uintmax_t i = (uintmax_t)-1;
+
+ ]])
+ ],
+ [groff_cv_header_inttypes_h=yes
+ AC_DEFINE([HAVE_CC_INTTYPES_H], [1],
+ [Define if you have a C++ <inttypes.h>.])],
+ [groff_cv_header_inttypes_h=no])
+ AC_MSG_RESULT([$groff_cv_header_inttypes_h])
+ AC_LANG_POP([C++])])
+
+# Test for working `unsigned long long'. Taken from the fileutils package.
+
+AC_DEFUN([GROFF_UNSIGNED_LONG_LONG],
+ [AC_LANG_PUSH([C++])
+ AC_MSG_CHECKING([for unsigned long long])
+ AC_LINK_IFELSE([
+ AC_LANG_PROGRAM([[
+
+unsigned long long ull = 1;
+int i = 63;
+unsigned long long ullmax = (unsigned long long)-1;
+
+ ]],
+ [[
+
+return ull << i | ull >> i | ullmax / ull | ullmax % ull;
+
+ ]])
+ ],
+ [groff_cv_type_unsigned_long_long=yes],
+ [groff_cv_type_unsigned_long_long=no])
+ AC_MSG_RESULT([$groff_cv_type_unsigned_long_long])
+ AC_LANG_POP([C++])])
+
+# Define uintmax_t to `unsigned long' or `unsigned long long'
+# if <inttypes.h> does not exist. Taken from the fileutils package.
+
+AC_DEFUN([GROFF_UINTMAX_T],
+ [AC_REQUIRE([GROFF_INTTYPES_H])
+ if test $groff_cv_header_inttypes_h = no; then
+ AC_REQUIRE([GROFF_UNSIGNED_LONG_LONG])
+ test $groff_cv_type_unsigned_long_long = yes \
+ && ac_type='unsigned long long' \
+ || ac_type='unsigned long'
+ AC_DEFINE_UNQUOTED([uintmax_t], [$ac_type],
+ [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)])
+
+# Check for X11.
+
+AC_DEFUN([GROFF_X11],
+ [AC_REQUIRE([AC_PATH_XTRA])
+ groff_no_x=$no_x
+ if test -z "$groff_no_x"; then
+ OLDCFLAGS=$CFLAGS
+ OLDLDFLAGS=$LDFLAGS
+ OLDLIBS=$LIBS
+ CFLAGS="$CFLAGS $X_CFLAGS"
+ LDFLAGS="$LDFLAGS $X_LIBS"
+ LIBS="$LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS"
+
+ LIBS="$LIBS -lXaw"
+ AC_MSG_CHECKING([for Xaw library and header files])
+ AC_LINK_IFELSE([
+ AC_LANG_PROGRAM([[
+
+#include <X11/Intrinsic.h>
+#include <X11/Xaw/Simple.h>
+
+ ]],
+ [])
+ ],
+ [AC_MSG_RESULT([yes])],
+ [AC_MSG_RESULT([no])
+ groff_no_x="yes"])
+
+ LIBS="$LIBS -lXmu"
+ AC_MSG_CHECKING([for Xmu library and header files])
+ AC_LINK_IFELSE([
+ AC_LANG_PROGRAM([[
+
+#include <X11/Intrinsic.h>
+#include <X11/Xmu/Converters.h>
+
+ ]],
+ [])
+ ],
+ [AC_MSG_RESULT([yes])],
+ [AC_MSG_RESULT([no])
+ groff_no_x="yes"])
+
+ CFLAGS=$OLDCFLAGS
+ LDFLAGS=$OLDLDFLAGS
+ LIBS=$OLDLIBS
+ fi
+
+ if test "x$groff_no_x" = "xyes"; then
+ AC_MSG_NOTICE([gxditview and xtotroff won't be built])
+ else
+ XDEVDIRS="font/devX75 font/devX75-12 font/devX100 font/devX100-12"
+ XPROGDIRS="src/devices/xditview src/utils/xtotroff"
+ XLIBDIRS="src/libs/libxutil"
+ fi
+
+ AC_SUBST([XDEVDIRS])
+ AC_SUBST([XPROGDIRS])
+ AC_SUBST([XLIBDIRS])])
+
+# Set up the `--with-appresdir' command line option.
+
+AC_DEFUN([GROFF_APPRESDIR_OPTION],
+ [AC_ARG_WITH([appresdir],
+ dnl Don't quote AS_HELP_STRING!
+ AS_HELP_STRING([--with-appresdir=DIR],
+ [X11 application resource files]))])
+
+# Get a default value for the application resource directory.
+#
+# We ignore the `XAPPLRES' and `XUSERFILESEARCHPATH' environment variables.
+#
+# The goal is to find the `root' of X11. Under most systems this is
+# `/usr/X11/lib'. Application default files are then in
+# `/usr/X11/lib/X11/app-defaults'.
+#
+# Based on autoconf's AC_PATH_X macro.
+
+AC_DEFUN([GROFF_APPRESDIR_DEFAULT],
+ [if test -z "$groff_no_x"; then
+ # Create an Imakefile, run `xmkmf', then `make'.
+ rm -f -r conftest.dir
+ if mkdir conftest.dir; then
+ cd conftest.dir
+ # Make sure to not put `make' in the Imakefile rules,
+ # since we grep it out.
+ cat >Imakefile <<'EOF'
+
+xlibdirs:
+ @echo 'groff_x_usrlibdir="${USRLIBDIR}"; groff_x_libdir="${LIBDIR}"'
+EOF
+
+ if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
+ # GNU make sometimes prints "make[1]: Entering...",
+ # which would confuse us.
+ eval `${MAKE-make} xlibdirs 2>/dev/null | grep -v make`
+
+ # Open Windows `xmkmf' reportedly sets LIBDIR instead of USRLIBDIR.
+ for groff_extension in a so sl; do
+ if test ! -f $groff_x_usrlibdir/libX11.$groff_extension &&
+ test -f $groff_x_libdir/libX11.$groff_extension; then
+ groff_x_usrlibdir=$groff_x_libdir
+ break
+ fi
+ done
+ fi
+
+ cd ..
+ rm -f -r conftest.dir
+ fi
+
+ # In case the test with `xmkmf' wasn't successful, try a suite of
+ # standard directories. Check `X11' before `X11Rn' because it is often
+ # a symlink to the current release.
+ groff_x_libdirs='
+ /usr/X11/lib
+ /usr/X11R6/lib
+ /usr/X11R5/lib
+ /usr/X11R4/lib
+
+ /usr/lib/X11
+ /usr/lib/X11R6
+ /usr/lib/X11R5
+ /usr/lib/X11R4
+
+ /usr/local/X11/lib
+ /usr/local/X11R6/lib
+ /usr/local/X11R5/lib
+ /usr/local/X11R4/lib
+
+ /usr/local/lib/X11
+ /usr/local/lib/X11R6
+ /usr/local/lib/X11R5
+ /usr/local/lib/X11R4
+
+ /usr/X386/lib
+ /usr/x386/lib
+ /usr/XFree86/lib/X11
+
+ /usr/lib
+ /usr/local/lib
+ /usr/unsupported/lib
+ /usr/athena/lib
+ /usr/local/x11r5/lib
+ /usr/lpp/Xamples/lib
+
+ /usr/openwin/lib
+ /usr/openwin/share/lib'
+
+ if test -z "$groff_x_usrlibdir"; then
+ # We only test whether libX11 exists.
+ for groff_dir in $groff_x_libdirs; do
+ for groff_extension in a so sl; do
+ if test ! -r $groff_dir/libX11.$groff_extension; then
+ groff_x_usrlibdir=$groff_dir
+ break 2
+ fi
+ done
+ done
+ fi
+
+ if test "x$with_appresdir" = "x"; then
+ appresdir=$groff_x_usrlibdir/X11/app-defaults
+ else
+ appresdir=$with_appresdir
+ fi
+ fi
+ AC_SUBST([appresdir])])
+
+
+# Emit warning if --with-appresdir hasn't been used.
+
+AC_DEFUN([GROFF_APPRESDIR_CHECK],
+ [if test -z "$groff_no_x"; then
+ if test "x$with_appresdir" = "x"; then
+ AC_MSG_NOTICE([
+
+ The application resource file for gxditview will be installed as
+
+ $appresdir/GXditview
+
+ (an existing file will be saved as `GXditview.old').
+ To install it into a different directory, say, `/etc/gxditview',
+ add `--with-appresdir=/etc/gxditview' to the configure script
+ command line options and rerun it. The environment variable
+ `APPLRESDIR' must then be set to `/etc/' (note the trailing slash),
+ omitting the `gxditview' part which is automatically appended by
+ the X11 searching routines for resource files. More details can be
+ found in the X(7) manual page.
+ ])
+ fi
+ fi])
diff --git a/m4/iconv.m4 b/m4/iconv.m4
new file mode 100644
index 00000000..654c4158
--- /dev/null
+++ b/m4/iconv.m4
@@ -0,0 +1,101 @@
+# iconv.m4 serial AM4 (gettext-0.11.3)
+dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Bruno Haible.
+
+AC_DEFUN([AM_ICONV_LINKFLAGS_BODY],
+[
+ dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
+ AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
+ AC_REQUIRE([AC_LIB_RPATH])
+
+ dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
+ dnl accordingly.
+ AC_LIB_LINKFLAGS_BODY([iconv])
+])
+
+AC_DEFUN([AM_ICONV_LINK],
+[
+ dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
+ dnl those with the standalone portable GNU libiconv installed).
+
+ dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
+ dnl accordingly.
+ AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
+
+ dnl Add $INCICONV to CPPFLAGS before performing the following checks,
+ dnl because if the user has installed libiconv and not disabled its use
+ dnl via --without-libiconv-prefix, he wants to use it. The first
+ dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed.
+ am_save_CPPFLAGS="$CPPFLAGS"
+ AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV])
+
+ AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [
+ am_cv_func_iconv="no, consider installing GNU libiconv"
+ am_cv_lib_iconv=no
+ AC_TRY_LINK([#include <stdlib.h>
+#include <iconv.h>],
+ [iconv_t cd = iconv_open("","");
+ iconv(cd,NULL,NULL,NULL,NULL);
+ iconv_close(cd);],
+ am_cv_func_iconv=yes)
+ if test "$am_cv_func_iconv" != yes; then
+ am_save_LIBS="$LIBS"
+ LIBS="$LIBS $LIBICONV"
+ AC_TRY_LINK([#include <stdlib.h>
+#include <iconv.h>],
+ [iconv_t cd = iconv_open("","");
+ iconv(cd,NULL,NULL,NULL,NULL);
+ iconv_close(cd);],
+ am_cv_lib_iconv=yes
+ am_cv_func_iconv=yes)
+ LIBS="$am_save_LIBS"
+ fi
+ ])
+ if test "$am_cv_func_iconv" = yes; then
+ AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.])
+ fi
+ if test "$am_cv_lib_iconv" = yes; then
+ AC_MSG_CHECKING([how to link with libiconv])
+ AC_MSG_RESULT([$LIBICONV])
+ else
+ dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV
+ dnl either.
+ CPPFLAGS="$am_save_CPPFLAGS"
+ LIBICONV=
+ LTLIBICONV=
+ fi
+ AC_SUBST(LIBICONV)
+ AC_SUBST(LTLIBICONV)
+])
+
+AC_DEFUN([AM_ICONV],
+[
+ AM_ICONV_LINK
+ if test "$am_cv_func_iconv" = yes; then
+ AC_MSG_CHECKING([for iconv declaration])
+ AC_CACHE_VAL(am_cv_proto_iconv, [
+ AC_TRY_COMPILE([
+#include <stdlib.h>
+#include <iconv.h>
+extern
+#ifdef __cplusplus
+"C"
+#endif
+#if defined(__STDC__) || defined(__cplusplus)
+size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
+#else
+size_t iconv();
+#endif
+], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const")
+ am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"])
+ am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
+ AC_MSG_RESULT([$]{ac_t:-
+ }[$]am_cv_proto_iconv)
+ AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1,
+ [Define as const if the declaration of iconv() needs const.])
+ fi
+])
diff --git a/m4/lib-ld.m4 b/m4/lib-ld.m4
new file mode 100644
index 00000000..96c4e2c3
--- /dev/null
+++ b/m4/lib-ld.m4
@@ -0,0 +1,110 @@
+# lib-ld.m4 serial 3 (gettext-0.13)
+dnl Copyright (C) 1996-2003 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl Subroutines of libtool.m4,
+dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision
+dnl with libtool.m4.
+
+dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
+AC_DEFUN([AC_LIB_PROG_LD_GNU],
+[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld,
+[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
+case `$LD -v 2>&1 </dev/null` in
+*GNU* | *'with BFD'*)
+ acl_cv_prog_gnu_ld=yes ;;
+*)
+ acl_cv_prog_gnu_ld=no ;;
+esac])
+with_gnu_ld=$acl_cv_prog_gnu_ld
+])
+
+dnl From libtool-1.4. Sets the variable LD.
+AC_DEFUN([AC_LIB_PROG_LD],
+[AC_ARG_WITH(gnu-ld,
+[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
+test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
+AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([AC_CANONICAL_HOST])dnl
+# Prepare PATH_SEPARATOR.
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ echo "#! /bin/sh" >conf$$.sh
+ echo "exit 0" >>conf$$.sh
+ chmod +x conf$$.sh
+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+ PATH_SEPARATOR=';'
+ else
+ PATH_SEPARATOR=:
+ fi
+ rm -f conf$$.sh
+fi
+ac_prog=ld
+if test "$GCC" = yes; then
+ # Check if gcc -print-prog-name=ld gives a path.
+ AC_MSG_CHECKING([for ld used by GCC])
+ case $host in
+ *-*-mingw*)
+ # gcc leaves a trailing carriage return which upsets mingw
+ ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
+ *)
+ ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
+ esac
+ case $ac_prog in
+ # Accept absolute paths.
+ [[\\/]* | [A-Za-z]:[\\/]*)]
+ [re_direlt='/[^/][^/]*/\.\./']
+ # Canonicalize the path of ld
+ ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
+ while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
+ ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
+ done
+ test -z "$LD" && LD="$ac_prog"
+ ;;
+ "")
+ # If it fails, then pretend we aren't using GCC.
+ ac_prog=ld
+ ;;
+ *)
+ # If it is relative, then search for the first ld in PATH.
+ with_gnu_ld=unknown
+ ;;
+ esac
+elif test "$with_gnu_ld" = yes; then
+ AC_MSG_CHECKING([for GNU ld])
+else
+ AC_MSG_CHECKING([for non-GNU ld])
+fi
+AC_CACHE_VAL(acl_cv_path_LD,
+[if test -z "$LD"; then
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
+ for ac_dir in $PATH; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
+ acl_cv_path_LD="$ac_dir/$ac_prog"
+ # Check to see if the program is GNU ld. I'd rather use --version,
+ # but apparently some GNU ld's only accept -v.
+ # Break only if it was the GNU/non-GNU ld that we prefer.
+ case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in
+ *GNU* | *'with BFD'*)
+ test "$with_gnu_ld" != no && break ;;
+ *)
+ test "$with_gnu_ld" != yes && break ;;
+ esac
+ fi
+ done
+ IFS="$ac_save_ifs"
+else
+ acl_cv_path_LD="$LD" # Let the user override the test with a path.
+fi])
+LD="$acl_cv_path_LD"
+if test -n "$LD"; then
+ AC_MSG_RESULT($LD)
+else
+ AC_MSG_RESULT(no)
+fi
+test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
+AC_LIB_PROG_LD_GNU
+])
diff --git a/m4/lib-link.m4 b/m4/lib-link.m4
new file mode 100644
index 00000000..244a7791
--- /dev/null
+++ b/m4/lib-link.m4
@@ -0,0 +1,554 @@
+# lib-link.m4 serial 7 (gettext-0.15)
+dnl Copyright (C) 2001-2005 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Bruno Haible.
+
+AC_PREREQ(2.50)
+
+dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
+dnl the libraries corresponding to explicit and implicit dependencies.
+dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
+dnl augments the CPPFLAGS variable.
+AC_DEFUN([AC_LIB_LINKFLAGS],
+[
+ AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
+ AC_REQUIRE([AC_LIB_RPATH])
+ define([Name],[translit([$1],[./-], [___])])
+ define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
+ [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
+ AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
+ AC_LIB_LINKFLAGS_BODY([$1], [$2])
+ ac_cv_lib[]Name[]_libs="$LIB[]NAME"
+ ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
+ ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
+ ])
+ LIB[]NAME="$ac_cv_lib[]Name[]_libs"
+ LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
+ INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
+ AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
+ AC_SUBST([LIB]NAME)
+ AC_SUBST([LTLIB]NAME)
+ dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
+ dnl results of this search when this library appears as a dependency.
+ HAVE_LIB[]NAME=yes
+ undefine([Name])
+ undefine([NAME])
+])
+
+dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode)
+dnl searches for libname and the libraries corresponding to explicit and
+dnl implicit dependencies, together with the specified include files and
+dnl the ability to compile and link the specified testcode. If found, it
+dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and
+dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and
+dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
+dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
+AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
+[
+ AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
+ AC_REQUIRE([AC_LIB_RPATH])
+ define([Name],[translit([$1],[./-], [___])])
+ define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
+ [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
+
+ dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
+ dnl accordingly.
+ AC_LIB_LINKFLAGS_BODY([$1], [$2])
+
+ dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
+ dnl because if the user has installed lib[]Name and not disabled its use
+ dnl via --without-lib[]Name-prefix, he wants to use it.
+ ac_save_CPPFLAGS="$CPPFLAGS"
+ AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
+
+ AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
+ ac_save_LIBS="$LIBS"
+ LIBS="$LIBS $LIB[]NAME"
+ AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no])
+ LIBS="$ac_save_LIBS"
+ ])
+ if test "$ac_cv_lib[]Name" = yes; then
+ HAVE_LIB[]NAME=yes
+ AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.])
+ AC_MSG_CHECKING([how to link with lib[]$1])
+ AC_MSG_RESULT([$LIB[]NAME])
+ else
+ HAVE_LIB[]NAME=no
+ dnl If $LIB[]NAME didn't lead to a usable library, we don't need
+ dnl $INC[]NAME either.
+ CPPFLAGS="$ac_save_CPPFLAGS"
+ LIB[]NAME=
+ LTLIB[]NAME=
+ fi
+ AC_SUBST([HAVE_LIB]NAME)
+ AC_SUBST([LIB]NAME)
+ AC_SUBST([LTLIB]NAME)
+ undefine([Name])
+ undefine([NAME])
+])
+
+dnl Determine the platform dependent parameters needed to use rpath:
+dnl libext, shlibext, hardcode_libdir_flag_spec, hardcode_libdir_separator,
+dnl hardcode_direct, hardcode_minus_L.
+AC_DEFUN([AC_LIB_RPATH],
+[
+ dnl Tell automake >= 1.10 to complain if config.rpath is missing.
+ m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])])
+ AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS
+ AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host
+ AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
+ AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [
+ CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
+ ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
+ . ./conftest.sh
+ rm -f ./conftest.sh
+ acl_cv_rpath=done
+ ])
+ wl="$acl_cv_wl"
+ libext="$acl_cv_libext"
+ shlibext="$acl_cv_shlibext"
+ hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
+ hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
+ hardcode_direct="$acl_cv_hardcode_direct"
+ hardcode_minus_L="$acl_cv_hardcode_minus_L"
+ dnl Determine whether the user wants rpath handling at all.
+ AC_ARG_ENABLE(rpath,
+ [ --disable-rpath do not hardcode runtime library paths],
+ :, enable_rpath=yes)
+])
+
+dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
+dnl the libraries corresponding to explicit and implicit dependencies.
+dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
+AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
+[
+ AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
+ define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
+ [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
+ dnl By default, look in $includedir and $libdir.
+ use_additional=yes
+ AC_LIB_WITH_FINAL_PREFIX([
+ eval additional_includedir=\"$includedir\"
+ eval additional_libdir=\"$libdir\"
+ ])
+ AC_LIB_ARG_WITH([lib$1-prefix],
+[ --with-lib$1-prefix[=DIR] search for lib$1 in DIR/include and DIR/lib
+ --without-lib$1-prefix don't search for lib$1 in includedir and libdir],
+[
+ if test "X$withval" = "Xno"; then
+ use_additional=no
+ else
+ if test "X$withval" = "X"; then
+ AC_LIB_WITH_FINAL_PREFIX([
+ eval additional_includedir=\"$includedir\"
+ eval additional_libdir=\"$libdir\"
+ ])
+ else
+ additional_includedir="$withval/include"
+ additional_libdir="$withval/$acl_libdirstem"
+ fi
+ fi
+])
+ dnl Search the library and its dependencies in $additional_libdir and
+ dnl $LDFLAGS. Using breadth-first-seach.
+ LIB[]NAME=
+ LTLIB[]NAME=
+ INC[]NAME=
+ rpathdirs=
+ ltrpathdirs=
+ names_already_handled=
+ names_next_round='$1 $2'
+ while test -n "$names_next_round"; do
+ names_this_round="$names_next_round"
+ names_next_round=
+ for name in $names_this_round; do
+ already_handled=
+ for n in $names_already_handled; do
+ if test "$n" = "$name"; then
+ already_handled=yes
+ break
+ fi
+ done
+ if test -z "$already_handled"; then
+ names_already_handled="$names_already_handled $name"
+ dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
+ dnl or AC_LIB_HAVE_LINKFLAGS call.
+ uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
+ eval value=\"\$HAVE_LIB$uppername\"
+ if test -n "$value"; then
+ if test "$value" = yes; then
+ eval value=\"\$LIB$uppername\"
+ test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
+ eval value=\"\$LTLIB$uppername\"
+ test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
+ else
+ dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
+ dnl that this library doesn't exist. So just drop it.
+ :
+ fi
+ else
+ dnl Search the library lib$name in $additional_libdir and $LDFLAGS
+ dnl and the already constructed $LIBNAME/$LTLIBNAME.
+ found_dir=
+ found_la=
+ found_so=
+ found_a=
+ if test $use_additional = yes; then
+ if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
+ found_dir="$additional_libdir"
+ found_so="$additional_libdir/lib$name.$shlibext"
+ if test -f "$additional_libdir/lib$name.la"; then
+ found_la="$additional_libdir/lib$name.la"
+ fi
+ else
+ if test -f "$additional_libdir/lib$name.$libext"; then
+ found_dir="$additional_libdir"
+ found_a="$additional_libdir/lib$name.$libext"
+ if test -f "$additional_libdir/lib$name.la"; then
+ found_la="$additional_libdir/lib$name.la"
+ fi
+ fi
+ fi
+ fi
+ if test "X$found_dir" = "X"; then
+ for x in $LDFLAGS $LTLIB[]NAME; do
+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+ case "$x" in
+ -L*)
+ dir=`echo "X$x" | sed -e 's/^X-L//'`
+ if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
+ found_dir="$dir"
+ found_so="$dir/lib$name.$shlibext"
+ if test -f "$dir/lib$name.la"; then
+ found_la="$dir/lib$name.la"
+ fi
+ else
+ if test -f "$dir/lib$name.$libext"; then
+ found_dir="$dir"
+ found_a="$dir/lib$name.$libext"
+ if test -f "$dir/lib$name.la"; then
+ found_la="$dir/lib$name.la"
+ fi
+ fi
+ fi
+ ;;
+ esac
+ if test "X$found_dir" != "X"; then
+ break
+ fi
+ done
+ fi
+ if test "X$found_dir" != "X"; then
+ dnl Found the library.
+ LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
+ if test "X$found_so" != "X"; then
+ dnl Linking with a shared library. We attempt to hardcode its
+ dnl directory into the executable's runpath, unless it's the
+ dnl standard /usr/lib.
+ if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/$acl_libdirstem"; then
+ dnl No hardcoding is needed.
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
+ else
+ dnl Use an explicit option to hardcode DIR into the resulting
+ dnl binary.
+ dnl Potentially add DIR to ltrpathdirs.
+ dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
+ haveit=
+ for x in $ltrpathdirs; do
+ if test "X$x" = "X$found_dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ ltrpathdirs="$ltrpathdirs $found_dir"
+ fi
+ dnl The hardcoding into $LIBNAME is system dependent.
+ if test "$hardcode_direct" = yes; then
+ dnl Using DIR/libNAME.so during linking hardcodes DIR into the
+ dnl resulting binary.
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
+ else
+ if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
+ dnl Use an explicit option to hardcode DIR into the resulting
+ dnl binary.
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
+ dnl Potentially add DIR to rpathdirs.
+ dnl The rpathdirs will be appended to $LIBNAME at the end.
+ haveit=
+ for x in $rpathdirs; do
+ if test "X$x" = "X$found_dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ rpathdirs="$rpathdirs $found_dir"
+ fi
+ else
+ dnl Rely on "-L$found_dir".
+ dnl But don't add it if it's already contained in the LDFLAGS
+ dnl or the already constructed $LIBNAME
+ haveit=
+ for x in $LDFLAGS $LIB[]NAME; do
+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+ if test "X$x" = "X-L$found_dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
+ fi
+ if test "$hardcode_minus_L" != no; then
+ dnl FIXME: Not sure whether we should use
+ dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
+ dnl here.
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
+ else
+ dnl We cannot use $hardcode_runpath_var and LD_RUN_PATH
+ dnl here, because this doesn't fit in flags passed to the
+ dnl compiler. So give up. No hardcoding. This affects only
+ dnl very old systems.
+ dnl FIXME: Not sure whether we should use
+ dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
+ dnl here.
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
+ fi
+ fi
+ fi
+ fi
+ else
+ if test "X$found_a" != "X"; then
+ dnl Linking with a static library.
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
+ else
+ dnl We shouldn't come here, but anyway it's good to have a
+ dnl fallback.
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
+ fi
+ fi
+ dnl Assume the include files are nearby.
+ additional_includedir=
+ case "$found_dir" in
+ */$acl_libdirstem | */$acl_libdirstem/)
+ basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
+ additional_includedir="$basedir/include"
+ ;;
+ esac
+ if test "X$additional_includedir" != "X"; then
+ dnl Potentially add $additional_includedir to $INCNAME.
+ dnl But don't add it
+ dnl 1. if it's the standard /usr/include,
+ dnl 2. if it's /usr/local/include and we are using GCC on Linux,
+ dnl 3. if it's already present in $CPPFLAGS or the already
+ dnl constructed $INCNAME,
+ dnl 4. if it doesn't exist as a directory.
+ if test "X$additional_includedir" != "X/usr/include"; then
+ haveit=
+ if test "X$additional_includedir" = "X/usr/local/include"; then
+ if test -n "$GCC"; then
+ case $host_os in
+ linux* | gnu* | k*bsd*-gnu) haveit=yes;;
+ esac
+ fi
+ fi
+ if test -z "$haveit"; then
+ for x in $CPPFLAGS $INC[]NAME; do
+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+ if test "X$x" = "X-I$additional_includedir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ if test -d "$additional_includedir"; then
+ dnl Really add $additional_includedir to $INCNAME.
+ INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
+ fi
+ fi
+ fi
+ fi
+ fi
+ dnl Look for dependencies.
+ if test -n "$found_la"; then
+ dnl Read the .la file. It defines the variables
+ dnl dlname, library_names, old_library, dependency_libs, current,
+ dnl age, revision, installed, dlopen, dlpreopen, libdir.
+ save_libdir="$libdir"
+ case "$found_la" in
+ */* | *\\*) . "$found_la" ;;
+ *) . "./$found_la" ;;
+ esac
+ libdir="$save_libdir"
+ dnl We use only dependency_libs.
+ for dep in $dependency_libs; do
+ case "$dep" in
+ -L*)
+ additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
+ dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
+ dnl But don't add it
+ dnl 1. if it's the standard /usr/lib,
+ dnl 2. if it's /usr/local/lib and we are using GCC on Linux,
+ dnl 3. if it's already present in $LDFLAGS or the already
+ dnl constructed $LIBNAME,
+ dnl 4. if it doesn't exist as a directory.
+ if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then
+ haveit=
+ if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then
+ if test -n "$GCC"; then
+ case $host_os in
+ linux* | gnu* | k*bsd*-gnu) haveit=yes;;
+ esac
+ fi
+ fi
+ if test -z "$haveit"; then
+ haveit=
+ for x in $LDFLAGS $LIB[]NAME; do
+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+ if test "X$x" = "X-L$additional_libdir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ if test -d "$additional_libdir"; then
+ dnl Really add $additional_libdir to $LIBNAME.
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
+ fi
+ fi
+ haveit=
+ for x in $LDFLAGS $LTLIB[]NAME; do
+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+ if test "X$x" = "X-L$additional_libdir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ if test -d "$additional_libdir"; then
+ dnl Really add $additional_libdir to $LTLIBNAME.
+ LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
+ fi
+ fi
+ fi
+ fi
+ ;;
+ -R*)
+ dir=`echo "X$dep" | sed -e 's/^X-R//'`
+ if test "$enable_rpath" != no; then
+ dnl Potentially add DIR to rpathdirs.
+ dnl The rpathdirs will be appended to $LIBNAME at the end.
+ haveit=
+ for x in $rpathdirs; do
+ if test "X$x" = "X$dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ rpathdirs="$rpathdirs $dir"
+ fi
+ dnl Potentially add DIR to ltrpathdirs.
+ dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
+ haveit=
+ for x in $ltrpathdirs; do
+ if test "X$x" = "X$dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ ltrpathdirs="$ltrpathdirs $dir"
+ fi
+ fi
+ ;;
+ -l*)
+ dnl Handle this in the next round.
+ names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
+ ;;
+ *.la)
+ dnl Handle this in the next round. Throw away the .la's
+ dnl directory; it is already contained in a preceding -L
+ dnl option.
+ names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
+ ;;
+ *)
+ dnl Most likely an immediate library name.
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
+ LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
+ ;;
+ esac
+ done
+ fi
+ else
+ dnl Didn't find the library; assume it is in the system directories
+ dnl known to the linker and runtime loader. (All the system
+ dnl directories known to the linker should also be known to the
+ dnl runtime loader, otherwise the system is severely misconfigured.)
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
+ LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
+ fi
+ fi
+ fi
+ done
+ done
+ if test "X$rpathdirs" != "X"; then
+ if test -n "$hardcode_libdir_separator"; then
+ dnl Weird platform: only the last -rpath option counts, the user must
+ dnl pass all path elements in one option. We can arrange that for a
+ dnl single library, but not when more than one $LIBNAMEs are used.
+ alldirs=
+ for found_dir in $rpathdirs; do
+ alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
+ done
+ dnl Note: hardcode_libdir_flag_spec uses $libdir and $wl.
+ acl_save_libdir="$libdir"
+ libdir="$alldirs"
+ eval flag=\"$hardcode_libdir_flag_spec\"
+ libdir="$acl_save_libdir"
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
+ else
+ dnl The -rpath options are cumulative.
+ for found_dir in $rpathdirs; do
+ acl_save_libdir="$libdir"
+ libdir="$found_dir"
+ eval flag=\"$hardcode_libdir_flag_spec\"
+ libdir="$acl_save_libdir"
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
+ done
+ fi
+ fi
+ if test "X$ltrpathdirs" != "X"; then
+ dnl When using libtool, the option that works for both libraries and
+ dnl executables is -R. The -R options are cumulative.
+ for found_dir in $ltrpathdirs; do
+ LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
+ done
+ fi
+])
+
+dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
+dnl unless already present in VAR.
+dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
+dnl contains two or three consecutive elements that belong together.
+AC_DEFUN([AC_LIB_APPENDTOVAR],
+[
+ for element in [$2]; do
+ haveit=
+ for x in $[$1]; do
+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+ if test "X$x" = "X$element"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ [$1]="${[$1]}${[$1]:+ }$element"
+ fi
+ done
+])
diff --git a/m4/lib-prefix.m4 b/m4/lib-prefix.m4
new file mode 100644
index 00000000..a8684e17
--- /dev/null
+++ b/m4/lib-prefix.m4
@@ -0,0 +1,185 @@
+# lib-prefix.m4 serial 5 (gettext-0.15)
+dnl Copyright (C) 2001-2005 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Bruno Haible.
+
+dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and
+dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't
+dnl require excessive bracketing.
+ifdef([AC_HELP_STRING],
+[AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])],
+[AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])])
+
+dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
+dnl to access previously installed libraries. The basic assumption is that
+dnl a user will want packages to use other packages he previously installed
+dnl with the same --prefix option.
+dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
+dnl libraries, but is otherwise very convenient.
+AC_DEFUN([AC_LIB_PREFIX],
+[
+ AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([AC_CANONICAL_HOST])
+ AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
+ AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
+ dnl By default, look in $includedir and $libdir.
+ use_additional=yes
+ AC_LIB_WITH_FINAL_PREFIX([
+ eval additional_includedir=\"$includedir\"
+ eval additional_libdir=\"$libdir\"
+ ])
+ AC_LIB_ARG_WITH([lib-prefix],
+[ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
+ --without-lib-prefix don't search for libraries in includedir and libdir],
+[
+ if test "X$withval" = "Xno"; then
+ use_additional=no
+ else
+ if test "X$withval" = "X"; then
+ AC_LIB_WITH_FINAL_PREFIX([
+ eval additional_includedir=\"$includedir\"
+ eval additional_libdir=\"$libdir\"
+ ])
+ else
+ additional_includedir="$withval/include"
+ additional_libdir="$withval/$acl_libdirstem"
+ fi
+ fi
+])
+ if test $use_additional = yes; then
+ dnl Potentially add $additional_includedir to $CPPFLAGS.
+ dnl But don't add it
+ dnl 1. if it's the standard /usr/include,
+ dnl 2. if it's already present in $CPPFLAGS,
+ dnl 3. if it's /usr/local/include and we are using GCC on Linux,
+ dnl 4. if it doesn't exist as a directory.
+ if test "X$additional_includedir" != "X/usr/include"; then
+ haveit=
+ for x in $CPPFLAGS; do
+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+ if test "X$x" = "X-I$additional_includedir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ if test "X$additional_includedir" = "X/usr/local/include"; then
+ if test -n "$GCC"; then
+ case $host_os in
+ linux* | gnu* | k*bsd*-gnu) haveit=yes;;
+ esac
+ fi
+ fi
+ if test -z "$haveit"; then
+ if test -d "$additional_includedir"; then
+ dnl Really add $additional_includedir to $CPPFLAGS.
+ CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
+ fi
+ fi
+ fi
+ fi
+ dnl Potentially add $additional_libdir to $LDFLAGS.
+ dnl But don't add it
+ dnl 1. if it's the standard /usr/lib,
+ dnl 2. if it's already present in $LDFLAGS,
+ dnl 3. if it's /usr/local/lib and we are using GCC on Linux,
+ dnl 4. if it doesn't exist as a directory.
+ if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then
+ haveit=
+ for x in $LDFLAGS; do
+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+ if test "X$x" = "X-L$additional_libdir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then
+ if test -n "$GCC"; then
+ case $host_os in
+ linux*) haveit=yes;;
+ esac
+ fi
+ fi
+ if test -z "$haveit"; then
+ if test -d "$additional_libdir"; then
+ dnl Really add $additional_libdir to $LDFLAGS.
+ LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
+ fi
+ fi
+ fi
+ fi
+ fi
+])
+
+dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
+dnl acl_final_exec_prefix, containing the values to which $prefix and
+dnl $exec_prefix will expand at the end of the configure script.
+AC_DEFUN([AC_LIB_PREPARE_PREFIX],
+[
+ dnl Unfortunately, prefix and exec_prefix get only finally determined
+ dnl at the end of configure.
+ if test "X$prefix" = "XNONE"; then
+ acl_final_prefix="$ac_default_prefix"
+ else
+ acl_final_prefix="$prefix"
+ fi
+ if test "X$exec_prefix" = "XNONE"; then
+ acl_final_exec_prefix='${prefix}'
+ else
+ acl_final_exec_prefix="$exec_prefix"
+ fi
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
+ prefix="$acl_save_prefix"
+])
+
+dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
+dnl variables prefix and exec_prefix bound to the values they will have
+dnl at the end of the configure script.
+AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
+[
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+ $1
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+])
+
+dnl AC_LIB_PREPARE_MULTILIB creates a variable acl_libdirstem, containing
+dnl the basename of the libdir, either "lib" or "lib64".
+AC_DEFUN([AC_LIB_PREPARE_MULTILIB],
+[
+ dnl There is no formal standard regarding lib and lib64. The current
+ dnl practice is that on a system supporting 32-bit and 64-bit instruction
+ dnl sets or ABIs, 64-bit libraries go under $prefix/lib64 and 32-bit
+ dnl libraries go under $prefix/lib. We determine the compiler's default
+ dnl mode by looking at the compiler's library search path. If at least
+ dnl of its elements ends in /lib64 or points to a directory whose absolute
+ dnl pathname ends in /lib64, we assume a 64-bit ABI. Otherwise we use the
+ dnl default, namely "lib".
+ acl_libdirstem=lib
+ searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
+ if test -n "$searchpath"; then
+ acl_save_IFS="${IFS= }"; IFS=":"
+ for searchdir in $searchpath; do
+ if test -d "$searchdir"; then
+ case "$searchdir" in
+ */lib64/ | */lib64 ) acl_libdirstem=lib64 ;;
+ *) searchdir=`cd "$searchdir" && pwd`
+ case "$searchdir" in
+ */lib64 ) acl_libdirstem=lib64 ;;
+ esac ;;
+ esac
+ fi
+ done
+ IFS="$acl_save_IFS"
+ fi
+])
diff --git a/src/include/config.hin b/src/include/config.hin
index 38c8638a..9c6d5ee2 100644
--- a/src/include/config.hin
+++ b/src/include/config.hin
@@ -34,6 +34,9 @@
/* Define to 1 if you have the `gettimeofday' function. */
#undef HAVE_GETTIMEOFDAY
+/* Define if you have the iconv() function. */
+#undef HAVE_ICONV
+
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
@@ -43,6 +46,9 @@
/* Define to 1 if you have the `kill' function. */
#undef HAVE_KILL
+/* Define if you have <langinfo.h> and nl_langinfo(CODESET). */
+#undef HAVE_LANGINFO_CODESET
+
/* Define to 1 if you have the <limits.h> header file. */
#undef HAVE_LIMITS_H
@@ -127,6 +133,9 @@
/* Define to 1 if you have the `vsnprintf' function. */
#undef HAVE_VSNPRINTF
+/* Define as const if the declaration of iconv() needs const. */
+#undef ICONV_CONST
+
/* Define if the host's encoding is EBCDIC. */
#undef IS_EBCDIC_HOST
diff --git a/src/preproc/preconv/Makefile.sub b/src/preproc/preconv/Makefile.sub
index 64e03d59..c5f2c9d5 100644
--- a/src/preproc/preconv/Makefile.sub
+++ b/src/preproc/preconv/Makefile.sub
@@ -2,5 +2,6 @@ PROG=preconv$(EXEEXT)
# MAN1=preconv.n
XLIBS=$(LIBGROFF)
MLIB=$(LIBM)
+EXTRA_LDFLAGS=$(LIBICONV)
OBJS=preconv.$(OBJEXT)
CCSRCS=$(srcdir)/preconv.cpp
diff --git a/src/preproc/preconv/preconv.cpp b/src/preproc/preconv/preconv.cpp
index 0881eec7..88c5b737 100644
--- a/src/preproc/preconv/preconv.cpp
+++ b/src/preproc/preconv/preconv.cpp
@@ -19,8 +19,6 @@ You should have received a copy of the GNU General Public License along
with groff; see the file COPYING. If not, write to the Free Software
Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */
-#define I18N
-
#include "lib.h"
#include <assert.h>
@@ -31,16 +29,20 @@ Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */
#include "nonposix.h"
#include "stringclass.h"
-#ifdef I18N
-# include <locale.h>
+#include <locale.h>
+
+#if HAVE_LANGINFO_CODESET
# include <langinfo.h>
+#endif
+
+#if HAVE_ICONV
# include <iconv.h>
# ifdef WORDS_BIGENDIAN
# define UNICODE "UTF-32BE"
# else
# define UNICODE "UTF-32LE"
# endif
-#endif /* I18N */
+#endif
#define MAX_VAR_LEN 100
@@ -589,7 +591,7 @@ conversion_cp1047(FILE *fp, const string &data)
}
// Locale-sensible conversion.
-#ifdef I18N
+#if HAVE_ICONV
void
conversion_iconv(FILE *fp, const string &data, char *enc)
{
@@ -673,7 +675,7 @@ conversion_iconv(FILE *fp, const string &data, char *enc)
for (int *ptr = outbuf; (char *)ptr < limit; ptr++)
unicode_entity(*ptr);
}
-#endif /* I18N */
+#endif /* HAVE_ICONV */
// ---------------------------------------------------------
// Handle Byte Order Mark.
@@ -985,7 +987,7 @@ do_file(const char *filename)
else if (!strcasecmp(encoding, "cp1047"))
conversion_cp1047(fp, data);
else {
-#ifdef I18N
+#if HAVE_ICONV
conversion_iconv(fp, data, encoding);
#else
error("encoding system `%1' not supported", encoding);
@@ -1023,8 +1025,8 @@ main(int argc, char **argv)
// Determine the default encoding. This must be done before
// getopt() is called since the usage message shows the default
// encoding.
-#ifdef I18N
setlocale(LC_ALL, "");
+#if HAVE_LANGINFO_CODESET
char *locale = setlocale(LC_CTYPE, NULL);
if (!locale || !strcmp(locale, "C") || !strcmp(locale, "POSIX"))
default_encoding = "latin1";
@@ -1035,7 +1037,7 @@ main(int argc, char **argv)
}
#else
default_encoding = "latin1";
-#endif /* I18N */
+#endif /* HAVE_LANGINFO_CODESET */
program_name = argv[0];
int opt;
diff --git a/tmac/groff_www.man b/tmac/groff_www.man
index efc07e3e..3f6f2e96 100644
--- a/tmac/groff_www.man
+++ b/tmac/groff_www.man
@@ -1,5 +1,5 @@
.TH GROFF_WWW @MAN7EXT@ "@MDATE@" "Groff Version @VERSION@"
-.\" Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005
+.\" Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006
.\" Free Software Foundation, Inc.
.\" Written by Gaius Mulley (gaius@glam.ac.uk)
.\"
@@ -52,7 +52,7 @@ The manual page is very a basic guide, and the html device driver
has been completely rewritten but still remains as in an alpha state.
It has been included into the distribution so that a lot of people have a
chance to test it.
-Note that this macro file will be automatically called (via the
+Note that this macro file is automatically called (via the
.B troffrc
file) if you use
.BR \-Thtml .
@@ -99,9 +99,9 @@ Here is a summary of the functions found in this macro set.
\&.CDE code example end
\&.ALN place links on left of
main text.
-\&.LNS start a new two column
+\&.LNS start a new two-column
table with links in the left.
-\&.LNE end the two column table.
+\&.LNE end the two-column table.
.fi
.PP
Output of the
@@ -142,7 +142,7 @@ Whereas
.fi
.RE
.IP
-will tell
+tells
.B \%grohtml
that no heading links should be created at all.
Another method for turning automatic headings off is by issuing the
@@ -487,30 +487,31 @@ End code display
.
.TP
.B ".ALN [color] [percentage]"
-Place section heading links automatically to the left of the main
-text. The color argument is optional and if present indicates which
-HTML background color is to be used under the links.
+Place section heading links automatically to the left of the main text.
+The color argument is optional and if present indicates which HTML
+background color is to be used under the links.
The optional percentage indicates the amount of width to devote to
-displaying the links. The default values are #eeeeee and 30
-for color and percentage width respectively.
+displaying the links.
+The default values are #eeeeee and 30 for color and percentage width,
+respectively.
This macro should only be called once at the beginning of the document.
-Once this macro has been called each section heading will emit an
-HTML table consisting of the links in the left and the section text
-on the right.
+After calling this macro each section heading emits an HTML table consisting
+of the links in the left and the section text on the right.
.
.TP
.B ".LNS"
-Start a new two column table with links in the left column.
-This can be called if the document has text before the first .SH
-and if .ALN is used. Typically this is called just before the
-first paragraph and after the main title as it indicates that
-text after this point should be positioned to the right of
-the left hand navigational links.
+Start a new two-column table with links in the left column.
+This can be called if the document has text before the first .SH and if .ALN
+is used.
+Typically this is called just before the first paragraph and after the main
+title as it indicates that text after this point should be positioned to the
+right of the left-hand navigational links.
.
.TP
.B ".LNE"
-End a two column table. This should be called at the end of the
-document if .ALN was used.
+End a two-column table.
+This should be called at the end of the document if .ALN was used.
+.
.
.SH SECTION HEADING LINKS
By default
diff --git a/tmac/www.tmac b/tmac/www.tmac
index 0e3c76fe..331838cf 100644
--- a/tmac/www.tmac
+++ b/tmac/www.tmac
@@ -38,6 +38,7 @@ A simple set of macros to provide HTML documents with basic
www functionality. It should work with any macro set.
..
.
+.
.\" --------------------------------------------------------------------
.\" Setup
.\" --------------------------------------------------------------------
@@ -119,7 +120,6 @@ www functionality. It should work with any macro set.
. el .sp \\n[www:pd]u
..
.
-.\"
.\" --------------------------------------------------------------------
.\" www:error (<test>...)
.\"
@@ -145,6 +145,7 @@ www functionality. It should work with any macro set.
. nr \\$1 (\\n[\\$0:n]-1)
. rr \\$0:n
..
+.
.\" --------------------------------------------------------------------
.\" www:splitstr (<name>)
.\"
@@ -180,6 +181,7 @@ www functionality. It should work with any macro set.
. rm \\$0:r
. rm \\$0:s
..
+.
.\" --------------------------------------------------------------------
.\" www:url_breaks (<string_name>)
.\"
@@ -200,6 +202,7 @@ www functionality. It should work with any macro set.
. ds \\$1 "\\*[\\$0:s]\""
. rm \\$0:s
..
+.
.\" --------------------------------------------------------------------
.\" www:url_breaks_splitted (<result> <char> [<char>...])
.\"
@@ -256,6 +259,8 @@ www functionality. It should work with any macro set.
. rm \\$0:res
. rm \\$0:s
..
+.
+.
.\" --------------------------------------------------------------------
.\" User Interface
.\" --------------------------------------------------------------------
@@ -277,12 +282,14 @@ www functionality. It should work with any macro set.
. nop \&
. \}
..
+.
.\"
.\" an auxiliary macro for HTML (without following space)
.\"
.de HTML-NS
. nop \X^html:\\$*^\c
..
+.
.\"
.\" emit a HTML tag after shutting down a (possibly open) paragraph
.\"
@@ -292,6 +299,7 @@ www functionality. It should work with any macro set.
. nop \&\X^html</p>:\\$*^
. \}
..
+.
.\" --------------------------------------------------------------------
.\" HX n
.\"
@@ -305,18 +313,21 @@ www functionality. It should work with any macro set.
. if \\n[www-html] \
. nop \X^index:\\$*^
..
+.
.\" --------------------------------------------------------------------
.\" BCL foreground background active not-visited visited
.\"
.de BCL
. HTML <body text=\\$1 bgcolor=\\$2 link=\\$3 alink=\\$4 vlink=\\$5>
..
+.
.\" --------------------------------------------------------------------
.\" BGIMG imagefile
.\"
.de BGIMG
. HTML <body background=\\$1>
..
+.
.\" --------------------------------------------------------------------
.\" URL url [description] [after]
.\" if description is absent then the url becomes the anchor text
@@ -370,12 +381,14 @@ www functionality. It should work with any macro set.
. \}
. rm \\$0:adr
..
+.
.\" --------------------------------------------------------------------
.\" FTP url description [after]
.\"
.\" Same as URL.
.\"
.als FTP URL
+.
.\" --------------------------------------------------------------------
.\" MTO address description [after]
.\"
@@ -428,6 +441,7 @@ www functionality. It should work with any macro set.
. \}
. \}
..
+.
.\" --------------------------------------------------------------------
.\" TAG name
.\"
@@ -436,6 +450,7 @@ www functionality. It should work with any macro set.
.de TAG
. HTML <a name="\\$1"></a>
..
+.
.\" --------------------------------------------------------------------
.\" IMG [-R|-L|-C] filename [width] [height]
.\"
@@ -467,6 +482,7 @@ www functionality. It should work with any macro set.
. el \
. nop \[la]\f[C]\\$1\f[]\[ra]
..
+.
.\" --------------------------------------------------------------------
.\" PIMG [-R|-L|-C] filename [width] [height]
.\"
@@ -577,7 +593,7 @@ www functionality. It should work with any macro set.
.\" N1 - name of number register 1=absolute 0=percentage
.\" N2 - number register name for absolute value
.\" S1 - string register name for percentage value
-.
+.\"
.de www-handle-percent
. ds www-percent \\$1\"
. substring www-percent -1 -1
@@ -612,7 +628,6 @@ www functionality. It should work with any macro set.
.\" activating unsafe mode, if not used with -Thtml; the PNG image
.\" is then converted to the EPS format using netpbm utilities.
.\"
-.
.nr www-htmlimage-gap 0
.
.de MPIMG
@@ -751,6 +766,7 @@ www functionality. It should work with any macro set.
. \}
. \}
..
+.
.\" --------------------------------------------------------------------
.\" HnS n
.\"
@@ -779,6 +795,7 @@ www functionality. It should work with any macro set.
. www-error "HnE found without a corresponding HnS"
. DEVTAG-EO-H
..
+.
.\" --------------------------------------------------------------------
.\" LK
.\"
@@ -788,6 +805,7 @@ www functionality. It should work with any macro set.
.de LK
. DEVTAG ".links"
..
+.
.\" --------------------------------------------------------------------
.\" HR
.\"
@@ -796,6 +814,7 @@ www functionality. It should work with any macro set.
.de HR
. HTML</p> "<hr>"
..
+.
.\" --------------------------------------------------------------------
.\" NHR
.\"
@@ -805,6 +824,7 @@ www functionality. It should work with any macro set.
.de NHR
. DEVTAG ".no-auto-rule"
..
+.
.\"
.\" www-end-nowhere - end of input trap called to finish diversion.
.\"
@@ -813,6 +833,7 @@ www functionality. It should work with any macro set.
. di
. DEVTAG-EO-TL
..
+.
.\" --------------------------------------------------------------------
.\" HTL
.\"
@@ -906,6 +927,7 @@ www functionality. It should work with any macro set.
. if (\\n[www-ol-level] > 3) \
. www-error "OLS: too many levels of indentation (\\n[www-ol-level])"
..
+.
.\"
.\" Auxiliary macro for OLE.
.\"
@@ -929,6 +951,7 @@ www functionality. It should work with any macro set.
. nr www-li-indent +\w'\\*[www-ul-level\\n[www-ul-level]]'u
. \}
..
+.
.\" --------------------------------------------------------------------
.\" ULE
.\"
@@ -944,6 +967,7 @@ www functionality. It should work with any macro set.
. www-pop-ul-level
. www-pop-li
..
+.
.\" --------------------------------------------------------------------
.\" OLS
.\"
@@ -957,6 +981,7 @@ www functionality. It should work with any macro set.
. el \
. nr www-li-indent +\w'\\*[www-ol-tmp]'u
..
+.
.\" --------------------------------------------------------------------
.\" OLE
.\"
@@ -973,6 +998,7 @@ www functionality. It should work with any macro set.
. www-pop-ol-level
. www-pop-li
..
+.
.\" --------------------------------------------------------------------
.\"
.\" DLS
@@ -988,6 +1014,7 @@ www functionality. It should work with any macro set.
. in \\n[www-li-indent]u
. \}
..
+.
.\" --------------------------------------------------------------------
.\"
.\" DLE
@@ -1003,6 +1030,7 @@ www functionality. It should work with any macro set.
. nr www-dl-level -1
. www-pop-li
..
+.
.\" --------------------------------------------------------------------
.\" LI
.\"
@@ -1021,6 +1049,7 @@ www functionality. It should work with any macro set.
. nop \\*[www-ul-level\\n[www-ul-level]]\c
. \}
..
+.
.\" ********
.\" www-li-ol - numbered list item
.\"
@@ -1034,6 +1063,7 @@ www functionality. It should work with any macro set.
. nop \\n+[www-ol-ctr\\n[www-ol-level]]\ \ \c
. \}
..
+.
.\" ********
.\" www-li-dl - definition list item
.\"
@@ -1050,6 +1080,7 @@ www functionality. It should work with any macro set.
. br
. \}
..
+.
.\" --------------------------------------------------------------------
.\" DC l text [color]
.\"
@@ -1064,7 +1095,7 @@ www functionality. It should work with any macro set.
. ds www-dropcolor black
. if !'\\$3'' \
. ds www-dropcolor \\$3
-. ie '\*(.T'html' \{\
+. ie '\*[.T]'html' \{\
. www-make-unique-name
. nr www-drop-width (100u * \\n[.v]u * 3u / \\n[.l]u)
. MPIMG -L \\*[www-unique-name].png "\\n[www-drop-width]%"
@@ -1100,6 +1131,7 @@ www functionality. It should work with any macro set.
. \}
. nop \\$2
..
+.
.\" --------------------------------------------------------------------
.\" Setup around HTML-IMAGE and friends
.\"
@@ -1109,6 +1141,7 @@ www functionality. It should work with any macro set.
.do if !d TE .do ds TE HTML-IMAGE-END
.do if !d EQ .do ds EQ HTML-IMAGE
.do if !d EN .do ds EN HTML-IMAGE-END
+.
.\"
.\" supplementary macros used by other macro sets
.\"
@@ -1125,6 +1158,7 @@ www functionality. It should work with any macro set.
. if \\n[www-html] \
. nop \O[5\\$2\\$1.png]\O[0]\O[3]
..
+.
.\" --------------------------------------------------------------------
.\" HTML-IMAGE-END - terminates an image for html
.\"
@@ -1145,6 +1179,7 @@ www functionality. It should work with any macro set.
. nr www-png-no +1
. ds www-unique-name \\*[www-image-template]\\n[www-png-no]
..
+.
.\" --------------------------------------------------------------------
.\" HTML-IMAGE and friends tell grohtml that this region of text needs
.\" to be rendered as an image.
@@ -1180,6 +1215,7 @@ www functionality. It should work with any macro set.
.de JOBNAME
. DEVTAG .job-name \\$1
..
+.
.\" --------------------------------------------------------------------
.\" HEAD
.\"
@@ -1189,103 +1225,115 @@ www functionality. It should work with any macro set.
.de HEAD
. DEVTAG .head "\\$*"
..
-.\" --------------------------------------------------------------------
-.\" Final Setup
-.\" --------------------------------------------------------------------
-.
-.if \n[www-html] \{\
-. nh
-. nr HY 0
-.\}
.
-.\"
+.\" --------------------------------------------------------------------
.\" start of some code
.\"
-.
.de CDS
-.ft C
-.nf
+. ft C
+. nf
..
-.\"
+.
+.\" --------------------------------------------------------------------
.\" end of some code
.\"
-.
.de CDE
-.fi
-.ft P
+. fi
+. ft P
..
.
.ds www-nav-colour "#eeeeee
.nr www-nav-width-left 30
.nr www-nav-width-right 70
.
-.
+.\" --------------------------------------------------------------------
.\" LNS - left navigation start
-.
+.\"
.de LNS
-. HTML</p> "<table><tr><td valign=top width=\\n[www-nav-width-left]% bgcolor=""\\*[www-nav-colour]"">"
-. LK
-. HTML</p> "</td><td valign=top width=\\n[www-nav-width-right]%>"
-. nr SH-open 1
+. HTML</p> "<table><tr><td valign=top \
+ width=\\n[www-nav-width-left]% \
+ bgcolor=""\\*[www-nav-colour]"">"
+. LK
+. HTML</p> "</td><td valign=top width=\\n[www-nav-width-right]%>"
+. nr SH-open 1
..
.
+.\" --------------------------------------------------------------------
.\" LNE - left navigation end
-.
+.\"
.de LNE
-. HTML</p> </td></tr></table>
-. HR
+. HTML</p> </td></tr></table>
+. HR
..
+.
.nr SH-open 0
.nr needs-begin 0
.
-.
+.\"
+.\" some auxiliary macros for left navigation lists
+.\"
.de www-SH
-. if (0\\$1 == 0) \{\
-. if (\\n[SH-open] == 1) .LNE
-. nr needs-begin 1
-. @SH-old
-. \}
+. if (0\\$1 == 0) \{\
+. if (\\n[SH-open] == 1) \
+. LNE
+. nr needs-begin 1
+. @SH-old
+. \}
..
.
.de www-NH
-. if (0\\$1 <= 1) \{\
-. if (\\n[SH-open] == 1) .LNE
-. nr needs-begin 1
-. @NH-old
-. \}
+. if (0\\$1 <= 1) \{\
+. if (\\n[SH-open] == 1) \
+. LNE
+. nr needs-begin 1
+. @NH-old
+. \}
..
.
.de www-LP
-. @LP-old
-. if (\\n[needs-begin] == 1) \{\
-. HR
-. LNS
-. \}
-. nr needs-begin 0
+. @LP-old
+. if (\\n[needs-begin] == 1) \{\
+. HR
+. LNS
+. \}
+. nr needs-begin 0
..
.
-.\" ALN [colour] [left width percentage]
-.\" turns on automatic left navigation, this macro should only be
-.\" called once (normally at the start of the document) as it
-.\" indicates the all top level section headings will form a
-.\" navigation list on the left of the main text.
-.
+.\" --------------------------------------------------------------------
+.\" ALN [colour] [left width percentage]
+.\"
+.\" Turn on automatic left navigation. This macro should only be
+.\" called once (normally at the start of the document) as it
+.\" indicates that all top-level section headings form a navigation
+.\" list on the left of the main text.
+.\"
.de ALN
-. if '\*(.T'html' \{\
-. if !'\\$1'' .ds www-nav-colour \\$1
-. if (0\\$2 > 0) \{\
-. nr www-nav-width-left \\$2
-. nr www-nav-width-right (100-\\$2)
-. \}
-. rn @SH @SH-old
-. rn www-SH @SH
-. rn @NH @NH-old
-. rn www-NH @NH
-. rn @LP @LP-old
-. rn www-LP @LP
-. \}
+. if '\*[.T]'html' \{\
+. if !'\\$1'' \
+. ds www-nav-colour \\$1
+. if (0\\$2 > 0) \{\
+. nr www-nav-width-left \\$2
+. nr www-nav-width-right (100 - \\$2)
+. \}
+. rn @SH @SH-old
+. rn www-SH @SH
+. rn @NH @NH-old
+. rn www-NH @NH
+. rn @LP @LP-old
+. rn www-LP @LP
+. \}
..
.
+.
+.\" --------------------------------------------------------------------
+.\" Final Setup
+.\" --------------------------------------------------------------------
+.
+.if \n[www-html] \{\
+. nh
+. nr HY 0
+.\}
+.
.if r ps4html .nop \O[0]
.cp \n(_C
.