diff options
| author | reinelt <reinelt@3ae390bd-cb1e-0410-b409-cd5a39f66f1f> | 2000-03-30 16:46:57 +0000 | 
|---|---|---|
| committer | reinelt <reinelt@3ae390bd-cb1e-0410-b409-cd5a39f66f1f> | 2000-03-30 16:46:57 +0000 | 
| commit | 668e3626f8770f655164687ca59f1f23b60fb638 (patch) | |
| tree | fbe96ccf9a9479df23bb99d460772ba9713b1119 | |
| parent | 277c1c4e412df449ea56ffac9f18a14c8b637fc9 (diff) | |
| download | lcd4linux-668e3626f8770f655164687ca59f1f23b60fb638.tar.gz | |
[lcd4linux @ 2000-03-30 16:46:57 by reinelt]
configure now handles '--with-x' and '--without-x' correct
git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@27 3ae390bd-cb1e-0410-b409-cd5a39f66f1f
| -rw-r--r-- | Makefile.am | 39 | ||||
| -rw-r--r-- | Makefile.in | 22 | ||||
| -rw-r--r-- | XWindow.c | 12 | ||||
| -rw-r--r-- | aclocal.m4 | 13 | ||||
| -rwxr-xr-x | configure | 1108 | ||||
| -rw-r--r-- | configure.in | 8 | ||||
| -rw-r--r-- | display.c | 8 | ||||
| -rw-r--r-- | lcd4linux.conf.sample | 4 | ||||
| -rw-r--r-- | lcd4linux.lsm | 16 | 
9 files changed, 1153 insertions, 77 deletions
diff --git a/Makefile.am b/Makefile.am index f7702e2..1889b16 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,25 +1,28 @@  ## Process this file with automake to produce Makefile.in  AUTOMAKE_OPTIONS = foreign -  CLEANFILES = *~ -AM_CFLAGS = -Wall -LDFLAGS = -L/usr/X11R6/lib -LDADD = -lX11  bin_PROGRAMS = lcd4linux + +AM_CFLAGS = $(X_CFLAGS) -Wall +lcd4linux_LDFLAGS = $(X_LIBS) +if WITH_X +lcd4linux_LDADD = -lX11 +endif +  lcd4linux_SOURCES = \ -	lcd4linux.c \ -	cfg.c cfg.h \ -	parser.c parser.h \ -	processor.c processor.h \ -	system.c system.h \ -	isdn.c isdn.h \ -	filter.c filter.h \ -	display.c display.h \ -	pixmap.c pixmap.h \ -	fontmap.c fontmap.h \ -	Skeleton.c \ -	MatrixOrbital.c \ -	Raster.c \ -	XWindow.c +lcd4linux.c \ +cfg.c cfg.h \ +parser.c parser.h \ +processor.c processor.h \ +system.c system.h \ +isdn.c isdn.h \ +filter.c filter.h \ +display.c display.h \ +pixmap.c pixmap.h \ +fontmap.c fontmap.h \ +Skeleton.c \ +MatrixOrbital.c \ +Raster.c \ +XWindow.c diff --git a/Makefile.in b/Makefile.in index 03de66d..995d739 100644 --- a/Makefile.in +++ b/Makefile.in @@ -57,20 +57,23 @@ POST_INSTALL = :  NORMAL_UNINSTALL = :  PRE_UNINSTALL = :  POST_UNINSTALL = : +AWK = @AWK@  CC = @CC@ +LN_S = @LN_S@  MAKEINFO = @MAKEINFO@  PACKAGE = @PACKAGE@  VERSION = @VERSION@  AUTOMAKE_OPTIONS = foreign -  CLEANFILES = *~ -AM_CFLAGS = -Wall -LDFLAGS = -L/usr/X11R6/lib -LDADD = -lX11  bin_PROGRAMS = lcd4linux -lcd4linux_SOURCES =  	lcd4linux.c 	cfg.c cfg.h 	parser.c parser.h 	processor.c processor.h 	system.c system.h 	isdn.c isdn.h 	filter.c filter.h 	display.c display.h 	pixmap.c pixmap.h 	fontmap.c fontmap.h 	Skeleton.c 	MatrixOrbital.c 	Raster.c 	XWindow.c + +AM_CFLAGS = $(X_CFLAGS) -Wall +lcd4linux_LDFLAGS = $(X_LIBS) +@WITH_X_TRUE@lcd4linux_LDADD = -lX11 + +lcd4linux_SOURCES =  lcd4linux.c cfg.c cfg.h parser.c parser.h processor.c processor.h system.c system.h isdn.c isdn.h filter.c filter.h display.c display.h pixmap.c pixmap.h fontmap.c fontmap.h Skeleton.c MatrixOrbital.c Raster.c XWindow.c  ACLOCAL_M4 = $(top_srcdir)/aclocal.m4  mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs @@ -80,13 +83,16 @@ PROGRAMS =  $(bin_PROGRAMS)  DEFS = @DEFS@ -I. -I$(srcdir)   CPPFLAGS = @CPPFLAGS@ +LDFLAGS = @LDFLAGS@  LIBS = @LIBS@ +X_CFLAGS = @X_CFLAGS@ +X_LIBS = @X_LIBS@ +X_EXTRA_LIBS = @X_EXTRA_LIBS@ +X_PRE_LIBS = @X_PRE_LIBS@  lcd4linux_OBJECTS =  lcd4linux.o cfg.o parser.o processor.o system.o \  isdn.o filter.o display.o pixmap.o fontmap.o Skeleton.o MatrixOrbital.o \  Raster.o XWindow.o -lcd4linux_LDADD = $(LDADD) -lcd4linux_DEPENDENCIES =  -lcd4linux_LDFLAGS =  +@WITH_X_TRUE@lcd4linux_DEPENDENCIES =   CFLAGS = @CFLAGS@  COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)  CCLD = $(CC) @@ -1,4 +1,4 @@ -/* $Id: XWindow.c,v 1.8 2000/03/28 08:48:33 reinelt Exp $ +/* $Id: XWindow.c,v 1.9 2000/03/30 16:46:57 reinelt Exp $   *   * X11 Driver for LCD4Linux    * @@ -20,6 +20,10 @@   *   *   * $Log: XWindow.c,v $ + * Revision 1.9  2000/03/30 16:46:57  reinelt + * + * configure now handles '--with-x' and '--without-x' correct + *   * Revision 1.8  2000/03/28 08:48:33  reinelt   *   * README.X11 added @@ -50,6 +54,8 @@   *   */ +#ifndef X_DISPLAY_MISSING +  #include	<X11/Xlib.h>  #include	<X11/Xutil.h>  #include	<stdio.h> @@ -228,6 +234,8 @@ XEvent ev;  	wa.event_mask=ExposureMask|ButtonPressMask|ButtonReleaseMask;  	w=XCreateWindow(dp,rw,0,0,dimx+2*border,dimy+2*border,0,0,  		InputOutput,vi,CWEventMask,&wa); +	printf ("XCreateWindow (%p, %ld, %d, %d, %d, %d, %d, %d, %d, %p, %ld, %p) = %ld\n",  +		dp,rw,0,0,dimx+2*border,dimy+2*border,0,0,InputOutput,vi,CWEventMask,&wa, w);  	pmback=XCreatePixmap(dp,w,dimx,dimy,dd);  	size_hints.min_width=size_hints.max_width=dimx+2*border;  	size_hints.min_height=size_hints.max_height=dimy+2*border; @@ -439,3 +447,5 @@ LCD XWindow[] = {  	{ "X11", 0, 0, 0, 0, BARS, xlcdinit, xlcdclear, xlcdput, xlcdbar, xlcdflush },  	{ NULL }  }; + +#endif /* X_DISPLAY_MISSING */ @@ -102,3 +102,16 @@ else  fi  AC_SUBST($1)]) +# Define a conditional. + +AC_DEFUN(AM_CONDITIONAL, +[AC_SUBST($1_TRUE) +AC_SUBST($1_FALSE) +if $2; then +  $1_TRUE= +  $1_FALSE='#' +else +  $1_TRUE='#' +  $1_FALSE= +fi]) + @@ -11,6 +11,8 @@  ac_help=  ac_default_prefix=/usr/local  # Any additions from configure.in: +ac_help="$ac_help +  --with-x                use the X Window System"  # Initialize some variables set by options.  # The variables have the same names as the options, with @@ -552,7 +554,7 @@ ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.  # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"  # ./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:556: checking for a BSD compatible install" >&5 +echo "configure:558: checking for a BSD compatible install" >&5  if test -z "$INSTALL"; then  if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then    echo $ac_n "(cached) $ac_c" 1>&6 @@ -605,7 +607,7 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'  test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'  echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6 -echo "configure:609: checking whether build environment is sane" >&5 +echo "configure:611: checking whether build environment is sane" >&5  # Just in case  sleep 1  echo timestamp > conftestfile @@ -662,7 +664,7 @@ test "$program_suffix" != NONE &&  test "$program_transform_name" = "" && program_transform_name="s,x,x,"  echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 -echo "configure:666: checking whether ${MAKE-make} sets \${MAKE}" >&5 +echo "configure:668: checking whether ${MAKE-make} sets \${MAKE}" >&5  set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`  if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then    echo $ac_n "(cached) $ac_c" 1>&6 @@ -708,7 +710,7 @@ EOF  missing_dir=`cd $ac_aux_dir && pwd`  echo $ac_n "checking for working aclocal""... $ac_c" 1>&6 -echo "configure:712: checking for working aclocal" >&5 +echo "configure:714: checking for working aclocal" >&5  # Run test in a subshell; some versions of sh will print an error if  # an executable is not found, even if stderr is redirected.  # Redirect stdin to placate older versions of autoconf.  Sigh. @@ -721,7 +723,7 @@ else  fi  echo $ac_n "checking for working autoconf""... $ac_c" 1>&6 -echo "configure:725: checking for working autoconf" >&5 +echo "configure:727: checking for working autoconf" >&5  # Run test in a subshell; some versions of sh will print an error if  # an executable is not found, even if stderr is redirected.  # Redirect stdin to placate older versions of autoconf.  Sigh. @@ -734,7 +736,7 @@ else  fi  echo $ac_n "checking for working automake""... $ac_c" 1>&6 -echo "configure:738: checking for working automake" >&5 +echo "configure:740: checking for working automake" >&5  # Run test in a subshell; some versions of sh will print an error if  # an executable is not found, even if stderr is redirected.  # Redirect stdin to placate older versions of autoconf.  Sigh. @@ -747,7 +749,7 @@ else  fi  echo $ac_n "checking for working autoheader""... $ac_c" 1>&6 -echo "configure:751: checking for working autoheader" >&5 +echo "configure:753: checking for working autoheader" >&5  # Run test in a subshell; some versions of sh will print an error if  # an executable is not found, even if stderr is redirected.  # Redirect stdin to placate older versions of autoconf.  Sigh. @@ -760,7 +762,7 @@ else  fi  echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6 -echo "configure:764: checking for working makeinfo" >&5 +echo "configure:766: checking for working makeinfo" >&5  # Run test in a subshell; some versions of sh will print an error if  # an executable is not found, even if stderr is redirected.  # Redirect stdin to placate older versions of autoconf.  Sigh. @@ -774,10 +776,44 @@ fi +for ac_prog in mawk gawk 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:785: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then +  echo $ac_n "(cached) $ac_c" 1>&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=":" +  ac_dummy="$PATH" +  for ac_dir in $ac_dummy; do +    test -z "$ac_dir" && ac_dir=. +    if test -f $ac_dir/$ac_word; then +      ac_cv_prog_AWK="$ac_prog" +      break +    fi +  done +  IFS="$ac_save_ifs" +fi +fi +AWK="$ac_cv_prog_AWK" +if test -n "$AWK"; then +  echo "$ac_t""$AWK" 1>&6 +else +  echo "$ac_t""no" 1>&6 +fi + +test -n "$AWK" && break +done +  # 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:781: checking for $ac_word" >&5 +echo "configure:817: checking for $ac_word" >&5  if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then    echo $ac_n "(cached) $ac_c" 1>&6  else @@ -807,7 +843,7 @@ 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:811: checking for $ac_word" >&5 +echo "configure:847: 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 @@ -858,7 +894,7 @@ fi        # Extract the first word of "cl", so it can be a program name with args.  set dummy cl; ac_word=$2  echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:862: checking for $ac_word" >&5 +echo "configure:898: 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 @@ -890,7 +926,7 @@ fi  fi  echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:894: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:930: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5  ac_ext=c  # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -901,12 +937,12 @@ cross_compiling=$ac_cv_prog_cc_cross  cat > conftest.$ac_ext << EOF -#line 905 "configure" +#line 941 "configure"  #include "confdefs.h"  main(){return(0);}  EOF -if { (eval echo configure:910: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:946: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; 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 @@ -932,12 +968,12 @@ 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:936: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:972: 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  echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:941: checking whether we are using GNU C" >&5 +echo "configure:977: 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 @@ -946,7 +982,7 @@ else    yes;  #endif  EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:950: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:986: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then    ac_cv_prog_gcc=yes  else    ac_cv_prog_gcc=no @@ -965,7 +1001,7 @@ 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:969: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:1005: 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 @@ -996,9 +1032,94 @@ else    fi  fi +# Find a good install program.  We prefer a C program (faster), +# so one script is as good as another.  But avoid the broken or +# incompatible versions: +# SysV /etc/install, /usr/sbin/install +# SunOS /usr/etc/install +# IRIX /sbin/install +# AIX /bin/install +# 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" +# ./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:1048: checking for a BSD compatible install" >&5 +if test -z "$INSTALL"; then +if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then +  echo $ac_n "(cached) $ac_c" 1>&6 +else +    IFS="${IFS= 	}"; ac_save_IFS="$IFS"; IFS=":" +  for ac_dir in $PATH; do +    # 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. +      # Don't use installbsd from OSF since it installs stuff as root +      # by default. +      for ac_prog in ginstall scoinst install; do +        if test -f $ac_dir/$ac_prog; then +	  if test $ac_prog = install && +            grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then +	    # AIX install.  It has an incompatible calling convention. +	    : +	  else +	    ac_cv_path_install="$ac_dir/$ac_prog -c" +	    break 2 +	  fi +	fi +      done +      ;; +    esac +  done +  IFS="$ac_save_IFS" + +fi +  if test "${ac_cv_path_install+set}" = set; then +    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 +    # break other packages using the cache if that directory is +    # removed, or if the path is relative. +    INSTALL="$ac_install_sh" +  fi +fi +echo "$ac_t""$INSTALL" 1>&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_PROGRAM}' + +test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' + +echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 +echo "configure:1101: 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 +else +  rm -f conftestdata +if ln -s X conftestdata 2>/dev/null +then +  rm -f conftestdata +  ac_cv_prog_LN_S="ln -s" +else +  ac_cv_prog_LN_S=ln +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 +else +  echo "$ac_t""no" 1>&6 +fi +  echo $ac_n "checking for log in -lm""... $ac_c" 1>&6 -echo "configure:1002: checking for log in -lm" >&5 +echo "configure:1123: checking for log in -lm" >&5  ac_lib_var=`echo m'_'log | sed 'y%./+-%__p_%'`  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then    echo $ac_n "(cached) $ac_c" 1>&6 @@ -1006,7 +1127,7 @@ else    ac_save_LIBS="$LIBS"  LIBS="-lm  $LIBS"  cat > conftest.$ac_ext <<EOF -#line 1010 "configure" +#line 1131 "configure"  #include "confdefs.h"  /* Override any gcc2 internal prototype to avoid an error.  */  /* We use char because int might match the return type of a gcc2 @@ -1017,7 +1138,7 @@ int main() {  log()  ; return 0; }  EOF -if { (eval echo configure:1021: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1142: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then    rm -rf conftest*    eval "ac_cv_lib_$ac_lib_var=yes"  else @@ -1046,7 +1167,7 @@ fi  echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:1050: checking how to run the C preprocessor" >&5 +echo "configure:1171: checking how to run the C preprocessor" >&5  # On Suns, sometimes $CPP names a directory.  if test -n "$CPP" && test -d "$CPP"; then    CPP= @@ -1061,13 +1182,13 @@ else    # On the NeXT, cc -E runs the code through the compiler's parser,    # not just through cpp.    cat > conftest.$ac_ext <<EOF -#line 1065 "configure" +#line 1186 "configure"  #include "confdefs.h"  #include <assert.h>  Syntax Error  EOF  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1071: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1192: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }  ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`  if test -z "$ac_err"; then    : @@ -1078,13 +1199,13 @@ else    rm -rf conftest*    CPP="${CC-cc} -E -traditional-cpp"    cat > conftest.$ac_ext <<EOF -#line 1082 "configure" +#line 1203 "configure"  #include "confdefs.h"  #include <assert.h>  Syntax Error  EOF  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1088: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1209: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }  ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`  if test -z "$ac_err"; then    : @@ -1095,13 +1216,13 @@ else    rm -rf conftest*    CPP="${CC-cc} -nologo -E"    cat > conftest.$ac_ext <<EOF -#line 1099 "configure" +#line 1220 "configure"  #include "confdefs.h"  #include <assert.h>  Syntax Error  EOF  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1105: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1226: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }  ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`  if test -z "$ac_err"; then    : @@ -1125,13 +1246,857 @@ else  fi  echo "$ac_t""$CPP" 1>&6 +# 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:1255: checking for X" >&5 + +# Check whether --with-x or --without-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. +if test "x$with_x" = xno; then +  # 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 +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 +    # GNU make sometimes prints "make[1]: Entering...", which would confuse us. +    eval `${MAKE-make} acfindx 2>/dev/null | grep -v make` +    # 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 +      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" ;; +    esac +    case "$ac_im_usrlibdir" in +	/usr/lib | /lib) ;; +	*) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;; +    esac +  fi +  cd .. +  rm -fr conftestdir +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 + +  # First, try using that file with no special directory specified. +cat > conftest.$ac_ext <<EOF +#line 1317 "configure" +#include "confdefs.h" +#include <$x_direct_test_include> +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:1322: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then +  rm -rf conftest* +  # 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 +fi +rm -f conftest* +fi # $ac_x_includes = NO + +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 <<EOF +#line 1391 "configure" +#include "confdefs.h" + +int main() { +${x_direct_test_function}() +; return 0; } +EOF +if { (eval echo configure:1398: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +  rm -rf conftest* +  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 \ +    ; \ +do +  for ac_extension in a so sl; do +    if test -r $ac_dir/lib${x_direct_test_library}.$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 +fi +  fi +  eval "$ac_cv_have_x" +fi # $with_x != no + +if test "$have_x" != yes; then +  echo "$ac_t""$have_x" 1>&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 +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 + +  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS= +else +  if test -n "$x_includes"; then +    X_CFLAGS="$X_CFLAGS -I$x_includes" +  fi + +  # It would also be nice to do this for all -L options, not just this one. +  if test -n "$x_libraries"; then +    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:1504: checking whether -R must be followed by a space" >&5 +      ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries" +      cat > conftest.$ac_ext <<EOF +#line 1507 "configure" +#include "confdefs.h" + +int main() { + +; return 0; } +EOF +if { (eval echo configure:1514: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; 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 +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 <<EOF +#line 1530 "configure" +#include "confdefs.h" + +int main() { + +; return 0; } +EOF +if { (eval echo configure:1537: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; 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 +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 +  fi + +  # Check for system-dependent libraries X programs must link with. +  # Do this before checking for the system-independent R6 libraries +  # (-lICE), since we may need -lsocket or whatever for X linking. + +  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 +    # the Alpha needs dnet_stub (dnet does not exist). +    echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6 +echo "configure:1569: 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 +else +  ac_save_LIBS="$LIBS" +LIBS="-ldnet  $LIBS" +cat > conftest.$ac_ext <<EOF +#line 1577 "configure" +#include "confdefs.h" +/* Override any gcc2 internal prototype to avoid an error.  */ +/* We use char because int might match the return type of a gcc2 +    builtin and then its argument prototype would still apply.  */ +char dnet_ntoa(); + +int main() { +dnet_ntoa() +; return 0; } +EOF +if { (eval echo configure:1588: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +  rm -rf conftest* +  eval "ac_cv_lib_$ac_lib_var=yes" +else +  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 -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:1610: 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 +else +  ac_save_LIBS="$LIBS" +LIBS="-ldnet_stub  $LIBS" +cat > conftest.$ac_ext <<EOF +#line 1618 "configure" +#include "confdefs.h" +/* Override any gcc2 internal prototype to avoid an error.  */ +/* We use char because int might match the return type of a gcc2 +    builtin and then its argument prototype would still apply.  */ +char dnet_ntoa(); + +int main() { +dnet_ntoa() +; return 0; } +EOF +if { (eval echo configure:1629: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +  rm -rf conftest* +  eval "ac_cv_lib_$ac_lib_var=yes" +else +  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 -ldnet_stub" +else +  echo "$ac_t""no" 1>&6 +fi + +    fi + +    # 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) +    # 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:1658: 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 <<EOF +#line 1663 "configure" +#include "confdefs.h" +/* System header to define __stub macros and hopefully few prototypes, +    which can conflict with char gethostbyname(); below.  */ +#include <assert.h> +/* 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:1686: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; 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 + +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:1707: 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 +else +  ac_save_LIBS="$LIBS" +LIBS="-lnsl  $LIBS" +cat > conftest.$ac_ext <<EOF +#line 1715 "configure" +#include "confdefs.h" +/* Override any gcc2 internal prototype to avoid an error.  */ +/* We use char because int might match the return type of a gcc2 +    builtin and then its argument prototype would still apply.  */ +char gethostbyname(); + +int main() { +gethostbyname() +; return 0; } +EOF +if { (eval echo configure:1726: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +  rm -rf conftest* +  eval "ac_cv_lib_$ac_lib_var=yes" +else +  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 -lnsl" +else +  echo "$ac_t""no" 1>&6 +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:1756: 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 <<EOF +#line 1761 "configure" +#include "confdefs.h" +/* System header to define __stub macros and hopefully few prototypes, +    which can conflict with char connect(); below.  */ +#include <assert.h> +/* 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:1784: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; 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 + +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:1805: 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 +else +  ac_save_LIBS="$LIBS" +LIBS="-lsocket $X_EXTRA_LIBS $LIBS" +cat > conftest.$ac_ext <<EOF +#line 1813 "configure" +#include "confdefs.h" +/* Override any gcc2 internal prototype to avoid an error.  */ +/* We use char because int might match the return type of a gcc2 +    builtin and then its argument prototype would still apply.  */ +char connect(); + +int main() { +connect() +; return 0; } +EOF +if { (eval echo configure:1824: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +  rm -rf conftest* +  eval "ac_cv_lib_$ac_lib_var=yes" +else +  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="-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:1848: 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 <<EOF +#line 1853 "configure" +#include "confdefs.h" +/* System header to define __stub macros and hopefully few prototypes, +    which can conflict with char remove(); below.  */ +#include <assert.h> +/* 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:1876: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; 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 + +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:1897: 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 +else +  ac_save_LIBS="$LIBS" +LIBS="-lposix  $LIBS" +cat > conftest.$ac_ext <<EOF +#line 1905 "configure" +#include "confdefs.h" +/* Override any gcc2 internal prototype to avoid an error.  */ +/* We use char because int might match the return type of a gcc2 +    builtin and then its argument prototype would still apply.  */ +char remove(); + +int main() { +remove() +; return 0; } +EOF +if { (eval echo configure:1916: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +  rm -rf conftest* +  eval "ac_cv_lib_$ac_lib_var=yes" +else +  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:1940: 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 <<EOF +#line 1945 "configure" +#include "confdefs.h" +/* System header to define __stub macros and hopefully few prototypes, +    which can conflict with char shmat(); below.  */ +#include <assert.h> +/* 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() { + +/* 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(); +#endif + +; return 0; } +EOF +if { (eval echo configure:1968: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; 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* +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 + +    if test $ac_cv_func_shmat = no; then +      echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6 +echo "configure:1989: 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 +else +  ac_save_LIBS="$LIBS" +LIBS="-lipc  $LIBS" +cat > conftest.$ac_ext <<EOF +#line 1997 "configure" +#include "confdefs.h" +/* Override any gcc2 internal prototype to avoid an error.  */ +/* We use char because int might match the return type of a gcc2 +    builtin and then its argument prototype would still apply.  */ +char shmat(); + +int main() { +shmat() +; return 0; } +EOF +if { (eval echo configure:2008: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +  rm -rf conftest* +  eval "ac_cv_lib_$ac_lib_var=yes" +else +  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 -lipc" +else +  echo "$ac_t""no" 1>&6 +fi + +    fi +  fi + +  # Check for libraries that X11R6 Xt/Xaw programs need. +  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:2041: 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 $X_EXTRA_LIBS $LIBS" +cat > conftest.$ac_ext <<EOF +#line 2049 "configure" +#include "confdefs.h" +/* Override any gcc2 internal prototype to avoid an error.  */ +/* We use char because int might match the return type of a gcc2 +    builtin and then its argument prototype would still apply.  */ +char IceConnectionNumber(); + +int main() { +IceConnectionNumber() +; return 0; } +EOF +if { (eval echo configure:2060: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +  rm -rf conftest* +  eval "ac_cv_lib_$ac_lib_var=yes" +else +  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_PRE_LIBS="$X_PRE_LIBS -lSM -lICE" +else +  echo "$ac_t""no" 1>&6 +fi + +  LDFLAGS="$ac_save_LDFLAGS" + +fi + + + +if test x$no_x = x; then +  WITH_X_TRUE= +  WITH_X_FALSE='#' +else +  WITH_X_TRUE='#' +  WITH_X_FALSE= +fi +  echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:1130: checking for ANSI C header files" >&5 +echo "configure:2095: 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  else    cat > conftest.$ac_ext <<EOF -#line 1135 "configure" +#line 2100 "configure"  #include "confdefs.h"  #include <stdlib.h>  #include <stdarg.h> @@ -1139,7 +2104,7 @@ else  #include <float.h>  EOF  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1143: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2108: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }  ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`  if test -z "$ac_err"; then    rm -rf conftest* @@ -1156,7 +2121,7 @@ rm -f conftest*  if test $ac_cv_header_stdc = yes; then    # SunOS 4.x string.h does not declare mem*, contrary to ANSI.  cat > conftest.$ac_ext <<EOF -#line 1160 "configure" +#line 2125 "configure"  #include "confdefs.h"  #include <string.h>  EOF @@ -1174,7 +2139,7 @@ fi  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 <<EOF -#line 1178 "configure" +#line 2143 "configure"  #include "confdefs.h"  #include <stdlib.h>  EOF @@ -1195,7 +2160,7 @@ if test "$cross_compiling" = yes; then    :  else    cat > conftest.$ac_ext <<EOF -#line 1199 "configure" +#line 2164 "configure"  #include "confdefs.h"  #include <ctype.h>  #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -1206,7 +2171,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);  exit (0); }  EOF -if { (eval echo configure:1210: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2175: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null  then    :  else @@ -1233,17 +2198,17 @@ for ac_hdr in fcntl.h sys/ioctl.h sys/time.h unistd.h  do  ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`  echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:1237: checking for $ac_hdr" >&5 +echo "configure:2202: checking for $ac_hdr" >&5  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then    echo $ac_n "(cached) $ac_c" 1>&6  else    cat > conftest.$ac_ext <<EOF -#line 1242 "configure" +#line 2207 "configure"  #include "confdefs.h"  #include <$ac_hdr>  EOF  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1247: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2212: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }  ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`  if test -z "$ac_err"; then    rm -rf conftest* @@ -1271,12 +2236,12 @@ done  echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 -echo "configure:1275: checking whether time.h and sys/time.h may both be included" >&5 +echo "configure:2240: 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 <<EOF -#line 1280 "configure" +#line 2245 "configure"  #include "confdefs.h"  #include <sys/types.h>  #include <sys/time.h> @@ -1285,7 +2250,7 @@ int main() {  struct tm *tp;  ; return 0; }  EOF -if { (eval echo configure:1289: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2254: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then    rm -rf conftest*    ac_cv_header_time=yes  else @@ -1308,13 +2273,13 @@ fi  if test $ac_cv_prog_gcc = yes; then      echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6 -echo "configure:1312: checking whether ${CC-cc} needs -traditional" >&5 +echo "configure:2277: checking whether ${CC-cc} needs -traditional" >&5  if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then    echo $ac_n "(cached) $ac_c" 1>&6  else      ac_pattern="Autoconf.*'x'"    cat > conftest.$ac_ext <<EOF -#line 1318 "configure" +#line 2283 "configure"  #include "confdefs.h"  #include <sgtty.h>  Autoconf TIOCGETP @@ -1332,7 +2297,7 @@ rm -f conftest*    if test $ac_cv_prog_gcc_traditional = no; then      cat > conftest.$ac_ext <<EOF -#line 1336 "configure" +#line 2301 "configure"  #include "confdefs.h"  #include <termio.h>  Autoconf TCGETA @@ -1353,15 +2318,56 @@ echo "$ac_t""$ac_cv_prog_gcc_traditional" 1>&6    fi  fi +echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 +echo "configure:2323: checking return type of signal handlers" >&5 +if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then +  echo $ac_n "(cached) $ac_c" 1>&6 +else +  cat > conftest.$ac_ext <<EOF +#line 2328 "configure" +#include "confdefs.h" +#include <sys/types.h> +#include <signal.h> +#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:2345: \"$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* +  ac_cv_type_signal=int +fi +rm -f conftest* +fi + +echo "$ac_t""$ac_cv_type_signal" 1>&6 +cat >> confdefs.h <<EOF +#define RETSIGTYPE $ac_cv_type_signal +EOF + +  for ac_func in gettimeofday strdup strerror strstr strtol uname  do  echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:1360: checking for $ac_func" >&5 +echo "configure:2366: checking for $ac_func" >&5  if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then    echo $ac_n "(cached) $ac_c" 1>&6  else    cat > conftest.$ac_ext <<EOF -#line 1365 "configure" +#line 2371 "configure"  #include "confdefs.h"  /* System header to define __stub macros and hopefully few prototypes,      which can conflict with char $ac_func(); below.  */ @@ -1384,7 +2390,7 @@ $ac_func();  ; return 0; }  EOF -if { (eval echo configure:1388: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2394: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then    rm -rf conftest*    eval "ac_cv_func_$ac_func=yes"  else @@ -1565,8 +2571,16 @@ s%@AUTOMAKE@%$AUTOMAKE%g  s%@AUTOHEADER@%$AUTOHEADER%g  s%@MAKEINFO@%$MAKEINFO%g  s%@SET_MAKE@%$SET_MAKE%g +s%@AWK@%$AWK%g  s%@CC@%$CC%g +s%@LN_S@%$LN_S%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%@WITH_X_TRUE@%$WITH_X_TRUE%g +s%@WITH_X_FALSE@%$WITH_X_FALSE%g  CEOF  EOF diff --git a/configure.in b/configure.in index 6e03db7..a184683 100644 --- a/configure.in +++ b/configure.in @@ -3,11 +3,18 @@ AC_INIT(lcd4linux.c)  AM_INIT_AUTOMAKE(lcd4linux, 0.95)  dnl Checks for programs. +AC_PROG_AWK  AC_PROG_CC +AC_PROG_INSTALL +AC_PROG_LN_S  dnl Checks for libraries.  AC_CHECK_LIB(m, log) +dnl Checks for X11 +AC_PATH_XTRA +AM_CONDITIONAL(WITH_X, test x$no_x = x) +  dnl Checks for header files.  AC_HEADER_STDC  AC_CHECK_HEADERS(fcntl.h sys/ioctl.h sys/time.h unistd.h) @@ -17,6 +24,7 @@ AC_HEADER_TIME  dnl Checks for library functions.  AC_PROG_GCC_TRADITIONAL +AC_TYPE_SIGNAL  AC_CHECK_FUNCS(gettimeofday strdup strerror strstr strtol uname)  AC_OUTPUT(Makefile) @@ -1,4 +1,4 @@ -/* $Id: display.c,v 1.12 2000/03/26 18:46:28 reinelt Exp $ +/* $Id: display.c,v 1.13 2000/03/30 16:46:57 reinelt Exp $   *   * framework for device drivers   * @@ -20,6 +20,10 @@   *   *   * $Log: display.c,v $ + * Revision 1.13  2000/03/30 16:46:57  reinelt + * + * configure now handles '--with-x' and '--without-x' correct + *   * Revision 1.12  2000/03/26 18:46:28  reinelt   *   * bug in pixmap.c that leaded to empty bars fixed @@ -117,7 +121,9 @@ FAMILY Driver[] = {    { "Skeleton",        Skeleton },    { "Matrix Orbital",  MatrixOrbital },    { "Raster",          Raster }, +#ifndef X_DISPLAY_MISSING    { "X Window System", XWindow }, +#endif    { NULL }  }; diff --git a/lcd4linux.conf.sample b/lcd4linux.conf.sample index 9b00f86..1e50a6c 100644 --- a/lcd4linux.conf.sample +++ b/lcd4linux.conf.sample @@ -16,8 +16,8 @@  Display X11  size 20x5  font 5x8 -pixel 2+0 -gap 2x2 +pixel 5+1 +gap 5x5  border 3  foreground \#102000  halfground \#70c000 diff --git a/lcd4linux.lsm b/lcd4linux.lsm new file mode 100644 index 0000000..0f6cb6f --- /dev/null +++ b/lcd4linux.lsm @@ -0,0 +1,16 @@ +Begin4 +Title:          lcd4linux +Version:        0.95 +Entered-date:   2000-03-28 +Description:    system and ISDN information is shown on +                an external display or in a X11 window. +Keywords:       LCD  +Author:         reinelt@eunet.at (Michael Reinelt) +Maintained-by:  reinelt@eunet.at (Michael Reinelt) +Primary-site:   download.sourceforge.net /pub/sourceforge/lcd4linux +                54k lcd4linux-0.95.tar.gz +Alternate-site: http://lcd4linux.sourceforge.net +Original-site:   +Platforms:       +Copying-policy: GPL +End  | 
