debian/0000755000000000000000000000000012254672373007201 5ustar debian/control0000644000000000000000000000543012254667522010606 0ustar Source: xgks Section: utils Priority: extra Maintainer: Alastair McKinstry Build-Depends: debhelper (>= 9), gfortran, libx11-dev, m4 Standards-Version: 3.9.5 Homepage: http://xgks.sourceforge.net Package: libxgks2 Section: libs Architecture: any Pre-Depends: ${misc:Pre-Depends} Replaces: libxgks2 Multi-Arch: same Depends: ${misc:Depends}, ${shlibs:Depends}, libxgks2-data Description: X11 Graphical Kernel Subsystem, library. XGKS is a level 2C implementation of the ANSI Graphical Kernel System (GKS) for use in a Unix environment with the X Window System. It supports the Fortran language binding and a C language binding based on the 1988 draft. . GKS is a basic graphics system for applications that produce computer generated two-dimensional pictures on line graphics or raster graphics output devices. It supports operator input and interaction by supplying basic functions for graphical input and picture segmentation and allows storage and dynamic modification of pictures. GKS is no longer under active development, but used in several existing graphical toolkits. . It is not expected that XGKS will gather any _new_ users, but factoring it out simplifies the size and maintenance of some other packages. Package: libxgks-dev Section: libdevel Architecture: any Depends: libxgks2 ( = ${binary:Version}), ${misc:Depends}, ${shlibs:Depends} Recommends: pkg-config Description: X11 Graphical Kernel Subsystem, development files XGKS is a level 2C implementation of the ANSI Graphical Kernel System (GKS) for use in a Unix environment with the X Window System. It supports the Fortran language binding and a C language binding based on the 1988 draft. . GKS is a basic graphics system for applications that produce computer generated two-dimensional pictures on line graphics or raster graphics output devices. It supports operator input and interaction by supplying basic functions for graphical input and picture segmentation and allows storage and dynamic modification of pictures. GKS is no longer under active development, but used in several existing graphical toolkits. . It is not expected that XGKS will gather any _new_ users, but factoring it out simplifies the size and maintenance of some other packages. Package: libxgks2-data Architecture: all Multi-Arch: foreign Pre-Depends: ${misc:Pre-Depends} Depends: ${misc:Depends} Recommends: libxgks2 (= ${binary:Version}) Breaks: libxgks2 (<= 2.6.1+dfsg.1-1) Description: Font files for the X11 Graphical Kernel Subsystem XGKS is a level 2C implementation of the ANSI Graphical Kernel System (GKS) for use in a Unix environment with the X Window System. It supports the Fortran language binding and a C language binding based on the 1988 draft. . This package contains fonts needed for libxgks2. debian/libxgks-dev.examples0000644000000000000000000000011411607062073013143 0ustar debian/tmp/usr/bin/gksdemo debian/tmp/usr/bin/hanoi debian/tmp/usr/bin/star debian/libxgks2-data.install0000644000000000000000000000002412146377625013223 0ustar usr/lib/xgksfonts/* debian/source/0000755000000000000000000000000011607062073010470 5ustar debian/source/format0000644000000000000000000000001411607062073011676 0ustar 3.0 (quilt) debian/libxgks2.shlibs0000644000000000000000000000005011607062073012116 0ustar libxgks 2 libxgks2 libudport 2 libxgks2 debian/patches/0000755000000000000000000000000012165742433010624 5ustar debian/patches/linux_no_underscore.patch0000644000000000000000000000127712165740737015745 0ustar Author: Alastair McKinstry Description: For Fortran symbols, add one, not two, underscores. Last-Updated: 2010-07-02 Forwarded: no Index: xgks-2.6/src/port/fortc/linux.m4 =================================================================== --- xgks-2.6.orig/src/port/fortc/linux.m4 2010-07-02 22:17:06.000000000 +0100 +++ xgks-2.6/src/port/fortc/linux.m4 2010-07-02 22:17:15.000000000 +0100 @@ -5,7 +5,7 @@ # transformation from fortran name to name of C module. Append an extra # underscore if the name contains an underscore. -define(`NAMEF',`ifelse(index($1,_),-1,$1_,$1__)') +define(`NAMEF',`ifelse(index($1,_),-1,$1_,$1_)') define(`REALX',`') define(`INTEGERX',`') debian/patches/libcheck.patch0000644000000000000000000000126412165740737013421 0ustar Author: Alastair McKinstry Description: Check the correct FHS directories for X11 libraries Last-Updated: 2010-06-25 Forwarded: no Index: xgks-2.6/src/port/acsite.m4 =================================================================== --- xgks-2.6.orig/src/port/acsite.m4 2010-06-25 01:04:46.000000000 +0100 +++ xgks-2.6/src/port/acsite.m4 2010-06-25 01:05:57.000000000 +0100 @@ -1904,8 +1904,7 @@ [dnl UC_CHECK_LIB(LD_X11, XNoOp(0), - ${OPENWINHOME-/usr/openwin}/lib dnl - /usr/lib/X11 /usr/X11/lib /usr/lib/X11R5 dnl + /usr/lib /usr/lib/X11 /usr/X11/lib /usr/lib/X11R6 dnl /usr/local/lib /usr/local/lib/X11 /usr/local/lib/X11R5, X11, X11, debian/patches/configure.patch0000644000000000000000000000363612165742433013636 0ustar Author: Alastair McKinstry Description: Updated acsite.m4 with modern definitions needed Last-Updated: 2010-06-25 Forwarded: no Index: xgks-2.6.1+dfsg.2/src/port/acsite.m4 =================================================================== --- xgks-2.6.1+dfsg.2.orig/src/port/acsite.m4 2013-07-06 08:17:26.000000000 +0100 +++ xgks-2.6.1+dfsg.2/src/port/acsite.m4 2013-07-06 08:19:37.000000000 +0100 @@ -110,6 +110,35 @@ AC_MSG_RESULT($MAKEWHATIS_CMD) ]) +dnl The following need to be defined for modern autoconf's not to fail +dnl +AC_DEFINE([OS_MAJOR],[],[Operating System major version]) +AC_DEFINE([OS_NAME],[],[Operating System]) +AC_DEFINE([UD_NO_],[],[Not used]) +AC_DEFINE([UD_NO_ATEXIT_DECL], [], [Description]) +AC_DEFINE([UD_NO_CONST], [], [Description]) +AC_DEFINE([UD_NO_DIFFTIME_DECL], [], [Description]) +AC_DEFINE([UD_NO_GETENV_DECL], [], [Description]) +AC_DEFINE([UD_NO_HASH], [], [Description]) +AC_DEFINE([UD_NO_HASHHASH], [], [Description]) +AC_DEFINE([UD_NO_MEMMOVE_DECL], [], [Description]) +AC_DEFINE([UD_NO_PROTOTYPES], [], [Description]) +AC_DEFINE([UD_NO_SIGACTION_DECL], [], [Description]) +AC_DEFINE([UD_NO_SIGNED], [], [Description]) +AC_DEFINE([UD_NO_STDARG], [], [Description]) +AC_DEFINE([UD_NO_STRCHR_DECL], [], [Description]) +AC_DEFINE([UD_NO_STRCPY_DECL], [], [Description]) +AC_DEFINE([UD_NO_STRERROR_DECL], [], [Description]) +AC_DEFINE([UD_NO_STRFTIME_DECL], [], [Description]) +AC_DEFINE([UD_NO_STRNCPY_DECL], [], [Description]) +AC_DEFINE([UD_NO_STRRCHR_DECL], [], [Description]) +AC_DEFINE([UD_NO_STRSTR_DECL], [], [Description]) +AC_DEFINE([UD_NO_STRTOK_DECL], [], [Description]) +AC_DEFINE([UD_NO_VOIDSTAR], [], [Description]) +AC_DEFINE([UD_NO_VOLATILE], [], [Description]) +AC_DEFINE([UD_SYSTEM_], [], [Description]) +AC_DEFINE([_ALL_SOURCE], [], [Description]) +AC_DEFINE([_HPUX_SOURCE], [], [Description]) dnl Initialize this Unidata autoconf(1)-support module. dnl debian/patches/series0000644000000000000000000000023412165742411012034 0ustar configure.patch config.patch linux_no_underscore.patch xcolours.patch shared_lib.patch destdir.patch pmel.patch hurd.patch gnukfreebsd.patch manpages.patch debian/patches/gerhnd.patch0000644000000000000000000000105012165740737013115 0ustar Author: Alastair McKinstry Description: Build fix for gerhnd.fc Last-Updated: 2010-07-02 Forwarded: no Index: xgks-2.6.orig/src/lib/c/gerhnd.fc =================================================================== --- xgks-2.6.orig.orig/src/lib/c/gerhnd.fc 2010-07-02 17:58:16.000000000 +0100 +++ xgks-2.6.orig/src/lib/c/gerhnd.fc 2010-07-02 17:58:25.000000000 +0100 @@ -41,7 +41,7 @@ #include "xgks.h" #include "../fortran/fortxgks.h" -FILE *errfp = stderr; /* error file */ +FILE *errfp = NULL; /* error file */ /* debian/patches/gnukfreebsd.patch0000644000000000000000000000353112165740737014153 0ustar Author: Alastair McKinstry Description: Configuration file for fortc on 'Gnukfreebsd' Operating Systems (kfreebsd) Last-Updated: 2011-07-12 Forwarded: no Index: xgks-2.6.1/src/port/fortc/gnukfreebsd.m4 =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 +++ xgks-2.6.1/src/port/fortc/gnukfreebsd.m4 2011-07-12 15:34:52.000000000 +0100 @@ -0,0 +1,49 @@ +divert(-1) + +# Name of system platform (for use in comments) +define(`M4__SYSTEM', kfreebsd) + +# transformation from fortran name to name of C module. Append an extra +# underscore if the name contains an underscore. (Don't, on Hurd) +define(`NAMEF',`ifelse(index($1,_),-1,$1_,$1_)') + +define(`REALX',`') +define(`INTEGERX',`') +define(`FUNCTIONX',`') +define(`DOUBLEX',`') + +# transformation from string name to corresponding argument name +define(`STRINGF',`$1') + +# extra arguments, if any, for string length +define(`STRINGX',`, $1_len') # one extra stringlen parameter + +# declaration to be used for argument name descriptor +define(`STRINGD',` + char *$1; `$2' + int $1`'`_len';') # declare argument string with extra stringlen parameter + +define(`STRINGP',` + char *$1') +define(`STRINGPX',`, + int $1_len') + +# declarations and initializations of canonical local variables +define(`STRINGL',`') + +# FORTRAN declaration for a long integer (e.g. integer*4 for Microsoft) +define(`LONG_INT',`integer') + +# FORTRAN declaration for a short integer (e.g. integer*2) +define(`SHORT_INT',`integer*2') + +# FORTRAN declaration for an integer byte (e.g. integer*1 or byte) +define(`BYTE_INT',`byte') + +# FORTRAN declaration for single precision +define(`SINGLE_PRECISION',`real') + +# FORTRAN declaration for double precision (e.g. real for a Cray) +define(`DOUBLE_PRECISION',`real*8') + +divert(0)dnl debian/patches/config.patch0000644000000000000000000127507112165740737013134 0ustar Index: xgks-2.6.orig/src/port/acsite.m4 =================================================================== --- xgks-2.6.orig.orig/src/port/acsite.m4 2010-07-02 18:00:17.000000000 +0100 +++ xgks-2.6.orig/src/port/acsite.m4 2010-07-02 18:00:36.000000000 +0100 @@ -1575,28 +1575,6 @@ ]) -dnl Check for ncdump(1) -dnl -AC_DEFUN([UC_PROG_NCDUMP], [dnl -AC_PROGRAMS_CHECK(NCDUMP, ncdump [UC_ABSPATH($exec_prefix)]/bin/ncdump)dnl -if test -z "$NCDUMP"; then - UC_NEED_VALUE(NCDUMP, [netCDF lister], /usr/local/unidata/bin/ncdump)dnl -fi -AC_SUBST(NCDUMP) -]) - - -dnl Check for ncgen(1) -dnl -AC_DEFUN([UC_PROG_NCGEN], [dnl -AC_PROGRAMS_CHECK(NCGEN, ncgen [UC_ABSPATH($exec_prefix)]/bin/ncgen)dnl -if test -z "$NCGEN"; then - UC_NEED_VALUE(NCGEN, [netCDF generator], /usr/local/unidata/bin/ncgen)dnl -fi -AC_SUBST(NCGEN) -]) - - dnl Test a script. dnl AC_DEFUN([UC_TEST_SCRIPT], [dnl @@ -1725,34 +1703,6 @@ AC_SUBST($1)dnl ]) - -dnl Check for McIDAS header-file directory. -dnl -AC_DEFUN([UC_CPP_MCIDAS], [dnl -AC_MSG_CHECKING(for McIDAS header-files) -UC_TEST_DIR(CPP_MCIDAS, ~mcidas/include ~mcidas/src /usr/mcidas/include /usr/mcidas/src /usr/local/mcidas/include /usr/local/mcidas/src /usr/mcidas/src /home/mcidas/src /home/mcidasd/src, hex80.inc, - McIDAS headers, -I/home/mcidas/src)dnl -CPP_MCIDAS=`case ${CPP_MCIDAS} in - -I*) - echo ${CPP_MCIDAS};; - *) - echo -I${CPP_MCIDAS-};; - esac` -AC_MSG_RESULT($CPP_MCIDAS) -]) - - -dnl Check for McIDAS library. -dnl -AC_DEFUN([UC_LIB_MCIDAS], [dnl -AC_REQUIRE([UC_USLEEP])dnl -AC_MSG_CHECKING(for McIDAS library) -UC_TEST_LIB(LD_MCIDAS, ~mcidas/lib /usr/mcidas/lib /usr/local/mcidas/lib /home/mcidas/lib /home/mcidasd/lib, mcidas, McIDAS, dnl - -L/home/mcidas/lib -lmcidas)dnl -AC_MSG_RESULT($LD_MCIDAS) -]) - - dnl Check for X11 header-file directory. dnl AC_DEFUN([UC_CPP_X11], [dnl Index: xgks-2.6.orig/src/configure.in =================================================================== --- xgks-2.6.orig.orig/src/configure.in 2010-07-02 18:07:45.000000000 +0100 +++ xgks-2.6.orig/src/configure.in 2010-07-02 18:09:05.000000000 +0100 @@ -37,12 +37,12 @@ port/Makefile \ port/master.mk \ port/fortc/Makefile \ - src/Makefile \ - src/lib/Makefile \ - src/lib/cgm/Makefile \ - src/lib/gksm/Makefile \ - src/lib/x/Makefile \ - src/fortran/Makefile \ + lib/Makefile \ + lib/Makefile \ + lib/c/cgm/Makefile \ + lib/c/gksm/Makefile \ + lib/c/x/Makefile \ + lib/fortran/Makefile \ fontdb/Makefile \ doc/binding/Makefile \ doc/userdoc/Makefile \ Index: xgks-2.6.orig/src/configure =================================================================== --- xgks-2.6.orig.orig/src/configure 2010-07-02 13:06:05.000000000 +0100 +++ xgks-2.6.orig/src/configure 2010-07-02 18:10:02.000000000 +0100 @@ -1,26 +1,723 @@ #! /bin/sh - # Guess values for system-dependent variables and create Makefiles. -# Generated automatically using autoconf version 2.13 -# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. +# Generated by GNU Autoconf 2.65 for xgks 2.6. +# +# +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, +# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. +## -------------------- ## +## M4sh Initialization. ## +## -------------------- ## + +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac +fi + + +as_nl=' +' +export as_nl +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' + else + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in #( + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' + fi + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } +fi + + +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +case $0 in #(( + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + exit 1 +fi + +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +if test "x$CONFIG_SHELL" = x; then + as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which + # is contrary to our usage. Disable this feature. + alias -g '\${1+\"\$@\"}'='\"\$@\"' + setopt NO_GLOB_SUBST +else + case \`(set -o) 2>/dev/null\` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac +fi +" + as_required="as_fn_return () { (exit \$1); } +as_fn_success () { as_fn_return 0; } +as_fn_failure () { as_fn_return 1; } +as_fn_ret_success () { return 0; } +as_fn_ret_failure () { return 1; } + +exitcode=0 +as_fn_success || { exitcode=1; echo as_fn_success failed.; } +as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } +as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } +as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } +if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : + +else + exitcode=1; echo positional parameters were not saved. +fi +test x\$exitcode = x0 || exit 1" + as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO + as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO + eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && + test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 +test \$(( 1 + 1 )) = 2 || exit 1" + if (eval "$as_required") 2>/dev/null; then : + as_have_required=yes +else + as_have_required=no +fi + if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : + +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_found=false +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + as_found=: + case $as_dir in #( + /*) + for as_base in sh bash ksh sh5; do + # Try only shells that exist, to save several forks. + as_shell=$as_dir/$as_base + if { test -f "$as_shell" || test -f "$as_shell.exe"; } && + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : + CONFIG_SHELL=$as_shell as_have_required=yes + if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : + break 2 +fi +fi + done;; + esac + as_found=false +done +$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : + CONFIG_SHELL=$SHELL as_have_required=yes +fi; } +IFS=$as_save_IFS + + + if test "x$CONFIG_SHELL" != x; then : + # We cannot yet assume a decent shell, so we have to provide a + # neutralization value for shells without unset; and this also + # works around shells that cannot unset nonexistent variables. + BASH_ENV=/dev/null + ENV=/dev/null + (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} +fi + + if test x$as_have_required = xno; then : + $as_echo "$0: This script requires a shell more modern than all" + $as_echo "$0: the shells that I found on your system." + if test x${ZSH_VERSION+set} = xset ; then + $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" + $as_echo "$0: be upgraded to zsh 4.3.4 or later." + else + $as_echo "$0: Please tell bug-autoconf@gnu.org about your system, +$0: including any error possibly output before this +$0: message. Then install a modern shell, or manually run +$0: the script under such a shell if you do have one." + fi + exit 1 +fi +fi +fi +SHELL=${CONFIG_SHELL-/bin/sh} +export SHELL +# Unset more variables known to interfere with behavior of common tools. +CLICOLOR_FORCE= GREP_OPTIONS= +unset CLICOLOR_FORCE GREP_OPTIONS + +## --------------------- ## +## M4sh Shell Functions. ## +## --------------------- ## +# as_fn_unset VAR +# --------------- +# Portably unset VAR. +as_fn_unset () +{ + { eval $1=; unset $1;} +} +as_unset=as_fn_unset + +# as_fn_set_status STATUS +# ----------------------- +# Set $? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} # as_fn_set_status + +# as_fn_exit STATUS +# ----------------- +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} # as_fn_exit + +# as_fn_mkdir_p +# ------------- +# Create "$as_dir" as a directory, including parents if necessary. +as_fn_mkdir_p () +{ + + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || eval $as_mkdir_p || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" + + +} # as_fn_mkdir_p +# as_fn_append VAR VALUE +# ---------------------- +# Append the text in VALUE to the end of the definition contained in VAR. Take +# advantage of any shell optimizations that allow amortized linear growth over +# repeated appends, instead of the typical quadratic growth present in naive +# implementations. +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : + eval 'as_fn_append () + { + eval $1+=\$2 + }' +else + as_fn_append () + { + eval $1=\$$1\$2 + } +fi # as_fn_append + +# as_fn_arith ARG... +# ------------------ +# Perform arithmetic evaluation on the ARGs, and store the result in the +# global $as_val. Take advantage of shells that can avoid forks. The arguments +# must be portable across $(()) and expr. +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : + eval 'as_fn_arith () + { + as_val=$(( $* )) + }' +else + as_fn_arith () + { + as_val=`expr "$@" || test $? -eq 1` + } +fi # as_fn_arith + + +# as_fn_error ERROR [LINENO LOG_FD] +# --------------------------------- +# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are +# provided, also output the error to LOG_FD, referencing LINENO. Then exit the +# script with status $?, using 1 if that was 0. +as_fn_error () +{ + as_status=$?; test $as_status -eq 0 && as_status=1 + if test "$3"; then + as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 + fi + $as_echo "$as_me: error: $1" >&2 + as_fn_exit $as_status +} # as_fn_error + +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + + + as_lineno_1=$LINENO as_lineno_1a=$LINENO + as_lineno_2=$LINENO as_lineno_2a=$LINENO + eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && + test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { + # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | + sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno + N + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ + t loop + s/-\n.*// + ' >$as_me.lineno && + chmod +x "$as_me.lineno" || + { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } + + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" + # Exit status is that of the last command. + exit +} + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in #((((( +-n*) + case `echo 'xy\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + xy) ECHO_C='\c';; + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null + ECHO_T=' ';; + esac;; +*) + ECHO_N='-n';; +esac + +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir 2>/dev/null +fi +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -p' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else + as_ln_s='cp -p' + fi +else + as_ln_s='cp -p' +fi +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null + +if mkdir -p . 2>/dev/null; then + as_mkdir_p='mkdir -p "$as_dir"' +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + +if test -x / >/dev/null 2>&1; then + as_test_x='test -x' +else + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L + else + as_ls_L_option= + fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in #( + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' +fi +as_executable_p=$as_test_x + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + + +test -n "$DJDIR" || exec 7<&0 &1 + +# Name of the host. +# hostname on some systems (SVR3.2, Linux) returns a bogus exit status, +# so uname gets run too. +ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` -# Defaults: -ac_help= +# +# Initializations. +# ac_default_prefix=/usr/local -# Any additions from configure.in: +ac_clean_files= +ac_config_libobj_dir=. +LIBOBJS= +cross_compiling=no +subdirs= +MFLAGS= +MAKEFLAGS= + +# Identity of this package. +PACKAGE_NAME='xgks' +PACKAGE_TARNAME='xgks' +PACKAGE_VERSION='2.6' +PACKAGE_STRING='xgks 2.6' +PACKAGE_BUGREPORT='' +PACKAGE_URL='' + +# Factoring default headers for most tests. +ac_includes_default="\ +#include +#ifdef HAVE_SYS_TYPES_H +# include +#endif +#ifdef HAVE_SYS_STAT_H +# include +#endif +#ifdef STDC_HEADERS +# include +# include +#else +# ifdef HAVE_STDLIB_H +# include +# endif +#endif +#ifdef HAVE_STRING_H +# if !defined STDC_HEADERS && defined HAVE_MEMORY_H +# include +# endif +# include +#endif +#ifdef HAVE_STRINGS_H +# include +#endif +#ifdef HAVE_INTTYPES_H +# include +#endif +#ifdef HAVE_STDINT_H +# include +#endif +#ifdef HAVE_UNISTD_H +# include +#endif" + +ac_subst_vars='LTLIBOBJS +MINOR_NO +MAJOR_NO +VERSION +FTPDIR +LD_X11 +CPP_X11 +UD_NO_STRFTIME_DECL +UD_NO_DIFFTIME_DECL +UD_NO_MEMMOVE_DECL +UD_NO_STRSTR_DECL +UD_NO_STRTOK_DECL +UD_NO_STRNCPY_DECL +UD_NO_STRRCHR_DECL +UD_NO_STRCPY_DECL +UD_NO_STRCHR_DECL +UD_NO_STRERROR_DECL +UD_NO_GETENV_DECL +UD_NO_ATEXIT_DECL +UD_NO_SIGACTION_DECL +LIBOBJS +FORTC +EGREP +GREP +TROFF +TBL +NEQN +LD_FORTRAN +FC +FFLAGS +LD_UDPORT +PORT_CPP_LDM +PORT_HEADERS +LIBOBJS +FTPBINDIR +RANLIB +TARFLAGS +AR +UD_NO_VOIDSTAR +UD_NO_HASHHASH +UD_NO_HASH +UD_NO_PROTOTYPES +UD_NO_SIGNED +UD_NO_VOLATILE +UD_NO_CONST +CPP +OBJEXT +EXEEXT +ac_ct_CC +LDFLAGS +CFLAGS +CC_MAKEDEPEND +OPSYS +CPPFLAGS +CC +MAKEWHATIS_CMD +WHATIS +prog +PORT_INSTALL +PORT_DISTCLEAN +PORT_CLEAN +PORT_ALL +PORT_MANIFEST +PORT_SUBDIRS +CONFIG_FILES +target_alias +host_alias +build_alias +LIBS +ECHO_T +ECHO_N +ECHO_C +DEFS +mandir +localedir +libdir +psdir +pdfdir +dvidir +htmldir +infodir +docdir +oldincludedir +includedir +localstatedir +sharedstatedir +sysconfdir +datadir +datarootdir +libexecdir +sbindir +bindir +program_transform_name +prefix +exec_prefix +PACKAGE_URL +PACKAGE_BUGREPORT +PACKAGE_STRING +PACKAGE_VERSION +PACKAGE_TARNAME +PACKAGE_NAME +PATH_SEPARATOR +SHELL' +ac_subst_files='' +ac_user_opts=' +enable_option_checking +' + ac_precious_vars='build_alias +host_alias +target_alias +CC +CFLAGS +LDFLAGS +LIBS +CPPFLAGS +CPP' + # Initialize some variables set by options. +ac_init_help= +ac_init_version=false +ac_unrecognized_opts= +ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. -build=NONE -cache_file=./config.cache +cache_file=/dev/null exec_prefix=NONE -host=NONE no_create= -nonopt=NONE no_recursion= prefix=NONE program_prefix=NONE @@ -29,94 +726,131 @@ silent= site= srcdir= -target=NONE verbose= x_includes=NONE x_libraries=NONE + +# Installation directory options. +# These are left unexpanded so users can "make install exec_prefix=/foo" +# and all the variables that are supposed to be based on exec_prefix +# by default will actually change. +# Use braces instead of parens because sh, perl, etc. also accept them. +# (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' -datadir='${prefix}/share' +datarootdir='${prefix}/share' +datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' -libdir='${exec_prefix}/lib' includedir='${prefix}/include' oldincludedir='/usr/include' -infodir='${prefix}/info' -mandir='${prefix}/man' - -# Initialize some other variables. -subdirs= -MFLAGS= MAKEFLAGS= -SHELL=${CONFIG_SHELL-/bin/sh} -# Maximum number of lines to put in a shell here document. -ac_max_here_lines=12 +docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' +infodir='${datarootdir}/info' +htmldir='${docdir}' +dvidir='${docdir}' +pdfdir='${docdir}' +psdir='${docdir}' +libdir='${exec_prefix}/lib' +localedir='${datarootdir}/locale' +mandir='${datarootdir}/man' ac_prev= +ac_dashdash= for ac_option do - # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then - eval "$ac_prev=\$ac_option" + eval $ac_prev=\$ac_option ac_prev= continue fi - case "$ac_option" in - -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; - *) ac_optarg= ;; + case $ac_option in + *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; + *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. - case "$ac_option" in + case $ac_dashdash$ac_option in + --) + ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) - bindir="$ac_optarg" ;; + bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) - ac_prev=build ;; + ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) - build="$ac_optarg" ;; + build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) - cache_file="$ac_optarg" ;; + cache_file=$ac_optarg ;; + + --config-cache | -C) + cache_file=config.cache ;; - -datadir | --datadir | --datadi | --datad | --data | --dat | --da) + -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; - -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ - | --da=*) - datadir="$ac_optarg" ;; + -datadir=* | --datadir=* | --datadi=* | --datad=*) + datadir=$ac_optarg ;; + + -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ + | --dataroo | --dataro | --datar) + ac_prev=datarootdir ;; + -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ + | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) + datarootdir=$ac_optarg ;; -disable-* | --disable-*) - ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` + ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. - if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then - { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } - fi - ac_feature=`echo $ac_feature| sed 's/-/_/g'` - eval "enable_${ac_feature}=no" ;; + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error "invalid feature name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"enable_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval enable_$ac_useropt=no ;; + + -docdir | --docdir | --docdi | --doc | --do) + ac_prev=docdir ;; + -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) + docdir=$ac_optarg ;; + + -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) + ac_prev=dvidir ;; + -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) + dvidir=$ac_optarg ;; -enable-* | --enable-*) - ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` + ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. - if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then - { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } - fi - ac_feature=`echo $ac_feature| sed 's/-/_/g'` - case "$ac_option" in - *=*) ;; - *) ac_optarg=yes ;; + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error "invalid feature name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"enable_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" + ac_unrecognized_sep=', ';; esac - eval "enable_${ac_feature}='$ac_optarg'" ;; + eval enable_$ac_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ @@ -125,116 +859,77 @@ -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) - exec_prefix="$ac_optarg" ;; + exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; - -help | --help | --hel | --he) - # Omit some internal or obsolete options to make the list less imposing. - # This message is too long to be a string in the A/UX 3.1 sh. - cat << EOF -Usage: configure [options] [host] -Options: [defaults in brackets after descriptions] -Configuration: - --cache-file=FILE cache test results in FILE - --help print this message - --no-create do not create output files - --quiet, --silent do not print \`checking...' messages - --version print the version of autoconf that created configure -Directory and file names: - --prefix=PREFIX install architecture-independent files in PREFIX - [$ac_default_prefix] - --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX - [same as prefix] - --bindir=DIR user executables in DIR [EPREFIX/bin] - --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] - --libexecdir=DIR program executables in DIR [EPREFIX/libexec] - --datadir=DIR read-only architecture-independent data in DIR - [PREFIX/share] - --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] - --sharedstatedir=DIR modifiable architecture-independent data in DIR - [PREFIX/com] - --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] - --libdir=DIR object code libraries in DIR [EPREFIX/lib] - --includedir=DIR C header files in DIR [PREFIX/include] - --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] - --infodir=DIR info documentation in DIR [PREFIX/info] - --mandir=DIR man documentation in DIR [PREFIX/man] - --srcdir=DIR find the sources in DIR [configure dir or ..] - --program-prefix=PREFIX prepend PREFIX to installed program names - --program-suffix=SUFFIX append SUFFIX to installed program names - --program-transform-name=PROGRAM - run sed PROGRAM on installed program names -EOF - cat << EOF -Host type: - --build=BUILD configure for building on BUILD [BUILD=HOST] - --host=HOST configure for HOST [guessed] - --target=TARGET configure for TARGET [TARGET=HOST] -Features and packages: - --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) - --enable-FEATURE[=ARG] include FEATURE [ARG=yes] - --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] - --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) - --x-includes=DIR X include files are in DIR - --x-libraries=DIR X library files are in DIR -EOF - if test -n "$ac_help"; then - echo "--enable and --with options recognized:$ac_help" - fi - exit 0 ;; + -help | --help | --hel | --he | -h) + ac_init_help=long ;; + -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) + ac_init_help=recursive ;; + -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) + ac_init_help=short ;; -host | --host | --hos | --ho) - ac_prev=host ;; + ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) - host="$ac_optarg" ;; + host_alias=$ac_optarg ;; + + -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) + ac_prev=htmldir ;; + -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ + | --ht=*) + htmldir=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) - includedir="$ac_optarg" ;; + includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) - infodir="$ac_optarg" ;; + infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) - libdir="$ac_optarg" ;; + libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) - libexecdir="$ac_optarg" ;; + libexecdir=$ac_optarg ;; + + -localedir | --localedir | --localedi | --localed | --locale) + ac_prev=localedir ;; + -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) + localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ - | --localstate | --localstat | --localsta | --localst \ - | --locals | --local | --loca | --loc | --lo) + | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ - | --localstate=* | --localstat=* | --localsta=* | --localst=* \ - | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) - localstatedir="$ac_optarg" ;; + | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) + localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) - mandir="$ac_optarg" ;; + mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c) + | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ @@ -248,26 +943,26 @@ -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) - oldincludedir="$ac_optarg" ;; + oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) - prefix="$ac_optarg" ;; + prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) - program_prefix="$ac_optarg" ;; + program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) - program_suffix="$ac_optarg" ;; + program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ @@ -284,7 +979,17 @@ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) - program_transform_name="$ac_optarg" ;; + program_transform_name=$ac_optarg ;; + + -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) + ac_prev=pdfdir ;; + -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) + pdfdir=$ac_optarg ;; + + -psdir | --psdir | --psdi | --psd | --ps) + ac_prev=psdir ;; + -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) + psdir=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) @@ -294,7 +999,7 @@ ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) - sbindir="$ac_optarg" ;; + sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ @@ -305,58 +1010,67 @@ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) - sharedstatedir="$ac_optarg" ;; + sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) - site="$ac_optarg" ;; + site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) - srcdir="$ac_optarg" ;; + srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) - sysconfdir="$ac_optarg" ;; + sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) - ac_prev=target ;; + ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) - target="$ac_optarg" ;; + target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; - -version | --version | --versio | --versi | --vers) - echo "configure generated by autoconf version 2.13" - exit 0 ;; + -version | --version | --versio | --versi | --vers | -V) + ac_init_version=: ;; -with-* | --with-*) - ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` + ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. - if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then - { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } - fi - ac_package=`echo $ac_package| sed 's/-/_/g'` - case "$ac_option" in - *=*) ;; - *) ac_optarg=yes ;; + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error "invalid package name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"with_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" + ac_unrecognized_sep=', ';; esac - eval "with_${ac_package}='$ac_optarg'" ;; + eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) - ac_package=`echo $ac_option|sed -e 's/-*without-//'` + ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. - if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then - { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } - fi - ac_package=`echo $ac_package| sed 's/-/_/g'` - eval "with_${ac_package}=no" ;; + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error "invalid package name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"with_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval with_$ac_useropt=no ;; --x) # Obsolete; use --with-x. @@ -367,242 +1081,1030 @@ ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) - x_includes="$ac_optarg" ;; + x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) - x_libraries="$ac_optarg" ;; + x_libraries=$ac_optarg ;; - -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } + -*) as_fn_error "unrecognized option: \`$ac_option' +Try \`$0 --help' for more information." ;; + *=*) + ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` + # Reject names that are not valid shell variable names. + case $ac_envvar in #( + '' | [0-9]* | *[!_$as_cr_alnum]* ) + as_fn_error "invalid variable name: \`$ac_envvar'" ;; + esac + eval $ac_envvar=\$ac_optarg + export $ac_envvar ;; + *) - if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then - echo "configure: warning: $ac_option: invalid host type" 1>&2 - fi - if test "x$nonopt" != xNONE; then - { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } - fi - nonopt="$ac_option" + # FIXME: should be removed in autoconf 3.0. + $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 + expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && + $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 + : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} ;; esac done if test -n "$ac_prev"; then - { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } + ac_option=--`echo $ac_prev | sed 's/_/-/g'` + as_fn_error "missing argument to $ac_option" fi -trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 - -# File descriptor usage: -# 0 standard input -# 1 file creation -# 2 errors and warnings -# 3 some systems may open it to /dev/tty -# 4 used on the Kubota Titan -# 6 checking for... messages and results -# 5 compiler messages saved in config.log -if test "$silent" = yes; then - exec 6>/dev/null -else - exec 6>&1 +if test -n "$ac_unrecognized_opts"; then + case $enable_option_checking in + no) ;; + fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;; + *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; + esac fi -exec 5>./config.log - -echo "\ -This file contains any messages produced by compilers while -running configure, to aid debugging if configure makes a mistake. -" 1>&5 -# Strip out --no-create and --no-recursion so they do not pile up. -# Also quote any args containing shell metacharacters. -ac_configure_args= -for ac_arg +# Check all directory arguments for consistency. +for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ + datadir sysconfdir sharedstatedir localstatedir includedir \ + oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ + libdir localedir mandir do - case "$ac_arg" in - -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c) ;; - -no-recursion | --no-recursion | --no-recursio | --no-recursi \ - | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; - *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) - ac_configure_args="$ac_configure_args '$ac_arg'" ;; - *) ac_configure_args="$ac_configure_args $ac_arg" ;; + eval ac_val=\$$ac_var + # Remove trailing slashes. + case $ac_val in + */ ) + ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` + eval $ac_var=\$ac_val;; esac + # Be sure to have absolute directory names. + case $ac_val in + [\\/$]* | ?:[\\/]* ) continue;; + NONE | '' ) case $ac_var in *prefix ) continue;; esac;; + esac + as_fn_error "expected an absolute directory name for --$ac_var: $ac_val" done -# NLS nuisances. -# Only set these to C if already set. These must not be set unconditionally -# because not all systems understand e.g. LANG=C (notably SCO). -# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! -# Non-C LC_CTYPE values break the ctype check. -if test "${LANG+set}" = set; then LANG=C; export LANG; fi -if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi -if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi -if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi +# There might be people who depend on the old broken behavior: `$host' +# used to hold the argument of --host etc. +# FIXME: To remove some day. +build=$build_alias +host=$host_alias +target=$target_alias + +# FIXME: To remove some day. +if test "x$host_alias" != x; then + if test "x$build_alias" = x; then + cross_compiling=maybe + $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. + If a cross compiler is detected then cross compile mode will be used." >&2 + elif test "x$build_alias" != "x$host_alias"; then + cross_compiling=yes + fi +fi + +ac_tool_prefix= +test -n "$host_alias" && ac_tool_prefix=$host_alias- + +test "$silent" = yes && exec 6>/dev/null + + +ac_pwd=`pwd` && test -n "$ac_pwd" && +ac_ls_di=`ls -di .` && +ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || + as_fn_error "working directory cannot be determined" +test "X$ac_ls_di" = "X$ac_pwd_ls_di" || + as_fn_error "pwd does not report name of working directory" -# confdefs.h avoids OS command line length limits that DEFS can exceed. -rm -rf conftest* confdefs.h -# AIX cpp loses on an empty file, so make sure it contains at least a newline. -echo > confdefs.h - -# A filename unique to this package, relative to the directory that -# configure is in, which we can look for to find out if srcdir is correct. -ac_unique_file=fontdb # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes - # Try the directory containing this script, then its parent. - ac_prog=$0 - ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` - test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. + # Try the directory containing this script, then the parent directory. + ac_confdir=`$as_dirname -- "$as_myself" || +$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_myself" : 'X\(//\)[^/]' \| \ + X"$as_myself" : 'X\(//\)$' \| \ + X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_myself" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` srcdir=$ac_confdir - if test ! -r $srcdir/$ac_unique_file; then + if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi -if test ! -r $srcdir/$ac_unique_file; then - if test "$ac_srcdir_defaulted" = yes; then - { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } - else - { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } - fi +if test ! -r "$srcdir/$ac_unique_file"; then + test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." + as_fn_error "cannot find sources ($ac_unique_file) in $srcdir" +fi +ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" +ac_abs_confdir=`( + cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg" + pwd)` +# When building in place, set srcdir=. +if test "$ac_abs_confdir" = "$ac_pwd"; then + srcdir=. +fi +# Remove unnecessary trailing slashes from srcdir. +# Double slashes in file names in object file debugging info +# mess up M-x gdb in Emacs. +case $srcdir in +*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; +esac +for ac_var in $ac_precious_vars; do + eval ac_env_${ac_var}_set=\${${ac_var}+set} + eval ac_env_${ac_var}_value=\$${ac_var} + eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} + eval ac_cv_env_${ac_var}_value=\$${ac_var} +done + +# +# Report the --help message. +# +if test "$ac_init_help" = "long"; then + # Omit some internal or obsolete options to make the list less imposing. + # This message is too long to be a string in the A/UX 3.1 sh. + cat <<_ACEOF +\`configure' configures xgks 2.6 to adapt to many kinds of systems. + +Usage: $0 [OPTION]... [VAR=VALUE]... + +To assign environment variables (e.g., CC, CFLAGS...), specify them as +VAR=VALUE. See below for descriptions of some of the useful variables. + +Defaults for the options are specified in brackets. + +Configuration: + -h, --help display this help and exit + --help=short display options specific to this package + --help=recursive display the short help of all the included packages + -V, --version display version information and exit + -q, --quiet, --silent do not print \`checking...' messages + --cache-file=FILE cache test results in FILE [disabled] + -C, --config-cache alias for \`--cache-file=config.cache' + -n, --no-create do not create output files + --srcdir=DIR find the sources in DIR [configure dir or \`..'] + +Installation directories: + --prefix=PREFIX install architecture-independent files in PREFIX + [$ac_default_prefix] + --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX + [PREFIX] + +By default, \`make install' will install all the files in +\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify +an installation prefix other than \`$ac_default_prefix' using \`--prefix', +for instance \`--prefix=\$HOME'. + +For better control, use the options below. + +Fine tuning of the installation directories: + --bindir=DIR user executables [EPREFIX/bin] + --sbindir=DIR system admin executables [EPREFIX/sbin] + --libexecdir=DIR program executables [EPREFIX/libexec] + --sysconfdir=DIR read-only single-machine data [PREFIX/etc] + --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] + --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --libdir=DIR object code libraries [EPREFIX/lib] + --includedir=DIR C header files [PREFIX/include] + --oldincludedir=DIR C header files for non-gcc [/usr/include] + --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] + --datadir=DIR read-only architecture-independent data [DATAROOTDIR] + --infodir=DIR info documentation [DATAROOTDIR/info] + --localedir=DIR locale-dependent data [DATAROOTDIR/locale] + --mandir=DIR man documentation [DATAROOTDIR/man] + --docdir=DIR documentation root [DATAROOTDIR/doc/xgks] + --htmldir=DIR html documentation [DOCDIR] + --dvidir=DIR dvi documentation [DOCDIR] + --pdfdir=DIR pdf documentation [DOCDIR] + --psdir=DIR ps documentation [DOCDIR] +_ACEOF + + cat <<\_ACEOF +_ACEOF +fi + +if test -n "$ac_init_help"; then + case $ac_init_help in + short | recursive ) echo "Configuration of xgks 2.6:";; + esac + cat <<\_ACEOF + +Some influential environment variables: + CC C compiler command + CFLAGS C compiler flags + LDFLAGS linker flags, e.g. -L if you have libraries in a + nonstandard directory + LIBS libraries to pass to the linker, e.g. -l + CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if + you have headers in a nonstandard directory + CPP C preprocessor + +Use these variables to override the choices made by `configure' or to help +it to find libraries and programs with nonstandard names/locations. + +Report bugs to the package provider. +_ACEOF +ac_status=$? +fi + +if test "$ac_init_help" = "recursive"; then + # If there are subdirs, report their specific --help. + for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue + test -d "$ac_dir" || + { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || + continue + ac_builddir=. + +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix + +case $srcdir in + .) # We are building in place. + ac_srcdir=. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; +esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + cd "$ac_dir" || { ac_status=$?; continue; } + # Check for guested configure. + if test -f "$ac_srcdir/configure.gnu"; then + echo && + $SHELL "$ac_srcdir/configure.gnu" --help=recursive + elif test -f "$ac_srcdir/configure"; then + echo && + $SHELL "$ac_srcdir/configure" --help=recursive + else + $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + fi || ac_status=$? + cd "$ac_pwd" || { ac_status=$?; break; } + done fi -srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` -# Prefer explicitly selected file to automatically selected ones. -if test -z "$CONFIG_SITE"; then - if test "x$prefix" != xNONE; then - CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" - else - CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" +test -n "$ac_init_help" && exit $ac_status +if $ac_init_version; then + cat <<\_ACEOF +xgks configure 2.6 +generated by GNU Autoconf 2.65 + +Copyright (C) 2009 Free Software Foundation, Inc. +This configure script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it. +_ACEOF + exit +fi + +## ------------------------ ## +## Autoconf initialization. ## +## ------------------------ ## + +# ac_fn_c_try_compile LINENO +# -------------------------- +# Try to compile conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_compile () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext + if { { ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compile") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + as_fn_set_status $ac_retval + +} # ac_fn_c_try_compile + +# ac_fn_c_try_cpp LINENO +# ---------------------- +# Try to preprocess conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_cpp () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { { ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + as_fn_set_status $ac_retval + +} # ac_fn_c_try_cpp + +# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES +# ------------------------------------------------------- +# Tests whether HEADER exists, giving a warning if it cannot be compiled using +# the include files in INCLUDES and setting the cache variable VAR +# accordingly. +ac_fn_c_check_header_mongrel () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : + $as_echo_n "(cached) " >&6 +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +else + # Is the header compilable? +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 +$as_echo_n "checking $2 usability... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +#include <$2> +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_header_compiler=yes +else + ac_header_compiler=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } + +# Is the header present? +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 +$as_echo_n "checking $2 presence... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <$2> +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + ac_header_preproc=yes +else + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( + yes:no: ) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} + ;; + no:yes:* ) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} + ;; +esac + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : + $as_echo_n "(cached) " >&6 +else + eval "$3=\$ac_header_compiler" +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +fi + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + +} # ac_fn_c_check_header_mongrel + +# ac_fn_c_try_run LINENO +# ---------------------- +# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes +# that executables *can* be run. +ac_fn_c_try_run () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' + { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then : + ac_retval=0 +else + $as_echo "$as_me: program exited with status $ac_status" >&5 + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=$ac_status +fi + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + as_fn_set_status $ac_retval + +} # ac_fn_c_try_run + +# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES +# ------------------------------------------------------- +# Tests whether HEADER exists and can be compiled using the include files in +# INCLUDES, setting the cache variable VAR accordingly. +ac_fn_c_check_header_compile () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +#include <$2> +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$3=yes" +else + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + +} # ac_fn_c_check_header_compile + +# ac_fn_c_try_link LINENO +# ----------------------- +# Try to link conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_link () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext conftest$ac_exeext + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information + # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would + # interfere with the next link command; also delete a directory that is + # left behind by Apple's compiler. We do this before executing the actions. + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + as_fn_set_status $ac_retval + +} # ac_fn_c_try_link + +# ac_fn_c_check_func LINENO FUNC VAR +# ---------------------------------- +# Tests whether FUNC exists, setting the cache variable VAR accordingly +ac_fn_c_check_func () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +/* Define $2 to an innocuous variant, in case declares $2. + For example, HP-UX 11i declares gettimeofday. */ +#define $2 innocuous_$2 + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $2 (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $2 + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $2 (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$2 || defined __stub___$2 +choke me +#endif + +int +main () +{ +return $2 (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + eval "$3=yes" +else + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + +} # ac_fn_c_check_func +cat >config.log <<_ACEOF +This file contains any messages produced by compilers while +running configure, to aid debugging if configure makes a mistake. + +It was created by xgks $as_me 2.6, which was +generated by GNU Autoconf 2.65. Invocation command line was + + $ $0 $@ + +_ACEOF +exec 5>>config.log +{ +cat <<_ASUNAME +## --------- ## +## Platform. ## +## --------- ## + +hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` +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 || echo unknown` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` + +/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` +/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` +/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` +/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` + +_ASUNAME + +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + $as_echo "PATH: $as_dir" + done +IFS=$as_save_IFS + +} >&5 + +cat >&5 <<_ACEOF + + +## ----------- ## +## Core tests. ## +## ----------- ## + +_ACEOF + + +# Keep a trace of the command line. +# Strip out --no-create and --no-recursion so they do not pile up. +# Strip out --silent because we don't want to record it for future runs. +# Also quote any args containing shell meta-characters. +# Make two passes to allow for proper duplicate-argument suppression. +ac_configure_args= +ac_configure_args0= +ac_configure_args1= +ac_must_keep_next=false +for ac_pass in 1 2 +do + for ac_arg + do + case $ac_arg in + -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + continue ;; + *\'*) + ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + case $ac_pass in + 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; + 2) + as_fn_append ac_configure_args1 " '$ac_arg'" + if test $ac_must_keep_next = true; then + ac_must_keep_next=false # Got value, back to normal. + else + case $ac_arg in + *=* | --config-cache | -C | -disable-* | --disable-* \ + | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ + | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ + | -with-* | --with-* | -without-* | --without-* | --x) + case "$ac_configure_args0 " in + "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; + esac + ;; + -* ) ac_must_keep_next=true ;; + esac + fi + as_fn_append ac_configure_args " '$ac_arg'" + ;; + esac + done +done +{ ac_configure_args0=; unset ac_configure_args0;} +{ ac_configure_args1=; unset ac_configure_args1;} + +# When interrupted or exit'd, cleanup temporary files, and complete +# config.log. We remove comments because anyway the quotes in there +# would cause problems or look ugly. +# WARNING: Use '\'' to represent an apostrophe within the trap. +# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. +trap 'exit_status=$? + # Save into config.log some information that might help in debugging. + { + echo + + cat <<\_ASBOX +## ---------------- ## +## Cache variables. ## +## ---------------- ## +_ASBOX + echo + # The following way of writing the cache mishandles newlines in values, +( + for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( + *) { eval $ac_var=; unset $ac_var;} ;; + esac ;; + esac + done + (set) 2>&1 | + case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( + *${as_nl}ac_space=\ *) + sed -n \ + "s/'\''/'\''\\\\'\'''\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" + ;; #( + *) + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; + esac | + sort +) + echo + + cat <<\_ASBOX +## ----------------- ## +## Output variables. ## +## ----------------- ## +_ASBOX + echo + for ac_var in $ac_subst_vars + do + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + $as_echo "$ac_var='\''$ac_val'\''" + done | sort + echo + + if test -n "$ac_subst_files"; then + cat <<\_ASBOX +## ------------------- ## +## File substitutions. ## +## ------------------- ## +_ASBOX + echo + for ac_var in $ac_subst_files + do + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + $as_echo "$ac_var='\''$ac_val'\''" + done | sort + echo + fi + + if test -s confdefs.h; then + cat <<\_ASBOX +## ----------- ## +## confdefs.h. ## +## ----------- ## +_ASBOX + echo + cat confdefs.h + echo + fi + test "$ac_signal" != 0 && + $as_echo "$as_me: caught signal $ac_signal" + $as_echo "$as_me: exit $exit_status" + } >&5 + rm -f core *.core core.conftest.* && + rm -f -r conftest* confdefs* conf$$* $ac_clean_files && + exit $exit_status +' 0 +for ac_signal in 1 2 13 15; do + trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal +done +ac_signal=0 + +# confdefs.h avoids OS command line length limits that DEFS can exceed. +rm -f -r conftest* confdefs.h + +$as_echo "/* confdefs.h */" > confdefs.h + +# Predefined preprocessor variables. + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_NAME "$PACKAGE_NAME" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_TARNAME "$PACKAGE_TARNAME" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_VERSION "$PACKAGE_VERSION" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_STRING "$PACKAGE_STRING" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_URL "$PACKAGE_URL" +_ACEOF + + +# Let the site file select an alternate cache file if it wants to. +# Prefer an explicitly selected file to automatically selected ones. +ac_site_file1=NONE +ac_site_file2=NONE +if test -n "$CONFIG_SITE"; then + ac_site_file1=$CONFIG_SITE +elif test "x$prefix" != xNONE; then + ac_site_file1=$prefix/share/config.site + ac_site_file2=$prefix/etc/config.site +else + ac_site_file1=$ac_default_prefix/share/config.site + ac_site_file2=$ac_default_prefix/etc/config.site fi -for ac_site_file in $CONFIG_SITE; do - if test -r "$ac_site_file"; then - echo "loading site script $ac_site_file" +for ac_site_file in "$ac_site_file1" "$ac_site_file2" +do + test "x$ac_site_file" = xNONE && continue + if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 +$as_echo "$as_me: loading site script $ac_site_file" >&6;} + sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" fi done if test -r "$cache_file"; then - echo "loading cache $cache_file" - . $cache_file + # Some versions of bash will fail to source /dev/null (special files + # actually), so we avoid doing that. DJGPP emulates it as a regular file. + if test /dev/null != "$cache_file" && test -f "$cache_file"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 +$as_echo "$as_me: loading cache $cache_file" >&6;} + case $cache_file in + [\\/]* | ?:[\\/]* ) . "$cache_file";; + *) . "./$cache_file";; + esac + fi else - echo "creating cache $cache_file" - > $cache_file -fi + { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 +$as_echo "$as_me: creating cache $cache_file" >&6;} + >$cache_file +fi + +# Check that the precious variables saved in the cache have kept the same +# value. +ac_cache_corrupted=false +for ac_var in $ac_precious_vars; do + eval ac_old_set=\$ac_cv_env_${ac_var}_set + eval ac_new_set=\$ac_env_${ac_var}_set + eval ac_old_val=\$ac_cv_env_${ac_var}_value + eval ac_new_val=\$ac_env_${ac_var}_value + case $ac_old_set,$ac_new_set in + set,) + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,set) + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,);; + *) + if test "x$ac_old_val" != "x$ac_new_val"; then + # differences in whitespace do not lead to failure. + ac_old_val_w=`echo x $ac_old_val` + ac_new_val_w=`echo x $ac_new_val` + if test "$ac_old_val_w" != "$ac_new_val_w"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 +$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + ac_cache_corrupted=: + else + { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 +$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} + eval $ac_var=\$ac_old_val + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 +$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 +$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} + fi;; + esac + # Pass precious variables to config.status. + if test "$ac_new_set" = set; then + case $ac_new_val in + *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *) ac_arg=$ac_var=$ac_new_val ;; + esac + case " $ac_configure_args " in + *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. + *) as_fn_append ac_configure_args " '$ac_arg'" ;; + esac + fi +done +if $ac_cache_corrupted; then + { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 +$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} + as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 +fi +## -------------------- ## +## Main body of script. ## +## -------------------- ## ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cc_cross - -ac_exeext= -ac_objext=o -if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then - # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. - if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then - ac_n= ac_c=' -' ac_t=' ' - else - ac_n=-n ac_c= ac_t= - fi -else - ac_n= ac_c='\c' ac_t= -fi +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -r CUSTOMIZE; then . ./CUSTOMIZE fi - echo $ac_n "checking type of operating system""... $ac_c" 1>&6 -echo "configure:530: checking type of operating system" >&5 - if test -z "$OPSYS"; then - OPSYS=`uname -s | tr '[A-Z]' '[a-z]' | sed 's;/;;g'` - if test -z "$OPSYS"; then - echo "OPSYS:operating system:sunos5" >> confdefs.missing - fi - fi - case $OPSYS in - aix) - OS_NAME=`uname -s` - OS_MAJOR=`uname -v | sed 's/[^0-9]*\([0-9]*\)\..*/\1/'` - ;; - hp-ux) - OPSYS=hpux`uname -r | sed 's/[A-Z.0]*\([0-9]*\).*/\1/'` - OS_NAME=HPUX - OS_MAJOR=`uname -r | sed 's/[A-Z.0]*\([0-9]*\).*/\1/'` - ;; - irix) - OPSYS=${OPSYS}`uname -r | sed 's/\..*//'` - OS_NAME=IRIX - OS_MAJOR=`uname -r | sed 's/\..*//'` - ;; - osf*) - OS_NAME=OSF1 - OS_MAJOR=`uname -r | sed 's/[^0-9]*\([0-9]*\)\..*/\1/'` - ;; - sn*) - OPSYS=unicos - OS_NAME=UNICOS - OS_MAJOR=`uname -r | sed 's/[^0-9]*\([0-9]*\)\..*/\1/'` - ;; - sunos) - OS_NAME=SunOS - OS_MAJOR=`uname -r | sed 's/\..*//'` - OPSYS=$OPSYS$OS_MAJOR - ;; - ultrix) - OS_NAME=ULTRIX - OS_MAJOR=`uname -r | sed 's/\..*//'` - ;; - *) - # On at least one UNICOS system, 'uname -s' returned the - # hostname (sigh). - if uname -a | grep CRAY >/dev/null; then - OPSYS=unicos - OS_NAME=UNICOS - else - OS_NAME=`uname -s | sed 's/[^A-Za-z0-9_]//g'` - fi - OS_MAJOR=`uname -r | sed 's/[^0-9]*\([0-9]*\)\..*/\1/'` - ;; - esac - # Adjust OPSYS for CRAY MPP environment. - # - case "$OPSYS" in - unicos) - - case "$CC$TARGET$CFLAGS" in - *cray-t3*) - OPSYS=unicos-mpp - ;; - esac - ;; - esac - - cat >> confdefs.h <> confdefs.h <&6 - - rm -f confdefs.missing for arg in port/master.mk; do case "$CONFIG_FILES" in @@ -626,7 +2128,7 @@ PORT_MANIFEST=${PORT_MANIFEST-""} - + # # NB: We always want to define WHATIS to prevent the # $(MANDIR)/$(WHATIS) make(1) target from being just $(MANDIR)/ and @@ -663,36 +2165,44 @@ fi for ac_prog in catman makewhatis /usr/lib/makewhatis do -# Extract the first word of "$ac_prog", so it can be a program name with args. + # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:670: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_prog'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_prog+set}" = set; then : + $as_echo_n "(cached) " >&6 else if test -n "$prog"; then ac_cv_prog_prog="$prog" # Let the user override the test. else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_prog="$ac_prog" - break - fi +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_prog="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done done - IFS="$ac_save_ifs" +IFS=$as_save_IFS + fi fi -prog="$ac_cv_prog_prog" +prog=$ac_cv_prog_prog if test -n "$prog"; then - echo "$ac_t""$prog" 1>&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $prog" >&5 +$as_echo "$prog" >&6; } else - echo "$ac_t""no" 1>&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -test -n "$prog" && break + + test -n "$prog" && break done case "$prog" in @@ -705,28 +2215,29 @@ esac ;; esac - - - echo $ac_n "checking for manual-page index command""... $ac_c" 1>&6 -echo "configure:712: checking for manual-page index command" >&5 - echo "$ac_t""$MAKEWHATIS_CMD" 1>&6 - - - - - - - - - - - - - - - - - + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for manual-page index command" >&5 +$as_echo_n "checking for manual-page index command... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKEWHATIS_CMD" >&5 +$as_echo "$MAKEWHATIS_CMD" >&6; } + + + + + + + + + + + + + + + + + # # Ensure that the CC variable is unset so that it can be # set here rather than by the autoconf-generated @@ -740,141 +2251,173 @@ AIX) for ac_prog in c89 xlc cc gcc do -# Extract the first word of "$ac_prog", so it can be a program name with args. + # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:747: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_CC+set}" = set; then : + $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_CC="$ac_prog" - break - fi +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done done - IFS="$ac_save_ifs" +IFS=$as_save_IFS + fi fi -CC="$ac_cv_prog_CC" +CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$ac_t""$CC" 1>&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } else - echo "$ac_t""no" 1>&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -test -n "$CC" && break + + test -n "$CC" && break done ;; HP-UX) for ac_prog in c89 cc gcc do -# Extract the first word of "$ac_prog", so it can be a program name with args. + # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:782: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_CC+set}" = set; then : + $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_CC="$ac_prog" - break - fi +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done done - IFS="$ac_save_ifs" +IFS=$as_save_IFS + fi fi -CC="$ac_cv_prog_CC" +CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$ac_t""$CC" 1>&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } else - echo "$ac_t""no" 1>&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -test -n "$CC" && break + + test -n "$CC" && break done ;; IRIX*) for ac_prog in cc gcc do -# Extract the first word of "$ac_prog", so it can be a program name with args. + # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:817: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_CC+set}" = set; then : + $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_CC="$ac_prog" - break - fi +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done done - IFS="$ac_save_ifs" +IFS=$as_save_IFS + fi fi -CC="$ac_cv_prog_CC" +CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$ac_t""$CC" 1>&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } else - echo "$ac_t""no" 1>&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -test -n "$CC" && break + + test -n "$CC" && break done ;; OSF1|ULTRIX) for ac_prog in cc gcc do -# Extract the first word of "$ac_prog", so it can be a program name with args. + # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:852: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_CC+set}" = set; then : + $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_CC="$ac_prog" - break - fi +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done done - IFS="$ac_save_ifs" +IFS=$as_save_IFS + fi fi -CC="$ac_cv_prog_CC" +CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$ac_t""$CC" 1>&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } else - echo "$ac_t""no" 1>&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -test -n "$CC" && break + + test -n "$CC" && break done case "$CC" in cc) @@ -901,71 +2444,87 @@ 4*) for ac_prog in acc cc gcc do -# Extract the first word of "$ac_prog", so it can be a program name with args. + # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:908: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_CC+set}" = set; then : + $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_CC="$ac_prog" - break - fi +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done done - IFS="$ac_save_ifs" +IFS=$as_save_IFS + fi fi -CC="$ac_cv_prog_CC" +CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$ac_t""$CC" 1>&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } else - echo "$ac_t""no" 1>&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -test -n "$CC" && break + + test -n "$CC" && break done ;; 5*) for ac_prog in cc gcc do -# Extract the first word of "$ac_prog", so it can be a program name with args. + # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:943: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_CC+set}" = set; then : + $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_CC="$ac_prog" - break - fi +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done done - IFS="$ac_save_ifs" +IFS=$as_save_IFS + fi fi -CC="$ac_cv_prog_CC" +CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$ac_t""$CC" 1>&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } else - echo "$ac_t""no" 1>&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -test -n "$CC" && break + + test -n "$CC" && break done # # The following is commented-out because @@ -988,44 +2547,53 @@ *) for ac_prog in c89 cc gcc do -# Extract the first word of "$ac_prog", so it can be a program name with args. + # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:995: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_CC+set}" = set; then : + $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_CC="$ac_prog" - break - fi +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done done - IFS="$ac_save_ifs" +IFS=$as_save_IFS + fi fi -CC="$ac_cv_prog_CC" +CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$ac_t""$CC" 1>&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } else - echo "$ac_t""no" 1>&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -test -n "$CC" && break + + test -n "$CC" && break done ;; esac ;; *) - echo $ac_n "checking for C compiler""... $ac_c" 1>&6 -echo "configure:1028: checking for C compiler" >&5 - echo "$ac_t""$CC" 1>&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler" >&5 +$as_echo_n "checking for C compiler... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } ;; esac case "${CC-}" in @@ -1054,9 +2622,7 @@ ;; esac done - cat >> confdefs.h <<\EOF -#define _ALL_SOURCE 1 -EOF + $as_echo "#define _ALL_SOURCE 1" >>confdefs.h ;; HP-UX) for arg in -D_HPUX_SOURCE; do @@ -1068,17 +2634,93 @@ ;; esac done - cat >> confdefs.h <<\EOF -#define _HPUX_SOURCE 1 -EOF + $as_echo "#define _HPUX_SOURCE 1" >>confdefs.h ;; esac ;; esac rm -f conftest* - echo $ac_n "checking for dependency generation mechanism""... $ac_c" 1>&6 -echo "configure:1082: checking for dependency generation mechanism" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking type of operating system" >&5 +$as_echo_n "checking type of operating system... " >&6; } + if test -z "$OPSYS"; then + OPSYS=`uname -s | tr '[A-Z]' '[a-z]' | sed 's;/;;g'` + if test -z "$OPSYS"; then + echo "OPSYS:operating system:sunos5" >> confdefs.missing + fi + fi + case $OPSYS in + aix) + OS_NAME=`uname -s` + OS_MAJOR=`uname -v | sed 's/[^0-9]*\([0-9]*\)\..*/\1/'` + ;; + hp-ux) + OPSYS=hpux`uname -r | sed 's/[A-Z.0]*\([0-9]*\).*/\1/'` + OS_NAME=HPUX + OS_MAJOR=`uname -r | sed 's/[A-Z.0]*\([0-9]*\).*/\1/'` + ;; + irix) + OPSYS=${OPSYS}`uname -r | sed 's/\..*//'` + OS_NAME=IRIX + OS_MAJOR=`uname -r | sed 's/\..*//'` + ;; + osf*) + OS_NAME=OSF1 + OS_MAJOR=`uname -r | sed 's/[^0-9]*\([0-9]*\)\..*/\1/'` + ;; + sn*) + OPSYS=unicos + OS_NAME=UNICOS + OS_MAJOR=`uname -r | sed 's/[^0-9]*\([0-9]*\)\..*/\1/'` + ;; + sunos) + OS_NAME=SunOS + OS_MAJOR=`uname -r | sed 's/\..*//'` + OPSYS=$OPSYS$OS_MAJOR + ;; + ultrix) + OS_NAME=ULTRIX + OS_MAJOR=`uname -r | sed 's/\..*//'` + ;; + *) + # On at least one UNICOS system, 'uname -s' returned the + # hostname (sigh). + if uname -a | grep CRAY >/dev/null; then + OPSYS=unicos + OS_NAME=UNICOS + else + OS_NAME=`uname -s | sed 's/[^A-Za-z0-9_]//g'` + fi + OS_MAJOR=`uname -r | sed 's/[^0-9]*\([0-9]*\)\..*/\1/'` + ;; + esac + + # Adjust OPSYS for CRAY MPP environment. + # + case "$OPSYS" in + unicos) + + case "$CC$TARGET$CFLAGS" in + *cray-t3*) + OPSYS=unicos-mpp + ;; + esac + ;; + esac + + cat >>confdefs.h <<_ACEOF +#define OS_NAME $OS_NAME +_ACEOF + + cat >>confdefs.h <<_ACEOF +#define OS_MAJOR $OS_MAJOR +_ACEOF + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPSYS" >&5 +$as_echo "$OPSYS" >&6; } + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dependency generation mechanism" >&5 +$as_echo_n "checking for dependency generation mechanism... " >&6; } if test -z "$CC_MAKEDEPEND"; then case ${GCC-}${OPSYS} in convexos) @@ -1095,7 +2737,7 @@ # UNICOS's C compiler has an unusual way of invoking the # dependency-generation option. Also, the c89(1) compiler # doesn't even have way of doing this. - # + # # CC_MAKEDEPEND="cc -c -Wp,-M" ;; @@ -1107,232 +2749,1209 @@ ;; esac fi - echo "$ac_t""$CC_MAKEDEPEND" 1>&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC_MAKEDEPEND" >&5 +$as_echo "$CC_MAKEDEPEND" >&6; } + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. +set dummy ${ac_tool_prefix}gcc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_CC+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="${ac_tool_prefix}gcc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "gcc", so it can be a program name with args. +set dummy gcc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_CC="gcc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi - echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:1114: checking how to run the C preprocessor" >&5 + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +else + CC="$ac_cv_prog_CC" +fi + +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. +set dummy ${ac_tool_prefix}cc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_CC+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="${ac_tool_prefix}cc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + fi +fi +if test -z "$CC"; then + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_CC+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + ac_prog_rejected=no +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_CC="cc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +if test $ac_prog_rejected = yes; then + # We found a bogon in the path, so make sure we never use it. + set dummy $ac_cv_prog_CC + shift + if test $# != 0; then + # We chose a different compiler from the bogus one. + # However, it has the same basename, so the bogon will be chosen + # first if we set CC to just the basename; use the full file name. + shift + ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" + fi +fi +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + for ac_prog in cl.exe + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_CC+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="$ac_tool_prefix$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$CC" && break + done +fi +if test -z "$CC"; then + ac_ct_CC=$CC + for ac_prog in cl.exe +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_CC="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$ac_ct_CC" && break +done + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +fi + +fi + + +test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error "no acceptable C compiler found in \$PATH +See \`config.log' for more details." "$LINENO" 5; } + +# Provide some information about the compiler. +$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 +set X $ac_compile +ac_compiler=$2 +for ac_option in --version -v -V -qversion; do + { { ac_try="$ac_compiler $ac_option >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compiler $ac_option >&5") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + sed '10a\ +... rest of stderr output deleted ... + 10q' conftest.err >conftest.er1 + cat conftest.er1 >&5 + fi + rm -f conftest.er1 conftest.err + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } +done + +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" +# Try to create an executable without -o first, disregard a.out. +# It will help us diagnose broken compilers, and finding out an intuition +# of exeext. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 +$as_echo_n "checking whether the C compiler works... " >&6; } +ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` + +# The possible output files: +ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" + +ac_rmfiles= +for ac_file in $ac_files +do + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; + * ) ac_rmfiles="$ac_rmfiles $ac_file";; + esac +done +rm -f $ac_rmfiles + +if { { ac_try="$ac_link_default" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link_default") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : + # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. +# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' +# in a Makefile. We should not override ac_cv_exeext if it was cached, +# so that the user can short-circuit this test for compilers unknown to +# Autoconf. +for ac_file in $ac_files '' +do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) + ;; + [ab].out ) + # We found the default executable, but exeext='' is most + # certainly right. + break;; + *.* ) + if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; + then :; else + ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + fi + # We set ac_cv_exeext here because the later test for it is not + # safe: cross compilers may not add the suffix if given an `-o' + # argument, so we may need to know it at that point already. + # Even if this section looks crufty: it has the advantage of + # actually working. + break;; + * ) + break;; + esac +done +test "$ac_cv_exeext" = no && ac_cv_exeext= + +else + ac_file='' +fi +if test -z "$ac_file"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +$as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ as_fn_set_status 77 +as_fn_error "C compiler cannot create executables +See \`config.log' for more details." "$LINENO" 5; }; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 +$as_echo_n "checking for C compiler default output file name... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 +$as_echo "$ac_file" >&6; } +ac_exeext=$ac_cv_exeext + +rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out +ac_clean_files=$ac_clean_files_save +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 +$as_echo_n "checking for suffix of executables... " >&6; } +if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : + # If both `conftest.exe' and `conftest' are `present' (well, observable) +# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will +# work properly (i.e., refer to `conftest.exe'), while it won't with +# `rm'. +for ac_file in conftest.exe conftest conftest.*; do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; + *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + break;; + * ) break;; + esac +done +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error "cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details." "$LINENO" 5; } +fi +rm -f conftest conftest$ac_cv_exeext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 +$as_echo "$ac_cv_exeext" >&6; } + +rm -f conftest.$ac_ext +EXEEXT=$ac_cv_exeext +ac_exeext=$EXEEXT +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +FILE *f = fopen ("conftest.out", "w"); + return ferror (f) || fclose (f) != 0; + + ; + return 0; +} +_ACEOF +ac_clean_files="$ac_clean_files conftest.out" +# Check that the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 +$as_echo_n "checking whether we are cross compiling... " >&6; } +if test "$cross_compiling" != yes; then + { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + if { ac_try='./conftest$ac_cv_exeext' + { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then + cross_compiling=no + else + if test "$cross_compiling" = maybe; then + cross_compiling=yes + else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error "cannot run C compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details." "$LINENO" 5; } + fi + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 +$as_echo "$cross_compiling" >&6; } + +rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out +ac_clean_files=$ac_clean_files_save +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 +$as_echo_n "checking for suffix of object files... " >&6; } +if test "${ac_cv_objext+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.o conftest.obj +if { { ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compile") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : + for ac_file in conftest.o conftest.obj conftest.*; do + test -f "$ac_file" || continue; + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; + *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` + break;; + esac +done +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error "cannot compute suffix of object files: cannot compile +See \`config.log' for more details." "$LINENO" 5; } +fi +rm -f conftest.$ac_cv_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 +$as_echo "$ac_cv_objext" >&6; } +OBJEXT=$ac_cv_objext +ac_objext=$OBJEXT +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 +$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } +if test "${ac_cv_c_compiler_gnu+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ +#ifndef __GNUC__ + choke me +#endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_compiler_gnu=yes +else + ac_compiler_gnu=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_c_compiler_gnu=$ac_compiler_gnu + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 +$as_echo "$ac_cv_c_compiler_gnu" >&6; } +if test $ac_compiler_gnu = yes; then + GCC=yes +else + GCC= +fi +ac_test_CFLAGS=${CFLAGS+set} +ac_save_CFLAGS=$CFLAGS +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 +$as_echo_n "checking whether $CC accepts -g... " >&6; } +if test "${ac_cv_prog_cc_g+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_save_c_werror_flag=$ac_c_werror_flag + ac_c_werror_flag=yes + ac_cv_prog_cc_g=no + CFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_g=yes +else + CFLAGS="" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + +else + ac_c_werror_flag=$ac_save_c_werror_flag + CFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_g=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_c_werror_flag=$ac_save_c_werror_flag +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 +$as_echo "$ac_cv_prog_cc_g" >&6; } +if test "$ac_test_CFLAGS" = set; then + CFLAGS=$ac_save_CFLAGS +elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then + CFLAGS="-g -O2" + else + CFLAGS="-g" + fi +else + if test "$GCC" = yes; then + CFLAGS="-O2" + else + CFLAGS= + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 +$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } +if test "${ac_cv_prog_cc_c89+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_prog_cc_c89=no +ac_save_CC=$CC +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#include +#include +/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ +struct buf { int x; }; +FILE * (*rcsopen) (struct buf *, struct stat *, int); +static char *e (p, i) + char **p; + int i; +{ + return p[i]; +} +static char *f (char * (*g) (char **, int), char **p, ...) +{ + char *s; + va_list v; + va_start (v,p); + s = g (p, va_arg (v,int)); + va_end (v); + return s; +} + +/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has + function prototypes and stuff, but not '\xHH' hex character constants. + These don't provoke an error unfortunately, instead are silently treated + as 'x'. The following induces an error, until -std is added to get + proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an + array size at least. It's necessary to write '\x00'==0 to get something + that's true only with -std. */ +int osf4_cc_array ['\x00' == 0 ? 1 : -1]; + +/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters + inside strings and character constants. */ +#define FOO(x) 'x' +int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; + +int test (int i, double x); +struct s1 {int (*f) (int a);}; +struct s2 {int (*f) (double a);}; +int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); +int argc; +char **argv; +int +main () +{ +return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; + ; + return 0; +} +_ACEOF +for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ + -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +do + CC="$ac_save_CC $ac_arg" + if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_c89=$ac_arg +fi +rm -f core conftest.err conftest.$ac_objext + test "x$ac_cv_prog_cc_c89" != "xno" && break +done +rm -f conftest.$ac_ext +CC=$ac_save_CC + +fi +# AC_CACHE_VAL +case "x$ac_cv_prog_cc_c89" in + x) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +$as_echo "none needed" >&6; } ;; + xno) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +$as_echo "unsupported" >&6; } ;; + *) + CC="$CC $ac_cv_prog_cc_c89" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 +$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; +esac +if test "x$ac_cv_prog_cc_c89" != xno; then : + +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 +$as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then -if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + if test "${ac_cv_prog_CPP+set}" = set; then : + $as_echo_n "(cached) " >&6 else - # This must be in double quotes, not single quotes, because CPP may get - # substituted into the Makefile and "${CC-cc}" will confuse make. - CPP="${CC-cc} -E" + # Double quotes because CPP needs to be expanded + for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" + do + ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. - cat > conftest.$ac_ext < -Syntax Error -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1135: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - : + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + +else + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + # Broken: success on invalid input. +continue +else + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : + break +fi + + done + ac_cv_prog_CPP=$CPP + +fi + CPP=$ac_cv_prog_CPP else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - CPP="${CC-cc} -E -traditional-cpp" - cat > conftest.$ac_ext < -Syntax Error -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1152: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - : + ac_cv_prog_CPP=$CPP +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 +$as_echo "$CPP" >&6; } +ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + +else + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + # Broken: success on invalid input. +continue +else + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : + else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - CPP="${CC-cc} -nologo -E" - cat > conftest.$ac_ext < -Syntax Error -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1169: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error "C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details." "$LINENO" 5; } +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 +$as_echo_n "checking how to run the C preprocessor... " >&6; } +# On Suns, sometimes $CPP names a directory. +if test -n "$CPP" && test -d "$CPP"; then + CPP= +fi +if test -z "$CPP"; then + if test "${ac_cv_prog_CPP+set}" = set; then : + $as_echo_n "(cached) " >&6 else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - CPP=/lib/cpp + # Double quotes because CPP needs to be expanded + for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" + do + ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + +else + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + # Broken: success on invalid input. +continue +else + # Passes both tests. +ac_preproc_ok=: +break fi -rm -f conftest* +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : + break fi -rm -f conftest* + + done + ac_cv_prog_CPP=$CPP + fi -rm -f conftest* - ac_cv_prog_CPP="$CPP" + CPP=$ac_cv_prog_CPP +else + ac_cv_prog_CPP=$CPP fi - CPP="$ac_cv_prog_CPP" +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 +$as_echo "$CPP" >&6; } +ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + +else + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + # Broken: success on invalid input. +continue +else + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : + else - ac_cv_prog_CPP="$CPP" + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error "C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details." "$LINENO" 5; } fi -echo "$ac_t""$CPP" 1>&6 - echo $ac_n "checking the C preprocessor""... $ac_c" 1>&6 -echo "configure:1193: checking the C preprocessor" >&5 - cat > conftest.$ac_ext <&5 +$as_echo_n "checking the C preprocessor... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ #include -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1200: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - echo "$ac_t""works" 1>&6 -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - - echo "configure: warning: C preprocessor, \`$CPP', doesn't work" 1>&2 +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: works" >&5 +$as_echo "works" >&6; } +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C preprocessor, \`$CPP', doesn't work" >&5 +$as_echo "$as_me: WARNING: C preprocessor, \`$CPP', doesn't work" >&2;} echo "CPP:C preprocessor:/lib/cpp" >> confdefs.missing - + fi -rm -f conftest* - +rm -f conftest.err conftest.$ac_ext + - echo $ac_n "checking for C const""... $ac_c" 1>&6 -echo "configure:1220: checking for C const" >&5 - cat > conftest.$ac_ext <&5 +$as_echo_n "checking for C const... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ -int main() { +int +main () +{ /* Ultrix mips cc rejects this. */ typedef int charset[2]; const charset x; - -; return 0; } -EOF -if { (eval echo configure:1231: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - echo "$ac_t""yes" 1>&6 -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + UD_NO_CONST="1" -cat >> confdefs.h <<\EOF -#define UD_NO_CONST 1 -EOF - - echo "$ac_t""no" 1>&6 - - +$as_echo "#define UD_NO_CONST 1" >>confdefs.h + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + + fi -rm -f conftest* +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - echo $ac_n "checking for C volatile""... $ac_c" 1>&6 -echo "configure:1251: checking for C volatile" >&5 - cat > conftest.$ac_ext <&5 +$as_echo_n "checking for C volatile... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ -int main() { +int +main () +{ typedef int charset[2]; volatile charset x; -; return 0; } -EOF -if { (eval echo configure:1260: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - echo "$ac_t""yes" 1>&6 -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - - echo "$ac_t""no" 1>&6 + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } UD_NO_VOLATILE="1" -cat >> confdefs.h <<\EOF -#define UD_NO_VOLATILE 1 -EOF +$as_echo "#define UD_NO_VOLATILE 1" >>confdefs.h + + - - fi -rm -f conftest* - echo $ac_n "checking for C signed""... $ac_c" 1>&6 -echo "configure:1280: checking for C signed" >&5 - cat > conftest.$ac_ext <&5 +$as_echo_n "checking for C signed... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ -int main() { +int +main () +{ signed char x; -; return 0; } -EOF -if { (eval echo configure:1289: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - echo "$ac_t""yes" 1>&6 -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - - echo "$ac_t""no" 1>&6 + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } UD_NO_SIGNED="1" -cat >> confdefs.h <<\EOF -#define UD_NO_SIGNED 1 -EOF +$as_echo "#define UD_NO_SIGNED 1" >>confdefs.h + + - - fi -rm -f conftest* - echo $ac_n "checking for C function prototypes""... $ac_c" 1>&6 -echo "configure:1309: checking for C function prototypes" >&5 - cat > conftest.$ac_ext <&5 +$as_echo_n "checking for C function prototypes... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ -int main() { +int +main () +{ extern int foo(int bar); -; return 0; } -EOF -if { (eval echo configure:1318: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - echo "$ac_t""yes" 1>&6 -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - - echo "$ac_t""no" 1>&6 + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } UD_NO_PROTOTYPES="1" -cat >> confdefs.h <<\EOF -#define UD_NO_PROTOTYPES 1 -EOF +$as_echo "#define UD_NO_PROTOTYPES 1" >>confdefs.h + + - - fi -rm -f conftest* +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext for arg in stdarg.h.in; do case "$PORT_MANIFEST" in *$arg*) @@ -1342,13 +3961,14 @@ ;; esac done - echo $ac_n "checking for standard C variadic functions""... $ac_c" 1>&6 -echo "configure:1347: checking for standard C variadic functions" >&5 - cat > conftest.$ac_ext <&5 +$as_echo_n "checking for standard C variadic functions... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ #include -int main() { +int +main () +{ } int foo(int bar, ...) { @@ -1356,16 +3976,18 @@ va_start(alist, bar); bar = (int)va_arg(alist, int); va_end(alist); - -; return 0; } -EOF -if { (eval echo configure:1363: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - - echo "$ac_t""yes" 1>&6 + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } echo "#include " > conftestpath.c # - # We add additional `/'s to the header file name to preclude compiler + # We add additional `/'s to the header file name to preclude compiler # warnings about the non-portability of `#include "/usr/include/..."'. # case `uname -s`${GCC-} in @@ -1379,7 +4001,7 @@ # AIX 4.1's cc(1) makes the following complaint: # ld: 0711-317 ERROR: Undefined symbol: .main # - # AIX 4.1's ksh(1) has problems with `2>&5' so we redirect to + # AIX 4.1's ksh(1) has problems with `2>&5' so we redirect to # /dev/null. # $CC_MAKEDEPEND $CPPFLAGS conftestpath.c 2>/dev/null @@ -1392,7 +4014,7 @@ # HP-UX's C compiler doesn't have a dependency-generation option, # so we use another method. # - path=`$CC -E $CPPFLAGS conftestpath.c 2>&5 | + path=`$CC -E $CPPFLAGS conftestpath.c 2>&5 | sed -n '/[^\/]*\(\/[^ ]*stdarg\.h\).*/s//\1/p' | head -1` ;; @@ -1410,11 +4032,11 @@ path=//$path ;; esac - cat >> confdefs.h <>confdefs.h <<_ACEOF #define UD_SYSTEM_STDARG_H "$path" -EOF - - +_ACEOF + + for arg in misc; do case "$PORT_SUBDIRS" in *$arg*) @@ -1424,20 +4046,16 @@ ;; esac done - - + + else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - - echo "$ac_t""no" 1>&6 - cat >> confdefs.h <<\EOF -#define UD_NO_STDARG 1 -EOF + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + $as_echo "#define UD_NO_STDARG 1" >>confdefs.h echo "#include " > conftestpath.c # - # We add additional `/'s to the header file name to preclude compiler + # We add additional `/'s to the header file name to preclude compiler # warnings about the non-portability of `#include "/usr/include/..."'. # case `uname -s`${GCC-} in @@ -1451,7 +4069,7 @@ # AIX 4.1's cc(1) makes the following complaint: # ld: 0711-317 ERROR: Undefined symbol: .main # - # AIX 4.1's ksh(1) has problems with `2>&5' so we redirect to + # AIX 4.1's ksh(1) has problems with `2>&5' so we redirect to # /dev/null. # $CC_MAKEDEPEND $CPPFLAGS conftestpath.c 2>/dev/null @@ -1464,7 +4082,7 @@ # HP-UX's C compiler doesn't have a dependency-generation option, # so we use another method. # - path=`$CC -E $CPPFLAGS conftestpath.c 2>&5 | + path=`$CC -E $CPPFLAGS conftestpath.c 2>&5 | sed -n '/[^\/]*\(\/[^ ]*varargs\.h\).*/s//\1/p' | head -1` ;; @@ -1482,12 +4100,12 @@ path=//$path ;; esac - cat >> confdefs.h <>confdefs.h <<_ACEOF #define UD_SYSTEM_STDARG_H "$path" -EOF +_ACEOF + + - - for arg in misc; do case "$PORT_SUBDIRS" in *$arg*) @@ -1497,114 +4115,112 @@ ;; esac done - - - + + + fi -rm -f conftest* - echo $ac_n "checking for standard C string generation""... $ac_c" 1>&6 -echo "configure:1507: checking for standard C string generation" >&5 - cat > conftest.$ac_ext <&5 +$as_echo_n "checking for standard C string generation... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ # define MAKESTRING(x) #x -int main() { +int +main () +{ char *cp = MAKESTRING(foo); -; return 0; } -EOF -if { (eval echo configure:1516: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - echo "$ac_t""yes" 1>&6 -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - - echo "$ac_t""no" 1>&6 + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } UD_NO_HASH="1" -cat >> confdefs.h <<\EOF -#define UD_NO_HASH 1 -EOF +$as_echo "#define UD_NO_HASH 1" >>confdefs.h + + - - fi -rm -f conftest* - echo $ac_n "checking for standard C token pasting""... $ac_c" 1>&6 -echo "configure:1536: checking for standard C token pasting" >&5 - cat > conftest.$ac_ext <&5 +$as_echo_n "checking for standard C token pasting... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ #define GLUE(a,b) a ## b -int main() { +int +main () +{ char *GLUE(c,p) = "foo"; -; return 0; } -EOF -if { (eval echo configure:1545: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - echo "$ac_t""yes" 1>&6 -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - - echo "$ac_t""no" 1>&6 + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } UD_NO_HASHHASH="1" -cat >> confdefs.h <<\EOF -#define UD_NO_HASHHASH 1 -EOF +$as_echo "#define UD_NO_HASHHASH 1" >>confdefs.h + + - - fi -rm -f conftest* +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - echo $ac_n "checking C void pointer""... $ac_c" 1>&6 -echo "configure:1566: checking C void pointer" >&5 - cat > conftest.$ac_ext <&5 +$as_echo_n "checking C void pointer... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ -int main() { +int +main () +{ extern void *foo(); -; return 0; } -EOF -if { (eval echo configure:1575: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - echo "$ac_t""yes" 1>&6 -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - - echo "$ac_t""no" 1>&6 + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } UD_NO_VOIDSTAR="1" -cat >> confdefs.h <<\EOF -#define UD_NO_VOIDSTAR 1 -EOF +$as_echo "#define UD_NO_VOIDSTAR 1" >>confdefs.h + + - - fi -rm -f conftest* +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + + ac_config_headers="$ac_config_headers port/misc/udposix.h" + + + + + + + + + + + + - - - - - - - - - - - - - - for arg in udposix.h.in; do case "$PORT_MANIFEST" in *$arg*) @@ -1620,39 +4236,47 @@ # doesn't understand the "u" option. # Extract the first word of "ar", so it can be a program name with args. set dummy ar; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1625: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_AR+set}" = set; then : + $as_echo_n "(cached) " >&6 else if test -n "$AR"; then ac_cv_prog_AR="$AR" # Let the user override the test. else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_AR="ar" - break - fi +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_AR="ar" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done done - IFS="$ac_save_ifs" +IFS=$as_save_IFS + fi fi -AR="$ac_cv_prog_AR" +AR=$ac_cv_prog_AR if test -n "$AR"; then - echo "$ac_t""$AR" 1>&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 +$as_echo "$AR" >&6; } else - echo "$ac_t""no" 1>&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi + if test -z "$AR"; then echo "AR:library utility:/bin/ar" >> confdefs.missing fi - echo $ac_n "checking for tar flags""... $ac_c" 1>&6 -echo "configure:1656: checking for tar flags" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tar flags" >&5 +$as_echo_n "checking for tar flags... " >&6; } case "$OPSYS" in aix*) TARFLAGS=-chf @@ -1664,47 +4288,111 @@ TARFLAGS=-chof ;; esac -echo "$ac_t""$TARFLAGS" 1>&6 - - # Extract the first word of "ranlib", so it can be a program name with args. -set dummy ranlib; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1673: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $TARFLAGS" >&5 +$as_echo "$TARFLAGS" >&6; } + + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. +set dummy ${ac_tool_prefix}ranlib; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_RANLIB+set}" = set; then : + $as_echo_n "(cached) " >&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_RANLIB="ranlib" - break - fi +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done done - IFS="$ac_save_ifs" - test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" +IFS=$as_save_IFS + fi fi -RANLIB="$ac_cv_prog_RANLIB" +RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then - echo "$ac_t""$RANLIB" 1>&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 +$as_echo "$RANLIB" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_RANLIB"; then + ac_ct_RANLIB=$RANLIB + # Extract the first word of "ranlib", so it can be a program name with args. +set dummy ranlib; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_RANLIB"; then + ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_RANLIB="ranlib" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB +if test -n "$ac_ct_RANLIB"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 +$as_echo "$ac_ct_RANLIB" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_RANLIB" = x; then + RANLIB=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + RANLIB=$ac_ct_RANLIB + fi else - echo "$ac_t""no" 1>&6 + RANLIB="$ac_cv_prog_RANLIB" fi - echo $ac_n "checking binary distribution directory""... $ac_c" 1>&6 -echo "configure:1701: checking binary distribution directory" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking binary distribution directory" >&5 +$as_echo_n "checking binary distribution directory... " >&6; } case ${FTPBINDIR-unset} in unset) system=`system 2>/dev/null || echo dummy_system` FTPBINDIR=${FTPDIR-/home/ftp}/pub/binary/$system ;; esac - echo "$ac_t""$FTPBINDIR" 1>&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FTPBINDIR" >&5 +$as_echo "$FTPBINDIR" >&6; } for arg in port/Makefile; do case "$CONFIG_FILES" in @@ -1741,7 +4429,7 @@ PORT_SUBDIRS=${PORT_SUBDIRS-""} - + for arg in misc/all; do case "$PORT_ALL" in *$arg*) @@ -1783,7 +4471,7 @@ done - + PORT_CPP_LDM=${PORT_CPP_LDM-""} udportdir=`pwd`/port/misc @@ -1807,15 +4495,15 @@ esac ;; esac - + unset udportdir - echo $ac_n "checking the installation prefix""... $ac_c" 1>&6 -echo "configure:1817: checking the installation prefix" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking the installation prefix" >&5 +$as_echo_n "checking the installation prefix... " >&6; } case ${prefix-} in - NONE|'') prefix=`case ".." in + NONE|'') prefix=`case ".." in /*) echo ..; exit;; *) path=\`pwd\`/.. tail= @@ -1828,14 +4516,16 @@ esac `;; esac - echo "$ac_t""$prefix" 1>&6 - echo $ac_n "checking the installation exec-prefix""... $ac_c" 1>&6 -echo "configure:1834: checking the installation exec-prefix" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $prefix" >&5 +$as_echo "$prefix" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking the installation exec-prefix" >&5 +$as_echo_n "checking the installation exec-prefix... " >&6; } case ${exec_prefix-} in NONE|'') exec_prefix=$prefix;; esac - echo "$ac_t""$exec_prefix" 1>&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $exec_prefix" >&5 +$as_echo "$exec_prefix" >&6; } CFLAGS=${CFLAGS-"-g"} @@ -1849,82 +4539,152 @@ # doesn't understand the "u" option. # Extract the first word of "ar", so it can be a program name with args. set dummy ar; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1854: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_AR+set}" = set; then : + $as_echo_n "(cached) " >&6 else if test -n "$AR"; then ac_cv_prog_AR="$AR" # Let the user override the test. else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_AR="ar" - break - fi +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_AR="ar" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done done - IFS="$ac_save_ifs" +IFS=$as_save_IFS + fi fi -AR="$ac_cv_prog_AR" +AR=$ac_cv_prog_AR if test -n "$AR"; then - echo "$ac_t""$AR" 1>&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 +$as_echo "$AR" >&6; } else - echo "$ac_t""no" 1>&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi + if test -z "$AR"; then echo "AR:library utility:/bin/ar" >> confdefs.missing fi -# Extract the first word of "ranlib", so it can be a program name with args. -set dummy ranlib; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1887: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. +set dummy ${ac_tool_prefix}ranlib; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_RANLIB+set}" = set; then : + $as_echo_n "(cached) " >&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_RANLIB="ranlib" - break - fi +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done done - IFS="$ac_save_ifs" - test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" +IFS=$as_save_IFS + fi fi -RANLIB="$ac_cv_prog_RANLIB" +RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then - echo "$ac_t""$RANLIB" 1>&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 +$as_echo "$RANLIB" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_RANLIB"; then + ac_ct_RANLIB=$RANLIB + # Extract the first word of "ranlib", so it can be a program name with args. +set dummy ranlib; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then : + $as_echo_n "(cached) " >&6 else - echo "$ac_t""no" 1>&6 + if test -n "$ac_ct_RANLIB"; then + ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_RANLIB="ranlib" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB +if test -n "$ac_ct_RANLIB"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 +$as_echo "$ac_ct_RANLIB" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_RANLIB" = x; then + RANLIB=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + RANLIB=$ac_ct_RANLIB + fi +else + RANLIB="$ac_cv_prog_RANLIB" fi - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + # # Ensure that the CC variable is unset so that it can be # set here rather than by the autoconf-generated @@ -1938,141 +4698,173 @@ AIX) for ac_prog in c89 xlc cc gcc do -# Extract the first word of "$ac_prog", so it can be a program name with args. + # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1945: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_CC+set}" = set; then : + $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_CC="$ac_prog" - break - fi +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done done - IFS="$ac_save_ifs" +IFS=$as_save_IFS + fi fi -CC="$ac_cv_prog_CC" +CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$ac_t""$CC" 1>&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } else - echo "$ac_t""no" 1>&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -test -n "$CC" && break + + test -n "$CC" && break done ;; HP-UX) for ac_prog in c89 cc gcc do -# Extract the first word of "$ac_prog", so it can be a program name with args. + # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1980: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_CC+set}" = set; then : + $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_CC="$ac_prog" - break - fi +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done done - IFS="$ac_save_ifs" +IFS=$as_save_IFS + fi fi -CC="$ac_cv_prog_CC" +CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$ac_t""$CC" 1>&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } else - echo "$ac_t""no" 1>&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -test -n "$CC" && break + + test -n "$CC" && break done ;; IRIX*) for ac_prog in cc gcc do -# Extract the first word of "$ac_prog", so it can be a program name with args. + # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2015: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_CC+set}" = set; then : + $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_CC="$ac_prog" - break - fi +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done done - IFS="$ac_save_ifs" +IFS=$as_save_IFS + fi fi -CC="$ac_cv_prog_CC" +CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$ac_t""$CC" 1>&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } else - echo "$ac_t""no" 1>&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -test -n "$CC" && break + + test -n "$CC" && break done ;; OSF1|ULTRIX) for ac_prog in cc gcc do -# Extract the first word of "$ac_prog", so it can be a program name with args. + # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2050: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_CC+set}" = set; then : + $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_CC="$ac_prog" - break - fi +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done done - IFS="$ac_save_ifs" +IFS=$as_save_IFS + fi fi -CC="$ac_cv_prog_CC" +CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$ac_t""$CC" 1>&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } else - echo "$ac_t""no" 1>&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -test -n "$CC" && break + + test -n "$CC" && break done case "$CC" in cc) @@ -2099,71 +4891,87 @@ 4*) for ac_prog in acc cc gcc do -# Extract the first word of "$ac_prog", so it can be a program name with args. + # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2106: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_CC+set}" = set; then : + $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_CC="$ac_prog" - break - fi +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done done - IFS="$ac_save_ifs" +IFS=$as_save_IFS + fi fi -CC="$ac_cv_prog_CC" +CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$ac_t""$CC" 1>&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } else - echo "$ac_t""no" 1>&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -test -n "$CC" && break + + test -n "$CC" && break done ;; 5*) for ac_prog in cc gcc do -# Extract the first word of "$ac_prog", so it can be a program name with args. + # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2141: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_CC+set}" = set; then : + $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_CC="$ac_prog" - break - fi +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done done - IFS="$ac_save_ifs" +IFS=$as_save_IFS + fi fi -CC="$ac_cv_prog_CC" +CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$ac_t""$CC" 1>&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } else - echo "$ac_t""no" 1>&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -test -n "$CC" && break + + test -n "$CC" && break done # # The following is commented-out because @@ -2186,44 +4994,53 @@ *) for ac_prog in c89 cc gcc do -# Extract the first word of "$ac_prog", so it can be a program name with args. + # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2193: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_CC+set}" = set; then : + $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_CC="$ac_prog" - break - fi +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done done - IFS="$ac_save_ifs" +IFS=$as_save_IFS + fi fi -CC="$ac_cv_prog_CC" +CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$ac_t""$CC" 1>&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } else - echo "$ac_t""no" 1>&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -test -n "$CC" && break + + test -n "$CC" && break done ;; esac ;; *) - echo $ac_n "checking for C compiler""... $ac_c" 1>&6 -echo "configure:2226: checking for C compiler" >&5 - echo "$ac_t""$CC" 1>&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler" >&5 +$as_echo_n "checking for C compiler... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } ;; esac case "${CC-}" in @@ -2252,9 +5069,7 @@ ;; esac done - cat >> confdefs.h <<\EOF -#define _ALL_SOURCE 1 -EOF + $as_echo "#define _ALL_SOURCE 1" >>confdefs.h ;; HP-UX) for arg in -D_HPUX_SOURCE; do @@ -2266,9 +5081,7 @@ ;; esac done - cat >> confdefs.h <<\EOF -#define _HPUX_SOURCE 1 -EOF + $as_echo "#define _HPUX_SOURCE 1" >>confdefs.h ;; esac ;; @@ -2280,71 +5093,87 @@ aix*) for ac_prog in $fc f77 cf77 do -# Extract the first word of "$ac_prog", so it can be a program name with args. + # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2287: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_FC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_FC+set}" = set; then : + $as_echo_n "(cached) " >&6 else if test -n "$FC"; then ac_cv_prog_FC="$FC" # Let the user override the test. else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_FC="$ac_prog" - break - fi +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_FC="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done done - IFS="$ac_save_ifs" +IFS=$as_save_IFS + fi fi -FC="$ac_cv_prog_FC" +FC=$ac_cv_prog_FC if test -n "$FC"; then - echo "$ac_t""$FC" 1>&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FC" >&5 +$as_echo "$FC" >&6; } else - echo "$ac_t""no" 1>&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -test -n "$FC" && break + + test -n "$FC" && break done ;; hpux*) for ac_prog in $fc fort77 fortc f77 do -# Extract the first word of "$ac_prog", so it can be a program name with args. + # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2322: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_FC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_FC+set}" = set; then : + $as_echo_n "(cached) " >&6 else if test -n "$FC"; then ac_cv_prog_FC="$FC" # Let the user override the test. else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_FC="$ac_prog" - break - fi +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_FC="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done done - IFS="$ac_save_ifs" +IFS=$as_save_IFS + fi fi -FC="$ac_cv_prog_FC" +FC=$ac_cv_prog_FC if test -n "$FC"; then - echo "$ac_t""$FC" 1>&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FC" >&5 +$as_echo "$FC" >&6; } else - echo "$ac_t""no" 1>&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -test -n "$FC" && break + + test -n "$FC" && break done for arg in +U77; do case "$FFLAGS" in @@ -2368,36 +5197,44 @@ dgux*) for ac_prog in $fc ghf77 f77 do -# Extract the first word of "$ac_prog", so it can be a program name with args. + # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2375: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_FC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_FC+set}" = set; then : + $as_echo_n "(cached) " >&6 else if test -n "$FC"; then ac_cv_prog_FC="$FC" # Let the user override the test. else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_FC="$ac_prog" - break - fi +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_FC="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done done - IFS="$ac_save_ifs" +IFS=$as_save_IFS + fi fi -FC="$ac_cv_prog_FC" +FC=$ac_cv_prog_FC if test -n "$FC"; then - echo "$ac_t""$FC" 1>&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FC" >&5 +$as_echo "$FC" >&6; } else - echo "$ac_t""no" 1>&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -test -n "$FC" && break + + test -n "$FC" && break done LD_FORTRAN=${LD_FORTRAN-""} @@ -2405,36 +5242,44 @@ sunos*) for ac_prog in $fc f77 cf77 do -# Extract the first word of "$ac_prog", so it can be a program name with args. + # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2412: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_FC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_FC+set}" = set; then : + $as_echo_n "(cached) " >&6 else if test -n "$FC"; then ac_cv_prog_FC="$FC" # Let the user override the test. else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_FC="$ac_prog" - break - fi +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_FC="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done done - IFS="$ac_save_ifs" +IFS=$as_save_IFS + fi fi -FC="$ac_cv_prog_FC" +FC=$ac_cv_prog_FC if test -n "$FC"; then - echo "$ac_t""$FC" 1>&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FC" >&5 +$as_echo "$FC" >&6; } else - echo "$ac_t""no" 1>&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -test -n "$FC" && break + + test -n "$FC" && break done LD_FORTRAN=${LD_FORTRAN-""} @@ -2442,36 +5287,44 @@ irix5*) for ac_prog in $fc f77 cf77 do -# Extract the first word of "$ac_prog", so it can be a program name with args. + # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2449: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_FC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_FC+set}" = set; then : + $as_echo_n "(cached) " >&6 else if test -n "$FC"; then ac_cv_prog_FC="$FC" # Let the user override the test. else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_FC="$ac_prog" - break - fi +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_FC="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done done - IFS="$ac_save_ifs" +IFS=$as_save_IFS + fi fi -FC="$ac_cv_prog_FC" +FC=$ac_cv_prog_FC if test -n "$FC"; then - echo "$ac_t""$FC" 1>&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FC" >&5 +$as_echo "$FC" >&6; } else - echo "$ac_t""no" 1>&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -test -n "$FC" && break + + test -n "$FC" && break done LD_FORTRAN=${LD_FORTRAN-"-tl -Bstatic"} @@ -2479,36 +5332,44 @@ *) for ac_prog in $fc f77 cf77 fort77 do -# Extract the first word of "$ac_prog", so it can be a program name with args. + # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2486: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_FC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_FC+set}" = set; then : + $as_echo_n "(cached) " >&6 else if test -n "$FC"; then ac_cv_prog_FC="$FC" # Let the user override the test. else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_FC="$ac_prog" - break - fi +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_FC="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done done - IFS="$ac_save_ifs" +IFS=$as_save_IFS + fi fi -FC="$ac_cv_prog_FC" +FC=$ac_cv_prog_FC if test -n "$FC"; then - echo "$ac_t""$FC" 1>&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FC" >&5 +$as_echo "$FC" >&6; } else - echo "$ac_t""no" 1>&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -test -n "$FC" && break + + test -n "$FC" && break done LD_FORTRAN=${LD_FORTRAN-""} @@ -2518,216 +5379,553 @@ echo "FC:FORTRAN compiler:/bin/f77" >> confdefs.missing fi else - echo $ac_n "checking for FORTRAN compiler""... $ac_c" 1>&6 -echo "configure:2523: checking for FORTRAN compiler" >&5 - echo "$ac_t""$FC" 1>&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FORTRAN compiler" >&5 +$as_echo_n "checking for FORTRAN compiler... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FC" >&5 +$as_echo "$FC" >&6; } fi - echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:2529: checking how to run the C preprocessor" >&5 + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 +$as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then -if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + if test "${ac_cv_prog_CPP+set}" = set; then : + $as_echo_n "(cached) " >&6 else - # This must be in double quotes, not single quotes, because CPP may get - # substituted into the Makefile and "${CC-cc}" will confuse make. - CPP="${CC-cc} -E" + # Double quotes because CPP needs to be expanded + for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" + do + ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. - cat > conftest.$ac_ext < -Syntax Error -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2550: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - : -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - CPP="${CC-cc} -E -traditional-cpp" - cat > conftest.$ac_ext < -Syntax Error -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2567: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - : -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - CPP="${CC-cc} -nologo -E" - cat > conftest.$ac_ext < -Syntax Error -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2584: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - : -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - CPP=/lib/cpp + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + +else + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + # Broken: success on invalid input. +continue +else + # Passes both tests. +ac_preproc_ok=: +break fi -rm -f conftest* +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : + break fi -rm -f conftest* + + done + ac_cv_prog_CPP=$CPP + fi -rm -f conftest* - ac_cv_prog_CPP="$CPP" + CPP=$ac_cv_prog_CPP +else + ac_cv_prog_CPP=$CPP +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 +$as_echo "$CPP" >&6; } +ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + +else + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + # Broken: success on invalid input. +continue +else + # Passes both tests. +ac_preproc_ok=: +break fi - CPP="$ac_cv_prog_CPP" +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : + else - ac_cv_prog_CPP="$CPP" + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error "C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details." "$LINENO" 5; } fi -echo "$ac_t""$CPP" 1>&6 - echo $ac_n "checking the C preprocessor""... $ac_c" 1>&6 -echo "configure:2608: checking the C preprocessor" >&5 - cat > conftest.$ac_ext <&5 +$as_echo_n "checking the C preprocessor... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ #include -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2615: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - echo "$ac_t""works" 1>&6 -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - - echo "configure: warning: C preprocessor, \`$CPP', doesn't work" 1>&2 +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: works" >&5 +$as_echo "works" >&6; } +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C preprocessor, \`$CPP', doesn't work" >&5 +$as_echo "$as_me: WARNING: C preprocessor, \`$CPP', doesn't work" >&2;} echo "CPP:C preprocessor:/lib/cpp" >> confdefs.missing - + fi -rm -f conftest* - +rm -f conftest.err conftest.$ac_ext + # Extract the first word of "neqn", so it can be a program name with args. set dummy neqn; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2637: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_NEQN'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_NEQN+set}" = set; then : + $as_echo_n "(cached) " >&6 else if test -n "$NEQN"; then ac_cv_prog_NEQN="$NEQN" # Let the user override the test. else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_NEQN="neqn" - break - fi +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_NEQN="neqn" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done done - IFS="$ac_save_ifs" +IFS=$as_save_IFS + test -z "$ac_cv_prog_NEQN" && ac_cv_prog_NEQN="cat" fi fi -NEQN="$ac_cv_prog_NEQN" +NEQN=$ac_cv_prog_NEQN if test -n "$NEQN"; then - echo "$ac_t""$NEQN" 1>&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NEQN" >&5 +$as_echo "$NEQN" >&6; } else - echo "$ac_t""no" 1>&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -test "$NEQN" = cat && - echo "configure: warning: $0: Can't find program \`neqn'; setting to \`cat'" 1>&2 + +test "$NEQN" = cat && + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $0: Can't find program \`neqn'; setting to \`cat'" >&5 +$as_echo "$as_me: WARNING: $0: Can't find program \`neqn'; setting to \`cat'" >&2;} # Extract the first word of "tbl", so it can be a program name with args. set dummy tbl; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2669: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_TBL'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_TBL+set}" = set; then : + $as_echo_n "(cached) " >&6 else if test -n "$TBL"; then ac_cv_prog_TBL="$TBL" # Let the user override the test. else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_TBL="tbl" - break - fi +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_TBL="tbl" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done done - IFS="$ac_save_ifs" +IFS=$as_save_IFS + test -z "$ac_cv_prog_TBL" && ac_cv_prog_TBL="cat" fi fi -TBL="$ac_cv_prog_TBL" +TBL=$ac_cv_prog_TBL if test -n "$TBL"; then - echo "$ac_t""$TBL" 1>&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TBL" >&5 +$as_echo "$TBL" >&6; } else - echo "$ac_t""no" 1>&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -test "$TBL" = cat && - echo "configure: warning: $0: Can't find program \`tbl'; setting to \`cat'" 1>&2 + +test "$TBL" = cat && + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $0: Can't find program \`tbl'; setting to \`cat'" >&5 +$as_echo "$as_me: WARNING: $0: Can't find program \`tbl'; setting to \`cat'" >&2;} # Extract the first word of "troff", so it can be a program name with args. set dummy troff; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2701: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_TROFF'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_TROFF+set}" = set; then : + $as_echo_n "(cached) " >&6 else if test -n "$TROFF"; then ac_cv_prog_TROFF="$TROFF" # Let the user override the test. else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_TROFF="ptroff" - break - fi +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_TROFF="ptroff" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done done - IFS="$ac_save_ifs" +IFS=$as_save_IFS + test -z "$ac_cv_prog_TROFF" && ac_cv_prog_TROFF="troff" fi fi -TROFF="$ac_cv_prog_TROFF" +TROFF=$ac_cv_prog_TROFF if test -n "$TROFF"; then - echo "$ac_t""$TROFF" 1>&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TROFF" >&5 +$as_echo "$TROFF" >&6; } else - echo "$ac_t""no" 1>&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi + if test -z "$TROFF"; then echo "TROFF:troff(1)-like utility:/bin/troff" >> confdefs.missing fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 +$as_echo_n "checking for grep that handles long lines and -e... " >&6; } +if test "${ac_cv_path_GREP+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -z "$GREP"; then + ac_path_GREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in grep ggrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue +# Check for GNU ac_path_GREP and select it if it is found. + # Check for GNU $ac_path_GREP +case `"$ac_path_GREP" --version 2>&1` in +*GNU*) + ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo 'GREP' >> "conftest.nl" + "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_GREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_GREP="$ac_path_GREP" + ac_path_GREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_GREP_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_GREP"; then + as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi +else + ac_cv_path_GREP=$GREP +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 +$as_echo "$ac_cv_path_GREP" >&6; } + GREP="$ac_cv_path_GREP" + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 +$as_echo_n "checking for egrep... " >&6; } +if test "${ac_cv_path_EGREP+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 + then ac_cv_path_EGREP="$GREP -E" + else + if test -z "$EGREP"; then + ac_path_EGREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in egrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue +# Check for GNU ac_path_EGREP and select it if it is found. + # Check for GNU $ac_path_EGREP +case `"$ac_path_EGREP" --version 2>&1` in +*GNU*) + ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo 'EGREP' >> "conftest.nl" + "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_EGREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_EGREP="$ac_path_EGREP" + ac_path_EGREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_EGREP_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_EGREP"; then + as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi +else + ac_cv_path_EGREP=$EGREP +fi + + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 +$as_echo "$ac_cv_path_EGREP" >&6; } + EGREP="$ac_cv_path_EGREP" + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 +$as_echo_n "checking for ANSI C header files... " >&6; } +if test "${ac_cv_header_stdc+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#include +#include + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_header_stdc=yes +else + ac_cv_header_stdc=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "memchr" >/dev/null 2>&1; then : + +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "free" >/dev/null 2>&1; then : + +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. + if test "$cross_compiling" = yes; then : + : +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#if ((' ' & 0x0FF) == 0x020) +# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#else +# define ISLOWER(c) \ + (('a' <= (c) && (c) <= 'i') \ + || ('j' <= (c) && (c) <= 'r') \ + || ('s' <= (c) && (c) <= 'z')) +# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) +#endif + +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +int +main () +{ + int i; + for (i = 0; i < 256; i++) + if (XOR (islower (i), ISLOWER (i)) + || toupper (i) != TOUPPER (i)) + return 2; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + +else + ac_cv_header_stdc=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 +$as_echo "$ac_cv_header_stdc" >&6; } +if test $ac_cv_header_stdc = yes; then + +$as_echo "#define STDC_HEADERS 1" >>confdefs.h + +fi + +# On IRIX 5.3, sys/types and inttypes.h are conflicting. +for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ + inttypes.h stdint.h unistd.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default +" +eval as_val=\$$as_ac_Header + if test "x$as_val" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + for arg in stddef.h.in; do case "$PORT_MANIFEST" in *$arg*) @@ -2748,7 +5946,7 @@ done echo "#include " > conftestpath.c # - # We add additional `/'s to the header file name to preclude compiler + # We add additional `/'s to the header file name to preclude compiler # warnings about the non-portability of `#include "/usr/include/..."'. # case `uname -s`${GCC-} in @@ -2762,7 +5960,7 @@ # AIX 4.1's cc(1) makes the following complaint: # ld: 0711-317 ERROR: Undefined symbol: .main # - # AIX 4.1's ksh(1) has problems with `2>&5' so we redirect to + # AIX 4.1's ksh(1) has problems with `2>&5' so we redirect to # /dev/null. # $CC_MAKEDEPEND $CPPFLAGS conftestpath.c 2>/dev/null @@ -2775,7 +5973,7 @@ # HP-UX's C compiler doesn't have a dependency-generation option, # so we use another method. # - path=`$CC -E $CPPFLAGS conftestpath.c 2>&5 | + path=`$CC -E $CPPFLAGS conftestpath.c 2>&5 | sed -n '/[^\/]*\(\/[^ ]*stddef\.h\).*/s//\1/p' | head -1` ;; @@ -2793,11 +5991,11 @@ path=//$path ;; esac - cat >> confdefs.h <>confdefs.h <<_ACEOF #define UD_SYSTEM_STDDEF_H "$path" -EOF - - +_ACEOF + + for arg in misc; do case "$PORT_SUBDIRS" in *$arg*) @@ -2807,165 +6005,109 @@ ;; esac done - ac_safe=`echo "stddef.h" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for stddef.h""... $ac_c" 1>&6 -echo "configure:2813: checking for stddef.h" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2823: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 + ac_fn_c_check_header_mongrel "$LINENO" "stddef.h" "ac_cv_header_stddef_h" "$ac_includes_default" +if test "x$ac_cv_header_stddef_h" = x""yes; then : found=yes else - echo "$ac_t""no" 1>&6 -found=no + found=no fi + case $found in yes) - echo $ac_n "checking C header file for typedef size_t""... $ac_c" 1>&6 -echo "configure:2848: checking C header file for typedef size_t" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking C header file for typedef size_t" >&5 +$as_echo_n "checking C header file for typedef size_t... " >&6; } echo '#include ' >conftest.c if ($CPP conftest.c | grep size_t >/dev/null) 2>&5; then - echo "$ac_t""declared" 1>&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: declared" >&5 +$as_echo "declared" >&6; } rm conftest.c else - cat > conftest.$ac_ext <conftest.$ac_ext +/* end confdefs.h. */ #include int size_t; - -int main() { -; return 0; } -EOF -if { (eval echo configure:2864: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - - echo "$ac_t""undeclared" 1>&6 - cat >> confdefs.h <<\EOF -#define UD_NO_STDDEF_H_SIZE_T 1 -EOF - - -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - echo "$ac_t""declared" 1>&6 - +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: undeclared" >&5 +$as_echo "undeclared" >&6; } + $as_echo "#define UD_NO_STDDEF_H_SIZE_T 1" >>confdefs.h + + +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: declared" >&5 +$as_echo "declared" >&6; } + fi -rm -f conftest* +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi ;; no) - cat >> confdefs.h <<\EOF -#define UD_NO_STDDEF_H_SIZE_T 1 -EOF + $as_echo "#define UD_NO_STDDEF_H_SIZE_T 1" >>confdefs.h ;; esac - ac_safe=`echo "stddef.h" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for stddef.h""... $ac_c" 1>&6 -echo "configure:2892: checking for stddef.h" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2902: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 + ac_fn_c_check_header_mongrel "$LINENO" "stddef.h" "ac_cv_header_stddef_h" "$ac_includes_default" +if test "x$ac_cv_header_stddef_h" = x""yes; then : found=yes else - echo "$ac_t""no" 1>&6 -found=no + found=no fi + case $found in yes) - echo $ac_n "checking C header file for typedef ptrdiff_t""... $ac_c" 1>&6 -echo "configure:2927: checking C header file for typedef ptrdiff_t" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking C header file for typedef ptrdiff_t" >&5 +$as_echo_n "checking C header file for typedef ptrdiff_t... " >&6; } echo '#include ' >conftest.c if ($CPP conftest.c | grep ptrdiff_t >/dev/null) 2>&5; then - echo "$ac_t""declared" 1>&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: declared" >&5 +$as_echo "declared" >&6; } rm conftest.c else - cat > conftest.$ac_ext <conftest.$ac_ext +/* end confdefs.h. */ #include int ptrdiff_t; - -int main() { -; return 0; } -EOF -if { (eval echo configure:2943: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - - echo "$ac_t""undeclared" 1>&6 - cat >> confdefs.h <<\EOF -#define UD_NO_STDDEF_H_PTRDIFF_T 1 -EOF - - -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - echo "$ac_t""declared" 1>&6 - +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: undeclared" >&5 +$as_echo "undeclared" >&6; } + $as_echo "#define UD_NO_STDDEF_H_PTRDIFF_T 1" >>confdefs.h + + +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: declared" >&5 +$as_echo "declared" >&6; } + fi -rm -f conftest* +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi ;; no) - cat >> confdefs.h <<\EOF -#define UD_NO_STDDEF_H_PTRDIFF_T 1 -EOF + $as_echo "#define UD_NO_STDDEF_H_PTRDIFF_T 1" >>confdefs.h ;; esac - + for arg in fortc misc; do case "$PORT_SUBDIRS" in *$arg*) @@ -3033,18 +6175,18 @@ FORTC="$dir/fortc" - - - - - - - - - - - - + + + + + + + + + + + + for arg in udposix.h.in; do case "$PORT_MANIFEST" in *$arg*) @@ -3076,7 +6218,7 @@ done echo "#include " > conftestpath.c # - # We add additional `/'s to the header file name to preclude compiler + # We add additional `/'s to the header file name to preclude compiler # warnings about the non-portability of `#include "/usr/include/..."'. # case `uname -s`${GCC-} in @@ -3090,7 +6232,7 @@ # AIX 4.1's cc(1) makes the following complaint: # ld: 0711-317 ERROR: Undefined symbol: .main # - # AIX 4.1's ksh(1) has problems with `2>&5' so we redirect to + # AIX 4.1's ksh(1) has problems with `2>&5' so we redirect to # /dev/null. # $CC_MAKEDEPEND $CPPFLAGS conftestpath.c 2>/dev/null @@ -3103,7 +6245,7 @@ # HP-UX's C compiler doesn't have a dependency-generation option, # so we use another method. # - path=`$CC -E $CPPFLAGS conftestpath.c 2>&5 | + path=`$CC -E $CPPFLAGS conftestpath.c 2>&5 | sed -n '/[^\/]*\(\/[^ ]*stddef\.h\).*/s//\1/p' | head -1` ;; @@ -3121,11 +6263,11 @@ path=//$path ;; esac - cat >> confdefs.h <>confdefs.h <<_ACEOF #define UD_SYSTEM_STDDEF_H "$path" -EOF - - +_ACEOF + + for arg in misc; do case "$PORT_SUBDIRS" in *$arg*) @@ -3135,165 +6277,109 @@ ;; esac done - ac_safe=`echo "stddef.h" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for stddef.h""... $ac_c" 1>&6 -echo "configure:3141: checking for stddef.h" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3151: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 + ac_fn_c_check_header_mongrel "$LINENO" "stddef.h" "ac_cv_header_stddef_h" "$ac_includes_default" +if test "x$ac_cv_header_stddef_h" = x""yes; then : found=yes else - echo "$ac_t""no" 1>&6 -found=no + found=no fi + case $found in yes) - echo $ac_n "checking C header file for typedef size_t""... $ac_c" 1>&6 -echo "configure:3176: checking C header file for typedef size_t" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking C header file for typedef size_t" >&5 +$as_echo_n "checking C header file for typedef size_t... " >&6; } echo '#include ' >conftest.c if ($CPP conftest.c | grep size_t >/dev/null) 2>&5; then - echo "$ac_t""declared" 1>&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: declared" >&5 +$as_echo "declared" >&6; } rm conftest.c else - cat > conftest.$ac_ext <conftest.$ac_ext +/* end confdefs.h. */ #include int size_t; - -int main() { -; return 0; } -EOF -if { (eval echo configure:3192: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - - echo "$ac_t""undeclared" 1>&6 - cat >> confdefs.h <<\EOF -#define UD_NO_STDDEF_H_SIZE_T 1 -EOF - - -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - echo "$ac_t""declared" 1>&6 - +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: undeclared" >&5 +$as_echo "undeclared" >&6; } + $as_echo "#define UD_NO_STDDEF_H_SIZE_T 1" >>confdefs.h + + +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: declared" >&5 +$as_echo "declared" >&6; } + fi -rm -f conftest* +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi ;; no) - cat >> confdefs.h <<\EOF -#define UD_NO_STDDEF_H_SIZE_T 1 -EOF + $as_echo "#define UD_NO_STDDEF_H_SIZE_T 1" >>confdefs.h ;; esac - ac_safe=`echo "stddef.h" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for stddef.h""... $ac_c" 1>&6 -echo "configure:3220: checking for stddef.h" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3230: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 + ac_fn_c_check_header_mongrel "$LINENO" "stddef.h" "ac_cv_header_stddef_h" "$ac_includes_default" +if test "x$ac_cv_header_stddef_h" = x""yes; then : found=yes else - echo "$ac_t""no" 1>&6 -found=no + found=no fi + case $found in yes) - echo $ac_n "checking C header file for typedef ptrdiff_t""... $ac_c" 1>&6 -echo "configure:3255: checking C header file for typedef ptrdiff_t" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking C header file for typedef ptrdiff_t" >&5 +$as_echo_n "checking C header file for typedef ptrdiff_t... " >&6; } echo '#include ' >conftest.c if ($CPP conftest.c | grep ptrdiff_t >/dev/null) 2>&5; then - echo "$ac_t""declared" 1>&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: declared" >&5 +$as_echo "declared" >&6; } rm conftest.c else - cat > conftest.$ac_ext <conftest.$ac_ext +/* end confdefs.h. */ #include int ptrdiff_t; - -int main() { -; return 0; } -EOF -if { (eval echo configure:3271: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - - echo "$ac_t""undeclared" 1>&6 - cat >> confdefs.h <<\EOF -#define UD_NO_STDDEF_H_PTRDIFF_T 1 -EOF - - -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - echo "$ac_t""declared" 1>&6 - +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: undeclared" >&5 +$as_echo "undeclared" >&6; } + $as_echo "#define UD_NO_STDDEF_H_PTRDIFF_T 1" >>confdefs.h + + +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: declared" >&5 +$as_echo "declared" >&6; } + fi -rm -f conftest* +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi ;; no) - cat >> confdefs.h <<\EOF -#define UD_NO_STDDEF_H_PTRDIFF_T 1 -EOF + $as_echo "#define UD_NO_STDDEF_H_PTRDIFF_T 1" >>confdefs.h ;; esac - + for arg in limits.h.in; do case "$PORT_MANIFEST" in *$arg*) @@ -3314,7 +6400,7 @@ done echo "#include " > conftestpath.c # - # We add additional `/'s to the header file name to preclude compiler + # We add additional `/'s to the header file name to preclude compiler # warnings about the non-portability of `#include "/usr/include/..."'. # case `uname -s`${GCC-} in @@ -3328,7 +6414,7 @@ # AIX 4.1's cc(1) makes the following complaint: # ld: 0711-317 ERROR: Undefined symbol: .main # - # AIX 4.1's ksh(1) has problems with `2>&5' so we redirect to + # AIX 4.1's ksh(1) has problems with `2>&5' so we redirect to # /dev/null. # $CC_MAKEDEPEND $CPPFLAGS conftestpath.c 2>/dev/null @@ -3341,7 +6427,7 @@ # HP-UX's C compiler doesn't have a dependency-generation option, # so we use another method. # - path=`$CC -E $CPPFLAGS conftestpath.c 2>&5 | + path=`$CC -E $CPPFLAGS conftestpath.c 2>&5 | sed -n '/[^\/]*\(\/[^ ]*limits\.h\).*/s//\1/p' | head -1` ;; @@ -3359,11 +6445,11 @@ path=//$path ;; esac - cat >> confdefs.h <>confdefs.h <<_ACEOF #define UD_SYSTEM_LIMITS_H "$path" -EOF - - +_ACEOF + + for arg in misc; do case "$PORT_SUBDIRS" in *$arg*) @@ -3373,7 +6459,7 @@ ;; esac done - + for arg in signal.h.in sigaction.c sigaddset.c sigdelset.c sigemptyset.c sigfillset.c sigismember.c sigpending.c sigprocmask.c sigsuspend.c ; do case "$PORT_MANIFEST" in *$arg*) @@ -3385,7 +6471,7 @@ done echo "#include " > conftestpath.c # - # We add additional `/'s to the header file name to preclude compiler + # We add additional `/'s to the header file name to preclude compiler # warnings about the non-portability of `#include "/usr/include/..."'. # case `uname -s`${GCC-} in @@ -3399,7 +6485,7 @@ # AIX 4.1's cc(1) makes the following complaint: # ld: 0711-317 ERROR: Undefined symbol: .main # - # AIX 4.1's ksh(1) has problems with `2>&5' so we redirect to + # AIX 4.1's ksh(1) has problems with `2>&5' so we redirect to # /dev/null. # $CC_MAKEDEPEND $CPPFLAGS conftestpath.c 2>/dev/null @@ -3412,7 +6498,7 @@ # HP-UX's C compiler doesn't have a dependency-generation option, # so we use another method. # - path=`$CC -E $CPPFLAGS conftestpath.c 2>&5 | + path=`$CC -E $CPPFLAGS conftestpath.c 2>&5 | sed -n '/[^\/]*\(\/[^ ]*signal\.h\).*/s//\1/p' | head -1` ;; @@ -3430,11 +6516,11 @@ path=//$path ;; esac - cat >> confdefs.h <>confdefs.h <<_ACEOF #define UD_SYSTEM_SIGNAL_H "$path" -EOF - - +_ACEOF + + for arg in misc; do case "$PORT_SUBDIRS" in *$arg*) @@ -3444,373 +6530,207 @@ ;; esac done - ac_safe=`echo "signal.h" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for signal.h""... $ac_c" 1>&6 -echo "configure:3450: checking for signal.h" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3460: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 + ac_fn_c_check_header_mongrel "$LINENO" "signal.h" "ac_cv_header_signal_h" "$ac_includes_default" +if test "x$ac_cv_header_signal_h" = x""yes; then : found=yes else - echo "$ac_t""no" 1>&6 -found=no + found=no fi + case $found in yes) - echo $ac_n "checking C header file for typedef sigset_t""... $ac_c" 1>&6 -echo "configure:3485: checking C header file for typedef sigset_t" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking C header file for typedef sigset_t" >&5 +$as_echo_n "checking C header file for typedef sigset_t... " >&6; } echo '#include ' >conftest.c if ($CPP conftest.c | grep sigset_t >/dev/null) 2>&5; then - echo "$ac_t""declared" 1>&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: declared" >&5 +$as_echo "declared" >&6; } rm conftest.c else - cat > conftest.$ac_ext <conftest.$ac_ext +/* end confdefs.h. */ #include int sigset_t; - -int main() { -; return 0; } -EOF -if { (eval echo configure:3501: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - - echo "$ac_t""undeclared" 1>&6 - cat >> confdefs.h <<\EOF -#define UD_NO_SIGNAL_H_SIGSET_T 1 -EOF - - -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - echo "$ac_t""declared" 1>&6 - +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: undeclared" >&5 +$as_echo "undeclared" >&6; } + $as_echo "#define UD_NO_SIGNAL_H_SIGSET_T 1" >>confdefs.h + + +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: declared" >&5 +$as_echo "declared" >&6; } + fi -rm -f conftest* +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi ;; no) - cat >> confdefs.h <<\EOF -#define UD_NO_SIGNAL_H_SIGSET_T 1 -EOF + $as_echo "#define UD_NO_SIGNAL_H_SIGSET_T 1" >>confdefs.h ;; esac - ac_safe=`echo "signal.h" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for signal.h""... $ac_c" 1>&6 -echo "configure:3529: checking for signal.h" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3539: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 + ac_fn_c_check_header_mongrel "$LINENO" "signal.h" "ac_cv_header_signal_h" "$ac_includes_default" +if test "x$ac_cv_header_signal_h" = x""yes; then : found=yes else - echo "$ac_t""no" 1>&6 -found=no + found=no fi + case $found in yes) - echo $ac_n "checking C header file for typedef sig_atomic_t""... $ac_c" 1>&6 -echo "configure:3564: checking C header file for typedef sig_atomic_t" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking C header file for typedef sig_atomic_t" >&5 +$as_echo_n "checking C header file for typedef sig_atomic_t... " >&6; } echo '#include ' >conftest.c if ($CPP conftest.c | grep sig_atomic_t >/dev/null) 2>&5; then - echo "$ac_t""declared" 1>&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: declared" >&5 +$as_echo "declared" >&6; } rm conftest.c else - cat > conftest.$ac_ext <conftest.$ac_ext +/* end confdefs.h. */ #include int sig_atomic_t; - -int main() { -; return 0; } -EOF -if { (eval echo configure:3580: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - - echo "$ac_t""undeclared" 1>&6 - cat >> confdefs.h <<\EOF -#define UD_NO_SIGNAL_H_SIG_ATOMIC_T 1 -EOF - - -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - echo "$ac_t""declared" 1>&6 - +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: undeclared" >&5 +$as_echo "undeclared" >&6; } + $as_echo "#define UD_NO_SIGNAL_H_SIG_ATOMIC_T 1" >>confdefs.h + + +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: declared" >&5 +$as_echo "declared" >&6; } + fi -rm -f conftest* +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi ;; no) - cat >> confdefs.h <<\EOF -#define UD_NO_SIGNAL_H_SIG_ATOMIC_T 1 -EOF + $as_echo "#define UD_NO_SIGNAL_H_SIG_ATOMIC_T 1" >>confdefs.h ;; esac - echo $ac_n "checking C header file for structure sigaction""... $ac_c" 1>&6 -echo "configure:3607: checking C header file for structure sigaction" >&5 - cat > conftest.$ac_ext < for structure sigaction" >&5 +$as_echo_n "checking C header file for structure sigaction... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ #include struct sigaction {char *foo;}; - -int main() { -; return 0; } -EOF -if { (eval echo configure:3618: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - - echo "$ac_t""undeclared" 1>&6 - cat >> confdefs.h <<\EOF -#define UD_NO_SIGACTION_STRUCT 1 -EOF - - -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - echo "$ac_t""declared" 1>&6 - -fi -rm -f conftest* - for ac_func in sigaction -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3638: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); +int +main () +{ -int main() { + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -$ac_func(); -#endif + { $as_echo "$as_me:${as_lineno-$LINENO}: result: undeclared" >&5 +$as_echo "undeclared" >&6; } + $as_echo "#define UD_NO_SIGACTION_STRUCT 1" >>confdefs.h + + +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: declared" >&5 +$as_echo "declared" >&6; } -; return 0; } -EOF -if { (eval echo configure:3666: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + for ac_func in sigaction +do : + ac_fn_c_check_func "$LINENO" "sigaction" "ac_cv_func_sigaction" +if test "x$ac_cv_func_sigaction" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_SIGACTION 1 +_ACEOF + +else + case " $LIBOBJS " in + *" $ac_func.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" + ;; +esac -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 -LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}" fi done - ac_safe=`echo "signal.h" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for signal.h""... $ac_c" 1>&6 -echo "configure:3693: checking for signal.h" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3703: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - echo $ac_n "checking C header file for function sigaction()""... $ac_c" 1>&6 -echo "configure:3720: checking C header file for function sigaction()" >&5 - cat > conftest.$ac_ext < for function sigaction()" >&5 +$as_echo_n "checking C header file for function sigaction()... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ #include extern struct {int a; int b;} *sigaction(); - -int main() { -; return 0; } -EOF -if { (eval echo configure:3731: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - echo "$ac_t""undeclared" 1>&6 +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: undeclared" >&5 +$as_echo "undeclared" >&6; } UD_NO_SIGACTION_DECL="1" -cat >> confdefs.h <<\EOF -#define UD_NO_SIGACTION_DECL 1 -EOF +$as_echo "#define UD_NO_SIGACTION_DECL 1" >>confdefs.h - -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - echo "$ac_t""declared" 1>&6 - -fi -rm -f conftest* -else - echo "$ac_t""no" 1>&6 - - UD_NO_SIGACTION_DECL="1" -cat >> confdefs.h <<\EOF -#define UD_NO_SIGACTION_DECL 1 -EOF +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: declared" >&5 +$as_echo "declared" >&6; } - fi - - case "$UD_NO_SIGACTION_DECL" in - 1) - for ac_func in sigvec sigblock sigpause sigsetmask sigstack bsdsigp -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3766: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +else + + UD_NO_SIGACTION_DECL="1" +$as_echo "#define UD_NO_SIGACTION_DECL 1" >>confdefs.h + -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -$ac_func(); -#endif -; return 0; } -EOF -if { (eval echo configure:3794: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* fi -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 + + case "$UD_NO_SIGACTION_DECL" in + 1) + for ac_func in sigvec sigblock sigpause sigsetmask sigstack bsdsigp +do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +eval as_val=\$$as_ac_var + if test "x$as_val" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + fi done ;; @@ -3836,7 +6756,7 @@ done echo "#include " > conftestpath.c # - # We add additional `/'s to the header file name to preclude compiler + # We add additional `/'s to the header file name to preclude compiler # warnings about the non-portability of `#include "/usr/include/..."'. # case `uname -s`${GCC-} in @@ -3850,7 +6770,7 @@ # AIX 4.1's cc(1) makes the following complaint: # ld: 0711-317 ERROR: Undefined symbol: .main # - # AIX 4.1's ksh(1) has problems with `2>&5' so we redirect to + # AIX 4.1's ksh(1) has problems with `2>&5' so we redirect to # /dev/null. # $CC_MAKEDEPEND $CPPFLAGS conftestpath.c 2>/dev/null @@ -3863,7 +6783,7 @@ # HP-UX's C compiler doesn't have a dependency-generation option, # so we use another method. # - path=`$CC -E $CPPFLAGS conftestpath.c 2>&5 | + path=`$CC -E $CPPFLAGS conftestpath.c 2>&5 | sed -n '/[^\/]*\(\/[^ ]*stdlib\.h\).*/s//\1/p' | head -1` ;; @@ -3881,11 +6801,11 @@ path=//$path ;; esac - cat >> confdefs.h <>confdefs.h <<_ACEOF #define UD_SYSTEM_STDLIB_H "$path" -EOF - - +_ACEOF + + for arg in misc; do case "$PORT_SUBDIRS" in *$arg*) @@ -3895,336 +6815,174 @@ ;; esac done - ac_safe=`echo "stdlib.h" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for stdlib.h""... $ac_c" 1>&6 -echo "configure:3901: checking for stdlib.h" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3911: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 + ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default" +if test "x$ac_cv_header_stdlib_h" = x""yes; then : found=yes else - echo "$ac_t""no" 1>&6 -found=no + found=no fi + case $found in yes) - echo $ac_n "checking C header file for typedef size_t""... $ac_c" 1>&6 -echo "configure:3936: checking C header file for typedef size_t" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking C header file for typedef size_t" >&5 +$as_echo_n "checking C header file for typedef size_t... " >&6; } echo '#include ' >conftest.c if ($CPP conftest.c | grep size_t >/dev/null) 2>&5; then - echo "$ac_t""declared" 1>&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: declared" >&5 +$as_echo "declared" >&6; } rm conftest.c else - cat > conftest.$ac_ext <conftest.$ac_ext +/* end confdefs.h. */ #include int size_t; - -int main() { -; return 0; } -EOF -if { (eval echo configure:3952: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - - echo "$ac_t""undeclared" 1>&6 - cat >> confdefs.h <<\EOF -#define UD_NO_STDLIB_H_SIZE_T 1 -EOF - - -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - echo "$ac_t""declared" 1>&6 - +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: undeclared" >&5 +$as_echo "undeclared" >&6; } + $as_echo "#define UD_NO_STDLIB_H_SIZE_T 1" >>confdefs.h + + +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: declared" >&5 +$as_echo "declared" >&6; } + fi -rm -f conftest* +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi ;; no) - cat >> confdefs.h <<\EOF -#define UD_NO_STDLIB_H_SIZE_T 1 -EOF + $as_echo "#define UD_NO_STDLIB_H_SIZE_T 1" >>confdefs.h ;; esac for ac_func in atexit -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3981: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -$ac_func(); -#endif +do : + ac_fn_c_check_func "$LINENO" "atexit" "ac_cv_func_atexit" +if test "x$ac_cv_func_atexit" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_ATEXIT 1 +_ACEOF -; return 0; } -EOF -if { (eval echo configure:4009: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi +else + case " $LIBOBJS " in + *" $ac_func.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" + ;; +esac -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 -LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}" fi done - ac_safe=`echo "stdlib.h" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for stdlib.h""... $ac_c" 1>&6 -echo "configure:4036: checking for stdlib.h" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4046: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - echo $ac_n "checking C header file for function atexit()""... $ac_c" 1>&6 -echo "configure:4063: checking C header file for function atexit()" >&5 - cat > conftest.$ac_ext < for function atexit()" >&5 +$as_echo_n "checking C header file for function atexit()... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ #include extern struct {int a; int b;} *atexit(); - -int main() { -; return 0; } -EOF -if { (eval echo configure:4074: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - echo "$ac_t""undeclared" 1>&6 +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: undeclared" >&5 +$as_echo "undeclared" >&6; } UD_NO_ATEXIT_DECL="1" -cat >> confdefs.h <<\EOF -#define UD_NO_ATEXIT_DECL 1 -EOF +$as_echo "#define UD_NO_ATEXIT_DECL 1" >>confdefs.h + - else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - echo "$ac_t""declared" 1>&6 - + { $as_echo "$as_me:${as_lineno-$LINENO}: result: declared" >&5 +$as_echo "declared" >&6; } + fi -rm -f conftest* +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else - echo "$ac_t""no" 1>&6 - + UD_NO_ATEXIT_DECL="1" -cat >> confdefs.h <<\EOF -#define UD_NO_ATEXIT_DECL 1 -EOF +$as_echo "#define UD_NO_ATEXIT_DECL 1" >>confdefs.h - -fi - for ac_func in getenv -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4106: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); -int main() { +fi -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -$ac_func(); -#endif + for ac_func in getenv +do : + ac_fn_c_check_func "$LINENO" "getenv" "ac_cv_func_getenv" +if test "x$ac_cv_func_getenv" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_GETENV 1 +_ACEOF -; return 0; } -EOF -if { (eval echo configure:4134: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi +else + case " $LIBOBJS " in + *" $ac_func.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" + ;; +esac -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 -LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}" fi done - ac_safe=`echo "stdlib.h" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for stdlib.h""... $ac_c" 1>&6 -echo "configure:4161: checking for stdlib.h" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4171: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - echo $ac_n "checking C header file for function getenv()""... $ac_c" 1>&6 -echo "configure:4188: checking C header file for function getenv()" >&5 - cat > conftest.$ac_ext < for function getenv()" >&5 +$as_echo_n "checking C header file for function getenv()... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ #include extern struct {int a; int b;} *getenv(); - -int main() { -; return 0; } -EOF -if { (eval echo configure:4199: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - echo "$ac_t""undeclared" 1>&6 +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: undeclared" >&5 +$as_echo "undeclared" >&6; } UD_NO_GETENV_DECL="1" -cat >> confdefs.h <<\EOF -#define UD_NO_GETENV_DECL 1 -EOF +$as_echo "#define UD_NO_GETENV_DECL 1" >>confdefs.h + - else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - echo "$ac_t""declared" 1>&6 - + { $as_echo "$as_me:${as_lineno-$LINENO}: result: declared" >&5 +$as_echo "declared" >&6; } + fi -rm -f conftest* +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else - echo "$ac_t""no" 1>&6 - + UD_NO_GETENV_DECL="1" -cat >> confdefs.h <<\EOF -#define UD_NO_GETENV_DECL 1 -EOF +$as_echo "#define UD_NO_GETENV_DECL 1" >>confdefs.h + - fi - + + for arg in strerror.c strstr.c string.h.in memmove.c; do case "$PORT_MANIFEST" in *$arg*) @@ -4245,7 +7003,7 @@ done echo "#include " > conftestpath.c # - # We add additional `/'s to the header file name to preclude compiler + # We add additional `/'s to the header file name to preclude compiler # warnings about the non-portability of `#include "/usr/include/..."'. # case `uname -s`${GCC-} in @@ -4259,7 +7017,7 @@ # AIX 4.1's cc(1) makes the following complaint: # ld: 0711-317 ERROR: Undefined symbol: .main # - # AIX 4.1's ksh(1) has problems with `2>&5' so we redirect to + # AIX 4.1's ksh(1) has problems with `2>&5' so we redirect to # /dev/null. # $CC_MAKEDEPEND $CPPFLAGS conftestpath.c 2>/dev/null @@ -4272,7 +7030,7 @@ # HP-UX's C compiler doesn't have a dependency-generation option, # so we use another method. # - path=`$CC -E $CPPFLAGS conftestpath.c 2>&5 | + path=`$CC -E $CPPFLAGS conftestpath.c 2>&5 | sed -n '/[^\/]*\(\/[^ ]*string\.h\).*/s//\1/p' | head -1` ;; @@ -4290,11 +7048,11 @@ path=//$path ;; esac - cat >> confdefs.h <>confdefs.h <<_ACEOF #define UD_SYSTEM_STRING_H "$path" -EOF - - +_ACEOF + + for arg in misc; do case "$PORT_SUBDIRS" in *$arg*) @@ -4304,806 +7062,432 @@ ;; esac done - ac_safe=`echo "string.h" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for string.h""... $ac_c" 1>&6 -echo "configure:4310: checking for string.h" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4320: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 + ac_fn_c_check_header_mongrel "$LINENO" "string.h" "ac_cv_header_string_h" "$ac_includes_default" +if test "x$ac_cv_header_string_h" = x""yes; then : found=yes else - echo "$ac_t""no" 1>&6 -found=no + found=no fi + case $found in yes) - echo $ac_n "checking C header file for typedef size_t""... $ac_c" 1>&6 -echo "configure:4345: checking C header file for typedef size_t" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking C header file for typedef size_t" >&5 +$as_echo_n "checking C header file for typedef size_t... " >&6; } echo '#include ' >conftest.c if ($CPP conftest.c | grep size_t >/dev/null) 2>&5; then - echo "$ac_t""declared" 1>&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: declared" >&5 +$as_echo "declared" >&6; } rm conftest.c else - cat > conftest.$ac_ext <conftest.$ac_ext +/* end confdefs.h. */ #include int size_t; - -int main() { -; return 0; } -EOF -if { (eval echo configure:4361: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - - echo "$ac_t""undeclared" 1>&6 - cat >> confdefs.h <<\EOF -#define UD_NO_STRING_H_SIZE_T 1 -EOF - - -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - echo "$ac_t""declared" 1>&6 - +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: undeclared" >&5 +$as_echo "undeclared" >&6; } + $as_echo "#define UD_NO_STRING_H_SIZE_T 1" >>confdefs.h + + +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: declared" >&5 +$as_echo "declared" >&6; } + fi -rm -f conftest* +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi ;; no) - cat >> confdefs.h <<\EOF -#define UD_NO_STRING_H_SIZE_T 1 -EOF + $as_echo "#define UD_NO_STRING_H_SIZE_T 1" >>confdefs.h ;; esac for ac_func in strerror -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4390: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -$ac_func(); -#endif +do : + ac_fn_c_check_func "$LINENO" "strerror" "ac_cv_func_strerror" +if test "x$ac_cv_func_strerror" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_STRERROR 1 +_ACEOF -; return 0; } -EOF -if { (eval echo configure:4418: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi +else + case " $LIBOBJS " in + *" $ac_func.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" + ;; +esac -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 -LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}" fi done - ac_safe=`echo "string.h" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for string.h""... $ac_c" 1>&6 -echo "configure:4445: checking for string.h" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4455: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - echo $ac_n "checking C header file for function strerror()""... $ac_c" 1>&6 -echo "configure:4472: checking C header file for function strerror()" >&5 - cat > conftest.$ac_ext < for function strerror()" >&5 +$as_echo_n "checking C header file for function strerror()... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ #include extern struct {int a; int b;} *strerror(); - -int main() { -; return 0; } -EOF -if { (eval echo configure:4483: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - echo "$ac_t""undeclared" 1>&6 +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: undeclared" >&5 +$as_echo "undeclared" >&6; } UD_NO_STRERROR_DECL="1" -cat >> confdefs.h <<\EOF -#define UD_NO_STRERROR_DECL 1 -EOF +$as_echo "#define UD_NO_STRERROR_DECL 1" >>confdefs.h + - else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - echo "$ac_t""declared" 1>&6 - + { $as_echo "$as_me:${as_lineno-$LINENO}: result: declared" >&5 +$as_echo "declared" >&6; } + fi -rm -f conftest* +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else - echo "$ac_t""no" 1>&6 - + UD_NO_STRERROR_DECL="1" -cat >> confdefs.h <<\EOF -#define UD_NO_STRERROR_DECL 1 -EOF - - - -fi - ac_safe=`echo "string.h" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for string.h""... $ac_c" 1>&6 -echo "configure:4514: checking for string.h" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4524: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* +$as_echo "#define UD_NO_STRERROR_DECL 1" >>confdefs.h + + + fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - echo $ac_n "checking C header file for function strchr()""... $ac_c" 1>&6 -echo "configure:4541: checking C header file for function strchr()" >&5 - cat > conftest.$ac_ext < for function strchr()" >&5 +$as_echo_n "checking C header file for function strchr()... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ #include extern struct {int a; int b;} *strchr(); - -int main() { -; return 0; } -EOF -if { (eval echo configure:4552: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - echo "$ac_t""undeclared" 1>&6 +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: undeclared" >&5 +$as_echo "undeclared" >&6; } UD_NO_STRCHR_DECL="1" -cat >> confdefs.h <<\EOF -#define UD_NO_STRCHR_DECL 1 -EOF +$as_echo "#define UD_NO_STRCHR_DECL 1" >>confdefs.h + - else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - echo "$ac_t""declared" 1>&6 - + { $as_echo "$as_me:${as_lineno-$LINENO}: result: declared" >&5 +$as_echo "declared" >&6; } + fi -rm -f conftest* +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else - echo "$ac_t""no" 1>&6 - + UD_NO_STRCHR_DECL="1" -cat >> confdefs.h <<\EOF -#define UD_NO_STRCHR_DECL 1 -EOF - - - -fi - ac_safe=`echo "string.h" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for string.h""... $ac_c" 1>&6 -echo "configure:4583: checking for string.h" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4593: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* +$as_echo "#define UD_NO_STRCHR_DECL 1" >>confdefs.h + + + fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - echo $ac_n "checking C header file for function strcpy()""... $ac_c" 1>&6 -echo "configure:4610: checking C header file for function strcpy()" >&5 - cat > conftest.$ac_ext < for function strcpy()" >&5 +$as_echo_n "checking C header file for function strcpy()... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ #include extern struct {int a; int b;} *strcpy(); - -int main() { -; return 0; } -EOF -if { (eval echo configure:4621: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - echo "$ac_t""undeclared" 1>&6 +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: undeclared" >&5 +$as_echo "undeclared" >&6; } UD_NO_STRCPY_DECL="1" -cat >> confdefs.h <<\EOF -#define UD_NO_STRCPY_DECL 1 -EOF +$as_echo "#define UD_NO_STRCPY_DECL 1" >>confdefs.h + - else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - echo "$ac_t""declared" 1>&6 - + { $as_echo "$as_me:${as_lineno-$LINENO}: result: declared" >&5 +$as_echo "declared" >&6; } + fi -rm -f conftest* +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else - echo "$ac_t""no" 1>&6 - + UD_NO_STRCPY_DECL="1" -cat >> confdefs.h <<\EOF -#define UD_NO_STRCPY_DECL 1 -EOF - - - -fi - ac_safe=`echo "string.h" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for string.h""... $ac_c" 1>&6 -echo "configure:4652: checking for string.h" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4662: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* +$as_echo "#define UD_NO_STRCPY_DECL 1" >>confdefs.h + + + fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - echo $ac_n "checking C header file for function strrchr()""... $ac_c" 1>&6 -echo "configure:4679: checking C header file for function strrchr()" >&5 - cat > conftest.$ac_ext < for function strrchr()" >&5 +$as_echo_n "checking C header file for function strrchr()... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ #include extern struct {int a; int b;} *strrchr(); - -int main() { -; return 0; } -EOF -if { (eval echo configure:4690: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - echo "$ac_t""undeclared" 1>&6 +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: undeclared" >&5 +$as_echo "undeclared" >&6; } UD_NO_STRRCHR_DECL="1" -cat >> confdefs.h <<\EOF -#define UD_NO_STRRCHR_DECL 1 -EOF +$as_echo "#define UD_NO_STRRCHR_DECL 1" >>confdefs.h + - else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - echo "$ac_t""declared" 1>&6 - + { $as_echo "$as_me:${as_lineno-$LINENO}: result: declared" >&5 +$as_echo "declared" >&6; } + fi -rm -f conftest* +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else - echo "$ac_t""no" 1>&6 - + UD_NO_STRRCHR_DECL="1" -cat >> confdefs.h <<\EOF -#define UD_NO_STRRCHR_DECL 1 -EOF - - - -fi - ac_safe=`echo "string.h" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for string.h""... $ac_c" 1>&6 -echo "configure:4721: checking for string.h" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4731: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* +$as_echo "#define UD_NO_STRRCHR_DECL 1" >>confdefs.h + + + fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - echo $ac_n "checking C header file for function strncpy()""... $ac_c" 1>&6 -echo "configure:4748: checking C header file for function strncpy()" >&5 - cat > conftest.$ac_ext < for function strncpy()" >&5 +$as_echo_n "checking C header file for function strncpy()... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ #include extern struct {int a; int b;} *strncpy(); - -int main() { -; return 0; } -EOF -if { (eval echo configure:4759: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - echo "$ac_t""undeclared" 1>&6 +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: undeclared" >&5 +$as_echo "undeclared" >&6; } UD_NO_STRNCPY_DECL="1" -cat >> confdefs.h <<\EOF -#define UD_NO_STRNCPY_DECL 1 -EOF +$as_echo "#define UD_NO_STRNCPY_DECL 1" >>confdefs.h + - else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - echo "$ac_t""declared" 1>&6 - + { $as_echo "$as_me:${as_lineno-$LINENO}: result: declared" >&5 +$as_echo "declared" >&6; } + fi -rm -f conftest* +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else - echo "$ac_t""no" 1>&6 - + UD_NO_STRNCPY_DECL="1" -cat >> confdefs.h <<\EOF -#define UD_NO_STRNCPY_DECL 1 -EOF - - - -fi - ac_safe=`echo "string.h" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for string.h""... $ac_c" 1>&6 -echo "configure:4790: checking for string.h" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4800: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* +$as_echo "#define UD_NO_STRNCPY_DECL 1" >>confdefs.h + + + fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - echo $ac_n "checking C header file for function strtok()""... $ac_c" 1>&6 -echo "configure:4817: checking C header file for function strtok()" >&5 - cat > conftest.$ac_ext < for function strtok()" >&5 +$as_echo_n "checking C header file for function strtok()... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ #include extern struct {int a; int b;} *strtok(); - -int main() { -; return 0; } -EOF -if { (eval echo configure:4828: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - echo "$ac_t""undeclared" 1>&6 +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: undeclared" >&5 +$as_echo "undeclared" >&6; } UD_NO_STRTOK_DECL="1" -cat >> confdefs.h <<\EOF -#define UD_NO_STRTOK_DECL 1 -EOF +$as_echo "#define UD_NO_STRTOK_DECL 1" >>confdefs.h + - else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - echo "$ac_t""declared" 1>&6 - + { $as_echo "$as_me:${as_lineno-$LINENO}: result: declared" >&5 +$as_echo "declared" >&6; } + fi -rm -f conftest* +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else - echo "$ac_t""no" 1>&6 - + UD_NO_STRTOK_DECL="1" -cat >> confdefs.h <<\EOF -#define UD_NO_STRTOK_DECL 1 -EOF +$as_echo "#define UD_NO_STRTOK_DECL 1" >>confdefs.h - -fi - for ac_func in strstr -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4860: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); -int main() { +fi -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -$ac_func(); -#endif + for ac_func in strstr +do : + ac_fn_c_check_func "$LINENO" "strstr" "ac_cv_func_strstr" +if test "x$ac_cv_func_strstr" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_STRSTR 1 +_ACEOF -; return 0; } -EOF -if { (eval echo configure:4888: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi +else + case " $LIBOBJS " in + *" $ac_func.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" + ;; +esac -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 -LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}" fi done - ac_safe=`echo "string.h" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for string.h""... $ac_c" 1>&6 -echo "configure:4915: checking for string.h" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4925: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - echo $ac_n "checking C header file for function strstr()""... $ac_c" 1>&6 -echo "configure:4942: checking C header file for function strstr()" >&5 - cat > conftest.$ac_ext < for function strstr()" >&5 +$as_echo_n "checking C header file for function strstr()... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ #include extern struct {int a; int b;} *strstr(); - -int main() { -; return 0; } -EOF -if { (eval echo configure:4953: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - echo "$ac_t""undeclared" 1>&6 +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: undeclared" >&5 +$as_echo "undeclared" >&6; } UD_NO_STRSTR_DECL="1" -cat >> confdefs.h <<\EOF -#define UD_NO_STRSTR_DECL 1 -EOF +$as_echo "#define UD_NO_STRSTR_DECL 1" >>confdefs.h + - else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - echo "$ac_t""declared" 1>&6 - + { $as_echo "$as_me:${as_lineno-$LINENO}: result: declared" >&5 +$as_echo "declared" >&6; } + fi -rm -f conftest* +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else - echo "$ac_t""no" 1>&6 - + UD_NO_STRSTR_DECL="1" -cat >> confdefs.h <<\EOF -#define UD_NO_STRSTR_DECL 1 -EOF +$as_echo "#define UD_NO_STRSTR_DECL 1" >>confdefs.h - -fi - for ac_func in memmove -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4985: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); -int main() { +fi -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -$ac_func(); -#endif + for ac_func in memmove +do : + ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove" +if test "x$ac_cv_func_memmove" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_MEMMOVE 1 +_ACEOF -; return 0; } -EOF -if { (eval echo configure:5013: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi +else + case " $LIBOBJS " in + *" $ac_func.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" + ;; +esac -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 -LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}" fi done - ac_safe=`echo "string.h" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for string.h""... $ac_c" 1>&6 -echo "configure:5040: checking for string.h" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:5050: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - echo $ac_n "checking C header file for function memmove()""... $ac_c" 1>&6 -echo "configure:5067: checking C header file for function memmove()" >&5 - cat > conftest.$ac_ext < for function memmove()" >&5 +$as_echo_n "checking C header file for function memmove()... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ #include extern struct {int a; int b;} *memmove(); - -int main() { -; return 0; } -EOF -if { (eval echo configure:5078: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - echo "$ac_t""undeclared" 1>&6 +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: undeclared" >&5 +$as_echo "undeclared" >&6; } UD_NO_MEMMOVE_DECL="1" -cat >> confdefs.h <<\EOF -#define UD_NO_MEMMOVE_DECL 1 -EOF +$as_echo "#define UD_NO_MEMMOVE_DECL 1" >>confdefs.h + - else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - echo "$ac_t""declared" 1>&6 - + { $as_echo "$as_me:${as_lineno-$LINENO}: result: declared" >&5 +$as_echo "declared" >&6; } + fi -rm -f conftest* +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else - echo "$ac_t""no" 1>&6 - + UD_NO_MEMMOVE_DECL="1" -cat >> confdefs.h <<\EOF -#define UD_NO_MEMMOVE_DECL 1 -EOF +$as_echo "#define UD_NO_MEMMOVE_DECL 1" >>confdefs.h + - fi - + + for arg in difftime.c strftime.c time.h.in; do case "$PORT_MANIFEST" in *$arg*) @@ -5115,7 +7499,7 @@ done echo "#include " > conftestpath.c # - # We add additional `/'s to the header file name to preclude compiler + # We add additional `/'s to the header file name to preclude compiler # warnings about the non-portability of `#include "/usr/include/..."'. # case `uname -s`${GCC-} in @@ -5129,7 +7513,7 @@ # AIX 4.1's cc(1) makes the following complaint: # ld: 0711-317 ERROR: Undefined symbol: .main # - # AIX 4.1's ksh(1) has problems with `2>&5' so we redirect to + # AIX 4.1's ksh(1) has problems with `2>&5' so we redirect to # /dev/null. # $CC_MAKEDEPEND $CPPFLAGS conftestpath.c 2>/dev/null @@ -5142,7 +7526,7 @@ # HP-UX's C compiler doesn't have a dependency-generation option, # so we use another method. # - path=`$CC -E $CPPFLAGS conftestpath.c 2>&5 | + path=`$CC -E $CPPFLAGS conftestpath.c 2>&5 | sed -n '/[^\/]*\(\/[^ ]*time\.h\).*/s//\1/p' | head -1` ;; @@ -5160,11 +7544,11 @@ path=//$path ;; esac - cat >> confdefs.h <>confdefs.h <<_ACEOF #define UD_SYSTEM_TIME_H "$path" -EOF - - +_ACEOF + + for arg in misc; do case "$PORT_SUBDIRS" in *$arg*) @@ -5174,418 +7558,228 @@ ;; esac done - ac_safe=`echo "time.h" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for time.h""... $ac_c" 1>&6 -echo "configure:5180: checking for time.h" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:5190: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 + ac_fn_c_check_header_mongrel "$LINENO" "time.h" "ac_cv_header_time_h" "$ac_includes_default" +if test "x$ac_cv_header_time_h" = x""yes; then : found=yes else - echo "$ac_t""no" 1>&6 -found=no + found=no fi + case $found in yes) - echo $ac_n "checking C header file for typedef time_t""... $ac_c" 1>&6 -echo "configure:5215: checking C header file for typedef time_t" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking C header file for typedef time_t" >&5 +$as_echo_n "checking C header file for typedef time_t... " >&6; } echo '#include ' >conftest.c if ($CPP conftest.c | grep time_t >/dev/null) 2>&5; then - echo "$ac_t""declared" 1>&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: declared" >&5 +$as_echo "declared" >&6; } rm conftest.c else - cat > conftest.$ac_ext <conftest.$ac_ext +/* end confdefs.h. */ #include int time_t; - -int main() { -; return 0; } -EOF -if { (eval echo configure:5231: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - - echo "$ac_t""undeclared" 1>&6 - cat >> confdefs.h <<\EOF -#define UD_NO_TIME_H_TIME_T 1 -EOF - - -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - echo "$ac_t""declared" 1>&6 - +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: undeclared" >&5 +$as_echo "undeclared" >&6; } + $as_echo "#define UD_NO_TIME_H_TIME_T 1" >>confdefs.h + + +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: declared" >&5 +$as_echo "declared" >&6; } + fi -rm -f conftest* +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi ;; no) - cat >> confdefs.h <<\EOF -#define UD_NO_TIME_H_TIME_T 1 -EOF + $as_echo "#define UD_NO_TIME_H_TIME_T 1" >>confdefs.h ;; esac - ac_safe=`echo "time.h" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for time.h""... $ac_c" 1>&6 -echo "configure:5259: checking for time.h" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:5269: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 + ac_fn_c_check_header_mongrel "$LINENO" "time.h" "ac_cv_header_time_h" "$ac_includes_default" +if test "x$ac_cv_header_time_h" = x""yes; then : found=yes else - echo "$ac_t""no" 1>&6 -found=no + found=no fi + case $found in yes) - echo $ac_n "checking C header file for typedef size_t""... $ac_c" 1>&6 -echo "configure:5294: checking C header file for typedef size_t" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking C header file for typedef size_t" >&5 +$as_echo_n "checking C header file for typedef size_t... " >&6; } echo '#include ' >conftest.c if ($CPP conftest.c | grep size_t >/dev/null) 2>&5; then - echo "$ac_t""declared" 1>&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: declared" >&5 +$as_echo "declared" >&6; } rm conftest.c else - cat > conftest.$ac_ext <conftest.$ac_ext +/* end confdefs.h. */ #include int size_t; - -int main() { -; return 0; } -EOF -if { (eval echo configure:5310: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - - echo "$ac_t""undeclared" 1>&6 - cat >> confdefs.h <<\EOF -#define UD_NO_TIME_H_SIZE_T 1 -EOF - - -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - echo "$ac_t""declared" 1>&6 - +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: undeclared" >&5 +$as_echo "undeclared" >&6; } + $as_echo "#define UD_NO_TIME_H_SIZE_T 1" >>confdefs.h + + +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: declared" >&5 +$as_echo "declared" >&6; } + fi -rm -f conftest* +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi ;; no) - cat >> confdefs.h <<\EOF -#define UD_NO_TIME_H_SIZE_T 1 -EOF + $as_echo "#define UD_NO_TIME_H_SIZE_T 1" >>confdefs.h ;; esac for ac_func in difftime -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5339: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -$ac_func(); -#endif +do : + ac_fn_c_check_func "$LINENO" "difftime" "ac_cv_func_difftime" +if test "x$ac_cv_func_difftime" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_DIFFTIME 1 +_ACEOF -; return 0; } -EOF -if { (eval echo configure:5367: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi +else + case " $LIBOBJS " in + *" $ac_func.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" + ;; +esac -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 -LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}" fi done - ac_safe=`echo "time.h" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for time.h""... $ac_c" 1>&6 -echo "configure:5394: checking for time.h" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:5404: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - echo $ac_n "checking C header file for function difftime()""... $ac_c" 1>&6 -echo "configure:5421: checking C header file for function difftime()" >&5 - cat > conftest.$ac_ext < for function difftime()" >&5 +$as_echo_n "checking C header file for function difftime()... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ #include extern struct {int a; int b;} *difftime(); - -int main() { -; return 0; } -EOF -if { (eval echo configure:5432: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - echo "$ac_t""undeclared" 1>&6 +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: undeclared" >&5 +$as_echo "undeclared" >&6; } UD_NO_DIFFTIME_DECL="1" -cat >> confdefs.h <<\EOF -#define UD_NO_DIFFTIME_DECL 1 -EOF +$as_echo "#define UD_NO_DIFFTIME_DECL 1" >>confdefs.h + - else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - echo "$ac_t""declared" 1>&6 - + { $as_echo "$as_me:${as_lineno-$LINENO}: result: declared" >&5 +$as_echo "declared" >&6; } + fi -rm -f conftest* +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else - echo "$ac_t""no" 1>&6 - + UD_NO_DIFFTIME_DECL="1" -cat >> confdefs.h <<\EOF -#define UD_NO_DIFFTIME_DECL 1 -EOF +$as_echo "#define UD_NO_DIFFTIME_DECL 1" >>confdefs.h - -fi - for ac_func in strftime -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5464: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); -int main() { +fi -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -$ac_func(); -#endif + for ac_func in strftime +do : + ac_fn_c_check_func "$LINENO" "strftime" "ac_cv_func_strftime" +if test "x$ac_cv_func_strftime" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_STRFTIME 1 +_ACEOF -; return 0; } -EOF -if { (eval echo configure:5492: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi +else + case " $LIBOBJS " in + *" $ac_func.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" + ;; +esac -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 -LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}" fi done - ac_safe=`echo "time.h" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for time.h""... $ac_c" 1>&6 -echo "configure:5519: checking for time.h" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:5529: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - echo $ac_n "checking C header file for function strftime()""... $ac_c" 1>&6 -echo "configure:5546: checking C header file for function strftime()" >&5 - cat > conftest.$ac_ext < for function strftime()" >&5 +$as_echo_n "checking C header file for function strftime()... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ #include extern struct {int a; int b;} *strftime(); - -int main() { -; return 0; } -EOF -if { (eval echo configure:5557: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - echo "$ac_t""undeclared" 1>&6 +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: undeclared" >&5 +$as_echo "undeclared" >&6; } UD_NO_STRFTIME_DECL="1" -cat >> confdefs.h <<\EOF -#define UD_NO_STRFTIME_DECL 1 -EOF +$as_echo "#define UD_NO_STRFTIME_DECL 1" >>confdefs.h + - else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - echo "$ac_t""declared" 1>&6 - + { $as_echo "$as_me:${as_lineno-$LINENO}: result: declared" >&5 +$as_echo "declared" >&6; } + fi -rm -f conftest* +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else - echo "$ac_t""no" 1>&6 - + UD_NO_STRFTIME_DECL="1" -cat >> confdefs.h <<\EOF -#define UD_NO_STRFTIME_DECL 1 -EOF +$as_echo "#define UD_NO_STRFTIME_DECL 1" >>confdefs.h + - fi - -echo $ac_n "checking for X11 header-files""... $ac_c" 1>&6 -echo "configure:5589: checking for X11 header-files" >&5 + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X11 header-files" >&5 +$as_echo_n "checking for X11 header-files... " >&6; } if test -z "$CPP_X11"; then for dir in ${OPENWINHOME-/usr/openwin}/include /usr/include /usr/include /usr/local/include; do if test -r $dir/X11/Xlib.h; then @@ -5603,43 +7797,47 @@ *) echo -I${CPP_X11-};; esac` -echo "$ac_t""$CPP_X11" 1>&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP_X11" >&5 +$as_echo "$CPP_X11" >&6; } - echo $ac_n "checking for X11 library""... $ac_c" 1>&6 -echo "configure:5610: checking for X11 library" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X11 library" >&5 +$as_echo_n "checking for X11 library... " >&6; } case "${LD_X11+set}" in set) - echo "$ac_t""$LD_X11" 1>&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD_X11" >&5 +$as_echo "$LD_X11" >&6; } ;; *) - echo "$ac_t""" 1>&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5 +$as_echo "" >&6; } LIBS_save=$LIBS found=no - echo $ac_n "checking for XNoOp(0) in default library(s)""... $ac_c" 1>&6 -echo "configure:5620: checking for XNoOp(0) in default library(s)" >&5 - cat > conftest.$ac_ext <&5 +$as_echo_n "checking for XNoOp(0) in default library(s)... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ -int main() { +int +main () +{ XNoOp(0); -; return 0; } -EOF -if { (eval echo configure:5629: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - - echo "$ac_t""yes" 1>&6 + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } LD_X11= found=yes - + else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - - echo "$ac_t""no" 1>&6 + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } os=`uname -s` - for dir in '' ${OPENWINHOME-/usr/openwin}/lib /usr/lib/X11 /usr/X11/lib /usr/lib/X11R5 /usr/local/lib /usr/local/lib/X11 /usr/local/lib/X11R5; do + for dir in '' /usr/lib /usr/lib/X11 /usr/X11/lib /usr/lib/X11R5 /usr/local/lib /usr/local/lib/X11 /usr/local/lib/X11R5; do for lib in X11; do case "${OPSYS}$OS_MAJOR" in unicos*) @@ -5662,34 +7860,38 @@ ;; esac - echo $ac_n "checking for XNoOp(0) in $LIBS""... $ac_c" 1>&6 -echo "configure:5667: checking for XNoOp(0) in $LIBS" >&5 - cat > conftest.$ac_ext <&5 +$as_echo_n "checking for XNoOp(0) in $LIBS... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ -int main() { +int +main () +{ XNoOp(0); -; return 0; } -EOF -if { (eval echo configure:5676: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - - echo "$ac_t""yes" 1>&6 + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } LD_X11=$LIBS found=yes break 2 - -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 + fi -rm -f conftest* echo "$ac_t""no" 1>&6 +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } done done - + fi -rm -f conftest* +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$LIBS_save case $found in no) echo "LD_X11:X11 library:-L/usr/lib/X11 -lX11" >> confdefs.missing @@ -5697,13 +7899,13 @@ esac ;; esac - + FTPDIR=${FTPDIR-/home/ftp}/pub -echo $ac_n "checking for package version""... $ac_c" 1>&6 -echo "configure:5707: checking for package version" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for package version" >&5 +$as_echo_n "checking for package version... " >&6; } if test -z "$VERSION"; then if test -r VERSION; then \ VERSION="`cat VERSION`" @@ -5727,7 +7929,8 @@ MINOR_NO= fi fi -echo "$ac_t""$MAJOR_NO.$MINOR_NO" 1>&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAJOR_NO.$MINOR_NO" >&5 +$as_echo "$MAJOR_NO.$MINOR_NO" >&6; } if test -s confdefs.missing; then @@ -5773,433 +7976,1260 @@ fi fi rm -f confdefs.missing - trap '' 1 2 15 -cat > confcache <<\EOF + ac_config_files="$ac_config_files Makefile port/Makefile port/master.mk port/fortc/Makefile lib/Makefile lib/c/Makefile lib/fortran/Makefile lib/c/cgm/Makefile lib/c/gksm/Makefile lib/c/x/Makefile fontdb/Makefile doc/binding/Makefile doc/userdoc/Makefile doc/Makefile progs/Makefile ${CONFIG_FILES-}" + +ac_config_commands="$ac_config_commands default" + +cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure -# scripts and configure runs. It is not useful on other systems. -# If it contains results you don't want to keep, you may remove or edit it. +# scripts and configure runs, see configure's option --config-cache. +# It is not useful on other systems. If it contains results you don't +# want to keep, you may remove or edit it. # -# By default, configure uses ./config.cache as the cache file, -# creating it if it does not exist already. You can give configure -# the --cache-file=FILE option to use a different cache file; that is -# what configure does when it calls configure scripts in -# subdirectories, so they share the cache. -# Giving --cache-file=/dev/null disables caching, for debugging configure. -# config.status only pays attention to the cache file if you give it the -# --recheck option to rerun configure. +# config.status only pays attention to the cache file if you give it +# the --recheck option to rerun configure. # -EOF +# `ac_cv_env_foo' variables (set or unset) will be overridden when +# loading this file, other *unset* `ac_cv_foo' will be assigned the +# following values. + +_ACEOF + # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. -# So, don't put newlines in cache variables' values. +# So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. -(set) 2>&1 | - case `(ac_space=' '; set | grep ac_space) 2>&1` in - *ac_space=\ *) - # `set' does not quote correctly, so add quotes (double-quote substitution - # turns \\\\ into \\, and sed turns \\ into \). - sed -n \ - -e "s/'/'\\\\''/g" \ - -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" - ;; - *) - # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' - ;; - esac >> confcache -if cmp -s $cache_file confcache; then - : -else - if test -w $cache_file; then - echo "updating cache $cache_file" - cat confcache > $cache_file +( + for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( + *) { eval $ac_var=; unset $ac_var;} ;; + esac ;; + esac + done + + (set) 2>&1 | + case $as_nl`(ac_space=' '; set) 2>&1` in #( + *${as_nl}ac_space=\ *) + # `set' does not quote correctly, so add quotes: double-quote + # substitution turns \\\\ into \\, and sed turns \\ into \. + sed -n \ + "s/'/'\\\\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" + ;; #( + *) + # `set' quotes correctly as required by POSIX, so do not add quotes. + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; + esac | + sort +) | + sed ' + /^ac_cv_env_/b end + t clear + :clear + s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ + t end + s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ + :end' >>confcache +if diff "$cache_file" confcache >/dev/null 2>&1; then :; else + if test -w "$cache_file"; then + test "x$cache_file" != "x/dev/null" && + { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 +$as_echo "$as_me: updating cache $cache_file" >&6;} + cat confcache >$cache_file else - echo "not updating unwritable cache $cache_file" + { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 +$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache -trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 - test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' -# Any assignment to VPATH causes Sun make to only execute -# the first set of double-colon rules, so remove it if not needed. -# If there is a colon in the path, we need to keep it. -if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' -fi +DEFS=-DHAVE_CONFIG_H -trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 +ac_libobjs= +ac_ltlibobjs= +for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue + # 1. Remove the extension, and $U if already installed. + ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' + ac_i=`$as_echo "$ac_i" | sed "$ac_script"` + # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR + # will be set to the directory where LIBOBJS objects are built. + as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" + as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' +done +LIBOBJS=$ac_libobjs -DEFS=-DHAVE_CONFIG_H +LTLIBOBJS=$ac_ltlibobjs -# Without the "./", some shells look in PATH for config.status. -: ${CONFIG_STATUS=./config.status} -echo creating $CONFIG_STATUS -rm -f $CONFIG_STATUS -cat > $CONFIG_STATUS <&5 +$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} +as_write_fail=0 +cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 +#! $SHELL +# Generated by $as_me. # Run this file to recreate the current configuration. -# This directory was configured as follows, -# on host `(hostname || uname -n) 2>/dev/null | sed 1q`: -# -# $0 $ac_configure_args -# # Compiler output produced by configure, useful for debugging -# configure, is in ./config.log if it exists. +# configure, is in config.log if it exists. -ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" -for ac_option +debug=false +ac_cs_recheck=false +ac_cs_silent=false + +SHELL=\${CONFIG_SHELL-$SHELL} +export SHELL +_ASEOF +cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 +## -------------------- ## +## M4sh Initialization. ## +## -------------------- ## + +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac +fi + + +as_nl=' +' +export as_nl +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' + else + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in #( + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' + fi + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } +fi + + +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +case $0 in #(( + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH do - case "\$ac_option" in - -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) - echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" - exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; - -version | --version | --versio | --versi | --vers | --ver | --ve | --v) - echo "$CONFIG_STATUS generated by autoconf version 2.13" - exit 0 ;; - -help | --help | --hel | --he | --h) - echo "\$ac_cs_usage"; exit 0 ;; - *) echo "\$ac_cs_usage"; exit 1 ;; - esac + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + exit 1 +fi + +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done +PS1='$ ' +PS2='> ' +PS4='+ ' -ac_given_srcdir=$srcdir +# NLS nuisances. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH -trap 'rm -fr `echo "\ - Makefile \ - port/Makefile \ - port/master.mk \ - port/fortc/Makefile \ - lib/Makefile \ - lib/c/Makefile \ - lib/c/cgm/Makefile \ - lib/c/gksm/Makefile \ - lib/c/x/Makefile \ - lib/fortran/Makefile \ - fontdb/Makefile \ - doc/binding/Makefile \ - doc/userdoc/Makefile \ - doc/Makefile \ - progs/Makefile \ - ${CONFIG_FILES-} port/misc/udposix.h port/misc/stdarg.h port/misc/stddef.h port/misc/limits.h port/misc/signal.h port/misc/stdlib.h port/misc/string.h port/misc/time.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 -EOF -cat >> $CONFIG_STATUS < conftest.subs <<\\CEOF -$ac_vpsub -$extrasub -s%@SHELL@%$SHELL%g -s%@CFLAGS@%$CFLAGS%g -s%@CPPFLAGS@%$CPPFLAGS%g -s%@CXXFLAGS@%$CXXFLAGS%g -s%@FFLAGS@%$FFLAGS%g -s%@DEFS@%$DEFS%g -s%@LDFLAGS@%$LDFLAGS%g -s%@LIBS@%$LIBS%g -s%@exec_prefix@%$exec_prefix%g -s%@prefix@%$prefix%g -s%@program_transform_name@%$program_transform_name%g -s%@bindir@%$bindir%g -s%@sbindir@%$sbindir%g -s%@libexecdir@%$libexecdir%g -s%@datadir@%$datadir%g -s%@sysconfdir@%$sysconfdir%g -s%@sharedstatedir@%$sharedstatedir%g -s%@localstatedir@%$localstatedir%g -s%@libdir@%$libdir%g -s%@includedir@%$includedir%g -s%@oldincludedir@%$oldincludedir%g -s%@infodir@%$infodir%g -s%@mandir@%$mandir%g -s%@CONFIG_FILES@%$CONFIG_FILES%g -s%@PORT_SUBDIRS@%$PORT_SUBDIRS%g -s%@PORT_MANIFEST@%$PORT_MANIFEST%g -s%@PORT_ALL@%$PORT_ALL%g -s%@PORT_CLEAN@%$PORT_CLEAN%g -s%@PORT_DISTCLEAN@%$PORT_DISTCLEAN%g -s%@PORT_INSTALL@%$PORT_INSTALL%g -s%@prog@%$prog%g -s%@WHATIS@%$WHATIS%g -s%@MAKEWHATIS_CMD@%$MAKEWHATIS_CMD%g -s%@CC@%$CC%g -s%@OPSYS@%$OPSYS%g -s%@CC_MAKEDEPEND@%$CC_MAKEDEPEND%g -s%@CPP@%$CPP%g -s%@UD_NO_CONST@%$UD_NO_CONST%g -s%@UD_NO_VOLATILE@%$UD_NO_VOLATILE%g -s%@UD_NO_SIGNED@%$UD_NO_SIGNED%g -s%@UD_NO_PROTOTYPES@%$UD_NO_PROTOTYPES%g -s%@UD_NO_HASH@%$UD_NO_HASH%g -s%@UD_NO_HASHHASH@%$UD_NO_HASHHASH%g -s%@UD_NO_VOIDSTAR@%$UD_NO_VOIDSTAR%g -s%@AR@%$AR%g -s%@TARFLAGS@%$TARFLAGS%g -s%@RANLIB@%$RANLIB%g -s%@FTPBINDIR@%$FTPBINDIR%g -s%@LIBOBJS@%$LIBOBJS%g -s%@PORT_HEADERS@%$PORT_HEADERS%g -s%@PORT_CPP_LDM@%$PORT_CPP_LDM%g -s%@LD_UDPORT@%$LD_UDPORT%g -s%@FC@%$FC%g -s%@LD_FORTRAN@%$LD_FORTRAN%g -s%@NEQN@%$NEQN%g -s%@TBL@%$TBL%g -s%@TROFF@%$TROFF%g -s%@FORTC@%$FORTC%g -s%@UD_NO_SIGACTION_DECL@%$UD_NO_SIGACTION_DECL%g -s%@UD_NO_ATEXIT_DECL@%$UD_NO_ATEXIT_DECL%g -s%@UD_NO_GETENV_DECL@%$UD_NO_GETENV_DECL%g -s%@UD_NO_STRERROR_DECL@%$UD_NO_STRERROR_DECL%g -s%@UD_NO_STRCHR_DECL@%$UD_NO_STRCHR_DECL%g -s%@UD_NO_STRCPY_DECL@%$UD_NO_STRCPY_DECL%g -s%@UD_NO_STRRCHR_DECL@%$UD_NO_STRRCHR_DECL%g -s%@UD_NO_STRNCPY_DECL@%$UD_NO_STRNCPY_DECL%g -s%@UD_NO_STRTOK_DECL@%$UD_NO_STRTOK_DECL%g -s%@UD_NO_STRSTR_DECL@%$UD_NO_STRSTR_DECL%g -s%@UD_NO_MEMMOVE_DECL@%$UD_NO_MEMMOVE_DECL%g -s%@UD_NO_DIFFTIME_DECL@%$UD_NO_DIFFTIME_DECL%g -s%@UD_NO_STRFTIME_DECL@%$UD_NO_STRFTIME_DECL%g -s%@CPP_X11@%$CPP_X11%g -s%@LD_X11@%$LD_X11%g -s%@FTPDIR@%$FTPDIR%g -s%@VERSION@%$VERSION%g -s%@MAJOR_NO@%$MAJOR_NO%g -s%@MINOR_NO@%$MINOR_NO%g - -CEOF -EOF - -cat >> $CONFIG_STATUS <<\EOF - -# Split the substitutions into bite-sized pieces for seds with -# small command number limits, like on Digital OSF/1 and HP-UX. -ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. -ac_file=1 # Number of current file. -ac_beg=1 # First line for current file. -ac_end=$ac_max_sed_cmds # Line after last line for current file. -ac_more_lines=: -ac_sed_cmds="" -while $ac_more_lines; do - if test $ac_beg -gt 1; then - sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file - else - sed "${ac_end}q" conftest.subs > conftest.s$ac_file + +# as_fn_error ERROR [LINENO LOG_FD] +# --------------------------------- +# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are +# provided, also output the error to LOG_FD, referencing LINENO. Then exit the +# script with status $?, using 1 if that was 0. +as_fn_error () +{ + as_status=$?; test $as_status -eq 0 && as_status=1 + if test "$3"; then + as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 fi - if test ! -s conftest.s$ac_file; then - ac_more_lines=false - rm -f conftest.s$ac_file + $as_echo "$as_me: error: $1" >&2 + as_fn_exit $as_status +} # as_fn_error + + +# as_fn_set_status STATUS +# ----------------------- +# Set $? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} # as_fn_set_status + +# as_fn_exit STATUS +# ----------------- +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} # as_fn_exit + +# as_fn_unset VAR +# --------------- +# Portably unset VAR. +as_fn_unset () +{ + { eval $1=; unset $1;} +} +as_unset=as_fn_unset +# as_fn_append VAR VALUE +# ---------------------- +# Append the text in VALUE to the end of the definition contained in VAR. Take +# advantage of any shell optimizations that allow amortized linear growth over +# repeated appends, instead of the typical quadratic growth present in naive +# implementations. +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : + eval 'as_fn_append () + { + eval $1+=\$2 + }' +else + as_fn_append () + { + eval $1=\$$1\$2 + } +fi # as_fn_append + +# as_fn_arith ARG... +# ------------------ +# Perform arithmetic evaluation on the ARGs, and store the result in the +# global $as_val. Take advantage of shells that can avoid forks. The arguments +# must be portable across $(()) and expr. +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : + eval 'as_fn_arith () + { + as_val=$(( $* )) + }' +else + as_fn_arith () + { + as_val=`expr "$@" || test $? -eq 1` + } +fi # as_fn_arith + + +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in #((((( +-n*) + case `echo 'xy\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + xy) ECHO_C='\c';; + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null + ECHO_T=' ';; + esac;; +*) + ECHO_N='-n';; +esac + +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir 2>/dev/null +fi +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -p' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln else - if test -z "$ac_sed_cmds"; then - ac_sed_cmds="sed -f conftest.s$ac_file" - else - ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" - fi - ac_file=`expr $ac_file + 1` - ac_beg=$ac_end - ac_end=`expr $ac_end + $ac_max_sed_cmds` - fi -done -if test -z "$ac_sed_cmds"; then - ac_sed_cmds=cat -fi -EOF - -cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF -for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then - # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". - case "$ac_file" in - *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` - ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; - *) ac_file_in="${ac_file}.in" ;; + as_ln_s='cp -p' + fi +else + as_ln_s='cp -p' +fi +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null + + +# as_fn_mkdir_p +# ------------- +# Create "$as_dir" as a directory, including parents if necessary. +as_fn_mkdir_p () +{ + + case $as_dir in #( + -*) as_dir=./$as_dir;; esac + test -d "$as_dir" || eval $as_mkdir_p || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" - # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. - # Remove last slash and all that follows it. Not all systems have dirname. - ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` - if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then - # The file is in a subdirectory. - test ! -d "$ac_dir" && mkdir "$ac_dir" - ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" - # A "../" for each directory in $ac_dir_suffix. - ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` +} # as_fn_mkdir_p +if mkdir -p . 2>/dev/null; then + as_mkdir_p='mkdir -p "$as_dir"' +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + +if test -x / >/dev/null 2>&1; then + as_test_x='test -x' +else + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L else - ac_dir_suffix= ac_dots= + as_ls_L_option= fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in #( + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' +fi +as_executable_p=$as_test_x + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + + +exec 6>&1 +## ----------------------------------- ## +## Main body of $CONFIG_STATUS script. ## +## ----------------------------------- ## +_ASEOF +test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# Save the log message, to keep $0 and so on meaningful, and to +# report actual input values of CONFIG_FILES etc. instead of their +# values after options handling. +ac_log=" +This file was extended by xgks $as_me 2.6, which was +generated by GNU Autoconf 2.65. Invocation command line was + + CONFIG_FILES = $CONFIG_FILES + CONFIG_HEADERS = $CONFIG_HEADERS + CONFIG_LINKS = $CONFIG_LINKS + CONFIG_COMMANDS = $CONFIG_COMMANDS + $ $0 $@ + +on `(hostname || uname -n) 2>/dev/null | sed 1q` +" + +_ACEOF - case "$ac_given_srcdir" in - .) srcdir=. - if test -z "$ac_dots"; then top_srcdir=. - else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; - /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; - *) # Relative path. - srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" - top_srcdir="$ac_dots$ac_given_srcdir" ;; +case $ac_config_files in *" +"*) set x $ac_config_files; shift; ac_config_files=$*;; +esac + +case $ac_config_headers in *" +"*) set x $ac_config_headers; shift; ac_config_headers=$*;; +esac + + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +# Files that config.status was made for. +config_files="$ac_config_files" +config_headers="$ac_config_headers" +config_commands="$ac_config_commands" + +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +ac_cs_usage="\ +\`$as_me' instantiates files and other configuration actions +from templates according to the current configuration. Unless the files +and actions are specified as TAGs, all are instantiated by default. + +Usage: $0 [OPTION]... [TAG]... + + -h, --help print this help, then exit + -V, --version print version number and configuration settings, then exit + --config print configuration, then exit + -q, --quiet, --silent + do not print progress messages + -d, --debug don't remove temporary files + --recheck update $as_me by reconfiguring in the same conditions + --file=FILE[:TEMPLATE] + instantiate the configuration file FILE + --header=FILE[:TEMPLATE] + instantiate the configuration header FILE + +Configuration files: +$config_files + +Configuration headers: +$config_headers + +Configuration commands: +$config_commands + +Report bugs to the package provider." + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" +ac_cs_version="\\ +xgks config.status 2.6 +configured by $0, generated by GNU Autoconf 2.65, + with options \\"\$ac_cs_config\\" + +Copyright (C) 2009 Free Software Foundation, Inc. +This config.status script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it." + +ac_pwd='$ac_pwd' +srcdir='$srcdir' +test -n "\$AWK" || AWK=awk +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# The default lists apply if the user does not specify any file. +ac_need_defaults=: +while test $# != 0 +do + case $1 in + --*=*) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` + ac_shift=: + ;; + *) + ac_option=$1 + ac_optarg=$2 + ac_shift=shift + ;; esac + case $ac_option in + # Handling of the options. + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) + ac_cs_recheck=: ;; + --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) + $as_echo "$ac_cs_version"; exit ;; + --config | --confi | --conf | --con | --co | --c ) + $as_echo "$ac_cs_config"; exit ;; + --debug | --debu | --deb | --de | --d | -d ) + debug=: ;; + --file | --fil | --fi | --f ) + $ac_shift + case $ac_optarg in + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + as_fn_append CONFIG_FILES " '$ac_optarg'" + ac_need_defaults=false;; + --header | --heade | --head | --hea ) + $ac_shift + case $ac_optarg in + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + as_fn_append CONFIG_HEADERS " '$ac_optarg'" + ac_need_defaults=false;; + --he | --h) + # Conflict between --help and --header + as_fn_error "ambiguous option: \`$1' +Try \`$0 --help' for more information.";; + --help | --hel | -h ) + $as_echo "$ac_cs_usage"; exit ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil | --si | --s) + ac_cs_silent=: ;; + + # This is an error. + -*) as_fn_error "unrecognized option: \`$1' +Try \`$0 --help' for more information." ;; + + *) as_fn_append ac_config_targets " $1" + ac_need_defaults=false ;; - echo creating "$ac_file" - rm -f "$ac_file" - configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." - case "$ac_file" in - *Makefile*) ac_comsub="1i\\ -# $configure_input" ;; - *) ac_comsub= ;; esac + shift +done + +ac_configure_extra_args= + +if $ac_cs_silent; then + exec 6>/dev/null + ac_configure_extra_args="$ac_configure_extra_args --silent" +fi - ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` - sed -e "$ac_comsub -s%@configure_input@%$configure_input%g -s%@srcdir@%$srcdir%g -s%@top_srcdir@%$top_srcdir%g -" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file -fi; done -rm -f conftest.s* +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +if \$ac_cs_recheck; then + set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + shift + \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 + CONFIG_SHELL='$SHELL' + export CONFIG_SHELL + exec "\$@" +fi + +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +exec 5>>config.log +{ + echo + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +## Running $as_me. ## +_ASBOX + $as_echo "$ac_log" +} >&5 -# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where -# NAME is the cpp macro being defined and VALUE is the value it is being given. +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # -# ac_d sets the value in "#define NAME VALUE" lines. -ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)' -ac_dB='\([ ][ ]*\)[^ ]*%\1#\2' -ac_dC='\3' -ac_dD='%g' -# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE". -ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' -ac_uB='\([ ]\)%\1#\2define\3' -ac_uC=' ' -ac_uD='\4%g' -# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE". -ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' -ac_eB='$%\1#\2define\3' -ac_eC=' ' -ac_eD='%g' - -if test "${CONFIG_HEADERS+set}" != set; then -EOF -cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF -fi -for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then - # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". - case "$ac_file" in - *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` - ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; - *) ac_file_in="${ac_file}.in" ;; +# INIT-COMMANDS +# + CC="$CC" + + +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 + +# Handling of arguments. +for ac_config_target in $ac_config_targets +do + case $ac_config_target in + "port/misc/udposix.h") CONFIG_HEADERS="$CONFIG_HEADERS port/misc/udposix.h" ;; + "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; + "port/Makefile") CONFIG_FILES="$CONFIG_FILES port/Makefile" ;; + "port/master.mk") CONFIG_FILES="$CONFIG_FILES port/master.mk" ;; + "port/fortc/Makefile") CONFIG_FILES="$CONFIG_FILES port/fortc/Makefile" ;; + "lib/Makefile") CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;; + "lib/c/Makefile") CONFIG_FILES="$CONFIG_FILES lib/c/Makefile" ;; + "lib/fortran/Makefile") CONFIG_FILES="$CONFIG_FILES lib/fortran/Makefile" ;; + "lib/c/cgm/Makefile") CONFIG_FILES="$CONFIG_FILES lib/c/cgm/Makefile" ;; + "lib/c/gksm/Makefile") CONFIG_FILES="$CONFIG_FILES lib/c/gksm/Makefile" ;; + "lib/c/x/Makefile") CONFIG_FILES="$CONFIG_FILES lib/c/x/Makefile" ;; + "fontdb/Makefile") CONFIG_FILES="$CONFIG_FILES fontdb/Makefile" ;; + "doc/binding/Makefile") CONFIG_FILES="$CONFIG_FILES doc/binding/Makefile" ;; + "doc/userdoc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/userdoc/Makefile" ;; + "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; + "progs/Makefile") CONFIG_FILES="$CONFIG_FILES progs/Makefile" ;; + "${CONFIG_FILES-}") CONFIG_FILES="$CONFIG_FILES ${CONFIG_FILES-}" ;; + "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;; + + *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac +done + + +# If the user did not use the arguments to specify the items to instantiate, +# then the envvar interface is used. Set only those that are not. +# We use the long form for the default assignment because of an extremely +# bizarre bug on SunOS 4.1.3. +if $ac_need_defaults; then + test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files + test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers + test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands +fi + +# Have a temporary directory for convenience. Make it in the build tree +# simply because there is no reason against having it here, and in addition, +# creating and moving files from /tmp can sometimes cause problems. +# Hook for its removal unless debugging. +# Note that there is a small window in which the directory will not be cleaned: +# after its creation but before its name has been assigned to `$tmp'. +$debug || +{ + tmp= + trap 'exit_status=$? + { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status +' 0 + trap 'as_fn_exit 1' 1 2 13 15 +} +# Create a (secure) tmp directory for tmp files. + +{ + tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && + test -n "$tmp" && test -d "$tmp" +} || +{ + tmp=./conf$$-$RANDOM + (umask 077 && mkdir "$tmp") +} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5 + +# Set up the scripts for CONFIG_FILES section. +# No need to generate them if there are no CONFIG_FILES. +# This happens for instance with `./config.status config.h'. +if test -n "$CONFIG_FILES"; then + + +ac_cr=`echo X | tr X '\015'` +# On cygwin, bash can eat \r inside `` if the user requested igncr. +# But we know of no other shell where ac_cr would be empty at this +# point, so we can use a bashism as a fallback. +if test "x$ac_cr" = x; then + eval ac_cr=\$\'\\r\' +fi +ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` +if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then + ac_cs_awk_cr='\r' +else + ac_cs_awk_cr=$ac_cr +fi + +echo 'BEGIN {' >"$tmp/subs1.awk" && +_ACEOF + + +{ + echo "cat >conf$$subs.awk <<_ACEOF" && + echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && + echo "_ACEOF" +} >conf$$subs.sh || + as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 +ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` +ac_delim='%!_!# ' +for ac_last_try in false false false false false :; do + . ./conf$$subs.sh || + as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 + + ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` + if test $ac_delim_n = $ac_delim_num; then + break + elif $ac_last_try; then + as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done +rm -f conf$$subs.sh + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +cat >>"\$tmp/subs1.awk" <<\\_ACAWK && +_ACEOF +sed -n ' +h +s/^/S["/; s/!.*/"]=/ +p +g +s/^[^!]*!// +:repl +t repl +s/'"$ac_delim"'$// +t delim +:nl +h +s/\(.\{148\}\)..*/\1/ +t more1 +s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ +p +n +b repl +:more1 +s/["\\]/\\&/g; s/^/"/; s/$/"\\/ +p +g +s/.\{148\}// +t nl +:delim +h +s/\(.\{148\}\)..*/\1/ +t more2 +s/["\\]/\\&/g; s/^/"/; s/$/"/ +p +b +:more2 +s/["\\]/\\&/g; s/^/"/; s/$/"\\/ +p +g +s/.\{148\}// +t delim +' >$CONFIG_STATUS || ac_write_fail=1 +rm -f conf$$subs.awk +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +_ACAWK +cat >>"\$tmp/subs1.awk" <<_ACAWK && + for (key in S) S_is_set[key] = 1 + FS = "" + +} +{ + line = $ 0 + nfields = split(line, field, "@") + substed = 0 + len = length(field[1]) + for (i = 2; i < nfields; i++) { + key = field[i] + keylen = length(key) + if (S_is_set[key]) { + value = S[key] + line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) + len += length(value) + length(field[++i]) + substed = 1 + } else + len += 1 + keylen + } - echo creating $ac_file + print line +} - rm -f conftest.frag conftest.in conftest.out - ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` - cat $ac_file_inputs > conftest.in - -EOF - -# Transform confdefs.h into a sed script conftest.vals that substitutes -# the proper values into config.h.in to produce config.h. And first: -# Protect against being on the right side of a sed subst in config.status. -# Protect against being in an unquoted here document in config.status. -rm -f conftest.vals -cat > conftest.hdr <<\EOF -s/[\\&%]/\\&/g -s%[\\$`]%\\&%g -s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp -s%ac_d%ac_u%gp -s%ac_u%ac_e%gp -EOF -sed -n -f conftest.hdr confdefs.h > conftest.vals -rm -f conftest.hdr - -# This sed command replaces #undef with comments. This is necessary, for -# example, in the case of _POSIX_SOURCE, which is predefined and required -# on some systems where configure will not decide to define it. -cat >> conftest.vals <<\EOF -s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */% -EOF - -# Break up conftest.vals because some shells have a limit on -# the size of here documents, and old seds have small limits too. - -rm -f conftest.tail -while : -do - ac_lines=`grep -c . conftest.vals` - # grep -c gives empty output for an empty file on some AIX systems. - if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi - # Write a limited-size here document to conftest.frag. - echo ' cat > conftest.frag <> $CONFIG_STATUS - sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS - echo 'CEOF - sed -f conftest.frag conftest.in > conftest.out - rm -f conftest.in - mv conftest.out conftest.in -' >> $CONFIG_STATUS - sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail - rm -f conftest.vals - mv conftest.tail conftest.vals -done -rm -f conftest.vals - -cat >> $CONFIG_STATUS <<\EOF - rm -f conftest.frag conftest.h - echo "/* $ac_file. Generated automatically by configure. */" > conftest.h - cat conftest.in >> conftest.h - rm -f conftest.in - if cmp -s $ac_file conftest.h 2>/dev/null; then - echo "$ac_file is unchanged" - rm -f conftest.h +_ACAWK +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then + sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" +else + cat +fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ + || as_fn_error "could not setup config files machinery" "$LINENO" 5 +_ACEOF + +# VPATH may cause trouble with some makes, so we remove $(srcdir), +# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and +# trailing colons and then remove the whole line if VPATH becomes empty +# (actually we leave an empty line to preserve line numbers). +if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=/{ +s/:*\$(srcdir):*/:/ +s/:*\${srcdir}:*/:/ +s/:*@srcdir@:*/:/ +s/^\([^=]*=[ ]*\):*/\1/ +s/:*$// +s/^[^=]*=[ ]*$// +}' +fi + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +fi # test -n "$CONFIG_FILES" + +# Set up the scripts for CONFIG_HEADERS section. +# No need to generate them if there are no CONFIG_HEADERS. +# This happens for instance with `./config.status Makefile'. +if test -n "$CONFIG_HEADERS"; then +cat >"$tmp/defines.awk" <<\_ACAWK || +BEGIN { +_ACEOF + +# Transform confdefs.h into an awk script `defines.awk', embedded as +# here-document in config.status, that substitutes the proper values into +# config.h.in to produce config.h. + +# Create a delimiter string that does not exist in confdefs.h, to ease +# handling of long lines. +ac_delim='%!_!# ' +for ac_last_try in false false :; do + ac_t=`sed -n "/$ac_delim/p" confdefs.h` + if test -z "$ac_t"; then + break + elif $ac_last_try; then + as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5 else - # Remove last slash and all that follows it. Not all systems have dirname. - ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` - if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then - # The file is in a subdirectory. - test ! -d "$ac_dir" && mkdir "$ac_dir" + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done + +# For the awk script, D is an array of macro values keyed by name, +# likewise P contains macro parameters if any. Preserve backslash +# newline sequences. + +ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* +sed -n ' +s/.\{148\}/&'"$ac_delim"'/g +t rset +:rset +s/^[ ]*#[ ]*define[ ][ ]*/ / +t def +d +:def +s/\\$// +t bsnl +s/["\\]/\\&/g +s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ +D["\1"]=" \3"/p +s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p +d +:bsnl +s/["\\]/\\&/g +s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ +D["\1"]=" \3\\\\\\n"\\/p +t cont +s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p +t cont +d +:cont +n +s/.\{148\}/&'"$ac_delim"'/g +t clear +:clear +s/\\$// +t bsnlc +s/["\\]/\\&/g; s/^/"/; s/$/"/p +d +:bsnlc +s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p +b cont +' >$CONFIG_STATUS || ac_write_fail=1 + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + for (key in D) D_is_set[key] = 1 + FS = "" +} +/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { + line = \$ 0 + split(line, arg, " ") + if (arg[1] == "#") { + defundef = arg[2] + mac1 = arg[3] + } else { + defundef = substr(arg[1], 2) + mac1 = arg[2] + } + split(mac1, mac2, "(") #) + macro = mac2[1] + prefix = substr(line, 1, index(line, defundef) - 1) + if (D_is_set[macro]) { + # Preserve the white space surrounding the "#". + print prefix "define", macro P[macro] D[macro] + next + } else { + # Replace #undef with comments. This is necessary, for example, + # in the case of _POSIX_SOURCE, which is predefined and required + # on some systems where configure will not decide to define it. + if (defundef == "undef") { + print "/*", prefix defundef, macro, "*/" + next + } + } +} +{ print } +_ACAWK +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 + as_fn_error "could not setup config headers machinery" "$LINENO" 5 +fi # test -n "$CONFIG_HEADERS" + + +eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" +shift +for ac_tag +do + case $ac_tag in + :[FHLC]) ac_mode=$ac_tag; continue;; + esac + case $ac_mode$ac_tag in + :[FHL]*:*);; + :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;; + :[FH]-) ac_tag=-:-;; + :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; + esac + ac_save_IFS=$IFS + IFS=: + set x $ac_tag + IFS=$ac_save_IFS + shift + ac_file=$1 + shift + + case $ac_mode in + :L) ac_source=$1;; + :[FH]) + ac_file_inputs= + for ac_f + do + case $ac_f in + -) ac_f="$tmp/stdin";; + *) # Look for the file first in the build tree, then in the source tree + # (if the path is not absolute). The absolute path cannot be DOS-style, + # because $ac_f cannot contain `:'. + test -f "$ac_f" || + case $ac_f in + [\\/$]*) false;; + *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; + esac || + as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;; + esac + case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac + as_fn_append ac_file_inputs " '$ac_f'" + done + + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + configure_input='Generated from '` + $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' + `' by configure.' + if test x"$ac_file" != x-; then + configure_input="$ac_file. $configure_input" + { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 +$as_echo "$as_me: creating $ac_file" >&6;} + fi + # Neutralize special characters interpreted by sed in replacement strings. + case $configure_input in #( + *\&* | *\|* | *\\* ) + ac_sed_conf_input=`$as_echo "$configure_input" | + sed 's/[\\\\&|]/\\\\&/g'`;; #( + *) ac_sed_conf_input=$configure_input;; + esac + + case $ac_tag in + *:-:* | *:-) cat >"$tmp/stdin" \ + || as_fn_error "could not create $ac_file" "$LINENO" 5 ;; + esac + ;; + esac + + ac_dir=`$as_dirname -- "$ac_file" || +$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_file" : 'X\(//\)[^/]' \| \ + X"$ac_file" : 'X\(//\)$' \| \ + X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$ac_file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + as_dir="$ac_dir"; as_fn_mkdir_p + ac_builddir=. + +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix + +case $srcdir in + .) # We are building in place. + ac_srcdir=. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; +esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + + case $ac_mode in + :F) + # + # CONFIG_FILE + # + +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# If the template does not know about datarootdir, expand it. +# FIXME: This hack should be removed a few years after 2.60. +ac_datarootdir_hack=; ac_datarootdir_seen= +ac_sed_dataroot=' +/datarootdir/ { + p + q +} +/@datadir@/p +/@docdir@/p +/@infodir@/p +/@localedir@/p +/@mandir@/p' +case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in +*datarootdir*) ac_datarootdir_seen=yes;; +*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 +$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + ac_datarootdir_hack=' + s&@datadir@&$datadir&g + s&@docdir@&$docdir&g + s&@infodir@&$infodir&g + s&@localedir@&$localedir&g + s&@mandir@&$mandir&g + s&\\\${datarootdir}&$datarootdir&g' ;; +esac +_ACEOF + +# Neutralize VPATH when `$srcdir' = `.'. +# Shell code in configure.ac might set extrasub. +# FIXME: do we really want to maintain this feature? +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_sed_extra="$ac_vpsub +$extrasub +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +:t +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b +s|@configure_input@|$ac_sed_conf_input|;t t +s&@top_builddir@&$ac_top_builddir_sub&;t t +s&@top_build_prefix@&$ac_top_build_prefix&;t t +s&@srcdir@&$ac_srcdir&;t t +s&@abs_srcdir@&$ac_abs_srcdir&;t t +s&@top_srcdir@&$ac_top_srcdir&;t t +s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t +s&@builddir@&$ac_builddir&;t t +s&@abs_builddir@&$ac_abs_builddir&;t t +s&@abs_top_builddir@&$ac_abs_top_builddir&;t t +$ac_datarootdir_hack +" +eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ + || as_fn_error "could not create $ac_file" "$LINENO" 5 + +test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && + { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && + { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined." >&5 +$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined." >&2;} + + rm -f "$tmp/stdin" + case $ac_file in + -) cat "$tmp/out" && rm -f "$tmp/out";; + *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; + esac \ + || as_fn_error "could not create $ac_file" "$LINENO" 5 + ;; + :H) + # + # CONFIG_HEADER + # + if test x"$ac_file" != x-; then + { + $as_echo "/* $configure_input */" \ + && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" + } >"$tmp/config.h" \ + || as_fn_error "could not create $ac_file" "$LINENO" 5 + if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then + { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 +$as_echo "$as_me: $ac_file is unchanged" >&6;} + else + rm -f "$ac_file" + mv "$tmp/config.h" "$ac_file" \ + || as_fn_error "could not create $ac_file" "$LINENO" 5 fi - rm -f $ac_file - mv conftest.h $ac_file + else + $as_echo "/* $configure_input */" \ + && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ + || as_fn_error "could not create -" "$LINENO" 5 fi -fi; done + ;; -EOF -cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF - # + :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 +$as_echo "$as_me: executing $ac_file commands" >&6;} + ;; + esac + + + case $ac_file$ac_mode in + "default":C) # # Create a script to accomplish the post processing. # cat << UD_EOF_CONFTEST_C > conftest.c @@ -6241,17 +9271,49 @@ echo 1>&2 "expanding \`include's in file \`$file'" sd=`pwd`/`echo $file | sed 's,[^/]*$,,'` base=`basename $file` - (cd $sd && $conftest < $base > conftest.mk && + (cd $sd && $conftest < $base > conftest.mk && mv conftest.mk $base) || exit 1 done ;; esac fi rm conftest conftest.c - -exit 0 -EOF -chmod +x $CONFIG_STATUS -rm -fr confdefs* $ac_clean_files -test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 - + ;; + + esac +done # for ac_tag + + +as_fn_exit 0 +_ACEOF +ac_clean_files=$ac_clean_files_save + +test $ac_write_fail = 0 || + as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5 + + +# configure is writing to config.log, and then calls config.status. +# config.status does its own redirection, appending to config.log. +# Unfortunately, on DOS this fails, as config.log is still kept open +# by configure, so config.status won't be able to write to it; its +# output is simply discarded. So we exec the FD to /dev/null, +# effectively closing config.log, so it can be properly (re)opened and +# appended to by config.status. When coming back to configure, we +# need to make the FD available again. +if test "$no_create" != yes; then + ac_cs_success=: + ac_config_status_args= + test "$silent" = yes && + ac_config_status_args="$ac_config_status_args --quiet" + exec 5>/dev/null + $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false + exec 5>>config.log + # Use ||, not &&, to avoid exiting from the if with $? = 1, which + # would make configure fail if this is the last instruction. + $ac_cs_success || as_fn_exit $? +fi +if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 +$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} +fi + debian/patches/linux-m4.patch0000644000000000000000000000351412165740737013332 0ustar Author: Alastair McKinstry Description: Standard linux.m4 file for building on linux systems Last-Updated: 2010-07-02 Forwarded: no Index: xgks-2.6/src/port/fortc/linux.m4 =================================================================== diff -urN xgks-2.6.orig/src/port/fortc/linux.m4 xgks-2.6/src/port/fortc/linux.m4 --- xgks-2.6.orig/src/port/fortc/linux.m4 1970-01-01 01:00:00.000000000 +0100 +++ xgks-2.6/src/port/fortc/linux.m4 2010-07-02 18:27:09.000000000 +0100 @@ -0,0 +1,35 @@ +divert(-1) +define(`M4__SYSTEM', linux) +# Macro for converting C name into FORTRAN name +# f2c has no finishing _ +define(`NAMEF',`$1_') +# transformation from string name to corresponding argument name +define(`STRINGF',`$1') +# extra arguments, if any, for argument lengths +define(`STRINGX',`, $1_len') # one extra stringlen parameter +define(`REALX',`') +define(`INTEGERX',`') +define(`FUNCTIONX',`') +define(`DOUBLEX',`') +# declaration to be used for argument name descriptor +define(`STRINGD',` + char *$1; + int $1_len;') # declare argument string with extra stringlen parameter +define(`STRINGP',` + char *$1') +define(`STRINGPX',`, + int $1_len') +# declarations and initializations of canonical local variables +define(`STRINGL',`') +# FORTRAN declaration for a long integer (e.g. integer*4 for Microsoft) +define(`LONG_INT',`integer') +# FORTRAN declaration for a short integer (e.g. integer*2) +define(`SHORT_INT',`integer*2') +# FORTRAN declaration for an integer byte (e.g. integer*1 or byte) +define(`BYTE_INT',`byte') +# FORTRAN declaration for double precision (e.g. real for a Cray) +define(`DOUBLE_PRECISION',`double precision') +# FORTRAN syntax for including a file +define(`M4__RIGHT_QUOTE',') +define(`F_INCLUDE',` `include' M4__RIGHT_QUOTE`'$1`'M4__RIGHT_QUOTE') +divert(0)dnl debian/patches/xcolours.patch0000644000000000000000000000213212165740737013526 0ustar Author: Alastair McKinstry Description: Fix needed for xcolours. Last-Updated: 2010-07-03 Forwarded: no Index: xgks-2.6/src/lib/c/x/xcolours.c =================================================================== --- xgks-2.6.orig/src/lib/c/x/xcolours.c 2010-07-03 01:06:27.000000000 +0100 +++ xgks-2.6/src/lib/c/x/xcolours.c 2010-07-03 01:07:14.000000000 +0100 @@ -229,11 +229,10 @@ unsigned long pixel; /* X pixel value (in) */ { assert(map != NULL); - assert(pixel < map->length); assert(index >= 0 && index < map->length); map->Xpixels[index] = pixel; - map->GKSindexes[pixel] = index; + map->GKSindexes[index] = index; } @@ -520,9 +519,9 @@ ws->vinfo = vinfo; ws->screenNum = screenNum; XcMap_enter( - ws->XcMap, GKS_BACKGROUND_INDEX, BlackPixel(dpy, screenNum)); + &(ws->XcMap), GKS_BACKGROUND_INDEX, BlackPixel(dpy, screenNum)); XcMap_enter( - ws->XcMap, GKS_FOREGROUND_INDEX, WhitePixel(dpy, screenNum)); + &(ws->XcMap), GKS_FOREGROUND_INDEX, WhitePixel(dpy, screenNum)); status = 1; /* success */ } } debian/patches/shared_lib.patch0000644000000000000000000001743712165742171013754 0ustar Author: Alastair McKinstry Description: Add shared_library build support Last-Updated: 2013-05-21 Forwarded: no Index: xgks-2.6.1/src/port/acsite.m4 =================================================================== --- xgks-2.6.1.orig/src/port/acsite.m4 2010-07-03 19:09:51.000000000 +0100 +++ xgks-2.6.1/src/port/acsite.m4 2010-07-03 19:09:51.000000000 +0100 @@ -2227,7 +2227,7 @@ if test -z "$MAJOR_NO"; then if test "$VERSION"; then \ MAJOR_NO=`echo $VERSION | - sed -n '/^\([[0-9]][[0-9]]*\)\.[[0-9]][[0-9]]*.*/s//\1/p;q'` + sed -n '/^\([[0-9]][[0-9]]*\)\.[[0-9]][[0-9]]*\.[[0-9]][[0-9]].*/s//\1/p;q'` else MAJOR_NO= fi @@ -2236,13 +2236,22 @@ if test -z "$MINOR_NO"; then if test "$VERSION"; then \ MINOR_NO=`echo $VERSION | - sed -n '/^[[0-9]][[0-9]]*\.\([[0-9]][[0-9]]*\).*/s//\1/p;q'` + sed -n '/^[[0-9]][[0-9]]*\.\([[0-9]][[0-9]]*\)\.[[0-9]][[0-9]].*/s//\1/p;q'` else MINOR_NO= fi fi -AC_SUBST(MINOR_NO)dnl -AC_MSG_RESULT($MAJOR_NO.$MINOR_NO) +AC_SUBST(PATCH_NO)dnl +if test -z "$PATCH_NO"; then + if test "$VERSION"; then \ + PATCH_NO=`echo $VERSION | + sed -n '/^[[0-9]][[0-9]]*\.[[0-9]][[0-9]]*\.\([[0-9]][[0-9]]*\).*/s//\1/p;q'` + else + PATCH_NO=0 + fi +fi +AC_SUBST(PATCH_NO)dnl +AC_MSG_RESULT($MAJOR_NO.$MINOR_NO.$PATCH_NO) ]) Index: xgks-2.6.1/src/port/master.mk.in =================================================================== --- xgks-2.6.1.orig/src/port/master.mk.in 2010-07-03 19:09:45.000000000 +0100 +++ xgks-2.6.1/src/port/master.mk.in 2010-07-03 22:11:56.000000000 +0100 @@ -27,8 +27,8 @@ SHELL = /bin/sh TBL = @TBL@ WHICH = @WHICH@ - - +MAJOR_NO = @MAJOR_NO@ +MINOR_NO = @MINOR_NO@ ############################################################################ # Recursive make(1)s in Subdirectories: @@ -147,10 +147,21 @@ LIBDIR = $(exec_prefix)/lib LIB_A = lib$(LIBRARY).a LIBFILE = dummy-libfile # to silence GNU make(1) +LIBSONAME = lib$(LIBRARY).so.$(MAJOR_NO) +LIB_SO = lib$(LIBRARY).so.$(MAJOR_NO).$(MINOR_NO) +LIB_SA = lib$(LIBRARY).sa.$(MAJOR_NO).$(MINOR_NO) +DYN_OBJS = $(subst .o,.so, $(LIBOBJS)) +remote_shlib: $(REMOTE_SHLIB) +dyn_objs: $(DYN_OBJS) + +$(REMOTE_SHLIB): $(DYN_OBJS) ../c/*.so ../c/cgm/*.so ../c/gksm/*.so ../c/x/*.so + $(CC) $(LDFLAGS) -shared -o $(REMOTE_SHLIB) $(SHLIBFLAGS) -Wl,-soname,$(LIBSONAME) $(SO_OBJS) $^ $(DYN_LIBS) + library: $(LIB_A) - +shared_library: $(LIB_SO) remote_library: $(REMOTE_LIBRARY) +remote_shlib: $(REMOTE_SHLIB) # The following rule is forced because the library can be created by a # makefile in another directory prior to the execution of the following rule. @@ -201,38 +212,34 @@ mkdir -p $@ chmod u+rwx,g+rws,o=rx $@ -LIB_SO = lib$(LIBRARY).so.$(MAJOR_NO).$(MINOR_NO) -LIB_SA = lib$(LIBRARY).sa.$(MAJOR_NO).$(MINOR_NO) -#library: FORCE -# @so_objs=`echo $(LIBOBJS) | sed 's/\.o/.so/g'`; \ -# if [ -z "$$so_objs" ]; then \ -# :; \ -# else \ -# $(MAKE) $(MFLAGS) $(LIB_SO) \ -# SO_OBJS="$$so_objs"; \ -# fi -# @if [ -z "$(SA_OBJS)" ]; then \ -# :; \ -# else \ -# $(MAKE) $(MFLAGS) $(LIB_SA); \ -# fi +library: FORCE + @so_objs=`echo $(LIBOBJS) | sed 's/\.o/.so/g'`; \ + if [ -z "$$so_objs" ]; then \ + :; \ + else \ + $(MAKE) $(MFLAGS) $(LIB_SO) \ + SO_OBJS="$$so_objs"; \ + fi + @if [ -z "$(SA_OBJS)" ]; then \ + :; \ + else \ + $(MAKE) $(MFLAGS) $(LIB_SA); \ + fi -$(LIB_SO): $(SO_OBJS) - ld -assert pure-text $(SO_OBJS) -o $@ +$(LIB_SO): $(SO_OBJS) $(wildcard $(patsubst %,%/*.so, $(SUBDIRS))) + $(CC) $(LDFLAGS) -shared -o $(LIB_SO) $(SHLIBFLAGS) -Wl,-soname,$(LIBSONAME) $^ $(DYN_LIBS) $(LIB_SA): $(SA_OBJS) FORCE $(AR) rcuv $@ $(SA_OBJS) .fc.so: $(FORTC) -O $(OS) $< > $*.c \ || (rm -f $*.c; exit 1) - $(CC) -c -o $$$$.o -pic $(CFLAGS) $(CPPFLAGS) $*.c \ - || (rm -f $$$$.o; exit 1) - mv $$$$.o $@ + $(CC) -c -o $@ -fPIC $(CFLAGS) $(CPPFLAGS) $*.c .c.so: - $(CC) -c -o $$$$.o -pic $(CFLAGS) $(CPPFLAGS) $< \ - || (rm -f $$$$.o; exit 1) - mv $$$$.o $@ + $(CC) -c -o $@ -fPIC $(CFLAGS) $(CPPFLAGS) $< +.f.so: + $(FC) -c -o $@ -fPIC $(FFLAGS) $< #installed_library: $(LIBDIR)/$(LIB_SO) # @if [ -z "$(SA_OBJS)" ]; then \ Index: xgks-2.6.1/src/lib/c/Makefile.in =================================================================== --- xgks-2.6.1.orig/src/lib/c/Makefile.in 2010-07-03 19:09:45.000000000 +0100 +++ xgks-2.6.1/src/lib/c/Makefile.in 2010-07-03 19:09:51.000000000 +0100 @@ -41,7 +41,7 @@ MANIFEST = Makefile.in depend $(HEADERS) $(headers) $(csrcs) $(fcsrcs) -all: gkserrmsg.h cgm/all gksm/all x/all library +all: gkserrmsg.h cgm/all gksm/all x/all library shared_library install: installed_library installed_headers Index: xgks-2.6.1/src/lib/fortran/Makefile.in =================================================================== --- xgks-2.6.1.orig/src/lib/fortran/Makefile.in 2010-07-03 19:09:45.000000000 +0100 +++ xgks-2.6.1/src/lib/fortran/Makefile.in 2010-07-03 22:18:25.000000000 +0100 @@ -2,14 +2,16 @@ # # $Id: Makefile.in,v 2.7 2000/08/07 22:23:57 emmerson Exp $ -LIBNAME = xgks -REMOTE_LIBRARY = ../c/lib$(LIBNAME).a +LIBRARY = xgks +REMOTE_LIBRARY = ../c/lib$(LIBRARY).a +REMOTE_SHLIB = ../c/lib$(LIBRARY).so.$(MAJOR_NO).$(MINOR_NO) CPP_X11 = @CPP_X11@ INCLUDES = -I../../port/misc -I../c $(CPP_X11) DEFINES = -DOS_$(OS) CPPFLAGS = $(INCLUDES) $(DEFINES) @CPPFLAGS@ CFLAGS = @CFLAGS@ +DYN_LIBS = -lX11 -lm -lgfortran headers = f_errno.h fortmac.h fortxgks.h pdrutils.h ps2aixdefs.h SRCS = control.fc error.fc escapes.fc fexterninit.c \ @@ -35,7 +37,7 @@ inqwslist.c meta.c output.c rep.c segattr.c \ segment.c transform.c utils.c wsioutattr.c -all:: $(REMOTE_LIBRARY) +all:: $(REMOTE_LIBRARY) remote_shlib include ../../port/master.mk Index: xgks-2.6.1/src/lib/c/cgm/Makefile.in =================================================================== --- xgks-2.6.1.orig/src/lib/c/cgm/Makefile.in 2010-07-03 19:09:45.000000000 +0100 +++ xgks-2.6.1/src/lib/c/cgm/Makefile.in 2010-07-03 19:09:51.000000000 +0100 @@ -4,6 +4,7 @@ LIBNAME = xgks REMOTE_LIBRARY = ../lib$(LIBNAME).a +REMOTE_SHLIB = ../c/lib$(LIBNAME).so.$(MAJOR_NO).$(MINOR_NO) CPP_X11 = @CPP_X11@ INCLUDES = -I.. -I../../../port/misc $(CPP_X11) CPPFLAGS = $(INCLUDES) @CPPFLAGS@ @@ -13,7 +14,7 @@ MANIFEST = Makefile.in depend cgm.h cgm_implem.h cgmi.c cgmo.c -all:: $(REMOTE_LIBRARY) +all:: $(REMOTE_LIBRARY) dyn_objs tags: FORCE ctags -t cgm.h cgm_implem.h cgmi.c cgmo.c \ Index: xgks-2.6.1/src/lib/c/gksm/Makefile.in =================================================================== --- xgks-2.6.1.orig/src/lib/c/gksm/Makefile.in 2010-07-03 19:09:45.000000000 +0100 +++ xgks-2.6.1/src/lib/c/gksm/Makefile.in 2010-07-03 19:09:51.000000000 +0100 @@ -4,6 +4,7 @@ LIBNAME = xgks REMOTE_LIBRARY = ../lib$(LIBNAME).a +REMOTE_SHLIB = ../c/lib$(LIBNAME).so.$(MAJOR_NO).$(MINOR_NO) CPP_X11 = @CPP_X11@ INCLUDES = -I.. -I../../../port/misc $(CPP_X11) CPPFLAGS = $(INCLUDES) @CPPFLAGS@ @@ -13,7 +14,7 @@ MANIFEST = Makefile.in depend gksm.c gksm.h gksm_implem.h -all:: $(REMOTE_LIBRARY) +all:: $(REMOTE_LIBRARY) dyn_objs include ../../../port/master.mk Index: xgks-2.6.1/src/lib/c/x/Makefile.in =================================================================== --- xgks-2.6.1.orig/src/lib/c/x/Makefile.in 2010-07-03 19:09:45.000000000 +0100 +++ xgks-2.6.1/src/lib/c/x/Makefile.in 2010-07-03 19:09:51.000000000 +0100 @@ -4,6 +4,7 @@ LIBNAME = xgks REMOTE_LIBRARY = ../lib$(LIBNAME).a +REMOTE_SHLIB = ../c/lib$(LIBNAME).so.$(MAJOR_NO).$(MINOR_NO) CPP_X11 = @CPP_X11@ INCLUDES = -I.. -I../../../port/misc $(CPP_X11) CPPFLAGS = $(INCLUDES) @CPPFLAGS@ @@ -19,7 +20,7 @@ xinqpixel.c xopws.c xpline.c xpmarker.c xport.c xtext.c \ xupdate.c -all:: $(REMOTE_LIBRARY) +all:: $(REMOTE_LIBRARY) dyn_objs tags: FORCE ctags -t *.c ../*.c ../*.h debian/patches/pmel.patch0000644000000000000000000053274112165740737012623 0ustar Author: Alastair McKinstry Description: Port of changes in xgks-pmel-2.5 fork (in Gentoo Linux) to XGKS 2.6. Forwarded: no Last-Updated: 2010-07-14 Index: xgks-2.6.1/src/lib/c/wslist.h =================================================================== --- xgks-2.6.1.orig/src/lib/c/wslist.h 2010-07-14 03:17:10.000000000 +0100 +++ xgks-2.6.1/src/lib/c/wslist.h 2010-07-14 03:41:25.000000000 +0100 @@ -133,9 +133,11 @@ * Type of Metafile: */ typedef enum mf_type { - MF_GKSM = 0, - MF_CGM -} mf_type; + MF_GKSM = 0, + MF_CGM, + MF_PS, + MF_GIF +} mf_type; /* Index: xgks-2.6.1/src/lib/c/gd.c =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 +++ xgks-2.6.1/src/lib/c/gd.c 2010-07-14 03:41:25.000000000 +0100 @@ -0,0 +1,2597 @@ +/* +* +* This software was developed by the Thermal Modeling and Analysis +* Project(TMAP) of the National Oceanographic and Atmospheric +* Administration's (NOAA) Pacific Marine Environmental Lab(PMEL), +* hereafter referred to as NOAA/PMEL/TMAP. +* +* Access and use of this software shall impose the following +* obligations and understandings on the user. The user is granted the +* right, without any fee or cost, to use, copy, modify, alter, enhance +* and distribute this software, and any derivative works thereof, and +* its supporting documentation for any purpose whatsoever, provided +* that this entire notice appears in all copies of the software, +* derivative works and supporting documentation. Further, the user +* agrees to credit NOAA/PMEL/TMAP in any publications that result from +* the use of this software or in any product that includes this +* software. The names TMAP, NOAA and/or PMEL, however, may not be used +* in any advertising or publicity to endorse or promote any products +* or commercial entity unless specific written permission is obtained +* from NOAA/PMEL/TMAP. The user also understands that NOAA/PMEL/TMAP +* is not obligated to provide the user with any support, consulting, +* training or assistance of any kind with regard to the use, operation +* and performance of this software nor to provide the user with any +* updates, revisions, new versions or "bug fixes". +* +* THIS SOFTWARE IS PROVIDED BY NOAA/PMEL/TMAP "AS IS" AND ANY EXPRESS +* OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +* ARE DISCLAIMED. IN NO EVENT SHALL NOAA/PMEL/TMAP BE LIABLE FOR ANY SPECIAL, +* INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER +* RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF +* CONTRACT, NEGLIGENCE OR OTHER TORTUOUS ACTION, ARISING OUT OF OR IN +* CONNECTION WITH THE ACCESS, USE OR PERFORMANCE OF THIS SOFTWARE. +* +*/ + +#include +//#include +#include +#include +#include +#include +#include "gif/gd.h" +#include "gif/mtables.h" + +/* Modified gdImageSetPixel J Sirott PMEL */ + +static void gdImageBrushApply(gdImagePtr im, int x, int y); +static void gdImageTileApply(gdImagePtr im, int x, int y); + +gdImagePtr gdImageCreate(int sx, int sy) +{ + int i; + gdImagePtr im; + im = (gdImage *) malloc(sizeof(gdImage)); + im->pixels = (unsigned char **) malloc(sizeof(unsigned char *) * sx); + im->polyInts = 0; + im->polyAllocated = 0; + im->brush = 0; + im->tile = 0; + im->style = 0; + for (i=0; (ipixels[i] = (unsigned char *) calloc( + sy, sizeof(unsigned char)); + } + im->sx = sx; + im->sy = sy; + im->colorsTotal = 0; + im->transparent = (-1); + im->interlace = 0; + im->xcmin = 0; im->xcmax = sx; im->ycmin = 0; im->ycmax = sy; + return im; +} + +void gdImageDestroy(gdImagePtr im) +{ + int i; + for (i=0; (isx); i++) { + free(im->pixels[i]); + } + free(im->pixels); + if (im->polyInts) { + free(im->polyInts); + } + if (im->style) { + free(im->style); + } + free(im); +} + +int gdImageColorClosest(gdImagePtr im, int r, int g, int b) +{ + int i; + long rd, gd, bd; + int ct = (-1); + long mindist = 0; + for (i=0; (i<(im->colorsTotal)); i++) { + long dist; + if (im->open[i]) { + continue; + } + rd = (im->red[i] - r); + gd = (im->green[i] - g); + bd = (im->blue[i] - b); + dist = rd * rd + gd * gd + bd * bd; + if ((i == 0) || (dist < mindist)) { + mindist = dist; + ct = i; + } + } + return ct; +} + +int gdImageColorExact(gdImagePtr im, int r, int g, int b) +{ + int i; + for (i=0; (i<(im->colorsTotal)); i++) { + if (im->open[i]) { + continue; + } + if ((im->red[i] == r) && + (im->green[i] == g) && + (im->blue[i] == b)) { + return i; + } + } + return -1; +} + +int gdImageColorAllocate(gdImagePtr im, int r, int g, int b) +{ + int i; + int ct = (-1); + for (i=0; (i<(im->colorsTotal)); i++) { + if (im->open[i]) { + ct = i; + break; + } + } + if (ct == (-1)) { + ct = im->colorsTotal; + if (ct == gdMaxColors) { + return -1; + } + im->colorsTotal++; + } + im->red[ct] = r; + im->green[ct] = g; + im->blue[ct] = b; + im->open[ct] = 0; + return ct; +} + +void gdImageColorDeallocate(gdImagePtr im, int color) +{ + /* Mark it open. */ + im->open[color] = 1; +} + +void gdImageColorTransparent(gdImagePtr im, int color) +{ + im->transparent = color; +} + +static int getStylePixel(gdImagePtr im, int x, int y) +{ + int rval = im->style[im->stylePos++]; + im->stylePos %= im->styleLength; + return rval; +} + +void gdImageSetPixel(gdImagePtr im, int x, int y, int color) +{ + int p; + + /* Clip this puppy */ + + if (x < im->xcmin || x > im->xcmax || + y < im->ycmin || y > im->ycmax) + return; + + switch(color) { + case gdStyled: + if (!im->style) { + /* Refuse to draw if no style is set. */ + return; + } + p = getStylePixel(im, x, y); + if (p != (gdTransparent)) { + gdImageSetPixel(im, x, y, p); + } + break; + case gdStyledBrushed: + if (!im->style) { + /* Refuse to draw if no style is set. */ + return; + } + p = getStylePixel(im, x, y); + if ((p != gdTransparent) && (p != 0)) { + gdImageSetPixel(im, x, y, gdBrushed); + } + break; + case gdBrushed: + gdImageBrushApply(im, x, y); + break; + case gdTiled: + gdImageTileApply(im, x, y); + break; + default: + if (gdImageBoundsSafe(im, x, y)) { + im->pixels[x][y] = color; + } + break; + } +} + +static void gdImageBrushApply(gdImagePtr im, int x, int y) +{ + int lx, ly; + int hy; + int hx; + int x1, y1, x2, y2; + int srcx, srcy; + if (!im->brush) { + return; + } + hy = gdImageSY(im->brush)/2; + y1 = y - hy; + y2 = y1 + gdImageSY(im->brush); + hx = gdImageSX(im->brush)/2; + x1 = x - hx; + x2 = x1 + gdImageSX(im->brush); + srcy = 0; + for (ly = y1; (ly < y2); ly++) { + srcx = 0; + for (lx = x1; (lx < x2); lx++) { + int p; + p = gdImageGetPixel(im->brush, srcx, srcy); + /* Allow for non-square brushes! */ + if (p != gdImageGetTransparent(im->brush)) { + gdImageSetPixel(im, lx, ly, + im->brushColorMap[p]); + } + srcx++; + } + srcy++; + } +} + +static void gdImageTileApply(gdImagePtr im, int x, int y) +{ + int srcx, srcy; + int p; + if (!im->tile) { + return; + } + srcx = x % gdImageSX(im->tile); + srcy = y % gdImageSY(im->tile); + p = gdImageGetPixel(im->tile, srcx, srcy); + /* Allow for transparency */ + if (p != gdImageGetTransparent(im->tile)) { + gdImageSetPixel(im, x, y, + im->tileColorMap[p]); + } +} + +int gdImageGetPixel(gdImagePtr im, int x, int y) +{ + if (gdImageBoundsSafe(im, x, y)) { + return im->pixels[x][y]; + } else { + return 0; + } +} + +/* Bresenham as presented in Foley & Van Dam */ + +void gdImageLine(gdImagePtr im, int x1, int y1, int x2, int y2, int color) +{ + int dx, dy, incr1, incr2, d, x, y, xend, yend, xdirflag, ydirflag; + dx = abs(x2-x1); + dy = abs(y2-y1); + if (dy <= dx) { + d = 2*dy - dx; + incr1 = 2*dy; + incr2 = 2 * (dy - dx); + if (x1 > x2) { + x = x2; + y = y2; + ydirflag = (-1); + xend = x1; + } else { + x = x1; + y = y1; + ydirflag = 1; + xend = x2; + } + gdImageSetPixel(im, x, y, color); + if (((y2 - y1) * ydirflag) > 0) { + while (x < xend) { + x++; + if (d <0) { + d+=incr1; + } else { + y++; + d+=incr2; + } + gdImageSetPixel(im, x, y, color); + } + } else { + while (x < xend) { + x++; + if (d <0) { + d+=incr1; + } else { + y--; + d+=incr2; + } + gdImageSetPixel(im, x, y, color); + } + } + } else { + d = 2*dx - dy; + incr1 = 2*dx; + incr2 = 2 * (dx - dy); + if (y1 > y2) { + y = y2; + x = x2; + yend = y1; + xdirflag = (-1); + } else { + y = y1; + x = x1; + yend = y2; + xdirflag = 1; + } + gdImageSetPixel(im, x, y, color); + if (((x2 - x1) * xdirflag) > 0) { + while (y < yend) { + y++; + if (d <0) { + d+=incr1; + } else { + x++; + d+=incr2; + } + gdImageSetPixel(im, x, y, color); + } + } else { + while (y < yend) { + y++; + if (d <0) { + d+=incr1; + } else { + x--; + d+=incr2; + } + gdImageSetPixel(im, x, y, color); + } + } + } +} + +/* As above, plus dashing */ + +#define dashedSet \ + { \ + dashStep++; \ + if (dashStep == gdDashSize) { \ + dashStep = 0; \ + on = !on; \ + } \ + if (on) { \ + gdImageSetPixel(im, x, y, color); \ + } \ + } + +void gdImageDashedLine(gdImagePtr im, int x1, int y1, int x2, int y2, int color) +{ + int dx, dy, incr1, incr2, d, x, y, xend, yend, xdirflag, ydirflag; + int dashStep = 0; + int on = 1; + dx = abs(x2-x1); + dy = abs(y2-y1); + if (dy <= dx) { + d = 2*dy - dx; + incr1 = 2*dy; + incr2 = 2 * (dy - dx); + if (x1 > x2) { + x = x2; + y = y2; + ydirflag = (-1); + xend = x1; + } else { + x = x1; + y = y1; + ydirflag = 1; + xend = x2; + } + dashedSet; + if (((y2 - y1) * ydirflag) > 0) { + while (x < xend) { + x++; + if (d <0) { + d+=incr1; + } else { + y++; + d+=incr2; + } + dashedSet; + } + } else { + while (x < xend) { + x++; + if (d <0) { + d+=incr1; + } else { + y--; + d+=incr2; + } + dashedSet; + } + } + } else { + d = 2*dx - dy; + incr1 = 2*dx; + incr2 = 2 * (dx - dy); + if (y1 > y2) { + y = y2; + x = x2; + yend = y1; + xdirflag = (-1); + } else { + y = y1; + x = x1; + yend = y2; + xdirflag = 1; + } + dashedSet; + if (((x2 - x1) * xdirflag) > 0) { + while (y < yend) { + y++; + if (d <0) { + d+=incr1; + } else { + x++; + d+=incr2; + } + dashedSet; + } + } else { + while (y < yend) { + y++; + if (d <0) { + d+=incr1; + } else { + x--; + d+=incr2; + } + dashedSet; + } + } + } +} + +int gdImageBoundsSafe(gdImagePtr im, int x, int y) +{ + return (!(((y < 0) || (y >= im->sy)) || + ((x < 0) || (x >= im->sx)))); +} + +void gdImageChar(gdImagePtr im, gdFontPtr f, int x, int y, int c, int color) +{ + int cx, cy; + int px, py; + int fline; + cx = 0; + cy = 0; + if ((c < f->offset) || (c >= (f->offset + f->nchars))) { + return; + } + fline = (c - f->offset) * f->h * f->w; + for (py = y; (py < (y + f->h)); py++) { + for (px = x; (px < (x + f->w)); px++) { + if (f->data[fline + cy * f->w + cx]) { + gdImageSetPixel(im, px, py, color); + } + cx++; + } + cx = 0; + cy++; + } +} + +void gdImageCharUp(gdImagePtr im, gdFontPtr f, int x, int y, char c, int color) +{ + int cx, cy; + int px, py; + int fline; + cx = 0; + cy = 0; + if ((c < f->offset) || (c >= (f->offset + f->nchars))) { + return; + } + fline = (c - f->offset) * f->h * f->w; + for (py = y; (py > (y - f->w)); py--) { + for (px = x; (px < (x + f->h)); px++) { + if (f->data[fline + cy * f->w + cx]) { + gdImageSetPixel(im, px, py, color); + } + cy++; + } + cy = 0; + cx++; + } +} + +void gdImageString(gdImagePtr im, gdFontPtr f, int x, int y, char *s, int color) +{ + int i; + int l; + l = strlen(s); + for (i=0; (iw; + } +} + +void gdImageStringUp(gdImagePtr im, gdFontPtr f, int x, int y, char *s, int color) +{ + int i; + int l; + l = strlen(s); + for (i=0; (iw; + } +} + +/* s and e are integers modulo 360 (degrees), with 0 degrees + being the rightmost extreme and degrees changing clockwise. + cx and cy are the center in pixels; w and h are the horizontal + and vertical diameter in pixels. Nice interface, but slow, since + I don't yet use Bresenham (I'm using an inefficient but + simple solution with too much work going on in it; generalizing + Bresenham to ellipses and partial arcs of ellipses is non-trivial, + at least for me) and there are other inefficiencies (small circles + do far too much work). */ + +void gdImageArc(gdImagePtr im, int cx, int cy, int w, int h, int s, int e, int color) +{ + int i; + int lx = 0, ly = 0; + int w2, h2; + w2 = w/2; + h2 = h/2; + while (e < s) { + e += 360; + } + for (i=s; (i <= e); i++) { + int x, y; + x = ((long)cost[i % 360] * (long)w2 / costScale) + cx; + y = ((long)sint[i % 360] * (long)h2 / sintScale) + cy; + if (i != s) { + gdImageLine(im, lx, ly, x, y, color); + } + lx = x; + ly = y; + } +} + + +#if 0 + /* Bresenham octant code, which I should use eventually */ + int x, y, d; + x = 0; + y = w; + d = 3-2*w; + while (x < y) { + gdImageSetPixel(im, cx+x, cy+y, color); + if (d < 0) { + d += 4 * x + 6; + } else { + d += 4 * (x - y) + 10; + y--; + } + x++; + } + if (x == y) { + gdImageSetPixel(im, cx+x, cy+y, color); + } +#endif + +void gdImageFillToBorder(gdImagePtr im, int x, int y, int border, int color) +{ + int lastBorder; + /* Seek left */ + int leftLimit, rightLimit; + int i; + leftLimit = (-1); + if (border < 0) { + /* Refuse to fill to a non-solid border */ + return; + } + for (i = x; (i >= 0); i--) { + if (gdImageGetPixel(im, i, y) == border) { + break; + } + gdImageSetPixel(im, i, y, color); + leftLimit = i; + } + if (leftLimit == (-1)) { + return; + } + /* Seek right */ + rightLimit = x; + for (i = (x+1); (i < im->sx); i++) { + if (gdImageGetPixel(im, i, y) == border) { + break; + } + gdImageSetPixel(im, i, y, color); + rightLimit = i; + } + /* Look at lines above and below and start paints */ + /* Above */ + if (y > 0) { + lastBorder = 1; + for (i = leftLimit; (i <= rightLimit); i++) { + int c; + c = gdImageGetPixel(im, i, y-1); + if (lastBorder) { + if ((c != border) && (c != color)) { + gdImageFillToBorder(im, i, y-1, + border, color); + lastBorder = 0; + } + } else if ((c == border) || (c == color)) { + lastBorder = 1; + } + } + } + /* Below */ + if (y < ((im->sy) - 1)) { + lastBorder = 1; + for (i = leftLimit; (i <= rightLimit); i++) { + int c; + c = gdImageGetPixel(im, i, y+1); + if (lastBorder) { + if ((c != border) && (c != color)) { + gdImageFillToBorder(im, i, y+1, + border, color); + lastBorder = 0; + } + } else if ((c == border) || (c == color)) { + lastBorder = 1; + } + } + } +} + +void gdImageFill(gdImagePtr im, int x, int y, int color) +{ + int lastBorder; + int old; + int leftLimit, rightLimit; + int i; + old = gdImageGetPixel(im, x, y); + if (color == gdTiled) { + /* Tile fill -- got to watch out! */ + int p, tileColor; + int srcx, srcy; + if (!im->tile) { + return; + } + /* Refuse to flood-fill with a transparent pattern -- + I can't do it without allocating another image */ + if (gdImageGetTransparent(im->tile) != (-1)) { + return; + } + srcx = x % gdImageSX(im->tile); + srcy = y % gdImageSY(im->tile); + p = gdImageGetPixel(im->tile, srcx, srcy); + tileColor = im->tileColorMap[p]; + if (old == tileColor) { + /* Nothing to be done */ + return; + } + } else { + if (old == color) { + /* Nothing to be done */ + return; + } + } + /* Seek left */ + leftLimit = (-1); + for (i = x; (i >= 0); i--) { + if (gdImageGetPixel(im, i, y) != old) { + break; + } + gdImageSetPixel(im, i, y, color); + leftLimit = i; + } + if (leftLimit == (-1)) { + return; + } + /* Seek right */ + rightLimit = x; + for (i = (x+1); (i < im->sx); i++) { + if (gdImageGetPixel(im, i, y) != old) { + break; + } + gdImageSetPixel(im, i, y, color); + rightLimit = i; + } + /* Look at lines above and below and start paints */ + /* Above */ + if (y > 0) { + lastBorder = 1; + for (i = leftLimit; (i <= rightLimit); i++) { + int c; + c = gdImageGetPixel(im, i, y-1); + if (lastBorder) { + if (c == old) { + gdImageFill(im, i, y-1, color); + lastBorder = 0; + } + } else if (c != old) { + lastBorder = 1; + } + } + } + /* Below */ + if (y < ((im->sy) - 1)) { + lastBorder = 1; + for (i = leftLimit; (i <= rightLimit); i++) { + int c; + c = gdImageGetPixel(im, i, y+1); + if (lastBorder) { + if (c == old) { + gdImageFill(im, i, y+1, color); + lastBorder = 0; + } + } else if (c != old) { + lastBorder = 1; + } + } + } +} + +#ifdef TEST_CODE +void gdImageDump(gdImagePtr im) +{ + int i, j; + for (i=0; (i < im->sy); i++) { + for (j=0; (j < im->sx); j++) { + printf("%d", im->pixels[j][i]); + } + printf("\n"); + } +} +#endif + +/* Code drawn from ppmtogif.c, from the pbmplus package +** +** Based on GIFENCOD by David Rowley . A +** Lempel-Zim compression based on "compress". +** +** Modified by Marcel Wijkstra +** +** Copyright (C) 1989 by Jef Poskanzer. +** +** Permission to use, copy, modify, and distribute this software and its +** documentation for any purpose and without fee is hereby granted, provided +** that the above copyright notice appear in all copies and that both that +** copyright notice and this permission notice appear in supporting +** documentation. This software is provided "as is" without express or +** implied warranty. +** +** The Graphics Interchange Format(c) is the Copyright property of +** CompuServe Incorporated. GIF(sm) is a Service Mark property of +** CompuServe Incorporated. +*/ + +/* + * a code_int must be able to hold 2**GIFBITS values of type int, and also -1 + */ +typedef int code_int; + +#ifdef SIGNED_COMPARE_SLOW +typedef unsigned long int count_int; +typedef unsigned short int count_short; +#else /*SIGNED_COMPARE_SLOW*/ +typedef long int count_int; +#endif /*SIGNED_COMPARE_SLOW*/ + +static int colorstobpp(int colors); +static void BumpPixel (void); +static int GIFNextPixel (gdImagePtr im); +static void GIFEncode (FILE *fp, int GWidth, int GHeight, int GInterlace, int Background, int Transparent, int BitsPerPixel, int *Red, int *Green, int *Blue, gdImagePtr im); +static void Putword (int w, FILE *fp); +static void compress (int init_bits, FILE *outfile, gdImagePtr im); +static void output (code_int code); +static void cl_block (void); +static void cl_hash (register count_int hsize); +static void char_init (void); +static void char_out (int c); +static void flush_char (void); +/* Allows for reuse */ +static void init_statics(void); + +void gdImageGif(gdImagePtr im, FILE *out) +{ + int interlace, transparent, BitsPerPixel; + interlace = im->interlace; + transparent = im->transparent; + + BitsPerPixel = colorstobpp(im->colorsTotal); + /* Clear any old values in statics strewn through the GIF code */ + init_statics(); + /* All set, let's do it. */ + GIFEncode( + out, im->sx, im->sy, interlace, 0, transparent, BitsPerPixel, + im->red, im->green, im->blue, im); +} + +static int +colorstobpp(int colors) +{ + int bpp = 0; + + if ( colors <= 2 ) + bpp = 1; + else if ( colors <= 4 ) + bpp = 2; + else if ( colors <= 8 ) + bpp = 3; + else if ( colors <= 16 ) + bpp = 4; + else if ( colors <= 32 ) + bpp = 5; + else if ( colors <= 64 ) + bpp = 6; + else if ( colors <= 128 ) + bpp = 7; + else if ( colors <= 256 ) + bpp = 8; + return bpp; + } + +/***************************************************************************** + * + * GIFENCODE.C - GIF Image compression interface + * + * GIFEncode( FName, GHeight, GWidth, GInterlace, Background, Transparent, + * BitsPerPixel, Red, Green, Blue, gdImagePtr ) + * + *****************************************************************************/ + +#define TRUE 1 +#define FALSE 0 + +static int Width, Height; +static int curx, cury; +static long CountDown; +static int Pass = 0; +static int Interlace; + +/* + * Bump the 'curx' and 'cury' to point to the next pixel + */ +static void +BumpPixel(void) +{ + /* + * Bump the current X position + */ + ++curx; + + /* + * If we are at the end of a scan line, set curx back to the beginning + * If we are interlaced, bump the cury to the appropriate spot, + * otherwise, just increment it. + */ + if( curx == Width ) { + curx = 0; + + if( !Interlace ) + ++cury; + else { + switch( Pass ) { + + case 0: + cury += 8; + if( cury >= Height ) { + ++Pass; + cury = 4; + } + break; + + case 1: + cury += 8; + if( cury >= Height ) { + ++Pass; + cury = 2; + } + break; + + case 2: + cury += 4; + if( cury >= Height ) { + ++Pass; + cury = 1; + } + break; + + case 3: + cury += 2; + break; + } + } + } +} + +/* + * Return the next pixel from the image + */ +static int +GIFNextPixel(gdImagePtr im) +{ + int r; + + if( CountDown == 0 ) + return EOF; + + --CountDown; + + r = gdImageGetPixel(im, curx, cury); + + BumpPixel(); + + return r; +} + +/* public */ + +static void +GIFEncode(FILE *fp, int GWidth, int GHeight, int GInterlace, int Background, int Transparent, int BitsPerPixel, int *Red, int *Green, int *Blue, gdImagePtr im) +{ + int B; + int RWidth, RHeight; + int LeftOfs, TopOfs; + int Resolution; + int ColorMapSize; + int InitCodeSize; + int i; + + Interlace = GInterlace; + + ColorMapSize = 1 << BitsPerPixel; + + RWidth = Width = GWidth; + RHeight = Height = GHeight; + LeftOfs = TopOfs = 0; + + Resolution = BitsPerPixel; + + /* + * Calculate number of bits we are expecting + */ + CountDown = (long)Width * (long)Height; + + /* + * Indicate which pass we are on (if interlace) + */ + Pass = 0; + + /* + * The initial code size + */ + if( BitsPerPixel <= 1 ) + InitCodeSize = 2; + else + InitCodeSize = BitsPerPixel; + + /* + * Set up the current x and y position + */ + curx = cury = 0; + + /* + * Write the Magic header + */ + fwrite( Transparent < 0 ? "GIF87a" : "GIF89a", 1, 6, fp ); + + /* + * Write out the screen width and height + */ + Putword( RWidth, fp ); + Putword( RHeight, fp ); + + /* + * Indicate that there is a global colour map + */ + B = 0x80; /* Yes, there is a color map */ + + /* + * OR in the resolution + */ + B |= (Resolution - 1) << 5; + + /* + * OR in the Bits per Pixel + */ + B |= (BitsPerPixel - 1); + + /* + * Write it out + */ + fputc( B, fp ); + + /* + * Write out the Background colour + */ + fputc( Background, fp ); + + /* + * Byte of 0's (future expansion) + */ + fputc( 0, fp ); + + /* + * Write out the Global Colour Map + */ + for( i=0; i= 0 ) { + fputc( '!', fp ); + fputc( 0xf9, fp ); + fputc( 4, fp ); + fputc( 1, fp ); + fputc( 0, fp ); + fputc( 0, fp ); + fputc( (unsigned char) Transparent, fp ); + fputc( 0, fp ); + } + + /* + * Write an Image separator + */ + fputc( ',', fp ); + + /* + * Write the Image header + */ + + Putword( LeftOfs, fp ); + Putword( TopOfs, fp ); + Putword( Width, fp ); + Putword( Height, fp ); + + /* + * Write out whether or not the image is interlaced + */ + if( Interlace ) + fputc( 0x40, fp ); + else + fputc( 0x00, fp ); + + /* + * Write out the initial code size + */ + fputc( InitCodeSize, fp ); + + /* + * Go and actually compress the data + */ + compress( InitCodeSize+1, fp, im ); + + /* + * Write out a Zero-length packet (to end the series) + */ + fputc( 0, fp ); + + /* + * Write the GIF file terminator + */ + fputc( ';', fp ); +} + +/* + * Write out a word to the GIF file + */ +static void +Putword(int w, FILE *fp) +{ + fputc( w & 0xff, fp ); + fputc( (w / 256) & 0xff, fp ); +} + + +/*************************************************************************** + * + * GIFCOMPR.C - GIF Image compression routines + * + * Lempel-Ziv compression based on 'compress'. GIF modifications by + * David Rowley (mgardi@watdcsu.waterloo.edu) + * + ***************************************************************************/ + +/* + * General DEFINEs + */ + +#define GIFBITS 12 + +#define HSIZE 5003 /* 80% occupancy */ + +#ifdef NO_UCHAR + typedef char char_type; +#else /*NO_UCHAR*/ + typedef unsigned char char_type; +#endif /*NO_UCHAR*/ + +/* + * + * GIF Image compression - modified 'compress' + * + * Based on: compress.c - File compression ala IEEE Computer, June 1984. + * + * By Authors: Spencer W. Thomas (decvax!harpo!utah-cs!utah-gr!thomas) + * Jim McKie (decvax!mcvax!jim) + * Steve Davies (decvax!vax135!petsd!peora!srd) + * Ken Turkowski (decvax!decwrl!turtlevax!ken) + * James A. Woods (decvax!ihnp4!ames!jaw) + * Joe Orost (decvax!vax135!petsd!joe) + * + */ +#include + +#define ARGVAL() (*++(*argv) || (--argc && *++argv)) + +static int n_bits; /* number of bits/code */ +static int maxbits = GIFBITS; /* user settable max # bits/code */ +static code_int maxcode; /* maximum code, given n_bits */ +static code_int maxmaxcode = (code_int)1 << GIFBITS; /* should NEVER generate this code */ +#ifdef COMPATIBLE /* But wrong! */ +# define MAXCODE(n_bits) ((code_int) 1 << (n_bits) - 1) +#else /*COMPATIBLE*/ +# define MAXCODE(n_bits) (((code_int) 1 << (n_bits)) - 1) +#endif /*COMPATIBLE*/ + +static count_int htab [HSIZE]; +static unsigned short codetab [HSIZE]; +#define HashTabOf(i) htab[i] +#define CodeTabOf(i) codetab[i] + +static code_int hsize = HSIZE; /* for dynamic table sizing */ + +/* + * To save much memory, we overlay the table used by compress() with those + * used by decompress(). The tab_prefix table is the same size and type + * as the codetab. The tab_suffix table needs 2**GIFBITS characters. We + * get this from the beginning of htab. The output stack uses the rest + * of htab, and contains characters. There is plenty of room for any + * possible stack (stack used to be 8000 characters). + */ + +#define tab_prefixof(i) CodeTabOf(i) +#define tab_suffixof(i) ((char_type*)(htab))[i] +#define de_stack ((char_type*)&tab_suffixof((code_int)1< 0 ) + goto probe; +nomatch: + output ( (code_int) ent ); + ++out_count; + ent = c; +#ifdef SIGNED_COMPARE_SLOW + if ( (unsigned) free_ent < (unsigned) maxmaxcode) { +#else /*SIGNED_COMPARE_SLOW*/ + if ( free_ent < maxmaxcode ) { /* } */ +#endif /*SIGNED_COMPARE_SLOW*/ + CodeTabOf (i) = free_ent++; /* code -> hashtable */ + HashTabOf (i) = fcode; + } else + cl_block(); + } + /* + * Put out the final code. + */ + output( (code_int)ent ); + ++out_count; + output( (code_int) EOFCode ); +} + +/***************************************************************** + * TAG( output ) + * + * Output the given code. + * Inputs: + * code: A n_bits-bit integer. If == -1, then EOF. This assumes + * that n_bits =< (long)wordsize - 1. + * Outputs: + * Outputs code to the file. + * Assumptions: + * Chars are 8 bits long. + * Algorithm: + * Maintain a GIFBITS character long buffer (so that 8 codes will + * fit in it exactly). Use the VAX insv instruction to insert each + * code in turn. When the buffer fills up empty it and start over. + */ + +static unsigned long cur_accum = 0; +static int cur_bits = 0; + +static unsigned long masks[] = { 0x0000, 0x0001, 0x0003, 0x0007, 0x000F, + 0x001F, 0x003F, 0x007F, 0x00FF, + 0x01FF, 0x03FF, 0x07FF, 0x0FFF, + 0x1FFF, 0x3FFF, 0x7FFF, 0xFFFF }; + +static void +output(code_int code) +{ + cur_accum &= masks[ cur_bits ]; + + if( cur_bits > 0 ) + cur_accum |= ((long)code << cur_bits); + else + cur_accum = code; + + cur_bits += n_bits; + + while( cur_bits >= 8 ) { + char_out( (unsigned int)(cur_accum & 0xff) ); + cur_accum >>= 8; + cur_bits -= 8; + } + + /* + * If the next entry is going to be too big for the code size, + * then increase it, if possible. + */ + if ( free_ent > maxcode || clear_flg ) { + + if( clear_flg ) { + + maxcode = MAXCODE (n_bits = g_init_bits); + clear_flg = 0; + + } else { + + ++n_bits; + if ( n_bits == maxbits ) + maxcode = maxmaxcode; + else + maxcode = MAXCODE(n_bits); + } + } + + if( code == EOFCode ) { + /* + * At EOF, write the rest of the buffer. + */ + while( cur_bits > 0 ) { + char_out( (unsigned int)(cur_accum & 0xff) ); + cur_accum >>= 8; + cur_bits -= 8; + } + + flush_char(); + + fflush( g_outfile ); + + if( ferror( g_outfile ) ) + return; + } +} + +/* + * Clear out the hash table + */ +static void +cl_block (void) /* table clear for block compress */ +{ + + cl_hash ( (count_int) hsize ); + free_ent = ClearCode + 2; + clear_flg = 1; + + output( (code_int)ClearCode ); +} + +static void +cl_hash(register count_int hsize) /* reset code table */ + +{ + + register count_int *htab_p = htab+hsize; + + register long i; + register long m1 = -1; + + i = hsize - 16; + do { /* might use Sys V memset(3) here */ + *(htab_p-16) = m1; + *(htab_p-15) = m1; + *(htab_p-14) = m1; + *(htab_p-13) = m1; + *(htab_p-12) = m1; + *(htab_p-11) = m1; + *(htab_p-10) = m1; + *(htab_p-9) = m1; + *(htab_p-8) = m1; + *(htab_p-7) = m1; + *(htab_p-6) = m1; + *(htab_p-5) = m1; + *(htab_p-4) = m1; + *(htab_p-3) = m1; + *(htab_p-2) = m1; + *(htab_p-1) = m1; + htab_p -= 16; + } while ((i -= 16) >= 0); + + for ( i += 16; i > 0; --i ) + *--htab_p = m1; +} + +/****************************************************************************** + * + * GIF Specific routines + * + ******************************************************************************/ + +/* + * Number of characters so far in this 'packet' + */ +static int a_count; + +/* + * Set up the 'byte output' routine + */ +static void +char_init(void) +{ + a_count = 0; +} + +/* + * Define the storage for the packet accumulator + */ +static char accum[ 256 ]; + +/* + * Add a character to the end of the current packet, and if it is 254 + * characters, flush the packet to disk. + */ +static void +char_out(int c) +{ + accum[ a_count++ ] = c; + if( a_count >= 254 ) + flush_char(); +} + +/* + * Flush the packet to disk, and reset the accumulator + */ +static void +flush_char(void) +{ + if( a_count > 0 ) { + fputc( a_count, g_outfile ); + fwrite( accum, 1, a_count, g_outfile ); + a_count = 0; + } +} + +static void init_statics(void) { + /* Some of these are properly initialized later. What I'm doing + here is making sure code that depends on C's initialization + of statics doesn't break when the code gets called more + than once. */ + Width = 0; + Height = 0; + curx = 0; + cury = 0; + CountDown = 0; + Pass = 0; + Interlace = 0; + a_count = 0; + cur_accum = 0; + cur_bits = 0; + g_init_bits = 0; + g_outfile = 0; + ClearCode = 0; + EOFCode = 0; + free_ent = 0; + clear_flg = 0; + offset = 0; + in_count = 1; + out_count = 0; + hsize = HSIZE; + n_bits = 0; + maxbits = GIFBITS; + maxcode = 0; + maxmaxcode = (code_int)1 << GIFBITS; +} + + +/* +-------------------------------------------------------------------+ */ +/* | Copyright 1990, 1991, 1993, David Koblas. (koblas@netcom.com) | */ +/* | Permission to use, copy, modify, and distribute this software | */ +/* | and its documentation for any purpose and without fee is hereby | */ +/* | granted, provided that the above copyright notice appear in all | */ +/* | copies and that both that copyright notice and this permission | */ +/* | notice appear in supporting documentation. This software is | */ +/* | provided "as is" without express or implied warranty. | */ +/* +-------------------------------------------------------------------+ */ + + +#define MAXCOLORMAPSIZE 256 + +#define TRUE 1 +#define FALSE 0 + +#define CM_RED 0 +#define CM_GREEN 1 +#define CM_BLUE 2 + +#define MAX_LWZ_BITS 12 + +#define INTERLACE 0x40 +#define LOCALCOLORMAP 0x80 +#define BitSet(byte, bit) (((byte) & (bit)) == (bit)) + +#define ReadOK(file,buffer,len) (fread(buffer, len, 1, file) != 0) + +#define LM_to_uint(a,b) (((b)<<8)|(a)) + +/* We may eventually want to use this information, but def it out for now */ +#if 0 +static struct { + unsigned int Width; + unsigned int Height; + unsigned char ColorMap[3][MAXCOLORMAPSIZE]; + unsigned int BitPixel; + unsigned int ColorResolution; + unsigned int Background; + unsigned int AspectRatio; +} GifScreen; +#endif + +static struct { + int transparent; + int delayTime; + int inputFlag; + int disposal; +} Gif89 = { -1, -1, -1, 0 }; + +static int ReadColorMap (FILE *fd, int number, unsigned char (*buffer)[256]); +static int DoExtension (FILE *fd, int label, int *Transparent); +static int GetDataBlock (FILE *fd, unsigned char *buf); +static int GetCode (FILE *fd, int code_size, int flag); +static int LWZReadByte (FILE *fd, int flag, int input_code_size); +static void ReadImage (gdImagePtr im, FILE *fd, int len, int height, unsigned char (*cmap)[256], int interlace, int ignore); + +int ZeroDataBlock; + +gdImagePtr +gdImageCreateFromGif(FILE *fd) +{ + int imageNumber; + int BitPixel; + int ColorResolution; + int Background; + int AspectRatio; + int Transparent = (-1); + unsigned char buf[16]; + unsigned char c; + unsigned char ColorMap[3][MAXCOLORMAPSIZE]; + unsigned char localColorMap[3][MAXCOLORMAPSIZE]; + int imw, imh; + int useGlobalColormap; + int bitPixel; + int imageCount = 0; + char version[4]; + gdImagePtr im = 0; + ZeroDataBlock = FALSE; + + imageNumber = 1; + if (! ReadOK(fd,buf,6)) { + return 0; + } + if (strncmp((char *)buf,"GIF",3) != 0) { + return 0; + } + strncpy(version, (char *)buf + 3, 3); + version[3] = '\0'; + + if ((strcmp(version, "87a") != 0) && (strcmp(version, "89a") != 0)) { + return 0; + } + if (! ReadOK(fd,buf,7)) { + return 0; + } + BitPixel = 2<<(buf[4]&0x07); + ColorResolution = (int) (((buf[4]&0x70)>>3)+1); + Background = buf[5]; + AspectRatio = buf[6]; + + if (BitSet(buf[4], LOCALCOLORMAP)) { /* Global Colormap */ + if (ReadColorMap(fd, BitPixel, ColorMap)) { + return 0; + } + } + for (;;) { + if (! ReadOK(fd,&c,1)) { + return 0; + } + if (c == ';') { /* GIF terminator */ + int i; + if (imageCount < imageNumber) { + return 0; + } + /* Terminator before any image was declared! */ + if (!im) { + return 0; + } + /* Check for open colors at the end, so + we can reduce colorsTotal and ultimately + BitsPerPixel */ + for (i=((im->colorsTotal-1)); (i>=0); i--) { + if (im->open[i]) { + im->colorsTotal--; + } else { + break; + } + } + return im; + } + + if (c == '!') { /* Extension */ + if (! ReadOK(fd,&c,1)) { + return 0; + } + DoExtension(fd, c, &Transparent); + continue; + } + + if (c != ',') { /* Not a valid start character */ + continue; + } + + ++imageCount; + + if (! ReadOK(fd,buf,9)) { + return 0; + } + + useGlobalColormap = ! BitSet(buf[8], LOCALCOLORMAP); + + bitPixel = 1<<((buf[8]&0x07)+1); + + imw = LM_to_uint(buf[4],buf[5]); + imh = LM_to_uint(buf[6],buf[7]); + if (!(im = gdImageCreate(imw, imh))) { + return 0; + } + im->interlace = BitSet(buf[8], INTERLACE); + if (! useGlobalColormap) { + if (ReadColorMap(fd, bitPixel, localColorMap)) { + return 0; + } + ReadImage(im, fd, imw, imh, localColorMap, + BitSet(buf[8], INTERLACE), + imageCount != imageNumber); + } else { + ReadImage(im, fd, imw, imh, + ColorMap, + BitSet(buf[8], INTERLACE), + imageCount != imageNumber); + } + if (Transparent != (-1)) { + gdImageColorTransparent(im, Transparent); + } + } +} + +static int +ReadColorMap(FILE *fd, int number, unsigned char (*buffer)[256]) +{ + int i; + unsigned char rgb[3]; + + + for (i = 0; i < number; ++i) { + if (! ReadOK(fd, rgb, sizeof(rgb))) { + return TRUE; + } + buffer[CM_RED][i] = rgb[0] ; + buffer[CM_GREEN][i] = rgb[1] ; + buffer[CM_BLUE][i] = rgb[2] ; + } + + + return FALSE; +} + +static int +DoExtension(FILE *fd, int label, int *Transparent) +{ + static unsigned char buf[256]; + + switch (label) { + case 0xf9: /* Graphic Control Extension */ + (void) GetDataBlock(fd, (unsigned char*) buf); + Gif89.disposal = (buf[0] >> 2) & 0x7; + Gif89.inputFlag = (buf[0] >> 1) & 0x1; + Gif89.delayTime = LM_to_uint(buf[1],buf[2]); + if ((buf[0] & 0x1) != 0) + *Transparent = buf[3]; + + while (GetDataBlock(fd, (unsigned char*) buf) != 0) + ; + return FALSE; + default: + break; + } + while (GetDataBlock(fd, (unsigned char*) buf) != 0) + ; + + return FALSE; +} + +static int +GetDataBlock(FILE *fd, unsigned char *buf) +{ + unsigned char count; + + if (! ReadOK(fd,&count,1)) { + return -1; + } + + ZeroDataBlock = count == 0; + + if ((count != 0) && (! ReadOK(fd, buf, count))) { + return -1; + } + + return count; +} + +static int +GetCode(FILE *fd, int code_size, int flag) +{ + static unsigned char buf[280]; + static int curbit, lastbit, done, last_byte; + int i, j, ret; + unsigned char count; + + if (flag) { + curbit = 0; + lastbit = 0; + done = FALSE; + return 0; + } + + if ( (curbit+code_size) >= lastbit) { + if (done) { + if (curbit >= lastbit) { + /* Oh well */ + } + return -1; + } + buf[0] = buf[last_byte-2]; + buf[1] = buf[last_byte-1]; + + if ((count = GetDataBlock(fd, &buf[2])) == 0) + done = TRUE; + + last_byte = 2 + count; + curbit = (curbit - lastbit) + 16; + lastbit = (2+count)*8 ; + } + + ret = 0; + for (i = curbit, j = 0; j < code_size; ++i, ++j) + ret |= ((buf[ i / 8 ] & (1 << (i % 8))) != 0) << j; + + curbit += code_size; + + return ret; +} + +static int +LWZReadByte(FILE *fd, int flag, int input_code_size) +{ + static int fresh = FALSE; + int code, incode; + static int code_size, set_code_size; + static int max_code, max_code_size; + static int firstcode, oldcode; + static int clear_code, end_code; + static int table[2][(1<< MAX_LWZ_BITS)]; + static int stack[(1<<(MAX_LWZ_BITS))*2], *sp; + register int i; + + if (flag) { + set_code_size = input_code_size; + code_size = set_code_size+1; + clear_code = 1 << set_code_size ; + end_code = clear_code + 1; + max_code_size = 2*clear_code; + max_code = clear_code+2; + + GetCode(fd, 0, TRUE); + + fresh = TRUE; + + for (i = 0; i < clear_code; ++i) { + table[0][i] = 0; + table[1][i] = i; + } + for (; i < (1< stack) + return *--sp; + + while ((code = GetCode(fd, code_size, FALSE)) >= 0) { + if (code == clear_code) { + for (i = 0; i < clear_code; ++i) { + table[0][i] = 0; + table[1][i] = i; + } + for (; i < (1< 0) + ; + + if (count != 0) + return -2; + } + + incode = code; + + if (code >= max_code) { + *sp++ = firstcode; + code = oldcode; + } + + while (code >= clear_code) { + *sp++ = table[1][code]; + if (code == table[0][code]) { + /* Oh well */ + } + code = table[0][code]; + } + + *sp++ = firstcode = table[1][code]; + + if ((code = max_code) <(1<= max_code_size) && + (max_code_size < (1< stack) + return *--sp; + } + return code; +} + +static void +ReadImage(gdImagePtr im, FILE *fd, int len, int height, unsigned char (*cmap)[256], int interlace, int ignore) +{ + unsigned char c; + int v; + int xpos = 0, ypos = 0, pass = 0; + int i; + /* Stash the color map into the image */ + for (i=0; (ired[i] = cmap[CM_RED][i]; + im->green[i] = cmap[CM_GREEN][i]; + im->blue[i] = cmap[CM_BLUE][i]; + im->open[i] = 1; + } + /* Many (perhaps most) of these colors will remain marked open. */ + im->colorsTotal = gdMaxColors; + /* + ** Initialize the Compression routines + */ + if (! ReadOK(fd,&c,1)) { + return; + } + if (LWZReadByte(fd, TRUE, c) < 0) { + return; + } + + /* + ** If this is an "uninteresting picture" ignore it. + */ + if (ignore) { + while (LWZReadByte(fd, FALSE, c) >= 0) + ; + return; + } + + while ((v = LWZReadByte(fd,FALSE,c)) >= 0 ) { + /* This how we recognize which colors are actually used. */ + if (im->open[v]) { + im->open[v] = 0; + } + gdImageSetPixel(im, xpos, ypos, v); + ++xpos; + if (xpos == len) { + xpos = 0; + if (interlace) { + switch (pass) { + case 0: + case 1: + ypos += 8; break; + case 2: + ypos += 4; break; + case 3: + ypos += 2; break; + } + + if (ypos >= height) { + ++pass; + switch (pass) { + case 1: + ypos = 4; break; + case 2: + ypos = 2; break; + case 3: + ypos = 1; break; + default: + goto fini; + } + } + } else { + ++ypos; + } + } + if (ypos >= height) + break; + } + +fini: + if (LWZReadByte(fd,FALSE,c)>=0) { + /* Ignore extra */ + } +} + +void gdImageRectangle(gdImagePtr im, int x1, int y1, int x2, int y2, int color) +{ + gdImageLine(im, x1, y1, x2, y1, color); + gdImageLine(im, x1, y2, x2, y2, color); + gdImageLine(im, x1, y1, x1, y2, color); + gdImageLine(im, x2, y1, x2, y2, color); +} + +void gdImageFilledRectangle(gdImagePtr im, int x1, int y1, int x2, int y2, int color) +{ + int x, y; + for (y=y1; (y<=y2); y++) { + for (x=x1; (x<=x2); x++) { + gdImageSetPixel(im, x, y, color); + } + } +} + +void gdImageCopy(gdImagePtr dst, gdImagePtr src, int dstX, int dstY, int srcX, int srcY, int w, int h) +{ + int c; + int x, y; + int tox, toy; + int i; + int colorMap[gdMaxColors]; + for (i=0; (ired[c], src->green[c], + src->blue[c]); + } + if (nc == (-1)) { + /* No, so try to allocate it */ + nc = gdImageColorAllocate(dst, + src->red[c], src->green[c], + src->blue[c]); + /* If we're out of colors, go for the + closest color */ + if (nc == (-1)) { + nc = gdImageColorClosest(dst, + src->red[c], src->green[c], + src->blue[c]); + } + } + colorMap[c] = nc; + } + gdImageSetPixel(dst, tox, toy, colorMap[c]); + tox++; + } + toy++; + } +} + +void gdImageCopyResized(gdImagePtr dst, gdImagePtr src, int dstX, int dstY, int srcX, int srcY, int dstW, int dstH, int srcW, int srcH) +{ + int c; + int x, y; + int tox, toy; + int ydest; + int i; + int colorMap[gdMaxColors]; + /* Stretch vectors */ + int *stx; + int *sty; + /* We only need to use floating point to determine the correct + stretch vector for one line's worth. */ + double accum; + stx = (int *) malloc(sizeof(int) * srcW); + sty = (int *) malloc(sizeof(int) * srcH); + accum = 0; + for (i=0; (i < srcW); i++) { + int got; + accum += (double)dstW/(double)srcW; + got = floor(accum); + stx[i] = got; + accum -= got; + } + accum = 0; + for (i=0; (i < srcH); i++) { + int got; + accum += (double)dstH/(double)srcH; + got = floor(accum); + sty[i] = got; + accum -= got; + } + for (i=0; (ired[c], src->green[c], + src->blue[c]); + } + if (nc == (-1)) { + /* No, so try to allocate it */ + nc = gdImageColorAllocate(dst, + src->red[c], src->green[c], + src->blue[c]); + /* If we're out of colors, go for the + closest color */ + if (nc == (-1)) { + nc = gdImageColorClosest(dst, + src->red[c], src->green[c], + src->blue[c]); + } + } + colorMap[c] = nc; + } + for (i=0; (i < stx[x - srcX]); i++) { + gdImageSetPixel(dst, tox, toy, colorMap[c]); + tox++; + } + } + toy++; + } + } + free(stx); + free(sty); +} + +int gdGetWord(int *result, FILE *in) +{ + int r; + r = getc(in); + if (r == EOF) { + return 0; + } + *result = r << 8; + r = getc(in); + if (r == EOF) { + return 0; + } + *result += r; + return 1; +} + +void gdPutWord(int w, FILE *out) +{ + putc((unsigned char)(w >> 8), out); + putc((unsigned char)(w & 0xFF), out); +} + +int gdGetByte(int *result, FILE *in) +{ + int r; + r = getc(in); + if (r == EOF) { + return 0; + } + *result = r; + return 1; +} + +gdImagePtr gdImageCreateFromGd(FILE *in) +{ + int sx, sy; + int x, y; + int i; + gdImagePtr im; + if (!gdGetWord(&sx, in)) { + goto fail1; + } + if (!gdGetWord(&sy, in)) { + goto fail1; + } + im = gdImageCreate(sx, sy); + if (!gdGetByte(&im->colorsTotal, in)) { + goto fail2; + } + if (!gdGetWord(&im->transparent, in)) { + goto fail2; + } + if (im->transparent == 257) { + im->transparent = (-1); + } + for (i=0; (ired[i], in)) { + goto fail2; + } + if (!gdGetByte(&im->green[i], in)) { + goto fail2; + } + if (!gdGetByte(&im->blue[i], in)) { + goto fail2; + } + } + for (y=0; (ypixels[x][y] = ch; + } + } + return im; +fail2: + gdImageDestroy(im); +fail1: + return 0; +} + +void gdImageGd(gdImagePtr im, FILE *out) +{ + int x, y; + int i; + int trans; + gdPutWord(im->sx, out); + gdPutWord(im->sy, out); + putc((unsigned char)im->colorsTotal, out); + trans = im->transparent; + if (trans == (-1)) { + trans = 257; + } + gdPutWord(trans, out); + for (i=0; (ired[i], out); + putc((unsigned char)im->green[i], out); + putc((unsigned char)im->blue[i], out); + } + for (y=0; (y < im->sy); y++) { + for (x=0; (x < im->sx); x++) { + putc((unsigned char)im->pixels[x][y], out); + } + } +} + +gdImagePtr +gdImageCreateFromXbm(FILE *fd) +{ + gdImagePtr im; + int bit; + int w, h; + int bytes; + int ch; + int i, x, y; + char *sp; + char s[161]; + if (!fgets(s, 160, fd)) { + return 0; + } + sp = &s[0]; + /* Skip #define */ + sp = strchr(sp, ' '); + if (!sp) { + return 0; + } + /* Skip width label */ + sp++; + sp = strchr(sp, ' '); + if (!sp) { + return 0; + } + /* Get width */ + w = atoi(sp + 1); + if (!w) { + return 0; + } + if (!fgets(s, 160, fd)) { + return 0; + } + sp = s; + /* Skip #define */ + sp = strchr(sp, ' '); + if (!sp) { + return 0; + } + /* Skip height label */ + sp++; + sp = strchr(sp, ' '); + if (!sp) { + return 0; + } + /* Get height */ + h = atoi(sp + 1); + if (!h) { + return 0; + } + /* Skip declaration line */ + if (!fgets(s, 160, fd)) { + return 0; + } + bytes = (w * h / 8) + 1; + im = gdImageCreate(w, h); + gdImageColorAllocate(im, 255, 255, 255); + gdImageColorAllocate(im, 0, 0, 0); + x = 0; + y = 0; + for (i=0; (i < bytes); i++) { + char h[3]; + int b; + /* Skip spaces, commas, CRs, 0x */ + while(1) { + ch = getc(fd); + if (ch == EOF) { + goto fail; + } + if (ch == 'x') { + break; + } + } + /* Get hex value */ + ch = getc(fd); + if (ch == EOF) { + goto fail; + } + h[0] = ch; + ch = getc(fd); + if (ch == EOF) { + goto fail; + } + h[1] = ch; + h[2] = '\0'; + sscanf(h, "%x", &b); + for (bit = 1; (bit <= 128); (bit = bit << 1)) { + gdImageSetPixel(im, x++, y, (b & bit) ? 1 : 0); + if (x == im->sx) { + x = 0; + y++; + if (y == im->sy) { + return im; + } + /* Fix 8/8/95 */ + break; + } + } + } + /* Shouldn't happen */ + fprintf(stderr, "Error: bug in gdImageCreateFromXbm!\n"); + return 0; +fail: + gdImageDestroy(im); + return 0; +} + +void gdImagePolygon(gdImagePtr im, gdPointPtr p, int n, int c) +{ + int i; + int lx, ly; + if (!n) { + return; + } + lx = p->x; + ly = p->y; + gdImageLine(im, lx, ly, p[n-1].x, p[n-1].y, c); + for (i=1; (i < n); i++) { + p++; + gdImageLine(im, lx, ly, p->x, p->y, c); + lx = p->x; + ly = p->y; + } +} + +int gdCompareInt(const void *a, const void *b); + +void gdImageFilledPolygon(gdImagePtr im, gdPointPtr p, int n, int c) +{ + int i; + int y; + int y1, y2; + int ints; + if (!n) { + return; + } + if (!im->polyAllocated) { + im->polyInts = (int *) malloc(sizeof(int) * n); + im->polyAllocated = n; + } + if (im->polyAllocated < n) { + while (im->polyAllocated < n) { + im->polyAllocated *= 2; + } + im->polyInts = (int *) realloc(im->polyInts, + sizeof(int) * im->polyAllocated); + } + y1 = p[0].y; + y2 = p[0].y; + for (i=1; (i < n); i++) { + if (p[i].y < y1) { + y1 = p[i].y; + } + if (p[i].y > y2) { + y2 = p[i].y; + } + } + /* Fix in 1.3: count a vertex only once */ + for (y=y1; (y < y2); y++) { + int interLast = 0; + int dirLast = 0; + int interFirst = 1; + ints = 0; + for (i=0; (i <= n); i++) { + int x1, x2; + int y1, y2; + int dir; + int ind1, ind2; + int lastInd1 = 0; + if ((i == n) || (!i)) { + ind1 = n-1; + ind2 = 0; + } else { + ind1 = i-1; + ind2 = i; + } + y1 = p[ind1].y; + y2 = p[ind2].y; + if (y1 < y2) { + y1 = p[ind1].y; + y2 = p[ind2].y; + x1 = p[ind1].x; + x2 = p[ind2].x; + dir = -1; + } else if (y1 > y2) { + y2 = p[ind1].y; + y1 = p[ind2].y; + x2 = p[ind1].x; + x1 = p[ind2].x; + dir = 1; + } else { + /* Horizontal; just draw it */ + gdImageLine(im, + p[ind1].x, y1, + p[ind2].x, y1, + c); + continue; + } + if ((y >= y1) && (y <= y2)) { + int inter = + 1.0 * (y-y1) * (x2-x1) / (y2-y1) + x1; + /* Only count intersections once + except at maxima and minima. Also, + if two consecutive intersections are + endpoints of the same horizontal line + that is not at a maxima or minima, + discard the leftmost of the two. */ + if (!interFirst) { + if ((p[ind1].y == p[lastInd1].y) && + (p[ind1].x != p[lastInd1].x)) { + if (dir == dirLast) { + if (inter > interLast) { + /* Replace the old one */ + im->polyInts[ints] = inter; + } else { + /* Discard this one */ + } + continue; + } + } + if (inter == interLast) { + if (dir == dirLast) { + continue; + } + } + } + if (i > 0) { + im->polyInts[ints++] = inter; + } + lastInd1 = i; + dirLast = dir; + interLast = inter; + interFirst = 0; + } + } + qsort(im->polyInts, ints, sizeof(int), gdCompareInt); + /* Bug fix js 5.99 */ + /* replaced i+=2 with ++i to avoid holes in fills */ + for (i=0; (i < (ints-1)); ++i) { + gdImageLine(im, im->polyInts[i], y, + im->polyInts[i+1], y, c); +#ifdef DEBUG + if (y == 564 || y == 565){ + printf("Line: (%d,%d)->(%d,%d)\n", im->polyInts[i], y, + im->polyInts[i+1], y); + } +#endif + } + } +} + + +int gdCompareInt(const void *a, const void *b) +{ + return (*(const int *)a) - (*(const int *)b); +} + +void gdImageSetStyle(gdImagePtr im, int *style, int noOfPixels) +{ + if (im->style) { + free(im->style); + } + im->style = (int *) + malloc(sizeof(int) * noOfPixels); + memcpy(im->style, style, sizeof(int) * noOfPixels); + im->styleLength = noOfPixels; + im->stylePos = 0; +} + +void gdImageSetBrush(gdImagePtr im, gdImagePtr brush) +{ + int i; + im->brush = brush; + for (i=0; (i < gdImageColorsTotal(brush)); i++) { + int index; + index = gdImageColorExact(im, + gdImageRed(brush, i), + gdImageGreen(brush, i), + gdImageBlue(brush, i)); + if (index == (-1)) { + index = gdImageColorAllocate(im, + gdImageRed(brush, i), + gdImageGreen(brush, i), + gdImageBlue(brush, i)); + if (index == (-1)) { + index = gdImageColorClosest(im, + gdImageRed(brush, i), + gdImageGreen(brush, i), + gdImageBlue(brush, i)); + } + } + im->brushColorMap[i] = index; + } +} + +void gdImageSetTile(gdImagePtr im, gdImagePtr tile) +{ + int i; + im->tile = tile; + for (i=0; (i < gdImageColorsTotal(tile)); i++) { + int index; + index = gdImageColorExact(im, + gdImageRed(tile, i), + gdImageGreen(tile, i), + gdImageBlue(tile, i)); + if (index == (-1)) { + index = gdImageColorAllocate(im, + gdImageRed(tile, i), + gdImageGreen(tile, i), + gdImageBlue(tile, i)); + if (index == (-1)) { + index = gdImageColorClosest(im, + gdImageRed(tile, i), + gdImageGreen(tile, i), + gdImageBlue(tile, i)); + } + } + im->tileColorMap[i] = index; + } +} + +void gdImageInterlace(gdImagePtr im, int interlaceArg) +{ + im->interlace = interlaceArg; +} + Index: xgks-2.6.1/src/lib/c/gif.c =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 +++ xgks-2.6.1/src/lib/c/gif.c 2010-07-14 03:41:25.000000000 +0100 @@ -0,0 +1,1472 @@ +/* +* +* This software was developed by the Thermal Modeling and Analysis +* Project(TMAP) of the National Oceanographic and Atmospheric +* Administration's (NOAA) Pacific Marine Environmental Lab(PMEL), +* hereafter referred to as NOAA/PMEL/TMAP. +* +* Access and use of this software shall impose the following +* obligations and understandings on the user. The user is granted the +* right, without any fee or cost, to use, copy, modify, alter, enhance +* and distribute this software, and any derivative works thereof, and +* its supporting documentation for any purpose whatsoever, provided +* that this entire notice appears in all copies of the software, +* derivative works and supporting documentation. Further, the user +* agrees to credit NOAA/PMEL/TMAP in any publications that result from +* the use of this software or in any product that includes this +* software. The names TMAP, NOAA and/or PMEL, however, may not be used +* in any advertising or publicity to endorse or promote any products +* or commercial entity unless specific written permission is obtained +* from NOAA/PMEL/TMAP. The user also understands that NOAA/PMEL/TMAP +* is not obligated to provide the user with any support, consulting, +* training or assistance of any kind with regard to the use, operation +* and performance of this software nor to provide the user with any +* updates, revisions, new versions or "bug fixes". +* +* THIS SOFTWARE IS PROVIDED BY NOAA/PMEL/TMAP "AS IS" AND ANY EXPRESS +* OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +* ARE DISCLAIMED. IN NO EVENT SHALL NOAA/PMEL/TMAP BE LIABLE FOR ANY SPECIAL, +* INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER +* RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF +* CONTRACT, NEGLIGENCE OR OTHER TORTUOUS ACTION, ARISING OUT OF OR IN +* CONNECTION WITH THE ACCESS, USE OR PERFORMANCE OF THIS SOFTWARE. +* +*/ + + + +/* + * GIF driver for XGKS metafiles + * Created by Joe Sirott, Pacific Marine Environmental Lab + * $Id: gif.c,v 1.12 2008/11/24 18:39:44 ansley Exp $ + * + * *js* 8.97 umalloc(0) returns 0 on DEC alpha; eliminated assert(meta->style) in + * set_lineStyle to avoid this problem, since length can be 0 + * *js* 8.97 added clipping + * *js* 6.99 If resize is called with primitives, primitives are discarded + * (previously, error message was issued, and no resize occurred). + */ + +/* + * Copyright IBM Corporation 1989 + * + * All Rights Reserved + * + * Permission to use, copy, modify, and distribute this software and its + * documentation for any purpose and without fee is hereby granted, + * provided that the above copyright notice appear in all copies and that + * both that copyright notice and this permission notice appear in + * supporting documentation, and that the name of IBM not be + * used in advertising or publicity pertaining to distribution of the + * software without specific, written prior permission. + * + * IBM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING + * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL + * IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR + * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, + * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, + * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS + * SOFTWARE. + * + * + * University of Illinois at Urbana-Champaign + * Department of Computer Science + * 1304 W. Springfield Ave. + * Urbana, IL 61801 + * + * (C) Copyright 1987, 1988 by The University of Illinois Board of Trustees. + * All rights reserved. + * + * Tool: X 11 Graphical Kernel System + * Author: Gregory Scott Rogers + * Author: Sung Hsien Ching Kelvin + * Author: Yu Pan + */ + +/*LINTLIBRARY*/ +#ifdef __CYGWIN__ +#include +#endif +#include +#include +#include /* for time(), localtime(), and strftime() */ +#include /* for uid_t */ +#include /* for uname() */ +#include /* for getlogin() */ +#include +#include +#include +#include +#include +#include "udposix.h" +#include "gks_implem.h" +#include "cgm/cgm.h" /* for public, API details */ +#include "cgm/cgm_implem.h" /* for implementation details */ +#include "gif/gif.h" +#include "gif/gd.h" +#include "gif/gdadds.h" + + +#ifndef lint + static char afsid[] = "$__Header$"; + static char rcsid[] = "$Id: gif.c,v 1.12 2008/11/24 18:39:44 ansley Exp $"; +#endif + +static const int DefaultSize = 600; + +/* Line styles */ +static const int MaxLineStyleLength = 64; +static char *LineStyles[5] = { + "", + "", + "--- ", + "------ ", + "------ --- " +}; + +/* Error messages are switched on and off through the environment */ +/* variable XGKS_LOG anded with the enum MsgLog */ + +typedef enum MsgLog { + INFO = 1, + WARN = 2, + ERR = 4 +} MsgLog; + +static int LogFlag = ERR; + +static void initLogFlag() +{ + char *cp = getenv("XGKS_LOG"); + if (cp){ + LogFlag = atoi(cp); + } +} + +static void msgInfo(char *format, ...) +{ + if (LogFlag & INFO){ + va_list ap; + va_start(ap, format); + /* print out name of function causing error */ + fprintf(stderr, "XGKS(GIF): Info: "); + /* print out remainder of message */ + vfprintf(stderr, format, ap); + va_end(ap); + } +} + +static void msgWarn(char *format, ...) +{ + if (LogFlag & WARN){ + va_list ap; + va_start(ap, format); + /* print out name of function causing error */ + fprintf(stderr, "XGKS(GIF): Warning: "); + /* print out remainder of message */ + vfprintf(stderr, format, ap); + va_end(ap); + } +} + +static void msgErr(char *format, ...) +{ + if (LogFlag & ERR){ + va_list ap; + va_start(ap, format); + /* print out name of function causing error */ + fprintf(stderr, "XGKS(GIF): Error: "); + /* print out remainder of message */ + vfprintf(stderr, format, ap); + va_end(ap); + } +} + +/* GIF info */ + +typedef struct _GIFcolor { + float r,g,b; + int index; +} GIFcolor; + +typedef struct _GIFMetaFile { + gdImagePtr image; /* GIF stuff */ + int sx, sy; /* Image size */ + int numcolors; /* Maximum number of colors */ + GIFcolor *colors; /* XGKS->GIF index table */ + int lineIndex; /* Current line color index */ + int lineWidth; /* Current line width */ + int fillIndex; /* Current fill color index */ + int styleIndex; /* Current line style index */ + int *style; /* Pointer to style array */ + int fillStyleIndex; /* Current fill style index */ + int resize; /* False => can't be resized */ + WS_STATE_PTR ws; /* Workstation pointer */ +} GIFmetafile; + +/* Hacks to keep track of which GIFMetafile to use without */ +/* changing GKS data structures. Oh, for a nice Java hashtable here... */ +typedef struct Dict { + mf_cgmo *key; + GIFmetafile *value; +} Dict; + +static struct { + int count; + Dict dict[MAX_ACTIVE_WS]; +} GIFtable; + +static void add_meta(mf_cgmo *key, GIFmetafile *value) +{ + Dict *mfp = &GIFtable.dict[GIFtable.count++]; + assert(GIFtable.count < MAX_ACTIVE_WS); + mfp->key = key; + mfp->value = value; +} + +static int allocate_color(GIFmetafile *meta, int idx, + float r, float g, float b){ + GIFcolor *color = 0; + int index; + int ir = r * 255, ig = g * 255, ib = b * 255; + + assert(idx < meta->numcolors); + + color = &meta->colors[idx]; + if (color->index != -1) + gdImageColorDeallocate(meta->image, color->index); + color->index = + gdImageColorAllocate(meta->image, ir, ig, ib); + color->r = r; color->g = g; color->b = b; + +/* test transparency...*/ +/* + if (color->index == 22) + gdImageColorTransparent (meta->image, color->index); */ + + return color->index; +} + +static void init_colors(GIFmetafile *meta, int size) +{ + int i; + meta->numcolors = size; + for (i=0; i < size; ++i){ + meta->colors[i].index = -1; + } +} + +static GIFmetafile *init_meta(mf_cgmo *cgmo, int sx, int sy) +{ + GIFmetafile *newmeta = (GIFmetafile *)umalloc(sizeof(GIFmetafile)); + assert(newmeta); + + newmeta->image = gdImageCreate(sx, sy); + newmeta->sx = sx; newmeta->sy = sy; + newmeta->colors = + (GIFcolor *)umalloc(sizeof(GIFcolor) * cgmo->ws->colorCount); + newmeta->lineIndex = 1; + newmeta->lineWidth = 1; + newmeta->fillIndex = 1; + newmeta->styleIndex = 1; + newmeta->fillStyleIndex = 1; + newmeta->style = 0; + newmeta->resize = 1; /* OK to resize */ + newmeta->ws = cgmo->ws; + init_colors(newmeta, cgmo->ws->colorCount); + + /* Allocate colors -- background white, foreground black */ + allocate_color(newmeta, 0, 1, 1, 1); + allocate_color(newmeta, 1, 0, 0, 0); + + return newmeta; +} + +static GIFmetafile *create_meta(mf_cgmo *cgmo, int sx, int sy) +{ + GIFmetafile *newmeta = init_meta(cgmo, sx, sy); + + assert(newmeta->image); + add_meta(cgmo, newmeta); + return newmeta; +} + + +static void remove_meta(mf_cgmo *key) +{ + int i,j; + for(i=0; i < GIFtable.count; ++i){ + if (key == GIFtable.dict[i].key) + break; + } + assert(i < GIFtable.count); + for(j=i+1; j < GIFtable.count; ++j){ + Dict *p = &GIFtable.dict[j], *q = p-1; + q->key = p->key; + q->value = p->value; + } + --GIFtable.count; +} + +static GIFmetafile *find_meta(mf_cgmo *key) +{ + int i; + for(i=0; i < GIFtable.count; ++i){ + if (key == GIFtable.dict[i].key) + break; + } + if (i < GIFtable.count){ + return GIFtable.dict[i].value; + } else + return 0; +} + +static void destroy_meta(mf_cgmo *cgmo, GIFmetafile *meta) +{ + remove_meta(cgmo); + if (meta->image) + gdImageDestroy(meta->image); + free(meta->colors); + free(meta->style); + free(meta); +} + +/* Copy the attributes of a GIF metafile to a newly created metafile */ +/* Used for resizing */ + +static GIFmetafile *copy_meta(mf_cgmo *cgmo, GIFmetafile *old, + int sx, int sy) +{ + GIFmetafile *newmeta = init_meta(cgmo, sx, sy); + int i; + + /* Copy various stuff -- don't copy resize! */ + newmeta->lineIndex = old->lineIndex; + newmeta->lineWidth = old->lineWidth; + newmeta->fillIndex = old->fillIndex; + newmeta->styleIndex = old->styleIndex; + newmeta->fillStyleIndex = old->fillStyleIndex; + newmeta->style = (int *)umalloc(sizeof(int) * MaxLineStyleLength); + memcpy(newmeta->style, old->style, sizeof(int)*MaxLineStyleLength); + newmeta->ws = old->ws; + + /* Copy the color info */ + for (i=0; i < old->numcolors; ++i){ + GIFcolor *color = &old->colors[i]; + if (old->colors[i].index == -1) + break; + allocate_color(newmeta, i, color->r, color->g, color->b); + } + /* Destroy the old metafile */ + destroy_meta(cgmo, old); + /* Add this one */ + add_meta(cgmo, newmeta); + return newmeta; +} +/* Coordinate transformation from NDC->device */ + +static void xform(GIFmetafile *meta, float x, float y, int *xp, int *yp) +{ + static int margin = 0; + int maxdim = meta->sx > meta->sy ? meta->sx : meta->sy; + maxdim -= 2 * margin; + *xp = x * maxdim + margin; + *yp = meta->sy - y * maxdim - margin; +} + + + +/* Set up line styles. GIF metafiles at the moment */ +/* only support the required GKS types of dashed(2), dotted(3) */ +/* and dash/dot (4). All others default to solid */ + +static void set_lineStyle(GIFmetafile *meta, Gint attr, Gasf type) +{ + if (type != xgks_state.gks_lnattr.type) + return; + if (type == GBUNDLED){ + attr = meta->ws->lnbundl_table[attr].type; + } + msgInfo("set_lineStyle: setting style to %d\n", attr); + if (attr <= 0 || attr > 4) + attr = 1; + meta->styleIndex = attr; + { + int currColor = meta->lineIndex; + int i, length; + char *cp = LineStyles[attr]; + length = strlen(cp); + assert(currColor != -1); + if (meta->style) + free(meta->style); + meta->style = (int *)umalloc(sizeof(int) * MaxLineStyleLength); + length = strlen(LineStyles[attr]); + for (i=0; i < length; ++i){ + if (cp[i] == '-'){ + meta->style[i] = currColor; + } else { + meta->style[i] = gdTransparent; + } + } + gdImageSetStyle(meta->image, meta->style, length); + } +} + +static void +set_lineWidth(GIFmetafile *meta, double size, Gint attr, Gasf type) +{ + if (type != xgks_state.gks_lnattr.width) + return; + if (type == GBUNDLED){ + int index = attr; + size = meta->ws->lnbundl_table[index].width; + } + msgInfo("set_lineWidth: setting width to %lf\n", size); + if (size < 1.0) + size = 1.0; + meta->lineWidth = size +.5; +} + +static void set_fillColor(GIFmetafile *meta, Gint attr) +{ + GIFcolor *color = &meta->colors[attr]; + meta->fillIndex = color->index; + msgInfo("set_fillColor: setting color to (%f,%f,%f)\n", + color->r, color->g, color->b); +} + +static void set_fillStyle(GIFmetafile *meta, Gint attr) +{ + if (attr < 0 || attr > 1){ + msgWarn("set_fillStyle: Unsupported fill type %d\n", attr); + attr = 1; + } + meta->fillStyleIndex = attr; +} + +static void set_lineColor(GIFmetafile *meta, Gint attr, Gasf type) +{ + if (type != xgks_state.gks_lnattr.colour) + return; + if (type == GBUNDLED){ + attr = meta->ws->lnbundl_table[attr].colour; + } + { + GIFcolor *color = &meta->colors[attr]; + msgInfo("set_lineColor: setting color to (%f,%f,%f)\n", + color->r, color->g, color->b); + meta->lineIndex = color->index; + set_lineStyle(meta, meta->styleIndex, type); + } +} + +static void unsupported(char *message, int attr) +{ + msgWarn("%s: Unsupported call -- argument %d\n", message, attr); +} + +/* + * Return a string identifying the user and installation. + */ + static Gchar* +XgksMAuthor(void) +{ + char *username = getlogin(); + struct utsname name; + static Gchar buffer[41]; + + buffer[0] = 0; + + if (username != NULL) + (void) strncat(buffer, username, sizeof(buffer) - 1); + + if (uname(&name) != -1) { + int nchr = strlen(buffer); + + if (nchr < sizeof(buffer) - 1) { + buffer[nchr++] = '@'; + (void) strncpy(buffer + nchr, name.nodename, + sizeof(buffer) - nchr - 1); + } + } + + return buffer; +} + + +/* + * Return a date-string. + */ + static Gchar* +XgksMDate(void) +{ + time_t clock = time((time_t *) NULL); + static Gchar date[9]; + + (void) strftime(date, (size_t)sizeof(date), "%y/%m/%d", + localtime(&clock)); + + return date; +} + + +/* + * Open an output GIF file. + */ + int +GIFmoOpen(WS_STATE_PTR ws) +{ + /* Output file not opened or written to until flushed */ + + Gint status = 1; + initLogFlag(); + assert(ws != NULL); + assert(ws->colorCount <= gdMaxColors); + if ((ws->mf.cgmo = (mf_cgmo*)umalloc(sizeof(mf_cgmo))) != NULL) { + mf_cgmo *cgmo = ws->mf.cgmo; + cgmo->ws = ws; + + if (find_meta(cgmo) != 0){ + msgWarn("GIFmoOpen:metafile already open\n"); + } else { + create_meta(cgmo, DefaultSize, DefaultSize); + + cgmo->ws = ws; + cgmo->type = MF_GIF; + unlink(ws->conn); + status = OK; + } + } + return status; +} + + +/* + * Close an output GIF file. + */ + int +GIFmoClose(Metafile *mf) +{ + int status = 1; /* return status error */ + if (mf != NULL && mf->cgmo != NULL) { + mf_cgmo *cgmo = mf->cgmo; + GIFmetafile *meta = find_meta(cgmo); +// status = GIFFlush(mf, meta->ws->conn); + status = GIFFlush(mf, meta->ws->conn); + + if (meta != 0){ + destroy_meta(cgmo, meta); + } + + ufree((voidp)mf->cgmo); + mf->cgmo = NULL; + } + + return status; +} + +/* +/*int GIFFlush(Metafile *mf, char *filename) */ +/*{ */ +/* mf_cgmo *cgmo = mf->cgmo; */ +/* GIFmetafile *meta = find_meta(cgmo); */ +/* int status = 1; */ +/* */ +/* /* File w/ ".gif" only are not created (Ferret hack) */ +/* if (strcasecmp(filename, ".gif") != 0){ */ +/* FILE *fp = fopen(filename, "w"); */ +/* if (fp != NULL && meta != 0){ */ +/* status = OK; */ +/* gdImageGif(meta->image, fp); */ +/* fclose(fp); */ +/* } */ +/* } else { */ +/* status = OK; */ +/* } */ +/* return status; */ +/*} */ + +/* TEST GIFFlush for transparency */ + + +int GIFFlush(Metafile *mf, char *filename) +{ + mf_cgmo *cgmo = mf->cgmo; + GIFmetafile *meta = find_meta(cgmo); + int status = 1; + + /* File w/ ".gif" only are not created (Ferret hack) */ + if (strcasecmp(filename, ".gif") != 0){ + FILE *fp = fopen(filename, "w"); + if (fp != NULL && meta != 0){ + status = OK; + gdImageGif(meta->image, fp); + fclose(fp); + } + } else { + status = OK; + } + return status; +} + +/* +int GIFFlusht0(Metafile *mf, char *filename) +transparent, color 0 +*/ +int GIFFlusht0(Metafile *mf, char *filename) +{ + mf_cgmo *cgmo = mf->cgmo; + GIFmetafile *meta = find_meta(cgmo); + int status = 1; + int tcolor; + int i; + + /* File w/ ".gif" only are not created (Ferret hack) */ + if (strcasecmp(filename, ".gif") != 0){ + FILE *fp = fopen(filename, "w"); + if (fp != NULL && meta != 0){ + status = OK; + + gdImageGif(meta->image, fp);/*save the image as gif */ + fclose(fp); + + /* open the gif, change transparency and then save */ + + FILE *inGif; + FILE *ouGif; + gdImagePtr gifImg; + + inGif = fopen(filename,"rb"); + /*ouLog = fopen("/home/porter/jing/trans/FERRET/fer/tst4.gif","w");*/ + gifImg = gdImageCreateFromGif(inGif); + fclose(inGif); + + /*ouGif = fopen("/home/porter/jing/trans/FERRET/fer/tst4.gif","w");*/ + ouGif = fopen(filename,"w"); + + //(0,0,0) is for white background + tcolor = gdImageColorClosest(gifImg, 255, 255, 255); + + for (i=0; i < 256; i+=1) { + + tcolor = gdImageColorClosest(gifImg, i, i, i); + } + + gdImageColorTransparent(gifImg, tcolor); + + gdImageGif(gifImg, ouGif); + + fclose(ouGif); + gdImageDestroy(gifImg); + } + } else { + status = OK; + } + return status; +} + +/* +int GIFFlusht1(Metafile *mf, char *filename) +transparent, color 1 +*/ +int GIFFlusht1(Metafile *mf, char *filename) +{ + mf_cgmo *cgmo = mf->cgmo; + GIFmetafile *meta = find_meta(cgmo); + int status = 1; + int tcolor; + int white; + + /* File w/ ".gif" only are not created (Ferret hack) */ + if (strcasecmp(filename, ".gif") != 0){ + FILE *fp = fopen(filename, "w"); + if (fp != NULL && meta != 0){ + status = OK; + + gdImageGif(meta->image, fp);/*save the image as gif */ + fclose(fp); + + /* open the gif, change transparency and then save */ + FILE *inGif; + FILE *ouGif; + gdImagePtr gifImg; + + inGif = fopen(filename,"rb"); + /*ouLog = fopen("/home/porter/jing/trans/FERRET/fer/tst4.gif","w");*/ + gifImg = gdImageCreateFromGif(inGif); + fclose(inGif); + + /*ouGif = fopen("/home/porter/jing/trans/FERRET/fer/tst4.gif","w");*/ + ouGif = fopen(filename,"w"); + + //(1,1,1) is for black background + tcolor = gdImageColorClosest(gifImg, 0, 0, 0);; + gdImageColorTransparent(gifImg, tcolor); + + gdImageGif(gifImg, ouGif); + + fclose(ouGif); + gdImageDestroy(gifImg); + + } + } else { + status = OK; + } + return status; +} + +void GIFresize(WS_STATE_PTR ws, Gpoint size) +{ + mf_cgmo *cgmo = ws->mf.cgmo; + GIFmetafile *meta = find_meta(cgmo); + assert(meta); +#if 0 + if (meta->resize == 0){ + msgErr("GIFresize: metafile contains primitives -- can't resize\n"); + } else { + copy_meta(cgmo, find_meta(cgmo), size.x, size.y); + msgInfo("GIFresize: Resizing to (%f,%f)\n", size.x, size.y); + } +#endif + if (meta->resize == 0){ + msgWarn("GIFresize: metafile contains primitives that will be lost when resizing\n"); + } + copy_meta(cgmo, find_meta(cgmo), size.x, size.y); + msgInfo("GIFresize: Resizing to (%f,%f)\n", size.x, size.y); +} + +/* + * Set the clear flag in an output GIF file. + */ + int +GIFclear(Metafile *mf, int num, Gclrflag flag) +{ + int imf; + mf_cgmo **cgmo = &mf->cgmo; + for (imf = 0; imf < num; ++imf) { + Gint i; + GIFmetafile *meta = find_meta(cgmo[imf]); + GIFcolor *color; + assert(meta); + meta->resize = 1; /* OK to resize */ + color = &meta->colors[0]; + gdImageBlockFill(meta->image, color->index); + } + return OK; +} + + +/* + * Redraw all segments in an output GIF file. + */ + int +GIFredrawAllSeg(Metafile **mf, int num) +{ + /* Noop */ + msgWarn("GIFredrawAllSeg: Don't support this feature\n"); + return OK; +} + + +/* + * Set the update flag in an output GIF file. + */ + int +GIFupdate(Metafile **mf, int num, Gregen regenflag) +{ + /* Noop */ + msgWarn("GIFupdate: Don't support this feature\n"); + return OK; +} + + +/* + * Set the deferal state in an output GIF file. + */ + int +GIFdefer(Metafile **mf, int num, Gdefmode defer_mode, Girgmode regen_mode) +{ + /* Noop */ + msgWarn("GIFdefer: Don't support this feature\n"); + return OK; +} + + +/* + * Write a message to an output GIF file. + */ + int +GIFmessage(Metafile **mf, int num, Gchar *string) +{ + /* Noop */ + msgWarn("GIFmessage: Don't support this feature\n"); + return OK; +} + +/* + * Write a graphic to output GIF files. + * + * This routine is suitable for + * + * POLYLINE -- code == 11 + * POLYMARKER -- code == 12 + * FILLAREA -- code == 14 + */ +/* RETURN HERE ****************/ + +static int isColinear(gdPointPtr first, gdPointPtr second, gdPointPtr third){ + int dx1 = second->x - first->x; + int dx2 = third->x - second->x; + int dy1 = second->y - first->y; + int dy2 = third->y - second->y; + return (dy2*dx1 - dx2*dy1) == 0; +} + +static void stripColinear(gdPointPtr tpts, int *num_pts){ + int total = 0; + int i; + gdPointPtr npts, first, second; + if (*num_pts <= 2){ + return; + } + npts = (gdPointPtr)umalloc(sizeof(gdPoint) * *num_pts); + assert(npts); + first = tpts; + second = tpts+1; + for (i=2; i < *num_pts; ++i){ + gdPointPtr third = &tpts[i]; + if (isColinear(first, second, third)){ + second = third; + } else { + npts[total].x = first->x; + npts[total].y = first->y; + ++total; + first = second; + second = third; + } + } + npts[total].x = first->x; + npts[total].y = first->y; + ++total; + npts[total].x = second->x; + npts[total].y = second->y; + ++total; + + memcpy(tpts, npts, sizeof(gdPoint)*total); + + free(npts); + *num_pts = total; + +#ifdef DEBUG + printf("--------------------------------------\n"); + for (i=0; i < total; ++i){ + printf("strip: (%d, %d)\n", tpts[i].x, tpts[i].y); + } +#endif + +} + + int +GIFoutputGraphic(Metafile *mf, int num, Gint code, Gint num_pt, Gpoint *pos) +{ + int imf; + mf_cgmo **cgmo = &mf->cgmo; + for (imf = 0; imf < num; ++imf) { + Gint i; + GIFmetafile *meta = find_meta(cgmo[imf]); + assert(meta); + assert(num_pt > 0); + meta->resize = 0; /* Not OK to resize */ + + + /* + Trivial accept and reject clipping of points. + */ + { + int xlo = 1, xhi = 1, yhi = 1, ylo = 1; + Gfloat lolimit = -1, hilimit = 2; + int i; + for (i=1; i < num_pt; ++i){ + float x = pos[i].x; + float y = pos[i].y; + xlo &= (x < lolimit); + xhi &= (x > hilimit); + ylo &= (y < lolimit); + yhi &= (y > hilimit); + } + if (xlo || xhi || ylo || yhi) + return OK; + + /* If any points are extreme, toss the polygon. Someday, + there will be a real clipping algorithm */ + for (i=1; i < num_pt; ++i){ + float x = pos[i].x; + float y = pos[i].y; + if (x < -10. || x > 10. || y < -10 || y > 10){ + msgWarn("GIFoutputGraphic: Bad NDC point %f %f\n", + x, y); + return OK; + } + } + } + + + switch(code){ + case GKSM_FILL_AREA: + { + gdPointPtr tpts = (gdPointPtr)umalloc(sizeof(gdPoint) * num_pt); + assert(tpts); + xform(meta, pos->x, pos->y, &tpts[0].x, &tpts[0].y); +#ifdef DEBUG + printf("--------------------------------------\n"); + printf("Transform: (%f, %f) -> (%d,%d)\n", + pos->x, pos->y, tpts[0].x, tpts[0].y); +#endif + ++pos; + for (i=1; i < num_pt; ++i, ++pos){ + xform(meta, pos->x, pos->y, &tpts[i].x, &tpts[i].y); +#ifdef DEBUG + printf("Transform: (%f, %f) -> (%d,%d)\n", + pos->x, pos->y, tpts[i].x, tpts[i].y); +#endif + } + if (meta->fillStyleIndex == 0){ + gdImagePolygon(meta->image, tpts, num_pt, meta->fillIndex); + } else { + /* Eliminate colinear points (bug in gd.c) */ + stripColinear(tpts, &num_pt); + gdImageFilledPolygon(meta->image, tpts, num_pt, + meta->fillIndex); + } + free(tpts); + } + break; + case GKSM_POLYLINE: + { + int lineIndex = meta->styleIndex == 1 ? meta->lineIndex + : gdStyled; + gdPointPtr tpts = (gdPointPtr)umalloc(sizeof(gdPoint) * num_pt); + assert(tpts); + for (i=0; i < num_pt; ++i, ++pos){ + xform(meta, pos->x, pos->y, &tpts[i].x, &tpts[i].y); + } + gdImageWideLines(meta->image, tpts, num_pt, + lineIndex, meta->lineWidth); + + free(tpts); + } + break; + case GKSM_POLYMARKER: + msgWarn("GIFoutputGraphics: polymarker unsupported\n"); + break; + default: + msgWarn("GIFoutputGraphics: Unknown code %d\n", code); + } + } + return OK; +} + + +/* + * Write text to an output GIF file. Unsupported + */ + int +GIFtext(Metafile *mf, int num, Gpoint *at, Gchar *string) +{ + msgWarn("GIFtext: Don't support this feature\n"); + return OK; +} + +/* + * Write a cell array to an output GIF file. + * Unsupported + */ + + int +GIFcellArray(Metafile *mf, int num, Gpoint *ll, Gpoint *ur, Gpoint *lr, Gint row, Gint *colour, Gipoint *dim) +{ + int dstX, dstY, sumX, sumY, xx2, yy2, c; + int lx, ly, index, imf, srcW, srcH, dstW, dstH, npts; + int x, y; + /* Stretch vectors; code from gdImageCopyResized */ + int *stx; + int *sty; + double accum; + int tox, toy; + int i, j, p; + int num_pt; + + mf_cgmo **cgmo = &mf->cgmo; + for (imf = 0; imf < num; ++imf) { + Gint i; + GIFmetafile *meta = find_meta(cgmo[imf]); + assert(meta); + assert(num_pt > 0); + meta->resize = 0; /* Not OK to resize */ + + + xform(meta, ll->x, ll->y, &dstX, &yy2); + xform(meta, ur->x, ur->y, &xx2, &dstY); + + dstW = xx2 - dstX; + dstH = yy2 - dstY; + srcW = dim->x; + srcH = dim->y; + npts = srcW * srcH; + + + /* More code from gdImageCopyResized. + We only need to use floating point to determine the correct + stretch vector for one line's worth. */ + stx = (int *) malloc(sizeof(int) * srcW); + sty = (int *) malloc(sizeof(int) * srcH); + accum = 0; + for (i=0; (i < srcW); i++) + { + int got; + accum += (double)dstW/(double)srcW; + got = floor(accum); + stx[i] = got; + accum -= got; + } + accum = 0; + for (i=0; (i < srcH); i++) + { + int got; + accum += (double)dstH/(double)srcH; + got = floor(accum); + sty[i] = got; + accum -= got; + } + + index = 0; + c = colour[index]; + toy = dstY; + sumY = dstY; + + for (y=0; (y < srcH); y++) /* cells in y */ + { + tox = dstX; + sumX = dstX; + for (x=0; (x < srcW); x++) /* cells in y */ + { + toy = sumY; + for (j=0; (j < sty[y]); j++) /* image pixels in y */ + { + p = j; + tox = sumX; + for (i=0; (i < stx[x]); i++) /* image pixels in x */ + { + p = i; + gdImageSetPixel(meta->image, tox, toy, c); + tox++; + } + toy++; + } + index++; + c = 1; + if (index < npts) + { + c = colour[index]; + } + sumX = sumX + stx[x]; + } + sumY = sumY + sty[y]; + } + + + free(stx); + free(sty); + } + + return OK; +} + + +/* + * Set the size of graphics in an output GIF file. + */ + int +GIFsetGraphSize(Metafile *mf, int num, Gint code, double size) +{ + int imf; + mf_cgmo **cgmo = &mf->cgmo; + + for (imf = 0; imf < num; ++imf){ + GIFmetafile *meta = find_meta(cgmo[imf]); + assert(meta); + switch(code){ + case GKSM_LINEWIDTH_SCALE_FACTOR: + set_lineWidth(meta, size, 0, GINDIVIDUAL); + break; + case GKSM_CHARACTER_EXPANSION_FACTOR: + case GKSM_MARKER_SIZE_SCALE_FACTOR: + case GKSM_CHARACTER_SPACING: + return OK; /* Ignore */ + default: + msgWarn("GIFsetGraphSize: Unknown code %d\n", code); + return OK; + } + } + return OK; +} + + +/* + * Close a segment in an output GIF file. + */ + int +GIFcloseSeg(Metafile *mf, int num) +{ + /* Noop */ + + msgWarn("GIFcloseSeg: Don't support this feature\n"); + return OK; +} + + +/* + * Set the graphic attributes in an output GIF file. + */ + +int +GIFsetGraphAttr(Metafile *mf, int num, Gint code, Gint attr) +{ + int imf; + mf_cgmo **cgmo = &mf->cgmo; + for (imf = 0; imf < num; ++imf) { + GIFmetafile *meta = find_meta(cgmo[imf]); + assert(meta); + switch(code){ + case GKSM_POLYLINE_INDEX: + set_lineColor(meta, attr, GBUNDLED); + set_lineWidth(meta, 0.0, attr, GBUNDLED); + set_lineStyle(meta, attr, GBUNDLED); + break; + case GKSM_POLYLINE_COLOUR_INDEX: + set_lineColor(meta, attr, GINDIVIDUAL); + break; + case GKSM_LINETYPE: + set_lineStyle(meta, attr, GINDIVIDUAL); + break; + case GKSM_TEXT_COLOUR_INDEX: + unsupported("GIFsetGraphAttr : GKSM_TEXT_COLOUR_INDEX", attr); + break; + case GKSM_FILL_AREA_COLOUR_INDEX: + set_fillColor(meta, attr); + break; + case GKSM_FILL_AREA_STYLE_INDEX: + set_fillStyle(meta, attr); + break; + case GKSM_POLYMARKER_COLOUR_INDEX: + unsupported("GIFsetGraphAttr : GKSM_POLYMARKER_COLOUR_INDEX", attr); + break; + case GKSM_FILL_AREA_INDEX: + unsupported("GIFsetGraphAttr : GKSM_FILL_AREA_INDEX", attr); + break; + case GKSM_MARKER_TYPE: + unsupported("GIFsetGraphAttr : GKSM_MARKER_TYPE", attr); + break; + case GKSM_POLYMARKER_INDEX: + unsupported("GIFsetGraphAttr : GKSM_POLYMARKER_INDEX", attr); + break; + case GKSM_PICK_IDENTIFIER: + unsupported("GIFsetGraphAttr : GKSM_PICK_IDENTIFIER", attr); + break; + case GKSM_TEXT_INDEX: + unsupported("GIFsetGraphAttr : GKSM_TEXT_INDEX", attr); + break; + default: + msgWarn("GIFsetGraphAttr: Unknown code %d\n", code); + } + } + return OK; +} + + +/* + * Set the font precision in an output GIF file. + * Unsupported + */ + int +GIFsetTextFP(Metafile *mf, int num, Gtxfp *txfp) +{ + msgWarn("GIFsetTextFP: Don't support this feature\n"); + return OK; +} + +#define HYPOT(x,y) sqrt((double)((x)*(x) + (y)*(y))) + + +/* + * Set the character up-vector and character height in an output GIF file. + * Unsupported. + */ + int +GIFsetCharUp(Metafile *mf, int num, Gpoint *up, Gpoint *base) +{ + msgWarn("GIFsetCharUp: Don't support this feature\n"); + return OK; +} + + +/* + * Set the text-path in an output GIF file. + * Unsupported + */ + int +GIFsetTextPath(Metafile *mf, int num, Gtxpath path) +{ + msgWarn("GIFsetTextPath: Don't support this feature\n"); + return OK; +} + + +/* + * Set the text-alignment in an output GIF file. + * Unsupported + */ + int +GIFsetTextAlign(Metafile *mf, int num, Gtxalign *align) +{ + msgWarn("GIFsetTextAlign: Don't support this feature\n"); + return OK; +} + + +/* + * Set the interior fill-style in an output GIF file. + * Unsupported + */ + int +GIFsetFillStyle(Metafile *mf, int num, Gflinter style) +{ + int imf; + mf_cgmo **cgmo = &mf->cgmo; + + for (imf = 0; imf < num; ++imf) { + GIFmetafile *meta = find_meta(cgmo[imf]); + assert(meta); + set_fillStyle(meta, style); + } + return OK; +} + + +/* + * Set the pattern size in an output GIF file. + */ + int +GIFsetPatSize(Metafile *mf, int num) +{ + msgWarn("GIFsetPatSize: Don't support this feature\n"); + return OK; +} + + +/* + * Set the pattern reference-point in an output GIF file. + */ + int +GIFsetPatRefpt(Metafile *mf, int num) +{ + msgWarn("GIFsetPatRefPt: Don't support this feature\n"); + return OK; +} + + +/* + * Set the ASF in an output GIF file. + */ + int +GIFsetAsf(Metafile *mf, int num) +{ + /* This is handled in the graphics generating code */ + return OK; +} + + +/* + * Set the line and marker representation in an output GIF file. + */ + int +GIFsetLineMarkRep(Metafile *mf, int num, Gint code, Gint idx, Gint type, double size, Gint colour) +{ + msgWarn("GIFsetLineMarkRep: Don't support this feature\n"); + return OK; +} + + +/* + * Set the text representation in an output GIF file. + */ + int +GIFsetTextRep(Metafile *mf, int num, Gint idx, Gtxbundl *rep) +{ + if (!rep) + return 1; + msgInfo("GIFsetTextRep: index %d font prec (%d %d) exp %.6f sp %.6f color %d\n", + idx, rep->fp.font, rep->fp.prec, + rep->ch_exp, rep->space, rep->colour); + return OK; +} + + +/* + * Set the fill representation in an output GIF file. + */ + int +GIFsetFillRep(Metafile *mf, int num, Gint idx, Gflbundl *rep) +{ + msgWarn("GIFsetFillRep: Don't support this feature\n"); + return OK; +} + + +/* + * Set the pattern representation in an output GIF file. + */ + int +GIFsetPatRep(Metafile *mf, int num, Gint idx, Gptbundl *rep) +{ + msgWarn("GIFsetPatRep: Don't support this feature\n"); + return OK; +} + + +/* + * Set the colour representation in an output GIF file. + */ +#ifndef MAX +#define MAX(a,b) (((a)>(b))?(a):(b)) +#endif + + int +GIFsetColRep(Metafile *mf, int num, Gint idx, Gcobundl *rep) +{ + Gint status = 1; + int imf; + mf_cgmo **cgmo = &mf->cgmo; + + for (imf = 0; imf < num; ++imf) { + float r = rep->red, g = rep->green, b = rep->blue; + GIFmetafile *meta = find_meta(cgmo[imf]); + int gindex; + assert(meta); + + /* Do the color allocation -- background color */ + /* can't be reset */ + if (idx > 0 && (gindex = allocate_color(meta, idx, r, g, b)) == -1){ + msgWarn("GIFsetColRep : Can't allocate color (%f, %f, %f)\n", + r, g, b); + } else { + msgInfo("GIFsetColRep: assigning color (%f, %f, %f) to GKS %d GIF %d\n", + r, g, b, idx, gindex); + + status = OK; + } + } + + return status; +} + + +/* + * Set the clipping rectangle in an output GIF file. + */ + int +GIFsetClip(Metafile *mf, int num, Glimit *rect) +{ + mf_cgmo *cgmo = mf->cgmo; + GIFmetafile *meta = find_meta(cgmo); + int x1,y1,x2,y2; + xform(meta, rect->xmin, rect->ymin, &x1, &y1); + xform(meta, rect->xmax, rect->ymax, &x2, &y2); + gdSetClip(meta->image, x1,y1,x2,y2); + + return OK; +} + + +/* + * Set the viewport limits in an output GIF file. + */ + int +GIFsetLimit(Metafile *mf, int num, Gint code, Glimit *rect) +{ + msgWarn("GIFsetLimit: Don't support this feature\n"); + return OK; +} + + +/* + * Rename a segment in an output GIF file. + */ + int +GIFrenameSeg(Metafile *mf, int num, Gint old, Gint new) +{ + msgWarn("GIFrenameSeg: Don't support this feature\n"); + return OK; +} + +/* + * Set the segment transformation in an output GIF file. + */ + int +GIFsetSegTran(Metafile *mf, int num, Gint name, Gfloat (*matrix)[]) +{ + msgWarn("GIFsetSegTran: Don't support this feature\n"); + return OK; +} + + +/* + * Set the segment attributes in an output GIF file. + */ + int +GIFsetSegAttr(Metafile *mf, int num, Gint name, Gint code, Gint attr) +{ + msgWarn("GIFsetSegAttr: Don't support this feature\n"); + return OK; +} + + +/* + * Set the segment visibility in an output Metafile. + */ + int +GIFsetSegVis(Metafile *mf, int num, Gint name, Gsegvis vis) +{ + msgWarn("GIFsetSegVis: Don't support this feature\n"); + return OK; +} + + +/* + * Set segment highlighting in an output GIF file. + */ + int +GIFsetSegHilight(Metafile *mf, int num, Gint name, Gseghi hilight) +{ + msgWarn("GIFsetSegHilight: Don't support this feature\n"); + return OK; +} + + +/* + * Set segment priority in an output GIF file. + */ + int +GIFsetSegPri(Metafile *mf, int num, Gint name, double pri) +{ + msgWarn("GIFsetSegPri: Don't support this feature\n"); + return OK; +} + +int +GIFsetSegDetect(Metafile *mf, int num, Gint name, Gsegdet det) +{ + msgWarn("GIFsetSegDetect: Don't support this feature\n"); + return OK; +} Index: xgks-2.6.1/src/lib/c/gif/gd.h =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 +++ xgks-2.6.1/src/lib/c/gif/gd.h 2010-07-14 03:41:25.000000000 +0100 @@ -0,0 +1,146 @@ +#ifndef GD_H +#define GD_H 1 + +/* gd.h: declarations file for the gifdraw module. + + Written by Tom Boutell, 5/94. + Copyright 1994, Cold Spring Harbor Labs. + Permission granted to use this code in any fashion provided + that this notice is retained and any alterations are + labeled as such. It is requested, but not required, that + you share extensions to this module with us so that we + can incorporate them into new versions. */ + +/* stdio is needed for file I/O. */ +#include + +/* This can't be changed, it's part of the GIF specification. */ + +#define gdMaxColors 256 + +/* Image type. See functions below; you will not need to change + the elements directly. Use the provided macros to + access sx, sy, the color table, and colorsTotal for + read-only purposes. */ + +typedef struct gdImageStruct { + unsigned char ** pixels; + int sx; + int sy; + int colorsTotal; + int red[gdMaxColors]; + int green[gdMaxColors]; + int blue[gdMaxColors]; + int open[gdMaxColors]; + int transparent; + int *polyInts; + int polyAllocated; + struct gdImageStruct *brush; + struct gdImageStruct *tile; + int brushColorMap[gdMaxColors]; + int tileColorMap[gdMaxColors]; + int styleLength; + int stylePos; + int *style; + int interlace; + int xcmin, ycmin, xcmax, ycmax; /* Clip boundaries */ +} gdImage; + +typedef gdImage * gdImagePtr; + +typedef struct { + /* # of characters in font */ + int nchars; + /* First character is numbered... (usually 32 = space) */ + int offset; + /* Character width and height */ + int w; + int h; + /* Font data; array of characters, one row after another. + Easily included in code, also easily loaded from + data files. */ + char *data; +} gdFont; + +/* Text functions take these. */ +typedef gdFont *gdFontPtr; + +/* For backwards compatibility only. Use gdImageSetStyle() + for MUCH more flexible line drawing. Also see + gdImageSetBrush(). */ +#define gdDashSize 4 + +/* Special colors. */ + +#define gdStyled (-2) +#define gdBrushed (-3) +#define gdStyledBrushed (-4) +#define gdTiled (-5) + +/* NOT the same as the transparent color index. + This is used in line styles only. */ +#define gdTransparent (-6) + +/* Functions to manipulate images. */ + +gdImagePtr gdImageCreate(int sx, int sy); +gdImagePtr gdImageCreateFromGif(FILE *fd); +gdImagePtr gdImageCreateFromGd(FILE *in); +gdImagePtr gdImageCreateFromXbm(FILE *fd); +void gdImageDestroy(gdImagePtr im); +void gdImageSetPixel(gdImagePtr im, int x, int y, int color); +int gdImageGetPixel(gdImagePtr im, int x, int y); +void gdImageLine(gdImagePtr im, int x1, int y1, int x2, int y2, int color); +/* For backwards compatibility only. Use gdImageSetStyle() + for much more flexible line drawing. */ +void gdImageDashedLine(gdImagePtr im, int x1, int y1, int x2, int y2, int color); +/* Corners specified (not width and height). Upper left first, lower right + second. */ +void gdImageRectangle(gdImagePtr im, int x1, int y1, int x2, int y2, int color); +/* Solid bar. Upper left corner first, lower right corner second. */ +void gdImageFilledRectangle(gdImagePtr im, int x1, int y1, int x2, int y2, int color); +int gdImageBoundsSafe(gdImagePtr im, int x, int y); +void gdImageChar(gdImagePtr im, gdFontPtr f, int x, int y, int c, int color); +void gdImageCharUp(gdImagePtr im, gdFontPtr f, int x, int y, char c, int color); +void gdImageString(gdImagePtr im, gdFontPtr f, int x, int y, char *s, int color); +void gdImageStringUp(gdImagePtr im, gdFontPtr f, int x, int y, char *s, int color); + +/* Point type for use in polygon drawing. */ + +typedef struct { + int x, y; +} gdPoint, *gdPointPtr; + +void gdImagePolygon(gdImagePtr im, gdPointPtr p, int n, int c); +void gdImageFilledPolygon(gdImagePtr im, gdPointPtr p, int n, int c); + +int gdImageColorAllocate(gdImagePtr im, int r, int g, int b); +int gdImageColorClosest(gdImagePtr im, int r, int g, int b); +int gdImageColorExact(gdImagePtr im, int r, int g, int b); +void gdImageColorDeallocate(gdImagePtr im, int color); +void gdImageColorTransparent(gdImagePtr im, int color); +void gdImageGif(gdImagePtr im, FILE *out); +void gdImageGd(gdImagePtr im, FILE *out); +void gdImageArc(gdImagePtr im, int cx, int cy, int w, int h, int s, int e, int color); +void gdImageFillToBorder(gdImagePtr im, int x, int y, int border, int color); +void gdImageFill(gdImagePtr im, int x, int y, int color); +void gdImageCopy(gdImagePtr dst, gdImagePtr src, int dstX, int dstY, int srcX, int srcY, int w, int h); +/* Stretches or shrinks to fit, as needed */ +void gdImageCopyResized(gdImagePtr dst, gdImagePtr src, int dstX, int dstY, int srcX, int srcY, int dstW, int dstH, int srcW, int srcH); +void gdImageSetBrush(gdImagePtr im, gdImagePtr brush); +void gdImageSetTile(gdImagePtr im, gdImagePtr tile); +void gdImageSetStyle(gdImagePtr im, int *style, int noOfPixels); +/* On or off (1 or 0) */ +void gdImageInterlace(gdImagePtr im, int interlaceArg); + +/* Macros to access information about images. READ ONLY. Changing + these values will NOT have the desired result. */ +#define gdImageSX(im) ((im)->sx) +#define gdImageSY(im) ((im)->sy) +#define gdImageColorsTotal(im) ((im)->colorsTotal) +#define gdImageRed(im, c) ((im)->red[(c)]) +#define gdImageGreen(im, c) ((im)->green[(c)]) +#define gdImageBlue(im, c) ((im)->blue[(c)]) +#define gdImageGetTransparent(im) ((im)->transparent) +#define gdImageGetInterlaced(im) ((im)->interlace) +#endif Index: xgks-2.6.1/src/lib/c/gif/gdadds.h =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 +++ xgks-2.6.1/src/lib/c/gif/gdadds.h 2010-07-14 03:41:25.000000000 +0100 @@ -0,0 +1,9 @@ +#ifndef GIFADDS_H +#define GIFADDS_h +void gdImageWideLine(gdImagePtr im, int x1, int y1, int x2, int y2, + int color, int width); +void gdImageWideLines(gdImagePtr im, gdPointPtr pts, int num, + int color, int width); +void gdImageBlockFill(gdImagePtr image, int color); +void gdSetClip(gdImagePtr image, int x1, int y1, int x2, int y2); +#endif Index: xgks-2.6.1/src/lib/c/gif/gif.h =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 +++ xgks-2.6.1/src/lib/c/gif/gif.h 2010-07-14 03:41:25.000000000 +0100 @@ -0,0 +1,247 @@ +/* + * Copyright IBM Corporation 1989 + * + * All Rights Reserved + * + * Permission to use, copy, modify, and distribute this software and its + * documentation for any purpose and without fee is hereby granted, + * provided that the above copyright notice appear in all copies and that + * both that copyright notice and this permission notice appear in + * supporting documentation, and that the name of IBM not be + * used in advertising or publicity pertaining to distribution of the + * software without specific, written prior permission. + * + * IBM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING + * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL + * IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR + * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, + * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, + * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS + * SOFTWARE. + * + * PostScript driver for XGKS metafiles + * Created by Joe Sirott, Pacific Marine Environmental Lab + * $Id: gif.h,v 1.1 2006/09/22 16:34:28 ansley Exp $ + */ + + +#ifndef XGKS_GIF_H +#define XGKS_GIF_H + +extern int GIFrecSize PROTO(( + Gint type +)); +extern int GIFnextItem PROTO(( + Metafile *mf /* Metafile structure */ +)); +extern int GIFwriteItem PROTO(( + Metafile **mf, /* Metafile structures */ + int num, /* Number of Metafiles */ + Gint type, /* item type */ + Gint length, /* item length */ + Gchar *data /* item data-record */ +)); +extern int GIFreadItem PROTO(( + Metafile *mf, /* Metafile structure */ + char *record /* input data-record */ +)); +extern int GIFmiOpen PROTO(( + Metafile *mf /* Metafile structure */ +)); +extern int GIFmoOpen PROTO(( + WS_STATE_PTR ws +)); +extern int GIFmoClose PROTO(( + Metafile *mf +)); +extern int GIFclear PROTO(( + Metafile *mf, + int num, + Gclrflag flag +)); +extern int GIFredrawAllSeg PROTO(( + Metafile **mf, + int num +)); +extern int GIFupdate PROTO(( + Metafile **mf, + int num, + Gregen regenflag +)); +extern int GIFdefer PROTO(( + Metafile **mf, + int num, + Gdefmode defer_mode, + Girgmode regen_mode +)); +extern int GIFmessage PROTO(( + Metafile **mf, + int num, + Gchar *string +)); +extern int GIFoutputGraphic PROTO(( + Metafile *mf, + int num, + Gint code, + Gint num_pt, + Gpoint *pos +)); +extern int GIFtext PROTO(( + Metafile *mf, + int num, + Gpoint *at, + Gchar *string +)); +extern int GIFcellArray PROTO(( + Metafile *mf, + int num, + Gpoint *ll, + Gpoint *ur, + Gpoint *lr, + Gint row, + Gint *colour, + Gipoint *dim +)); +extern int GIFsetGraphSize PROTO(( + Metafile *mf, + int num, + Gint code, + double size +)); +extern int GIFcloseSeg PROTO(( + Metafile *mf, + int num +)); +extern int GIFsetGraphAttr PROTO(( + Metafile *mf, + int num, + Gint code, + Gint attr +)); +extern int GIFsetTextFP PROTO(( + Metafile *mf, + int num, + Gtxfp *txfp +)); +extern int GIFsetCharUp PROTO(( + Metafile *mf, + int num, + Gpoint *up, + Gpoint *base +)); +extern int GIFsetTextPath PROTO(( + Metafile *mf, + int num, + Gtxpath path +)); +extern int GIFsetTextAlign PROTO(( + Metafile *mf, + int num, + Gtxalign *align +)); +extern int GIFsetFillStyle PROTO(( + Metafile *mf, + int num, + Gflinter style +)); +extern int GIFsetPatSize PROTO(( + Metafile *mf, + int num +)); +extern int GIFsetPatRefpt PROTO(( + Metafile *mf, + int num +)); +extern int GIFsetAsf PROTO(( + Metafile *mf, + int num +)); +extern int GIFsetLineMarkRep PROTO(( + Metafile *mf, + int num, + Gint code, + Gint idx, + Gint type, + double size, + Gint colour +)); +extern int GIFsetTextRep PROTO(( + Metafile *mf, + int num, + Gint idx, + Gtxbundl *rep +)); +extern int GIFsetFillRep PROTO(( + Metafile *mf, + int num, + Gint idx, + Gflbundl *rep +)); +extern int GIFsetPatRep PROTO(( + Metafile *mf, + int num, + Gint idx, + Gptbundl *rep +)); +extern int GIFsetColRep PROTO(( + Metafile *mf, + int num, + Gint idx, + Gcobundl *rep +)); +extern int GIFsetClip PROTO(( + Metafile *mf, + int num, + Glimit *rect +)); +extern int GIFsetLimit PROTO(( + Metafile *mf, + int num, + Gint code, + Glimit *rect +)); +extern int GIFrenameSeg PROTO(( + Metafile *mf, + int num, + Gint old, + Gint new +)); +extern int GIFsetSegTran PROTO(( + Metafile *mf, + int num, + Gint name, + Gfloat matrix[2][3] +)); +extern int GIFsetSegAttr PROTO(( + Metafile *mf, + int num, + Gint name, + Gint code, + Gint attr +)); +extern int GIFsetSegVis PROTO(( + Metafile *mf, + int num, + Gint name, + Gsegvis vis +)); +extern int GIFsetSegHilight PROTO(( + Metafile *mf, + int num, + Gint name, + Gseghi hilight +)); +extern int GIFsetSegPri PROTO(( + Metafile *mf, + int num, + Gint name, + double pri +)); +extern int GIFsetSegDetect PROTO(( + Metafile *mf, + int num, + Gint name, + Gsegdet det +)); + +#endif /* XGKS_PS_H not defined */ Index: xgks-2.6.1/src/lib/c/gif/mtables.h =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 +++ xgks-2.6.1/src/lib/c/gif/mtables.h 2010-07-14 03:41:25.000000000 +0100 @@ -0,0 +1,726 @@ +#define costScale 1024 +int cost[] = { + 1024, + 1023, + 1023, + 1022, + 1021, + 1020, + 1018, + 1016, + 1014, + 1011, + 1008, + 1005, + 1001, + 997, + 993, + 989, + 984, + 979, + 973, + 968, + 962, + 955, + 949, + 942, + 935, + 928, + 920, + 912, + 904, + 895, + 886, + 877, + 868, + 858, + 848, + 838, + 828, + 817, + 806, + 795, + 784, + 772, + 760, + 748, + 736, + 724, + 711, + 698, + 685, + 671, + 658, + 644, + 630, + 616, + 601, + 587, + 572, + 557, + 542, + 527, + 512, + 496, + 480, + 464, + 448, + 432, + 416, + 400, + 383, + 366, + 350, + 333, + 316, + 299, + 282, + 265, + 247, + 230, + 212, + 195, + 177, + 160, + 142, + 124, + 107, + 89, + 71, + 53, + 35, + 17, + 0, + -17, + -35, + -53, + -71, + -89, + -107, + -124, + -142, + -160, + -177, + -195, + -212, + -230, + -247, + -265, + -282, + -299, + -316, + -333, + -350, + -366, + -383, + -400, + -416, + -432, + -448, + -464, + -480, + -496, + -512, + -527, + -542, + -557, + -572, + -587, + -601, + -616, + -630, + -644, + -658, + -671, + -685, + -698, + -711, + -724, + -736, + -748, + -760, + -772, + -784, + -795, + -806, + -817, + -828, + -838, + -848, + -858, + -868, + -877, + -886, + -895, + -904, + -912, + -920, + -928, + -935, + -942, + -949, + -955, + -962, + -968, + -973, + -979, + -984, + -989, + -993, + -997, + -1001, + -1005, + -1008, + -1011, + -1014, + -1016, + -1018, + -1020, + -1021, + -1022, + -1023, + -1023, + -1024, + -1023, + -1023, + -1022, + -1021, + -1020, + -1018, + -1016, + -1014, + -1011, + -1008, + -1005, + -1001, + -997, + -993, + -989, + -984, + -979, + -973, + -968, + -962, + -955, + -949, + -942, + -935, + -928, + -920, + -912, + -904, + -895, + -886, + -877, + -868, + -858, + -848, + -838, + -828, + -817, + -806, + -795, + -784, + -772, + -760, + -748, + -736, + -724, + -711, + -698, + -685, + -671, + -658, + -644, + -630, + -616, + -601, + -587, + -572, + -557, + -542, + -527, + -512, + -496, + -480, + -464, + -448, + -432, + -416, + -400, + -383, + -366, + -350, + -333, + -316, + -299, + -282, + -265, + -247, + -230, + -212, + -195, + -177, + -160, + -142, + -124, + -107, + -89, + -71, + -53, + -35, + -17, + 0, + 17, + 35, + 53, + 71, + 89, + 107, + 124, + 142, + 160, + 177, + 195, + 212, + 230, + 247, + 265, + 282, + 299, + 316, + 333, + 350, + 366, + 383, + 400, + 416, + 432, + 448, + 464, + 480, + 496, + 512, + 527, + 542, + 557, + 572, + 587, + 601, + 616, + 630, + 644, + 658, + 671, + 685, + 698, + 711, + 724, + 736, + 748, + 760, + 772, + 784, + 795, + 806, + 817, + 828, + 838, + 848, + 858, + 868, + 877, + 886, + 895, + 904, + 912, + 920, + 928, + 935, + 942, + 949, + 955, + 962, + 968, + 973, + 979, + 984, + 989, + 993, + 997, + 1001, + 1005, + 1008, + 1011, + 1014, + 1016, + 1018, + 1020, + 1021, + 1022, + 1023, + 1023 +}; +#define sintScale 1024 +int sint[] = { + 0, + 17, + 35, + 53, + 71, + 89, + 107, + 124, + 142, + 160, + 177, + 195, + 212, + 230, + 247, + 265, + 282, + 299, + 316, + 333, + 350, + 366, + 383, + 400, + 416, + 432, + 448, + 464, + 480, + 496, + 512, + 527, + 542, + 557, + 572, + 587, + 601, + 616, + 630, + 644, + 658, + 671, + 685, + 698, + 711, + 724, + 736, + 748, + 760, + 772, + 784, + 795, + 806, + 817, + 828, + 838, + 848, + 858, + 868, + 877, + 886, + 895, + 904, + 912, + 920, + 928, + 935, + 942, + 949, + 955, + 962, + 968, + 973, + 979, + 984, + 989, + 993, + 997, + 1001, + 1005, + 1008, + 1011, + 1014, + 1016, + 1018, + 1020, + 1021, + 1022, + 1023, + 1023, + 1024, + 1023, + 1023, + 1022, + 1021, + 1020, + 1018, + 1016, + 1014, + 1011, + 1008, + 1005, + 1001, + 997, + 993, + 989, + 984, + 979, + 973, + 968, + 962, + 955, + 949, + 942, + 935, + 928, + 920, + 912, + 904, + 895, + 886, + 877, + 868, + 858, + 848, + 838, + 828, + 817, + 806, + 795, + 784, + 772, + 760, + 748, + 736, + 724, + 711, + 698, + 685, + 671, + 658, + 644, + 630, + 616, + 601, + 587, + 572, + 557, + 542, + 527, + 512, + 496, + 480, + 464, + 448, + 432, + 416, + 400, + 383, + 366, + 350, + 333, + 316, + 299, + 282, + 265, + 247, + 230, + 212, + 195, + 177, + 160, + 142, + 124, + 107, + 89, + 71, + 53, + 35, + 17, + 0, + -17, + -35, + -53, + -71, + -89, + -107, + -124, + -142, + -160, + -177, + -195, + -212, + -230, + -247, + -265, + -282, + -299, + -316, + -333, + -350, + -366, + -383, + -400, + -416, + -432, + -448, + -464, + -480, + -496, + -512, + -527, + -542, + -557, + -572, + -587, + -601, + -616, + -630, + -644, + -658, + -671, + -685, + -698, + -711, + -724, + -736, + -748, + -760, + -772, + -784, + -795, + -806, + -817, + -828, + -838, + -848, + -858, + -868, + -877, + -886, + -895, + -904, + -912, + -920, + -928, + -935, + -942, + -949, + -955, + -962, + -968, + -973, + -979, + -984, + -989, + -993, + -997, + -1001, + -1005, + -1008, + -1011, + -1014, + -1016, + -1018, + -1020, + -1021, + -1022, + -1023, + -1023, + -1024, + -1023, + -1023, + -1022, + -1021, + -1020, + -1018, + -1016, + -1014, + -1011, + -1008, + -1005, + -1001, + -997, + -993, + -989, + -984, + -979, + -973, + -968, + -962, + -955, + -949, + -942, + -935, + -928, + -920, + -912, + -904, + -895, + -886, + -877, + -868, + -858, + -848, + -838, + -828, + -817, + -806, + -795, + -784, + -772, + -760, + -748, + -736, + -724, + -711, + -698, + -685, + -671, + -658, + -644, + -630, + -616, + -601, + -587, + -572, + -557, + -542, + -527, + -512, + -496, + -480, + -464, + -448, + -432, + -416, + -400, + -383, + -366, + -350, + -333, + -316, + -299, + -282, + -265, + -247, + -230, + -212, + -195, + -177, + -160, + -142, + -124, + -107, + -89, + -71, + -53, + -35, + -17 +}; Index: xgks-2.6.1/src/lib/c/ps.c =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 +++ xgks-2.6.1/src/lib/c/ps.c 2010-07-14 03:41:25.000000000 +0100 @@ -0,0 +1,1066 @@ +/* +* +* This software was developed by the Thermal Modeling and Analysis +* Project(TMAP) of the National Oceanographic and Atmospheric +* Administration's (NOAA) Pacific Marine Environmental Lab(PMEL), +* hereafter referred to as NOAA/PMEL/TMAP. +* +* Access and use of this software shall impose the following +* obligations and understandings on the user. The user is granted the +* right, without any fee or cost, to use, copy, modify, alter, enhance +* and distribute this software, and any derivative works thereof, and +* its supporting documentation for any purpose whatsoever, provided +* that this entire notice appears in all copies of the software, +* derivative works and supporting documentation. Further, the user +* agrees to credit NOAA/PMEL/TMAP in any publications that result from +* the use of this software or in any product that includes this +* software. The names TMAP, NOAA and/or PMEL, however, may not be used +* in any advertising or publicity to endorse or promote any products +* or commercial entity unless specific written permission is obtained +* from NOAA/PMEL/TMAP. The user also understands that NOAA/PMEL/TMAP +* is not obligated to provide the user with any support, consulting, +* training or assistance of any kind with regard to the use, operation +* and performance of this software nor to provide the user with any +* updates, revisions, new versions or "bug fixes". +* +* THIS SOFTWARE IS PROVIDED BY NOAA/PMEL/TMAP "AS IS" AND ANY EXPRESS +* OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +* ARE DISCLAIMED. IN NO EVENT SHALL NOAA/PMEL/TMAP BE LIABLE FOR ANY SPECIAL, +* INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER +* RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF +* CONTRACT, NEGLIGENCE OR OTHER TORTUOUS ACTION, ARISING OUT OF OR IN +* CONNECTION WITH THE ACCESS, USE OR PERFORMANCE OF THIS SOFTWARE. +* +*/ + + + +/* + * PostScript driver for XGKS metafiles + * Created by Joe Sirott, Pacific Marine Environmental Lab + * + */ + +/* + * Copyright IBM Corporation 1989 + * + * All Rights Reserved + * + * Permission to use, copy, modify, and distribute this software and its + * documentation for any purpose and without fee is hereby granted, + * provided that the above copyright notice appear in all copies and that + * both that copyright notice and this permission notice appear in + * supporting documentation, and that the name of IBM not be + * used in advertising or publicity pertaining to distribution of the + * software without specific, written prior permission. + * + * IBM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING + * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL + * IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR + * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, + * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, + * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS + * SOFTWARE. + * + * + * University of Illinois at Urbana-Champaign + * Department of Computer Science + * 1304 W. Springfield Ave. + * Urbana, IL 61801 + * + * (C) Copyright 1987, 1988 by The University of Illinois Board of Trustees. + * All rights reserved. + * + * Tool: X 11 Graphical Kernel System + * Author: Gregory Scott Rogers + * Author: Sung Hsien Ching Kelvin + * Author: Yu Pan + */ + +/*LINTLIBRARY*/ + +#define NULL 0 +#include +#include +#include +#include +#include +#include /* for time(), localtime(), and strftime() */ +#include /* for uid_t */ +#include /* for uname() */ +#include /* for getlogin() */ +#include +#include +#include +#include +#include +#include "udposix.h" +#include "gks_implem.h" +#include "cgm/cgm.h" /* for public, API details */ +#include "cgm/cgm_implem.h" /* for implementation details */ +#include "ps/ps.h" + +#ifndef lint + static char afsid[] = "$__Header$"; + static char rcsid[] = "$Id: ps.c,v 1.2 2004/01/21 23:06:00 kobrien Exp $"; +#endif + +static char MARKERSIZE[] = "markersize"; +static char LINEWIDTHSCALE[] = "lws"; +static char CHAREXPANSION[] = "charexpansion"; +static char CHARSPACING[] = "charspacing"; +static char LINECOLOR[] = "lc"; +static char MARKERCOLOR[] = "mc"; +static char FILLCOLOR[] = "fc"; +static char TEXTCOLOR[] = "tc"; +static char header[] = +#include "ps/headerv4.0.h" +; +static Gint postscript_version = 1; + +/* 11 bytes dummy for this implementation */ +static Gchar dummy[] = "dummy info."; + +/* String array for formats created on the fly */ +static Gchar fmt[80]; + +static Gtxalign PSalign; +static Gpoint PSup, PSbase; + +static Gflinter FillStyle = GHOLLOW; + +/* Error messages are switched on and off through the environment */ +/* variable XGKS_LOG anded with the enum MsgLog */ + +typedef enum MsgLog { + INFO = 1, + WARN = 2, + ERR = 4 +} MsgLog; + +static int LogFlag = ERR; + +static void initLogFlag() +{ + char *cp = getenv("XGKS_LOG"); + if (cp){ + LogFlag = atoi(cp); + } +} + +static void msgInfo(char *format, ...) +{ + if (LogFlag & INFO){ + va_list ap; + va_start(ap, format); + /* print out name of function causing error */ + fprintf(stderr, "XGKS(PS): Info: "); + /* print out remainder of message */ + vfprintf(stderr, format, ap); + va_end(ap); + } +} + +static void msgWarn(char *format, ...) +{ + if (LogFlag & WARN){ + va_list ap; + va_start(ap, format); + /* print out name of function causing error */ + fprintf(stderr, "XGKS(PS): Warning: "); + /* print out remainder of message */ + vfprintf(stderr, format, ap); + va_end(ap); + } +} + +static void msgErr(char *format, ...) +{ + if (LogFlag & ERR){ + va_list ap; + va_start(ap, format); + /* print out name of function causing error */ + fprintf(stderr, "XGKS(PS): Error: "); + /* print out remainder of message */ + vfprintf(stderr, format, ap); + va_end(ap); + } +} + +static char *LineStyles[] = { + "", + "[] 0 sd", + "[5 4] 0 sd", + "[3] 0 sd", + "[4 2 2 2] 0 sd", + 0 +}; + +void allocate_color(mf_cgmo *cgmo, int idx, float r, float g, float b) +{ + /* Gray value from PS 2.0 Red book, p. 304 */ + float gray = .3 * r + .59 * g + .11 * b; + FILE *fp = cgmo->fp; + msgInfo("allocate_color: assigning color (%f, %f, %f) to %d\n", + r, g, b, idx); + (void) fprintf(fp, "ct %d [%f %f %f] put\n", idx, r, g, b); + (void) fprintf(fp, "nct %d [%d %d %d] put\n", idx, + (int)(255.*r), (int)(255.*g), (int)(255.*b)); + (void) fprintf(fp, "gct %d %f put\n", idx, gray); +} + +static void set_lineStyle(mf_cgmo *cgmo, Gint attr, Gasf type) +{ + if (type != xgks_state.gks_lnattr.type) + return; + if (type == GBUNDLED){ + attr = cgmo->ws->lnbundl_table[attr].type; + } + msgInfo("set_lineStyle: setting style to %d\n", attr); + if (attr <= 0 || attr > 4) + attr = 1; + fprintf(cgmo->fp, "%s\n", LineStyles[attr]); +} + +static void +set_lineWidth(mf_cgmo *cgmo, double size, Gint attr, Gasf type) +{ + if (type != xgks_state.gks_lnattr.width) + return; + if (type == GBUNDLED){ + size = cgmo->ws->lnbundl_table[attr].width; + } + msgInfo("set_lineWidth: setting width to %lf\n", size); + if (size < 1.0) + size = 1.0; + size *= 0.5; + fprintf(cgmo->fp, "/%s %.6lf def\n", LINEWIDTHSCALE, size); +} + +static void set_lineColor(mf_cgmo *cgmo, Gint attr, Gasf type) +{ + if (type != xgks_state.gks_lnattr.colour) + return; + if (type == GBUNDLED){ + attr = cgmo->ws->lnbundl_table[attr].colour; + } + msgInfo("set_lineColor: setting color index to %d\n", attr); + fprintf(cgmo->fp, "/%s %d def\n", LINECOLOR, attr); + +} + + +/* + * Return a string identifying the user and installation. + */ + static Gchar* +XgksMAuthor(void) +{ + char *username = getlogin(); + struct utsname name; + static Gchar buffer[41]; + + buffer[0] = 0; + + if (username != NULL) + (void) strncat(buffer, username, sizeof(buffer) - 1); + + if (uname(&name) != -1) { + int nchr = strlen(buffer); + + if (nchr < sizeof(buffer) - 1) { + buffer[nchr++] = '@'; + (void) strncpy(buffer + nchr, name.nodename, + sizeof(buffer) - nchr - 1); + } + } + + return buffer; +} + + +/* + * Return a date-string. + */ + static Gchar* +XgksMDate(void) +{ + time_t clock = time((time_t *) NULL); + static Gchar date[9]; + + (void) strftime(date, (size_t)sizeof(date), "%y/%m/%d", + localtime(&clock)); + + return date; +} + + +/* + * Open an output PostScript file. + */ + int +PSmoOpen(WS_STATE_PTR ws) +{ + Gint status = 1; + initLogFlag(); + assert(ws != NULL); + if ((ws->mf.cgmo = (mf_cgmo*)umalloc(sizeof(mf_cgmo))) != NULL) { + mf_cgmo *cgmo = ws->mf.cgmo; + + if ((cgmo->fp = fopen(ws->conn, "w")) == NULL) { + (void)PSmoClose(&ws->mf); + } else { + cgmo->ws = ws; + cgmo->type = MF_PS; + fputs(header, ws->mf.any->fp); + fputs("\n%%Page:1 1\n", ws->mf.any->fp); + allocate_color(cgmo, 0, 1, 1, 1); + allocate_color(cgmo, 1, 0, 0, 0); + status = OK; + } + } + + return status; +} + + +/* True hack here -- if aspect is > ratio of page height to page length */ +/* than use portrait, otherwise landscape. This assumes 8.5x11 */ +/* We are screwed if paper dimensions are different (i.e. A4) */ + +void PSresize(WS_STATE_PTR ws, Gpoint size) +{ + float myAspect = size.y/size.x; + FILE *fp = ws->mf.any->fp; + if (myAspect < 1.0){ + PSmoSetLandscape(&ws->mf); + } + fprintf(fp, "gr %f center gs\n", myAspect); + +} + +/* + * Special function called from gescsetlandscape to set landscape mode + */ + +int PSmoSetLandscape(Metafile *mf) +{ + FILE *fp = mf->any->fp; + fputs("gr pagewidth neg Landscape gs\n", fp); + return OK; +} + +/* + * Close an output PostScript file. + */ + int +PSmoClose(Metafile *mf) +{ + int status = 1; /* return status error */ + if (mf != NULL && mf->cgmo != NULL) { + mf_cgmo *cgmo = mf->cgmo; + FILE *fp = cgmo->fp; + + if (fp != NULL) { + fputs("showpage\n", fp); + fputs("%%Trailer\n", fp); + fputs("%%Pages: 1\n", fp); + fputs("frpagesave restore\n", fp); + if (!ferror(fp) & fclose(fp) != EOF) + status = OK; + } + + ufree((voidp)mf->cgmo); + mf->cgmo = NULL; + } + + return status; +} + + +/* + * Set the clear flag in an output PostScript file. + */ + int +PSclear(Metafile *mf, int num, Gclrflag flag) +{ + if (mf != NULL && mf->cgmo != NULL) { + mf_cgmo *cgmo = mf->cgmo; + FILE *fp = cgmo->fp; + if (fp != NULL){ + fprintf(fp, "gr gs clippath 1 setgray fill\n"); + } + } + return OK; +} + + +/* + * Redraw all segments in an output PostScript file. + */ + int +PSredrawAllSeg(Metafile **mf, int num) +{ + /* Noop */ + msgWarn("PSredrawAllSeg: Don't support this feature\n"); + return OK; +} + + +/* + * Set the update flag in an output PostScript file. + */ + int +PSupdate(Metafile **mf, int num, Gregen regenflag) +{ + /* Noop */ + msgWarn("PSupdate: Don't support this feature\n"); + return OK; +} + + +/* + * Set the deferal state in an output PostScript file. + */ + int +PSdefer(Metafile **mf, int num, Gdefmode defer_mode, Girgmode regen_mode) +{ + /* Noop */ + msgWarn("PSdefer: Don't support this feature\n"); + return OK; +} + + +/* + * Write a message to an output PostScript file. + */ + int +PSmessage(Metafile **mf, int num, Gchar *string) +{ + /* Noop */ + msgWarn("PSmessage: Don't support this feature\n"); + return OK; +} + + + + +/* + * Write text to an output PostScript file. + */ + int +PStext(Metafile *mf, int num, Gpoint *at, Gchar *string) +{ + msgWarn("PStext: Don't support this feature\n"); + return OK; + +#if 0 + int imf; + mf_cgmo **cgmo = &mf->cgmo; + if (!at || !string || *string == 0) + return OK; + + for (imf = 0; imf < num; ++imf) { + Gint i, length, count = 0; + FILE *fp = cgmo[imf]->fp; + Gpoint* up = &PSup; + char *nstr; + + /* Have to escape '(' , ')' and '\' charcters */ + length = strlen(string); + nstr = malloc(2 * length); + for (i=0; i < length; i++){ + if (string[i] == '\\' || string[i] == '(' || string[i] == ')'){ + nstr[count++] = '\\'; + } + nstr[count++] = string[i]; + } + nstr[count] = 0; + + fprintf(fp,"gs %s o %.6f %.6f m (%s) ", TEXTCOLOR, at->x, at->y, nstr); + if (up->y != 1.0 && up->x != 0.0){ + double angle = atan2(-up->x, up->y) * 180./M_PI; + fprintf(fp, "%.0lf rotate htext ", angle); + } + switch (PSalign.hor){ + case GTH_RIGHT: + fputs("rtext ", fp); + break; + case GTH_CENTRE: + fputs("ctext ", fp); + break; + default: + break; + } + switch (PSalign.ver){ + case GTV_NORMAL: + break; + case GTV_TOP: + fputs("PStext: Vertical alignment GTV_TOP not supported\n", stderr); + break; + case GTV_CAP: + fputs("PStext: Vertical alignment GTV_CAP not supported\n", stderr); + break; + case GTV_HALF: + fputs("htext ", fp); + break; + case GTV_BASE: + fputs("PStext: Vertical alignment GTV_BASE not supported\n", stderr); + break; + case GTV_BOTTOM: + fputs("PStext: Vertical alignment GTV_BOTTOM not supported\n", stderr); + break; + default: + fputs("PStext: Vertical alignment UNKNOWN not supported\n", stderr); + break; + } + fputs("show gr\n", fp); + } +#ifdef PSDEBUG + fprintf(stderr, "PStext: text = %s at (%.6f %.6f)\n", str, at->x, at->y); +#endif + return OK; +#endif /* #if 0 */ +} + +/* + * Write a cell array to an output PostScript file. + * New method fakes transparency by not writing image data for colors of 0 + */ + + int +PScellArray(Metafile *mf, int num, Gpoint *ll, Gpoint *ur, Gpoint *lr, Gint row, Gint *colour, Gipoint *dim) +{ + msgWarn("PScellArray: Don't support this feature\n"); + return OK; +#if 0 + int imf; + mf_cgmo **cgmo = &mf->cgmo; + if (ll->x > ur->x){ + float tmp = ll->x; + ll->x = ur->x; + ur->x = tmp; + } + for (imf = 0; imf < num; ++imf) { + FILE *fp = cgmo[imf]->fp; + int j; + + for (j=0; j < dim->y; ++j){ + int k = 0, start = -1, end = -1, currcolor = -1; + while (k < dim->x) { + for (start = -1, k= end + 1; k < dim->x; ++k){ + if (colour[j*dim->x + k] != 0){ + start = k; + end = dim->x; + currcolor = colour[j*dim->x + k]; + break; + } + } + for (k = k + 1; k < dim->x; ++k){ + if (colour[j*dim->x + k] != currcolor){ + end =k; + break; + } + } + if (start > -1){ + float widthx = ur->x - ll->x; + float startx = ll->x + (float)start/(float)dim->x*widthx; + float endx = ll->x + (float)(end+1)/(float)dim->x*widthx; + + float widthy = ur->y - ll->y; + float deltay = widthy / dim->y; + + if (endx > ur->x) + endx = ur->x; + + fprintf(fp, "%d o %.6f %.6f %.6f %.6f b f\n", + colour[j*dim->x + start], + startx, ll->y + j * deltay, + endx, ll->y + (j + 1) * deltay + 1e-6); + + } + } + } + } + + return OK; +#endif /* #if 0 */ +} + + +/* + * Close a segment in an output PostScript file. + */ + int +PScloseSeg(Metafile *mf, int num) +{ + /* Noop */ + msgWarn("PScloseSeg: Don't support this feature\n"); + return OK; +} + + +/* + * Set the graphic attributes in an output PostScript file. + */ + +/* + * Write a graphic to output PostScript files. + * + * This routine is suitable for + * + * POLYLINE -- code == 11 + * POLYMARKER -- code == 12 + * FILLAREA -- code == 14 + */ +/* RETURN HERE ****************/ + + int +PSoutputGraphic(Metafile *mf, int num, Gint code, Gint num_pt, Gpoint *pos) +{ + int imf; + mf_cgmo **cgmo = &mf->cgmo; + + for (imf = 0; imf < num; ++imf) { + Gint i; + FILE *fp = cgmo[imf]->fp; + + assert(num_pt > 0); + switch(code){ + case GKSM_FILL_AREA: + if (FillStyle == GHOLLOW){ + fprintf(fp, "0.5 w %s o %.6f %.6f m\n", + FILLCOLOR, pos->x, pos->y); + } else { + fprintf(fp, "%s o %.6f %.6f m\n", FILLCOLOR, pos->x, pos->y); + } + break; + case GKSM_POLYLINE: + fprintf(fp, "%s w %s o %.6f %.6f m\n", LINEWIDTHSCALE, + LINECOLOR, pos->x, pos->y); + break; + case GKSM_POLYMARKER: + fprintf(fp, "%s o %.6f %.6f pm\n", MARKERCOLOR, pos->x, pos->y); + break; + default: + fprintf(stderr, "PSoutputGraphics: Unknown code %d\n", code); + return OK; + } + { + Gpoint *npos = pos; + npos++; + for (i = 1; i < num_pt; ++i,++npos) { + if (code == GKSM_POLYMARKER) + (void) fprintf(fp, "%.6f %.6f pm\n", npos->x, npos->y); + else + (void) fprintf(fp, "%.6f %.6f l\n", npos->x, npos->y); + } + } + switch(code){ + case GKSM_FILL_AREA: + if (FillStyle == GHOLLOW){ + fprintf(fp, "%s\n", LineStyles[1]); + fprintf(fp, "%.6f %.6f l\n", pos->x, pos->y); + fprintf(fp, "t\n"); + } else { + fprintf(fp, "f\n"); + } + break; + case GKSM_POLYMARKER: + fprintf(fp, "f\n"); + break; + case GKSM_POLYLINE: + fprintf(fp, "t\n"); + break; + } + } + return OK; +} +/* + * Set the size of graphics in an output PostScript file. + */ + int +PSsetGraphSize(Metafile *mf, int num, Gint code, double size) +{ + int imf; + mf_cgmo **cgmo = &mf->cgmo; + + for (imf = 0; imf < num; ++imf) { + switch(code){ + case GKSM_LINEWIDTH_SCALE_FACTOR: + set_lineWidth(cgmo[imf], size, 0, GINDIVIDUAL); + break; + case GKSM_CHARACTER_EXPANSION_FACTOR: + case GKSM_MARKER_SIZE_SCALE_FACTOR: + case GKSM_CHARACTER_SPACING: + msgWarn("PSsetGraphSize: Don't support code %d\n", code); + break; + default: + msgWarn("PSsetGraphSize: Unknown code %d\n", code); + } + } + return OK; +} + + + +int +PSsetGraphAttr(Metafile *mf, int num, Gint code, Gint attr) +{ + int imf; + mf_cgmo **cgmo = &mf->cgmo; + char *comm = 0; + for (imf = 0; imf < num; ++imf) { + switch(code){ + case GKSM_POLYLINE_INDEX: + set_lineStyle(cgmo[imf], attr, GBUNDLED); + set_lineColor(cgmo[imf], attr, GBUNDLED); + set_lineWidth(cgmo[imf], 0.0, attr, GBUNDLED); + break; + case GKSM_POLYLINE_COLOUR_INDEX: + set_lineColor(cgmo[imf], attr, GINDIVIDUAL); + break; + case GKSM_LINETYPE: + set_lineStyle(cgmo[imf], attr, GINDIVIDUAL); + break; + case GKSM_POLYMARKER_COLOUR_INDEX: + comm = MARKERCOLOR; + break; + case GKSM_TEXT_COLOUR_INDEX: + comm = TEXTCOLOR; + break; + case GKSM_FILL_AREA_COLOUR_INDEX: + comm = FILLCOLOR; + break; + case GKSM_MARKER_TYPE: + case GKSM_POLYMARKER_INDEX: + case GKSM_FILL_AREA_INDEX: + case GKSM_FILL_AREA_STYLE_INDEX: + case GKSM_PICK_IDENTIFIER: + case GKSM_TEXT_INDEX: + msgWarn("PSsetGraphAttr: Don't support code %d\n", code); + /* Ignore */ + break; + default: + msgWarn("PSsetGraphAttr: Unknown code %d\n", code); + } + + if (comm) + fprintf(cgmo[imf]->fp, "/%s %d def\n", comm, attr); + } + return OK; +} + + +/* + * Set the font precision in an output PostScript file. + */ + int +PSsetTextFP(Metafile *mf, int num, Gtxfp *txfp) +{ + if (!txfp) + return OK; + msgWarn("PSsetTextFp: Don't support this feature\n"); + return OK; +} + +#define HYPOT(x,y) sqrt((double)((x)*(x) + (y)*(y))) + + +/* + * Set the character up-vector and character height in an output PostScript file. + */ + int +PSsetCharUp(Metafile *mf, int num, Gpoint *up, Gpoint *base) +{ + msgWarn("PSsetCharUp: Don't support this feature\n"); + return OK; +#if 0 + float height; + int imf; + mf_cgmo **cgmo = &mf->cgmo; + if (up == 0 || base == 0) + return OK; + + PSup = *up; + PSbase = *base; + height = HYPOT(up->x, up->y); + + for (imf = 0; imf < num; ++imf) { + FILE *fp = cgmo[imf]->fp; + fprintf(fp, "%.6f sf\n", height); + } + +#ifdef PSDEBUG + fprintf(stderr, "PSsetCharUp: up=(%.6f %.6f) base=(%.6f %.6f) height = %.6f\n", + up->x, up->y, + base->x, base->y, height); +#endif + return OK; +#endif /* #if 0 */ +} + + +/* + * Set the text-path in an output PostScript file. + */ + int +PSsetTextPath(Metafile *mf, int num, Gtxpath path) +{ + msgWarn("PSsetTextPath: Don't support this feature\n"); + return OK; +} + + +/* + * Set the text-alignment in an output PostScript file. + */ + int +PSsetTextAlign(Metafile *mf, int num, Gtxalign *align) +{ + msgWarn("PSsetTextAlign: Don't support this feature\n"); + return OK; +#if 0 + if (align == 0) + return; + PSalign = *align; +#ifdef PSDEBUG + fprintf(stderr, "PSsetTextAlign: align = %d %d\n", align->hor, align->ver); +#endif + return OK; +#endif /* #if 0 */ +} + + +/* + * Set the interior fill-style in an output PostScript file. + */ + int +PSsetFillStyle(Metafile *mf, int num, Gflinter style) +{ + FillStyle = style; + return OK; +} + + +/* + * Set the pattern size in an output PostScript file. + */ + int +PSsetPatSize(Metafile *mf, int num) +{ + msgWarn("PSsetPatSize: Don't support this feature\n"); + return OK; +} + + +/* + * Set the pattern reference-point in an output PostScript file. + */ + int +PSsetPatRefpt(Metafile *mf, int num) +{ + msgWarn("PSsetPatRefpt: Don't support this feature\n"); + return OK; +} + + +/* + * Set the ASF in an output PostScript file. + */ + int +PSsetAsf(Metafile *mf, int num) +{ + msgWarn("PSsetAsf: Don't support this feature\n"); + return OK; +} + + +/* + * Set the line and marker representation in an output PostScript file. + */ + int +PSsetLineMarkRep(Metafile *mf, int num, Gint code, Gint idx, Gint type, double size, Gint colour) +{ + msgWarn("PSsetLineMarkRep: Don't support this feature\n"); + return OK; +} + + +/* + * Set the text representation in an output PostScript file. + */ + int +PSsetTextRep(Metafile *mf, int num, Gint idx, Gtxbundl *rep) +{ + msgWarn("PSsetTextRep: Don't support this feature\n"); + return OK; +#if 0 + if (!rep) + return; +#ifdef PSDEBUG + fprintf(stderr, "PSsetTextRep: index %d font prec (%d %d) exp %.6f sp %.6f color %d\n", + idx, rep->fp.font, rep->fp.prec, + rep->ch_exp, rep->space, rep->colour); +#endif + return OK; +#endif +} + + +/* + * Set the fill representation in an output PostScript file. + */ + int +PSsetFillRep(Metafile *mf, int num, Gint idx, Gflbundl *rep) +{ + msgWarn("PSsetFillRep: Don't support this feature\n"); + return OK; +} + + +/* + * Set the pattern representation in an output PostScript file. + */ + int +PSsetPatRep(Metafile *mf, int num, Gint idx, Gptbundl *rep) +{ + msgWarn("PSsetPatRep: Don't support this feature\n"); + return OK; +} + + +/* + * Set the colour representation in an output PostScript file. + * Also write out gray scale version + */ +#ifndef MAX +#define MAX(a,b) (((a)>(b))?(a):(b)) +#endif + + int +PSsetColRep(Metafile *mf, int num, Gint idx, Gcobundl *rep) +{ + int imf; + mf_cgmo **cgmo = &mf->cgmo; + + for (imf = 0; imf < num; ++imf) { + FILE *fp = cgmo[imf]->fp; + float r = rep->red, g = rep->green, b = rep->blue; + allocate_color(cgmo[imf], idx, r, g, b); + } + + return OK; +} + + +/* + * Set the clipping rectangle in an output PostScript file. + * Note that an unpaired grestore + * is used to restore the initial clipping path before setting up the + * clip; this means that no other unpaired gsaves may be used. + */ + int +PSsetClip(Metafile *mf, int num, Glimit *rect) +{ + int imf; + + mf_cgmo **cgmo = &mf->cgmo; + for (imf = 0; imf < num; ++imf) { + FILE *fp = cgmo[imf]->fp; + + (void) fprintf(fp, "gr gs %f %f %f %f b clip n\n", + rect->xmin, rect->ymin, + rect->xmax, rect->ymax); + } + return OK; +} + + +/* + * Set the viewport limits in an output PostScript file. + */ + int +PSsetLimit(Metafile *mf, int num, Gint code, Glimit *rect) +{ + msgWarn("PSsetLimit: Don't support this feature\n"); + return OK; +} + + +/* + * Rename a segment in an output PostScript file. + */ + int +PSrenameSeg(Metafile *mf, int num, Gint old, Gint new) +{ + msgWarn("PSrenameSeg: Don't support this feature\n"); + return OK; +} + + +/* + * Set the segment transformation in an output PostScript file. + */ + int +PSsetSegTran(Metafile *mf, int num, Gint name, Gfloat (*matrix)[]) +{ + msgWarn("PSsetSegTran: Don't support this feature\n"); + return OK; +} + + +/* + * Set the segment attributes in an output PostScript file. + */ + int +PSsetSegAttr(Metafile *mf, int num, Gint name, Gint code, Gint attr) +{ + msgWarn("PSSetSegAttr: Don't support this feature\n"); + return OK; +} + + +/* + * Set the segment visibility in an output Metafile. + */ + int +PSsetSegVis(Metafile *mf, int num, Gint name, Gsegvis vis) +{ + msgWarn("PSsetSegVis: Don't support this feature\n"); + return OK; +} + + +/* + * Set segment highlighting in an output PostScript file. + */ + int +PSsetSegHilight(Metafile *mf, int num, Gint name, Gseghi hilight) +{ + msgWarn("PSsetSegHiglight: Don't support this feature\n"); + return OK; +} + + +/* + * Set segment priority in an output PostScript file. + */ + int +PSsetSegPri(Metafile *mf, int num, Gint name, double pri) +{ + msgWarn("PSsetSegPri: Don't support this feature\n"); + return OK; +} + + +/* + * Set segment detectability in an output PostScript file. + */ + int +PSsetSegDetect(Metafile *mf, int num, Gint name, Gsegdet det) +{ + msgWarn("PSsetSegDetect: Don't support this feature\n"); + return OK; +} Index: xgks-2.6.1/src/lib/c/ps/headerv4.0.h =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 +++ xgks-2.6.1/src/lib/c/ps/headerv4.0.h 2010-07-14 03:41:25.000000000 +0100 @@ -0,0 +1,156 @@ +"%!PS-Adobe-3.0\n\ +%%DocumentFonts: Times-Roman\n\ +%%Pages: (atend)\n\ +% Joe Sirott University of Washington\n\ +% Modified for Pacific Marine Environmental Lab\n\ +%\n\ +%%EndComments\n\ +/frpagesave save def\n\ +\n\ +% Procedures\n\ +\n\ +/gr {grestore} bind def\n\ +/gs {gsave} bind def\n\ +/sd {setdash} bind def\n\ +/w {setlinewidth} bind def\n\ +/l {doxform lineto} bind def\n\ +/n {newpath} bind def\n\ +/m {doxform moveto} bind def\n\ +/s {scale} bind def\n\ +/c {setlinecap} bind def\n\ +/j {setlinejoin} bind def\n\ +/r {restore} bind def\n\ +/h {showpage} bind def\n\ +/t {stroke} bind def\n\ +/f {eofill} bind def\n\ +/o {ct exch get aload pop setrgbcolor} bind def\n\ +/b { % x1 y1 x2 y2 Box\n\ + localdict begin\n\ + /yto exch def /xto exch def\n\ + /yto1 exch def /xto1 exch def\n\ + n xto yto m xto yto1 l xto1 yto1 l xto1 yto l closepath\n\ + end\n\ +} bind def\n\ +/bd { % x1 y1 x2 y2\n\ + localdict begin % box with x1,y1 user coords, x2,y2 pts\n\ + /yto exch def /xto exch def\n\ + /yto1 exch def /xto1 exch def\n\ + n xto1 yto1 m \n\ + 0 yto rlineto \n\ + xto 0 rlineto \n\ + 0 yto neg rlineto closepath\n\ + end\n\ +} bind def\n\ +/inch {72 mul} bind def\n\ +0.5 inch /margin exch def\n\ +/setwindow {\n\ + /window exch def\n\ +} bind def\n\ +/setvp {\n\ + /vp exch def\n\ +} bind def\n\ +\n\ +/printmatrix {\n\ + aload pop = = = = = =\n\ +} bind def\n\ +\n\ +/doxform { % x y => x' y'\n\ + xform transform\n\ +} bind def\n\ + \n\ +/settransform { % uoff voff => /xform contains matrix\n\ + localdict begin\n\ + /voff exch def\n\ + /uoff exch def\n\ + pagewidth pagelength lt {/psize pagewidth def} {/psize pagelength def} ifelse\n\ + vp 0 get psize mul uoff add margin add /umin exch def\n\ + vp 1 get psize mul voff add margin add /vmin exch def\n\ + vp 2 get psize mul uoff add margin sub /umax exch def\n\ + vp 3 get psize mul voff add margin sub /vmax exch def\n\ + window 0 get /xmin exch def\n\ + window 1 get /ymin exch def\n\ + window 2 get /xmax exch def\n\ + window 3 get /ymax exch def\n\ + umin vmin matrix translate /xform exch def\n\ + umax umin sub xmax xmin sub div\n\ + vmax vmin sub ymax ymin sub div\n\ + matrix scale xform matrix concatmatrix /xform exch def\n\ + xmin neg ymin neg matrix translate xform matrix concatmatrix\n\ + end\n\ + /xform exch def\n\ +} bind def\n\ + \n\ +/pm { % Polymarker output at x,y\n\ + localdict begin\n\ + 1 1 bd fill\n\ + end\n\ +} bind def\n\ +\n\ +/ctext { % Center text horizontally\n\ + dup stringwidth exch 0.5 mul neg 0 rmoveto pop\n\ +} bind def\n\ +\n\ +/rtext { % Right justify text\n\ + dup stringwidth exch neg 0 rmoveto pop\n\ +} bind def\n\ +\n\ +/htext { % Center text vertically.\n\ + localdict begin\n\ + gsave dup\n\ + currentpoint /y0 exch def pop\n\ + false charpath flattenpath pathbbox \n\ + /y2 exch def pop /y1 exch def pop\n\ + y2 y1 add 2 div y0 sub neg 0 exch\n\ + grestore\n\ + rmoveto\n\ + end\n\ +} bind def\n\ +\n\ +/sf { % Scale the font in GKS coordinates\n\ + dup doxform pagelength pagewidth lt {exch} if\n\ + pop /Times-Roman findfont exch scalefont setfont\n\ +} bind def\n\ +\n\ +/center { % Center the plot\n\ + /aspect exch def\n\ + aspect 1.0 gt \n\ + {\n\ + 1 aspect div /xfraction exch def 1 /yfraction exch def\n\ + pagewidth /pagexsize exch def pagelength /pageysize exch def\n\ + }\n\ + {\n\ + 1 /xfraction exch def aspect /yfraction exch def\n\ + pagewidth /pageysize exch def pagelength /pagexsize exch def\n\ + } ifelse\n\ + margin 2 mul /m2 exch def\n\ + pagewidth m2 sub /pagesize exch def\n\ + pagexsize m2 sub pagesize xfraction mul sub 2 div /xoffset exch def\n\ + pageysize m2 sub pagesize yfraction mul sub 2 div /yoffset exch def\n\ + xoffset yoffset settransform\n\ +} bind def\n\ +\n\ +/Landscape { 90 rotate 0 exch translate} bind def\n\ +\n\ +% Variables\n\ +/localdict 64 dict def\n\ +/ct 256 array def\n\ +/nct 256 array def\n\ +/gct 256 array def\n\ +/markersize 1.0 def\n\ +/linewidthscale 1.0 def\n\ +/charexpansion 1.0 def\n\ +/charspacing 0.0 def\n\ +/startmatrix matrix currentmatrix def % Save the current transform matrix\n\ +/pagewidth 8.5 inch def % Width of page in points\n\ +/pagelength 11.0 inch def % Length of page in points\n\ +\n\ +% Initialization routines\n\ +0 c\n\ +1 j\n\ +[0.0 0.0 1.0 1.0] setvp\n\ +[0.0 0.0 1.0 1.0] setwindow\n\ +0 0 settransform\n\ +\n\ +%0.25 0.25 1 inch 1 inch bd stroke\n\ +%0.25 0.25 pm\n\ +%%EndProlog" Index: xgks-2.6.1/src/lib/c/ps/ps.h =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 +++ xgks-2.6.1/src/lib/c/ps/ps.h 2010-07-14 03:41:25.000000000 +0100 @@ -0,0 +1,247 @@ +/* + * Copyright IBM Corporation 1989 + * + * All Rights Reserved + * + * Permission to use, copy, modify, and distribute this software and its + * documentation for any purpose and without fee is hereby granted, + * provided that the above copyright notice appear in all copies and that + * both that copyright notice and this permission notice appear in + * supporting documentation, and that the name of IBM not be + * used in advertising or publicity pertaining to distribution of the + * software without specific, written prior permission. + * + * IBM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING + * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL + * IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR + * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, + * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, + * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS + * SOFTWARE. + * PostScript driver for XGKS metafiles + * Created by Joe Sirott, Pacific Marine Environmental Lab + * $Id: ps.h,v 1.1 2006/09/22 16:34:28 ansley Exp $ + */ + + +#ifndef XGKS_PS_H +#define XGKS_PS_H + + +extern int PSrecSize PROTO(( + Gint type +)); +extern int PSnextItem PROTO(( + Metafile *mf /* Metafile structure */ +)); +extern int PSwriteItem PROTO(( + Metafile **mf, /* Metafile structures */ + int num, /* Number of Metafiles */ + Gint type, /* item type */ + Gint length, /* item length */ + Gchar *data /* item data-record */ +)); +extern int PSreadItem PROTO(( + Metafile *mf, /* Metafile structure */ + char *record /* input data-record */ +)); +extern int PSmiOpen PROTO(( + Metafile *mf /* Metafile structure */ +)); +extern int PSmoOpen PROTO(( + WS_STATE_PTR ws +)); +extern int PSmoClose PROTO(( + Metafile *mf +)); +extern int PSclear PROTO(( + Metafile *mf, + int num, + Gclrflag flag +)); +extern int PSredrawAllSeg PROTO(( + Metafile **mf, + int num +)); +extern int PSupdate PROTO(( + Metafile **mf, + int num, + Gregen regenflag +)); +extern int PSdefer PROTO(( + Metafile **mf, + int num, + Gdefmode defer_mode, + Girgmode regen_mode +)); +extern int PSmessage PROTO(( + Metafile **mf, + int num, + Gchar *string +)); +extern int PSoutputGraphic PROTO(( + Metafile *mf, + int num, + Gint code, + Gint num_pt, + Gpoint *pos +)); +extern int PStext PROTO(( + Metafile *mf, + int num, + Gpoint *at, + Gchar *string +)); +extern int PScellArray PROTO(( + Metafile *mf, + int num, + Gpoint *ll, + Gpoint *ur, + Gpoint *lr, + Gint row, + Gint *colour, + Gipoint *dim +)); +extern int PSsetGraphSize PROTO(( + Metafile *mf, + int num, + Gint code, + double size +)); +extern int PScloseSeg PROTO(( + Metafile *mf, + int num +)); +extern int PSsetGraphAttr PROTO(( + Metafile *mf, + int num, + Gint code, + Gint attr +)); +extern int PSsetTextFP PROTO(( + Metafile *mf, + int num, + Gtxfp *txfp +)); +extern int PSsetCharUp PROTO(( + Metafile *mf, + int num, + Gpoint *up, + Gpoint *base +)); +extern int PSsetTextPath PROTO(( + Metafile *mf, + int num, + Gtxpath path +)); +extern int PSsetTextAlign PROTO(( + Metafile *mf, + int num, + Gtxalign *align +)); +extern int PSsetFillStyle PROTO(( + Metafile *mf, + int num, + Gflinter style +)); +extern int PSsetPatSize PROTO(( + Metafile *mf, + int num +)); +extern int PSsetPatRefpt PROTO(( + Metafile *mf, + int num +)); +extern int PSsetAsf PROTO(( + Metafile *mf, + int num +)); +extern int PSsetLineMarkRep PROTO(( + Metafile *mf, + int num, + Gint code, + Gint idx, + Gint type, + double size, + Gint colour +)); +extern int PSsetTextRep PROTO(( + Metafile *mf, + int num, + Gint idx, + Gtxbundl *rep +)); +extern int PSsetFillRep PROTO(( + Metafile *mf, + int num, + Gint idx, + Gflbundl *rep +)); +extern int PSsetPatRep PROTO(( + Metafile *mf, + int num, + Gint idx, + Gptbundl *rep +)); +extern int PSsetColRep PROTO(( + Metafile *mf, + int num, + Gint idx, + Gcobundl *rep +)); +extern int PSsetClip PROTO(( + Metafile *mf, + int num, + Glimit *rect +)); +extern int PSsetLimit PROTO(( + Metafile *mf, + int num, + Gint code, + Glimit *rect +)); +extern int PSrenameSeg PROTO(( + Metafile *mf, + int num, + Gint old, + Gint new +)); +extern int PSsetSegTran PROTO(( + Metafile *mf, + int num, + Gint name, + Gfloat matrix[2][3] +)); +extern int PSsetSegAttr PROTO(( + Metafile *mf, + int num, + Gint name, + Gint code, + Gint attr +)); +extern int PSsetSegVis PROTO(( + Metafile *mf, + int num, + Gint name, + Gsegvis vis +)); +extern int PSsetSegHilight PROTO(( + Metafile *mf, + int num, + Gint name, + Gseghi hilight +)); +extern int PSsetSegPri PROTO(( + Metafile *mf, + int num, + Gint name, + double pri +)); +extern int PSsetSegDetect PROTO(( + Metafile *mf, + int num, + Gint name, + Gsegdet det +)); + +#endif /* XGKS_PS_H not defined */ Index: xgks-2.6.1/src/lib/c/Makefile.in =================================================================== --- xgks-2.6.1.orig/src/lib/c/Makefile.in 2010-07-14 03:41:25.000000000 +0100 +++ xgks-2.6.1/src/lib/c/Makefile.in 2010-07-14 03:43:15.000000000 +0100 @@ -5,8 +5,7 @@ LIBRARY = xgks FONTDBDIR = "$(LIBDIR)/xgksfonts" -CPPFLAGS = -I../../port/misc -DFONTDBDIR='$(FONTDBDIR)' \ - @CPP_X11@ @CPPFLAGS@ +CPPFLAGS = -I../../port/misc -DFONTDBDIR='$(FONTDBDIR)' @CPP_X11@ @CPPFLAGS@ CFLAGS = @CFLAGS@ HEADERS = xgks.h @@ -23,7 +22,7 @@ message.c metafile.c mkerrmsg.c open_gks.c open_ws.c pick.c \ polylines.c polymarkers.c prmgr.c segments.c string.c \ stroke.c text.c transforms.c umalloc.c update.c \ - valuator.c + valuator.c ps.c gif.c gd.c gdadds.c LIBOBJS = act_ws.o aspect_flags.o cellarray.o choice.o colours.o \ deferral_ws.o escape.o event.o externinit.o fillarea.o \ gdp.o gerhnd.o ggdp.o gks_error.o input.o inqWDT.o \ @@ -32,8 +31,8 @@ message.o metafile.o open_gks.o open_ws.o pick.o \ polylines.o polymarkers.o prmgr.o segments.o string.o \ stroke.o text.o transforms.o umalloc.o update.o \ - valuator.o -SUBDIRS = cgm gksm x + valuator.o ps.o gif.o gd.o gdadds.o +SUBDIRS = cgm gksm x ps gif SUBDIR_TARGETS = cgm/all cgm/clean cgm/distclean \ gksm/all gksm/clean gksm/distclean \ x/all x/clean x/distclean Index: xgks-2.6.1/src/lib/c/x/xopws.c =================================================================== --- xgks-2.6.1.orig/src/lib/c/x/xopws.c 2010-07-14 03:17:10.000000000 +0100 +++ xgks-2.6.1/src/lib/c/x/xopws.c 2010-07-14 03:41:25.000000000 +0100 @@ -72,6 +72,25 @@ static void CreateGC(); static void UpdateOpenWSTable(); +/* ******** *sh* 16-sep-94 code added for external control of window mapping */ +/* further mods inside xXgksOpenWs */ + +static int map_that_window=1; /* static external */ + +/* +use WindowMapping(0) for invisible windows; WindowMapping(1) for mapped ones. +*/ + +void WindowMapping( map_it ) +int map_it; +{ + map_that_window = map_it; + return; +} + +/* ******** end of 16-sep-94 code */ + + /* * The following may be changed by applications programs to the name of * the application. Index: xgks-2.6.1/src/lib/c/gdadds.c =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 +++ xgks-2.6.1/src/lib/c/gdadds.c 2010-07-14 03:41:25.000000000 +0100 @@ -0,0 +1,351 @@ +/* +* +* This software was developed by the Thermal Modeling and Analysis +* Project(TMAP) of the National Oceanographic and Atmospheric +* Administration's (NOAA) Pacific Marine Environmental Lab(PMEL), +* hereafter referred to as NOAA/PMEL/TMAP. +* +* Access and use of this software shall impose the following +* obligations and understandings on the user. The user is granted the +* right, without any fee or cost, to use, copy, modify, alter, enhance +* and distribute this software, and any derivative works thereof, and +* its supporting documentation for any purpose whatsoever, provided +* that this entire notice appears in all copies of the software, +* derivative works and supporting documentation. Further, the user +* agrees to credit NOAA/PMEL/TMAP in any publications that result from +* the use of this software or in any product that includes this +* software. The names TMAP, NOAA and/or PMEL, however, may not be used +* in any advertising or publicity to endorse or promote any products +* or commercial entity unless specific written permission is obtained +* from NOAA/PMEL/TMAP. The user also understands that NOAA/PMEL/TMAP +* is not obligated to provide the user with any support, consulting, +* training or assistance of any kind with regard to the use, operation +* and performance of this software nor to provide the user with any +* updates, revisions, new versions or "bug fixes". +* +* THIS SOFTWARE IS PROVIDED BY NOAA/PMEL/TMAP "AS IS" AND ANY EXPRESS +* OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +* ARE DISCLAIMED. IN NO EVENT SHALL NOAA/PMEL/TMAP BE LIABLE FOR ANY SPECIAL, +* INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER +* RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF +* CONTRACT, NEGLIGENCE OR OTHER TORTUOUS ACTION, ARISING OUT OF OR IN +* CONNECTION WITH THE ACCESS, USE OR PERFORMANCE OF THIS SOFTWARE. +* +*/ + + + +/* Extensions to GD libaray */ +/* J. Sirott PMEL 1997 */ + + +#define _GNU_SOURCE +#include +#include +#include +#include +#include +#include +#include +#include "gif/gd.h" +#include "gif/gdadds.h" +/* absolute value of a */ +#define ABS(a) (((a)<0) ? -(a) : (a)) +/* take binary sign of a, either -1, or 1 if >= 0 */ +#define SGN(a) (((a)<0) ? -1 : 1) + + +static void calc_points(int x1, int y1, int x2, int y2, int width, + gdPointPtr pts) +{ + double dx = x2 - x1; + double dy = y2 - y1; + double hypot = sqrt(dx*dx +dy*dy); + double wsin2t = 0; + double wcos2t = 0; + double sinFudge = 0., cosFudge = 0.; + if (hypot != 0){ + wsin2t = width * dy/hypot/2.; + wcos2t = width * dx/hypot/2.; +/* sinFudge = 0.5 * SGN(wsin2t); */ +/* cosFudge = 0.5 * SGN(wcos2t); */ + } + pts[0].x = x1 - wsin2t - sinFudge;; + pts[0].y = y1 + wcos2t + cosFudge; + pts[1].x = x1 + wsin2t + sinFudge; + pts[1].y = y1 - wcos2t - cosFudge; + pts[2].x = x2 + wsin2t + sinFudge; + pts[2].y = y2 - wcos2t - cosFudge; + pts[3].x = x2 - wsin2t - sinFudge; + pts[3].y = y2 + wcos2t + cosFudge; +} + +typedef struct _StackItem{ + void *next; + void *data; +} StackItem; + +typedef struct _Stack{ + StackItem *item; +} Stack; + +static void init(Stack *s) +{ + s->item = 0; +} + +static void push(Stack *s, void *data) +{ + StackItem *ns = (StackItem *)umalloc(sizeof(StackItem)); + ns->next = s->item; + ns->data = data; + s->item = ns; +} + +static void *pop(Stack *s) +{ + StackItem *oitem = s->item; + void *data = oitem ? oitem->data : 0; + if (oitem){ + s->item = oitem->next; + free(oitem); + } + return data; +} + +/* + * Digital Line Drawing + * by Paul Heckbert + * from "Graphics Gems", Academic Press, 1990 + */ + +/* + * digline: draw digital line from (x1,y1) to (x2,y2), + * calling a user-supplied procedure at each pixel. + * Does no clipping. Uses Bresenham's algorithm. + * + * Paul Heckbert 3 Sep 85 + */ + +static void digline(int x1, int y1, int x2, int y2, + void (*dotproc)(int, int, int, int, void *), void *cd) +{ + int d, x, y, ax, ay, sx, sy, dx, dy; + int lastdx = 0, lastdy = 0; + + dx = x2-x1; ax = ABS(dx)<<1; sx = SGN(dx); + dy = y2-y1; ay = ABS(dy)<<1; sy = SGN(dy); + + x = x1; + y = y1; + if (ax>ay) { /* x dominant */ + d = ay-(ax>>1); + for (;;) { + (*dotproc)(x, y, lastdx, lastdy, cd); + if (x==x2) return; + if (d>=0) { + y += sy; + d -= ax; + } + x += sx; + d += ay; + lastdx = sx; lastdy = sy; + } + } + else { /* y dominant */ + d = ax-(ay>>1); + for (;;) { + (*dotproc)(x, y, lastdx, lastdy, cd); + if (y==y2) return; + if (d>=0) { + x += sx; + d -= ay; + } + y += sy; + d += ax; + lastdx = sx; lastdy = sy; + } + } +} + +typedef struct binfo { + Stack *s; +} Binfo; + +static void storeBoundaries(int x, int y, int dx, int dy, void *cd) +{ + Binfo *info = (Binfo *)cd; + gdPoint *p; + if (ABS(dx)== 1 && ABS(dy) == 1){ + int mult = dx * dy; + p = (gdPoint *)umalloc(sizeof(gdPoint)); + p->x = SGN(mult) < 0 ? -dx : 0; + p->y = SGN(mult) > 0 ? -dy : 0; + p->x += x; p->y += y; + push(info->s, p); + } + p = (gdPoint *)umalloc(sizeof(gdPoint)); + p->x = x; p->y = y; + push(info->s, p); +} + +/* Fill a rotatated box by using Bresenham's algorithm to generate */ +/* the left and right sides, and then drawing lines between the sides. */ +/* Used for generating dashed/dotted lines */ + +static void gdImageRotatedBox(gdImagePtr im, gdPointPtr recpts, + int num, int color) +{ + Stack left, right, tmp; + Binfo ileft, iright; + gdPointPtr first, second; + int styleStartPos = im->stylePos; + + init(&left); init(&right); init(&tmp); + ileft.s = &left; iright.s = &right; + digline(recpts[1].x, recpts[1].y, + recpts->x, recpts->y, storeBoundaries, &ileft); + digline(recpts[3].x, recpts[3].y, recpts[2].x, recpts[2].y, + storeBoundaries, &iright); + + /* Reverse order of right stack */ + while((first = (gdPointPtr)pop(iright.s))){ + push(&tmp, first); + } + + while((first = (gdPointPtr)pop(ileft.s))){ + im->stylePos = styleStartPos; + second = (gdPointPtr)pop(&tmp); + assert(second); + gdImageLine(im, first->x, first->y, second->x, second->y, color); + free(first); + free(second); + } + +} + + +/* Draw bevel to connect wide lines */ +static void draw_bevel(gdImagePtr im, gdPointPtr recpts, + gdPointPtr last, int bcolor) +{ + gdPoint bpt[4]; + if (!last) + return; + bpt[0].x = last[2].x; + bpt[0].y = last[2].y; + bpt[1].x = recpts[1].x; + bpt[1].y = recpts[1].y; + bpt[2].x = last[3].x; + bpt[2].y = last[3].y; + bpt[3].x = recpts[0].x; + bpt[3].y = recpts[0].y; + gdImageFilledPolygon(im, bpt, 4, bcolor); +#if 0 + { + int i; + for (i=0; i < 4; ++i){ + fprintf(stderr, "(%d,%d)", bpt[i].x, bpt[i].y); + } + fprintf(stderr, "\n"); + } +#endif +} + +/* Draw wide lines. Lines are joined with a bevel */ + +void gdImageWideLines(gdImagePtr im, gdPointPtr pts, int num, + int color, int width) +{ + int i; + Stack s1,s2; + gdPointPtr recpts = 0; + gdPointPtr first = pts, second = first + 1; + gdPoint *last = 0; + + if (width < 1) + width = 1; + + if (width == 1){ + for (i=1; i < num; ++i,++first,++second){ + gdImageLine(im, first->x, first->y, second->x, second->y, color); + } + } else { + init(&s1); init(&s2); + for (i=1; i < num; ++i,++first,++second){ + recpts = (gdPointPtr)umalloc(sizeof(gdPoint) * 4); + calc_points(first->x, first->y, second->x, second->y, width, recpts); + push(&s1, recpts); + } + + while((recpts = (gdPointPtr)pop(&s1))){ + push(&s2, recpts); + } + + while((recpts = (gdPointPtr)pop(&s2))){ + + if (color == gdStyled){ + if (im->style[im->stylePos] != gdTransparent){ + draw_bevel(im, recpts, last, im->style[0]); + } + /* Reset style pointer to beginning of the */ + /* current color to avoid slivers */ + if (last){ + int currStyle = im->style[im->stylePos]; + int count = 0; + for (; count < im->styleLength; ++count){ + --im->stylePos; + im->stylePos %= im->styleLength; + if (im->style[im->stylePos] != currStyle) + break; + } + if (count < im->styleLength){ + ++im->stylePos; + im->stylePos %= im->styleLength; + } + } + + gdImageRotatedBox(im, recpts, 4, color); + } else { + draw_bevel(im, recpts, last, color); + gdImageFilledPolygon(im, recpts, 4, color); + } + free(last); + last = recpts; + } + if (last) + free(last); + } +} + +/* + * Block fill an entire image + */ + +void gdImageBlockFill(gdImagePtr image, int color) +{ + int i,j; + for (i=0; i < image->sx; ++i){ + memset(image->pixels[i], color, image->sy); + } +} + +/* Set clip region */ +void gdSetClip(gdImagePtr image, int x1, int y1, int x2, int y2) +{ + if (x2 < x1){ + int tmp = x1; + x1 = x2; + x2 = tmp; + } + if (y2 < y1){ + int tmp = y1; + y1 = y2; + y2 = tmp; + } + assert(x2 > x1); + assert(y2 > y1); + image->xcmin = x1; image->xcmax = x2; + image->ycmin = y1; image->ycmax = y2; +} Index: xgks-2.6.1/src/port/misc/regex.c =================================================================== --- xgks-2.6.1.orig/src/port/misc/regex.c 2010-07-14 03:17:10.000000000 +0100 +++ /dev/null 1970-01-01 00:00:00.000000000 +0000 @@ -1,237 +0,0 @@ -/* - * $Id: regex.c,v 1.1 2000/08/07 23:15:04 emmerson Exp $ - * - * This module implements the POSIX.2 regular expression API (yes, that's - * numeral two) via the LDM regular expression API and library. - */ - -#include "udposix.h" -#include -#include -#include -#include - -#include "regex.h" /* LDM/POSIX.2 interface */ - -/* - * Allow us to get at the LDM's regular expression library. - */ -#undef regcomp -#undef regexec -#undef regerror -#undef regfree - -#include "regexp.h" /* LDM's regular expression API */ - -typedef struct errentry { - int errcode; - const char *msg; -} Errentry; - -static Errentry errtable[] = { - {REG_SUCCESS, "success"}, - {REG_NOMATCH, "no match"}, - {REG_BADPAT, "bad regular expression"}, - {REG_ESPACE, "malloc() failed"}, - {REG_EINVAL, "invalid argument"}, - {0, NULL} -}; - - -/* - * Return a lower-case version of a string. - */ - static int -makelower(string, lowstring) - const char *string; - char **lowstring; /* Lower-case version of `string' in - * allocated memory. Should be free(3)ed - * by caller */ -{ - int status; - - if (NULL == (*lowstring = malloc(strlen(string)+1))) { - status = REG_ESPACE; - } else { - register char *cp; - - (void) strcpy(*lowstring, string); - for (cp = *lowstring; *cp; ++cp) - if (isupper(*cp)) - *cp = tolower(*cp); - - status = REG_SUCCESS; - } - - return status; -} - - -/* - * Compile a regular expression (internal use only). - */ - static int -compile(preg, pattern, cflags) - regex_t *preg; - const char *pattern; - int cflags; -{ - int status; - - preg->regexp = regcomp((char*)pattern); - if (NULL == preg->regexp) { - status = REG_BADPAT; - } else { - preg->cflags = cflags; - if (0 == cflags & REG_NOSUB || 0 == cflags & REG_EXTENDED) { - status = REG_EINVAL; - } else { - status = REG_SUCCESS; - } - } - - return status; -} - - -/* - * Compile a regular expression. - */ - int -ldm_regcomp(preg, pattern, cflags) - regex_t *preg; - const char *pattern; - int cflags; -{ - int status; - - if (NULL == preg || NULL == pattern) { - status = REG_EINVAL; - } else { - if (cflags & REG_ICASE) { - char *lowstring; - - if (0 == (status = makelower(pattern, &lowstring))) { - status = compile(preg, lowstring, cflags); - (void) free((voidp)lowstring); - } - } else { - status = compile(preg, pattern, cflags); - } - } - - return status; -} - - -/* - * Execute a regular expression program (internal use only). - */ - static int -execute(preg, string, nmatch, pmatch) - const regex_t *preg; - const char *string; - int nmatch; - regmatch_t *pmatch; -{ - int status; - - if (!regexec(preg->regexp, (char*)string)) { - status = REG_NOMATCH; - } else { - if (0 == nmatch || 0 == preg->cflags & REG_NOSUB) { - status = REG_SUCCESS; - } else { - if (NULL == pmatch) { - status = REG_EINVAL; - } else { - int i; - - for (i = 0; i < NSUBEXP && preg->regexp->startp[i]; ++i) { - pmatch[i].rm_so = preg->regexp->startp[i] - string; - pmatch[i].rm_eo = preg->regexp->endp[i] - string; - } - - status = REG_SUCCESS; - } - } - } - - return status; -} - - -/* - * Execute a regular expression program. - */ - int -ldm_regexec(preg, string, nmatch, pmatch, eflags) - const regex_t *preg; - const char *string; - size_t nmatch; - regmatch_t *pmatch; - int eflags; -{ - int status; - - if (NULL == preg || NULL == string || eflags) { - status = REG_EINVAL; - } else { - if (preg->cflags & REG_ICASE) { - char *lowstring; - - if (0 == (status = makelower(string, &lowstring))) { - status = execute(preg, lowstring, nmatch, pmatch); - (void) free((voidp)lowstring); - } - } else { - status = execute(preg, string, nmatch, pmatch); - } - } - - return status; -} - - -/* - * Return an error string associated with an error number. - */ - size_t -ldm_regerror(errcode, preg, errbuf, errbuf_size) - int errcode; - /*ARGSUSED*/ - const regex_t *preg; - char *errbuf; - size_t errbuf_size; -{ - int status; - Errentry *entry; - static Errentry invalid_errcode = {0, "invalid errcode"}; - - for (entry = errtable; NULL != entry->msg; ++entry) - if (errcode == entry->errcode) - break; - - if (NULL == entry->msg) - entry = &invalid_errcode; - - if (0 != errbuf_size) { - (void) strncpy(errbuf, entry->msg, errbuf_size); - errbuf[errbuf_size-1] = 0; - } - - status = strlen(entry->msg) + 1; - - return status; -} - - -/* - * Free memory associated with a regular expression program. - */ - void -ldm_regfree(preg) - regex_t *preg; -{ - (void) free((voidp)preg->regexp); -} Index: xgks-2.6.1/src/port/misc/regex.h =================================================================== --- xgks-2.6.1.orig/src/port/misc/regex.h 2010-07-14 03:17:10.000000000 +0100 +++ /dev/null 1970-01-01 00:00:00.000000000 +0000 @@ -1,86 +0,0 @@ -/* - * $Id: regex.h,v 1.1 2000/08/07 23:15:04 emmerson Exp $ - * - * This file supports the POSIX.2 (yes, that's numeral two) regular - * expression API. It does this via the LDM's regular expression API - * unless we're on an AIX platform, in which case we use the native POSIX.2 - * API. - */ - - -#ifndef UD_REGEX_H -#define UD_REGEX_H - - -#include "udposix.h" - - -#if defined(_AIX) - -# include "///usr/include/regex.h" - -#else - -# include "stddef.h" -# include "regexp.h" /* LDM's regular expression API */ - - typedef struct regex { - regexp *regexp; - size_t re_nsub; - int cflags; - } regex_t; - - typedef ptrdiff_t regoff_t; - - typedef struct regmatch { - regoff_t rm_so; - regoff_t rm_eo; - } regmatch_t; - - - UD_EXTERN_FUNC(int ldm_regcomp, ( - regex_t *preg, - const char *pattern, - int cflags /* REG_NOSUB | REG_ICASE */ - )); -# define REG_EXTENDED 1 /* use extended regular expressions */ -# define REG_ICASE 2 /* ignore case */ -# define REG_NOSUB 4 /* ignore subexpressions */ - UD_EXTERN_FUNC(int ldm_regexec, ( - const regex_t *preg, - const char *string, - size_t nmatch, - regmatch_t pmatch[], - int eflags - )); - UD_EXTERN_FUNC(size_t ldm_regerror, ( - int errcode, - const regex_t *preg, - char *errbuf, - size_t errbuf_size - )); - UD_EXTERN_FUNC(void ldm_regfree, ( - regex_t *preg - )); - - /* - * Error codes for regcomp() and regexec(): - */ -# define REG_SUCCESS 0 -# define REG_NOMATCH 1 -# define REG_BADPAT 3 -# define REG_ESPACE 4 -# define REG_EINVAL 5 - - /* - * Define the POSIX.2 functions to our functions. - */ -# define regcomp ldm_regcomp -# define regexec ldm_regexec -# define regerror ldm_regerror -# define regfree ldm_regfree - -#endif /* not AIX */ - - -#endif /* header-file lockout */ debian/patches/manpages.patch0000644000000000000000000000617012165740737013451 0ustar Author: Alastair McKinstry Description: Fix nroff errors Last-Updated: 2013-05-21 Forwarded: no Index: xgks-2.6.1+dfsg.1/src/port/misc/getudprefix.3 =================================================================== --- xgks-2.6.1+dfsg.1.orig/src/port/misc/getudprefix.3 2013-05-20 14:08:08.000000000 +0100 +++ xgks-2.6.1+dfsg.1/src/port/misc/getudprefix.3 2013-05-20 14:08:08.000000000 +0100 @@ -1,4 +1,4 @@ -." $Id: getudprefix.3,v 1.1 2000/08/07 23:15:03 emmerson Exp $ +.\" $Id: getudprefix.3,v 1.1 2000/08/07 23:15:03 emmerson Exp $ .TH GETUDPREFIX 3 "$Date: 2000/08/07 23:15:03 $" "Printed: \n(yr.\n(mo.\n(dy" "UNIDATA LIBRARY FUNCTIONS" .SH NAME getudprefix \- return installation prefix of Unidata software Index: xgks-2.6.1+dfsg.1/src/port/misc/strbuf.3 =================================================================== --- xgks-2.6.1+dfsg.1.orig/src/port/misc/strbuf.3 2013-05-20 14:08:08.000000000 +0100 +++ xgks-2.6.1+dfsg.1/src/port/misc/strbuf.3 2013-05-20 14:08:56.000000000 +0100 @@ -1,5 +1,5 @@ -... $Id: strbuf.3,v 1.1 2000/08/07 23:15:04 emmerson Exp $ -... +.\"$Id: strbuf.3,v 1.1 2000/08/07 23:15:04 emmerson Exp $ +.\" .TH STRBUF 3 "$Date: 2000/08/07 23:15:04 $" "Printed: \n(yr-\n(mo-\n(dy" "UNIDATA LIBRARY FUNCTIONS" .SH NAME strbuf, sbnew, sbcpy, sbncpy, sbcat, sbncat, sbstr, sblen, sbmax, sbgrow, sbfree \- Unidata string-buffer Index: xgks-2.6.1+dfsg.1/src/port/misc/uderrmsg.3 =================================================================== --- xgks-2.6.1+dfsg.1.orig/src/port/misc/uderrmsg.3 2013-05-20 14:08:08.000000000 +0100 +++ xgks-2.6.1+dfsg.1/src/port/misc/uderrmsg.3 2013-05-20 14:08:08.000000000 +0100 @@ -1,7 +1,7 @@ -... $Id: uderrmsg.3,v 1.1 2000/08/07 23:15:04 emmerson Exp $ -... -... $__Header$ -... +.\"$Id: uderrmsg.3,v 1.1 2000/08/07 23:15:04 emmerson Exp $ +.\" +.\" $__Header$ +.\" .TH UDERRMSG 3 "20 September 1990" "Printed: \n(yr.\n(mo.\n(dy" "UNIDATA LIBRARY FUNCTIONS" .SH NAME uderrmsg, uderrmode, uderrname, uderror, udadvise, udtime_stamp \- Unidata error-messaging package Index: xgks-2.6.1+dfsg.1/src/port/misc/getuduser.3 =================================================================== --- xgks-2.6.1+dfsg.1.orig/src/port/misc/getuduser.3 2013-05-20 14:08:08.000000000 +0100 +++ xgks-2.6.1+dfsg.1/src/port/misc/getuduser.3 2013-05-20 14:08:08.000000000 +0100 @@ -1,4 +1,4 @@ -." $Id: getuduser.3,v 1.1 2000/08/07 23:15:03 emmerson Exp $ +.\" $Id: getuduser.3,v 1.1 2000/08/07 23:15:03 emmerson Exp $ .TH GETUDENT 3 "$Date: 2000/08/07 23:15:03 $" "Printed: \n(yr.\n(mo.\n(dy" "UNIDATA LIBRARY FUNCTIONS" .SH NAME getuduser \- return user database entry of Unidata user Index: xgks-2.6.1+dfsg.1/src/doc/xgks.3src1 =================================================================== --- xgks-2.6.1+dfsg.1.orig/src/doc/xgks.3src1 2013-05-20 14:08:08.000000000 +0100 +++ xgks-2.6.1+dfsg.1/src/doc/xgks.3src1 2013-05-20 14:08:08.000000000 +0100 @@ -1,4 +1,4 @@ -''' $Id: xgks.3src1,v 2.5.4.1 1993/03/10 19:43:34 steve Exp $ +.\" $Id: xgks.3src1,v 2.5.4.1 1993/03/10 19:43:34 steve Exp $ .TH XGKS 3 "23 July 1991" "XGKS Version 2" .SH NAME XGKS - A GKS library for the X Window System debian/patches/destdir.patch0000644000000000000000000001326312165740737013315 0ustar Author: Alastair McKinstry Description: Add $(DESTDIR) variable support for proper distribution building. Forwarded: no Last-Updated: 2010-07-03 Index: xgks-2.6.1/src/port/master.mk.in =================================================================== --- xgks-2.6.1.orig/src/port/master.mk.in 2010-07-03 15:13:11.000000000 +0100 +++ xgks-2.6.1/src/port/master.mk.in 2010-07-03 15:34:16.000000000 +0100 @@ -197,7 +197,7 @@ installed_library: FORCE @$(MAKE) $(MFLAGS) \ - LIBDIR=$(LIBDIR) LIBFILE=$(LIB_A) \ + LIBDIR=$(DESTDIR)$(LIBDIR) LIBFILE=$(LIB_A) \ installed_libfile # The following target decouples the previous targets from the actual rule; @@ -288,7 +288,7 @@ binfiles="$(BINFILES)"; \ for binfile in $$binfiles; do \ $(MAKE) $(MFLAGS) \ - BINDIR=$(BINDIR) BINFILE=$$binfile \ + BINDIR=$(DESTDIR)$(BINDIR) BINFILE=$$binfile \ installed_binfile || exit 1; \ done; \ else \ @@ -333,7 +333,7 @@ headers="$(HEADERS)"; \ for header in $$headers; do \ $(MAKE) $(MFLAGS) \ - INCDIR=$(INCDIR) HEADER=$$header \ + INCDIR=$(DESTDIR)$(INCDIR) HEADER=$$header \ installed_header || exit 1; \ done; \ else \ @@ -387,7 +387,7 @@ ############################################################################ # Manual Pages: ############################################################################ -MANDIR = $(prefix)/man +MANDIR = $(DESTDIR)$(prefix)/man MANUAL = dummy-manual # to slience GNU make WHATIS = @WHATIS@ # The following macro should be empty on systems that don't Index: xgks-2.6.1/src/port/misc/Makefile.in =================================================================== --- xgks-2.6.1.orig/src/port/misc/Makefile.in 2010-07-03 15:13:04.000000000 +0100 +++ xgks-2.6.1/src/port/misc/Makefile.in 2010-07-03 15:13:11.000000000 +0100 @@ -34,9 +34,9 @@ # different modules. # install: $(LIBOBJS) - $(MAKE) $(MFLAGS) $(LIBDIR) LIBDIR=$(LIBDIR) - $(AR) rcuv $(LIBDIR)/libudport.a $(LIBOBJS) - $(RANLIB) $(LIBDIR)/libudport.a + $(MAKE) $(MFLAGS) $(LIBDIR) LIBDIR=$(DESTDIR)$(LIBDIR) + $(AR) rcuv $(DESTDIR)$(LIBDIR)/libudport.a $(LIBOBJS) + $(RANLIB) $(DESTDIR)$(LIBDIR)/libudport.a clean: default_clean rm -f $(made_headers) config Index: xgks-2.6.1/src/port/fortc/Makefile.in =================================================================== --- xgks-2.6.1.orig/src/port/fortc/Makefile.in 2010-07-03 15:13:04.000000000 +0100 +++ xgks-2.6.1/src/port/fortc/Makefile.in 2010-07-03 15:13:11.000000000 +0100 @@ -44,4 +44,4 @@ # is defined. install: installed_binfiles installed_manuals $(LIBDIR) - @$(MAKE) $(MFLAGS) LIBDIR=$(LIBDIR)/fortc installed_libfiles + @$(MAKE) $(MFLAGS) LIBDIR=$(DESTDIR)$(LIBDIR)/fortc installed_libfiles Index: xgks-2.6.1/src/fontdb/Makefile.in =================================================================== --- xgks-2.6.1.orig/src/fontdb/Makefile.in 2010-07-03 15:13:04.000000000 +0100 +++ xgks-2.6.1/src/fontdb/Makefile.in 2010-07-03 15:13:11.000000000 +0100 @@ -31,16 +31,16 @@ all:: $(PROGRAM) $(FONTS) $(LINKS) -install:: $(FONTDBDIR) \ - $(FONTDBDIR)/1 \ - $(FONTDBDIR)/2 \ - $(FONTDBDIR)/3 \ - $(FONTDBDIR)/4 \ - $(FONTDBDIR)/5 \ - $(FONTDBDIR)/6 \ - $(FONTDBDIR)/7 \ - $(FONTDBDIR)/8 \ - $(FONTDBDIR)/9 +install:: $(DESTDIR)$(FONTDBDIR) \ + $(DESTDIR)$(FONTDBDIR)/1 \ + $(DESTDIR)$(FONTDBDIR)/2 \ + $(DESTDIR)$(FONTDBDIR)/3 \ + $(DESTDIR)$(FONTDBDIR)/4 \ + $(DESTDIR)$(FONTDBDIR)/5 \ + $(DESTDIR)$(FONTDBDIR)/6 \ + $(DESTDIR)$(FONTDBDIR)/7 \ + $(DESTDIR)$(FONTDBDIR)/8 \ + $(DESTDIR)$(FONTDBDIR)/9 1: r.gksfont rm -f $@ @@ -70,58 +70,58 @@ rm -f $@ ln $? $@ -$(FONTDBDIR): $(LIBDIR) +$(DESTDIR)$(FONTDBDIR): $(LIBDIR) if test -d $@; then \ : true; \ else \ mkdir $@; \ fi -$(FONTDBDIR)/1: $(FONTDBDIR)/r.gksfont +$(DESTDIR)$(FONTDBDIR)/1: $(DESTDIR)$(FONTDBDIR)/r.gksfont rm -f $@ ln $? $@ -$(FONTDBDIR)/2: $(FONTDBDIR)/R.gksfont +$(DESTDIR)$(FONTDBDIR)/2: $(DESTDIR)$(FONTDBDIR)/R.gksfont rm -f $@ ln $? $@ -$(FONTDBDIR)/3: $(FONTDBDIR)/b.gksfont +$(DESTDIR)$(FONTDBDIR)/3: $(DESTDIR)$(FONTDBDIR)/b.gksfont rm -f $@ ln $? $@ -$(FONTDBDIR)/4: $(FONTDBDIR)/B.gksfont +$(DESTDIR)$(FONTDBDIR)/4: $(DESTDIR)$(FONTDBDIR)/B.gksfont rm -f $@ ln $? $@ -$(FONTDBDIR)/5: $(FONTDBDIR)/i.gksfont +$(DESTDIR)$(FONTDBDIR)/5: $(DESTDIR)$(FONTDBDIR)/i.gksfont rm -f $@ ln $? $@ -$(FONTDBDIR)/6: $(FONTDBDIR)/I.gksfont +$(DESTDIR)$(FONTDBDIR)/6: $(DESTDIR)$(FONTDBDIR)/I.gksfont rm -f $@ ln $? $@ -$(FONTDBDIR)/7: $(FONTDBDIR)/sc.gksfont +$(DESTDIR)$(FONTDBDIR)/7: $(DESTDIR)$(FONTDBDIR)/sc.gksfont rm -f $@ ln $? $@ -$(FONTDBDIR)/8: $(FONTDBDIR)/SC.gksfont +$(DESTDIR)$(FONTDBDIR)/8: $(DESTDIR)$(FONTDBDIR)/SC.gksfont rm -f $@ ln $? $@ -$(FONTDBDIR)/9: $(FONTDBDIR)/G.gksfont +$(DESTDIR)$(FONTDBDIR)/9: $(DESTDIR)$(FONTDBDIR)/G.gksfont rm -f $@ ln $? $@ -$(FONTDBDIR)/r.gksfont: r.gksfont +$(DESTDIR)$(FONTDBDIR)/r.gksfont: r.gksfont cp $? $@ -$(FONTDBDIR)/R.gksfont: R.gksfont +$(DESTDIR)$(FONTDBDIR)/R.gksfont: R.gksfont cp $? $@ -$(FONTDBDIR)/b.gksfont: b.gksfont +$(DESTDIR)$(FONTDBDIR)/b.gksfont: b.gksfont cp $? $@ -$(FONTDBDIR)/B.gksfont: B.gksfont +$(DESTDIR)$(FONTDBDIR)/B.gksfont: B.gksfont cp $? $@ -$(FONTDBDIR)/i.gksfont: i.gksfont +$(DESTDIR)$(FONTDBDIR)/i.gksfont: i.gksfont cp $? $@ -$(FONTDBDIR)/I.gksfont: I.gksfont +$(DESTDIR)$(FONTDBDIR)/I.gksfont: I.gksfont cp $? $@ -$(FONTDBDIR)/sc.gksfont: sc.gksfont +$(DESTDIR)$(FONTDBDIR)/sc.gksfont: sc.gksfont cp $? $@ -$(FONTDBDIR)/SC.gksfont: SC.gksfont +$(DESTDIR)$(FONTDBDIR)/SC.gksfont: SC.gksfont cp $? $@ -$(FONTDBDIR)/G.gksfont: G.gksfont +$(DESTDIR)$(FONTDBDIR)/G.gksfont: G.gksfont cp $? $@ $(FONTS) $(HERSHEY_FONTS): $(PROGRAM) debian/patches/hurd.patch0000644000000000000000000000347112165740737012621 0ustar Author: Alastair McKinstry Description: Configuration file for fortc on 'Gnu' Operating Systems (Hurd) Last-Updated: 2011-07-12 Forwarded: no Index: xgks-2.6.1/src/port/fortc/gnu.m4 =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 +++ xgks-2.6.1/src/port/fortc/gnu.m4 2011-07-12 15:34:52.000000000 +0100 @@ -0,0 +1,49 @@ +divert(-1) + +# Name of system platform (for use in comments) +define(`M4__SYSTEM', Hurd) + +# transformation from fortran name to name of C module. Append an extra +# underscore if the name contains an underscore. (Don't, on Hurd) +define(`NAMEF',`ifelse(index($1,_),-1,$1_,$1_)') + +define(`REALX',`') +define(`INTEGERX',`') +define(`FUNCTIONX',`') +define(`DOUBLEX',`') + +# transformation from string name to corresponding argument name +define(`STRINGF',`$1') + +# extra arguments, if any, for string length +define(`STRINGX',`, $1_len') # one extra stringlen parameter + +# declaration to be used for argument name descriptor +define(`STRINGD',` + char *$1; `$2' + int $1`'`_len';') # declare argument string with extra stringlen parameter + +define(`STRINGP',` + char *$1') +define(`STRINGPX',`, + int $1_len') + +# declarations and initializations of canonical local variables +define(`STRINGL',`') + +# FORTRAN declaration for a long integer (e.g. integer*4 for Microsoft) +define(`LONG_INT',`integer') + +# FORTRAN declaration for a short integer (e.g. integer*2) +define(`SHORT_INT',`integer*2') + +# FORTRAN declaration for an integer byte (e.g. integer*1 or byte) +define(`BYTE_INT',`byte') + +# FORTRAN declaration for single precision +define(`SINGLE_PRECISION',`real') + +# FORTRAN declaration for double precision (e.g. real for a Cray) +define(`DOUBLE_PRECISION',`real*8') + +divert(0)dnl debian/xgks.pc.in0000644000000000000000000000033012146402723011070 0ustar prefix=/usr exec_prefix=${prefix} libdir=LIBDIR includedir=/usr/include Name: xgks Description: X11 Graphical Kernel Subsystem Version: 2.6 Libs: -L${libdir} -lxgks Libs.private: -lgfortran Cflags: -I${includedir} debian/libxgks2.postinst0000644000000000000000000000003611607062073012521 0ustar #!/bin/sh set -e #DEBHELPER# debian/libxgks-dev.manpages0000644000000000000000000000024511607062073013125 0ustar debian/tmp/usr/man/man1/fortc.1 debian/tmp/usr/man/man3/xgks.3 src/port/misc/getudprefix.3 src/port/misc/getuduser.3 src/port/misc/strbuf.3 src/port/misc/uderrmsg.3 debian/rules0000755000000000000000000000377612254667705010301 0ustar #!/usr/bin/make -f # Uncomment this to turn on verbose mode. # export DH_VERBOSE=1 # FIXME: # Gentoo report a bug that parallel builds don't work. subst -j 1. # magic debhelper rule %: dh $@ --sourcedirectory=src DESTDIR:=`pwd`/debian/tmp/ DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH) LIBDIR:=/usr/lib/$(DEB_HOST_MULTIARCH) export FC=gfortran export CC=gcc export NEQN="neqn -Tutf8" override_dh_auto_configure: cd src && ./configure --prefix=/usr FC="$(FC)" CC="$(CC)" NEQN=$(NEQN) \ CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" CPPFLAGS="$(CPPFLAGS)" override_dh_auto_build: # build process uses libs in their _installed_ location, so we need these: mkdir -p $(DESTDIR)/$(LIBDIR) $(DESTDIR)/usr/bin $(DESTDIR)/usr/include $(MAKE) -j1 -C src all DESTDIR=$(DESTDIR) # And for multi-arch ... sed -e 's@LIBDIR@$(LIBDIR)@' < debian/xgks.pc.in > debian/xgks.pc override_dh_auto_install: $(MAKE) -j1 -C src install DESTDIR=$(DESTDIR) $(MAKE) -j1 -C src/progs install DESTDIR=$(DESTDIR) $(MAKE) -j1 -C src/port/fortc install DESTDIR=$(DESTDIR) $(MAKE) -j1 -C src/port/misc install DESTDIR=$(DESTDIR) dh_auto_install mkdir -p debian/libxgks2/$(LIBDIR) mkdir -p debian/libxgks-dev/$(LIBDIR)/pkgconfig cp src/lib/c/libxgks.so* src/port/misc/libudport.so* debian/libxgks2/$(LIBDIR) cp debian/tmp/usr/lib/*.a debian/libxgks-dev/$(LIBDIR) cp debian/xgks.pc debian/libxgks-dev/$(LIBDIR)/pkgconfig dh_link -p libxgks2 $(LIBDIR)/libxgks.so.2.6 $(LIBDIR)/libxgks.so.2 dh_link -p libxgks2 $(LIBDIR)/libudport.so.2.6 $(LIBDIR)/libudport.so.2 dh_link -p libxgks-dev $(LIBDIR)/libxgks.so.2.6 $(LIBDIR)/libxgks.so dh_link -p libxgks-dev $(LIBDIR)/libudport.so.2.6 $(LIBDIR)/libudport.so override_dh_auto_test: @echo "Testing disabled as tests are interactive" override_dh_clean: [ -f src/Makefile ] && $(MAKE) -C src clean || echo "Makefile not present" rm -f src/lib/c/mkerrmsg rm -f debian/xgks.pc src/doc/xgks.3 rm -f src/doc/binding/Makefile src/doc/userdoc/Makefile src/lib/c/gksm/Makefile dh_clean debian/compat0000644000000000000000000000000212146404675010375 0ustar 9 debian/libxgks-dev.install0000644000000000000000000000245212254667626013020 0ustar usr/include/xgks.h usr/lib/fortc/* usr/bin/fortc src/port/misc/udposix.h usr/include/ src/port/misc/histogram.h usr/include/udport src/port/misc/linklist.h usr/include/udport src/port/misc/strbuf.h usr/include/udport src/port/misc/udalloc.h usr/include/udport src/port/misc/udfifo_err.h usr/include/udport src/port/misc/udqueue.h usr/include/udport src/port/misc/inetutil.h usr/include/udport src/port/misc/pathname.h usr/include/udport src/port/misc/search-node.h usr/include/udport src/port/misc/strvec.h usr/include/udport src/port/misc/uderrmsg.h usr/include/udport src/port/misc/udfifo.h usr/include/udport src/port/misc/udqueue_err.h usr/include/udport src/port/misc/ulog.h usr/include/udport src/lib/c/gks*.h usr/include/xgks src/lib/c/gksm/gksm*.h usr/include/xgks src/lib/fortran/f*.h usr/include/xgks src/lib/c/w*.h usr/include/xgks src/lib/c/cgm/*.h usr/include/cgm src/lib/c/primitive.h usr/include/xgks src/lib/c/event.h usr/include/xgks src/lib/c/input.h usr/include/xgks src/lib/c/metafile.h usr/include/xgks src/lib/c/polylines.h usr/include/xgks src/lib/c/polymarkers.h usr/include/xgks src/lib/c/text.h usr/include/xgks debian/tmp/usr/bin/defcolors usr/bin debian/tmp/usr/bin/font usr/bin debian/tmp/usr/bin/mi usr/bin debian/tmp/usr/bin/pline usr/bin debian/tmp/usr/bin/pmark usr/bin debian/libxgks-dev.dirs0000644000000000000000000000012412254672342012274 0ustar usr/lib/xgksfonts usr/lib/fortc usr/include/udport usr/include/xgks usr/include/cgm debian/libxgks-dev.docs0000644000000000000000000000004211607062073012255 0ustar src/HISTORY src/ORIGIN src/README debian/libxgks2.postrm0000644000000000000000000000003611607062073012162 0ustar #!/bin/sh set -e #DEBHELPER# debian/changelog0000644000000000000000000000470712254667734011070 0ustar xgks (2.6.1+dfsg.2-2) unstable; urgency=medium * Move to Standards-Version: 3.9.5 * Put pkg-config file in multi-arch directory, not /usr/lib/pkgconfig -- Alastair McKinstry Thu, 19 Dec 2013 22:12:37 +0000 xgks (2.6.1+dfsg.2-1) unstable; urgency=low * New DFSG package; remove inqlun.F code copyright IBM that I can't find anyone in IBM to open-source. Replace with inquire_lun.F that I wrote. Additional copyright information on other copyright holders (UCAR, Steve Pemberton, U. Illinois) included in debian/copyright. Closes: #710244, #699066. * Put *.a static libraries in m-a directory in -dev package. -- Alastair McKinstry Sat, 06 Jul 2013 01:21:40 +0100 xgks (2.6.1+dfsg.1-3) unstable; urgency=low * Fix Recommends: which points to non-existent package. -- Alastair McKinstry Mon, 27 May 2013 03:51:57 +0100 xgks (2.6.1+dfsg.1-2) unstable; urgency=low * Acknowledge bug properly. Closes: #699066. * Standards-Version: 3.9.4 * Move to debhelper 9 for m-a support * Added fortify support. * Added libxgks-data package; multi-arch libxgks2 * Removed brace-expansion from install: file. * Fix nroff errors in manpages. -- Alastair McKinstry Mon, 20 May 2013 11:46:10 +0100 xgks (2.6.1+dfsg.1-1) unstable; urgency=low * DFSG-free version, removes code that blocks distribution. Closes #699066. - new version of inetutils.[ch] with license clarified by author. - Deletes problematic hershey fonts code. -- Alastair McKinstry Mon, 25 Mar 2013 17:25:40 +0000 xgks (2.6.1-3) unstable; urgency=low * Standards-Version: 3.9.2. * Add libgfortran link to libxgks.so ; missing symbol. * Add Hurd,kfreebsd support for fortc (enable xgks on these systems) * Add DEP-3 tags to patches. -- Alastair McKinstry Mon, 11 Jul 2011 22:04:40 +0100 xgks (2.6.1-2) unstable; urgency=low * Add additional headers needed to build ferret; also move some binaries from examples/ to usr/bin. Adapted pmel patch from Gentoo (xgks-pmel-2.5) and included as pmel.patch. * Add m4 dependency. Closes: #588934. * Move to Standards-Version: 3.9.0 -- Alastair McKinstry Wed, 14 Jul 2010 14:28:35 +0100 xgks (2.6.1-1) unstable; urgency=low * Initial release. (Closes: #587494) -- Alastair McKinstry Thu, 24 Jun 2010 21:43:55 +0100 debian/copyright0000644000000000000000000001065412165676042011140 0ustar This package was debianized by Alastair McKinstry on Mon, 5 Jul 2010 19:19:54 +0100. It was downloaded from http://sourceforge.net/projects/xgks Copyright: (C) Copyright IBM Corporation 1989. All Rights Reserved Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation, and that the name of IBM not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. IBM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. src/doc/xgks.3src2 src/progs/defcolors.c src/progs/xhib/Imakefile src/progs/demo.h src/progs/Logo/ethernet.c src/progs/Logo/printer.c src/progs/Logo/s9000.c src/progs/Logo/ramtek.c src/progs/Logo/demo.c src/progs/hanoi.c src/progs/pline.c src/progs/mi.c src/progs/pmark.c src/progs/font.c src/fontdb/rshowfont.c src/fontdb/mkfont.c src/fontdb/font.c.new src/README src/lib/iso-c/xgks.h src/lib/c/stroke.c src/lib/c/fillarea.c src/lib/c/deferral_ws.c src/lib/c/input.c src/lib/c/gif.c src/lib/c/gks_errors.h src/lib/c/text.c src/lib/c/xgks.h src/lib/c/polymarkers.c src/lib/c/primitive.h src/lib/c/inqpolylines.c src/lib/c/escape.c src/lib/c/open_gks.c src/lib/c/gks_defines.h src/lib/c/cgm/cgm.h src/lib/c/input.h src/lib/c/inqtext.c src/lib/c/valuator.c src/lib/c/event.h src/lib/c/open_ws.c src/lib/c/string.c src/lib/c/gks_error.c src/lib/c/gerrorhand.c src/lib/c/aspect_flags.c src/lib/c/mkerrmsg.c src/lib/c/cellarray.c src/lib/c/inquiries.c src/lib/c/inqWDT.c src/lib/c/message.c src/lib/c/colours.c src/lib/c/gksm/gksm.h src/lib/c/gksm/gksm.c src/lib/c/choice.c src/lib/c/font.h src/lib/c/polylines.c src/lib/c/locator.c src/lib/c/event.c src/lib/c/inqfillareas.c src/lib/c/wslist.h src/lib/c/prmgr.c src/lib/c/inqpixel.c src/lib/c/gks_implem.h src/lib/c/x/xfillarea.c src/lib/c/x/xpline.c src/lib/c/x/xtext.c src/lib/c/x/xevent.c src/lib/c/x/xopws.c src/lib/c/x/xcellarray.c src/lib/c/x/xpmarker.c src/lib/c/x/xinqpixel.c src/lib/c/x/xcolours.c src/lib/c/x/xSet.c src/lib/c/x/xupdate.c src/lib/c/update.c src/lib/c/gkserrmsg.h src/lib/c/act_ws.c src/lib/c/gkslist.h src/lib/c/pick.c src/lib/c/transforms.c src/lib/c/inqpmarker.c src/lib/c/inqtransform.c src/lib/c/segments.c src/lib/c/ps.c src/lib/c/wdt.h src/mail/info: (C) Copyright 1987, 1988 by The University of Illinois Board of Trustees. All rights reserved. These files were written by IBM are Copyright (C) both IBM and University of Illinois Board of Trustees; The above IBM license is included and hence applies. (C) Copyright 1993 UCAR/Unidata Permission to use, copy, modify, and distribute this software and its documentation for any purpose without fee is hereby granted, provided that the above copyright notice appears in all copies, that both that copyright notice and this permission notice appear in supporting documentation, and that the name of UCAR/Unidata not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. UCAR makes no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty. It is provided with no support and without obligation on the part of UCAR or Unidata, to assist in its use, correction, modification, or enhancement. xgks-2.6.1+dfsg.1/src/port/misc/ulog.* Copyright 1993, University Corporation for Atmospheric Research University Corporation of Atmospheric Research == UCAR above, and above license applies. src/port/misc/config.c: Copyright (c) 1988, 1989, 1990 Steven Pemberton, CWI, Amsterdam. Released under the UCAR/'BSD' license above. See http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=699066 for details. src/lib/fortran/inquire_lun.f: Copyright (C) 2013 Alastair McKinstry Released under the UCAR license (above) and GPL v2 or later. The GPL license can be found at /usr/share/common-licenses/GPL-2 debian/TODO0000644000000000000000000000002511607062073007655 0ustar * Re-enabling tests.