owl-2.2.2.orig/0000744000175100017510000000000011166672053012544 5ustar eichineichinowl-2.2.2.orig/util.c0000644000175100017510000004737511166672053013707 0ustar eichineichin/* Copyright (c) 2002,2003,2004,2009 James M. Kretchmar * * This file is part of Owl. * * Owl 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 3 of the License, or * (at your option) any later version. * * Owl 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 Owl. If not, see . * * --------------------------------------------------------------- * * As of Owl version 2.1.12 there are patches contributed by * developers of the branched BarnOwl project, Copyright (c) * 2006-2009 The BarnOwl Developers. All rights reserved. */ #include "owl.h" #include #include #include #include #include static const char fileIdent[] = "$Id: util.c,v 1.49 2009/03/29 19:08:14 kretch Exp $"; void sepbar(char *in) { char buff[1024]; WINDOW *sepwin; owl_messagelist *ml; owl_view *v; int x, y, i; char *foo, *appendtosepbar; sepwin=owl_global_get_curs_sepwin(&g); ml=owl_global_get_msglist(&g); v=owl_global_get_current_view(&g); werase(sepwin); wattron(sepwin, A_REVERSE); if (owl_global_is_fancylines(&g)) { whline(sepwin, ACS_HLINE, owl_global_get_cols(&g)); } else { whline(sepwin, '-', owl_global_get_cols(&g)); } if (owl_global_is_sepbar_disable(&g)) { getyx(sepwin, y, x); wmove(sepwin, y, owl_global_get_cols(&g)-1); return; } wmove(sepwin, 0, 2); if (owl_messagelist_get_size(ml)==0) { strcpy(buff, " (-/-) "); } else { snprintf(buff, 1024, " (%i/%i/%i) ", owl_global_get_curmsg(&g)+1, owl_view_get_size(v), owl_messagelist_get_size(ml)); } waddstr(sepwin, buff); foo=owl_view_get_filtname(v); if (strcmp(foo, owl_global_get_view_home(&g))) wattroff(sepwin, A_REVERSE); waddstr(sepwin, " "); waddstr(sepwin, owl_view_get_filtname(v)); waddstr(sepwin, " "); if (strcmp(foo, owl_global_get_view_home(&g))) wattron(sepwin, A_REVERSE); if (owl_mainwin_is_curmsg_truncated(owl_global_get_mainwin(&g))) { getyx(sepwin, y, x); wmove(sepwin, y, x+2); wattron(sepwin, A_BOLD); waddstr(sepwin, " "); wattroff(sepwin, A_BOLD); } i=owl_mainwin_get_last_msg(owl_global_get_mainwin(&g)); if ((i != -1) && (i < owl_view_get_size(v)-1)) { getyx(sepwin, y, x); wmove(sepwin, y, x+2); wattron(sepwin, A_BOLD); waddstr(sepwin, " "); wattroff(sepwin, A_BOLD); } if (owl_global_get_rightshift(&g)>0) { getyx(sepwin, y, x); wmove(sepwin, y, x+2); snprintf(buff, 1024, " right: %i ", owl_global_get_rightshift(&g)); waddstr(sepwin, buff); } if (owl_global_is_zaway(&g) || owl_global_is_aaway(&g)) { getyx(sepwin, y, x); wmove(sepwin, y, x+2); wattron(sepwin, A_BOLD); wattroff(sepwin, A_REVERSE); if (owl_global_is_zaway(&g) && owl_global_is_aaway(&g)) { waddstr(sepwin, " AWAY "); } else if (owl_global_is_zaway(&g)) { waddstr(sepwin, " Z-AWAY "); } else if (owl_global_is_aaway(&g)) { waddstr(sepwin, " A-AWAY "); } wattron(sepwin, A_REVERSE); wattroff(sepwin, A_BOLD); } if (owl_global_get_curmsg_vert_offset(&g)) { getyx(sepwin, y, x); wmove(sepwin, y, x+2); wattron(sepwin, A_BOLD); wattroff(sepwin, A_REVERSE); waddstr(sepwin, " SCROLL "); wattron(sepwin, A_REVERSE); wattroff(sepwin, A_BOLD); } if (in) { getyx(sepwin, y, x); wmove(sepwin, y, x+2); waddstr(sepwin, in); } appendtosepbar = owl_global_get_appendtosepbar(&g); if (appendtosepbar && *appendtosepbar) { getyx(sepwin, y, x); wmove(sepwin, y, x+2); waddstr(sepwin, " "); waddstr(sepwin, owl_global_get_appendtosepbar(&g)); waddstr(sepwin, " "); } getyx(sepwin, y, x); wmove(sepwin, y, owl_global_get_cols(&g)-1); wattroff(sepwin, A_BOLD); wattroff(sepwin, A_REVERSE); wnoutrefresh(sepwin); } void pophandler_quit(int ch) { if (ch=='q') { owl_popwin_close(owl_global_get_popwin(&g)); } } char **atokenize(char *buffer, char *sep, int *i) { /* each element of return must be freed by user */ char **args; char *workbuff, *foo; int done=0, first=1, count=0; workbuff=owl_malloc(strlen(buffer)+1); memcpy(workbuff, buffer, strlen(buffer)+1); args=NULL; while (!done) { if (first) { first=0; foo=(char *)strtok(workbuff, sep); } else { foo=(char *)strtok(NULL, sep); } if (foo==NULL) { done=1; } else { args=(char **)owl_realloc(args, sizeof(char *) * (count+1)); args[count]=owl_malloc(strlen(foo)+1); strcpy(args[count], foo); count++; } } *i=count; owl_free(workbuff); return(args); } char *skiptokens(char *buff, int n) { /* skips n tokens and returns where that would be. * TODO: handle quotes more sanely. */ int inquotes=0; while (*buff && n>0) { while (*buff == ' ') buff++; while (*buff && (inquotes || *buff != ' ')) { if (*buff == '"' || *buff == '\'') inquotes=!inquotes; buff++; } while (*buff == ' ') buff++; n--; } return buff; } /* Return a "nice" version of the path. Tilde expansion is done, and * duplicate slashes are removed. Caller must free the return. */ char *owl_util_makepath(char *in) { int i, j, x; char *out, user[MAXPATHLEN]; struct passwd *pw; out=owl_malloc(MAXPATHLEN+1); out[0]='\0'; j=strlen(in); x=0; for (i=0; ipw_dir); x+=strlen(pw->pw_dir); } } else { /* another user homedir */ int a, b; b=0; for (a=i+1; ipw_dir); x+=strlen(pw->pw_dir); } } } else if (in[i]=='/') { /* check for a double / */ if (i<(j-1) && (in[i+1]=='/')) { /* do nothing */ } else { out[x]=in[i]; x++; } } else { out[x]=in[i]; x++; } } out[x]='\0'; return(out); } void atokenize_free(char **tok, int nels) { int i; for (i=0; i0) { out=owl_sprintf("%i d %2.2i:%2.2i", days, hours, run); } else { out=owl_sprintf(" %2.2i:%2.2i", hours, run); } return(out); } /* return the index of the last char before a change from the first one */ int owl_util_find_trans(char *in, int len) { int i; for (i=1; i -1 && n < size) return p; /* Else try again with more space. */ if (n > -1) /* glibc 2.1 */ size = n+1; /* precisely what is needed */ else /* glibc 2.0 */ size *= 2; /* twice the old size */ if ((p = owl_realloc (p, size)) == NULL) return NULL; } } /* Return the owl color associated with the named color. Return -1 * if the named color is not available */ int owl_util_string_to_color(char *color) { if (!strcasecmp(color, "black")) { return(OWL_COLOR_BLACK); } else if (!strcasecmp(color, "red")) { return(OWL_COLOR_RED); } else if (!strcasecmp(color, "green")) { return(OWL_COLOR_GREEN); } else if (!strcasecmp(color, "yellow")) { return(OWL_COLOR_YELLOW); } else if (!strcasecmp(color, "blue")) { return(OWL_COLOR_BLUE); } else if (!strcasecmp(color, "magenta")) { return(OWL_COLOR_MAGENTA); } else if (!strcasecmp(color, "cyan")) { return(OWL_COLOR_CYAN); } else if (!strcasecmp(color, "white")) { return(OWL_COLOR_WHITE); } else if (!strcasecmp(color, "default")) { return(OWL_COLOR_DEFAULT); } return(-1); } /* Return a string name of the given owl color */ char *owl_util_color_to_string(int color) { if (color==OWL_COLOR_BLACK) return("black"); if (color==OWL_COLOR_RED) return("red"); if (color==OWL_COLOR_GREEN) return("green"); if (color==OWL_COLOR_YELLOW) return("yellow"); if (color==OWL_COLOR_BLUE) return("blue"); if (color==OWL_COLOR_MAGENTA) return("magenta"); if (color==OWL_COLOR_CYAN) return("cyan"); if (color==OWL_COLOR_WHITE) return("white"); if (color==OWL_COLOR_DEFAULT) return("default"); return("Unknown color"); } /* Get the default tty name. Caller must free the return */ char *owl_util_get_default_tty() { char *out, *tmp; if (getenv("DISPLAY")) { out=owl_strdup(getenv("DISPLAY")); } else if ((tmp=ttyname(fileno(stdout)))!=NULL) { out=owl_strdup(tmp); if (!strncmp(out, "/dev/", 5)) { owl_free(out); out=owl_strdup(tmp+5); } } else { out=owl_strdup("unknown"); } return(out); } /* Animation hack */ void owl_hack_animate() { owl_messagelist *ml; owl_message *m; owl_fmtext *fm; char *text, *ptr; int place; /* grab the first message and make sure its id is 0 */ ml=owl_global_get_msglist(&g); m=owl_messagelist_get_element(ml, 0); if (!m) return; if (owl_message_get_id(m)!=0) return; fm=owl_message_get_fmtext(m); text=owl_fmtext_get_text(fm); ptr=strstr(text, "OvO"); if (ptr) { place=ptr-text; owl_fmtext_set_char(fm, place, '-'); owl_fmtext_set_char(fm, place+2, '-'); owl_mainwin_redisplay(owl_global_get_mainwin(&g)); if (owl_popwin_is_active(owl_global_get_popwin(&g))) { owl_popwin_refresh(owl_global_get_popwin(&g)); /* TODO: this is a broken kludge */ if (owl_global_get_viewwin(&g)) { owl_viewwin_redisplay(owl_global_get_viewwin(&g), 0); } } owl_global_set_needrefresh(&g); return; } ptr=strstr(text, "-v-"); if (ptr) { place=ptr-text; owl_fmtext_set_char(fm, place, 'O'); owl_fmtext_set_char(fm, place+2, 'O'); owl_mainwin_redisplay(owl_global_get_mainwin(&g)); if (owl_popwin_is_active(owl_global_get_popwin(&g))) { owl_popwin_refresh(owl_global_get_popwin(&g)); /* TODO: this is a broken kludge */ if (owl_global_get_viewwin(&g)) { owl_viewwin_redisplay(owl_global_get_viewwin(&g), 0); } } owl_global_set_needrefresh(&g); return; } } /* strip leading and trailing new lines. Caller must free the * return. */ char *owl_util_stripnewlines(char *in) { char *tmp, *ptr1, *ptr2, *out; ptr1=tmp=owl_strdup(in); while (ptr1[0]=='\n') { ptr1++; } ptr2=ptr1+strlen(ptr1)-1; while (ptr2>ptr1 && ptr2[0]=='\n') { ptr2[0]='\0'; ptr2--; } out=owl_strdup(ptr1); owl_free(tmp); return(out); } /* Delete the line matching "line" from the named file. If no such * line is found the file is left intact. If backup==1 then create a * backupfile containing the original contents. This is an * inefficient impelementation which reads the entire file into * memory. */ void owl_util_file_deleteline(char *filename, char *line, int backup) { char buff[LINE], *text; char *backupfilename=""; FILE *file, *backupfile=NULL; int size, newline; /* open the file for reading */ file=fopen(filename, "r"); if (!file) { owl_function_error("Error opening file %s", filename); return; } /* open the backup file for writing */ if (backup) { backupfilename=owl_sprintf("%s.backup", filename); backupfile=fopen(backupfilename, "w"); if (!backupfile) { owl_function_error("Error opening file %s for writing", backupfilename); owl_free(backupfilename); fclose(file); return; } } /* we'll read the entire file into memory, minus the line we don't want and * and at the same time create the backup file if necessary */ text=owl_malloc(LINE); strcpy(text, ""); size=LINE; while (fgets(buff, LINE, file)!=NULL) { /* strip the newline */ newline=0; if (buff[strlen(buff)-1]=='\n') { buff[strlen(buff)-1]='\0'; newline=1; } /* if we don't match the line, add to saved text in memory */ if (strcasecmp(buff, line)) { size+=LINE; text=owl_realloc(text, size); strcat(text, buff); if (newline) strcat(text, "\n"); } /* write to backupfile if necessary */ if (backup) { fputs(buff, backupfile); if (newline) fputs("\n", backupfile); } } if (backup) fclose(backupfile); fclose(file); /* now rewrite the original file from memory */ file=fopen(filename, "w"); if (!file) { owl_function_error("WARNING: Error opening %s for writing. Use %s to restore.", filename, backupfilename); owl_function_beep(); } else { fputs(text, file); fclose(file); } if (backup) owl_free(backupfilename); owl_free(text); } /* add the string 'str' to the list 'list' of strings, only if it * is not already present */ void owl_util_list_add_unique_string(owl_list *list, char *str) { int i, j; j=owl_list_get_size(list); for (i=0; ib) return(a); return(b); } int owl_util_min(int a, int b) { if (a start && *end == 'd' && *(end-1) == '.') { end -= 2; } *(end + 1) = 0; return start; } /**************************************************************************/ /************************* REGRESSION TESTS *******************************/ /**************************************************************************/ #ifdef OWL_INCLUDE_REG_TESTS #define FAIL_UNLESS(desc,pred) printf("\t%-4s: %s\n", (pred)?"ok":(numfailed++,"FAIL"), desc) int owl_util_regtest(void) { int numfailed=0; printf("BEGIN testing owl_util\n"); FAIL_UNLESS("owl_util_substitute 1", !strcmp("foo", owl_text_substitute("foo", "", "Y"))); FAIL_UNLESS("owl_text_substitute 2", !strcmp("fYZYZ", owl_text_substitute("foo", "o", "YZ"))); FAIL_UNLESS("owl_text_substitute 3", !strcmp("foo", owl_text_substitute("fYZYZ", "YZ", "o"))); FAIL_UNLESS("owl_text_substitute 4", !strcmp("/u/foo/meep", owl_text_substitute("~/meep", "~", "/u/foo"))); FAIL_UNLESS("skiptokens 1", !strcmp("bar quux", skiptokens("foo bar quux", 1))); FAIL_UNLESS("skiptokens 2", !strcmp("meep", skiptokens("foo 'bar quux' meep", 2))); FAIL_UNLESS("owl_util_uniq 1", !strcmp("foo bar x", owl_util_uniq("foo", "bar x", "-"))); FAIL_UNLESS("owl_util_uniq 2", !strcmp("foo bar x", owl_util_uniq("foo", "bar -y x", "-"))); FAIL_UNLESS("owl_util_uniq 3", !strcmp("meep foo bar", owl_util_uniq("meep foo", "bar foo meep", "-"))); if (numfailed) printf("*** WARNING: failures encountered with owl_util\n"); printf("END testing owl_util (%d failures)\n", numfailed); return(numfailed); } #endif /* OWL_INCLUDE_REG_TESTS */ owl-2.2.2.orig/pair.c0000644000175100017510000000247511166672053013655 0ustar eichineichin/* Copyright (c) 2002,2003,2004,2009 James M. Kretchmar * * This file is part of Owl. * * Owl 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 3 of the License, or * (at your option) any later version. * * Owl 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 Owl. If not, see . * * --------------------------------------------------------------- * * As of Owl version 2.1.12 there are patches contributed by * developers of the branched BarnOwl project, Copyright (c) * 2006-2009 The BarnOwl Developers. All rights reserved. */ #include "owl.h" void owl_pair_create(owl_pair *p, void *key, void *value) { p->key=key; p->value=value; } void owl_pair_set_key(owl_pair *p, void *key) { p->key=key; } void owl_pair_set_value(owl_pair *p, void *value) { p->value=value; } void *owl_pair_get_key(owl_pair *p) { return(p->key); } void *owl_pair_get_value(owl_pair *p) { return(p->value); } owl-2.2.2.orig/context.c0000644000175100017510000000605611166672053014405 0ustar eichineichin/* Copyright (c) 2002,2003,2004,2009 James M. Kretchmar * * This file is part of Owl. * * Owl 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 3 of the License, or * (at your option) any later version. * * Owl 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 Owl. If not, see . * * --------------------------------------------------------------- * * As of Owl version 2.1.12 there are patches contributed by * developers of the branched BarnOwl project, Copyright (c) * 2006-2009 The BarnOwl Developers. All rights reserved. */ #include #include "owl.h" static const char fileIdent[] = "$Id: context.c,v 1.8 2009/03/29 12:38:20 kretch Exp $"; #define SET_ACTIVE(ctx, new) ctx->mode = ((ctx->mode)&~OWL_CTX_ACTIVE_BITS)|new #define SET_MODE(ctx, new) ctx->mode = ((ctx->mode)&~OWL_CTX_MODE_BITS)|new int owl_context_init(owl_context *ctx) { ctx->mode = OWL_CTX_STARTUP; ctx->data = NULL; return 0; } /* returns whether test matches the current context */ int owl_context_matches(owl_context *ctx, int test) { /*owl_function_debugmsg(", current: 0x%04x test: 0x%04x\n", ctx->mode, test);*/ if ((((ctx->mode&OWL_CTX_MODE_BITS) & test) || !(test&OWL_CTX_MODE_BITS)) && (((ctx->mode&OWL_CTX_ACTIVE_BITS) & test) || !(test&OWL_CTX_ACTIVE_BITS))) { return 1; } else { return 0; } } void *owl_context_get_data(owl_context *ctx) { return ctx->data; } int owl_context_get_mode(owl_context *ctx) { return ctx->mode & OWL_CTX_MODE_BITS; } int owl_context_get_active(owl_context *ctx) { return ctx->mode & OWL_CTX_ACTIVE_BITS; } int owl_context_is_startup(owl_context *ctx) { return (ctx->mode & OWL_CTX_STARTUP)?1:0; } int owl_context_is_interactive(owl_context *ctx) { return(ctx->mode & OWL_CTX_INTERACTIVE)?1:0; } void owl_context_set_startup(owl_context *ctx) { SET_MODE(ctx, OWL_CTX_STARTUP); } void owl_context_set_readconfig(owl_context *ctx) { SET_MODE(ctx, OWL_CTX_READCONFIG); } void owl_context_set_interactive(owl_context *ctx) { SET_MODE(ctx, OWL_CTX_INTERACTIVE); } void owl_context_set_popless(owl_context *ctx, owl_viewwin *vw) { ctx->data = (void*)vw; SET_ACTIVE(ctx, OWL_CTX_POPLESS); } void owl_context_set_recv(owl_context *ctx) { SET_ACTIVE(ctx, OWL_CTX_RECV); } void owl_context_set_editmulti(owl_context *ctx, owl_editwin *ew) { ctx->data = (void*)ew; SET_ACTIVE(ctx, OWL_CTX_EDITMULTI); } void owl_context_set_editline(owl_context *ctx, owl_editwin *ew) { ctx->data = (void*)ew; SET_ACTIVE(ctx, OWL_CTX_EDITLINE); } void owl_context_set_editresponse(owl_context *ctx, owl_editwin *ew) { ctx->data = (void*)ew; SET_ACTIVE(ctx, OWL_CTX_EDITRESPONSE); } owl-2.2.2.orig/config.h.in0000644000175100017510000000643111166672053014575 0ustar eichineichin/* config.h.in. Generated from configure.in by autoheader. */ /* Define to 1 if you have the header file. */ #undef HAVE_COM_ERR_H /* Define to 1 if you have the `des_ecb_encrypt' function. */ #undef HAVE_DES_ECB_ENCRYPT /* have proto for des_ecb_encrypt */ #undef HAVE_DES_ECB_ENCRYPT_PROTO /* Define to 1 if you have the `des_key_sched' function. */ #undef HAVE_DES_KEY_SCHED /* Define to 1 if you have the `des_string_to_key' function. */ #undef HAVE_DES_STRING_TO_KEY /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H /* Define to 1 if you have the `com_err' library (-lcom_err). */ #undef HAVE_LIBCOM_ERR /* Define to 1 if you have the `curses' library (-lcurses). */ #undef HAVE_LIBCURSES /* Define to 1 if you have the `des425' library (-ldes425). */ #undef HAVE_LIBDES425 /* Define to 1 if you have the `k5crypto' library (-lk5crypto). */ #undef HAVE_LIBK5CRYPTO /* Define to 1 if you have the `krb' library (-lkrb). */ #undef HAVE_LIBKRB /* Define to 1 if you have the `krb4' library (-lkrb4). */ #undef HAVE_LIBKRB4 /* Define to 1 if you have the `krb5' library (-lkrb5). */ #undef HAVE_LIBKRB5 /* Define to 1 if you have the `ncurses' library (-lncurses). */ #undef HAVE_LIBNCURSES /* Define to 1 if you have the `nsl' library (-lnsl). */ #undef HAVE_LIBNSL /* Define to 1 if you have the `resolv' library (-lresolv). */ #undef HAVE_LIBRESOLV /* Define to 1 if you have the `socket' library (-lsocket). */ #undef HAVE_LIBSOCKET /* Define to 1 if you have the `ssp' library (-lssp). */ #undef HAVE_LIBSSP /* Define to 1 if you have the `zephyr' library (-lzephyr). */ #undef HAVE_LIBZEPHYR /* Have ZInitLocationInfo */ #undef HAVE_LIBZEPHYR_ZINITLOCATIONINFO /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H /* Define to 1 if you have the `resizeterm' function. */ #undef HAVE_RESIZETERM /* 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 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 header file. */ #undef HAVE_SYS_FILIO_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_IOCTL_H /* 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_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 `use_default_colors' function. */ #undef HAVE_USE_DEFAULT_COLORS /* 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 /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS /* Have terminfo */ #undef TERMINFO owl-2.2.2.orig/COPYING0000644000175100017510000010451311166672053013605 0ustar eichineichin GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The GNU General Public License is a free, copyleft license for software and other kinds of works. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. 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 them 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 prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. 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. Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS 0. Definitions. "This License" refers to version 3 of the GNU General Public License. "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. "The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations. To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work. A "covered work" means either the unmodified Program or a work based on the Program. To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. 1. Source Code. The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work. A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. The Corresponding Source for a work in source code form is that same work. 2. Basic Permissions. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. 3. Protecting Users' Legal Rights From Anti-Circumvention Law. No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. 4. Conveying Verbatim Copies. You may convey 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; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. 5. Conveying Modified Source Versions. You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: a) The work must carry prominent notices stating that you modified it, and giving a relevant date. b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices". c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. 6. Conveying Non-Source Forms. You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. "Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. 7. Additional Terms. "Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or d) Limiting the use for publicity purposes of names of licensors or authors of the material; or e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. 8. Termination. You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. 9. Acceptance Not Required for Having Copies. You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. 10. Automatic Licensing of Downstream Recipients. Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. 11. Patents. A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version". A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. 12. No Surrender of Others' Freedom. If 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 convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. 13. Use with the GNU Affero General Public License. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. 14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of the GNU 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 that a certain numbered version of the GNU General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. 15. Disclaimer of Warranty. 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. 16. Limitation of Liability. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 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. 17. Interpretation of Sections 15 and 16. If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. 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 state 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) 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 3 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, see . Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: Copyright (C) This program 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, your program's commands might be different; for a GUI interface, you would use an "about box". You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see . The GNU 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 Lesser General Public License instead of this License. But first, please read . owl-2.2.2.orig/config.h0000644000175100017510000000676311166672053014200 0ustar eichineichin/* config.h. Generated from config.h.in by configure. */ /* config.h.in. Generated from configure.in by autoheader. */ /* Define to 1 if you have the header file. */ #define HAVE_COM_ERR_H 1 /* Define to 1 if you have the `des_ecb_encrypt' function. */ #define HAVE_DES_ECB_ENCRYPT 1 /* have proto for des_ecb_encrypt */ #define HAVE_DES_ECB_ENCRYPT_PROTO /* Define to 1 if you have the `des_key_sched' function. */ #define HAVE_DES_KEY_SCHED 1 /* Define to 1 if you have the `des_string_to_key' function. */ #define HAVE_DES_STRING_TO_KEY 1 /* Define to 1 if you have the header file. */ #define HAVE_INTTYPES_H 1 /* Define to 1 if you have the `com_err' library (-lcom_err). */ #define HAVE_LIBCOM_ERR 1 /* Define to 1 if you have the `curses' library (-lcurses). */ /* #undef HAVE_LIBCURSES */ /* Define to 1 if you have the `des425' library (-ldes425). */ #define HAVE_LIBDES425 1 /* Define to 1 if you have the `k5crypto' library (-lk5crypto). */ #define HAVE_LIBK5CRYPTO 1 /* Define to 1 if you have the `krb' library (-lkrb). */ /* #undef HAVE_LIBKRB */ /* Define to 1 if you have the `krb4' library (-lkrb4). */ #define HAVE_LIBKRB4 1 /* Define to 1 if you have the `krb5' library (-lkrb5). */ #define HAVE_LIBKRB5 1 /* Define to 1 if you have the `ncurses' library (-lncurses). */ #define HAVE_LIBNCURSES 1 /* Define to 1 if you have the `nsl' library (-lnsl). */ #define HAVE_LIBNSL 1 /* Define to 1 if you have the `resolv' library (-lresolv). */ #define HAVE_LIBRESOLV 1 /* Define to 1 if you have the `socket' library (-lsocket). */ #define HAVE_LIBSOCKET 1 /* Define to 1 if you have the `ssp' library (-lssp). */ /* #undef HAVE_LIBSSP */ /* Define to 1 if you have the `zephyr' library (-lzephyr). */ #define HAVE_LIBZEPHYR 1 /* Have ZInitLocationInfo */ #define HAVE_LIBZEPHYR_ZINITLOCATIONINFO /* Define to 1 if you have the header file. */ #define HAVE_MEMORY_H 1 /* Define to 1 if you have the `resizeterm' function. */ #define HAVE_RESIZETERM 1 /* Define to 1 if you have the header file. */ #define HAVE_STDINT_H 1 /* Define to 1 if you have the header file. */ #define HAVE_STDLIB_H 1 /* Define to 1 if you have the header file. */ #define HAVE_STRINGS_H 1 /* Define to 1 if you have the header file. */ #define HAVE_STRING_H 1 /* Define to 1 if you have the header file. */ #define HAVE_SYS_FILIO_H 1 /* Define to 1 if you have the header file. */ #define HAVE_SYS_IOCTL_H 1 /* Define to 1 if you have the header file. */ #define HAVE_SYS_STAT_H 1 /* Define to 1 if you have the header file. */ #define HAVE_SYS_TYPES_H 1 /* Define to 1 if you have that is POSIX.1 compatible. */ #define HAVE_SYS_WAIT_H 1 /* Define to 1 if you have the header file. */ #define HAVE_UNISTD_H 1 /* Define to 1 if you have the `use_default_colors' function. */ #define HAVE_USE_DEFAULT_COLORS 1 /* Define to the address where bug reports for this package should be sent. */ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ #define PACKAGE_NAME "" /* Define to the full name and version of this package. */ #define PACKAGE_STRING "" /* Define to the one symbol short name of this package. */ #define PACKAGE_TARNAME "" /* Define to the version of this package. */ #define PACKAGE_VERSION "" /* Define to 1 if you have the ANSI C header files. */ /* #undef STDC_HEADERS */ /* Have terminfo */ #define TERMINFO "/usr/share/lib/terminfo" owl-2.2.2.orig/errqueue.c0000644000175100017510000000272711166672053014557 0ustar eichineichin/* Copyright (c) 2002,2003,2004,2009 James M. Kretchmar * * This file is part of Owl. * * Owl 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 3 of the License, or * (at your option) any later version. * * Owl 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 Owl. If not, see . * * --------------------------------------------------------------- * * As of Owl version 2.1.12 there are patches contributed by * developers of the branched BarnOwl project, Copyright (c) * 2006-2009 The BarnOwl Developers. All rights reserved. */ #include "owl.h" void owl_errqueue_init(owl_errqueue *eq) { owl_list_create(&(eq->errlist)); } void owl_errqueue_append_err(owl_errqueue *eq, char *msg) { owl_list_append_element(&(eq->errlist), owl_strdup(msg)); } /* fmtext should already be initialized */ void owl_errqueue_to_fmtext(owl_errqueue *eq, owl_fmtext *fm) { int i, j; j=owl_list_get_size(&(eq->errlist)); for (i=0; ierrlist), i)); owl_fmtext_append_normal(fm, "\n"); } } owl-2.2.2.orig/editwin.c0000644000175100017510000005352111166672053014363 0ustar eichineichin/* Copyright (c) 2002,2003,2004,2009 James M. Kretchmar * * This file is part of Owl. * * Owl 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 3 of the License, or * (at your option) any later version. * * Owl 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 Owl. If not, see . * * --------------------------------------------------------------- * * As of Owl version 2.1.12 there are patches contributed by * developers of the branched BarnOwl project, Copyright (c) * 2006-2009 The BarnOwl Developers. All rights reserved. */ #include "owl.h" #include #include #include #include static const char fileIdent[] = "$Id: editwin.c,v 1.15 2009/03/29 12:38:20 kretch Exp $"; #define INCR 5000 /* initialize the editwin e. * 'win' is an already initialzed curses window that will be used by editwin */ void owl_editwin_init(owl_editwin *e, WINDOW *win, int winlines, int wincols, int style, owl_history *hist) { e->buff=owl_malloc(INCR); e->buff[0]='\0'; e->bufflen=0; e->hist=hist; e->allocated=INCR; e->buffx=0; e->buffy=0; e->topline=0; e->winlines=winlines; e->wincols=wincols; e->fillcol=owl_editwin_limit_maxcols(wincols-1, owl_global_get_edit_maxfillcols(&g)); e->wrapcol=owl_editwin_limit_maxcols(wincols-1, owl_global_get_edit_maxwrapcols(&g)); e->curswin=win; e->style=style; if ((style!=OWL_EDITWIN_STYLE_MULTILINE) && (style!=OWL_EDITWIN_STYLE_ONELINE)) { e->style=OWL_EDITWIN_STYLE_MULTILINE; } e->lock=0; e->dotsend=0; e->echochar='\0'; if (win) werase(win); } void owl_editwin_set_curswin(owl_editwin *e, WINDOW *w, int winlines, int wincols) { e->curswin=w; e->winlines=winlines; e->wincols=wincols; e->fillcol=owl_editwin_limit_maxcols(wincols-1, owl_global_get_edit_maxfillcols(&g)); e->wrapcol=owl_editwin_limit_maxcols(wincols-1, owl_global_get_edit_maxwrapcols(&g)); } /* echo the character 'ch' for each normal character keystroke, * excepting locktext. This is useful for entering passwords etc. If * ch=='\0' characters are echo'd normally */ void owl_editwin_set_echochar(owl_editwin *e, int ch) { e->echochar=ch; } WINDOW *owl_editwin_get_curswin(owl_editwin *e) { return(e->curswin); } void owl_editwin_set_history(owl_editwin *e, owl_history *h) { e->hist=h; } owl_history *owl_editwin_get_history(owl_editwin *e) { return(e->hist); } void owl_editwin_set_dotsend(owl_editwin *e) { e->dotsend=1; } int owl_editwin_limit_maxcols(int v, int maxv) { if (maxv > 5 && v > maxv) { return(maxv); } else { return(v); } } /* set text to be 'locked in' at the beginning of the buffer, any * previous text (including locked text) will be overwritten */ void owl_editwin_set_locktext(owl_editwin *e, char *text) { int x, y; x=e->buffx; y=e->buffy; e->buffx=0; e->buffy=0; owl_editwin_overwrite_string(e, text); e->lock=strlen(text); /* if (text[e->lock-1]=='\n') e->lock--; */ e->buffx=x; e->buffy=y; owl_editwin_adjust_for_locktext(e); owl_editwin_redisplay(e, 0); } int owl_editwin_get_style(owl_editwin *e) { return(e->style); } void owl_editwin_new_style(owl_editwin *e, int newstyle, owl_history *h) { char *ptr; owl_editwin_set_history(e, h); if (e->style==newstyle) return; if (newstyle==OWL_EDITWIN_STYLE_MULTILINE) { e->style=newstyle; } else if (newstyle==OWL_EDITWIN_STYLE_ONELINE) { e->style=newstyle; /* nuke everything after the first line */ if (e->bufflen > 0) { ptr=strchr(e->buff, '\n')-1; if (ptr) { e->bufflen=ptr - e->buff; e->buff[e->bufflen]='\0'; e->buffx=0; e->buffy=0; } } } } /* completly reinitialize the buffer */ void owl_editwin_fullclear(owl_editwin *e) { owl_free(e->buff); owl_editwin_init(e, e->curswin, e->winlines, e->wincols, e->style, e->hist); } /* clear all text except for locktext and put the cursor at the * beginning */ void owl_editwin_clear(owl_editwin *e) { int lock; int dotsend=e->dotsend; char *locktext=NULL; lock=0; if (e->lock > 0) { lock=1; locktext=owl_malloc(e->lock+20); strncpy(locktext, e->buff, e->lock); locktext[e->lock]='\0'; } owl_free(e->buff); owl_editwin_init(e, e->curswin, e->winlines, e->wincols, e->style, e->hist); if (lock > 0) { owl_editwin_set_locktext(e, locktext); } if (dotsend) { owl_editwin_set_dotsend(e); } if (locktext) owl_free(locktext); owl_editwin_adjust_for_locktext(e); } /* malloc more space for the buffer */ void _owl_editwin_addspace(owl_editwin *e) { e->buff=owl_realloc(e->buff, e->allocated+INCR); if (!e->buff) { /* error */ return; } e->allocated+=INCR; } void owl_editwin_recenter(owl_editwin *e) { e->topline=e->buffy-(e->winlines/2); if (e->topline<0) e->topline=0; if (e->topline>owl_editwin_get_numlines(e)) e->topline=owl_editwin_get_numlines(e); } /* regenerate the text on the curses window */ /* if update == 1 then do a doupdate(), otherwise do not */ void owl_editwin_redisplay(owl_editwin *e, int update) { char *ptr1, *ptr2, *ptr3, *buff; int i; werase(e->curswin); wmove(e->curswin, 0, 0); /* start at topline */ ptr1=e->buff; for (i=0; itopline; i++) { ptr2=strchr(ptr1, '\n'); if (!ptr2) { /* we're already on the last line */ break; } ptr1=ptr2+1; } /* ptr1 now stores the starting point */ /* find the ending point and store it in ptr3 */ ptr2=ptr1; ptr3=ptr1; for (i=0; iwinlines; i++) { ptr3=strchr(ptr2, '\n'); if (!ptr3) { /* we've hit the last line */ /* print everything to the end */ ptr3=e->buff+e->bufflen-1; ptr3--; break; } ptr2=ptr3+1; } ptr3+=2; buff=owl_malloc(ptr3-ptr1+50); strncpy(buff, ptr1, ptr3-ptr1); buff[ptr3-ptr1]='\0'; if (e->echochar=='\0') { waddstr(e->curswin, buff); } else { /* translate to echochar, *except* for the locktext */ int len; int dolocklen=e->lock-(ptr1-e->buff); for (i=0; icurswin, buff[i]); } len=strlen(buff); for (i=0; icurswin, e->echochar); } } wmove(e->curswin, e->buffy-e->topline, e->buffx); wnoutrefresh(e->curswin); if (update==1) { doupdate(); } owl_free(buff); } /* linewrap the word just before the cursor. * returns 0 on success * returns -1 if we could not wrap. */ int _owl_editwin_linewrap_word(owl_editwin *e) { int i, z; z=_owl_editwin_get_index_from_xy(e); /* move back and line wrap the previous word */ for (i=z-1; ; i--) { /* move back until you find a space or hit the beginning of the line */ if (e->buff[i]==' ') { /* replace the space with a newline */ e->buff[i]='\n'; e->buffy++; e->buffx=z-i-1; /* were we on the last line */ return(0); } else if (e->buff[i]=='\n' || i<=e->lock) { /* we hit the begginning of the line or the buffer, we cannot * wrap. */ return(-1); } } } /* insert a character at the current point (shift later * characters over) */ void owl_editwin_insert_char(owl_editwin *e, char c) { int z, i, ret; /* \r is \n */ if (c=='\r') { c='\n'; } if (c=='\n' && e->style==OWL_EDITWIN_STYLE_ONELINE) { /* perhaps later this will change some state that allows the string to be read */ return; } /* make sure there is enough memory for the new text */ if ((e->bufflen+1) > (e->allocated-5)) { _owl_editwin_addspace(e); } /* get the insertion point */ z=_owl_editwin_get_index_from_xy(e); /* If we're going to insert at the last column do word wrapping, unless it's a \n */ if ((e->buffx+1==e->wrapcol) && (c!='\n')) { ret=_owl_editwin_linewrap_word(e); if (ret==-1) { /* we couldn't wrap, insert a hard newline instead */ owl_editwin_insert_char(e, '\n'); } } z=_owl_editwin_get_index_from_xy(e); /* shift all the other characters right */ for (i=e->bufflen; i>z; i--) { e->buff[i]=e->buff[i-1]; } /* insert the new one */ e->buff[z]=c; /* housekeeping */ e->bufflen++; e->buff[e->bufflen]='\0'; /* advance the cursor */ if (c=='\n') { e->buffx=0; e->buffy++; } else { e->buffx++; } } /* overwrite the character at the current point with 'c' */ void owl_editwin_overwrite_char(owl_editwin *e, char c) { int z; /* \r is \n */ if (c=='\r') { c='\n'; } if (c=='\n' && e->style==OWL_EDITWIN_STYLE_ONELINE) { /* perhaps later this will change some state that allows the string to be read */ return; } z=_owl_editwin_get_index_from_xy(e); /* only if we are at the end of the buffer do we create new space */ if (z==e->bufflen) { if ((e->bufflen+1) > (e->allocated-5)) { _owl_editwin_addspace(e); } } e->buff[z]=c; /* housekeeping if we are at the end of the buffer */ if (z==e->bufflen) { e->bufflen++; e->buff[e->bufflen]='\0'; } /* advance the cursor */ if (c=='\n') { e->buffx=0; e->buffy++; } else { e->buffx++; } } /* delete the character at the current point, following chars * shift left. */ void owl_editwin_delete_char(owl_editwin *e) { int z, i; if (e->bufflen==0) return; /* get the deletion point */ z=_owl_editwin_get_index_from_xy(e); if (z==e->bufflen) return; for (i=z; ibufflen; i++) { e->buff[i]=e->buff[i+1]; } e->bufflen--; e->buff[e->bufflen]='\0'; } /* Swap the character at point with the character at point-1 and * advance the pointer. If point is at beginning of buffer do * nothing. If point is after the last character swap point-1 with * point-2. (Behaves as observed in tcsh and emacs). */ void owl_editwin_transpose_chars(owl_editwin *e) { int z; char tmp; if (e->bufflen==0) return; /* get the cursor point */ z=_owl_editwin_get_index_from_xy(e); if (z==e->bufflen) { /* point is after last character */ z--; } if (z-1 < e->lock) { /* point is at beginning of buffer, do nothing */ return; } tmp=e->buff[z]; e->buff[z]=e->buff[z-1]; e->buff[z-1]=tmp; owl_editwin_key_right(e); } /* insert 'string' at the current point, later text is shifted * right */ void owl_editwin_insert_string(owl_editwin *e, char *string) { int i, j; j=strlen(string); for (i=0; ibuff for the current cursor * position. */ int _owl_editwin_get_index_from_xy(owl_editwin *e) { int i; char *ptr1, *ptr2; if (e->bufflen==0) return(0); /* first go to the yth line */ ptr1=e->buff; for (i=0; ibuffy; i++) { ptr2=strchr(ptr1, '\n'); if (!ptr2) { /* we're already on the last line */ break; } ptr1=ptr2+1; } /* now go to the xth character */ ptr2=strchr(ptr1, '\n'); if (!ptr2) { ptr2=e->buff+e->bufflen; } if ((ptr2-ptr1) < e->buffx) { ptr1=ptr2-1; } else { ptr1+=e->buffx; } /* printf("DEBUG: index is %i\r\n", ptr1-e->buff); */ return(ptr1-e->buff); } void _owl_editwin_set_xy_by_index(owl_editwin *e, int index) { int z, i; z=_owl_editwin_get_index_from_xy(e); if (index>z) { for (i=0; ilock) { _owl_editwin_set_xy_by_index(e, e->lock); } } void owl_editwin_backspace(owl_editwin *e) { /* delete the char before the current one * and shift later chars left */ if (_owl_editwin_get_index_from_xy(e) > e->lock) { owl_editwin_key_left(e); owl_editwin_delete_char(e); } owl_editwin_adjust_for_locktext(e); } void owl_editwin_key_up(owl_editwin *e) { if (e->buffy > 0) e->buffy--; if (e->buffx >= owl_editwin_get_numchars_on_line(e, e->buffy)) { e->buffx=owl_editwin_get_numchars_on_line(e, e->buffy); } /* do we need to scroll? */ if (e->buffy-e->topline < 0) { e->topline-=e->winlines/2; } owl_editwin_adjust_for_locktext(e); } void owl_editwin_key_down(owl_editwin *e) { /* move down if we can */ if (e->buffy+1 < owl_editwin_get_numlines(e)) e->buffy++; /* if we're past the last character move back */ if (e->buffx >= owl_editwin_get_numchars_on_line(e, e->buffy)) { e->buffx=owl_editwin_get_numchars_on_line(e, e->buffy); } /* do we need to scroll? */ if (e->buffy-e->topline > e->winlines) { e->topline+=e->winlines/2; } /* adjust for locktext */ owl_editwin_adjust_for_locktext(e); } void owl_editwin_key_left(owl_editwin *e) { /* move left if we can, and maybe up a line */ if (e->buffx>0) { e->buffx--; } else if (e->buffy>0) { e->buffy--; e->buffx=owl_editwin_get_numchars_on_line(e, e->buffy); } /* do we need to scroll up? */ if (e->buffy-e->topline < 0) { e->topline-=e->winlines/2; } /* make sure to avoid locktext */ owl_editwin_adjust_for_locktext(e); } void owl_editwin_key_right(owl_editwin *e) { int i; /* move right if we can, and skip down a line if needed */ i=owl_editwin_get_numchars_on_line(e, e->buffy); if (e->buffx < i) { e->buffx++; /* } else if (e->buffy+1 < owl_editwin_get_numlines(e)) { */ } else if (_owl_editwin_get_index_from_xy(e) < e->bufflen) { if (e->style==OWL_EDITWIN_STYLE_MULTILINE) { e->buffx=0; e->buffy++; } } /* do we need to scroll down? */ if (e->buffy-e->topline >= e->winlines) { e->topline+=e->winlines/2; } } void owl_editwin_move_to_nextword(owl_editwin *e) { int i, x; /* if we're starting on a space, find the first non-space */ i=_owl_editwin_get_index_from_xy(e); if (e->buff[i]==' ') { for (x=i; xbufflen; x++) { if (e->buff[x]!=' ' && e->buff[x]!='\n') { _owl_editwin_set_xy_by_index(e, x); break; } } } /* find the next space, newline or end of line and go there, if already at the end of the line, continue on to the next */ i=owl_editwin_get_numchars_on_line(e, e->buffy); if (e->buffx < i) { /* move right till end of line */ while (e->buffx < i) { e->buffx++; if (e->buff[_owl_editwin_get_index_from_xy(e)]==' ') return; if (e->buffx == i) return; } } else if (e->buffx == i) { /* try to move down */ if (e->style==OWL_EDITWIN_STYLE_MULTILINE) { if (e->buffy+1 < owl_editwin_get_numlines(e)) { e->buffx=0; e->buffy++; owl_editwin_move_to_nextword(e); } } } } /* go backwards to the last non-space character */ void owl_editwin_move_to_previousword(owl_editwin *e) { int i, x; /* are we already at the beginning of the word? */ i=_owl_editwin_get_index_from_xy(e); if ( (e->buff[i]!=' ' && e->buff[i]!='\n' && e->buff[i]!='\0') && (e->buff[i-1]==' ' || e->buff[i-1]=='\n') ) { owl_editwin_key_left(e); } /* are we starting on a space character? */ i=_owl_editwin_get_index_from_xy(e); if (e->buff[i]==' ' || e->buff[i]=='\n' || e->buff[i]=='\0') { /* find the first non-space */ for (x=i; x>=e->lock; x--) { if (e->buff[x]!=' ' && e->buff[x]!='\n' && e->buff[x]!='\0') { _owl_editwin_set_xy_by_index(e, x); break; } } } /* find the last non-space */ i=_owl_editwin_get_index_from_xy(e); for (x=i; x>=e->lock; x--) { if (e->buff[x-1]==' ' || e->buff[x-1]=='\n') { _owl_editwin_set_xy_by_index(e, x); break; } } _owl_editwin_set_xy_by_index(e, x); } void owl_editwin_delete_nextword(owl_editwin *e) { int z; if (e->bufflen==0) return; /* if we start out on a space character then gobble all the spaces up first */ while (1) { z=_owl_editwin_get_index_from_xy(e); if (e->buff[z]==' ' || e->buff[z]=='\n') { owl_editwin_delete_char(e); } else { break; } } /* then nuke the next word */ while (1) { z=_owl_editwin_get_index_from_xy(e); /* z == e->bufflen check added to prevent a hang I (nelhage) have seen repeatedly while using owl. I'm not sure precisely what conditions lead to it. */ if (z == e->bufflen || e->buff[z+1]==' ' || e->buff[z+1]=='\n' || e->buff[z+1]=='\0') break; owl_editwin_delete_char(e); } owl_editwin_delete_char(e); } void owl_editwin_delete_previousword(owl_editwin *e) { /* go backwards to the last non-space character, then delete chars */ int i, startpos, endpos; startpos = _owl_editwin_get_index_from_xy(e); owl_editwin_move_to_previousword(e); endpos = _owl_editwin_get_index_from_xy(e); for (i=0; ibuffy)>e->buffx) { /* normal line */ i=_owl_editwin_get_index_from_xy(e); while(i < e->bufflen) { if (e->buff[i]!='\n') { owl_editwin_delete_char(e); } else if ((e->buff[i]=='\n') && (i==e->bufflen-1)) { owl_editwin_delete_char(e); } else { return; } } } else if (e->buffy+1 < owl_editwin_get_numlines(e)) { /* line with cursor at the end but not on very last line */ owl_editwin_key_right(e); owl_editwin_backspace(e); } } void owl_editwin_move_to_line_end(owl_editwin *e) { e->buffx=owl_editwin_get_numchars_on_line(e, e->buffy); } void owl_editwin_move_to_line_start(owl_editwin *e) { e->buffx=0; owl_editwin_adjust_for_locktext(e); } void owl_editwin_move_to_end(owl_editwin *e) { /* go to last char */ e->buffy=owl_editwin_get_numlines(e)-1; e->buffx=owl_editwin_get_numchars_on_line(e, e->buffy); owl_editwin_key_right(e); /* do we need to scroll? */ /* if (e->buffy-e->topline > e->winlines) { e->topline+=e->winlines/2; } */ owl_editwin_recenter(e); } void owl_editwin_move_to_top(owl_editwin *e) { _owl_editwin_set_xy_by_index(e, 0); /* do we need to scroll? */ e->topline=0; owl_editwin_adjust_for_locktext(e); } void owl_editwin_fill_paragraph(owl_editwin *e) { int i, save; /* save our starting point */ save=_owl_editwin_get_index_from_xy(e); /* scan back to the beginning of this paragraph */ for (i=save; i>=e->lock; i--) { if ( (i<=e->lock) || ((e->buff[i]=='\n') && (e->buff[i-1]=='\n'))) { _owl_editwin_set_xy_by_index(e, i+1); break; } } /* main loop */ while (1) { i=_owl_editwin_get_index_from_xy(e); /* bail if we hit the end of the buffer */ if (i>=e->bufflen) break; /* bail if we hit the end of the paragraph */ if (e->buff[i]=='\n' && e->buff[i+1]=='\n') break; /* if we've travelled too far, linewrap */ if ((e->buffx) >= e->fillcol) { _owl_editwin_linewrap_word(e); } /* did we hit the end of a line too soon? */ i=_owl_editwin_get_index_from_xy(e); if (e->buff[i]=='\n' && e->buffxfillcol-1) { /* ********* we need to make sure we don't pull in a word that's too long ***********/ e->buff[i]=' '; } /* fix spacing */ i=_owl_editwin_get_index_from_xy(e); if (e->buff[i]==' ' && e->buff[i+1]==' ') { if (e->buff[i-1]=='.' || e->buff[i-1]=='!' || e->buff[i-1]=='?') { owl_editwin_key_right(e); } else { owl_editwin_delete_char(e); /* if we did this ahead of the save point, adjust it */ if (ibuffy-e->topline < 0) { e->topline-=e->winlines/2; } } /* returns true if only whitespace remains */ int owl_editwin_is_at_end(owl_editwin *e) { int cur=_owl_editwin_get_index_from_xy(e); return (only_whitespace(e->buff+cur)); } int owl_editwin_check_dotsend(owl_editwin *e) { int i; if (!e->dotsend) return(0); for (i=e->bufflen-1; i>0; i--) { if (e->buff[i] == '.' && (e->buff[i-1] == '\n' || e->buff[i-1] == '\r') && (e->buff[i+1] == '\n' || e->buff[i+1] == '\r')) { e->bufflen = i; e->buff[i] = '\0'; return(1); } if (!isspace((int) e->buff[i])) { return(0); } } return(0); } void owl_editwin_post_process_char(owl_editwin *e, int j) { /* check if we need to scroll down */ if (e->buffy-e->topline >= e->winlines) { e->topline+=e->winlines/2; } if ((j==13 || j==10) && owl_editwin_check_dotsend(e)) { owl_command_editmulti_done(e); return; } owl_editwin_redisplay(e, 0); } void owl_editwin_process_char(owl_editwin *e, int j) { if (j == ERR) return; if (j>127 || ((j<32) && (j!=10) && (j!=13))) { return; } else { owl_editwin_insert_char(e, j); } } char *owl_editwin_get_text(owl_editwin *e) { return(e->buff+e->lock); } int owl_editwin_get_numchars_on_line(owl_editwin *e, int line) { int i; char *ptr1, *ptr2; if (e->bufflen==0) return(0); /* first go to the yth line */ ptr1=e->buff; for (i=0; ibuff + e->bufflen - ptr1); } return(ptr2-ptr1); /* don't count the newline for now */ } int owl_editwin_get_numlines(owl_editwin *e) { return(owl_text_num_lines(e->buff)); } owl-2.2.2.orig/regex.c0000644000175100017510000000506311166672053014030 0ustar eichineichin/* Copyright (c) 2002,2003,2004,2009 James M. Kretchmar * * This file is part of Owl. * * Owl 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 3 of the License, or * (at your option) any later version. * * Owl 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 Owl. If not, see . * * --------------------------------------------------------------- * * As of Owl version 2.1.12 there are patches contributed by * developers of the branched BarnOwl project, Copyright (c) * 2006-2009 The BarnOwl Developers. All rights reserved. */ #include #include "owl.h" static const char fileIdent[] = "$Id: regex.c,v 1.8 2009/03/29 19:51:32 kretch Exp $"; void owl_regex_init(owl_regex *re) { re->negate=0; re->string=NULL; } int owl_regex_create(owl_regex *re, char *string) { int ret; char buff1[LINE]; char *ptr; re->string=owl_strdup(string); ptr=string; re->negate=0; if (string[0]=='!') { ptr++; re->negate=1; } /* set the regex */ ret=regcomp(&(re->re), ptr, REG_EXTENDED|REG_ICASE); if (ret) { regerror(ret, NULL, buff1, LINE); owl_function_makemsg("Error in regular expression: %s", buff1); owl_free(re->string); re->string=NULL; return(-1); } return(0); } int owl_regex_create_quoted(owl_regex *re, char *string) { char *quoted; quoted=owl_text_quote(string, OWL_REGEX_QUOTECHARS, OWL_REGEX_QUOTEWITH); owl_regex_create(re, quoted); owl_free(quoted); return(0); } int owl_regex_compare(owl_regex *re, char *string) { int out, ret; /* if the regex is not set we match */ if (!owl_regex_is_set(re)) { return(0); } ret=regexec(&(re->re), string, 0, NULL, 0); out=ret; if (re->negate) { out=!out; } return(out); } int owl_regex_is_set(owl_regex *re) { if (re->string) return(1); return(0); } char *owl_regex_get_string(owl_regex *re) { return(re->string); } void owl_regex_copy(owl_regex *a, owl_regex *b) { b->negate=a->negate; b->string=owl_strdup(a->string); memcpy(&(b->re), &(a->re), sizeof(regex_t)); } void owl_regex_free(owl_regex *re) { if (re->string) owl_free(re->string); /* do we need to free the regular expression? */ } owl-2.2.2.orig/encapsulate.pl0000644000175100017510000000077511166672053015420 0ustar eichineichin#!/usr/bin/perl # # $Id: encapsulate.pl,v 1.1 2003/07/06 22:42:15 nygren Exp $ # my $infile = $ARGV[0] or die "Usage: $0 infile structname"; my $structname = $ARGV[1] or die "Usage: $0 infile structname";; open INF, "<$infile" or die "Unable to open $infile"; print "/* This file was autogenerated from $infile. DO NOT EDIT !!!! */\n\n"; print "char *$structname = \n"; for my $x () { chomp $x; $x =~ s/\\/\\\\/g; $x =~ s/"/\\"/g; print qq( "$x\\n"\n); } print " ;\n"; close INF; owl-2.2.2.orig/configure.in0000644000175100017510000000763311166672053015070 0ustar eichineichindnl $Id: configure.in,v 1.25 2009/03/29 16:03:54 kretch Exp $ dnl Process this file with autoconf to produce a configure script. AC_INIT(owl.c) AC_CONFIG_HEADER(config.h) AC_PROG_CC dnl If we're using GCC, enable all warnings if test "$GCC" = yes; then CFLAGS="$CFLAGS -Wall -g -D_FORTIFY_SOURCE=2"; fi dnl Check for Athena AC_MSG_CHECKING(for /usr/athena/include) if test -d /usr/athena/include; then CFLAGS=${CFLAGS}\ -I/usr/athena/include CPPFLAGS=${CPPFLAGS}\ -I/usr/athena/include AC_MSG_RESULT(yes) else AC_MSG_RESULT(no) fi AC_MSG_CHECKING(for /usr/athena/lib) if test -d /usr/athena/lib; then LDFLAGS=-L/usr/athena/lib\ ${LDFLAGS} AC_MSG_RESULT(yes) else AC_MSG_RESULT(no) fi dnl Check for kerberosIV include AC_MSG_CHECKING(for /usr/include/kerberosIV) if test -d /usr/include/kerberosIV; then CFLAGS=${CFLAGS}\ -I/usr/include/kerberosIV CPPFLAGS=${CPPFLAGS}\ -I/usr/include/kerberosIV AC_MSG_RESULT(yes) else AC_MSG_RESULT(no) fi dnl check for stack-protector PROTECT_CFLAGS=${PROTECT_CFLAGS-"-fstack-protector"} SAVE_CFLAGS=$CFLAGS CFLAGS="$CFLAGS $PROTECT_CFLAGS" AC_MSG_CHECKING(whether protection cflags work) AC_COMPILE_IFELSE(int i;, [AC_MSG_RESULT(yes)], [AC_MSG_RESULT(no) CFLAGS=$SAVE_CFLAGS]) AC_CHECK_LIB(ssp, __stack_chk_guard,,) AC_CHECK_LIB(ncurses, initscr,, AC_CHECK_LIB(curses, initscr,, AC_MSG_ERROR(No curses library found.))) AC_CHECK_LIB(com_err, com_err) AC_CHECK_LIB(nsl, gethostbyname) AC_CHECK_LIB(socket, socket) AC_CHECK_LIB(k5crypto, krb5_derive_key) dnl AC_CHECK_LIB(des425, req_act_vno) AC_CHECK_LIB(des425, des_cbc_encrypt) dnl AC_CHECK_LIB(des, des_quad_cksum) AC_CHECK_LIB(resolv, res_search) AC_CHECK_LIB(krb5, krb5_get_credentials) AC_CHECK_LIB(krb4, krb_sendauth,, AC_CHECK_LIB(krb, krb_sendauth)) dnl AC_CHECK_LIB(zephyr, ZGetSender,, AC_MSG_ERROR(No zephyr library found.)) AC_CHECK_LIB(zephyr, ZGetSender) AC_CHECK_LIB(zephyr, ZInitLocationInfo, AC_DEFINE([HAVE_LIBZEPHYR_ZINITLOCATIONINFO], [], [Have ZInitLocationInfo]),) AC_CHECK_FUNCS(use_default_colors resizeterm des_string_to_key des_key_sched des_ecb_encrypt) AC_MSG_CHECKING(for des_ecb_encrypt prototype) AC_TRY_COMPILE([#include int des_ecb_encrypt(char foo[], char bar[], des_key_schedule baz, int qux);], [int foo = des_ecb_encrypt(0,0,0,0);], ac_cv_des_ecb_encrypt_proto=no, ac_cv_des_ecb_encrypt_proto=yes) AC_MSG_RESULT($ac_cv_des_ecb_encrypt_proto) if test "$ac_cv_des_ecb_encrypt_proto" = yes; then AC_DEFINE([HAVE_DES_ECB_ENCRYPT_PROTO], [], [have proto for des_ecb_encrypt]) fi dnl Checks for header files. AC_HEADER_STDC AC_HEADER_SYS_WAIT AC_CHECK_HEADERS(strings.h sys/ioctl.h sys/filio.h unistd.h com_err.h) dnl Add CFLAGS and LDFLAGS for glib-2.0 PKG_CHECK_MODULES([GLIB],[glib-2.0]) echo Adding glib-2.0 CFLAGS ${GLIB_CFLAGS} CFLAGS="${GLIB_CFLAGS} ${CFLAGS}" echo Adding glib-2.0 LDFLAGS ${GLIB_LIBS} LDFLAGS="${GLIB_LIBS} ${LDFLAGS}" dnl Add CFLAGS for embeded perl FOO=`perl -MExtUtils::Embed -e ccopts` echo Adding perl CFLAGS ${FOO} CFLAGS=${CFLAGS}\ ${FOO} dnl Find the location of perl XSUBPP AC_MSG_CHECKING(for the perl xsubpp precompiler) XSUBPPDIR="`(perl -MExtUtils::MakeMaker -e 'print ExtUtils::MakeMaker->new({NAME => qw(owl)})->tool_xsubpp;') | grep \^XSUBPPDIR | sed -e 's/XSUBPPDIR = //g;'`" if test -n "${XSUBPPDIR}"; then AC_MSG_RESULT(${XSUBPPDIR}) else AC_MSG_ERROR(not found) fi dnl Add LDFLAGS for embeded perl FOO=`perl -MExtUtils::Embed -e ldopts | sed 's/,-E//' | sed 's/-liconv//'` echo Adding perl LDFLAGS ${FOO} LDFLAGS=${LDFLAGS}\ ${FOO} dnl Checks for typedefs, structures, and compiler characteristics. AC_CHECK_FILE(/usr/share/terminfo, AC_DEFINE(TERMINFO, "/usr/share/terminfo", [Have terminfo]), AC_CHECK_FILE(/usr/share/lib/terminfo, AC_DEFINE(TERMINFO, "/usr/share/lib/terminfo", [Have terminfo]), AC_MSG_ERROR(No terminfo found for this system))) AC_SUBST(XSUBPPDIR) AC_PROG_INSTALL AC_CONFIG_SUBDIRS(libfaim) AC_OUTPUT(Makefile) owl-2.2.2.orig/messagelist.c0000644000175100017510000000652711166672053015244 0ustar eichineichin/* Copyright (c) 2002,2003,2004,2009 James M. Kretchmar * * This file is part of Owl. * * Owl 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 3 of the License, or * (at your option) any later version. * * Owl 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 Owl. If not, see . * * --------------------------------------------------------------- * * As of Owl version 2.1.12 there are patches contributed by * developers of the branched BarnOwl project, Copyright (c) * 2006-2009 The BarnOwl Developers. All rights reserved. */ #include "owl.h" #include #include static const char fileIdent[] = "$Id: messagelist.c,v 1.5 2009/03/29 12:38:21 kretch Exp $"; int owl_messagelist_create(owl_messagelist *ml) { owl_list_create(&(ml->list)); return(0); } int owl_messagelist_get_size(owl_messagelist *ml) { return(owl_list_get_size(&(ml->list))); } void *owl_messagelist_get_element(owl_messagelist *ml, int n) { return(owl_list_get_element(&(ml->list), n)); } owl_message *owl_messagelist_get_by_id(owl_messagelist *ml, int target_id) { /* return the message with id == 'id'. If it doesn't exist return NULL. */ int first, last, mid, msg_id; owl_message *m; first = 0; last = owl_list_get_size(&(ml->list)) - 1; while (first <= last) { mid = (first + last) / 2; m = owl_list_get_element(&(ml->list), mid); msg_id = owl_message_get_id(m); if (msg_id == target_id) { return(m); } else if (msg_id < target_id) { first = mid + 1; } else { last = mid - 1; } } return(NULL); } int owl_messagelist_append_element(owl_messagelist *ml, void *element) { return(owl_list_append_element(&(ml->list), element)); } /* do we really still want this? */ int owl_messagelist_delete_element(owl_messagelist *ml, int n) { /* mark a message as deleted */ owl_message_mark_delete(owl_list_get_element(&(ml->list), n)); return(0); } int owl_messagelist_undelete_element(owl_messagelist *ml, int n) { /* mark a message as deleted */ owl_message_unmark_delete(owl_list_get_element(&(ml->list), n)); return(0); } int owl_messagelist_expunge(owl_messagelist *ml) { /* expunge deleted messages */ int i, j; owl_list newlist; owl_message *m; owl_list_create(&newlist); /*create a new list without messages marked as deleted */ j=owl_list_get_size(&(ml->list)); for (i=0; ilist), i); if (owl_message_is_delete(m)) { owl_message_free(m); } else { owl_list_append_element(&newlist, m); } } /* free the old list */ owl_list_free_simple(&(ml->list)); /* copy the new list to the old list */ memcpy(&(ml->list), &newlist, sizeof(owl_list)); return(0); } void owl_messagelist_invalidate_formats(owl_messagelist *ml) { int i, j; owl_message *m; j=owl_list_get_size(&(ml->list)); for (i=0; ilist), i); owl_message_invalidate_format(m); } } owl-2.2.2.orig/mainwin.c0000644000175100017510000001165011166672053014357 0ustar eichineichin/* Copyright (c) 2002,2003,2004,2009 James M. Kretchmar * * This file is part of Owl. * * Owl 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 3 of the License, or * (at your option) any later version. * * Owl 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 Owl. If not, see . * * --------------------------------------------------------------- * * As of Owl version 2.1.12 there are patches contributed by * developers of the branched BarnOwl project, Copyright (c) * 2006-2009 The BarnOwl Developers. All rights reserved. */ #include "owl.h" static const char fileIdent[] = "$Id: mainwin.c,v 1.8 2009/03/29 12:38:21 kretch Exp $"; void owl_mainwin_init(owl_mainwin *mw) { mw->curtruncated=0; mw->lastdisplayed=-1; } void owl_mainwin_redisplay(owl_mainwin *mw) { owl_message *m; int i, p, q, lines, isfull, viewsize; int x, y, savey, recwinlines, start; int topmsg, curmsg, color; WINDOW *recwin; owl_view *v; owl_list *filtlist; owl_filter *f; recwin=owl_global_get_curs_recwin(&g); topmsg=owl_global_get_topmsg(&g); curmsg=owl_global_get_curmsg(&g); v=owl_global_get_current_view(&g); if (v==NULL) { owl_function_debugmsg("Hit a null window in owl_mainwin_redisplay."); return; } werase(recwin); recwinlines=owl_global_get_recwin_lines(&g); topmsg=owl_global_get_topmsg(&g); viewsize=owl_view_get_size(v); /* if there are no messages or if topmsg is past the end of the messages, * just draw a blank screen */ if (viewsize==0 || topmsg>=viewsize) { if (viewsize==0) { owl_global_set_topmsg(&g, 0); } mw->curtruncated=0; mw->lastdisplayed=-1; wnoutrefresh(recwin); owl_global_set_needrefresh(&g); return; } /* write the messages out */ isfull=0; mw->curtruncated=0; mw->lasttruncated=0; for (i=topmsg; i recwinlines) && (i==owl_global_get_curmsg(&g))) mw->curtruncated=1; if (y+lines > recwinlines) mw->lasttruncated=1; if (y+lines > recwinlines-1) { isfull=1; owl_message_curs_waddstr(m, owl_global_get_curs_recwin(&g), start, start+recwinlines-y, owl_global_get_rightshift(&g), owl_global_get_cols(&g)+owl_global_get_rightshift(&g)-1, color); } else { /* otherwise print the whole thing */ owl_message_curs_waddstr(m, owl_global_get_curs_recwin(&g), start, start+lines, owl_global_get_rightshift(&g), owl_global_get_cols(&g)+owl_global_get_rightshift(&g)-1, color); } /* is it the current message and/or deleted? */ getyx(recwin, y, x); wattrset(recwin, A_NORMAL); if (owl_global_get_rightshift(&g)==0) { /* this lame and should be fixed */ if (m==owl_view_get_element(v, curmsg)) { wmove(recwin, savey, 0); wattron(recwin, A_BOLD); if (owl_global_get_curmsg_vert_offset(&g)>0) { waddstr(recwin, "+"); } else { waddstr(recwin, "-"); } if (!owl_message_is_delete(m)) { waddstr(recwin, ">"); } else { waddstr(recwin, "D"); } wmove(recwin, y, x); wattroff(recwin, A_BOLD); } else if (owl_message_is_delete(m)) { wmove(recwin, savey, 0); waddstr(recwin, " D"); wmove(recwin, y, x); } } wattroff(recwin, A_BOLD); } mw->lastdisplayed=i-1; wnoutrefresh(recwin); owl_global_set_needrefresh(&g); } int owl_mainwin_is_curmsg_truncated(owl_mainwin *mw) { if (mw->curtruncated) return(1); return(0); } int owl_mainwin_is_last_msg_truncated(owl_mainwin *mw) { if (mw->lasttruncated) return(1); return(0); } int owl_mainwin_get_last_msg(owl_mainwin *mw) { /* return the number of the last message displayed. -1 if none */ return(mw->lastdisplayed); } owl-2.2.2.orig/message.c0000644000175100017510000005600611166672053014345 0ustar eichineichin/* Copyright (c) 2002,2003,2004,2009 James M. Kretchmar * * This file is part of Owl. * * Owl 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 3 of the License, or * (at your option) any later version. * * Owl 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 Owl. If not, see . * * --------------------------------------------------------------- * * As of Owl version 2.1.12 there are patches contributed by * developers of the branched BarnOwl project, Copyright (c) * 2006-2009 The BarnOwl Developers. All rights reserved. */ #include #include #include #include #include #include #include #include #include #include #include "owl.h" static const char fileIdent[] = "$Id: message.c,v 1.53 2009/04/05 23:36:54 kretch Exp $"; void owl_message_init(owl_message *m) { m->id=owl_global_get_nextmsgid(&g); m->type=OWL_MESSAGE_TYPE_GENERIC; owl_message_set_direction_none(m); m->delete=0; m->hostname=owl_strdup(""); m->zwriteline=NULL; m->invalid_format=1; owl_list_create(&(m->attributes)); /* save the time */ m->time=time(NULL); m->timestr=owl_strdup(ctime(&(m->time))); m->timestr[strlen(m->timestr)-1]='\0'; /* initialize the fmtext */ owl_fmtext_init_null(&(m->fmtext)); } /* add the named attribute to the message. If an attribute with the * name already exists, replace the old value with the new value */ void owl_message_set_attribute(owl_message *m, char *attrname, char *attrvalue) { int i, j; owl_pair *p; /* look for an existing pair with this key, and nuke the entry if found */ j=owl_list_get_size(&(m->attributes)); for (i=0; iattributes), i); if (!strcmp(owl_pair_get_key(p), attrname)) { owl_free(owl_pair_get_key(p)); owl_free(owl_pair_get_value(p)); owl_free(p); owl_list_remove_element(&(m->attributes), i); break; } } p=owl_malloc(sizeof(owl_pair)); owl_pair_create(p, owl_strdup(attrname), owl_strdup(attrvalue)); owl_list_append_element(&(m->attributes), p); } /* return the value associated with the named attribute, or NULL if * the attribute does not exist */ char *owl_message_get_attribute_value(owl_message *m, char *attrname) { int i, j; owl_pair *p; j=owl_list_get_size(&(m->attributes)); for (i=0; iattributes), i); if (!strcmp(owl_pair_get_key(p), attrname)) { return(owl_pair_get_value(p)); } } /* owl_function_debugmsg("No attribute %s found for message %i", attrname, owl_message_get_id(m)); */ return(NULL); } /* We cheat and indent it for now, since we really want this for * the 'info' function. Later there should just be a generic * function to indent fmtext. */ void owl_message_attributes_tofmtext(owl_message *m, owl_fmtext *fm) { int i, j; owl_pair *p; char *buff; owl_fmtext_init_null(fm); j=owl_list_get_size(&(m->attributes)); for (i=0; iattributes), i); buff=owl_sprintf(" %-15.15s: %-35.35s\n", owl_pair_get_key(p), owl_pair_get_value(p)); owl_fmtext_append_normal(fm, buff); owl_free(buff); } } void owl_message_invalidate_format(owl_message *m) { m->invalid_format=1; } owl_fmtext *owl_message_get_fmtext(owl_message *m) { owl_message_format(m); return(&(m->fmtext)); } void owl_message_format(owl_message *m) { owl_style *s; owl_view *v; if (m->invalid_format) { /* for now we assume there's jsut the one view and use that style */ v=owl_global_get_current_view(&g); s=owl_view_get_style(v); owl_fmtext_free(&(m->fmtext)); owl_fmtext_init_null(&(m->fmtext)); owl_style_get_formattext(s, &(m->fmtext), m); m->invalid_format=0; } } void owl_message_set_class(owl_message *m, char *class) { owl_message_set_attribute(m, "class", class); } char *owl_message_get_class(owl_message *m) { char *class; class=owl_message_get_attribute_value(m, "class"); if (!class) return(""); return(class); } void owl_message_set_instance(owl_message *m, char *inst) { owl_message_set_attribute(m, "instance", inst); } char *owl_message_get_instance(owl_message *m) { char *instance; instance=owl_message_get_attribute_value(m, "instance"); if (!instance) return(""); return(instance); } void owl_message_set_sender(owl_message *m, char *sender) { owl_message_set_attribute(m, "sender", sender); } char *owl_message_get_sender(owl_message *m) { char *sender; sender=owl_message_get_attribute_value(m, "sender"); if (!sender) return(""); return(sender); } void owl_message_set_zsig(owl_message *m, char *zsig) { owl_message_set_attribute(m, "zsig", zsig); } char *owl_message_get_zsig(owl_message *m) { char *zsig; zsig=owl_message_get_attribute_value(m, "zsig"); if (!zsig) return(""); return(zsig); } void owl_message_set_recipient(owl_message *m, char *recip) { owl_message_set_attribute(m, "recipient", recip); } char *owl_message_get_recipient(owl_message *m) { /* this is stupid for outgoing messages, we need to fix it. */ char *recip; recip=owl_message_get_attribute_value(m, "recipient"); if (!recip) return(""); return(recip); } void owl_message_set_realm(owl_message *m, char *realm) { owl_message_set_attribute(m, "realm", realm); } char *owl_message_get_realm(owl_message *m) { char *realm; realm=owl_message_get_attribute_value(m, "realm"); if (!realm) return(""); return(realm); } void owl_message_set_body(owl_message *m, char *body) { owl_message_set_attribute(m, "body", body); } char *owl_message_get_body(owl_message *m) { char *body; body=owl_message_get_attribute_value(m, "body"); if (!body) return(""); return(body); } void owl_message_set_opcode(owl_message *m, char *opcode) { owl_message_set_attribute(m, "opcode", opcode); } char *owl_message_get_opcode(owl_message *m) { char *opcode; opcode=owl_message_get_attribute_value(m, "opcode"); if (!opcode) return(""); return(opcode); } void owl_message_set_islogin(owl_message *m) { owl_message_set_attribute(m, "loginout", "login"); } void owl_message_set_islogout(owl_message *m) { owl_message_set_attribute(m, "loginout", "logout"); } int owl_message_is_loginout(owl_message *m) { char *res; res=owl_message_get_attribute_value(m, "loginout"); if (!res) return(0); return(1); } int owl_message_is_login(owl_message *m) { char *res; res=owl_message_get_attribute_value(m, "loginout"); if (!res) return(0); if (!strcmp(res, "login")) return(1); return(0); } int owl_message_is_logout(owl_message *m) { char *res; res=owl_message_get_attribute_value(m, "loginout"); if (!res) return(0); if (!strcmp(res, "logout")) return(1); return(0); } void owl_message_set_isprivate(owl_message *m) { owl_message_set_attribute(m, "isprivate", ""); } int owl_message_is_private(owl_message *m) { char *res; res=owl_message_get_attribute_value(m, "isprivate"); if (!res) return(0); return(1); } char *owl_message_get_timestr(owl_message *m) { if (m->timestr) return(m->timestr); return(""); } /* caller must free the return */ char *owl_message_get_shorttimestr(owl_message *m) { struct tm *tmstruct; char *out; tmstruct=localtime(&(m->time)); out=owl_sprintf("%2.2i:%2.2i", tmstruct->tm_hour, tmstruct->tm_min); if (out) return(out); return("??:??"); } void owl_message_set_type_admin(owl_message *m) { m->type=OWL_MESSAGE_TYPE_ADMIN; } void owl_message_set_type_loopback(owl_message *m) { m->type=OWL_MESSAGE_TYPE_LOOPBACK; } void owl_message_set_type_zephyr(owl_message *m) { m->type=OWL_MESSAGE_TYPE_ZEPHYR; } void owl_message_set_type_aim(owl_message *m) { m->type=OWL_MESSAGE_TYPE_AIM; } int owl_message_is_type_admin(owl_message *m) { if (m->type==OWL_MESSAGE_TYPE_ADMIN) return(1); return(0); } int owl_message_is_type_loopback(owl_message *m) { if (m->type==OWL_MESSAGE_TYPE_LOOPBACK) return(1); return(0); } int owl_message_is_type_zephyr(owl_message *m) { if (m->type==OWL_MESSAGE_TYPE_ZEPHYR) return(1); return(0); } int owl_message_is_type_aim(owl_message *m) { if (m->type==OWL_MESSAGE_TYPE_AIM) return(1); return(0); } int owl_message_is_pseudo(owl_message *m) { if (owl_message_get_attribute_value(m, "pseudo")) return(1); return(0); } int owl_message_is_type_generic(owl_message *m) { if (m->type==OWL_MESSAGE_TYPE_GENERIC) return(1); return(0); } char *owl_message_get_text(owl_message *m) { return(owl_fmtext_get_text(&(m->fmtext))); } void owl_message_set_direction_in(owl_message *m) { m->direction=OWL_MESSAGE_DIRECTION_IN; } void owl_message_set_direction_out(owl_message *m) { m->direction=OWL_MESSAGE_DIRECTION_OUT; } void owl_message_set_direction_none(owl_message *m) { m->direction=OWL_MESSAGE_DIRECTION_NONE; } int owl_message_is_direction_in(owl_message *m) { if (m->direction==OWL_MESSAGE_DIRECTION_IN) return(1); return(0); } int owl_message_is_direction_out(owl_message *m) { if (m->direction==OWL_MESSAGE_DIRECTION_OUT) return(1); return(0); } int owl_message_is_direction_none(owl_message *m) { if (m->direction==OWL_MESSAGE_DIRECTION_NONE) return(1); return(0); } int owl_message_get_numlines(owl_message *m) { if (m == NULL) return(0); owl_message_format(m); return(owl_fmtext_num_lines(&(m->fmtext))); } void owl_message_mark_delete(owl_message *m) { if (m == NULL) return; m->delete=1; } void owl_message_unmark_delete(owl_message *m) { if (m == NULL) return; m->delete=0; } char *owl_message_get_zwriteline(owl_message *m) { if(!m->zwriteline) return ""; return(m->zwriteline); } void owl_message_set_zwriteline(owl_message *m, char *line) { if(m->zwriteline) owl_free(m->zwriteline); m->zwriteline=strdup(line); } int owl_message_is_delete(owl_message *m) { if (m == NULL) return(0); if (m->delete==1) return(1); return(0); } #ifdef HAVE_LIBZEPHYR ZNotice_t *owl_message_get_notice(owl_message *m) { return(&(m->notice)); } #else void *owl_message_get_notice(owl_message *m) { return(NULL); } #endif void owl_message_set_hostname(owl_message *m, char *hostname) { if (m==NULL) return; if (m->hostname!=NULL) { owl_free(m->hostname); } m->hostname=owl_strdup(hostname); } char *owl_message_get_hostname(owl_message *m) { return(m->hostname); } void owl_message_curs_waddstr(owl_message *m, WINDOW *win, int aline, int bline, int acol, int bcol, int color) { owl_fmtext a, b; /* this will ensure that our cached copy is up to date */ owl_message_format(m); owl_fmtext_init_null(&a); owl_fmtext_init_null(&b); owl_fmtext_truncate_lines(&(m->fmtext), aline, bline-aline+1, &a); owl_fmtext_truncate_cols(&a, acol, bcol, &b); if (color!=OWL_COLOR_DEFAULT) { owl_fmtext_colorize(&b, color); } if (owl_global_is_search_active(&g)) { owl_fmtext_search_and_highlight(&b, owl_global_get_search_string(&g)); } owl_fmtext_curs_waddstr(&b, win); owl_fmtext_free(&a); owl_fmtext_free(&b); } int owl_message_is_personal(owl_message *m) { if (owl_message_is_type_zephyr(m)) { if (strcasecmp(owl_message_get_class(m), "message")) return(0); if (strcasecmp(owl_message_get_instance(m), "personal")) return(0); if (!strcasecmp(owl_message_get_recipient(m), owl_zephyr_get_sender()) || !strcasecmp(owl_message_get_sender(m), owl_zephyr_get_sender())) { return(1); } } return(0); } int owl_message_is_from_me(owl_message *m) { if (owl_message_is_type_zephyr(m)) { if (!strcasecmp(owl_message_get_sender(m), owl_zephyr_get_sender())) { return(1); } else { return(0); } } else if (owl_message_is_type_aim(m)) { if (!strcasecmp(owl_message_get_sender(m), owl_global_get_aim_screenname(&g))) { return(1); } else { return(0); } } else if (owl_message_is_type_admin(m)) { return(0); } return(0); } int owl_message_is_mail(owl_message *m) { if (owl_message_is_type_zephyr(m)) { if (!strcasecmp(owl_message_get_class(m), "mail") && owl_message_is_private(m)) { return(1); } else { return(0); } } return(0); } int owl_message_is_ping(owl_message *m) { if (owl_message_is_type_zephyr(m)) { if (!strcasecmp(owl_message_get_opcode(m), "ping")) { return(1); } else { return(0); } } return(0); } int owl_message_is_burningears(owl_message *m) { char *name; int ret; /* if the message is from us or to us, it doesn't count */ if (owl_message_is_from_me(m) || owl_message_is_private(m)) return(0); if (owl_message_is_type_zephyr(m)) { name=short_zuser(owl_zephyr_get_sender()); } else if (owl_message_is_type_aim(m)) { name=owl_strdup(owl_global_get_aim_screenname(&g)); } else { return(0); } if (stristr(owl_message_get_body(m), name)) { ret=1; } else { ret=0; } owl_free(name); return(ret); } /* caller must free return value. */ char *owl_message_get_cc(owl_message *m) { char *cur, *out, *end; cur = owl_message_get_body(m); while (*cur && *cur==' ') cur++; if (strncasecmp(cur, "cc:", 3)) return(NULL); cur+=3; while (*cur && *cur==' ') cur++; out = owl_strdup(cur); end = strchr(out, '\n'); if (end) end[0] = '\0'; return(out); } int owl_message_get_id(owl_message *m) { return(m->id); } char *owl_message_get_type(owl_message *m) { switch (m->type) { case OWL_MESSAGE_TYPE_ADMIN: return("admin"); case OWL_MESSAGE_TYPE_ZEPHYR: return("zephyr"); case OWL_MESSAGE_TYPE_GENERIC: return("generic"); case OWL_MESSAGE_TYPE_AIM: return("aim"); case OWL_MESSAGE_TYPE_JABBER: return("jabber"); case OWL_MESSAGE_TYPE_ICQ: return("icq"); case OWL_MESSAGE_TYPE_YAHOO: return("yahoo"); case OWL_MESSAGE_TYPE_MSN: return("msn"); case OWL_MESSAGE_TYPE_LOOPBACK: return("loopback"); default: return("unknown"); } } char *owl_message_get_direction(owl_message *m) { switch (m->direction) { case OWL_MESSAGE_DIRECTION_IN: return("in"); case OWL_MESSAGE_DIRECTION_OUT: return("out"); case OWL_MESSAGE_DIRECTION_NONE: return("none"); default: return("unknown"); } } char *owl_message_get_login(owl_message *m) { if (owl_message_is_login(m)) { return "login"; } else if (owl_message_is_logout(m)) { return "logout"; } else { return "none"; } } char *owl_message_get_header(owl_message *m) { return owl_message_get_attribute_value(m, "adminheader"); } /* return 1 if the message contains "string", 0 otherwise. This is * case insensitive because the functions it uses are */ int owl_message_search(owl_message *m, char *string) { owl_message_format(m); /* is this necessary? */ return (owl_fmtext_search(&(m->fmtext), string)); } /* if loginout == -1 it's a logout message * 0 it's not a login/logout message * 1 it's a login message */ void owl_message_create_aim(owl_message *m, char *sender, char *recipient, char *text, int direction, int loginout) { owl_message_init(m); owl_message_set_body(m, text); owl_message_set_sender(m, sender); owl_message_set_recipient(m, recipient); owl_message_set_type_aim(m); if (direction==OWL_MESSAGE_DIRECTION_IN) { owl_message_set_direction_in(m); } else if (direction==OWL_MESSAGE_DIRECTION_OUT) { owl_message_set_direction_out(m); } /* for now all messages that aren't loginout are private */ if (!loginout) { owl_message_set_isprivate(m); } if (loginout==-1) { owl_message_set_islogout(m); } else if (loginout==1) { owl_message_set_islogin(m); } } void owl_message_create_admin(owl_message *m, char *header, char *text) { owl_message_init(m); owl_message_set_type_admin(m); owl_message_set_body(m, text); owl_message_set_attribute(m, "adminheader", header); /* just a hack for now */ } /* caller should set the direction */ void owl_message_create_loopback(owl_message *m, char *text) { owl_message_init(m); owl_message_set_type_loopback(m); owl_message_set_body(m, text); owl_message_set_sender(m, "loopsender"); owl_message_set_recipient(m, "looprecip"); owl_message_set_isprivate(m); } #ifdef HAVE_LIBZEPHYR void owl_message_create_from_znotice(owl_message *m, ZNotice_t *n) { struct hostent *hent; char *ptr, *tmp, *tmp2; int len; owl_message_init(m); owl_message_set_type_zephyr(m); owl_message_set_direction_in(m); /* first save the full notice */ memcpy(&(m->notice), n, sizeof(ZNotice_t)); /* a little gross, we'll replace \r's with ' ' for now */ owl_zephyr_hackaway_cr(&(m->notice)); /* save the time, we need to nuke the string saved by message_init */ if (m->timestr) owl_free(m->timestr); m->time=n->z_time.tv_sec; m->timestr=owl_strdup(ctime(&(m->time))); m->timestr[strlen(m->timestr)-1]='\0'; /* set other info */ owl_message_set_sender(m, n->z_sender); owl_message_set_class(m, n->z_class); owl_message_set_instance(m, n->z_class_inst); owl_message_set_recipient(m, n->z_recipient); if (n->z_opcode) { owl_message_set_opcode(m, n->z_opcode); } else { owl_message_set_opcode(m, ""); } owl_message_set_zsig(m, owl_zephyr_get_zsig(n, &len)); if ((ptr=strchr(n->z_recipient, '@'))!=NULL) { owl_message_set_realm(m, ptr+1); } else { owl_message_set_realm(m, owl_zephyr_get_realm()); } /* Set the "isloginout" attribute if it's a login message */ if (!strcasecmp(n->z_class, "login") || !strcasecmp(n->z_class, OWL_WEBZEPHYR_CLASS)) { if (!strcasecmp(n->z_opcode, "user_login") || !strcasecmp(n->z_opcode, "user_logout")) { tmp=owl_zephyr_get_field(n, 1); owl_message_set_attribute(m, "loginhost", tmp); owl_free(tmp); tmp=owl_zephyr_get_field(n, 3); owl_message_set_attribute(m, "logintty", tmp); owl_free(tmp); } if (!strcasecmp(n->z_opcode, "user_login")) { owl_message_set_islogin(m); } else if (!strcasecmp(n->z_opcode, "user_logout")) { owl_message_set_islogout(m); } } /* set the "isprivate" attribute if it's a private zephyr */ if (!strcasecmp(n->z_recipient, owl_zephyr_get_sender())) { owl_message_set_isprivate(m); } /* set the "isauto" attribute if it's an autoreply */ if (!strcasecmp(n->z_message, "Automated reply:") || !strcasecmp(n->z_opcode, "auto")) { owl_message_set_attribute(m, "isauto", ""); } m->zwriteline=strdup(""); /* set the body */ tmp=owl_zephyr_get_message(n); if (owl_global_is_newlinestrip(&g)) { tmp2=owl_util_stripnewlines(tmp); owl_message_set_body(m, tmp2); owl_free(tmp2); } else { owl_message_set_body(m, tmp); } owl_free(tmp); #ifdef OWL_ENABLE_ZCRYPT /* if zcrypt is enabled try to decrypt the message */ if (owl_global_is_zcrypt(&g) && !strcasecmp(n->z_opcode, "crypt")) { char *out; int ret; out=owl_malloc(strlen(owl_message_get_body(m))*16+20); ret=owl_zcrypt_decrypt(out, owl_message_get_body(m), owl_message_get_class(m), owl_message_get_instance(m)); if (ret==0) { owl_message_set_body(m, out); } else { owl_free(out); } } #endif /* save the hostname */ owl_function_debugmsg("About to do gethostbyaddr"); hent=gethostbyaddr((char *) &(n->z_uid.zuid_addr), sizeof(n->z_uid.zuid_addr), AF_INET); if (hent && hent->h_name) { owl_message_set_hostname(m, hent->h_name); } else { owl_message_set_hostname(m, inet_ntoa(n->z_sender_addr)); } } #else void owl_message_create_from_znotice(owl_message *m, void *n) { } #endif /* If 'direction' is '0' it is a login message, '1' is a logout message. */ void owl_message_create_pseudo_zlogin(owl_message *m, int direction, char *user, char *host, char *time, char *tty) { char *longuser, *ptr; #ifdef HAVE_LIBZEPHYR memset(&(m->notice), 0, sizeof(ZNotice_t)); #endif longuser=long_zuser(user); owl_message_init(m); owl_message_set_type_zephyr(m); owl_message_set_direction_in(m); owl_message_set_attribute(m, "pseudo", ""); owl_message_set_attribute(m, "loginhost", host ? host : ""); owl_message_set_attribute(m, "logintty", tty ? tty : ""); owl_message_set_sender(m, longuser); owl_message_set_class(m, "LOGIN"); owl_message_set_instance(m, longuser); owl_message_set_recipient(m, ""); if (direction==0) { owl_message_set_opcode(m, "USER_LOGIN"); owl_message_set_islogin(m); } else if (direction==1) { owl_message_set_opcode(m, "USER_LOGOUT"); owl_message_set_islogout(m); } if ((ptr=strchr(longuser, '@'))!=NULL) { owl_message_set_realm(m, ptr+1); } else { owl_message_set_realm(m, owl_zephyr_get_realm()); } m->zwriteline=strdup(""); owl_message_set_body(m, ""); /* save the hostname */ owl_function_debugmsg("create_pseudo_login: host is %s", host ? host : ""); owl_message_set_hostname(m, host ? host : ""); owl_free(longuser); } void owl_message_create_from_zwriteline(owl_message *m, char *line, char *body, char *zsig) { owl_zwrite z; int ret; char hostbuff[5000]; owl_message_init(m); /* create a zwrite for the purpose of filling in other message fields */ owl_zwrite_create_from_line(&z, line); /* set things */ owl_message_set_direction_out(m); owl_message_set_type_zephyr(m); owl_message_set_sender(m, owl_zephyr_get_sender()); owl_message_set_class(m, owl_zwrite_get_class(&z)); owl_message_set_instance(m, owl_zwrite_get_instance(&z)); if (owl_zwrite_get_numrecips(&z)>0) { owl_message_set_recipient(m, long_zuser(owl_zwrite_get_recip_n(&z, 0))); /* only gets the first user, must fix */ } owl_message_set_opcode(m, owl_zwrite_get_opcode(&z)); owl_message_set_realm(m, owl_zwrite_get_realm(&z)); /* also a hack, but not here */ m->zwriteline=owl_strdup(line); owl_message_set_body(m, body); owl_message_set_zsig(m, zsig); /* save the hostname */ ret=gethostname(hostbuff, MAXHOSTNAMELEN); hostbuff[MAXHOSTNAMELEN]='\0'; if (ret) { owl_message_set_hostname(m, "localhost"); } else { owl_message_set_hostname(m, hostbuff); } owl_zwrite_free(&z); } void owl_message_pretty_zsig(owl_message *m, char *buff) { /* stick a one line version of the zsig in buff */ char *ptr; strcpy(buff, owl_message_get_zsig(m)); ptr=strchr(buff, '\n'); if (ptr) ptr[0]='\0'; } void owl_message_free(owl_message *m) { int i, j; owl_pair *p; #ifdef HAVE_LIBZEPHYR if (owl_message_is_type_zephyr(m) && owl_message_is_direction_in(m)) { ZFreeNotice(&(m->notice)); } #endif if (m->timestr) owl_free(m->timestr); if (m->zwriteline) owl_free(m->zwriteline); /* free all the attributes */ j=owl_list_get_size(&(m->attributes)); for (i=0; iattributes), i); owl_free(owl_pair_get_key(p)); owl_free(owl_pair_get_value(p)); owl_free(p); } owl_list_free_simple(&(m->attributes)); owl_fmtext_free(&(m->fmtext)); } owl-2.2.2.orig/filterelement.c0000644000175100017510000001435111166672053015555 0ustar eichineichin/* Copyright (c) 2002,2003,2004,2009 James M. Kretchmar * * This file is part of Owl. * * Owl 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 3 of the License, or * (at your option) any later version. * * Owl 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 Owl. If not, see . * * --------------------------------------------------------------- * * As of Owl version 2.1.12 there are patches contributed by * developers of the branched BarnOwl project, Copyright (c) * 2006-2009 The BarnOwl Developers. All rights reserved. */ #include "owl.h" static const char fileIdent[] = "$Id: filterelement.c,v 1.7 2009/03/29 12:38:20 kretch Exp $"; #define OWL_FILTERELEMENT_NULL 0 #define OWL_FILTERELEMENT_TRUE 1 #define OWL_FILTERELEMENT_FALSE 2 #define OWL_FILTERELEMENT_OPENBRACE 3 #define OWL_FILTERELEMENT_CLOSEBRACE 4 #define OWL_FILTERELEMENT_AND 5 #define OWL_FILTERELEMENT_OR 6 #define OWL_FILTERELEMENT_NOT 7 #define OWL_FILTERELEMENT_RE 8 #define OWL_FILTERELEMENT_FILTER 9 #define OWL_FILTERELEMENT_PERL 10 void owl_filterelement_create_null(owl_filterelement *fe) { fe->type=OWL_FILTERELEMENT_NULL; fe->field=NULL; fe->filtername=NULL; } void owl_filterelement_create_openbrace(owl_filterelement *fe) { owl_filterelement_create_null(fe); fe->type=OWL_FILTERELEMENT_OPENBRACE; } void owl_filterelement_create_closebrace(owl_filterelement *fe) { owl_filterelement_create_null(fe); fe->type=OWL_FILTERELEMENT_CLOSEBRACE; } void owl_filterelement_create_and(owl_filterelement *fe) { owl_filterelement_create_null(fe); fe->type=OWL_FILTERELEMENT_AND; } void owl_filterelement_create_or(owl_filterelement *fe) { owl_filterelement_create_null(fe); fe->type=OWL_FILTERELEMENT_OR; } void owl_filterelement_create_not(owl_filterelement *fe) { owl_filterelement_create_null(fe); fe->type=OWL_FILTERELEMENT_NOT; } void owl_filterelement_create_true(owl_filterelement *fe) { owl_filterelement_create_null(fe); fe->type=OWL_FILTERELEMENT_TRUE; } void owl_filterelement_create_false(owl_filterelement *fe) { owl_filterelement_create_null(fe); fe->type=OWL_FILTERELEMENT_FALSE; } void owl_filterelement_create_re(owl_filterelement *fe, char *field, char *re) { owl_filterelement_create_null(fe); fe->type=OWL_FILTERELEMENT_RE; fe->field=owl_strdup(field); owl_regex_create(&(fe->re), re); } void owl_filterelement_create_filter(owl_filterelement *fe, char *name) { owl_filterelement_create_null(fe); fe->type=OWL_FILTERELEMENT_FILTER; fe->filtername=owl_strdup(name); } void owl_filterelement_create_perl(owl_filterelement *fe, char *name) { owl_filterelement_create_null(fe); fe->type=OWL_FILTERELEMENT_PERL; fe->filtername=owl_strdup(name); } void owl_filterelement_free(owl_filterelement *fe) { if (fe->field) owl_free(fe->field); if (fe->filtername) owl_free(fe->filtername); } int owl_filterelement_is_null(owl_filterelement *fe) { if (fe->type==OWL_FILTERELEMENT_NULL) return(1); return(0); } int owl_filterelement_is_openbrace(owl_filterelement *fe) { if (fe->type==OWL_FILTERELEMENT_OPENBRACE) return(1); return(0); } int owl_filterelement_is_closebrace(owl_filterelement *fe) { if (fe->type==OWL_FILTERELEMENT_CLOSEBRACE) return(1); return(0); } int owl_filterelement_is_and(owl_filterelement *fe) { if (fe->type==OWL_FILTERELEMENT_AND) return(1); return(0); } int owl_filterelement_is_or(owl_filterelement *fe) { if (fe->type==OWL_FILTERELEMENT_OR) return(1); return(0); } int owl_filterelement_is_not(owl_filterelement *fe) { if (fe->type==OWL_FILTERELEMENT_NOT) return(1); return(0); } int owl_filterelement_is_true(owl_filterelement *fe) { if (fe->type==OWL_FILTERELEMENT_TRUE) return(1); return(0); } int owl_filterelement_is_false(owl_filterelement *fe) { if (fe->type==OWL_FILTERELEMENT_FALSE) return(1); return(0); } int owl_filterelement_is_re(owl_filterelement *fe) { if (fe->type==OWL_FILTERELEMENT_RE) return(1); return(0); } int owl_filterelement_is_perl(owl_filterelement *fe) { if (fe->type==OWL_FILTERELEMENT_PERL) return(1); return(0); } owl_regex *owl_filterelement_get_re(owl_filterelement *fe) { return(&(fe->re)); } int owl_filterelement_is_filter(owl_filterelement *fe) { if (fe->type==OWL_FILTERELEMENT_FILTER) return(1); return(0); } char *owl_filterelement_get_field(owl_filterelement *fe) { if (fe->field) return(fe->field); return("unknown-field"); } char *owl_filterelement_get_filtername(owl_filterelement *fe) { if (fe->filtername) return(fe->filtername); return("unknown-filter"); } int owl_filterelement_is_value(owl_filterelement *fe) { if ( (fe->type==OWL_FILTERELEMENT_TRUE) || (fe->type==OWL_FILTERELEMENT_FALSE) || (fe->type==OWL_FILTERELEMENT_RE) || (fe->type==OWL_FILTERELEMENT_PERL) || (fe->type==OWL_FILTERELEMENT_FILTER)) { return(1); } return(0); } /* caller must free the return */ char *owl_filterelement_to_string(owl_filterelement *fe) { if (owl_filterelement_is_openbrace(fe)) { return(owl_strdup("( ")); } else if (owl_filterelement_is_closebrace(fe)) { return(owl_strdup(") ")); } else if (owl_filterelement_is_and(fe)) { return(owl_strdup("and ")); } else if (owl_filterelement_is_or(fe)) { return(owl_strdup("or ")); } else if (owl_filterelement_is_not(fe)) { return(owl_strdup("not ")); } else if (owl_filterelement_is_true(fe)) { return(owl_strdup("true ")); } else if (owl_filterelement_is_false(fe)) { return(owl_strdup("false ")); } else if (owl_filterelement_is_re(fe)) { return(owl_sprintf("%s %s ", fe->field, owl_regex_get_string(&(fe->re)))); } else if (owl_filterelement_is_filter(fe)) { return(owl_sprintf("filter %s ", fe->filtername)); } else if (owl_filterelement_is_perl(fe)) { return(owl_sprintf("perl %s ", fe->filtername)); } return(owl_strdup("?")); } owl-2.2.2.orig/popwin.c0000644000175100017510000000737011166672053014235 0ustar eichineichin/* Copyright (c) 2002,2003,2004,2009 James M. Kretchmar * * This file is part of Owl. * * Owl 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 3 of the License, or * (at your option) any later version. * * Owl 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 Owl. If not, see . * * --------------------------------------------------------------- * * As of Owl version 2.1.12 there are patches contributed by * developers of the branched BarnOwl project, Copyright (c) * 2006-2009 The BarnOwl Developers. All rights reserved. */ #include "owl.h" static const char fileIdent[] = "$Id: popwin.c,v 1.9 2009/03/29 12:38:22 kretch Exp $"; int owl_popwin_init(owl_popwin *pw) { pw->active=0; pw->needsfirstrefresh=0; pw->lines=0; pw->cols=0; return(0); } int owl_popwin_up(owl_popwin *pw) { int glines, gcols, startcol, startline; /* calculate the size of the popwin */ glines=owl_global_get_lines(&g); gcols=owl_global_get_cols(&g); pw->lines = owl_util_min(glines,24)*3/4 + owl_util_max(glines-24,0)/2; startline = (glines-pw->lines)/2; pw->cols = owl_util_min(gcols,90)*15/16 + owl_util_max(gcols-90,0)/2; startcol = (gcols-pw->cols)/2; pw->borderwin=newwin(pw->lines, pw->cols, startline, startcol); pw->popwin=newwin(pw->lines-2, pw->cols-2, startline+1, startcol+1); pw->needsfirstrefresh=1; meta(pw->popwin,TRUE); nodelay(pw->popwin, 1); keypad(pw->popwin, TRUE); werase(pw->popwin); werase(pw->borderwin); if (owl_global_is_fancylines(&g)) { box(pw->borderwin, 0, 0); } else { box(pw->borderwin, '|', '-'); wmove(pw->borderwin, 0, 0); waddch(pw->borderwin, '+'); wmove(pw->borderwin, pw->lines-1, 0); waddch(pw->borderwin, '+'); wmove(pw->borderwin, pw->lines-1, pw->cols-1); waddch(pw->borderwin, '+'); wmove(pw->borderwin, 0, pw->cols-1); waddch(pw->borderwin, '+'); } wnoutrefresh(pw->popwin); wnoutrefresh(pw->borderwin); owl_global_set_needrefresh(&g); pw->active=1; return(0); } int owl_popwin_display_text(owl_popwin *pw, char *text) { waddstr(pw->popwin, text); wnoutrefresh(pw->popwin); touchwin(pw->borderwin); wnoutrefresh(pw->borderwin); owl_global_set_needrefresh(&g); return(0); } int owl_popwin_close(owl_popwin *pw) { delwin(pw->popwin); delwin(pw->borderwin); pw->active=0; owl_global_set_needrefresh(&g); owl_mainwin_redisplay(owl_global_get_mainwin(&g)); owl_function_full_redisplay(&g); return(0); } int owl_popwin_is_active(owl_popwin *pw) { if (pw->active==1) return(1); return(0); } /* this will refresh the border as well as the text area */ int owl_popwin_refresh(owl_popwin *pw) { touchwin(pw->borderwin); touchwin(pw->popwin); wnoutrefresh(pw->borderwin); wnoutrefresh(pw->popwin); owl_global_set_needrefresh(&g); return(0); } void owl_popwin_set_handler(owl_popwin *pw, void (*func)(int ch)) { pw->handler=func; } void owl_popwin_unset_handler(owl_popwin *pw) { pw->handler=NULL; } WINDOW *owl_popwin_get_curswin(owl_popwin *pw) { return(pw->popwin); } int owl_popwin_get_lines(owl_popwin *pw) { return(pw->lines-2); } int owl_popwin_get_cols(owl_popwin *pw) { return(pw->cols-2); } int owl_popwin_needs_first_refresh(owl_popwin *pw) { if (pw->needsfirstrefresh) return(1); return(0); } void owl_popwin_no_needs_first_refresh(owl_popwin *pw) { pw->needsfirstrefresh=0; } owl-2.2.2.orig/select.c0000644000175100017510000001573611166672053014205 0ustar eichineichin/* Copyright (c) 2002,2003,2004,2009 James M. Kretchmar * * This file is part of Owl. * * Owl 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 3 of the License, or * (at your option) any later version. * * Owl 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 Owl. If not, see . * * --------------------------------------------------------------- * * As of Owl version 2.1.12 there are patches contributed by * developers of the branched BarnOwl project, Copyright (c) * 2006-2009 The BarnOwl Developers. All rights reserved. */ /* This select loop implementation was contributed by developers of * the branched BarnOwl project. */ #include "owl.h" static const char fileIdent[] = "$Id $"; static int dispatch_active = 0; /* Returns the index of the dispatch for the file descriptor. */ int owl_select_find_dispatch(int fd) { int i, len; owl_list *dl; owl_dispatch *d; dl = owl_global_get_dispatchlist(&g); len = owl_list_get_size(dl); owl_function_debugmsg("test: len is %i", len); for(i = 0; i < len; i++) { d = (owl_dispatch*)owl_list_get_element(dl, i); if (d->fd == fd) return i; } return -1; } void owl_select_remove_dispatch_at(int elt) /* noproto */ { owl_list *dl; owl_dispatch *d; dl = owl_global_get_dispatchlist(&g); d = (owl_dispatch*)owl_list_get_element(dl, elt); owl_list_remove_element(dl, elt); if (d->destroy) { d->destroy(d); } } /* Adds a new owl_dispatch to the list, replacing existing ones if needed. */ void owl_select_add_dispatch(owl_dispatch *d) { int elt; owl_list *dl; d->needs_gc = 0; elt = owl_select_find_dispatch(d->fd); dl = owl_global_get_dispatchlist(&g); if (elt != -1) { /* If we have a dispatch for this FD */ owl_dispatch *d_old; owl_function_debugmsg("select: duplicate dispatch found"); d_old = (owl_dispatch*)owl_list_get_element(dl, elt); /* Ignore if we're adding the same dispatch again. Otherwise replace the old dispatch. */ if (d_old != d) { owl_select_remove_dispatch_at(elt); } } owl_list_append_element(dl, d); } /* Removes an owl_dispatch to the list, based on it's file descriptor. */ void owl_select_remove_dispatch(int fd) { int elt; owl_list *dl; owl_dispatch *d; elt = owl_select_find_dispatch(fd); if(elt == -1) { return; } else if(dispatch_active) { /* Defer the removal until dispatch is done walking the list */ dl = owl_global_get_dispatchlist(&g); d = (owl_dispatch*)owl_list_get_element(dl, elt); d->needs_gc = 1; } else { owl_select_remove_dispatch_at(elt); } } int owl_select_dispatch_count() { return owl_list_get_size(owl_global_get_dispatchlist(&g)); } int owl_select_dispatch_prepare_fd_sets(fd_set *r, fd_set *e) { int i, len, max_fd; owl_dispatch *d; owl_list *dl; dl = owl_global_get_dispatchlist(&g); FD_ZERO(r); FD_ZERO(e); max_fd = 0; len = owl_select_dispatch_count(g); for(i = 0; i < len; i++) { d = (owl_dispatch*)owl_list_get_element(dl, i); FD_SET(d->fd, r); FD_SET(d->fd, e); if (max_fd < d->fd) max_fd = d->fd; } return max_fd + 1; } void owl_select_gc() { int i; owl_list *dl; dl = owl_global_get_dispatchlist(&g); /* * Count down so we aren't set off by removing items from the list * during the iteration. */ for(i = owl_list_get_size(dl) - 1; i >= 0; i--) { owl_dispatch *d = owl_list_get_element(dl, i); if(d->needs_gc) { owl_select_remove_dispatch_at(i); } } } void owl_select_dispatch(fd_set *fds, int max_fd) { int i, len; owl_dispatch *d; owl_list *dl; dl = owl_global_get_dispatchlist(&g); len = owl_select_dispatch_count(); dispatch_active = 1; for(i = 0; i < len; i++) { d = (owl_dispatch*)owl_list_get_element(dl, i); /* While d shouldn't normally be null, the list may be altered by * functions we dispatch to. */ if (d != NULL && !d->needs_gc && FD_ISSET(d->fd, fds)) { if (d->cfunc != NULL) { d->cfunc(d); } } } dispatch_active = 0; owl_select_gc(); } int owl_select_aim_hack(fd_set *rfds, fd_set *wfds) { aim_conn_t *cur; aim_session_t *sess; int max_fd; FD_ZERO(rfds); FD_ZERO(wfds); max_fd = 0; sess = owl_global_get_aimsess(&g); for (cur = sess->connlist, max_fd = 0; cur; cur = cur->next) { if (cur->fd != -1) { FD_SET(cur->fd, rfds); if (cur->status & AIM_CONN_STATUS_INPROGRESS) { /* Yes, we're checking writable sockets here. Without it, AIM login is really slow. */ FD_SET(cur->fd, wfds); } if (cur->fd > max_fd) max_fd = cur->fd; } } return max_fd; } void owl_select() { int i, max_fd, aim_max_fd, aim_done; fd_set r; fd_set e; fd_set aim_rfds, aim_wfds; struct timeval timeout; /* owl_select_process_timers(&timeout); */ /* settings to 5 seconds for the moment, we can raise this when the * odd select behavior with zephyr is understood */ timeout.tv_sec = 5; timeout.tv_usec = 0; max_fd = owl_select_dispatch_prepare_fd_sets(&r, &e); /* AIM HACK: * * The problem - I'm not sure where to hook into the owl/faim * interface to keep track of when the AIM socket(s) open and * close. In particular, the bosconn thing throws me off. So, * rather than register particular dispatchers for AIM, I look up * the relevant FDs and add them to select's watch lists, then * check for them individually before moving on to the other * dispatchers. --asedeno */ aim_done = 1; FD_ZERO(&aim_rfds); FD_ZERO(&aim_wfds); if (owl_global_is_doaimevents(&g)) { aim_done = 0; aim_max_fd = owl_select_aim_hack(&aim_rfds, &aim_wfds); if (max_fd < aim_max_fd) max_fd = aim_max_fd; for(i = 0; i <= aim_max_fd; i++) { if (FD_ISSET(i, &aim_rfds)) { FD_SET(i, &r); FD_SET(i, &e); } } } /* END AIM HACK */ if ( select(max_fd+1, &r, &aim_wfds, &e, &timeout) ) { /* Merge fd_sets and clear AIM FDs. */ for(i = 0; i <= max_fd; i++) { /* Merge all interesting FDs into one set, since we have a single dispatch per FD. */ if (FD_ISSET(i, &r) || FD_ISSET(i, &aim_wfds) || FD_ISSET(i, &e)) { /* AIM HACK: no separate dispatch, just process here if needed, and only once per run through. */ if (!aim_done && (FD_ISSET(i, &aim_rfds) || FD_ISSET(i, &aim_wfds))) { owl_process_aim(); aim_done = 1; } else { FD_SET(i, &r); } } } /* NOTE: the same dispatch function is called for both exceptional and read ready FDs. */ owl_select_dispatch(&r, max_fd); } } owl-2.2.2.orig/zbuddylist.c0000644000175100017510000000425711166672053015117 0ustar eichineichin/* Copyright (c) 2002,2003,2004,2009 James M. Kretchmar * * This file is part of Owl. * * Owl 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 3 of the License, or * (at your option) any later version. * * Owl 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 Owl. If not, see . * * --------------------------------------------------------------- * * As of Owl version 2.1.12 there are patches contributed by * developers of the branched BarnOwl project, Copyright (c) * 2006-2009 The BarnOwl Developers. All rights reserved. */ #include "owl.h" static const char fileIdent[] = "$Id"; void owl_zbuddylist_create(owl_zbuddylist *zb) { owl_list_create(&(zb->zusers)); } int owl_zbuddylist_adduser(owl_zbuddylist *zb, char *name) { int i, j; char *user; user=long_zuser(name); j=owl_list_get_size(&(zb->zusers)); for (i=0; izusers), i))) { owl_free(user); return(-1); } } owl_list_append_element(&(zb->zusers), user); return(0); } int owl_zbuddylist_deluser(owl_zbuddylist *zb, char *name) { int i, j; char *user, *ptr; user=long_zuser(name); j=owl_list_get_size(&(zb->zusers)); for (i=0; izusers), i); if (!strcasecmp(user, ptr)) { owl_list_remove_element(&(zb->zusers), i); owl_free(ptr); owl_free(user); return(0); } } owl_free(user); return(-1); } int owl_zbuddylist_contains_user(owl_zbuddylist *zb, char *name) { int i, j; char *user; user=long_zuser(name); j=owl_list_get_size(&(zb->zusers)); for (i=0; izusers), i))) { owl_free(user); return(1); } } owl_free(user); return(0); } owl-2.2.2.orig/viewwin.c0000644000175100017510000001133711166672053014407 0ustar eichineichin/* Copyright (c) 2002,2003,2004,2009 James M. Kretchmar * * This file is part of Owl. * * Owl 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 3 of the License, or * (at your option) any later version. * * Owl 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 Owl. If not, see . * * --------------------------------------------------------------- * * As of Owl version 2.1.12 there are patches contributed by * developers of the branched BarnOwl project, Copyright (c) * 2006-2009 The BarnOwl Developers. All rights reserved. */ #include #include "owl.h" static const char fileIdent[] = "$Id: viewwin.c,v 1.9 2009/03/29 12:38:23 kretch Exp $"; #define BOTTOM_OFFSET 1 /* initialize the viewwin e. 'win' is an already initialzed curses * window that will be used by viewwin */ void owl_viewwin_init_text(owl_viewwin *v, WINDOW *win, int winlines, int wincols, char *text) { owl_fmtext_init_null(&(v->fmtext)); if (text) { owl_fmtext_append_normal(&(v->fmtext), text); if (text[strlen(text)-1]!='\n' && text[0]!='\0') { owl_fmtext_append_normal(&(v->fmtext), "\n"); } v->textlines=owl_fmtext_num_lines(&(v->fmtext)); } v->topline=0; v->rightshift=0; v->winlines=winlines; v->wincols=wincols; v->curswin=win; v->onclose_hook = NULL; } void owl_viewwin_append_text(owl_viewwin *v, char *text) { owl_fmtext_append_normal(&(v->fmtext), text); v->textlines=owl_fmtext_num_lines(&(v->fmtext)); } /* initialize the viewwin e. 'win' is an already initialzed curses * window that will be used by viewwin */ void owl_viewwin_init_fmtext(owl_viewwin *v, WINDOW *win, int winlines, int wincols, owl_fmtext *fmtext) { owl_fmtext_copy(&(v->fmtext), fmtext); v->textlines=owl_fmtext_num_lines(&(v->fmtext)); v->topline=0; v->rightshift=0; v->winlines=winlines; v->wincols=wincols; v->curswin=win; } void owl_viewwin_set_curswin(owl_viewwin *v, WINDOW *w, int winlines, int wincols) { v->curswin=w; v->winlines=winlines; v->wincols=wincols; } void owl_viewwin_set_onclose_hook(owl_viewwin *v, void (*onclose_hook) (owl_viewwin *vwin, void *data), void *onclose_hook_data) { v->onclose_hook = onclose_hook; v->onclose_hook_data = onclose_hook_data; } /* regenerate text on the curses window. */ /* if update == 1 then do a doupdate() */ void owl_viewwin_redisplay(owl_viewwin *v, int update) { owl_fmtext fm1, fm2; werase(v->curswin); wmove(v->curswin, 0, 0); owl_fmtext_init_null(&fm1); owl_fmtext_init_null(&fm2); owl_fmtext_truncate_lines(&(v->fmtext), v->topline, v->winlines-BOTTOM_OFFSET, &fm1); owl_fmtext_truncate_cols(&fm1, v->rightshift, v->wincols-1+v->rightshift, &fm2); owl_fmtext_curs_waddstr(&fm2, v->curswin); /* print the message at the bottom */ wmove(v->curswin, v->winlines-1, 0); wattrset(v->curswin, A_REVERSE); if (v->textlines - v->topline > v->winlines-BOTTOM_OFFSET) { waddstr(v->curswin, "--More-- (Space to see more, 'q' to quit)"); } else { waddstr(v->curswin, "--End-- (Press 'q' to quit)"); } wattroff(v->curswin, A_REVERSE); wnoutrefresh(v->curswin); if (update==1) { doupdate(); } owl_fmtext_free(&fm1); owl_fmtext_free(&fm2); } void owl_viewwin_pagedown(owl_viewwin *v) { v->topline+=v->winlines - BOTTOM_OFFSET; if ( (v->topline+v->winlines-BOTTOM_OFFSET) > v->textlines) { v->topline = v->textlines - v->winlines + BOTTOM_OFFSET; } } void owl_viewwin_linedown(owl_viewwin *v) { v->topline++; if ( (v->topline+v->winlines-BOTTOM_OFFSET) > v->textlines) { v->topline = v->textlines - v->winlines + BOTTOM_OFFSET; } } void owl_viewwin_pageup(owl_viewwin *v) { v->topline-=v->winlines; if (v->topline<0) v->topline=0; } void owl_viewwin_lineup(owl_viewwin *v) { v->topline--; if (v->topline<0) v->topline=0; } void owl_viewwin_right(owl_viewwin *v, int n) { v->rightshift+=n; } void owl_viewwin_left(owl_viewwin *v, int n) { v->rightshift-=n; if (v->rightshift<0) v->rightshift=0; } void owl_viewwin_top(owl_viewwin *v) { v->topline=0; v->rightshift=0; } void owl_viewwin_bottom(owl_viewwin *v) { v->topline = v->textlines - v->winlines + BOTTOM_OFFSET; } void owl_viewwin_free(owl_viewwin *v) { if (v->onclose_hook) { v->onclose_hook(v, v->onclose_hook_data); v->onclose_hook = NULL; v->onclose_hook_data = NULL; } owl_fmtext_free(&(v->fmtext)); } owl-2.2.2.orig/zephyr.c0000644000175100017510000006165611166672053014251 0ustar eichineichin#include #include #include #include #include #include #include "owl.h" static const char fileIdent[] = "$Id: zephyr.c,v 1.61 2009/04/05 23:36:54 kretch Exp $"; #ifdef HAVE_LIBZEPHYR Code_t ZResetAuthentication(); #endif int owl_zephyr_initialize() { #ifdef HAVE_LIBZEPHYR int ret; if ((ret = ZInitialize()) != ZERR_NONE) { com_err("owl",ret,"while initializing"); return(1); } if ((ret = ZOpenPort(NULL)) != ZERR_NONE) { com_err("owl",ret,"while opening port"); return(1); } #endif return(0); } int owl_zephyr_shutdown() { #ifdef HAVE_LIBZEPHYR unsuball(); ZClosePort(); #endif return(0); } int owl_zephyr_zpending() { #ifdef HAVE_LIBZEPHYR return(ZPending()); #else return(0); #endif } char *owl_zephyr_get_realm() { #ifdef HAVE_LIBZEPHYR return(ZGetRealm()); #else return(""); #endif } char *owl_zephyr_get_sender() { #ifdef HAVE_LIBZEPHYR return(ZGetSender()); #else return(""); #endif } #ifdef HAVE_LIBZEPHYR int owl_zephyr_loadsubs_helper(ZSubscription_t subs[], int count) { int i, ret = 0; /* sub without defaults */ if (ZSubscribeToSansDefaults(subs,count,0) != ZERR_NONE) { owl_function_error("Error subscribing to zephyr notifications."); ret=-2; } /* free stuff */ for (i=0; i= 3000) { ret = owl_zephyr_loadsubs_helper(subs, count); if (ret != 0) { fclose(file); return(ret); } count=0; } /* add it to the list of subs */ if ((tmp=(char *) strtok(start, ",\n\r"))==NULL) continue; subs[count].zsub_class=owl_strdup(tmp); if ((tmp=(char *) strtok(NULL, ",\n\r"))==NULL) continue; subs[count].zsub_classinst=owl_strdup(tmp); if ((tmp=(char *) strtok(NULL, " \t\n\r"))==NULL) continue; subs[count].zsub_recipient=owl_strdup(tmp); /* if it started with '-' then add it to the global punt list */ if (buffer[0]=='-') { owl_function_zpunt(subs[count].zsub_class, subs[count].zsub_classinst, subs[count].zsub_recipient, 0); } count++; } fclose(file); ret=owl_zephyr_loadsubs_helper(subs, count); return(ret); #else return(0); #endif } int owl_zephyr_loaddefaultsubs() { #ifdef HAVE_LIBZEPHYR ZSubscription_t subs[10]; if (ZSubscribeTo(subs,0,0) != ZERR_NONE) { owl_function_error("Error subscribing to default zephyr notifications."); return(-1); } return(0); #else return(0); #endif } int owl_zephyr_loadloginsubs(char *filename) { #ifdef HAVE_LIBZEPHYR FILE *file; ZSubscription_t subs[3001]; char subsfile[MAXPATHLEN], buffer[1024]; int count, ret, i; struct stat statbuff; if (filename==NULL) { sprintf(subsfile, "%s/%s", owl_global_get_homedir(&g), ".anyone"); } else { strcpy(subsfile, filename); } ret=stat(subsfile, &statbuff); if (ret) return(0); ret=0; ZResetAuthentication(); /* need to redo this to do chunks, not just bag out after 3000 */ count=0; file=fopen(subsfile, "r"); if (file) { while ( fgets(buffer, 1024, file)!=NULL ) { if (buffer[0]=='#' || buffer[0]=='\n' || buffer[0]=='\n') continue; if (count >= 3000) break; /* also tell the user */ buffer[strlen(buffer)-1]='\0'; subs[count].zsub_class="login"; subs[count].zsub_recipient="*"; if (strchr(buffer, '@')) { subs[count].zsub_classinst=owl_strdup(buffer); } else { subs[count].zsub_classinst=owl_sprintf("%s@%s", buffer, ZGetRealm()); } count++; } fclose(file); } else { count=0; ret=-1; } /* sub with defaults */ if (ZSubscribeToSansDefaults(subs,count,0) != ZERR_NONE) { owl_function_error("Error subscribing to zephyr notifications."); ret=-2; } /* free stuff */ for (i=0; i", class, inst, recip); return(-2); } return(0); #else return(0); #endif } int owl_zephyr_unsub(char *class, char *inst, char *recip) { #ifdef HAVE_LIBZEPHYR ZSubscription_t subs[5]; subs[0].zsub_class=class; subs[0].zsub_classinst=inst; subs[0].zsub_recipient=recip; ZResetAuthentication(); if (ZUnsubscribeTo(subs,1,0) != ZERR_NONE) { owl_function_error("Error unsubbing from <%s,%s,%s>", class, inst, recip); return(-2); } return(0); #else return(0); #endif } /* return a pointer to the data in the Jth field, (NULL terminated by * definition). Caller must free the return. */ #ifdef HAVE_LIBZEPHYR char *owl_zephyr_get_field(ZNotice_t *n, int j) { int i, count, save; char *out; /* If there's no message here, just run along now */ if (n->z_message_len == 0) return(owl_strdup("")); count=save=0; for (i=0; iz_message_len; i++) { if (n->z_message[i]=='\0') { count++; if (count==j) { /* just found the end of the field we're looking for */ return(owl_strdup(n->z_message+save)); } else { save=i+1; } } } /* catch the last field, which might not be null terminated */ if (count==j-1) { out=owl_malloc(n->z_message_len-save+5); memcpy(out, n->z_message+save, n->z_message_len-save); out[n->z_message_len-save]='\0'; return(out); } return(owl_strdup("")); } #else char *owl_zephyr_get_field(void *n, int j) { return(owl_strdup("")); } #endif #ifdef HAVE_LIBZEPHYR int owl_zephyr_get_num_fields(ZNotice_t *n) { int i, fields; if(n->z_message_len == 0) return 0; fields=1; for (i=0; iz_message_len; i++) { if (n->z_message[i]=='\0') fields++; } return(fields); } #else int owl_zephyr_get_num_fields(void *n) { return(0); } #endif #ifdef HAVE_LIBZEPHYR /* return a pointer to the message, place the message length in k * caller must free the return */ char *owl_zephyr_get_message(ZNotice_t *n) { /* don't let ping messages have a body */ if (!strcasecmp(n->z_opcode, "ping")) { return(owl_strdup("")); } /* deal with MIT Athena OLC messages */ if (!strcasecmp(n->z_sender, "olc.matisse@ATHENA.MIT.EDU")) { return(owl_zephyr_get_field(n, 1)); } /* deal with MIT NOC messages */ else if (!strcasecmp(n->z_sender, "rcmd.achilles@ATHENA.MIT.EDU")) { /* $opcode service on $instance $3.\n$4 */ char *msg, *opcode, *instance, *field3, *field4; opcode = n->z_opcode; instance = n->z_class_inst; field3 = owl_zephyr_get_field(n, 3); field4 = owl_zephyr_get_field(n, 4); msg = owl_sprintf("%s service on %s %s\n%s", opcode, instance, field3, field4); if (msg) { return msg; } } return(owl_zephyr_get_field(n, 2)); } #endif #ifdef HAVE_LIBZEPHYR char *owl_zephyr_get_zsig(ZNotice_t *n, int *k) { /* return a pointer to the zsig if there is one */ /* message length 0? No zsig */ if (n->z_message_len==0) { *k=0; return(""); } /* No zsig for OLC messages */ if (!strcasecmp(n->z_sender, "olc.matisse@ATHENA.MIT.EDU")) { return(""); } /* Everything else is field 1 */ *k=strlen(n->z_message); return(n->z_message); } #else char *owl_zephyr_get_zsig(void *n, int *k) { return(""); } #endif int send_zephyr(char *opcode, char *zsig, char *class, char *instance, char *recipient, char *message) { #ifdef HAVE_LIBZEPHYR int ret; ZNotice_t notice; memset(¬ice, 0, sizeof(notice)); ZResetAuthentication(); if (!zsig) zsig=""; notice.z_kind=ACKED; notice.z_port=0; notice.z_class=class; notice.z_class_inst=instance; if (!strcmp(recipient, "*") || !strcmp(recipient, "@")) { notice.z_recipient=""; } else { notice.z_recipient=recipient; } notice.z_default_format="Class $class, Instance $instance:\nTo: @bold($recipient) at $time $date\nFrom: @bold{$1 <$sender>}\n\n$2"; notice.z_sender=NULL; if (opcode) notice.z_opcode=opcode; notice.z_message_len=strlen(zsig)+1+strlen(message); notice.z_message=owl_malloc(notice.z_message_len+10); strcpy(notice.z_message, zsig); memcpy(notice.z_message+strlen(zsig)+1, message, strlen(message)); /* ret=ZSendNotice(¬ice, ZAUTH); */ ret=ZSrvSendNotice(¬ice, ZAUTH, send_zephyr_helper); /* free then check the return */ owl_free(notice.z_message); ZFreeNotice(¬ice); if (ret!=ZERR_NONE) { owl_function_error("Error sending zephyr"); return(ret); } return(0); #else return(0); #endif } #ifdef HAVE_LIBZEPHYR Code_t send_zephyr_helper(ZNotice_t *notice, char *buf, int len, int wait) { int ret; ret=ZSendPacket(buf, len, 0); return(ret); } #endif void send_ping(char *to) { #ifdef HAVE_LIBZEPHYR send_zephyr("PING", "", "MESSAGE", "PERSONAL", to, ""); #endif } #ifdef HAVE_LIBZEPHYR void owl_zephyr_handle_ack(ZNotice_t *retnotice) { char *tmp; /* if it's an HMACK ignore it */ if (retnotice->z_kind == HMACK) return; if (retnotice->z_kind == SERVNAK) { owl_function_error("Authorization failure sending zephyr"); } else if ((retnotice->z_kind != SERVACK) || !retnotice->z_message_len) { owl_function_error("Detected server failure while receiving acknowledgement"); } else if (!strcmp(retnotice->z_message, ZSRVACK_SENT)) { if (!strcasecmp(retnotice->z_opcode, "ping")) { return; } else if (!strcasecmp(retnotice->z_class, "message") && !strcasecmp(retnotice->z_class_inst, "personal")) { tmp=short_zuser(retnotice->z_recipient); owl_function_makemsg("Message sent to %s.", tmp); free(tmp); } else { owl_function_makemsg("Message sent to -c %s -i %s\n", retnotice->z_class, retnotice->z_class_inst); } } else if (!strcmp(retnotice->z_message, ZSRVACK_NOTSENT)) { #define BUFFLEN 1024 if (retnotice->z_recipient == NULL || *retnotice->z_recipient == 0 || *retnotice->z_recipient == '@') { char buff[BUFFLEN]; owl_function_error("No one subscribed to class %s", retnotice->z_class); snprintf(buff, BUFFLEN, "Could not send message to class %s: no one subscribed.\n", retnotice->z_class); owl_function_adminmsg("", buff); } else { char buff[BUFFLEN]; tmp = short_zuser(retnotice->z_recipient); owl_function_error("%s: Not logged in or subscribing.", tmp); if(strcmp(retnotice->z_class, "message")) { snprintf(buff, BUFFLEN, "Could not send message to %s: " "not logged in or subscribing to class %s, instance %s.\n", tmp, retnotice->z_class, retnotice->z_class_inst); } else { snprintf(buff, BUFFLEN, "Could not send message to %s: " "not logged in or subscribing to messages.\n", tmp); } owl_function_adminmsg("", buff); owl_log_outgoing_zephyr_error(tmp, buff); owl_free(tmp); } } else { owl_function_error("Internal error on ack (%s)", retnotice->z_message); } } #else void owl_zephyr_handle_ack(void *retnotice) { } #endif #ifdef HAVE_LIBZEPHYR int owl_zephyr_notice_is_ack(ZNotice_t *n) { if (n->z_kind == SERVNAK || n->z_kind == SERVACK || n->z_kind == HMACK) { if (!strcasecmp(n->z_class, LOGIN_CLASS)) return(0); return(1); } return(0); } #else int owl_zephyr_notice_is_ack(void *n) { return(0); } #endif void owl_zephyr_zaway(owl_message *m) { #ifdef HAVE_LIBZEPHYR char *tmpbuff, *myuser, *to; owl_message *mout; /* bail if it doesn't look like a message we should reply to. Some * of this defined by the way zaway(1) works */ if (strcasecmp(owl_message_get_class(m), "message")) return; if (strcasecmp(owl_message_get_recipient(m), ZGetSender())) return; if (!strcasecmp(owl_message_get_sender(m), "")) return; if (!strcasecmp(owl_message_get_opcode(m), "ping")) return; if (!strcasecmp(owl_message_get_opcode(m), "auto")) return; if (!strcasecmp(owl_message_get_zsig(m), "Automated reply:")) return; if (!strcasecmp(owl_message_get_sender(m), ZGetSender())) return; if (owl_message_get_attribute_value(m, "isauto")) return; if (owl_global_is_smartstrip(&g)) { to=owl_zephyr_smartstripped_user(owl_message_get_sender(m)); } else { to=owl_strdup(owl_message_get_sender(m)); } send_zephyr("", "Automated reply:", owl_message_get_class(m), owl_message_get_instance(m), to, owl_global_get_zaway_msg(&g)); myuser=short_zuser(to); if (!strcasecmp(owl_message_get_instance(m), "personal")) { tmpbuff = owl_sprintf("zwrite %s", myuser); } else { tmpbuff = owl_sprintf("zwrite -i %s %s", owl_message_get_instance(m), myuser); } owl_free(myuser); owl_free(to); /* display the message as an admin message in the receive window */ mout=owl_function_make_outgoing_zephyr(owl_global_get_zaway_msg(&g), tmpbuff, "Automated reply:"); owl_function_add_message(mout); owl_free(tmpbuff); #endif } #ifdef HAVE_LIBZEPHYR void owl_zephyr_hackaway_cr(ZNotice_t *n) { /* replace \r's with ' '. Gross-ish */ int i; for (i=0; iz_message_len; i++) { if (n->z_message[i]=='\r') { n->z_message[i]=' '; } } } #endif char *owl_zephyr_zlocate(char *user, int auth) { #ifdef HAVE_LIBZEPHYR int ret, numlocs; int one = 1; ZLocations_t locations; char *myuser, *out, *tmp; ZResetAuthentication(); ret=ZLocateUser(user,&numlocs,auth?ZAUTH:ZNOAUTH); if (ret != ZERR_NONE) { return(owl_sprintf("Error locating user %s\n", user)); } if (numlocs==0) { myuser=short_zuser(user); out=owl_sprintf("%s: Hidden or not logged in\n", myuser); owl_free(myuser); return(out); } out=strdup(""); for (;numlocs;numlocs--) { ZGetLocations(&locations,&one); myuser=short_zuser(user); tmp=owl_sprintf("%s%s: %s\t%s\t%s\n", out, myuser, locations.host ? locations.host : "?", locations.tty ? locations.tty : "?", locations.time ? locations.time : "?"); owl_free(out); out=tmp; owl_free(myuser); } return(out); #else return(owl_strdup("Zephyr not available")); #endif } void owl_zephyr_addsub(char *filename, char *class, char *inst, char *recip) { #ifdef HAVE_LIBZEPHYR char *line, subsfile[MAXPATHLEN], buff[LINE]; FILE *file; line=owl_zephyr_makesubline(class, inst, recip); if (filename==NULL) { sprintf(subsfile, "%s/%s", owl_global_get_homedir(&g), ".zephyr.subs"); } else { strcpy(subsfile, filename); } /* if the file already exists, check to see if the sub is already there */ file=fopen(subsfile, "r"); if (file) { while (fgets(buff, LINE, file)!=NULL) { if (!strcasecmp(buff, line)) { owl_function_error("Subscription already present in %s", subsfile); owl_free(line); fclose(file); return; } } fclose(file); } /* if we get here then we didn't find it */ file=fopen(subsfile, "a"); if (!file) { owl_function_error("Error opening file %s for writing", subsfile); owl_free(line); return; } fputs(line, file); fclose(file); owl_function_makemsg("Subscription added"); owl_free(line); #endif } void owl_zephyr_delsub(char *filename, char *class, char *inst, char *recip) { #ifdef HAVE_LIBZEPHYR char *line, *subsfile; line=owl_zephyr_makesubline(class, inst, recip); line[strlen(line)-1]='\0'; if (!filename) { subsfile=owl_sprintf("%s/.zephyr.subs", owl_global_get_homedir(&g)); } else { subsfile=owl_strdup(filename); } owl_util_file_deleteline(subsfile, line, 1); owl_free(subsfile); owl_free(line); owl_function_makemsg("Subscription removed"); #endif } /* caller must free the return */ char *owl_zephyr_makesubline(char *class, char *inst, char *recip) { return(owl_sprintf("%s,%s,%s\n", class, inst, !strcmp(recip, "") ? "*" : recip)); } void owl_zephyr_zlog_in(void) { #ifdef HAVE_LIBZEPHYR char *exposure, *eset; int ret; ZResetAuthentication(); eset=EXPOSE_REALMVIS; exposure=ZGetVariable("exposure"); if (exposure==NULL) { eset=EXPOSE_REALMVIS; } else if (!strcasecmp(exposure,EXPOSE_NONE)) { eset = EXPOSE_NONE; } else if (!strcasecmp(exposure,EXPOSE_OPSTAFF)) { eset = EXPOSE_OPSTAFF; } else if (!strcasecmp(exposure,EXPOSE_REALMVIS)) { eset = EXPOSE_REALMVIS; } else if (!strcasecmp(exposure,EXPOSE_REALMANN)) { eset = EXPOSE_REALMANN; } else if (!strcasecmp(exposure,EXPOSE_NETVIS)) { eset = EXPOSE_NETVIS; } else if (!strcasecmp(exposure,EXPOSE_NETANN)) { eset = EXPOSE_NETANN; } ret=ZSetLocation(eset); owl_zephyr_process_events(NULL); if (ret != ZERR_NONE) { /* owl_function_makemsg("Error setting location: %s", error_message(ret)); */ } #endif } void owl_zephyr_zlog_out(void) { #ifdef HAVE_LIBZEPHYR int ret; ZResetAuthentication(); ret=ZUnsetLocation(); owl_zephyr_process_events(NULL); if (ret != ZERR_NONE) { /* owl_function_makemsg("Error unsetting location: %s", error_message(ret)); */ } #endif } void owl_zephyr_addbuddy(char *name) { char *filename; FILE *file; filename=owl_sprintf("%s/.anyone", owl_global_get_homedir(&g)); file=fopen(filename, "a"); owl_free(filename); if (!file) { owl_function_error("Error opening zephyr buddy file for append"); return; } fprintf(file, "%s\n", name); fclose(file); } void owl_zephyr_delbuddy(char *name) { char *filename; filename=owl_sprintf("%s/.anyone", owl_global_get_homedir(&g)); owl_util_file_deleteline(filename, name, 0); owl_free(filename); } /* return auth string */ #ifdef HAVE_LIBZEPHYR char *owl_zephyr_get_authstr(ZNotice_t *n) { if (!n) return("UNKNOWN"); if (n->z_auth == ZAUTH_FAILED) { return ("FAILED"); } else if (n->z_auth == ZAUTH_NO) { return ("NO"); } else if (n->z_auth == ZAUTH_YES) { return ("YES"); } else { return ("UNKNOWN"); } } #else char *owl_zephyr_get_authstr(void *n) { return(""); } #endif /* Returns a buffer of subscriptions or an error message. Caller must * free the return. */ char *owl_zephyr_getsubs() { #ifdef HAVE_LIBZEPHYR int ret, num, i, one; int buffsize; ZSubscription_t sub; char *out; one=1; ret=ZRetrieveSubscriptions(0, &num); if (ret==ZERR_TOOMANYSUBS) { return(owl_strdup("Zephyr: too many subscriptions\n")); } else if (ret || (num <= 0)) { return(owl_strdup("Zephyr: error retriving subscriptions\n")); } buffsize = (num + 1) * 50; out=owl_malloc(buffsize); strcpy(out, ""); for (i=0; i\n%s", sub.zsub_class, sub.zsub_classinst, sub.zsub_recipient, out); tmpbufflen = strlen(tmpbuff) + 1; if (tmpbufflen > buffsize) { char *out2; buffsize = tmpbufflen * 2; out2 = owl_realloc(out, buffsize); if (out2 == NULL) { owl_free(out); owl_free(tmpbuff); ZFlushSubscriptions(); out=owl_strdup("Realloc error while getting subscriptions\n"); return(out); } out = out2; } strcpy(out, tmpbuff); owl_free(tmpbuff); } } ZFlushSubscriptions(); return(out); #else return(owl_strdup("Zephyr not available")); #endif } char *owl_zephyr_get_variable(char *var) { #ifdef HAVE_LIBZEPHYR return(ZGetVariable(var)); #else return(""); #endif } void owl_zephyr_set_locationinfo(char *host, char *val) { #ifdef HAVE_LIBZEPHYR ZInitLocationInfo(host, val); #endif } /* Strip a local realm fron the zephyr user name. * The caller must free the return */ char *short_zuser(char *in) { char *out, *ptr; out=owl_strdup(in); ptr=strchr(out, '@'); if (ptr) { if (!strcasecmp(ptr+1, owl_zephyr_get_realm())) { *ptr='\0'; } } return(out); } /* Append a local realm to the zephyr user name if necessary. * The caller must free the return. */ char *long_zuser(char *in) { if (strchr(in, '@')) { return(owl_strdup(in)); } return(owl_sprintf("%s@%s", in, owl_zephyr_get_realm())); } /* strip out the instance from a zsender's principal. Preserves the * realm if present. daemon.webzephyr is a special case. The * caller must free the return */ char *owl_zephyr_smartstripped_user(char *in) { char *ptr, *realm, *out; out=owl_strdup(in); /* bail immeaditly if we don't have to do any work */ ptr=strchr(in, '.'); if (!strchr(in, '/') && !ptr) { /* no '/' and no '.' */ return(out); } if (ptr && strchr(in, '@') && (ptr > strchr(in, '@'))) { /* There's a '.' but it's in the realm */ return(out); } if (!strncasecmp(in, OWL_WEBZEPHYR_PRINCIPAL, strlen(OWL_WEBZEPHYR_PRINCIPAL))) { return(out); } /* remove the realm from ptr, but hold on to it */ realm=strchr(out, '@'); if (realm) realm[0]='\0'; /* strip */ ptr=strchr(out, '.'); if (!ptr) ptr=strchr(out, '/'); ptr[0]='\0'; /* reattach the realm if we had one */ if (realm) { strcat(out, "@"); strcat(out, realm+1); } return(out); } /* read the list of users in 'filename' as a .anyone file, and put the * names of the zephyr users in the list 'in'. If 'filename' is NULL, * use the default .anyone file in the users home directory. Returns * -1 on failure, 0 on success. */ int owl_zephyr_get_anyone_list(owl_list *in, char *filename) { #ifdef HAVE_LIBZEPHYR char *ourfile, *tmp, buff[LINE]; FILE *f; if (filename==NULL) { tmp=owl_global_get_homedir(&g); ourfile=owl_sprintf("%s/.anyone", owl_global_get_homedir(&g)); } else { ourfile=owl_strdup(filename); } f=fopen(ourfile, "r"); if (!f) { owl_function_error("Error opening file %s: %s", ourfile, strerror(errno) ? strerror(errno) : ""); owl_free(ourfile); return(-1); } while (fgets(buff, LINE, f)!=NULL) { /* ignore comments, blank lines etc. */ if (buff[0]=='#') continue; if (buff[0]=='\n') continue; if (buff[0]=='\0') continue; /* strip the \n */ buff[strlen(buff)-1]='\0'; /* ingore from # on */ tmp=strchr(buff, '#'); if (tmp) tmp[0]='\0'; /* ingore from SPC */ tmp=strchr(buff, ' '); if (tmp) tmp[0]='\0'; /* stick on the local realm. */ if (!strchr(buff, '@')) { strcat(buff, "@"); strcat(buff, ZGetRealm()); } owl_list_append_element(in, owl_strdup(buff)); } fclose(f); owl_free(ourfile); return(0); #else return(-1); #endif } #ifdef HAVE_LIBZEPHYR void owl_zephyr_process_events(owl_dispatch *d) { int zpendcount=0; ZNotice_t notice; struct sockaddr_in from; owl_message *m=NULL; while(owl_zephyr_zpending() && zpendcount < 20) { if (owl_zephyr_zpending()) { ZReceiveNotice(¬ice, &from); zpendcount++; /* is this an ack from a zephyr we sent? */ if (owl_zephyr_notice_is_ack(¬ice)) { owl_zephyr_handle_ack(¬ice); continue; } /* if it's a ping and we're not viewing pings then skip it */ if (!owl_global_is_rxping(&g) && !strcasecmp(notice.z_opcode, "ping")) { continue; } /* create the new message */ m=owl_malloc(sizeof(owl_message)); owl_message_create_from_znotice(m, ¬ice); owl_global_messagequeue_addmsg(&g, m); } } } #else void owl_zephyr_process_events(owl_dispatch *d) { } #endif owl-2.2.2.orig/timer.c0000644000175100017510000000551311166672053014036 0ustar eichineichin/* Copyright (c) 2002,2003,2004,2009 James M. Kretchmar * * This file is part of Owl. * * Owl 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 3 of the License, or * (at your option) any later version. * * Owl 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 Owl. If not, see . * * --------------------------------------------------------------- * * As of Owl version 2.1.12 there are patches contributed by * developers of the branched BarnOwl project, Copyright (c) * 2006-2009 The BarnOwl Developers. All rights reserved. */ #include "owl.h" #define OWL_TIMER_DIRECTION_COUNTUP 1 #define OWL_TIMER_DIRECTION_COUNTDOWN 2 /* Create a "counting up" timer. The counter starts running as soon * as this is called. Use owl_timer_reset() to reset it. */ void owl_timer_create_countup(owl_timer *t) { t->direction=OWL_TIMER_DIRECTION_COUNTUP; t->starttime=time(NULL); } /* create a "counting down" timer, which counts down from 'start' * seconds. The counter starts running as soon as this is called. * Use owl_timer_reset to reset it. */ void owl_timer_create_countdown(owl_timer *t, int start) { t->direction=OWL_TIMER_DIRECTION_COUNTDOWN; t->start=start; t->starttime=time(NULL); } /* Reset the timer. For a "counting up" timer, it is reset to 0. For * a "counting down" timer it is set to the value initially set with * owl_timer_create_countdown() or the last value set with * owl_timer_reset_newstart() */ void owl_timer_reset(owl_timer *t) { t->starttime=time(NULL); } /* Only for a countdown timer. Rest the timer, but this time (and on * future resets) start with 'start' seconds. */ void owl_timer_reset_newstart(owl_timer *t, int start) { t->start=start; t->starttime=time(NULL); } /* Return the number of seconds elapsed or remaining. If using a * countdown timer, a negative value is never reported. Once the * timer gets to 0 it stays at 0 */ int owl_timer_get_time(owl_timer *t) { time_t now; int rem; now=time(NULL); if (t->direction==OWL_TIMER_DIRECTION_COUNTUP) { return(now-t->starttime); } else if (t->direction==OWL_TIMER_DIRECTION_COUNTDOWN) { rem=t->start-(now-t->starttime); if (rem<0) return(0); return(rem); } /* never reached */ return(0); } /* Only for countdown timer. Return true if time has run out (the * timer is at 0 seconds or less */ int owl_timer_is_expired(owl_timer *t) { if (owl_timer_get_time(t)==0) return(1); return(0); } owl-2.2.2.orig/configure0000744000175100017510000053770411166672053014473 0ustar eichineichin#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.61. # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, # 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi # PATH needs CR # 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 # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset else as_unset=false fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) as_nl=' ' IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. case $0 in *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 { (exit 1); exit 1; } fi # Work around bugs in pre-3.0 UWIN ksh. for as_var in ENV MAIL MAILPATH do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var done 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) >/dev/null 2>&1 && $as_unset $as_var fi done # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi # 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'` # CDPATH. $as_unset CDPATH if test "x$CONFIG_SHELL" = x; then if (eval ":") 2>/dev/null; then as_have_required=yes else as_have_required=no fi if test $as_have_required = yes && (eval ": (as_func_return () { (exit \$1) } as_func_success () { as_func_return 0 } as_func_failure () { as_func_return 1 } as_func_ret_success () { return 0 } as_func_ret_failure () { return 1 } exitcode=0 if as_func_success; then : else exitcode=1 echo as_func_success failed. fi if as_func_failure; then exitcode=1 echo as_func_failure succeeded. fi if as_func_ret_success; then : else exitcode=1 echo as_func_ret_success failed. fi if as_func_ret_failure; then exitcode=1 echo as_func_ret_failure succeeded. fi if ( set x; as_func_ret_success y && test x = \"\$1\" ); then : else exitcode=1 echo positional parameters were not saved. fi test \$exitcode = 0) || { (exit 1); exit 1; } ( as_lineno_1=\$LINENO as_lineno_2=\$LINENO test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" && test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; } ") 2> /dev/null; then : else as_candidate_shells= 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=. case $as_dir in /*) for as_base in sh bash ksh sh5; do as_candidate_shells="$as_candidate_shells $as_dir/$as_base" done;; esac done IFS=$as_save_IFS for as_shell in $as_candidate_shells $SHELL; do # Try only shells that exist, to save several forks. if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { ("$as_shell") 2> /dev/null <<\_ASEOF 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+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi : _ASEOF }; then CONFIG_SHELL=$as_shell as_have_required=yes if { "$as_shell" 2> /dev/null <<\_ASEOF 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+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi : (as_func_return () { (exit $1) } as_func_success () { as_func_return 0 } as_func_failure () { as_func_return 1 } as_func_ret_success () { return 0 } as_func_ret_failure () { return 1 } exitcode=0 if as_func_success; then : else exitcode=1 echo as_func_success failed. fi if as_func_failure; then exitcode=1 echo as_func_failure succeeded. fi if as_func_ret_success; then : else exitcode=1 echo as_func_ret_success failed. fi if as_func_ret_failure; then exitcode=1 echo as_func_ret_failure succeeded. fi if ( set x; as_func_ret_success y && test x = "$1" ); then : else exitcode=1 echo positional parameters were not saved. fi test $exitcode = 0) || { (exit 1); exit 1; } ( as_lineno_1=$LINENO as_lineno_2=$LINENO test "x$as_lineno_1" != "x$as_lineno_2" && test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; } _ASEOF }; then break fi fi done if test "x$CONFIG_SHELL" != x; then for as_var in BASH_ENV ENV do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var done export CONFIG_SHELL exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} fi if test $as_have_required = no; then echo This script requires a shell more modern than all the echo shells that I found on your system. Please install a echo modern shell, or manually run the script under such a echo shell if you do have one. { (exit 1); exit 1; } fi fi fi (eval "as_func_return () { (exit \$1) } as_func_success () { as_func_return 0 } as_func_failure () { as_func_return 1 } as_func_ret_success () { return 0 } as_func_ret_failure () { return 1 } exitcode=0 if as_func_success; then : else exitcode=1 echo as_func_success failed. fi if as_func_failure; then exitcode=1 echo as_func_failure succeeded. fi if as_func_ret_success; then : else exitcode=1 echo as_func_ret_success failed. fi if as_func_ret_failure; then exitcode=1 echo as_func_ret_failure succeeded. fi if ( set x; as_func_ret_success y && test x = \"\$1\" ); then : else exitcode=1 echo positional parameters were not saved. fi test \$exitcode = 0") || { echo No shell found that supports shell functions. echo Please tell autoconf@gnu.org about your system, echo including any error possibly output before this echo message } as_lineno_1=$LINENO as_lineno_2=$LINENO test "x$as_lineno_1" != "x$as_lineno_2" && test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { # 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 after each line using $LINENO; the second 'sed' # does the real work. The second script uses 'N' to pair each # line-number line with the line containing $LINENO, 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 # scripts with optimization help from Paolo Bonzini. Blame Lee # E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { 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 sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in -n*) case `echo 'x\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. *) ECHO_C='\c';; esac;; *) ECHO_N='-n';; esac if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir fi echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p=: else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= SHELL=${CONFIG_SHELL-/bin/sh} # Identity of this package. PACKAGE_NAME= PACKAGE_TARNAME= PACKAGE_VERSION= PACKAGE_STRING= PACKAGE_BUGREPORT= ac_unique_file="owl.c" # Factoring default headers for most tests. ac_includes_default="\ #include #ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_SYS_STAT_H # include #endif #ifdef STDC_HEADERS # include # include #else # ifdef HAVE_STDLIB_H # include # endif #endif #ifdef HAVE_STRING_H # if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif #ifdef HAVE_STRINGS_H # include #endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif #ifdef HAVE_UNISTD_H # include #endif" ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datarootdir datadir sysconfdir sharedstatedir localstatedir includedir oldincludedir docdir infodir htmldir dvidir pdfdir psdir libdir localedir mandir DEFS ECHO_C ECHO_N ECHO_T LIBS build_alias host_alias target_alias CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP GREP EGREP PKG_CONFIG GLIB_CFLAGS GLIB_LIBS XSUBPPDIR INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA subdirs LIBOBJS LTLIBOBJS' ac_subst_files='' ac_precious_vars='build_alias host_alias target_alias CC CFLAGS LDFLAGS LIBS CPPFLAGS CPP PKG_CONFIG GLIB_CFLAGS GLIB_LIBS' ac_subdirs_all='libfaim' # 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. # (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval $ac_prev=\$ac_option ac_prev= continue fi case $ac_option in *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -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) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_feature=`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 ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_feature=`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'` 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 ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -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 ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -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 ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) 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'` 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; }; } 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 directory names. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir do eval ac_val=\$$ac_var case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 { (exit 1); exit 1; }; } 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 ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || { echo "$as_me: error: Working directory cannot be determined" >&2 { (exit 1); exit 1; }; } test "X$ac_ls_di" = "X$ac_pwd_ls_di" || { echo "$as_me: error: pwd does not report name of working directory" >&2 { (exit 1); exit 1; }; } # 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 the parent directory. ac_confdir=`$as_dirname -- "$0" || $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 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 { (exit 1); exit 1; }; } fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2 { (exit 1); exit 1; }; } pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures 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 \`..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF _ACEOF fi if test -n "$ac_init_help"; then cat <<\_ACEOF Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP C preprocessor PKG_CONFIG path to pkg-config utility GLIB_CFLAGS C compiler flags for GLIB, overriding pkg-config GLIB_LIBS linker flags for GLIB, overriding pkg-config Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } # Check for guested configure. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive elif test -f "$ac_srcdir/configure"; then echo && $SHELL "$ac_srcdir/configure" --help=recursive else echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF configure generated by GNU Autoconf 2.61 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by $as_me, which was generated by GNU Autoconf 2.61. Invocation command line was $ $0 $@ _ACEOF exec 5>>config.log { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. echo "PATH: $as_dir" done IFS=$as_save_IFS } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) ac_arg=`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_arg'" ;; 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: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo cat <<\_ASBOX ## ---------------- ## ## Cache variables. ## ## ---------------- ## _ASBOX echo # The following way of writing the cache mishandles newlines in values, ( for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( *) $as_unset $ac_var ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( *${as_nl}ac_space=\ *) sed -n \ "s/'\''/'\''\\\\'\'''\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo cat <<\_ASBOX ## ----------------- ## ## Output variables. ## ## ----------------- ## _ASBOX echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then cat <<\_ASBOX ## ------------------- ## ## File substitutions. ## ## ------------------- ## _ASBOX echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then cat <<\_ASBOX ## ----------- ## ## confdefs.h. ## ## ----------- ## _ASBOX echo cat confdefs.h echo fi test "$ac_signal" != 0 && echo "$as_me: caught signal $ac_signal" echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h # 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 -n "$CONFIG_SITE"; then set x "$CONFIG_SITE" elif test "x$prefix" != xNONE; then set x "$prefix/share/config.site" "$prefix/etc/config.site" else set x "$ac_default_prefix/share/config.site" \ "$ac_default_prefix/etc/config.site" fi shift for ac_site_file 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 $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val=\$ac_cv_env_${ac_var}_value eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { 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 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 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { 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 if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { 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 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { 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.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { 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.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { 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 if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi 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` { (ac_try="$ac_compiler --version >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler --version >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -v >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler -v >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -V >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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[^ ]*//'` # # List of possible output files, starting from the most likely. # The algorithm is not robust to junk in `.', hence go to wildcards (a.*) # only as a last resort. b.out is created by i960 compilers. ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out' # # The IRIX 6 linker writes into existing files which may not be # executable, retaining their permissions. Remove them first so a # subsequent execution test works. ac_rmfiles= for ac_file in $ac_files do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles if { (ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link_default") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not # safe: cross compilers may not add the suffix if given an `-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. break;; * ) break;; esac done test "$ac_cv_exeext" = no && ac_cv_exeext= else ac_file='' fi { echo "$as_me:$LINENO: result: $ac_file" >&5 echo "${ECHO_T}$ac_file" >&6; } if test -z "$ac_file"; then 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 # Check that 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' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 that 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 { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 | *.map | *.inf | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` 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 { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;; *) 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 { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; 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 core 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 { 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 ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" 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 { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 CFLAGS="" 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 { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" 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 { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { 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 ISO C89" >&5 echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; } if test "${ac_cv_prog_cc_c89+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_prog_cc_c89=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 -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_c89=$ac_arg else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { echo "$as_me:$LINENO: result: none needed" >&5 echo "${ECHO_T}none needed" >&6; } ;; xno) { echo "$as_me:$LINENO: result: unsupported" >&5 echo "${ECHO_T}unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;; esac 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 "$GCC" = yes; then CFLAGS="$CFLAGS -Wall -g -D_FORTIFY_SOURCE=2"; fi { echo "$as_me:$LINENO: checking for /usr/athena/include" >&5 echo $ECHO_N "checking for /usr/athena/include... $ECHO_C" >&6; } if test -d /usr/athena/include; then CFLAGS=${CFLAGS}\ -I/usr/athena/include CPPFLAGS=${CPPFLAGS}\ -I/usr/athena/include { 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 for /usr/athena/lib" >&5 echo $ECHO_N "checking for /usr/athena/lib... $ECHO_C" >&6; } if test -d /usr/athena/lib; then LDFLAGS=-L/usr/athena/lib\ ${LDFLAGS} { 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 for /usr/include/kerberosIV" >&5 echo $ECHO_N "checking for /usr/include/kerberosIV... $ECHO_C" >&6; } if test -d /usr/include/kerberosIV; then CFLAGS=${CFLAGS}\ -I/usr/include/kerberosIV CPPFLAGS=${CPPFLAGS}\ -I/usr/include/kerberosIV { 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 PROTECT_CFLAGS=${PROTECT_CFLAGS-"-fstack-protector"} SAVE_CFLAGS=$CFLAGS CFLAGS="$CFLAGS $PROTECT_CFLAGS" { echo "$as_me:$LINENO: checking whether protection cflags work" >&5 echo $ECHO_N "checking whether protection cflags work... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF int i; _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } CFLAGS=$SAVE_CFLAGS fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { echo "$as_me:$LINENO: checking for __stack_chk_guard in -lssp" >&5 echo $ECHO_N "checking for __stack_chk_guard in -lssp... $ECHO_C" >&6; } if test "${ac_cv_lib_ssp___stack_chk_guard+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lssp $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 GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char __stack_chk_guard (); int main () { return __stack_chk_guard (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_ssp___stack_chk_guard=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_ssp___stack_chk_guard=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_ssp___stack_chk_guard" >&5 echo "${ECHO_T}$ac_cv_lib_ssp___stack_chk_guard" >&6; } if test $ac_cv_lib_ssp___stack_chk_guard = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBSSP 1 _ACEOF LIBS="-lssp $LIBS" fi { echo "$as_me:$LINENO: checking for initscr in -lncurses" >&5 echo $ECHO_N "checking for initscr in -lncurses... $ECHO_C" >&6; } if test "${ac_cv_lib_ncurses_initscr+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lncurses $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 GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char initscr (); int main () { return initscr (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_ncurses_initscr=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_ncurses_initscr=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_ncurses_initscr" >&5 echo "${ECHO_T}$ac_cv_lib_ncurses_initscr" >&6; } if test $ac_cv_lib_ncurses_initscr = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBNCURSES 1 _ACEOF LIBS="-lncurses $LIBS" else { echo "$as_me:$LINENO: checking for initscr in -lcurses" >&5 echo $ECHO_N "checking for initscr in -lcurses... $ECHO_C" >&6; } if test "${ac_cv_lib_curses_initscr+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcurses $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 GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char initscr (); int main () { return initscr (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_curses_initscr=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_curses_initscr=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_curses_initscr" >&5 echo "${ECHO_T}$ac_cv_lib_curses_initscr" >&6; } if test $ac_cv_lib_curses_initscr = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBCURSES 1 _ACEOF LIBS="-lcurses $LIBS" else { { echo "$as_me:$LINENO: error: No curses library found." >&5 echo "$as_me: error: No curses library found." >&2;} { (exit 1); exit 1; }; } fi fi { echo "$as_me:$LINENO: checking for com_err in -lcom_err" >&5 echo $ECHO_N "checking for com_err in -lcom_err... $ECHO_C" >&6; } if test "${ac_cv_lib_com_err_com_err+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcom_err $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 GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char com_err (); int main () { return com_err (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_com_err_com_err=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_com_err_com_err=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_com_err_com_err" >&5 echo "${ECHO_T}$ac_cv_lib_com_err_com_err" >&6; } if test $ac_cv_lib_com_err_com_err = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBCOM_ERR 1 _ACEOF LIBS="-lcom_err $LIBS" fi { 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 GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char gethostbyname (); int main () { return gethostbyname (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; 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 core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 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 cat >>confdefs.h <<_ACEOF #define HAVE_LIBNSL 1 _ACEOF LIBS="-lnsl $LIBS" fi { echo "$as_me:$LINENO: checking for socket in -lsocket" >&5 echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6; } if test "${ac_cv_lib_socket_socket+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsocket $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 GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char socket (); int main () { return socket (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_socket_socket=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_socket_socket=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5 echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6; } if test $ac_cv_lib_socket_socket = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBSOCKET 1 _ACEOF LIBS="-lsocket $LIBS" fi { echo "$as_me:$LINENO: checking for krb5_derive_key in -lk5crypto" >&5 echo $ECHO_N "checking for krb5_derive_key in -lk5crypto... $ECHO_C" >&6; } if test "${ac_cv_lib_k5crypto_krb5_derive_key+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lk5crypto $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 GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char krb5_derive_key (); int main () { return krb5_derive_key (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_k5crypto_krb5_derive_key=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_k5crypto_krb5_derive_key=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_k5crypto_krb5_derive_key" >&5 echo "${ECHO_T}$ac_cv_lib_k5crypto_krb5_derive_key" >&6; } if test $ac_cv_lib_k5crypto_krb5_derive_key = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBK5CRYPTO 1 _ACEOF LIBS="-lk5crypto $LIBS" fi { echo "$as_me:$LINENO: checking for des_cbc_encrypt in -ldes425" >&5 echo $ECHO_N "checking for des_cbc_encrypt in -ldes425... $ECHO_C" >&6; } if test "${ac_cv_lib_des425_des_cbc_encrypt+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldes425 $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 GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char des_cbc_encrypt (); int main () { return des_cbc_encrypt (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_des425_des_cbc_encrypt=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_des425_des_cbc_encrypt=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_des425_des_cbc_encrypt" >&5 echo "${ECHO_T}$ac_cv_lib_des425_des_cbc_encrypt" >&6; } if test $ac_cv_lib_des425_des_cbc_encrypt = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBDES425 1 _ACEOF LIBS="-ldes425 $LIBS" fi { echo "$as_me:$LINENO: checking for res_search in -lresolv" >&5 echo $ECHO_N "checking for res_search in -lresolv... $ECHO_C" >&6; } if test "${ac_cv_lib_resolv_res_search+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lresolv $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 GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char res_search (); int main () { return res_search (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_resolv_res_search=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_resolv_res_search=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_res_search" >&5 echo "${ECHO_T}$ac_cv_lib_resolv_res_search" >&6; } if test $ac_cv_lib_resolv_res_search = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBRESOLV 1 _ACEOF LIBS="-lresolv $LIBS" fi { echo "$as_me:$LINENO: checking for krb5_get_credentials in -lkrb5" >&5 echo $ECHO_N "checking for krb5_get_credentials in -lkrb5... $ECHO_C" >&6; } if test "${ac_cv_lib_krb5_krb5_get_credentials+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lkrb5 $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 GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char krb5_get_credentials (); int main () { return krb5_get_credentials (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_krb5_krb5_get_credentials=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_krb5_krb5_get_credentials=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_krb5_krb5_get_credentials" >&5 echo "${ECHO_T}$ac_cv_lib_krb5_krb5_get_credentials" >&6; } if test $ac_cv_lib_krb5_krb5_get_credentials = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBKRB5 1 _ACEOF LIBS="-lkrb5 $LIBS" fi { echo "$as_me:$LINENO: checking for krb_sendauth in -lkrb4" >&5 echo $ECHO_N "checking for krb_sendauth in -lkrb4... $ECHO_C" >&6; } if test "${ac_cv_lib_krb4_krb_sendauth+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lkrb4 $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 GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char krb_sendauth (); int main () { return krb_sendauth (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_krb4_krb_sendauth=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_krb4_krb_sendauth=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_krb4_krb_sendauth" >&5 echo "${ECHO_T}$ac_cv_lib_krb4_krb_sendauth" >&6; } if test $ac_cv_lib_krb4_krb_sendauth = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBKRB4 1 _ACEOF LIBS="-lkrb4 $LIBS" else { echo "$as_me:$LINENO: checking for krb_sendauth in -lkrb" >&5 echo $ECHO_N "checking for krb_sendauth in -lkrb... $ECHO_C" >&6; } if test "${ac_cv_lib_krb_krb_sendauth+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lkrb $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 GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char krb_sendauth (); int main () { return krb_sendauth (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_krb_krb_sendauth=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_krb_krb_sendauth=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_krb_krb_sendauth" >&5 echo "${ECHO_T}$ac_cv_lib_krb_krb_sendauth" >&6; } if test $ac_cv_lib_krb_krb_sendauth = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBKRB 1 _ACEOF LIBS="-lkrb $LIBS" fi fi { echo "$as_me:$LINENO: checking for ZGetSender in -lzephyr" >&5 echo $ECHO_N "checking for ZGetSender in -lzephyr... $ECHO_C" >&6; } if test "${ac_cv_lib_zephyr_ZGetSender+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lzephyr $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 GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char ZGetSender (); int main () { return ZGetSender (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_zephyr_ZGetSender=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_zephyr_ZGetSender=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_zephyr_ZGetSender" >&5 echo "${ECHO_T}$ac_cv_lib_zephyr_ZGetSender" >&6; } if test $ac_cv_lib_zephyr_ZGetSender = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBZEPHYR 1 _ACEOF LIBS="-lzephyr $LIBS" fi { echo "$as_me:$LINENO: checking for ZInitLocationInfo in -lzephyr" >&5 echo $ECHO_N "checking for ZInitLocationInfo in -lzephyr... $ECHO_C" >&6; } if test "${ac_cv_lib_zephyr_ZInitLocationInfo+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lzephyr $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 GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char ZInitLocationInfo (); int main () { return ZInitLocationInfo (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_zephyr_ZInitLocationInfo=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_zephyr_ZInitLocationInfo=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_zephyr_ZInitLocationInfo" >&5 echo "${ECHO_T}$ac_cv_lib_zephyr_ZInitLocationInfo" >&6; } if test $ac_cv_lib_zephyr_ZInitLocationInfo = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_LIBZEPHYR_ZINITLOCATIONINFO _ACEOF fi for ac_func in use_default_colors resizeterm des_string_to_key des_key_sched des_ecb_encrypt 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 { as_var=$as_ac_var; eval "test \"\${$as_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 GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $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 #endif int main () { return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; 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 core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval echo '${'$as_ac_var'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&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 for des_ecb_encrypt prototype" >&5 echo $ECHO_N "checking for des_ecb_encrypt prototype... $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 int des_ecb_encrypt(char foo[], char bar[], des_key_schedule baz, int qux); int main () { int foo = des_ecb_encrypt(0,0,0,0); ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_des_ecb_encrypt_proto=no else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_des_ecb_encrypt_proto=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_cv_des_ecb_encrypt_proto" >&5 echo "${ECHO_T}$ac_cv_des_ecb_encrypt_proto" >&6; } if test "$ac_cv_des_ecb_encrypt_proto" = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_DES_ECB_ENCRYPT_PROTO _ACEOF 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 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 { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.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 nonexistent 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 { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.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 { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.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 nonexistent 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 { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.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 grep that handles long lines and -e" >&5 echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; } if test "${ac_cv_path_GREP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # Extract the first word of "grep ggrep" to use in msg output if test -z "$GREP"; then set dummy grep ggrep; ac_prog_name=$2 if test "${ac_cv_path_GREP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_path_GREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in *GNU*) ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; *) ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" echo 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break ac_count=`expr $ac_count + 1` if test $ac_count -gt ${ac_path_GREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_GREP_found && break 3 done done done IFS=$as_save_IFS fi GREP="$ac_cv_path_GREP" if test -z "$GREP"; then { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} { (exit 1); exit 1; }; } fi else ac_cv_path_GREP=$GREP fi fi { echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 echo "${ECHO_T}$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" { echo "$as_me:$LINENO: checking for egrep" >&5 echo $ECHO_N "checking for egrep... $ECHO_C" >&6; } if test "${ac_cv_path_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_path_EGREP="$GREP -E" else # Extract the first word of "egrep" to use in msg output if test -z "$EGREP"; then set dummy egrep; ac_prog_name=$2 if test "${ac_cv_path_EGREP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_path_EGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; *) ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" echo 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break ac_count=`expr $ac_count + 1` if test $ac_count -gt ${ac_path_EGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_EGREP_found && break 3 done done done IFS=$as_save_IFS fi EGREP="$ac_cv_path_EGREP" if test -z "$EGREP"; then { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} { (exit 1); exit 1; }; } fi else ac_cv_path_EGREP=$EGREP fi fi fi { echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 echo "${ECHO_T}$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_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 { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; 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 core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat >conftest.$ac_ext <<_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 #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core.conftest.* 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 int) (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 { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; 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 core 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 { as_var=$as_ac_Header; eval "test \"\${$as_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. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; 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 core conftest.err conftest.$ac_objext conftest.$ac_ext fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&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 strings.h sys/ioctl.h sys/filio.h unistd.h com_err.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&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 { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; 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 core 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 { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.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;} ;; esac { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&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 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. set dummy ${ac_tool_prefix}pkg-config; 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_path_PKG_CONFIG+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 echo "${ECHO_T}$PKG_CONFIG" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi fi if test -z "$ac_cv_path_PKG_CONFIG"; then ac_pt_PKG_CONFIG=$PKG_CONFIG # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; 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_path_ac_pt_PKG_CONFIG+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $ac_pt_PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG if test -n "$ac_pt_PKG_CONFIG"; then { echo "$as_me:$LINENO: result: $ac_pt_PKG_CONFIG" >&5 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "x$ac_pt_PKG_CONFIG" = x; then PKG_CONFIG="" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac PKG_CONFIG=$ac_pt_PKG_CONFIG fi else PKG_CONFIG="$ac_cv_path_PKG_CONFIG" fi fi if test -n "$PKG_CONFIG"; then _pkg_min_version=0.9.0 { echo "$as_me:$LINENO: checking pkg-config is at least version $_pkg_min_version" >&5 echo $ECHO_N "checking pkg-config is at least version $_pkg_min_version... $ECHO_C" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; 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; } PKG_CONFIG="" fi fi pkg_failed=no { echo "$as_me:$LINENO: checking for GLIB" >&5 echo $ECHO_N "checking for GLIB... $ECHO_C" >&6; } if test -n "$PKG_CONFIG"; then if test -n "$GLIB_CFLAGS"; then pkg_cv_GLIB_CFLAGS="$GLIB_CFLAGS" else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"glib-2.0\"") >&5 ($PKG_CONFIG --exists --print-errors "glib-2.0") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then pkg_cv_GLIB_CFLAGS=`$PKG_CONFIG --cflags "glib-2.0" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test -n "$PKG_CONFIG"; then if test -n "$GLIB_LIBS"; then pkg_cv_GLIB_LIBS="$GLIB_LIBS" else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"glib-2.0\"") >&5 ($PKG_CONFIG --exists --print-errors "glib-2.0") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then pkg_cv_GLIB_LIBS=`$PKG_CONFIG --libs "glib-2.0" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test $pkg_failed = yes; then if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then GLIB_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "glib-2.0"` else GLIB_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "glib-2.0"` fi # Put the nasty error message in config.log where it belongs echo "$GLIB_PKG_ERRORS" >&5 { { echo "$as_me:$LINENO: error: Package requirements (glib-2.0) were not met: $GLIB_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables GLIB_CFLAGS and GLIB_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. " >&5 echo "$as_me: error: Package requirements (glib-2.0) were not met: $GLIB_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables GLIB_CFLAGS and GLIB_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. " >&2;} { (exit 1); exit 1; }; } elif test $pkg_failed = untried; then { { echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables GLIB_CFLAGS and GLIB_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See \`config.log' for more details." >&5 echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables GLIB_CFLAGS and GLIB_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } else GLIB_CFLAGS=$pkg_cv_GLIB_CFLAGS GLIB_LIBS=$pkg_cv_GLIB_LIBS { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } : fi echo Adding glib-2.0 CFLAGS ${GLIB_CFLAGS} CFLAGS="${GLIB_CFLAGS} ${CFLAGS}" echo Adding glib-2.0 LDFLAGS ${GLIB_LIBS} LDFLAGS="${GLIB_LIBS} ${LDFLAGS}" FOO=`perl -MExtUtils::Embed -e ccopts` echo Adding perl CFLAGS ${FOO} CFLAGS=${CFLAGS}\ ${FOO} { echo "$as_me:$LINENO: checking for the perl xsubpp precompiler" >&5 echo $ECHO_N "checking for the perl xsubpp precompiler... $ECHO_C" >&6; } XSUBPPDIR="`(perl -MExtUtils::MakeMaker -e 'print ExtUtils::MakeMaker->new({NAME => qw(owl)})->tool_xsubpp;') | grep \^XSUBPPDIR | sed -e 's/XSUBPPDIR = //g;'`" if test -n "${XSUBPPDIR}"; then { echo "$as_me:$LINENO: result: ${XSUBPPDIR}" >&5 echo "${ECHO_T}${XSUBPPDIR}" >&6; } else { { echo "$as_me:$LINENO: error: not found" >&5 echo "$as_me: error: not found" >&2;} { (exit 1); exit 1; }; } fi FOO=`perl -MExtUtils::Embed -e ldopts | sed 's/,-E//' | sed 's/-liconv//'` echo Adding perl LDFLAGS ${FOO} LDFLAGS=${LDFLAGS}\ ${FOO} { echo "$as_me:$LINENO: checking for /usr/share/terminfo" >&5 echo $ECHO_N "checking for /usr/share/terminfo... $ECHO_C" >&6; } if test "${ac_cv_file__usr_share_terminfo+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 "/usr/share/terminfo"; then ac_cv_file__usr_share_terminfo=yes else ac_cv_file__usr_share_terminfo=no fi fi { echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_terminfo" >&5 echo "${ECHO_T}$ac_cv_file__usr_share_terminfo" >&6; } if test $ac_cv_file__usr_share_terminfo = yes; then cat >>confdefs.h <<\_ACEOF #define TERMINFO "/usr/share/terminfo" _ACEOF else { echo "$as_me:$LINENO: checking for /usr/share/lib/terminfo" >&5 echo $ECHO_N "checking for /usr/share/lib/terminfo... $ECHO_C" >&6; } if test "${ac_cv_file__usr_share_lib_terminfo+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 "/usr/share/lib/terminfo"; then ac_cv_file__usr_share_lib_terminfo=yes else ac_cv_file__usr_share_lib_terminfo=no fi fi { echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_lib_terminfo" >&5 echo "${ECHO_T}$ac_cv_file__usr_share_lib_terminfo" >&6; } if test $ac_cv_file__usr_share_lib_terminfo = yes; then cat >>confdefs.h <<\_ACEOF #define TERMINFO "/usr/share/lib/terminfo" _ACEOF else { { echo "$as_me:$LINENO: error: No terminfo found for this system" >&5 echo "$as_me: error: No terminfo found for this system" >&2;} { (exit 1); exit 1; }; } fi fi 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 # These three variables are undocumented and unsupported, # and are intended to be withdrawn in a future Autoconf release. # They can cause serious problems if a builder's source tree is in a directory # whose full name contains unusual characters. ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # 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 { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then if test $ac_prog = install && grep dspmsg "$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 IFS=$as_save_IFS fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. 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' subdirs="$subdirs libfaim" ac_config_files="$ac_config_files 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, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. ( for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( *) $as_unset $ac_var ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes (double-quote # substitution turns \\\\ into \\, and sed turns \\ into \). sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then test "x$cache_file" != "x/dev/null" && { echo "$as_me:$LINENO: updating cache $cache_file" >&5 echo "$as_me: updating cache $cache_file" >&6;} cat confcache >$cache_file else { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 echo "$as_me: not updating unwritable cache $cache_file" >&6;} 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}' 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_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext" ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs : ${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 more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi # PATH needs CR # 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 # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset else as_unset=false fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) as_nl=' ' IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. case $0 in *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 { (exit 1); exit 1; } fi # Work around bugs in pre-3.0 UWIN ksh. for as_var in ENV MAIL MAILPATH do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var done 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) >/dev/null 2>&1 && $as_unset $as_var fi done # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi # 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'` # CDPATH. $as_unset CDPATH as_lineno_1=$LINENO as_lineno_2=$LINENO test "x$as_lineno_1" != "x$as_lineno_2" && test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { # 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 after each line using $LINENO; the second 'sed' # does the real work. The second script uses 'N' to pair each # line-number line with the line containing $LINENO, 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 # scripts with optimization help from Paolo Bonzini. Blame Lee # E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { 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 sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in -n*) case `echo 'x\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. *) ECHO_C='\c';; esac;; *) ECHO_N='-n';; esac if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir fi echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p=: else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 # Save the log message, to keep $[0] and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by $as_me, which was generated by GNU Autoconf 2.61. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF cat >>$CONFIG_STATUS <<_ACEOF # Files that config.status was made for. config_files="$ac_config_files" config_headers="$ac_config_headers" _ACEOF 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 and configuration settings, 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 Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ config.status configured by $0, generated by GNU Autoconf 2.61, with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" Copyright (C) 2006 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' _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 ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) echo "$ac_cs_version"; exit ;; --debug | --debu | --deb | --de | --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;; --he | --h) # Conflict between --help and --header { 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 ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) { 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" ac_need_defaults=false ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF if \$ac_cs_recheck; then echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 CONFIG_SHELL=$SHELL export CONFIG_SHELL exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; *) { { 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 fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= trap 'exit_status=$? { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status ' 0 trap '{ (exit 1); exit 1; }' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || { echo "$me: cannot create a temporary directory in ." >&2 { (exit 1); exit 1; } } # # Set up the sed scripts for 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 _ACEOF ac_delim='%!_!# ' for ac_last_try in false false false false false :; do cat >conf$$subs.sed <<_ACEOF SHELL!$SHELL$ac_delim PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim PACKAGE_NAME!$PACKAGE_NAME$ac_delim PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim PACKAGE_STRING!$PACKAGE_STRING$ac_delim PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim exec_prefix!$exec_prefix$ac_delim prefix!$prefix$ac_delim program_transform_name!$program_transform_name$ac_delim bindir!$bindir$ac_delim sbindir!$sbindir$ac_delim libexecdir!$libexecdir$ac_delim datarootdir!$datarootdir$ac_delim datadir!$datadir$ac_delim sysconfdir!$sysconfdir$ac_delim sharedstatedir!$sharedstatedir$ac_delim localstatedir!$localstatedir$ac_delim includedir!$includedir$ac_delim oldincludedir!$oldincludedir$ac_delim docdir!$docdir$ac_delim infodir!$infodir$ac_delim htmldir!$htmldir$ac_delim dvidir!$dvidir$ac_delim pdfdir!$pdfdir$ac_delim psdir!$psdir$ac_delim libdir!$libdir$ac_delim localedir!$localedir$ac_delim mandir!$mandir$ac_delim DEFS!$DEFS$ac_delim ECHO_C!$ECHO_C$ac_delim ECHO_N!$ECHO_N$ac_delim ECHO_T!$ECHO_T$ac_delim LIBS!$LIBS$ac_delim build_alias!$build_alias$ac_delim host_alias!$host_alias$ac_delim target_alias!$target_alias$ac_delim CC!$CC$ac_delim CFLAGS!$CFLAGS$ac_delim LDFLAGS!$LDFLAGS$ac_delim CPPFLAGS!$CPPFLAGS$ac_delim ac_ct_CC!$ac_ct_CC$ac_delim EXEEXT!$EXEEXT$ac_delim OBJEXT!$OBJEXT$ac_delim CPP!$CPP$ac_delim GREP!$GREP$ac_delim EGREP!$EGREP$ac_delim PKG_CONFIG!$PKG_CONFIG$ac_delim GLIB_CFLAGS!$GLIB_CFLAGS$ac_delim GLIB_LIBS!$GLIB_LIBS$ac_delim XSUBPPDIR!$XSUBPPDIR$ac_delim INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim INSTALL_DATA!$INSTALL_DATA$ac_delim subdirs!$subdirs$ac_delim LIBOBJS!$LIBOBJS$ac_delim LTLIBOBJS!$LTLIBOBJS$ac_delim _ACEOF if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 57; then break elif $ac_last_try; then { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} { (exit 1); exit 1; }; } else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` if test -n "$ac_eof"; then ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` ac_eof=`expr $ac_eof + 1` fi cat >>$CONFIG_STATUS <<_ACEOF cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof /@[a-zA-Z_][a-zA-Z_0-9]*@/!b end _ACEOF sed ' s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g s/^/s,@/; s/!/@,|#_!!_#|/ :n t n s/'"$ac_delim"'$/,g/; t s/$/\\/; p N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n ' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF :end s/|#_!!_#|//g CEOF$ac_eof _ACEOF # VPATH may cause trouble with some makes, so we remove $(srcdir), # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=/{ s/:*\$(srcdir):*/:/ s/:*\${srcdir}:*/:/ s/:*@srcdir@:*/:/ s/^\([^=]*=[ ]*\):*/\1/ s/:*$// s/^[^=]*=[ ]*$// }' fi cat >>$CONFIG_STATUS <<\_ACEOF fi # test -n "$CONFIG_FILES" for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5 echo "$as_me: error: Invalid tag $ac_tag." >&2;} { (exit 1); exit 1; }; };; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 echo "$as_me: error: cannot find input file: $ac_f" >&2;} { (exit 1); exit 1; }; };; esac ac_file_inputs="$ac_file_inputs $ac_f" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input="Generated from "`IFS=: echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure." if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { echo "$as_me:$LINENO: creating $ac_file" >&5 echo "$as_me: creating $ac_file" >&6;} fi case $ac_tag in *:-:* | *:-) cat >"$tmp/stdin";; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` { as_dir="$ac_dir" case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 echo "$as_me: error: cannot create directory $as_dir" >&2;} { (exit 1); exit 1; }; }; } ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= case `sed -n '/datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p ' $ac_file_inputs` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF 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&@top_builddir@&$ac_top_builddir_sub&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t $ac_datarootdir_hack " $ac_file_inputs | sed -f "$tmp/subs-1.sed" >$tmp/out test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined." >&5 echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined." >&2;} rm -f "$tmp/stdin" case $ac_file in -) cat "$tmp/out"; rm -f "$tmp/out";; *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;; esac ;; :H) # # CONFIG_HEADER # _ACEOF # Transform confdefs.h into a sed script `conftest.defines', that # substitutes the proper values into config.h.in to produce config.h. rm -f conftest.defines conftest.tail # First, append a space to every undef/define line, to ease matching. echo 's/$/ /' >conftest.defines # Then, protect against being on the right side of a sed subst, or in # an unquoted here document, in config.status. If some macros were # called several times there might be several #defines for the same # symbol, which is useless. But do not sort them, since the last # AC_DEFINE must be honored. ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* # These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where # NAME is the cpp macro being defined, VALUE is the value it is being given. # PARAMS is the parameter list in the macro definition--in most cases, it's # just an empty string. ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*' ac_dB='\\)[ (].*,\\1define\\2' ac_dC=' ' ac_dD=' ,' uniq confdefs.h | sed -n ' t rset :rset s/^[ ]*#[ ]*define[ ][ ]*// t ok d :ok s/[\\&,]/\\&/g s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p ' >>conftest.defines # Remove the space that was appended to ease matching. # Then replace #undef with comments. This is necessary, for # example, in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. # (The regexp can be short, since the line contains either #define or #undef.) echo 's/ $// s,^[ #]*u.*,/* & */,' >>conftest.defines # Break up conftest.defines: ac_max_sed_lines=50 # First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1" # Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2" # Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1" # et cetera. ac_in='$ac_file_inputs' ac_out='"$tmp/out1"' ac_nxt='"$tmp/out2"' while : do # Write a here document: cat >>$CONFIG_STATUS <<_ACEOF # First, check the format of the line: cat >"\$tmp/defines.sed" <<\\CEOF /^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def /^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def b :def _ACEOF sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS echo 'CEOF sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail grep . conftest.tail >/dev/null || break rm -f conftest.defines mv conftest.tail conftest.defines done rm -f conftest.defines conftest.tail echo "ac_result=$ac_in" >>$CONFIG_STATUS cat >>$CONFIG_STATUS <<\_ACEOF if test x"$ac_file" != x-; then echo "/* $configure_input */" >"$tmp/config.h" cat "$ac_result" >>"$tmp/config.h" 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 rm -f $ac_file mv "$tmp/config.h" $ac_file fi else echo "/* $configure_input */" cat "$ac_result" fi rm -f "$tmp/out12" ;; esac done # for ac_tag { (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= eval "set x $ac_configure_args" shift for ac_arg 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=*) ;; *) case $ac_arg in *\'*) ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac 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_arg="--prefix=$prefix" case $ac_arg in *\'*) ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args" # Pass --silent if test "$silent" = yes; then ac_sub_configure_args="--silent $ac_sub_configure_args" fi 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 ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)" echo "$as_me:$LINENO: $ac_msg" >&5 echo "$ac_msg" >&6 { as_dir="$ac_dir" case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 echo "$as_me: error: cannot create directory $as_dir" >&2;} { (exit 1); exit 1; }; }; } ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" # Check for guested configure; otherwise get Cygnus style configure. if test -f "$ac_srcdir/configure.gnu"; then ac_sub_configure=$ac_srcdir/configure.gnu elif test -f "$ac_srcdir/configure"; then ac_sub_configure=$ac_srcdir/configure elif test -f "$ac_srcdir/configure.in"; then # This should be Cygnus configure. ac_sub_configure=$ac_aux_dir/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 name. ac_sub_cache_file=$ac_top_build_prefix$cache_file ;; esac { echo "$as_me:$LINENO: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&5 echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;} # The eval makes quoting arguments work. eval "\$SHELL \"\$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 owl-2.2.2.orig/install.sh0000644000175100017510000000000011166672053014536 0ustar eichineichinowl-2.2.2.orig/fmtext.c0000644000175100017510000004155311166672053014231 0ustar eichineichin/* Copyright (c) 2002,2003,2004,2009 James M. Kretchmar * * This file is part of Owl. * * Owl 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 3 of the License, or * (at your option) any later version. * * Owl 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 Owl. If not, see . * * --------------------------------------------------------------- * * As of Owl version 2.1.12 there are patches contributed by * developers of the branched BarnOwl project, Copyright (c) * 2006-2009 The BarnOwl Developers. All rights reserved. */ #include "owl.h" #include #include static const char fileIdent[] = "$Id: fmtext.c,v 1.17 2009/03/29 12:38:20 kretch Exp $"; /* initialize an fmtext with no data */ void owl_fmtext_init_null(owl_fmtext *f) { f->textlen=0; f->textbuff=owl_strdup(""); f->fmbuff=owl_malloc(5); f->colorbuff=owl_malloc(5); f->fmbuff[0]=OWL_FMTEXT_ATTR_NONE; f->colorbuff[0]=OWL_COLOR_DEFAULT; } /* Internal function. Set the attribute 'attr' from index 'first' to * index 'last' */ void _owl_fmtext_set_attr(owl_fmtext *f, int attr, int first, int last) { int i; for (i=first; i<=last; i++) { f->fmbuff[i]=(unsigned char) attr; } } /* Internal function. Add the attribute 'attr' to the existing * attributes from index 'first' to index 'last' */ void _owl_fmtext_add_attr(owl_fmtext *f, int attr, int first, int last) { int i; for (i=first; i<=last; i++) { f->fmbuff[i]|=(unsigned char) attr; } } /* Internal function. Set the color to be 'color' from index 'first' * to index 'last */ void _owl_fmtext_set_color(owl_fmtext *f, int color, int first, int last) { int i; for (i=first; i<=last; i++) { f->colorbuff[i]=(unsigned char) color; } } /* append text to the end of 'f' with attribute 'attr' and color * 'color' */ void owl_fmtext_append_attr(owl_fmtext *f, char *text, int attr, int color) { int newlen; newlen=strlen(f->textbuff)+strlen(text); f->textbuff=owl_realloc(f->textbuff, newlen+2); f->fmbuff=owl_realloc(f->fmbuff, newlen+2); f->colorbuff=owl_realloc(f->colorbuff, newlen+2); strcat(f->textbuff, text); _owl_fmtext_set_attr(f, attr, f->textlen, newlen); _owl_fmtext_set_color(f, color, f->textlen, newlen); f->textlen=newlen; } /* Append normal, uncolored text 'text' to 'f' */ void owl_fmtext_append_normal(owl_fmtext *f, char *text) { owl_fmtext_append_attr(f, text, OWL_FMTEXT_ATTR_NONE, OWL_COLOR_DEFAULT); } /* Append normal text 'text' to 'f' with color 'color' */ void owl_fmtext_append_normal_color(owl_fmtext *f, char *text, int color) { owl_fmtext_append_attr(f, text, OWL_FMTEXT_ATTR_NONE, color); } /* Append bold text 'text' to 'f' */ void owl_fmtext_append_bold(owl_fmtext *f, char *text) { owl_fmtext_append_attr(f, text, OWL_FMTEXT_ATTR_BOLD, OWL_COLOR_DEFAULT); } /* Append reverse video text 'text' to 'f' */ void owl_fmtext_append_reverse(owl_fmtext *f, char *text) { owl_fmtext_append_attr(f, text, OWL_FMTEXT_ATTR_REVERSE, OWL_COLOR_DEFAULT); } /* Append reversed and bold, uncolored text 'text' to 'f' */ void owl_fmtext_append_reversebold(owl_fmtext *f, char *text) { owl_fmtext_append_attr(f, text, OWL_FMTEXT_ATTR_REVERSE | OWL_FMTEXT_ATTR_BOLD, OWL_COLOR_DEFAULT); } /* Add the attribute 'attr' to all text in 'f' */ void owl_fmtext_addattr(owl_fmtext *f, int attr) { /* add the attribute to all text */ int i, j; j=f->textlen; for (i=0; ifmbuff[i] |= attr; } } /* Anywhere the color is NOT ALREDY SET, set the color to 'color'. * Other colors are left unchanged */ void owl_fmtext_colorize(owl_fmtext *f, int color) { /* everywhere the color is OWL_COLOR_DEFAULT, change it to be 'color' */ int i, j; j=f->textlen; for(i=0; icolorbuff[i]==OWL_COLOR_DEFAULT) f->colorbuff[i] = color; } } /* Internal function. Append text from 'in' between index 'start' and * 'stop' to the end of 'f' */ void _owl_fmtext_append_fmtext(owl_fmtext *f, owl_fmtext *in, int start, int stop) { int newlen, i; newlen=strlen(f->textbuff)+(stop-start+1); f->textbuff=owl_realloc(f->textbuff, newlen+1); f->fmbuff=owl_realloc(f->fmbuff, newlen+1); f->colorbuff=owl_realloc(f->colorbuff, newlen+1); strncat(f->textbuff, in->textbuff+start, stop-start+1); f->textbuff[newlen]='\0'; for (i=start; i<=stop; i++) { f->fmbuff[f->textlen+(i-start)]=in->fmbuff[i]; f->colorbuff[f->textlen+(i-start)]=in->colorbuff[i]; } f->textlen=newlen; } /* append fmtext 'in' to 'f' */ void owl_fmtext_append_fmtext(owl_fmtext *f, owl_fmtext *in) { _owl_fmtext_append_fmtext(f, in, 0, in->textlen); } /* Append 'nspaces' number of spaces to the end of 'f' */ void owl_fmtext_append_spaces(owl_fmtext *f, int nspaces) { int i; for (i=0; itextbuff)); } /* add the formatted text to the curses window 'w'. The window 'w' * must already be initiatlized with curses */ void owl_fmtext_curs_waddstr(owl_fmtext *f, WINDOW *w) { char *tmpbuff; int position, trans1, trans2, len, lastsame; if (w==NULL) { owl_function_debugmsg("Hit a null window in owl_fmtext_curs_waddstr."); return; } tmpbuff=owl_malloc(f->textlen+10); position=0; len=f->textlen; while (position<=len) { /* find the last char with the current format and color */ trans1=owl_util_find_trans(f->fmbuff+position, len-position); trans2=owl_util_find_trans(f->colorbuff+position, len-position); if (trans1fmbuff[position] & OWL_FMTEXT_ATTR_BOLD) { wattron(w, A_BOLD); } if (f->fmbuff[position] & OWL_FMTEXT_ATTR_REVERSE) { wattron(w, A_REVERSE); } if (f->fmbuff[position] & OWL_FMTEXT_ATTR_UNDERLINE) { wattron(w, A_UNDERLINE); } /* set the color */ /* warning, this is sort of a hack */ if (owl_global_get_hascolors(&g)) { if (f->colorbuff[position]!=OWL_COLOR_DEFAULT) { wattron(w, COLOR_PAIR(f->colorbuff[position])); } } /* add the text */ strncpy(tmpbuff, f->textbuff + position, lastsame-position+1); tmpbuff[lastsame-position+1]='\0'; waddstr(w, tmpbuff); position=lastsame+1; } owl_free(tmpbuff); } /* start with line 'aline' (where the first line is 0) and print * 'lines' number of lines into 'out' */ int owl_fmtext_truncate_lines(owl_fmtext *in, int aline, int lines, owl_fmtext *out) { char *ptr1, *ptr2; int i, offset; /* find the starting line */ ptr1=in->textbuff; if (aline!=0) { for (i=0; itextbuff; ptr2=strchr(ptr1, '\n'); if (!ptr2) { _owl_fmtext_append_fmtext(out, in, offset, (in->textlen)-1); return(-1); } _owl_fmtext_append_fmtext(out, in, offset, (ptr2-ptr1)+offset); ptr1=ptr2+1; } return(0); } /* Truncate the message so that each line begins at column 'acol' and * ends at 'bcol' or sooner. The first column is number 0. The new * message is placed in 'out'. The message is * expected to end in a * new line for now */ void owl_fmtext_truncate_cols(owl_fmtext *in, int acol, int bcol, owl_fmtext *out) { char *ptr1, *ptr2, *last; int len, offset; last=in->textbuff+in->textlen-1; ptr1=in->textbuff; while (ptr1<=last) { ptr2=strchr(ptr1, '\n'); if (!ptr2) { /* but this shouldn't happen if we end in a \n */ break; } if (ptr2==ptr1) { owl_fmtext_append_normal(out, "\n"); ptr1++; continue; } /* we need to check that we won't run over here */ len=bcol-acol; if (len > (ptr2-(ptr1+acol))) { /* the whole line fits with room to spare, don't take a full 'len' */ len=ptr2-(ptr1+acol); } if (len>last-ptr1) { /* the whole rest of the text fits with room to spare, adjust for it */ len-=(last-ptr1); } if (len<=0) { /* saftey check */ owl_fmtext_append_normal(out, "\n"); ptr1=ptr2+1; continue; } offset=ptr1-in->textbuff; _owl_fmtext_append_fmtext(out, in, offset+acol, offset+acol+len); ptr1=ptr2+1; } } /* Return the number of lines in 'f' */ int owl_fmtext_num_lines(owl_fmtext *f) { int lines, i; if (f->textlen==0) return(0); lines=0; for (i=0; itextlen; i++) { if (f->textbuff[i]=='\n') lines++; } /* if the last char wasn't a \n there's one more line */ if (f->textbuff[i-1]!='\n') lines++; return(lines); } char *owl_fmtext_get_text(owl_fmtext *f) { return(f->textbuff); } /* set the charater at 'index' to be 'char'. If index is out of * bounds don't do anything */ void owl_fmtext_set_char(owl_fmtext *f, int index, int ch) { if ((index < 0) || (index > f->textlen-1)) return; f->textbuff[index]=ch; } /* Make a copy of the fmtext 'src' into 'dst' */ void owl_fmtext_copy(owl_fmtext *dst, owl_fmtext *src) { int mallocsize; if (src->textlen==0) { mallocsize=5; } else { mallocsize=src->textlen+2; } dst->textlen=src->textlen; dst->textbuff=owl_malloc(mallocsize); dst->fmbuff=owl_malloc(mallocsize); dst->colorbuff=owl_malloc(mallocsize); memcpy(dst->textbuff, src->textbuff, src->textlen+1); memcpy(dst->fmbuff, src->fmbuff, src->textlen); memcpy(dst->colorbuff, src->colorbuff, src->textlen); } /* highlight all instances of "string". Return the number of * instances found. This is a case insensitive search. */ int owl_fmtext_search_and_highlight(owl_fmtext *f, char *string) { int found, len; char *ptr1, *ptr2; len=strlen(string); found=0; ptr1=f->textbuff; while (ptr1-f->textbuff <= f->textlen) { ptr2=stristr(ptr1, string); if (!ptr2) return(found); found++; _owl_fmtext_add_attr(f, OWL_FMTEXT_ATTR_REVERSE, ptr2 - f->textbuff, ptr2 - f->textbuff + len - 1); ptr1=ptr2+len; } return(found); } /* return 1 if the string is found, 0 if not. This is a case * insensitive search. */ int owl_fmtext_search(owl_fmtext *f, char *string) { if (stristr(f->textbuff, string)) return(1); return(0); } /* Append the text 'text' to 'f' and interpret the zephyr style * formatting syntax to set appropriate attributes. */ void owl_fmtext_append_ztext(owl_fmtext *f, char *text) { int stacksize, curattrs, curcolor; char *ptr, *txtptr, *buff, *tmpptr; int attrstack[32], chrstack[32]; curattrs=OWL_FMTEXT_ATTR_NONE; curcolor=OWL_COLOR_DEFAULT; stacksize=0; txtptr=text; while (1) { ptr=strpbrk(txtptr, "@{[<()>]}"); if (!ptr) { /* add all the rest of the text and exit */ owl_fmtext_append_attr(f, txtptr, curattrs, curcolor); return; } else if (ptr[0]=='@') { /* add the text up to this point then deal with the stack */ buff=owl_malloc(ptr-txtptr+20); strncpy(buff, txtptr, ptr-txtptr); buff[ptr-txtptr]='\0'; owl_fmtext_append_attr(f, buff, curattrs, curcolor); owl_free(buff); /* update pointer to point at the @ */ txtptr=ptr; /* now the stack */ /* if we've hit our max stack depth, print the @ and move on */ if (stacksize==32) { owl_fmtext_append_attr(f, "@", curattrs, curcolor); txtptr++; continue; } /* if it's an @@, print an @ and continue */ if (txtptr[1]=='@') { owl_fmtext_append_attr(f, "@", curattrs, curcolor); txtptr+=2; continue; } /* if there's no opener, print the @ and continue */ tmpptr=strpbrk(txtptr, "(<[{ "); if (!tmpptr || tmpptr[0]==' ') { owl_fmtext_append_attr(f, "@", curattrs, curcolor); txtptr++; continue; } /* check what command we've got, push it on the stack, start using it, and continue ... unless it's a color command */ buff=owl_malloc(tmpptr-ptr+20); strncpy(buff, ptr, tmpptr-ptr); buff[tmpptr-ptr]='\0'; if (!strcasecmp(buff, "@bold")) { attrstack[stacksize]=OWL_FMTEXT_ATTR_BOLD; chrstack[stacksize]=tmpptr[0]; stacksize++; curattrs|=OWL_FMTEXT_ATTR_BOLD; txtptr+=6; owl_free(buff); continue; } else if (!strcasecmp(buff, "@b")) { attrstack[stacksize]=OWL_FMTEXT_ATTR_BOLD; chrstack[stacksize]=tmpptr[0]; stacksize++; curattrs|=OWL_FMTEXT_ATTR_BOLD; txtptr+=3; owl_free(buff); continue; } else if (!strcasecmp(buff, "@i")) { attrstack[stacksize]=OWL_FMTEXT_ATTR_UNDERLINE; chrstack[stacksize]=tmpptr[0]; stacksize++; curattrs|=OWL_FMTEXT_ATTR_UNDERLINE; txtptr+=3; owl_free(buff); continue; } else if (!strcasecmp(buff, "@italic")) { attrstack[stacksize]=OWL_FMTEXT_ATTR_UNDERLINE; chrstack[stacksize]=tmpptr[0]; stacksize++; curattrs|=OWL_FMTEXT_ATTR_UNDERLINE; txtptr+=8; owl_free(buff); continue; /* if it's a color read the color, set the current color and continue */ } else if (!strcasecmp(buff, "@color") && owl_global_get_hascolors(&g) && owl_global_is_colorztext(&g)) { owl_free(buff); txtptr+=7; tmpptr=strpbrk(txtptr, "@{[<()>]}"); if (tmpptr && ((txtptr[-1]=='(' && tmpptr[0]==')') || (txtptr[-1]=='<' && tmpptr[0]=='>') || (txtptr[-1]=='[' && tmpptr[0]==']') || (txtptr[-1]=='{' && tmpptr[0]=='}'))) { /* grab the color name */ buff=owl_malloc(tmpptr-txtptr+20); strncpy(buff, txtptr, tmpptr-txtptr); buff[tmpptr-txtptr]='\0'; /* set it as the current color */ curcolor=owl_util_string_to_color(buff); if (curcolor==-1) curcolor=OWL_COLOR_DEFAULT; owl_free(buff); txtptr=tmpptr+1; continue; } else { } } else { /* if we didn't understand it, we'll print it. This is different from zwgc * but zwgc seems to be smarter about some screw cases than I am */ owl_fmtext_append_attr(f, "@", curattrs, curcolor); txtptr++; continue; } } else if (ptr[0]=='}' || ptr[0]==']' || ptr[0]==')' || ptr[0]=='>') { /* add the text up to this point first */ buff=owl_malloc(ptr-txtptr+20); strncpy(buff, txtptr, ptr-txtptr); buff[ptr-txtptr]='\0'; owl_fmtext_append_attr(f, buff, curattrs, curcolor); owl_free(buff); /* now deal with the closer */ txtptr=ptr; /* first, if the stack is empty we must bail (just print and go) */ if (stacksize==0) { buff=owl_malloc(5); buff[0]=ptr[0]; buff[1]='\0'; owl_fmtext_append_attr(f, buff, curattrs, curcolor); owl_free(buff); txtptr++; continue; } /* if the closing char is what's on the stack, turn off the attribue and pop the stack */ if ((ptr[0]==')' && chrstack[stacksize-1]=='(') || (ptr[0]=='>' && chrstack[stacksize-1]=='<') || (ptr[0]==']' && chrstack[stacksize-1]=='[') || (ptr[0]=='}' && chrstack[stacksize-1]=='{')) { int i; stacksize--; curattrs=OWL_FMTEXT_ATTR_NONE; for (i=0; itextbuff) owl_free(f->textbuff); if (f->fmbuff) owl_free(f->fmbuff); if (f->colorbuff) owl_free(f->colorbuff); } owl-2.2.2.orig/tester.c0000644000175100017510000000774111166672053014231 0ustar eichineichin/* Copyright (c) 2002,2003,2004,2009 James M. Kretchmar * * This file is part of Owl. * * Owl 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 3 of the License, or * (at your option) any later version. * * Owl 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 Owl. If not, see . * * --------------------------------------------------------------- * * As of Owl version 2.1.12 there are patches contributed by * developers of the branched BarnOwl project, Copyright (c) * 2006-2009 The BarnOwl Developers. All rights reserved. */ #include "owl.h" #include #include static const char fileIdent[] = "$Id: tester.c,v 1.7 2009/03/29 12:38:22 kretch Exp $"; owl_global g; void screeninit() { char buff[1024]; sprintf(buff, "TERMINFO=%s", TERMINFO); putenv(buff); initscr(); start_color(); /* cbreak(); */ raw(); noecho(); intrflush(stdscr,FALSE); keypad(stdscr,TRUE); nodelay(stdscr,1); clear(); refresh(); meta(stdscr, TRUE); } void test1() { int j; owl_editwin e; screeninit(); owl_editwin_init(&e, stdscr, LINES, COLS, OWL_EDITWIN_STYLE_MULTILINE, NULL); /* owl_editwin_set_locktext(&e, "Here is some locktext:\n");*/ doupdate(); while (1) { usleep(50); j=getch(); if (j==ERR) continue; if (j==3) break; if (j==27) { j=getch(); if (j==ERR) continue; owl_editwin_process_char(&e, j); doupdate(); } else { owl_editwin_process_char(&e, j); doupdate(); } } endwin(); printf("Had:\n%s", owl_editwin_get_text(&e)); } void test2(char *in) { owl_fmtext t; screeninit(); owl_fmtext_init_null(&t); owl_fmtext_append_ztext(&t, in); owl_fmtext_curs_waddstr(&t, stdscr); wrefresh(stdscr); sleep(5000); endwin(); } void test3() { ZNotice_t *n; printf("%i\n", sizeof(n->z_uid.zuid_addr)); /* gethostbyaddr((char *) &(n->z_uid.zuid_addr), sizeof(n->z_uid.zuid_addr), AF_INET); */ } void colorinfo() { char buff[1024]; screeninit(); sprintf(buff, "Have %i COLOR_PAIRS\n", COLOR_PAIRS); addstr(buff); refresh(); sleep(10); endwin(); } void test4() { int j; char buff[1024]; screeninit(); while (1) { usleep(100); j=getch(); if (j==ERR) continue; if (j==3) break; sprintf(buff, "%o\n", j); addstr(buff); } endwin(); } void test_keypress() { int j, rev; char buff[1024], buff2[64]; screeninit(); while (1) { usleep(100); j=wgetch(stdscr); if (j==ERR) continue; if (j==3) break; if (0 == owl_keypress_tostring(j, 0, buff2, 1000)) { rev = owl_keypress_fromstring(buff2); sprintf(buff, "%s : 0x%x 0%o %d %d %s\n", buff2, j, j, j, rev, (j==rev?"matches":"*** WARNING: Does Not Reverse")); } else { sprintf(buff, "UNKNOWN : 0x%x 0%o %d\n", j, j, j); } addstr(buff); } endwin(); } int main(int argc, char **argv, char **env) { int numfailures=0; if (argc==2 && 0==strcmp(argv[1],"reg")) { numfailures += owl_util_regtest(); numfailures += owl_dict_regtest(); numfailures += owl_variable_regtest(); if (numfailures) { fprintf(stderr, "*** WARNING: %d failures total\n", numfailures); } return(numfailures); } else if (argc==2 && 0==strcmp(argv[1],"test1")) { test1(); } else if (argc==2 && 0==strcmp(argv[1],"colorinfo")) { colorinfo(); } else if (argc==2 && 0==strcmp(argv[1],"test4")) { test4(); } else if (argc==2 && 0==strcmp(argv[1],"keypress")) { test_keypress(); } else { fprintf(stderr, "No test specified. Current options are: reg test1\n"); } return(0); } owl-2.2.2.orig/stubgen.pl0000744000175100017510000000332011166672053014551 0ustar eichineichin # $Id: stubgen.pl,v 1.2 2002/06/28 06:18:47 nygren Exp $ if ($#ARGV eq -1) { @ARGV=`ls *.c`; chop(@ARGV); } print qq(/* THIS FILE WAS AUTOGENERATED BY STUBGEN.PL --- DO NOT EDIT BY HAND!!! */\n\n); print qq(#include "owl.h"); foreach $file (@ARGV) { open(FILE, $file); print "/* -------------------------------- $file -------------------------------- */\n"; while () { if (m|^\s*OWLVAR_([A-Z_0-9]+)\s*\(\s*"([^"]+)"\s*/\*\s*%OwlVarStub:?([a-z0-9_]+)?\s*\*/|) { # " my $vartype = $1; my $varname = $2; my $altvarname = $2; $altvarname = $3 if ($3); if ($vartype =~ /^BOOL/) { print "void owl_global_set_${altvarname}_on(owl_global *g) {\n"; print " owl_variable_set_bool_on(&g->vars, \"$varname\");\n}\n"; print "void owl_global_set_${altvarname}_off(owl_global *g) {\n"; print " owl_variable_set_bool_off(&g->vars, \"$varname\");\n}\n"; print "int owl_global_is_$altvarname(owl_global *g) {\n"; print " return owl_variable_get_bool(&g->vars, \"$varname\");\n}\n"; } elsif ($vartype =~ /^PATH/ or $vartype =~ /^STRING/) { print "void owl_global_set_$altvarname(owl_global *g, char *text) {\n"; print " owl_variable_set_string(&g->vars, \"$varname\", text);\n}\n"; print "char *owl_global_get_$altvarname(owl_global *g) {\n"; print " return owl_variable_get_string(&g->vars, \"$varname\");\n}\n"; } elsif ($vartype =~ /^INT/ or $vartype =~ /^ENUM/) { print "void owl_global_set_$altvarname(owl_global *g, int n) {\n"; print " owl_variable_set_int(&g->vars, \"$varname\", n);\n}\n"; print "int owl_global_get_$altvarname(owl_global *g) {\n"; print " return owl_variable_get_int(&g->vars, \"$varname\");\n}\n"; } } } close(FILE); print "\n"; } owl-2.2.2.orig/keybinding.c0000644000175100017510000001044511166672053015041 0ustar eichineichin/* Copyright (c) 2002,2003,2004,2009 James M. Kretchmar * * This file is part of Owl. * * Owl 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 3 of the License, or * (at your option) any later version. * * Owl 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 Owl. If not, see . * * --------------------------------------------------------------- * * As of Owl version 2.1.12 there are patches contributed by * developers of the branched BarnOwl project, Copyright (c) * 2006-2009 The BarnOwl Developers. All rights reserved. */ #include #include #include "owl.h" static const char fileIdent[] = "$Id: keybinding.c,v 1.6 2009/03/29 12:38:21 kretch Exp $"; /* * TODO: Idea for allowing functions to be user-specified --- * Have function have a context bitmask that says where it * can be used, and have keymaps also have one, and compare * the two when setting. * */ /* sets up a new keybinding for a command */ int owl_keybinding_init(owl_keybinding *kb, char *keyseq, char *command, void (*function_fn)(void), char *desc) { char **ktokens; int nktokens, i; owl_function_debugmsg("owl_keybinding_init: creating binding for <%s> with desc: <%s>", keyseq, desc); if (command && !function_fn) { kb->type = OWL_KEYBINDING_COMMAND; } else if (!command && function_fn) { kb->type = OWL_KEYBINDING_FUNCTION; } else { return(-1); } ktokens = atokenize(keyseq, " ", &nktokens); if (!ktokens) return(-1); if (nktokens > OWL_KEYMAP_MAXSTACK) { atokenize_free(ktokens, nktokens); return(-1); } kb->j = owl_malloc((nktokens+1)*sizeof(int)); for (i=0; ij[i] = owl_keypress_fromstring(ktokens[i]); if (kb->j[i] == ERR) { atokenize_free(ktokens, nktokens); owl_free(kb->j); return(-1); } } kb->j[i] = 0; atokenize_free(ktokens, nktokens); if (command) kb->command = owl_strdup(command); kb->function_fn = function_fn; if (desc) kb->desc = owl_strdup(desc); else kb->desc = NULL; return(0); } /* Releases data associated with a keybinding */ void owl_keybinding_free(owl_keybinding *kb) { if (kb->j) owl_free(kb->j); if (kb->desc) owl_free(kb->desc); if (kb->command) owl_free(kb->command); } /* Releases data associated with a keybinding, and the kb itself */ void owl_keybinding_free_all(owl_keybinding *kb) { owl_keybinding_free(kb); owl_free(kb); } /* executes a keybinding */ void owl_keybinding_execute(owl_keybinding *kb, int j) { if (kb->type == OWL_KEYBINDING_COMMAND && kb->command) { owl_function_command_norv(kb->command); } else if (kb->type == OWL_KEYBINDING_FUNCTION && kb->function_fn) { kb->function_fn(); } } /* returns 0 on success */ int owl_keybinding_stack_tostring(int *j, char *buff, int bufflen) { char *pos = buff; int rem = bufflen; int i, n; for (i=0; j[i]; i++) { owl_keypress_tostring(j[i], 0, pos, rem-1); if (j[i+1]) strcat(pos, " "); n = strlen(pos); pos += n; rem -= n; } return 0; } /* returns 0 on success */ int owl_keybinding_tostring(owl_keybinding *kb, char *buff, int bufflen) { return owl_keybinding_stack_tostring(kb->j, buff, bufflen); } char *owl_keybinding_get_desc(owl_keybinding *kb) { return kb->desc; } /* returns 0 on no match, 1 on subset match, and 2 on complete match */ int owl_keybinding_match(owl_keybinding *kb, int *kpstack) { int *kbstack = kb->j; while (*kbstack && *kpstack) { if (*kbstack != *kpstack) { return 0; } kbstack++; kpstack++; } if (!*kpstack && !*kbstack) { return 2; } else if (!*kpstack) { return 1; } else { return 0; } } /* returns 1 if keypress sequence is the same */ int owl_keybinding_equal(owl_keybinding *kb1, owl_keybinding *kb2) { int *j1 = kb1->j; int *j2 = kb2->j; while (*j1 && *j2) { if (*(j1++) != *(j2++)) return(0); } if (*j1 != *j2) return(0); return(1); } owl-2.2.2.orig/variable.c0000644000175100017510000010466211166672053014510 0ustar eichineichin/* Copyright (c) 2002,2003,2004,2009 James M. Kretchmar * * This file is part of Owl. * * Owl 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 3 of the License, or * (at your option) any later version. * * Owl 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 Owl. If not, see . * * --------------------------------------------------------------- * * As of Owl version 2.1.12 there are patches contributed by * developers of the branched BarnOwl project, Copyright (c) * 2006-2009 The BarnOwl Developers. All rights reserved. */ #include #include #include #include #include #include "owl.h" static const char fileIdent[] = "$Id: variable.c,v 1.43 2009/03/29 12:38:22 kretch Exp $"; static int in_regtest = 0; #define OWLVAR_BOOL(name,default,summary,description) \ { name, OWL_VARIABLE_BOOL, NULL, default, "on,off", summary,description, NULL, \ NULL, NULL, NULL, NULL, NULL } #define OWLVAR_BOOL_FULL(name,default,summary,description,validate,set,get) \ { name, OWL_VARIABLE_BOOL, NULL, default, "on,off", summary,description, NULL, \ validate, set, NULL, get, NULL } #define OWLVAR_INT(name,default,summary,description) \ { name, OWL_VARIABLE_INT, NULL, default, "", summary,description, NULL, \ NULL, NULL, NULL, NULL, NULL, NULL } #define OWLVAR_INT_FULL(name,default,summary,description,validset,validate,set,get) \ { name, OWL_VARIABLE_INT, NULL, default, validset, summary,description, NULL, \ validate, set, NULL, get, NULL, NULL } #define OWLVAR_PATH(name,default,summary,description) \ { name, OWL_VARIABLE_STRING, default, 0, "", summary,description, NULL, \ NULL, NULL, NULL, NULL, NULL, NULL } #define OWLVAR_STRING(name,default,summary,description) \ { name, OWL_VARIABLE_STRING, default, 0, "", summary,description, NULL, \ NULL, NULL, NULL, NULL, NULL, NULL } #define OWLVAR_STRING_FULL(name,default,summary,description,validate,set,get) \ { name, OWL_VARIABLE_STRING, default, 0, "", summary,description, NULL, \ validate, set, NULL, get, NULL, NULL } /* enums are really integers, but where validset is a comma-separated * list of strings which can be specified. The tokens, starting at 0, * correspond to the values that may be specified. */ #define OWLVAR_ENUM(name,default,summary,description,validset) \ { name, OWL_VARIABLE_INT, NULL, default, validset, summary,description, NULL, \ owl_variable_enum_validate, \ NULL, owl_variable_enum_set_fromstring, \ NULL, owl_variable_enum_get_tostring, \ NULL } #define OWLVAR_ENUM_FULL(name,default,summary,description,validset,validate, set, get) \ { name, OWL_VARIABLE_INT, NULL, default, validset, summary,description, NULL, \ validate, \ set, owl_variable_enum_set_fromstring, \ get, owl_variable_enum_get_tostring, \ NULL } static owl_variable variables_to_init[] = { OWLVAR_STRING( "personalbell" /* %OwlVarStub */, "off", "ring the terminal bell when personal messages are received", "Can be set to 'on', 'off', or the name of a filter which\n" "messages need to match in order to ring the bell"), OWLVAR_BOOL( "bell" /* %OwlVarStub */, 1, "enable / disable the terminal bell", "" ), OWLVAR_BOOL_FULL( "debug" /* %OwlVarStub */, OWL_DEBUG, "whether debugging is enabled", "If set to 'on', debugging messages are logged to the\n" "file specified by the debugfile variable.\n", NULL, owl_variable_debug_set, NULL), OWLVAR_BOOL( "startuplogin" /* %OwlVarStub */, 1, "send a login message when owl starts", "" ), OWLVAR_BOOL( "shutdownlogout" /* %OwlVarStub */, 1, "send a logout message when owl exits", "" ), OWLVAR_BOOL( "rxping" /* %OwlVarStub */, 0, "display received pings", "" ), OWLVAR_BOOL( "txping" /* %OwlVarStub */, 1, "send pings", "" ), OWLVAR_BOOL( "sepbar_disable" /* %OwlVarStub */, 0, "disable printing information in the seperator bar", "" ), OWLVAR_BOOL( "smartstrip" /* %OwlVarStub */, 1, "strip kerberos instance for reply", ""), OWLVAR_BOOL( "newlinestrip" /* %OwlVarStub */, 1, "strip leading and trailing newlines", ""), OWLVAR_BOOL( "displayoutgoing" /* %OwlVarStub */, 1, "display outgoing messages", "" ), OWLVAR_BOOL( "loginsubs" /* %OwlVarStub */, 1, "load logins from .anyone on startup", "" ), OWLVAR_BOOL( "logging" /* %OwlVarStub */, 0, "turn personal logging on or off", "If this is set to on, personal messages are\n" "logged in the directory specified\n" "by the 'logpath' variable. The filename in that\n" "directory is derived from the sender of the message.\n" ), OWLVAR_BOOL( "classlogging" /* %OwlVarStub */, 0, "turn class logging on or off", "If this is set to on, class messages are\n" "logged in the directory specified\n" "by the 'classlogpath' variable.\n" "The filename in that directory is derived from\n" "the name of the class to which the message was sent.\n" ), OWLVAR_ENUM( "loggingdirection" /* %OwlVarStub */, OWL_LOGGING_DIRECTION_BOTH, "specifices which kind of messages should be logged", "Can be one of 'both', 'in', or 'out'. If 'in' is\n" "selected, only incoming messages are logged, if 'out'\n" "is selected only outgoing messages are logged. If 'both'\n" "is selected both incoming and outgoing messages are\n" "logged.", "both,in,out"), OWLVAR_BOOL( "colorztext" /* %OwlVarStub */, 1, "allow @color() in zephyrs to change color", "Note that only messages received after this variable\n" "is set will be affected." ), OWLVAR_BOOL( "fancylines" /* %OwlVarStub */, 1, "Use 'nice' line drawing on the terminal.", "If turned off, dashes, pipes and pluses will be used\n" "to draw lines on the screen. Useful when the terminal\n" "is causing problems" ), OWLVAR_BOOL( "zcrypt" /* %OwlVarStub */, 1, "Do automatic zcrypt processing", "" ), OWLVAR_BOOL_FULL( "pseudologins" /* %OwlVarStub */, 0, "Enable zephyr pseudo logins", "When this is enabled, Owl will periodically check the zephyr\n" "location of users in your .anyone file. If a user is present\n" "but sent no login message, or a user is not present that sent no\n" "logout message a pseudo login or logout message wil be created\n", NULL, owl_variable_pseudologins_set, NULL), OWLVAR_BOOL( "ignorelogins" /* %OwlVarStub */, 0, "Enable printing of login notifications", "When this is enabled, Owl will print login and logout notifications\n" "for AIM, zephyr, or other protocols. If disabled Owl will not print\n" "login or logout notifications.\n"), OWLVAR_STRING( "logfilter" /* %OwlVarStub */, "", "name of a filter controlling which messages to log", "If non empty, any messages matching the given filter will be logged.\n" "This is a completely separate mechanisim from the other logging\n" "variables like logging, classlogging, loglogins, loggingdirection,\n" "etc. If you want this variable to control all logging, make sure\n" "all other logging variables are in their default state.\n"), OWLVAR_BOOL( "loglogins" /* %OwlVarStub */, 0, "Enable logging of login notifications", "When this is enabled, Owl will login login and logout notifications\n" "for AIM, zephyr, or other protocols. If disabled Owl will not print\n" "login or logout notifications.\n"), OWLVAR_ENUM_FULL( "disable-ctrl-d" /* %OwlVarStub:lockout_ctrld */, 1, "don't send zephyrs on C-d", "If set to 'off', C-d won't send a zephyr from the edit\n" "window. If set to 'on', C-d will always send a zephyr\n" "being composed in the edit window. If set to 'middle',\n" "C-d will only ever send a zephyr if the cursor is at\n" "the end of the message being composed.\n\n" "Note that this works by changing the C-d keybinding\n" "in the editmulti keymap.\n", "off,middle,on", NULL, owl_variable_disable_ctrl_d_set, NULL), OWLVAR_BOOL( "_burningears" /* %OwlVarStub:burningears */, 0, "[NOT YET IMPLEMENTED] beep on messages matching patterns", "" ), OWLVAR_BOOL( "_summarymode" /* %OwlVarStub:summarymode */, 0, "[NOT YET IMPLEMENTED]", "" ), OWLVAR_PATH( "logpath" /* %OwlVarStub */, "~/zlog/people", "path for logging personal zephyrs", "Specifies a directory which must exist.\n" "Files will be created in the directory for each sender.\n"), OWLVAR_PATH( "classlogpath" /* %OwlVarStub:classlogpath */, "~/zlog/class", "path for logging class zephyrs", "Specifies a directory which must exist.\n" "Files will be created in the directory for each class.\n"), OWLVAR_PATH( "debug_file" /* %OwlVarStub */, OWL_DEBUG_FILE, "path for logging debug messages when debugging is enabled", "This file will be logged to if 'debug' is set to 'on'.\n"), OWLVAR_PATH( "zsigproc" /* %OwlVarStub:zsigproc */, NULL, "name of a program to run that will generate zsigs", "This program should produce a zsig on stdout when run.\n" "Note that it is important that this program not block.\n" ), OWLVAR_PATH( "newmsgproc" /* %OwlVarStub:newmsgproc */, NULL, "name of a program to run when new messages are present", "The named program will be run when owl recevies new.\n" "messages. It will not be run again until the first\n" "instance exits"), OWLVAR_STRING( "zsig" /* %OwlVarStub */, "", "zephyr signature", "If 'zsigproc' is not set, this string will be used\n" "as a zsig. If this is also unset, the 'zwrite-signature'\n" "zephyr variable will be used instead.\n"), OWLVAR_STRING( "appendtosepbar" /* %OwlVarStub */, "", "string to append to the end of the sepbar", "The sepbar is the bar separating the top and bottom\n" "of the owl screen. Any string specified here will\n" "be displayed on the right of the sepbar\n"), OWLVAR_BOOL( "zaway" /* %OwlVarStub */, 0, "turn zaway on or off", "" ), OWLVAR_STRING( "zaway_msg" /* %OwlVarStub */, OWL_DEFAULT_ZAWAYMSG, "zaway msg for responding to zephyrs when away", "" ), OWLVAR_STRING( "zaway_msg_default" /* %OwlVarStub */, OWL_DEFAULT_ZAWAYMSG, "default zaway message", "" ), OWLVAR_BOOL_FULL( "aaway" /* %OwlVarStub */, 0, "Set AIM away status", "", NULL, owl_variable_aaway_set, NULL), OWLVAR_STRING( "aaway_msg" /* %OwlVarStub */, OWL_DEFAULT_AAWAYMSG, "AIM away msg for responding when away", "" ), OWLVAR_STRING( "aaway_msg_default" /* %OwlVarStub */, OWL_DEFAULT_AAWAYMSG, "default AIM away message", "" ), OWLVAR_STRING( "view_home" /* %OwlVarStub */, "all", "home view to switch to after 'X' and 'V'", "SEE ALSO: view, filter\n" ), OWLVAR_STRING( "alert_filter" /* %OwlVarStub */, "none", "filter on which to trigger alert actions", "" ), OWLVAR_STRING( "alert_action" /* %OwlVarStub */, "nop", "owl command to execute for alert actions", "" ), OWLVAR_STRING_FULL( "tty" /* %OwlVarStub */, "", "tty name for zephyr location", "", NULL, owl_variable_tty_set, NULL), OWLVAR_STRING( "default_style" /* %OwlVarStub */, "__unspecified__", "name of the default formatting style", "This sets the default message formatting style.\n" "Styles may be created with the 'style' command.\n" "Some built-in styles include:\n" " default - the default owl formatting\n" " basic - simple formatting\n" " oneline - one line per-message\n" " perl - legacy perl interface\n" "\nSEE ALSO: style, show styles, view -s