diff options
Diffstat (limited to '')
-rw-r--r-- | HD44780.c | 10 | ||||
-rw-r--r-- | Makefile.in | 72 | ||||
-rw-r--r-- | Raster.c | 8 | ||||
-rw-r--r-- | TODO | 3 | ||||
-rw-r--r-- | aclocal.m4 | 23 | ||||
-rw-r--r-- | config.h.in | 155 | ||||
-rwxr-xr-x | configure | 695 | ||||
-rw-r--r-- | configure.in | 218 | ||||
-rw-r--r-- | debug.c | 9 | ||||
-rw-r--r-- | display.c | 9 | ||||
-rw-r--r-- | lcd4linux.c | 19 | ||||
-rw-r--r-- | system.c | 8 | ||||
-rw-r--r-- | udelay.c | 34 | ||||
-rw-r--r-- | udelay.h | 15 |
14 files changed, 830 insertions, 448 deletions
@@ -1,4 +1,4 @@ -/* $Id: HD44780.c,v 1.12 2001/02/14 07:40:16 reinelt Exp $ +/* $Id: HD44780.c,v 1.13 2001/03/12 12:39:36 reinelt Exp $ * * driver for display modules based on the HD44780 chip * @@ -20,6 +20,10 @@ * * * $Log: HD44780.c,v $ + * Revision 1.13 2001/03/12 12:39:36 reinelt + * + * reworked autoconf a lot: drivers may be excluded, #define's went to config.h + * * Revision 1.12 2001/02/14 07:40:16 reinelt * * first (incomplete) GPO implementation @@ -95,6 +99,8 @@ * */ +#include "config.h" + #include <stdlib.h> #include <stdio.h> #include <string.h> @@ -397,6 +403,7 @@ int HD_init (LCD *Self) return -1; } +#ifdef USE_OLD_UDELAY s=cfg_get ("Delay"); if (s==NULL || *s=='\0') { error ("HD44780: no 'Delay' entry in %s", cfg_file()); @@ -406,6 +413,7 @@ int HD_init (LCD *Self) error ("HD44780: bad delay '%s' in %s", s, cfg_file()); return -1; } +#endif s=cfg_get("Size"); if (s==NULL || *s=='\0') { diff --git a/Makefile.in b/Makefile.in index 87183e1..377a610 100644 --- a/Makefile.in +++ b/Makefile.in @@ -86,11 +86,12 @@ EXTRA_DIST = lcd4linux.conf.sample lcd4kde.conf lcd4linux.kdelnk lcd4linux.xpm ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = PROGRAMS = $(bin_PROGRAMS) -DEFS = @DEFS@ -I. -I$(srcdir) +DEFS = @DEFS@ -I. -I$(srcdir) -I. CPPFLAGS = @CPPFLAGS@ LDFLAGS = @LDFLAGS@ LIBS = @LIBS@ @@ -105,8 +106,9 @@ CFLAGS = @CFLAGS@ COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ -DIST_COMMON = README COPYING INSTALL Makefile.am Makefile.in TODO \ -aclocal.m4 configure configure.in install-sh missing mkinstalldirs +DIST_COMMON = README ./stamp-h.in COPYING INSTALL Makefile.am \ +Makefile.in TODO acconfig.h aclocal.m4 config.h.in configure \ +configure.in install-sh missing mkinstalldirs DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) @@ -141,6 +143,34 @@ config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(srcdir)/configure: $(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES) cd $(srcdir) && $(AUTOCONF) +config.h: stamp-h + @if test ! -f $@; then \ + rm -f stamp-h; \ + $(MAKE) stamp-h; \ + else :; fi +stamp-h: $(srcdir)/config.h.in $(top_builddir)/config.status + cd $(top_builddir) \ + && CONFIG_FILES= CONFIG_HEADERS=config.h \ + $(SHELL) ./config.status + @echo timestamp > stamp-h 2> /dev/null +$(srcdir)/config.h.in: $(srcdir)/stamp-h.in + @if test ! -f $@; then \ + rm -f $(srcdir)/stamp-h.in; \ + $(MAKE) $(srcdir)/stamp-h.in; \ + else :; fi +$(srcdir)/stamp-h.in: $(top_srcdir)/configure.in $(ACLOCAL_M4) acconfig.h + cd $(top_srcdir) && $(AUTOHEADER) + @echo timestamp > $(srcdir)/stamp-h.in 2> /dev/null + +mostlyclean-hdr: + +clean-hdr: + +distclean-hdr: + -rm -f config.h + +maintainer-clean-hdr: + mostlyclean-binPROGRAMS: clean-binPROGRAMS: @@ -196,15 +226,15 @@ ID: $(HEADERS) $(SOURCES) $(LISP) here=`pwd` && cd $(srcdir) \ && mkid -f$$here/ID $$unique $(LISP) -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP) +TAGS: $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS)'; \ unique=`for i in $$list; do echo $$i; done | \ awk ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ - test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \ - || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS) + test -z "$(ETAGS_ARGS)config.h.in$$unique$(LISP)$$tags" \ + || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags config.h.in $$unique $(LISP) -o $$here/TAGS) mostlyclean-tags: @@ -308,6 +338,9 @@ check-am: all-am check: check-am installcheck-am: installcheck: installcheck-am +all-recursive-am: config.h + $(MAKE) $(AM_MAKEFLAGS) all-recursive + install-exec-am: install-binPROGRAMS install-exec: install-exec-am @@ -319,7 +352,7 @@ install-am: all-am install: install-am uninstall-am: uninstall-binPROGRAMS uninstall: uninstall-am -all-am: Makefile $(PROGRAMS) +all-am: Makefile $(PROGRAMS) config.h all-redirect: all-am install-strip: $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install @@ -337,23 +370,25 @@ distclean-generic: -rm -f config.cache config.log stamp-h stamp-h[0-9]* maintainer-clean-generic: -mostlyclean-am: mostlyclean-binPROGRAMS mostlyclean-compile \ - mostlyclean-tags mostlyclean-depend mostlyclean-generic +mostlyclean-am: mostlyclean-hdr mostlyclean-binPROGRAMS \ + mostlyclean-compile mostlyclean-tags mostlyclean-depend \ + mostlyclean-generic mostlyclean: mostlyclean-am -clean-am: clean-binPROGRAMS clean-compile clean-tags clean-depend \ - clean-generic mostlyclean-am +clean-am: clean-hdr clean-binPROGRAMS clean-compile clean-tags \ + clean-depend clean-generic mostlyclean-am clean: clean-am -distclean-am: distclean-binPROGRAMS distclean-compile distclean-tags \ - distclean-depend distclean-generic clean-am +distclean-am: distclean-hdr distclean-binPROGRAMS distclean-compile \ + distclean-tags distclean-depend distclean-generic \ + clean-am distclean: distclean-am -rm -f config.status -maintainer-clean-am: maintainer-clean-binPROGRAMS \ +maintainer-clean-am: maintainer-clean-hdr maintainer-clean-binPROGRAMS \ maintainer-clean-compile maintainer-clean-tags \ maintainer-clean-depend maintainer-clean-generic \ distclean-am @@ -363,15 +398,16 @@ maintainer-clean-am: maintainer-clean-binPROGRAMS \ maintainer-clean: maintainer-clean-am -rm -f config.status -.PHONY: mostlyclean-binPROGRAMS distclean-binPROGRAMS clean-binPROGRAMS \ +.PHONY: mostlyclean-hdr distclean-hdr clean-hdr maintainer-clean-hdr \ +mostlyclean-binPROGRAMS distclean-binPROGRAMS clean-binPROGRAMS \ maintainer-clean-binPROGRAMS uninstall-binPROGRAMS install-binPROGRAMS \ mostlyclean-compile distclean-compile clean-compile \ maintainer-clean-compile tags mostlyclean-tags distclean-tags \ clean-tags maintainer-clean-tags distdir mostlyclean-depend \ distclean-depend clean-depend maintainer-clean-depend info-am info \ -dvi-am dvi check check-am installcheck-am installcheck install-exec-am \ -install-exec install-data-am install-data install-am install \ -uninstall-am uninstall all-redirect all-am all installdirs \ +dvi-am dvi check check-am installcheck-am installcheck all-recursive-am \ +install-exec-am install-exec install-data-am install-data install-am \ +install uninstall-am uninstall all-redirect all-am all installdirs \ mostlyclean-generic distclean-generic clean-generic \ maintainer-clean-generic clean mostlyclean distclean maintainer-clean @@ -1,4 +1,4 @@ -/* $Id: Raster.c,v 1.16 2001/03/02 17:18:52 reinelt Exp $ +/* $Id: Raster.c,v 1.17 2001/03/12 12:39:36 reinelt Exp $ * * driver for raster formats * @@ -20,6 +20,10 @@ * * * $Log: Raster.c,v $ + * Revision 1.17 2001/03/12 12:39:36 reinelt + * + * reworked autoconf a lot: drivers may be excluded, #define's went to config.h + * * Revision 1.16 2001/03/02 17:18:52 reinelt * * let configure find gd.h @@ -100,6 +104,8 @@ * */ +#include "config.h" + #include <stdlib.h> #include <stdio.h> #include <string.h> @@ -58,3 +58,6 @@ at least try to.... read configuration file earlier (before forking) so that specific drivers (especially 'Text') would not fork. There's a reason for forking that early, but I forgot... + +2001-03-12 Michael Reinelt <reinelt@eunet.at> +remove USE_OLD_UDELAY after wide testing of new udelay code @@ -102,3 +102,26 @@ else fi AC_SUBST($1)]) +# Like AC_CONFIG_HEADER, but automatically create stamp file. + +AC_DEFUN(AM_CONFIG_HEADER, +[AC_PREREQ([2.12]) +AC_CONFIG_HEADER([$1]) +dnl When config.status generates a header, we must update the stamp-h file. +dnl This file resides in the same directory as the config header +dnl that is generated. We must strip everything past the first ":", +dnl and everything past the last "/". +AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl +ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>, +<<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>, +<<am_indx=1 +for am_file in <<$1>>; do + case " <<$>>CONFIG_HEADERS " in + *" <<$>>am_file "*<<)>> + echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx + ;; + esac + am_indx=`expr "<<$>>am_indx" + 1` +done<<>>dnl>>) +changequote([,]))]) + diff --git a/config.h.in b/config.h.in new file mode 100644 index 0000000..5e4090f --- /dev/null +++ b/config.h.in @@ -0,0 +1,155 @@ +/* config.h.in. Generated automatically from configure.in by autoheader. */ + +/* Define to empty if the keyword does not work. */ +#undef const + +/* Define to `int' if <sys/types.h> doesn't define. */ +#undef gid_t + +/* Define if you have <sys/wait.h> that is POSIX.1 compatible. */ +#undef HAVE_SYS_WAIT_H + +/* Define as __inline if that's what the C compiler calls it. */ +#undef inline + +/* Define to `int' if <sys/types.h> doesn't define. */ +#undef pid_t + +/* Define as the return type of signal handlers (int or void). */ +#undef RETSIGTYPE + +/* Define to `unsigned' if <sys/types.h> doesn't define. */ +#undef size_t + +/* Define if you have the ANSI C header files. */ +#undef STDC_HEADERS + +/* Define if you can safely include both <sys/time.h> and <time.h>. */ +#undef TIME_WITH_SYS_TIME + +/* Define if your <sys/time.h> declares struct tm. */ +#undef TM_IN_SYS_TIME + +/* Define to `int' if <sys/types.h> doesn't define. */ +#undef uid_t + +/* Define if the X Window System is missing or not being used. */ +#undef X_DISPLAY_MISSING + +/* Define if you want the Beckmann&Egle driver compiled */ +#undef WITH_BECKMANNEGLE + +/* Define if you want the Crystalfontz driver compiled */ +#undef WITH_CRYSTALFONTZ + +/* Define if you want the HD44780 driver compiled */ +#undef WITH_HD44780 + +/* Define if you want the Matrix Orbital driver compiled */ +#undef WITH_MATRIXORBITAL + +/* Define if you want the PalmPilot driver compiled */ +#undef WITH_PALMPILOT + +/* Define if you want the PNG Raster driver compiled */ +#undef WITH_PNG + +/* Define if you want the PPM Raster driver compiled */ +#undef WITH_PPM + +/* Define if you want the SIN Router driver compiled */ +#undef WITH_SIN + +/* Define if you want the Skeleton driver compiled */ +#undef WITH_SKELETON + +/* Define if you want the Text driver compiled */ +#undef WITH_TEXT + +/* Define if you want the X11 driver compiled */ +#undef WITH_X11 + +/* Define if you have the gettimeofday function. */ +#undef HAVE_GETTIMEOFDAY + +/* Define if you have the putenv function. */ +#undef HAVE_PUTENV + +/* Define if you have the select function. */ +#undef HAVE_SELECT + +/* Define if you have the socket function. */ +#undef HAVE_SOCKET + +/* Define if you have the strdup function. */ +#undef HAVE_STRDUP + +/* Define if you have the strerror function. */ +#undef HAVE_STRERROR + +/* Define if you have the strstr function. */ +#undef HAVE_STRSTR + +/* Define if you have the strtol function. */ +#undef HAVE_STRTOL + +/* Define if you have the uname function. */ +#undef HAVE_UNAME + +/* Define if you have the <asm/io.h> header file. */ +#undef HAVE_ASM_IO_H + +/* Define if you have the <dirent.h> header file. */ +#undef HAVE_DIRENT_H + +/* Define if you have the <fcntl.h> header file. */ +#undef HAVE_FCNTL_H + +/* Define if you have the <gd.h> header file. */ +#undef HAVE_GD_H + +/* Define if you have the <gd/gd.h> header file. */ +#undef HAVE_GD_GD_H + +/* Define if you have the <limits.h> header file. */ +#undef HAVE_LIMITS_H + +/* Define if you have the <ndir.h> header file. */ +#undef HAVE_NDIR_H + +/* Define if you have the <net/if_ppp.h> header file. */ +#undef HAVE_NET_IF_PPP_H + +/* Define if you have the <strings.h> header file. */ +#undef HAVE_STRINGS_H + +/* Define if you have the <sys/dir.h> header file. */ +#undef HAVE_SYS_DIR_H + +/* Define if you have the <sys/io.h> header file. */ +#undef HAVE_SYS_IO_H + +/* Define if you have the <sys/ioctl.h> header file. */ +#undef HAVE_SYS_IOCTL_H + +/* Define if you have the <sys/ndir.h> header file. */ +#undef HAVE_SYS_NDIR_H + +/* Define if you have the <sys/time.h> header file. */ +#undef HAVE_SYS_TIME_H + +/* Define if you have the <syslog.h> header file. */ +#undef HAVE_SYSLOG_H + +/* Define if you have the <unistd.h> header file. */ +#undef HAVE_UNISTD_H + +/* Define if you have the m library (-lm). */ +#undef HAVE_LIBM + +/* Name of package */ +#undef PACKAGE + +/* Version number of package */ +#undef VERSION + @@ -1,7 +1,7 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated automatically using autoconf version 2.14 +# Generated automatically using autoconf version 2.13 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. # # This configure script is free software; the Free Software Foundation @@ -16,14 +16,9 @@ ac_help="$ac_help ac_help="$ac_help --with-drivers=<list> compile driver for displays in <list>, drivers may be separated with commas, - 'all' (default) compiles all available drivers. - possible drivers are: - BeckmannEgle, CrystalFontz, HD44780, - MatrixOrbital, PalmPilot, PNG, PPM, X11, Text" -ac_help="$ac_help - --with-notdrivers=<list> do not compile driver for displays in <list>, - drivers may be separated with commas, - mainly useful if above all drivers were selected. + 'all' (default) compiles all available drivers, + drivers may be excluded with 'all,!<driver>', + (try 'all,\!<driver>' if your shell complains...) possible drivers are: BeckmannEgle, CrystalFontz, HD44780, MatrixOrbital, PalmPilot, PNG, PPM, X11, Text" @@ -349,7 +344,7 @@ EOF verbose=yes ;; -version | --version | --versio | --versi | --vers) - echo "configure generated by autoconf version 2.14" + echo "configure generated by autoconf version 2.13" exit 0 ;; -with-* | --with-*) @@ -568,7 +563,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:572: checking for a BSD compatible install" >&5 +echo "configure:567: 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 @@ -621,7 +616,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:625: checking whether build environment is sane" >&5 +echo "configure:620: checking whether build environment is sane" >&5 # Just in case sleep 1 echo timestamp > conftestfile @@ -678,7 +673,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:682: checking whether ${MAKE-make} sets \${MAKE}" >&5 +echo "configure:677: 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 @@ -724,7 +719,7 @@ EOF missing_dir=`cd $ac_aux_dir && pwd` echo $ac_n "checking for working aclocal""... $ac_c" 1>&6 -echo "configure:728: checking for working aclocal" >&5 +echo "configure:723: 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. @@ -737,7 +732,7 @@ else fi echo $ac_n "checking for working autoconf""... $ac_c" 1>&6 -echo "configure:741: checking for working autoconf" >&5 +echo "configure:736: 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. @@ -750,7 +745,7 @@ else fi echo $ac_n "checking for working automake""... $ac_c" 1>&6 -echo "configure:754: checking for working automake" >&5 +echo "configure:749: 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. @@ -763,7 +758,7 @@ else fi echo $ac_n "checking for working autoheader""... $ac_c" 1>&6 -echo "configure:767: checking for working autoheader" >&5 +echo "configure:762: 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. @@ -776,7 +771,7 @@ else fi echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6 -echo "configure:780: checking for working makeinfo" >&5 +echo "configure:775: 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. @@ -790,12 +785,15 @@ 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:799: checking for $ac_word" >&5 +echo "configure:797: 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 @@ -827,7 +825,7 @@ 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:831: checking for $ac_word" >&5 +echo "configure:829: 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 @@ -857,7 +855,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:861: checking for $ac_word" >&5 +echo "configure:859: 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 @@ -908,7 +906,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:912: checking for $ac_word" >&5 +echo "configure:910: 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 @@ -940,7 +938,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:944: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:942: 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. @@ -951,12 +949,12 @@ cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext << EOF -#line 955 "configure" +#line 953 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:960: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:958: \"$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 @@ -982,12 +980,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:986: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:984: 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:991: checking whether we are using GNU C" >&5 +echo "configure:989: 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 @@ -996,7 +994,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1000: \"$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:998: \"$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 @@ -1015,7 +1013,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:1019: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:1017: 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 @@ -1058,7 +1056,7 @@ fi # 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:1062: checking for a BSD compatible install" >&5 +echo "configure:1060: 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 @@ -1111,7 +1109,7 @@ 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:1115: checking whether ln -s works" >&5 +echo "configure:1113: 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 @@ -1133,7 +1131,7 @@ fi echo $ac_n "checking for log in -lm""... $ac_c" 1>&6 -echo "configure:1137: checking for log in -lm" >&5 +echo "configure:1135: 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 @@ -1141,7 +1139,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lm $LIBS" cat > conftest.$ac_ext <<EOF -#line 1145 "configure" +#line 1143 "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 @@ -1152,7 +1150,7 @@ int main() { log() ; return 0; } EOF -if { (eval echo configure:1156: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1154: \"$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 @@ -1181,7 +1179,7 @@ fi echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:1185: checking how to run the C preprocessor" >&5 +echo "configure:1183: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -1196,13 +1194,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 1200 "configure" +#line 1198 "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:1206: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1204: \"$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 : @@ -1213,13 +1211,13 @@ else rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext <<EOF -#line 1217 "configure" +#line 1215 "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:1223: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1221: \"$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 : @@ -1230,13 +1228,13 @@ else rm -rf conftest* CPP="${CC-cc} -nologo -E" cat > conftest.$ac_ext <<EOF -#line 1234 "configure" +#line 1232 "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:1240: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1238: \"$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 : @@ -1265,7 +1263,7 @@ echo "$ac_t""$CPP" 1>&6 # 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:1269: checking for X" >&5 +echo "configure:1267: checking for X" >&5 # Check whether --with-x or --without-x was given. if test "${with_x+set}" = set; then @@ -1327,12 +1325,12 @@ if test "$ac_x_includes" = NO; then # First, try using that file with no special directory specified. cat > conftest.$ac_ext <<EOF -#line 1331 "configure" +#line 1329 "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:1336: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1334: \"$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* @@ -1401,14 +1399,14 @@ if test "$ac_x_libraries" = NO; then ac_save_LIBS="$LIBS" LIBS="-l$x_direct_test_library $LIBS" cat > conftest.$ac_ext <<EOF -#line 1405 "configure" +#line 1403 "configure" #include "confdefs.h" int main() { ${x_direct_test_function}() ; return 0; } EOF -if { (eval echo configure:1412: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1410: \"$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. @@ -1514,17 +1512,17 @@ else 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:1518: checking whether -R must be followed by a space" >&5 +echo "configure:1516: 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 1521 "configure" +#line 1519 "configure" #include "confdefs.h" int main() { ; return 0; } EOF -if { (eval echo configure:1528: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1526: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_R_nospace=yes else @@ -1540,14 +1538,14 @@ rm -f conftest* else LIBS="$ac_xsave_LIBS -R $x_libraries" cat > conftest.$ac_ext <<EOF -#line 1544 "configure" +#line 1542 "configure" #include "confdefs.h" int main() { ; return 0; } EOF -if { (eval echo configure:1551: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1549: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_R_space=yes else @@ -1579,7 +1577,7 @@ rm -f conftest* # 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:1583: checking for dnet_ntoa in -ldnet" >&5 +echo "configure:1581: 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 @@ -1587,7 +1585,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldnet $LIBS" cat > conftest.$ac_ext <<EOF -#line 1591 "configure" +#line 1589 "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 @@ -1598,7 +1596,7 @@ int main() { dnet_ntoa() ; return 0; } EOF -if { (eval echo configure:1602: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1600: \"$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 @@ -1620,7 +1618,7 @@ 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:1624: checking for dnet_ntoa in -ldnet_stub" >&5 +echo "configure:1622: 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 @@ -1628,7 +1626,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldnet_stub $LIBS" cat > conftest.$ac_ext <<EOF -#line 1632 "configure" +#line 1630 "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 @@ -1639,7 +1637,7 @@ int main() { dnet_ntoa() ; return 0; } EOF -if { (eval echo configure:1643: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1641: \"$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 @@ -1668,12 +1666,12 @@ fi # 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:1672: checking for gethostbyname" >&5 +echo "configure:1670: 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 1677 "configure" +#line 1675 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char gethostbyname(); below. */ @@ -1682,7 +1680,6 @@ else /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char gethostbyname(); -char (*f)(); int main() { @@ -1692,12 +1689,12 @@ int main() { #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname) choke me #else -f = gethostbyname; +gethostbyname(); #endif ; return 0; } EOF -if { (eval echo configure:1701: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1698: \"$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 @@ -1718,7 +1715,7 @@ fi if test $ac_cv_func_gethostbyname = no; then echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6 -echo "configure:1722: checking for gethostbyname in -lnsl" >&5 +echo "configure:1719: 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 @@ -1726,7 +1723,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lnsl $LIBS" cat > conftest.$ac_ext <<EOF -#line 1730 "configure" +#line 1727 "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 @@ -1737,7 +1734,7 @@ int main() { gethostbyname() ; return 0; } EOF -if { (eval echo configure:1741: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1738: \"$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 @@ -1767,12 +1764,12 @@ fi # -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:1771: checking for connect" >&5 +echo "configure:1768: 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 1776 "configure" +#line 1773 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char connect(); below. */ @@ -1781,7 +1778,6 @@ else /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char connect(); -char (*f)(); int main() { @@ -1791,12 +1787,12 @@ int main() { #if defined (__stub_connect) || defined (__stub___connect) choke me #else -f = connect; +connect(); #endif ; return 0; } EOF -if { (eval echo configure:1800: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1796: \"$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 @@ -1817,7 +1813,7 @@ fi if test $ac_cv_func_connect = no; then echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6 -echo "configure:1821: checking for connect in -lsocket" >&5 +echo "configure:1817: 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 @@ -1825,7 +1821,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsocket $X_EXTRA_LIBS $LIBS" cat > conftest.$ac_ext <<EOF -#line 1829 "configure" +#line 1825 "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 @@ -1836,7 +1832,7 @@ int main() { connect() ; return 0; } EOF -if { (eval echo configure:1840: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1836: \"$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 @@ -1860,12 +1856,12 @@ 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:1864: checking for remove" >&5 +echo "configure:1860: 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 1869 "configure" +#line 1865 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char remove(); below. */ @@ -1874,7 +1870,6 @@ else /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char remove(); -char (*f)(); int main() { @@ -1884,12 +1879,12 @@ int main() { #if defined (__stub_remove) || defined (__stub___remove) choke me #else -f = remove; +remove(); #endif ; return 0; } EOF -if { (eval echo configure:1893: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1888: \"$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 @@ -1910,7 +1905,7 @@ fi if test $ac_cv_func_remove = no; then echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6 -echo "configure:1914: checking for remove in -lposix" >&5 +echo "configure:1909: 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 @@ -1918,7 +1913,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lposix $LIBS" cat > conftest.$ac_ext <<EOF -#line 1922 "configure" +#line 1917 "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 @@ -1929,7 +1924,7 @@ int main() { remove() ; return 0; } EOF -if { (eval echo configure:1933: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1928: \"$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 @@ -1953,12 +1948,12 @@ fi # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay. echo $ac_n "checking for shmat""... $ac_c" 1>&6 -echo "configure:1957: checking for shmat" >&5 +echo "configure:1952: 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 1962 "configure" +#line 1957 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char shmat(); below. */ @@ -1967,7 +1962,6 @@ else /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char shmat(); -char (*f)(); int main() { @@ -1977,12 +1971,12 @@ int main() { #if defined (__stub_shmat) || defined (__stub___shmat) choke me #else -f = shmat; +shmat(); #endif ; return 0; } EOF -if { (eval echo configure:1986: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1980: \"$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 @@ -2003,7 +1997,7 @@ fi if test $ac_cv_func_shmat = no; then echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6 -echo "configure:2007: checking for shmat in -lipc" >&5 +echo "configure:2001: 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 @@ -2011,7 +2005,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lipc $LIBS" cat > conftest.$ac_ext <<EOF -#line 2015 "configure" +#line 2009 "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 @@ -2022,7 +2016,7 @@ int main() { shmat() ; return 0; } EOF -if { (eval echo configure:2026: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2020: \"$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 @@ -2055,7 +2049,7 @@ fi # 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:2059: checking for IceConnectionNumber in -lICE" >&5 +echo "configure:2053: 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 @@ -2063,7 +2057,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lICE $X_EXTRA_LIBS $LIBS" cat > conftest.$ac_ext <<EOF -#line 2067 "configure" +#line 2061 "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 @@ -2074,7 +2068,7 @@ int main() { IceConnectionNumber() ; return 0; } EOF -if { (eval echo configure:2078: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2072: \"$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 @@ -2099,6 +2093,8 @@ fi fi +echo $ac_n "checking which drivers to compile""... $ac_c" 1>&6 +echo "configure:2098: checking which drivers to compile" >&5 # Check whether --with-drivers or --without-drivers was given. if test "${with_drivers+set}" = set; then withval="$with_drivers" @@ -2108,94 +2104,65 @@ else fi -if test "$drivers" = "all"; then -drivers=BeckmannEgle,CrystalFontz,HD44780,MatrixOrbital,PalmPilot,PNG,PPM,X11,Text -fi -RASTER=0 drivers=`echo $drivers|sed 's/,/ /g'` for driver in $drivers; do + + case $driver in + !*) + val="no" + driver=`echo $driver|cut -c 2-` + ;; + *) + val="yes" + ;; + esac + case "$driver" in + all) + BECKMANNEGLE="yes" + CRYSTALFONTZ="yes" + HD44780="yes" + MATRIXORBITAL="yes" + PALMPILOT="yes" + PNG="yes" + PPM="yes" + TEXT="yes" + X11="yes" + ;; BeckmannEgle) - DRIVERS="$DRIVERS BeckmannEgle.o" - cat >> confdefs.h <<\EOF -#define WITH_BECKMANNEGLE 1 -EOF - + BECKMANNEGLE=$val ;; CrystalFontz) - DRIVERS="$DRIVERS Crystalfontz.o" - cat >> confdefs.h <<\EOF -#define WITH_CRYSTALFONTZ 1 -EOF - + CRYSTALFONTZ=$val ;; HD44780) - DRIVERS="$DRIVERS HD44780.o" - cat >> confdefs.h <<\EOF -#define WITH_HD44780 1 -EOF - + HD44780=$val ;; MatrixOrbital) - DRIVERS="$DRIVERS MatrixOrbital.o" - cat >> confdefs.h <<\EOF -#define WITH_MATRIXORBITAL 1 -EOF - + MATRIXORBITAL=$val ;; PalmPilot) - DRIVERS="$DRIVERS PalmPilot.o" - cat >> confdefs.h <<\EOF -#define WITH_PALMPILOT 1 -EOF - + PALMPILOT=$val ;; PNG) - RASTER=$(($RASTER + 1)) - cat >> confdefs.h <<\EOF -#define WITH_PNG 1 -EOF - - DRVLIBS="$DRVLIBS -lgd -lpng -lz" + PNG=$val ;; PPM) - RASTER=$(($RASTER + 1)) - cat >> confdefs.h <<\EOF -#define WITH_PPM 1 -EOF - + PPM=$val ;; SIN) - DRIVERS="$DRIVERS SIN.o" - cat >> confdefs.h <<\EOF -#define WITH_SIN 1 -EOF - + SIN=$val ;; Skeleton) - DRIVERS="$DRIVERS Skeleton.o" - cat >> confdefs.h <<\EOF -#define WITH_Skeleton 1 -EOF - - ;; - X11) - DRIVERS="$DRIVERS XWindow.o" - DRVLIBS="$DRVLIBS -lX11" - cat >> confdefs.h <<\EOF -#define WITH_X11 1 -EOF - + SKELETON=$val ;; Text) - DRIVERS="$DRIVERS Text.o" - DRVLIBS="$DRVLIBS -lncurses" - cat >> confdefs.h <<\EOF -#define WITH_Text 1 -EOF - + TEXT=$val + ;; + X11) + X11=$val ;; *) { echo "configure: error: Unknown driver '$driver'" 1>&2; exit 1; } @@ -2203,113 +2170,123 @@ EOF esac done +echo "$ac_t""done" 1>&6 -# Check whether --with-notdrivers or --without-notdrivers was given. -if test "${with_notdrivers+set}" = set; then - withval="$with_notdrivers" - notdrivers=$withval -else - notdrivers="no" +RASTER="no" + +if test "$BECKMANNEGLE" = "yes"; then + DRIVERS="$DRIVERS BeckmannEgle.o" + cat >> confdefs.h <<\EOF +#define WITH_BECKMANNEGLE 1 +EOF fi +if test "$CRYSTALFONTZ" = "yes"; then + DRIVERS="$DRIVERS Crystalfontz.o" + cat >> confdefs.h <<\EOF +#define WITH_CRYSTALFONTZ 1 +EOF +fi +if test "$HD44780" = "yes"; then + DRIVERS="$DRIVERS HD44780.o" + cat >> confdefs.h <<\EOF +#define WITH_HD44780 1 +EOF -notdrivers=`echo $notdrivers|sed 's/,/ /g'` -for driver in $notdrivers; do - case "$driver" in - BeckmannEgle) - DRIVERS=${DRIVERS/ BeckmannEgle.o/} - mv confdefs.h confdefs.h~ -grep -v WITH_BECKMANNEGLE < confdefs.h~ > confdefs.h +fi - ;; - CrystalFontz) - DRIVERS=${DRIVERS/ Crystalfontz.o/} - mv confdefs.h confdefs.h~ -grep -v WITH_CRYSTALFONTZ < confdefs.h~ > confdefs.h +if test "$MATRIXORBITAL" = "yes"; then + DRIVERS="$DRIVERS MatrixOrbital.o" + cat >> confdefs.h <<\EOF +#define WITH_MATRIXORBITAL 1 +EOF - ;; - HD44780) - DRIVERS=${DRIVERS/ HD44780.o/} - mv confdefs.h confdefs.h~ -grep -v WITH_HD44780 < confdefs.h~ > confdefs.h +fi - ;; - MatrixOrbital) - DRIVERS=${DRIVERS/ MatrixOrbital/} - mv confdefs.h confdefs.h~ -grep -v WITH_MATRIXORBITAL < confdefs.h~ > confdefs.h +if test "$PALMPILOT" = "yes"; then + DRIVERS="$DRIVERS PalmPilot.o" + cat >> confdefs.h <<\EOF +#define WITH_PALMPILOT 1 +EOF - ;; - PalmPilot) - DRIVERS=${DRIVERS/ PalmPilot/} - mv confdefs.h confdefs.h~ -grep -v WITH_PALMPILOT < confdefs.h~ > confdefs.h +fi - ;; - PNG) - RASTER=$(($RASTER - 1)) - mv confdefs.h confdefs.h~ -grep -v WITH_PNG < confdefs.h~ > confdefs.h +if test "$PNG" = "yes"; then + RASTER="yes" + cat >> confdefs.h <<\EOF +#define WITH_PNG 1 +EOF - DRVLIBS=${DRVLIBS/ -lgd -lpng -lz/} - ;; - PPM) - RASTER=$(($RASTER - 1)) - mv confdefs.h confdefs.h~ -grep -v WITH_PPM < confdefs.h~ > confdefs.h + DRVLIBS="$DRVLIBS -lgd -lpng -lz" +fi - ;; - SIN) - DRIVERS=${DRIVERS/ SIN.o/} - mv confdefs.h confdefs.h~ -grep -v WITH_SIN < confdefs.h~ > confdefs.h +if test "$PPM" = "yes"; then + RASTER="yes" + cat >> confdefs.h <<\EOF +#define WITH_PPM 1 +EOF - ;; - Skeleton) - DRIVERS=${DRIVERS/ Skeleton.o/} - mv confdefs.h confdefs.h~ -grep -v WITH_Skeleton < confdefs.h~ > confdefs.h +fi - ;; - X11) - DRIVERS=${DRIVERS/ XWindow.o/} - DRVLIBS=${DRVLIBS/ -lX11/} - mv confdefs.h confdefs.h~ -grep -v WITH_X11 < confdefs.h~ > confdefs.h +if test "$SIN" = "yes"; then + DRIVERS="$DRIVERS SIN.o" + cat >> confdefs.h <<\EOF +#define WITH_SIN 1 +EOF - ;; - Text) - DRIVERS=${DRIVERS/ Text.o/} - DRVLIBS=${DRVLIBS/ -lncurses/} - mv confdefs.h confdefs.h~ -grep -v WITH_Text < confdefs.h~ > confdefs.h +fi - ;; - no) - ;; - *) - { echo "configure: error: Unknown driver '$driver'" 1>&2; exit 1; } - ;; - esac -done +if test "$SKELETON" = "yes"; then + DRIVERS="$DRIVERS Skeleton.o" + cat >> confdefs.h <<\EOF +#define WITH_SKELETON 1 +EOF + +fi + +if test "$TEXT" = "yes"; then + DRIVERS="$DRIVERS Text.o" + DRVLIBS="$DRVLIBS -lncurses" + cat >> confdefs.h <<\EOF +#define WITH_TEXT 1 +EOF + +fi + +if test "$X11" = "yes"; then + if test "$no_x" = "yes"; then + { echo "configure: error: cannot build X11 driver: headers or libraries not available" 1>&2; exit 1; } + fi + DRIVERS="$DRIVERS XWindow.o" + DRVLIBS="$DRVLIBS -lX11" + cat >> confdefs.h <<\EOF +#define WITH_X11 1 +EOF -test $RASTER -gt 0 && RASTERDRIVER="Raster.o" +fi + +if test "$RASTER" = "yes"; then + DRIVERS="$DRIVERS Raster.o" +fi -DRIVERS="$DRIVERS $RASTERDRIVER" +if test "$DRVLIBS" = ""; then + { echo "configure: error: You should include at least one driver..." 1>&2; exit 1; } +fi + echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:2308: checking for ANSI C header files" >&5 +echo "configure:2285: 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 2313 "configure" +#line 2290 "configure" #include "confdefs.h" #include <stdlib.h> #include <stdarg.h> @@ -2317,7 +2294,7 @@ else #include <float.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2321: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2298: \"$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* @@ -2334,7 +2311,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 2338 "configure" +#line 2315 "configure" #include "confdefs.h" #include <string.h> EOF @@ -2352,7 +2329,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 2356 "configure" +#line 2333 "configure" #include "confdefs.h" #include <stdlib.h> EOF @@ -2373,7 +2350,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext <<EOF -#line 2377 "configure" +#line 2354 "configure" #include "confdefs.h" #include <ctype.h> #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -2384,7 +2361,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:2388: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2365: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -2412,12 +2389,12 @@ for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6 -echo "configure:2416: checking for $ac_hdr that defines DIR" >&5 +echo "configure:2393: checking for $ac_hdr that defines DIR" >&5 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 2421 "configure" +#line 2398 "configure" #include "confdefs.h" #include <sys/types.h> #include <$ac_hdr> @@ -2425,7 +2402,7 @@ int main() { DIR *dirp = 0; ; return 0; } EOF -if { (eval echo configure:2429: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2406: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_header_dirent_$ac_safe=yes" else @@ -2450,7 +2427,7 @@ done # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. if test $ac_header_dirent = dirent.h; then echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6 -echo "configure:2454: checking for opendir in -ldir" >&5 +echo "configure:2431: checking for opendir in -ldir" >&5 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2458,7 +2435,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldir $LIBS" cat > conftest.$ac_ext <<EOF -#line 2462 "configure" +#line 2439 "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 @@ -2469,7 +2446,7 @@ int main() { opendir() ; return 0; } EOF -if { (eval echo configure:2473: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2450: \"$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 @@ -2491,7 +2468,7 @@ fi else echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 -echo "configure:2495: checking for opendir in -lx" >&5 +echo "configure:2472: checking for opendir in -lx" >&5 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2499,7 +2476,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lx $LIBS" cat > conftest.$ac_ext <<EOF -#line 2503 "configure" +#line 2480 "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 @@ -2510,7 +2487,7 @@ int main() { opendir() ; return 0; } EOF -if { (eval echo configure:2514: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2491: \"$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 @@ -2533,12 +2510,12 @@ fi fi echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6 -echo "configure:2537: checking for sys/wait.h that is POSIX.1 compatible" >&5 +echo "configure:2514: 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 else cat > conftest.$ac_ext <<EOF -#line 2542 "configure" +#line 2519 "configure" #include "confdefs.h" #include <sys/types.h> #include <sys/wait.h> @@ -2554,7 +2531,7 @@ wait (&s); s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; ; return 0; } EOF -if { (eval echo configure:2558: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2535: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_sys_wait_h=yes else @@ -2578,17 +2555,17 @@ for ac_hdr in fcntl.h limits.h strings.h sys/ioctl.h sys/time.h syslog.h unistd. do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2582: checking for $ac_hdr" >&5 +echo "configure:2559: 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 2587 "configure" +#line 2564 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2592: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2569: \"$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* @@ -2618,17 +2595,17 @@ for ac_hdr in sys/io.h asm/io.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2622: checking for $ac_hdr" >&5 +echo "configure:2599: 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 2627 "configure" +#line 2604 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2632: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2609: \"$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* @@ -2658,17 +2635,17 @@ for ac_hdr in gd/gd.h gd.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2662: checking for $ac_hdr" >&5 +echo "configure:2639: 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 2667 "configure" +#line 2644 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2672: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2649: \"$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* @@ -2698,17 +2675,17 @@ for ac_hdr in net/if_ppp.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2702: checking for $ac_hdr" >&5 +echo "configure:2679: 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 2707 "configure" +#line 2684 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2712: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2689: \"$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* @@ -2736,12 +2713,12 @@ done echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:2740: checking for working const" >&5 +echo "configure:2717: 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 <<EOF -#line 2745 "configure" +#line 2722 "configure" #include "confdefs.h" int main() { @@ -2790,7 +2767,7 @@ ccp = (char const *const *) p; ; return 0; } EOF -if { (eval echo configure:2794: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2771: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -2811,21 +2788,21 @@ EOF fi echo $ac_n "checking for inline""... $ac_c" 1>&6 -echo "configure:2815: checking for inline" >&5 +echo "configure:2792: checking for inline" >&5 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat > conftest.$ac_ext <<EOF -#line 2822 "configure" +#line 2799 "configure" #include "confdefs.h" int main() { } $ac_kw foo() { ; return 0; } EOF -if { (eval echo configure:2829: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2806: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_inline=$ac_kw; break else @@ -2851,12 +2828,12 @@ EOF esac echo $ac_n "checking for pid_t""... $ac_c" 1>&6 -echo "configure:2855: checking for pid_t" >&5 +echo "configure:2832: 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 else cat > conftest.$ac_ext <<EOF -#line 2860 "configure" +#line 2837 "configure" #include "confdefs.h" #include <sys/types.h> #if STDC_HEADERS @@ -2884,12 +2861,12 @@ EOF fi echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:2888: checking for size_t" >&5 +echo "configure:2865: 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 <<EOF -#line 2893 "configure" +#line 2870 "configure" #include "confdefs.h" #include <sys/types.h> #if STDC_HEADERS @@ -2917,12 +2894,12 @@ EOF fi echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 -echo "configure:2921: checking whether time.h and sys/time.h may both be included" >&5 +echo "configure:2898: 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 2926 "configure" +#line 2903 "configure" #include "confdefs.h" #include <sys/types.h> #include <sys/time.h> @@ -2931,7 +2908,7 @@ int main() { struct tm *tp; ; return 0; } EOF -if { (eval echo configure:2935: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2912: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else @@ -2952,12 +2929,12 @@ EOF fi echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6 -echo "configure:2956: checking whether struct tm is in sys/time.h or time.h" >&5 +echo "configure:2933: 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 else cat > conftest.$ac_ext <<EOF -#line 2961 "configure" +#line 2938 "configure" #include "confdefs.h" #include <sys/types.h> #include <time.h> @@ -2965,7 +2942,7 @@ int main() { struct tm *tp; tp->tm_sec; ; return 0; } EOF -if { (eval echo configure:2969: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2946: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_tm=time.h else @@ -2986,12 +2963,12 @@ EOF fi echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:2990: checking for uid_t in sys/types.h" >&5 +echo "configure:2967: checking for uid_t in sys/types.h" >&5 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 2995 "configure" +#line 2972 "configure" #include "confdefs.h" #include <sys/types.h> EOF @@ -3022,13 +2999,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:3026: checking whether ${CC-cc} needs -traditional" >&5 +echo "configure:3003: 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 3032 "configure" +#line 3009 "configure" #include "confdefs.h" #include <sgtty.h> Autoconf TIOCGETP @@ -3046,7 +3023,7 @@ rm -f conftest* if test $ac_cv_prog_gcc_traditional = no; then cat > conftest.$ac_ext <<EOF -#line 3050 "configure" +#line 3027 "configure" #include "confdefs.h" #include <termio.h> Autoconf TCGETA @@ -3068,7 +3045,7 @@ echo "$ac_t""$ac_cv_prog_gcc_traditional" 1>&6 fi echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6 -echo "configure:3072: checking for 8-bit clean memcmp" >&5 +echo "configure:3049: checking for 8-bit clean memcmp" >&5 if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3076,7 +3053,7 @@ else ac_cv_func_memcmp_clean=no else cat > conftest.$ac_ext <<EOF -#line 3080 "configure" +#line 3057 "configure" #include "confdefs.h" main() @@ -3086,7 +3063,7 @@ main() } EOF -if { (eval echo configure:3090: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3067: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_func_memcmp_clean=yes else @@ -3104,12 +3081,12 @@ echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}" echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 -echo "configure:3108: checking return type of signal handlers" >&5 +echo "configure:3085: 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 3113 "configure" +#line 3090 "configure" #include "confdefs.h" #include <sys/types.h> #include <signal.h> @@ -3126,7 +3103,7 @@ int main() { int i; ; return 0; } EOF -if { (eval echo configure:3130: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3107: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_signal=void else @@ -3144,15 +3121,15 @@ cat >> confdefs.h <<EOF EOF -for ac_func in gettimeofday select socket strdup strerror strstr strtol uname +for ac_func in gettimeofday putenv select socket strdup strerror strstr strtol uname do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3151: checking for $ac_func" >&5 +echo "configure:3128: 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 3156 "configure" +#line 3133 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -3161,7 +3138,6 @@ else /* 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(); -char (*f)(); int main() { @@ -3171,12 +3147,12 @@ int main() { #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -f = $ac_func; +$ac_func(); #endif ; return 0; } EOF -if { (eval echo configure:3180: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3156: \"$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 @@ -3264,19 +3240,7 @@ 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 - +DEFS=-DHAVE_CONFIG_H # Without the "./", some shells look in PATH for config.status. : ${CONFIG_STATUS=./config.status} @@ -3303,7 +3267,7 @@ do 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.14" + echo "$CONFIG_STATUS generated by autoconf version 2.13" exit 0 ;; -help | --help | --hel | --he | --h) echo "\$ac_cs_usage"; exit 0 ;; @@ -3314,7 +3278,7 @@ done ac_given_srcdir=$srcdir ac_given_INSTALL="$INSTALL" -trap 'rm -fr `echo "Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 +trap 'rm -fr `echo "Makefile config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 EOF cat >> $CONFIG_STATUS <<EOF @@ -3468,11 +3432,120 @@ s%@INSTALL@%$INSTALL%g fi; done rm -f conftest.s* +# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where +# NAME is the cpp macro being defined and VALUE is the value it is being given. +# +# ac_d sets the value in "#define NAME VALUE" lines. +ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)' +ac_dB='\([ ][ ]*\)[^ ]*%\1#\2' +ac_dC='\3' +ac_dD='%g' +# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE". +ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' +ac_uB='\([ ]\)%\1#\2define\3' +ac_uC=' ' +ac_uD='\4%g' +# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE". +ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' +ac_eB='$%\1#\2define\3' +ac_eC=' ' +ac_eD='%g' + +if test "${CONFIG_HEADERS+set}" != set; then EOF cat >> $CONFIG_STATUS <<EOF + CONFIG_HEADERS="config.h" +EOF +cat >> $CONFIG_STATUS <<\EOF +fi +for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then + # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". + case "$ac_file" in + *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` + ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; + *) ac_file_in="${ac_file}.in" ;; + esac + + echo creating $ac_file + + rm -f conftest.frag conftest.in conftest.out + ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` + cat $ac_file_inputs > conftest.in + +EOF + +# Transform confdefs.h into a sed script conftest.vals that substitutes +# the proper values into config.h.in to produce config.h. And first: +# Protect against being on the right side of a sed subst in config.status. +# Protect against being in an unquoted here document in config.status. +rm -f conftest.vals +cat > conftest.hdr <<\EOF +s/[\\&%]/\\&/g +s%[\\$`]%\\&%g +s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp +s%ac_d%ac_u%gp +s%ac_u%ac_e%gp +EOF +sed -n -f conftest.hdr confdefs.h > conftest.vals +rm -f conftest.hdr + +# This sed command replaces #undef with comments. This is necessary, for +# example, in the case of _POSIX_SOURCE, which is predefined and required +# on some systems where configure will not decide to define it. +cat >> conftest.vals <<\EOF +s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */% +EOF + +# Break up conftest.vals because some shells have a limit on +# the size of here documents, and old seds have small limits too. + +rm -f conftest.tail +while : +do + ac_lines=`grep -c . conftest.vals` + # grep -c gives empty output for an empty file on some AIX systems. + if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi + # Write a limited-size here document to conftest.frag. + echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS + sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS + echo 'CEOF + sed -f conftest.frag conftest.in > conftest.out + rm -f conftest.in + mv conftest.out conftest.in +' >> $CONFIG_STATUS + sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail + rm -f conftest.vals + mv conftest.tail conftest.vals +done +rm -f conftest.vals + +cat >> $CONFIG_STATUS <<\EOF + rm -f conftest.frag conftest.h + echo "/* $ac_file. Generated automatically by configure. */" > conftest.h + cat conftest.in >> conftest.h + rm -f conftest.in + if cmp -s $ac_file conftest.h 2>/dev/null; then + echo "$ac_file is unchanged" + rm -f conftest.h + else + # Remove last slash and all that follows it. Not all systems have dirname. + ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` + if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then + # The file is in a subdirectory. + test ! -d "$ac_dir" && mkdir "$ac_dir" + fi + rm -f $ac_file + mv conftest.h $ac_file + fi +fi; done + +EOF +cat >> $CONFIG_STATUS <<EOF + EOF cat >> $CONFIG_STATUS <<\EOF +test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h exit 0 EOF diff --git a/configure.in b/configure.in index 544f83d..6b028b8 100644 --- a/configure.in +++ b/configure.in @@ -1,6 +1,7 @@ dnl Process this file with autoconf to produce a configure script. AC_INIT(lcd4linux.c) AM_INIT_AUTOMAKE(lcd4linux, 0.98) +AM_CONFIG_HEADER(config.h) dnl Checks for programs. AC_PROG_AWK @@ -15,149 +16,79 @@ dnl Checks for X11 AC_PATH_XTRA dnl drivers +AC_MSG_CHECKING([which drivers to compile]) AC_ARG_WITH( drivers, [ --with-drivers=<list> compile driver for displays in <list>,] [ drivers may be separated with commas,] - [ 'all' (default) compiles all available drivers.] + [ 'all' (default) compiles all available drivers,] + [ drivers may be excluded with 'all,!<driver>',] + [ (try 'all,\!<driver>' if your shell complains...)] [ possible drivers are:] [ BeckmannEgle, CrystalFontz, HD44780,] [ MatrixOrbital, PalmPilot, PNG, PPM, X11, Text], drivers=$withval, drivers=all ) -if test "$drivers" = "all"; then -drivers=[BeckmannEgle,CrystalFontz,HD44780,MatrixOrbital,PalmPilot,PNG,PPM,X11,Text] -fi -RASTER=0 drivers=`echo $drivers|sed 's/,/ /g'` for driver in $drivers; do - case "$driver" in - BeckmannEgle) - DRIVERS="$DRIVERS BeckmannEgle.o" - AC_DEFINE(WITH_BECKMANNEGLE) - ;; - CrystalFontz) - DRIVERS="$DRIVERS Crystalfontz.o" - AC_DEFINE(WITH_CRYSTALFONTZ) - ;; - HD44780) - DRIVERS="$DRIVERS HD44780.o" - AC_DEFINE(WITH_HD44780) - ;; - MatrixOrbital) - DRIVERS="$DRIVERS MatrixOrbital.o" - AC_DEFINE(WITH_MATRIXORBITAL) - ;; - PalmPilot) - DRIVERS="$DRIVERS PalmPilot.o" - AC_DEFINE(WITH_PALMPILOT) - ;; - PNG) - RASTER=$(($RASTER + 1)) - AC_DEFINE(WITH_PNG) - DRVLIBS="$DRVLIBS -lgd -lpng -lz" - ;; - PPM) - RASTER=$(($RASTER + 1)) - AC_DEFINE(WITH_PPM) - ;; - SIN) - DRIVERS="$DRIVERS SIN.o" - AC_DEFINE(WITH_SIN) - ;; - Skeleton) - DRIVERS="$DRIVERS Skeleton.o" - AC_DEFINE(WITH_Skeleton) - ;; - X11) - DRIVERS="$DRIVERS XWindow.o" - DRVLIBS="$DRVLIBS -lX11" - AC_DEFINE(WITH_X11) - ;; - Text) - DRIVERS="$DRIVERS Text.o" - DRVLIBS="$DRVLIBS -lncurses" - AC_DEFINE(WITH_Text) + + case $driver in + !*) + val="no" + driver=`echo $driver|cut -c 2-` ;; - *) - AC_MSG_ERROR([Unknown driver '$driver']) + *) + val="yes" ;; esac -done - -dnl delete drivers, mainly if all wa chosen above - -AC_ARG_WITH( - notdrivers, - [ --with-notdrivers=<list> do not compile driver for displays in <list>,] - [ drivers may be separated with commas,] - [ mainly useful if above all drivers were selected.] - [ possible drivers are:] - [ BeckmannEgle, CrystalFontz, HD44780,] - [ MatrixOrbital, PalmPilot, PNG, PPM, X11, Text], - notdrivers=$withval, - notdrivers="no" -) - -AC_DEFUN(AC_UNDEFINE, -mv confdefs.h confdefs.h~ -grep -v $1 < confdefs.h~ > confdefs.h -) - -notdrivers=`echo $notdrivers|sed 's/,/ /g'` -for driver in $notdrivers; do + case "$driver" in + all) + BECKMANNEGLE="yes" + CRYSTALFONTZ="yes" + HD44780="yes" + MATRIXORBITAL="yes" + PALMPILOT="yes" + PNG="yes" + PPM="yes" + TEXT="yes" + X11="yes" + ;; BeckmannEgle) - DRIVERS=${DRIVERS/ BeckmannEgle.o/} - AC_UNDEFINE(WITH_BECKMANNEGLE) + BECKMANNEGLE=$val ;; CrystalFontz) - DRIVERS=${DRIVERS/ Crystalfontz.o/} - AC_UNDEFINE(WITH_CRYSTALFONTZ) + CRYSTALFONTZ=$val ;; HD44780) - DRIVERS=${DRIVERS/ HD44780.o/} - AC_UNDEFINE(WITH_HD44780) + HD44780=$val ;; MatrixOrbital) - DRIVERS=${DRIVERS/ MatrixOrbital/} - AC_UNDEFINE(WITH_MATRIXORBITAL) + MATRIXORBITAL=$val ;; PalmPilot) - DRIVERS=${DRIVERS/ PalmPilot/} - AC_UNDEFINE(WITH_PALMPILOT) + PALMPILOT=$val ;; PNG) - RASTER=$(($RASTER - 1)) - AC_UNDEFINE(WITH_PNG) - DRVLIBS=${DRVLIBS/ -lgd -lpng -lz/} + PNG=$val ;; PPM) - RASTER=$(($RASTER - 1)) - AC_UNDEFINE(WITH_PPM) + PPM=$val ;; SIN) - DRIVERS=${DRIVERS/ SIN.o/} - AC_UNDEFINE(WITH_SIN) + SIN=$val ;; Skeleton) - DRIVERS=${DRIVERS/ Skeleton.o/} - AC_UNDEFINE(WITH_Skeleton) - ;; - X11) - DRIVERS=${DRIVERS/ XWindow.o/} - DRVLIBS=${DRVLIBS/ -lX11/} - AC_UNDEFINE(WITH_X11) + SKELETON=$val ;; Text) - DRIVERS=${DRIVERS/ Text.o/} - DRVLIBS=${DRVLIBS/ -lncurses/} - AC_UNDEFINE(WITH_Text) + TEXT=$val ;; - no) + X11) + X11=$val ;; *) AC_MSG_ERROR([Unknown driver '$driver']) @@ -165,10 +96,81 @@ for driver in $notdrivers; do esac done -test $RASTER -gt 0 && RASTERDRIVER="Raster.o" +AC_MSG_RESULT([done]) + +RASTER="no" + +if test "$BECKMANNEGLE" = "yes"; then + DRIVERS="$DRIVERS BeckmannEgle.o" + AC_DEFINE(WITH_BECKMANNEGLE) +fi + +if test "$CRYSTALFONTZ" = "yes"; then + DRIVERS="$DRIVERS Crystalfontz.o" + AC_DEFINE(WITH_CRYSTALFONTZ) +fi + +if test "$HD44780" = "yes"; then + DRIVERS="$DRIVERS HD44780.o" + AC_DEFINE(WITH_HD44780) +fi + +if test "$MATRIXORBITAL" = "yes"; then + DRIVERS="$DRIVERS MatrixOrbital.o" + AC_DEFINE(WITH_MATRIXORBITAL) +fi + +if test "$PALMPILOT" = "yes"; then + DRIVERS="$DRIVERS PalmPilot.o" + AC_DEFINE(WITH_PALMPILOT) +fi -DRIVERS="$DRIVERS $RASTERDRIVER" +if test "$PNG" = "yes"; then + RASTER="yes" + AC_DEFINE(WITH_PNG) + DRVLIBS="$DRVLIBS -lgd -lpng -lz" +fi + +if test "$PPM" = "yes"; then + RASTER="yes" + AC_DEFINE(WITH_PPM) +fi + +if test "$SIN" = "yes"; then + DRIVERS="$DRIVERS SIN.o" + AC_DEFINE(WITH_SIN) +fi + +if test "$SKELETON" = "yes"; then + DRIVERS="$DRIVERS Skeleton.o" + AC_DEFINE(WITH_SKELETON) +fi +if test "$TEXT" = "yes"; then + DRIVERS="$DRIVERS Text.o" + DRVLIBS="$DRVLIBS -lncurses" + AC_DEFINE(WITH_TEXT) +fi + +if test "$X11" = "yes"; then + if test "$no_x" = "yes"; then + AC_MSG_ERROR([cannot build X11 driver: headers or libraries not available]) + fi + DRIVERS="$DRIVERS XWindow.o" + DRVLIBS="$DRVLIBS -lX11" + AC_DEFINE(WITH_X11) +fi + +dnl Raster.o depends on PPM or PNG +if test "$RASTER" = "yes"; then + DRIVERS="$DRIVERS Raster.o" +fi + + +if test "$DRVLIBS" = ""; then + AC_MSG_ERROR([You should include at least one driver...]) +fi + AC_SUBST(DRIVERS) AC_SUBST(DRVLIBS) @@ -194,6 +196,6 @@ dnl Checks for library functions. AC_PROG_GCC_TRADITIONAL AC_FUNC_MEMCMP AC_TYPE_SIGNAL -AC_CHECK_FUNCS(gettimeofday select socket strdup strerror strstr strtol uname) +AC_CHECK_FUNCS(gettimeofday putenv select socket strdup strerror strstr strtol uname) AC_OUTPUT(Makefile) @@ -1,4 +1,4 @@ -/* $Id: debug.c,v 1.2 2001/03/09 13:08:11 ltoetsch Exp $ +/* $Id: debug.c,v 1.3 2001/03/12 12:39:36 reinelt Exp $ * * debug() and error() functions * @@ -20,6 +20,10 @@ * * * $Log: debug.c,v $ + * Revision 1.3 2001/03/12 12:39:36 reinelt + * + * reworked autoconf a lot: drivers may be excluded, #define's went to config.h + * * Revision 1.2 2001/03/09 13:08:11 ltoetsch * Added Text driver * @@ -42,6 +46,7 @@ * */ +#include "config.h" #include <stdlib.h> #include <stdio.h> @@ -65,7 +70,7 @@ void message (int level, const char *format, ...) va_end(ap); if (foreground) { -#ifdef WITH_Text +#ifdef WITH_TEXT extern int curs_err(char *); if (!curs_err(buffer)) #endif @@ -1,4 +1,4 @@ -/* $Id: display.c,v 1.25 2001/03/09 13:08:11 ltoetsch Exp $ +/* $Id: display.c,v 1.26 2001/03/12 12:39:36 reinelt Exp $ * * framework for device drivers * @@ -20,6 +20,10 @@ * * * $Log: display.c,v $ + * Revision 1.26 2001/03/12 12:39:36 reinelt + * + * reworked autoconf a lot: drivers may be excluded, #define's went to config.h + * * Revision 1.25 2001/03/09 13:08:11 ltoetsch * Added Text driver * @@ -161,11 +165,12 @@ * de-initializes the driver */ +#include "config.h" + #include <stdlib.h> #include <stdio.h> #include <math.h> - #include "debug.h" #include "cfg.h" #include "display.h" diff --git a/lcd4linux.c b/lcd4linux.c index c60a04e..6a3bca5 100644 --- a/lcd4linux.c +++ b/lcd4linux.c @@ -1,4 +1,4 @@ -/* $Id: lcd4linux.c,v 1.30 2001/03/08 15:25:38 ltoetsch Exp $ +/* $Id: lcd4linux.c,v 1.31 2001/03/12 12:39:36 reinelt Exp $ * * LCD4Linux * @@ -20,6 +20,10 @@ * * * $Log: lcd4linux.c,v $ + * Revision 1.31 2001/03/12 12:39:36 reinelt + * + * reworked autoconf a lot: drivers may be excluded, #define's went to config.h + * * Revision 1.30 2001/03/08 15:25:38 ltoetsch * improved exec * @@ -166,6 +170,8 @@ * */ +#include "config.h" + #include <stdlib.h> #include <stdio.h> #include <string.h> @@ -234,6 +240,7 @@ int hello (void) return flag; } +#ifdef USE_OLD_UDELAY void calibrate (void) { int i; @@ -249,6 +256,7 @@ void calibrate (void) } printf (" Delay=%ld\n", max); } +#endif void handler (int signal) { @@ -270,7 +278,11 @@ int main (int argc, char *argv[]) } my_argv[c]=NULL; +#ifdef USE_OLD_UDELAY + while ((c=getopt (argc, argv, "c:dFf:hlo:qv"))!=EOF) { +#else while ((c=getopt (argc, argv, "c:dFf:hlo:qv"))!=EOF) { +#endif switch (c) { case 'c': if (cfg_cmd (optarg)<0) { @@ -279,8 +291,13 @@ int main (int argc, char *argv[]) } break; case 'd': +#ifdef USE_OLD_UDELAY calibrate(); exit(0); +#else + fprintf (stderr, "delay calibration no longer supported!\n"); + exit(1); +#endif case 'F': foreground++; break; @@ -1,4 +1,4 @@ -/* $Id: system.c,v 1.21 2001/03/09 12:14:24 reinelt Exp $ +/* $Id: system.c,v 1.22 2001/03/12 12:39:36 reinelt Exp $ * * system status retreivement * @@ -20,6 +20,10 @@ * * * $Log: system.c,v $ + * Revision 1.22 2001/03/12 12:39:36 reinelt + * + * reworked autoconf a lot: drivers may be excluded, #define's went to config.h + * * Revision 1.21 2001/03/09 12:14:24 reinelt * * minor cleanups @@ -171,6 +175,8 @@ * */ +#include "config.h" + #include <stdlib.h> #include <stdio.h> #include <fcntl.h> @@ -1,4 +1,4 @@ -/* $Id: udelay.c,v 1.3 2001/03/01 22:33:50 reinelt Exp $ +/* $Id: udelay.c,v 1.4 2001/03/12 12:39:36 reinelt Exp $ * * short delays * @@ -20,6 +20,10 @@ * * * $Log: udelay.c,v $ + * Revision 1.4 2001/03/12 12:39:36 reinelt + * + * reworked autoconf a lot: drivers may be excluded, #define's went to config.h + * * Revision 1.3 2001/03/01 22:33:50 reinelt * * renamed Raster_flush() to PPM_flush() @@ -57,10 +61,18 @@ #include <stdlib.h> #include <stdio.h> + +#ifdef USE_OLD_UDELAY #include <time.h> +#else +#include <sys/time.h> +#include <unistd.h> +#endif #include "udelay.h" +#ifdef USE_OLD_UDELAY + unsigned long loops_per_usec; void udelay (unsigned long usec) @@ -104,3 +116,23 @@ void udelay_calibrate (void) loops_per_usec&=~bit; } } + +#else + +void udelay (unsigned long usec) +{ + struct timeval now, end; + + gettimeofday (&end, NULL); + end.tv_usec+=usec; + while (end.tv_usec>1000000) { + end.tv_usec-=1000000; + end.tv_sec++; + } + + do { + gettimeofday(&now, NULL); + } while (now.tv_sec==end.tv_sec?now.tv_usec<end.tv_usec:now.tv_sec<end.tv_sec); +} + +#endif @@ -1,4 +1,4 @@ -/* $Id: udelay.h,v 1.1 2000/04/15 16:56:52 reinelt Exp $ +/* $Id: udelay.h,v 1.2 2001/03/12 12:39:36 reinelt Exp $ * * short delays * @@ -20,22 +20,33 @@ * * * $Log: udelay.h,v $ + * Revision 1.2 2001/03/12 12:39:36 reinelt + * + * reworked autoconf a lot: drivers may be excluded, #define's went to config.h + * * Revision 1.1 2000/04/15 16:56:52 reinelt * * moved delay loops to udelay.c * renamed -d (debugging) switch to -v (verbose) * new switch -d to calibrate delay loop * 'Delay' entry for HD44780 back again - * delay loops will not calibrate automatically, because this will fail with hich CPU load + * delay loops will not calibrate automatically, because this will fail with high CPU load * */ #ifndef _UDELAY_H_ #define _UDELAY_H_ +#ifdef USE_OLD_UDELAY + extern unsigned long loops_per_usec; void udelay (unsigned long usec); void udelay_calibrate (void); +#else + +void udelay (unsigned long usec); + +#endif #endif |