diff -Nru amiwm-0.20.48/amiwm.1 amiwm-0.21pl2/amiwm.1 --- amiwm-0.20.48/amiwm.1 2018-02-09 07:03:21.000000000 +0000 +++ amiwm-0.21pl2/amiwm.1 2010-07-19 16:01:21.000000000 +0000 @@ -1,7 +1,7 @@ .\" @(#)amiwm.1 '\"macro stdmacro .nr X -.TH amiwm 1 "14 Mar 1998" +.TH amiwm 1 "19 Jul 2010" .SH NAME amiwm \- Amiga Workbench-like X Window Manager .SH SYNOPSIS @@ -62,6 +62,37 @@ Modifies the colour scheme for the window manager. +.SH CustomIconsOnly {yes|no} + +This prevent applications to display their own icons when in iconified state. +Only icons defined in amiwmrc for each apps will be used. +Because apps own icon are too different from one eachother. +They comes in various sizes and themes. Some icons will be 32x32, +while some other will be a 128x128 or even bigger .. By using this option, +You have the possibility to decide which icon should be used for each app. +If no custom icons are defined at all, the def_tool.info will be used for +all iconified apps. Format is: style { class "myClass" icon "myIcon.info" } +To find out a given program's class, use "xlsclients -l" to list all opened +applications, and then use "xprop -id <0x0000000>" to list a +given app's properties. Use either WM_CLASS or WM_ICON_NAME strings in amiwmrc. + +.SH ShortLabelIcons {yes|no} + +This limit the length of the text for iconified programs. For example, if this +option is activated, an iconified program text will be limited to 8 chars + ".." +Use this option if you don't want iconified program text to be loong strings.. + +.SH TitleBarClock {yes|no} + +Enables a clock in the titlebar. It displays the date and time. + +.SH TitleClockFormat [] "time string" + +This lets you choose a new format to display the Title Bar Clock. +The time string is formatted with the standard strftime() parameters. +The default is "%c". It has been found that "%a %b %e %Y %l:%M %p" works +well too. Number is the update interval in seconds. + .SH ToolItem \f1\*(lq\f3name" \f1\*(lq\f3command" \f1\*(lq\f3hotkey" Adds an item in the Tools menu with the specified name, which executes @@ -141,5 +172,5 @@ .SH AUTHOR Marcus Comstedt, -.I marcus@lysator.liu.se +.I marcus@mc.pp.se diff -Nru amiwm-0.20.48/Background amiwm-0.21pl2/Background --- amiwm-0.20.48/Background 1997-12-12 17:21:46.000000000 +0000 +++ amiwm-0.21pl2/Background 2010-04-09 22:15:15.000000000 +0000 @@ -1,6 +1,6 @@ #!/bin/sh if [ "$3" = "0x00000000" ]; then - xloadimage -onroot $4 > /dev/null + display -window root $4 > /dev/null else - xloadimage -windowid "$3" $4 > /dev/null + display -window "$3" $4 > /dev/null fi diff -Nru amiwm-0.20.48/client.c amiwm-0.21pl2/client.c --- amiwm-0.20.48/client.c 1998-03-15 18:54:20.000000000 +0000 +++ amiwm-0.21pl2/client.c 2010-07-18 13:11:26.000000000 +0000 @@ -2,6 +2,7 @@ #include #include #include +#include #include "drawinfo.h" #include "screen.h" @@ -170,6 +171,8 @@ Client *createclient(Window w) { + extern void checkstyle(Client *c); + XWindowAttributes attr; Client *c; @@ -188,9 +191,29 @@ c->gravity = NorthWestGravity; c->reparenting = 0; XSelectInput(dpy, c->window, PropertyChangeMask); +#ifdef USE_FONTSETS + { + XTextProperty prop; + c->title = NULL; + if(XGetWMName(dpy, c->window, &prop) && prop.value) { + char **list; + int n; + if(XmbTextPropertyToTextList(dpy, &prop, &list, &n) >= Success) { + if(n > 0) + c->title = strdup(list[0]); + XFreeStringList(list); + } + XFree(prop.value); + } + } +#else XGetWMName(dpy, c->window, &c->title); +#endif + c->style = NULL; + checkstyle(c); checksizehints(c); - c->zoomx=c->zoomy=0; + c->zoomx=0; + c->zoomy=scr->bh; if(c->sizehints.width_inc) { c->zoomw=scr->width-c->sizehints.base_width-22; c->zoomw-=c->zoomw%c->sizehints.width_inc; @@ -202,7 +225,7 @@ } else c->zoomw=attr.width; if(c->sizehints.height_inc) { - c->zoomh=scr->height-c->sizehints.base_height-scr->bh-10; + c->zoomh=scr->height-c->sizehints.base_height-scr->bh-c->zoomy-2; c->zoomh-=c->zoomh%c->sizehints.height_inc; c->zoomh+=c->sizehints.base_height; if(c->zoomh>c->sizehints.max_height) @@ -237,8 +260,13 @@ XInstallColormap(dpy, scr->cmap); } else if(prefs.focus==FOC_CLICKTOTYPE) XUngrabButton(dpy, Button1, AnyModifier, c->parent); +#ifdef USE_FONTSETS + if(c->title) + free(c->title); +#else if(c->title.value) XFree(c->title.value); +#endif if(c->parent != c->scr->root) { XDestroyWindow(dpy, c->parent); XDeleteContext(dpy, c->parent, client_context); @@ -262,6 +290,18 @@ free(c); } +int screen_has_clients() +{ + int n = 0; + Client *c = clients; + while(c) { + if(c->scr == scr) + n++; + c = c->next; + } + return n; +} + void flushclients() { unsigned int i, nwins; diff -Nru amiwm-0.20.48/client.h amiwm-0.21pl2/client.h --- amiwm-0.20.48/client.h 1998-03-15 18:55:59.000000000 +0000 +++ amiwm-0.21pl2/client.h 2010-07-13 13:06:22.000000000 +0000 @@ -4,9 +4,11 @@ #include #include +struct _Icon; +struct _Scrn; typedef struct _Client { struct _Client *next; - Scrn *scr; + struct _Scrn *scr; struct _Icon *icon; struct module *module; int wflags; @@ -18,8 +20,13 @@ int zoomx, zoomy, zoomw, zoomh; int old_bw, proto, state, gravity, reparenting; int active, shaped; +#ifdef USE_FONTSETS + char *title; +#else XTextProperty title; +#endif XSizeHints sizehints; + struct _Style *style; } Client; extern Client *clients; @@ -29,7 +36,7 @@ extern Client *createclient(Window); extern void rmclient(Client *); extern void flushclients(void); -extern void scrsendconfig(Scrn *); +extern void scrsendconfig(struct _Scrn *); extern void sendconfig(Client *); extern void getstate(Client *); extern void grav_map_frame_to_win(Client *, int, int, int *, int *); diff -Nru amiwm-0.20.48/configure amiwm-0.21pl2/configure --- amiwm-0.20.48/configure 1998-03-15 21:22:47.000000000 +0000 +++ amiwm-0.21pl2/configure 2010-04-13 17:04:28.000000000 +0000 @@ -1,28 +1,693 @@ #! /bin/sh - # Guess values for system-dependent variables and create Makefiles. -# Generated automatically using autoconf version 2.12 -# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. +# Generated by GNU Autoconf 2.64. +# +# 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'" + + +exec 7<&0 &1 -# Defaults: -ac_help= +# 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` + +# +# Initializations. +# ac_default_prefix=/usr/local -# Any additions from configure.in: -ac_help="$ac_help - --with-x use the X Window System" +ac_clean_files= +ac_config_libobj_dir=. +LIBOBJS= +cross_compiling=no +subdirs= +MFLAGS= +MAKEFLAGS= + +# Identity of this package. +PACKAGE_NAME= +PACKAGE_TARNAME= +PACKAGE_VERSION= +PACKAGE_STRING= +PACKAGE_BUGREPORT= +PACKAGE_URL= + +ac_unique_file="diskobject.c" +# 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 +LIBOBJS +x_libraries +x_includes +XT_LIB_KLUDGE +ALLOCA +EGREP +GREP +X_EXTRA_LIBS +X_LIBS +X_PRE_LIBS +X_CFLAGS +CPP +XMKMF +RANLIB +LN_S +INSTALL_DATA +INSTALL_SCRIPT +INSTALL_PROGRAM +LEXLIB +LEX_OUTPUT_ROOT +LEX +YFLAGS +YACC +AWK +OBJEXT +EXEEXT +ac_ct_CC +CPPFLAGS +LDFLAGS +CFLAGS +CC +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 +enable_fontsets +with_x +' + ac_precious_vars='build_alias +host_alias +target_alias +CC +CFLAGS +LDFLAGS +LIBS +CPPFLAGS +YACC +YFLAGS +XMKMF +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 @@ -31,93 +696,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= -# Maximum number of lines to put in a shell here document. -ac_max_here_lines=12 +docdir='${datarootdir}/doc/${PACKAGE}' +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- \ @@ -126,116 +829,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 \ @@ -249,26 +913,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 \ @@ -285,7 +949,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) @@ -295,7 +969,7 @@ ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) - sbindir="$ac_optarg" ;; + sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ @@ -306,58 +980,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.12" - 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. @@ -368,512 +1051,2195 @@ 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=diskobject.c # 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 -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" - fi -fi -for ac_site_file in $CONFIG_SITE; do - if test -r "$ac_site_file"; then - echo "loading site script $ac_site_file" - . "$ac_site_file" - 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 -if test -r "$cache_file"; then - echo "loading cache $cache_file" - . $cache_file -else - echo "creating cache $cache_file" - > $cache_file -fi +# +# 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 this package to adapt to many kinds of systems. -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 $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cc_cross - -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 +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. -# Extract the first word of "gcc", so it can be a program name with args. -set dummy gcc; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:528: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&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="${IFS}:" - for ac_dir in $PATH; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_CC="gcc" - break - fi - done - IFS="$ac_save_ifs" -fi -fi -CC="$ac_cv_prog_CC" -if test -n "$CC"; then - echo "$ac_t""$CC" 1>&6 -else - echo "$ac_t""no" 1>&6 +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/PACKAGE] + --htmldir=DIR html documentation [DOCDIR] + --dvidir=DIR dvi documentation [DOCDIR] + --pdfdir=DIR pdf documentation [DOCDIR] + --psdir=DIR ps documentation [DOCDIR] +_ACEOF + + cat <<\_ACEOF + +X features: + --x-includes=DIR X include files are in DIR + --x-libraries=DIR X library files are in DIR +_ACEOF 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 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:557: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&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="${IFS}:" - ac_prog_rejected=no - for ac_dir in $PATH; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then - ac_prog_rejected=yes - continue - fi - ac_cv_prog_CC="cc" - break - fi +if test -n "$ac_init_help"; then + + cat <<\_ACEOF + +Optional Features: + --disable-option-checking ignore unrecognized --enable/--with options + --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) + --enable-FEATURE[=ARG] include FEATURE [ARG=yes] + --enable-fontsets + +Optional Packages: + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] + --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) + --with-x use the X Window System + +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 C/C++/Objective C preprocessor flags, e.g. -I if + you have headers in a nonstandard directory + YACC The `Yet Another C Compiler' implementation to use. Defaults to + the first program found out of: `bison -y', `byacc', `yacc'. + YFLAGS The list of arguments that will be passed by default to $YACC. + This script will default YFLAGS to the empty string to avoid a + default value of `-d' given by some make applications. + XMKMF Path to xmkmf, Makefile generator for X Window System + 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 - IFS="$ac_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 $# -gt 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 - set dummy "$ac_dir/$ac_word" "$@" - shift - ac_cv_prog_CC="$@" - fi -fi -fi -fi -CC="$ac_cv_prog_CC" -if test -n "$CC"; then - echo "$ac_t""$CC" 1>&6 -else - echo "$ac_t""no" 1>&6 fi - test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } -fi +test -n "$ac_init_help" && exit $ac_status +if $ac_init_version; then + cat <<\_ACEOF +configure +generated by GNU Autoconf 2.64 + +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;} + return $ac_retval + +} # ac_fn_c_try_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;} + return $ac_retval + +} # ac_fn_c_try_link + +# 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;} + return $ac_retval + +} # ac_fn_c_try_cpp + +# 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 -echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:605: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +/* 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. */ -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 $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cc_cross - -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - ac_cv_prog_cc_works=yes - # If we can't run a trivial program, we are probably using a cross compiler. - if (./conftest; exit) 2>/dev/null; then - ac_cv_prog_cc_cross=no - else - ac_cv_prog_cc_cross=yes - fi -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - ac_cv_prog_cc_works=no -fi -rm -fr conftest* +#ifdef __STDC__ +# include +#else +# include +#endif -echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 -if test $ac_cv_prog_cc_works = no; then - { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } -fi -echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:639: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 -echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 -cross_compiling=$ac_cv_prog_cc_cross +#undef $2 -echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:644: checking whether we are using GNU C" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.c <&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then - ac_cv_prog_gcc=yes + +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 + +# 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;} + return $ac_retval + +} # ac_fn_c_try_run + +# 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_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_check_type LINENO TYPE VAR INCLUDES +# ------------------------------------------- +# Tests whether TYPE exists after having included INCLUDES, setting cache +# variable VAR accordingly. +ac_fn_c_check_type () +{ + 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 + eval "$3=no" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +if (sizeof ($2)) + return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +if (sizeof (($2))) + return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + else - ac_cv_prog_gcc=no + eval "$3=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 +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;} -echo "$ac_t""$ac_cv_prog_gcc" 1>&6 +} # ac_fn_c_check_type +cat >config.log <<_ACEOF +This file contains any messages produced by compilers while +running configure, to aid debugging if configure makes a mistake. -if test $ac_cv_prog_gcc = yes; then - GCC=yes - ac_test_CFLAGS="${CFLAGS+set}" - ac_save_CFLAGS="$CFLAGS" - CFLAGS= - echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:668: checking whether ${CC-cc} accepts -g" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - echo 'void f(){}' > conftest.c -if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then - ac_cv_prog_cc_g=yes +It was created by $as_me, which was +generated by GNU Autoconf 2.64. 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_cv_prog_cc_g=no + ac_site_file1=$ac_default_prefix/share/config.site + ac_site_file2=$ac_default_prefix/etc/config.site fi -rm -f conftest* +for ac_site_file in "$ac_site_file1" "$ac_site_file2" +do + test "x$ac_site_file" = xNONE && continue + if 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 + # Some versions of bash will fail to source /dev/null (special + # files actually), so we avoid doing that. + if 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 + { $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 +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 + + +# Check whether --enable-fontsets was given. +if test "${enable_fontsets+set}" = set; then : + enableval=$enable_fontsets; use_fontsets="$enableval" +else + use_fontsets=auto fi -echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 - if test "$ac_test_CFLAGS" = set; then - CFLAGS="$ac_save_CFLAGS" - elif test $ac_cv_prog_cc_g = yes; then - CFLAGS="-g -O2" + +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 + + if test "x$ac_ct_CC" = x; then + CC="" else - CFLAGS="-O2" + 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 + rm -f conftest.er1 conftest.err + fi + $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. */ +#include +int +main () +{ +FILE *f = fopen ("conftest.out", "w"); + return ferror (f) || fclose (f) != 0; + + ; + 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 conftest.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 for C compiler default output file name" >&5 +$as_echo_n "checking for C compiler default output file name... " >&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 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 +$as_echo "$ac_file" >&6; } +if test -z "$ac_file"; then : + $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; }; } +fi +ac_exeext=$ac_cv_exeext + +# 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 the C compiler works" >&5 +$as_echo_n "checking whether the C compiler works... " >&6; } +# If not cross compiling, check that we can run a simple program. +if test "$cross_compiling" != yes; then + if { ac_try='./$ac_file' + { { 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: yes" >&5 +$as_echo "yes" >&6; } + +rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out conftest.out +ac_clean_files=$ac_clean_files_save +# 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; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 +$as_echo "$cross_compiling" >&6; } + +{ $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$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 +{ $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= - test "${CFLAGS+set}" = set || CFLAGS="-g" 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 () +{ -echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6 -echo "configure:696: checking for POSIXized ISC" >&5 -if test -d /etc/conf/kconfig.d && - grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1 -then - echo "$ac_t""yes" 1>&6 - ISC=yes # If later tests want to check for ISC. - cat >> confdefs.h <<\EOF -#define _POSIX_SOURCE 1 -EOF + ; + 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 - CC="$CC -posix" + CFLAGS="-g -O2" else - CC="$CC -Xp" + CFLAGS="-g" fi else - echo "$ac_t""no" 1>&6 - ISC= + 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; +} -for ac_prog in mawk gawk nawk awk +/* 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 -# Extract the first word of "$ac_prog", so it can be a program name with args. + 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 + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing strerror" >&5 +$as_echo_n "checking for library containing strerror... " >&6; } +if test "${ac_cv_search_strerror+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_func_search_save_LIBS=$LIBS +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* 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 strerror (); +int +main () +{ +return strerror (); + ; + return 0; +} +_ACEOF +for ac_lib in '' cposix; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + if ac_fn_c_try_link "$LINENO"; then : + ac_cv_search_strerror=$ac_res +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if test "${ac_cv_search_strerror+set}" = set; then : + break +fi +done +if test "${ac_cv_search_strerror+set}" = set; then : + +else + ac_cv_search_strerror=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_strerror" >&5 +$as_echo "$ac_cv_search_strerror" >&6; } +ac_res=$ac_cv_search_strerror +if test "$ac_res" != no; then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + +fi + +for ac_prog in gawk mawk nawk awk +do + # 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:721: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_AWK'+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_AWK+set}" = set; then : + $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_AWK="$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_AWK="$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 -AWK="$ac_cv_prog_AWK" +AWK=$ac_cv_prog_AWK if test -n "$AWK"; then - echo "$ac_t""$AWK" 1>&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 +$as_echo "$AWK" >&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 "$AWK" && break + + test -n "$AWK" && break done for ac_prog in 'bison -y' byacc 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:754: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_YACC'+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_YACC+set}" = set; then : + $as_echo_n "(cached) " >&6 else if test -n "$YACC"; then ac_cv_prog_YACC="$YACC" # Let the user override the test. else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_YACC="$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_YACC="$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 -YACC="$ac_cv_prog_YACC" +YACC=$ac_cv_prog_YACC if test -n "$YACC"; then - echo "$ac_t""$YACC" 1>&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5 +$as_echo "$YACC" >&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 "$YACC" && break + + test -n "$YACC" && break done test -n "$YACC" || YACC="yacc" -# Extract the first word of "flex", so it can be a program name with args. -set dummy flex; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:786: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +for ac_prog in flex lex +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_LEX+set}" = set; then : + $as_echo_n "(cached) " >&6 else if test -n "$LEX"; then ac_cv_prog_LEX="$LEX" # Let the user override the test. else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_LEX="flex" - 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_LEX="$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" - test -z "$ac_cv_prog_LEX" && ac_cv_prog_LEX="lex" +IFS=$as_save_IFS + fi fi -LEX="$ac_cv_prog_LEX" +LEX=$ac_cv_prog_LEX if test -n "$LEX"; then - echo "$ac_t""$LEX" 1>&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LEX" >&5 +$as_echo "$LEX" >&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 "$LEXLIB" -then - case "$LEX" in - flex*) ac_lib=fl ;; - *) ac_lib=l ;; - esac - echo $ac_n "checking for yywrap in -l$ac_lib""... $ac_c" 1>&6 -echo "configure:819: checking for yywrap in -l$ac_lib" >&5 -ac_lib_var=`echo $ac_lib'_'yywrap | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-l$ac_lib $LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" + + test -n "$LEX" && break +done +test -n "$LEX" || LEX=":" + +if test "x$LEX" != "x:"; then + cat >conftest.l <<_ACEOF +%% +a { ECHO; } +b { REJECT; } +c { yymore (); } +d { yyless (1); } +e { yyless (input () != 0); } +f { unput (yytext[0]); } +. { BEGIN INITIAL; } +%% +#ifdef YYTEXT_POINTER +extern char *yytext; +#endif +int +main (void) +{ + return ! yylex () + ! yywrap (); +} +_ACEOF +{ { ac_try="$LEX conftest.l" +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 "$LEX conftest.l") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking lex output file root" >&5 +$as_echo_n "checking lex output file root... " >&6; } +if test "${ac_cv_prog_lex_root+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + +if test -f lex.yy.c; then + ac_cv_prog_lex_root=lex.yy +elif test -f lexyy.c; then + ac_cv_prog_lex_root=lexyy +else + as_fn_error "cannot find output from $LEX; giving up" "$LINENO" 5 +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_root" >&5 +$as_echo "$ac_cv_prog_lex_root" >&6; } +LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root + +if test -z "${LEXLIB+set}"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking lex library" >&5 +$as_echo_n "checking lex library... " >&6; } +if test "${ac_cv_lib_lex+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + ac_save_LIBS=$LIBS + ac_cv_lib_lex='none needed' + for ac_lib in '' -lfl -ll; do + LIBS="$ac_lib $ac_save_LIBS" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +`cat $LEX_OUTPUT_ROOT.c` +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_lex=$ac_lib +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + test "$ac_cv_lib_lex" != 'none needed' && break + done + LIBS=$ac_save_LIBS fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - LEXLIB="-l$ac_lib" +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lex" >&5 +$as_echo "$ac_cv_lib_lex" >&6; } + test "$ac_cv_lib_lex" != 'none needed' && LEXLIB=$ac_cv_lib_lex +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether yytext is a pointer" >&5 +$as_echo_n "checking whether yytext is a pointer... " >&6; } +if test "${ac_cv_prog_lex_yytext_pointer+set}" = set; then : + $as_echo_n "(cached) " >&6 else - echo "$ac_t""no" 1>&6 + # POSIX says lex can declare yytext either as a pointer or an array; the +# default is implementation-dependent. Figure out which it is, since +# not all implementations provide the %pointer and %array declarations. +ac_cv_prog_lex_yytext_pointer=no +ac_save_LIBS=$LIBS +LIBS="$LEXLIB $ac_save_LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#define YYTEXT_POINTER 1 +`cat $LEX_OUTPUT_ROOT.c` +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_prog_lex_yytext_pointer=yes fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_save_LIBS fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_yytext_pointer" >&5 +$as_echo "$ac_cv_prog_lex_yytext_pointer" >&6; } +if test $ac_cv_prog_lex_yytext_pointer = yes; then -ac_aux_dir= -for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do - if test -f $ac_dir/install-sh; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install-sh -c" - break - elif test -f $ac_dir/install.sh; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install.sh -c" - break - fi +$as_echo "#define YYTEXT_POINTER 1" >>confdefs.h + +fi +rm -f conftest.l $LEX_OUTPUT_ROOT.c + +fi +ac_aux_dir= +for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do + for ac_t in install-sh install.sh shtool; do + if test -f "$ac_dir/$ac_t"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/$ac_t -c" + break 2 + fi + done done if test -z "$ac_aux_dir"; then - { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; } + as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 fi -ac_config_guess=$ac_aux_dir/config.guess -ac_config_sub=$ac_aux_dir/config.sub -ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. + +# These three variables are undocumented and unsupported, +# and are intended to be withdrawn in a future Autoconf release. +# They can cause serious problems if a builder's source tree is in a directory +# whose full name contains unusual characters. +ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. +ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. +ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. + # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or @@ -882,182 +3248,341 @@ # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install +# AmigaOS /C/install, which installs bootblocks on floppy discs +# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" +# OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. -echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:890: checking for a BSD compatible install" >&5 +# Reject install programs that cannot install multiple files. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 +$as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then -if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +if test "${ac_cv_path_install+set}" = set; then : + $as_echo_n "(cached) " >&6 else - IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. - case "$ac_dir/" in - /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; - *) - # OSF1 and SCO ODT 3.0 have their own names for install. - for ac_prog in ginstall installbsd scoinst install; do - if test -f $ac_dir/$ac_prog; then +case $as_dir/ in #(( + ./ | .// | /[cC]/* | \ + /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ + ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ + /usr/ucb/* ) ;; + *) + # OSF1 and SCO ODT 3.0 have their own names for install. + # Don't use installbsd from OSF since it installs stuff as root + # by default. + for ac_prog in ginstall scoinst install; do + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then if test $ac_prog = install && - grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then + grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. - # OSF/1 installbsd also uses dspmsg, but is usable. + : + elif test $ac_prog = install && + grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # program-specific install script used by HP pwplus--don't use. : else - ac_cv_path_install="$ac_dir/$ac_prog -c" - break 2 + rm -rf conftest.one conftest.two conftest.dir + echo one > conftest.one + echo two > conftest.two + mkdir conftest.dir + if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && + test -s conftest.one && test -s conftest.two && + test -s conftest.dir/conftest.one && + test -s conftest.dir/conftest.two + then + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" + break 3 + fi fi fi done - ;; - esac + done + ;; +esac + done - IFS="$ac_save_IFS" +IFS=$as_save_IFS + +rm -rf conftest.one conftest.two conftest.dir fi if test "${ac_cv_path_install+set}" = set; then - INSTALL="$ac_cv_path_install" + INSTALL=$ac_cv_path_install else - # As a last resort, use the slow shell script. We don't cache a - # path for INSTALL within a source directory, because that will + # As a last resort, use the slow shell script. Don't cache a + # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is - # removed, or if the path is relative. - INSTALL="$ac_install_sh" + # removed, or if the value is a relative name. + INSTALL=$ac_install_sh fi fi -echo "$ac_t""$INSTALL" 1>&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 +$as_echo "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' + test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' -echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 -echo "configure:940: checking whether ln -s works" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 +$as_echo_n "checking whether ln -s works... " >&6; } +LN_S=$as_ln_s +if test "$LN_S" = "ln -s"; 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, using $LN_S" >&5 +$as_echo "no, using $LN_S" >&6; } +fi + +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 - rm -f conftestdata -if ln -s X conftestdata 2>/dev/null -then - rm -f conftestdata - ac_cv_prog_LN_S="ln -s" + if test -n "$RANLIB"; then + ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else - ac_cv_prog_LN_S=ln +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=$as_save_IFS + fi fi -LN_S="$ac_cv_prog_LN_S" -if test "$ac_cv_prog_LN_S" = "ln -s"; then - echo "$ac_t""yes" 1>&6 +RANLIB=$ac_cv_prog_RANLIB +if test -n "$RANLIB"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 +$as_echo "$RANLIB" >&6; } else - echo "$ac_t""no" 1>&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -# Extract the first word of "ranlib", so it can be a program name with args. + +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 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:963: 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}: 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 "$RANLIB"; then - ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. + if test -n "$ac_ct_RANLIB"; then + ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; 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_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="$ac_save_ifs" - test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" +IFS=$as_save_IFS + fi fi -RANLIB="$ac_cv_prog_RANLIB" -if test -n "$RANLIB"; then - echo "$ac_t""$RANLIB" 1>&6 +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 how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:991: 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:1012: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` -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:1029: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` -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* - ac_cv_prog_CPP="$CPP" + + done + ac_cv_prog_CPP=$CPP + fi - CPP="$ac_cv_prog_CPP" + CPP=$ac_cv_prog_CPP else - ac_cv_prog_CPP="$CPP" + 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 -echo "$ac_t""$CPP" 1>&6 +rm -f conftest.err conftest.$ac_ext -# If we find X, set shell vars x_includes and x_libraries to the -# paths, otherwise set no_x=yes. -# Uses ac_ vars as temps to allow command line to override cache and checks. -# --without-x overrides everything else, but does not touch the cache. -echo $ac_n "checking for X""... $ac_c" 1>&6 -echo "configure:1056: checking for X" >&5 +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : -# Check whether --with-x or --without-x was given. -if test "${with_x+set}" = set; then - withval="$with_x" - : +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 "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 + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5 +$as_echo_n "checking for X... " >&6; } + + +# Check whether --with-x was given. +if test "${with_x+set}" = set; then : + withval=$with_x; fi # $have_x is `yes', `no', `disabled', or empty when we do not yet know. @@ -1065,227 +3590,189 @@ # The user explicitly disabled X. have_x=disabled else - if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then - # Both variables are already set. - have_x=yes - else -if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + case $x_includes,$x_libraries in #( + *\'*) as_fn_error "cannot use X directory names containing '" "$LINENO" 5;; #( + *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then : + $as_echo_n "(cached) " >&6 else # One or both of the vars are not set, and there is no cached value. -ac_x_includes=NO ac_x_libraries=NO -rm -fr conftestdir -if mkdir conftestdir; then - cd conftestdir - # Make sure to not put "make" in the Imakefile rules, since we grep it out. - cat > Imakefile <<'EOF' -acfindx: - @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"' -EOF - if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then +ac_x_includes=no ac_x_libraries=no +rm -f -r conftest.dir +if mkdir conftest.dir; then + cd conftest.dir + cat >Imakefile <<'_ACEOF' +incroot: + @echo incroot='${INCROOT}' +usrlibdir: + @echo usrlibdir='${USRLIBDIR}' +libdir: + @echo libdir='${LIBDIR}' +_ACEOF + if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then # GNU make sometimes prints "make[1]: Entering...", which would confuse us. - eval `${MAKE-make} acfindx 2>/dev/null | grep -v make` + for ac_var in incroot usrlibdir libdir; do + eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`" + done # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. - for ac_extension in a so sl; do - if test ! -f $ac_im_usrlibdir/libX11.$ac_extension && - test -f $ac_im_libdir/libX11.$ac_extension; then - ac_im_usrlibdir=$ac_im_libdir; break + for ac_extension in a so sl dylib la dll; do + if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" && + test -f "$ac_im_libdir/libX11.$ac_extension"; then + ac_im_usrlibdir=$ac_im_libdir; break fi done # Screen out bogus values from the imake configuration. They are # bogus both because they are the default anyway, and because # using them would break gcc on systems where it needs fixed includes. - case "$ac_im_incroot" in - /usr/include) ;; - *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;; + case $ac_im_incroot in + /usr/include) ac_x_includes= ;; + *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;; esac - case "$ac_im_usrlibdir" in - /usr/lib | /lib) ;; - *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;; + case $ac_im_usrlibdir in + /usr/lib | /usr/lib64 | /lib | /lib64) ;; + *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;; esac fi cd .. - rm -fr conftestdir + rm -f -r conftest.dir fi -if test "$ac_x_includes" = NO; then - # Guess where to find include files, by looking for this one X11 .h file. - test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h +# Standard set of common directories for X headers. +# Check X11 before X11Rn because it is often a symlink to the current release. +ac_x_header_dirs=' +/usr/X11/include +/usr/X11R7/include +/usr/X11R6/include +/usr/X11R5/include +/usr/X11R4/include + +/usr/include/X11 +/usr/include/X11R7 +/usr/include/X11R6 +/usr/include/X11R5 +/usr/include/X11R4 + +/usr/local/X11/include +/usr/local/X11R7/include +/usr/local/X11R6/include +/usr/local/X11R5/include +/usr/local/X11R4/include + +/usr/local/include/X11 +/usr/local/include/X11R7 +/usr/local/include/X11R6 +/usr/local/include/X11R5 +/usr/local/include/X11R4 + +/usr/X386/include +/usr/x386/include +/usr/XFree86/include/X11 + +/usr/include +/usr/local/include +/usr/unsupported/include +/usr/athena/include +/usr/local/x11r5/include +/usr/lpp/Xamples/include + +/usr/openwin/include +/usr/openwin/share/include' +if test "$ac_x_includes" = no; then + # Guess where to find include files, by looking for Xlib.h. # First, try using that file with no special directory specified. -cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1123: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` -if test -z "$ac_err"; then - rm -rf conftest* + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : # We can compile using X headers with no special include directory. ac_x_includes= else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - # Look for the header file in a standard set of common directories. -# Check X11 before X11Rn because it is often a symlink to the current release. - for ac_dir in \ - /usr/X11/include \ - /usr/X11R6/include \ - /usr/X11R5/include \ - /usr/X11R4/include \ - \ - /usr/include/X11 \ - /usr/include/X11R6 \ - /usr/include/X11R5 \ - /usr/include/X11R4 \ - \ - /usr/local/X11/include \ - /usr/local/X11R6/include \ - /usr/local/X11R5/include \ - /usr/local/X11R4/include \ - \ - /usr/local/include/X11 \ - /usr/local/include/X11R6 \ - /usr/local/include/X11R5 \ - /usr/local/include/X11R4 \ - \ - /usr/X386/include \ - /usr/x386/include \ - /usr/XFree86/include/X11 \ - \ - /usr/include \ - /usr/local/include \ - /usr/unsupported/include \ - /usr/athena/include \ - /usr/local/x11r5/include \ - /usr/lpp/Xamples/include \ - \ - /usr/openwin/include \ - /usr/openwin/share/include \ - ; \ - do - if test -r "$ac_dir/$x_direct_test_include"; then - ac_x_includes=$ac_dir - break - fi - done + for ac_dir in $ac_x_header_dirs; do + if test -r "$ac_dir/X11/Xlib.h"; then + ac_x_includes=$ac_dir + break + fi +done fi -rm -f conftest* -fi # $ac_x_includes = NO +rm -f conftest.err conftest.$ac_ext +fi # $ac_x_includes = no -if test "$ac_x_libraries" = NO; then +if test "$ac_x_libraries" = no; then # Check for the libraries. - - test -z "$x_direct_test_library" && x_direct_test_library=Xt - test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc - # See if we find them without any special options. # Don't add to $LIBS permanently. - ac_save_LIBS="$LIBS" - LIBS="-l$x_direct_test_library $LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - LIBS="$ac_save_LIBS" + ac_save_LIBS=$LIBS + LIBS="-lX11 $LIBS" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +XrmInitialize () + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + LIBS=$ac_save_LIBS # We can link X programs with no special library path. ac_x_libraries= else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - LIBS="$ac_save_LIBS" -# First see if replacing the include by lib works. -# Check X11 before X11Rn because it is often a symlink to the current release. -for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \ - /usr/X11/lib \ - /usr/X11R6/lib \ - /usr/X11R5/lib \ - /usr/X11R4/lib \ - \ - /usr/lib/X11 \ - /usr/lib/X11R6 \ - /usr/lib/X11R5 \ - /usr/lib/X11R4 \ - \ - /usr/local/X11/lib \ - /usr/local/X11R6/lib \ - /usr/local/X11R5/lib \ - /usr/local/X11R4/lib \ - \ - /usr/local/lib/X11 \ - /usr/local/lib/X11R6 \ - /usr/local/lib/X11R5 \ - /usr/local/lib/X11R4 \ - \ - /usr/X386/lib \ - /usr/x386/lib \ - /usr/XFree86/lib/X11 \ - \ - /usr/lib \ - /usr/local/lib \ - /usr/unsupported/lib \ - /usr/athena/lib \ - /usr/local/x11r5/lib \ - /usr/lpp/Xamples/lib \ - /lib/usr/lib/X11 \ - \ - /usr/openwin/lib \ - /usr/openwin/share/lib \ - ; \ + LIBS=$ac_save_LIBS +for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g` do - for ac_extension in a so sl; do - if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then + # Don't even attempt the hair of trying to link an X program! + for ac_extension in a so sl dylib la dll; do + if test -r "$ac_dir/libX11.$ac_extension"; then ac_x_libraries=$ac_dir break 2 fi done done fi -rm -f conftest* -fi # $ac_x_libraries = NO - -if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then - # Didn't find X anywhere. Cache the known absence of X. - ac_cv_have_x="have_x=no" -else - # Record where we found X for the cache. - ac_cv_have_x="have_x=yes \ - ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries" -fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi # $ac_x_libraries = no + +case $ac_x_includes,$ac_x_libraries in #( + no,* | *,no | *\'*) + # Didn't find X, or a directory has "'" in its name. + ac_cv_have_x="have_x=no";; #( + *) + # Record where we found X for the cache. + ac_cv_have_x="have_x=yes\ + ac_x_includes='$ac_x_includes'\ + ac_x_libraries='$ac_x_libraries'" +esac fi - fi +;; #( + *) have_x=yes;; + esac eval "$ac_cv_have_x" fi # $with_x != no if test "$have_x" != yes; then - echo "$ac_t""$have_x" 1>&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5 +$as_echo "$have_x" >&6; } no_x=yes else # If each of the values was on the command line, it overrides each guess. test "x$x_includes" = xNONE && x_includes=$ac_x_includes test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries # Update the cache value to reflect the command line values. - ac_cv_have_x="have_x=yes \ - ac_x_includes=$x_includes ac_x_libraries=$x_libraries" - echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6 + ac_cv_have_x="have_x=yes\ + ac_x_includes='$x_includes'\ + ac_x_libraries='$x_libraries'" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5 +$as_echo "libraries $x_libraries, headers $x_includes" >&6; } fi if test "$no_x" = yes; then # Not all programs may use this symbol, but it does not hurt to define it. - cat >> confdefs.h <<\EOF -#define X_DISPLAY_MISSING 1 -EOF + +$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS= else @@ -1298,61 +3785,54 @@ X_LIBS="$X_LIBS -L$x_libraries" # For Solaris; some versions of Sun CC require a space after -R and # others require no space. Words are not sufficient . . . . - case "`(uname -sr) 2>/dev/null`" in - "SunOS 5"*) - echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6 -echo "configure:1305: checking whether -R must be followed by a space" >&5 - ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - ac_R_nospace=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_R_nospace=no + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5 +$as_echo_n "checking whether -R must be followed by a space... " >&6; } + ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries" + ac_xsave_c_werror_flag=$ac_c_werror_flag + ac_c_werror_flag=yes + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + X_LIBS="$X_LIBS -R$x_libraries" +else + LIBS="$ac_xsave_LIBS -R $x_libraries" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + 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; } + X_LIBS="$X_LIBS -R $x_libraries" +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5 +$as_echo "neither works" >&6; } fi -rm -f conftest* - if test $ac_R_nospace = yes; then - echo "$ac_t""no" 1>&6 - X_LIBS="$X_LIBS -R$x_libraries" - else - LIBS="$ac_xsave_LIBS -R $x_libraries" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - ac_R_space=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_R_space=no +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi -rm -f conftest* - if test $ac_R_space = yes; then - echo "$ac_t""yes" 1>&6 - X_LIBS="$X_LIBS -R $x_libraries" - else - echo "$ac_t""neither works" 1>&6 - fi - fi - LIBS="$ac_xsave_LIBS" - esac +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + ac_c_werror_flag=$ac_xsave_c_werror_flag + LIBS=$ac_xsave_LIBS fi # Check for system-dependent libraries X programs must link with. @@ -1362,566 +3842,592 @@ if test "$ISC" = yes; then X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet" else - # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X - # libraries were built with DECnet support. And karl@cs.umb.edu says + # Martyn Johnson says this is needed for Ultrix, if the X + # libraries were built with DECnet support. And Karl Berry says # the Alpha needs dnet_stub (dnet does not exist). - echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6 -echo "configure:1370: checking for dnet_ntoa in -ldnet" >&5 -ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* 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 XOpenDisplay (); +int +main () +{ +return XOpenDisplay (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + else - ac_save_LIBS="$LIBS" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5 +$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; } +if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS LIBS="-ldnet $LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 +/* 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 dnet_ntoa (); +int +main () +{ +return dnet_ntoa (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_dnet_dnet_ntoa=yes +else + ac_cv_lib_dnet_dnet_ntoa=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5 +$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; } +if test "x$ac_cv_lib_dnet_dnet_ntoa" = x""yes; then : X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet" -else - echo "$ac_t""no" 1>&6 fi if test $ac_cv_lib_dnet_dnet_ntoa = no; then - echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6 -echo "configure:1411: checking for dnet_ntoa in -ldnet_stub" >&5 -ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5 +$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; } +if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then : + $as_echo_n "(cached) " >&6 else - ac_save_LIBS="$LIBS" + ac_check_lib_save_LIBS=$LIBS LIBS="-ldnet_stub $LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 +/* 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 dnet_ntoa (); +int +main () +{ +return dnet_ntoa (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_dnet_stub_dnet_ntoa=yes +else + ac_cv_lib_dnet_stub_dnet_ntoa=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5 +$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; } +if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = x""yes; then : X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub" -else - echo "$ac_t""no" 1>&6 fi fi +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LIBS="$ac_xsave_LIBS" # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT, # to get the SysV transport functions. - # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4) + # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4) # needs -lnsl. # The nsl library prevents programs from opening the X display - # on Irix 5.2, according to dickey@clark.net. - echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6 -echo "configure:1459: checking for gethostbyname" >&5 -if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+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 gethostbyname(); - -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_gethostbyname) || defined (__stub___gethostbyname) -choke me -#else -gethostbyname(); -#endif - -; return 0; } -EOF -if { (eval echo configure:1487: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_func_gethostbyname=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_gethostbyname=no" -fi -rm -f conftest* -fi + # on Irix 5.2, according to T.E. Dickey. + # The functions gethostbyname, getservbyname, and inet_addr are + # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking. + ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname" +if test "x$ac_cv_func_gethostbyname" = x""yes; then : -if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then - echo "$ac_t""yes" 1>&6 - : -else - echo "$ac_t""no" 1>&6 fi if test $ac_cv_func_gethostbyname = no; then - echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6 -echo "configure:1508: checking for gethostbyname in -lnsl" >&5 -ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5 +$as_echo_n "checking for gethostbyname in -lnsl... " >&6; } +if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then : + $as_echo_n "(cached) " >&6 else - ac_save_LIBS="$LIBS" + ac_check_lib_save_LIBS=$LIBS LIBS="-lnsl $LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 +/* 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 gethostbyname (); +int +main () +{ +return gethostbyname (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_nsl_gethostbyname=yes +else + ac_cv_lib_nsl_gethostbyname=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5 +$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; } +if test "x$ac_cv_lib_nsl_gethostbyname" = x""yes; then : X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl" -else - echo "$ac_t""no" 1>&6 fi + if test $ac_cv_lib_nsl_gethostbyname = no; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5 +$as_echo_n "checking for gethostbyname in -lbsd... " >&6; } +if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lbsd $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* 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 gethostbyname (); +int +main () +{ +return gethostbyname (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_bsd_gethostbyname=yes +else + ac_cv_lib_bsd_gethostbyname=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5 +$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; } +if test "x$ac_cv_lib_bsd_gethostbyname" = x""yes; then : + X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd" +fi + + fi fi # lieder@skyler.mavd.honeywell.com says without -lsocket, # socket/setsockopt and other routines are undefined under SCO ODT # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary - # on later versions), says simon@lia.di.epfl.ch: it contains - # gethostby* variants that don't use the nameserver (or something). - # -lsocket must be given before -lnsl if both are needed. - # We assume that if connect needs -lnsl, so does gethostbyname. - echo $ac_n "checking for connect""... $ac_c" 1>&6 -echo "configure:1557: checking for connect" >&5 -if eval "test \"`echo '$''{'ac_cv_func_connect'+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 connect(); - -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_connect) || defined (__stub___connect) -choke me -#else -connect(); -#endif - -; return 0; } -EOF -if { (eval echo configure:1585: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_func_connect=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_connect=no" -fi -rm -f conftest* -fi + # on later versions), says Simon Leinen: it contains gethostby* + # variants that don't use the name server (or something). -lsocket + # must be given before -lnsl if both are needed. We assume that + # if connect needs -lnsl, so does gethostbyname. + ac_fn_c_check_func "$LINENO" "connect" "ac_cv_func_connect" +if test "x$ac_cv_func_connect" = x""yes; then : -if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then - echo "$ac_t""yes" 1>&6 - : -else - echo "$ac_t""no" 1>&6 fi if test $ac_cv_func_connect = no; then - echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6 -echo "configure:1606: checking for connect in -lsocket" >&5 -ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5 +$as_echo_n "checking for connect in -lsocket... " >&6; } +if test "${ac_cv_lib_socket_connect+set}" = set; then : + $as_echo_n "(cached) " >&6 else - ac_save_LIBS="$LIBS" + ac_check_lib_save_LIBS=$LIBS LIBS="-lsocket $X_EXTRA_LIBS $LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 +/* 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 connect (); +int +main () +{ +return connect (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_socket_connect=yes +else + ac_cv_lib_socket_connect=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5 +$as_echo "$ac_cv_lib_socket_connect" >&6; } +if test "x$ac_cv_lib_socket_connect" = x""yes; then : X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS" -else - echo "$ac_t""no" 1>&6 fi fi - # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX. - echo $ac_n "checking for remove""... $ac_c" 1>&6 -echo "configure:1649: checking for remove" >&5 -if eval "test \"`echo '$''{'ac_cv_func_remove'+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 remove(); - -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_remove) || defined (__stub___remove) -choke me -#else -remove(); -#endif - -; return 0; } -EOF -if { (eval echo configure:1677: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_func_remove=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_remove=no" -fi -rm -f conftest* -fi + # Guillermo Gomez says -lposix is necessary on A/UX. + ac_fn_c_check_func "$LINENO" "remove" "ac_cv_func_remove" +if test "x$ac_cv_func_remove" = x""yes; then : -if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then - echo "$ac_t""yes" 1>&6 - : -else - echo "$ac_t""no" 1>&6 fi if test $ac_cv_func_remove = no; then - echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6 -echo "configure:1698: checking for remove in -lposix" >&5 -ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5 +$as_echo_n "checking for remove in -lposix... " >&6; } +if test "${ac_cv_lib_posix_remove+set}" = set; then : + $as_echo_n "(cached) " >&6 else - ac_save_LIBS="$LIBS" + ac_check_lib_save_LIBS=$LIBS LIBS="-lposix $LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix" -else - echo "$ac_t""no" 1>&6 -fi - - fi - - # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay. - echo $ac_n "checking for shmat""... $ac_c" 1>&6 -echo "configure:1741: checking for shmat" >&5 -if eval "test \"`echo '$''{'ac_cv_func_shmat'+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 shmat(); - -int main() { +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end 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_shmat) || defined (__stub___shmat) -choke me -#else -shmat(); +/* 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 - -; return 0; } -EOF -if { (eval echo configure:1769: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_func_shmat=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_shmat=no" -fi -rm -f conftest* +char remove (); +int +main () +{ +return remove (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_posix_remove=yes +else + ac_cv_lib_posix_remove=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5 +$as_echo "$ac_cv_lib_posix_remove" >&6; } +if test "x$ac_cv_lib_posix_remove" = x""yes; then : + X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix" fi -if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then - echo "$ac_t""yes" 1>&6 - : -else - echo "$ac_t""no" 1>&6 + fi + + # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay. + ac_fn_c_check_func "$LINENO" "shmat" "ac_cv_func_shmat" +if test "x$ac_cv_func_shmat" = x""yes; then : + fi if test $ac_cv_func_shmat = no; then - echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6 -echo "configure:1790: checking for shmat in -lipc" >&5 -ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5 +$as_echo_n "checking for shmat in -lipc... " >&6; } +if test "${ac_cv_lib_ipc_shmat+set}" = set; then : + $as_echo_n "(cached) " >&6 else - ac_save_LIBS="$LIBS" + ac_check_lib_save_LIBS=$LIBS LIBS="-lipc $LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 +/* 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 shmat (); +int +main () +{ +return shmat (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_ipc_shmat=yes +else + ac_cv_lib_ipc_shmat=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5 +$as_echo "$ac_cv_lib_ipc_shmat" >&6; } +if test "x$ac_cv_lib_ipc_shmat" = x""yes; then : X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc" -else - echo "$ac_t""no" 1>&6 fi fi fi # Check for libraries that X11R6 Xt/Xaw programs need. - ac_save_LDFLAGS="$LDFLAGS" + ac_save_LDFLAGS=$LDFLAGS test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries" # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to # check for ICE first), but we must link in the order -lSM -lICE or # we get undefined symbols. So assume we have SM if we have ICE. # These have to be linked with before -lX11, unlike the other # libraries we check for below, so use a different variable. - # --interran@uluru.Stanford.EDU, kb@cs.umb.edu. - echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6 -echo "configure:1842: checking for IceConnectionNumber in -lICE" >&5 -ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-lICE $LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" + # John Interrante, Karl Berry + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5 +$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; } +if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lICE $X_EXTRA_LIBS $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* 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 IceConnectionNumber (); +int +main () +{ +return IceConnectionNumber (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_ICE_IceConnectionNumber=yes +else + ac_cv_lib_ICE_IceConnectionNumber=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5 +$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; } +if test "x$ac_cv_lib_ICE_IceConnectionNumber" = x""yes; then : + X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE" fi -rm -f conftest* -LIBS="$ac_save_LIBS" + + LDFLAGS=$ac_save_LDFLAGS fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE" + + +{ $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 - echo "$ac_t""no" 1>&6 + 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 - LDFLAGS="$ac_save_LDFLAGS" + $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" -echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:1887: checking for ANSI C header files" >&5 -if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +{ $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 > conftest.$ac_ext <conftest.$ac_ext +/* end confdefs.h. */ #include #include #include #include -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1900: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` -if test -z "$ac_err"; then - rm -rf conftest* + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* ac_cv_header_stdc=no fi -rm -f conftest* +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 > conftest.$ac_ext <conftest.$ac_ext +/* end confdefs.h. */ #include -EOF + +_ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "memchr" >/dev/null 2>&1; then - : + $EGREP "memchr" >/dev/null 2>&1; then : + else - rm -rf conftest* ac_cv_header_stdc=no fi rm -f conftest* @@ -1930,16 +4436,15 @@ if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. -cat > conftest.$ac_ext <conftest.$ac_ext +/* end confdefs.h. */ #include -EOF + +_ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "free" >/dev/null 2>&1; then - : + $EGREP "free" >/dev/null 2>&1; then : + else - rm -rf conftest* ac_cv_header_stdc=no fi rm -f conftest* @@ -1948,529 +4453,501 @@ 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 + if test "$cross_compiling" = yes; then : : else - cat > conftest.$ac_ext <conftest.$ac_ext +/* end confdefs.h. */ #include -#define ISLOWER(c) ('a' <= (c) && (c) <= 'z') -#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#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)) exit(2); -exit (0); } - -EOF -if { (eval echo configure:1967: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null -then - : +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 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* ac_cv_header_stdc=no fi -rm -fr conftest* +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi - -echo "$ac_t""$ac_cv_header_stdc" 1>&6 +{ $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 - cat >> confdefs.h <<\EOF -#define STDC_HEADERS 1 -EOF + +$as_echo "#define STDC_HEADERS 1" >>confdefs.h fi -echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6 -echo "configure:1991: checking for sys/wait.h that is POSIX.1 compatible" >&5 -if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5 +$as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; } +if test "${ac_cv_header_sys_wait_h+set}" = set; then : + $as_echo_n "(cached) " >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext +/* end confdefs.h. */ #include #include #ifndef WEXITSTATUS -#define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8) +# define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8) #endif #ifndef WIFEXITED -#define WIFEXITED(stat_val) (((stat_val) & 255) == 0) +# define WIFEXITED(stat_val) (((stat_val) & 255) == 0) #endif -int main() { -int s; -wait (&s); -s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; -; return 0; } -EOF -if { (eval echo configure:2012: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* + +int +main () +{ + int s; + wait (&s); + s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_sys_wait_h=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* ac_cv_header_sys_wait_h=no fi -rm -f conftest* +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi - -echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_wait_h" >&5 +$as_echo "$ac_cv_header_sys_wait_h" >&6; } if test $ac_cv_header_sys_wait_h = yes; then - cat >> confdefs.h <<\EOF -#define HAVE_SYS_WAIT_H 1 -EOF + +$as_echo "#define HAVE_SYS_WAIT_H 1" >>confdefs.h fi -for ac_hdr in fcntl.h limits.h sys/time.h unistd.h sys/select.h sys/resource.h sys/stat.h termio.h X11/extensions/shape.h -do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2036: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2046: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` -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" +# 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 -rm -f conftest* + +done + + +for ac_header in fcntl.h limits.h sys/time.h sys/types.h unistd.h sys/select.h sys/resource.h sys/stat.h termio.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_mongrel "$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 + +ac_save_CPPFLAGS="$CPPFLAGS" +CPPFLAGS="$X_CFLAGS $CPPFLAGS" +for ac_header in X11/extensions/shape.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "X11/extensions/shape.h" "ac_cv_header_X11_extensions_shape_h" "$ac_includes_default" +if test "x$ac_cv_header_X11_extensions_shape_h" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_X11_EXTENSIONS_SHAPE_H 1 +_ACEOF + fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` - cat >> confdefs.h <&6 -fi -done - - -echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:2074: checking for working const" >&5 -if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext <j = 5; -} -{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ - const int foo = 10; -} - -; return 0; } -EOF -if { (eval echo configure:2128: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* + +done + +CPPFLAGS="$ac_save_CPPFLAGS" + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 +$as_echo_n "checking for an ANSI C-conforming const... " >&6; } +if test "${ac_cv_c_const+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ +/* FIXME: Include the comments suggested by Paul. */ +#ifndef __cplusplus + /* Ultrix mips cc rejects this. */ + typedef int charset[2]; + const charset cs; + /* SunOS 4.1.1 cc rejects this. */ + char const *const *pcpcc; + char **ppc; + /* NEC SVR4.0.2 mips cc rejects this. */ + struct point {int x, y;}; + static struct point const zero = {0,0}; + /* AIX XL C 1.02.0.0 rejects this. + It does not let you subtract one const X* pointer from another in + an arm of an if-expression whose if-part is not a constant + expression */ + const char *g = "string"; + pcpcc = &g + (g ? g-g : 0); + /* HPUX 7.0 cc rejects these. */ + ++pcpcc; + ppc = (char**) pcpcc; + pcpcc = (char const *const *) ppc; + { /* SCO 3.2v4 cc rejects this. */ + char *t; + char const *s = 0 ? (char *) 0 : (char const *) 0; + + *t++ = 0; + if (s) return 0; + } + { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ + int x[] = {25, 17}; + const int *foo = &x[0]; + ++foo; + } + { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ + typedef const int *iptr; + iptr p = 0; + ++p; + } + { /* AIX XL C 1.02.0.0 rejects this saying + "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ + struct s { int j; const int *ap[3]; }; + struct s *b; b->j = 5; + } + { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ + const int foo = 10; + if (!foo) return 0; + } + return !cs[0] && !zero.x; +#endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_const=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* ac_cv_c_const=no fi -rm -f conftest* +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi - -echo "$ac_t""$ac_cv_c_const" 1>&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 +$as_echo "$ac_cv_c_const" >&6; } if test $ac_cv_c_const = no; then - cat >> confdefs.h <<\EOF -#define const -EOF + +$as_echo "#define const /**/" >>confdefs.h fi -echo $ac_n "checking for pid_t""... $ac_c" 1>&6 -echo "configure:2149: checking for pid_t" >&5 -if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5 +$as_echo_n "checking whether char is unsigned... " >&6; } +if test "${ac_cv_c_char_unsigned+set}" = set; then : + $as_echo_n "(cached) " >&6 else - cat > conftest.$ac_ext < -#if STDC_HEADERS -#include -#include -#endif -EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then - rm -rf conftest* - ac_cv_type_pid_t=yes + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((char) -1) < 0)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_c_char_unsigned=no else - rm -rf conftest* - ac_cv_type_pid_t=no + ac_cv_c_char_unsigned=yes fi -rm -f conftest* +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5 +$as_echo "$ac_cv_c_char_unsigned" >&6; } +if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then + $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h fi -echo "$ac_t""$ac_cv_type_pid_t" 1>&6 -if test $ac_cv_type_pid_t = no; then - cat >> confdefs.h <<\EOF + +ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default" +if test "x$ac_cv_type_pid_t" = x""yes; then : + +else + +cat >>confdefs.h <<_ACEOF #define pid_t int -EOF +_ACEOF fi -echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:2182: checking for size_t" >&5 -if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -#if STDC_HEADERS -#include -#include -#endif -EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then - rm -rf conftest* - ac_cv_type_size_t=yes +ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" +if test "x$ac_cv_type_size_t" = x""yes; then : + else - rm -rf conftest* - ac_cv_type_size_t=no -fi -rm -f conftest* -fi -echo "$ac_t""$ac_cv_type_size_t" 1>&6 -if test $ac_cv_type_size_t = no; then - cat >> confdefs.h <<\EOF -#define size_t unsigned -EOF +cat >>confdefs.h <<_ACEOF +#define size_t unsigned int +_ACEOF fi -echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 -echo "configure:2215: checking whether time.h and sys/time.h may both be included" >&5 -if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext <&5 +$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; } +if test "${ac_cv_header_time+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ #include #include #include -int main() { -struct tm *tp; -; return 0; } -EOF -if { (eval echo configure:2229: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* + +int +main () +{ +if ((struct tm *) 0) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_time=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* ac_cv_header_time=no fi -rm -f conftest* +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi - -echo "$ac_t""$ac_cv_header_time" 1>&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5 +$as_echo "$ac_cv_header_time" >&6; } if test $ac_cv_header_time = yes; then - cat >> confdefs.h <<\EOF -#define TIME_WITH_SYS_TIME 1 -EOF + +$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h fi -echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6 -echo "configure:2250: checking whether struct tm is in sys/time.h or time.h" >&5 -if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5 +$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; } +if test "${ac_cv_struct_tm+set}" = set; then : + $as_echo_n "(cached) " >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext +/* end confdefs.h. */ #include #include -int main() { -struct tm *tp; tp->tm_sec; -; return 0; } -EOF -if { (eval echo configure:2263: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* + +int +main () +{ +struct tm tm; + int *p = &tm.tm_sec; + return !p; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_struct_tm=time.h else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* ac_cv_struct_tm=sys/time.h fi -rm -f conftest* +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi - -echo "$ac_t""$ac_cv_struct_tm" 1>&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5 +$as_echo "$ac_cv_struct_tm" >&6; } if test $ac_cv_struct_tm = sys/time.h; then - cat >> confdefs.h <<\EOF -#define TM_IN_SYS_TIME 1 -EOF + +$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h fi # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works # for constant arguments. Useless! -echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 -echo "configure:2287: checking for working alloca.h" >&5 -if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext <&5 +$as_echo_n "checking for working alloca.h... " >&6; } +if test "${ac_cv_working_alloca_h+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ #include -int main() { -char *p = alloca(2 * sizeof(int)); -; return 0; } -EOF -if { (eval echo configure:2299: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - ac_cv_header_alloca_h=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_header_alloca_h=no +int +main () +{ +char *p = (char *) alloca (2 * sizeof (int)); + if (p) return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_working_alloca_h=yes +else + ac_cv_working_alloca_h=no fi -rm -f conftest* +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5 +$as_echo "$ac_cv_working_alloca_h" >&6; } +if test $ac_cv_working_alloca_h = yes; then -echo "$ac_t""$ac_cv_header_alloca_h" 1>&6 -if test $ac_cv_header_alloca_h = yes; then - cat >> confdefs.h <<\EOF -#define HAVE_ALLOCA_H 1 -EOF +$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h fi -echo $ac_n "checking for alloca""... $ac_c" 1>&6 -echo "configure:2320: checking for alloca" >&5 -if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext <&5 +$as_echo_n "checking for alloca... " >&6; } +if test "${ac_cv_func_alloca_works+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ #ifdef __GNUC__ # define alloca __builtin_alloca #else -# if HAVE_ALLOCA_H -# include +# ifdef _MSC_VER +# include +# define alloca _alloca # else -# ifdef _AIX - #pragma alloca +# ifdef HAVE_ALLOCA_H +# include # else -# ifndef alloca /* predefined by HP cc +Olibcalls */ +# ifdef _AIX + #pragma alloca +# else +# ifndef alloca /* predefined by HP cc +Olibcalls */ char *alloca (); +# endif # endif # endif # endif #endif -int main() { -char *p = (char *) alloca(1); -; return 0; } -EOF -if { (eval echo configure:2348: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* +int +main () +{ +char *p = (char *) alloca (1); + if (p) return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : ac_cv_func_alloca_works=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* ac_cv_func_alloca_works=no fi -rm -f conftest* +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5 +$as_echo "$ac_cv_func_alloca_works" >&6; } -echo "$ac_t""$ac_cv_func_alloca_works" 1>&6 if test $ac_cv_func_alloca_works = yes; then - cat >> confdefs.h <<\EOF -#define HAVE_ALLOCA 1 -EOF -fi +$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h -if test $ac_cv_func_alloca_works = no; then +else # The SVR3 libPW and SVR4 libucb both contain incompatible functions - # that cause trouble. Some versions do not even contain alloca or - # contain a buggy version. If you still want to use their alloca, - # use ar to extract alloca.o from them instead of compiling alloca.c. - ALLOCA=alloca.o - cat >> confdefs.h <<\EOF -#define C_ALLOCA 1 -EOF - - -echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 -echo "configure:2380: checking whether alloca needs Cray hooks" >&5 -if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext <>confdefs.h + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5 +$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; } +if test "${ac_cv_os_cray+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#if defined CRAY && ! defined CRAY2 webecray #else wenotbecray #endif -EOF +_ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "webecray" >/dev/null 2>&1; then - rm -rf conftest* + $EGREP "webecray" >/dev/null 2>&1; then : ac_cv_os_cray=yes else - rm -rf conftest* ac_cv_os_cray=no fi rm -f conftest* fi - -echo "$ac_t""$ac_cv_os_cray" 1>&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5 +$as_echo "$ac_cv_os_cray" >&6; } if test $ac_cv_os_cray = yes; then -for ac_func in _getb67 GETB67 getb67; do - echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2410: 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 - -; return 0; } -EOF -if { (eval echo configure:2438: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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 + for ac_func in _getb67 GETB67 getb67; 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 : -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - cat >> confdefs.h <>confdefs.h <<_ACEOF #define CRAY_STACKSEG_END $ac_func -EOF +_ACEOF - break -else - echo "$ac_t""no" 1>&6 + break fi -done + done fi -echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 -echo "configure:2465: checking stack direction for C alloca" >&5 -if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5 +$as_echo_n "checking stack direction for C alloca... " >&6; } +if test "${ac_cv_c_stack_direction+set}" = set; then : + $as_echo_n "(cached) " >&6 else - if test "$cross_compiling" = yes; then + if test "$cross_compiling" = yes; then : ac_cv_c_stack_direction=0 else - cat > conftest.$ac_ext <conftest.$ac_ext +/* end confdefs.h. */ +$ac_includes_default +int find_stack_direction () { static char *addr = 0; @@ -2483,90 +4960,83 @@ else return (&dummy > addr) ? 1 : -1; } + +int main () { - exit (find_stack_direction() < 0); + return find_stack_direction () < 0; } -EOF -if { (eval echo configure:2492: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null -then +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : ac_cv_c_stack_direction=1 else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* ac_cv_c_stack_direction=-1 fi -rm -fr conftest* +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi - -echo "$ac_t""$ac_cv_c_stack_direction" 1>&6 -cat >> confdefs.h <&5 +$as_echo "$ac_cv_c_stack_direction" >&6; } +cat >>confdefs.h <<_ACEOF #define STACK_DIRECTION $ac_cv_c_stack_direction -EOF +_ACEOF + fi -echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 -echo "configure:2514: checking return type of signal handlers" >&5 -if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5 +$as_echo_n "checking return type of signal handlers... " >&6; } +if test "${ac_cv_type_signal+set}" = set; then : + $as_echo_n "(cached) " >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext +/* end confdefs.h. */ #include #include -#ifdef signal -#undef signal -#endif -#ifdef __cplusplus -extern "C" void (*signal (int, void (*)(int)))(int); -#else -void (*signal ()) (); -#endif -int main() { -int i; -; return 0; } -EOF -if { (eval echo configure:2536: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_type_signal=void -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* +int +main () +{ +return *(signal (0, 0)) (0) == 1; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_type_signal=int +else + ac_cv_type_signal=void fi -rm -f conftest* +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5 +$as_echo "$ac_cv_type_signal" >&6; } -echo "$ac_t""$ac_cv_type_signal" 1>&6 -cat >> confdefs.h <>confdefs.h <<_ACEOF #define RETSIGTYPE $ac_cv_type_signal -EOF +_ACEOF -echo $ac_n "checking for wait3 that fills in rusage""... $ac_c" 1>&6 -echo "configure:2555: checking for wait3 that fills in rusage" >&5 -if eval "test \"`echo '$''{'ac_cv_func_wait3_rusage'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for wait3 that fills in rusage" >&5 +$as_echo_n "checking for wait3 that fills in rusage... " >&6; } +if test "${ac_cv_func_wait3_rusage+set}" = set; then : + $as_echo_n "(cached) " >&6 else - if test "$cross_compiling" = yes; then + if test "$cross_compiling" = yes; then : ac_cv_func_wait3_rusage=no else - cat > conftest.$ac_ext < + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_includes_default #include #include -#include +#include /* HP-UX has wait3 but does not fill in rusage at all. */ -main() { +int +main () +{ struct rusage r; int i; /* Use a field that we can force nonzero -- @@ -2577,248 +5047,212 @@ r.ru_stime.tv_sec = 0; r.ru_stime.tv_usec = 0; r.ru_majflt = r.ru_minflt = 0; - switch (fork()) { - case 0: /* Child. */ - sleep(1); /* Give up the CPU. */ - _exit(0); - case -1: _exit(0); /* What can we do? */ - default: /* Parent. */ - wait3(&i, 0, &r); - sleep(2); /* Avoid "text file busy" from rm on fast HP-UX machines. */ - exit(r.ru_nvcsw == 0 && r.ru_majflt == 0 && r.ru_minflt == 0 - && r.ru_stime.tv_sec == 0 && r.ru_stime.tv_usec == 0); - } + switch (fork ()) + { + case 0: /* Child. */ + sleep(1); /* Give up the CPU. */ + _exit(0); + break; + case -1: /* What can we do? */ + _exit(0); + break; + default: /* Parent. */ + wait3(&i, 0, &r); + /* Avoid "text file busy" from rm on fast HP-UX machines. */ + sleep(2); + return (r.ru_nvcsw == 0 && r.ru_majflt == 0 && r.ru_minflt == 0 + && r.ru_stime.tv_sec == 0 && r.ru_stime.tv_usec == 0); + } } -EOF -if { (eval echo configure:2594: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null -then +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : ac_cv_func_wait3_rusage=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* ac_cv_func_wait3_rusage=no fi -rm -fr conftest* +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi - -echo "$ac_t""$ac_cv_func_wait3_rusage" 1>&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_wait3_rusage" >&5 +$as_echo "$ac_cv_func_wait3_rusage" >&6; } if test $ac_cv_func_wait3_rusage = yes; then - cat >> confdefs.h <<\EOF -#define HAVE_WAIT3 1 -EOF + +$as_echo "#define HAVE_WAIT3 1" >>confdefs.h fi for ac_func in select strdup waitpid -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2619: 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(); +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 -int main() { +fi +done -/* 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:2647: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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 <&5 +$as_echo_n "checking for broken libXmu... " >&6; } +old_LIBS="$LIBS" +LIBS="$X_LIBS $X_PRE_LIBS -lXext -lXmu -lX11 $X_EXTRA_LIBS $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + extern void XmuCopyISOLatin1Lowered(char *,char *); + char foo[]="FOO"; + XmuCopyISOLatin1Lowered (foo, foo); + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +XT_LIB_KLUDGE="" else - echo "$ac_t""no" 1>&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +XT_LIB_KLUDGE="-lXt" fi -done +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS="$old_LIBS" -ac_save_LIBS="$LIBS" -LIBS="$X_LIBS $X_PRE_LIBS -lXext -lXmu -lX11 $X_EXTRA_LIBS $LIBS" -echo $ac_n "checking for XShapeQueryExtension""... $ac_c" 1>&6 -echo "configure:2674: checking for XShapeQueryExtension" >&5 -if eval "test \"`echo '$''{'ac_cv_func_XShapeQueryExtension'+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 XShapeQueryExtension(); -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_XShapeQueryExtension) || defined (__stub___XShapeQueryExtension) -choke me -#else -XShapeQueryExtension(); -#endif +if test "x$ac_cv_header_X11_extensions_shape_h" = xyes; then + ac_save_LIBS="$LIBS" + LIBS="$X_LIBS $X_PRE_LIBS $XT_LIB_KLUDGE -lXext -lXmu -lX11 $X_EXTRA_LIBS $LIBS" + ac_fn_c_check_func "$LINENO" "XShapeQueryExtension" "ac_cv_func_XShapeQueryExtension" +if test "x$ac_cv_func_XShapeQueryExtension" = x""yes; then : -; return 0; } -EOF -if { (eval echo configure:2702: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_func_XShapeQueryExtension=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_XShapeQueryExtension=no" -fi -rm -f conftest* -fi +$as_echo "#define HAVE_XSHAPE 1" >>confdefs.h -if eval "test \"`echo '$ac_cv_func_'XShapeQueryExtension`\" = yes"; then - echo "$ac_t""yes" 1>&6 - cat >> confdefs.h <<\EOF -#define HAVE_XSHAPE 1 -EOF +fi + LIBS="$ac_save_LIBS" else - echo "$ac_t""no" 1>&6 + : fi -LIBS="$ac_save_LIBS" - -echo $ac_n "checking number of arguments to gettimeofday""... $ac_c" 1>&6 -echo "configure:2727: checking number of arguments to gettimeofday" >&5 -cat > conftest.$ac_ext <&5 +$as_echo_n "checking number of arguments to gettimeofday... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ #include #ifdef HAVE_SYS_TIME_H #include #endif -int main() { +int +main () +{ struct timeval tp; struct timezone tz; gettimeofday(&tp, &tz); -; return 0; } -EOF -if { (eval echo configure:2745: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - cat >> confdefs.h <<\EOF -#define BSD_STYLE_GETTIMEOFDAY 1 -EOF - -echo "$ac_t""2" 1>&6 -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - echo "$ac_t""1" 1>&6 -fi -rm -f conftest* + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : -echo $ac_n "checking for caddr_t""... $ac_c" 1>&6 -echo "configure:2761: checking for caddr_t" >&5 -if eval "test \"`echo '$''{'ac_cv_type_caddr_t'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -#if STDC_HEADERS -#include -#include -#endif -EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "caddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then - rm -rf conftest* - ac_cv_type_caddr_t=yes +$as_echo "#define BSD_STYLE_GETTIMEOFDAY 1" >>confdefs.h + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: 2" >&5 +$as_echo "2" >&6; } else - rm -rf conftest* - ac_cv_type_caddr_t=no + { $as_echo "$as_me:${as_lineno-$LINENO}: result: 1" >&5 +$as_echo "1" >&6; } fi -rm -f conftest* +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext -fi -echo "$ac_t""$ac_cv_type_caddr_t" 1>&6 -if test $ac_cv_type_caddr_t = no; then - cat >> confdefs.h <<\EOF +ac_fn_c_check_type "$LINENO" "caddr_t" "ac_cv_type_caddr_t" "$ac_includes_default" +if test "x$ac_cv_type_caddr_t" = x""yes; then : + +else + +cat >>confdefs.h <<_ACEOF #define caddr_t char * -EOF +_ACEOF fi -echo $ac_n "checking for XPointer""... $ac_c" 1>&6 -echo "configure:2794: checking for XPointer" >&5 -cat > conftest.$ac_ext <&5 +$as_echo_n "checking for XPointer... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ #include <$x_includes${x_includes:+/}X11/Xlib.h> -EOF + +_ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "XPointer[^a-zA-Z_]" >/dev/null 2>&1; then - rm -rf conftest* - echo "$ac_t""yes" 1>&6 -else - rm -rf conftest* - cat >> confdefs.h <<\EOF -#define XPointer caddr_t -EOF + $EGREP "XPointer[^a-zA-Z_]" >/dev/null 2>&1; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else -echo "$ac_t""no" 1>&6 +$as_echo "#define XPointer caddr_t" >>confdefs.h + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi rm -f conftest* -echo $ac_n "checking byteorder""... $ac_c" 1>&6 -echo "configure:2816: checking byteorder" >&5 -if test "$cross_compiling" = yes; then - echo "$ac_t""no idea" 1>&6 -else - cat > conftest.$ac_ext <>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + +LIBS="$ac_save_LIBS" + +if test "x$ac_cv_func_XCreateFontSet:$ac_cv_func_XmbTextEscapement:$use_fontsets" = xyes:yes:auto; then + use_fontsets=yes +else + : +fi + +if test "x$use_fontsets" = xyes; then + $as_echo "#define USE_FONTSETS 1" >>confdefs.h + +else + : +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking byteorder" >&5 +$as_echo_n "checking byteorder... " >&6; } +if test "$cross_compiling" = yes; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no idea" >&5 +$as_echo "no idea" >&6; } +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ int main() { @@ -2829,328 +5263,1164 @@ return 0; } -EOF -if { (eval echo configure:2834: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null -then - cat >> confdefs.h <<\EOF -#define LAME_ENDIAN 1 -EOF +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : -echo "$ac_t""backward" 1>&6 +$as_echo "#define LAME_ENDIAN 1" >>confdefs.h + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: backward" >&5 +$as_echo "backward" >&6; } else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - echo "$ac_t""normal" 1>&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: normal" >&5 +$as_echo "normal" >&6; } fi -rm -fr conftest* +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi -echo $ac_n "checking for broken libXmu""... $ac_c" 1>&6 -echo "configure:2853: checking for broken libXmu" >&5 -old_LIBS="$LIBS" -LIBS="$X_LIBS $X_PRE_LIBS -lXext -lXmu -lX11 $X_EXTRA_LIBS $LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - echo "$ac_t""no" 1>&6 -XT_LIB_KLUDGE="" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - echo "$ac_t""yes" 1>&6 -XT_LIB_KLUDGE="-lXt" -fi -rm -f conftest* -LIBS="$old_LIBS" - - +ac_config_files="$ac_config_files Makefile libami/Makefile" -trap '' 1 2 15 -cat > confcache <<\EOF +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) 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 - -trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 - # Transform confdefs.h into DEFS. # Protect against shell expansion while executing Makefile rules. # Protect against Makefile macro expansion. -cat > conftest.defs <<\EOF -s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g -s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g -s%\[%\\&%g -s%\]%\\&%g -s%\$%$$%g -EOF -DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '` -rm -f conftest.defs +# +# If the first sed substitution is executed (which looks for macros that +# take arguments), then branch to the quote section. Otherwise, +# look for a macro that doesn't take arguments. +ac_script=' +:mline +/\\$/{ + N + s,\\\n,, + b mline +} +t clear +:clear +s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g +t quote +s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g +t quote +b any +:quote +s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g +s/\[/\\&/g +s/\]/\\&/g +s/\$/$$/g +H +:any +${ + g + s/^\n// + s/\n/ /g + p +} +' +DEFS=`sed -n "$ac_script" confdefs.h` -# Without the "./", some shells look in PATH for config.status. -: ${CONFIG_STATUS=./config.status} +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 -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.12" - 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 -ac_given_INSTALL="$INSTALL" - -trap 'rm -fr `echo "Makefile libami/Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 -EOF -cat >> $CONFIG_STATUS < conftest.subs <<\\CEOF -$ac_vpsub -$extrasub -s%@CFLAGS@%$CFLAGS%g -s%@CPPFLAGS@%$CPPFLAGS%g -s%@CXXFLAGS@%$CXXFLAGS%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%@CC@%$CC%g -s%@AWK@%$AWK%g -s%@YACC@%$YACC%g -s%@LEX@%$LEX%g -s%@LEXLIB@%$LEXLIB%g -s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g -s%@INSTALL_DATA@%$INSTALL_DATA%g -s%@LN_S@%$LN_S%g -s%@RANLIB@%$RANLIB%g -s%@CPP@%$CPP%g -s%@X_CFLAGS@%$X_CFLAGS%g -s%@X_PRE_LIBS@%$X_PRE_LIBS%g -s%@X_LIBS@%$X_LIBS%g -s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g -s%@ALLOCA@%$ALLOCA%g -s%@XT_LIB_KLUDGE@%$XT_LIB_KLUDGE%g -s%@x_includes@%$x_includes%g -s%@x_libraries@%$x_libraries%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 +# NLS nuisances. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + + +# 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 + + +# 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 - sed "${ac_end}q" conftest.subs > conftest.s$ac_file + as_ln_s='cp -p' fi - if test ! -s conftest.s$ac_file; then - ac_more_lines=false - rm -f conftest.s$ac_file +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" + + +} # 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 - 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" ;; - esac - - # 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_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 $as_me, which was +generated by GNU Autoconf 2.64. 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_config_files in *" +"*) set x $ac_config_files; shift; ac_config_files=$*;; +esac + + + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +# Files that config.status was made for. +config_files="$ac_config_files" + +_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 + -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 + +Configuration files: +$config_files + +Report bugs to the package provider." + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_cs_version="\\ +config.status +configured by $0, generated by GNU Autoconf 2.64, + with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" + +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' +INSTALL='$INSTALL' +AWK='$AWK' +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 ;; + --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;; + --he | --h | --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 ;; + + 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 + +_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 + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +_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 + "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; + "libami/Makefile") CONFIG_FILES="$CONFIG_FILES libami/Makefile" ;; + + *) 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 +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_dir_suffix= ac_dots= + 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 + } + + print line +} + +_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" + + +eval set X " :F $CONFIG_FILES " +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_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" ;; - esac - - case "$ac_given_INSTALL" in - [/$]*) INSTALL="$ac_given_INSTALL" ;; - *) INSTALL="$ac_dots$ac_given_INSTALL" ;; - esac - - 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 - - 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 -s%@INSTALL@%$INSTALL%g -" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file -fi; done -rm -f conftest.s* - -EOF -cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF - -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 + 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 + # + + case $INSTALL in + [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; + *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; + esac +_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 +s&@INSTALL@&$ac_INSTALL&;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 + ;; + + + + 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 diff -Nru amiwm-0.20.48/configure.in amiwm-0.21pl2/configure.in --- amiwm-0.20.48/configure.in 1997-12-12 23:07:23.000000000 +0000 +++ amiwm-0.21pl2/configure.in 2010-04-09 22:15:15.000000000 +0000 @@ -1,5 +1,8 @@ AC_INIT(diskobject.c) +AC_ENABLE(fontsets, + [use_fontsets="$enableval"], [use_fontsets=auto]) + AC_PROG_CC AC_ISC_POSIX AC_PROG_AWK @@ -13,9 +16,14 @@ AC_HEADER_STDC AC_HEADER_SYS_WAIT -AC_CHECK_HEADERS(fcntl.h limits.h sys/time.h unistd.h sys/select.h sys/resource.h sys/stat.h termio.h X11/extensions/shape.h) +AC_CHECK_HEADERS(fcntl.h limits.h sys/time.h sys/types.h unistd.h sys/select.h sys/resource.h sys/stat.h termio.h) +ac_save_CPPFLAGS="$CPPFLAGS" +CPPFLAGS="$X_CFLAGS $CPPFLAGS" +AC_CHECK_HEADERS(X11/extensions/shape.h) +CPPFLAGS="$ac_save_CPPFLAGS" AC_C_CONST +AC_C_CHAR_UNSIGNED AC_TYPE_PID_T AC_TYPE_SIZE_T AC_HEADER_TIME @@ -25,10 +33,34 @@ AC_TYPE_SIGNAL AC_FUNC_WAIT3 AC_CHECK_FUNCS(select strdup waitpid) -ac_save_LIBS="$LIBS" + + +dnl On SunOS4, libXmu seems to be all in one unit forcing references +dnl to libXt into the linking. Only fix I can think of is to link with +dnl libXt too, so that's what we'll do. + +AC_MSG_CHECKING([for broken libXmu]) +old_LIBS="$LIBS" LIBS="$X_LIBS $X_PRE_LIBS -lXext -lXmu -lX11 $X_EXTRA_LIBS $LIBS" -AC_CHECK_FUNC(XShapeQueryExtension, AC_DEFINE([HAVE_XSHAPE])) -LIBS="$ac_save_LIBS" +AC_TRY_LINK([],[ + extern void XmuCopyISOLatin1Lowered(char *,char *); + char foo[]="FOO"; + XmuCopyISOLatin1Lowered (foo, foo); +], AC_MSG_RESULT([no]) +XT_LIB_KLUDGE="", AC_MSG_RESULT([yes]) +XT_LIB_KLUDGE="-lXt") +LIBS="$old_LIBS" +AC_SUBST(XT_LIB_KLUDGE) + + +if test "x$ac_cv_header_X11_extensions_shape_h" = xyes; then + ac_save_LIBS="$LIBS" + LIBS="$X_LIBS $X_PRE_LIBS $XT_LIB_KLUDGE -lXext -lXmu -lX11 $X_EXTRA_LIBS $LIBS" + AC_CHECK_FUNC(XShapeQueryExtension, AC_DEFINE([HAVE_XSHAPE],1,[Define this if your Xlib supports the SHAPE X server extension.])) + LIBS="$ac_save_LIBS" +else + : +fi AC_MSG_CHECKING([number of arguments to gettimeofday]) AC_TRY_LINK([ @@ -40,14 +72,31 @@ struct timeval tp; struct timezone tz; gettimeofday(&tp, &tz); -], AC_DEFINE(BSD_STYLE_GETTIMEOFDAY) +], AC_DEFINE(BSD_STYLE_GETTIMEOFDAY,1,[Define this if gettimeofday() takes two arguments.]) AC_MSG_RESULT([2]), AC_MSG_RESULT([1])) AC_CHECK_TYPE(caddr_t, char *) AC_MSG_CHECKING([for XPointer]) -AC_EGREP_HEADER([XPointer[^a-zA-Z_]], [$]x_includes[$]{x_includes:+/}X11/Xlib.h, AC_MSG_RESULT([yes]), AC_DEFINE(XPointer, caddr_t) +AC_EGREP_HEADER([XPointer[^a-zA-Z_]], [$]x_includes[$]{x_includes:+/}X11/Xlib.h, AC_MSG_RESULT([yes]), AC_DEFINE(XPointer, caddr_t,[Define this to a pointer type if XPointer is not a predefined type]) AC_MSG_RESULT([no])) +ac_save_LIBS="$LIBS" +LIBS="$X_LIBS $X_PRE_LIBS $XT_LIB_KLUDGE -lXext -lXmu -lX11 $X_EXTRA_LIBS $LIBS" +AC_CHECK_FUNCS(XCreateFontSet XmbTextEscapement Xutf8DrawImageString) +LIBS="$ac_save_LIBS" + +if test "x$ac_cv_func_XCreateFontSet:$ac_cv_func_XmbTextEscapement:$use_fontsets" = xyes:yes:auto; then + use_fontsets=yes +else + : +fi + +if test "x$use_fontsets" = xyes; then + AC_DEFINE([USE_FONTSETS]) +else + : +fi + AC_MSG_CHECKING([byteorder]) AC_TRY_RUN([ int main() @@ -58,26 +107,9 @@ if(v.i==1) exit(0); else exit(1); return 0; } -], AC_DEFINE([LAME_ENDIAN]) +], AC_DEFINE([LAME_ENDIAN],1,[Define this is your achitecture stores integers backwards in memory]) AC_MSG_RESULT([backward]), AC_MSG_RESULT([normal]), AC_MSG_RESULT([no idea])) -dnl On SunOS4, libXmu seems to be all in one unit forcing references -dnl to libXt into the linking. Only fix I can think of is to link with -dnl libXt too, so that's what we'll do. - -AC_MSG_CHECKING([for broken libXmu]) -old_LIBS="$LIBS" -LIBS="$X_LIBS $X_PRE_LIBS -lXext -lXmu -lX11 $X_EXTRA_LIBS $LIBS" -AC_TRY_LINK([],[ - extern void XmuCopyISOLatin1Lowered(char *,char *); - char foo[]="FOO"; - XmuCopyISOLatin1Lowered (foo, foo); -], AC_MSG_RESULT([no]) -XT_LIB_KLUDGE="", AC_MSG_RESULT([yes]) -XT_LIB_KLUDGE="-lXt") -LIBS="$old_LIBS" -AC_SUBST(XT_LIB_KLUDGE) - AC_SUBST(x_includes) AC_SUBST(x_libraries) AC_OUTPUT(Makefile libami/Makefile) diff -Nru amiwm-0.20.48/debian/amiwm.links amiwm-0.21pl2/debian/amiwm.links --- amiwm-0.20.48/debian/amiwm.links 1970-01-01 00:00:00.000000000 +0000 +++ amiwm-0.21pl2/debian/amiwm.links 2018-02-08 14:06:59.000000000 +0000 @@ -0,0 +1 @@ +usr/lib/amiwm/requestchoice usr/bin/requestchoice diff -Nru amiwm-0.20.48/debian/changelog amiwm-0.21pl2/debian/changelog --- amiwm-0.20.48/debian/changelog 2018-02-09 07:03:21.000000000 +0000 +++ amiwm-0.21pl2/debian/changelog 2018-02-08 14:06:59.000000000 +0000 @@ -1,3 +1,15 @@ +amiwm (0.21pl2-1) unstable; urgency=medium + + * New upstream version. + * debian/rules: add lintian recommended targets. + * debian/copyright: update copyright years. + * debian/watch: added. + * Bump debhelper version to 11. + * Bump standards version to 4.1.3. + * Update my name. + + -- Gürkan Myczko Thu, 08 Feb 2018 15:06:59 +0100 + amiwm (0.20.48-8) unstable; urgency=low * Bump standards version. diff -Nru amiwm-0.20.48/debian/compat amiwm-0.21pl2/debian/compat --- amiwm-0.20.48/debian/compat 2018-02-09 07:03:21.000000000 +0000 +++ amiwm-0.21pl2/debian/compat 2018-02-08 14:06:38.000000000 +0000 @@ -1 +1 @@ -7 +11 diff -Nru amiwm-0.20.48/debian/control amiwm-0.21pl2/debian/control --- amiwm-0.20.48/debian/control 2018-02-09 07:03:21.000000000 +0000 +++ amiwm-0.21pl2/debian/control 2018-02-08 14:06:47.000000000 +0000 @@ -1,18 +1,18 @@ Source: amiwm Section: non-free/x11 Priority: optional -Maintainer: Gürkan Sengün -Build-Depends: debhelper (>= 7), libx11-dev, libxmu-dev, libxpm-dev, flex, bison +Maintainer: Gürkan Myczko +Build-Depends: debhelper (>= 11), libx11-dev, libxmu-dev, libxpm-dev, flex, bison Homepage: http://www.lysator.liu.se/~marcus/amiwm.html XS-Autobuild: yes -Standards-Version: 3.8.1 +Standards-Version: 4.1.3 Package: amiwm Architecture: any -Depends: ${shlibs:Depends} +Depends: ${shlibs:Depends}, ${misc:Depends} Recommends: xfonts-75dpi Provides: x-window-manager -Description: The Amiga look alike window manager +Description: Amiga look alike window manager This is amiwm, an X window manager that tries to make your workstation look like an Amiga. "Why?" you ask. Because the author wanted it to. So there! diff -Nru amiwm-0.20.48/debian/copyright amiwm-0.21pl2/debian/copyright --- amiwm-0.20.48/debian/copyright 2018-02-09 07:03:21.000000000 +0000 +++ amiwm-0.21pl2/debian/copyright 2015-11-27 07:00:48.000000000 +0000 @@ -4,7 +4,7 @@ It was downloaded from: - ftp://ftp.lysator.liu.se/pub/X11/wm/amiwm/amiwm0.20pl48.tar.gz + ftp://ftp.lysator.liu.se/pub/X11/wm/amiwm/ Upstream Author: @@ -12,7 +12,7 @@ Copyright: - Copyright (C) 1995-1998 Marcus Comstedt + Copyright (C) 1995-2010 Marcus Comstedt Disclaimer: @@ -65,7 +65,7 @@ The Debian packaging is: - Copyright (C) 2005-2009 Gürkan Sengün + Copyright (C) 2005-2015 Gürkan Myczko and is licensed under the GNU GPL 3, see `/usr/share/common-licenses/GPL-3'. diff -Nru amiwm-0.20.48/debian/debhelper.log amiwm-0.21pl2/debian/debhelper.log --- amiwm-0.20.48/debian/debhelper.log 2018-02-09 07:03:21.000000000 +0000 +++ amiwm-0.21pl2/debian/debhelper.log 1970-01-01 00:00:00.000000000 +0000 @@ -1,2 +0,0 @@ -dh_prep -dh_installdirs diff -Nru amiwm-0.20.48/debian/patches/fix-makefile-and-lexdotl amiwm-0.21pl2/debian/patches/fix-makefile-and-lexdotl --- amiwm-0.20.48/debian/patches/fix-makefile-and-lexdotl 1970-01-01 00:00:00.000000000 +0000 +++ amiwm-0.21pl2/debian/patches/fix-makefile-and-lexdotl 2011-12-01 15:43:23.000000000 +0000 @@ -0,0 +1,50 @@ +Description: lex.l building fix + This patch makes lex work with the lex.l file. + . + amiwm (0.21pl2-1) unstable; urgency=low + . + * New upstream version. + * debian/rules: add lintian recommended targets. + * debian/copyright: update copyright years. + * Bump debhelper version to 8. + * Bump standards version to 3.9.2. +Author: Gürkan Sengün + +--- +Forwarded: no +Last-Update: 2012-11-01 + +--- amiwm-0.21pl2.orig/Makefile.in ++++ amiwm-0.21pl2/Makefile.in +@@ -1,3 +1,6 @@ ++# Edited for Debian GNU/Linux. ++ ++EXAMPLES = $(DESTDIR)/usr/share/doc/amiwm/examples + srcdir = @srcdir@ + VPATH = @srcdir@ + SHELL = /bin/sh +@@ -12,9 +15,11 @@ LIBS = @X_LIBS@ @X_PRE_LIBS@ -Llibami -l + -lX11 @X_EXTRA_LIBS@ @LIBS@ + prefix = @prefix@ + exec_prefix = @exec_prefix@ +-bindir = $(exec_prefix)/bin +-libdir = $(exec_prefix)/lib +-mandir = $(prefix)/man ++bindir = $(DESTDIR)/usr/bin ++obindir = $(DESTDIR)/usr/bin ++libdir = $(DESTDIR)/usr/lib ++mandir = $(DESTDIR)/usr/share/man ++xmandir = $(DESTDIR)/usr/share/man + INSTALL = @INSTALL@ + LN_S = @LN_S@ + RM = -rm -f +--- amiwm-0.21pl2.orig/lex.l ++++ amiwm-0.21pl2/lex.l +@@ -6,6 +6,7 @@ extern int ParseError; + extern FILE *rcfile; + #undef yyin + #define yyin rcfile ++#define YY_SKIP_YYWRAP + #define yywrap() 1 + extern int parse_keyword(char *); + void fixup_string(char *, char *); diff -Nru amiwm-0.20.48/debian/patches/fix-manpage-hyphens amiwm-0.21pl2/debian/patches/fix-manpage-hyphens --- amiwm-0.20.48/debian/patches/fix-manpage-hyphens 1970-01-01 00:00:00.000000000 +0000 +++ amiwm-0.21pl2/debian/patches/fix-manpage-hyphens 2011-12-01 15:43:28.000000000 +0000 @@ -0,0 +1,48 @@ +Description: fix hyphens in manpage + Escape the hyphens in the manual page. + . + amiwm (0.21pl2-1) unstable; urgency=low + . + * New upstream version. + * debian/rules: add lintian recommended targets. + * debian/copyright: update copyright years. + * debian/watch: added. + * Bump debhelper version to 8. + * Bump standards version to 3.9.2. +Author: Gürkan Sengün + +--- +Forwarded: not-needed +Last-Update: 2011-12-01 + +--- amiwm-0.21pl2.orig/amiwm.1 ++++ amiwm-0.21pl2/amiwm.1 +@@ -3,7 +3,7 @@ + .nr X + .TH amiwm 1 "19 Jul 2010" + .SH NAME +-amiwm \- Amiga Workbench-like X Window Manager ++amiwm \- Amiga Workbench\-like X Window Manager + .SH SYNOPSIS + \f4amiwm + +@@ -14,7 +14,7 @@ an Amiga\*R. + + .SH OPTIONS + .I Amiwm +-is configurable with a $HOME/\.amiwmrc-file containing some or all ++is configurable with a $HOME/\.amiwmrc\-file containing some or all + of the following options: + .SH FastQuit: {yes|no} + +@@ -72,8 +72,8 @@ while some other will be a 128x128 or ev + You have the possibility to decide which icon should be used for each app. + If no custom icons are defined at all, the def_tool.info will be used for + all iconified apps. Format is: style { class "myClass" icon "myIcon.info" } +-To find out a given program's class, use "xlsclients -l" to list all opened +-applications, and then use "xprop -id <0x0000000>" to list a ++To find out a given program's class, use "xlsclients \-l" to list all opened ++applications, and then use "xprop \-id <0x0000000>" to list a + given app's properties. Use either WM_CLASS or WM_ICON_NAME strings in amiwmrc. + + .SH ShortLabelIcons {yes|no} diff -Nru amiwm-0.20.48/debian/patches/series amiwm-0.21pl2/debian/patches/series --- amiwm-0.20.48/debian/patches/series 1970-01-01 00:00:00.000000000 +0000 +++ amiwm-0.21pl2/debian/patches/series 2015-11-27 06:51:58.000000000 +0000 @@ -0,0 +1,3 @@ +fix-makefile-and-lexdotl +fix-manpage-hyphens +use-bash-not-ksh diff -Nru amiwm-0.20.48/debian/patches/use-bash-not-ksh amiwm-0.21pl2/debian/patches/use-bash-not-ksh --- amiwm-0.20.48/debian/patches/use-bash-not-ksh 1970-01-01 00:00:00.000000000 +0000 +++ amiwm-0.21pl2/debian/patches/use-bash-not-ksh 2015-11-27 06:52:08.000000000 +0000 @@ -0,0 +1,39 @@ +Description: Use bash instead of ksh + TODO: Put a short summary on the line above and replace this paragraph + with a longer explanation of this change. Complete the meta-information + with other relevant fields (see below for details). To make it easier, the + information below has been extracted from the changelog. Adjust it or drop + it. + . + amiwm (0.21pl2-1) unstable; urgency=low + . + * New upstream version. + * debian/rules: add lintian recommended targets. + * debian/copyright: update copyright years. + * debian/watch: added. + * Bump debhelper version to 8. + * Bump standards version to 3.9.6. + * Update my name. +Author: Gürkan Myczko + +--- +The information above should follow the Patch Tagging Guidelines, please +checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here +are templates for supplementary fields that you might want to add: + +Origin: , +Bug: +Bug-Debian: https://bugs.debian.org/ +Bug-Ubuntu: https://launchpad.net/bugs/ +Forwarded: +Reviewed-By: +Last-Update: + +--- amiwm-0.21pl2.orig/Xsession.in ++++ amiwm-0.21pl2/Xsession.in +@@ -1,4 +1,4 @@ +-#!/bin/ksh ++#!/bin/bash + + if [ -z "$SESSIONTYPE" ] + then diff -Nru amiwm-0.20.48/debian/rules amiwm-0.21pl2/debian/rules --- amiwm-0.20.48/debian/rules 2018-02-09 07:03:21.000000000 +0000 +++ amiwm-0.21pl2/debian/rules 2015-11-27 06:58:21.000000000 +0000 @@ -5,7 +5,10 @@ # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 -build: build-stamp +build: build-arch build-indep +build-arch: build-stamp +build-indep: build-stamp + build-stamp: dh_testdir ./configure --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info @@ -28,6 +31,8 @@ $(MAKE) install prefix=$(CURDIR)/debian/amiwm/usr DESTDIR=$(CURDIR)/debian/amiwm cp debian/dotamiwmrc.example debian/amiwm/usr/share/doc/amiwm/examples/dotamiwmrc cp debian/amiwm.desktop debian/amiwm/usr/share/xsessions/ + sed s,/ksh,/bash, Xinitrc > debian/amiwm/usr/lib/amiwm/Xinitrc + sed s,/ksh,/bash, Xsession2 > debian/amiwm/usr/lib/amiwm/Xsession2 # Build architecture-independent files here. binary-indep: build install diff -Nru amiwm-0.20.48/debian/source/format amiwm-0.21pl2/debian/source/format --- amiwm-0.20.48/debian/source/format 1970-01-01 00:00:00.000000000 +0000 +++ amiwm-0.21pl2/debian/source/format 2011-02-11 13:42:58.000000000 +0000 @@ -0,0 +1 @@ +3.0 (quilt) diff -Nru amiwm-0.20.48/debian/watch amiwm-0.21pl2/debian/watch --- amiwm-0.20.48/debian/watch 1970-01-01 00:00:00.000000000 +0000 +++ amiwm-0.21pl2/debian/watch 2011-12-01 14:51:21.000000000 +0000 @@ -0,0 +1,2 @@ +version=3 +ftp://ftp.lysator.liu.se/pub/X11/wm/amiwm/amiwm(.*)\.tar\.gz Binary files /tmp/tmpUedFzJ/EAdiLlGpgF/amiwm-0.20.48/def_disk.info and /tmp/tmpUedFzJ/WVX2OA8e4W/amiwm-0.21pl2/def_disk.info differ Binary files /tmp/tmpUedFzJ/EAdiLlGpgF/amiwm-0.20.48/def_drawer.info and /tmp/tmpUedFzJ/WVX2OA8e4W/amiwm-0.21pl2/def_drawer.info differ Binary files /tmp/tmpUedFzJ/EAdiLlGpgF/amiwm-0.20.48/def_project.info and /tmp/tmpUedFzJ/WVX2OA8e4W/amiwm-0.21pl2/def_project.info differ diff -Nru amiwm-0.20.48/diskobject.c amiwm-0.21pl2/diskobject.c --- amiwm-0.20.48/diskobject.c 1998-03-14 21:26:12.000000000 +0000 +++ amiwm-0.21pl2/diskobject.c 2010-07-13 13:07:59.000000000 +0000 @@ -25,7 +25,6 @@ extern Display *dpy; extern char *progname; -unsigned long iconcolor[256]; char *iconcolorname[256]; int iconcolormask; @@ -46,14 +45,15 @@ "#ff1919", "#ffff00", "#727d92", "#00c800" }; -Pixmap image_to_pixmap_scr(Scrn *scr, struct Image *im, int width, int height) +Pixmap image_to_pixmap_scr(Scrn *scr, struct Image *im, int width, int height, + struct ColorStore *cs) { return image_to_pixmap(dpy, scr->back, scr->gc, scr->dri.dri_Pens[BACKGROUNDPEN], - iconcolor, iconcolormask, im, width, height); + scr->iconcolor, iconcolormask, im, width, height, cs); } -void load_do(const char *filename, Pixmap *p1, Pixmap *p2) +void load_do(const char *filename, struct IconPixmaps *ip) { struct DiskObject *dobj; #ifdef AMIGAOS @@ -72,12 +72,12 @@ #endif fn[strlen(fn)-5]=0; if((dobj=GetDiskObject(fn))) { - *p1=image_to_pixmap_scr(scr, (struct Image *)dobj->do_Gadget.GadgetRender, - dobj->do_Gadget.Width, dobj->do_Gadget.Height); - *p2=image_to_pixmap_scr(scr, (struct Image *)dobj->do_Gadget.SelectRender, - dobj->do_Gadget.Width, dobj->do_Gadget.Height); + ip->pm=image_to_pixmap_scr(scr, (struct Image *)dobj->do_Gadget.GadgetRender, + dobj->do_Gadget.Width, dobj->do_Gadget.Height, &ip->cs); + ip->pm2=image_to_pixmap_scr(scr, (struct Image *)dobj->do_Gadget.SelectRender, + dobj->do_Gadget.Width, dobj->do_Gadget.Height, &ip->cs2); FreeDiskObject(dobj); - } else *p1=*p2=None; + } else ip->pm=ip->pm2=None; } void init_iconpalette() @@ -92,7 +92,8 @@ fprintf(stderr, "%s: cannot allocate color %s\n", progname, name); exit(1); } - iconcolor[i]=scrp.pixel; + scr->iconcolor[i]=scrp.pixel; + scr->iconcolorsallocated=i+1; } } diff -Nru amiwm-0.20.48/executecmd.c amiwm-0.21pl2/executecmd.c --- amiwm-0.20.48/executecmd.c 1997-12-12 21:37:20.000000000 +0000 +++ amiwm-0.21pl2/executecmd.c 2010-05-15 20:59:44.000000000 +0000 @@ -15,6 +15,10 @@ #include #endif #include +#ifdef USE_FONTSETS +#include +#include +#endif #include "drawinfo.h" @@ -59,6 +63,10 @@ int strgadw, strgadh, fh, mainw, mainh, butw; +#ifdef USE_FONTSETS +static XIM xim = (XIM) NULL; +static XIC xic = (XIC) NULL; +#endif int getchoice(Window w) { @@ -72,10 +80,19 @@ void refresh_button(Window w, const char *txt, int idx) { int h=fh+2*BUT_VSPACE, l=strlen(txt); +#ifdef USE_FONTSETS + int tw=XmbTextEscapement(dri.dri_FontSet, txt, l); +#else int tw=XTextWidth(dri.dri_Font, txt, l); +#endif XSetForeground(dpy, gc, dri.dri_Pens[TEXTPEN]); +#ifdef USE_FONTSETS + XmbDrawString(dpy, w, dri.dri_FontSet, gc, (butw-tw)>>1, + dri.dri_Ascent+BUT_VSPACE, txt, l); +#else XDrawString(dpy, w, gc, (butw-tw)>>1, - dri.dri_Font->ascent+BUT_VSPACE, txt, l); + dri.dri_Ascent+BUT_VSPACE, txt, l); +#endif XSetForeground(dpy, gc, dri.dri_Pens[(selected==idx && depressed)? SHADOWPEN:SHINEPEN]); XDrawLine(dpy, w, gc, 0, 0, butw-2, 0); @@ -94,13 +111,26 @@ int w; XSetForeground(dpy, gc, dri.dri_Pens[TEXTPEN]); - XDrawString(dpy, mainwin, gc, TEXT_SIDE, TOP_SPACE+dri.dri_Font->ascent, +#ifdef USE_FONTSETS + XmbDrawString(dpy, mainwin, dri.dri_FontSet, gc, TEXT_SIDE, + TOP_SPACE+dri.dri_Ascent, enter_txt, strlen(enter_txt)); +#else + XDrawString(dpy, mainwin, gc, TEXT_SIDE, TOP_SPACE+dri.dri_Ascent, enter_txt, strlen(enter_txt)); +#endif XSetForeground(dpy, gc, dri.dri_Pens[HIGHLIGHTTEXTPEN]); +#ifdef USE_FONTSETS + w=XmbTextEscapement(dri.dri_FontSet, cmd_txt, strlen(cmd_txt)); + XmbDrawString(dpy, mainwin, dri.dri_FontSet, gc, + mainw-strgadw-w-TEXT_SIDE-BUT_SIDE, + TOP_SPACE+fh+INT_SPACE+dri.dri_Ascent, + cmd_txt, strlen(cmd_txt)); +#else w=XTextWidth(dri.dri_Font, cmd_txt, strlen(cmd_txt)); XDrawString(dpy, mainwin, gc, mainw-strgadw-w-TEXT_SIDE-BUT_SIDE, - TOP_SPACE+fh+INT_SPACE+dri.dri_Font->ascent, + TOP_SPACE+fh+INT_SPACE+dri.dri_Ascent, cmd_txt, strlen(cmd_txt)); +#endif } void refresh_str_text(void) @@ -108,24 +138,50 @@ int l, mx=6; XSetForeground(dpy, gc, dri.dri_Pens[TEXTPEN]); if(buf_len>left_pos) { +#ifdef USE_FONTSETS + int w, c; + for(l=0; lstrgadw-6) + break; + mx=w; + l+=c; + } + XmbDrawImageString(dpy, strwin, dri.dri_FontSet, gc, 6, 3+dri.dri_Ascent, + cmdline+left_pos, l); +#else mx+=XTextWidth(dri.dri_Font, cmdline+left_pos, l=buf_len-left_pos); while(mx>strgadw-6) mx-=XTextWidth(dri.dri_Font, cmdline+left_pos+--l, 1); - XDrawImageString(dpy, strwin, gc, 6, 3+dri.dri_Font->ascent, + XDrawImageString(dpy, strwin, gc, 6, 3+dri.dri_Ascent, cmdline+left_pos, l); +#endif } XSetForeground(dpy, gc, dri.dri_Pens[BACKGROUNDPEN]); XFillRectangle(dpy, strwin, gc, mx, 3, strgadw-mx-6, fh); if(stractive) { if(cur_posascent, +#ifdef USE_FONTSETS + l=mbrlen(cmdline+cur_pos, buf_len-cur_pos, NULL); + XmbDrawImageString(dpy, strwin, dri.dri_FontSet, gc, cur_x, + 3+dri.dri_Ascent, cmdline+cur_pos, l); +#else + XDrawImageString(dpy, strwin, gc, cur_x, 3+dri.dri_Ascent, cmdline+cur_pos, 1); +#endif XSetBackground(dpy, gc, dri.dri_Pens[BACKGROUNDPEN]); } else { XSetForeground(dpy, gc, ~0); +#ifdef USE_FONTSETS + XFillRectangle(dpy, strwin, gc, cur_x, 3, + XExtentsOfFontSet(dri.dri_FontSet)-> + max_logical_extent.width, fh); +#else XFillRectangle(dpy, strwin, gc, cur_x, 3, dri.dri_Font->max_bounds.width, fh); +#endif } } } @@ -152,10 +208,20 @@ void strkey(XKeyEvent *e) { void endchoice(void); +#ifdef USE_FONTSETS + Status stat; +#else static XComposeStatus stat; +#endif KeySym ks; char buf[256]; - int x, i, n=XLookupString(e, buf, sizeof(buf), &ks, &stat); + int x, i, n; +#ifndef USE_FONTSETS + n=XLookupString(e, buf, sizeof(buf), &ks, &stat); +#else + n=XmbLookupString(xic, e, buf, sizeof(buf), &ks, &stat); + if(stat == XLookupKeySym || stat == XLookupBoth) +#endif switch(ks) { case XK_Return: case XK_Linefeed: @@ -163,12 +229,32 @@ endchoice(); break; case XK_Left: - if(cur_pos) + if(cur_pos) { +#ifdef USE_FONTSETS + int p=cur_pos; + int z; + while(p>0) { + --p; + if(((int)mbrlen(cmdline+p, cur_pos-p, NULL))>0) { + cur_pos=p; + break; + } + } +#else --cur_pos; +#endif + } break; case XK_Right: - if(cur_pos0) + cur_pos+=l; +#else cur_pos++; +#endif + } break; case XK_Begin: cur_pos=0; @@ -178,19 +264,46 @@ break; case XK_Delete: if(cur_pos0) { - --buf_len; - for(x=--cur_pos; x0) { + --p; + if(((int)mbrlen(cmdline+p, cur_pos-p, NULL))>0) { + l=cur_pos-p; + break; + } + } +#endif + buf_len-=l; + for(x=(cur_pos-=l); xcur_pos; --x) cmdline[x]=cmdline[x-1]; @@ -203,16 +316,33 @@ if(cur_posleft_pos) + cur_x+=XmbTextEscapement(dri.dri_FontSet, cmdline+left_pos, cur_pos-left_pos); + if(cur_posmax_logical_extent.width; +#else if(cur_pos>left_pos) cur_x+=XTextWidth(dri.dri_Font, cmdline+left_pos, cur_pos-left_pos); if(cur_posmax_bounds.width; +#endif if((x+=cur_x-(strgadw-6))>0) { cur_x-=x; - while(x>0) + while(x>0) { +#ifdef USE_FONTSETS + int l=mbrlen(cmdline+left_pos, buf_len-left_pos, NULL); + x-=XmbTextEscapement(dri.dri_FontSet, cmdline+left_pos, l); + left_pos += l; +#else x-=XTextWidth(dri.dri_Font, cmdline+left_pos++, 1); +#endif + } cur_x+=x; } refresh_str_text(); @@ -220,16 +350,23 @@ void strbutton(XButtonEvent *e) { - int w; + int w, l=1; stractive=1; cur_pos=left_pos; cur_x=6; while(cur_xx && cur_pose->x) break; cur_x+=w; - cur_pos++; + cur_pos+=l; } refresh_str(); } @@ -269,7 +406,11 @@ static XTextProperty txtprop1, txtprop2; Window ok, cancel; int w2, c; +#ifdef USE_FONTSETS + char *p; + setlocale(LC_CTYPE, ""); +#endif progname=argv[0]; if(!(dpy = XOpenDisplay(NULL))) { fprintf(stderr, "%s: cannot connect to X server %s\n", progname, @@ -280,20 +421,39 @@ XGetWindowAttributes(dpy, root, &attr); init_dri(&dri, dpy, root, attr.colormap, False); +#ifdef USE_FONTSETS + strgadw=VISIBLE_CMD_CHARS*XExtentsOfFontSet(dri.dri_FontSet)-> + max_logical_extent.width+12; +#else strgadw=VISIBLE_CMD_CHARS*dri.dri_Font->max_bounds.width+12; - strgadh=(fh=dri.dri_Font->ascent+dri.dri_Font->descent)+6; +#endif + strgadh=(fh=dri.dri_Ascent+dri.dri_Descent)+6; +#ifdef USE_FONTSETS + butw=XmbTextEscapement(dri.dri_FontSet, ok_txt, strlen(ok_txt))+2*BUT_HSPACE; + w2=XmbTextEscapement(dri.dri_FontSet, cancel_txt, strlen(cancel_txt))+2*BUT_HSPACE; +#else butw=XTextWidth(dri.dri_Font, ok_txt, strlen(ok_txt))+2*BUT_HSPACE; w2=XTextWidth(dri.dri_Font, cancel_txt, strlen(cancel_txt))+2*BUT_HSPACE; +#endif if(w2>butw) butw=w2; mainw=2*(BUT_SIDE+butw)+BUT_SIDE; +#ifdef USE_FONTSETS + w2=XmbTextEscapement(dri.dri_FontSet, enter_txt, strlen(enter_txt))+2*TEXT_SIDE; +#else w2=XTextWidth(dri.dri_Font, enter_txt, strlen(enter_txt))+2*TEXT_SIDE; +#endif if(w2>mainw) mainw=w2; +#ifdef USE_FONTSETS + w2=strgadw+XmbTextEscapement(dri.dri_FontSet, cmd_txt, strlen(cmd_txt))+ + 2*TEXT_SIDE+2*BUT_SIDE+butw; +#else w2=strgadw+XTextWidth(dri.dri_Font, cmd_txt, strlen(cmd_txt))+ 2*TEXT_SIDE+2*BUT_SIDE+butw; +#endif if(w2>mainw) mainw=w2; @@ -328,7 +488,27 @@ EnterWindowMask|LeaveWindowMask); gc=XCreateGC(dpy, mainwin, 0, NULL); XSetBackground(dpy, gc, dri.dri_Pens[BACKGROUNDPEN]); +#ifndef USE_FONTSETS XSetFont(dpy, gc, dri.dri_Font->fid); +#endif + +#ifdef USE_FONTSETS + if ((p = XSetLocaleModifiers("@im=none")) != NULL && *p) + xim = XOpenIM(dpy, NULL, NULL, NULL); + if (!xim) + fprintf(stderr, "Failed to open input method.\n"); + else { + xic = XCreateIC(xim, + XNInputStyle, XIMPreeditNothing | XIMStatusNothing, + XNClientWindow, mainwin, + XNFocusWindow, mainwin, + NULL); + if (!xic) + fprintf(stderr, "Failed to create input context.\n"); + } + if (!xic) + exit(1); +#endif size_hints.flags = PResizeInc; txtprop1.value=(unsigned char *)"Execute a File"; @@ -344,6 +524,9 @@ for(;;) { XEvent event; XNextEvent(dpy, &event); +#ifdef USE_FONTSETS + if(!XFilterEvent(&event, mainwin)) +#endif switch(event.type) { case Expose: if(!event.xexpose.count) diff -Nru amiwm-0.20.48/frame.c amiwm-0.21pl2/frame.c --- amiwm-0.20.48/frame.c 1998-03-15 18:55:09.000000000 +0000 +++ amiwm-0.21pl2/frame.c 2010-07-12 13:37:02.000000000 +0000 @@ -323,9 +323,16 @@ } else if(w==c->drag) { XSetForeground(dpy, scr->gc, scr->dri.dri_Pens[c->active?FILLTEXTPEN:TEXTPEN]); XSetBackground(dpy, scr->gc, scr->dri.dri_Pens[c->active?FILLPEN:BACKGROUNDPEN]); +#ifdef USE_FONTSETS + if(c->title) + XmbDrawImageString(dpy, w, scr->dri.dri_FontSet, scr->gc, + 11, 1+scr->dri.dri_Ascent, + c->title, strlen(c->title)); +#else if(c->title.value) - XDrawImageString(dpy, w, scr->gc, 11, 1+scr->dri.dri_Font->ascent, + XDrawImageString(dpy, w, scr->gc, 11, 1+scr->dri.dri_Ascent, (char *)c->title.value, c->title.nitems); +#endif XSetForeground(dpy, scr->gc, scr->dri.dri_Pens[SHINEPEN]); XDrawLine(dpy, w, scr->gc, 0, 0, c->dragw-1, 0); XDrawLine(dpy, w, scr->gc, 0, 0, 0, scr->bh-2); @@ -496,26 +503,44 @@ clickclient=NULL; } +static Client *topmostmappedclient(Window *children, unsigned int nchildren) +{ + int n; + Client *c; + for(n=nchildren-1; n>=0; --n) + if((!XFindContext(dpy, children[n], client_context, (XPointer*)&c)) && + (children[n]==c->parent || children[n]==c->window) && + c->state==NormalState) + return c; + return NULL; +} + +static Client *bottommostmappedclient(Window *children, unsigned int nchildren) +{ + int n; + Client *c; + for(n=0; nparent && c->state==NormalState) + return c; + return NULL; +} + void raiselowerclient(Client *c, int place) { - Client *c2; Window r,p,*children; unsigned int nchildren; if(place!=PlaceOnTop && XQueryTree(dpy, scr->back, &r, &p, &children, &nchildren)) { - if(place==PlaceOnBottom || children[nchildren-1]==c->parent || - children[nchildren-1]==c->window) { - int n; - for(n=0; nparent) - break; - if(nparent; ws[1]=c->parent; XRestackWindows(dpy, ws, 2); - } + } else if(place!=PlaceOnBottom) + XRaiseWindow(dpy, c->parent); } else XRaiseWindow(dpy, c->parent); if(children) XFree(children); diff -Nru amiwm-0.20.48/gnome.c amiwm-0.21pl2/gnome.c --- amiwm-0.20.48/gnome.c 1970-01-01 00:00:00.000000000 +0000 +++ amiwm-0.21pl2/gnome.c 2010-04-09 22:15:15.000000000 +0000 @@ -0,0 +1,184 @@ +/* GNOME Window Manager Compliance support for amiwm + by Peter Bortas february 2000 */ + +#include +#include +#include +#include + +#include + + +extern void gnome_setup() +{ + /* Section 1 - Detection of a GNOME compliant Window Manager + + There is a single unambiguous way to detect if there currently is + a GNOME compliant Window Manager running. It is the job of the + Window Manager to set up a few things to make this + possible. Using the following method it is also possible for + applications to detect compliance by receiving an event when the + Window Manager exits. + + To do this the Window Manager should create a Window, that is a + child of the root window. There is no need to map it, just create + it. The Window Manager may reuse ANY window it has for this + purpose - even if it is mapped, just as long as the window is + never destroyed while the Window Manager is running. + + Once the Window is created the Window Manager should set a + property on the root window of the name _WIN_SUPPORTING_WM_CHECK, + and type CARDINAL. The atom's data would be a CARDINAL that is + the Window ID of the window that was created above. The window + that was created would ALSO have this property set on it with the + same values and type.*/ + + Display *disp; + Window root_window; + Atom atom_set; + CARD32 val; + Window win; + + Atom list[10]; + + atom_set = XInternAtom(disp, "_WIN_SUPPORTING_WM_CHECK", False); + win = XCreateSimpleWindow(disp, root_window, -200, -200, 5, 5, 0, 0, 0); + val = win; + XChangeProperty(disp, root_window, atom_set, XA_CARDINAL, 32, + PropModeReplace, (unsigned char *)&val, 1); + XChangeProperty(disp, win, atom_set, XA_CARDINAL, 32, PropModeReplace, + (unsigned char *)&val, 1); + + /* Section 2 - Listing GNOME Window Manager Compliance + + It is important to list which parts of GNOME Window Manager + compliance are supported. This is done fairly easily by doing the + following: + + Create a property on the root window of the atom name + _WIN_PROTOCOLS. This property contains a list(array)of atoms that + are all the properties the Window Manager supports. These atoms + are any number of the following: + + _WIN_LAYER + _WIN_STATE + _WIN_HINTS + _WIN_APP_STATE + _WIN_EXPANDED_SIZE + _WIN_ICONS + _WIN_WORKSPACE + _WIN_WORKSPACE_COUNT + _WIN_WORKSPACE_NAMES + _WIN_CLIENT_LIST + + If you list one of these properties then you support it and + applications can expect information provided by, or accepted by + the Window Manager to work. */ + + atom_set = XInternAtom(disp, "_WIN_PROTOCOLS", False); + list[0] = XInternAtom(disp, "_WIN_LAYER", False); + list[1] = XInternAtom(disp, "_WIN_STATE", False); + list[2] = XInternAtom(disp, "_WIN_HINTS", False); + list[3] = XInternAtom(disp, "_WIN_APP_STATE", False); + list[4] = XInternAtom(disp, "_WIN_EXPANDED_SIZE", False); + list[5] = XInternAtom(disp, "_WIN_ICONS", False); + list[6] = XInternAtom(disp, "_WIN_WORKSPACE", False); + list[7] = XInternAtom(disp, "_WIN_WORKSPACE_COUNT", False); + list[8] = XInternAtom(disp, "_WIN_WORKSPACE_NAMES", False); + list[9] = XInternAtom(disp, "_WIN_CLIENT_LIST", False); + XChangeProperty(disp, root_window, atom_set, XA_ATOM, 32, PropModeReplace, + (unsigned char *)list, 10); +} + +extern void gnome_managed_clients() +{ + /* Section 3 - Providing Shortcuts Managed Clients + + As an aide in having external applications be able to list and + access clients being managed by the Window Manager, a property + should be set on the root window of the name _WIN_CLIENT_LIST + which is an array of type CARDINAL. Each entry is the Window ID + of a managed client. If the list of managed clients changes, + clients are added or deleted, this list should be updated. */ + + Display *disp; + Window root_window; + Atom atom_set; + Window *wl; + int num; + + fprintf(stderr, "FIXME: snome_managed_clients is a stub\n"); + + atom_set = XInternAtom(disp, "_WIN_CLIENT_LIST", False); + num = 0; /* FIXME: number of clients goes here */ + wl = malloc(sizeof(Window) * num); + /* FIXME: Fill in array of window ID's */ + XChangeProperty(disp, root_window, atom_set, XA_CARDINAL, 32, + PropModeReplace, (unsigned char *)wl, num); + if (wl) + free(wl); +} + +extern void gnome_multiple_desktops() +{ + /* Section 3 - Providing Multiple/Virtual Desktop Information. + + If your Window Manager supports the concept of Multiple/Virtual + Desktops or Workspaces then you will definitely want to include + it. This involves your Window Manager setting several properties + on the root window. + + First you should advertise how many Desktops your Window Manager + supports. This is done by setting a property on the root window + with the atom name _WIN_WORKSPACE_COUNT of type CARDINAL. The + properties data is a 32-bit integer that is the number of + Desktops your Window Manager currently supports. If you can add + and delete desktops while running, you may change this property + and its value whenever required. You should also set a property + of the atom _WIN_WORKSPACE of type CARDINAL that contains the + number of the currently active desktop (which is a number between + 0 and the number advertised by _WIN_WORKSPACE_COUNT - + 1). Whenever the active desktop changes, change this property. + + Lastly you should set a property that is a list of strings called + _WIN_WORKSPACE_NAMES that contains names for the desktops (the + first string is the name of the first desktop, the second string + is the second desktop, etc.). This will allow applications toq + know what the name of the desktop is too, possibly to display it. */ + + Display *disp; + Window root_window; + Atom atom_set; + XTextProperty text; + int i, current_desk, number_of_desks; + char **names, s[1024]; + CARD32 val; + + /* FIXME: set current_desk, number_of_desks names */ + + atom_set = XInternAtom(disp, "_WIN_WORKSPACE", False); + val = (CARD32) current_desk; + XChangeProperty(disp, root_window, atom_set, XA_CARDINAL, 32, + PropModeReplace, (unsigned char *)&val, 1); + atom_set = XInternAtom(disp, "_WIN_WORKSPACE_COUNT", False); + + val = (CARD32) number_of_desks; + XChangeProperty(disp, root_window, atom_set, XA_CARDINAL, 32, + PropModeReplace, (unsigned char *)&val, 1); + atom_set = XInternAtom(disp, "_WIN_WORKSPACE_NAMES", False); + names = malloc(sizeof(char *) * number_of_desks); + for (i = 0; i < number_of_desks; i++) + { + snprintf(s, sizeof(s), "Desktop %i", i); + names[i] = malloc(strlen(s) + 1); + strcpy(names[i], s); + } + if (XStringListToTextProperty(names, mode.numdesktops, )) + { + XSetTextProperty(disp, root_window, &val, atom_set); + XFree(text.value); + } + for (i = 0; i < number_of_desks; i++) + free(names[i]); + free(names); +} diff -Nru amiwm-0.20.48/gram.y amiwm-0.21pl2/gram.y --- amiwm-0.20.48/gram.y 1998-03-15 19:13:37.000000000 +0000 +++ amiwm-0.21pl2/gram.y 2010-07-13 13:15:51.000000000 +0000 @@ -1,11 +1,13 @@ %{ #include +#include #include #include #include "prefs.h" #include "drawinfo.h" #include "screen.h" #include "icc.h" +#include "style.h" extern void set_sys_palette(void); extern void set_mwb_palette(void); extern void set_schwartz_palette(void); @@ -28,6 +30,19 @@ } #endif +static void append_to(char **x, char *y) +{ + if(*x==NULL) + *x=y; + else { + char *t = malloc(strlen(y)+strlen(*x)+2); + sprintf(t, "%s\n%s", *x, y); + free(*x); + free(y); + *x=t; + } +} + static int ti_level=0; %} @@ -49,6 +64,10 @@ %token FASTQUIT SIZEBORDER DEFAULTICON ICONDIR ICONPALETTE SCREENFONT %token ICONFONT TOOLITEM FORCEMOVE SCREEN MODULE MODULEPATH %token INTERSCREENGAP AUTORAISE FOCUS FOLLOWMOUSE CLICKTOTYPE SLOPPY +%token CUSTOMICONSONLY +%token TITLEBARCLOCK TITLECLOCKFORMAT +%token OPAQUEMOVE OPAQUERESIZE SCREENMENU STYLE CLASS TITLE ICONTITLE ICON +%token SHORTLABELICONS %token STRING %token NUMBER @@ -88,7 +107,18 @@ | MODULE string { create_module((front? front->upfront:NULL), $2, NULL); } | INTERSCREENGAP NUMBER { prefs.borderwidth=$2; } | AUTORAISE truth { prefs.autoraise=$2; } + | OPAQUEMOVE truth { prefs.opaquemove=$2; } + | OPAQUERESIZE truth { prefs.opaqueresize=$2; } | FOCUS focuspolicy { prefs.focus=$2; } + | CUSTOMICONSONLY truth { prefs.customiconsonly = $2; } + | SHORTLABELICONS truth { prefs.shortlabelicons = $2; } + | TITLEBARCLOCK truth { prefs.titlebarclock = $2; } + | TITLECLOCKFORMAT string { prefs.titleclockformat = $2; } + | TITLECLOCKFORMAT NUMBER string { + prefs.titleclockinterval=$2; + prefs.titleclockformat=$3; } + | SCREENMENU truth { prefs.screenmenu=$2; } + | stylespec styleitems RIGHTBRACE ; toolsubmenu : TOOLITEM string LEFTBRACE { add_toolitem($2, NULL, NULL, -1); ti_level=1; } @@ -103,6 +133,29 @@ | TOOLITEM SEPARATOR { add_toolitem(NULL, NULL, NULL, ti_level); } ; +stylespec : STYLE LEFTBRACE { Style *s = malloc(sizeof(Style)); + memset(s, 0, sizeof(*s)); + s->next=NULL; s->style_class=NULL; + s->style_title=s->style_icon_title=NULL; + s->icon_name=NULL; + s->icon_pms.cs.colors=NULL; + s->icon_pms.cs2.colors=NULL; + if(prefs.firststyle) + prefs.laststyle->next=s; + else + prefs.firststyle=s; + prefs.laststyle=s; } + +styleitems : styleitems styleitem + | + ; + +styleitem : CLASS string { append_to(&prefs.laststyle->style_class, $2);} + | TITLE string { append_to(&prefs.laststyle->style_title, $2);} + | ICONTITLE string { append_to(&prefs.laststyle->style_icon_title, $2);} + | ICON string { prefs.laststyle->icon_name=$2; } + + string : STRING { $$ = strdup($1); } ; diff -Nru amiwm-0.20.48/icc.c amiwm-0.21pl2/icc.c --- amiwm-0.20.48/icc.c 1998-03-15 22:16:03.000000000 +0000 +++ amiwm-0.21pl2/icc.c 2010-04-09 22:15:15.000000000 +0000 @@ -2,6 +2,10 @@ #include "screen.h" #include "icc.h" #include "icon.h" +#include "style.h" +#include "prefs.h" + +#include #ifdef AMIGAOS #include @@ -11,7 +15,7 @@ extern void redraw(Client *, Window); Atom wm_state, wm_change_state, wm_protocols, wm_delete, wm_take_focus; -Atom wm_colormaps, wm_name, wm_normal_hints, wm_hints, wm_icon_name; +Atom wm_colormaps, wm_name, wm_normal_hints, wm_hints, wm_icon_name, wm_class; Atom amiwm_screen, swm_vroot, amiwm_wflags, amiwm_appiconmsg, amiwm_appwindowmsg; extern Display *dpy; @@ -28,6 +32,7 @@ wm_normal_hints = XInternAtom(dpy, "WM_NORMAL_HINTS", False); wm_hints = XInternAtom(dpy, "WM_HINTS", False); wm_icon_name = XInternAtom(dpy, "WM_ICON_NAME", False); + wm_class = XInternAtom(dpy, "WM_CLASS", False); amiwm_screen = XInternAtom(dpy, "AMIWM_SCREEN", False); swm_vroot = XInternAtom(dpy, "__SWM_VROOT", False); amiwm_wflags = XInternAtom(dpy, "AMIWM_WFLAGS", False); @@ -117,15 +122,99 @@ XFree((char *) p); } +static int stylematch_low(char *p, int l, char *m) +{ + char *lf; + int ml; + --m; + do { + lf = strchr(++m, '\n'); + ml = (lf? lf-m:strlen(m)); + if(ml == l && !strncmp(m, p, ml)) + return 1; + } while((m=lf)); + return 0; +} + +static int stylematch_tprop(XTextProperty *p, char *m) +{ + return stylematch_low((char *)p->value, p->nitems, m); +} + +#ifdef USE_FONTSETS +static int stylematch_str(char *p, char *m) +{ + return stylematch_low(p, strlen(p), m); +} +#endif + +void checkstyle(Client *c) +{ + XTextProperty icon_name, class_name; + Style *style; + + if(prefs.firststyle==NULL) + return; + + if(!XGetTextProperty(dpy, c->window, &class_name, wm_class)) + class_name.value=NULL; + else + /* This value seems to be 2x it's correct value always... */ + class_name.nitems=strlen((char *)class_name.value); + if(!XGetWMIconName(dpy, c->window, &icon_name)) + icon_name.value=NULL; + + for(style=prefs.firststyle; style!=NULL; style=style->next) + if((class_name.value!=NULL && style->style_class!=NULL && + stylematch_tprop(&class_name, style->style_class)) || +#ifdef USE_FONTSETS + (c->title!=NULL && style->style_title!=NULL && + stylematch_str(c->title, style->style_title)) || +#else + (c->title.value!=NULL && style->style_title!=NULL && + stylematch_tprop(&c->title, style->style_title)) || +#endif + (icon_name.value!=NULL && style->style_icon_title!=NULL && + stylematch_tprop(&icon_name, style->style_icon_title))) { + c->style = style; + break; + } + + if(icon_name.value) + XFree(icon_name.value); + if(class_name.value) + XFree(class_name.value); +} + void propertychange(Client *c, Atom a) { extern void checksizehints(Client *); extern void newicontitle(Client *); if(a==wm_name) { +#ifdef USE_FONTSETS + XTextProperty prop; + if(c->title) { + free(c->title); + c->title = NULL; + } + if(XGetWMName(dpy, c->window, &prop) && prop.value) { + char **list; + int n; + if(XmbTextPropertyToTextList(dpy, &prop, &list, &n) >= Success) { + if(n > 0) + c->title = strdup(list[0]); + XFreeStringList(list); + } + XFree(prop.value); + } +#else if(c->title.value) XFree(c->title.value); XGetWMName(dpy, c->window, &c->title); +#endif + if(c->style==NULL) + checkstyle(c); if(c->drag) { XClearWindow(dpy, c->drag); redraw(c, c->drag); @@ -149,6 +238,8 @@ } else if(a==wm_protocols) { getproto(c); } else if(a==wm_icon_name) { + if(c->style==NULL) + checkstyle(c); if(c->icon) newicontitle(c); } else if(a==wm_state) { if(c->parent==c->scr->root) { @@ -156,7 +247,8 @@ if(c->state==NormalState) c->state=WithdrawnState; } - } + } else if(a==wm_class && c->style==NULL) + checkstyle(c); } void handle_client_message(Client *c, XClientMessageEvent *xcme) diff -Nru amiwm-0.20.48/icon.c amiwm-0.21pl2/icon.c --- amiwm-0.20.48/icon.c 1998-03-15 19:06:35.000000000 +0000 +++ amiwm-0.21pl2/icon.c 2010-07-13 13:19:58.000000000 +0000 @@ -9,6 +9,7 @@ #include "client.h" #include "prefs.h" #include "icc.h" +#include "style.h" #ifdef AMIGAOS #include @@ -23,9 +24,18 @@ extern void init_iconpalette(); +#ifdef USE_FONTSETS +XFontSet labelfontset; +int labelfont_ascent; +#else XFontStruct *labelfont; +#endif -char *label_font_name="-b&h-lucida-medium-r-normal-sans-10-*-*-*-*-*-iso8859-1"; +char *label_font_name="-b&h-lucida-medium-r-normal-sans-10-*-*-*-*-*-iso8859-1" +#ifdef USE_FONTSETS +",-misc-fixed-medium-r-normal--10-*-*-*-*-*-iso10646-1" +#endif +; void redrawicon(Icon *i, Window w) { @@ -37,10 +47,16 @@ if(i->selected && i->secondpm) pm=i->secondpm; if(pm) { + XGCValues xgc; Window r; int x, y; unsigned int w, h, bw, d; XGetGeometry(dpy, pm, &r, &x, &y, &w, &h, &bw, &d); + if(i->maskpm) { + xgc.clip_mask = i->maskpm; + xgc.clip_x_origin = xgc.clip_y_origin = 4; + XChangeGC(dpy, scr->gc, GCClipXOrigin|GCClipYOrigin|GCClipMask, &xgc); + } if(d!=scr->depth) { XSetForeground(dpy, scr->gc, scr->dri.dri_Pens[SHADOWPEN]); XSetBackground(dpy, scr->gc, scr->dri.dri_Pens[BACKGROUNDPEN]); @@ -50,6 +66,10 @@ else XCopyArea(dpy, pm, i->window, scr->gc, 0, 0, i->width-8, i->height-8, 4, 4); + if(i->maskpm) { + xgc.clip_mask = None; + XChangeGC(dpy, scr->gc, GCClipMask, &xgc); + } } XSetForeground(dpy, scr->gc, scr->dri.dri_Pens[i->selected? SHADOWPEN:SHINEPEN]); XDrawLine(dpy, w, scr->gc, 0, 0, i->width-1, 0); @@ -57,9 +77,15 @@ XSetForeground(dpy, scr->gc, scr->dri.dri_Pens[i->selected? SHINEPEN:SHADOWPEN]); XDrawLine(dpy, w, scr->gc, 1, i->height-1, i->width-1, i->height-1); XDrawLine(dpy, w, scr->gc, i->width-1, 1, i->width-1, i->height-1); +#ifdef USE_FONTSETS + } else if(w==i->labelwin && i->label) { + XmbDrawImageString(dpy, w, labelfontset, scr->icongc, 0, labelfont_ascent, + i->label, strlen(i->label)); +#else } else if(w==i->labelwin && i->label.value) { XDrawImageString(dpy, w, scr->icongc, 0, labelfont->ascent, (char *)i->label.value, i->label.nitems); +#endif } } @@ -146,16 +172,16 @@ Window r; int x,y; unsigned int b,d; - extern void load_do(const char *, Pixmap *, Pixmap *); + extern void load_do(const char *, struct IconPixmaps *); init_iconpalette(); - load_do(prefs.defaulticon, &scr->default_tool_pm, &scr->default_tool_pm2); - if(scr->default_tool_pm == None) { + load_do(prefs.defaulticon, &scr->default_tool_pms); + if(scr->default_tool_pms.pm == None) { fprintf(stderr, "%s: Cannot load default icon \"%s\".\n", progname, prefs.defaulticon); exit(1); } - XGetGeometry(dpy, scr->default_tool_pm, &r, &x, &y, + XGetGeometry(dpy, scr->default_tool_pms.pm, &r, &x, &y, &scr->default_tool_pm_w, &scr->default_tool_pm_h, &b, &d); } @@ -221,7 +247,41 @@ XRemoveFromSaveSet(dpy, i->innerwin); i->innerwin=None; } - i->iconpm = i->secondpm = None; + i->iconpm = i->secondpm = i->maskpm = None; +} + +static void setstdiconicon(Icon *i, unsigned int *w, unsigned int *h) +{ + Style *s; + if(i->client && (s=i->client->style) && s->icon_name) { + if(s->icon_pms.pm==None) { + Window r; + int x,y; + unsigned int b,d; + extern void load_do(const char *, struct IconPixmaps *); + load_do(s->icon_name, &s->icon_pms); + if(s->icon_pms.pm == None) { + fprintf(stderr, "%s: Cannot load icon \"%s\".\n", + progname, s->icon_name); + s->icon_name = NULL; + } else + XGetGeometry(dpy, s->icon_pms.pm, &r, &x, &y, + &s->icon_pm_w, &s->icon_pm_h, &b, &d); + } + if(s->icon_pms.pm!=None) { + i->iconpm=s->icon_pms.pm; + i->secondpm=s->icon_pms.pm2; + i->maskpm=None; + *w=s->icon_pm_w+8; + *h=s->icon_pm_h+8; + return; + } + } + i->iconpm=scr->default_tool_pms.pm; + i->secondpm=scr->default_tool_pms.pm2; + i->maskpm=None; + *w=scr->default_tool_pm_w+8; + *h=scr->default_tool_pm_h+8; } void createiconicon(Icon *i, XWMHints *wmhints) @@ -233,7 +293,7 @@ void newicontitle(Client *); scr=i->scr; - if(wmhints) { + if(wmhints && !prefs.customiconsonly) { if((wmhints->flags&IconWindowHint) && wmhints->icon_window) { Window r; unsigned int b, d; @@ -245,15 +305,16 @@ int x, y; unsigned int b, d; i->iconpm=wmhints->icon_pixmap; + i->secondpm=None; + if(wmhints->flags&IconMaskHint) + i->maskpm = wmhints->icon_mask; + else + i->maskpm = None; XGetGeometry(dpy, i->iconpm, &r, &x, &y, &w, &h, &b, &d); w+=8; h+=8; - } else { - i->iconpm=scr->default_tool_pm; - i->secondpm=scr->default_tool_pm2; - w=scr->default_tool_pm_w+8; - h=scr->default_tool_pm_h+8; - } + } else + setstdiconicon(i, &w, &h); if(wmhints->flags&IconPositionHint) { x=wmhints->icon_x; y=wmhints->icon_y; @@ -262,11 +323,9 @@ unsigned int w, h, bw, d; XGetGeometry(dpy, i->window, &r, &x, &y, &w, &h, &bw, &d); } - } else { - i->iconpm=scr->default_tool_pm; - w=scr->default_tool_pm_w+8; - h=scr->default_tool_pm_h+8; - } + } else + setstdiconicon(i, &w, &h); + if(!(i->window)) { attr.override_redirect=True; attr.background_pixel=scr->dri.dri_Pens[BACKGROUNDPEN]; @@ -321,7 +380,7 @@ } Icon *createappicon(struct module *m, Window p, char *name, - Pixmap pm1, Pixmap pm2, int x, int y) + Pixmap pm1, Pixmap pm2, Pixmap pmm, int x, int y) { Icon *i; Client *c; @@ -351,6 +410,7 @@ i->iconpm=pm1; i->secondpm=pm2; + i->maskpm=pmm; XGetGeometry(dpy, i->iconpm, &r, &tx, &ty, &w, &h, &b, &d); w+=8; h+=8; @@ -370,10 +430,17 @@ XSaveContext(dpy, i->labelwin, icon_context, (XPointer)i); XSelectInput(dpy, i->labelwin, ExposureMask); +#ifdef USE_FONTSETS + if((i->label=malloc(strlen(name)+1))!=NULL) { + strcpy(i->label, name); + i->labelwidth=XmbTextEscapement(labelfontset, i->label, + strlen(i->label)); +#else if((i->label.value=malloc((i->label.nitems=strlen(name))+1))!=NULL) { strcpy((char *)i->label.value, name); i->labelwidth=XTextWidth(labelfont, (char *)i->label.value, i->label.nitems); +#endif if(i->labelwidth) XResizeWindow(dpy, i->labelwin, i->labelwidth, scr->lh); XMoveWindow(dpy, i->labelwin, @@ -425,11 +492,16 @@ XDestroyWindow(dpy, i->labelwin); XDeleteContext(dpy, i->labelwin, icon_context); } +#ifdef USE_FONTSETS + if(i->label) + free(i->label); +#else if(i->label.value) if(i->module) free(i->label.value); else XFree(i->label.value); +#endif free(i); } @@ -497,6 +569,43 @@ void newicontitle(Client *c) { Icon *i=c->icon; +#ifdef USE_FONTSETS + XTextProperty prop; + if(i->label) { + free(i->label); + i->label = NULL; + } + if(XGetWMIconName(dpy, c->window, &prop) && prop.value) { + char **list; + int n; + if(XmbTextPropertyToTextList(dpy, &prop, &list, &n) >= Success) { + if(n > 0) { + if( prefs.shortlabelicons ) + { + if (strlen(list[0])>10){ + char *str1=list[0]; + char str2[11]; + strncpy (str2,str1,8); + str2[8]='.'; + str2[9]='.'; + str2[10]='\0'; + i->label = strdup(str2); + } else { + i->label = strdup(list[0]); + } + } else { + i->label = strdup(list[0]); + } + i->labelwidth=XmbTextEscapement(labelfontset, i->label, + strlen(i->label)); + } + XFreeStringList(list); + } + XFree(prop.value); + } + if(!i->label) + i->labelwidth = 0; +#else if(i->label.value) XFree(i->label.value); if(!(XGetWMIconName(dpy, c->window, &i->label))) { @@ -505,6 +614,7 @@ } else i->labelwidth=XTextWidth(labelfont, (char *)i->label.value, i->label.nitems); +#endif if(i->labelwidth) XResizeWindow(dpy, i->labelwin, i->labelwidth, c->scr->lh); if(i->mapped && i->labelwidth>0) @@ -517,3 +627,11 @@ if(i->mapped) redrawicon(i, i->labelwin); } + +void free_icon_pms(struct IconPixmaps *pms) +{ + if(pms->pm!=None) XFreePixmap(dpy, pms->pm); + if(pms->pm2!=None) XFreePixmap(dpy, pms->pm2); + free_color_store(dpy, &pms->cs); + free_color_store(dpy, &pms->cs2); +} diff -Nru amiwm-0.20.48/icon.h amiwm-0.21pl2/icon.h --- amiwm-0.20.48/icon.h 1998-03-15 19:00:55.000000000 +0000 +++ amiwm-0.21pl2/icon.h 2010-07-13 13:19:33.000000000 +0000 @@ -2,20 +2,32 @@ #define ICON_H #include "client.h" +#include "libami.h" +struct _Scrn; typedef struct _Icon { struct _Icon *next, *nextselected; - Scrn *scr; + struct _Scrn *scr; Client *client; struct module *module; Window parent, window, labelwin, innerwin; - Pixmap iconpm, secondpm; + Pixmap iconpm, secondpm, maskpm; +#ifdef USE_FONTSETS + char *label; +#else XTextProperty label; +#endif int x, y, width, height; int labelwidth; int selected, mapped; } Icon; +struct IconPixmaps +{ + Pixmap pm, pm2; + struct ColorStore cs, cs2; +}; + extern void redrawicon(Icon *, Window); extern void rmicon(Icon *); extern void createicon(Client *); @@ -26,5 +38,6 @@ extern void adjusticon(Icon *); extern void selecticon(Icon *); extern void deselecticon(Icon *); +extern void free_icon_pms(struct IconPixmaps *pms); #endif diff -Nru amiwm-0.20.48/joke_fs.c amiwm-0.21pl2/joke_fs.c --- amiwm-0.20.48/joke_fs.c 1970-01-01 00:00:00.000000000 +0000 +++ amiwm-0.21pl2/joke_fs.c 2010-07-13 13:56:17.000000000 +0000 @@ -0,0 +1,390 @@ +#include +#include +#include +#include +#include +#ifdef HAVE_FCNTL_H +#include +#endif +#include +#include +#ifdef HAVE_SYS_TIME_H +#include +#endif +#ifdef HAVE_SYS_SELECT_H +#include +#endif +#ifdef HAVE_SYS_WAIT_H +#include +#endif +#ifdef HAVE_UNISTD_H +#include +#endif + +#include "libami.h" +#include "drawinfo.h" + +#ifdef BSD_STYLE_GETTIMEOFDAY +#define GETTIMEOFDAY(tp) gettimeofday(tp, NULL) +#else +#define GETTIMEOFDAY(tp) gettimeofday(tp) +#endif + +#define FIXUPTV(tv) { \ + while((tv).tv_usec<0) { (tv).tv_usec+=1000000; (tv).tv_sec--; } \ + while((tv).tv_usec>=1000000) { (tv).tv_usec-=1000000; (tv).tv_sec++; } \ +} + +#define BIN_PREFIX AMIWM_HOME"/" + +#define NFMT 2 + +char fmt[NFMT+2][80]; +int fmtw[NFMT]; + + +Display *dpy; +char *progname; +unsigned long color_scheme[2]; +int scr, coloralloc, state=0; +Window root, win, win2; +Colormap cmap; +GC gc; +XFontStruct *font; +int gh, gw, ascent; +char *rcpath = BIN_PREFIX"requestchoice"; +char *rcmsg = "Notice"; +Pixmap disk_icon1, disk_icon2; +struct ColorStore colorstore1, colorstore2; +struct DrawInfo dri; +Atom appiconmsg; +char *currentdir = NULL; +XContext dircontext; +int my_in_fd, my_out_fd; + +void load_diskicon() +{ + struct DiskObject *disk_do; + + disk_do = GetDefDiskObject(1/*WBDISK*/); + if(disk_do == NULL) + disk_do = GetDefDiskObject(2/*WBDRAWER*/); + if(disk_do == NULL) + disk_do = GetDefDiskObject(3/*WBTOOL*/); + if(disk_do == NULL) { + md_errormsg(md_root, "Failed to load disk icon"); + md_exit(0); + } + disk_icon1 = + md_image_to_pixmap(md_root, dri.dri_Pens[BACKGROUNDPEN], + (struct Image *)disk_do->do_Gadget.GadgetRender, + disk_do->do_Gadget.Width, disk_do->do_Gadget.Height, + &colorstore1); + + disk_icon2 = + md_image_to_pixmap(md_root, dri.dri_Pens[BACKGROUNDPEN], + (struct Image *)disk_do->do_Gadget.SelectRender, + disk_do->do_Gadget.Width, disk_do->do_Gadget.Height, + &colorstore2); + + FreeDiskObject(disk_do); + XSync(dpy, False); +} + +void broker_cb(XEvent *evt, unsigned long mask) +{ + XPointer ret; + + if(evt->type != ClientMessage || evt->xclient.message_type != appiconmsg) + return; + + if(!XFindContext(dpy, evt->xclient.window, dircontext, &ret)) + currentdir = (char*)ret; +} + +void create_broker() +{ + cx_broker(0, broker_cb); +} + +void create_baseicons(char *dirs) +{ + char *dir, *dup = malloc(strlen(dirs)+1); + if(dup == NULL) + return; + strcpy(dup, dirs); + for(dir=strtok(dup, ":"); dir; dir=strtok(NULL, ":")) { + Window win = md_create_appicon(md_root, 0x80000000, 0x80000000, + dir, disk_icon1, disk_icon2, None); + XSaveContext(dpy, win, dircontext, (XPointer)dir); + } + free(dup); +} + +void migrate(int amount) +{ + Window r, p, *c = NULL; + unsigned int i, nc; + if(XQueryTree(dpy, root, &r, &p, &c, &nc)) { + XWarpPointer(dpy, None, None, 0, 0, 0, 0, 0, amount); + for(i=0; i=n? i-n+1:i)]; + if((c>'@' && c<'[')||(c>'`' && c<'{')) + c = (c&0xe0)|((((c&0x1f)+12)%26)+1); + *dst++ = c; + } + *dst = '\0'; +} + +void setup() +{ + XWindowAttributes attr; + XSetWindowAttributes nw; + XGCValues gcv; + XColor clr; + int i; + + dircontext = XUniqueContext(); + XGetWindowAttributes(dpy, root, &attr); + cmap = attr.colormap; + coloralloc = 0; + color_scheme[0] = BlackPixel(dpy, scr); + clr.flags = DoRed|DoGreen|DoBlue; + clr.red = ~0; + clr.green = 0; + clr.blue = 0; + if(XAllocColor(dpy, cmap, &clr)) { + color_scheme[1] = clr.pixel; + coloralloc = 1; + } else + color_scheme[1] = WhitePixel(dpy, scr); + nw.background_pixel = color_scheme[0]; + nw.border_pixel = color_scheme[1]; + nw.backing_store = NotUseful; + nw.save_under = False; + nw.event_mask = ExposureMask|ButtonPressMask; + nw.override_redirect = True; + nw.colormap = cmap; + nw.cursor = None; + install_kw(fmt[0], "Fsbgs gzjbnhefrr Sonhvgyghbear .g b pCbeargfvfa hyrr."); + win = XCreateWindow(dpy, root, 0, 0, gw = attr.width, gh = 84, 0, + attr.depth, InputOutput, attr.visual, + CWBackPixel|CWBorderPixel|CWBackingStore|CWSaveUnder| + CWEventMask|CWOverrideRedirect|CWColormap|CWCursor, &nw); + install_kw(fmt[1], "T0h0e0h0 0Z0r0q4v.g0n0g0v0bNaO 7#8"); + win2 = XCreateWindow(dpy, root, 0, 0, 1, 1, 0, 0, InputOnly, + attr.visual, CWOverrideRedirect, &nw); + install_kw(fmt[2], "NYC!E!V!Y\n' F S:B-B)"); + font = XLoadQueryFont(dpy, "-*-courier-bold-r-normal--14-*-*-*-*-*-iso8859-1"); + if(font == NULL) + font = XLoadQueryFont(dpy, "fixed"); + install_kw(fmt[3], "Ubrqu ,w btxbr"); + gcv.font = font->fid; + gc = XCreateGC(dpy, win, GCFont, &gcv); + + for(i=0; i=0) + close(my_in_fd); + if(my_out_fd>=0 && my_out_fd != my_in_fd) + close(my_out_fd); + if(of>=0) { + if(of!=1) dup2(of, 1); + if(of!=2) dup2(of, 2); + } + execv(msg[0], msg); + perror("execv"); + _exit(1); + } else if(pid<0) { + perror("fork"); + exit(1); + } +} + +void cleanup() +{ + XFreeGC(dpy, gc); + XFreeFont(dpy, font); + XDestroyWindow(dpy, win); + XDestroyWindow(dpy, win2); + if(coloralloc) + XFreeColors(dpy, cmap, color_scheme+1, 1, 0); +} + +void post_cleanup() +{ + char *clu[5]; + int i; + for(i=0; i<4; i++) + clu[i]=fmt[i]; + clu[4]=NULL; + post(clu); +} + +void redraw() +{ + int i; + if(state) + XSetForeground(dpy, gc, color_scheme[1]); + else + XSetForeground(dpy, gc, color_scheme[0]); + XFillRectangle(dpy, win, gc, 2, 2, 8, gh-4); + XFillRectangle(dpy, win, gc, gw-10, 2, 8, gh-4); + XFillRectangle(dpy, win, gc, 2, 2, gw-4, 8); + XFillRectangle(dpy, win, gc, 2, gh-10, gw-4, 8); + if(!state) + XSetForeground(dpy, gc, color_scheme[1]); + for(i=0; i>1, 22+i*26+ascent, + fmt[i], strlen(fmt[i])); +} + +int main(int argc, char *argv[]) +{ + int x_fd, cnt=0; + fd_set rfd_set; + struct timeval nextt; + char *basedir; + + progname = argv[0]; + + basedir = md_init(argc, argv); + if(basedir == NULL) + basedir = "/"; + + my_in_fd=strtol(argv[1], NULL, 0); + my_out_fd=strtol(argv[2], NULL, 0); + + if(!(dpy = md_display())) { + fprintf(stderr, "%s: cannot connect to X server %s\n", progname, + XDisplayName(NULL)); + exit(1); + } + scr = DefaultScreen(dpy); + root = RootWindow(dpy, scr); + + x_fd = ConnectionNumber(dpy); + + setup(); + load_diskicon(); + create_broker(); + create_baseicons(basedir); + + do + md_process_queued_events(); + while(currentdir == NULL && md_handle_input()>=0); + activate(); + XSync(dpy, False); + + GETTIMEOFDAY(&nextt); + for(;;) { + XEvent event; + struct timeval t; + + while(QLength(dpy)>0) { + XNextEvent(dpy, &event); + switch(event.type) { + case Expose: + redraw(); + break; + case ButtonPress: + cnt = 999; + break; + } + } + FD_ZERO(&rfd_set); + FD_SET(x_fd, &rfd_set); + + GETTIMEOFDAY(&t); + t.tv_sec = nextt.tv_sec - t.tv_sec; + t.tv_usec = nextt.tv_usec - t.tv_usec; + FIXUPTV(t); + while(t.tv_sec<0) { + state = !state; + cnt++; + redraw(); + t.tv_usec += 800000; + nextt.tv_usec += 800000; + FIXUPTV(nextt); + FIXUPTV(t); + } + + XFlush(dpy); + if(cnt>=16) + break; + if(select(x_fd+1, &rfd_set, NULL, NULL, &t)<0) { + perror("select"); + break; + } + + if(FD_ISSET(x_fd, &rfd_set)) + XPeekEvent(dpy, &event); + } + + deactivate(); + cleanup(); + + post_cleanup(); + + XCloseDisplay(dpy); + md_exit(0); + return 0; +} diff -Nru amiwm-0.20.48/lex.l amiwm-0.21pl2/lex.l --- amiwm-0.20.48/lex.l 2018-02-09 07:03:21.000000000 +0000 +++ amiwm-0.21pl2/lex.l 2010-04-09 22:15:15.000000000 +0000 @@ -6,10 +6,10 @@ extern FILE *rcfile; #undef yyin #define yyin rcfile -#define YY_SKIP_YYWRAP #define yywrap() 1 extern int parse_keyword(char *); void fixup_string(char *, char *); +#define YY_SKIP_YYWRAP %} %% diff -Nru amiwm-0.20.48/libami/drawinfo.c amiwm-0.21pl2/libami/drawinfo.c --- amiwm-0.20.48/libami/drawinfo.c 1998-03-15 19:26:34.000000000 +0000 +++ amiwm-0.21pl2/libami/drawinfo.c 2010-07-12 14:54:35.000000000 +0000 @@ -1,6 +1,7 @@ #include #include #include +#include #include "alloc.h" #include "drawinfo.h" @@ -13,6 +14,7 @@ #define TAG_DRI_VERSION 1 #define TAG_DRI_PENS 2 #define TAG_DRI_FONT 3 +#define TAG_DRI_FONTSET 4 extern char *progname; @@ -27,7 +29,12 @@ }; char *default_screenfont = -"-b&h-lucida-medium-r-normal-sans-12-*-*-*-*-*-iso8859-1"; +"-b&h-lucida-medium-r-normal-sans-12-*-*-*-*-*-iso8859-1" +#ifdef USE_FONTSETS +",-b&h-lucida-medium-r-normal-sans-12-*-*-*-*-*-iso10646-1" +",-misc-fixed-medium-r-normal--14-*-*-*-*-*-jisx0208.1983-0" +#endif +; static void setdriprop(Display *dpy, Atom atom, Atom typ, Window win, struct DrawInfo *dri) @@ -36,8 +43,13 @@ CARD16 i; *p++=TAG_DRI_VERSION; *p++=dri->dri_Version; +#ifdef USE_FONTSETS + *p++=TAG_DRI_FONTSET; + *p++=dri->dri_FontSetAtom; +#else *p++=TAG_DRI_FONT; *p++=dri->dri_Font->fid; +#endif *p++=TAG_DRI_PENS; *p++=dri->dri_NumPens; for(i=0; idri_NumPens; i++) @@ -64,10 +76,17 @@ if(idri_Version=prop[i++]; break; +#ifdef USE_FONTSETS + case TAG_DRI_FONTSET: + if(idri_FontSetAtom=prop[i++]; + break; +#else case TAG_DRI_FONT: if(idri_Font=XQueryFont(dpy, prop[i++]); break; +#endif case TAG_DRI_PENS: if(idri_Pens) { + XFreeColors(dpy, cm, dri->dri_Pens, dri->dri_NumPens, 0); + free(dri->dri_Pens); + dri->dri_Pens = NULL; + } +#ifdef USE_FONTSETS + if(dri->dri_FontSet) { + XFreeFontSet(dpy, dri->dri_FontSet); + dri->dri_FontSet = NULL; + } +#else + if(dri->dri_Font) { + XFreeFont(dpy, dri->dri_Font); + dri->dri_Font = NULL; + } +#endif +} + void init_dri(struct DrawInfo *dri, Display *dpy, Window root, Colormap cm, int override) { int i; Atom driatom, dritypatom; - memset(dri, 0, sizeof(*dri)); driatom=XInternAtom(dpy, "AMIWM_DRAWINFO", False); dritypatom=XInternAtom(dpy, "DRAWINFO", False); - if(!override) + if(!override) { + memset(dri, 0, sizeof(*dri)); getdriprop(dpy, driatom, dritypatom, root, dri); + } if(!dri->dri_Version) dri->dri_Version = DRI_VERSION; if(!dri->dri_Pens) { @@ -139,12 +179,57 @@ dri->dri_Pens[i] = allocdripen(dpy, i, cm); dri->dri_NumPens = NUMDRIPENS; } +#ifdef USE_FONTSETS + if(!dri->dri_FontSet) + { + char *fn; + XFontStruct **fsl; + char **fnl; + char **missing_charsets = NULL; + int n_missing_charsets = 0; + + if(dri->dri_FontSetAtom) { + fn = XGetAtomName(dpy, dri->dri_FontSetAtom); + } else { + dri->dri_FontSetAtom = XInternAtom(dpy, fn=default_screenfont, False); + } + + dri->dri_FontSet = XCreateFontSet(dpy, fn, + &missing_charsets, + &n_missing_charsets, NULL); + if(missing_charsets) + XFreeStringList(missing_charsets); + if(!dri->dri_FontSet) { + fprintf(stderr, "%s: cannot open font %s\n", progname, fn); + exit(1); + } + if(XFontsOfFontSet(dri->dri_FontSet, &fsl, &fnl) < 1) { + fprintf(stderr, "%s: fontset %s is empty\n", progname, fn); + exit(1); + } + if(fn != default_screenfont) + XFree(fn); +#if 0 + //dri->dri_Font = fsl[0]; + dri->dri_Font = malloc(sizeof(XFontStruct)); + memcpy(dri->dri_Font, fsl[0], sizeof(XFontStruct)); +#else + dri->dri_Ascent = fsl[0]->ascent; + dri->dri_Descent = fsl[0]->descent; + dri->dri_MaxBoundsWidth = fsl[0]->max_bounds.width; +#endif + } +#else if(!dri->dri_Font) if(!(dri->dri_Font = XLoadQueryFont(dpy, default_screenfont))) { fprintf(stderr, "%s: cannot open font %s\n", progname, default_screenfont); exit(1); } + dri->dri_Ascent = dri->dri_Font->ascent; + dri->dri_Descent = dri->dri_Font->descent; + dri->dri_MaxBoundsWidth = dri->dri_Font->max_bounds.width; +#endif if(override) setdriprop(dpy, driatom, dritypatom, root, dri); } diff -Nru amiwm-0.20.48/libami/drawinfo.h amiwm-0.21pl2/libami/drawinfo.h --- amiwm-0.20.48/libami/drawinfo.h 1997-12-12 21:25:26.000000000 +0000 +++ amiwm-0.21pl2/libami/drawinfo.h 2010-07-12 14:55:04.000000000 +0000 @@ -10,7 +10,11 @@ CARD16 dri_NumPens; /* guaranteed to be >= 9 */ unsigned long *dri_Pens; /* pointer to pen array */ +#ifdef USE_FONTSETS + XFontSet dri_FontSet; /* screen default font */ +#else XFontStruct *dri_Font; /* screen default font */ +#endif CARD16 dri_Depth; /* (initial) depth of screen bitmap */ struct { /* from DisplayInfo database for initial display mode */ @@ -26,7 +30,15 @@ Pixmap dri_AmigaKey; /* pointer to scaled Amiga-key image * Will be NULL if DRI_VERSION < 2 */ - CARD32 dri_Reserved[5]; /* avoid recompilation ;^) */ + CARD32 dri_Ascent; + CARD32 dri_Descent; + CARD32 dri_MaxBoundsWidth; +#ifdef USE_FONTSETS + Atom dri_FontSetAtom; + CARD32 dri_Reserved; /* avoid recompilation ;^) */ +#else + CARD32 dri_Reserved[2]; /* avoid recompilation ;^) */ +#endif }; #define DETAILPEN (0x0000) /* compatible Intuition rendering pens */ @@ -47,6 +59,7 @@ #define DRAWINFO_H +extern void term_dri(struct DrawInfo *, Display *, Colormap); extern void init_dri(struct DrawInfo *, Display *, Window, Colormap, int); #endif diff -Nru amiwm-0.20.48/libami/error.c amiwm-0.21pl2/libami/error.c --- amiwm-0.20.48/libami/error.c 1997-12-12 17:22:13.000000000 +0000 +++ amiwm-0.21pl2/libami/error.c 2010-04-09 22:15:15.000000000 +0000 @@ -1,4 +1,5 @@ #include +#include #include "libami.h" #ifndef AMIGAOS diff -Nru amiwm-0.20.48/libami/hotkey.c amiwm-0.21pl2/libami/hotkey.c --- amiwm-0.20.48/libami/hotkey.c 1997-12-12 17:22:14.000000000 +0000 +++ amiwm-0.21pl2/libami/hotkey.c 2010-04-09 22:15:15.000000000 +0000 @@ -46,7 +46,8 @@ break; } if(meta_mask == 0) - meta_mask = alt_mask; + meta_mask = (alt_mask? alt_mask : + (switch_mask? switch_mask : Mod1Mask)); } static void lookup_hotkey(struct hotkey *hk) diff -Nru amiwm-0.20.48/libami/iconlib.c amiwm-0.21pl2/libami/iconlib.c --- amiwm-0.20.48/libami/iconlib.c 1998-03-15 19:37:07.000000000 +0000 +++ amiwm-0.21pl2/libami/iconlib.c 2010-07-13 13:56:11.000000000 +0000 @@ -217,6 +217,157 @@ return NULL; } +#define GETBITS(v,n) do{if(bits<(n)){if(!srclen--)return dst-dst0;data=(data\ +<<8)|*src++;bits+=8;};v=(data>>(bits-(n)))&((1<<(n))-1);bits-=(n);}while(0) + +static LONG unpack_rle(unsigned char *src, LONG srclen, char *dst, LONG dstlen, + int bpp, int comp) +{ + char *dst0 = dst; + unsigned char *srcn = src+srclen; + int bits=0, data=0; + if(!comp) { + if(srclen>dstlen) + srclen = dstlen; + memcpy(dst, src, srclen); + return srclen; + } + while(dstlen>0) { + int code; + GETBITS(code, 8); + if(code&0x80) { + char rpt; + GETBITS(rpt, bpp); + code -= 0x100; + if((dstlen-=(1-code))<0) + break; + do { *dst++ = rpt; } while(code++); + } else { + if((dstlen-=(code+1))<0) + break; + do GETBITS(*dst++, bpp); while(code--); + } + } + if(src != srcn) + fprintf(stderr, "Warning: Left %d bytes unused.\n", srcn-src); + return dst-dst0; +} + +static void decode_IMAG(unsigned char *buf, LONG len, int width, int height, + APTR *im) +{ + struct { + int transp, ncolors, flags, bodycomp, palcomp, bpp; + int bodybytes, palbytes; + } hdr; + char *dbuf; + struct Image *ii; + + if(len<10) + return; + + hdr.transp = *buf++; + hdr.ncolors = (*buf++)+1; + hdr.flags = *buf++; + hdr.bodycomp = *buf++; + hdr.palcomp = *buf++; + hdr.bpp = *buf++; + hdr.bodybytes = ((buf[0]<<8)|(buf[1]))+1; + hdr.palbytes = ((buf[2]<<8)|(buf[3]))+1; + buf+=4; + len -= 10; + if(!(hdr.flags&1)) + hdr.transp = -1; + if(!(hdr.flags&2)) + hdr.ncolors = 0; + + if(hdr.bodybytes > len) + hdr.bodybytes = len; + if(hdr.palbytes+hdr.bodybytes > len) + hdr.palbytes = len-hdr.bodybytes; + + if(hdr.bodycomp>1 || hdr.palcomp>1) + return; + + if((dbuf = malloc(sizeof(struct Image)+width*height+3*hdr.ncolors+3))==NULL) + return; + + /* body */ + if(unpack_rle(buf, hdr.bodybytes, dbuf+sizeof(struct Image), width*height, + hdr.bpp, hdr.bodycomp) != width*height) { + free(dbuf); + return; + } + /* palette */ + if(unpack_rle(buf+hdr.bodybytes, hdr.palbytes, + dbuf+sizeof(struct Image)+width*height+3, 3*hdr.ncolors, + 8, hdr.palcomp) != 3*hdr.ncolors) { + free(dbuf); + return; + } + + if(*im != NULL) + free(*im); + *im = (APTR) (ii = (struct Image *)dbuf); + dbuf += sizeof(struct Image); + ii->ImageData = (UWORD *)dbuf; + dbuf += width*height; + + *dbuf++ = hdr.transp; + *dbuf++ = hdr.ncolors-1; + *dbuf++ = hdr.flags; + + ii->LeftEdge = ii->TopEdge = 0; + ii->Width = width; + ii->Height = height; + ii->Depth = -1; + ii->PlanePick = ii->PlaneOnOff = 0; + ii->NextImage = NULL; + + return; +} + +static void decode_glowicon(struct DiskObject *diskobj, char *glow, LONG len) +{ + int imgno=0, gotface=0; + struct { char width, height; UWORD dunno1, dunno2; } face; + while(len>=8) { + ULONG id = getu32(&glow); + LONG clen = get32(&glow); + char *chunk = glow; + len -= 8; + if(clen<0) + clen = len; + if(clen>len) + break; + switch(id) { + case 0x46414345: /* FACE */ + if(clen>=6) { + face.width = 1+*chunk++; + face.height = 1+*chunk++; + face.dunno1 = getu16(&chunk); + face.dunno2 = getu16(&chunk); + gotface = 1; + diskobj->do_Gadget.Width = face.width; + diskobj->do_Gadget.Height = face.height; + break; + } + break; + case 0x494d4147: /* IMAG */ + if(!gotface || imgno>1) + break; + decode_IMAG((unsigned char *)chunk, clen, face.width, face.height, + (imgno++? &diskobj->do_Gadget.SelectRender : + &diskobj->do_Gadget.GadgetRender)); + break; + } + if(clen&1) + clen++; + len -= clen; + glow += clen; + } +} + static struct DiskObject *int_load_do(char *filename) { FILE *f; @@ -316,6 +467,19 @@ } } + if(diskobj->do_Version) { + /* Check for GlowIcon */ + char buf[8], *p = buf, *glowicon; + LONG len; + if(1==fread(buf, 4, 1, f) && !strncmp(buf, "FORM", 4) && + 1==fread(buf, 8, 1, f) && !strncmp(buf+4, "ICON", 4) && + (len = get32(&p))>4 && (glowicon = malloc(len))!=NULL) { + if(1==fread(glowicon, len-4, 1, f)) + decode_glowicon(diskobj, glowicon, len-4); + free(glowicon); + } + } + if(!error) { fclose(f); return diskobj; diff -Nru amiwm-0.20.48/libami/iconutil.c amiwm-0.21pl2/libami/iconutil.c --- amiwm-0.20.48/libami/iconutil.c 1997-12-12 21:15:14.000000000 +0000 +++ amiwm-0.21pl2/libami/iconutil.c 2010-07-13 12:53:51.000000000 +0000 @@ -16,13 +16,15 @@ Pixmap image_to_pixmap(Display *dpy, Window win, GC gc, unsigned long bg, unsigned long *iconcolor, int iconcolormask, - struct Image *im, int width, int height) + struct Image *im, int width, int height, + struct ColorStore *cs) { int bpr, bitmap_pad, x, y; XImage *ximg; unsigned char *img; Pixmap pm; XWindowAttributes attr; + int fail=0; if(!dpy || !win || !gc || !im || !(img=(unsigned char *)im->ImageData)) return None; @@ -49,19 +51,56 @@ #else ximg->data = alloca(ximg->bytes_per_line * im->Height); #endif - for(y=0; yHeight; y++) - for(x=0; xWidth; x++) { - unsigned char b=1, v=im->PlaneOnOff&~(im->PlanePick); - INT16 p=0; - while(pDepth && b) { - if(b&im->PlanePick) - if(img[(p++*im->Height+y)*bpr+(x>>3)]&(128>>(x&7))) - v|=b; - b<<=1; - } - XPutPixel(ximg, x, y, iconcolor[v&iconcolormask]); + if(im->Depth==-1) { + int transp, ncolors, flags; + unsigned char *pal = img + im->Width * im->Height; + unsigned long ic[256]; + transp = *pal++; + ncolors = 1+*pal++; + flags = *pal++; + if(!(flags&1)) + transp = -1; + if(!(flags&2)) + ncolors = 0; + memset(ic, 0, sizeof(ic)); + if(!ncolors) { + if(cs) cs->colors = NULL; + } else if(!cs || !(cs->colors = calloc(ncolors, sizeof(unsigned long)))) { + ncolors = 0; + fail = 1; + } + for(x=0; xcmap = attr.colormap; + cs->ncolors = ncolors; + if(ncolors) memcpy(cs->colors, ic, ncolors*sizeof(unsigned long)); } - if((pm=XCreatePixmap(dpy, win, width, height, attr.depth))) { + for(y=0; yHeight; y++) + for(x=0; xWidth; x++) + XPutPixel(ximg, x, y, ic[*img++]); + } else + for(y=0; yHeight; y++) + for(x=0; xWidth; x++) { + unsigned char b=1, v=im->PlaneOnOff&~(im->PlanePick); + INT16 p=0; + while(pDepth && b) { + if(b&im->PlanePick) + if(img[(p++*im->Height+y)*bpr+(x>>3)]&(128>>(x&7))) + v|=b; + b<<=1; + } + XPutPixel(ximg, x, y, iconcolor[v&iconcolormask]); + } + if((pm=(fail?None:XCreatePixmap(dpy, win, width, height, attr.depth)))) { XSetForeground(dpy, gc, bg); XFillRectangle(dpy, pm, gc, 0, 0, width, height); XPutImage(dpy, pm, gc, ximg, 0, 0, im->LeftEdge, im->TopEdge, @@ -72,5 +111,16 @@ #endif ximg->data=NULL; XDestroyImage(ximg); + if(pm == None) + free_color_store(dpy, cs); return pm; } + +void free_color_store(Display *dpy, struct ColorStore *cs) +{ + if(cs && cs->colors) { + XFreeColors(dpy, cs->cmap, cs->colors, cs->ncolors, 0); + free(cs->colors); + cs->colors = NULL; + } +} diff -Nru amiwm-0.20.48/libami/iffparse.c amiwm-0.21pl2/libami/iffparse.c --- amiwm-0.20.48/libami/iffparse.c 1970-01-01 00:00:00.000000000 +0000 +++ amiwm-0.21pl2/libami/iffparse.c 2010-04-09 22:15:15.000000000 +0000 @@ -0,0 +1,163 @@ +#include "libami.h" +#include "alloc.h" +#include +#include +#include +#ifdef HAVE_FCNTL_H +#include +#endif +#ifdef HAVE_UNISTD_H +#include +#endif + +#ifndef AMIGAOS + +static LONG callIFFHook(struct IFFHandle *iff, LONG cmd, APTR buf, LONG nby) +{ + struct IFFStreamCmd c; + c.sc_Command = cmd; + c.sc_Buf = buf; + c.sc_NBytes = nby; + if(iff->iff_Hook == NULL) + return IFFERR_NOHOOK; + else + return iff->iff_Hook->h_SubEntry(iff->iff_Hook, iff, &c); +} + +LONG ReadChunkBytes( struct IFFHandle *iff, APTR buf, long numBytes ); +LONG WriteChunkBytes( struct IFFHandle *iff, APTR buf, long numBytes ); +LONG ReadChunkRecords( struct IFFHandle *iff, APTR buf, long bytesPerRecord, + long numRecords ); +LONG WriteChunkRecords( struct IFFHandle *iff, APTR buf, long bytesPerRecord, + long numRecords ); + +LONG PushChunk( struct IFFHandle *iff, long type, long id, long size ); +LONG PopChunk( struct IFFHandle *iff ); + +LONG EntryHandler( struct IFFHandle *iff, long type, long id, long position, + struct Hook *handler, APTR object ); +LONG ExitHandler( struct IFFHandle *iff, long type, long id, long position, + struct Hook *handler, APTR object ); + +LONG PropChunk( struct IFFHandle *iff, long type, long id ); +LONG PropChunks( struct IFFHandle *iff, LONG *propArray, long numPairs ); +LONG StopChunk( struct IFFHandle *iff, long type, long id ); +LONG StopChunks( struct IFFHandle *iff, LONG *propArray, long numPairs ); +LONG CollectionChunk( struct IFFHandle *iff, long type, long id ); +LONG CollectionChunks( struct IFFHandle *iff, LONG *propArray, + long numPairs ); +LONG StopOnExit( struct IFFHandle *iff, long type, long id ); + +struct StoredProperty *FindProp( struct IFFHandle *iff, long type, long id ); +struct CollectionItem *FindCollection( struct IFFHandle *iff, long type, + long id ); +struct ContextNode *FindPropContext( struct IFFHandle *iff ); +struct ContextNode *CurrentChunk( struct IFFHandle *iff ); +struct ContextNode *ParentChunk( struct ContextNode *contextNode ); + +struct LocalContextItem *AllocLocalItem( long type, long id, long ident, + long dataSize ); +APTR LocalItemData( struct LocalContextItem *localItem ); +void SetLocalItemPurge( struct LocalContextItem *localItem, + struct Hook *purgeHook ); +void FreeLocalItem( struct LocalContextItem *localItem ); +struct LocalContextItem *FindLocalItem( struct IFFHandle *iff, long type, + long id, long ident ); +LONG StoreLocalItem( struct IFFHandle *iff, struct LocalContextItem *localItem, + long position ); +void StoreItemInContext( struct IFFHandle *iff, + struct LocalContextItem *localItem, + struct ContextNode *contextNode ); + +LONG GoodID( long id ); +LONG GoodType( long type ); +STRPTR IDtoStr( long id, STRPTR buf ); + + +void InitIFF( struct IFFHandle *iff, long flags, struct Hook *streamHook ) +{ + iff->iff_Flags = flags; + iff->iff_Hook = streamHook; +} + +struct IFFHandle *AllocIFF( void ) +{ + return (struct IFFHandle *)calloc(1, sizeof(struct IFFHandle)); +} + +LONG OpenIFF( struct IFFHandle *iff, long rwMode ) +{ + return callIFFHook(iff, IFFCMD_INIT, NULL, 0); +} + +LONG ParseIFF( struct IFFHandle *iff, long control ) +{ + return IFFERR_NOHOOK; +} + +void CloseIFF( struct IFFHandle *iff ) +{ + callIFFHook(iff, IFFCMD_CLEANUP, NULL, 0); +} + +void FreeIFF( struct IFFHandle *iff ) +{ + free(iff); +} + + + +#else + +static ULONG __saveds __asm hllDispatch(register __a0 struct Hook *hook, + register __a2 APTR object, + register __a1 APTR message) +{ + return ((ULONG (*)(struct Hook *, APTR, APTR))hook->h_SubEntry) + (hook, object, message); +} + +#endif + +static ULONG iffFileHook(struct Hook *hook, APTR object, APTR message) +{ + struct IFFStreamCmd *cmd = (struct IFFStreamCmd *)message; + switch(cmd->sc_Command) { + case IFFCMD_INIT: + return 0; + case IFFCMD_CLEANUP: + close(((struct IFFHandle *)object)->iff_Stream); + return 0; + case IFFCMD_READ: + return IFFERR_READ; + case IFFCMD_WRITE: + return IFFERR_WRITE; + case IFFCMD_SEEK: + return IFFERR_SEEK; + } + return 0; +} + +LONG OpenIFFasFile( struct IFFHandle *iff, char *fn, char *mode ) +{ + static struct Hook hook = +#ifdef AMIGAOS + { { 0, 0 }, hllDispatch, iffFileHook, 0 }; +#else + { { 0, 0 }, 0, iffFileHook, 0 }; +#endif + int m, fd; + LONG r; + + if((fd = open(fn, (strchr(mode, 'w')==NULL? O_RDONLY : + (O_WRONLY|O_TRUNC|O_CREAT)), 0666))<0) + return IFFERR_READ; + iff->iff_Stream = fd; + InitIFF( iff, (strchr(mode, 'w')==NULL? (m=IFFF_READ|IFFF_RSEEK) : + (m=IFFF_WRITE|IFFF_RSEEK)), &hook ); + if((r=OpenIFF( iff, m ))!=0) { + close(fd); + return r; + } + return 0; +} diff -Nru amiwm-0.20.48/libami/libami.h amiwm-0.21pl2/libami/libami.h --- amiwm-0.20.48/libami/libami.h 1997-12-12 21:09:35.000000000 +0000 +++ amiwm-0.21pl2/libami/libami.h 2010-07-13 13:09:21.000000000 +0000 @@ -1,3 +1,6 @@ +#ifndef LIBAMI_H +#define LIBAMI_H + #include #include @@ -5,11 +8,14 @@ #include #include #include +#include #include #include #include #include #include +#include +#include #else #define GLOBAL extern @@ -164,6 +170,30 @@ LONG do_StackSize; }; +struct Hook +{ + struct MinNode h_MinNode; + ULONG (*h_Entry)(); /* assembler entry point */ + ULONG (*h_SubEntry)(); /* often HLL entry point */ + APTR h_Data; /* owner specific */ +}; + +struct IFFHandle +{ + ULONG iff_Stream; + ULONG iff_Flags; + LONG iff_Depth; /* Depth of context stack */ + /* private fields */ + struct Hook *iff_Hook; +}; + +struct IFFStreamCmd +{ + LONG sc_Command; /* Operation to be performed (IFFCMD_) */ + APTR sc_Buf; /* Pointer to data buffer */ + LONG sc_NBytes; /* Number of bytes to be affected */ +}; + #define RDAB_STDIN 0 /* Use "STDIN" rather than "COMMAND LINE" */ #define RDAF_STDIN 1 @@ -189,6 +219,35 @@ #define ERROR_TOO_MANY_ARGS 118 #define ERROR_LINE_TOO_LONG 120 +#define IFFERR_EOF -1L /* Reached logical end of file */ +#define IFFERR_EOC -2L /* About to leave context */ +#define IFFERR_NOSCOPE -3L /* No valid scope for property */ +#define IFFERR_NOMEM -4L /* Internal memory alloc failed */ +#define IFFERR_READ -5L /* Stream read error */ +#define IFFERR_WRITE -6L /* Stream write error */ +#define IFFERR_SEEK -7L /* Stream seek error */ +#define IFFERR_MANGLED -8L /* Data in file is corrupt */ +#define IFFERR_SYNTAX -9L /* IFF syntax error */ +#define IFFERR_NOTIFF -10L /* Not an IFF file */ +#define IFFERR_NOHOOK -11L /* No call-back hook provided */ +#define IFF_RETURN2CLIENT -12L /* Client handler normal return */ + +#define IFFF_READ 0L /* read mode - default */ +#define IFFF_WRITE 1L /* write mode */ +#define IFFF_RWBITS (IFFF_READ | IFFF_WRITE) /* read/write bits */ +#define IFFF_FSEEK (1L<<1) /* forward seek only */ +#define IFFF_RSEEK (1L<<2) /* random seek */ +#define IFFF_RESERVED 0xFFFF0000L /* Don't touch these bits */ + +#define IFFCMD_INIT 0 /* Prepare the stream for a session */ +#define IFFCMD_CLEANUP 1 /* Terminate stream session */ +#define IFFCMD_READ 2 /* Read bytes from stream */ +#define IFFCMD_WRITE 3 /* Write bytes to stream */ +#define IFFCMD_SEEK 4 /* Seek on stream */ +#define IFFCMD_ENTRY 5 /* You just entered a new context */ +#define IFFCMD_EXIT 6 /* You're about to leave a context */ +#define IFFCMD_PURGELCI 7 /* Purge a LocalContextItem */ + extern void FreeArgs(struct RDArgs *); extern LONG ReadItem(STRPTR, LONG, struct CSource *); @@ -213,10 +272,60 @@ extern LONG IoErr(); extern LONG SetIoErr(LONG); +extern struct IFFHandle *AllocIFF( void ); +extern LONG OpenIFF( struct IFFHandle *iff, long rwMode ); +extern LONG ParseIFF( struct IFFHandle *iff, long control ); +extern void CloseIFF( struct IFFHandle *iff ); +extern void FreeIFF( struct IFFHandle *iff ); + +extern LONG ReadChunkBytes( struct IFFHandle *iff, APTR buf, long numBytes ); +extern LONG WriteChunkBytes( struct IFFHandle *iff, APTR buf, long numBytes ); +extern LONG ReadChunkRecords( struct IFFHandle *iff, APTR buf, long bytesPerRecord, long numRecords ); +extern LONG WriteChunkRecords( struct IFFHandle *iff, APTR buf, long bytesPerRecord, long numRecords ); + +extern LONG PushChunk( struct IFFHandle *iff, long type, long id, long size ); +extern LONG PopChunk( struct IFFHandle *iff ); + +extern LONG EntryHandler( struct IFFHandle *iff, long type, long id, long position, struct Hook *handler, APTR object ); +extern LONG ExitHandler( struct IFFHandle *iff, long type, long id, long position, struct Hook *handler, APTR object ); + +extern LONG PropChunk( struct IFFHandle *iff, long type, long id ); +extern LONG PropChunks( struct IFFHandle *iff, LONG *propArray, long numPairs ); +extern LONG StopChunk( struct IFFHandle *iff, long type, long id ); +extern LONG StopChunks( struct IFFHandle *iff, LONG *propArray, long numPairs ); +extern LONG CollectionChunk( struct IFFHandle *iff, long type, long id ); +extern LONG CollectionChunks( struct IFFHandle *iff, LONG *propArray, long numPairs ); +extern LONG StopOnExit( struct IFFHandle *iff, long type, long id ); + +extern struct StoredProperty *FindProp( struct IFFHandle *iff, long type, long id ); +extern struct CollectionItem *FindCollection( struct IFFHandle *iff, long type, long id ); +extern struct ContextNode *FindPropContext( struct IFFHandle *iff ); +extern struct ContextNode *CurrentChunk( struct IFFHandle *iff ); +extern struct ContextNode *ParentChunk( struct ContextNode *contextNode ); + +extern struct LocalContextItem *AllocLocalItem( long type, long id, long ident, long dataSize ); +extern APTR LocalItemData( struct LocalContextItem *localItem ); +extern void SetLocalItemPurge( struct LocalContextItem *localItem, struct Hook *purgeHook ); +extern void FreeLocalItem( struct LocalContextItem *localItem ); +extern struct LocalContextItem *FindLocalItem( struct IFFHandle *iff, long type, long id, long ident ); +extern LONG StoreLocalItem( struct IFFHandle *iff, struct LocalContextItem *localItem, long position ); +extern void StoreItemInContext( struct IFFHandle *iff, struct LocalContextItem *localItem, struct ContextNode *contextNode ); + +extern void InitIFF( struct IFFHandle *iff, long flags, struct Hook *streamHook ); + +extern LONG GoodID( long id ); +extern LONG GoodType( long type ); +extern STRPTR IDtoStr( long id, STRPTR buf ); + #endif +extern LONG OpenIFFasFile( struct IFFHandle *iff, char *fn, char *mode ); + +struct ColorStore { unsigned long *colors; int ncolors; Colormap cmap; }; extern Pixmap image_to_pixmap(Display *, Window, GC, unsigned long, - unsigned long *, int, struct Image *, int, int); + unsigned long *, int, struct Image *, int, int, + struct ColorStore *); +extern void free_color_store(Display *, struct ColorStore *); typedef union { LONG num; APTR ptr; } Argtype; @@ -273,10 +382,12 @@ /* mdicon.c */ extern Window md_create_appicon(Window, int, int, char *, - Pixmap, Pixmap); + Pixmap, Pixmap, Pixmap); extern Pixmap md_image_to_pixmap(Window, unsigned long, struct Image *, - int, int); + int, int, struct ColorStore *); extern char *get_current_icondir(void); /* mdwindow.c */ extern int md_set_appwindow(Window); + +#endif diff -Nru amiwm-0.20.48/libami/Makefile.in amiwm-0.21pl2/libami/Makefile.in --- amiwm-0.20.48/libami/Makefile.in 1997-12-12 20:17:22.000000000 +0000 +++ amiwm-0.21pl2/libami/Makefile.in 2010-04-09 22:15:15.000000000 +0000 @@ -19,11 +19,13 @@ OBJS = drawinfo.o module.o broker.o eventdispatcher.o mdscreen.o \ mdicon.o mdwindow.o kbdsupport.o hotkey.o \ - lists.o readargs.o iconlib.o iconutil.o error.o strutil.o + lists.o readargs.o iconlib.o iconutil.o error.o strutil.o \ + iffparse.o SRCS = drawinfo.c module.c broker.c eventdispatcher.c mdscreen.c \ mdicon.c mdwindow.c kbdsupport.c hotkey.c \ - lists.c readargs.c iconlib.c iconutil.c error.c strutil.c + lists.c readargs.c iconlib.c iconutil.c error.c strutil.c \ + iffparse.c all : libami.a diff -Nru amiwm-0.20.48/libami/mdicon.c amiwm-0.21pl2/libami/mdicon.c --- amiwm-0.20.48/libami/mdicon.c 1998-03-15 19:31:03.000000000 +0000 +++ amiwm-0.21pl2/libami/mdicon.c 2010-07-13 12:35:25.000000000 +0000 @@ -6,7 +6,7 @@ #include "alloc.h" Window md_create_appicon(Window p, int x, int y, char *name, - Pixmap pm1, Pixmap pm2) + Pixmap pm1, Pixmap pm2, Pixmap pmm) { char *data; Window w; @@ -18,7 +18,7 @@ if(nai==NULL) return None; #endif nai->x=x; nai->y=y; - nai->pm1=pm1; nai->pm2=pm2; + nai->pm1=pm1; nai->pm2=pm2; nai->pmm=pmm; strcpy(nai->name, name); res=md_command(p, MCMD_CREATEAPPICON, nai, sizeof(struct NewAppIcon)+l, &data); @@ -38,7 +38,7 @@ } Pixmap md_image_to_pixmap(Window w, unsigned long bgcolor, struct Image *i, - int width, int height) + int width, int height, struct ColorStore *cs) { Display *dpy = md_display(); static GC gc = None; @@ -56,7 +56,7 @@ iconcolormask = (res/sizeof(unsigned long))-1; } pm = image_to_pixmap(md_display(), w, gc, bgcolor, iconcolor, iconcolormask, - i, width, height); + i, width, height, cs); return pm; } diff -Nru amiwm-0.20.48/libami/mdscreen.c amiwm-0.21pl2/libami/mdscreen.c --- amiwm-0.20.48/libami/mdscreen.c 1997-12-12 17:22:19.000000000 +0000 +++ amiwm-0.21pl2/libami/mdscreen.c 2010-04-09 22:15:15.000000000 +0000 @@ -1,5 +1,6 @@ #include "libami.h" #include "module.h" +#include int md_rotate_screen(XID id) { diff -Nru amiwm-0.20.48/main.c amiwm-0.21pl2/main.c --- amiwm-0.20.48/main.c 1998-03-15 19:00:48.000000000 +0000 +++ amiwm-0.21pl2/main.c 2010-07-18 13:13:20.000000000 +0000 @@ -25,9 +25,15 @@ #ifdef HAVE_SYS_SELECT_H #include #endif +#ifdef HAVE_SYS_TYPES_H +#include +#endif #ifdef HAVE_UNISTD_H #include #endif +#ifdef USE_FONTSETS +#include +#endif #include "drawinfo.h" #include "screen.h" @@ -64,7 +70,7 @@ int x, y; } DragIcon; -Display *dpy; +Display *dpy = NULL; char *progname; Cursor wm_curs; int signalled=0, forcemoving=0; @@ -85,8 +91,9 @@ static fd_set master_fd_set; static int max_fd=0; char *free_screentitle=NULL; -char *x_server; +char *x_server=NULL; int shape_event_base, shape_error_base, shape_extn=0; +int server_grabs=0; unsigned int meta_mask, switch_mask; @@ -107,7 +114,7 @@ extern void menu_off(void); extern void menubar_enter(Window); extern void menubar_leave(Window); -extern void *getitembyhotkey(char); +extern void *getitembyhotkey(KeySym); extern void menuaction(void *); extern void screentoback(); extern void openscreen(char *, Window); @@ -184,7 +191,7 @@ { struct coevent *ee, **e=&eventlist; - while(*e && ((*e)->what != what || (*e)->with)) + while(*e && ((*e)->what != what || (*e)->with != with)) e=&(*e)->next; if((ee=*e)) { *e=(*e)->next; @@ -198,20 +205,20 @@ #define GETTIMEOFDAY(tp) gettimeofday(tp) #endif -void call_out(int howlong, void (*what)(void *), void *with) +void call_out(int howlong_s, int howlong_u, void (*what)(void *), void *with) { struct coevent *ce=malloc(sizeof(struct coevent)); if(ce) { struct coevent **e=&eventlist; GETTIMEOFDAY(&ce->when); - ce->when.tv_sec+=howlong/1000; - ce->when.tv_usec+=1000*(howlong%1000); + ce->when.tv_sec+=howlong_s; + ce->when.tv_usec+=howlong_u; FIXUPTV(ce->when); ce->what=what; ce->with=with; while(*e && ((*e)->when.tv_secwhen.tv_sec || ((*e)->when.tv_sec==ce->when.tv_sec && - (*e)->when.tv_usec>=ce->when.tv_usec))) + (*e)->when.tv_usec<=ce->when.tv_usec))) e=&(*e)->next; ce->next=*e; *e=ce; @@ -285,7 +292,8 @@ XFree(kmap); XFreeModifiermap(map); if(meta_mask == 0) - meta_mask = alt_mask; + meta_mask = (alt_mask? alt_mask : + (switch_mask? switch_mask : Mod1Mask)); } @@ -307,7 +315,7 @@ XClearWindow(dpy, s->menubar); redrawmenubar(s->menubar); XBell(dpy, 100); - call_out(2000, (void(*)(void *))restorescreentitle, s); + call_out(2, 0, (void(*)(void *))restorescreentitle, s); } void setfocus(Window w) @@ -317,6 +325,25 @@ XSetInputFocus(dpy, w, (prefs.focus==FOC_CLICKTOTYPE? RevertToNone:RevertToPointerRoot), CurrentTime); } +static void update_clock(void *dontcare); + +void grab_server() +{ + if(!server_grabs++) + XGrabServer(dpy); +} + +void ungrab_server() +{ + if(!--server_grabs) { + XUngrabServer(dpy); + if(prefs.titlebarclock) { + remove_call_out(update_clock, NULL); + update_clock(NULL); + } + } +} + void drawrubber() { if(rubberclient) @@ -341,7 +368,7 @@ static void move_dashes(void *dontcare) { - call_out(50, move_dashes, dontcare); + call_out(0, 50000, move_dashes, dontcare); drawrubber(); if((--d_offset)<0) d_offset=11; @@ -351,10 +378,14 @@ void endrubber() { if(rubberclient) { - drawrubber(); + if((!prefs.opaquemove||dragclient==NULL) && + (!prefs.opaqueresize||resizeclient==NULL)) + drawrubber(); rubberclient=NULL; } else if(boundingwin) { - drawrubber(); + if((!prefs.opaquemove||dragclient==NULL) && + (!prefs.opaqueresize||resizeclient==NULL)) + drawrubber(); boundingwin=None; } } @@ -376,13 +407,13 @@ if(rubberclient) { endrubber(); dragclient=resizeclient=NULL; - XUngrabServer(dpy); + ungrab_server(); XUngrabPointer(dpy, CurrentTime); } else if(boundingwin) { endrubber(); boundingwin=None; boundingscr=NULL; - XUngrabServer(dpy); + ungrab_server(); XUngrabPointer(dpy, CurrentTime); } } @@ -395,7 +426,7 @@ XGrabPointer(dpy, w, False, Button1MotionMask|ButtonPressMask| ButtonReleaseMask, GrabModeAsync, GrabModeAsync, s->back, None, CurrentTime); - XGrabServer(dpy); + grab_server(); rubberx=e->xbutton.x; rubbery=e->xbutton.y; rubberx0=e->xbutton.x_root; @@ -403,7 +434,7 @@ rubberw=0; rubberh=0; drawrubber(); - call_out(0, move_dashes, NULL); + call_out(0, 0, move_dashes, NULL); } void endbounding(XEvent *e) @@ -435,7 +466,7 @@ bx+i->width>rubberx && by+i->height>rubbery) selecticon(i); boundingscr=NULL; - XUngrabServer(dpy); + ungrab_server(); XUngrabPointer(dpy, CurrentTime); } } @@ -447,7 +478,8 @@ XGrabPointer(dpy, c->drag, False, Button1MotionMask|ButtonPressMask| ButtonReleaseMask, GrabModeAsync, GrabModeAsync, scr->back, None, CurrentTime); - XGrabServer(dpy); + if(!prefs.opaquemove) + grab_server(); initrubber(e->xbutton.x_root, e->xbutton.y_root, c); rubberx0-=rubberx; rubbery0-=rubbery; @@ -461,7 +493,8 @@ if(rubbery<0) rubbery=0; } - drawrubber(); + if(!prefs.opaquemove) + drawrubber(); } void startscreendragging(Scrn *s, XEvent *e) @@ -646,6 +679,21 @@ xwa.depth, xwa.class, xwa.visual, CWBackPixmap|CWOverrideRedirect|CWSaveUnder|CWColormap, &xswa); +#ifdef HAVE_XSHAPE + if(shape_extn) + if(i->innerwin) { + int bShaped, xbs, ybs, cShaped, xcs, ycs; + unsigned int wbs, hbs, wcs, hcs; + XShapeQueryExtents(dpy, i->innerwin, &bShaped, &xbs, &ybs, &wbs, &hbs, + &cShaped, &xcs, &ycs, &wcs, &hcs); + if(bShaped) + XShapeCombineShape(dpy, dragiconlist[numdragicons].w, ShapeBounding, + 0, 0, i->innerwin, ShapeBounding, ShapeSet); + } else if(i->maskpm) { + XShapeCombineMask(dpy, dragiconlist[numdragicons].w, ShapeBounding, + 0, 0, i->maskpm, ShapeSet); + } +#endif XMapRaised(dpy, dragiconlist[numdragicons].w); numdragicons++; } @@ -665,7 +713,8 @@ rubbery=1-(c->scr->bh); XMoveWindow(dpy, c->parent, c->x=rubberx, c->y=rubbery); dragclient=NULL; - XUngrabServer(dpy); + if(!prefs.opaquemove) + ungrab_server(); XUngrabPointer(dpy, CurrentTime); sendconfig(c); } @@ -705,11 +754,13 @@ XGrabPointer(dpy, c->resize, False, Button1MotionMask|ButtonPressMask| ButtonReleaseMask, GrabModeAsync, GrabModeAsync, c->scr->back, None, CurrentTime); - XGrabServer(dpy); + if(!prefs.opaqueresize) + grab_server(); initrubber(e->xbutton.x_root, e->xbutton.y_root, c); rubberx0-=rubberw; rubbery0-=rubberh; - drawrubber(); + if(!prefs.opaqueresize) + drawrubber(); } void endresizing() @@ -718,13 +769,28 @@ if(resizeclient) { Client *c=resizeclient; endrubber(); + if(!prefs.opaqueresize) + ungrab_server(); resizeclientwindow(c, rubberw, rubberh); resizeclient=NULL; - XUngrabServer(dpy); XUngrabPointer(dpy, CurrentTime); } } +void abortfocus() +{ + if(activeclient) { + activeclient->active=False; + redrawclient(activeclient); + if(prefs.focus==FOC_CLICKTOTYPE) + XGrabButton(dpy, Button1, AnyModifier, activeclient->parent, + True, ButtonPressMask, GrabModeSync, GrabModeAsync, + None, wm_curs); + activeclient = NULL; + } + setfocus(None); +} + RETSIGTYPE sighandler(int sig) { signalled=1; @@ -762,15 +828,57 @@ } } +static void update_clock(void *dontcare) +{ + if(server_grabs) + return; + call_out(prefs.titleclockinterval, 0, update_clock, dontcare); + scr = front; + do { + redrawmenubar(scr->menubar); + scr=scr->behind; + } while(scr!=front); +} + +void cleanup() +{ + extern void free_prefs(); + struct coevent *e; + flushmodules(); + flushclients(); + scr=front; + while(scr) + closescreen(); + free_prefs(); + if(dpy) { + XSetInputFocus(dpy, PointerRoot, RevertToPointerRoot, CurrentTime); + XFlush(dpy); + XCloseDisplay(dpy); + } + while((e = eventlist)) { + eventlist = e->next; + free(e); + } + if(x_server) + free(x_server); +} + int main(int argc, char *argv[]) { int x_fd, sc; static Argtype array[3]; struct RDArgs *ra; +#ifdef USE_FONTSETS + setlocale(LC_CTYPE, ""); + setlocale(LC_TIME, ""); +#endif + main_argv=argv; progname=argv[0]; + atexit(cleanup); + memset(array, 0, sizeof(array)); initargs(argc, argv); if(!(ra=ReadArgs((UBYTE *)"RCFILE,DISPLAY/K,SINGLE/S", @@ -779,7 +887,9 @@ exit(1); } - x_server = XDisplayName(array[1].ptr); + x_server = strdup(XDisplayName(array[1].ptr)); + + XrmInitialize(); if(!(dpy = XOpenDisplay(array[1].ptr))) { fprintf(stderr, "%s: cannot connect to X server %s\n", progname, x_server); @@ -819,7 +929,7 @@ init_modules(); read_rc_file(array[0].ptr, !array[2].num); - + if( prefs.titleclockinterval < 1 ) prefs.titleclockinterval = 1; FreeArgs(ra); if (signal(SIGTERM, sighandler) == SIG_IGN) @@ -857,6 +967,9 @@ initting = 0; + if(prefs.titlebarclock) + call_out(0, 0, update_clock, NULL); + while(!signalled) { fd_set rfds; struct timeval t; @@ -886,14 +999,16 @@ switch(event.type) { case Expose: if(!event.xexpose.count) { - if(rubberclient || boundingscr) drawrubber(); + if((rubberclient || boundingscr)&&!prefs.opaquemove + &&!prefs.opaqueresize) + drawrubber(); if(c) redraw(c, event.xexpose.window); else if(i) redrawicon(i, event.xexpose.window); else if(scr) redrawmenubar(event.xexpose.window); - if(rubberclient || boundingscr) drawrubber(); + if((rubberclient || boundingscr)&&!prefs.opaquemove) drawrubber(); } break; case CreateNotify: @@ -997,6 +1112,7 @@ case CirculateNotify: case GravityNotify: case NoExpose: + case GraphicsExpose: break; case ClientMessage: if(c) @@ -1011,6 +1127,9 @@ } break; case ConfigureRequest: + if(XFindContext(dpy, event.xconfigurerequest.window, client_context, + (XPointer*)&c)) + c = NULL; if(c && event.xconfigurerequest.window==c->window && c->parent!=c->scr->root) { extern void resizeclientwindow(Client *c, int, int); @@ -1207,6 +1326,7 @@ else gadgetclicked(c, event.xbutton.window, &event); } else if(i && event.xbutton.window==i->window) { + abortfocus(); if(i->selected && (event.xbutton.time-last_icon_click)scr); } else { @@ -1225,6 +1345,7 @@ startscreendragging(scr, &event); } else if(scr&&scr->back==event.xbutton.window) { + abortfocus(); startbounding(scr, scr->back, &event); } else ; else if(event.xbutton.button==3) { @@ -1284,7 +1405,8 @@ } while(XCheckTypedEvent(dpy, MotionNotify, &event)); if(dragclient) { scr=dragclient->scr; - drawrubber(); + if(!prefs.opaquemove) + drawrubber(); rubberx=motionx-rubberx0; rubbery=motiony-rubbery0; if(!forcemoving) { @@ -1305,7 +1427,13 @@ rubbery=0; } } - drawrubber(); + if(prefs.opaquemove) { + if(rubbery<=-(c->scr->bh)) + rubbery=1-(c->scr->bh); + XMoveWindow(dpy, c->parent, c->x=rubberx, c->y=rubbery); + } else { + drawrubber(); + } } else if(resizeclient) { int rw=rubberw, rh=rubberh; scr=resizeclient->scr; @@ -1331,11 +1459,19 @@ rh=resizeclient->sizehints.min_height; rh+=resizeclient->frameheight; } - if(rw!=rubberw || rh!=rubberh) { - drawrubber(); - rubberw=rw; - rubberh=rh; - drawrubber(); + if(rw!=rubberw || rh!=rubberh) { + if(prefs.opaqueresize) { + Client *c = resizeclient; + extern void resizeclientwindow(Client *c, int, int); + rubberw=rw; + rubberh=rh; + resizeclientwindow(c, rubberw, rubberh); + } else { + drawrubber(); + rubberw=rw; + rubberh=rh; + drawrubber(); + } } } else if(dragiconlist) { int i; @@ -1379,6 +1515,20 @@ &dummy_w, &dummy_h, &dummy_bw, &dummy_d)) propertychange(c, event.xproperty.atom); break; + case FocusOut: + /* Ignore */ + break; + case FocusIn: + if(event.xfocus.detail == NotifyDetailNone && + prefs.focus == FOC_CLICKTOTYPE && + (scr = getscreenbyroot(event.xfocus.window))) { + Window w; + int rt; + XGetInputFocus(dpy, &w, &rt); + if(w == None) + setfocus(scr->inputbox); + } + break; default: #ifdef HAVE_XSHAPE if(shape_extn && event.type == shape_event_base + ShapeNotify) { @@ -1420,13 +1570,13 @@ XPeekEvent(dpy, &event); } } + + if(prefs.titlebarclock) + remove_call_out(update_clock, NULL); + if(signalled) fprintf(stderr, "%s: exiting on signal\n", progname); - flushmodules(); - flushclients(); - XSetInputFocus(dpy, PointerRoot, RevertToPointerRoot, CurrentTime); - XFlush(dpy); - XCloseDisplay(dpy); + exit(signalled? 0:1); } diff -Nru amiwm-0.20.48/Makefile.in amiwm-0.21pl2/Makefile.in --- amiwm-0.20.48/Makefile.in 2018-02-09 07:03:21.000000000 +0000 +++ amiwm-0.21pl2/Makefile.in 2010-07-19 16:07:34.000000000 +0000 @@ -1,6 +1,3 @@ -# Edited for Debian GNU/Linux. - -EXAMPLES = $(DESTDIR)/usr/share/doc/amiwm/examples srcdir = @srcdir@ VPATH = @srcdir@ SHELL = /bin/sh @@ -10,25 +7,24 @@ CFLAGS = @CFLAGS@ YFLAGS = -d DEFS = @DEFS@ -ALL_CFLAGS = -I@srcdir@ -I@srcdir@/libami $(DEFS) $(CFLAGS) @X_CFLAGS@ +ALL_CFLAGS = -I. -I@srcdir@ -I@srcdir@/libami $(DEFS) $(CFLAGS) @X_CFLAGS@ LIBS = @X_LIBS@ @X_PRE_LIBS@ -Llibami -lami @XT_LIB_KLUDGE@ -lXext -lXmu \ -lX11 @X_EXTRA_LIBS@ @LIBS@ prefix = @prefix@ exec_prefix = @exec_prefix@ -bindir = $(DESTDIR)/usr/bin -obindir = $(DESTDIR)/usr/bin -libdir = $(DESTDIR)/usr/lib -mandir = $(DESTDIR)/usr/share/man -xmandir = $(DESTDIR)/usr/share/man +bindir = $(exec_prefix)/bin +libdir = $(exec_prefix)/lib +mandir = $(prefix)/man INSTALL = @INSTALL@ LN_S = @LN_S@ RM = -rm -f -LIBAMI=libami/libami.a +LIBAMI = libami/libami.a DT_DIR = /etc/dt +STRIPFLAG = -s PROGS = amiwm requestchoice executecmd ppmtoinfo -MODULES = Background Keyboard +MODULES = $(srcdir)/Background Keyboard OBJS = main.o screen.o client.o frame.o icc.o \ icon.o menu.o diskobject.o gram.o lex.o rc.o \ @@ -41,7 +37,7 @@ DISTFILES = README README.modules INSTALL LICENSE amiwm.1 \ configure configure.in Makefile.in install-sh smakefile scoptions \ - *.[chly] system.amiwmrc def_tool.info *.map \ + *.[chly] system.amiwmrc def_*.info *.map \ Background Xresources.amiwm.in Amilogo.?m Xsession*.in Xinitrc.in \ amiwm-init libami/Makefile.in libami/*.[chly] @@ -49,10 +45,13 @@ AMIWM_HOME = $(libdir)/amiwm -all : $(PROGS) $(MODULES) +all : lib_all + @$(MAKE) local_all + +local_all : $(PROGS) $(MODULES) -lib : - @( cd libami; $(MAKE) libami.a ) +lib_all : + @( cd libami; $(MAKE) all ) .c.o: $(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) $< @@ -66,52 +65,60 @@ diskobject.o : diskobject.c $(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) -DAMIWM_HOME=\"$(AMIWM_HOME)\" $< +filesystem.o : joke_fs.c + $(CC) -o $@ -c $(CPPFLAGS) $(ALL_CFLAGS) -DAMIWM_HOME=\"$(AMIWM_HOME)\" $< + ppmtoinfo.o : ppmtoinfo.c $(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) -DAMIWM_HOME=\"$(AMIWM_HOME)\" $< gram.h gram.c: gram.y - $(YACC) $(YFLAGS) gram.y + $(YACC) $(YFLAGS) $< mv y.tab.c gram.c mv y.tab.h gram.h lex.c : lex.l - $(LEX) -t lex.l > lex.c + $(LEX) -t $< > lex.c kbdmodule.h kbdmodule.c: kbdmodule.y - $(YACC) $(YFLAGS) kbdmodule.y + $(YACC) $(YFLAGS) $< mv y.tab.c kbdmodule.c mv y.tab.h kbdmodule.h kbdlexer.c : kbdlexer.l - $(LEX) -t kbdlexer.l > kbdlexer.c + $(LEX) -t $< > kbdlexer.c install : $(PROGS) $(MODULES) Xsession Xsession2 Xinitrc amiwm-init -mkdir -p $(AMIWM_HOME) - $(INSTALL) -s requestchoice $(AMIWM_HOME)/requestchoice - $(INSTALL) -s executecmd $(AMIWM_HOME)/executecmd + $(INSTALL) $(STRIPFLAG) requestchoice $(AMIWM_HOME)/requestchoice + $(INSTALL) $(STRIPFLAG) executecmd $(AMIWM_HOME)/executecmd for module in $(MODULES); do \ - if [ "$$module" = "Background" ]; then \ - $(INSTALL) $$module $(AMIWM_HOME)/$$module; \ + if [ "$$module" = "$(srcdir)/Background" ]; then \ + $(INSTALL) $$module $(AMIWM_HOME)/Background; \ else \ - $(INSTALL) -s $$module $(AMIWM_HOME)/$$module; \ - fi \ + $(INSTALL) $(STRIPFLAG) $$module $(AMIWM_HOME)/$$module; \ + fi; \ done - $(INSTALL) -m 644 system.amiwmrc $(AMIWM_HOME)/system.amiwmrc - $(INSTALL) -m 644 def_tool.info $(AMIWM_HOME)/def_tool.info - $(INSTALL) -m 644 system.map $(AMIWM_HOME)/system.map - $(INSTALL) -m 644 magicwb.map $(AMIWM_HOME)/magicwb.map - $(INSTALL) -m 644 schwartz.map $(AMIWM_HOME)/schwartz.map - -mkdir -p $(EXAMPLES) - $(INSTALL) -m 755 Xsession $(EXAMPLES)/Xsession - $(INSTALL) -m 755 Xsession2 $(EXAMPLES)/Xsession2 - $(INSTALL) -m 755 Xinitrc $(EXAMPLES)/Xinitrc - $(INSTALL) -m 755 amiwm-init $(EXAMPLES)/amiwm-init - $(INSTALL) -s amiwm $(bindir)/amiwm - $(INSTALL) -s ppmtoinfo $(obindir)/ppmtoinfo - $(RM) $(obindir)/requestchoice - $(LN_S) ../lib/amiwm/requestchoice $(obindir)/requestchoice + $(INSTALL) -m 644 $(srcdir)/system.amiwmrc $(AMIWM_HOME)/system.amiwmrc + $(INSTALL) -m 644 $(srcdir)/def_tool.info $(AMIWM_HOME)/def_tool.info + $(INSTALL) -m 644 $(srcdir)/system.map $(AMIWM_HOME)/system.map + $(INSTALL) -m 644 $(srcdir)/magicwb.map $(AMIWM_HOME)/magicwb.map + $(INSTALL) -m 644 $(srcdir)/schwartz.map $(AMIWM_HOME)/schwartz.map + $(INSTALL) -m 755 Xsession $(AMIWM_HOME)/Xsession + $(INSTALL) -m 755 Xsession2 $(AMIWM_HOME)/Xsession2 + $(INSTALL) -m 755 Xinitrc $(AMIWM_HOME)/Xinitrc + $(INSTALL) -m 755 $(srcdir)/amiwm-init $(AMIWM_HOME)/amiwm-init + -mkdir -p $(bindir) + $(INSTALL) $(STRIPFLAG) amiwm $(bindir)/amiwm + $(INSTALL) $(STRIPFLAG) ppmtoinfo $(bindir)/ppmtoinfo + $(RM) $(bindir)/requestchoice + $(LN_S) $(AMIWM_HOME)/requestchoice $(bindir)/requestchoice -mkdir -p $(mandir)/man1 - $(INSTALL) -m 644 amiwm.1 $(xmandir)/man1/amiwm.1 + $(INSTALL) -m 644 $(srcdir)/amiwm.1 $(mandir)/man1/amiwm.1 + +fs-install : Filesystem + $(INSTALL) $(STRIPFLAG) Filesystem $(AMIWM_HOME)/Filesystem + $(INSTALL) -m 644 def_disk.info $(AMIWM_HOME)/def_disk.info + $(INSTALL) -m 644 def_drawer.info $(AMIWM_HOME)/def_disk.info cde-install : Xresources.amiwm Amilogo.bm Amilogo.pm -mkdir -p $(DT_DIR)/config/C/Xresources.d @@ -121,21 +128,27 @@ $(INSTALL) -m 644 Amilogo.pm $(DT_DIR)/appconfig/icons/C/Amilogo.pm -amiwm : $(OBJS) lib +amiwm : $(OBJS) $(LIBAMI) $(CC) -o amiwm $(OBJS) $(LIBS) -requestchoice : requestchoice.o lib +requestchoice : requestchoice.o $(LIBAMI) $(CC) -o requestchoice requestchoice.o $(LIBS) -executecmd : executecmd.o lib +executecmd : executecmd.o $(LIBAMI) $(CC) -o executecmd executecmd.o $(LIBS) -Keyboard : kbdmodule.o kbdlexer.o lib +Filesystem : filesystem.o $(LIBAMI) + $(CC) -o Filesystem filesystem.o $(LIBS) + +Keyboard : kbdmodule.o kbdlexer.o $(LIBAMI) $(CC) -o Keyboard kbdmodule.o kbdlexer.o $(LIBS) ppmtoinfo : ppmtoinfo.o $(CC) -o ppmtoinfo ppmtoinfo.o -lm +localetest : localetest.o $(LIBAMI) + $(CC) -o localetest localetest.o $(LIBS) + clean : $(RM) core $(PROGS) $(LIBAMI) Keyboard *.o libami/*.o $(RM) lex.yy.c lex.c y.tab.c y.tab.h gram.h gram.c @@ -144,7 +157,7 @@ distclean : clean $(RM) config.status config.cache *~ - $(RM) Makefile Xresources.amiwm Xsession Xsession2 Xinitrc + $(RM) Makefile libami/Makefile Xresources.amiwm Xsession Xsession2 Xinitrc spotless : distclean diff -Nru amiwm-0.20.48/menu.c amiwm-0.21pl2/menu.c --- amiwm-0.20.48/menu.c 1998-03-15 19:24:39.000000000 +0000 +++ amiwm-0.21pl2/menu.c 2010-07-18 13:11:26.000000000 +0000 @@ -2,6 +2,7 @@ #include #include #include +#include #ifdef HAVE_UNISTD_H #include #endif @@ -14,6 +15,12 @@ #include "icon.h" #include "version.h" +#define ABOUT_STRING(LF) \ + " " LF "version "VERSION LF "by Marcus Comstedt" LF \ + "" LF " " LF \ + "Contributions by Scott Lawrence" LF "" LF \ + "and Nicolas Sipieter " LF "" LF " " LF + #ifdef AMIGAOS #include extern struct Library *XLibBase; @@ -153,10 +160,14 @@ menu->width=menu->height=0; for(item=menu->firstitem; item; item=item->next) { if(item->text) - menu->height+=scr->dri.dri_Font->ascent+scr->dri.dri_Font->descent+1; + menu->height+=scr->dri.dri_Ascent+scr->dri.dri_Descent+1; else menu->height+=6; +#ifdef USE_FONTSETS + w=XmbTextEscapement(scr->dri.dri_FontSet, item->text, item->textlen)+2; +#else w=XTextWidth(scr->dri.dri_Font, item->text, item->textlen)+2; +#endif if(item->hotkey) w+=scr->hotkeyspace; if(item->flags&CHECKIT) @@ -180,7 +191,7 @@ XSelectInput(dpy, menu->parent, ExposureMask); w=1; for(item=menu->firstitem; item; item=item->next) { - int h=(item->text? scr->dri.dri_Font->ascent+scr->dri.dri_Font->descent+1:6); + int h=(item->text? scr->dri.dri_Ascent+scr->dri.dri_Descent+1:6); item->win=XCreateWindow(dpy, menu->parent, 3, w, menu->width-6, h, 0, CopyFromParent, InputOutput, CopyFromParent, CWOverrideRedirect|CWBackPixel, &attr); @@ -201,7 +212,11 @@ if(menu) { attr.override_redirect=True; attr.background_pixel=scr->dri.dri_Pens[BARBLOCKPEN]; +#ifdef USE_FONTSETS + w=XmbTextEscapement(scr->dri.dri_FontSet, name, menu->titlelen=strlen(name))+8; +#else w=XTextWidth(scr->dri.dri_Font, name, menu->titlelen=strlen(name))+8; +#endif menu->win=XCreateWindow(dpy, scr->menubarparent, scr->menuleft, 0, w, scr->bh-1, 0, CopyFromParent, InputOutput, CopyFromParent, CWOverrideRedirect|CWBackPixel, &attr); @@ -265,14 +280,20 @@ BARDETAILPEN]); XSetBackground(dpy, scr->menubargc, scr->dri.dri_Pens[active?BARDETAILPEN: BARBLOCKPEN]); - XDrawImageString(dpy, w, scr->menubargc, 4, 1+scr->dri.dri_Font->ascent, +#ifdef USE_FONTSETS + XmbDrawImageString(dpy, w, scr->dri.dri_FontSet, + scr->menubargc, 4, 1+scr->dri.dri_Ascent, + m->title, m->titlelen); +#else + XDrawImageString(dpy, w, scr->menubargc, 4, 1+scr->dri.dri_Ascent, m->title, m->titlelen); +#endif } void redraw_item(struct Item *i, Window w) { struct Menu *m=i->menu; - int s=scr->dri.dri_Font->ascent>>1; + int s=scr->dri.dri_Ascent>>1; if((i==activeitem || i==activesubitem) && !(i->flags&DISABLED)) { XSetForeground(dpy, scr->menubargc, scr->dri.dri_Pens[BARBLOCKPEN]); XSetBackground(dpy, scr->menubargc, scr->dri.dri_Pens[BARDETAILPEN]); @@ -281,33 +302,57 @@ XSetBackground(dpy, scr->menubargc, scr->dri.dri_Pens[BARBLOCKPEN]); } if(i->text) +#ifdef USE_FONTSETS + XmbDrawImageString(dpy, w, scr->dri.dri_FontSet, + scr->menubargc, (i->flags&CHECKIT)?1+scr->checkmarkspace:1, + scr->dri.dri_Ascent+1, i->text, i->textlen); +#else XDrawImageString(dpy, w, scr->menubargc, (i->flags&CHECKIT)?1+scr->checkmarkspace:1, - scr->dri.dri_Font->ascent+1, i->text, i->textlen); + scr->dri.dri_Ascent+1, i->text, i->textlen); +#endif else XFillRectangle(dpy, w, scr->menubargc, 2, 2, m->width-10, 2); if(i->sub) { int x=m->width-6-scr->hotkeyspace-1+8; - XDrawImageString(dpy, w, scr->menubargc, x+scr->dri.dri_Font->ascent+1, - 1+scr->dri.dri_Font->ascent, "»", 1); +#ifdef USE_FONTSETS +#ifdef HAVE_XUTF8DRAWIMAGESTRING + Xutf8DrawImageString(dpy, w, scr->dri.dri_FontSet, + scr->menubargc, x+scr->dri.dri_Ascent+1, + 1+scr->dri.dri_Ascent, "\302\273", 2); +#else + XmbDrawImageString(dpy, w, scr->dri.dri_FontSet, + scr->menubargc, x+scr->dri.dri_Ascent+1, + 1+scr->dri.dri_Ascent, "»", 1); +#endif +#else + XDrawImageString(dpy, w, scr->menubargc, x+scr->dri.dri_Ascent+1, + 1+scr->dri.dri_Ascent, "»", 1); +#endif } else if(i->hotkey) { int x=m->width-6-scr->hotkeyspace-1+8; XDrawLine(dpy, w, scr->menubargc, x, 1+s, x+s, 1); XDrawLine(dpy, w, scr->menubargc, x+s, 1, x+s+s, 1+s); XDrawLine(dpy, w, scr->menubargc, x+s+s, 1+s, x+s, 1+s+s); XDrawLine(dpy, w, scr->menubargc, x+s, 1+s+s, x, 1+s); - XDrawImageString(dpy, w, scr->menubargc, x+scr->dri.dri_Font->ascent+1, - 1+scr->dri.dri_Font->ascent, &i->hotkey, 1); +#ifdef USE_FONTSETS + XmbDrawImageString(dpy, w, scr->dri.dri_FontSet, + scr->menubargc, x+scr->dri.dri_Ascent+1, + 1+scr->dri.dri_Ascent, &i->hotkey, 1); +#else + XDrawImageString(dpy, w, scr->menubargc, x+scr->dri.dri_Ascent+1, + 1+scr->dri.dri_Ascent, &i->hotkey, 1); +#endif } if(i->flags&CHECKED) { - XDrawLine(dpy, w, scr->menubargc, 0, s, s, scr->dri.dri_Font->ascent); - XDrawLine(dpy, w, scr->menubargc, s, scr->dri.dri_Font->ascent, s+s, 0); + XDrawLine(dpy, w, scr->menubargc, 0, s, s, scr->dri.dri_Ascent); + XDrawLine(dpy, w, scr->menubargc, s, scr->dri.dri_Ascent, s+s, 0); } if(i->flags&DISABLED) { XSetStipple(dpy, scr->menubargc, scr->disabled_stipple); XSetFillStyle(dpy, scr->menubargc, FillStippled); XSetForeground(dpy, scr->menubargc, scr->dri.dri_Pens[BARBLOCKPEN]); XFillRectangle(dpy, w, scr->menubargc, 0, 0, - m->width-6, scr->dri.dri_Font->ascent+scr->dri.dri_Font->descent+1); + m->width-6, scr->dri.dri_Ascent+scr->dri.dri_Descent+1); XSetFillStyle(dpy, scr->menubargc, FillSolid); } } @@ -348,17 +393,19 @@ XDrawPoint(dpy, scr->disabled_stipple, gc, 3, 1); XFreeGC(dpy, gc); scr->menubargc=XCreateGC(dpy, scr->menubar, 0, NULL); +#ifndef USE_FONTSETS XSetFont(dpy, scr->menubargc, scr->dri.dri_Font->fid); +#endif XSetBackground(dpy, scr->menubargc, scr->dri.dri_Pens[BARBLOCKPEN]); XSelectInput(dpy, scr->menubar, ExposureMask|ButtonPressMask|ButtonReleaseMask); XSelectInput(dpy, scr->menubardepth, ExposureMask|ButtonPressMask| ButtonReleaseMask|EnterWindowMask|LeaveWindowMask); XMapWindow(dpy, scr->menubardepth); XMapWindow(dpy, scr->menubar); - scr->hotkeyspace=8+1+scr->dri.dri_Font->max_bounds.width+ - scr->dri.dri_Font->ascent; - scr->checkmarkspace=4+scr->dri.dri_Font->ascent; - scr->subspace=scr->hotkeyspace-scr->dri.dri_Font->ascent; + scr->hotkeyspace=8+1+scr->dri.dri_MaxBoundsWidth+ + scr->dri.dri_Ascent; + scr->checkmarkspace=4+scr->dri.dri_Ascent; + scr->subspace=scr->hotkeyspace-scr->dri.dri_Ascent; scr->menuleft=4; m=add_menu("Workbench", 0); add_item(m,"Backdrop",'B',CHECKIT|CHECKED|DISABLED); @@ -425,10 +472,18 @@ menu_layout(ti->submenu); ti->submenu=NULL; } + if(prefs.screenmenu) { + m=add_menu("Screens",0); + add_item(m,"New Screen",0,0); + add_item(m,"Delete Screen",0,0); + menu_layout(m); + } } void redrawmenubar(Window w) { + static const char defaultTimeFormat[] = "%c"; + struct Menu *m; struct Item *item; @@ -437,10 +492,36 @@ if(w==scr->menubar) { XSetForeground(dpy, scr->menubargc, scr->dri.dri_Pens[BARDETAILPEN]); XSetBackground(dpy, scr->menubargc, scr->dri.dri_Pens[BARBLOCKPEN]); - XDrawImageString(dpy, w, scr->menubargc, 4, 1+scr->dri.dri_Font->ascent, +#ifdef USE_FONTSETS + XmbDrawImageString(dpy, w, scr->dri.dri_FontSet, + scr->menubargc, 4, 1+scr->dri.dri_Ascent, + scr->title, strlen(scr->title)); +#else + XDrawImageString(dpy, w, scr->menubargc, 4, 1+scr->dri.dri_Ascent, scr->title, strlen(scr->title)); +#endif XSetForeground(dpy, scr->menubargc, scr->dri.dri_Pens[BARTRIMPEN]); XDrawLine(dpy, w, scr->menubargc, 0, scr->bh-1, scr->width-1, scr->bh-1); + if( prefs.titlebarclock ) + { + char clockbuf[512]; + const char * fmt = defaultTimeFormat; + time_t the_time; + int l; + if( prefs.titleclockformat ) fmt = prefs.titleclockformat; + time( &the_time ); + strftime( clockbuf, 512, fmt, localtime( &the_time ) ); +#ifdef USE_FONTSETS + l = XmbTextEscapement(scr->dri.dri_FontSet, clockbuf, strlen(clockbuf)); + XmbDrawImageString(dpy, w, scr->dri.dri_FontSet, scr->menubargc, + (scr->width-30-l), 1+scr->dri.dri_Ascent, + clockbuf, strlen(clockbuf)); +#else + l = XTextWidth(scr->dri.dri_Font, clockbuf, strlen(clockbuf)); + XDrawImageString( dpy, w, scr->menubargc,(scr->width-30-l), + 1+scr->dri.dri_Ascent, clockbuf, strlen(clockbuf)); +#endif + } } else if(w==scr->menubardepth) { if(!mbdclick) { XSetForeground(dpy, scr->menubargc, scr->dri.dri_Pens[SHADOWPEN]); @@ -606,6 +687,7 @@ void menuaction(struct Item *i, struct Item *si) { extern void restart_amiwm(void); + extern int screen_has_clients(void); struct Menu *m; struct Item *mi; struct ToolItem *ti; @@ -652,24 +734,16 @@ case 5: #ifdef AMIGAOS spawn(BIN_PREFIX"requestchoice >NIL: amiwm \"" - "version "VERSION"*Nby Marcus Comstedt*N" - "" - "\" Ok"); + ABOUT_STRING("*N") "\" Ok"); #else spawn(BIN_PREFIX"requestchoice >/dev/null amiwm '" - "version "VERSION"\nby Marcus Comstedt\n" - "" - "' Ok"); + ABOUT_STRING("\n") "' Ok"); #endif break; case 6: #ifndef AMIGAOS if(prefs.fastquit) { #endif - flushmodules(); - flushclients(); - XFlush(dpy); - XCloseDisplay(dpy); exit(0); #ifndef AMIGAOS } else { @@ -718,6 +792,22 @@ if(ti && ti->cmd) spawn(ti->cmd); } break; + case 4: /* Screens */ + if(item==0) { + openscreen("New Screen", DefaultRootWindow(dpy)); + realizescreens(); + scr=front->upfront; + screentoback(); + } + if(item==1) { + if(scr->behind == scr) + wberror(scr,"Cannot close last Screen"); + else if(screen_has_clients()) + wberror(scr,"Can't close a screen with running programs on it"); + else + closescreen(); + } + break; } } @@ -772,7 +862,7 @@ } } -struct Item *getitembyhotkey(char key) +struct Item *getitembyhotkey(KeySym key) { struct Menu *m; struct Item *i; diff -Nru amiwm-0.20.48/module.c amiwm-0.21pl2/module.c --- amiwm-0.20.48/module.c 1998-03-15 19:23:07.000000000 +0000 +++ amiwm-0.21pl2/module.c 2010-07-13 14:14:11.000000000 +0000 @@ -33,7 +33,7 @@ #include "icon.h" #include "version.h" -extern XContext client_context, icon_context; +extern XContext client_context, icon_context, screen_context; extern FILE *rcfile; extern Display *dpy; @@ -46,7 +46,7 @@ extern void wberror(Scrn *, char *); extern Icon *createappicon(struct module *, Window, char *, - Pixmap, Pixmap, int, int); + Pixmap, Pixmap, Pixmap, int, int); extern struct Item *own_items(struct module *, Scrn *, int, int, int, struct Item *); @@ -334,7 +334,6 @@ static void handle_module_cmd(struct module *m, char *data, int data_len) { extern Scrn *getscreen(Window); - extern unsigned long iconcolor[]; extern int iconcolormask; XID id=m->mcmd.id; Client *c; @@ -413,7 +412,7 @@ struct NewAppIcon *nai=(struct NewAppIcon *)data; Window w=None; Icon *i=createappicon(m, id, nai->name, - nai->pm1, nai->pm2, nai->x, nai->y); + nai->pm1, nai->pm2, nai->pmm, nai->x, nai->y); if(i!=NULL) w=i->window; reply_module(m, (char *)&w, sizeof(w)); } else @@ -447,7 +446,14 @@ reply_module(m, prefs.icondir, strlen(prefs.icondir)+1); break; case MCMD_GETICONPALETTE: - reply_module(m, (void *)iconcolor, + if(!XFindContext(dpy, id, client_context, (XPointer*)&c)) { + scr=c->scr; + } else + if(XFindContext(dpy, id, screen_context, (XPointer*)&scr)) { + reply_module(m, NULL, -1); + break; + } + reply_module(m, (void *)scr->iconcolor, (iconcolormask+1)*sizeof(unsigned long)); break; case MCMD_MANAGEMENU: @@ -477,8 +483,12 @@ return; } r=read(m->in_fd, buffer, sizeof(buffer)); - if(r<0 && errno!=EINTR) { - perror("module"); + if(r==0 || (r<0 && errno!=EINTR)) { + if(r<0) + perror("module"); + else + fprintf(stderr, "module %d exited!?\n", (int)m->pid); + remove_fd_from_set(m->in_fd); close(m->in_fd); close(m->out_fd); m->in_fd=m->out_fd=-1; diff -Nru amiwm-0.20.48/module.h amiwm-0.21pl2/module.h --- amiwm-0.20.48/module.h 1997-12-12 21:12:28.000000000 +0000 +++ amiwm-0.21pl2/module.h 2010-04-09 22:15:15.000000000 +0000 @@ -36,7 +36,7 @@ struct NewAppIcon { int x, y; - Pixmap pm1, pm2; + Pixmap pm1, pm2, pmm; char name[1]; }; diff -Nru amiwm-0.20.48/ppmtoinfo.c amiwm-0.21pl2/ppmtoinfo.c --- amiwm-0.20.48/ppmtoinfo.c 1998-03-15 19:43:06.000000000 +0000 +++ amiwm-0.21pl2/ppmtoinfo.c 2010-04-09 22:15:15.000000000 +0000 @@ -224,7 +224,7 @@ long* nextberr; long* temperr; register long sr, sg, sb, err; - int fs_direction; + int fs_direction, dscale; pixels = readppm( ifp, &cols, &rows, &maxval ); if(ifp != stdin) @@ -253,6 +253,11 @@ memset(outimg, 0, imgsz); oip = outimg; + dscale = 0; + if(maxval>=16384) + while(maxval>=(16384<b; } - dist = 2000000000; for ( i = 0; i < newcolors; ++i ) { - r2 = colormap[i].r; - g2 = colormap[i].g; - b2 = colormap[i].b; - newdist = ( sr - r2 ) * ( sr - r2 ) + - ( sg - g2 ) * ( sg - g2 ) + - ( sb - b2 ) * ( sb - b2 ); - if ( newdist < dist ) { + r2 = sr - colormap[i].r; + g2 = sg - colormap[i].g; + b2 = sb - colormap[i].b; + if (dscale) { + r2 >>= dscale; + g2 >>= dscale; + b2 >>= dscale; + } + + newdist = r2 * r2 + g2 * g2 + b2 * b2; + if ( i==0 || newdist < dist ) { ind = i; dist = newdist; } diff -Nru amiwm-0.20.48/prefs.h amiwm-0.21pl2/prefs.h --- amiwm-0.20.48/prefs.h 1998-02-28 23:35:27.000000000 +0000 +++ amiwm-0.21pl2/prefs.h 2010-04-17 12:22:18.000000000 +0000 @@ -7,8 +7,16 @@ int forcemove; int borderwidth; int autoraise; + int opaquemove; + int opaqueresize; + int customiconsonly; + int shortlabelicons; char *icondir, *module_path, *defaulticon; - int focus, manage_all; + int focus, manage_all, screenmenu; + int titlebarclock; /* display titlebar clock? */ + char *titleclockformat; /* format to use for the clock */ + int titleclockinterval; /* how often do we update the clock?*/ + struct _Style *firststyle, *laststyle; } prefs; #define FM_MANUAL 0 diff -Nru amiwm-0.20.48/rc.c amiwm-0.21pl2/rc.c --- amiwm-0.20.48/rc.c 1998-03-15 19:45:40.000000000 +0000 +++ amiwm-0.21pl2/rc.c 2010-07-13 13:19:01.000000000 +0000 @@ -1,5 +1,6 @@ #include #include +#include #include #include "alloc.h" @@ -8,6 +9,7 @@ #include "screen.h" #include "gram.h" #include "icc.h" +#include "style.h" #ifdef AMIGAOS #include @@ -37,6 +39,12 @@ prefs.module_path=AMIWM_HOME; prefs.defaulticon="def_tool.info"; prefs.borderwidth=1; + prefs.titleclockinterval=1; + prefs.opaquemove=False; + prefs.opaqueresize=False; + prefs.screenmenu=False; + prefs.firststyle=NULL; + prefs.laststyle=NULL; set_sys_palette(); if(filename!=NULL && (rcfile=fopen(filename, "r"))) { @@ -97,7 +105,9 @@ { "blockpen", T_BLOCKPEN }, { "both", BOTH }, { "bottom", BOTTOM }, + { "class", CLASS }, { "clicktotype", CLICKTOTYPE }, + { "customiconsonly", CUSTOMICONSONLY }, { "defaulticon", DEFAULTICON }, { "detailpen", T_DETAILPEN }, { "false", NO }, @@ -108,9 +118,11 @@ { "followmouse", FOLLOWMOUSE }, { "forcemove", FORCEMOVE }, { "highlighttextpen", T_HIGHLIGHTTEXTPEN }, + { "icon", ICON }, { "icondir", ICONDIR }, { "iconfont", ICONFONT }, { "iconpalette", ICONPALETTE }, + { "icontitle", ICONTITLE }, { "interscreengap", INTERSCREENGAP }, { "magicwb", MAGICWB }, { "manual", MANUAL }, @@ -120,17 +132,25 @@ { "none", NONE }, { "off", NO }, { "on", YES }, + { "opaquemove", OPAQUEMOVE }, + { "opaqueresize", OPAQUERESIZE }, { "right", RIGHT }, { "schwartz", SCHWARTZ }, { "screen", SCREEN }, { "screenfont", SCREENFONT }, + { "screenmenu", SCREENMENU }, { "separator", SEPARATOR }, { "shadowpen", T_SHADOWPEN }, { "shinepen", T_SHINEPEN }, + { "shortlabelicons", SHORTLABELICONS }, { "sizeborder", SIZEBORDER }, { "sloppy", SLOPPY }, + { "style", STYLE }, { "system", SYSTEM }, { "textpen", T_TEXTPEN }, + { "title", TITLE }, + { "titlebarclock", TITLEBARCLOCK }, + { "titleclockformat", TITLECLOCKFORMAT }, { "toolitem", TOOLITEM }, { "true", YES }, { "yes", YES } @@ -154,3 +174,18 @@ } return ERRORTOKEN; } + +void free_prefs() +{ + Style *s; + while((s = prefs.firststyle)) { + prefs.firststyle = s->next; + if(s->style_class) free(s->style_class); + if(s->style_title) free(s->style_title); + if(s->style_icon_title) free(s->style_icon_title); + if(s->icon_name) free(s->icon_name); + free_icon_pms(&s->icon_pms); + free(s); + } + prefs.laststyle = NULL; +} diff -Nru amiwm-0.20.48/README amiwm-0.21pl2/README --- amiwm-0.20.48/README 1998-03-14 20:37:31.000000000 +0000 +++ amiwm-0.21pl2/README 2010-07-19 15:58:49.000000000 +0000 @@ -1,5 +1,5 @@ -< amiwm > by Marcus Comstedt (marcus@lysator.liu.se) +< amiwm > by Marcus Comstedt (marcus@mc.pp.se) 0. Legal notices @@ -72,6 +72,37 @@ Modifies the colour scheme for the window manager. +CustomIconsOnly {yes|no} + +This prevent applications to display their own icons when in iconified state. +Only icons defined in amiwmrc for each apps will be used. +Because apps own icon are too different from one eachother. +They comes in various sizes and themes. Some icons will be 32x32, +while some other will be a 128x128 or even bigger .. By using this option, +You have the possibility to decide which icon should be used for each app. +If no custom icons are defined at all, the def_tool.info will be used for +all iconified apps. Format is: style { class "myClass" icon "myIcon.info" } +To find out a given program's class, use "xlsclients -l" to list all opened +applications, and then use "xprop -id <0x0000000>" to list a +given app's properties. Use either WM_CLASS or WM_ICON_NAME strings in amiwmrc. + +ShortLabelIcons {yes|no} + +This limit the length of the text for iconified programs. For example, if this +option is activated, an iconified program text will be limited to 8 chars + ".." +Use this option if you don't want iconified program text to be loong strings.. + +TitleBarClock {yes|no} + +Enables a clock in the titlebar. It displays the date and time. + +TitleClockFormat [] "time string" + +This lets you choose a new format to display the Title Bar Clock. +The time string is formatted with the standard strftime() parameters. +The default is "%c". It has been found that "%a %b %e %Y %l:%M %p" works +well too. Number is the update interval in seconds. + ToolItem "name" "command" ["hotkey"] Adds an item in the Tools menu with the specified name, which executes diff -Nru amiwm-0.20.48/requestchoice.c amiwm-0.21pl2/requestchoice.c --- amiwm-0.20.48/requestchoice.c 1998-03-15 19:37:51.000000000 +0000 +++ amiwm-0.21pl2/requestchoice.c 2010-04-09 22:15:15.000000000 +0000 @@ -77,7 +77,11 @@ firstchoice=c; lastchoice=c; c->l=strlen(c->text=txt); +#ifdef USE_FONTSETS + totw+=(c->w=XmbTextEscapement(dri.dri_FontSet, c->text, c->l))+BUT_BUTSPACE; +#else totw+=(c->w=XTextWidth(dri.dri_Font, c->text, c->l))+BUT_BUTSPACE; +#endif nchoices++; } @@ -90,8 +94,12 @@ firstline=l; lastline=l; l->l=strlen(l->text=txt); +#ifdef USE_FONTSETS + l->w=XmbTextEscapement(dri.dri_FontSet, l->text, l->l); +#else l->w=XTextWidth(dri.dri_Font, l->text, l->l); - toth+=l->h=dri.dri_Font->ascent+dri.dri_Font->descent; +#endif + toth+=l->h=dri.dri_Ascent+dri.dri_Descent; if(l->w>maxw) maxw=l->w; } @@ -100,9 +108,9 @@ { int w=totw-BUT_EXTSPACE-BUT_EXTSPACE; int h=toth-TXT_TOPSPACE-TXT_MIDSPACE-TXT_BOTSPACE-BUT_VSPACE- - (dri.dri_Font->ascent+dri.dri_Font->descent); + (dri.dri_Ascent+dri.dri_Descent); int x=(totw-maxw+TXT_HSPACE)>>1; - int y=((dri.dri_Font->ascent+dri.dri_Font->descent)>>1)+dri.dri_Font->ascent; + int y=((dri.dri_Ascent+dri.dri_Descent)>>1)+dri.dri_Ascent; struct line *l; XSetForeground(dpy, gc, dri.dri_Pens[SHADOWPEN]); XDrawLine(dpy, textwin, gc, 0, 0, w-2, 0); @@ -112,18 +120,27 @@ XDrawLine(dpy, textwin, gc, w-1, 0, w-1, h-1); XSetForeground(dpy, gc, dri.dri_Pens[TEXTPEN]); for(l=firstline; l; l=l->next) { +#ifdef USE_FONTSETS + XmbDrawString(dpy, textwin, dri.dri_FontSet, gc, x, y, l->text, l->l); +#else XDrawString(dpy, textwin, gc, x, y, l->text, l->l); - y+=dri.dri_Font->ascent+dri.dri_Font->descent; +#endif + y+=dri.dri_Ascent+dri.dri_Descent; } } void refresh_choice(struct choice *c) { int w=c->w+BUT_BUTSPACE; - int h=dri.dri_Font->ascent+dri.dri_Font->descent+BUT_VSPACE; + int h=dri.dri_Ascent+dri.dri_Descent+BUT_VSPACE; XSetForeground(dpy, gc, dri.dri_Pens[TEXTPEN]); +#ifdef USE_FONTSETS + XmbDrawString(dpy, c->win, dri.dri_FontSet, gc, BUT_BUTSPACE/2, + dri.dri_Ascent+BUT_VSPACE/2, c->text, c->l); +#else XDrawString(dpy, c->win, gc, BUT_BUTSPACE/2, - dri.dri_Font->ascent+BUT_VSPACE/2, c->text, c->l); + dri.dri_Ascent+BUT_VSPACE/2, c->text, c->l); +#endif XSetForeground(dpy, gc, dri.dri_Pens[(c==selected && depressed)? SHADOWPEN:SHINEPEN]); XDrawLine(dpy, c->win, gc, 0, 0, w-2, 0); @@ -217,7 +234,7 @@ split(atp->ptr, "|\n", addchoice); totw+=BUT_EXTSPACE+BUT_EXTSPACE+BUT_INTSPACE*(nchoices-1); - toth+=2*(dri.dri_Font->ascent+dri.dri_Font->descent)+TXT_TOPSPACE+ + toth+=2*(dri.dri_Ascent+dri.dri_Descent)+TXT_TOPSPACE+ TXT_MIDSPACE+TXT_BOTSPACE+BUT_VSPACE; maxw+=TXT_HSPACE+BUT_EXTSPACE+BUT_EXTSPACE; @@ -231,7 +248,9 @@ dri.dri_Pens[BACKGROUNDPEN]); gc=XCreateGC(dpy, mainwin, 0, NULL); XSetBackground(dpy, gc, dri.dri_Pens[BACKGROUNDPEN]); +#ifndef USE_FONTSETS XSetFont(dpy, gc, dri.dri_Font->fid); +#endif stipple=XCreatePixmap(dpy, mainwin, 2, 2, attr.depth); XSetForeground(dpy, gc, dri.dri_Pens[BACKGROUNDPEN]); XFillRectangle(dpy, stipple, gc, 0, 0, 2, 2); @@ -242,18 +261,18 @@ textwin=XCreateSimpleWindow(dpy, mainwin, BUT_EXTSPACE, TXT_TOPSPACE, totw- BUT_EXTSPACE-BUT_EXTSPACE, toth-TXT_TOPSPACE- TXT_MIDSPACE-TXT_BOTSPACE-BUT_VSPACE- - (dri.dri_Font->ascent+dri.dri_Font->descent), + (dri.dri_Ascent+dri.dri_Descent), 0, dri.dri_Pens[SHADOWPEN], dri.dri_Pens[BACKGROUNDPEN]); XSelectInput(dpy, textwin, ExposureMask); x=BUT_EXTSPACE; - y=toth-TXT_BOTSPACE-(dri.dri_Font->ascent+dri.dri_Font->descent)-BUT_VSPACE; + y=toth-TXT_BOTSPACE-(dri.dri_Ascent+dri.dri_Descent)-BUT_VSPACE; for(c=firstchoice; c; c=c->next) { c->win=XCreateSimpleWindow(dpy, mainwin, x+(nchoices==1? (extra>>1): n++*extra/(nchoices-1)), y, c->w+BUT_BUTSPACE, - dri.dri_Font->ascent+dri.dri_Font->descent+ + dri.dri_Ascent+dri.dri_Descent+ BUT_VSPACE, 0, dri.dri_Pens[SHADOWPEN], dri.dri_Pens[BACKGROUNDPEN]); diff -Nru amiwm-0.20.48/screen.c amiwm-0.21pl2/screen.c --- amiwm-0.20.48/screen.c 1998-03-15 18:45:33.000000000 +0000 +++ amiwm-0.21pl2/screen.c 2010-07-13 13:24:09.000000000 +0000 @@ -11,7 +11,12 @@ extern Display *dpy; extern Cursor wm_curs; +#ifdef USE_FONTSETS +extern XFontSet labelfontset; +extern int labelfont_ascent; +#else extern XFontStruct *labelfont; +#endif extern char *progname; extern XContext screen_context, client_context, vroot_context; @@ -145,6 +150,44 @@ cleanupicons(); } +void closescreen(void) +{ + Scrn *dummy; + + if(scr->behind == scr) + scr->behind = NULL; + else { + scr->upfront->behind=scr->behind; + scr->behind->upfront=scr->upfront; + } + + XDeleteContext(dpy,scr->menubardepth,screen_context); + XDestroyWindow(dpy,scr->menubardepth); + XDeleteContext(dpy,scr->menubarparent,screen_context); + XDestroyWindow(dpy,scr->menubarparent); + XDeleteContext(dpy,scr->menubar,screen_context); + XDestroyWindow(dpy,scr->menubar); + if(scr->inputbox != None) { + XDeleteContext(dpy,scr->inputbox,screen_context); + XDestroyWindow(dpy,scr->inputbox); + } + + XFreeGC(dpy,scr->rubbergc); + XFreeGC(dpy,scr->icongc); + XFreeGC(dpy,scr->gc); + XDeleteContext(dpy,scr->back,screen_context); + XDestroyWindow(dpy,scr->back); + free_icon_pms(&scr->default_tool_pms); + term_dri(&scr->dri, dpy, scr->cmap); + if(scr->iconcolorsallocated) + XFreeColors(dpy, scr->cmap, scr->iconcolor, scr->iconcolorsallocated, 0); + if(front==scr) + front=scr->behind; + dummy=scr->behind; + free(scr); + scr=dummy; +} + Scrn *openscreen(char *deftitle, Window root) { Scrn *s; @@ -164,6 +207,7 @@ s->depth = attr.depth; s->visual = attr.visual; s->number = XScreenNumberOfScreen(attr.screen); + s->inputbox = None; init_dri(&s->dri, dpy, s->root, s->cmap, True); @@ -185,6 +229,38 @@ XSaveContext(dpy, s->back, screen_context, (XPointer)s); gcv.background = s->dri.dri_Pens[BACKGROUNDPEN]; + +#ifdef USE_FONTSETS + s->gc = XCreateGC(dpy, s->back, GCBackground, &gcv); + + if(!labelfontset) { + char **missing_charsets = NULL; + int n_missing_charsets = 0; + labelfontset = XCreateFontSet(dpy, label_font_name, + &missing_charsets, + &n_missing_charsets, NULL); + if(missing_charsets) + XFreeStringList(missing_charsets); + if(!labelfontset) { + fprintf(stderr, "%s: cannot open font %s\n", progname, label_font_name); + labelfontset = s->dri.dri_FontSet; + } + } + { + XFontStruct **fsl; + char **fnl; + if(XFontsOfFontSet(labelfontset, &fsl, &fnl) < 1) { + fprintf(stderr, "%s: fontset %s is empty\n", progname, + label_font_name); + exit(1); + } + labelfont_ascent = fsl[0]->ascent; + s->lh = fsl[0]->ascent+fsl[0]->descent; + } + gcv.foreground = s->dri.dri_Pens[TEXTPEN]; + + s->icongc = XCreateGC(dpy, s->back, GCForeground|GCBackground, &gcv); +#else gcv.font = s->dri.dri_Font->fid; s->gc = XCreateGC(dpy, s->back, GCBackground|GCFont, &gcv); @@ -195,10 +271,12 @@ labelfont = s->dri.dri_Font; } + s->lh = labelfont->ascent+labelfont->descent; gcv.font = labelfont->fid; gcv.foreground = s->dri.dri_Pens[TEXTPEN]; s->icongc = XCreateGC(dpy, s->back, GCForeground|GCBackground|GCFont, &gcv); +#endif gcv.function = GXinvert; gcv.subwindow_mode = IncludeInferiors; @@ -207,11 +285,12 @@ s->title = s->deftitle = deftitle; - s->default_tool_pm = None; - s->default_tool_pm2 = None; + s->default_tool_pms.pm = None; + s->default_tool_pms.pm2 = None; + s->default_tool_pms.cs.colors = NULL; + s->default_tool_pms.cs2.colors = NULL; s->default_tool_pm_w=0; s->default_tool_pm_h=0; - s->lh = labelfont->ascent+labelfont->descent; if(front) { s->behind=front; @@ -233,36 +312,50 @@ scr = front; do { - scr->fh = scr->dri.dri_Font->ascent+scr->dri.dri_Font->descent; - scr->bh=scr->fh+3; - scr->h2=(2*scr->bh)/10; scr->h3=(3*scr->bh)/10; - scr->h4=(4*scr->bh)/10; scr->h5=(5*scr->bh)/10; - scr->h6=(6*scr->bh)/10; scr->h7=(7*scr->bh)/10; - scr->h8=(8*scr->bh)/10; - createmenubar(); - createdefaulticons(); - - XSelectInput(dpy, scr->root, - SubstructureNotifyMask|SubstructureRedirectMask| - KeyPressMask|KeyReleaseMask| - ButtonPressMask|ButtonReleaseMask); - if(scr->back != scr->root) - XSelectInput(dpy, scr->back, + if(!scr->realized) { + scr->fh = scr->dri.dri_Ascent+scr->dri.dri_Descent; + scr->bh=scr->fh+3; + scr->h2=(2*scr->bh)/10; scr->h3=(3*scr->bh)/10; + scr->h4=(4*scr->bh)/10; scr->h5=(5*scr->bh)/10; + scr->h6=(6*scr->bh)/10; scr->h7=(7*scr->bh)/10; + scr->h8=(8*scr->bh)/10; + createmenubar(); + createdefaulticons(); + + if (scr->inputbox == None && prefs.focus == FOC_CLICKTOTYPE) { + scr->inputbox = XCreateWindow(dpy, scr->back, 0, 0, + scr->width, scr->height, 0, 0, + InputOnly, CopyFromParent, 0, NULL); + XSaveContext(dpy, scr->inputbox, screen_context, (XPointer)scr); + XSelectInput(dpy, scr->inputbox, KeyPressMask|KeyReleaseMask); + XLowerWindow(dpy, scr->inputbox); + XMapWindow(dpy, scr->inputbox); + } + + XSelectInput(dpy, scr->root, SubstructureNotifyMask|SubstructureRedirectMask| KeyPressMask|KeyReleaseMask| - ButtonPressMask|ButtonReleaseMask); - - XStoreName(dpy, scr->back, scr->title); - XLowerWindow(dpy, scr->back); - XMapWindow(dpy, scr->back); - + ButtonPressMask|ButtonReleaseMask|FocusChangeMask); + if(scr->back != scr->root) + XSelectInput(dpy, scr->back, + SubstructureNotifyMask|SubstructureRedirectMask| + KeyPressMask|KeyReleaseMask| + ButtonPressMask|ButtonReleaseMask); + + XStoreName(dpy, scr->back, scr->title); + XLowerWindow(dpy, scr->back); + XMapWindow(dpy, scr->back); + } scr=scr->behind; } while(scr!=front); do { - scanwins(); - if(!getvroot(scr->root)) { - init_dri(&scr->dri, dpy, scr->root, scr->cmap, True); - setvirtualroot(scr); + if(!scr->realized) { + scanwins(); + if(!getvroot(scr->root)) { + init_dri(&scr->dri, dpy, scr->root, scr->cmap, True); + setvirtualroot(scr); + } + scr->realized=1; } scr=scr->behind; } while(scr!=front); diff -Nru amiwm-0.20.48/screen.h amiwm-0.21pl2/screen.h --- amiwm-0.20.48/screen.h 1997-12-12 17:22:04.000000000 +0000 +++ amiwm-0.21pl2/screen.h 2010-07-13 13:24:49.000000000 +0000 @@ -1,9 +1,11 @@ #ifndef SCREEN_H #define SCREEN_H +#include "icon.h" + typedef struct _Scrn { struct _Scrn *behind, *upfront; - Window root, back; + Window root, back, inputbox; Colormap cmap; Visual *visual; GC gc, icongc, rubbergc, menubargc; @@ -12,13 +14,15 @@ struct DrawInfo dri; int fh,bh,h2,h3,h4,h5,h6,h7,h8; int width, height, depth, y, bw; - Pixmap default_tool_pm, default_tool_pm2, disabled_stipple; + struct IconPixmaps default_tool_pms; + Pixmap disabled_stipple; unsigned int default_tool_pm_w, default_tool_pm_h, lh; Window menubar, menubarparent, menubardepth; int hotkeyspace, checkmarkspace, subspace, menuleft; struct _Icon *icons, *firstselected; struct Menu *firstmenu; - int number; + int number, realized, iconcolorsallocated; + unsigned long iconcolor[256]; } Scrn; extern Scrn *scr, *front; diff -Nru amiwm-0.20.48/style.h amiwm-0.21pl2/style.h --- amiwm-0.20.48/style.h 1970-01-01 00:00:00.000000000 +0000 +++ amiwm-0.21pl2/style.h 2010-07-13 13:04:23.000000000 +0000 @@ -0,0 +1,16 @@ +#ifndef STYLE_H +#define STYLE_H + +#include + +#include "icon.h" + +typedef struct _Style { + struct _Style *next; + char *style_class, *style_title, *style_icon_title; + struct IconPixmaps icon_pms; + unsigned int icon_pm_w, icon_pm_h; + char *icon_name; +} Style; + +#endif diff -Nru amiwm-0.20.48/system.amiwmrc amiwm-0.21pl2/system.amiwmrc --- amiwm-0.20.48/system.amiwmrc 1997-12-12 17:22:06.000000000 +0000 +++ amiwm-0.21pl2/system.amiwmrc 2010-07-09 18:52:22.000000000 +0000 @@ -2,5 +2,9 @@ SizeBorder Right IconPalette MagicWB DefaultIcon "def_tool.info" +CustomIconsOnly Off +ShortLabelIcons Off +TitlebarClock Off +TitleClockFormat "%c" Screen "Workbench Screen" Module "Keyboard" "Meta:all:rotatescreens" diff -Nru amiwm-0.20.48/system.map amiwm-0.21pl2/system.map --- amiwm-0.20.48/system.map 1997-12-12 17:22:07.000000000 +0000 +++ amiwm-0.21pl2/system.map 2010-04-09 22:15:15.000000000 +0000 @@ -1,3 +1,3 @@ P3 4 2 255 170 170 170 0 0 0 255 255 255 102 136 187 -238 68 68 85 221 85 0 68 221 238 158 0 +238 68 68 85 221 85 0 68 221 238 153 0 diff -Nru amiwm-0.20.48/version.h amiwm-0.21pl2/version.h --- amiwm-0.20.48/version.h 1998-03-15 19:47:50.000000000 +0000 +++ amiwm-0.21pl2/version.h 2010-07-19 16:01:41.000000000 +0000 @@ -1 +1 @@ -#define VERSION "0.20pl48" +#define VERSION "0.21pl2" diff -Nru amiwm-0.20.48/Xinitrc.in amiwm-0.21pl2/Xinitrc.in --- amiwm-0.20.48/Xinitrc.in 2018-02-09 07:03:21.000000000 +0000 +++ amiwm-0.21pl2/Xinitrc.in 2010-04-09 22:15:15.000000000 +0000 @@ -1,4 +1,4 @@ -#!/bin/ksh +#!/bin/ksh # AmiWM startup script xrdb $OPENWINHOME/lib/Xdefaults # Load Default X11 resource database