imwheel-1.0.0pre12.orig/0000755000175000017500000000000010114331042015202 5ustar chrischris00000000000000imwheel-1.0.0pre12.orig/jax/0000755000175000017500000000000010114331042015764 5ustar chrischris00000000000000imwheel-1.0.0pre12.orig/jax/jax.c0000644000175000017500000002002610061736136016730 0ustar chrischris00000000000000#include #include "jax.h" /*****************************************************************************/ /* Option Handling */ /*****************************************************************************/ int JAXusage(Jax *jax, char *prog_name, char *usage) { int j; fprintf(stderr,"%s",prog_name); for(j=0;jnum_options;j++) { if(*jax->options[j].str) fprintf(stderr," [%s|%s <%s>]",jax->options[j].name1,jax->options[j].name2,*jax->options[j].str); else fprintf(stderr," [%s|%s]",jax->options[j].name1,jax->options[j].name2); fflush(stderr); } fprintf(stderr," %s\n",usage); return jax->num_options; } int JAXshiftopts(int base, int shift, int *argc, char **argv) { int i; for(i=base+shift;i<(*argc);i++) { argv[i-shift]=argv[i]; } (*argc)=(*argc)-shift; return(1); } int JAXgetopts(Jax *jax, int *argc, char **argv) { int i,j,c=0; if(!argc || !argv) return(-1); jax->dname=NULL; for (i=1;i<(*argc);i++) { for(j=0;jnum_options && i<(*argc);j++) { if ((jax->options[j].name1 && !strcmp(jax->options[j].name1, argv[i])) || (jax->options[j].name2 && !strcmp(jax->options[j].name2, argv[i]))) { c++; if((int)(*jax->options[j].str)>1) { if (*argc>i+1) { *jax->options[j].str=argv[i+1]; JAXshiftopts(i, 2, argc, argv); j=-1; } else { fprintf(stderr,"Option \"%s\" needs a value.\n",argv[i]); return(0); } } else { *jax->options[j].str=(char*)(((int)(*jax->options[j].str+1))%2); JAXshiftopts(i, 1, argc, argv); j=-1; } } } if (i+1<(*argc) && !strcmp(argv[i],"-display")) { jax->dname=argv[i+1]; JAXshiftopts(i, 2, argc, argv); } if (i+1<(*argc) && !strcmp(argv[i],"-geometry")) { jax->geometry=argv[i+1]; JAXshiftopts(i, 2, argc, argv); } } return(c?c:-1); } int JAXgetrdb(Jax *jax) /* 91 */ { /*char rfilename[80]; char *type; XrmValue xrmvalue; XrmDatabase rdb;*/ return(1); } /*****************************************************************************/ /* Jax main stuff */ /*****************************************************************************/ Jax *JAXnewjax() { Jax *jax; jax=(Jax*)malloc(sizeof(Jax)); memset(jax,0,sizeof(Jax)); return(jax); } Jax *JAXinit(int *argc, char **argv, Jax_Params *rdb, Jax_Params *options) { Jax *jax; int i; jax=JAXnewjax(); jax->resources=rdb; if (rdb) { for(i=0;rdb[i].name1!=NULL;i++); jax->num_resources=i; JAXgetrdb(jax); } jax->options=options; if (options) { for(i=0;options[i].name1!=NULL;i++); jax->num_options=i; } if(!JAXgetopts(jax, argc, argv)) { fprintf(stderr,"Argument error\n"); JAXusage(jax, argv[0], ""); free(jax); return(0); } if(!(jax->d=XOpenDisplay(jax->dname))) { printf("Error opening display.\n"); free(jax); return(0); } jax->s=DefaultScreen(jax->d); return(jax); } int JAXopenrootwin(Jax *jax) { if(!jax) return(0); jax->w=DefaultRootWindow(jax->d); JAXgetxwa(jax); jax->cmap=DefaultColormap(jax->d, DefaultScreen(jax->d)); return(1); } int JAXcreatewin(Jax *jax, int x, int y, int w, int h, char *winName, char *iconName, int argc, char **argv) { if(!jax) return(0); if(!(jax->w=XCreateSimpleWindow(jax->d, DefaultRootWindow(jax->d), x, y, w, h, 0, JAXwhite(jax), JAXblack(jax)))) { fprintf(stderr,"Error creating window!\n"); return(0); } if(!(jax->xch=XAllocClassHint())) { fprintf(stderr,"Error allocating class hints!\n"); return(0); } jax->xch->res_name=(argv?argv[0]:""); jax->xch->res_class=(argv?argv[0]:""); if(!XStringListToTextProperty(&winName, 1, &jax->wname)) { fprintf(stderr,"Error creating XTextProperty!\n"); return(0); } if(!XStringListToTextProperty(&iconName, 1, &jax->iname)) { fprintf(stderr,"Error creating XTextProperty!\n"); return(0); } if(!(jax->xwmh=XAllocWMHints())) { fprintf(stderr,"Error allocating window manager hints!\n"); return(0); } jax->xwmh->flags=0; if(!(jax->xsh=XAllocSizeHints())) { fprintf(stderr,"Error allocating size hints!\n"); return(0); } jax->xsh->flags=(PPosition | PSize | PMinSize | PMaxSize); jax->xsh->height=jax->xsh->min_height=jax->xsh->max_height=h; jax->xsh->width=jax->xsh->min_width=jax->xsh->max_width=w; jax->xsh->x=x; jax->xsh->y=y; XSetWMProperties(jax->d,jax->w,&jax->wname,&jax->iname,argv,argc,jax->xsh,jax->xwmh,jax->xch); jax->cmap=DefaultColormap(jax->d, DefaultScreen(jax->d)); return(1); } int JAXuseGeometry(Jax *jax, int not_allowed_bitmask) { int x,y,w,h,bitmask,gravity; char def[80]; if(!jax->d || !jax->w) return(0); if (!jax->geometry || strlen(jax->geometry)==0) return(1); sprintf(def,"%dx%d+%d+%d",jax->xsh->width,jax->xsh->height,jax->xsh->x,jax->xsh->y); bitmask = XWMGeometry(jax->d,DefaultScreen(jax->d),jax->geometry,def,0,jax->xsh,&x,&y,&w,&h,&gravity); if (XValue&bitmask && !(XValue¬_allowed_bitmask)) { jax->xsh->flags|=USPosition; jax->xsh->x=x; } if (YValue&bitmask && !(YValue¬_allowed_bitmask)) { jax->xsh->flags|=USPosition; jax->xsh->y=y; } if (WidthValue&bitmask && !(WidthValue¬_allowed_bitmask)) { jax->xsh->flags|=USSize; jax->xsh->width=w; } if (HeightValue&bitmask && !(HeightValue¬_allowed_bitmask)) { jax->xsh->flags|=USSize; jax->xsh->height=h; } if(jax->xsh->flags&USSize) XResizeWindow(jax->d,jax->w,jax->xsh->width,jax->xsh->height); if(jax->xsh->flags&USPosition) XMoveWindow(jax->d,jax->w,jax->xsh->x,jax->xsh->y); XSetWMNormalHints(jax->d,jax->w,jax->xsh); return(1); } int JAXmapWin(Jax *jax, int raised) { if (!jax || !jax->w) return(0); if(raised) XMapRaised(jax->d,jax->w); else XMapWindow(jax->d,jax->w); XFlush(jax->d); if(!JAXgetxwa(jax)) fprintf(stderr,"Error getting window atributes!\n"); return(1); } int JAXdefaultGC(Jax *jax) { jax->xgcv.foreground=JAXwhite(jax); jax->xgcv.background=JAXblack(jax); jax->gc_mask=GCForeground|GCBackground; jax->gc=XCreateGC(jax->d,jax->w,jax->gc_mask,&jax->xgcv); return(1); } int JAXexit(Jax *jax) { XCloseDisplay(jax->d); return(1); } /*****************************************************************************/ /* Event Handling */ /*****************************************************************************/ int JAXaddevents(Jax *jax, Jax_Events *je) { int i; if(je) jax->events=je; if(!jax->events) return(0); if (!XGetWindowAttributes(jax->d, jax->w, &jax->xwa)) return(0); for(i=0;jax->events[i].event;i++) jax->xwa.your_event_mask|=jax->events[i].event; jax->xswa.event_mask=jax->xwa.your_event_mask; if(XChangeWindowAttributes(jax->d, jax->w, CWEventMask, &jax->xswa)) return(1); /*fprintf(stderr,"Problem setting window event attributes.\n");*/ return(1); /* should be 0, i don't get it! */ } int JAXeventnow(Jax *jax) { if(JAXeventsqueued(jax)) { XNextEvent(jax->d, &jax->xe); switch(jax->xe.type) { case MappingNotify: XRefreshKeyboardMapping((XMappingEvent*)&jax->xe); jax->xe.type=0; break; default: if (jax->EH) jax->EH(jax); break; } } return(0); } int JAXwaitforevent(Jax *jax) { int done=0; while(!done) { XNextEvent(jax->d, &jax->xe); switch(jax->xe.type) { case MappingNotify: XRefreshKeyboardMapping((XMappingEvent*)&jax->xe); break; default: done=1; break; } } return(0); } int JAXeventhandler(Jax *jax) { int i; for(i=0;jax->events[i].event;i++) if(jax->xe.type==jax->events[i].type) { return(jax->events[i].function(jax)); } fprintf(stderr,"Event type number %d not handled!\n",jax->xe.type); return(0); } int JAXeventloop(Jax *jax) { int done=0; while(!done) { JAXwaitforevent(jax); if (jax->EH) done=jax->EH(jax); else done=1; } return(1); } /*****************************************************************************/ /* Images */ /*****************************************************************************/ imwheel-1.0.0pre12.orig/jax/jax.h0000644000175000017500000001217107203176121016733 0ustar chrischris00000000000000#ifndef JAX_H #define JAX_H #include #include #include #include #include typedef struct JAX_PARAMS { char *name1, *name2, **str; } Jax_Params; struct JAX; typedef struct JAX_EVENTS { long event; int type; int (*function)(struct JAX*); } Jax_Events; typedef struct JAX { Display *d; /* 92 */ char *dname; int s; /* DefaultScreen() */ Window w; /* 164 */ char *geometry; XSetWindowAttributes xswa; /* 155-7 */ XWindowAttributes xwa; /* 158-9 */ /* 153 */ XTextProperty wname; XTextProperty iname; XSizeHints *xsh; /* 93, 148-9 */ XWMHints *xwmh; /* 154 */ XClassHint *xch; /* 152 */ int (*EH)(struct JAX*); /* event handler */ XEvent xe; /* 96, 98, 129 */ Jax_Events *events; /* 124-9, 159-60 */ XGCValues xgcv; /* 96 */ unsigned long gc_mask; GC gc; /* 96, 238-41 */ XFontStruct *xfs; /* 92,279 */ Colormap cmap; /* 313- */ Jax_Params *options; /* 90 */ int num_options; Jax_Params *resources; /* 91 */ int num_resources; struct JAX *next; } Jax; int JAXusage(Jax*, char*, char*); /* jax,argv[0],usage(no options) */ int JAXshiftopts(int, int, int*, char**); /* base,shift,argc,argv */ int JAXgetopts(Jax*, int*, char**); /* jax,argc,argv */ int JAXgetrdb(Jax*); /* jax */ Jax *JAXnewjax(void); Jax *JAXinit(int*, char**, Jax_Params*, Jax_Params*); /* argc,argv,rdb,options */ int JAXexit(Jax *); /* jax */ int JAXopenrootwin(Jax*); /* jax */ int JAXdefaultGC(Jax*); /* jax */ int JAXcreatewin(Jax*,int,int,int,int,char*,char*,int,char**); /* jax, x,y,w,h, winName, iconName, argc,argv */ int JAXuseGeometry(Jax*,int); /* jax, bits set not to allow changes of sizes/positions using the same convention returned by XParseGeometry */ int JAXmapWin(Jax*,int); /* jax, raised */ int JAXaddevents(Jax*, Jax_Events*); /* jax, events */ int JAXeventhandler(Jax*); /* jax */ int JAXeventnow(Jax*); /* jax */ int JAXwaitforevent(Jax*); /* jax */ int JAXeventloop(Jax*); /* jax */ /* M A C R O S */ #define JAXmapsubwin(jax) XMapSubWindows(jax->d,jax->w) #define JAXmapwin(jax) JAXmapWin(jax,0) #define JAXmapraised(jax) JAXmapWin(jax,1) #define JAXunmapwin(jax) XUnmapWindow(jax->d,jax->w) #define JAXclosedisplay(jax) XCloseDisplay(jax->d) #define JAXraisewin(jax) XRaiseWindow(jax->d,jax->w) #define JAXlowerwin(jax) XLowerWindow(jax->d,jax->w) #define JAXmovewin(jax,dx,dy) XMoveWindow(jax->d,jax->w,dx,dy) #define JAXmoveresizewin(jax,dx,dy,dw,dh) XMoveResizeWindow(jax->d,jax->w, \ dx,dy,dw,dh) #define JAXgetxwa(jax) XGetWindowAttributes(jax->d, \ jax->w, &jax->xwa) #define JAXdefaultrootwin(jax) DefaultRootWindow(jax->d) #define JAXgetcmap(jax) jax->cmap=DefaultColormap(jax->d,jax->s) #define JAXcreategc(jax) jax->gc=XCreateGC(jax->d,jax->w, \ jax->gc_mask,&jax->xgcv) #define JAXcleararea(jax,x,y,wd,h,e) XClearArea(jax->d,jax->w, \ x,y,wd,h,e) #define JAXclearwindow(jax) XClearWindow(jax->d,jax->w) #define JAXdrawpoint(jax,x,y) XDrawPoint(jax->d,jax->w,jax->gc, \ x,y) #define JAXfillrectangle(jax,x,y,wd,h) XFillRectangle(jax->d,jax->w, \ jax->gc,x,y,wd,h) #define JAXline(jax,x,y,x2,y2) XDrawLine(jax->d,jax->w, \ jax->gc,x,y,x2,y2) #define JAXblack(jax) BlackPixel(jax->d,jax->s) #define JAXwhite(jax) WhitePixel(jax->d,jax->s) #define JAXsetfg(jax,c) XSetForeground(jax->d,jax->gc,c) #define JAXsetbg(jax,c) XSetBackground(jax->d,jax->gc,c) #define JAXreadbitmapfile(jax,fname,width,height,bitmap,hot_x,hot_y) \ XReadBitmapFile(jax->d, jax->w, \ fname, \ width, height, bitmap, \ hot_x, hot_y) #define JAXputbm(jax,bm,x,y,width,height) XCopyPlane(jax->d,bm,jax->w,\ jax->gc,\ 0,0,width,height,x,y,1) #define JAXgetimage(jax,x,y,wd,h) XGetImage(jax->d, jax->w, \ x, y, wd, h, AllPlanes, ZPixmap) #define JAXloadfont(jax,fontname) XLoadFont(jax->d, fontname); #define JAXloadqueryfont(jax,fontname) jax->xfs=XLoadQueryFont(jax->d, fontname); #define JAXqueryfont(jax) jax->xfs=XQueryFont(jax->d, jax->xgcv.font); #define JAXsetGCfont(jax) XSetFont(jax->d,jax->gc,\ jax->xfs->fid) #define JAXdrawstring(jax,x,y,str) XDrawString(jax->d,jax->w,jax->gc,\ x,y,str,strlen(str)) #define JAXstringwidth(jax,str) XTextWidth(jax->xfs,str,strlen(str)) #define JAXstringheight(jax) (jax->xfs->ascent) #define JAXstringfullheight(jax) (jax->xfs->ascent+jax->xfs->descent) #define JAXfontdescent(jax) (jax->xfs->descent) #define JAXsync(jax,discard) XSync(jax->d,discard) #define JAXsetEH(jax,eh) jax->EH=eh #define JAXeventsqueued(jax) XEventsQueued(jax->d, \ QueuedAfterReading) #define JAXpending(jax) XPending(jax->d) #define JAXquerypointer(jax,root,child,rx,ry,wx,wy,keys_buttons) \ XQueryPointer(jax->d, jax->w, \ root, child, \ rx, ry, wx, wy, keys_buttons) #endif imwheel-1.0.0pre12.orig/jax/Makefile.am0000644000175000017500000000012510061736136020034 0ustar chrischris00000000000000AM_CFLAGS=@CFLAGS@ @X_CFLAGS@ noinst_LIBRARIES=libjax.a libjax_a_SOURCES=jax.c jax.h imwheel-1.0.0pre12.orig/jax/Makefile.in0000644000175000017500000002722510114330361020044 0ustar chrischris00000000000000# Makefile.in generated by automake 1.9 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ SOURCES = $(libjax_a_SOURCES) srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : subdir = jax DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = LIBRARIES = $(noinst_LIBRARIES) AR = ar ARFLAGS = cru libjax_a_AR = $(AR) $(ARFLAGS) libjax_a_LIBADD = am_libjax_a_OBJECTS = jax.$(OBJEXT) libjax_a_OBJECTS = $(am_libjax_a_OBJECTS) DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(libjax_a_SOURCES) DIST_SOURCES = $(libjax_a_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GETOPT_INCS = @GETOPT_INCS@ GETOPT_LIBS = @GETOPT_LIBS@ GPM_DIR = @GPM_DIR@ HAVE_GPM_SRC = @HAVE_GPM_SRC@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ NO_GPM_DOC_FALSE = @NO_GPM_DOC_FALSE@ NO_GPM_DOC_TRUE = @NO_GPM_DOC_TRUE@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ SUID_FALSE = @SUID_FALSE@ SUID_TRUE = @SUID_TRUE@ VERSION = @VERSION@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ ac_ct_CC = @ac_ct_CC@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ datadir = @datadir@ exec_prefix = @exec_prefix@ extras = @extras@ extras_dist = @extras_dist@ getopt = @getopt@ getopt_dist = @getopt_dist@ gpm_dist = @gpm_dist@ gpm_imwheel = @gpm_imwheel@ host_alias = @host_alias@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ mandir = @mandir@ mdetect = @mdetect@ mdetect_dist = @mdetect_dist@ mdump = @mdump@ mdump_dist = @mdump_dist@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ subdirs = @subdirs@ suid = @suid@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ AM_CFLAGS = @CFLAGS@ @X_CFLAGS@ noinst_LIBRARIES = libjax.a libjax_a_SOURCES = jax.c jax.h all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu jax/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu jax/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh clean-noinstLIBRARIES: -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) libjax.a: $(libjax_a_OBJECTS) $(libjax_a_DEPENDENCIES) -rm -f libjax.a $(libjax_a_AR) libjax.a $(libjax_a_OBJECTS) $(libjax_a_LIBADD) $(RANLIB) libjax.a mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jax.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` uninstall-info-am: ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-noinstLIBRARIES mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-exec-am: install-info: install-info-am install-man: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-info-am .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-noinstLIBRARIES ctags distclean distclean-compile \ distclean-generic distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-exec install-exec-am install-info \ install-info-am install-man install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \ uninstall-am uninstall-info-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: imwheel-1.0.0pre12.orig/see0000755000175000017500000000076007203176121015721 0ustar chrischris00000000000000#! /bin/sh INFO=' man DefaultRootWindow man XAllowEvents man XGrabButton man XSendEvent man XQueryTree man XQueryPointer man XGetInputFocus man XGetDeviceFocus man XOpenDevice man XSendExtensionEvent less /usr/X11R6/include/X11/X.h less /usr/X11R6/include/X11/keysymdef.h less /usr/X11R6/include/X11/extensions/XTest.h less /usr/X11R6/include/X11/extensions/XInput.h ' if [ $# -gt 0 ] then `cat << . | grep -i "$1" | awk 'NR==1' $INFO .` else echo -n "Info available:$INFO" fi imwheel-1.0.0pre12.orig/BUGS0000644000175000017500000000473410061736135015712 0ustar chrischris00000000000000 KNOWN BUGS for current version. Please only report with new bugs, patches or suggestions, not these bugs! Really weird things can happen...like keys still acting like they're pressed. - If the focus is changed while wheeling actions are going on...hoo boy. - If the modifier(s) are let up while wheeling actions are going on...hoo boy. - To reset virtually stuck keys press and release all of them once, that works! Non-wheel-fifo users that have things like the following in the imwheelrc: Shift_L, Up, Button4 - will find that to send the Button4, imwheel must ungrab the mouse buttons meaning that REAL mouse button events have a chance to slip through. this results in unknown behaviour. - the best solution is to find keys that do the same function, and use them in your imwheelrc, instead of sending ButtonN events. Memory footprint too big, says one person... - Mine runs at about 1620 bytes well what am I gonna do! @Exclude not excluding (at least since 0.9), may still not work in 0.9.7 - Method#1 users who use xv need this... - could someone else please play with this. XWheel won't care about this problem as it is now, because it will be more integrated into the low level. Configuration dialog doesn't grab wheel actions for Method#1 - Oops...it's not that useful anyways. OLD FIXED BUGS! It's always nice to see what's been fixed! See Changes file for bug updates...keeping track in two places sucked eggs! Wheel stops working after a canceled configuration box. - FIXED in 0.9.6, appeared along with configurator in 0.9 configuration now regrabs the mouse buttons after a canceled configuration Crashes with a segfault after some wheeling - FIXED in 0.9 (second version) No button event passthrough for clients with .Xdefaults support activated. XV Grabber dies! It can't grab the mouse! - FIXED in v0.7, was there from v0.1! Added @Exclude command. Segfaulting on no rc files... - FIXED in v0.6, introduced in v0.4, along with config files... Segfaulting on NULL window title,class or resource names... - FIXED in v0.5, introduced in v0.4, along with config files... Netscape doesn't respond to more than one up and down at a time. - FIXED in v0.3! try the alt sequences! they work as designed! xman does not respond. - FIXED in v0.4 All KDE clients reported to not respond. - reported FIXED in v0.3 May cause some windows to hate the synthetic keys being pressed... -- FIXED in v0.3, all keys are nonsynthetic...just check it out in xev!! imwheel-1.0.0pre12.orig/NEWS0000644000175000017500000001135210061736135015720 0ustar chrischris00000000000000You might be looking for the ChangeLog file... Testing Results: (Thanks to all who have responded, keep up the great work!) Mice that are reported working (XF86-Mouse gpm-type): Intellimouse PS/2 (IMPS/2 or imps2/MouseSystems) - including Intellieye mice, except any thumb buttons on the Pro version for that you need X support for buttons 5 and 6 or jam... Intellimouse Serial (Intellimouse ms3) Logitech PS/2 (MouseManPlusPS/2 mm+ps2) Serial (MouseManPlus mman) - Trackman Marble FX (gpm -t tmmfx w/Method#2) serial mouse driver, works like in windows. - Marble FX (gpm -t marblefx w/Method#2) new driver in gpm may give FULL functionality using Method #2 this works like in windows, click on/off for wheel functions other setups may only leave you with the Up dir, see also imwheel -4 - Marble + - Pilot Mouse+ - Cordless Wheel Mouse (Method #1 @least) - Mouseman Wheel (Method #1 @least) - Cordless Wheel Mouse PS/2 (gpm -t mm+ps2 w/Method#2) - Firstmouse - Logitech M-BA47 (imps2 for non OEM-color label on mouse) Genius PS/2 - NetMouse Pro PS/2 - NewScroll/PS2 (1:IMPS/2 or 2:imps2/MouseSystems) - Trust Ami Mouse Scroll Pro Excellence series - WinEasy 4D - Primax CyberNavigator [1] mouse - Ami Mouse Scroll Pro (Excellence Series) says Jay at predator1710@gmx.net - Arowana PS/2 WheelMouse says frank.van.geirt@pandora.be - Dexxa Optical Pro (PS/2) uses imps/2 type drivers Mice I support due to having them: Intellimouse PS/2 IBM ScrollPoint PS/2 Works Great With: Netscape (3.04, 4.0x, 4.5) (click to change wheel focus) - All Netscape clients: Mail, Composer, etc... - click to focus on frames. (Forms work now like they should!) XLess GVim (Lesstif) XiTerm ETerm NXTerm rxvt - rxvt/src/feature.h has several scroll-related options - you may want to compile rxvt without scroll wheel support Acroread 3.1 and up xterm (including scrolling the xterm itself!) - scrolling XTerm (instead of typing in it) is possible when the config file is set up. The included imwheelrc has a setting that uses alt for scrolling the actual scrollbar on the xterm! - shift up and down work in bash! - if using vim or less, the plain/shifted/controled wheel works as expected! MGV ghostview some lesstif/motif windows, like file selectors... (click to focus!) KDE stuff (what? well...anything that has key responses!) XMan (requires an .imwheelrc configuration as included in archive) Staroffice 4.0 and up XV (window grab...may need help, read on) - Needs configuration, see @Exclude command notes in README, unless... - if used with wheel fifos in gpm and imwheel, it's fine! emacs (see EMACS file for some help if you want it!) KDE (kfm, kmail, etc...) Any client that accepts keyboard control should be configurable, if not, work without configuration but with the built-in defaults! Not Working At All: XFree86 4.0 support for /dev/gpmdata or /dev/jam_*:* FIFO mouse devices - use the ZAxis method, and if your mouse doesn't work...try again. or fallback to the 3.2+ server distros - argh. Clients that don't expect any keys at all. - There is no way to do this, except maybe X server ICC...but I don't know any of that stuff, I only know about it, and it's C code calls. Console - I'm looking into this, now that I tangled with gpm for wheel info! QTronix (?) mouse - which one??? we need the init code apparently. May work, But it depends on which Method and which client: Wheel buttons in KDE clients when using wheel-fifo. - I mean KDE client that use actual wheel mouse stuff, won't... since the wheel is not going through the XServer at all! unless they expect pageup/pagedown too... in method #1 you can exclude these windows and they should work! XServers that may work if used with the included gpm and imwheel wheel fifo: XInside's Accelerated-X (There is no wheel support in AccelX!) - you must use the included gpm and imwheel with the wheel fifo options! XServers that are thought so far to be useless with a wheel mouse: Any win32 XServer software that has no XTest extension. - XVision has support I think, I'll test it at work, if I ever boot into NT again. I haven't run NT in 5 weeks now, and I don't intend to! imwheel-1.0.0pre12.orig/TODO0000644000175000017500000000132010061736135015703 0ustar chrischris00000000000000[High] update docs for pre-release stuff [Low] create a nice printable readme for printing (LaTeX or DocBook?, or texinfo!) use @sysconfdir@ for imwheelrc installation and read location rewrite configure.in (it was my first one after all!) add gesture support [Never :( ] allow for a modifier key and mouse motion to emulate wheel (done) Allow for specific Excluded X mouse buttons (done) allow sending of mouse buttons, besides keys... (done) move global imwheelrc to /etc/X11 (done) add keyup support (mid output keys, like L|-L|u|-u etc..) (?) convert NEWS file to the standard NEWS file format convert ChangeLog file to the standard ChangeLog file format convert AUTHORS file to the standard AUTHORS file format imwheel-1.0.0pre12.orig/depcomp0000755000175000017500000003554510103332125016574 0ustar chrischris00000000000000#! /bin/sh # depcomp - compile a program generating dependencies as side-effects scriptversion=2004-05-31.23 # Copyright (C) 1999, 2000, 2003, 2004 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Alexandre Oliva . case $1 in '') echo "$0: No command. Try \`$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: depcomp [--help] [--version] PROGRAM [ARGS] Run PROGRAMS ARGS to compile a file, generating dependencies as side-effects. Environment variables: depmode Dependency tracking mode. source Source file read by `PROGRAMS ARGS'. object Object file output by `PROGRAMS ARGS'. DEPDIR directory where to store dependencies. depfile Dependency file to output. tmpdepfile Temporary file to use when outputing dependencies. libtool Whether libtool is used (yes/no). Report bugs to . EOF exit 0 ;; -v | --v*) echo "depcomp $scriptversion" exit 0 ;; esac if test -z "$depmode" || test -z "$source" || test -z "$object"; then echo "depcomp: Variables source, object and depmode must be set" 1>&2 exit 1 fi # Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. depfile=${depfile-`echo "$object" | sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} rm -f "$tmpdepfile" # Some modes work just like other modes, but use different flags. We # parameterize here, but still list the modes in the big case below, # to make depend.m4 easier to write. Note that we *cannot* use a case # here, because this file can only contain one case statement. if test "$depmode" = hp; then # HP compiler uses -M and no extra arg. gccflag=-M depmode=gcc fi if test "$depmode" = dashXmstdout; then # This is just like dashmstdout with a different argument. dashmflag=-xM depmode=dashmstdout fi case "$depmode" in gcc3) ## gcc 3 implements dependency tracking that does exactly what ## we want. Yay! Note: for some reason libtool 1.4 doesn't like ## it if -MD -MP comes after the -MF stuff. Hmm. "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi mv "$tmpdepfile" "$depfile" ;; gcc) ## There are various ways to get dependency output from gcc. Here's ## why we pick this rather obscure method: ## - Don't want to use -MD because we'd like the dependencies to end ## up in a subdir. Having to rename by hand is ugly. ## (We might end up doing this anyway to support other compilers.) ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like ## -MM, not -M (despite what the docs say). ## - Using -M directly means running the compiler twice (even worse ## than renaming). if test -z "$gccflag"; then gccflag=-MD, fi "$@" -Wp,"$gccflag$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz ## The second -e expression handles DOS-style file names with drive letters. sed -e 's/^[^:]*: / /' \ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" ## This next piece of magic avoids the `deleted header file' problem. ## The problem is that when a header file which appears in a .P file ## is deleted, the dependency causes make to die (because there is ## typically no way to rebuild the header). We avoid this by adding ## dummy dependencies for each header file. Too bad gcc doesn't do ## this for us directly. tr ' ' ' ' < "$tmpdepfile" | ## Some versions of gcc put a space before the `:'. On the theory ## that the space means something, we add a space to the output as ## well. ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; sgi) if test "$libtool" = yes; then "$@" "-Wp,-MDupdate,$tmpdepfile" else "$@" -MDupdate "$tmpdepfile" fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files echo "$object : \\" > "$depfile" # Clip off the initial element (the dependent). Don't try to be # clever and replace this with sed code, as IRIX sed won't handle # lines with more than a fixed number of characters (4096 in # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; # the IRIX cc adds comments like `#:fec' to the end of the # dependency line. tr ' ' ' ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ tr ' ' ' ' >> $depfile echo >> $depfile # The second pass generates a dummy entry for each header file. tr ' ' ' ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ >> $depfile else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; aix) # The C for AIX Compiler uses -M and outputs the dependencies # in a .u file. In older versions, this file always lives in the # current directory. Also, the AIX compiler puts `$object:' at the # start of each line; $object doesn't have directory information. # Version 6 uses the directory in both cases. stripped=`echo "$object" | sed 's/\(.*\)\..*$/\1/'` tmpdepfile="$stripped.u" if test "$libtool" = yes; then "$@" -Wc,-M else "$@" -M fi stat=$? if test -f "$tmpdepfile"; then : else stripped=`echo "$stripped" | sed 's,^.*/,,'` tmpdepfile="$stripped.u" fi if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi if test -f "$tmpdepfile"; then outname="$stripped.o" # Each line is of the form `foo.o: dependent.h'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile" sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile" else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; icc) # Intel's C compiler understands `-MD -MF file'. However on # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c # ICC 7.0 will fill foo.d with something like # foo.o: sub/foo.c # foo.o: sub/foo.h # which is wrong. We want: # sub/foo.o: sub/foo.c # sub/foo.o: sub/foo.h # sub/foo.c: # sub/foo.h: # ICC 7.1 will output # foo.o: sub/foo.c sub/foo.h # and will wrap long lines using \ : # foo.o: sub/foo.c ... \ # sub/foo.h ... \ # ... "$@" -MD -MF "$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each line is of the form `foo.o: dependent.h', # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this invocation # correctly. Breaking it into two sed invocations is a workaround. sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; tru64) # The Tru64 compiler uses -MD to generate dependencies as a side # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put # dependencies in `foo.d' instead, so we check for that too. # Subdirectories are respected. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then # Dependencies are output in .lo.d with libtool 1.4. # With libtool 1.5 they are output both in $dir.libs/$base.o.d # and in $dir.libs/$base.o.d and $dir$base.o.d. We process the # latter, because the former will be cleaned when $dir.libs is # erased. tmpdepfile1="$dir.libs/$base.lo.d" tmpdepfile2="$dir$base.o.d" tmpdepfile3="$dir.libs/$base.d" "$@" -Wc,-MD else tmpdepfile1="$dir$base.o.d" tmpdepfile2="$dir$base.d" tmpdepfile3="$dir$base.d" "$@" -MD fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi if test -f "$tmpdepfile1"; then tmpdepfile="$tmpdepfile1" elif test -f "$tmpdepfile2"; then tmpdepfile="$tmpdepfile2" else tmpdepfile="$tmpdepfile3" fi if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" # That's a tab and a space in the []. sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; #nosideeffect) # This comment above is used by automake to tell side-effect # dependency tracking mechanisms from slower ones. dashmstdout) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout, regardless of -o. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test $1 != '--mode=compile'; do shift done shift fi # Remove `-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done test -z "$dashmflag" && dashmflag=-M # Require at least two characters before searching for `:' # in the target name. This is to cope with DOS-style filenames: # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise. "$@" $dashmflag | sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" tr ' ' ' ' < "$tmpdepfile" | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; dashXmstdout) # This case only exists to satisfy depend.m4. It is never actually # run, as this mode is specially recognized in the preamble. exit 1 ;; makedepend) "$@" || exit $? # Remove any Libtool call if test "$libtool" = yes; then while test $1 != '--mode=compile'; do shift done shift fi # X makedepend shift cleared=no for arg in "$@"; do case $cleared in no) set ""; shift cleared=yes ;; esac case "$arg" in -D*|-I*) set fnord "$@" "$arg"; shift ;; # Strip any option that makedepend may not understand. Remove # the object too, otherwise makedepend will parse it as a source file. -*|$object) ;; *) set fnord "$@" "$arg"; shift ;; esac done obj_suffix="`echo $object | sed 's/^.*\././'`" touch "$tmpdepfile" ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" sed '1,2d' "$tmpdepfile" | tr ' ' ' ' | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" "$tmpdepfile".bak ;; cpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test $1 != '--mode=compile'; do shift done shift fi # Remove `-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done "$@" -E | sed -n '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | sed '$ s: \\$::' > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" cat < "$tmpdepfile" >> "$depfile" sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; msvisualcpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout, regardless of -o, # because we must use -o when running libtool. "$@" || exit $? IFS=" " for arg do case "$arg" in "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") set fnord "$@" shift shift ;; *) set fnord "$@" "$arg" shift shift ;; esac done "$@" -E | sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" echo " " >> "$depfile" . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; none) exec "$@" ;; *) echo "Unknown depmode $depmode" 1>&2 exit 1 ;; esac exit 0 # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-end: "$" # End: imwheel-1.0.0pre12.orig/M-BA470000644000175000017500000000211007203176115015763 0ustar chrischris00000000000000 Logitech Mouseman Wheel This mouse wheel clicks on rolling, but the clicks are NOT the actual move, the mouse is using the wheel without the clicks, thus making the wheel at rest sometimes sensitive to minot non-click wheeling. This can result in seemingly spurious wheelings but they are a result of defective design in the methodology of the mouse wheel sensing. Complain to Logitech, not me! init with mm+ps2 protocol Thumb Down (Nothing Else Happened!) 2520670 ( 0MHz) : C8( -56)D2( -46)=11010010=-3, 2) 10( 16)=00010000= 1, 0) 7257 (137MHz) : 08( 8)00( 0)=00000000= 0, 0) 00( 0)=00000000= 0, 0) Thumb Up (Nothing Else Happened!) 1616259 ( 0MHz) : C8( -56)D2( -46)=11010010=-3, 2) 00( 0)=00000000= 0, 0) 6060 (165MHz) : C8( -56)D2( -46)=11010010=-3, 2) 00( 0)=00000000= 0, 0) 10291 ( 97MHz) : C8( -56)D2( -46)=11010010=-3, 2) 00( 0)=00000000= 0, 0) 10278 ( 97MHz) : 08( 8)00( 0)=00000000= 0, 0) 00( 0)=00000000= 0, 0) Byte 1 C8h=200d=310o=11001000b ^--always there = 0x08 Byte 2 D2h=210d=322o=11010010b DEh=222d=336o=11011110b imwheel-1.0.0pre12.orig/EMACS0000644000175000017500000000760107203176115015776 0ustar chrischris00000000000000From - Sat Dec 19 00:50:58 1998 Received: from mail.iol.ie (mail2.mail.iol.ie [194.125.2.193]) by solaris1.mysolution.com (8.8.5/8.8.5) with ESMTP id UAA19253 for ; Sat, 21 Nov 1998 20:29:45 -0500 (EST) Received: from sto-kerrig.ie (dialup-003.clonmel.iol.ie [194.125.43.195]) by mail.iol.ie Sendmail (v8.9.1) with ESMTP id BAA26997 for ; Sun, 22 Nov 1998 01:35:28 GMT Received: from sto-kerrig.ie (IDENT:sneakums@sto-kerrig.ie [127.0.0.1]) by sto-kerrig.ie (8.9.1/8.9.1) with ESMTP id VAA04923 for ; Sat, 21 Nov 1998 21:14:36 GMT Message-Id: <199811212114.VAA04923@sto-kerrig.ie> Date: Sat, 21 Nov 1998 21:14:33 +0000 Content-Type: text Status: OR X-Mozilla-Status: 8001 X-Mozilla-Status2: 00000000 X-UIDL: 18c7143e5bfe082df1a908f7bd6ccdcb From: Paul J Collins To: jcatki@mysolution.com Subject: emacs imwheel settings I've been messing with imwheel with a Logitech Mouseman Wheel, and I've finally gotten nice smooth scrolling with Emacs. Add the following to your .emacs: ;;; For imwheel (setq imwheel-scroll-interval 3) (defun imwheel-scroll-down-some-lines () (interactive) (scroll-down imwheel-scroll-interval)) (defun imwheel-scroll-up-some-lines () (interactive) (scroll-up imwheel-scroll-interval)) (global-set-key [?\M-\C-\)] 'imwheel-scroll-up-some-lines) (global-set-key [?\M-\C-\(] 'imwheel-scroll-down-some-lines) ;;; end imwheel section Add the following to your ~/.imwheelrc: "emacs" Shift_L, Up, Page_Up Shift_L, Down, Page_Down None, Down, Control_L|Alt_L|Shift_L|parenright None, Up, Control_L|Alt_L|Shift_L|parenleft Leaving out the Shift_L part makes emacs think you've typed C-M-9 and C-M-0. Holding down left shift (you can add right if you like) will scroll by pages, and with no modifiers, scrolling is by imwheel-scroll-interval lines. For modes such as mail summary buffers, it is easy to bind C-M-( and C-M-) to next-message, or whatever. Cheers ----------------p! -- Paul Collins Public Key On Keyserver. INGREDIENTS: AQUA, ALUMINIUM ZIRCONIUM TETRACHLOROHYDREX GLY, ALCOHOL DENAT, DIMETHICONE, PROPYLENE GLYCOL, CYCLOMETHICONE, DIMETHICONE COPOLYOL, PARFUM. -------------------------------------------------------------------------------- From - Tue Mar 30 02:19:44 1999 Received: from pi.novedia.de (nit.cs.tu-berlin.de [130.149.16.233]) by solaris1.mysolution.com (8.8.5/8.8.5) with ESMTP id KAA08475 for ; Mon, 29 Mar 1999 10:58:59 -0500 (EST) Received: (from fm@localhost) by pi.novedia.de (8.8.8/8.8.8) id SAA20776; Mon, 29 Mar 1999 18:05:57 +0200 From: Frank Meissner MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Date: Mon, 29 Mar 1999 18:05:57 +0200 (CEST) To: Paul J Collins , jcatki@mysolution.com Subject: XEmacs-Keybinding-Syntax in EMACS, imwheel-package X-Mailer: VM 6.43 under 20.4 "Emerald" XEmacs Lucid Message-ID: <14079.41844.191690.742135@pi.novedia.de> Content-Type: text/plain; charset=us-ascii X-Mozilla-Status: 8001 X-Mozilla-Status2: 00000000 X-UIDL: 4a6ee4a74675e43bc0f9ec33957bc78d Hi, just a small addition to the EMACS-File, because for someone it may be hard to get the keybindings right (I had to try two times and got one help request from a co-worker) The correct syntax for keybinding in xemacs is the following: (define-key global-map [(control \))] 'imwheel-scroll-up-some-lines) (define-key global-map [(control \()] 'imwheel-scroll-down-some-lines) Perhaps you could add this to the EMACS-File. Anything else goes really well, even Quake accepts the wheel. Allthough I did'nt get the killer-keybinding or -alias, perhaps you have a hint? Anyway, thanks for the great package and greetings from berlin. Frank -- SIGTHTBABW: a signal sent from Unix to its programmers at random intervals to make them remember that There Has To Be A Better Way. imwheel-1.0.0pre12.orig/imwheel.spec0000644000175000017500000000345107203176120017524 0ustar chrischris00000000000000# # Define some variables here # %define version 0.9.9pre6 %define prefix /usr/X11 %define cfg /etc/X11 %define ins /usr/bin/install %define bz2 /usr/bin/bzip2 # # imwheel.spec # Rob Ludwick # 06/04/00 # Summary: A utility to make wheel mice work under X Name: imwheel Version: %{version} Release: 1 Copyright: GPL Group: User Interface/X Hardware Support Source: http://www.jonatkins.org/imwheel/files/imwheel-%{version}.tar.gz URL: http://www.jonatkins.org/imwheel Packager: Rob Ludwick BuildRoot: /tmp/imwheel %description This is the imwheel utility for X. It supports a variety of wheel mice including the MS Intellimouse. %prep rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT %setup %build ./configure --bindir=%{prefix}/bin --disable-gpm --sysconfdir=%{cfg} make all %install mkdir -p $RPM_BUILD_ROOT%{prefix}/bin $RPM_BUILD_ROOT%{prefix}/man/man1 $RPM_BUILD_ROOT%{prefix}/etc /usr/bin/install -c -d -o root -g root -m 0755 $RPM_BUILD_ROOT%{prefix}/bin /usr/bin/install -c -o root -g root -m 0755 imwheel $RPM_BUILD_ROOT%{prefix}/bin/imwheel /usr/bin/install -c -d -o root -g root -m 0755 $RPM_BUILD_ROOT%{prefix}/man/man1 /usr/bin/install -c -o root -g root -m 0644 imwheel.1 $RPM_BUILD_ROOT%{prefix}/man/man1/imwheel.1x %{bz2} -9 $RPM_BUILD_ROOT%{prefix}/man/man1/imwheel.1x /usr/bin/install -c -d -o root -g root -m 0755 $RPM_BUILD_ROOT/%{cfg} /usr/bin/install -c -o root -g root -m 0644 imwheelrc $RPM_BUILD_ROOT/%{cfg}/imwheelrc %files %config %{cfg}/imwheelrc %attr(0755, root, root) %{prefix}/bin/imwheel %{prefix}/man/man1/imwheel.1x.bz2 %doc BUGS ChangeLog M-BA47 NEWS COPYING EMACS README TODO AUTHORS INSTALL %clean %post %postun %Changelog * Sun Jun 04 2000 -- Initial Version (based off the Mandrake 6 spec file by Peter Putzer) imwheel-1.0.0pre12.orig/cfg.c0000644000175000017500000004503510075435376016141 0ustar chrischris00000000000000/* Intellimouse Wheel Thinger Configuration Helper * Copylefted under the GNU Public License * Author : Jonathan Atkins * PLEASE: contact me if you have any improvements, I will gladly code good ones */ #include #include #ifdef HAVE_UNISTD_H #include #endif #include #ifdef HAVE_SYS_WAIT_H #include #endif #include #include #include "util.h" #include "imwheel.h" #define MAX_SCALE_W 200 #define MAX_SCALE_H 200 #define GUI_W 200 #define GUI_H MAX_SCALE_H #define TRIPLE(c) c,c,c #define MAX(a,b) (ad,JAXdefaultrootwin(jax),&junkwin,&grabwin,&junk,&junk,&junk,&junk,&junk); if(!grabwin) grabwin=junkwin; Printf("grabwin=0x%08x\n",(unsigned)grabwin); if(grabwin!=JAXdefaultrootwin(jax)) { XGetInputFocus(jax->d,&focuswin,&junk); Printf("focuswin=0x%08x\n",(unsigned)focuswin); /*XQueryTree(jax->d,parentwin,&junkwin,&parentwin,&kidwin,&nkids); if(kidwin && nkids) XFree(kidwin); Printf("parentwin=0x%08x\n",(unsigned)parentwin); if(grabwin==parentwin)*/ grabwin=focuswin; } else Printf("grabwin=root window\n"); Printf("grabbed 0x%08x\n",(unsigned)grabwin); return(1); } else { if(jax->xe.xbutton.button==1 && jax->xe.xbutton.xxe.xany.type=Expose; //force for HS expose handler if (!clip) clip=XCreateRegion(); rect.x=jax->xe.xexpose.x; rect.y=jax->xe.xexpose.y; rect.width=jax->xe.xexpose.width; rect.height=jax->xe.xexpose.height; //printf("Expose %d (%d,%d,%d,%d)\n",jax->xe.xexpose.count,rect.x,rect.y,rect.width,rect.height); XUnionRectWithRegion(&rect, clip, clip); if(jax->xe.xexpose.count>0) return(0); XSetRegion(jax->d,jax->gc,clip); XDestroyRegion(clip); clip=NULL; JAXsetfg(jax,grays[1].pixel); JAXfillrectangle(jax,0,0,MAX_SCALE_W+GUI_W,MAX(GUI_H,MAX_SCALE_H)); HSeventhandler(jax); XPutImage(jax->d,jax->w,jax->gc,scaleimg,0,0,0,0,scaleimg->width,scaleimg->height); drawBox(jax,0,0,MAX_SCALE_W,MAX_SCALE_H,grays[2].pixel,grays[0].pixel); drawBox(jax,1,1,MAX_SCALE_W-2,MAX_SCALE_H-2,grays[2].pixel,grays[0].pixel); XSetClipMask(jax->d,jax->gc,None); return(0); } /******************************************************************************/ /* the first thing called... */ int cfg(int fd) { Jax *jax; pid_t pid; int i; changed=0; save=0; if((pid=fork())) { int status; waitpid(pid,&status,0); if(WIFSIGNALED(status)) fprintf(stderr,"Configuration terminated by signal %d\n",WTERMSIG(status)); Printf("cfg:status=%d\n",status); Printf("cfg:WIFSIGNALED(status)=%d\n",WIFSIGNALED(status)); Printf("cfg:WEXITSTATUS(status)=%d\n",WEXITSTATUS(status)); return(!WIFSIGNALED(status)?WEXITSTATUS(status):0); } // Init JAX jax=JAXinit(NULL,NULL,NULL,NULL); //Setup Window JAXcreatewin(jax, 0,0, MAX_SCALE_W+GUI_W,MAX(MAX_SCALE_H,GUI_H), "IMWheel Configuration Helper", "IMWheel Configuration Helper", 0,NULL); if(!XGetWindowAttributes(jax->d, jax->w, &jax->xwa)) return(0); jax->xsh->flags=(PMinSize | PMaxSize | PResizeInc); jax->xsh->min_height= jax->xsh->max_height= jax->xsh->height=200; jax->xsh->min_width= jax->xsh->max_width= jax->xsh->width=400; jax->xsh->width_inc= jax->xsh->height_inc=0; JAXuseGeometry(jax,0); XSetWMProperties(jax->d,jax->w,&jax->wname,&jax->iname,NULL,0,jax->xsh,jax->xwmh,jax->xch); JAXdefaultGC(jax); JAXloadqueryfont(jax,FONT); JAXsetGCfont(jax); // Setup Colors for(i=0;id,jax->cmap,&grays[i]); // Setup Event Stuff JAXaddevents(jax,je); JAXsetEH(jax,JAXeventhandler); // Grab Root Window depth=(jax->xwa.depth==24?32:jax->xwa.depth); scaleimgdata=malloc(MAX_SCALE_W*MAX_SCALE_H*depth/8); scaleimg=XCreateImage(jax->d, jax->xwa.visual, jax->xwa.depth, ZPixmap, 0, (char*)scaleimgdata, MAX_SCALE_W,MAX_SCALE_H, depth, depth/8*MAX_SCALE_H); grabwin=JAXdefaultrootwin(jax); freeAllX(&xch,NULL,&wname); wname=windowName(jax->d,grabwin); XGetClassHint(jax->d,grabwin,&xch); GrabWindowImage(jax); //Hotspot *newHS(int x, int y, int w, int h, int state, int type, char* label, handle(), draw()) { int x,y,h,w,t; x=MAX_SCALE_W; h=JAXstringfullheight(jax)+2; w=JAXstringwidth(jax,"Title: "); t=JAXstringwidth(jax,"Resource: "); if(wd,grabwin,&grabxwa); JAXlowerwin(jax); XSync(jax->d,False); usleep(1000); XSync(jax->d,False); if(!(grabimg=XGetImage(jax->d, grabwin, 0, 0, grabxwa.width, grabxwa.height, AllPlanes, ZPixmap))) { fprintf(stderr,"Couldn't grab image of window!\nTry again...\n"); JAXraisewin(jax); return; } //fprintf(stderr,"grabbed %d\n",grabwin); JAXraisewin(jax); memset(scaleimgdata,0L,MAX_SCALE_W*MAX_SCALE_H*(jax->xwa.depth/8)); // Precalculation dx=grabimg->width/((double)scaleimg->width-5); dy=grabimg->height/((double)scaleimg->height-5); // keep perspective! if(dy<1) dy=1; if(dx<1) dx=1; if(dxwidth/2-grabimg->width/dx/2; cy=scaleimg->height/2-grabimg->height/dy/2; // Image for(x=0;xwidth;x++) for(y=0;yheight;y++) { if((int)(y*dy)height && (x*dx)width) { XPutPixel(scaleimg, x+cx,y+cy, XGetPixel(grabimg, (int)(x*dx), (int)(y*dy))); } else { xx=(x+cx)%scaleimg->width; yy=(y+cy)%scaleimg->height; XPutPixel(scaleimg, xx,yy, grays[1].pixel); } } XDestroyImage(grabimg); grabimg=NULL; jax->xe.xexpose.count=-1; jax->xe.xexpose.x=0; jax->xe.xexpose.y=0; jax->xe.xexpose.width=MAX_SCALE_W; jax->xe.xexpose.height=MAX_SCALE_H; handle_expose(jax); } /******************************************************************************/ int GrabWheel(Jax *jax,Hotspot *hs) { int i,hsi; XModifierKeymap *xmk=NULL; char km[32],button; XEvent e; Hotspot *hsp; char *str; char *wheelstr[]= { "Button: Left (Button1)", "Button: Middle (Button2)", "Button: Right (Button3)", "Wheel: Up (Button4)", "Wheel: Down (Button5)", "Wheel: Left (Button6)", "Wheel: Right (Button7)", "Button: Thumb1 (Button8)", "Button: Thumb2 (Button9)" }; if(!useFifo) { if(!grabbed) { grabButtons(jax->d,0); Printf("grabbed=%s\n",(grabbed?"True":"False")); } } else openFifo(); button=0; if(grabbed || useFifo) do { button=getInput(jax->d,&e,&xmk,km); if(e.type==ButtonPress) Printf("> button=%d\n",button); } while((grabbed || useFifo) && (button<4 || e.type!=ButtonPress)); Printf("button=%d\n",button); if(!button) { Printf("Invalid button: grabbed=%d useFifo=%d\n",grabbed,useFifo); return(False); } if(!useFifo && grabbed) ungrabButtons(jax->d,0); hsp=getHS(grabw_hs[0]); jax->xe.xexpose.count=-1; jax->xe.xexpose.x=hsp->x; jax->xe.xexpose.y=hsp->y; jax->xe.xexpose.width=hsp->w; jax->xe.xexpose.height=0; hsp=getHS(grabw_hs[0]); if(hsp->label) free(hsp->label); if(button<10) hsp->label=strdup(wheelstr[(int)button-1]); else hsp->label=strdup("Unknown Button!"); jax->xe.xexpose.height+=hsp->h; hsi++; for(hsi=1,i=0;hsilabel) free(hsp->label); str=XKeysymToString(XKeycodeToKeysym(jax->d,i,0)); hsp->label=strdup(str?str:"(null)"); jax->xe.xexpose.height+=hsp->h; hsi++; } while(hsilabel) free(hsp->label); hsp->label=strdup(" "); jax->xe.xexpose.height+=hsp->h; hsi++; } handle_expose(jax); freeAllX(NULL,&xmk,NULL); return(False); } /******************************************************************************/ void PickWindow(Jax *jax) { Cursor plus_cursor; plus_cursor=XCreateFontCursor(jax->d,XC_gumby); XGrabButton(jax->d, 1, AnyModifier, JAXdefaultrootwin(jax), True, ButtonPressMask, GrabModeAsync,GrabModeAsync, None, plus_cursor); grabwin=0; JAXeventloop(jax); XUngrabButton(jax->d, 1, AnyModifier, JAXdefaultrootwin(jax)); XFreeCursor(jax->d,plus_cursor); Printf("grabwin=%08x\n",(unsigned)grabwin); freeAllX(&xch,NULL,&wname); wname=windowName(jax->d,grabwin); XGetClassHint(jax->d,grabwin,&xch); { int x,y,h,w; h=JAXstringfullheight(jax)+2; w=GUI_W-name_w; x=MAX_SCALE_W+name_w; y=0; deleteHS(wname_hs); Printf("wname=%s\n",wname); wname_hs=newHS(x,y,w,h,LEFT,LABEL,(wname?wname:".*"),NULL,NULL); y+=h; deleteHS(res_hs); Printf("xch.res_name=%s\n",xch.res_name); res_hs=newHS(x,y,w,h,LEFT,LABEL,xch.res_name,NULL,NULL); y+=h; deleteHS(class_hs); Printf("xch.res_class=%s\n",xch.res_class); class_hs=newHS(x,y,w,h,LEFT,LABEL,xch.res_class,NULL,NULL); jax->xe.xexpose.count=-1; jax->xe.xexpose.x=x; jax->xe.xexpose.y=0; jax->xe.xexpose.width=w; jax->xe.xexpose.height=y+h; handle_expose(jax); } } /******************************************************************************/ Hotspot *getHS(int id) { int i; if(!id) return(NULL); for(i=0;i=numhs) return(NULL); return(&hs[i]); } /******************************************************************************/ int deleteHS(int id) { int i; if(!id) return(0); for(i=0;i=numhs) return(0); numhs--; memcpy(&hs[i],&hs[i+1],(numhs-i)*sizeof(Hotspot)); hs=realloc(hs,(numhs)*sizeof(Hotspot)); return(1); } /******************************************************************************/ int newHS(int x, int y, int w, int h, int state, int type, char* label, int (*buttonfunc)(Jax*,Hotspot*), void (*drawfunc)(Jax*,Hotspot*)) { hs=realloc(hs,(numhs+1)*sizeof(Hotspot)); hs[numhs].id=hsid++; hs[numhs].x=x; hs[numhs].y=y; hs[numhs].w=w; hs[numhs].h=h; hs[numhs].state=state|DIRTY; hs[numhs].type=type; // label is malloc'd then copied if(label) hs[numhs].label=strdup(label); else { hs[numhs].label=malloc(1); hs[numhs].label[0]=0; } if(buttonfunc) hs[numhs].buttonfunc=buttonfunc; else hs[numhs].buttonfunc=doHS; if(drawfunc) hs[numhs].drawfunc=drawfunc; else hs[numhs].drawfunc=drawHS; numhs++; return(hs[numhs-1].id); } /******************************************************************************/ int inHS(Hotspot *h, int x, int y) { return(x>=h->x && x<=h->x+h->w && y>=h->y && y<=h->y+h->h); } /******************************************************************************/ int HSeventhandler(Jax *jax) { int i; for(i=0; ixe.xany.type) { case ButtonPress: if(jax->xe.xbutton.button!=1) return(0); if(inHS(&hs[i],jax->xe.xbutton.x, jax->xe.xbutton.y)) { doHS(jax,&hs[i]); return(0); } break; case ButtonRelease: if(jax->xe.xbutton.button!=1) return(0); if(inHS(&hs[i],jax->xe.xbutton.x, jax->xe.xbutton.y)) return(doHS(jax,&hs[i])); else if(hs[i].state&ACTIVE) { doHS(jax,&hs[i]); return(0); } break; case Expose: hs[i].state|=DIRTY; drawHS(jax,&hs[i]); break; case MotionNotify: if(hs[i].state&ACTIVE) return(doHS(jax,&hs[i])); break; } } return(0); } /******************************************************************************/ int doHS(Jax *jax, Hotspot *h) { int err=0; //printf("doHS: '%s'\n",h->label); switch(jax->xe.xany.type) { case ButtonPress: switch(h->type) { case BUTTON: h->state=ACTIVE|DIRTY; break; default: break; } break; case MotionNotify: switch(h->type) { case BUTTON: if(h->state&ACTIVE) { if(inHS(h, jax->xe.xbutton.x, jax->xe.xbutton.y)) { if(h->state&REST) h->state=DIRTY|ACTIVE; } else { if(!(h->state&REST)) h->state=DIRTY|ACTIVE|REST; } } break; default: break; } break; case ButtonRelease: switch(h->type) { case BUTTON: if(inHS(h, jax->xe.xbutton.x, jax->xe.xbutton.y)) err=h->buttonfunc(jax,h); if(!(h->state&REST)) h->state=REST|DIRTY; else h->state=REST; break; default: break; } break; default: printf("pushHS:unknown XEvent type: %d\n",jax->xe.xany.type); return(0); } h->drawfunc(jax,h); return(err); } /******************************************************************************/ void drawBox(Jax *jax, int x,int y,int w,int h,int light,int dark) { JAXsetfg(jax,light); JAXline(jax,x ,y ,x+w-1, y ); JAXline(jax,x ,y ,x, y+h-1 ); JAXsetfg(jax,dark); JAXline(jax,x+w-1 ,y ,x+w-1, y+h-1 ); JAXline(jax,x ,y+h-1 ,x+w-1, y+h-1 ); } /******************************************************************************/ void drawHS(Jax *jax, Hotspot *h) { Printf("drawHS:(\"%s\")state=%x\n",h->label,h->state); switch(h->type) { case BUTTON: if(!(h->state&DIRTY)) return; JAXsetfg(jax,grays[(h->state&REST?1:3)].pixel); JAXfillrectangle(jax,h->x,h->y,h->w,h->h); drawBox(jax,h->x,h->y,h->w,h->h, grays[(h->state&REST?2:0)].pixel, grays[(h->state&REST?0:2)].pixel); drawBox(jax,h->x+1,h->y+1,h->w-2,h->h-2, grays[(h->state&REST?2:0)].pixel, grays[(h->state&REST?0:2)].pixel); JAXsetfg(jax,JAXblack(jax)); JAXdrawstring(jax, h->x+h->w/2-JAXstringwidth(jax,h->label)/2, h->y+h->h/2+JAXstringfullheight(jax)/2-JAXfontdescent(jax), h->label); break; case LABEL: JAXsetfg(jax,grays[1].pixel); JAXfillrectangle(jax,h->x,h->y,h->w,h->h); JAXsetfg(jax,JAXblack(jax)); h->state&=~DIRTY; switch(h->state) { case CENTER: Printf("(\"%s\")state=%x CENTER\n",h->label,h->state); JAXdrawstring(jax, h->x+h->w/2-JAXstringwidth(jax,h->label)/2, h->y+h->h/2+JAXstringfullheight(jax)/2-JAXfontdescent(jax), h->label); break; case RIGHT: Printf("(\"%s\")state=%x RIGHT\n",h->label,h->state); JAXdrawstring(jax, h->x+h->w-JAXstringwidth(jax,h->label), h->y+h->h/2+JAXstringfullheight(jax)/2-JAXfontdescent(jax), h->label); break; case LEFT: Printf("(\"%s\")state=%x LEFT\n",h->label,h->state); JAXdrawstring(jax, h->x, h->y+h->h/2+JAXstringfullheight(jax)/2-JAXfontdescent(jax), h->label); break; default: break; } } h->state&=~DIRTY; } imwheel-1.0.0pre12.orig/cfg.h0000644000175000017500000000047710061736135016137 0ustar chrischris00000000000000/* IMWheel Configuration Helper Definitions * Copylefted under the Linux GNU Public License * Author : Jonathan Atkins * PLEASE: contact me if you have any improvements, I will gladly code good ones */ #ifndef CFG_H #define CFG_H #include int cfg(int); /* wheel_fd or -1 */ #endif imwheel-1.0.0pre12.orig/aclocal.m40000644000175000017500000011507210114330356017057 0ustar chrischris00000000000000# generated automatically by aclocal 1.9 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 # Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. # -*- Autoconf -*- # Copyright (C) 2002, 2003 Free Software Foundation, Inc. # Generated from amversion.in; do not edit by hand. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"]) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- # Call AM_AUTOMAKE_VERSION so it can be traced. # This function is AC_REQUIREd by AC_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.9])]) # AM_AUX_DIR_EXPAND # Copyright (C) 2001, 2003 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to # `$srcdir', `$srcdir/..', or `$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and # therefore $ac_aux_dir as well) can be either absolute or relative, # depending on how configure is run. This is pretty annoying, since # it makes $ac_aux_dir quite unusable in subdirectories: in the top # source directory, any form will work fine, but in subdirectories a # relative path needs to be adjusted first. # # $ac_aux_dir/missing # fails when called from a subdirectory if $ac_aux_dir is relative # $top_srcdir/$ac_aux_dir/missing # fails if $ac_aux_dir is absolute, # fails when called from a subdirectory in a VPATH build with # a relative $ac_aux_dir # # The reason of the latter failure is that $top_srcdir and $ac_aux_dir # are both prefixed by $srcdir. In an in-source build this is usually # harmless because $srcdir is `.', but things will broke when you # start a VPATH build or use an absolute $srcdir. # # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, # iff we strip the leading $srcdir from $ac_aux_dir. That would be: # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` # and then we would define $MISSING as # MISSING="\${SHELL} $am_aux_dir/missing" # This will work as long as MISSING is not called from configure, because # unfortunately $(top_srcdir) has no meaning in configure. # However there are other variables, like CC, which are often used in # configure, and could therefore not use this "fixed" $ac_aux_dir. # # Another solution, used here, is to always expand $ac_aux_dir to an # absolute PATH. The drawback is that using absolute paths prevent a # configured tree to be moved without reconfiguration. AC_DEFUN([AM_AUX_DIR_EXPAND], [dnl Rely on autoconf to set up CDPATH properly. AC_PREREQ([2.50])dnl # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` ]) # AM_CONDITIONAL -*- Autoconf -*- # Copyright (C) 1997, 2000, 2001, 2003, 2004 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # serial 6 # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ(2.52)dnl ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl AC_SUBST([$1_TRUE]) AC_SUBST([$1_FALSE]) if $2; then $1_TRUE= $1_FALSE='#' else $1_TRUE='#' $1_FALSE= fi AC_CONFIG_COMMANDS_PRE( [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then AC_MSG_ERROR([[conditional "$1" was never defined. Usually this means the macro was only invoked conditionally.]]) fi])]) # serial 7 -*- Autoconf -*- # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 # Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, # will think it sees a *use*, and therefore will trigger all it's # C support machinery. Also note that it means that autoscan, seeing # CC etc. in the Makefile, will ask for an AC_PROG_CC use... # _AM_DEPENDENCIES(NAME) # ---------------------- # See how the compiler implements dependency checking. # NAME is "CC", "CXX", "GCJ", or "OBJC". # We try a few techniques and use that to set a single cache variable. # # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular # dependency, and given that the user is not expected to run this macro, # just rely on AC_PROG_CC. AC_DEFUN([_AM_DEPENDENCIES], [AC_REQUIRE([AM_SET_DEPDIR])dnl AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl AC_REQUIRE([AM_MAKE_INCLUDE])dnl AC_REQUIRE([AM_DEP_TRACK])dnl ifelse([$1], CC, [depcc="$CC" am_compiler_list=], [$1], CXX, [depcc="$CXX" am_compiler_list=], [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], [depcc="$$1" am_compiler_list=]) AC_CACHE_CHECK([dependency style of $depcc], [am_cv_$1_dependencies_compiler_type], [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_$1_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` fi for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf case $depmode in nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; none) break ;; esac # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. if depmode=$depmode \ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_$1_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_$1_dependencies_compiler_type=none fi ]) AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) AM_CONDITIONAL([am__fastdep$1], [ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) ]) # AM_SET_DEPDIR # ------------- # Choose a directory name for dependency files. # This macro is AC_REQUIREd in _AM_DEPENDENCIES AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl ]) # AM_DEP_TRACK # ------------ AC_DEFUN([AM_DEP_TRACK], [AC_ARG_ENABLE(dependency-tracking, [ --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors]) if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AC_SUBST([AMDEPBACKSLASH]) ]) # Generate code to set up dependency tracking. -*- Autoconf -*- # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 # Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. #serial 2 # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [for mf in $CONFIG_FILES; do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # So let's grep whole file. if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then dirpart=`AS_DIRNAME("$mf")` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`AS_DIRNAME(["$file"])` AS_MKDIR_P([$dirpart/$fdir]) # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done ])# _AM_OUTPUT_DEPENDENCY_COMMANDS # AM_OUTPUT_DEPENDENCY_COMMANDS # ----------------------------- # This macro should only be invoked once -- use via AC_REQUIRE. # # This code is only required when automatic dependency tracking # is enabled. FIXME. This creates each `.P' file that we will # need in order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) ]) # Like AC_CONFIG_HEADER, but automatically create stamp file. -*- Autoconf -*- # Copyright (C) 1996, 1997, 2000, 2001, 2003 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # serial 7 # AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) # Do all the work for Automake. -*- Autoconf -*- # This macro actually does too much some checks are only needed if # your package does certain things. But this isn't really a big deal. # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 # Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # serial 11 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- # The call with PACKAGE and VERSION arguments is the old style # call (pre autoconf-2.50), which is being phased out. PACKAGE # and VERSION should now be passed to AC_INIT and removed from # the call to AM_INIT_AUTOMAKE. # We support both call styles for the transition. After # the next Automake release, Autoconf can make the AC_INIT # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.58])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl # test to see if srcdir already configured if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi AC_SUBST([CYGPATH_W]) # Define the identity of the package. dnl Distinguish between old-style and new-style calls. m4_ifval([$2], [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl _AM_IF_OPTION([no-define],, [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) AM_MISSING_PROG(AUTOCONF, autoconf) AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) AM_MISSING_PROG(AUTOHEADER, autoheader) AM_MISSING_PROG(MAKEINFO, makeinfo) AM_PROG_INSTALL_SH AM_PROG_INSTALL_STRIP AC_REQUIRE([AM_PROG_MKDIR_P])dnl # We need awk for the "check" target. The system "awk" is bad on # some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])])]) _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], [_AM_DEPENDENCIES(CC)], [define([AC_PROG_CC], defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES(CXX)], [define([AC_PROG_CXX], defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl ]) ]) # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header # that is generated. The stamp files are numbered to have different names. # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the # loop where config.status creates the headers, so we can generate # our stamp files there. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $1 | $1:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. # Copyright (C) 2001, 2003 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl install_sh=${install_sh-"$am_aux_dir/install-sh"} AC_SUBST(install_sh)]) # -*- Autoconf -*- # Copyright (C) 2003 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # serial 1 # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. AC_DEFUN([AM_SET_LEADING_DOT], [rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null AC_SUBST([am__leading_dot])]) # Check to see how 'make' treats includes. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # serial 2 # AM_MAKE_INCLUDE() # ----------------- # Check to see how make treats includes. AC_DEFUN([AM_MAKE_INCLUDE], [am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo done .PHONY: am__doit END # If we don't find an include directive, just comment out the code. AC_MSG_CHECKING([for style of include used by $am_make]) am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # We grep out `Entering directory' and `Leaving directory' # messages which can occur if `w' ends up in MAKEFLAGS. # In particular we don't look at `^make:' because GNU make might # be invoked under some other name (usually "gmake"), in which # case it prints its new name instead of `make'. if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then am__include=include am__quote= _am_result=GNU fi # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then am__include=.include am__quote="\"" _am_result=BSD fi fi AC_SUBST([am__include]) AC_SUBST([am__quote]) AC_MSG_RESULT([$_am_result]) rm -f confinc confmf ]) # -*- Autoconf -*- # Copyright (C) 1997, 1999, 2000, 2001, 2003 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # serial 3 # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ AC_DEFUN([AM_MISSING_PROG], [AC_REQUIRE([AM_MISSING_HAS_RUN]) $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) # AM_MISSING_HAS_RUN # ------------------ # Define MISSING if not defined so far and test if it supports --run. # If it does, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= AC_MSG_WARN([`missing' script is too old or missing]) fi ]) # AM_PROG_MKDIR_P # --------------- # Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise. # Copyright (C) 2003, 2004 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories # created by `make install' are always world readable, even if the # installer happens to have an overly restrictive umask (e.g. 077). # This was a mistake. There are at least two reasons why we must not # use `-m 0755': # - it causes special bits like SGID to be ignored, # - it may be too restrictive (some setups expect 775 directories). # # Do not use -m 0755 and let people choose whatever they expect by # setting umask. # # We cannot accept any implementation of `mkdir' that recognizes `-p'. # Some implementations (such as Solaris 8's) are not thread-safe: if a # parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c' # concurrently, both version can detect that a/ is missing, but only # one can create it and the other will error out. Consequently we # restrict ourselves to GNU make (using the --version option ensures # this.) AC_DEFUN([AM_PROG_MKDIR_P], [if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then # We used to keeping the `.' as first argument, in order to # allow $(mkdir_p) to be used without argument. As in # $(mkdir_p) $(somedir) # where $(somedir) is conditionally defined. However this is wrong # for two reasons: # 1. if the package is installed by a user who cannot write `.' # make install will fail, # 2. the above comment should most certainly read # $(mkdir_p) $(DESTDIR)$(somedir) # so it does not work when $(somedir) is undefined and # $(DESTDIR) is not. # To support the latter case, we have to write # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir), # so the `.' trick is pointless. mkdir_p='mkdir -p --' else # On NextStep and OpenStep, the `mkdir' command does not # recognize any option. It will interpret all options as # directories to create, and then abort because `.' already # exists. for d in ./-p ./--version; do test -d $d && rmdir $d done # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists. if test -f "$ac_aux_dir/mkinstalldirs"; then mkdir_p='$(mkinstalldirs)' else mkdir_p='$(install_sh) -d' fi fi AC_SUBST([mkdir_p])]) # Helper functions for option handling. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # serial 2 # _AM_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _AM_SET_OPTION(NAME) # ------------------------------ # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), 1)]) # _AM_SET_OPTIONS(OPTIONS) # ---------------------------------- # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], [AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) # ------------------------------------------- # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) # # Check to make sure that the build environment is sane. # # Copyright (C) 1996, 1997, 2000, 2001, 2003 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # serial 3 # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Just in case sleep 1 echo timestamp > conftest.file # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` if test "$[*]" = "X"; then # -L didn't work. set X `ls -t $srcdir/configure conftest.file` fi rm -f conftest.file if test "$[*]" != "X $srcdir/configure conftest.file" \ && test "$[*]" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken alias in your environment]) fi test "$[2]" = conftest.file ) then # Ok. : else AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi AC_MSG_RESULT(yes)]) # AM_PROG_INSTALL_STRIP # Copyright (C) 2001, 2003 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # One issue with vendor `install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip # is unlikely to handle the host's binaries. # Fortunately install-sh will honor a STRIPPROG variable, so we # always use install-sh in `make install-strip', and initialize # STRIPPROG with the value of the STRIP variable (set by the user). AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. dnl Don't test for $cross_compiling = yes, because it might be `maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) # Check how to create a tarball. -*- Autoconf -*- # Copyright (C) 2004 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # serial 1 # _AM_PROG_TAR(FORMAT) # -------------------- # Check how to create a tarball in format FORMAT. # FORMAT should be one of `v7', `ustar', or `pax'. # # Substitute a variable $(am__tar) that is a command # writing to stdout a FORMAT-tarball containing the directory # $tardir. # tardir=directory && $(am__tar) > result.tar # # Substitute a variable $(am__untar) that extract such # a tarball read from stdin. # $(am__untar) < result.tar AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility. AM_MISSING_PROG([AMTAR], [tar]) m4_if([$1], [v7], [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], [m4_case([$1], [ustar],, [pax],, [m4_fatal([Unknown tar format])]) AC_MSG_CHECKING([how to create a $1 tar archive]) # Loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' _am_tools=${am_cv_prog_tar_$1-$_am_tools} # Do not fold the above two line into one, because Tru64 sh and # Solaris sh will not grok spaces in the rhs of `-'. for _am_tool in $_am_tools do case $_am_tool in gnutar) for _am_tar in tar gnutar gtar; do AM_RUN_LOG([$_am_tar --version]) && break done am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' am__untar="$_am_tar -xf -" ;; plaintar) # Must skip GNU tar: if it does not support --format= it doesn't create # ustar tarball either. (tar --version) >/dev/null 2>&1 && continue am__tar='tar chf - "$$tardir"' am__tar_='tar chf - "$tardir"' am__untar='tar xf -' ;; pax) am__tar='pax -L -x $1 -w "$$tardir"' am__tar_='pax -L -x $1 -w "$tardir"' am__untar='pax -r' ;; cpio) am__tar='find "$$tardir" -print | cpio -o -H $1 -L' am__tar_='find "$tardir" -print | cpio -o -H $1 -L' am__untar='cpio -i -H $1 -d' ;; none) am__tar=false am__tar_=false am__untar=false ;; esac # If the value was cached, stop now. We just wanted to have am__tar # and am__untar set. test -n "${am_cv_prog_tar_$1}" && break # tar/untar a dummy directory, and stop if the command works rm -rf conftest.dir mkdir conftest.dir echo GrepMe > conftest.dir/file AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) rm -rf conftest.dir if test -s conftest.tar; then AM_RUN_LOG([$am__untar /dev/null 2>&1 && break fi done rm -rf conftest.dir AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) AC_MSG_RESULT([$am_cv_prog_tar_$1])]) AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR imwheel-1.0.0pre12.orig/README0000644000175000017500000006060310061736135016104 0ustar chrischris00000000000000 www.FreshMeat.net appindex# 903164189 Overview """""""" This is a not so short little ditty that does the simple conversion of mouse button presses into key presses. By grabbing only the 4th and 5th mouse buttons the program is able to receive input from the Intellimouse series mice. There is also a modified version of gpm included that has, already, support for the Intellimouse, and I added a wheel fifo. The user library may also be used, although this may need to be debugged. See the gpm section below for more. The wheel button can always be used as middle button, this program does not affect how the XServer, nor GPM, react towards it. A mouse with a wheel button is a 3 button mouse, and should be configured as such! Required """""""" XFree86 >= 3.3.2 (or other XServer with wheel to mouse button support) not version 4.0.0 for gpm or jam use, FIFO support is broken there. it is fixed in 4.0.1 so upgrade if you are on 4.0.0 Intellimouse or Logitech MouseMan+ (other wheel mice work too...) to compile from source: The X11 include files and libraries. (Not the X server development packages) Installation """""""""""" configure --help configure (and any options you want to set) make make install ********************************************************************** ********************************************************************** **** **** **** READ THE MANPAGE FOR UP TO DATE DOCS! **** **** everything after this point may help, but is not up to date. **** **** **** ********************************************************************** ********************************************************************** The mouse must be setup in XF86Config to send the mouse buttons 4 and 5 for wheel actions. To do this: [ METHOD #1 : XGrabButton ] 1) edit /etc/XF86Config with your favorite editor (I suggest vim! It's crunchy) a. add the following line to the "Pointer" section. for 1 wheel: ZAxisMapping 4 5 for two wheels or a stick: ZAxisMapping 4 5 6 7 b. Make sure your Protocol is set to either "IMPS/2" for a PS/2 mouse or for serial mice set it to "IntelliMouse" or "Auto". It should work for the following mice, which have wheels, knobs, or buttons that are mappable with ZAxisMapping (according to XFree86 documentation): ASCII (serial, PS/2) Genius NetScroll (PS/2) Genius NetMouse and NetMouse Pro (serial, PS/2) Logitech MouseMan+ and FirstMouse+ (serial, PS/2) Half functionality may be obtained from the following mice that have at least a fourth button capability: ALPS Glide-Point (serial, PS/2) ('Tapping' is button 4) The half functionality will only go up and left, unless you include the -4 option on the command-line. c. Here's my current setup for an example of a PS/2 Intellimouse: Section "Pointer" Protocol "IMPS/2" #change for your mouse type. Device "/dev/psaux" #change for your device. BaudRate 1200 #This is probably not needed! Resolution 100 #And neither is this! ZAxisMapping 4 5 #This is necessary! Buttons 3 #Use this instead of Emulate3 stuff! EndSection d. Restart XWindows if you need to! 2) make 3) make install This will currently install to /usr/local/bin, so edit the Makefile to change this behavior. Don't forget to choose whether you want imwheel to be setuid root. This is required for any users who need to use imwheel and the pidfile stuff to track running imwheels. 4) After XWindows is started run imwheel like this: imwheel -k imwheel will automatically background itself this way. I added the -k to force any old imwheel processes to stop. This will not cause imwheel to die if there are no previous imwheels. XFree86 Settings: Make sure Emulate3 phrases are either deleted or commented out to use the wheel button as the middle button(2), and then the right button is button 3. STUPID FACT: Obviously this method can be used for a real 5(+) button mouse as well...but why?! The 4th and 5th buttons may be used as if they were the wheel rolling up and down, but this will remove the regular functionality of the 4th and 5th buttons, unless you "exclude" the windows in which you need the 4th and 5th buttons. [ METHOD #2 : wheel fifo ] This method is REQUIRED for Accelerated-X or any other server without wheel mouse support built in. It is also the recommended method by me! This method will currently support ONLY the ps/2 Intellipoint Mice, not the serial version, nor any other mice for that fact...unless you want to add support in gpm yourself or send me a mouse so that I can implement it in gpm. To add a new mouse to this method no change to imwheel is required. 1) Edit /etc/XF86Config with your favorite editor (I suggest vim! It's crunchy) OR use XF86Setup. That's easier! b. Make sure your Protocol is set to "MouseSystems" Mouse support is dependent on gpm. Right now I KNOW imps2 works! others that may work for you include mm+ps2, marblefx, pcnps2, and ms3. try others if these don't work or another matches your mouse better. c. Here's my current setup for an example of a PS/2 Intellimouse: Section "Pointer" Protocol "MouseSystems" #gpm -R is MouseSystems! Device "/dev/gpmdata" #this is the gpm -R output BaudRate 1200 #works for me... Resolution 100 #i dunno...works again! Buttons 3 #use this,it's better than Emulate3! #if you set this higher...more #configuration is REQUIRED EndSection d. Restart XWindows if you need to! 2) make 3) make install This will currently install to /usr/local/bin, so edit the Makefile to change this behavior. if you want ALL the gpm stuff enter that directory and "make install" there. The usual install only installs the gpm executable. Don't forget to choose whether you want imwheel to be setuid root. This is required for any users who need to use imwheel and the pidfile stuff to track running imwheels. 4) After XWindows is started run : imwheel -k --wheel-fifo imwheel will automatically background itself this way. I added the -k to force any old imwheel processes to stop. This will not cause imwheel to die if there are no previous imwheels. NOTE: the @Exclude command has no bearing in this method, and is ignored. mainly because by excluding a window in this method there is nothing sent to the window for the wheel, whereas in the other mode exclusion turns off the button grabbing and allows the usual button 4 and 5 events again for those clients that either need to grab all the buttons or want to receive the buttons 4 and/or 5 for their own purposes. gpm """ The included gpm is stable, a patch is included as well, and I will try to keep up with the next stable versions. Using the included gpm is only necessary if you are going to use method #2 from above. To use gpm and imwheel together you must run gpm and imwheel as follows: gpm -W -R -t mousetype(see above for known working types) NOTE: gpm may be killed and restarted with imwheel running, imwheel and gpm can both handle this interruption just fine. When gpm is dead, both the XServer and imwheel will not respond to the mouse. You will need to run gpm again! Other options may be added of course!! use -w to force wheel. use gpm -h to see them. imwheel -k -W /dev/gpmwheel or imwheel -k --wheel-fifo or imwheel -k --wheel-fifo /dev/gpmwheel or imwheel -k --wheel-fifo /dev/jam_imwheel:0 # number zero may be higher if you want ALL the gpm stuff enter that directory and "make install" there. The usual install only installs the gpm executable. NOTE : gpm will create the fifo if it needs to, imwheel will not. /dev/gpmwheel is simple it output a 4 or 5 (byte not char!) for up and down. You may use it in other programs if imwheel is not used...but why? od the fifo to watch your wheel at work (od is an octal dumper!), it requires a line for output so wheel a lot to see your mouse actions! The gpm currently included is a hacked beta, which may sound bad, but it's been very stable for my imps2. JAM """ For jam to work with imwheel you will have to place the imwheel output module in the mice/file that you are using for your mouse. see the mice/imps2 file for an example. See also the JAM documentation. JAM will then output imwheel compatible streams on the /dev/jam_imwheel:* set of FIFOs, see JAM docs on multiple FIFO outputs. JAM is the only way to use multiple running imwheels, one for each DISPLAY you may have, for multiple displays. If you only have one screen then this doesn't really matter to you. XWheel is the full client to be paired with JAM and intended to replace imwheel. IMWheel is now an aging product...only maintanance work is being done on imwheel and it's version/hack of GPM. .imwheelrc """""""""" [ OVERVIEW ] The configuration of specific clients is taken care of in the file called "$HOME/.imwheelrc" or "/etc/X11/imwheelrc". All arguments in the file are separated by commas. The pound(#) symbol may be used anywhere for comments. Case is VERY important in the configuration file! [ WINDOWS ] In this file windows are configured by title name, resource name, or class name. Each window is configured on multiple lines. The first line in a window section is the window pattern string enclosed in double-quotes("), then one line each for each action in that window. Double-quotes must surround window identifier strings, and only these strings are allowed to be quoted. Without the double-quotes that window's section will be parsed as if it is in the previous window's section! The windows are matched at run-time using regular expression syntax, so to match a group of windows make up the appropriate regex pattern and use that as the identifier. [ REGULAR EXPRESSIONS ] Regular expressions are used, for one reason, because they are built into C, and the other, they are powerful! One thing to note is that if you don't put a ^ (caret) at the beginning of each string then you may end up with a string matching a substring that doesn't begin with the expression. Which is why in the distributed file most entries begin with a caret now. O'Reilly & Associates has a great Regular expressions book that you can get, and it covers the type of expression syntax used here. [ COMMANDS ] Commands are began with an at('@') character. They apply to the window whose section they are in. Mixing commands and window wheel actions may achieve undesired results. For now mixing is moot, being that the only command is to turn off wheel actions! Available commands: @Exclude This will un-grab the mouse buttons for the current window, it will attempt to re-grab the mouse buttons when the keyboard focus is changed. Once the focus window has changed from the excluded window, every motion of the mouse will cause an attempt to re-grab the buttons. The program will catch all errors during this period. Once the buttons are grabbed successfully the program resumes normal wheel operation. NOTE: This command is required for the "xv grab" window! This command is unused with the --wheel-fifo option, see gpm. [ KEYSYMS ] The program expects combinations of keysyms to be used by using pipe(|) characters to combine them together. Example: Alt_R|Shift_R Means Right Alt AND Right shift together, not just either-or! Modifier Keysym names used in X: Shift_L Shift_R Control_L Control_R Alt_L Alt_R These are not currently assigned any keys, unless you xmodmap them in: Super_L Super_R Hyper_L Hyper_R And here's some that you may use, and they are somewhere on your keyboard! Here's where they were on my keyboard, again, this is not universal. Use the "xev" program to test your own keys on your keyboard! Caps_Lock =The Caps Lock key! (This still turns on and off caps lock!) Num_Lock =The Num Lock key! (This is not good to use...) Multi_key =The scroll lock key! (Go figure!) Mode_switch =Right Alt...for me anyways. (this mean I cannot use Alt_R) NOTE: You can add support for the windows keys. They may be set up for you as Super_L and Super_R. If not use xmodmap or better, Xkeycaps the graphical frontend, to set them up as these Super keys. To find keysym names for any keys available see the /usr/X11R6/include/X11/keysymdef.h file, and for any define in that file remove the "XK_" for the usable keysym name in the configuration file. If no input keysyms are named, any input modifier keys will be ignored, and that action will match if the wheel action is matched! Order matters here a lot! Put a no-input-modifier keysym at the end of it's section for what you most likely want to happen! The "None" keysym is preferred in this situation, however. "None" is another special keysym used to indicate no input modifier is allowed. This is used to make the action not match when a modifier is pressed. "Pass" is a special keysym used to tell imwheel to pass the button press through to the client window as if imwheel was not present. (Not implemented yet!) The Modifier keysym(s) are the expected keys to be pressed along with the wheel actions. If the modifier is not a match, that action is not done. The second field is the mouse wheel action, "Up" or "Down". The Output Keysyms (the second set of keysyms) are the keys that are pressed when the following conditions are met: 1) Current Focused window (not a mouse over thing!) has a match as a title, resource, or class name to the window regex pattern specified as the window identifier. 2) Current pressed keys on keyboard match the Modifier Keysym(s), or there are no modifier keysyms to match. 3) The wheel is moving up or down and that matches the second argument. [ REPS ] Reps (Repetitions) lets you say a number for how many times you want the output keysyms to be pressed. See the chart on the default bindings for the default number of reps for each modifier-combo (The chart is near the end of this document). [ DELAYS ] Two delays are configurable in the "/etc/X11/imwheelrc" and/or the "$HOME/.imwheelrc" files. The first delay is the delay between repetitions. The second delay is the delay between key down and key up events. If you make the delay too long expect the likelyness of the sticky keys bug to occur (see BUGS file). The delays are specified in microseconds. see the included imwheelrc file (which you should copy/merge) for the netscape configuration that works best for me! [ FILES ] See the included imwheelrc file for a few examples of configured windows. This file is a good start and may be copied into the users home directory as ".imwheelrc" and/or into /etc/X11/imwheelrc for a default setup for all users. Then modify your individual copy or the /etc copy to add more windows. [ CONFIGURATION HELPER ] There is a "hidden" configuration helper that can be called up while running XWindows and imwheel. The helper is called by wiggling the wheel up and down in X's root window until it appears. The helper is able to do the following: 1) Grab windows and display relevant configuration information, that is: Window title, Resource name, and Class name. The class name is usually the best thing to use, but this is up to you to decide! 2) Grab wheel actions and display the modifiers to use in the imwheelrc file. 3) Reload the imwheelrc file, this actually restarts imwheel for you! The Cancel button merely exits the helper, however the imwheelrc file is not rescanned, so no changes will be reflected in continued wheel usage. To grab a window, click on the image on the left, and then click on a window. If the window can be used with imwheel it will appear in the big button. This is determined soley by window focus. I use focus on mouse over so this works great for me, however those who use click-focus may not see the expected results. It's just trying to help... To grab a wheel action, press the button label as such and then press and hold you desired modifier keys then roll the wheel in the direction to configure. The wheel direction to use in the file will be shown with a list of the modifiers below it. Output keys can be grabbed somewhat similarly in this manner however the shifted keys may need to be translated to the actual characters desired, this was not the case for XTerm though. [ PLEAD ] Please send your configuration additions to me at one of the addresses stated below for possible inclusion in further releases. If deemed useful and sensible it will be added to the distribution. Please don't write asking for help with the rc file! Ask for features and bug fixes, sure, but not any more of a tutorial than this! [ SYNTAX ] The following syntax is available ('<' and '>' characters signify variables required to be filled in, '[' and ']' are optional variables): # blank lines are ignored, and not needed, as are comments ignored. # whitespace is ignored unless contained in quotes. "" [Modifier keysym(s)/None],,[Keysym(s)/Pass],[Reps],[RepDelay],[DelayUp] [Modifier keysym(s)/None],,[Keysym(s)/Pass],[Reps],[RepDelay],[DelayUp] [Modifier keysym(s)/None],,[Keysym(s)/Pass],[Reps],[RepDelay],[DelayUp] ...more modifiers, etc... "" @ "" [Modifier keysym(s)/None],,[Keysym(s)/Pass],[Reps],[RepDelay],[DelayUp] ...and so forth... The best example is availble in the supplied imwheelrc file, in the netscape section, there is a commented-out version of Up and Down that do smooth repeating up or down keys respectively and it is tuned to have a working delay for netscape to catchup. Options """"""" Use the -h or --help option for all available options, and documentation. --long-args can also be written as -long-args, but this sometimes causes other combinations of short-args to fail due to ambiguity, just state them separately to avoid the ambiguity. (e.g.: -pdD => -p -d -D) Notation: "<>" surrounds required args "[]" surrounds optional args. -4 --flip-buttons Flips the mouse buttons so that 4 is 5 and 5 is 4, reversing the Up and Down actions. This would make 4 buttons more useful! See also the manpage for xmodmap. -f --force Forces the X event subwindow to be used instead of the original hack that would replace the subwindow in the X event with a probed focus query (XGetInputFocus). This should fix some compatability problems with some window managers, such as window maker, and perhaps enlightenment. If nothing seems to be working right, try toggling this on or off... -W --wheel-fifo [fifo-path] Use the gpm wheel fifo instead of XGrabMouse. See gpm section. This method allows only one X display to be used. This is required for method #2 to work. @Exclude commands in the rc file are unused in this mode. fifo names the named pipe created by gpm. It defaults to "/dev/gpmwheel". (--wheel-fifo only) Must exist before running imwheel in this mode. -k --kill Attempts to kill old imwheel (written in --wheel-fifo method only.) Pidfile must be created for this to work. Process is tested using /proc/${pid}/status Name: field ?= imwheel. If /proc is not mounted then this fails everytime! -p --pid Don't write a pidfile for --wheel-fifo method. This is the only method that uses the pidfile. XGrab doesn't need it, so it just issues a warning about starting multiple imwheels on the same display. -X --display use XServer at a specified display in standard X form. using this mode allows for multiple displays. this is useful in method #1. -D --debug Show all possible debug info while running. This spits out alot and I also suggest using the -d option to prevent imwheel from detaching from the controlling terminal. -d --detach Actually this does the opposite, it prevents detachment from the controlling terminal. (no daemon...) Control-C stops, etc... -h --help short help on options plus version/author info. -q --quit Quit imwheel before entering event loop. Usful in killing an imwheel running in --wheel-fifo mode after exiting XWindows. (e.g.: imwheel -k -q = kill and quit) -s --sensitivity Used with gpm only and then only with recognized stick mice. like -t only this sets a minimum total amount of movment of the stick or marble, before any action is taken. This works good with the Marble type devices. See also --threshhold. -t --threshhold Used with gpm only and then only with recognized stick mice. stick mice send a pressure value ranging from 0(no pressure) to 7(hard push). This sets the minimum required pressure for movement. setting it to zero will cause realtime sticking, which is usually too much action for X to keep up. (max rate i saw was 100 events a second!) The default is 2, to avoid slight presses on the 90degree direction of the intended while still getting to the intended direction. Setting this to 7 is insane, because it requires the user to press the hardest everytime they want something to happen! See also --sensitivity. Usage """"" The default modifier/wheel actions that are hard-coded will always be present when an imwheelrc file doesn't provide a match or doesn't exist. Default modifier effects chart: Modifier Effect (Up, Down) Repetitions -------- ----------------- ----------- None Page_Up, Page_Down 1 Shift Up, Down 1 Control Page_Up, Page_Down 2 Shift+Control Page_Up, Page_Down 5 Meta(that's Alt!) Left, Right 10 Shift+Meta Left, Right 1 Control+Meta Left, Right 20 Shift+Control+Meta Left, Right 50 For left and Right on wheels and sticks the repetitions are all that matter, because they only go left and right by default. This can be changed in the imwheelrc. Us the Left or Right keyword for the input action keyword to alter left and right motions of a wheel or stick. Lefty X Usage """"" " """"" For left handed users this command may help at the start of X: xmodmap -e "pointer = 3 2 1 4 5" Contact Info """"""" """" Jonathan Atkins 2012 River Run Trail Fort Wayne, IN 46825-6041 jcatki@jonatkins.org imwheel-1.0.0pre12.orig/setmmplus.c0000644000175000017500000000301607203176121017411 0ustar chrischris00000000000000#include #include #include #include #include #ifdef HAVE_FCNTL_H #include #endif #include #ifdef HAVE_UNISTD_H #include #endif #include #include char readps2(int fd) { char ch; while(read(fd,&ch,1) && (ch==(char)0xfa || ch==(char)0xaa)) { fprintf(stderr,"<%02X>",ch&0xff); fflush(stdout); } fprintf(stderr,"[%02X]",ch&0xff); return(ch); } int main(int argc, char **argv) { int fd; char ch, getdevtype=0xf2, disabledev=0xf5, setmmplus[]={0xe6,0xe8,0,0xe8,3,0xe8,2,0xe8,1,0xe6,0xe8,3,0xe8,1,0xe8,2,0xe8,3,}, setupmore[7]={0xf6,0xe6,0xf4,0xf3,100,0xe8,3}, resetps2=0xff; if(argc>1) fd=open(argv[1],O_RDWR); else fd=open("/dev/mouse",O_RDWR); write(fd,&disabledev,1); tcflush(fd, TCIFLUSH); write(fd,&getdevtype,1); sleep(1); ch=readps2(fd); fprintf(stderr,"device type=%02X(%4d)\n",ch&0xff,ch); write(fd,&resetps2,1); sleep(1); ch=readps2(fd); fprintf(stderr,"reset response=%02X(%4d)\n",ch&0xff,ch); tcflush(fd, TCIFLUSH); write(fd,&getdevtype,1); sleep(1); ch=readps2(fd); fprintf(stderr,"device type=%02X(%4d)\n",ch&0xff,ch); write(fd,&setmmplus,sizeof(setmmplus)); write(fd,&setupmore,7); tcflush(fd, TCIFLUSH); write(fd,&getdevtype,1); sleep(1); ch=readps2(fd); fprintf(stderr,"device type=%02X(%4d)\n",ch&0xff,ch); tcflush(fd, TCIFLUSH); write(fd,&getdevtype,1); sleep(1); ch=readps2(fd); fprintf(stderr,"device type=%02X(%4d)\n",ch&0xff,ch); close(fd); return(0); } imwheel-1.0.0pre12.orig/configure0000755000175000017500000072657510114330360017141 0ustar chrischris00000000000000#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.59. # # Copyright (C) 2003 Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## # Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then set -o posix fi DUALCASE=1; export DUALCASE # for MKS sh # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset else as_unset=false fi # Work around bugs in pre-3.0 UWIN ksh. $as_unset ENV MAIL MAILPATH PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. for as_var in \ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ LC_TELEPHONE LC_TIME do if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else $as_unset $as_var fi done # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi # Name of the executable. as_me=`$as_basename "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)$' \| \ . : '\(.\)' 2>/dev/null || echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } /^X\/\(\/\/\)$/{ s//\1/; q; } /^X\/\(\/\).*/{ s//\1/; q; } s/.*/./; q'` # PATH needs CR, and LINENO needs CR and PATH. # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi as_lineno_1=$LINENO as_lineno_2=$LINENO as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && test "x$as_lineno_3" = "x$as_lineno_2" || { # Find who we are. Look in the path if we contain no path at all # relative or not. case $0 in *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2 { (exit 1); exit 1; }; } fi case $CONFIG_SHELL in '') as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for as_base in sh bash ksh sh5; do case $as_dir in /*) if ("$as_dir/$as_base" -c ' as_lineno_1=$LINENO as_lineno_2=$LINENO as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } CONFIG_SHELL=$as_dir/$as_base export CONFIG_SHELL exec "$CONFIG_SHELL" "$0" ${1+"$@"} fi;; esac done done ;; esac # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a # line-number line before each line; the second 'sed' does the real # work. The second script uses 'N' to pair each line-number line # with the numbered line, and appends trailing '-' during # substitution so that $LINENO is not a special case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) sed '=' <$as_myself | sed ' N s,$,-, : loop s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, t loop s,-$,, s,^['$as_cr_digits']*\n,, ' >$as_me.lineno && chmod +x $as_me.lineno || { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensible to this). . ./$as_me.lineno # Exit status is that of the last command. exit } case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in *c*,-n*) ECHO_N= ECHO_C=' ' ECHO_T=' ' ;; *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; *) ECHO_N= ECHO_C='\c' ECHO_T= ;; esac if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then # We could just check for DJGPP; but this test a) works b) is more generic # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). if test -f conf$$.exe; then # Don't use ln at all; we don't have any links as_ln_s='cp -p' else as_ln_s='ln -s' fi elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.file if mkdir -p . 2>/dev/null; then as_mkdir_p=: else test -d ./-p && rmdir ./-p as_mkdir_p=false fi as_executable_p="test -f" # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" # IFS # We need space, tab and new line, in precisely that order. as_nl=' ' IFS=" $as_nl" # CDPATH. $as_unset CDPATH # Name of the host. # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` exec 6>&1 # # Initializations. # ac_default_prefix=/usr/local ac_config_libobj_dir=. cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= SHELL=${CONFIG_SHELL-/bin/sh} # Maximum number of lines to put in a shell here document. # This variable seems obsolete. It should probably be removed, and # only ac_max_sed_lines should be used. : ${ac_max_here_lines=38} # Identity of this package. PACKAGE_NAME= PACKAGE_TARNAME= PACKAGE_VERSION= PACKAGE_STRING= PACKAGE_BUGREPORT= ac_unique_file="imwheel.c" # Factoring default headers for most tests. ac_includes_default="\ #include #if HAVE_SYS_TYPES_H # include #endif #if HAVE_SYS_STAT_H # include #endif #if STDC_HEADERS # include # include #else # if HAVE_STDLIB_H # include # endif #endif #if HAVE_STRING_H # if !STDC_HEADERS && HAVE_MEMORY_H # include # endif # include #endif #if HAVE_STRINGS_H # include #endif #if HAVE_INTTYPES_H # include #else # if HAVE_STDINT_H # include # endif #endif #if HAVE_UNISTD_H # include #endif" ac_subdirs_all="$ac_subdirs_all gpm-1.19.3" ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE RANLIB ac_ct_RANLIB CPP EGREP suid SUID_TRUE SUID_FALSE getopt GETOPT_LIBS GETOPT_INCS getopt_dist mdetect mdetect_dist mdump mdump_dist extras extras_dist GPM_DIR HAVE_GPM_SRC subdirs NO_GPM_DOC_TRUE NO_GPM_DOC_FALSE gpm_imwheel gpm_dist X_CFLAGS X_PRE_LIBS X_LIBS X_EXTRA_LIBS LIBOBJS LTLIBOBJS' ac_subst_files='' # Initialize some variables set by options. ac_init_help= ac_init_version=false # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datadir='${prefix}/share' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' libdir='${exec_prefix}/lib' includedir='${prefix}/include' oldincludedir='/usr/include' infodir='${prefix}/info' mandir='${prefix}/man' ac_prev= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval "$ac_prev=\$ac_option" ac_prev= continue fi ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'` # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_option in -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad | --data | --dat | --da) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ | --da=*) datadir=$ac_optarg ;; -disable-* | --disable-*) ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } ac_feature=`echo $ac_feature | sed 's/-/_/g'` eval "enable_$ac_feature=no" ;; -enable-* | --enable-*) ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } ac_feature=`echo $ac_feature | sed 's/-/_/g'` case $ac_option in *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; *) ac_optarg=yes ;; esac eval "enable_$ac_feature='$ac_optarg'" ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst \ | --locals | --local | --loca | --loc | --lo) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* \ | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } ac_package=`echo $ac_package| sed 's/-/_/g'` case $ac_option in *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; *) ac_optarg=yes ;; esac eval "with_$ac_package='$ac_optarg'" ;; -without-* | --without-*) ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } ac_package=`echo $ac_package | sed 's/-/_/g'` eval "with_$ac_package=no" ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) { echo "$as_me: error: unrecognized option: $ac_option Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 { (exit 1); exit 1; }; } ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` eval "$ac_envvar='$ac_optarg'" export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` { echo "$as_me: error: missing argument to $ac_option" >&2 { (exit 1); exit 1; }; } fi # Be sure to have absolute paths. for ac_var in exec_prefix prefix do eval ac_val=$`echo $ac_var` case $ac_val in [\\/$]* | ?:[\\/]* | NONE | '' ) ;; *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 { (exit 1); exit 1; }; };; esac done # Be sure to have absolute paths. for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \ localstatedir libdir includedir oldincludedir infodir mandir do eval ac_val=$`echo $ac_var` case $ac_val in [\\/$]* | ?:[\\/]* ) ;; *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 { (exit 1); exit 1; }; };; esac done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used." >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then its parent. ac_confdir=`(dirname "$0") 2>/dev/null || $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$0" : 'X\(//\)[^/]' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$0" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` srcdir=$ac_confdir if test ! -r $srcdir/$ac_unique_file; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r $srcdir/$ac_unique_file; then if test "$ac_srcdir_defaulted" = yes; then { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2 { (exit 1); exit 1; }; } else { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 { (exit 1); exit 1; }; } fi fi (cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null || { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2 { (exit 1); exit 1; }; } srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'` ac_env_build_alias_set=${build_alias+set} ac_env_build_alias_value=$build_alias ac_cv_env_build_alias_set=${build_alias+set} ac_cv_env_build_alias_value=$build_alias ac_env_host_alias_set=${host_alias+set} ac_env_host_alias_value=$host_alias ac_cv_env_host_alias_set=${host_alias+set} ac_cv_env_host_alias_value=$host_alias ac_env_target_alias_set=${target_alias+set} ac_env_target_alias_value=$target_alias ac_cv_env_target_alias_set=${target_alias+set} ac_cv_env_target_alias_value=$target_alias ac_env_CC_set=${CC+set} ac_env_CC_value=$CC ac_cv_env_CC_set=${CC+set} ac_cv_env_CC_value=$CC ac_env_CFLAGS_set=${CFLAGS+set} ac_env_CFLAGS_value=$CFLAGS ac_cv_env_CFLAGS_set=${CFLAGS+set} ac_cv_env_CFLAGS_value=$CFLAGS ac_env_LDFLAGS_set=${LDFLAGS+set} ac_env_LDFLAGS_value=$LDFLAGS ac_cv_env_LDFLAGS_set=${LDFLAGS+set} ac_cv_env_LDFLAGS_value=$LDFLAGS ac_env_CPPFLAGS_set=${CPPFLAGS+set} ac_env_CPPFLAGS_value=$CPPFLAGS ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set} ac_cv_env_CPPFLAGS_value=$CPPFLAGS ac_env_CPP_set=${CPP+set} ac_env_CPP_value=$CPP ac_cv_env_CPP_set=${CPP+set} ac_cv_env_CPP_value=$CPP # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures this package to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] _ACEOF cat <<_ACEOF Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --datadir=DIR read-only architecture-independent data [PREFIX/share] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --infodir=DIR info documentation [PREFIX/info] --mandir=DIR man documentation [PREFIX/man] _ACEOF cat <<\_ACEOF Program names: --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names X features: --x-includes=DIR X include files are in DIR --x-libraries=DIR X library files are in DIR _ACEOF fi if test -n "$ac_init_help"; then cat <<\_ACEOF Optional Features: --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors --enable-suid=user suid user default=root the imwheel executable no --enable-mdetect build mdetect, a ps/2 mouse data detector no --enable-mdump build mdump, a ps/2 mouse data dumper no --enable-extras build some extra ps/2 mouse debugging utils no --enable-gpm build gpm-imwheel build if source present --enable-gpm-doc build in gpm/doc build if source present Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-pid-dir=dir use dir for pid files /tmp --with-getopt use included getopt guessed --with-x use the X Window System Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory CPPFLAGS C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP C preprocessor Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. _ACEOF fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. ac_popdir=`pwd` for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d $ac_dir || continue ac_builddir=. if test "$ac_dir" != .; then ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A "../" for each directory in $ac_dir_suffix. ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` else ac_dir_suffix= ac_top_builddir= fi case $srcdir in .) # No --srcdir option. We are building in place. ac_srcdir=. if test -z "$ac_top_builddir"; then ac_top_srcdir=. else ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` fi ;; [\\/]* | ?:[\\/]* ) # Absolute path. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ;; *) # Relative path. ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_builddir$srcdir ;; esac # Do not use `cd foo && pwd` to compute absolute paths, because # the directories may not exist. case `pwd` in .) ac_abs_builddir="$ac_dir";; *) case "$ac_dir" in .) ac_abs_builddir=`pwd`;; [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; *) ac_abs_builddir=`pwd`/"$ac_dir";; esac;; esac case $ac_abs_builddir in .) ac_abs_top_builddir=${ac_top_builddir}.;; *) case ${ac_top_builddir}. in .) ac_abs_top_builddir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; esac;; esac case $ac_abs_builddir in .) ac_abs_srcdir=$ac_srcdir;; *) case $ac_srcdir in .) ac_abs_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; esac;; esac case $ac_abs_builddir in .) ac_abs_top_srcdir=$ac_top_srcdir;; *) case $ac_top_srcdir in .) ac_abs_top_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; esac;; esac cd $ac_dir # Check for guested configure; otherwise get Cygnus style configure. if test -f $ac_srcdir/configure.gnu; then echo $SHELL $ac_srcdir/configure.gnu --help=recursive elif test -f $ac_srcdir/configure; then echo $SHELL $ac_srcdir/configure --help=recursive elif test -f $ac_srcdir/configure.ac || test -f $ac_srcdir/configure.in; then echo $ac_configure --help else echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi cd $ac_popdir done fi test -n "$ac_init_help" && exit 0 if $ac_init_version; then cat <<\_ACEOF Copyright (C) 2003 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit 0 fi exec 5>config.log cat >&5 <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by $as_me, which was generated by GNU Autoconf 2.59. Invocation command line was $ $0 $@ _ACEOF { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` hostinfo = `(hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. echo "PATH: $as_dir" done } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_sep= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; 2) ac_configure_args1="$ac_configure_args1 '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" # Get rid of the leading space. ac_sep=" " ;; esac done done $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Be sure not to use single quotes in there, as some shells, # such as our DU 5.0 friend, will then `close' the trap. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo cat <<\_ASBOX ## ---------------- ## ## Cache variables. ## ## ---------------- ## _ASBOX echo # The following way of writing the cache mishandles newlines in values, { (set) 2>&1 | case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in *ac_space=\ *) sed -n \ "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" ;; *) sed -n \ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" ;; esac; } echo cat <<\_ASBOX ## ----------------- ## ## Output variables. ## ## ----------------- ## _ASBOX echo for ac_var in $ac_subst_vars do eval ac_val=$`echo $ac_var` echo "$ac_var='"'"'$ac_val'"'"'" done | sort echo if test -n "$ac_subst_files"; then cat <<\_ASBOX ## ------------- ## ## Output files. ## ## ------------- ## _ASBOX echo for ac_var in $ac_subst_files do eval ac_val=$`echo $ac_var` echo "$ac_var='"'"'$ac_val'"'"'" done | sort echo fi if test -s confdefs.h; then cat <<\_ASBOX ## ----------- ## ## confdefs.h. ## ## ----------- ## _ASBOX echo sed "/^$/d" confdefs.h | sort echo fi test "$ac_signal" != 0 && echo "$as_me: caught signal $ac_signal" echo "$as_me: exit $exit_status" } >&5 rm -f core *.core && rm -rf conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -rf conftest* confdefs.h # AIX cpp loses on an empty file, so make sure it contains at least a newline. echo >confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer explicitly selected file to automatically selected ones. if test -z "$CONFIG_SITE"; then if test "x$prefix" != xNONE; then CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" else CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" fi fi for ac_site_file in $CONFIG_SITE; do if test -r "$ac_site_file"; then { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special # files actually), so we avoid doing that. if test -f "$cache_file"; then { echo "$as_me:$LINENO: loading cache $cache_file" >&5 echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . $cache_file;; *) . ./$cache_file;; esac fi else { echo "$as_me:$LINENO: creating cache $cache_file" >&5 echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in `(set) 2>&1 | sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val="\$ac_cv_env_${ac_var}_value" eval ac_new_val="\$ac_env_${ac_var}_value" case $ac_old_set,$ac_new_set in set,) { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 echo "$as_me: former value: $ac_old_val" >&2;} { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 echo "$as_me: current value: $ac_new_val" >&2;} ac_cache_corrupted=: fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 echo "$as_me: error: changes in the environment can compromise the build" >&2;} { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} { (exit 1); exit 1; }; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu am__api_version="1.9" ac_aux_dir= for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do if test -f $ac_dir/install-sh; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f $ac_dir/install.sh; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break elif test -f $ac_dir/shtool; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;} { (exit 1); exit 1; }; } fi ac_config_guess="$SHELL $ac_aux_dir/config.guess" ac_config_sub="$SHELL $ac_aux_dir/config.sub" ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. # 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 # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6 if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in ./ | .// | /cC/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi done done ;; esac done 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 "$as_me:$LINENO: result: $INSTALL" >&5 echo "${ECHO_T}$INSTALL" >&6 # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' echo "$as_me:$LINENO: checking whether build environment is sane" >&5 echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6 # Just in case sleep 1 echo timestamp > conftest.file # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. set X `ls -t $srcdir/configure conftest.file` fi rm -f conftest.file if test "$*" != "X $srcdir/configure conftest.file" \ && test "$*" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". { { echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken alias in your environment" >&5 echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken alias in your environment" >&2;} { (exit 1); exit 1; }; } fi test "$2" = conftest.file ) then # Ok. : else { { echo "$as_me:$LINENO: error: newly created file is older than distributed files! Check your system clock" >&5 echo "$as_me: error: newly created file is older than distributed files! Check your system clock" >&2;} { (exit 1); exit 1; }; } fi echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 test "$program_prefix" != NONE && program_transform_name="s,^,$program_prefix,;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s,\$,$program_suffix,;$program_transform_name" # Double any \ or $. echo might interpret backslashes. # By default was `s,x,x', remove it if useless. cat <<\_ACEOF >conftest.sed s/[\\$]/&&/g;s/;s,x,x,$// _ACEOF program_transform_name=`echo $program_transform_name | sed -f conftest.sed` rm conftest.sed # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5 echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} fi if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then # We used to keeping the `.' as first argument, in order to # allow $(mkdir_p) to be used without argument. As in # $(mkdir_p) $(somedir) # where $(somedir) is conditionally defined. However this is wrong # for two reasons: # 1. if the package is installed by a user who cannot write `.' # make install will fail, # 2. the above comment should most certainly read # $(mkdir_p) $(DESTDIR)$(somedir) # so it does not work when $(somedir) is undefined and # $(DESTDIR) is not. # To support the latter case, we have to write # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir), # so the `.' trick is pointless. mkdir_p='mkdir -p --' else # On NextStep and OpenStep, the `mkdir' command does not # recognize any option. It will interpret all options as # directories to create, and then abort because `.' already # exists. for d in ./-p ./--version; do test -d $d && rmdir $d done # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists. if test -f "$ac_aux_dir/mkinstalldirs"; then mkdir_p='$(mkinstalldirs)' else mkdir_p='$(install_sh) -d' fi fi for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_AWK+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AWK="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then echo "$as_me:$LINENO: result: $AWK" >&5 echo "${ECHO_T}$AWK" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$AWK" && break done echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'` if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.make <<\_ACEOF all: @echo 'ac_maketemp="$(MAKE)"' _ACEOF # GNU make sometimes prints "make[1]: Entering...", which would confuse us. eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=` if test -n "$ac_maketemp"; then eval ac_cv_prog_make_${ac_make}_set=yes else eval ac_cv_prog_make_${ac_make}_set=no fi rm -f conftest.make fi if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 SET_MAKE= else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 SET_MAKE="MAKE=${MAKE-make}" fi rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null # test to see if srcdir already configured if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5 echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;} { (exit 1); exit 1; }; } fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi # Define the identity of the package. PACKAGE=imwheel VERSION=1.0.0pre12 cat >>confdefs.h <<_ACEOF #define PACKAGE "$PACKAGE" _ACEOF cat >>confdefs.h <<_ACEOF #define VERSION "$VERSION" _ACEOF # Some tools Automake needs. ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} install_sh=${install_sh-"$am_aux_dir/install-sh"} # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_STRIP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then echo "$as_me:$LINENO: result: $STRIP" >&5 echo "${ECHO_T}$STRIP" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":" fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 echo "${ECHO_T}$ac_ct_STRIP" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi STRIP=$ac_ct_STRIP else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" # We need awk for the "check" target. The system "awk" is bad on # some platforms. # Always define AMTAR for backward compatibility. AMTAR=${AMTAR-"${am_missing_run}tar"} am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' Warnings=0 Good=xyes system=`uname -s` ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi CC=$ac_ct_CC else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi CC=$ac_ct_CC else CC="$ac_cv_prog_CC" fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl 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 "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$ac_ct_CC" && break done CC=$ac_ct_CC fi fi test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&5 echo "$as_me: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } # Provide some information about the compiler. echo "$as_me:$LINENO:" \ "checking for C compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 (eval $ac_compiler --version &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 (eval $ac_compiler -v &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 (eval $ac_compiler -V &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5 (eval $ac_link_default) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # Find the output, starting from the most likely. This scheme is # not robust to junk in `.', hence go to wildcards (a.*) only as a last # resort. # Be careful to initialize this variable, since it used to be cached. # Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile. ac_cv_exeext= # b.out is created by i960 compilers. for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; conftest.$ac_ext ) # This is the source file. ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` # FIXME: I believe we export ac_cv_exeext for Libtool, # but it would be cool to find out if it's true. Does anybody # maintain Libtool? --akim. export ac_cv_exeext break;; * ) break;; esac done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { echo "$as_me:$LINENO: error: C compiler cannot create executables See \`config.log' for more details." >&5 echo "$as_me: error: C compiler cannot create executables See \`config.log' for more details." >&2;} { (exit 77); exit 77; }; } fi ac_exeext=$ac_cv_exeext echo "$as_me:$LINENO: result: $ac_file" >&5 echo "${ECHO_T}$ac_file" >&6 # Check the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. echo "$as_me:$LINENO: checking whether the C compiler works" >&5 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0 # If not cross compiling, check that we can run a simple program. if test "$cross_compiling" != yes; then if { ac_try='./$ac_file' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { echo "$as_me:$LINENO: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&5 echo "$as_me: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi fi fi echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 rm -f a.out a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save # Check the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 echo "$as_me:$LINENO: result: $cross_compiling" >&5 echo "${ECHO_T}$cross_compiling" >&6 echo "$as_me:$LINENO: checking for suffix of executables" >&5 echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` export ac_cv_exeext break;; * ) break;; esac done else { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi rm -f conftest$ac_cv_exeext echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 echo "${ECHO_T}$ac_cv_exeext" >&6 rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT echo "$as_me:$LINENO: checking for suffix of object files" >&5 echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6 if test "${ac_cv_objext+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 echo "${ECHO_T}$ac_cv_objext" >&6 OBJEXT=$ac_cv_objext ac_objext=$OBJEXT echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 if test "${ac_cv_c_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 GCC=`test $ac_compiler_gnu = yes && echo yes` ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS CFLAGS="-g" echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 if test "${ac_cv_prog_cc_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_prog_cc_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_prog_cc_g=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 if test "${ac_cv_prog_cc_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_prog_cc_stdc=no ac_save_CC=$CC cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std1 is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std1. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF # Don't try gcc -ansi; that turns off useful extensions and # breaks some systems' header files. # AIX -qlanglvl=ansi # Ultrix and OSF/1 -std1 # HP-UX 10.20 and later -Ae # HP-UX older versions -Aa -D_HPUX_SOURCE # SVR4 -Xc -D__EXTENSIONS__ for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_prog_cc_stdc=$ac_arg break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext done rm -f conftest.$ac_ext conftest.$ac_objext CC=$ac_save_CC fi case "x$ac_cv_prog_cc_stdc" in x|xno) echo "$as_me:$LINENO: result: none needed" >&5 echo "${ECHO_T}none needed" >&6 ;; *) echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 CC="$CC $ac_cv_prog_cc_stdc" ;; esac # Some people use a C++ compiler to compile C. Since we use `exit', # in C++ we need to declare it. In case someone uses the same compiler # for both compiling C and C++ we need to have the C++ compiler decide # the declaration of exit, since it's the most demanding environment. cat >conftest.$ac_ext <<_ACEOF #ifndef __cplusplus choke me #endif _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then for ac_declaration in \ '' \ 'extern "C" void std::exit (int) throw (); using std::exit;' \ 'extern "C" void std::exit (int); using std::exit;' \ 'extern "C" void exit (int) throw ();' \ 'extern "C" void exit (int);' \ 'void exit (int);' do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_declaration #include int main () { exit (42); ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 continue fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_declaration int main () { exit (42); ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done rm -f conftest* if test -n "$ac_declaration"; then echo '#ifdef __cplusplus' >>confdefs.h echo $ac_declaration >>confdefs.h echo '#endif' >>confdefs.h fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo done .PHONY: am__doit END # If we don't find an include directive, just comment out the code. echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5 echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6 am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # We grep out `Entering directory' and `Leaving directory' # messages which can occur if `w' ends up in MAKEFLAGS. # In particular we don't look at `^make:' because GNU make might # be invoked under some other name (usually "gmake"), in which # case it prints its new name instead of `make'. if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then am__include=include am__quote= _am_result=GNU fi # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then am__include=.include am__quote="\"" _am_result=BSD fi fi echo "$as_me:$LINENO: result: $_am_result" >&5 echo "${ECHO_T}$_am_result" >&6 rm -f confinc confmf # Check whether --enable-dependency-tracking or --disable-dependency-tracking was given. if test "${enable_dependency_tracking+set}" = set; then enableval="$enable_dependency_tracking" fi; if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= AMDEP_FALSE='#' else AMDEP_TRUE='#' AMDEP_FALSE= fi depcc="$CC" am_compiler_list= echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6 if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf case $depmode in nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; none) break ;; esac # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. if depmode=$depmode \ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6 CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= 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 # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6 if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in ./ | .// | /cC/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi done done ;; esac done 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 "$as_me:$LINENO: result: $INSTALL" >&5 echo "${ECHO_T}$INSTALL" >&6 # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_RANLIB+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then echo "$as_me:$LINENO: result: $RANLIB" >&5 echo "${ECHO_T}$RANLIB" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_RANLIB="ranlib" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":" fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 echo "${ECHO_T}$ac_ct_RANLIB" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi RANLIB=$ac_ct_RANLIB else RANLIB="$ac_cv_prog_RANLIB" fi echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'` if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.make <<\_ACEOF all: @echo 'ac_maketemp="$(MAKE)"' _ACEOF # GNU make sometimes prints "make[1]: Entering...", which would confuse us. eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=` if test -n "$ac_maketemp"; then eval ac_cv_prog_make_${ac_make}_set=yes else eval ac_cv_prog_make_${ac_make}_set=no fi rm -f conftest.make fi if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 SET_MAKE= else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 SET_MAKE="MAKE=${MAKE-make}" fi ac_config_headers="$ac_config_headers config.h" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if test "${ac_cv_prog_CPP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then # Broken: success on invalid input. continue else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi echo "$as_me:$LINENO: result: $CPP" >&5 echo "${ECHO_T}$CPP" >&6 ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then # Broken: success on invalid input. continue else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&5 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu echo "$as_me:$LINENO: checking for egrep" >&5 echo $ECHO_N "checking for egrep... $ECHO_C" >&6 if test "${ac_cv_prog_egrep+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if echo a | (grep -E '(a|b)') >/dev/null 2>&1 then ac_cv_prog_egrep='grep -E' else ac_cv_prog_egrep='egrep' fi fi echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5 echo "${ECHO_T}$ac_cv_prog_egrep" >&6 EGREP=$ac_cv_prog_egrep echo "$as_me:$LINENO: checking for ANSI C header files" >&5 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 if test "${ac_cv_header_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_header_stdc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_stdc=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_header_stdc=no fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi fi echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 echo "${ECHO_T}$ac_cv_header_stdc" >&6 if test $ac_cv_header_stdc = yes; then cat >>confdefs.h <<\_ACEOF #define STDC_HEADERS 1 _ACEOF fi echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5 echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6 if test "${ac_cv_header_sys_wait_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #ifndef WEXITSTATUS # define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8) #endif #ifndef WIFEXITED # define WIFEXITED(stat_val) (((stat_val) & 255) == 0) #endif int main () { int s; wait (&s); s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_header_sys_wait_h=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_sys_wait_h=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5 echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6 if test $ac_cv_header_sys_wait_h = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_SYS_WAIT_H 1 _ACEOF fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_Header=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Header=no" fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in fcntl.h sys/time.h unistd.h getopt.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if eval "test \"\${$as_ac_Header+set}\" = set"; then echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ------------------------------------------ ## ## Report this to the AC_PACKAGE_NAME lists. ## ## ------------------------------------------ ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6 if test "${ac_cv_c_const+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { /* FIXME: Include the comments suggested by Paul. */ #ifndef __cplusplus /* Ultrix mips cc rejects this. */ typedef int charset[2]; const charset x; /* SunOS 4.1.1 cc rejects this. */ char const *const *ccp; char **p; /* NEC SVR4.0.2 mips cc rejects this. */ struct point {int x, y;}; static struct point const zero = {0,0}; /* AIX XL C 1.02.0.0 rejects this. It does not let you subtract one const X* pointer from another in an arm of an if-expression whose if-part is not a constant expression */ const char *g = "string"; ccp = &g + (g ? g-g : 0); /* HPUX 7.0 cc rejects these. */ ++ccp; p = (char**) ccp; ccp = (char const *const *) p; { /* SCO 3.2v4 cc rejects this. */ char *t; char const *s = 0 ? (char *) 0 : (char const *) 0; *t++ = 0; } { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ int x[] = {25, 17}; const int *foo = &x[0]; ++foo; } { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ typedef const int *iptr; iptr p = 0; ++p; } { /* AIX XL C 1.02.0.0 rejects this saying "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ struct s { int j; const int *ap[3]; }; struct s *b; b->j = 5; } { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ const int foo = 10; } #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_c_const=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_c_const=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5 echo "${ECHO_T}$ac_cv_c_const" >&6 if test $ac_cv_c_const = no; then cat >>confdefs.h <<\_ACEOF #define const _ACEOF fi echo "$as_me:$LINENO: checking for pid_t" >&5 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6 if test "${ac_cv_type_pid_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { if ((pid_t *) 0) return 0; if (sizeof (pid_t)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_pid_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_pid_t=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5 echo "${ECHO_T}$ac_cv_type_pid_t" >&6 if test $ac_cv_type_pid_t = yes; then : else cat >>confdefs.h <<_ACEOF #define pid_t int _ACEOF fi echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6 if test "${ac_cv_header_time+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include int main () { if ((struct tm *) 0) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_header_time=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_time=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5 echo "${ECHO_T}$ac_cv_header_time" >&6 if test $ac_cv_header_time = yes; then cat >>confdefs.h <<\_ACEOF #define TIME_WITH_SYS_TIME 1 _ACEOF fi echo "$as_me:$LINENO: checking return type of signal handlers" >&5 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6 if test "${ac_cv_type_signal+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #ifdef signal # undef signal #endif #ifdef __cplusplus extern "C" void (*signal (int, void (*)(int)))(int); #else void (*signal ()) (); #endif int main () { int i; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_signal=void else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_signal=int fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5 echo "${ECHO_T}$ac_cv_type_signal" >&6 cat >>confdefs.h <<_ACEOF #define RETSIGTYPE $ac_cv_type_signal _ACEOF for ac_func in vprintf do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* 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 (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else char (*f) () = $ac_func; #endif #ifdef __cplusplus } #endif int main () { return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF echo "$as_me:$LINENO: checking for _doprnt" >&5 echo $ECHO_N "checking for _doprnt... $ECHO_C" >&6 if test "${ac_cv_func__doprnt+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define _doprnt to an innocuous variant, in case declares _doprnt. For example, HP-UX 11i declares gettimeofday. */ #define _doprnt innocuous__doprnt /* System header to define __stub macros and hopefully few prototypes, which can conflict with char _doprnt (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef _doprnt /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char _doprnt (); /* 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__doprnt) || defined (__stub____doprnt) choke me #else char (*f) () = _doprnt; #endif #ifdef __cplusplus } #endif int main () { return f != _doprnt; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func__doprnt=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func__doprnt=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_func__doprnt" >&5 echo "${ECHO_T}$ac_cv_func__doprnt" >&6 if test $ac_cv_func__doprnt = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_DOPRNT 1 _ACEOF fi fi done for ac_func in gettimeofday regcomp strdup strtol getopt_long_only do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* 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 (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else char (*f) () = $ac_func; #endif #ifdef __cplusplus } #endif int main () { return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done echo "$as_me:$LINENO: checking that regex functions are available" >&5 echo $ECHO_N "checking that regex functions are available... $ECHO_C" >&6 if [ "x$ac_cv_func_regcomp" = "$Good" ] then echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 { { echo "$as_me:$LINENO: error: regex functions not found, imwheel really needs these!" >&5 echo "$as_me: error: regex functions not found, imwheel really needs these!" >&2;} { (exit 1); exit 1; }; } fi echo "$as_me:$LINENO: checking where the pid file goes" >&5 echo $ECHO_N "checking where the pid file goes... $ECHO_C" >&6 # Check whether --with-pid-dir or --without-pid-dir was given. if test "${with_pid_dir+set}" = set; then withval="$with_pid_dir" if [ "x$withval" != "x" ] then PIDDIR="$withval" else { { echo "$as_me:$LINENO: error: bad dir supplied for --with-pid-dir" >&5 echo "$as_me: error: bad dir supplied for --with-pid-dir" >&2;} { (exit 1); exit 1; }; } fi else PIDDIR="/tmp" fi; echo "$as_me:$LINENO: result: $PIDDIR" >&5 echo "${ECHO_T}$PIDDIR" >&6 cat >>confdefs.h <<_ACEOF #define PIDDIR "$PIDDIR" _ACEOF # Check whether --enable-suid or --disable-suid was given. if test "${enable_suid+set}" = set; then enableval="$enable_suid" case "$enableval" in yes) suid=root ;; no) suid= ;; *) if [ "x$enableval" = x ] then suid="root" else suid="$enableval" fi;; esac else suid= fi; echo "$as_me:$LINENO: checking if we suid imwheel at install" >&5 echo $ECHO_N "checking if we suid imwheel at install... $ECHO_C" >&6 if [ "x$suid" = "x" ] then echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 else echo "$as_me:$LINENO: result: yes, $suid" >&5 echo "${ECHO_T}yes, $suid" >&6 fi if test "x$suid" != x; then SUID_TRUE= SUID_FALSE='#' else SUID_TRUE='#' SUID_FALSE= fi getopt_dist= echo "$as_me:$LINENO: checking if we use the included getopts" >&5 echo $ECHO_N "checking if we use the included getopts... $ECHO_C" >&6 # Check whether --with-getopt or --without-getopt was given. if test "${with_getopt+set}" = set; then withval="$with_getopt" case "$withval" in yes) getopt=getopt ;; no) getopt= ;; *) { { echo "$as_me:$LINENO: error: bad value $withval for --with-getopt" >&5 echo "$as_me: error: bad value $withval for --with-getopt" >&2;} { (exit 1); exit 1; }; } ;; esac else getopt= fi; if [ "x$ac_cv_func_getopt_long_only" != "$Good" -o "x$ac_cv_header_getopt_h" != "$Good" ] then getopt=getopt echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 else if [ "x$getopt" = "xgetopt" ] then echo "$as_me:$LINENO: result: forced" >&5 echo "${ECHO_T}forced" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 getopt_dist=getopt fi fi if [ "x$getopt" = "xgetopt" ] then GETOPT_LIBS="-L$srcdir/getopt -lgetopt" GETOPT_INCS="-I$srcdir/getopt" else GETOPT_LIBS= GETOPT_INCS= fi echo "$as_me:$LINENO: checking if we build mdetect" >&5 echo $ECHO_N "checking if we build mdetect... $ECHO_C" >&6 # Check whether --enable-mdetect or --disable-mdetect was given. if test "${enable_mdetect+set}" = set; then enableval="$enable_mdetect" case "$enableval" in yes) mdetect=mdetect ;; no) mdetect= ;; *) { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-mdetect" >&5 echo "$as_me: error: bad value $enableval for --enable-mdetect" >&2;} { (exit 1); exit 1; }; } ;; esac mdetect_dist= else mdetect= mdetect_dist=mdetect fi; if [ "x$mdetect" = "xmdetect" ] then echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi echo "$as_me:$LINENO: checking if we build mdump" >&5 echo $ECHO_N "checking if we build mdump... $ECHO_C" >&6 # Check whether --enable-mdump or --disable-mdump was given. if test "${enable_mdump+set}" = set; then enableval="$enable_mdump" case "$enableval" in yes) mdump=mdump ;; no) mdump= ;; *) { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-mdump" >&5 echo "$as_me: error: bad value $enableval for --enable-mdump" >&2;} { (exit 1); exit 1; }; } ;; esac mdump_dist= else mdump= mdump_dist=mdump.c fi; if [ "x$mdump" = "xmdump" ] then echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi EXTRAS="setimps2 setmmplus getmdt setps2 setps2rate" EXTRAS_SRC="setimps2.c setmmplus.c getmdt.c setps2.c setps2rate.c" echo "$as_me:$LINENO: checking if we build extras" >&5 echo $ECHO_N "checking if we build extras... $ECHO_C" >&6 # Check whether --enable-extras or --disable-extras was given. if test "${enable_extras+set}" = set; then enableval="$enable_extras" case "$enableval" in yes) extras=yes ;; no) extras= ;; *) { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-extras" >&5 echo "$as_me: error: bad value $enableval for --enable-extras" >&2;} { (exit 1); exit 1; }; } ;; esac else extras= fi; if [ "x$extras" = "$Good" ] then echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 extras="$EXTRAS" extras_dist= else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 extras_dist="$EXTRAS_SRC" fi NO_GPM_DOC= GPM_DIR="gpm-1.19.3" as_ac_File=`echo "ac_cv_file_$GPM_DIR/gpm.c" | $as_tr_sh` echo "$as_me:$LINENO: checking for $GPM_DIR/gpm.c" >&5 echo $ECHO_N "checking for $GPM_DIR/gpm.c... $ECHO_C" >&6 if eval "test \"\${$as_ac_File+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else test "$cross_compiling" = yes && { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} { (exit 1); exit 1; }; } if test -r "$GPM_DIR/gpm.c"; then eval "$as_ac_File=yes" else eval "$as_ac_File=no" fi fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_File'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6 if test `eval echo '${'$as_ac_File'}'` = yes; then HAVE_GPM_SRC=yes else HAVE_GPM_SRC=no fi echo "$as_me:$LINENO: checking if we build gpm-imwheel" >&5 echo $ECHO_N "checking if we build gpm-imwheel... $ECHO_C" >&6 gpm_enabled=no gpm_doc=no gpm_imwheel=$GPM_DIR # Check whether --enable-gpm or --disable-gpm was given. if test "${enable_gpm+set}" = set; then enableval="$enable_gpm" case "$enableval" in yes) gpm_imwheel="$GPM_DIR" gpm_enabled=yes ;; no) gpm_imwheel= ;; *) { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-gpm" >&5 echo "$as_me: error: bad value $enableval for --enable-gpm" >&2;} { (exit 1); exit 1; }; } ;; esac else gpm_imwheel= fi; # Check whether --enable-gpm_doc or --disable-gpm_doc was given. if test "${enable_gpm_doc+set}" = set; then enableval="$enable_gpm_doc" case "$enableval" in yes) no_gpm_doc=true ;; no) no_gpm_doc=false ;; *) { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-gpm-doc" >&5 echo "$as_me: error: bad value $enableval for --enable-gpm-doc" >&2;} { (exit 1); exit 1; }; } ;; esac else no_gpm_doc=true fi; if [ "x$HAVE_GPM_SRC" = "$Good" ] then if [ "x$gpm_imwheel" = "x$GPM_DIR" ] then echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 subdirs="$subdirs gpm-1.19.3" cat >>confdefs.h <<_ACEOF #define HAVE_GPM_SRC 1 _ACEOF if $no_gpm_doc; then NO_GPM_DOC_TRUE= NO_GPM_DOC_FALSE='#' else NO_GPM_DOC_TRUE='#' NO_GPM_DOC_FALSE= fi else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 if false; then NO_GPM_DOC_TRUE= NO_GPM_DOC_FALSE='#' else NO_GPM_DOC_TRUE='#' NO_GPM_DOC_FALSE= fi fi else gpm_imwheel= if [ "x$gpm_enabled" = "xyes" ] then echo "$as_me:$LINENO: result: unable" >&5 echo "${ECHO_T}unable" >&6 if false; then NO_GPM_DOC_TRUE= NO_GPM_DOC_FALSE='#' else NO_GPM_DOC_TRUE='#' NO_GPM_DOC_FALSE= fi { echo "$as_me:$LINENO: WARNING: $GPM_DIR building disabled, source not present!" >&5 echo "$as_me: WARNING: $GPM_DIR building disabled, source not present!" >&2;} Warnings=`expr $Warnings + 1` else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 if false; then NO_GPM_DOC_TRUE= NO_GPM_DOC_FALSE='#' else NO_GPM_DOC_TRUE='#' NO_GPM_DOC_FALSE= fi fi fi gpm_dist="$GPM_DIR" echo "$as_me:$LINENO: checking for X" >&5 echo $ECHO_N "checking for X... $ECHO_C" >&6 # 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 test "${ac_cv_have_x+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 conftest.dir if mkdir conftest.dir; then cd conftest.dir # Make sure to not put "make" in the Imakefile rules, since we grep it out. cat >Imakefile <<'_ACEOF' acfindx: @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"' _ACEOF 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 conftest.dir fi # Standard set of common directories for X headers. # Check X11 before X11Rn because it is often a symlink to the current release. ac_x_header_dirs=' /usr/X11/include /usr/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' if test "$ac_x_includes" = no; then # Guess where to find include files, by looking for Intrinsic.h. # First, try using that file with no special directory specified. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then # We can compile using X headers with no special include directory. ac_x_includes= else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 for ac_dir in $ac_x_header_dirs; do if test -r "$ac_dir/X11/Intrinsic.h"; then ac_x_includes=$ac_dir break fi done fi rm -f conftest.err conftest.$ac_ext fi # $ac_x_includes = no if test "$ac_x_libraries" = no; then # Check for the libraries. # See if we find them without any special options. # Don't add to $LIBS permanently. ac_save_LIBS=$LIBS LIBS="-lXt $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { XtMalloc (0) ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then LIBS=$ac_save_LIBS # We can link X programs with no special library path. ac_x_libraries= else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 LIBS=$ac_save_LIBS for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g` do # Don't even attempt the hair of trying to link an X program! for ac_extension in a so sl; do if test -r $ac_dir/libXt.$ac_extension; then ac_x_libraries=$ac_dir break 2 fi done done fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext 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 "$as_me:$LINENO: result: $have_x" >&5 echo "${ECHO_T}$have_x" >&6 no_x=yes else # If each of the values was on the command line, it overrides each guess. test "x$x_includes" = xNONE && x_includes=$ac_x_includes test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries # Update the cache value to reflect the command line values. ac_cv_have_x="have_x=yes \ ac_x_includes=$x_includes ac_x_libraries=$x_libraries" echo "$as_me:$LINENO: result: libraries $x_libraries, headers $x_includes" >&5 echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6 fi if test "$no_x" = yes; then # Not all programs may use this symbol, but it does not hurt to define it. cat >>confdefs.h <<\_ACEOF #define X_DISPLAY_MISSING 1 _ACEOF 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 "$as_me:$LINENO: checking whether -R must be followed by a space" >&5 echo $ECHO_N "checking whether -R must be followed by a space... $ECHO_C" >&6 ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_R_nospace=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_R_nospace=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test $ac_R_nospace = yes; then echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 X_LIBS="$X_LIBS -R$x_libraries" else LIBS="$ac_xsave_LIBS -R $x_libraries" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_R_space=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_R_space=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test $ac_R_space = yes; then echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 X_LIBS="$X_LIBS -R $x_libraries" else echo "$as_me:$LINENO: result: neither works" >&5 echo "${ECHO_T}neither works" >&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 says this is needed for Ultrix, if the X # libraries were built with DECnet support. And Karl Berry says # the Alpha needs dnet_stub (dnet does not exist). ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char XOpenDisplay (); int main () { XOpenDisplay (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet" >&5 echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6 if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldnet $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* 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; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_dnet_dnet_ntoa=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dnet_dnet_ntoa=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_dnet_ntoa" >&5 echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6 if test $ac_cv_lib_dnet_dnet_ntoa = yes; then X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet" fi if test $ac_cv_lib_dnet_dnet_ntoa = no; then echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet_stub" >&5 echo $ECHO_N "checking for dnet_ntoa in -ldnet_stub... $ECHO_C" >&6 if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldnet_stub $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* 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; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_dnet_stub_dnet_ntoa=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dnet_stub_dnet_ntoa=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5 echo "${ECHO_T}$ac_cv_lib_dnet_stub_dnet_ntoa" >&6 if test $ac_cv_lib_dnet_stub_dnet_ntoa = yes; then X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub" fi fi fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$ac_xsave_LIBS" # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT, # to get the SysV transport functions. # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4) # needs -lnsl. # The nsl library prevents programs from opening the X display # on Irix 5.2, according to T.E. Dickey. # The functions gethostbyname, getservbyname, and inet_addr are # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking. echo "$as_me:$LINENO: checking for gethostbyname" >&5 echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6 if test "${ac_cv_func_gethostbyname+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define gethostbyname to an innocuous variant, in case declares gethostbyname. For example, HP-UX 11i declares gettimeofday. */ #define gethostbyname innocuous_gethostbyname /* System header to define __stub macros and hopefully few prototypes, which can conflict with char gethostbyname (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef gethostbyname /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char gethostbyname (); /* 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 char (*f) () = gethostbyname; #endif #ifdef __cplusplus } #endif int main () { return f != gethostbyname; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_gethostbyname=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_gethostbyname=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname" >&5 echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6 if test $ac_cv_func_gethostbyname = no; then echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5 echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6 if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lnsl $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* 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; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_nsl_gethostbyname=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_nsl_gethostbyname=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5 echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6 if test $ac_cv_lib_nsl_gethostbyname = yes; then X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl" fi if test $ac_cv_lib_nsl_gethostbyname = no; then echo "$as_me:$LINENO: checking for gethostbyname in -lbsd" >&5 echo $ECHO_N "checking for gethostbyname in -lbsd... $ECHO_C" >&6 if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lbsd $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* 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; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_bsd_gethostbyname=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_bsd_gethostbyname=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_gethostbyname" >&5 echo "${ECHO_T}$ac_cv_lib_bsd_gethostbyname" >&6 if test $ac_cv_lib_bsd_gethostbyname = yes; then X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd" fi fi fi # lieder@skyler.mavd.honeywell.com says without -lsocket, # socket/setsockopt and other routines are undefined under SCO ODT # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary # on later versions), says Simon Leinen: it contains gethostby* # variants that don't use the name server (or something). -lsocket # must be given before -lnsl if both are needed. We assume that # if connect needs -lnsl, so does gethostbyname. echo "$as_me:$LINENO: checking for connect" >&5 echo $ECHO_N "checking for connect... $ECHO_C" >&6 if test "${ac_cv_func_connect+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define connect to an innocuous variant, in case declares connect. For example, HP-UX 11i declares gettimeofday. */ #define connect innocuous_connect /* System header to define __stub macros and hopefully few prototypes, which can conflict with char connect (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef connect /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char connect (); /* 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 char (*f) () = connect; #endif #ifdef __cplusplus } #endif int main () { return f != connect; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_connect=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_connect=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5 echo "${ECHO_T}$ac_cv_func_connect" >&6 if test $ac_cv_func_connect = no; then echo "$as_me:$LINENO: checking for connect in -lsocket" >&5 echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6 if test "${ac_cv_lib_socket_connect+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsocket $X_EXTRA_LIBS $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* 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; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_socket_connect=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_socket_connect=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_socket_connect" >&5 echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6 if test $ac_cv_lib_socket_connect = yes; then X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS" fi fi # Guillermo Gomez says -lposix is necessary on A/UX. echo "$as_me:$LINENO: checking for remove" >&5 echo $ECHO_N "checking for remove... $ECHO_C" >&6 if test "${ac_cv_func_remove+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define remove to an innocuous variant, in case declares remove. For example, HP-UX 11i declares gettimeofday. */ #define remove innocuous_remove /* System header to define __stub macros and hopefully few prototypes, which can conflict with char remove (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef remove /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char remove (); /* 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 char (*f) () = remove; #endif #ifdef __cplusplus } #endif int main () { return f != remove; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_remove=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_remove=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_func_remove" >&5 echo "${ECHO_T}$ac_cv_func_remove" >&6 if test $ac_cv_func_remove = no; then echo "$as_me:$LINENO: checking for remove in -lposix" >&5 echo $ECHO_N "checking for remove in -lposix... $ECHO_C" >&6 if test "${ac_cv_lib_posix_remove+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lposix $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* 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; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_posix_remove=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_posix_remove=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_posix_remove" >&5 echo "${ECHO_T}$ac_cv_lib_posix_remove" >&6 if test $ac_cv_lib_posix_remove = yes; then X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix" fi fi # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay. echo "$as_me:$LINENO: checking for shmat" >&5 echo $ECHO_N "checking for shmat... $ECHO_C" >&6 if test "${ac_cv_func_shmat+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define shmat to an innocuous variant, in case declares shmat. For example, HP-UX 11i declares gettimeofday. */ #define shmat innocuous_shmat /* System header to define __stub macros and hopefully few prototypes, which can conflict with char shmat (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef shmat /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char shmat (); /* 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 char (*f) () = shmat; #endif #ifdef __cplusplus } #endif int main () { return f != shmat; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_shmat=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_shmat=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_func_shmat" >&5 echo "${ECHO_T}$ac_cv_func_shmat" >&6 if test $ac_cv_func_shmat = no; then echo "$as_me:$LINENO: checking for shmat in -lipc" >&5 echo $ECHO_N "checking for shmat in -lipc... $ECHO_C" >&6 if test "${ac_cv_lib_ipc_shmat+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lipc $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* 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; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_ipc_shmat=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_ipc_shmat=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_ipc_shmat" >&5 echo "${ECHO_T}$ac_cv_lib_ipc_shmat" >&6 if test $ac_cv_lib_ipc_shmat = yes; then X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc" 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. # John Interrante, Karl Berry echo "$as_me:$LINENO: checking for IceConnectionNumber in -lICE" >&5 echo $ECHO_N "checking for IceConnectionNumber in -lICE... $ECHO_C" >&6 if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lICE $X_EXTRA_LIBS $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* 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; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_ICE_IceConnectionNumber=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_ICE_IceConnectionNumber=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5 echo "${ECHO_T}$ac_cv_lib_ICE_IceConnectionNumber" >&6 if test $ac_cv_lib_ICE_IceConnectionNumber = yes; then X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE" fi LDFLAGS=$ac_save_LDFLAGS fi LIBS_saved="$LIBS" LIBS= echo "$as_me:$LINENO: checking for XCreateWindow in -lX11" >&5 echo $ECHO_N "checking for XCreateWindow in -lX11... $ECHO_C" >&6 if test "${ac_cv_lib_X11_XCreateWindow+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lX11 $LIBS_saved $X_LIBS $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char XCreateWindow (); int main () { XCreateWindow (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_X11_XCreateWindow=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_X11_XCreateWindow=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_X11_XCreateWindow" >&5 echo "${ECHO_T}$ac_cv_lib_X11_XCreateWindow" >&6 if test $ac_cv_lib_X11_XCreateWindow = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBX11 1 _ACEOF LIBS="-lX11 $LIBS" else { { echo "$as_me:$LINENO: error: IMWheel depends on the X11 libraries!" >&5 echo "$as_me: error: IMWheel depends on the X11 libraries!" >&2;} { (exit 1); exit 1; }; } fi echo "$as_me:$LINENO: checking for XextAddDisplay in -lXext" >&5 echo $ECHO_N "checking for XextAddDisplay in -lXext... $ECHO_C" >&6 if test "${ac_cv_lib_Xext_XextAddDisplay+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lXext $LIBS_saved $X_LIBS $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char XextAddDisplay (); int main () { XextAddDisplay (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_Xext_XextAddDisplay=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_Xext_XextAddDisplay=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_Xext_XextAddDisplay" >&5 echo "${ECHO_T}$ac_cv_lib_Xext_XextAddDisplay" >&6 if test $ac_cv_lib_Xext_XextAddDisplay = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBXEXT 1 _ACEOF LIBS="-lXext $LIBS" fi echo "$as_me:$LINENO: checking for XtFree in -lXt" >&5 echo $ECHO_N "checking for XtFree in -lXt... $ECHO_C" >&6 if test "${ac_cv_lib_Xt_XtFree+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lXt $LIBS_saved $X_LIBS $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char XtFree (); int main () { XtFree (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_Xt_XtFree=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_Xt_XtFree=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_Xt_XtFree" >&5 echo "${ECHO_T}$ac_cv_lib_Xt_XtFree" >&6 if test $ac_cv_lib_Xt_XtFree = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBXT 1 _ACEOF LIBS="-lXt $LIBS" fi echo "$as_me:$LINENO: checking for XmuInternAtom in -lXmu" >&5 echo $ECHO_N "checking for XmuInternAtom in -lXmu... $ECHO_C" >&6 if test "${ac_cv_lib_Xmu_XmuInternAtom+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lXmu $LIBS_saved $X_LIBS $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char XmuInternAtom (); int main () { XmuInternAtom (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_Xmu_XmuInternAtom=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_Xmu_XmuInternAtom=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_Xmu_XmuInternAtom" >&5 echo "${ECHO_T}$ac_cv_lib_Xmu_XmuInternAtom" >&6 if test $ac_cv_lib_Xmu_XmuInternAtom = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBXMU 1 _ACEOF LIBS="-lXmu $LIBS" fi echo "$as_me:$LINENO: checking for XTestFakeDeviceKeyEvent in -lXtst" >&5 echo $ECHO_N "checking for XTestFakeDeviceKeyEvent in -lXtst... $ECHO_C" >&6 if test "${ac_cv_lib_Xtst_XTestFakeDeviceKeyEvent+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lXtst $LIBS_saved $X_LIBS $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char XTestFakeDeviceKeyEvent (); int main () { XTestFakeDeviceKeyEvent (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_Xtst_XTestFakeDeviceKeyEvent=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_Xtst_XTestFakeDeviceKeyEvent=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_Xtst_XTestFakeDeviceKeyEvent" >&5 echo "${ECHO_T}$ac_cv_lib_Xtst_XTestFakeDeviceKeyEvent" >&6 if test $ac_cv_lib_Xtst_XTestFakeDeviceKeyEvent = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBXTST 1 _ACEOF LIBS="-lXtst $LIBS" else { { echo "$as_me:$LINENO: error: IMWheel depends on the XTest extention!" >&5 echo "$as_me: error: IMWheel depends on the XTest extention!" >&2;} { (exit 1); exit 1; }; } fi X_LIBS="$X_LIBS $LIBS" LIBS="$LIBS_saved" if [ "$Warnings" != "0" ] then echo "" if [ "$Warnings" != "1" ] then echo "You had $Warnings warnings during configure, imwheel may not compile or run." else echo "You had a warning during configure, imwheel may not compile or run, or it may" echo "have an incomplete package built." fi echo "" fi ac_config_files="$ac_config_files jax/Makefile Makefile mdetect/Makefile getopt/Makefile" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, don't put newlines in cache variables' values. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. { (set) 2>&1 | case `(ac_space=' '; set | grep ac_space) 2>&1` in *ac_space=\ *) # `set' does not quote correctly, so add quotes (double-quote # substitution turns \\\\ into \\, and sed turns \\ into \). sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n \ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" ;; esac; } | sed ' t clear : clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ : end' >>confcache if diff $cache_file confcache >/dev/null 2>&1; then :; else if test -w $cache_file; then test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" cat confcache >$cache_file else echo "not updating unwritable cache $cache_file" fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' # VPATH may cause trouble with some makes, so we remove $(srcdir), # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=/{ s/:*\$(srcdir):*/:/; s/:*\${srcdir}:*/:/; s/:*@srcdir@:*/:/; s/^\([^=]*=[ ]*\):*/\1/; s/:*$//; s/^[^=]*=[ ]*$//; }' fi DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_i=`echo "$ac_i" | sed 's/\$U\././;s/\.o$//;s/\.obj$//'` # 2. Add them. ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext" ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${SUID_TRUE}" && test -z "${SUID_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"SUID\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"SUID\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${NO_GPM_DOC_TRUE}" && test -z "${NO_GPM_DOC_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"NO_GPM_DOC\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"NO_GPM_DOC\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${NO_GPM_DOC_TRUE}" && test -z "${NO_GPM_DOC_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"NO_GPM_DOC\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"NO_GPM_DOC\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${NO_GPM_DOC_TRUE}" && test -z "${NO_GPM_DOC_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"NO_GPM_DOC\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"NO_GPM_DOC\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${NO_GPM_DOC_TRUE}" && test -z "${NO_GPM_DOC_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"NO_GPM_DOC\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"NO_GPM_DOC\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi : ${CONFIG_STATUS=./config.status} ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 echo "$as_me: creating $CONFIG_STATUS" >&6;} cat >$CONFIG_STATUS <<_ACEOF #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## # Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then set -o posix fi DUALCASE=1; export DUALCASE # for MKS sh # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset else as_unset=false fi # Work around bugs in pre-3.0 UWIN ksh. $as_unset ENV MAIL MAILPATH PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. for as_var in \ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ LC_TELEPHONE LC_TIME do if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else $as_unset $as_var fi done # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi # Name of the executable. as_me=`$as_basename "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)$' \| \ . : '\(.\)' 2>/dev/null || echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } /^X\/\(\/\/\)$/{ s//\1/; q; } /^X\/\(\/\).*/{ s//\1/; q; } s/.*/./; q'` # PATH needs CR, and LINENO needs CR and PATH. # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi as_lineno_1=$LINENO as_lineno_2=$LINENO as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && test "x$as_lineno_3" = "x$as_lineno_2" || { # Find who we are. Look in the path if we contain no path at all # relative or not. case $0 in *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5 echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;} { (exit 1); exit 1; }; } fi case $CONFIG_SHELL in '') as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for as_base in sh bash ksh sh5; do case $as_dir in /*) if ("$as_dir/$as_base" -c ' as_lineno_1=$LINENO as_lineno_2=$LINENO as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } CONFIG_SHELL=$as_dir/$as_base export CONFIG_SHELL exec "$CONFIG_SHELL" "$0" ${1+"$@"} fi;; esac done done ;; esac # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a # line-number line before each line; the second 'sed' does the real # work. The second script uses 'N' to pair each line-number line # with the numbered line, and appends trailing '-' during # substitution so that $LINENO is not a special case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) sed '=' <$as_myself | sed ' N s,$,-, : loop s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, t loop s,-$,, s,^['$as_cr_digits']*\n,, ' >$as_me.lineno && chmod +x $as_me.lineno || { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;} { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensible to this). . ./$as_me.lineno # Exit status is that of the last command. exit } case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in *c*,-n*) ECHO_N= ECHO_C=' ' ECHO_T=' ' ;; *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; *) ECHO_N= ECHO_C='\c' ECHO_T= ;; esac if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then # We could just check for DJGPP; but this test a) works b) is more generic # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). if test -f conf$$.exe; then # Don't use ln at all; we don't have any links as_ln_s='cp -p' else as_ln_s='ln -s' fi elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.file if mkdir -p . 2>/dev/null; then as_mkdir_p=: else test -d ./-p && rmdir ./-p as_mkdir_p=false fi as_executable_p="test -f" # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" # IFS # We need space, tab and new line, in precisely that order. as_nl=' ' IFS=" $as_nl" # CDPATH. $as_unset CDPATH exec 6>&1 # Open the log real soon, to keep \$[0] and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. Logging --version etc. is OK. exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX } >&5 cat >&5 <<_CSEOF This file was extended by $as_me, which was generated by GNU Autoconf 2.59. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ _CSEOF echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5 echo >&5 _ACEOF # Files that config.status was made for. if test -n "$ac_config_files"; then echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS fi if test -n "$ac_config_headers"; then echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS fi if test -n "$ac_config_links"; then echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS fi if test -n "$ac_config_commands"; then echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS fi cat >>$CONFIG_STATUS <<\_ACEOF ac_cs_usage="\ \`$as_me' instantiates files from templates according to the current configuration. Usage: $0 [OPTIONS] [FILE]... -h, --help print this help, then exit -V, --version print version number, then exit -q, --quiet do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE --header=FILE[:TEMPLATE] instantiate the configuration header FILE Configuration files: $config_files Configuration headers: $config_headers Configuration commands: $config_commands Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ config.status configured by $0, generated by GNU Autoconf 2.59, with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" Copyright (C) 2003 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." srcdir=$srcdir INSTALL="$INSTALL" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # If no file are specified by the user, then we need to provide default # value. By we need to know if files were specified by the user. ac_need_defaults=: while test $# != 0 do case $1 in --*=*) ac_option=`expr "x$1" : 'x\([^=]*\)='` ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` ac_shift=: ;; -*) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; *) # This is not an option, so the user has probably given explicit # arguments. ac_option=$1 ac_need_defaults=false;; esac case $ac_option in # Handling of the options. _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --vers* | -V ) echo "$ac_cs_version"; exit 0 ;; --he | --h) # Conflict between --help and --header { { echo "$as_me:$LINENO: error: ambiguous option: $1 Try \`$0 --help' for more information." >&5 echo "$as_me: error: ambiguous option: $1 Try \`$0 --help' for more information." >&2;} { (exit 1); exit 1; }; };; --help | --hel | -h ) echo "$ac_cs_usage"; exit 0 ;; --debug | --d* | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift CONFIG_FILES="$CONFIG_FILES $ac_optarg" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" ac_need_defaults=false;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1 Try \`$0 --help' for more information." >&5 echo "$as_me: error: unrecognized option: $1 Try \`$0 --help' for more information." >&2;} { (exit 1); exit 1; }; } ;; *) ac_config_targets="$ac_config_targets $1" ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF if \$ac_cs_recheck; then echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF # # INIT-COMMANDS section. # AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF for ac_config_target in $ac_config_targets do case "$ac_config_target" in # Handling of arguments. "jax/Makefile" ) CONFIG_FILES="$CONFIG_FILES jax/Makefile" ;; "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; "mdetect/Makefile" ) CONFIG_FILES="$CONFIG_FILES mdetect/Makefile" ;; "getopt/Makefile" ) CONFIG_FILES="$CONFIG_FILES getopt/Makefile" ;; "depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 echo "$as_me: error: invalid argument: $ac_config_target" >&2;} { (exit 1); exit 1; }; };; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason to put it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Create a temporary directory, and hook for its removal unless debugging. $debug || { trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 trap '{ (exit 1); exit 1; }' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { tmp=./confstat$$-$RANDOM (umask 077 && mkdir $tmp) } || { echo "$me: cannot create a temporary directory in ." >&2 { (exit 1); exit 1; } } _ACEOF cat >>$CONFIG_STATUS <<_ACEOF # # CONFIG_FILES section. # # No need to generate the scripts if there are no CONFIG_FILES. # This happens for instance when ./config.status config.h if test -n "\$CONFIG_FILES"; then # Protect against being on the right side of a sed subst in config.status. sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g; s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF s,@SHELL@,$SHELL,;t t s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t s,@exec_prefix@,$exec_prefix,;t t s,@prefix@,$prefix,;t t s,@program_transform_name@,$program_transform_name,;t t s,@bindir@,$bindir,;t t s,@sbindir@,$sbindir,;t t s,@libexecdir@,$libexecdir,;t t s,@datadir@,$datadir,;t t s,@sysconfdir@,$sysconfdir,;t t s,@sharedstatedir@,$sharedstatedir,;t t s,@localstatedir@,$localstatedir,;t t s,@libdir@,$libdir,;t t s,@includedir@,$includedir,;t t s,@oldincludedir@,$oldincludedir,;t t s,@infodir@,$infodir,;t t s,@mandir@,$mandir,;t t s,@build_alias@,$build_alias,;t t s,@host_alias@,$host_alias,;t t s,@target_alias@,$target_alias,;t t s,@DEFS@,$DEFS,;t t s,@ECHO_C@,$ECHO_C,;t t s,@ECHO_N@,$ECHO_N,;t t s,@ECHO_T@,$ECHO_T,;t t s,@LIBS@,$LIBS,;t t s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t s,@INSTALL_DATA@,$INSTALL_DATA,;t t s,@CYGPATH_W@,$CYGPATH_W,;t t s,@PACKAGE@,$PACKAGE,;t t s,@VERSION@,$VERSION,;t t s,@ACLOCAL@,$ACLOCAL,;t t s,@AUTOCONF@,$AUTOCONF,;t t s,@AUTOMAKE@,$AUTOMAKE,;t t s,@AUTOHEADER@,$AUTOHEADER,;t t s,@MAKEINFO@,$MAKEINFO,;t t s,@install_sh@,$install_sh,;t t s,@STRIP@,$STRIP,;t t s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t s,@INSTALL_STRIP_PROGRAM@,$INSTALL_STRIP_PROGRAM,;t t s,@mkdir_p@,$mkdir_p,;t t s,@AWK@,$AWK,;t t s,@SET_MAKE@,$SET_MAKE,;t t s,@am__leading_dot@,$am__leading_dot,;t t s,@AMTAR@,$AMTAR,;t t s,@am__tar@,$am__tar,;t t s,@am__untar@,$am__untar,;t t s,@CC@,$CC,;t t s,@CFLAGS@,$CFLAGS,;t t s,@LDFLAGS@,$LDFLAGS,;t t s,@CPPFLAGS@,$CPPFLAGS,;t t s,@ac_ct_CC@,$ac_ct_CC,;t t s,@EXEEXT@,$EXEEXT,;t t s,@OBJEXT@,$OBJEXT,;t t s,@DEPDIR@,$DEPDIR,;t t s,@am__include@,$am__include,;t t s,@am__quote@,$am__quote,;t t s,@AMDEP_TRUE@,$AMDEP_TRUE,;t t s,@AMDEP_FALSE@,$AMDEP_FALSE,;t t s,@AMDEPBACKSLASH@,$AMDEPBACKSLASH,;t t s,@CCDEPMODE@,$CCDEPMODE,;t t s,@am__fastdepCC_TRUE@,$am__fastdepCC_TRUE,;t t s,@am__fastdepCC_FALSE@,$am__fastdepCC_FALSE,;t t s,@RANLIB@,$RANLIB,;t t s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t s,@CPP@,$CPP,;t t s,@EGREP@,$EGREP,;t t s,@suid@,$suid,;t t s,@SUID_TRUE@,$SUID_TRUE,;t t s,@SUID_FALSE@,$SUID_FALSE,;t t s,@getopt@,$getopt,;t t s,@GETOPT_LIBS@,$GETOPT_LIBS,;t t s,@GETOPT_INCS@,$GETOPT_INCS,;t t s,@getopt_dist@,$getopt_dist,;t t s,@mdetect@,$mdetect,;t t s,@mdetect_dist@,$mdetect_dist,;t t s,@mdump@,$mdump,;t t s,@mdump_dist@,$mdump_dist,;t t s,@extras@,$extras,;t t s,@extras_dist@,$extras_dist,;t t s,@GPM_DIR@,$GPM_DIR,;t t s,@HAVE_GPM_SRC@,$HAVE_GPM_SRC,;t t s,@subdirs@,$subdirs,;t t s,@NO_GPM_DOC_TRUE@,$NO_GPM_DOC_TRUE,;t t s,@NO_GPM_DOC_FALSE@,$NO_GPM_DOC_FALSE,;t t s,@gpm_imwheel@,$gpm_imwheel,;t t s,@gpm_dist@,$gpm_dist,;t t s,@X_CFLAGS@,$X_CFLAGS,;t t s,@X_PRE_LIBS@,$X_PRE_LIBS,;t t s,@X_LIBS@,$X_LIBS,;t t s,@X_EXTRA_LIBS@,$X_EXTRA_LIBS,;t t s,@LIBOBJS@,$LIBOBJS,;t t s,@LTLIBOBJS@,$LTLIBOBJS,;t t CEOF _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # Split the substitutions into bite-sized pieces for seds with # small command number limits, like on Digital OSF/1 and HP-UX. ac_max_sed_lines=48 ac_sed_frag=1 # Number of current file. ac_beg=1 # First line for current file. ac_end=$ac_max_sed_lines # Line after last line for current file. ac_more_lines=: ac_sed_cmds= while $ac_more_lines; do if test $ac_beg -gt 1; then sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag else sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag fi if test ! -s $tmp/subs.frag; then ac_more_lines=false else # The purpose of the label and of the branching condition is to # speed up the sed processing (if there are no `@' at all, there # is no need to browse any of the substitutions). # These are the two extra sed commands mentioned above. (echo ':t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed if test -z "$ac_sed_cmds"; then ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" else ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" fi ac_sed_frag=`expr $ac_sed_frag + 1` ac_beg=$ac_end ac_end=`expr $ac_end + $ac_max_sed_lines` fi done if test -z "$ac_sed_cmds"; then ac_sed_cmds=cat fi fi # test -n "$CONFIG_FILES" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". case $ac_file in - | *:- | *:-:* ) # input from stdin cat >$tmp/stdin ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; * ) ac_file_in=$ac_file.in ;; esac # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. ac_dir=`(dirname "$ac_file") 2>/dev/null || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` { if $as_mkdir_p; then mkdir -p "$ac_dir" else as_dir="$ac_dir" as_dirs= while test ! -d "$as_dir"; do as_dirs="$as_dir $as_dirs" as_dir=`(dirname "$as_dir") 2>/dev/null || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` done test ! -n "$as_dirs" || mkdir $as_dirs fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} { (exit 1); exit 1; }; }; } ac_builddir=. if test "$ac_dir" != .; then ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A "../" for each directory in $ac_dir_suffix. ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` else ac_dir_suffix= ac_top_builddir= fi case $srcdir in .) # No --srcdir option. We are building in place. ac_srcdir=. if test -z "$ac_top_builddir"; then ac_top_srcdir=. else ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` fi ;; [\\/]* | ?:[\\/]* ) # Absolute path. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ;; *) # Relative path. ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_builddir$srcdir ;; esac # Do not use `cd foo && pwd` to compute absolute paths, because # the directories may not exist. case `pwd` in .) ac_abs_builddir="$ac_dir";; *) case "$ac_dir" in .) ac_abs_builddir=`pwd`;; [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; *) ac_abs_builddir=`pwd`/"$ac_dir";; esac;; esac case $ac_abs_builddir in .) ac_abs_top_builddir=${ac_top_builddir}.;; *) case ${ac_top_builddir}. in .) ac_abs_top_builddir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; esac;; esac case $ac_abs_builddir in .) ac_abs_srcdir=$ac_srcdir;; *) case $ac_srcdir in .) ac_abs_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; esac;; esac case $ac_abs_builddir in .) ac_abs_top_srcdir=$ac_top_srcdir;; *) case $ac_top_srcdir in .) ac_abs_top_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; esac;; esac case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_builddir$INSTALL ;; esac if test x"$ac_file" != x-; then { echo "$as_me:$LINENO: creating $ac_file" >&5 echo "$as_me: creating $ac_file" >&6;} rm -f "$ac_file" fi # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ if test x"$ac_file" = x-; then configure_input= else configure_input="$ac_file. " fi configure_input=$configure_input"Generated from `echo $ac_file_in | sed 's,.*/,,'` by configure." # First look for the input files in the build tree, otherwise in the # src tree. ac_file_inputs=`IFS=: for f in $ac_file_in; do case $f in -) echo $tmp/stdin ;; [\\/$]*) # Absolute (can't be DOS-style, as IFS=:) test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } echo "$f";; *) # Relative if test -f "$f"; then # Build tree echo "$f" elif test -f "$srcdir/$f"; then # Source tree echo "$srcdir/$f" else # /dev/null tree { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } fi;; esac done` || { (exit 1); exit 1; } _ACEOF cat >>$CONFIG_STATUS <<_ACEOF sed "$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s,@configure_input@,$configure_input,;t t s,@srcdir@,$ac_srcdir,;t t s,@abs_srcdir@,$ac_abs_srcdir,;t t s,@top_srcdir@,$ac_top_srcdir,;t t s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t s,@builddir@,$ac_builddir,;t t s,@abs_builddir@,$ac_abs_builddir,;t t s,@top_builddir@,$ac_top_builddir,;t t s,@abs_top_builddir@,$ac_abs_top_builddir,;t t s,@INSTALL@,$ac_INSTALL,;t t " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out rm -f $tmp/stdin if test x"$ac_file" != x-; then mv $tmp/out $ac_file else cat $tmp/out rm -f $tmp/out fi done _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # # CONFIG_HEADER section. # # 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=' ' ac_dD=',;t' # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE". ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' ac_uB='$,\1#\2define\3' ac_uC=' ' ac_uD=',;t' for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". case $ac_file in - | *:- | *:-:* ) # input from stdin cat >$tmp/stdin ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; * ) ac_file_in=$ac_file.in ;; esac test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5 echo "$as_me: creating $ac_file" >&6;} # First look for the input files in the build tree, otherwise in the # src tree. ac_file_inputs=`IFS=: for f in $ac_file_in; do case $f in -) echo $tmp/stdin ;; [\\/$]*) # Absolute (can't be DOS-style, as IFS=:) test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } # Do quote $f, to prevent DOS paths from being IFS'd. echo "$f";; *) # Relative if test -f "$f"; then # Build tree echo "$f" elif test -f "$srcdir/$f"; then # Source tree echo "$srcdir/$f" else # /dev/null tree { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } fi;; esac done` || { (exit 1); exit 1; } # Remove the trailing spaces. sed 's/[ ]*$//' $ac_file_inputs >$tmp/in _ACEOF # Transform confdefs.h into two sed scripts, `conftest.defines' and # `conftest.undefs', that substitutes the proper values into # config.h.in to produce config.h. The first handles `#define' # templates, and the second `#undef' templates. # 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.defines conftest.undefs # Using a here document instead of a string reduces the quoting nightmare. # Putting comments in sed scripts is not portable. # # `end' is used to avoid that the second main sed command (meant for # 0-ary CPP macros) applies to n-ary macro definitions. # See the Autoconf documentation for `clear'. cat >confdef2sed.sed <<\_ACEOF s/[\\&,]/\\&/g s,[\\$`],\\&,g t clear : clear s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp t end s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp : end _ACEOF # If some macros were called several times there might be several times # the same #defines, which is useless. Nevertheless, we may not want to # sort them, since we want the *last* AC-DEFINE to be honored. uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs rm -f confdef2sed.sed # 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.undefs <<\_ACEOF s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */, _ACEOF # Break up conftest.defines because some shells have a limit on the size # of here documents, and old seds have small limits too (100 cmds). echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS echo ' :' >>$CONFIG_STATUS rm -f conftest.tail while grep . conftest.defines >/dev/null do # Write a limited-size here document to $tmp/defines.sed. echo ' cat >$tmp/defines.sed <>$CONFIG_STATUS # Speed up: don't consider the non `#define' lines. echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS # Work around the forget-to-reset-the-flag bug. echo 't clr' >>$CONFIG_STATUS echo ': clr' >>$CONFIG_STATUS sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS echo 'CEOF sed -f $tmp/defines.sed $tmp/in >$tmp/out rm -f $tmp/in mv $tmp/out $tmp/in ' >>$CONFIG_STATUS sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail rm -f conftest.defines mv conftest.tail conftest.defines done rm -f conftest.defines echo ' fi # grep' >>$CONFIG_STATUS echo >>$CONFIG_STATUS # Break up conftest.undefs because some shells have a limit on the size # of here documents, and old seds have small limits too (100 cmds). echo ' # Handle all the #undef templates' >>$CONFIG_STATUS rm -f conftest.tail while grep . conftest.undefs >/dev/null do # Write a limited-size here document to $tmp/undefs.sed. echo ' cat >$tmp/undefs.sed <>$CONFIG_STATUS # Speed up: don't consider the non `#undef' echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS # Work around the forget-to-reset-the-flag bug. echo 't clr' >>$CONFIG_STATUS echo ': clr' >>$CONFIG_STATUS sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS echo 'CEOF sed -f $tmp/undefs.sed $tmp/in >$tmp/out rm -f $tmp/in mv $tmp/out $tmp/in ' >>$CONFIG_STATUS sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail rm -f conftest.undefs mv conftest.tail conftest.undefs done rm -f conftest.undefs cat >>$CONFIG_STATUS <<\_ACEOF # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ if test x"$ac_file" = x-; then echo "/* Generated by configure. */" >$tmp/config.h else echo "/* $ac_file. Generated by configure. */" >$tmp/config.h fi cat $tmp/in >>$tmp/config.h rm -f $tmp/in if test x"$ac_file" != x-; then if diff $ac_file $tmp/config.h >/dev/null 2>&1; then { echo "$as_me:$LINENO: $ac_file is unchanged" >&5 echo "$as_me: $ac_file is unchanged" >&6;} else ac_dir=`(dirname "$ac_file") 2>/dev/null || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` { if $as_mkdir_p; then mkdir -p "$ac_dir" else as_dir="$ac_dir" as_dirs= while test ! -d "$as_dir"; do as_dirs="$as_dir $as_dirs" as_dir=`(dirname "$as_dir") 2>/dev/null || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` done test ! -n "$as_dirs" || mkdir $as_dirs fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} { (exit 1); exit 1; }; }; } rm -f $ac_file mv $tmp/config.h $ac_file fi else cat $tmp/config.h rm -f $tmp/config.h fi # Compute $ac_file's index in $config_headers. _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $ac_file | $ac_file:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $ac_file" >`(dirname $ac_file) 2>/dev/null || $as_expr X$ac_file : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X$ac_file : 'X\(//\)[^/]' \| \ X$ac_file : 'X\(//\)$' \| \ X$ac_file : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X$ac_file | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'`/stamp-h$_am_stamp_count done _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # # CONFIG_COMMANDS section. # for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue ac_dest=`echo "$ac_file" | sed 's,:.*,,'` ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_dir=`(dirname "$ac_dest") 2>/dev/null || $as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_dest" : 'X\(//\)[^/]' \| \ X"$ac_dest" : 'X\(//\)$' \| \ X"$ac_dest" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$ac_dest" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` { if $as_mkdir_p; then mkdir -p "$ac_dir" else as_dir="$ac_dir" as_dirs= while test ! -d "$as_dir"; do as_dirs="$as_dir $as_dirs" as_dir=`(dirname "$as_dir") 2>/dev/null || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` done test ! -n "$as_dirs" || mkdir $as_dirs fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} { (exit 1); exit 1; }; }; } ac_builddir=. if test "$ac_dir" != .; then ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A "../" for each directory in $ac_dir_suffix. ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` else ac_dir_suffix= ac_top_builddir= fi case $srcdir in .) # No --srcdir option. We are building in place. ac_srcdir=. if test -z "$ac_top_builddir"; then ac_top_srcdir=. else ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` fi ;; [\\/]* | ?:[\\/]* ) # Absolute path. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ;; *) # Relative path. ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_builddir$srcdir ;; esac # Do not use `cd foo && pwd` to compute absolute paths, because # the directories may not exist. case `pwd` in .) ac_abs_builddir="$ac_dir";; *) case "$ac_dir" in .) ac_abs_builddir=`pwd`;; [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; *) ac_abs_builddir=`pwd`/"$ac_dir";; esac;; esac case $ac_abs_builddir in .) ac_abs_top_builddir=${ac_top_builddir}.;; *) case ${ac_top_builddir}. in .) ac_abs_top_builddir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; esac;; esac case $ac_abs_builddir in .) ac_abs_srcdir=$ac_srcdir;; *) case $ac_srcdir in .) ac_abs_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; esac;; esac case $ac_abs_builddir in .) ac_abs_top_srcdir=$ac_top_srcdir;; *) case $ac_top_srcdir in .) ac_abs_top_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; esac;; esac { echo "$as_me:$LINENO: executing $ac_dest commands" >&5 echo "$as_me: executing $ac_dest commands" >&6;} case $ac_dest in depfiles ) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # So let's grep whole file. if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then dirpart=`(dirname "$mf") 2>/dev/null || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ X"$mf" : 'X\(//\)$' \| \ X"$mf" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`(dirname "$file") 2>/dev/null || $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$file" : 'X\(//\)[^/]' \| \ X"$file" : 'X\(//\)$' \| \ X"$file" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` { if $as_mkdir_p; then mkdir -p $dirpart/$fdir else as_dir=$dirpart/$fdir as_dirs= while test ! -d "$as_dir"; do as_dirs="$as_dir $as_dirs" as_dir=`(dirname "$as_dir") 2>/dev/null || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` done test ! -n "$as_dirs" || mkdir $as_dirs fi || { { echo "$as_me:$LINENO: error: cannot create directory $dirpart/$fdir" >&5 echo "$as_me: error: cannot create directory $dirpart/$fdir" >&2;} { (exit 1); exit 1; }; }; } # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done ;; esac done _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF { (exit 0); exit 0; } _ACEOF chmod +x $CONFIG_STATUS ac_clean_files=$ac_clean_files_save # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || { (exit 1); exit 1; } fi # # CONFIG_SUBDIRS section. # if test "$no_recursion" != yes; then # Remove --cache-file and --srcdir arguments so they do not pile up. ac_sub_configure_args= ac_prev= for ac_arg in $ac_configure_args; do if test -n "$ac_prev"; then ac_prev= continue fi case $ac_arg in -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \ | --c=*) ;; --config-cache | -C) ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) ;; *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;; esac done # Always prepend --prefix to ensure using the same prefix # in subdir configurations. ac_sub_configure_args="--prefix=$prefix $ac_sub_configure_args" ac_popdir=`pwd` for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue # Do not complain, so a configure script can configure whichever # parts of a large source tree are present. test -d $srcdir/$ac_dir || continue { echo "$as_me:$LINENO: configuring in $ac_dir" >&5 echo "$as_me: configuring in $ac_dir" >&6;} { if $as_mkdir_p; then mkdir -p "$ac_dir" else as_dir="$ac_dir" as_dirs= while test ! -d "$as_dir"; do as_dirs="$as_dir $as_dirs" as_dir=`(dirname "$as_dir") 2>/dev/null || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` done test ! -n "$as_dirs" || mkdir $as_dirs fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} { (exit 1); exit 1; }; }; } ac_builddir=. if test "$ac_dir" != .; then ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A "../" for each directory in $ac_dir_suffix. ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` else ac_dir_suffix= ac_top_builddir= fi case $srcdir in .) # No --srcdir option. We are building in place. ac_srcdir=. if test -z "$ac_top_builddir"; then ac_top_srcdir=. else ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` fi ;; [\\/]* | ?:[\\/]* ) # Absolute path. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ;; *) # Relative path. ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_builddir$srcdir ;; esac # Do not use `cd foo && pwd` to compute absolute paths, because # the directories may not exist. case `pwd` in .) ac_abs_builddir="$ac_dir";; *) case "$ac_dir" in .) ac_abs_builddir=`pwd`;; [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; *) ac_abs_builddir=`pwd`/"$ac_dir";; esac;; esac case $ac_abs_builddir in .) ac_abs_top_builddir=${ac_top_builddir}.;; *) case ${ac_top_builddir}. in .) ac_abs_top_builddir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; esac;; esac case $ac_abs_builddir in .) ac_abs_srcdir=$ac_srcdir;; *) case $ac_srcdir in .) ac_abs_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; esac;; esac case $ac_abs_builddir in .) ac_abs_top_srcdir=$ac_top_srcdir;; *) case $ac_top_srcdir in .) ac_abs_top_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; esac;; esac cd $ac_dir # Check for guested configure; otherwise get Cygnus style configure. if test -f $ac_srcdir/configure.gnu; then ac_sub_configure="$SHELL '$ac_srcdir/configure.gnu'" elif test -f $ac_srcdir/configure; then ac_sub_configure="$SHELL '$ac_srcdir/configure'" elif test -f $ac_srcdir/configure.in; then ac_sub_configure=$ac_configure else { echo "$as_me:$LINENO: WARNING: no configuration information is in $ac_dir" >&5 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;} ac_sub_configure= fi # The recursion is here. if test -n "$ac_sub_configure"; then # Make the cache file name correct relative to the subdirectory. case $cache_file in [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;; *) # Relative path. ac_sub_cache_file=$ac_top_builddir$cache_file ;; esac { echo "$as_me:$LINENO: running $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&5 echo "$as_me: running $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;} # The eval makes quoting arguments work. eval $ac_sub_configure $ac_sub_configure_args \ --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir || { { echo "$as_me:$LINENO: error: $ac_sub_configure failed for $ac_dir" >&5 echo "$as_me: error: $ac_sub_configure failed for $ac_dir" >&2;} { (exit 1); exit 1; }; } fi cd $ac_popdir done fi imwheel-1.0.0pre12.orig/lefty.sh0000755000175000017500000000016707203176120016701 0ustar chrischris00000000000000#!/bin/sh sed -e 's/_L/_R/g' < imwheelrc > imwheelrc.lefty mv imwheelrc imwheelrc.righty mv imwheelrc.lefty imwheelrc imwheel-1.0.0pre12.orig/configure.in0000644000175000017500000002127410114327765017542 0ustar chrischris00000000000000dnl Process this file with autoconf to produce a configure script. AC_INIT(imwheel.c) AC_PREREQ(2.13) AM_INIT_AUTOMAKE(imwheel,1.0.0pre12) dnl local Warnings=0 Good=xyes dnl Get system type system=`uname -s` dnl echo system=$system dnl Checks for programs. AC_PROG_CC AC_PROG_INSTALL AC_PROG_RANLIB AC_PROG_MAKE_SET dnl AC_PREFIX_PROGRAM(bin/imwheel) AM_CONFIG_HEADER(config.h) dnl AC_CONFIG_HEADER(config.h) dnl Checks for libraries. dnl there are none here...see the X libraries section below! dnl Checks for header files. AC_HEADER_STDC AC_HEADER_SYS_WAIT AC_CHECK_HEADERS(fcntl.h sys/time.h unistd.h getopt.h) dnl Checks for typedefs, structures, and compiler characteristics. AC_C_CONST AC_TYPE_PID_T AC_HEADER_TIME dnl Checks for library functions. AC_TYPE_SIGNAL AC_FUNC_VPRINTF AC_CHECK_FUNCS(gettimeofday regcomp strdup strtol getopt_long_only) dnl check that regcomp was found AC_MSG_CHECKING(that regex functions are available) if [[ "x$ac_cv_func_regcomp" = "$Good" ]] then AC_MSG_RESULT(yes) else AC_MSG_RESULT(no) AC_MSG_ERROR([regex functions not found, imwheel really needs these!]) fi dnl ask about PIDDIR AC_MSG_CHECKING(where the pid file goes) AC_ARG_WITH(pid-dir, changequote({, })dnl { --with-pid-dir=dir use dir for pid files [/tmp]}, changequote([, ])dnl [if [[ "x$withval" != "x" ]] then PIDDIR="$withval" else AC_MSG_ERROR([bad dir supplied for --with-pid-dir]) fi],[PIDDIR="/tmp"]) AC_MSG_RESULT($PIDDIR) AC_DEFINE_UNQUOTED(PIDDIR,"$PIDDIR",[Where do we want the pid file to go? ]) dnl AC_SUBST(PIDDIR) dnl ask whether to suid root the imwheel executable on installation AC_ARG_ENABLE(suid, changequote({, })dnl { --enable-suid=user suid user [default=root] the imwheel executable [no]}, changequote([, ])dnl [case "$enableval" in yes) suid=root ;; no) suid= ;; *) if [[ "x$enableval" = x ]] then suid="root" else suid="$enableval" fi;; esac],[suid=]) AC_MSG_CHECKING(if we suid imwheel at install) if [[ "x$suid" = "x" ]] then AC_MSG_RESULT(no) else AC_MSG_RESULT([yes, $suid]) fi AC_SUBST(suid) AM_CONDITIONAL(SUID, test "x$suid" != x) dnl ask about getopt or detect it getopt_dist= AC_MSG_CHECKING(if we use the included getopts) AC_ARG_WITH(getopt, changequote({, })dnl { --with-getopt use included getopt [guessed]}, changequote([, ])dnl [case "$withval" in yes) getopt=getopt ;; no) getopt= ;; *) AC_MSG_ERROR([bad value $withval for --with-getopt]) ;; esac],[getopt=]) if [[ "x$ac_cv_func_getopt_long_only" != "$Good" -o "x$ac_cv_header_getopt_h" != "$Good" ]] then getopt=getopt AC_MSG_RESULT(yes) else if [[ "x$getopt" = "xgetopt" ]] then AC_MSG_RESULT(forced) else AC_MSG_RESULT(no) getopt_dist=getopt fi fi AC_SUBST(getopt) if [[ "x$getopt" = "xgetopt" ]] then GETOPT_LIBS="-L$srcdir/getopt -lgetopt" GETOPT_INCS="-I$srcdir/getopt" else GETOPT_LIBS= GETOPT_INCS= fi AC_SUBST(GETOPT_LIBS) AC_SUBST(GETOPT_INCS) AC_SUBST(getopt_dist) dnl ask about mdetect AC_MSG_CHECKING(if we build mdetect) AC_ARG_ENABLE(mdetect, changequote({, })dnl { --enable-mdetect build mdetect, a ps/2 mouse data detector [no]}, changequote([, ])dnl [case "$enableval" in yes) mdetect=mdetect ;; no) mdetect= ;; *) AC_MSG_ERROR([bad value $enableval for --enable-mdetect]) ;; esac mdetect_dist=],[mdetect= mdetect_dist=mdetect ]) if [[ "x$mdetect" = "xmdetect" ]] then AC_MSG_RESULT(yes) else AC_MSG_RESULT(no) fi AC_SUBST(mdetect) AC_SUBST(mdetect_dist) dnl ask about mdump AC_MSG_CHECKING(if we build mdump) AC_ARG_ENABLE(mdump, changequote({, })dnl { --enable-mdump build mdump, a ps/2 mouse data dumper [no]}, changequote([, ])dnl [case "$enableval" in yes) mdump=mdump ;; no) mdump= ;; *) AC_MSG_ERROR([bad value $enableval for --enable-mdump]) ;; esac mdump_dist=],[mdump= mdump_dist=mdump.c]) if [[ "x$mdump" = "xmdump" ]] then AC_MSG_RESULT(yes) else AC_MSG_RESULT(no) fi AC_SUBST(mdump) AC_SUBST(mdump_dist) dnl ask about extras EXTRAS="setimps2 setmmplus getmdt setps2 setps2rate" EXTRAS_SRC="setimps2.c setmmplus.c getmdt.c setps2.c setps2rate.c" AC_MSG_CHECKING(if we build extras) AC_ARG_ENABLE(extras, changequote({, })dnl { --enable-extras build some extra ps/2 mouse debugging utils [no]}, changequote([, ])dnl [case "$enableval" in yes) extras=yes ;; no) extras= ;; *) AC_MSG_ERROR([bad value $enableval for --enable-extras]) ;; esac],[extras=]) if [[ "x$extras" = "$Good" ]] then AC_MSG_RESULT(yes) extras="$EXTRAS" extras_dist= else AC_MSG_RESULT(no) extras_dist="$EXTRAS_SRC" fi AC_SUBST(extras) AC_SUBST(extras_dist) dnl Check for gpm-imwheel source. NO_GPM_DOC= GPM_DIR="gpm-1.19.3" AC_SUBST(GPM_DIR) AC_CHECK_FILE($GPM_DIR/gpm.c,HAVE_GPM_SRC=yes,HAVE_GPM_SRC=no) AC_SUBST(HAVE_GPM_SRC) AC_MSG_CHECKING(if we build gpm-imwheel) gpm_enabled=no gpm_doc=no gpm_imwheel=$GPM_DIR AC_ARG_ENABLE(gpm, changequote({, })dnl { --enable-gpm build gpm-imwheel [build if source present]}, changequote([, ])dnl [case "$enableval" in yes) gpm_imwheel="$GPM_DIR" gpm_enabled=yes ;; no) gpm_imwheel= ;; *) AC_MSG_ERROR([bad value $enableval for --enable-gpm]) ;; esac],[gpm_imwheel=]) AC_ARG_ENABLE(gpm_doc, changequote({, })dnl { --enable-gpm-doc build in gpm/doc [build if source present]}, changequote([, ])dnl [case "$enableval" in yes) no_gpm_doc=true ;; no) no_gpm_doc=false ;; *) AC_MSG_ERROR([bad value $enableval for --enable-gpm-doc]) ;; esac],[no_gpm_doc=true]) if [[ "x$HAVE_GPM_SRC" = "$Good" ]] then if [[ "x$gpm_imwheel" = "x$GPM_DIR" ]] then AC_MSG_RESULT(yes) AC_CONFIG_SUBDIRS(gpm-1.19.3) AC_DEFINE_UNQUOTED(HAVE_GPM_SRC,1,[Define only if you are building the imwheel version of gpm. ]) AM_CONDITIONAL(NO_GPM_DOC, $no_gpm_doc) else AC_MSG_RESULT(no) AM_CONDITIONAL(NO_GPM_DOC, false) fi else gpm_imwheel= if [[ "x$gpm_enabled" = "xyes" ]] then AC_MSG_RESULT(unable) AM_CONDITIONAL(NO_GPM_DOC, false) AC_MSG_WARN([$GPM_DIR building disabled, source not present!]) Warnings=`expr $Warnings + 1` else AC_MSG_RESULT(no) AM_CONDITIONAL(NO_GPM_DOC, false) fi fi gpm_dist="$GPM_DIR" AC_SUBST(gpm_imwheel) AC_SUBST(gpm_dist) dnl Checks for X. AC_PATH_X AC_PATH_XTRA dnl Check for XFree86. dnl AC_MSG_CHECKING(if we want to check for XFree86) dnl AC_ARG_ENABLE(check-xfree86, dnl changequote({, })dnl dnl { --disable-check-xfree86 don't check the X server vendor [enabled]}, dnl changequote([, ])dnl dnl [case "$enableval" in dnl yes) check_xfree86=yes ;; dnl no) check_xfree86= ;; dnl *) AC_MSG_ERROR([bad value $enableval for --enable-check-xfree86]) ;; dnl esac],[check_xfree86=yes]) dnl if [[ "x$check_xfree86" = "$Good" -a "$system" = "Linux" ]] dnl then dnl AC_MSG_RESULT(yes) dnl XPath=$PATH:/usr/X11R6/bin:/var/X11R6/bin:/usr/X11/bin:/var/X11/bin:/usr/openwin/bin:/bin:/usr/bin:/usr/local/bin dnl AC_CHECK_PROGS(X, X Xwrapper XF86_SVGA XF86_VGA16 Xsun, noX, $XPath) dnl if [[ "x$X" != "xnoX" ]] dnl then dnl AC_MSG_CHECKING(if $X is XFree86) dnl XFree86="`( PATH=$PATH:$XPath ; $X -version 2>&1 | grep \"XFree86 Version\" | head -1 ) 2>/dev/null | cut -f1 -d ' '`" dnl dnl echo XFree86=$XFree86 dnl if [[ "x$XFree86" = "xXFree86" ]] dnl then dnl AC_MSG_RESULT(yes) dnl else dnl AC_MSG_RESULT(no) dnl AC_MSG_WARN([You are not using XFree86, IMWheel may still work]) dnl AC_MSG_WARN([ provided your Xserver has the XTest extension built]) dnl AC_MSG_WARN([ and you choose you mouse drivers and method of wheel]) dnl AC_MSG_WARN([ input wisely. Other servers may not support the wheel.]) dnl AC_MSG_WARN([ In that case you should use the gpm or jam method of]) dnl AC_MSG_WARN([ input for wheel data to imwheel.]) dnl Warnings=`expr "$Warnings" + 1` dnl fi dnl fi dnl else dnl AC_MSG_RESULT(no) dnl fi dnl Check for X include. dnl AC_CHECK_HEADERS(X11R6/Xlib.h,, [ dnl AC_MSG_ERROR([IMWheel depends on the X11 include files!]) dnl ]) dnl Checks for X libraries. LIBS_saved="$LIBS" LIBS= AC_CHECK_LIB(X11, XCreateWindow,, [ AC_MSG_ERROR([IMWheel depends on the X11 libraries!]) ], $LIBS_saved $X_LIBS) AC_CHECK_LIB(Xext, XextAddDisplay,,,$LIBS_saved $X_LIBS) AC_CHECK_LIB(Xt, XtFree,,,$LIBS_saved $X_LIBS) AC_CHECK_LIB(Xmu, XmuInternAtom,,,$LIBS_saved $X_LIBS) AC_CHECK_LIB(Xtst, XTestFakeDeviceKeyEvent,, [ AC_MSG_ERROR([IMWheel depends on the XTest extention!]) ],$LIBS_saved $X_LIBS) X_LIBS="$X_LIBS $LIBS" LIBS="$LIBS_saved" dnl end with a possible about any warnings... if [[ "$Warnings" != "0" ]] then echo "" if [[ "$Warnings" != "1" ]] then echo "You had $Warnings warnings during configure, imwheel may not compile or run." else echo "You had a warning during configure, imwheel may not compile or run, or it may" echo "have an incomplete package built." fi echo "" fi dnl final output AC_OUTPUT(jax/Makefile Makefile mdetect/Makefile getopt/Makefile) imwheel-1.0.0pre12.orig/mdetect/0000755000175000017500000000000010114331042016627 5ustar chrischris00000000000000imwheel-1.0.0pre12.orig/mdetect/mice/0000755000175000017500000000000010114331042017544 5ustar chrischris00000000000000imwheel-1.0.0pre12.orig/mdetect/mice/default0000644000175000017500000000041407203176122021125 0ustar chrischris00000000000000PACKET 3 MASK mask 0x08 0x00 0x00 BUTTON 1 BOTH mask 0x01 0x00 0x00 BUTTON 2 BOTH mask 0x04 0x00 0x00 BUTTON 3 BOTH mask 0x02 0x00 0x00 MOTION MASK mask MOTION TYPE RELATIVE MOTION X RIGHT 1,0 1,1 1,2 1,3 1,4 1,5 1,6 1,7 MOTION Y UP 2,0 2,1 2,2 2,3 2,4 2,5 2,6 2,7 imwheel-1.0.0pre12.orig/mdetect/mice/mouseman+0000644000175000017500000000062507203176122021404 0ustar chrischris00000000000000PACKET 3 MASK mask 0x08 0x00 0x00 MASK stick 0xc8 0x00 0x00 SYNC mask BUTTON 1 BOTH mask 0x01 0x00 0x00 BUTTON 2 BOTH mask 0x04 0x00 0x00 BUTTON 3 BOTH mask 0x02 0x00 0x00 STICK 1 X ONCE ORIGIN RIGHT stick 1,0 1,1 1,2 1,3 STICK 1 Y ONCE ORIGIN UP stick 1,4 1,5 1,6 1,7 MOTION MASK mask MOTION TYPE RELATIVE MOTION X RIGHT 1,0 1,1 1,2 1,3 1,4 1,5 1,6 1,7 MOTION Y UP 2,0 2,1 2,2 2,3 2,4 2,5 2,6 2,7 imwheel-1.0.0pre12.orig/mdetect/mice/a4tech0000644000175000017500000000106007203176122020647 0ustar chrischris00000000000000PACKET 4 MASK mask 0x08 0x00 0x00 BUTTON 1 BOTH mask 0x01 0x00 0x00 0x00 BUTTON 2 BOTH mask 0x04 0x00 0x00 0x00 BUTTON 3 BOTH mask 0x02 0x00 0x00 0x00 BUTTON 4 PRESS mask 0x00 0x00 0x00 0xff #wheel up BUTTON 5 PRESS mask 0x00 0x00 0x00 0x01 #wheel down BUTTON 6 PRESS mask 0x00 0x00 0x00 0x0e #wheel left - serial BUTTON 6 PRESS mask 0x00 0x00 0x00 0xfe #wheel left - ps2 BUTTON 7 PRESS mask 0x00 0x00 0x00 0x02 #wheel right MOTION MASK mask MOTION TYPE RELATIVE MOTION X RIGHT 1,0 1,1 1,2 1,3 1,4 1,5 1,6 1,7 MOTION Y UP 2,0 2,1 2,2 2,3 2,4 2,5 2,6 2,7 imwheel-1.0.0pre12.orig/mdetect/mice/intellimouse0000644000175000017500000000060407203176122022213 0ustar chrischris00000000000000PACKET 4 MASK mask 0x08 0x00 0x00 BUTTON 1 BOTH mask 0x01 0x00 0x00 0x00 BUTTON 2 BOTH mask 0x04 0x00 0x00 0x00 BUTTON 3 BOTH mask 0x02 0x00 0x00 0x00 BUTTON 4 PRESS mask 0x00 0x00 0x00 0xff #wheel up BUTTON 5 PRESS mask 0x00 0x00 0x00 0x01 #wheel down MOTION MASK mask MOTION TYPE RELATIVE MOTION X RIGHT 1,0 1,1 1,2 1,3 1,4 1,5 1,6 1,7 MOTION Y UP 2,0 2,1 2,2 2,3 2,4 2,5 2,6 2,7 imwheel-1.0.0pre12.orig/mdetect/mice/netmouse0000644000175000017500000000044307203176122021342 0ustar chrischris00000000000000PACKET 4 MASK mask 0x08 0x00 0x00 0x00 BUTTON 1 BOTH mask 0x01 0x00 0x00 0x00 BUTTON 2 PRESS mask 0x00 0x00 0x00 0xff BUTTON 3 BOTH mask 0x02 0x00 0x00 0x00 MOTION MASK mask MOTION TYPE RELATIVE MOTION X RIGHT 1,0 1,1 1,2 1,3 1,4 1,5 1,6 1,7 MOTION Y UP 2,0 2,1 2,2 2,3 2,4 2,5 2,6 2,7 imwheel-1.0.0pre12.orig/mdetect/mdetect.c0000644000175000017500000001630707203176122020442 0ustar chrischris00000000000000#include #include #include #ifdef HAVE_UNISTD_H #include #endif #ifdef HAVE_FCNTL_H #include #endif #include #include #include #include #include #define openps2 open(mousedev,O_RDWR|O_SYNC|O_NOCTTY) //#define flushps2 tcflush(fd, TCIFLUSH) #define flushps2 flushfd(fd) #define K(a) ((a)*1024) typedef unsigned char uchar; char readps2(); void dumpps2(); void diag1(); void diag2(); void diag3(); int filterps2buf(uchar *buf, int len); void flushfd(int fd); char DisableDev =0xF5; char GetDeviceType =0xF2; char SetStdPS2 =0xFF; char *mousedev="/dev/psaux"; // mouse config data (detected and used) int len=0; char mask[16]; char **buttons; int numbuttons=0; // local data int fd; uchar ch; int main(int argc, char **argv) { fd=openps2; if(fd<0) return(1); //printf("DisableDev\n"); write(fd,&DisableDev,1); flushps2; //printf("SetStdPS2\n"); write(fd,&SetStdPS2,1); readps2(); flushps2; //printf("GetDeviceType\n"); write(fd,&GetDeviceType,1); readps2(); close(fd); fd=openps2; if(fd<0) return(1); diag1(); diag2(); diag3(); close(fd); return(0); } char readps2() { while(read(fd,&ch,1) && (ch==0xfa || ch==0xaa)); /* { printf("<%02X>",ch); fflush(stdout); } */ return(ch); } void dumpps2() { printf("Dump\n"); while(read(fd,&ch,1)) { printf(" %02x ",ch); fflush(stdout); } } int filterps2buf(uchar *buf, int l) { int i; for(i=0;i=n;i=i-n); return(i); } */ void flushfd(int fd) { int oldflags; uchar buf[K(1)]; oldflags=fcntl(fd,F_GETFL); fcntl(fd,F_SETFL,oldflags|O_NONBLOCK); while(read(fd,buf,K(1)) > 0); fcntl(fd,F_SETFL,oldflags); } int getbit(uchar *buf, int n) { return((buf[n/8]>>(n%8))&1); } int nextbit(int n, uchar *in, uchar *mask) { int i; for(i=n+1; i/8=len) return(-1); else return(i); } /* unsigned long long numcombo(int n) { unsigned long long c; int i; for(i=1,c=1;i=0;i--) *ialist[i]=malloc(n*sizeof(int)); ialistlen=0; used=malloc(len); } // work for(i=nextbit(-1,all,used);i>=0;i=nextbit(i,all,used)) { iacur[cur]=i; if(numbits(used)==n) { // end memcpy(*ialist[ialistlen],iacur,len); ialistlen++; } else { // recurse used[i/8]|=i%8; bitcombo(all,cur+1,ialist); used[i/8]^=i%8; } } // cleanup if(!cur) { free(iacur); free(used); } return(ialistlen); } */ //////////////////////////////////////////////////////////////////////////////// // Packet Length // Mask void diag1() { uchar buf[K(1)]; int i; printf("[ Mouse Packet Length & Mouse Mask ]\n"); printf("Lift mouse in air.\nYou will be asked to press the left mouse button once.\nDo NOT shake mouse during test or motion data will interfere.\n"); printf("Press ENTER when ready: "); fflush(stdout); scanf("%*c"); //fd=openps2; flushps2; printf("Press left mouse button once then press ENTER: "); fflush(stdout); scanf("%*c"); i=read(fd,buf,K(1)); //close(fd); len=filterps2buf(buf,i); for(i=0;i #include #include #include #include #ifdef HAVE_FCNTL_H #include #endif #include #ifdef HAVE_UNISTD_H #include #endif #ifdef TIME_WITH_SYS_TIME #include #endif #ifdef HAVE_SYS_TIME_H #include #endif #ifndef O_SYNC #define O_SYNC 0 #endif #define SIGNOF(a) (a<0?-1:1) char readps2(int fd) { char ch; while(read(fd,&ch,1) && (ch==(char)0xfa || ch==(char)0xaa)) { printf("<%02X>",ch&0xff); fflush(stdout); } return(ch); } int main(int argc, char **argv) { int fd; char ch; int len=3,i,j; #ifdef HAVE_GETTIMEOFDAY struct timeval tv,tv2; long t; #endif if(argc>1) fd=open(argv[1],O_RDWR,O_NOCTTY|O_SYNC); else fd=open("/dev/mouse",O_RDWR,O_NOCTTY|O_SYNC); if(argc>2) len=atoi(argv[2]); #ifdef HAVE_GETTIMEOFDAY gettimeofday(&tv2,NULL); #endif ch=0xf2; write(fd,&ch,1); ch=readps2(fd); printf("device type=%02X(%4d)\n",ch&0xff,ch); while(read(fd,&ch,1)) { #ifdef HAVE_GETTIMEOFDAY gettimeofday(&tv,NULL); t=(tv.tv_sec-tv2.tv_sec)*1000000L+(tv.tv_usec-tv2.tv_usec); printf("%10ld (%3ldMHz) : ",t,1000000/t); tv2.tv_sec=tv.tv_sec; tv2.tv_usec=tv.tv_usec; #endif for(i=1; i<=len; i++) { printf("%02X(%4d)",ch&0xff,ch); if(argc>3 || i>1) { printf("="); for(j=7;j>=0;j--) printf("%01d",(ch>>j)&1); printf("=%2d,%2d",(ch>>4), (ch&0x0F)<<28>>28); printf(") "); } if(i sent these instructions for imwheel on FreeBSD, plus a few patches...ENJOY! (slightly edited for content and to fit your screen) I currenly have FreeBSD-3.0 (although this should work with 2.2.6, or even earlier) and a Microsoft IntelliMouse PS/2. I did the following to get it to work: 1) To run moused, use the -t sysmouse (NOT PS/2!!!) argument for a ps/2 mouse, or -t intellimouse for the serial version (note, i've never tried the serial version, so i'm not *positive* it will work... I'd like some feedback on this if possible) 2) Run imwheel using method #1 as described in the imwheel README. However, your XF86Config *must* be set up as follows (since there is no FreeBSD XFree86 support for IMPS/2 because it can't preinitialize the ps/2 port): Section "Pointer" Protocol "IntelliMouse" Device "/dev/sysmouse" ZAxisMapping 4 5 EndSection You can add other options if you want; however, it is important that you use the IntelliMouse protocol and read from /dev/sysmouse (this is the passthrough device for moused). Basically, the way moused works is that you can use *ANY* protocol for reading /dev/sysmouse. Therefore, since we can't use IMPS/2, we simply use IntelliMouse, so X thinks it's a serial IntelliMouse, and everything is passed through! Oh yeah, one final note, gpm is NOT needed (nor will it even compile) on FreeBSD. imwheel-1.0.0pre12.orig/missing0000755000175000017500000002466610061736135016634 0ustar chrischris00000000000000#! /bin/sh # Common stub for a few missing GNU programs while installing. scriptversion=2003-09-02.23 # Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003 # Free Software Foundation, Inc. # Originally by Fran,cois Pinard , 1996. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. if test $# -eq 0; then echo 1>&2 "Try \`$0 --help' for more information" exit 1 fi run=: # In the cases where this matters, `missing' is being run in the # srcdir already. if test -f configure.ac; then configure_ac=configure.ac else configure_ac=configure.in fi msg="missing on your system" case "$1" in --run) # Try to run requested program, and just exit if it succeeds. run= shift "$@" && exit 0 # Exit code 63 means version mismatch. This often happens # when the user try to use an ancient version of a tool on # a file that requires a minimum version. In this case we # we should proceed has if the program had been absent, or # if --run hadn't been passed. if test $? = 63; then run=: msg="probably too old" fi ;; esac # If it does not exist, or fails to run (possibly an outdated version), # try to emulate it. case "$1" in -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an error status if there is no known handling for PROGRAM. Options: -h, --help display this help and exit -v, --version output version information and exit --run try to run the given command, and emulate it if it fails Supported PROGRAM values: aclocal touch file \`aclocal.m4' autoconf touch file \`configure' autoheader touch file \`config.h.in' automake touch all \`Makefile.in' files bison create \`y.tab.[ch]', if possible, from existing .[ch] flex create \`lex.yy.c', if possible, from existing .c help2man touch the output file lex create \`lex.yy.c', if possible, from existing .c makeinfo touch the output file tar try tar, gnutar, gtar, then tar without non-portable flags yacc create \`y.tab.[ch]', if possible, from existing .[ch] Send bug reports to ." ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing $scriptversion (GNU Automake)" ;; -*) echo 1>&2 "$0: Unknown \`$1' option" echo 1>&2 "Try \`$0 --help' for more information" exit 1 ;; aclocal*) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." touch aclocal.m4 ;; autoconf) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." touch configure ;; autoheader) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acconfig.h' or \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` test -z "$files" && files="config.h" touch_files= for f in $files; do case "$f" in *:*) touch_files="$touch_files "`echo "$f" | sed -e 's/^[^:]*://' -e 's/:.*//'`;; *) touch_files="$touch_files $f.in";; esac done touch $touch_files ;; automake*) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." find . -type f -name Makefile.am -print | sed 's/\.am$/.in/' | while read f; do touch "$f"; done ;; autom4te) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is needed, but is $msg. You might have modified some files without having the proper tools for further handling them. You can get \`$1' as part of \`Autoconf' from any GNU archive site." file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'` test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'` if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo "#! /bin/sh" echo "# Created by GNU Automake missing as a replacement of" echo "# $ $@" echo "exit 0" chmod +x $file exit 1 fi ;; bison|yacc) echo 1>&2 "\ WARNING: \`$1' $msg. You should only need it if you modified a \`.y' file. You may need the \`Bison' package in order for those modifications to take effect. You can get \`Bison' from any GNU archive site." rm -f y.tab.c y.tab.h if [ $# -ne 1 ]; then eval LASTARG="\${$#}" case "$LASTARG" in *.y) SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` if [ -f "$SRCFILE" ]; then cp "$SRCFILE" y.tab.c fi SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` if [ -f "$SRCFILE" ]; then cp "$SRCFILE" y.tab.h fi ;; esac fi if [ ! -f y.tab.h ]; then echo >y.tab.h fi if [ ! -f y.tab.c ]; then echo 'main() { return 0; }' >y.tab.c fi ;; lex|flex) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.l' file. You may need the \`Flex' package in order for those modifications to take effect. You can get \`Flex' from any GNU archive site." rm -f lex.yy.c if [ $# -ne 1 ]; then eval LASTARG="\${$#}" case "$LASTARG" in *.l) SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` if [ -f "$SRCFILE" ]; then cp "$SRCFILE" lex.yy.c fi ;; esac fi if [ ! -f lex.yy.c ]; then echo 'main() { return 0; }' >lex.yy.c fi ;; help2man) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a dependency of a manual page. You may need the \`Help2man' package in order for those modifications to take effect. You can get \`Help2man' from any GNU archive site." file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` if test -z "$file"; then file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'` fi if [ -f "$file" ]; then touch $file else test -z "$file" || exec >$file echo ".ab help2man is required to generate this page" exit 1 fi ;; makeinfo) if test -z "$run" && (makeinfo --version) > /dev/null 2>&1; then # We have makeinfo, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.texi' or \`.texinfo' file, or any other file indirectly affecting the aspect of the manual. The spurious call might also be the consequence of using a buggy \`make' (AIX, DU, IRIX). You might want to install the \`Texinfo' package or the \`GNU make' package. Grab either from any GNU archive site." file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` if test -z "$file"; then file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file` fi touch $file ;; tar) shift if test -n "$run"; then echo 1>&2 "ERROR: \`tar' requires --run" exit 1 fi # We have already tried tar in the generic part. # Look for gnutar/gtar before invocation to avoid ugly error # messages. if (gnutar --version > /dev/null 2>&1); then gnutar "$@" && exit 0 fi if (gtar --version > /dev/null 2>&1); then gtar "$@" && exit 0 fi firstarg="$1" if shift; then case "$firstarg" in *o*) firstarg=`echo "$firstarg" | sed s/o//` tar "$firstarg" "$@" && exit 0 ;; esac case "$firstarg" in *h*) firstarg=`echo "$firstarg" | sed s/h//` tar "$firstarg" "$@" && exit 0 ;; esac fi echo 1>&2 "\ WARNING: I can't seem to be able to run \`tar' with the given arguments. You may want to install GNU tar or Free paxutils, or check the command line arguments." exit 1 ;; *) echo 1>&2 "\ WARNING: \`$1' is needed, and is $msg. You might have modified some files without having the proper tools for further handling them. Check the \`README' file, it often tells you about the needed prerequisites for installing this package. You may also peek at any GNU archive site, in case some other package would contain this missing \`$1' program." exit 1 ;; esac exit 0 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-end: "$" # End: imwheel-1.0.0pre12.orig/mkinstalldirs0000755000175000017500000000132410061736135020025 0ustar chrischris00000000000000#! /bin/sh # mkinstalldirs --- make directory hierarchy # Author: Noah Friedman # Created: 1993-05-16 # Public domain # $Id: mkinstalldirs,v 1.2 2004/06/10 01:41:49 jcatki Exp $ errstatus=0 for file do set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'` shift pathcomp= for d do pathcomp="$pathcomp$d" case "$pathcomp" in -* ) pathcomp=./$pathcomp ;; esac if test ! -d "$pathcomp"; then echo "mkdir $pathcomp" mkdir "$pathcomp" || lasterr=$? if test ! -d "$pathcomp"; then errstatus=$lasterr fi fi pathcomp="$pathcomp/" done done exit $errstatus # mkinstalldirs ends here imwheel-1.0.0pre12.orig/getmdt.c0000644000175000017500000000152307203176117016652 0ustar chrischris00000000000000#include #include #include #include #include #ifdef HAVE_FCNTL_H #include #endif #include #ifdef HAVE_UNISTD_H #include #endif #include #include char readps2(int fd) { char ch; while(read(fd,&ch,1) && (ch==(char)0xfa || ch==(char)0xaa)) { printf("<%02X>",ch&0xff); fflush(stdout); } return(ch); } int main(int argc, char **argv) { int fd; char ch, getdevtype=0xf2, disabledev=0xf5, setimps2[6]={0xf3,200,0xf3,100,0xf3,80}, setupmore[7]={0xf6,0xe6,0xf4,0xf3,100,0xe8,3}, resetps2=0xff; if(argc>1) fd=open(argv[1],O_RDWR); else fd=open("/dev/mouse",O_RDWR); tcflush(fd, TCIFLUSH); write(fd,&getdevtype,1); sleep(1); ch=readps2(fd); printf("device type=%02X(%4d)\n",ch&0xff,ch); close(fd); return(0); } imwheel-1.0.0pre12.orig/getopt/0000755000175000017500000000000010114331042016504 5ustar chrischris00000000000000imwheel-1.0.0pre12.orig/getopt/getopt.c0000644000175000017500000005460607203176121020177 0ustar chrischris00000000000000/* Getopt for GNU. NOTE: getopt is now part of the C library, so if you don't know what "Keep this file name-space clean" means, talk to roland@gnu.ai.mit.edu before changing it! Copyright (C) 1987, 88, 89, 90, 91, 92, 93, 94, 95 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ /* This tells Alpha OSF/1 not to define a getopt prototype in . Ditto for AIX 3.2 and . */ #ifndef _NO_PROTO #define _NO_PROTO #endif #ifdef HAVE_CONFIG_H #include #endif #if !defined (__STDC__) || !__STDC__ /* This is a separate conditional since some stdc systems reject `defined (const)'. */ #ifndef const #define const #endif #endif #include /* Comment out all this code if we are using the GNU C Library, and are not actually compiling the library itself. This code is part of the GNU C Library, but also included in many other GNU distributions. Compiling and linking in this code is a waste when using the GNU C library (especially if it is a shared library). Rather than having every GNU program understand `configure --with-gnu-libc' and omit the object files, it is simpler to just do this in the source for each such file. */ #if defined (_LIBC) || !defined (__GNU_LIBRARY__) /* This needs to come after some library #include to get __GNU_LIBRARY__ defined. */ #ifdef __GNU_LIBRARY__ /* Don't include stdlib.h for non-GNU C libraries because some of them contain conflicting prototypes for getopt. */ #include #endif /* GNU C library. */ #ifndef _ /* This is for other GNU distributions with internationalized messages. When compiling libc, the _ macro is predefined. */ #ifdef HAVE_LIBINTL_H # include # define _(msgid) gettext (msgid) #else # define _(msgid) (msgid) #endif #endif /* This version of `getopt' appears to the caller like standard Unix `getopt' but it behaves differently for the user, since it allows the user to intersperse the options with the other arguments. As `getopt' works, it permutes the elements of ARGV so that, when it is done, all the options precede everything else. Thus all application programs are extended to handle flexible argument order. Setting the environment variable POSIXLY_CORRECT disables permutation. Then the behavior is completely standard. GNU application programs can use a third alternative mode in which they can distinguish the relative order of options and other arguments. */ #include "getopt.h" /* For communication from `getopt' to the caller. When `getopt' finds an option that takes an argument, the argument value is returned here. Also, when `ordering' is RETURN_IN_ORDER, each non-option ARGV-element is returned here. */ char *optarg = NULL; /* Index in ARGV of the next element to be scanned. This is used for communication to and from the caller and for communication between successive calls to `getopt'. On entry to `getopt', zero means this is the first call; initialize. When `getopt' returns EOF, this is the index of the first of the non-option elements that the caller should itself scan. Otherwise, `optind' communicates from one call to the next how much of ARGV has been scanned so far. */ /* XXX 1003.2 says this must be 1 before any call. */ int optind = 0; /* The next char to be scanned in the option-element in which the last option character we returned was found. This allows us to pick up the scan where we left off. If this is zero, or a null string, it means resume the scan by advancing to the next ARGV-element. */ static char *nextchar; /* Callers store zero here to inhibit the error message for unrecognized options. */ int opterr = 1; /* Set to an option character which was unrecognized. This must be initialized on some systems to avoid linking in the system's own getopt implementation. */ int optopt = '?'; /* Describe how to deal with options that follow non-option ARGV-elements. If the caller did not specify anything, the default is REQUIRE_ORDER if the environment variable POSIXLY_CORRECT is defined, PERMUTE otherwise. REQUIRE_ORDER means don't recognize them as options; stop option processing when the first non-option is seen. This is what Unix does. This mode of operation is selected by either setting the environment variable POSIXLY_CORRECT, or using `+' as the first character of the list of option characters. PERMUTE is the default. We permute the contents of ARGV as we scan, so that eventually all the non-options are at the end. This allows options to be given in any order, even with programs that were not written to expect this. RETURN_IN_ORDER is an option available to programs that were written to expect options and other ARGV-elements in any order and that care about the ordering of the two. We describe each non-option ARGV-element as if it were the argument of an option with character code 1. Using `-' as the first character of the list of option characters selects this mode of operation. The special argument `--' forces an end of option-scanning regardless of the value of `ordering'. In the case of RETURN_IN_ORDER, only `--' can cause `getopt' to return EOF with `optind' != ARGC. */ static enum { REQUIRE_ORDER, PERMUTE, RETURN_IN_ORDER } ordering; /* Value of POSIXLY_CORRECT environment variable. */ static char *posixly_correct; #ifdef __GNU_LIBRARY__ /* We want to avoid inclusion of string.h with non-GNU libraries because there are many ways it can cause trouble. On some systems, it contains special magic macros that don't work in GCC. */ #include #define my_index strchr #else /* Avoid depending on library functions or files whose names are inconsistent. */ char *getenv (); static char * my_index (str, chr) const char *str; int chr; { while (*str) { if (*str == chr) return (char *) str; str++; } return 0; } /* If using GCC, we can safely declare strlen this way. If not using GCC, it is ok not to declare it. */ #ifdef __GNUC__ /* Note that Motorola Delta 68k R3V7 comes with GCC but not stddef.h. That was relevant to code that was here before. */ #if !defined (__STDC__) || !__STDC__ /* gcc with -traditional declares the built-in strlen to return int, and has done so at least since version 2.4.5. -- rms. */ extern int strlen (const char *); #endif /* not __STDC__ */ #endif /* __GNUC__ */ #endif /* not __GNU_LIBRARY__ */ /* Handle permutation of arguments. */ /* Describe the part of ARGV that contains non-options that have been skipped. `first_nonopt' is the index in ARGV of the first of them; `last_nonopt' is the index after the last of them. */ static int first_nonopt; static int last_nonopt; /* Exchange two adjacent subsequences of ARGV. One subsequence is elements [first_nonopt,last_nonopt) which contains all the non-options that have been skipped so far. The other is elements [last_nonopt,optind), which contains all the options processed since those non-options were skipped. `first_nonopt' and `last_nonopt' are relocated so that they describe the new indices of the non-options in ARGV after they are moved. */ static void exchange (argv) char **argv; { int bottom = first_nonopt; int middle = last_nonopt; int top = optind; char *tem; /* Exchange the shorter segment with the far end of the longer segment. That puts the shorter segment into the right place. It leaves the longer segment in the right place overall, but it consists of two parts that need to be swapped next. */ while (top > middle && middle > bottom) { if (top - middle > middle - bottom) { /* Bottom segment is the short one. */ int len = middle - bottom; register int i; /* Swap it with the top part of the top segment. */ for (i = 0; i < len; i++) { tem = argv[bottom + i]; argv[bottom + i] = argv[top - (middle - bottom) + i]; argv[top - (middle - bottom) + i] = tem; } /* Exclude the moved bottom segment from further swapping. */ top -= len; } else { /* Top segment is the short one. */ int len = top - middle; register int i; /* Swap it with the bottom part of the bottom segment. */ for (i = 0; i < len; i++) { tem = argv[bottom + i]; argv[bottom + i] = argv[middle + i]; argv[middle + i] = tem; } /* Exclude the moved top segment from further swapping. */ bottom += len; } } /* Update records for the slots the non-options now occupy. */ first_nonopt += (optind - last_nonopt); last_nonopt = optind; } /* Initialize the internal data when the first call is made. */ static const char * _getopt_initialize (optstring) const char *optstring; { /* Start processing options with ARGV-element 1 (since ARGV-element 0 is the program name); the sequence of previously skipped non-option ARGV-elements is empty. */ first_nonopt = last_nonopt = optind = 1; nextchar = NULL; posixly_correct = getenv ("POSIXLY_CORRECT"); /* Determine how to handle the ordering of options and nonoptions. */ if (optstring[0] == '-') { ordering = RETURN_IN_ORDER; ++optstring; } else if (optstring[0] == '+') { ordering = REQUIRE_ORDER; ++optstring; } else if (posixly_correct != NULL) ordering = REQUIRE_ORDER; else ordering = PERMUTE; return optstring; } /* Scan elements of ARGV (whose length is ARGC) for option characters given in OPTSTRING. If an element of ARGV starts with '-', and is not exactly "-" or "--", then it is an option element. The characters of this element (aside from the initial '-') are option characters. If `getopt' is called repeatedly, it returns successively each of the option characters from each of the option elements. If `getopt' finds another option character, it returns that character, updating `optind' and `nextchar' so that the next call to `getopt' can resume the scan with the following option character or ARGV-element. If there are no more option characters, `getopt' returns `EOF'. Then `optind' is the index in ARGV of the first ARGV-element that is not an option. (The ARGV-elements have been permuted so that those that are not options now come last.) OPTSTRING is a string containing the legitimate option characters. If an option character is seen that is not listed in OPTSTRING, return '?' after printing an error message. If you set `opterr' to zero, the error message is suppressed but we still return '?'. If a char in OPTSTRING is followed by a colon, that means it wants an arg, so the following text in the same ARGV-element, or the text of the following ARGV-element, is returned in `optarg'. Two colons mean an option that wants an optional arg; if there is text in the current ARGV-element, it is returned in `optarg', otherwise `optarg' is set to zero. If OPTSTRING starts with `-' or `+', it requests different methods of handling the non-option ARGV-elements. See the comments about RETURN_IN_ORDER and REQUIRE_ORDER, above. Long-named options begin with `--' instead of `-'. Their names may be abbreviated as long as the abbreviation is unique or is an exact match for some defined option. If they have an argument, it follows the option name in the same ARGV-element, separated from the option name by a `=', or else the in next ARGV-element. When `getopt' finds a long-named option, it returns 0 if that option's `flag' field is nonzero, the value of the option's `val' field if the `flag' field is zero. The elements of ARGV aren't really const, because we permute them. But we pretend they're const in the prototype to be compatible with other systems. LONGOPTS is a vector of `struct option' terminated by an element containing a name which is zero. LONGIND returns the index in LONGOPT of the long-named option found. It is only valid when a long-named option has been found by the most recent call. If LONG_ONLY is nonzero, '-' as well as '--' can introduce long-named options. */ int _getopt_internal (argc, argv, optstring, longopts, longind, long_only) int argc; char *const *argv; const char *optstring; const struct option *longopts; int *longind; int long_only; { optarg = NULL; if (optind == 0) { optstring = _getopt_initialize (optstring); optind = 1; /* Don't scan ARGV[0], the program name. */ } if (nextchar == NULL || *nextchar == '\0') { /* Advance to the next ARGV-element. */ if (ordering == PERMUTE) { /* If we have just processed some options following some non-options, exchange them so that the options come first. */ if (first_nonopt != last_nonopt && last_nonopt != optind) exchange ((char **) argv); else if (last_nonopt != optind) first_nonopt = optind; /* Skip any additional non-options and extend the range of non-options previously skipped. */ while (optind < argc && (argv[optind][0] != '-' || argv[optind][1] == '\0')) optind++; last_nonopt = optind; } /* The special ARGV-element `--' means premature end of options. Skip it like a null option, then exchange with previous non-options as if it were an option, then skip everything else like a non-option. */ if (optind != argc && !strcmp (argv[optind], "--")) { optind++; if (first_nonopt != last_nonopt && last_nonopt != optind) exchange ((char **) argv); else if (first_nonopt == last_nonopt) first_nonopt = optind; last_nonopt = argc; optind = argc; } /* If we have done all the ARGV-elements, stop the scan and back over any non-options that we skipped and permuted. */ if (optind == argc) { /* Set the next-arg-index to point at the non-options that we previously skipped, so the caller will digest them. */ if (first_nonopt != last_nonopt) optind = first_nonopt; return EOF; } /* If we have come to a non-option and did not permute it, either stop the scan or describe it to the caller and pass it by. */ if ((argv[optind][0] != '-' || argv[optind][1] == '\0')) { if (ordering == REQUIRE_ORDER) return EOF; optarg = argv[optind++]; return 1; } /* We have found another option-ARGV-element. Skip the initial punctuation. */ nextchar = (argv[optind] + 1 + (longopts != NULL && argv[optind][1] == '-')); } /* Decode the current option-ARGV-element. */ /* Check whether the ARGV-element is a long option. If long_only and the ARGV-element has the form "-f", where f is a valid short option, don't consider it an abbreviated form of a long option that starts with f. Otherwise there would be no way to give the -f short option. On the other hand, if there's a long option "fubar" and the ARGV-element is "-fu", do consider that an abbreviation of the long option, just like "--fu", and not "-f" with arg "u". This distinction seems to be the most useful approach. */ if (longopts != NULL && (argv[optind][1] == '-' || (long_only && (argv[optind][2] || !my_index (optstring, argv[optind][1]))))) { char *nameend; const struct option *p; const struct option *pfound = NULL; int exact = 0; int ambig = 0; int indfound; int option_index; for (nameend = nextchar; *nameend && *nameend != '='; nameend++) /* Do nothing. */ ; /* Test all long options for either exact match or abbreviated matches. */ for (p = longopts, option_index = 0; p->name; p++, option_index++) if (!strncmp (p->name, nextchar, nameend - nextchar)) { if (nameend - nextchar == strlen (p->name)) { /* Exact match found. */ pfound = p; indfound = option_index; exact = 1; break; } else if (pfound == NULL) { /* First nonexact match found. */ pfound = p; indfound = option_index; } else /* Second or later nonexact match found. */ ambig = 1; } if (ambig && !exact) { if (opterr) fprintf (stderr, _("%s: option `%s' is ambiguous\n"), argv[0], argv[optind]); nextchar += strlen (nextchar); optind++; return '?'; } if (pfound != NULL) { option_index = indfound; optind++; if (*nameend) { /* Don't test has_arg with >, because some C compilers don't allow it to be used on enums. */ if (pfound->has_arg) optarg = nameend + 1; else { if (opterr) if (argv[optind - 1][1] == '-') /* --option */ fprintf (stderr, _("%s: option `--%s' doesn't allow an argument\n"), argv[0], pfound->name); else /* +option or -option */ fprintf (stderr, _("%s: option `%c%s' doesn't allow an argument\n"), argv[0], argv[optind - 1][0], pfound->name); nextchar += strlen (nextchar); return '?'; } } else if (pfound->has_arg == 1) { if (optind < argc) optarg = argv[optind++]; else { if (opterr) fprintf (stderr, _("%s: option `%s' requires an argument\n"), argv[0], argv[optind - 1]); nextchar += strlen (nextchar); return optstring[0] == ':' ? ':' : '?'; } } nextchar += strlen (nextchar); if (longind != NULL) *longind = option_index; if (pfound->flag) { *(pfound->flag) = pfound->val; return 0; } return pfound->val; } /* Can't find it as a long option. If this is not getopt_long_only, or the option starts with '--' or is not a valid short option, then it's an error. Otherwise interpret it as a short option. */ if (!long_only || argv[optind][1] == '-' || my_index (optstring, *nextchar) == NULL) { if (opterr) { if (argv[optind][1] == '-') /* --option */ fprintf (stderr, _("%s: unrecognized option `--%s'\n"), argv[0], nextchar); else /* +option or -option */ fprintf (stderr, _("%s: unrecognized option `%c%s'\n"), argv[0], argv[optind][0], nextchar); } nextchar = (char *) ""; optind++; return '?'; } } /* Look at and handle the next short option-character. */ { char c = *nextchar++; char *temp = my_index (optstring, c); /* Increment `optind' when we start to process its last character. */ if (*nextchar == '\0') ++optind; if (temp == NULL || c == ':') { if (opterr) { if (posixly_correct) /* 1003.2 specifies the format of this message. */ fprintf (stderr, _("%s: illegal option -- %c\n"), argv[0], c); else fprintf (stderr, _("%s: invalid option -- %c\n"), argv[0], c); } optopt = c; return '?'; } if (temp[1] == ':') { if (temp[2] == ':') { /* This is an option that accepts an argument optionally. */ if (*nextchar != '\0') { optarg = nextchar; optind++; } else optarg = NULL; nextchar = NULL; } else { /* This is an option that requires an argument. */ if (*nextchar != '\0') { optarg = nextchar; /* If we end this ARGV-element by taking the rest as an arg, we must advance to the next element now. */ optind++; } else if (optind == argc) { if (opterr) { /* 1003.2 specifies the format of this message. */ fprintf (stderr, _("%s: option requires an argument -- %c\n"), argv[0], c); } optopt = c; if (optstring[0] == ':') c = ':'; else c = '?'; } else /* We already incremented `optind' once; increment it again when taking next ARGV-elt as argument. */ optarg = argv[optind++]; nextchar = NULL; } } return c; } } int getopt (argc, argv, optstring) int argc; char *const *argv; const char *optstring; { return _getopt_internal (argc, argv, optstring, (const struct option *) 0, (int *) 0, 0); } #endif /* _LIBC or not __GNU_LIBRARY__. */ #ifdef TEST /* Compile with -DTEST to make an executable for use in testing the above definition of `getopt'. */ int main (argc, argv) int argc; char **argv; { int c; int digit_optind = 0; while (1) { int this_option_optind = optind ? optind : 1; c = getopt (argc, argv, "abc:d:0123456789"); if (c == EOF) break; switch (c) { case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': if (digit_optind != 0 && digit_optind != this_option_optind) printf ("digits occur in two different argv-elements.\n"); digit_optind = this_option_optind; printf ("option %c\n", c); break; case 'a': printf ("option a\n"); break; case 'b': printf ("option b\n"); break; case 'c': printf ("option c with value `%s'\n", optarg); break; case '?': break; default: printf ("?? getopt returned character code 0%o ??\n", c); } } if (optind < argc) { printf ("non-option ARGV-elements: "); while (optind < argc) printf ("%s ", argv[optind++]); printf ("\n"); } exit (0); } #endif /* TEST */ imwheel-1.0.0pre12.orig/getopt/getopt.h0000644000175000017500000001072707203176121020200 0ustar chrischris00000000000000/* Declarations for getopt. Copyright (C) 1989, 90, 91, 92, 93, 94 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifndef _GETOPT_H #define _GETOPT_H 1 #ifdef __cplusplus extern "C" { #endif /* For communication from `getopt' to the caller. When `getopt' finds an option that takes an argument, the argument value is returned here. Also, when `ordering' is RETURN_IN_ORDER, each non-option ARGV-element is returned here. */ extern char *optarg; /* Index in ARGV of the next element to be scanned. This is used for communication to and from the caller and for communication between successive calls to `getopt'. On entry to `getopt', zero means this is the first call; initialize. When `getopt' returns EOF, this is the index of the first of the non-option elements that the caller should itself scan. Otherwise, `optind' communicates from one call to the next how much of ARGV has been scanned so far. */ extern int optind; /* Callers store zero here to inhibit the error message `getopt' prints for unrecognized options. */ extern int opterr; /* Set to an option character which was unrecognized. */ extern int optopt; /* Describe the long-named options requested by the application. The LONG_OPTIONS argument to getopt_long or getopt_long_only is a vector of `struct option' terminated by an element containing a name which is zero. The field `has_arg' is: no_argument (or 0) if the option does not take an argument, required_argument (or 1) if the option requires an argument, optional_argument (or 2) if the option takes an optional argument. If the field `flag' is not NULL, it points to a variable that is set to the value given in the field `val' when the option is found, but left unchanged if the option is not found. To have a long-named option do something other than set an `int' to a compiled-in constant, such as set a value from `optarg', set the option's `flag' field to zero and its `val' field to a nonzero value (the equivalent single-letter option character, if there is one). For long options that have a zero `flag' field, `getopt' returns the contents of the `val' field. */ struct option { #if defined (__STDC__) && __STDC__ const char *name; #else char *name; #endif /* has_arg can't be an enum because some compilers complain about type mismatches in all the code that assumes it is an int. */ int has_arg; int *flag; int val; }; /* Names for the values of the `has_arg' field of `struct option'. */ #define no_argument 0 #define required_argument 1 #define optional_argument 2 #if defined (__STDC__) && __STDC__ #ifdef __GNU_LIBRARY__ /* Many other libraries have conflicting prototypes for getopt, with differences in the consts, in stdlib.h. To avoid compilation errors, only prototype getopt for the GNU C library. */ extern int getopt (int argc, char *const *argv, const char *shortopts); #else /* not __GNU_LIBRARY__ */ extern int getopt (); #endif /* __GNU_LIBRARY__ */ extern int getopt_long (int argc, char *const *argv, const char *shortopts, const struct option *longopts, int *longind); extern int getopt_long_only (int argc, char *const *argv, const char *shortopts, const struct option *longopts, int *longind); /* Internal only. Users should not call this directly. */ extern int _getopt_internal (int argc, char *const *argv, const char *shortopts, const struct option *longopts, int *longind, int long_only); #else /* not __STDC__ */ extern int getopt (); extern int getopt_long (); extern int getopt_long_only (); extern int _getopt_internal (); #endif /* __STDC__ */ #ifdef __cplusplus } #endif #endif /* _GETOPT_H */ imwheel-1.0.0pre12.orig/getopt/Makefile.am0000644000175000017500000000017610061736136020562 0ustar chrischris00000000000000AM_CFLAGS=-O6 -s -Wall noinst_LIBRARIES=libgetopt.a libgetopt_a_SOURCES=getopt.c getopt1.c getopt.h EXTRA_DIST=Makefile.unix imwheel-1.0.0pre12.orig/getopt/Makefile.in0000644000175000017500000002753210114330361020565 0ustar chrischris00000000000000# Makefile.in generated by automake 1.9 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ SOURCES = $(libgetopt_a_SOURCES) srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : subdir = getopt DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = LIBRARIES = $(noinst_LIBRARIES) AR = ar ARFLAGS = cru libgetopt_a_AR = $(AR) $(ARFLAGS) libgetopt_a_LIBADD = am_libgetopt_a_OBJECTS = getopt.$(OBJEXT) getopt1.$(OBJEXT) libgetopt_a_OBJECTS = $(am_libgetopt_a_OBJECTS) DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(libgetopt_a_SOURCES) DIST_SOURCES = $(libgetopt_a_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GETOPT_INCS = @GETOPT_INCS@ GETOPT_LIBS = @GETOPT_LIBS@ GPM_DIR = @GPM_DIR@ HAVE_GPM_SRC = @HAVE_GPM_SRC@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ NO_GPM_DOC_FALSE = @NO_GPM_DOC_FALSE@ NO_GPM_DOC_TRUE = @NO_GPM_DOC_TRUE@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ SUID_FALSE = @SUID_FALSE@ SUID_TRUE = @SUID_TRUE@ VERSION = @VERSION@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ ac_ct_CC = @ac_ct_CC@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ datadir = @datadir@ exec_prefix = @exec_prefix@ extras = @extras@ extras_dist = @extras_dist@ getopt = @getopt@ getopt_dist = @getopt_dist@ gpm_dist = @gpm_dist@ gpm_imwheel = @gpm_imwheel@ host_alias = @host_alias@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ mandir = @mandir@ mdetect = @mdetect@ mdetect_dist = @mdetect_dist@ mdump = @mdump@ mdump_dist = @mdump_dist@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ subdirs = @subdirs@ suid = @suid@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ AM_CFLAGS = -O6 -s -Wall noinst_LIBRARIES = libgetopt.a libgetopt_a_SOURCES = getopt.c getopt1.c getopt.h EXTRA_DIST = Makefile.unix all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu getopt/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu getopt/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh clean-noinstLIBRARIES: -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) libgetopt.a: $(libgetopt_a_OBJECTS) $(libgetopt_a_DEPENDENCIES) -rm -f libgetopt.a $(libgetopt_a_AR) libgetopt.a $(libgetopt_a_OBJECTS) $(libgetopt_a_LIBADD) $(RANLIB) libgetopt.a mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getopt.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getopt1.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` uninstall-info-am: ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-noinstLIBRARIES mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-exec-am: install-info: install-info-am install-man: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-info-am .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-noinstLIBRARIES ctags distclean distclean-compile \ distclean-generic distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-exec install-exec-am install-info \ install-info-am install-man install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \ uninstall-am uninstall-info-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: imwheel-1.0.0pre12.orig/getopt/getopt1.c0000644000175000017500000001052207203176121020245 0ustar chrischris00000000000000/* getopt_long and getopt_long_only entry points for GNU getopt. Copyright (C) 1987, 88, 89, 90, 91, 92, 1993, 1994 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifdef HAVE_CONFIG_H #include #endif #include "getopt.h" #if !defined (__STDC__) || !__STDC__ /* This is a separate conditional since some stdc systems reject `defined (const)'. */ #ifndef const #define const #endif #endif #include /* Comment out all this code if we are using the GNU C Library, and are not actually compiling the library itself. This code is part of the GNU C Library, but also included in many other GNU distributions. Compiling and linking in this code is a waste when using the GNU C library (especially if it is a shared library). Rather than having every GNU program understand `configure --with-gnu-libc' and omit the object files, it is simpler to just do this in the source for each such file. */ #if defined (_LIBC) || !defined (__GNU_LIBRARY__) /* This needs to come after some library #include to get __GNU_LIBRARY__ defined. */ #ifdef __GNU_LIBRARY__ #include #else char *getenv (); #endif #ifndef NULL #define NULL 0 #endif int getopt_long (argc, argv, options, long_options, opt_index) int argc; char *const *argv; const char *options; const struct option *long_options; int *opt_index; { return _getopt_internal (argc, argv, options, long_options, opt_index, 0); } /* Like getopt_long, but '-' as well as '--' can indicate a long option. If an option that starts with '-' (not '--') doesn't match a long option, but does match a short option, it is parsed as a short option instead. */ int getopt_long_only (argc, argv, options, long_options, opt_index) int argc; char *const *argv; const char *options; const struct option *long_options; int *opt_index; { return _getopt_internal (argc, argv, options, long_options, opt_index, 1); } #endif /* _LIBC or not __GNU_LIBRARY__. */ #ifdef TEST #include int main (argc, argv) int argc; char **argv; { int c; int digit_optind = 0; while (1) { int this_option_optind = optind ? optind : 1; int option_index = 0; static struct option long_options[] = { {"add", 1, 0, 0}, {"append", 0, 0, 0}, {"delete", 1, 0, 0}, {"verbose", 0, 0, 0}, {"create", 0, 0, 0}, {"file", 1, 0, 0}, {0, 0, 0, 0} }; c = getopt_long (argc, argv, "abc:d:0123456789", long_options, &option_index); if (c == EOF) break; switch (c) { case 0: printf ("option %s", long_options[option_index].name); if (optarg) printf (" with arg %s", optarg); printf ("\n"); break; case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': if (digit_optind != 0 && digit_optind != this_option_optind) printf ("digits occur in two different argv-elements.\n"); digit_optind = this_option_optind; printf ("option %c\n", c); break; case 'a': printf ("option a\n"); break; case 'b': printf ("option b\n"); break; case 'c': printf ("option c with value `%s'\n", optarg); break; case 'd': printf ("option d with value `%s'\n", optarg); break; case '?': break; default: printf ("?? getopt returned character code 0%o ??\n", c); } } if (optind < argc) { printf ("non-option ARGV-elements: "); while (optind < argc) printf ("%s ", argv[optind++]); printf ("\n"); } exit (0); } #endif /* TEST */ imwheel-1.0.0pre12.orig/Makefile.am0000644000175000017500000000300710114330652017244 0ustar chrischris00000000000000SUBDIRS=jax @getopt@ @mdetect@ @gpm_imwheel@ bin_PROGRAMS=imwheel AM_CFLAGS=@CFLAGS@ @GETOPT_INCS@ @X_CFLAGS@ -I@srcdir@/jax -I. -Wall imwheel_SOURCES=imwheel.c util.c cfg.c util.h imwheel.h cfg.h imwheel_LDADD=@GETOPT_LIBS@ -L$(top_builddir)/jax -ljax @X_LIBS@ imwheel_DEPENDENCIES=imwheel.o util.o cfg.o jax/libjax.a EXTRA_PROGRAMS=setimps2 setmmplus setps2 getmdt mdump setps2rate noinst_PROGRAMS=@extras@ @mdump@ man_MANS=imwheel.1 EXTRA_DIST=BUGS FREEBSD EMACS M-BA47 BUGS see imwheel.1.html imwheel.1 TODO imwheelrc @extras_dist@ @mdump_dist@ lefty.sh imwheel.spec slack.sh dist-hook: -for DIR in @gpm_dist@ @mdetect_dist@ @getopt_dist@ ; \ do \ make -C $$DIR distclean ; \ cp -Rfp @srcdir@/$$DIR $(distdir)/$$DIR ; \ find $(distdir) -name CVS -exec rm -rvf '{}' ';' ; \ done ETCDIR=/etc/X11/imwheel install-exec-hook: if SUID progname=$(DESTDIR)$(bindir)/`echo imwheel|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'` ; \ chown @suid@ $$progname ; \ chmod u+s $$progname endif $(mkinstalldirs) $(ETCDIR) -[ -f /etc/imwheelrc ] && mv /etc/imwheelrc $(ETCDIR)/imwheelrc || true -[ -f /etc/X11/imwheelrc ] && mv /etc/X11/imwheelrc $(ETCDIR)/imwheelrc || true -[ -f $(ETCDIR)/imwheelrc ] && install -m 644 imwheelrc $(ETCDIR)/imwheelrc.new || install -m 644 imwheelrc $(ETCDIR)/imwheelrc extras: $(EXTRA_PROGRAMS) if NO_GPM_DOC Makefile.am: .premake .premake: @#Start @touch .premake @rm -f @gpm_imwheel@/doc/Makefile all: .postmake distclean: .postmake .postmake: @#End @rm -f .premake endif imwheel-1.0.0pre12.orig/Makefile.in0000644000175000017500000006600110114330661017260 0ustar chrischris00000000000000# Makefile.in generated by automake 1.9 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ SOURCES = getmdt.c $(imwheel_SOURCES) mdump.c setimps2.c setmmplus.c setps2.c setps2rate.c srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = . am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : bin_PROGRAMS = imwheel$(EXEEXT) EXTRA_PROGRAMS = setimps2$(EXEEXT) setmmplus$(EXEEXT) setps2$(EXEEXT) \ getmdt$(EXEEXT) mdump$(EXEEXT) setps2rate$(EXEEXT) noinst_PROGRAMS = @extras@ @mdump@ subdir = . DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(srcdir)/config.h.in \ $(top_srcdir)/configure AUTHORS COPYING ChangeLog INSTALL NEWS \ TODO depcomp install-sh missing mkinstalldirs ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno configure.status.lineno mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) PROGRAMS = $(bin_PROGRAMS) $(noinst_PROGRAMS) getmdt_SOURCES = getmdt.c getmdt_OBJECTS = getmdt.$(OBJEXT) getmdt_LDADD = $(LDADD) am_imwheel_OBJECTS = imwheel.$(OBJEXT) util.$(OBJEXT) cfg.$(OBJEXT) imwheel_OBJECTS = $(am_imwheel_OBJECTS) mdump_SOURCES = mdump.c mdump_OBJECTS = mdump.$(OBJEXT) mdump_LDADD = $(LDADD) setimps2_SOURCES = setimps2.c setimps2_OBJECTS = setimps2.$(OBJEXT) setimps2_LDADD = $(LDADD) setmmplus_SOURCES = setmmplus.c setmmplus_OBJECTS = setmmplus.$(OBJEXT) setmmplus_LDADD = $(LDADD) setps2_SOURCES = setps2.c setps2_OBJECTS = setps2.$(OBJEXT) setps2_LDADD = $(LDADD) setps2rate_SOURCES = setps2rate.c setps2rate_OBJECTS = setps2rate.$(OBJEXT) setps2rate_LDADD = $(LDADD) DEFAULT_INCLUDES = -I. -I$(srcdir) -I. depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = getmdt.c $(imwheel_SOURCES) mdump.c setimps2.c setmmplus.c \ setps2.c setps2rate.c DIST_SOURCES = getmdt.c $(imwheel_SOURCES) mdump.c setimps2.c \ setmmplus.c setps2.c setps2rate.c RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-exec-recursive install-info-recursive \ install-recursive installcheck-recursive installdirs-recursive \ pdf-recursive ps-recursive uninstall-info-recursive \ uninstall-recursive man1dir = $(mandir)/man1 NROFF = nroff MANS = $(man_MANS) ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ { test ! -d $(distdir) \ || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \ && rm -fr $(distdir); }; } DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best distuninstallcheck_listfiles = find . -type f -print distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GETOPT_INCS = @GETOPT_INCS@ GETOPT_LIBS = @GETOPT_LIBS@ GPM_DIR = @GPM_DIR@ HAVE_GPM_SRC = @HAVE_GPM_SRC@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ NO_GPM_DOC_FALSE = @NO_GPM_DOC_FALSE@ NO_GPM_DOC_TRUE = @NO_GPM_DOC_TRUE@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ SUID_FALSE = @SUID_FALSE@ SUID_TRUE = @SUID_TRUE@ VERSION = @VERSION@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ ac_ct_CC = @ac_ct_CC@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ datadir = @datadir@ exec_prefix = @exec_prefix@ extras = @extras@ extras_dist = @extras_dist@ getopt = @getopt@ getopt_dist = @getopt_dist@ gpm_dist = @gpm_dist@ gpm_imwheel = @gpm_imwheel@ host_alias = @host_alias@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ mandir = @mandir@ mdetect = @mdetect@ mdetect_dist = @mdetect_dist@ mdump = @mdump@ mdump_dist = @mdump_dist@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ subdirs = @subdirs@ suid = @suid@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ SUBDIRS = jax @getopt@ @mdetect@ @gpm_imwheel@ AM_CFLAGS = @CFLAGS@ @GETOPT_INCS@ @X_CFLAGS@ -I@srcdir@/jax -I. -Wall imwheel_SOURCES = imwheel.c util.c cfg.c util.h imwheel.h cfg.h imwheel_LDADD = @GETOPT_LIBS@ -L$(top_builddir)/jax -ljax @X_LIBS@ imwheel_DEPENDENCIES = imwheel.o util.o cfg.o jax/libjax.a man_MANS = imwheel.1 EXTRA_DIST = BUGS FREEBSD EMACS M-BA47 BUGS see imwheel.1.html imwheel.1 TODO imwheelrc @extras_dist@ @mdump_dist@ lefty.sh imwheel.spec slack.sh ETCDIR = /etc/X11/imwheel all: config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive .SUFFIXES: .SUFFIXES: .c .o .obj am--refresh: @: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ echo ' cd $(srcdir) && $(AUTOMAKE) --gnu '; \ cd $(srcdir) && $(AUTOMAKE) --gnu \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ echo ' $(SHELL) ./config.status'; \ $(SHELL) ./config.status;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(top_srcdir)/configure: $(am__configure_deps) cd $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) config.h: stamp-h1 @if test ! -f $@; then \ rm -f stamp-h1; \ $(MAKE) stamp-h1; \ else :; fi stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status @rm -f stamp-h1 cd $(top_builddir) && $(SHELL) ./config.status config.h $(srcdir)/config.h.in: $(am__configure_deps) cd $(top_srcdir) && $(AUTOHEADER) rm -f stamp-h1 touch $@ distclean-hdr: -rm -f config.h stamp-h1 install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)" @list='$(bin_PROGRAMS)'; for p in $$list; do \ p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ if test -f $$p \ ; then \ f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ echo " $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ else :; fi; \ done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; for p in $$list; do \ f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ rm -f "$(DESTDIR)$(bindir)/$$f"; \ done clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) clean-noinstPROGRAMS: -test -z "$(noinst_PROGRAMS)" || rm -f $(noinst_PROGRAMS) getmdt$(EXEEXT): $(getmdt_OBJECTS) $(getmdt_DEPENDENCIES) @rm -f getmdt$(EXEEXT) $(LINK) $(getmdt_LDFLAGS) $(getmdt_OBJECTS) $(getmdt_LDADD) $(LIBS) imwheel$(EXEEXT): $(imwheel_OBJECTS) $(imwheel_DEPENDENCIES) @rm -f imwheel$(EXEEXT) $(LINK) $(imwheel_LDFLAGS) $(imwheel_OBJECTS) $(imwheel_LDADD) $(LIBS) mdump$(EXEEXT): $(mdump_OBJECTS) $(mdump_DEPENDENCIES) @rm -f mdump$(EXEEXT) $(LINK) $(mdump_LDFLAGS) $(mdump_OBJECTS) $(mdump_LDADD) $(LIBS) setimps2$(EXEEXT): $(setimps2_OBJECTS) $(setimps2_DEPENDENCIES) @rm -f setimps2$(EXEEXT) $(LINK) $(setimps2_LDFLAGS) $(setimps2_OBJECTS) $(setimps2_LDADD) $(LIBS) setmmplus$(EXEEXT): $(setmmplus_OBJECTS) $(setmmplus_DEPENDENCIES) @rm -f setmmplus$(EXEEXT) $(LINK) $(setmmplus_LDFLAGS) $(setmmplus_OBJECTS) $(setmmplus_LDADD) $(LIBS) setps2$(EXEEXT): $(setps2_OBJECTS) $(setps2_DEPENDENCIES) @rm -f setps2$(EXEEXT) $(LINK) $(setps2_LDFLAGS) $(setps2_OBJECTS) $(setps2_LDADD) $(LIBS) setps2rate$(EXEEXT): $(setps2rate_OBJECTS) $(setps2rate_DEPENDENCIES) @rm -f setps2rate$(EXEEXT) $(LINK) $(setps2rate_LDFLAGS) $(setps2rate_OBJECTS) $(setps2rate_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfg.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getmdt.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/imwheel.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mdump.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setimps2.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setmmplus.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setps2.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setps2rate.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/util.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` uninstall-info-am: install-man1: $(man1_MANS) $(man_MANS) @$(NORMAL_INSTALL) test -z "$(man1dir)" || $(mkdir_p) "$(DESTDIR)$(man1dir)" @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \ l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ for i in $$l2; do \ case "$$i" in \ *.1*) list="$$list $$i" ;; \ esac; \ done; \ for i in $$list; do \ if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \ else file=$$i; fi; \ ext=`echo $$i | sed -e 's/^.*\\.//'`; \ case "$$ext" in \ 1*) ;; \ *) ext='1' ;; \ esac; \ inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ inst=`echo $$inst | sed -e 's/^.*\///'`; \ inst=`echo $$inst | sed '$(transform)'`.$$ext; \ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst"; \ done uninstall-man1: @$(NORMAL_UNINSTALL) @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \ l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ for i in $$l2; do \ case "$$i" in \ *.1*) list="$$list $$i" ;; \ esac; \ done; \ for i in $$list; do \ ext=`echo $$i | sed -e 's/^.*\\.//'`; \ case "$$ext" in \ 1*) ;; \ *) ext='1' ;; \ esac; \ inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ inst=`echo $$inst | sed -e 's/^.*\///'`; \ inst=`echo $$inst | sed '$(transform)'`.$$ext; \ echo " rm -f '$(DESTDIR)$(man1dir)/$$inst'"; \ rm -f "$(DESTDIR)$(man1dir)/$$inst"; \ done # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @set fnord $$MAKEFLAGS; amf=$$2; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" mostlyclean-recursive clean-recursive distclean-recursive \ maintainer-clean-recursive: @set fnord $$MAKEFLAGS; amf=$$2; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) $(am__remove_distdir) mkdir $(distdir) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(mkdir_p) "$(distdir)/$$subdir" \ || exit 1; \ distdir=`$(am__cd) $(distdir) && pwd`; \ top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ (cd $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$top_distdir" \ distdir="$$distdir/$$subdir" \ distdir) \ || exit 1; \ fi; \ done $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$(top_distdir)" distdir="$(distdir)" \ dist-hook -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r $(distdir) dist-gzip: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 $(am__remove_distdir) dist-tarZ: distdir tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__remove_distdir) dist-shar: distdir shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz $(am__remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) $(am__remove_distdir) dist dist-all: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another # tarfile. distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac chmod -R a-w $(distdir); chmod a+w $(distdir) mkdir $(distdir)/_build mkdir $(distdir)/_inst chmod a-w $(distdir) dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && cd $(distdir)/_build \ && ../configure --srcdir=.. --prefix="$$dc_install_base" \ $(DISTCHECK_CONFIGURE_FLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ && $(MAKE) $(AM_MAKEFLAGS) uninstall \ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ distuninstallcheck \ && chmod -R a-w "$$dc_install_base" \ && ({ \ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ } || { rm -rf "$$dc_destdir"; exit 1; }) \ && rm -rf "$$dc_destdir" \ && $(MAKE) $(AM_MAKEFLAGS) dist \ && rm -rf $(DIST_ARCHIVES) \ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck $(am__remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e '1{h;s/./=/g;p;x;}' -e '$${p;x;}' distuninstallcheck: @cd $(distuninstallcheck_dir) \ && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ echo " (check DESTDIR support)"; \ fi ; \ $(distuninstallcheck_listfiles) ; \ exit 1; } >&2 distcleancheck: distclean @if test '$(srcdir)' = . ; then \ echo "ERROR: distcleancheck can only run from a VPATH build" ; \ exit 1 ; \ fi @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left in build directory after distclean:" ; \ $(distcleancheck_listfiles) ; \ exit 1; } >&2 check-am: all-am check: check-recursive all-am: Makefile $(PROGRAMS) $(MANS) config.h installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)"; do \ test -z "$$dir" || $(mkdir_p) "$$dir"; \ done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-binPROGRAMS clean-generic clean-noinstPROGRAMS \ mostlyclean-am @NO_GPM_DOC_FALSE@distclean: distclean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-hdr distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive info: info-recursive info-am: install-data-am: install-man install-exec-am: install-binPROGRAMS @$(NORMAL_INSTALL) $(MAKE) $(AM_MAKEFLAGS) install-exec-hook install-info: install-info-recursive install-man: install-man1 installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-binPROGRAMS uninstall-info-am uninstall-man uninstall-info: uninstall-info-recursive uninstall-man: uninstall-man1 .PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am am--refresh check \ check-am clean clean-binPROGRAMS clean-generic \ clean-noinstPROGRAMS clean-recursive ctags ctags-recursive \ dist dist-all dist-bzip2 dist-gzip dist-hook dist-shar \ dist-tarZ dist-zip distcheck distclean distclean-compile \ distclean-generic distclean-hdr distclean-recursive \ distclean-tags distcleancheck distdir distuninstallcheck dvi \ dvi-am html html-am info info-am install install-am \ install-binPROGRAMS install-data install-data-am install-exec \ install-exec-am install-exec-hook install-info install-info-am \ install-man install-man1 install-strip installcheck \ installcheck-am installdirs installdirs-am maintainer-clean \ maintainer-clean-generic maintainer-clean-recursive \ mostlyclean mostlyclean-compile mostlyclean-generic \ mostlyclean-recursive pdf pdf-am ps ps-am tags tags-recursive \ uninstall uninstall-am uninstall-binPROGRAMS uninstall-info-am \ uninstall-man uninstall-man1 dist-hook: -for DIR in @gpm_dist@ @mdetect_dist@ @getopt_dist@ ; \ do \ make -C $$DIR distclean ; \ cp -Rfp @srcdir@/$$DIR $(distdir)/$$DIR ; \ find $(distdir) -name CVS -exec rm -rvf '{}' ';' ; \ done install-exec-hook: @SUID_TRUE@ progname=$(DESTDIR)$(bindir)/`echo imwheel|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'` ; \ @SUID_TRUE@ chown @suid@ $$progname ; \ @SUID_TRUE@ chmod u+s $$progname $(mkinstalldirs) $(ETCDIR) -[ -f /etc/imwheelrc ] && mv /etc/imwheelrc $(ETCDIR)/imwheelrc || true -[ -f /etc/X11/imwheelrc ] && mv /etc/X11/imwheelrc $(ETCDIR)/imwheelrc || true -[ -f $(ETCDIR)/imwheelrc ] && install -m 644 imwheelrc $(ETCDIR)/imwheelrc.new || install -m 644 imwheelrc $(ETCDIR)/imwheelrc extras: $(EXTRA_PROGRAMS) @NO_GPM_DOC_TRUE@Makefile.am: .premake @NO_GPM_DOC_TRUE@.premake: @NO_GPM_DOC_TRUE@ @#Start @NO_GPM_DOC_TRUE@ @touch .premake @NO_GPM_DOC_TRUE@ @rm -f @gpm_imwheel@/doc/Makefile @NO_GPM_DOC_TRUE@all: .postmake @NO_GPM_DOC_TRUE@distclean: .postmake @NO_GPM_DOC_TRUE@.postmake: @NO_GPM_DOC_TRUE@ @#End @NO_GPM_DOC_TRUE@ @rm -f .premake # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: imwheel-1.0.0pre12.orig/slack.sh0000755000175000017500000000344110061736135016655 0ustar chrischris00000000000000#!/bin/sh # pre cleanup rm -rf build # config vars ARCH=i486 ETC=etc/X11/imwheel # configure CFLAGS="-march=$ARCH -Os" ./configure --prefix=/usr # safe build make clean make # install to build dir make prefix="build/usr" ETCDIR="build/$ETC" install # get name and version eval `egrep "^VERSION =" Makefile | sed -e 's/ //g'` eval `egrep "^PACKAGE =" Makefile | sed -e 's/ //g'` PKG=$PACKAGE-$VERSION-$ARCH-${1-1} cd build || exit 1 # fix perms chown -R root . chgrp -R bin . # alter config file names mv $ETC/imwheelrc $ETC/imwheelrc.new # strip execs echo stripping... find -perm 755 -print \ | while read f do file "$f" | grep -q "not stripped" && { echo "$f" strip "$f" } done # gzip manpages echo gzipping... find -name '*.[123456789]' -exec gzip -v {} \; # make description mkdir install cat >install/slack-desc << EOF $PACKAGE: IMWheel-$VERSION (mouse wheel handler for X11) $PACKAGE: $PACKAGE: imwheel is an X11 application that allows a user $PACKAGE: to alter the actions resulting from a mouse wheel $PACKAGE: or thumb button press. It is able to have individual $PACKAGE: configurations for each application by name. $PACKAGE: imwheel is particularly useful for old applications $PACKAGE: that don't know about the new mouse wheel and buttons. $PACKAGE: $PACKAGE: You can find the latest release of imwheel at: $PACKAGE: http://jonatkins.org/iwheel/ $PACKAGE: $PACKAGE: EOF # make post install script cat >install/doinst.sh < header file. */ #undef HAVE_FCNTL_H /* Define to 1 if you have the header file. */ #undef HAVE_GETOPT_H /* Define to 1 if you have the `getopt_long_only' function. */ #undef HAVE_GETOPT_LONG_ONLY /* Define to 1 if you have the `gettimeofday' function. */ #undef HAVE_GETTIMEOFDAY /* Define only if you are building the imwheel version of gpm. */ #undef HAVE_GPM_SRC /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H /* Define to 1 if you have the `X11' library (-lX11). */ #undef HAVE_LIBX11 /* Define to 1 if you have the `Xext' library (-lXext). */ #undef HAVE_LIBXEXT /* Define to 1 if you have the `Xmu' library (-lXmu). */ #undef HAVE_LIBXMU /* Define to 1 if you have the `Xt' library (-lXt). */ #undef HAVE_LIBXT /* Define to 1 if you have the `Xtst' library (-lXtst). */ #undef HAVE_LIBXTST /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H /* Define to 1 if you have the `regcomp' function. */ #undef HAVE_REGCOMP /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H /* Define to 1 if you have the `strdup' function. */ #undef HAVE_STRDUP /* Define to 1 if you have the header file. */ #undef HAVE_STRINGS_H /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H /* Define to 1 if you have the `strtol' function. */ #undef HAVE_STRTOL /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TIME_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H /* Define to 1 if you have that is POSIX.1 compatible. */ #undef HAVE_SYS_WAIT_H /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H /* Define to 1 if you have the `vprintf' function. */ #undef HAVE_VPRINTF /* Name of package */ #undef PACKAGE /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT /* Define to the full name of this package. */ #undef PACKAGE_NAME /* Define to the full name and version of this package. */ #undef PACKAGE_STRING /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME /* Define to the version of this package. */ #undef PACKAGE_VERSION /* Where do we want the pid file to go? */ #undef PIDDIR /* Define as the return type of signal handlers (`int' or `void'). */ #undef RETSIGTYPE /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS /* Define to 1 if you can safely include both and . */ #undef TIME_WITH_SYS_TIME /* Version number of package */ #undef VERSION /* Define to 1 if the X Window System is missing or not being used. */ #undef X_DISPLAY_MISSING /* Define to empty if `const' does not conform to ANSI C. */ #undef const /* Define to `int' if does not define. */ #undef pid_t imwheel-1.0.0pre12.orig/util.c0000644000175000017500000010411410114327072016334 0ustar chrischris00000000000000/* Intellimouse Wheel Thinger Utilities * Copylefted under the GNU Public License * Author : Jonathan Atkins * PLEASE: contact me if you have any improvements, I will gladly code good ones */ #include #include #include #include #include #include #include #include #include #include #ifdef HAVE_SYS_WAIT_H #include #endif #ifdef HAVE_SYS_TIME_H #include #endif #ifdef HAVE_UNISTD_H #include #endif #ifdef HAVE_FCNTL_H #include #endif #include #if 0 #include #else #include #include #include #include #endif #include #include #include #include #define UTIL_C #include "util.h" #undef UTIL_C #include "imwheel.h" #ifndef HAVE_STRTOL #define strtol(a,b,c) atoi(a) #endif #define RCFILE "/.imwheelrc" typedef void (*sighandler_t)(int); int buttons[NUM_BUTTONS+1]={4,5,6,7,8,9,0}; const char *button_names[]={ "Up", "Down", "Left", "Right", "Thumb1", "Thumb2" }; int statebits[STATE_MASK+1]; char *wname=NULL; XClassHint xch={NULL,NULL}; struct WinAction *wa=NULL; int num_wa=0; #ifdef DEBUG int debug=1; #else int debug=0; #endif struct Trans masktrans[MAX_MASKTRANS]= { {"ShiftMask", ShiftMask}, {"LockMask", LockMask}, {"ControlMask", ControlMask}, {"Mod1Mask", Mod1Mask}, //Alt {"Mod2Mask", Mod2Mask}, {"Mod3Mask", Mod3Mask}, {"Mod4Mask", Mod4Mask}, {"Mod5Mask", Mod5Mask}, }; const int reps[1<=0) { Printf("option : -%c",ch); if(optarg) Printf("\t=%s\n",optarg); if(debug) fflush(stdout); //Printf(" options[%d].name=%s",options[i].name); switch(ch) { /*case 0: Printf("\toption[%d]=\"%s\"",ch,i,options[i].name); if(optarg) Printf("\toptarg=\"%s\"",optarg);*/ case 'a': autodelay=atoi(optarg); break; case 'c': doConfig=!doConfig; break; case '4': buttonFlip=!buttonFlip; break; case 'f': focusOverride=!focusOverride; break; case 'g': handleFocusGrab=!handleFocusGrab; break; case 'X': displayName=strdup(optarg); break; case 'W': useFifo=True; if(optarg) fifoName=strdup(optarg); break; case 'd': detach=!detach; break; case 'p': fprintf(stderr,"imwheel: the -p option is deprecated.\n"); break; case 'D': debug=!debug; break; case 'q': quit=!quit; break; case 'K': keystyledefaults=!keystyledefaults; break; case 'k': killold=!killold; break; case 'R': restart=!restart; break; case 'r': root_wheeling=!root_wheeling; break; case 'x': transpose=!transpose; break; case 's': sensitivity=atoi(optarg); break; case 't': threshhold=atoi(optarg); break; case 'v': printUsage(argv[0],NULL,NULL); exit(0); break; case 'b': memset(buttons,0,NUM_BUTTONS*sizeof(int)); for(j=0;optarg[j] && j'9') { fprintf(stderr,"imwheel: ERROR: buttons: #%d: %c is not a number!\n",j,optarg[j]); exit(1); } buttons[j]=optarg[j]-'0'; } break; case 'h': case '?': printUsage(argv[0],options,optionusage); exit(0); break; default: fprintf(stderr,"imwheel: ERROR: Option %s is unknown!\n",argv[optind]); } Printf("\n"); } if(invalidOpts) exit(1); if(!restart) { signal(SIGINT,exitParent); if(killold) KillIMWheel(); else if(debug) fprintf(stderr,"WARNING: imwheel is not cleaning up other instances of itself, BE CAREFUL!\n An imwheel may be running already.\n Two or more imwheel processes on the same X display,\n or simultaneously using a wheel fifo,\n will not operate as expected!\n"); if(quit) exit(0); if(detach) { sighandler_t sh; sh=signal(SIGUSR1,exitParent); if(fork()) { wait(NULL); exit(0); } else signal(SIGUSR1,sh); } else fprintf(stderr,"INFO: imwheel is not running as a daemon.\n"); setsid(); if(detach) kill(getppid(),SIGUSR1); fprintf(stderr,"INFO: imwheel started (pid=%d)\n",getpid()); } if(useFifo) openFifo(); } /*----------------------------------------------------------------------------*/ void KillIMWheel() { DIR *dir=opendir("/proc"); struct dirent *ent; while((ent=readdir(dir))) { FILE *f; pid_t pid=0; char path[1024]; if(!strchr("0123456789",ent->d_name[0])) continue; if(atoi(ent->d_name)==getpid()) continue; snprintf(path,1024,"/proc/%s/stat",ent->d_name); if(!(f=fopen(path,"r"))) continue; if(fscanf(f,"%d (%1023[^)]",&pid,path)==2) { //printf("%s==%d: %s\n",ent->d_name, pid, path); if(!strcmp("imwheel",path) && pid!=getpid()) { if(kill(pid,SIGTERM)>=0) fprintf(stderr,"INFO: imwheel(pid=%d) killed.\n",pid); else fprintf(stderr,"WARNING: kill imwheel(pid=%d) failed: %s\n",pid,strerror(errno)); } } fclose(f); } closedir(dir); } /*----------------------------------------------------------------------------*/ void printKeymap(Display *d, char km[32]) { int i; Printf("Keymap status:\n"); for(i=0;i<32*8;i++) if(getbit(km,i)) Printf("\t[%d,%d] %d 0x%x \"%s\"\n",i/8,i%8,i,i, XKeysymToString(XKeycodeToKeysym(d,i,0))); Printf("\n"); } /*----------------------------------------------------------------------------*/ void printXModifierKeymap(Display *d, XModifierKeymap *xmk) { int i,j; Printf("XModifierKeymap:\n"); for(j=0; j<8; j++) for(i=0; imax_keypermod && xmk->modifiermap[(j*xmk->max_keypermod)+i]; i++) Printf("\t[%d,%02d] %d 0x%x \"%s\"\n", j,i, xmk->modifiermap[(j*xmk->max_keypermod)+i], xmk->modifiermap[(j*xmk->max_keypermod)+i], XKeysymToString(XKeycodeToKeysym(d,xmk->modifiermap[(j*xmk->max_keypermod)+i],0))); } /*----------------------------------------------------------------------------*/ void setbit(char *buf, int n, Bool val) { Printf("setbit:n=%d,%d val=%d\n",n/8,n%8,val); if(val) buf[n/8]|=(1<<(n%8)); else buf[n/8]&=0xFF^(1<<(n%8)); } /*----------------------------------------------------------------------------*/ int getbit(char *buf, int n) { /*if(debug && buf[n/8]&(1<<(n%8))) Printf("getbit:n=%d,%d\n",n/8,n%8);*/ return(buf[n/8]&(1<<(n%8))); } /*----------------------------------------------------------------------------*/ void printXEvent(XEvent *e) { Printf("type=%d\n",e->type); Printf("serial =%lu\n",e->xany.serial); Printf("send_event=%d\n",e->xany.send_event); Printf("display =%p\n",e->xany.display); Printf("window =0x%08x\n",(unsigned)e->xany.window); if(e->type&(ButtonRelease|ButtonPress)) { Printf("root =0x%08x\n",(unsigned)e->xbutton.root); Printf("subwindow =0x%08x\n",(unsigned)e->xbutton.subwindow); Printf("time =0x%08x\n",(unsigned)e->xbutton.time); Printf(" x,y =%d,%d\n",e->xbutton.x,e->xbutton.y); Printf("x_root,y_root=%d,%d\n",e->xbutton.x_root,e->xbutton.y_root); Printf("state =0x%x\n",(unsigned)e->xbutton.state); Printf("button =0x%x\n",(unsigned)e->xbutton.button); Printf("same_screen =0x%x\n",(unsigned)e->xbutton.same_screen); Printf("\n"); } } /*----------------------------------------------------------------------------*/ /* Returns true if there is a window name */ char *windowName(Display *d, Window w) { { int ret_format; Atom ret_type; unsigned long ret_nitems, ret_bafter; #ifdef DEBUG Printf("0x%08x ",(unsigned)w); #endif if(ATOM_NET_WM_NAME != None && ATOM_UTF8_STRING != None) { unsigned char *uwname=0; int status = XGetWindowProperty(d, w, ATOM_NET_WM_NAME, 0, 2048, False, ATOM_UTF8_STRING, &ret_type, &ret_format, &ret_nitems, &ret_bafter, &uwname); if(status == Success && uwname) { #ifdef DEBUG Printf("_NET_WM_NAME(ATOM_UTF8_STRING)=\"%s\"\n",uwname); #endif return uwname; } } if(ATOM_WM_NAME != None && ATOM_STRING != None) { unsigned char *uwname=0; int status = XGetWindowProperty(d, w, ATOM_WM_NAME, 0, 2048, False, ATOM_STRING, &ret_type, &ret_format, &ret_nitems, &ret_bafter, &uwname); if(status == Success && uwname) { #ifdef DEBUG Printf("WM_NAME(STRING)=\"%s\"\n",uwname); #endif return uwname; } } } { char *wname=0; XFetchName(d,w,(char**)&wname); if(wname) { #ifdef DEBUG Printf("wname=\"%s\"\n",wname); #endif return(wname); } } #ifdef DEBUG Printf("(null)\n"); #endif return(NULL); } /*----------------------------------------------------------------------------*/ void printUsage(char *pname, const struct option options[], const char *usage[][2]) { int i,maxa=0,maxb=0,len; char str[80]; printf("imwheel %s by -==- \n",VERSION); if(!options || !usage) return; printf("%s",pname); for(i=0;options[i].name;i++) { len=0; if(options[i].val) len+=2; if(options[i].val && options[i].name) len++; if(options[i].name) len+=2+strlen(options[i].name); if(maxa80) printf("\n%80.80s",usage[i][1]); else printf(" %s",usage[i][1]); } printf("\n"); } } /*----------------------------------------------------------------------------*/ void Printf(char *fmt, ...) { va_list ap; if(debug) { va_start(ap,fmt); #ifdef HAVE_VPRINTF vprintf(fmt,ap); #else # ifdef HAVE_DOPRNT _doprnt(fmt,ap); # else printf("%s",fmt); # endif #endif va_end(ap); } } /*----------------------------------------------------------------------------*/ void delay(unsigned long micros) { /*struct timeval tv[2];*/ usleep(micros); /* #ifdef HAVE_GETTIMEOFDAY gettimeofday(&tv[0],NULL); do gettimeofday(&tv[1],NULL); while ((tv[1].tv_sec*1000000-tv[0].tv_sec*1000000)+(tv[1].tv_usec-tv[0].tv_usec)max_keypermod;j++) if(xmk->modifiermap[(i*xmk->max_keypermod)+j]==kc) return(i); return(-1); } /*----------------------------------------------------------------------------*/ unsigned int makeModMask(XModifierKeymap *xmk, char km[32]) { int i,b; unsigned int mask=0; for(i=0;i<32*8;i++) if(getbit(km,i) && (b=isMod(xmk,i))>=0) { Printf("makeModMask: or to mask %d\n",(1< 1023) { fprintf(stderr,"WARNING: Unexpected data in $HOME!\n" " Individual file \"$HOME%s\" will NOT be parsed!\n" " This would be a security hole otherwise!\n",fname); return(NULL); } } return(home); } /*----------------------------------------------------------------------------*/ int file_allowed(char *fname) { uid_t uid,euid; gid_t gid,egid; struct stat stats; uid=getuid(); euid=geteuid(); Printf("uid=%hu euid=%hu\n",uid,euid); gid=getgid(); egid=getegid(); Printf("gid=%u egid=%u\n",gid,egid); if(stat(fname,&stats)<0) { if(debug) perror(fname); return(0); } Printf("%s: stats.st_uid=%hu stats.st_gid=%u stats.st_mode=%03x\n",fname,stats.st_uid,stats.st_gid,stats.st_mode&0xfff); return( (uid==stats.st_uid && stats.st_mode&S_IRUSR) || (gid==stats.st_gid && stats.st_mode&S_IRGRP) || (uid!=stats.st_uid && gid!=stats.st_gid && stats.st_mode&S_IROTH) ); } /*----------------------------------------------------------------------------*/ struct WinAction *getRC() { char fname[2][1024]={"","/etc/X11/imwheel/imwheelrc"}, line[1024], *p, *q, winid[1024]; int fi,i; struct WinAction *newwa=NULL; FILE *f=NULL; char *home; int pri=0; home=gethome(RCFILE); if(home) sprintf(fname[0],"%s%s",home,RCFILE); num_wa=0; for(fi=(home?0:1);fi<2 && !f;fi++) { Printf("getRC:filename=\"%s\"\n",fname[fi]); if(strlen(fname[fi]) && file_allowed(fname[fi])) { f=fopen(fname[fi],"r"); if(!f && debug) perror(fname[fi]); } else { Printf("%s: file permissions for your REAL user do not allow you to read it!\n",fname[fi]); } } if(!f) return(NULL); while(fgets(line, 1024, f)) { Printf("getRC:pre:line:\n%s",line); q=strchr(line,'"'); if(q) { p=strchr(line,'#'); if(p && pNUM_BUTTONS) i=NUM_BUTTONS; else newwa[num_wa-1].button=i; } else { for(i=0; iid,((struct WinAction*)a)->id)); } /*----------------------------------------------------------------------------*/ char *strsepc(char **str, char delim) { // this is to replace the non-portable strsep... char *p,*r; if(!*str) return(NULL); for(p=*str; *p && *p!=delim; p++); if(!*p) { r=*str; *str=NULL; } else { *p='\0'; r=*str; *str=p+1; } return(r); } /*----------------------------------------------------------------------------*/ char **getPipeArray(char *str) { int i,n; char *s,**a,*t; for(n=0,s=str;*s;s++) if(*s=='|') n++; if(strlen(str)) n++; a=(char**)malloc(sizeof(char*)*(n+1)); a[n]=NULL; for(i=0,s=str; s && ipri); Printf("\tWindow Regex : \"%s\"\n",wa->id); if(wa->buttonin); for(i=0; wa->in && wa->in[i]; i++) Printf("\t\t\"%s\"\n",wa->in[i]); Printf("\tButton : %d\n",wa->button); Printf("\tKeysyms Out (%p) :\n",wa->out); for(i=0; wa->out && wa->out[i]; i++) Printf("\t\t\"%s\"\n",wa->out[i]); Printf("\tReps: %d\n",wa->reps); Printf("\tRep Delay: %d\n",wa->delay); Printf("\tKey Up Delay: %d\n",wa->delayup); } else switch(wa->button) { case UNGRAB: Printf("Command: Exclude (UNGRAB)\n"); break; case REPEAT: Printf("Command: Repeat (REPEAT)\n"); break; case PRIORITY: Printf("Command: Priority (PRIORITY)\n"); break; } } /*----------------------------------------------------------------------------*/ void writeRC(struct WinAction *wa) { int i; struct WinAction *p,*cur; FILE *f=stdout; char fname[1024]; char *home; if(!wa) return; home=gethome(RCFILE); if(home) sprintf(fname,"%s%s",home,RCFILE); else { perror("imwheel,writeRC"); return; } if(!(f=fopen(fname,"w"))) { perror("imwheel,writeRC"); return; } fprintf(f,"# IMWheel Configuration file (%s)\n# (C)Jon Atkins \n#\n# Generated by imwheel\n# Any extra comments will be lost on reconfiguration\n# However order will be maintained\n# Order! ORDER, I SAY!!\n",fname); for(cur=NULL,p=wa;p->id;p=&p[1]) { if(!cur || strcmp(cur->id,p->id)) { fprintf(f,"\n\"%s\"\n",p->id); cur=p; } if(p->button<0x10) { for(i=0; p->in[i]; i++) fprintf(f,"%s%s",(i?"|":""),p->in[i]); fprintf(f,",\t%s,\t",button_names[p->button-4]); for(i=0; p->out[i]; i++) fprintf(f,"%s%s",(i?"|":""),p->out[i]); if(p->delayup>0||p->delay>0||p->reps>1||p->reps==0) fprintf(f,",\t%d",p->reps); if(p->delayup>0||p->delay>0) fprintf(f,",\t%d",p->delay); if(p->delayup>0) fprintf(f,",\t%d",p->delayup); fprintf(f,"\n"); } else { switch(p->button) { case UNGRAB: fprintf(f,"@Exclude\n"); break; case REPEAT: fprintf(f,"@Repeat\n"); break; case PRIORITY: fprintf(f,"@Priority=%d\n",p->pri); break; } } } fclose(f); } /*----------------------------------------------------------------------------*/ char *regerrorstr(int err, regex_t *preg) { static char *str=NULL; int len; len=regerror(err,preg,NULL,0); str=realloc(str,len); regerror(err,preg,str,len); return(str); } /*----------------------------------------------------------------------------*/ int regex(char *expression, char *str) { regex_t preg; //regmatch_t pmatch; int err; if(!str || !expression) return(0); Printf("Testing: \"%s\" ?= \"%s\"\n",expression,str); if((err=regcomp(&preg,expression,REG_EXTENDED|REG_NOSUB))) { fprintf(stderr,"imwheel: RegComp ERROR In Expression:\n\"%s\"\n%s\nRemoving the offending expression...\n",expression,regerrorstr(err,&preg)); expression[0]=0; regfree(&preg); return(1); } if((err=regexec(&preg,str,0,NULL,0)) && err!=REG_NOMATCH) { fprintf(stderr,"imwheel: RegExec ERROR In Expression:\n\"%s\"\n%s\nnRemoving the offending expression...\n",expression,regerrorstr(err,&preg)); expression[0]=0; regfree(&preg); return(2); } regfree(&preg); if(err!=REG_NOMATCH) Printf("RegEx Match found:\"%s\" = \"%s\"\n",expression,str); return(err!=REG_NOMATCH); } /*----------------------------------------------------------------------------*/ struct WinAction *findWA(Display *d, int button , char *winname , char *resname , char *classname, XModifierKeymap *xmk , char KM[32] ) { int i,j,ok,kc; struct WinAction *wap=NULL; char km[32]; if(!wa) return(NULL); Printf("findWA:button=%d\n",button); for(i=0; wa[i].id; i++) { // skip removed or blank id's if(wa[i].id[0]==0) continue; // throw out PRIORITY placeholder commands if(wa[i].button == PRIORITY) continue; // throw out miss matched buttons (keep going for all commands) if(button != wa[i].button && wa[i].button < MIN_COMMAND && button != GRAB) { if(button=MIN_COMMAND) { if(!wap || wap->pri-1) ok=!getbit(km,kc); } if(!ok) { Printf("Modifiers for input and actual keys pressed do not match\n"); continue; } if(!wap || wap->pripri); wap=&wa[i]; } else Printf("Match discarded, Priority(%d) is equal or less than %d\n",wa[i].pri,wap->pri); } if(!wap) Printf("No Match for : win=\"%s\" res=\"%s\" class=\"%s\"\n",winname,resname,classname); else { Printf("Matched with : id=\"%s\" button=%d pri=%d\n",wap->id,wap->button,wap->pri); // throw out UNGRABs when looking for things that need GRAB on if(wap->button == UNGRAB && button == GRAB) { Printf("Exclude may have a higher priority due to file position or the priority command\n"); wap=NULL; } } return(wap); } /*----------------------------------------------------------------------------*/ int inputWaiting(Display *d, XEvent *e) { if(useFifo) { if(fifofd!=-1) { fd_set set; struct timeval tv={0,0}; FD_ZERO(&set); FD_SET(fifofd, &set); if(select(fifofd+1,&set,0,&set,&tv)) return True; } else openFifo(); } else if(XCheckMaskEvent(d,ButtonReleaseMask|ButtonPressMask,e)) { return True; } return False; } /*----------------------------------------------------------------------------*/ void doWA(Display *d , XButtonEvent *e , XModifierKeymap *xmk , char km[32], struct WinAction *wap ) { int i,rep; unsigned int button; KeyCode kc; static unsigned char nkm[8192]; static unsigned char nbm[16]; //256 buttons. oh the insanity! ;) /* struct timeval tv; unsigned int mask; */ Printf("doWA:\n"); printWA(wap); if(wap->button==REPEAT) { Printf("doWA: button down = %d\n",e->button); XTestFakeButtonEvent(d,e->button,True,CurrentTime); XFlush(d); /*Printf("doWA: button delay...\n"); delay(1000); */ Printf("doWA: button up = %d\n",e->button); XTestFakeButtonEvent(d,e->button,False,CurrentTime); XFlush(d); Printf("doWA: button done\n"); return; } if(wap->button>=UNGRAB) { Printf("doWA: UNGRAB cannot be handled here: use @Repeat or resend the Button# in the imwheelrc, i.e. None,Up,Button4\n"); return; } for(rep=0; repreps || !wap->reps; rep++) { if(wap->reps) Printf("rep=%d\n",rep); //XSetInputFocus(d,e->subwindow,RevertToParent,CurrentTime); modMods(d,km,xmk,False,0); //XSync(d,False); //this seems to cause apps to receive crud at random times! memset(nkm,0,8192); memset(nbm,0,16); for(i=0; wap->out[i]; i++) { if(strncmp("Button",wap->out[i],6) && strncmp("-Button",wap->out[i],7)) { if(wap->out[i][0]!='-') { kc=XKeysymToKeycode(d, XStringToKeysym(wap->out[i])); XTestFakeKeyEvent(d,kc,True,CurrentTime); setbit(nkm,kc,True); } else { kc=XKeysymToKeycode(d, XStringToKeysym(wap->out[i]+1)); XTestFakeKeyEvent(d,kc,False,CurrentTime); setbit(nkm,kc,False); } } else { ungrabButtons(d,0); if(wap->out[i][6]!='-') { button=strtoul(wap->out[i]+6,NULL,10); XTestFakeButtonEvent(d,button,True,CurrentTime); if(button<256) setbit(nbm,button,True); } else { button=strtoul(wap->out[i]+7,NULL,10); XTestFakeButtonEvent(d,button,False,CurrentTime); if(button<256) setbit(nbm,button,False); } XSync(d,False); grabButtons(d,0); } } Printf("doWA: keyup delay=%d\n",wap->delayup); delay(wap->delayup); for(i--; i>=0; i--) { if(strncmp("Button",wap->out[i],6)) { if(wap->out[i][0]!='-') { kc=XKeysymToKeycode(d, XStringToKeysym(wap->out[i])); if(getbit(nkm,kc)) { XTestFakeKeyEvent(d,kc,False,CurrentTime); setbit(nkm,kc,False); } } } else { ungrabButtons(d,0); if(wap->out[i][0]!='-') { button=strtoul(wap->out[i]+6,NULL,10); if(button>=256 || getbit(nbm,button)) { XTestFakeButtonEvent(d,button,False,CurrentTime); if(button<256) setbit(nbm,button,False); } } XSync(d,False); grabButtons(d,0); } } XSync(d,False); modMods(d,km,xmk,True,0); XSync(d,False); if(wap->delay) { Printf("doWA: nextkey delay=%d\n",wap->delay); delay(wap->delay); } if(!wap->reps) // auto-repeat { if(autodelay) delay(autodelay); if(inputWaiting(d,(XEvent*)e)) { if(useFifo) { getInput(d, (XEvent*)e, &xmk, km); if(e->type!=ButtonPress || e->button!=wap->button) return; } else if(e->type==ButtonRelease && buttons[buttonIndex(e->button)]==wap->button) { XPutBackEvent(d,(XEvent*)e); e->button=buttons[buttonIndex(e->button)]; return; } } } } } /*----------------------------------------------------------------------------*/ void modMods(Display *d, char *km, XModifierKeymap *xmk, Bool on, int delay_time) { int i; for(i=0;i<32*8;i++) if(getbit(km,i) && isMod(xmk,i)>-1) { Printf("XTestFakeKeyEvent 0x%x=%s delay=%d\n",i,(on?"On":"Off"),delay_time); XTestFakeKeyEvent(d,i,on,delay_time); } } /*----------------------------------------------------------------------------*/ void flushFifo() { char junk; closeFifo(); if((fifofd=open(fifoName, O_RDONLY|O_NONBLOCK))<0) { perror(fifoName); exit(1); } errno=0; while(read(fifofd,&junk,1) && !errno) Printf("Flushed : 0x%02x\n",junk); close(fifofd); } /*----------------------------------------------------------------------------*/ void closeFifo() { if(fifofd<0) return; close(fifofd); fifofd=-1; } /*----------------------------------------------------------------------------*/ void openFifo() //also will close,flush, and reopen if fifo is already open! { // Clear stick (reset state) stick.x=stick.y=0; // preflush, or else! flushFifo(); // open for real now! if((fifofd=open(fifoName, O_RDONLY))<0) { perror(fifoName); exit(1); } Printf("Reopened Wheel FIFO.\n"); } /*----------------------------------------------------------------------------*/ /* vim:ts=4:shiftwidth=4 "*/ imwheel-1.0.0pre12.orig/util.h0000644000175000017500000000512510061736135016350 0ustar chrischris00000000000000/* IMWheel Utility Definitions * Copylefted under the Linux GNU Public License * Author : Jonathan Atkins * PLEASE: contact me if you have any improvements, I will gladly code good ones */ #ifndef UTIL_H #define UTIL_H #include #include #define PIDFILE PIDDIR"/imwheel.pid" #define NUM_BUTTONS 6 #define STATE_MASK (ShiftMask|ControlMask|Mod1Mask|Mod2Mask|Mod3Mask|Mod4Mask|Mod5Mask) #define NUM_STATES 3 #define MAX_MASKTRANS 8 #define ABS(a) ((a)<0?(-a):(a)) /* commands */ enum { UNGRAB =100, REPEAT =200, GRAB =400, PRIORITY=800 }; #define MIN_COMMAND UNGRAB struct Trans { char *name; int val; }; struct WinAction { int pri; //used to determine priority of some conflicting matches char *id; //window identifier (for regex match) int button; //mouse button number or command char **in; //keysyms in mask char **out; //keysyms out int reps; //number of repetitions int delay; //microsecond delay until next keypress int delayup;//microsecond delay while key down }; extern int buttons[NUM_BUTTONS+1]; extern int statebits[STATE_MASK+1]; extern int debug; extern struct WinAction *wa; extern int num_wa; extern struct Trans masktrans[MAX_MASKTRANS]; extern const int reps[1< http://jonatkins.org imwheel-1.0.0pre12.orig/imwheel.1.html0000644000175000017500000007470310061736135017711 0ustar chrischris00000000000000Manpage of IMWheel

IMWheel

Section: User Commands (1)
Updated: September 8 2002
Index Return to Main Contents
 

NAME

imwheel - a mouse wheel and stick interpreter for X Windows  

SYNOPSIS

imwheel [ options ]
 

DESCRIPTION

IMWheel is a universal mouse wheel and mouse stick translator for the X Windows System. Using either a special version of gpm and it's /dev/gpmwheel FIFO, or the support for a ZAxis on the mouse built into some servers, such as XFree86. Utilizing the input from gpm or X Windows, imwheel translates mouse wheel and mouse stick actions into keyboard events using the XTest extension to X. Use xdpyinfo for information on the supported extensions in your X server.

 

COMMAND LINE OPTIONS

Available command line options are as follows:
-4, --flip-buttons
Flips the mouse buttons so that 4 is 5 and 5 is 4, reversing the Up and Down actions. This would make 4 buttons somewhat useful! This is the similar to using "-b 54678", see the -b option. See also xmodmap(1).
-b, --buttons button-spec
Remap buttons in button-spec to interpreted wheel/thumb input. Also limits the button grab to the specified buttons when using the ZAxis method. (see "X WINDOWS ZAXIS METHOD" below) the button-spec may specify any of up to five buttons. the button-spec is decoded in the following order for wheel input:

Index   Interpreted As    Button Number

1 Wheel Up 4
2 Wheel Down 5
3 Wheel Left 6
4 Wheel Right 7
5 Thumb Button 1 8
6 Thumb Button 2 9
A button-spec of "45" will limit the grabbed buttons for only wheel up and down.
A button-spec of "67" may be useful to use actual buttons 6 and 7 as wheel up and down, and limit the grab to only those two buttons.
A button-spec of "0" turns off any defined mapping, thus allowing for skips in the button-spec for something that doesn't exist on your mouse.
A button-spec of "45006" may be for normal wheel up/down and a thumb button 1, but no horizontal wheel axis.
The default button-spec is "456789".
See also xmodmap(1).
-c, --config
Popup to configuration helper window imediately.
See also CONFIGURATION HELPER
-D, --debug
Show all possible debug info while running. This spits out alot and I also suggest using the -d option to prevent imwheel from detaching from the controlling terminal.
-d, --detach
Actually this does the opposite of it's name, it prevents detachment from the controlling terminal. (no daemon...) Control-C stops, etc...
-f, --focus
Forces the X event subwindow to be used instead of the original hack that would replace the subwindow in the X event with a probed focus query (XGetInputFocus). This should fix some compatability problems with some window managers, such as window maker, and perhaps enlightenment. If nothing seems to be working right, try toggling this on or off...
-g, --focus-events
Disable the use of focus events for button grabs. If your @Excluded windows are not regrabbing the mouse buttons when exited, try toggling this on or off...
-h, --help
Short help on options plus version/author info.
-k, --kill
Attempts to kill old imwheel (useful only for --wheel-fifo method.) Pidfile must be created for this to work (no -p or --pid option on the previous imwheel invocation). Process IDs are tested using /proc/${pid}/status Name: field ?= imwheel. If /proc is not mounted then this fails everytime! Otherwise, this ensures that the wrong process is not killed.
-p, --pid
Don't write a pid file for gpmwheel FIFO method. This is the only method that uses the pid file. XGrab doesn't need it, so it just issues a warning about starting multiple imwheels on the same display. Some people really prefer this, especially when they are not using a SUID root imwheel executable.
-q, --quit
Quit imwheel before entering event loop. Usful in killing an imwheel running in gpmwheel FIFO mode after exiting XWindows, if you're using pid files that is.
Example: `imwheel -k -q' = kill and quit (option order doesn't matter)
-s, --sensitivity sum-min
(Stick mice, Wheel FIFO method only)
like -t only this sets a minimum total amount of movment of the stick or marble, before any action is taken. This works good with the Marble type devices. This should be a multiple of the threshhold as given by the -t option. The default is 0, meaning that there is no sensitivity testing, all input spawns an event. See the -t option also. (see "STICK SENSITIVITY SETTINGS" below)
-t, --threshhold minimum-pressure
Used with gpm only and then only with recognized stick mice. stick mice send a pressure value ranging from 0(no pressure) to 7(hard push). This sets the minimum required pressure for input to be registered. Setting it to zero will cause realtime sticking, which is usually too much action for X to keep up. (max rate i saw was 100 events a second!). Once input is registered, it is summed up per axis, and then it must equal or exceed the sensitivity setting to pass as an input. See the -s option also, for sensitivity.
The default is 2, to avoid slight presses on the 90-degree direction of the intended while still getting to the intended direction. Setting this to 7 is insane, because it requires the user to push as hard as possible everytime they want something to happen! However it may not be so insane for people using trackballs for input, as they may spin much faster per sample...
(see "STICK SENSITIVITY SETTINGS" below)
-W, --wheel-fifo fifo
Use the gpm/jamd wheel fifo instead of XGrabMouse. See GPM/JAMD WHEEL FIFO METHOD section. This method allows only one X display to be used. This is required for the gpm method to work. This method only works with the imwheel version of gpm and with jamd. To find out if you are running the imwheel version of gpm use the following command and look for "(imwheel)" in the title:

gpm -v

fifo names the named pipe (FIFO) created by gpm. It defaults to "/dev/gpmwheel" (for --wheel-fifo only). The FIFO must exist before running imwheel in this mode. using jamd requires you to name the correct fifo because it doesn't use /dev/gpmwheel, but rather one of the /dev/jam_imwheel:0.0 named fifos created by jamd's imwheel module.
@Exclude commands in the rc file are unused in this mode.
-X, --display display
Use XServer at a specified display in standard X form. Using this option is usful for multiple displays in the X Window ZAxis Method.
-x, --transpose

This swaps the X and Y axis of movement for stick input from a wheel-fifo.

 

X WINDOWS ZAXIS METHOD

This method is the only method that works with multiple X displays, using multiple imwheels. Use multiple imwheels by either setting the DISPLAY environment variable before running each imwheel, or use the -X or --display options to specify a different display for each imwheel. Running multiple imwheels on the same display is not recommended, but is allowed, and may cause strange things to happen while using the stick or wheel.

Edit the XF86Config and add/edit the following lines in the "Pointer"(XFree86 3.3) or "InputDevice"(XFree86 4.x) section:

1 axis (vertical wheel):

(XFree86 3.3)
Buttons 5 ZAxisMapping 4 5
(XFree86 4.x)
Option "Buttons" "5" Option "ZAxisMapping" "4 5"

2 axis (1 stick or 2 perpendicular wheels):

(XFree86 3.3)
Buttons 7 ZAxisMapping 4 5 6 7
(XFree86 4.x)
Option "Buttons" "7" Option "ZAxisMapping" "4 5 6 7"

The Buttons option may be greater than stated above if you have thumb buttons, or other extras that qualify as buttons.

Make sure your Protocol is set to either "IMPS/2" for a PS/2 mouse or for serial mice set it to "IntelliMouse" or "Auto". This is for IntelliMouse compatible mice, other protocols may be required for other mice. Then while running X Windows run imwheel without the --wheel-fifo or -W options.

NOTE
The @Exclude command must be used for clients that either use the ZAxis for themselves and have no keyboard translations to cause the same desired effect. The @Exclude command must also be added for any client requiring mouse and/or mouse button grabs and that don't specify specific buttons to grab. These clients fail when they try to grab the mouse because the buttons 4 and 5 are already grabbed by imwheel. XV is an example of a client that requires these types of grabs to succeed. KDE clients use the ZAxis for their own purposes. The supplied imwheelrc included and exclusion for XV already. See the IMWheelRC section for more information.

Also pid files are not used for this method. Thus the -p and --pid options have no effect, and are ignored.

 

GPM/JAMD WHEEL FIFO METHOD

This method is REQUIRED for any X Windows server without wheel mouse support built in. This method will currently support mice as supported through gpm or jamd.

In the Pointer section of your XF86Config (or the equivalent configuration file for your X server) change your mouse Protocol to be "MouseSystems" (or the equivelant...), also change the Device file that the mouse is read from to "/dev/gpmdata", then restart X Windows if it is running. jamd will replicate to /dev/jam_ps2:0.0 or some other devices as well, make sure to use the right X Mouse protocol in this case, like the jamd_ps2 device is X mouse protocol PS/2, and the jamd_imps2 device is X mouse protocol IMPS/2.

Before starting X Windows (re)start gpm with the -W option. Make sure you are using a supported wheel or stick mouse as stated in the gpm man page.

After starting X Windows run imwheel as follows adding options as desired:

for gpm you can use the following option to imwheel

--wheel-fifo

jamd requires you specify the fifo name as one of the /dev/jamd_imwheel:0.0 named fifos. Run

ls -al /dev/jam_imwheel*

to see what is available. In this example I would use

-W /dev/jam_imwheel:0.0

as the option to imwheel.

I usually add the -k option to kill off any old imwheel processes left over, as imwheel doesn't exit with the server, but rather it will only die if a wheel or stick action occurs when an X server is not connected, such as when X is dead or the DISPLAY environment variable is setup wrong, or the -X or --display variables connected imwheel to a now defunct X server.

gpm or jamd, and/or imwheel can be restarted at any time, imwheel can sense when gpm of jamd is not there, and gpm nor jamd doesn't give a hoot about imwheel being up or not.

NOTE
The @Exclude command has no bearing in this method, it is ignored. No Focus change events are received in this method. Thus KDE and other clients that support X based wheel events through the ZAxis are not going to work except through normal imwheel keypress translation of wheel and stick actions.
XV will function fine, as will any client that grabs the mouse and/or mouse buttons. This mode doesn't use any grabs to function.

 

STICK SENSITIVITY SETTINGS

The -s and -t options specify a sensitivity and threshhold. each movement of a stick, or trackball, must equal or exceed the threshhold to be added to the respective axis sum. In other words if you puch the stick up hard enough to exceed the threshhold then the Y axis sum would be increased by however much you pressed up.

Next the summed X and Y axis movement is each compared to the sensitivity setting. If the sensitivity setting is equalled or exceeded, then one imwheel event is spawned, thus after pressing up for a bit, the Y sum exceeds the sensitivity and a wheel up event is interpreted by imwheel into an action such as a PageUp key.

The sensitivity therefore must be greater than the threshhold for it to have any bearing on the input. Pseudo code such as the following may explain:

if(input >= threshhold)
sum = sum + input
if(sum >= sensitivity) {
do an imwheel action sum = 0
}
 

IMWHEELRC

IMWheel uses, optionally, two configuration files. One called /etc/X11/imwheelrc, which is used for everybody. The other is $HOME/.imwheelrc, used only for one user. One is supplied and should have been installed automatically in /etc if not also in the installing users $HOME as well. All whitespace is ignored in the files except for within the window names' double quotes.

The configuration file consists of window names and event translations and/or imwheel commands that begin with an `@' (at) symbol. Each window name starts a section that is it's configuration. The window names a priortized as first come first served, so more generic matches should always occur later in the configuration file.

Comments are started with a pound (#) and extend to the end of the line.

 

IMWHEELRC WINDOW SECTION HEADERS

Window name section headers are actually one of four things:

Window Title
Window Class Name
Window Resource Name
(null) which matches "\(null\)" in the imwheelrc

Most of these are probe-able using fvwm2's FvwmIdent module or the configurator (see the CONFIGURATION HELPER section). Other window managers may have their own method of identifying windows' attributes.
Each window name is matched as a regex string. Thus any window is matched using the regex pattern ".*" as a window name. This pattern should be the last section in your configuration file, or it will override the other window configurations in the file for matched wheel/stick actions.
There is one special header noted as "(null)" which matches windows that have a null string in the three attributes. This makes it possible to assign actions to even Quake3, which has no info for it's window. Just make sure that you realize that the keys used should not be keys that may conflict with other key actions in the game or application you are aiming to make work! The included imwheelrc file has a "(null)" section included to demonstrate, and it should work with Quake3.
Each window/class/resource name must be enclosed in double quotes (") on a line by itself.

Inside each window section is any number of translation definitions or commands. Each translation definition or command must be on a line by itself. The window section doesn't have to be terminated, as it is terminated by either starting another window section or the end of the configuration file.

 

IMWHEELRC TRANSLATION DEFINITIONS

Mouse wheel/stick translations each take up a line after a window section has been started. Each argument is seperated by commas(,) whitespace is ignored. KeySyms are used to specify the keyboard input and outputs. pipes (|) are used to join multiple keys into one input/output. The format is as follows:

REQUIRED
The following arguments a required to make a minimum translation definition.

Key Modifiers Input
X KeySyms joined by pipes that indicate the required keys pressed when the mouse action is made in order for this translation to be used. Alt, Meta, Control, and Shift keys are typical modifiers, but are stated slightly different than just `Shift' but rather `Shift_L' or `Shift_R', differentiating between left and right shift keys. See the KeySyms section for more.

`None' is a special KeySym used by imwheel, it is used to indicate no modifiers. A blank entry is also acceptable in this case, but less descriptive of what is going on! If `None' is used then there can be no modifiers in use during the wheel action. If the field is blank then any modifier will match, so put these last in their window section.

Mouse Action Input
This is the input from the mouse wheel or stick. It is one of the following and only one:

Up
Down
Left
Right
Thumb

These are self explanatory. If you have trouble use the configurator!

Key Action Output
Out KeySyms are placed here. See KeySyms section for more on all available KeySyms. Join KeySyms using pipes. Output keys are pressed in order and released, in reverse order, only after all have been pressed, likely making them all combined as in `Control_L|C' which would be a `^C' (control-c) keypress.

OPTIONAL
The following options are optional, but to use one you must fill in all the preceding arguments.

Output Repetitions
How many times should the Output KeySyms be pressed in a row.

Default is 1.

Delay Before KeyUp Event
How long in microseconds until we release all the Output KeySyms in one Output Repetition.

Default is 0.

Delay Before Next KeyPress Event
How long in microseconds until we press the next the Output KeySyms. Ths delay occurs after the Output KeySyms are released.

Default is 0.

 

IMWHEELRC COMMANDS

Commands start with the `@' character. Commands are as follows:
@Exclude
Exclude this window from imwheel grabing mouse events. imwheel will ungrab the mouse when these windows are entered and not regrab the mouse until focus is changed to a non-excluded window. This allows the ZAxis button events to pass through normally and mouse grabs to succeed.
XV and KDE clients need this for the X Windows Method.
This command has no effect in the GPM Method. The mouse isn't grabbed, nor are ZAxis button events created by the server.
@Repeat
Repeat the mouse button to the window. This cause a mouse button to be generated in the current window. It does not use XSendEvent so the mouse button presses are indistiguishable from the real thing. This mode is not compatible with the XGrabButtons method of imwheel, otherwise listed as the ZAxis Method in this manpage.
Motions are mapped as follows:

Up     is button 4
Down   is button 5
Left   is button 6
Right  is button 7
Thumb1 is button 8
Thumb2 is button 9
@Priority=priority
Using this is allowed in each window/class/resource section. Higher priority values take precedence over lower ones. Equal priorities on sections make the imwheelrc file parsed from top to bottom to find the first match. Thus @Priority can be used to make the file search for matches out of order, then you dont have to keep the entries in order if you so please. the supplied imwheelrc file contains extensive comments and examples of the @Priority function.
The default priority for any new section is 0. The last @Priority command in a section overrides all previous priorities for that section. Thus each section has only one priority setting in the end. Priorities are kept as an int, thus range from INT_MAX to INT_MIN. (see /usr/include/limits.h for these values on your system)

 

CONFIGURATION HELPER

IMWheel contains a semi-hidden configuration helper which can be brought up by rolling/sticking up and down a few times in the root window of the X server. Inside this window you can find out possible window names to use in your imwheelrc file. Press on the mini-screen capture to grab another window, including the root window (whole screen).

Mouse wheel and stick actions can be grabbed along with active modifier keys on the keyboard. The mouse wheel/stick action is displayed and the X KeySyms are displayed beneath it. All this information can be directly entered into an imwheelrc as desired.

IMWheel can be restarted to read in a changed imwheelrc file or the configurator can be canceled causing imwheel to resume oprations without reading the configuration file. To restart imwheel execs itself as called by the user in the first place but adding the -R option to indicate to itself that this is a restarted imwheel. The -R is not for use by the user, as it bypasses some configuration of imwheel.

 

KEYSYMS

The program expects combinations of keysyms to be used by using pipe(|) characters to combine them together.

Example:

Alt_R|Shift_R

Means right alt and right shift together, not just either one or the other! And not one after the other, they are both pressed at the same time essentially.

For FIFO users, it is possible to send a real mouse button event, using the special Button# syntax. An imwheelrc keysym of Button1 would send a real Mouse button 1 (left mouse button) event. Mouse4 is what you'd want for a MouseWheelUp type event. Mouse5 is what you want to MouseWheelDown event. Many applications will understand the meaning of mouse button 4 and 5, but most don't go beyond that. So Mouse6 and greater have no "standardized" meaning. The Button# syntax can be combined with regular keysyms, to send keys and mouse buttons at the same time.

Example:

Shift_L|Button4
    - meaning left shift and wheel up.
Button5
    - meaning wheel down.

Other button to imwheel meaniful references:

KeySym   IMWheel Input  Real Mouse
------   -------------  ----------
Button1  (none)         Left Mouse Button
Button2  (none)         Middle Mouse Button
Button3  (none)         Right Mouse Button
Button4  Up             Mouse Wheel Up
Button5  Down           Mouse Wheel Down
Button6  Left           Mouse Wheel Left
Button7  Right          Mouse Wheel Right
Button8  Thumb1         Side Mouse Button 1 (left/up)
Button9  Thumb2         Side Mouse Button 2 (right/down)
Common Modifier Keysym names used in X: Shift_L Shift_R Control_L Control_R Alt_L Alt_R

These are probably not currently assigned any keys, unless you xmodmap them in:

Meta_L      Meta_R      (Actually, Sun keyboards have this...)
Super_L     Super_R
Hyper_L     Hyper_R

And here's some that you may use, and they are somewhere on your keyboard:Here's where they were on my keyboard, again, this is not universal. Use the xev program to test your own keys on your keyboard!

Caps_Lock   = The Caps Lock key!
              (This still turns on and off caps lock!)
Num_Lock    = The Num Lock key!
              (This is not good to use...
               for the same reasons as Caps_Lock)
Multi_key   = The Scroll Lock key!
              (Go figure!)
Mode_switch = Right Alt...for me anyways.
              (This mean I cannot use Alt_R)

The windows keys may not be assigned any KeySyms, but they will have numbers. xmodmap can be used to assign them to a real KeySym.

To find keysym names for any keys available see the /usr/include/X11/keysymdef.h file, and for any define in that file remove the "XK_" for the usable KeySym name in the configuration file. The path to this file may differ for you.

Remember, there's always the configurator. And xev will also help here too!

 

WHEEL OR STICK AS MIDDLE BUTTON IN X

Configure the XF86Config without "Emulate3Buttons" and increase "Buttons" if it is 2 in the Ponter or InputDevice section. The wheel or stick will act as a real middle button and the outer two buttons will act as separate buttons (1 and 3), even when pressed together.

Of course if your wheel keeps clicking middle button while you're trying to use the wheel you may want to activate the Emulate3Buttons option to disable the wheel button! And donn't forget to reduce the Buttons argument to 2!

 

LEFTY BUTTON MAPPING IN X WINDOWS

For those of you lefties out there using method #1, the non-gpm method this command may help you get the buttons set up correctly in XWindows for both left handed and imwheel use.

xmodmap -e "pointer = 3 2 1 4 5"
  or
xmodmap -e "pointer = 3 2 1 4 5 6 7"
  etc...
xmodmap -e "pointer = 3 2 1 4 5 6 7 8 9"

NOTE: most of these are NOT going to work, because of all the limits in X.

add more numbers to the end of this line if you have more buttons!

 

BUGS

Of course...but most of the time it's just that you haven't read everything I've written here and in the files of the distribution itself. Even then, you may be giving up too easily. Keep trying, it's not that hard. I am always working on reducing strange behavior. This is still a beta, as indicated by the leading 0 in the version number.

Real Bugs

imwheel doesn't get along with itself on the same X display or using the same gpmwheel FIFO. - This will always be your fault :-/

Stick mice are still a pain in the butt to use. - This is the manufacturer's fault. Or X Windows fault, for not having a method to easily use such devices in all applications.

Keyboard focus isn't changed automatically to input keys into Window mouse is over. This only occurs with Click-to-Focus type focus managment in window managers. I use sloppy focus in fvwm2, which always works for me. - Whose fault is this? (Switch focus modes and/or window managers, or try the -f option on imwheel)

Configuration file is not validated for correctness nicely...although it does get preparsed before the main program starts, thus stopping you before you run with an invalid configuration file. I just have never made a bad configuration file, so I guess I'll have to try and do that to see what happens. Just don't make any mistakes and you'll be fine. - This is my fault?! ;)

 

HOMEPAGE

http://jonatkins.org/imwheel

 

AUTHOR

Jonathan Atkins <jcatki@jonatkins.org>

 

FILES

$HOME/.imwheelrc
        The users configuration file.

/etc/X11/imwheelrc
        The global location for the configuration
        file, it is always loaded.  Overided by
        the users configuration file.

/dev/gpmwheel
        The default wheel FIFO from gpm, if used.

/dev/jam_imwheel:0.0 (or other numbers...)
        A wheel FIFO from jamd, if used, must be specified.
        jamd allows more than on FIFO, and thus allows more than
        one instance of imwheel to be running on the same computer
        when running imwheel on multiple displays
        using the Wheel FIFO method.

/tmp/imwheel.pid
        The public area for imwheel's pid file.

/var/run/imwheel.pid
        The private area for imwheel's pid file.

 

SEE ALSO

jamd(1)
    Jon Atkins Mouse - a replacement/augmentation for/to gpm.
xwheel(1x)
    The new replacement for imwheel.  Uses jamd instead of gpm or ZAxis.
        (may not be available yet)
xdpyinfo(1x)
    X Display information, including extensions.
gpm(8)
    General Purpose Mouse, imwheel edition required.
FvwmIdent(1x)
    FVWM2's Identify module, for probing windows.
regex(7)
    POSIX 1003.2 Regular Expressions.
xmodmap(1x)
    Utility for modifying keymap & button mappings in X.
xev(1x)
    Print contents of X events.
/usr/include/X11/keysymdef.h
    X11 KeySym definitions.
/usr/include/limits.h
    INT_MIN and INT_MAX definitions.


 

Index

NAME
SYNOPSIS
DESCRIPTION
COMMAND LINE OPTIONS
X WINDOWS ZAXIS METHOD
GPM/JAMD WHEEL FIFO METHOD
STICK SENSITIVITY SETTINGS
IMWHEELRC
IMWHEELRC WINDOW SECTION HEADERS
IMWHEELRC TRANSLATION DEFINITIONS
IMWHEELRC COMMANDS
CONFIGURATION HELPER
KEYSYMS
WHEEL OR STICK AS MIDDLE BUTTON IN X
LEFTY BUTTON MAPPING IN X WINDOWS
BUGS
HOMEPAGE
AUTHOR
FILES
SEE ALSO
imwheel-1.0.0pre12.orig/setps2.c0000644000175000017500000000261007203176121016577 0ustar chrischris00000000000000#include #include #include #include #include #ifdef HAVE_FCNTL_H #include #endif #include #ifdef HAVE_UNISTD_H #include #endif #include #include char readps2(int fd) { char ch; while(read(fd,&ch,1) && (ch==(char)0xfa || ch==(char)0xaa)) { fprintf(stderr,"<%02X>",ch&0xff); fflush(stdout); } return(ch); } int main(int argc, char **argv) { int fd; char ch, getdevtype=0xF2, enabledev=0xF4, disabledev=0xF5, resetps2=0xFF; if(argc>1) fd=open(argv[1],O_RDWR); else fd=open("/dev/mouse",O_RDWR); fprintf(stderr,"disable\n"); write(fd,&disabledev,1); fprintf(stderr,"flush\n"); tcflush(fd, TCIFLUSH); fprintf(stderr,"getdev\n"); write(fd,&getdevtype,1); fprintf(stderr,"sleep(1)\n"); sleep(1); fprintf(stderr,"read\n"); ch=readps2(fd); fprintf(stderr,"device type=%02X(%4d)\n",ch&0xff,ch); fprintf(stderr,"reset ps2\n"); write(fd,&resetps2,1); fprintf(stderr,"sleep(1)\n"); sleep(1); fprintf(stderr,"read\n"); ch=readps2(fd); fprintf(stderr,"reset response=%02X(%4d)\n",ch&0xff,ch); fprintf(stderr,"flush\n"); tcflush(fd, TCIFLUSH); fprintf(stderr,"getdev\n"); write(fd,&getdevtype,1); fprintf(stderr,"sleep(1)\n"); sleep(1); fprintf(stderr,"read\n"); ch=readps2(fd); fprintf(stderr,"device type=%02X(%4d)\n",ch&0xff,ch); close(fd); return(0); } imwheel-1.0.0pre12.orig/imwheel.10000644000175000017500000006517010061736135016744 0ustar chrischris00000000000000.TH IMWheel 1 "September 8 2002" "Version 1.0.0" .UC 1 .SH "NAME" imwheel \- a mouse wheel and stick interpreter for X Windows .SH "SYNOPSIS" \fBimwheel\fP [ \fIoptions\fP ] .br .SH "DESCRIPTION" \fIIMWheel\fP is a universal mouse wheel and mouse stick translator for the X Windows System. Using either a special version of gpm and it's /dev/gpmwheel FIFO, or the support for a ZAxis on the mouse built into some servers, such as XFree86. Utilizing the input from gpm or X Windows, imwheel translates mouse wheel and mouse stick actions into keyboard events using the XTest extension to X. Use \fIxdpyinfo\fP for information on the supported extensions in your X server. .LP .SH "COMMAND LINE OPTIONS" Available command line options are as follows: .TP \fB-4, --flip-buttons\fP Flips the mouse buttons so that 4 is 5 and 5 is 4, reversing the Up and Down actions. This would make 4 buttons somewhat useful! This is the similar to using "-b 54678", see the \fB-b\fP option. See also xmodmap(1). .TP \fB-b, --buttons\fP \fIbutton-spec\fP Remap buttons in \fIbutton-spec\fP to interpreted wheel/thumb input. Also limits the button grab to the specified buttons when using the ZAxis method. (see "X WINDOWS ZAXIS METHOD" below) the \fIbutton-spec\fP may specify any of up to five buttons. the \fIbutton-spec\fP is decoded in the following order for wheel input: .RS .RS .nf Index Interpreted As Button Number .br 1 Wheel Up 4 .br 2 Wheel Down 5 .br 3 Wheel Left 6 .br 4 Wheel Right 7 .br 5 Thumb Button 1 8 .br 6 Thumb Button 2 9 .fi .RE A \fIbutton-spec\fP of "45" will limit the grabbed buttons for only wheel up and down. .br A \fIbutton-spec\fP of "67" may be useful to use actual buttons 6 and 7 as wheel up and down, and limit the grab to only those two buttons. .br A \fIbutton-spec\fP of "0" turns off any defined mapping, thus allowing for skips in the \fIbutton-spec\fP for something that doesn't exist on your mouse. .br A \fIbutton-spec\fP of "45006" may be for normal wheel up/down and a thumb button 1, but no horizontal wheel axis. .br The default \fIbutton-spec\fP is "456789". .br See also xmodmap(1). .RE .TP \fB-c, --config\fP Popup to configuration helper window imediately. .br See also \fBCONFIGURATION HELPER\fP .TP \fB-D, --debug\fP Show all possible debug info while running. This spits out alot and I also suggest using the \fB-d\fP option to prevent imwheel from detaching from the controlling terminal. .TP \fB-d, --detach\fP Actually this does the opposite of it's name, it prevents detachment from the controlling terminal. (no daemon...) Control-C stops, etc... .TP \fB-f, --focus\fP Forces the X event subwindow to be used instead of the original hack that would replace the subwindow in the X event with a probed focus query (XGetInputFocus). This should fix some compatability problems with some window managers, such as window maker, and perhaps enlightenment. If nothing seems to be working right, try toggling this on or off... .TP \fB-g, --focus-events\fP Disable the use of focus events for button grabs. If your \fB@Excluded\fP windows are not regrabbing the mouse buttons when exited, try toggling this on or off... .TP \fB-h, --help\fP Short help on options plus version/author info. .TP \fB-k, --kill\fP Attempts to kill old imwheel (useful only for \fB--wheel-fifo\fP method.) Pidfile must be created for this to work (no \fB-p\fP or \fB--pid\fP option on the previous imwheel invocation). Process IDs are tested using /proc/${pid}/status Name: field ?= imwheel. If /proc is not mounted then this fails everytime! Otherwise, this ensures that the wrong process is not killed. .TP \fB-p, --pid\fP Don't write a pid file for gpmwheel FIFO method. This is the only method that uses the pid file. XGrab doesn't need it, so it just issues a warning about starting multiple imwheels on the same display. Some people really prefer this, especially when they are not using a SUID root imwheel executable. .TP \fB-q, --quit\fP Quit imwheel before entering event loop. Usful in killing an imwheel running in gpmwheel FIFO mode after exiting XWindows, if you're using pid files that is. .br Example: `imwheel -k -q' = kill and quit (option order doesn't matter) .TP \fB-s, --sensitivity\fP \fIsum-min\fP (Stick mice, Wheel FIFO method only) .br like \fB-t\fP only this sets a minimum total amount of movment of the stick or marble, before any action is taken. This works good with the Marble type devices. This should be a multiple of the threshhold as given by the \fB-t\fP option. The default is 0, meaning that there is no sensitivity testing, all input spawns an event. See the \fB-t\fP option also. (see "STICK SENSITIVITY SETTINGS" below) .TP \fB-t, --threshhold\fP \fIminimum-pressure\fP Used with gpm only and then only with recognized stick mice. stick mice send a pressure value ranging from 0(no pressure) to 7(hard push). This sets the minimum required pressure for input to be registered. Setting it to zero will cause realtime sticking, which is usually too much action for X to keep up. (max rate i saw was 100 events a second!). Once input is registered, it is summed up per axis, and then it must equal or exceed the sensitivity setting to pass as an input. See the \fB-s\fP option also, for sensitivity. .br The default is 2, to avoid slight presses on the 90-degree direction of the intended while still getting to the intended direction. Setting this to 7 is insane, because it requires the user to push as hard as possible everytime they want something to happen! However it may not be so insane for people using trackballs for input, as they may spin much faster per sample... .br (see "STICK SENSITIVITY SETTINGS" below) .TP \fB-W, --wheel-fifo\fP \fIfifo\fP Use the gpm/jamd wheel fifo instead of XGrabMouse. See \fBGPM/JAMD WHEEL FIFO METHOD\fP section. This method allows only one X display to be used. This is required for the gpm method to work. This method only works with the imwheel version of gpm and with jamd. To find out if you are running the imwheel version of gpm use the following command and look for "(imwheel)" in the title: .RS .RS .nf gpm -v .fi .RE \fIfifo\fP names the named pipe (FIFO) created by gpm. It defaults to "/dev/gpmwheel" (for \fB--wheel-fifo\fP only). The FIFO must exist before running imwheel in this mode. using jamd requires you to name the correct fifo because it doesn't use /dev/gpmwheel, but rather one of the /dev/jam_imwheel:0.0 named fifos created by jamd's imwheel module. .br \fB@Exclude\fP commands in the rc file are unused in this mode. .RE .TP \fB-X, --display\fP \fIdisplay\fP Use XServer at a specified \fIdisplay\fP in standard X form. Using this option is usful for multiple displays in the X Window ZAxis Method. .TP \fB-x, --transpose\fP This swaps the X and Y axis of movement for stick input from a wheel-fifo. .LP .SH "X WINDOWS ZAXIS METHOD" This method is the only method that works with multiple X displays, using multiple imwheels. Use multiple imwheels by either setting the DISPLAY environment variable before running each imwheel, or use the \fB-X\fP or \fB--display\fP options to specify a different display for each imwheel. Running multiple imwheels on the same display is not recommended, but is allowed, and may cause strange things to happen while using the stick or wheel. .LP Edit the XF86Config and add/edit the following lines in the "Pointer"(XFree86 3.3) or "InputDevice"(XFree86 4.x) section: .LP 1 axis (vertical wheel): .RS .nf (XFree86 3.3) .RS Buttons 5 ZAxisMapping 4 5 .RE (XFree86 4.x) .RS Option "Buttons" "5" Option "ZAxisMapping" "4 5" .RE .fi .RE .LP 2 axis (1 stick or 2 perpendicular wheels): .RS .nf (XFree86 3.3) .RS Buttons 7 ZAxisMapping 4 5 6 7 .RE (XFree86 4.x) .RS Option "Buttons" "7" Option "ZAxisMapping" "4 5 6 7" .RE .fi .RE .LP The Buttons option may be greater than stated above if you have thumb buttons, or other extras that qualify as buttons. .LP Make sure your Protocol is set to either "IMPS/2" for a PS/2 mouse or for serial mice set it to "IntelliMouse" or "Auto". This is for IntelliMouse compatible mice, other protocols may be required for other mice. Then while running X Windows run imwheel \fIwithout\fP the \fB--wheel-fifo\fP or \fB-W\fP options. .LP .B NOTE .br The \fB@Exclude\fP command must be used for clients that either use the ZAxis for themselves and have no keyboard translations to cause the same desired effect. The \fB@Exclude\fP command must also be added for any client requiring mouse and/or mouse button grabs and that don't specify specific buttons to grab. These clients fail when they try to grab the mouse because the buttons 4 and 5 are already grabbed by imwheel. XV is an example of a client that requires these types of grabs to succeed. KDE clients use the ZAxis for their own purposes. The supplied imwheelrc included and exclusion for XV already. See the IMWheelRC section for more information. .LP Also pid files are not used for this method. Thus the \fB-p\fP and \fB--pid\fP options have no effect, and are ignored. .LP .SH "GPM/JAMD WHEEL FIFO METHOD" This method is REQUIRED for any X Windows server without wheel mouse support built in. This method will currently support mice as supported through gpm or jamd. .LP In the Pointer section of your XF86Config (or the equivalent configuration file for your X server) change your mouse Protocol to be "MouseSystems" (or the equivelant...), also change the Device file that the mouse is read from to "/dev/gpmdata", then restart X Windows if it is running. jamd will replicate to /dev/jam_ps2:0.0 or some other devices as well, make sure to use the right X Mouse protocol in this case, like the jamd_ps2 device is X mouse protocol PS/2, and the jamd_imps2 device is X mouse protocol IMPS/2. .LP Before starting X Windows (re)start gpm with the \fB-W\fP option. Make sure you are using a supported wheel or stick mouse as stated in the gpm man page. .LP After starting X Windows run imwheel as follows adding options as desired: .LP for gpm you can use the following option to imwheel .LP \fB--wheel-fifo\fP .LP jamd requires you specify the fifo name as one of the /dev/jamd_imwheel:0.0 named fifos. Run .LP \fBls -al /dev/jam_imwheel*\fP .LP to see what is available. In this example I would use .LP \fB-W /dev/jam_imwheel:0.0\fP .LP as the option to imwheel. .LP I usually add the \fB-k\fP option to kill off any old imwheel processes left over, as imwheel doesn't exit with the server, but rather it will only die if a wheel or stick action occurs when an X server is not connected, such as when X is dead or the DISPLAY environment variable is setup wrong, or the \fB-X\fP or \fB--display\fP variables connected imwheel to a now defunct X server. .LP gpm or jamd, and/or imwheel can be restarted at any time, imwheel can sense when gpm of jamd is not there, and gpm nor jamd doesn't give a hoot about imwheel being up or not. .LP .B NOTE .br The @Exclude command has no bearing in this method, it is ignored. No Focus change events are received in this method. Thus KDE and other clients that support X based wheel events through the ZAxis are not going to work except through normal imwheel keypress translation of wheel and stick actions. .br XV will function fine, as will any client that grabs the mouse and/or mouse buttons. This mode doesn't use any grabs to function. .LP .SH "STICK SENSITIVITY SETTINGS" The \fB-s\fP and \fB-t\fP options specify a sensitivity and threshhold. each movement of a stick, or trackball, must equal or exceed the threshhold to be added to the respective axis sum. In other words if you puch the stick up hard enough to exceed the threshhold then the Y axis sum would be increased by however much you pressed up. .LP Next the summed X and Y axis movement is each compared to the sensitivity setting. If the sensitivity setting is equalled or exceeded, then one imwheel event is spawned, thus after pressing up for a bit, the Y sum exceeds the sensitivity and a wheel up event is interpreted by imwheel into an action such as a PageUp key. .LP The sensitivity therefore must be greater than the threshhold for it to have any bearing on the input. Pseudo code such as the following may explain: .RS .nf if(input >= threshhold) .RS sum = sum + input .RE if(sum >= sensitivity) { .RS do an imwheel action sum = 0 .RE } .fi .RE .SH "IMWHEELRC" IMWheel uses, optionally, two configuration files. One called /etc/X11/imwheel/imwheelrc, which is used for everybody. The other is $HOME/.imwheelrc, used only for one user. One is supplied and should have been installed automatically in /etc/X11/imwheel/ if not also in the installing users $HOME as well. All whitespace is ignored in the files except for within the window names' double quotes. .LP The configuration file consists of window names and event translations and/or imwheel commands that begin with an `@' (at) symbol. Each window name starts a section that is it's configuration. The window names a priortized as first come first served, so more generic matches should always occur later in the configuration file. .LP Comments are started with a pound (#) and extend to the end of the line. .LP .SH "IMWHEELRC WINDOW SECTION HEADERS" Window name section headers are actually one of four things: .LP .nf Window Title Window Class Name Window Resource Name (null) which matches "\\(null\\)" in the imwheelrc .fi .LP Most of these are probe-able using fvwm2's FvwmIdent module or the configurator (see the \fBCONFIGURATION HELPER\fP section). Other window managers may have their own method of identifying windows' attributes. .br Each window name is matched as a regex string. Thus any window is matched using the regex pattern ".*" as a window name. This pattern should be the last section in your configuration file, or it will override the other window configurations in the file for matched wheel/stick actions. .br There is one special header noted as "(null)" which matches windows that have a null string in the three attributes. This makes it possible to assign actions to even Quake3, which has no info for it's window. Just make sure that you realize that the keys used should not be keys that may conflict with other key actions in the game or application you are aiming to make work! The included imwheelrc file has a "(null)" section included to demonstrate, and it should work with Quake3. .br Each window/class/resource name \fImust\fP be enclosed in double quotes (") on a line by itself. .LP Inside each window section is any number of translation definitions or commands. Each translation definition or command must be on a line by itself. The window section doesn't have to be terminated, as it is terminated by either starting another window section or the end of the configuration file. .LP .SH "IMWHEELRC TRANSLATION DEFINITIONS" Mouse wheel/stick translations each take up a line after a window section has been started. Each argument is seperated by commas(,) whitespace is ignored. KeySyms are used to specify the keyboard input and outputs. pipes (|) are used to join multiple keys into one input/output. The format is as follows: .LP .B REQUIRED .br The following arguments a required to make a minimum translation definition. .TP \fIKey Modifiers Input\fP X KeySyms joined by pipes that indicate the required keys pressed when the mouse action is made in order for this translation to be used. Alt, Meta, Control, and Shift keys are typical modifiers, but are stated slightly different than just `Shift' but rather `Shift_L' or `Shift_R', differentiating between left and right shift keys. See the KeySyms section for more. `\fBNone\fP' is a special KeySym used by imwheel, it is used to indicate no modifiers. A blank entry is also acceptable in this case, but less descriptive of what is going on! If `\fBNone\fP' is used then there can be no modifiers in use during the wheel action. If the field is blank then \fIany\fP modifier will match, so put these last in their window section. .TP \fIMouse Action Input\fP This is the input from the mouse wheel or stick. It is one of the following and \fIonly\fP one: .nf Up Down Left Right Thumb .fi These are self explanatory. If you have trouble use the configurator! .TP \fIKey Action Output\fP Out KeySyms are placed here. See KeySyms section for more on all available KeySyms. Join KeySyms using pipes. Output keys are pressed in order and released, in reverse order, only after all have been pressed, likely making them all combined as in `Control_L|C' which would be a `^C' (control-c) keypress. .LP .B OPTIONAL .br The following options are optional, but to use one you must fill in all the preceding arguments. .TP \fIOutput Repetitions\fP How many times should the Output KeySyms be pressed in a row. Default is 1. .TP \fIDelay Before KeyUp Event\fP How long in microseconds until we release all the Output KeySyms in one Output Repetition. Default is 0. .TP \fIDelay Before Next KeyPress Event\fP How long in microseconds until we press the next the Output KeySyms. Ths delay occurs after the Output KeySyms are released. Default is 0. .LP .SH "IMWHEELRC COMMANDS" Commands start with the `@' character. Commands are as follows: .TP \fB@Exclude\fP Exclude this window from imwheel grabing mouse events. imwheel will ungrab the mouse when these windows are entered and not regrab the mouse until focus is changed to a non-excluded window. This allows the ZAxis button events to pass through normally and mouse grabs to succeed. .br XV and KDE clients need this for the X Windows Method. .br This command has no effect in the GPM Method. The mouse isn't grabbed, nor are ZAxis button events created by the server. .TP \fB@Repeat\fP Repeat the mouse button to the window. This cause a mouse button to be generated in the current window. It does not use XSendEvent so the mouse button presses are indistiguishable from the real thing. This mode is not compatible with the XGrabButtons method of imwheel, otherwise listed as the ZAxis Method in this manpage. .br Motions are mapped as follows: .RS .RS .nf Up is button 4 Down is button 5 Left is button 6 Right is button 7 Thumb1 is button 8 Thumb2 is button 9 .fi .RE .RE .TP \fB@Priority\fP=\fIpriority\fP Using this is allowed in each window/class/resource section. Higher \fIpriority\fP values take precedence over lower ones. Equal priorities on sections make the imwheelrc file parsed from top to bottom to find the first match. Thus \fB@Priority\fP can be used to make the file search for matches out of order, then you dont have to keep the entries in order if you so please. the supplied imwheelrc file contains extensive comments and examples of the \fB@Priority\fP function. .br The default \fIpriority\fP for any new section is 0. The last \fB@Priority\fP command in a section overrides all previous priorities for that section. Thus each section has only one \fIpriority\fP setting in the end. Priorities are kept as an int, thus range from INT_MAX to INT_MIN. (see /usr/include/limits.h for these values on your system) .LP .SH "CONFIGURATION HELPER" IMWheel contains a semi-hidden configuration helper which can be brought up by rolling/sticking up and down a few times in the root window of the X server. Inside this window you can find out possible window names to use in your imwheelrc file. Press on the mini-screen capture to grab another window, including the root window (whole screen). .LP Mouse wheel and stick actions can be grabbed along with active modifier keys on the keyboard. The mouse wheel/stick action is displayed and the X KeySyms are displayed beneath it. All this information can be directly entered into an imwheelrc as desired. .LP IMWheel can be restarted to read in a changed imwheelrc file or the configurator can be canceled causing imwheel to resume oprations without reading the configuration file. To restart imwheel execs itself as called by the user in the first place but adding the \fB-R\fP option to indicate to itself that this is a restarted imwheel. The \fB-R\fP is not for use by the user, as it bypasses some configuration of imwheel. .LP .SH "KEYSYMS" The program expects combinations of keysyms to be used by using pipe(|) characters to combine them together. .LP Example: .RS .nf Alt_R|Shift_R .fi Means right alt \fIand\fP right shift together, not just either one or the other! And not one after the other, they are both pressed at the same time essentially. .RE .LP For FIFO users, it is possible to send a real mouse button event, using the special \fBButton#\fP syntax. An imwheelrc keysym of Button1 would send a real Mouse button 1 (left mouse button) event. Mouse4 is what you'd want for a MouseWheelUp type event. Mouse5 is what you want to MouseWheelDown event. Many applications will understand the meaning of mouse button 4 and 5, but most don't go beyond that. So \fIMouse6 and greater have no "standardized" meaning\fP. The Button# syntax can be combined with regular keysyms, to send keys and mouse buttons at the same time. .LP Example: .RS .nf Shift_L|Button4 - meaning left shift and wheel up. Button5 - meaning wheel down. .fi .RE .LP Other button to imwheel meaniful references: .RS .nf KeySym IMWheel Input Real Mouse ------ ------------- ---------- Button1 (none) Left Mouse Button Button2 (none) Middle Mouse Button Button3 (none) Right Mouse Button Button4 Up Mouse Wheel Up Button5 Down Mouse Wheel Down Button6 Left Mouse Wheel Left Button7 Right Mouse Wheel Right Button8 Thumb1 Side Mouse Button 1 (left/up) Button9 Thumb2 Side Mouse Button 2 (right/down) .ni .RE .LP Common Modifier Keysym names used in X: .nf Shift_L Shift_R Control_L Control_R Alt_L Alt_R .fi .LP These are probably not currently assigned any keys, unless you \fIxmodmap\fP them in: .LP .nf Meta_L Meta_R (Actually, Sun keyboards have this...) Super_L Super_R Hyper_L Hyper_R .fi .LP And here's some that you may use, and they are \fIsomewhere\fP on your keyboard:Here's where they were on my keyboard, again, this is not universal. Use the \fIxev\fP program to test your own keys on your keyboard! .LP .nf Caps_Lock = The Caps Lock key! (This still turns on and off caps lock!) Num_Lock = The Num Lock key! (This is not good to use... for the same reasons as Caps_Lock) Multi_key = The Scroll Lock key! (Go figure!) Mode_switch = Right Alt...for me anyways. (This mean I cannot use Alt_R) .fi The windows keys may not be assigned any KeySyms, but they will have numbers. \fIxmodmap\fP can be used to assign them to a real KeySym. .LP To find keysym names for any keys available see the \fB/usr/include/X11/keysymdef.h\fP file, and for any define in that file remove the "XK_" for the usable KeySym name in the configuration file. The path to this file may differ for you. .LP Remember, there's always the configurator. And \fBxev\fP will also help here too! .LP .SH "WHEEL OR STICK AS MIDDLE BUTTON IN X" Configure the XF86Config without "Emulate3Buttons" and increase "Buttons" if it is 2 in the Ponter or InputDevice section. The wheel or stick will act as a real middle button and the outer two buttons will act as separate buttons (1 and 3), even when pressed together. .LP Of course if your wheel keeps clicking middle button while you're trying to use the wheel you may want to activate the Emulate3Buttons option to disable the wheel button! And donn't forget to reduce the Buttons argument to 2! .LP .SH "LEFTY BUTTON MAPPING IN X WINDOWS" For those of you lefties out there using method #1, the non-gpm method this command may help you get the buttons set up correctly in XWindows for both left handed and imwheel use. .LP .RS .nf xmodmap -e "pointer = 3 2 1 4 5" \fIor\fP xmodmap -e "pointer = 3 2 1 4 5 6 7" \fIetc...\fP xmodmap -e "pointer = 3 2 1 4 5 6 7 8 9" NOTE: most of these are NOT going to work, because of all the limits in X. .fi .RE .LP add more numbers to the end of this line if you have more buttons! .LP .SH "BUGS" Of course...but most of the time it's just that you haven't read everything I've written here and in the files of the distribution itself. Even then, you may be giving up too easily. Keep trying, it's not that hard. I am always working on reducing strange behavior. This is still a beta, as indicated by the leading 0 in the version number. .LP .B Real Bugs .LP imwheel doesn't get along with itself on the same X display or using the same gpmwheel FIFO. - This will always be your fault :-/ .LP Stick mice are still a pain in the butt to use. - This is the manufacturer's fault. Or X Windows fault, for not having a method to easily use such devices in all applications. .LP Keyboard focus isn't changed automatically to input keys into Window mouse is over. This only occurs with Click-to-Focus type focus managment in window managers. I use sloppy focus in fvwm2, which always works for me. - Whose fault \fIis\fP this? (Switch focus modes and/or window managers, or try the \fB-f\fP option on imwheel) .LP Configuration file is not validated for correctness nicely...although it does get preparsed before the main program starts, thus stopping you before you run with an invalid configuration file. I just have never made a bad configuration file, so I guess I'll have to try and do that to see what happens. Just don't make any mistakes and you'll be fine. - This is my fault?! ;) .LP .SH "HOMEPAGE" .nf http://jonatkins.org/imwheel .fi .LP .SH "AUTHOR" Jonathan Atkins .LP .SH "FILES" .nf $HOME/.imwheelrc The users configuration file. /etc/X11/imwheel/imwheelrc The global location for the configuration file, it is always loaded. Overided by the users configuration file. /dev/gpmwheel The default wheel FIFO from gpm, if used. /dev/jam_imwheel:0.0 (or other numbers...) A wheel FIFO from jamd, if used, must be specified. jamd allows more than on FIFO, and thus allows more than one instance of imwheel to be running on the same computer when running imwheel on multiple displays using the Wheel FIFO method. /tmp/imwheel.pid The public area for imwheel's pid file. /var/run/imwheel.pid The private area for imwheel's pid file. .fi .LP .SH "SEE ALSO" .nf \fBjamd(1)\fP Jon Atkins Mouse - a replacement/augmentation for/to gpm. \fBxwheel(1x)\fP The new replacement for imwheel. Uses jamd instead of gpm or ZAxis. (may not be available yet) \fBxdpyinfo(1x)\fP X Display information, including extensions. \fBgpm(8)\fP General Purpose Mouse, imwheel edition required. \fBFvwmIdent(1x)\fP FVWM2's Identify module, for probing windows. \fBregex(7)\fP POSIX 1003.2 Regular Expressions. \fBxmodmap(1x)\fP Utility for modifying keymap & button mappings in X. \fBxev(1x)\fP Print contents of X events. \fB/usr/include/X11/keysymdef.h\fP X11 KeySym definitions. \fB/usr/include/limits.h\fP INT_MIN and INT_MAX definitions. .fi imwheel-1.0.0pre12.orig/imwheel.c0000644000175000017500000004626110114327113017015 0ustar chrischris00000000000000/* Intellimouse Wheel Thinger * Copylefted under the GNU Public License * Author : Jonathan Atkins * PLEASE: contact me if you have any improvements, I will gladly code good ones */ #include #include #include #include #include #ifdef HAVE_SYS_TIME_H #include #endif #include #ifdef HAVE_UNISTD_H #include #endif #include #include #include #include #include #include "util.h" #include "cfg.h" #include "imwheel.h" #include #define HISTORY_LENGTH 3 #define CONFIG_TIME 4 /*----------------------------------------------------------------------------*/ Display *start(char*); void endItAll(Display*); void eventLoop(Display*, char**); void freeAllX(XClassHint*, XModifierKeymap**, char**); int *nullXError(Display*,XErrorEvent*); Stick stick,old_stick; char *emptystr="(no window)"; /*----------------------------------------------------------------------------*/ char *opts="a:b:c4fgiW:dpDKkRrqh?X:t:vxs:"; const struct option options[]= { /*{name, need/opt_arg, flag, val}*/ {"auto-repeat", 1, 0, 'a'}, {"buttons", 1, 0, 'b'}, {"config", 0, 0, 'c'}, {"debug", 0, 0, 'D'}, {"detach", 0, 0, 'd'}, {"display", 1, 0, 'X'}, {"flip-buttons", 0, 0, '4'}, {"focus", 0, 0, 'f'}, {"focus-events", 0, 0, 'g'}, {"help", 0, 0, 'h'}, {"key-defaults", 0, 0, 'K'}, {"kill", 0, 0, 'k'}, {"pid", 0, 0, 'p'}, //{"restart", 0, 0, 'R'}, //not used by users! {"root-window", 0, 0, 'r'}, {"quit", 0, 0, 'q'}, {"sensitivity", 1, 0, 's'}, {"threshhold", 1, 0, 't'}, {"version", 0, 0, 'v'}, {"wheel-fifo", 2, 0, 'W'}, {"transpose", 0, 0, 'x'}, {0, 0, 0, 0} }; const char *optionusage[][2]= { /*{argument name, usage}*/ {"delay-rate", "auto repeat until button release (default=250)"}, //a {"grab-buttons", "Specify up to 6 remappings 0=none (default=456789)"}, //b {NULL, "Open configuration helper window imediately"}, //c {NULL, "Spit out all debugging info (it's a lot!)"}, //D {NULL, "IMWHeel process doesn't detach from terminal"}, //d {"display-name", "Sets X display to use (one per FIFO if FIFO used)"}, //X {NULL, "Swaps buttons 4 and 5 events (same as -b 54"}, //4 {NULL, "Use event subwindow instead of XGetInputFocus"}, //f {NULL, "Disable the use of Focus Events for button grabs"}, //g {NULL, "For this help! Now you know"}, //h {NULL, "Use the old key style default actions"}, //K {NULL, "Kills the running imwheel process"}, //k {NULL, "IMWheel doesn't use or check any pid files"}, //p //{NULL, "RESERVED: used when imwheel reloads itself"}, //R {NULL, "Allow wheeling in the root window (no cfg dialog)"}, //r {NULL, "Don't start imwheel process, after args"}, //q {"sum-min", "Stick devices require this much total movment (w/fifo)"}, //s {"stick-min", "Stick devices require this much pressure (w/fifo)"}, //t {NULL, "Show version info and exit"}, //v {"fifo-path", "Use a GPM fifo instead of XGrabButton"}, //W {NULL, "swap X and Y stick axis (w/fifo)"}, //x {NULL, NULL} }; int buttonFlip=False, useFifo=False, detach=True, quit=False, restart=False, threshhold=0, focusOverride=True, sensitivity=0, transpose=False, handleFocusGrab=True, doConfig=False, root_wheeling=False, autodelay=250, keystyledefaults=0; int fifofd=-1; char *fifoName="/dev/gpmwheel", *displayName=NULL; Bool grabbed; Atom ATOM_NET_WM_NAME, ATOM_UTF8_STRING, ATOM_WM_NAME, ATOM_STRING; /*----------------------------------------------------------------------------*/ int main(int argc, char **argv) { Display *d; getOptions(argc,argv,opts,options); setupstatebits(); if(!displayName) displayName=XDisplayName(NULL); Printf("display=%s\n",displayName); d=start(displayName); Printf("starting loop...\n"); eventLoop(d,argv); Printf("ending...\n"); endItAll(d); return(0); //not reached... } /*----------------------------------------------------------------------------*/ void endItAll(Display *d) { XUngrabButton(d, AnyButton, AnyModifier, DefaultRootWindow(d)); XCloseDisplay(d); } /*----------------------------------------------------------------------------*/ void grabButtons(Display *d, Window w) { int i; if(useFifo) return; Printf("Grab buttons!\n"); grabbed=True; for(i=0;itype=0; if(!useFifo) { //Printf("getInput: XNextEvent...\n"); XNextEvent(d,e); //Printf("getInput: Got XNextEvent.\n"); } else { Printf("getInput: read fifo...\n"); memset(e,0,sizeof(XEvent)); e->xany.display=d; if(!(read(fifofd,&button,1))) { close(fifofd); Printf("getInput: Must reopen the GPM fifo...\n"); openFifo(); return(0); } if(button<0x10) // single button { Printf("getInput: single button=%d\n",button); e->xbutton.button=button; e->type=ButtonPress; } else if(button==0x10) // stick x y are next... { Printf("getInput: stick\n"); // must do more for stick...this at least emu's up and down... Printf("getInput: Stick action, reading x and y values from fifo...\n"); memcpy(&old_stick, &stick, 2); // read in separate bytes, to avoid an incomplete read! if(transpose) { read(fifofd,&stick.y,1); read(fifofd,&stick.x,1); } else { read(fifofd,&stick.x,1); read(fifofd,&stick.y,1); } Printf("getInput: Stick=(%d,%d)\n",stick.x,stick.y); if(sensitivity>0) { // do thresholded summation then test with sensitivity value if(ABS(stick.y)>=threshhold||ABS(stick.x)>=threshhold) { if((stick.x>0 && st_sum_x<0) || (stick.x<0 && st_sum_x>0)) st_sum_x = 0; if((stick.y>0 && st_sum_y<0) || (stick.y<0 && st_sum_y>0)) st_sum_y = 0; st_sum_x += stick.x; st_sum_y += stick.y; if(ABS(st_sum_x) > sensitivity) { e->xbutton.button=(stick.x>0?6:7); e->type=ButtonPress; st_sum_x = 0; } else if(ABS(st_sum_y) > sensitivity) { e->xbutton.button=(stick.y>0?4:5); e->type=ButtonPress; st_sum_y = 0; } } } else // do just threshold testing { /* commented sections here would add time as a factor in the testing * preventing events from being generated too fast for apps to react * to in a feasible manner. This should also be based on the two * delays given in the imwheelrc file for the current application, * but that code cannot be here, and must be added to the code after * the application has been found in the winaction list using findWA. static struct timeval ntv={0,0},otv={0,0}; static unsigned long dt=0; #ifdef HAVE_GETTIMEOFDAY gettimeofday(&ntv,NULL); #endif if(!otv.tv_sec) memcpy(&otv,&ntv,sizeof(struct timeval)); dt=((ntv.tv_sec-otv.tv_sec)*1000000)+(ntv.tv_usec-otv.tv_usec); */ if(((ABS(old_stick.y)=threshhold || ABS(stick.x)>=threshhold) && (stick.x+stick.y!=0)) || !threshhold) /*|| dt<0 || dt>500000*/) { //memcpy(&otv,&ntv,sizeof(struct timeval)); if(ABS(stick.x) <= ABS(stick.y)) /* tend to be up/down... */ { e->xbutton.button=(stick.y>0?4:5); e->type=ButtonPress; } else { e->xbutton.button=(stick.x<0?6:7); e->type=ButtonPress; } } } } } if(e->type==ButtonPress && (isUsedButton(e->xbutton.button) || (!useFifo && grabbed))) { //e->xbutton.button^=buttonFlip; button= buttonIndex(e->xbutton.button); if(buttonxbutton.button= button= button+4; XQueryKeymap(d,km); if(debug) printKeymap(d,km); *xmk=XGetModifierMapping(d); if(debug) printXModifierKeymap(d,*xmk); } else { e->xbutton.button=button=0; e->type=None; } if(handleFocusGrab && e->type==FocusOut && (!useFifo && !grabbed)) { // the focus is leaving the @Exclude´d window, // so we want to grab the buttons again grabButtons(d,0); // we don't need any further events from that window for now // we asked for events during ungrab...below XSelectInput(d, e->xany.window, NoEventMask); } if(e->type==ButtonPress) Printf("getInput: Button=%d\n",button); return(button); } /*----------------------------------------------------------------------------*/ void openCfg(Display *d, char **argv, XModifierKeymap **xmk) { int i; Printf("Going to configuration...\n"); if(!useFifo && grabbed) { ungrabButtons(d,0); ungrabButtons(d,0); } if(cfg(useFifo?fifofd:-1)) { char **nargv=NULL; Printf("Configuration changed...\n"); Printf("Restarting %s...\n",argv[0]); freeAllX(&xch,xmk,&wname); for(i=0;argv[i];i++) { nargv=realloc(nargv,sizeof(signed char*)*(i+3)); if(argv[i][0]=='-' && argv[i][1]!='-') { char *p; while((p=strchr(argv[i],'c'))) memmove(p,p+1,strlen(p)); } if(!strcmp(argv[i],"--config")) { int j; for(j=i;argv[j];j++) argv[j]=argv[j+1]; } nargv[i]=argv[i]; } if(!restart) nargv[i++]=strdup("-R"); nargv[i]=NULL; execvp(nargv[0],nargv); // run me over me! fprintf(stderr,"%s: Restart failed!\n",nargv[0]); perror(argv[0]); exit(1); } if(!useFifo && !grabbed) grabButtons(d,0); if(useFifo) openFifo(); Printf("No change in configuration\n"); } /*----------------------------------------------------------------------------*/ void eventLoop(Display *d, char **argv) { XEvent e; Window pointer_window=0, pointer_rwindow=0; int j; XModifierKeymap *xmk=NULL; signed char km[32],button; struct WinAction *wap=NULL, *ungrabwap=NULL, *grabwap=NULL; Window oldw=0; int isdiffwin; struct {time_t t; int motion;} history[HISTORY_LENGTH]; XSetErrorHandler((XErrorHandler)nullXError); if(doConfig) openCfg(d,argv,&xmk); memset(history,0,sizeof(history)); while(True) { int i; if(!useFifo || !wap || wap->reps) // auto-repeat kinda eats fifo events :( getInput(d,&e,&xmk,km); if(!e.type) continue; button=e.xbutton.button; //get current input window & it's name i=CurrentTime; if(focusOverride || !e.xbutton.subwindow) //not up to ICCCM standards // focusOverride: default is true, so this is the default action XGetInputFocus(d,&e.xbutton.subwindow,&i); else { /* pulled from xwininfo */ Window root,window=e.xbutton.subwindow; int dummyi; unsigned int dummy; if (e.xbutton.subwindow && XGetGeometry (d, e.xbutton.subwindow, &root, &dummyi, &dummyi, &dummy, &dummy, &dummy, &dummy) && window != root) { window = XmuClientWindow (d, e.xbutton.subwindow); } e.xbutton.subwindow = window; i=0; } #ifdef DEBUG if(debug) printXEvent(&e); #endif if(e.xbutton.subwindow) { Window root=0,win=e.xbutton.subwindow; wname=windowName(d,e.xbutton.subwindow); if(!wname) do { Window *kids; int nkids; if(XQueryTree(d,e.xbutton.subwindow,&root,&win,&kids,&nkids)) { if(e.xbutton.subwindow!=win) { e.xbutton.subwindow=win; wname=windowName(d,e.xbutton.subwindow); #ifdef DEBUG if(wname) Printf("Found window name in a parent!\n"); #endif } if(kids) XFree(kids); } Printf("w:%p r:%p ew:%p et:%d\n",win, root, e.xbutton.subwindow, e.type); } while(!wname && root!=win && root); } isdiffwin=(e.xbutton.subwindow!=oldw); oldw=e.xbutton.subwindow; if(e.xbutton.subwindow) XGetClassHint(d,e.xbutton.subwindow,&xch); else { xch.res_name=emptystr; xch.res_class=emptystr; } switch(e.type) // this section preempts unnecessary processing... { case MotionNotify: if(!useFifo && !isdiffwin && !grabbed) continue; case ButtonPress: if(isdiffwin || e.type==ButtonPress) { Printf("ButtonPress:window=%x(%x)\n",e.xbutton.subwindow, e.xbutton.window); if(!e.xbutton.subwindow) { Printf("(null)\n"); wname=NULL; } //Printf("\trevert_to=%d\n",i); // get resource and class names Printf("resource name =\"%s\"\n",xch.res_name); Printf("class name =\"%s\"\n",xch.res_class); } break; } if (!wname) wname = strdup(emptystr); if (!xch.res_name) xch.res_name = strdup(emptystr); if (!xch.res_class) xch.res_class = strdup(emptystr); ungrabwap=0; grabwap=0; if(!useFifo) { if(isdiffwin || e.type==ButtonPress) { ungrabwap=findWA(d,UNGRAB, wname, xch.res_name, xch.res_class, NULL,NULL); if(ungrabwap) grabwap=findWA(d,GRAB, wname, xch.res_name, xch.res_class, NULL,NULL); if(grabwap) { Printf("Action defined for window overrides ungrab command\n"); ungrabwap=0; } } #ifdef DEBUG Printf("useFifo=%d\n",useFifo); Printf("ungrabwap=%p\n",ungrabwap); Printf("grabwap=%p\n",grabwap); Printf("grabbed=%d\n",grabbed); Printf("e.type=%d\n",e.type); #endif if(ungrabwap && grabbed && (e.type==ButtonPress || e.type==FocusIn || !e.type)) e.type=MotionNotify; // force a regrab try if(!ungrabwap && !grabwap && !grabbed && isdiffwin) e.type=MotionNotify; } switch(e.type) // now we actually do something! { case MotionNotify: Printf("MotionNotify\n"); if(!useFifo) { if(grabbed && ungrabwap) { ungrabButtons(d,0); if(handleFocusGrab) { // notify us when the focus leaves this window XSelectInput(d, e.xbutton.subwindow, FocusChangeMask); } } else if(!grabbed) grabButtons(d,0); } break; case ButtonPress: Printf("ButtonPress\n"); XQueryPointer(d,DefaultRootWindow(d),&pointer_rwindow,&pointer_window,&i,&i,&i,&i,&i); // Update history for(i=0;iid,"\\(root\\)")) continue; //no root action defined! } else { for(j=1,i=0;j&&i=NUM_BUTTONS) { Printf("No we aren't because j(%d) is >= NUM_BUTTONS(%d)!\n",j,NUM_BUTTONS); break; } k=statebits[makeModMask(xmk,km)&STATE_MASK]; if(k>=1<= 1<res_name && xch->res_name!=emptystr) { XFree(xch->res_name); xch->res_name=NULL; } if(xch->res_class && xch->res_class!=emptystr) { XFree(xch->res_class); xch->res_class=NULL; } } if(xmk && *xmk) { XFreeModifiermap(*xmk); *xmk=NULL; } if(wname && *wname) { XFree(*wname); *wname=NULL; } } /*----------------------------------------------------------------------------*/ int *nullXError(Display *d, XErrorEvent *e) { signed char errorstr[1024]; grabbed=False; Printf("XError: \n"); Printf("\tserial : %lu\n",e->serial); Printf("\terror_code : %u\n",e->error_code); Printf("\trequest_code: %u\n",e->request_code); Printf("\tminor_code : %u\n",e->minor_code); Printf("\tresourceid : %lu\n",e->resourceid); XGetErrorText(d,e->error_code,errorstr,1024); Printf("\terror string: %s\n",errorstr); return(0); } /*----------------------------------------------------------------------------*/ /* vim:ts=4:shiftwidth=4 "*/ imwheel-1.0.0pre12.orig/imwheel.h0000644000175000017500000000156110114327124017016 0ustar chrischris00000000000000/* IMWheel Header File for more private functions * Copylefted under the Linux GNU Public License * Author : Jonathan Atkins * PLEASE: contact me if you have any improvements, I will gladly code good ones */ #ifndef IMWHEEL_H #define IMWHEEL_H signed char getInput(Display *d, XEvent *e, XModifierKeymap **xmk, signed char km[32]); void grabButtons(Display *d, Window w); void ungrabButtons(Display *d, Window w); void freeAllX(XClassHint *xch, XModifierKeymap **xmk, char **wname); typedef struct { signed char x,y; } Stick; extern const char *optionusage[][2]; extern Bool grabbed; extern int buttonFlip, useFifo, detach, quit, restart, threshhold, focusOverride, sensitivity, transpose, handleFocusGrab, doConfig, root_wheeling, autodelay, keystyledefaults; extern int fifofd; extern char *fifoName, *displayName; extern Stick stick; #endif imwheel-1.0.0pre12.orig/imwheelrc0000644000175000017500000002242410061736135017125 0ustar chrischris00000000000000# IMWheel Configuration file ($HOME/.imwheelrc or /etc/imwheelrc) # (GPL)Jon Atkins # Please read the README and/or imwheel(1) manpage for info # and this is best operated on using vim (as I said: It's crunchy) # # This is only for demonstration of the priority command... # See the other global Exclude command below for the one you want to use! # If this is activated it will only apps that have a lower priority # priority is based first on the priority command, then the position in this # file - the higher the line is in a file the higher in a priority class it is # thus for a default priority you can see that the position in the file is # important, but the priority command CAN appear anywahere in a window's list # of translations, and the priority will be assigned to all translations below # it until either a new window is defined or the priority is set again. # #".*" #@Priority=-1000 #the default priority is zero, higher numbers take precedence #@Exclude #@Repeat # want it to type something? # this would type "Rofl" and press Return in any window #".*" #,Up,Shift_L|R|-R|-Shift_L|O|-O|F|-F|L|-L|Return # This one rule can send button events, as if you used ZAxisMapping "4 5" # Make sure your XF86Config allows for the max buttons needed... # otherwise the events will NOT even be generated... #".*" #, Up, Button4 #, Down, Button5 #, Left, Button6 #, Right, Button7 #, Thumb1, Button6 #, Thumb2, Button7 # alternatively with Button numbers #".*" #, Button4, Button4 #, Button5, Button5 #, Button6, Button6 #, Button7, Button7 #, Button6, Button6 #, Button7, Button7 #Thanks to Mathias Weyland "^mutt.*" None, Up, Up None, Down, Down Control_L, Up, Page_Up Control_L, Down, Page_Down #Thanks to Mathias Weyland "^aterm" None, Up, Shift_L|Page_Up None, Down, Shift_L|Page_Down Control_L, Up, Up Control_L, Down, Down #Thanks to Mathias Weyland "^Xplns" None, Up, Left None, Down, Right Control_L, Up, Up Control_L, Down, Down "^kvt" None, Up, Shift_L|Page_Up None, Down, Shift_L|Page_Down "^Konsole" None, Up, Shift_L|Page_Up None, Down, Shift_L|Page_Down "^XMcd" None, Up, C None, Down, Shift_L|C "^XMMS_Player" Shift_L, Up, Right Shift_L, Down, Left "^XMMS_Playlist" Shift_L, Up, Page_Up Shift_L, Down, Page_Down "^xmms" Alt_L, Up, Z Alt_L, Down, B Control_L, Up, V Control_L, Down, C "^XATITV-GATOS" None, Down, KP_Subtract None, Up, KP_Add "^Xman" None, Down, F Shift_L, Down, 3 None, Up, B "^Gvi(m|ew)" Alt_L, Up, Page_Up Alt_L, Down, Page_Down Shift_L, Up, Control_L|Y Shift_L, Down, Control_L|E #None, Up, Page_Up #None, Down, Page_Down #, Up, Button4 #, Down, Button5 , Left, Shift_L|Left , Right, Shift_L|Right , Thumb1, Shift_L|Left , Thumb2, Shift_L|Right "^VIM" Shift_L, Up, Control_L|Y Shift_L, Down, Control_L|E #None, Up, Page_Up #None, Down, Page_Down "^Eterm" Alt_L, Up, Up Alt_L, Down, Down #Alt_L, Up, Shift_L|Page_Up #Alt_L, Down, Shift_L|Page_Down #"^GnomeTerminal" #@Exclude #@Repeat #None, Up, Shift_L|Page_Up #None, Down, Shift_L|Page_Down "^NXTerm" None, Up, Shift_L|Page_Up None, Down, Shift_L|Page_Down "^rxvt" Alt_L, Up, Shift_L|Page_Up Alt_L, Down, Shift_L|Page_Down "^XTerm" Alt_L, Up, Shift_R|Page_Up Alt_L, Down, Shift_R|Page_Down Alt_L, Left, Control_L|A Alt_L, Right, Control_L|E #Shift_L, Down, Shift_L|1 "^VMware" @Exclude #@Repeat "^Mozilla-bin$" #, Up, Button4 #, Down, Button5 #, Left, Alt_L|Left #, Right, Alt_L|Right # # If you want to scroll by a few lines then uncomment these 4 lines # and comment out the paging 4 lines below these! # Shift_L, Down, Page_Down, 1#, 1000, 1000 Shift_L, Up, Page_Up, 1#, 1000, 1000 #None, Down, Down, 7#, 1000, 1000 #None, Up, Up, 7#, 1000, 1000 # # If you don't like page scrolling then comment these out and uncomment above! # #Shift_L, Down, Down, 7, #Shift_L, Up, Up, 7, #None, Down, Page_Down, 1, #None, Up, Page_Up, 1, # Left/Right & Thumb stuff None, Left, Left, 7, None, Right, Right, 7, None, Thumb1, Down, 7, Shift_L, Thumb1, Up, 7, None, Thumb2, Up, 7, Shift_L, Thumb2, Down, 7, "^Freespace.*" , Up, Y , Down, X , Thumb1, H , Thumb2, R "^SDL_App" #, Up, Button4 #, Down, Button5 , Thumb1, Home #many apps don't understand Button > 5 , Thumb2, End #many apps don't understand Button > 5 # Thanks to shewp "^Opera" #@Repeat # let qt do it None, Down, Down, 4, 100, 100 None, Up, Up, 4, 100, 100 None, Thumb1, Right None, Thumb2, Left "^Netscape.*" , Thumb1, Alt_L|KP_Left , Thumb2, Alt_L|KP_Right #, Up, Button4 #, Down, Button5 "^Netscape" # # If you don't want to scroll by a few lines then comment out these 4 lines # and uncomment the paging 4 lines below these! # Shift_L, Down, Page_Down, 1, 1000, 1000 Shift_L, Up, Page_Up, 1, 1000, 1000 None, Down, Down, 7, 1000, 1000 None, Up, Up, 7, 1000, 1000 # # If you don't like page scrolling then uncomment these # and comment out the 4 lines above! # #Shift_L, Down, Shift_L|Down, 7, 1000, 1000 #Shift_L, Up, Shift_L|Up, 7, 1000, 1000 #None, Down, Page_Down, 1, 1000, 1000 #None, Up, Page_Up, 1, 1000, 1000 # Left/Right & Thumb stuff None, Left, Left, 7, 1000, 1000 None, Right, Right, 7, 1000, 1000 None, Thumb1, Down, 7, 1000, 1000 Shift_L, Thumb1, Up, 7, 1000, 1000 None, Thumb2, Up, 7, 1000, 1000 Shift_L, Thumb2, Down, 7, 1000, 1000 "^Navigator" #Alt_L, Down, Alt_L|Right #Alt_L, Up, Alt_L|Left Alt_L, Down, Right, 10, 1000, 1000 Alt_L, Up, Left, 10, 1000, 1000 # Thanks to Paul J Collins "^emacs" Shift_L, Up, Page_Up Shift_L, Down, Page_Down # you may need Alt instead of Meta.... None, Down, Control_L|Meta_L|Shift_L|parenright None, Up, Control_L|Meta_L|Shift_L|parenleft # Thanks to etienne grossmann "^Xftp" , Down, j , Up, k ".* - Pan$" , Left, Control_L|Button1 , Thumb1, Control_L|Button1 #, Up, Button4 #, Down, Button5 # Thanks to etienne grossmann "^gv[ :]" None, Up, Shift_L|space None, Down, space #"^Event Tester" #@Repeat #@Exclude #, Left, Button6 #, Right, Button7 #, Thumb1, Button8 #, Thumb2, Button9 "^xv grab" @Priority=1 @Exclude "^XV.*" None, Down, Tab None, Up, Delete "^Untitled" # if using wheel fifo, you may switch these. #, Up, Button4 #, Down, Button5 #with these , Up, Page_Up , Down, Page_Down # (end of switch) , Thumb1, Home , Thumb2, End "^No Title" # if using wheel fifo, you may switch these. #, Up, Button4 #, Down, Button5 #with these , Up, Page_Up , Down, Page_Down # (end of switch) , Left, Home , Right, End , Thumb1, Home , Thumb2, End #"\(null\)" # if using wheel fifo, you may want the 2nd group #, Up, Button4 #, Down, Button5 #, Left, Button6 #, Right, Button7 #, Thumb1, Button8 #, Thumb2, Button9 # 2nd group (old keys...) #, Up, Page_Up #, Down, Page_Down #, Left, Home #, Right, End #, Thumb1, Home #, Thumb2, End # (end of switch) # send event to the window manager when in the root window... "\(root\)" , Up, Control_L|N , Down, Control_L|P , Thumb1, Alt_L|Left , Thumb2, Alt_L|Right # # Uncommment the following to exclude by default. # Then you will have to add new apps all the time, but will retain any built-in # wheel functionality contained in some KDE and other newer programs. # This kinda defeats the original purpose of the program! ;) # #".*" #@Priority=-1000 #@Exclude #@Repeat # # These are the defaults, but note that the defaults for the right side of the # keyboard are still handled within the program, unless you add the # combinations desired here. (except for the None modifier of course!) # If this section is deleted then the hardcoded defaults will be used, which # are the same thing. # Modifying these has global effects, but doesn't override what is above. # #".*" #@Priority=-1001 #, Up, Button4 #, Down, Button5 #None, Left, Left #None, Right, Right #None, Up, Page_Up #None, Down, Page_Down #Shift_L, Left, Left #Shift_L, Right, Right #Shift_L, Up, Up #Shift_L, Down, Down # Control_L, Left, Left, 2 # Control_L, Right, Right, 2 # Control_L, Up, Page_Up, 2 # Control_L, Down, Page_Down, 2 #Shift_L|Control_L, Left, Left, 5 #Shift_L|Control_L, Right, Right, 5 #Shift_L|Control_L, Up, Page_Up, 5 #Shift_L|Control_L, Down, Page_Down, 5 # Alt_L, Left, Left, 10 # Alt_L, Right, Right, 10 # Alt_L, Up, Left, 10 # Alt_L, Down, Right, 10 #Shift_L| Alt_L, Left, Left #Shift_L| Alt_L, Right, Right #Shift_L| Alt_L, Up, Left #Shift_L| Alt_L, Down, Right # Control_L|Alt_L, Left, Left. 20 # Control_L|Alt_L, Right, Right. 20 # Control_L|Alt_L, Up, Left. 20 # Control_L|Alt_L, Down, Right. 20 #Shift_L|Control_L|Alt_L, Left, Left, 50 #Shift_L|Control_L|Alt_L, Right, Right, 50 #Shift_L|Control_L|Alt_L, Up, Left, 50 #Shift_L|Control_L|Alt_L, Down, Right, 50 #, Thumb1, Home #, Thumb2, End # vim:ts=4:shiftwidth=4:syntax=sh imwheel-1.0.0pre12.orig/INSTALL0000644000175000017500000001722707203176115016261 0ustar chrischris00000000000000Basic Installation ================== These are generic installation instructions. The `configure' shell script attempts to guess correct values for various system-dependent variables used during compilation. It uses those values to create a `Makefile' in each directory of the package. It may also create one or more `.h' files containing system-dependent definitions. Finally, it creates a shell script `config.status' that you can run in the future to recreate the current configuration, a file `config.cache' that saves the results of its tests to speed up reconfiguring, and a file `config.log' containing compiler output (useful mainly for debugging `configure'). If you need to do unusual things to compile the package, please try to figure out how `configure' could check whether to do them, and mail diffs or instructions to the address given in the `README' so they can be considered for the next release. If at some point `config.cache' contains results you don't want to keep, you may remove or edit it. The file `configure.in' is used to create `configure' by a program called `autoconf'. You only need `configure.in' if you want to change it or regenerate `configure' using a newer version of `autoconf'. The simplest way to compile this package is: 1. `cd' to the directory containing the package's source code and type `./configure' to configure the package for your system. If you're using `csh' on an old version of System V, you might need to type `sh ./configure' instead to prevent `csh' from trying to execute `configure' itself. Running `configure' takes awhile. While running, it prints some messages telling which features it is checking for. 2. Type `make' to compile the package. 3. Optionally, type `make check' to run any self-tests that come with the package. 4. Type `make install' to install the programs and any data files and documentation. 5. You can remove the program binaries and object files from the source code directory by typing `make clean'. To also remove the files that `configure' created (so you can compile the package for a different kind of computer), type `make distclean'. There is also a `make maintainer-clean' target, but that is intended mainly for the package's developers. If you use it, you may have to get all sorts of other programs in order to regenerate files that came with the distribution. Compilers and Options ===================== Some systems require unusual options for compilation or linking that the `configure' script does not know about. You can give `configure' initial values for variables by setting them in the environment. Using a Bourne-compatible shell, you can do that on the command line like this: CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure Or on systems that have the `env' program, you can do it like this: env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure Compiling For Multiple Architectures ==================================== You can compile the package for more than one kind of computer at the same time, by placing the object files for each architecture in their own directory. To do this, you must use a version of `make' that supports the `VPATH' variable, such as GNU `make'. `cd' to the directory where you want the object files and executables to go and run the `configure' script. `configure' automatically checks for the source code in the directory that `configure' is in and in `..'. If you have to use a `make' that does not supports the `VPATH' variable, you have to compile the package for one architecture at a time in the source code directory. After you have installed the package for one architecture, use `make distclean' before reconfiguring for another architecture. Installation Names ================== By default, `make install' will install the package's files in `/usr/local/bin', `/usr/local/man', etc. You can specify an installation prefix other than `/usr/local' by giving `configure' the option `--prefix=PATH'. You can specify separate installation prefixes for architecture-specific files and architecture-independent files. If you give `configure' the option `--exec-prefix=PATH', the package will use PATH as the prefix for installing programs and libraries. Documentation and other data files will still use the regular prefix. In addition, if you use an unusual directory layout you can give options like `--bindir=PATH' to specify different values for particular kinds of files. Run `configure --help' for a list of the directories you can set and what kinds of files go in them. If the package supports it, you can cause programs to be installed with an extra prefix or suffix on their names by giving `configure' the option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. Optional Features ================= Some packages pay attention to `--enable-FEATURE' options to `configure', where FEATURE indicates an optional part of the package. They may also pay attention to `--with-PACKAGE' options, where PACKAGE is something like `gnu-as' or `x' (for the X Window System). The `README' should mention any `--enable-' and `--with-' options that the package recognizes. For packages that use the X Window System, `configure' can usually find the X include and library files automatically, but if it doesn't, you can use the `configure' options `--x-includes=DIR' and `--x-libraries=DIR' to specify their locations. Specifying the System Type ========================== There may be some features `configure' can not figure out automatically, but needs to determine by the type of host the package will run on. Usually `configure' can figure that out, but if it prints a message saying it can not guess the host type, give it the `--host=TYPE' option. TYPE can either be a short name for the system type, such as `sun4', or a canonical name with three fields: CPU-COMPANY-SYSTEM See the file `config.sub' for the possible values of each field. If `config.sub' isn't included in this package, then this package doesn't need to know the host type. If you are building compiler tools for cross-compiling, you can also use the `--target=TYPE' option to select the type of system they will produce code for and the `--build=TYPE' option to select the type of system on which you are compiling the package. Sharing Defaults ================ If you want to set default values for `configure' scripts to share, you can create a site shell script called `config.site' that gives default values for variables like `CC', `cache_file', and `prefix'. `configure' looks for `PREFIX/share/config.site' if it exists, then `PREFIX/etc/config.site' if it exists. Or, you can set the `CONFIG_SITE' environment variable to the location of the site script. A warning: not all `configure' scripts look for a site script. Operation Controls ================== `configure' recognizes the following options to control how it operates. `--cache-file=FILE' Use and save the results of the tests in FILE instead of `./config.cache'. Set FILE to `/dev/null' to disable caching, for debugging `configure'. `--help' Print a summary of the options to `configure', and exit. `--quiet' `--silent' `-q' Do not print messages saying which checks are being made. To suppress all normal output, redirect it to `/dev/null' (any error messages will still be shown). `--srcdir=DIR' Look for the package's source code in directory DIR. Usually `configure' can determine that directory automatically. `--version' Print the version of Autoconf used to generate the `configure' script, and exit. `configure' also accepts some other, not widely useful, options. imwheel-1.0.0pre12.orig/setps2rate.c0000644000175000017500000000037510061736135017464 0ustar chrischris00000000000000#include int main(int argc, char **argv) { char *device="/dev/psaux"; FILE *f; char buf[2]={0xF3, 100}; if(!(f=fopen(device, "w"))) { perror(device); exit(1); } if(argc>1) buf[1]=atoi(argv[1]); fwrite(buf,1,2,f); fclose(f); } imwheel-1.0.0pre12.orig/ChangeLog0000644000175000017500000005651010061736135017000 0ustar chrischris000000000000001.0.0.pre4: "\(root\)" works for non-wheel-fifos, as long as @Exclude isn't used. instead use : "\(root\)" ,Up,Button4 ,Down,Button5 etc... in your imwheelrc. added mid-sequence keyups, put a - befreo the keysym for a keyup like this: ".*" ,Up,Shift_L|R|-R|-Shift_L|O|-O|F|-F|L|-L|Return this will type "Rofl" and press return, in all apps, on wheel up. make sure not to press something twice in a row without releasing it. 1.0.0.pre3: added the --root-window (-r) option, for WM wheeling in the root of the XServer. use pattern "\(root\)" in the imwheelrc file. 1.0.0pre2: added --config (-c) option, open config window at start added Button sending via XTest, use Button# as keysym in imwheelrc. one less error on failing to open an empty filename Thumb1 and Thumb2 (two thumb buttons) (Thumb == Thumb1) README is no longer going to be updated, use the manpage after installation. 1.0.0pre1: updated for gcc3.0 fixed configure dialog for XServer depth >16bits. (please report if the configure dialog still fails for you now) removed ye olde Makefile.unix 0.9.9: Documentation needs updating with the features from this release...argh! Made some more comments in the stderr output...plus hints. Fixed a segfault on freeing a few strings that were not allocated. Added -g option for focus event tracking, so we at least try to regrab whenever the focused (ungrabbed) window is left. this was code from Patrick Reinelt -g toggles it on an off, but it is on by default, as it may help some people out there. pre6 This may be the last update to the 0.9.9, pending any bugs. CVS dirs removed in make dist process... Upgraded GPM to version 1.19.3 and generated the patch as usual. Added Artec UM530P driver (-t um530p) to gpm. This is the imps2 init code without the second half. Thanks to: Vicente Aguilar Fixed some references to O_SYNC for FreeBSD users, who don't have it! Reduced the fontspec in cfg.c to be more forgiving, may avert a SegFault! Added an RPM Source spec file...it might work, I dunno! imwheelrc now installs into /etc for "make install" Added -Igetopt for when included getopt is used. Added a transpose (-x) option to swap the X/Y axis. Useful for S-48 OEM gpm driver, also use -b 54 option... This is for fifo use only, which is working fine in XFree86 4.0.1 Added more sanity checks in configure.in getopt.h missing causes the included one to be used XFree86 only checked for Linux systems Added Linux Touch Panel Drivers for the Fujitsu Lifebook B112/B142 GPM driver to imwheel's gpm (-t b112) Thanks to Harald Hoyer who had the patches for gpm on his site http://parzelle.de/ Added Logitech OEM S-48 & Firstmouse+ to gpm (-t zilog) This works for a Logitech OEM S-48 that I received as a donation Thanks to A. Norman posting his sourcecode! His site is at: http://www.physics.wm.edu/~norman/Mouse_Diag/index.html Added a script to convert the Right-handedly oriented imwheelrc file to Left handed (converts _L to _R in the imwheelrc) It's simple so patterns matching the _L string will be changed to _R watch out for that I suppose...but I haven't seen anything like that in other places of the rc file. The script is called lefty.sh, execute it before "make install" if you are a left handed person or you prefer the right side control keys. pre5 Replaced strsep usage for intel solaris people. Fixed the fact that a missing "(null)" section would cause a segfault. Fixed an UNGRAB(Exclude) handling code error. Optimized the UNGRAB/GRAB search, now we don't go looking for a reason not to UNGRAB all the time! Added --buttons or -b option, whichs allows you to set the button mapping. Default mapping looks like this: "45678" You can limit it to just 4 and 5 by doing: imwheel -b 45 This also allows some people to fix the mapping for weirdo mice ;) Here's a reference table for what the numbers mean: index default button action in imwheel 1 4 Wheel/Stick Up 2 5 Wheel/Stick Down 3 6 Wheel/Stick Left 4 7 Wheel/Stick Right 5 8 Thumb Button So that "imwheel -b 86754" does the following: Button 8 is Wheel/Stick Up to imwheel Button 6 is Wheel/Stick Down to imwheel Button 7 is Wheel/Stick Left to imwheel Button 5 is Wheel/Stick Right to imwheel Button 4 is Thumb Button to imwheel Use xev while NOT running imwheel (run "imwheel -kq" first) to find out what buttons are what on your mouse! Fixed the non-functional Configure Dialog (XGrabButton wasn't working right) pre4 Fixed == tests to = in configure.in, per many complaints. (worked for me ;) Updated gpm to version 1.19.2, people kept asking... pre3 Fixed security bug, where a user may symlink to a file they cannot open as themselves, then get the first line of that file using the debug mode. This could allow the root password of the shadow to be exposed for any user who has access to a set-uid-root imwheel. Apparently Mandrake (and others perhaps) use a suid-root perl script to execute the imwheel program, perhaps meaning to be more safe. In reality I do not install imwheel as root, nor do I actively support it, nor take any responsibility for those who do install it as a suid-root or suid any other user, and who then have a security breach. I'm also happy that my friend, Rob C. Ludwick, pointed the hole out to me, as no-one on the mailing list he saw this being discussed on bothered to write me! Also, about the distros suid perl script jazz...this is the second time you've caused me pain, and I'm bitter, and I have no remorse for you if you shall perish one million deaths through your foolishness of suid-root wrappers. One other note, imwheel already DOES check that any process it is looking to kill is actually an imwheel process. If this needs improvement then somebody send in a patch. I currently consider the possibility impossible. (Yes, I like English!) pre2 Added @Priority to allow for people who want visible control over what is more important than whatever else. See imwheelrc for more. (tested) Fixed the @Exclude bug, where if @Exclude was used with a ".*" regex then all windows were excluded, even those defined in the imwheelrc. The new priority command can help users tell imwheel how much they'd really like to exclude and what doesn't need to be, otherwise position in the imwheelrc is all that makes the difference now. (tested) Fixed the configuration errors, where variables were unquoted and spaces may have freaked m4 and the shell out! pre1 fixed getenv("HOME") type security hole. (tested) inclusion of imwheelrc, but no "make install" installation yet. -------------------------------------------------------------------------------- 0.9.8 finished configure "make dist" handling of unselected stuff. seems to work well for all beta testers (at least 5 people wrote back) pre4 fixed @Exclude (tested myself of course, waiting for feedback) fixed PIDFILE crap from making the configure.in wrongly... hey - I'm still learning autoconfig and friends... ;) pre3 configure (full autoconf, automake, autoheader dealie) updated gpm to version 1.19.0 added -v and --version option, for just the version header of the help there will be NO MORE none gpm releases until gpm includes my patch in the main distribution! configure doesn't play nice doing dual distros... pre2 updated gpm to version 1.18.1 pre1 tfxmms - in gpm - the Serial Trackman FX marble button 4 as stick motion toggle and complete mouse driver. sensitivity option in imwheel - uses a summation of motion after thresholding, to determine when to go! @Repeat command (like @Exclude) in imwheelrc files - resends the button to X this may not work for non-gpm wheelfifo users, who should rather use @Exclude for now. minor code cleanups - no bugfixes there! just making code better looking. -------------------------------------------------------------------------------- 0.9.7 Added --force option to force usage of event data instead of looking for the focused window using XGetInputFocus. This may work better for some window managers than others. In fvwm2 I do not use the force option, whereas in window maker it may be mandatory. I know it's silly but when you use the force option you are using the ICCCM method of grabbing the current client window, whereas the deffault operation uses the original XGetInputFocus method. All you need to know is that if the debug output keeps showing the the window title as null, then toggle this option and it may work correctly. Please report back to me on window managers and whether the force option was required or not to work correctly with imwheel. This method was sparked by Brian Craft . Fixed a bug where if the winid was not being copied into a correctly sized space, therefore causing segfaults when reading an rc like this... ".*\.[pP][dD][fF]" Alt_L,Up,Up Note that the window match string is longer than the keydef line. This is when this bug would rear it's ugly head. It was a dead-in-the-head bug that I'm sorry I ever caused to anyone who suffered while making a customized rc file. I'm just amazed that I never ran into it in my time! This bug was noted by Karoly Segesdi if not by others as well! (But he got me closest to finding the problem by giving me an imwheelrc file that consistently caused a segfault) Fixed a bug where imwheel whould exit when the fifo it was reading for the wheel-fifo method was closed and reopened and then written from the other side (from gpm or jam restarting). Upgraded to gpm-1.18.0 Added marblefx support to gpm from Ric Klaren , untested as I don't have a marblefx. It looked good though! Added Primax CyberNavigator [1] mouse to gpm from Alexios Chouchoulas . This is also untested for the same reason. Added left handers Method#1 xmodmap config sent in from Marc-Aurčle DARCHE to README and manpage. And of course other misc. bugfixes, etc...that I've forgotten over time! -------------------------------------------------------------------------------- 0.9.6 Initial support & drivers (gpm & imwheel) for IBM ScrollPoint Mouse It is the mm+ps2 mouse type in gpm the IBM ScrollPoint PS/2 mouse uses the MouseManPlus Protocol in XFree86 Support for up and down only for now...I must do a bit before other directions are considered! (for stick type mice thingers.) Pressing continuously will only result in one action. Release and press again to scroll another notch. (the regular scroll events come in too fast to be useful yet...) THANKS!!!!! TO Felix Klock for the ScrollPoint Mouse he MAILED ME!!! This driver is due to the initiative and sacrifice of a few bucks to get support for a mouse this guy loves...and from what I've read on newgroups many others also love! Well you owe the possibility of this driver to Bryan for mailing me a mouse to be able to actually hack on the real thing. Now continued support is guaranteed as well! mail your appreciation to Felix S Klock at pnkfelix@mit.edu He paid $23 or so for the mouse plus shipping to me (with normal 32cent stamps no less...due to the effects of the 1cent price increase in stamps I'm sure he was kinda glad to be rid of some of his 32cent stash to make room for the 33cent ones!) Please consider sending him a dollar for his effort since you are reaping the rewards... (and hey send me a dollar! :) Added mdump, a program to dump the mouse port, and anything else you want with a bitwise breakdown and a 3 byte per line dump. Other interpretation is added for assumptions of what may be happening with mouse motions. I used this program to create the mm+ps2 driver for gpm. It is not installed by 'make install' so copy it yourself if you're interested. the first arg on the command-line is taken to be the path of the mouse device, which defaults to /dev/mouse. The second arg is how many bytes to dump per grab. This defaults to 3 but 4 is another common value to try. The third arg is not parsed but if present the first byte will be bit dumped like the rest of the bytes in a packet. You can also use this program to see the MHz speed for your mouse! e.g.: mdump /dev/psaux 4 1 (for imps2 mouse device type) mdump /dev/psaux 3 1 (for ps2/mouseman+ mouse device types) Added to mouse-mode setup programs for the intellimouse and mouseman plus. running these programs sends the right control codes to the mouse to activate the intellimouse or mouseman plus protocol. The intellimouse and mouseman plus both default to ps2 mode. the intellimouse and mouse man plus both support the imps2 protocol. some mouse man plus type mice may not be intellimouse capable, but the IBM scrollpoint was capable of this mode, restricting it to up and down wheel emulation on it's stick. To reset mouse run setps2. setimps2 is for the intellimouse protocol. setmmplus is for the mouseman plus protocol. us getmdt to see the mouse's reponse to the mouse device type probe. The codes I've seen are as follows ( is in hex format): <00> mouseman plus (3 byte packets) <03> intellimouse (4 byte packets) <00> plain ps2 (3 byte packets) when mouse is this, is received also after an Any type codes are ignored mouse responses, usually confirmation of the mouse receiving the controls the program sends it. All these debugging programs default to the /dev/mouse device node unless a path is passed in as the first argument. None of the debugging programs have been tested with serial mice. Fixed a missed regrab of the mouse after the configurator is closed. Pid file is only used if user is using the /dev/gpmwheel FIFO. (Method #2) Killing pids according to pidfile now checks to make sure the process is truely an imwheel process, and only kills it if it is an imwheel process. It also will only kill if using the /dev/gpmwheel FIFO. Imwheel funtions correctly on multiple displays by using the -display option or setting the DISPLAY environment variable (use export/setenv!) Thanks to Arnd Bergmann we now have gpm support for the Knopex Wineasy 4D mouse. And due to his patches and them prompting me to update lotsa code we have support for intellimouse serial, as well as support for sideways actions. This is only available through the FIFO. You must use Method#2 (a variant of which that is) that uses the wheel FIFO as set up by gpm. XWindows cannot handle the 7 buttons correctly, it can only handle 5, which means only up and down will work with Method #1! Added FreeBSD support, see the FREEBSD file for more. It requires no changes to compile and install. Added threshhold option for stick users of method #2 (it requires gpm) Use the -t or --threshhold option to set a threshhold from 0-7. The default is 2, it works well. Added no-middle-button option (-n) to gpm. Use this if you have trouble with unintentional middle button clicks while wheeling/sticking, and you would rather use Emulate3Buttons chording in X (XFree86 at least...) Added conditional compile for gpm-imwheel directory. Added a full manpage. -------------------------------------------------------------------------------- 0.9.5 Finished off configure dialog to spec, it's just a helper, not an editor! Updated gpm to version 1.16.0, now sticking with stable versions. - hopefully I'll get a patch and send it to the gpm team for some integration, thus releasing me from this task... - the gpm library is still untested in the console...should work though! see note in version 0.8 below. Added suid option to "make install" for users other than root to be able to run with a pid file. The default action is yes if nothing is entered at the prompt. I felt that 'yes' had to be the default action to avoid a bunch of newbie email. This doesn't allow users to install imwheel as root, and it's not a security risk. this is for sys-admins, or at least root users to be able to get all their users using the pid file for the daemon and also for them to be able to kill off old daemons started by other users before. Added -p option for no pidfile stuff, be careful though, this allows any user to start imwheel regardless of a previous imwheel process! Added -D for debug output anytime (no recompiling for those bug reports!) - use the -d option to avoid backgrounding the process! Fixed silly free(NULL) crap...(heh, betchyall loved that one!) added rxvt stuff to imwheelrc file. added EMACS file (an email from an avid wheeler! oh, and it's about emacs!) -------------------------------------------------------------------------------- 0.9: Configuration helper almost done. (still need to sample wheel actions!) - use up,down,up in the root window to activate! - all functions in window are fully functional. - restart does restart imwheel and thus reread the rc files - grab windows by clicking the snapshot and then on the desired window - more to come! More options and abilities: - daemon mode -d to NOT detach and daemonize! - kill any existing imwheel -k to kill any existing imwheel as a restart - quit after rc files -q, used best with -k to kill any imwheel process and quit More configuration options: - added 2 separately configurable delays fixes netscape dropping keys! (it must queue only one key...) first delay is the delay between repetitions (keyup->keydown) second delay is the delay between pressing and releasing (keydown->keyup) see the new imwheelrc for the netscape values that work for me! -------------------------------------------------------------------------------- 0.8: Modified gpm 1.15 beta2 for wheel support. I dunno about the gpm user library and wheel stuff, but it may work with GPM_B_UP and GPM_B_DOWN. use the -W (and -w for non-IM mice) for use with "imwheel --wheel-fifo" IMWheel interfaces with /dev/gpmwheel, use the "--wheel-fifo" option, or "-W /dev/gpmwheel", the -- option has /dev/gpmwheel as the default. Don't forget to reconfigure your mouse pointer in XConfig... -------------------------------------------------------------------------------- 0.7: No segfaults! Thank God! New functionality! New Command structure started, and Exclude command added. - Exclude ungrabs mouse for selected windows. More commands may now be added as needed! XV's window grabber was dying because it needed to grab all buttons... - use the line "@Exclude" in an "xv grab" window section. See imwheelrc -------------------------------------------------------------------------------- 0.6: Argh...another bugfix for segfaults...now you don't need an rc file. -------------------------------------------------------------------------------- 0.5: Argh...a bugfix for segfaults...this time it doesn't care about windows that don't have either title, resource, or class names set (leaving them NULL) Thanks for all the positive response and encouragement. Multi-rep scrolling actions can cause less then you expected to happen. - Be patient, it works most of the time. There is no way I can find to fix this, so help may be needed! You will find XSync in use, but I believe that has a minimal effectiveness...makes it work better than before though Moving out of windows and losing focus may cause weird things to happen! - Press and release all modifier keys (alt,ctrl,shift,etc.) to reset input. -------------------------------------------------------------------------------- 0.4: finally! Config file support is added, completing the keyboard config setup. /etc/imwheelrc and/or $HOME/.imwheelrc files are used for configuration. built-ins are still available for unconfigured windows. anybody want to make a client to make configuration a breeze? Contact me! all clients that have keyboard input can be used with configuration! no new options. more code moving, now two files, whopee you say! but it made development easier! got reports that KDE compatabilty has been achieved by v0.3 -------------------------------------------------------------------------------- 0.3: added options engine. added -f or --flip-buttons option to flip behavior, useful for 4 button mice changed engine, now using XTest extension instead of XSendEvent crap. - still grabbing buttons which may be part of the incompatibility with KDE. added other mice that should work as well, according to XFree86 docs. added a grab reset sequence, but it seems to be a nop... - run imwheel again if it dies and leaves your server going funky... cleaned out junk from old engine, new code is cleaner...I think so anyways! XTest extension now required (not checked in code...I may do that) More clients work than ever! Reps for sideways motion (alt-wheel actions) now work in netscape... - only when there are sideways scrollbars - May work everywhere, i dunno! - It works in all tested clients that use cursor left/right keys for actions -------------------------------------------------------------------------------- 0.2: cleaned up exit on bad display opening. changed library directory to X11R6 instead of X11 received confirmation of compatability with Logitech MouseMan+ from: "Markus Martensson" modifier combinations of Shift,Control, and Alt(Meta) changes behavior. repetition of keystrokes still no setup files... still no change in clients... -------------------------------------------------------------------------------- 0.1: first release streamlined version, unused code is compiled out. no setup, hardcoded page up and page down! no exclusion for specific windows either. imwheel-1.0.0pre12.orig/COPYING0000644000175000017500000004324107203176115016256 0ustar chrischris00000000000000 GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 675 Mass Ave, Cambridge, MA 02139, USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) 19yy This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) 19yy name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. imwheel-1.0.0pre12.orig/setimps2.c0000644000175000017500000000302210061736135017126 0ustar chrischris00000000000000#include #include #include #include #include #ifdef HAVE_FCNTL_H #include #endif #include #ifdef HAVE_UNISTD_H #include #endif #include #include char readps2(int fd) { char ch; while(read(fd,&ch,1) && (ch==(char)0xfa || ch==(char)0xaa)) { fprintf(stderr,"<%02X>",ch&0xff); } fprintf(stderr,"[%02X]",ch&0xff); return(ch); } int main(int argc, char **argv) { int fd; char ch, getdevtype=0xf2, disabledev=0xf5, setimps2[6]={0xf3,200,0xf3,100,0xf3,80}, setupmore[7]={0xf6,0xe6,0xf4,0xf3,100,0xe8,3}, resetps2=0xff; if(argc>1) fd=open(argv[1],O_RDWR); else fd=open("/dev/mouse",O_RDWR); fprintf(stderr,"write disable\n"); write(fd,&disabledev,1); tcflush(fd, TCIFLUSH); write(fd,&getdevtype,1); sleep(1); ch=readps2(fd); fprintf(stderr,"device type=%02X(%4d)\n",ch&0xff,ch); write(fd,&resetps2,1); sleep(1); //ch=readps2(fd); //fprintf(stderr,"reset response=%02X(%4d)\n",ch&0xff,ch); fprintf(stderr,"reset complete\n"); tcflush(fd, TCIFLUSH); write(fd,&getdevtype,1); sleep(1); ch=readps2(fd); fprintf(stderr,"device type=%02X(%4d)\n",ch&0xff,ch); write(fd,&setimps2,6); //write(fd,&setupmore,7); tcflush(fd, TCIFLUSH); write(fd,&getdevtype,1); sleep(1); ch=readps2(fd); fprintf(stderr,"device type=%02X(%4d)\n",ch&0xff,ch); tcflush(fd, TCIFLUSH); write(fd,&getdevtype,1); sleep(1); ch=readps2(fd); fprintf(stderr,"device type=%02X(%4d)\n",ch&0xff,ch); close(fd); return(0); }