--- eperl-2.2.14.orig/eperl_sys.c +++ eperl-2.2.14/eperl_sys.c @@ -15,7 +15,7 @@ ** ** ====================================================================== ** -** Copyright (c) 1996,1997,1998 Ralf S. Engelschall +** Copyright (c) 1996,1997,1998,1999 Ralf S. Engelschall ** ** This program is free software; it may be redistributed and/or modified ** only under the terms of either the Artistic License or the GNU General @@ -37,12 +37,16 @@ #include "eperl_global.h" #include "eperl_proto.h" +char * getenv (); /* ** ** own setenv() function which works with Perl ** */ + +extern char **environ; + char **mysetenv(char **env, char *var, char *str, ...) { va_list ap; @@ -51,14 +55,15 @@ char *cp; int i; char **envN; - extern char **environ; static int stillcalled = FALSE; int replaced = FALSE; /* create the key=val string */ va_start(ap, str); - vsprintf(ca, str, ap); - sprintf(ca2, "%s=%s", var, ca); + vsnprintf(ca, sizeof(ca), str, ap); + ca[sizeof(ca)-1] = NUL; + snprintf(ca2, sizeof(ca2), "%s=%s", var, ca); + ca2[sizeof(ca2)-1] = NUL; cp = strdup(ca2); /* now duplicate the old structure */ @@ -77,8 +82,8 @@ /* add the new entry if not replaced */ if (!replaced) { envN[i++] = cp; - envN[i++] = NULL; } + envN[i] = NULL; /* set the libc/exec variable which Perl uses */ if (stillcalled) @@ -205,10 +210,15 @@ char *mytmpfile(char *id) { char ca[1024]; - char *cp; + char *cp, *tmpdir; int i; - sprintf(ca, "/tmp/%s.%d.tmp%d", id, (int)getpid(), mytmpfilecnt++); + tmpdir = getenv ("TMPDIR"); + if (tmpdir == (char *) NULL) + tmpdir="/tmp"; + + snprintf(ca, sizeof(ca), "%s/%s.%d.tmp%d", tmpdir, id, (int)getpid(), mytmpfilecnt++); + ca[sizeof(ca)-1] = NUL; cp = strdup(ca); for (i = 0; mytmpfiles[i] != NULL; i++) ; @@ -239,8 +249,8 @@ char timestr[128]; tm = localtime(t); - sprintf(timestr, "%02d-%02d-19%02d %02d:%02d", - tm->tm_mday, tm->tm_mon+1, tm->tm_year, + sprintf(timestr, "%02d-%02d-%04d %02d:%02d", + tm->tm_mday, tm->tm_mon+1, tm->tm_year+1900, tm->tm_hour, tm->tm_min); return strdup(timestr); } @@ -257,13 +267,14 @@ FILE *fp = NULL; char *cpBuf = NULL; int nBuf; - char tmpfile[256]; + char tmpfile[256], *ptr_tmpfile; int usetmp = 0; int c; if (stringEQ(filename, "-")) { /* file is given on stdin */ - sprintf(tmpfile, "/tmp/eperl.tmp.%d", (int)getpid()); + ptr_tmpfile = mytmpfile("ePerl.source"); + sprintf(tmpfile, "%s", ptr_tmpfile); if ((fp = fopen(tmpfile, "w")) == NULL) { ePerl_SetError("Cannot open temporary source file %s for writing", tmpfile); CU(NULL); @@ -384,7 +395,8 @@ ; if (cp == path+1) cp--; - strcpy(file, cp); + strncpy(file, cp, sizeof(file)); + file[sizeof(file)-1] = '\0'; return file; } } @@ -397,7 +409,8 @@ if (path[strlen(path)-1] == '/') return path; else { - strcpy(dir, path); + strncpy(dir, path, sizeof(dir)); + dir[sizeof(dir)-1] = '\0'; for (cp = dir+strlen(dir); cp > dir && *(cp-1) != '/'; cp--) ; *cp = NUL; @@ -423,9 +436,12 @@ /* restore cwd */ chdir(cwd); /* add file part again */ - if (apath[strlen(apath)-1] != '/') - strcpy(apath+strlen(apath), "/"); - strcpy(apath+strlen(apath), path); + if (apath[strlen(apath)-1] != '/') { + strncpy(apath+strlen(apath), "/", sizeof(apath)-strlen(apath)); + apath[sizeof(apath)-1] = '\0'; + } + strncpy(apath+strlen(apath), path, sizeof(apath)-strlen(apath)); + apath[sizeof(apath)-1] = '\0'; return apath; } } --- eperl-2.2.14.orig/eperl_perl5.c +++ eperl-2.2.14/eperl_perl5.c @@ -15,7 +15,7 @@ ** ** ====================================================================== ** -** Copyright (c) 1996,1997,1998 Ralf S. Engelschall +** Copyright (c) 1996,1997,1998,1999 Ralf S. Engelschall ** ** This program is free software; it may be redistributed and/or modified ** only under the terms of either the Artistic License or the GNU General @@ -41,14 +41,28 @@ #ifdef HAVE_PERL_DYNALOADER -extern void boot_DynaLoader _((CV* cv)); +extern void boot_DynaLoader _((pTHX_ CV* cv)); + +void give_version_extended_perl(void) +{ + give_version(); + fprintf(stdout, "Characteristics of this binary:\n"); + fprintf(stdout, " Perl Version : %s (%s)\n", AC_perl_vers, AC_perl_prog); + fprintf(stdout, " Perl I/O Layer : %s\n", PERL_IO_LAYER_ID); + fprintf(stdout, " Perl Library : %s/CORE/libperl.a\n", AC_perl_archlib); + fprintf(stdout, " Perl DynaLoader : %s\n", AC_perl_dla); + fprintf(stdout, " System Libs : %s\n", AC_perl_libs); + fprintf(stdout, " Built User : %s\n", AC_build_user); + fprintf(stdout, " Built Time : %s\n", AC_build_time_iso); + fprintf(stdout, "\n"); +} /* ** ** the Perl XS init function for dynamic library loading ** */ -void Perl5_XSInit(void) +void Perl5_XSInit(pTHX) { char *file = __FILE__; /* dXSUB_SYS; */ @@ -64,13 +78,10 @@ ** Force Perl to use unbuffered I/O ** */ -void Perl5_ForceUnbufferedStdout(void) +void Perl5_ForceUnbufferedStdout(pTHX) { -#if AC_perl_vnum < 500476 - IoFLAGS(GvIOp(defoutgv)) |= IOf_FLUSH; /* $|=1 */ -#else + dTHR; IoFLAGS(GvIOp(PL_defoutgv)) |= IOf_FLUSH; /* $|=1 */ -#endif return; } @@ -84,9 +95,13 @@ char ca[1024]; char *cp; - strcpy(ca, str); + strncpy(ca, str, 1023); + ca[1023] = NUL; cp = strchr(ca, '='); - *cp++ = '\0'; + if (cp != NULL) + *cp++ = '\0'; + else + cp = ""; return mysetenv(env, ca, cp); } @@ -95,11 +110,12 @@ ** sets a Perl scalar variable ** */ -void Perl5_SetScalar(char *pname, char *vname, char *vvalue) +void Perl5_SetScalar(pTHX_ char *pname, char *vname, char *vvalue) { + dTHR; ENTER; - save_hptr(&curstash); - curstash = gv_stashpv(pname, TRUE); + save_hptr(&PL_curstash); + PL_curstash = gv_stashpv(pname, TRUE); sv_setpv(perl_get_sv(vname, TRUE), vvalue); LEAVE; return; @@ -131,18 +147,147 @@ return; } -void Perl5_SetRememberedScalars(void) +void Perl5_SetRememberedScalars(pTHX) { char ca[1024]; char *cp; int i; for (i = 0; Perl5_RememberedScalars[i] != NULL; i++) { - strcpy(ca, Perl5_RememberedScalars[i]); + strncpy(ca, Perl5_RememberedScalars[i], 1023); + ca[1023] = NUL; cp = strchr(ca, '='); - *cp++ = '\0'; - Perl5_SetScalar("main", ca, cp); + if (cp != NULL) + *cp++ = '\0'; + else + cp = ""; + Perl5_SetScalar(aTHX_ "main", ca, cp); + } +} + +int Perl5_Run(int myargc, char **myargv, int mode, int fCheck, int keepcwd, char *source, char **env, char *perlscript, char *perlstderr, char *perlstdout) +{ + DECL_EXRC; + FILE *er; + FILE *out; + char *cpBuf = NULL; + char sourcedir[2048]; + char *cp; + static PerlInterpreter *my_perl = NULL; + struct stat st; + int size; + char cwd[MAXPATHLEN]; + + /* open a file for Perl's STDOUT channel + and redirect stdout to the new channel */ + if ((out = fopen(perlstdout, "w")) == NULL) { + PrintError(mode, source, NULL, NULL, "Cannot open STDOUT file `%s' for writing", perlstdout); + CU(mode == MODE_FILTER ? EX_IOERR : EX_OK); + } + IO_redirect_stdout(out); + + /* open a file for Perl's STDERR channel + and redirect stderr to the new channel */ + if ((er = fopen(perlstderr, "w")) == NULL) { + PrintError(mode, source, NULL, NULL, "Cannot open STDERR file `%s' for writing", perlstderr); + CU(mode == MODE_FILTER ? EX_IOERR : EX_OK); + } + IO_redirect_stderr(er); + + PERL_SYS_INIT3(&myargc,&myargv,&env); + my_perl = perl_alloc(); + perl_construct(my_perl); + perl_init_i18nl10n(1); + + /* now parse the script! + NOTICE: At this point, the script gets + only _parsed_, not evaluated/executed! */ +#ifdef HAVE_PERL_DYNALOADER + rc = perl_parse(my_perl, Perl5_XSInit, myargc, myargv, env); +#else + rc = perl_parse(my_perl, NULL, myargc, myargv, env); +#endif + if (rc != 0) { + if (fCheck && mode == MODE_FILTER) { + fclose(er); er = NULL; + IO_restore_stdout(); + IO_restore_stderr(); + if ((cpBuf = ePerl_ReadErrorFile(perlstderr, perlscript, source)) != NULL) { + fprintf(stderr, cpBuf); + } + CU(EX_FAIL); + } + else { + fclose(er); er = NULL; + PrintError(mode, source, perlscript, perlstderr, "Perl parsing error (interpreter rc=%d)", rc); + CU(mode == MODE_FILTER ? EX_FAIL : EX_OK); + } + } + + /* Stop when we are just doing a syntax check */ + if (fCheck && mode == MODE_FILTER) { + fclose(er); er = NULL; + IO_restore_stdout(); + IO_restore_stderr(); + fprintf(stderr, "%s syntax OK\n", source); + CU(-1); + } + + /* change to directory of script: + this actually is not important to us, but really useful + for the ePerl source file programmer!! */ + cwd[0] = NUL; + if (!keepcwd) { + /* if running as a Unix filter remember the cwd for outputfile */ + if (mode == MODE_FILTER) + getcwd(cwd, MAXPATHLEN); + /* determine dir of source file and switch to it */ + strncpy(sourcedir, source, sizeof(sourcedir)); + sourcedir[sizeof(sourcedir)-1] = NUL; + for (cp = sourcedir+strlen(sourcedir); cp > sourcedir && *cp != '/'; cp--) + ; + *cp = NUL; + chdir(sourcedir); + } + + /* Set the previously remembered Perl 5 scalars (option -d) */ + Perl5_SetRememberedScalars(aTHX); + + /* Force unbuffered I/O */ + Perl5_ForceUnbufferedStdout(aTHX); + + /* NOW IT IS TIME to evaluate/execute the script!!! */ + rc = perl_run(my_perl); + + /* pre-close the handles, to be able to check + its size and to be able to display the contents */ + fclose(out); out = NULL; + fclose(er); er = NULL; + + /* ok, now recover the stdout and stderr */ + IO_restore_stdout(); + IO_restore_stderr(); + + /* when the Perl interpreter failed or there + is data on stderr, we print a error page */ + if (stat(perlstderr, &st) == 0) + size = st.st_size; + else + size = 0; + if (rc != 0 || size > 0) { + PrintError(mode, source, perlscript, perlstderr, "Perl runtime error (interpreter rc=%d)", rc); + CU(mode == MODE_FILTER ? EX_FAIL : EX_OK); + } + + CUS: /* the Clean Up Sequence */ + + /* Ok, the script got evaluated. Now we can destroy + and de-allocate the Perl interpreter */ + if (my_perl) { + perl_destruct(my_perl); + perl_free(my_perl); } + return rc; } /*EOF*/ --- eperl-2.2.14.orig/eperl_powered.c +++ eperl-2.2.14/eperl_powered.c @@ -1,7 +1,7 @@ /* eperl_powered.gif.c -- automatically generated by bin2c */ int ePerl_POWERED_size = 4379; -char ePerl_POWERED_data[] = { +unsigned char ePerl_POWERED_data[] = { 0x47,0x49,0x46,0x38,0x39,0x61,0x78,0x00,0x46,0x00,0xe6,0x00,0x00,0x00,0x00, 0x00,0x16,0x0d,0x00,0x1c,0x15,0x06,0x0c,0x0c,0x10,0x18,0x18,0x19,0x23,0x1b, 0x09,0x31,0x29,0x16,0x1f,0x1f,0x20,0x31,0x31,0x30,0x42,0x37,0x1e,0x45,0x3c, --- eperl-2.2.14.orig/config_sc.h.in +++ eperl-2.2.14/config_sc.h.in @@ -9,7 +9,6 @@ #define AC_perl_prog "@perl_prog@" #define AC_perl_vers "@perl_vers@" -#define AC_perl_vnum @perl_vnum@ #define AC_perl_archlib "@perl_archlib@" #define AC_perl_libs "@perl_libs@" #define AC_perl_dla "@perl_dla@" --- eperl-2.2.14.orig/eperl_config.c +++ eperl-2.2.14/eperl_config.c @@ -15,7 +15,7 @@ ** ** ====================================================================== ** -** Copyright (c) 1996,1997,1998 Ralf S. Engelschall +** Copyright (c) 1996,1997,1998,1999 Ralf S. Engelschall ** ** This program is free software; it may be redistributed and/or modified ** only under the terms of either the Artistic License or the GNU General --- eperl-2.2.14.orig/acconfig.h +++ eperl-2.2.14/acconfig.h @@ -2,7 +2,7 @@ #define CONFIG_AC_H /* ** config_ac.h -- AUTO configuration header file -** Copyright (c) 1996,1997,1998 Ralf S. Engelschall +** Copyright (c) 1996,1997,1998,1999 Ralf S. Engelschall */ @TOP@ --- eperl-2.2.14.orig/eperl_parse.c +++ eperl-2.2.14/eperl_parse.c @@ -15,7 +15,7 @@ ** ** ====================================================================== ** -** Copyright (c) 1996,1997,1998 Ralf S. Engelschall +** Copyright (c) 1996,1997,1998,1999 Ralf S. Engelschall ** ** This program is free software; it may be redistributed and/or modified ** only under the terms of either the Artistic License or the GNU General @@ -66,7 +66,8 @@ va_list ap; va_start(ap, str); - vsprintf(ePerl_ErrorString, str, ap); + vsnprintf(ePerl_ErrorString, sizeof(ePerl_ErrorString), str, ap); + ePerl_ErrorString[sizeof(ePerl_ErrorString)-1] = NUL; va_end(ap); return; } @@ -79,6 +80,7 @@ return ePerl_ErrorString; } +#if 0 /* unsafe ? */ /* ** fprintf for internal buffer */ @@ -91,10 +93,26 @@ va_end(ap); return cpOut+strlen(cpOut); } +#else /* safe version */ +char *ePerl_fnprintf(char *cpOut, int *n, char *str, ...) +{ + va_list ap; + + if (*n <= 0) { abort(); } /* hope NEVER */ + va_start(ap, str); + vsnprintf(cpOut, *n, str, ap); + cpOut[*n - 1] = NUL; + va_end(ap); + *n -= strlen(cpOut); + if (*n <= 0) { abort(); } /* hope NEVER */ + return cpOut+strlen(cpOut); +} +#endif /* ** fwrite for internal buffer */ +#if 0 /* unsafe */ char *ePerl_fwrite(char *cpBuf, int nBuf, int cNum, char *cpOut) { char *cp; @@ -106,7 +124,24 @@ *cp = NUL; return cp; } +#else /* safe */ +char *ePerl_fnwrite(char *cpBuf, int nBuf, int cNum, char *cpOut, int *cpOutLen) +{ + char *cp; + int n; + + n = nBuf*cNum; + if (*cpOutLen < n) { abort(); } + (void)strncpy(cpOut, cpBuf, n); + cpOut[*cpOutLen - 1] = NUL; + cp = cpOut + n; + *cp = NUL; + *cpOutLen -= n; + return cp; +} +#endif +#if 0 /* unsafe */ /* ** fwrite for internal buffer WITH character escaping */ @@ -129,6 +164,29 @@ *cpO = NUL; return cpO; } +#else /* safe */ +char *ePerl_Efnwrite(char *cpBuf, int nBuf, int cNum, char *cpOut, int *n) +{ + char *cpI; + char *cpO; + + if (*n <= 0) { abort(); } + for (cpI = cpBuf, cpO = cpOut; cpI < (cpBuf+(nBuf*cNum)); ) { + switch (*cpI) { + case '"': *cpO++ = '\\'; *cpO++ = *cpI++; *n -= 2; break; + case '@': *cpO++ = '\\'; *cpO++ = *cpI++; *n -= 2; break; + case '$': *cpO++ = '\\'; *cpO++ = *cpI++; *n -= 2; break; + case '\\': *cpO++ = '\\'; *cpO++ = *cpI++; *n -= 2; break; + case '\t': *cpO++ = '\\'; *cpO++ = 't'; cpI++; *n -= 2;break; + case '\n': *cpO++ = '\\'; *cpO++ = 'n'; cpI++; *n -= 2;break; + default: *cpO++ = *cpI++; *n -= 1; + } + if (*n <= 0) { abort(); } + } + *cpO = NUL; + return cpO; +} +#endif /* @@ -247,6 +305,7 @@ { NULL, NUL } }; +#if 0 /* unsafe */ char *ePerl_Cfwrite(char *cpBuf, int nBuf, int cNum, char *cpOut) { char *cpI; @@ -278,6 +337,42 @@ *cpO = NUL; return cpO; } +#else /* safe */ +char *ePerl_Cfnwrite(char *cpBuf, int nBuf, int cNum, char *cpOut, int *cpOutLen) +{ + char *cpI; + char *cpO; + int i; + int n; + char *cpE; + + if (*cpOutLen <= 0) { abort(); } + cpI = cpBuf; + cpO = cpOut; + cpE = cpBuf+(nBuf*cNum); + while (cpI < cpE) { + if (*cpI == '&') { + for (i = 0; html2char[i].h != NULL; i++) { + n = strlen(html2char[i].h); + if (cpI+1+n+1 < cpE) { + if (*(cpI+1+n) == ';') { + if (strncmp(cpI+1, html2char[i].h, n) == 0) { + *cpO++ = html2char[i].c; + if (--*cpOutLen <= 0) { abort(); } + cpI += 1+n+1; + continue; + } + } + } + } + } + *cpO++ = *cpI++; + if (--*cpOutLen <= 0) { abort(); } + } + *cpO = NUL; + return cpO; +} +#endif /* @@ -326,15 +421,6 @@ return NULL; } -char *strndup(char *buf, int n) -{ - char *cp; - - cp = (char *)malloc(n+1); - strncpy(cp, buf, n); - return cp; -} - /* ** convert buffer from bristled format to plain format @@ -344,6 +430,7 @@ char *rc; char *cpOutBuf = NULL; char *cpOut = NULL; + int cpOutLen = 0; char *cps, *cpe; char *cps2, *cpe2; int nBuf; @@ -369,6 +456,7 @@ CU(NULL); } cpOut = cpOutBuf; + cpOutLen = n; /* now step through the file and convert it to legal Perl code. This is a bit complicated because we have to make sure that @@ -393,25 +481,25 @@ while (cps2 < cpEND && (cpe2 = strnchr(cps2, '\n', cpEND-cps2)) != NULL) { if (ePerl_line_continuation && cps < cpe2 && *(cpe2-1) == '\\') { if (cpe2-1-cps2 > 0) { - cpOut = ePerl_fprintf(cpOut, "print \""); - cpOut = ePerl_Efwrite(cps2, cpe2-1-cps2, 1, cpOut); - cpOut = ePerl_fprintf(cpOut, "\";"); + cpOut = ePerl_fnprintf(cpOut, &cpOutLen, "print \""); + cpOut = ePerl_Efnwrite(cps2, cpe2-1-cps2, 1, cpOut, &cpOutLen); + cpOut = ePerl_fnprintf(cpOut, &cpOutLen, "\";"); } - cpOut = ePerl_fprintf(cpOut, "\n"); + cpOut = ePerl_fnprintf(cpOut, &cpOutLen, "\n"); } else { - cpOut = ePerl_fprintf(cpOut, "print \""); - cpOut = ePerl_Efwrite(cps2, cpe2-cps2, 1, cpOut); - cpOut = ePerl_fprintf(cpOut, "\\n\";\n"); + cpOut = ePerl_fnprintf(cpOut, &cpOutLen, "print \""); + cpOut = ePerl_Efnwrite(cps2, cpe2-cps2, 1, cpOut, &cpOutLen); + cpOut = ePerl_fnprintf(cpOut, &cpOutLen, "\\n\";\n"); } cps2 = cpe2+1; } /* then do the remainder which is not finished by a newline */ if (cpEND > cps2) { - cpOut = ePerl_fprintf(cpOut, "print \""); - cpOut = ePerl_Efwrite(cps2, cpEND-cps2, 1, cpOut); - cpOut = ePerl_fprintf(cpOut, "\";"); + cpOut = ePerl_fnprintf(cpOut, &cpOutLen, "print \""); + cpOut = ePerl_Efnwrite(cps2, cpEND-cps2, 1, cpOut, &cpOutLen); + cpOut = ePerl_fnprintf(cpOut, &cpOutLen, "\";"); } } break; /* and break the whole processing step */ @@ -428,30 +516,30 @@ while ((cpe2 = strnchr(cps2, '\n', cpe-cps2)) != NULL) { if (ePerl_line_continuation && cps < cpe2 && *(cpe2-1) == '\\') { if (cpe2-1-cps2 > 0) { - cpOut = ePerl_fprintf(cpOut, "print \""); - cpOut = ePerl_Efwrite(cps2, cpe2-1-cps2, 1, cpOut); - cpOut = ePerl_fprintf(cpOut, "\";"); + cpOut = ePerl_fnprintf(cpOut, &cpOutLen, "print \""); + cpOut = ePerl_Efnwrite(cps2, cpe2-1-cps2, 1, cpOut, &cpOutLen); + cpOut = ePerl_fnprintf(cpOut, &cpOutLen, "\";"); } - cpOut = ePerl_fprintf(cpOut, "\n"); + cpOut = ePerl_fnprintf(cpOut, &cpOutLen, "\n"); } else { - cpOut = ePerl_fprintf(cpOut, "print \""); - cpOut = ePerl_Efwrite(cps2, cpe2-cps2, 1, cpOut); - cpOut = ePerl_fprintf(cpOut, "\\n\";\n"); + cpOut = ePerl_fnprintf(cpOut, &cpOutLen, "print \""); + cpOut = ePerl_Efnwrite(cps2, cpe2-cps2, 1, cpOut, &cpOutLen); + cpOut = ePerl_fnprintf(cpOut, &cpOutLen, "\\n\";\n"); } cps2 = cpe2+1; } if (cpe > cps2) { - cpOut = ePerl_fprintf(cpOut, "print \""); - cpOut = ePerl_Efwrite(cps2, cpe-cps2, 1, cpOut); - cpOut = ePerl_fprintf(cpOut, "\";"); + cpOut = ePerl_fnprintf(cpOut, &cpOutLen, "print \""); + cpOut = ePerl_Efnwrite(cps2, cpe-cps2, 1, cpOut, &cpOutLen); + cpOut = ePerl_fnprintf(cpOut, &cpOutLen, "\";"); } } /* just output a leading space to make the -x display more readable. */ if (cpOut > cpOutBuf && *(cpOut-1) != '\n') - cpOut = ePerl_fprintf(cpOut, " "); + cpOut = ePerl_fnprintf(cpOut, &cpOutLen, " "); /* skip the start delimiter */ cps = cpe+strlen(ePerl_begin_delimiter); @@ -460,7 +548,7 @@ * e.g. <:=$var:> */ if (*cps == '=') { - cpOut = ePerl_fprintf(cpOut, "print "); + cpOut = ePerl_fnprintf(cpOut, &cpOutLen, "print "); cps++; } @@ -493,16 +581,16 @@ /* pass through the ePerl block without changes! */ if (cpe2 > cps) { if (ePerl_convert_entities == TRUE) - cpOut = ePerl_Cfwrite(cps, cpe2-cps, 1, cpOut); + cpOut = ePerl_Cfnwrite(cps, cpe2-cps, 1, cpOut, &cpOutLen); else - cpOut = ePerl_fwrite(cps, cpe2-cps, 1, cpOut); + cpOut = ePerl_fnwrite(cps, cpe2-cps, 1, cpOut, &cpOutLen); /* be smart and automatically add a semicolon if not provided at the end of the ePerl block. But know the continuation indicator "_". */ if ((*(cpe2-1) != ';') && (*(cpe2-1) != '_') ) - cpOut = ePerl_fprintf(cpOut, ";"); + cpOut = ePerl_fnprintf(cpOut, &cpOutLen, ";"); if (*(cpe2-1) == '_') cpOut = cpOut - 1; } @@ -510,13 +598,13 @@ /* end preserve newlines for correct line numbers */ for ( ; cpe2 <= cpe; cpe2++) if (*cpe2 == '\n') - cpOut = ePerl_fprintf(cpOut, "\n"); + cpOut = ePerl_fnprintf(cpOut, &cpOutLen, "\n"); /* output a trailing space to make the -x display more readable when no newlines have finished the block. */ if (cpOut > cpOutBuf && *(cpOut-1) != '\n') - cpOut = ePerl_fprintf(cpOut, " "); + cpOut = ePerl_fnprintf(cpOut, &cpOutLen, " "); /* and adjust the current position to the first character after the end delimiter */ @@ -533,7 +621,7 @@ if (cps < cpEND) cps++; /* but preserve the newline in the script */ - cpOut = ePerl_fprintf(cpOut, "\n"); + cpOut = ePerl_fnprintf(cpOut, &cpOutLen, "\n"); } } } --- eperl-2.2.14.orig/eperl_pp.c +++ eperl-2.2.14/eperl_pp.c @@ -15,7 +15,7 @@ ** ** ====================================================================== ** -** Copyright (c) 1996,1997,1998 Ralf S. Engelschall +** Copyright (c) 1996,1997,1998,1999 Ralf S. Engelschall ** ** This program is free software; it may be redistributed and/or modified ** only under the terms of either the Artistic License or the GNU General @@ -47,7 +47,8 @@ va_list ap; va_start(ap, str); - vsprintf(ePerl_PP_ErrorString, str, ap); + vsnprintf(ePerl_PP_ErrorString, sizeof(ePerl_PP_ErrorString), str, ap); + ePerl_PP_ErrorString[sizeof(ePerl_PP_ErrorString)-1] = NUL; va_end(ap); return; } @@ -113,7 +114,8 @@ if (fp == NULL) { /* we have to try in all include directories! */ for (i = 0; cppINC[i] != NULL; i++) { - sprintf(caName, "%s/%s", cppINC[i], cpInput); + snprintf(caName, sizeof(caName), "%s/%s", cppINC[i], cpInput); + caName[sizeof(caName)-1] = NUL; if ((fp = fopen(caName, "r")) != NULL) break; } @@ -191,6 +193,7 @@ } cpOutBuf = cp2; strncpy(cpOutBuf+nOut, cps, cp-cps); + *(cpOutBuf+nOutBuf-1) = NUL; nOut += i; /* @@ -253,7 +256,7 @@ } /* copy the filename and skip to end of line */ - for (i = 0; cps < cpEND && + for (i = 0; i < sizeof(caName) && cps < cpEND && (*cps != ' ' && *cps != '\t' && *cps != '>' && *cps != '"' && *cps != '\n' ); ) @@ -269,7 +272,7 @@ return NULL; /* make it secure by removing all begin/end delimiters!! */ - if ((cp2 = (char *)malloc(strlen(cp))) == NULL) + if ((cp2 = (char *)malloc(strlen(cp)*9/8)) == NULL) return NULL; l1 = strlen(ePerl_begin_delimiter); l2 = strlen(ePerl_end_delimiter); @@ -278,6 +281,11 @@ cp3 += l1; else if (strncasecmp(cp3, ePerl_end_delimiter, l2) == 0) cp3 += l2; + else if (strncmp(cp3, "#include", 8) == 0) { + /* Replace all occurences of #include by #sinclude */ + strcpy(cp4, "#sinclude"); + cp4 += 9; + } else *cp4++ = *cp3++; } @@ -301,13 +309,14 @@ } /* copy the argument and create replacement string */ - for (i = 0; cps < cpEND && *cps != '\n'; ) + for (i = 0; i < sizeof(caArg) && cps < cpEND && *cps != '\n'; ) caArg[i++] = *cps++; caArg[i++] = NUL; if (*cps == '\n') cps++; - sprintf(caStr, "%s if (%s) { _%s//\n", + snprintf(caStr, sizeof(caStr), "%s if (%s) { _%s//\n", ePerl_begin_delimiter, caArg, ePerl_end_delimiter); + caStr[sizeof(caStr)-1] = NUL; cp = caStr; } else if (strncmp(cp, "#elsif", 6) == 0) { @@ -326,13 +335,14 @@ } /* copy the argument and create replacement string */ - for (i = 0; cps < cpEND && *cps != '\n'; ) + for (i = 0; i < sizeof(caArg) && cps < cpEND && *cps != '\n'; ) caArg[i++] = *cps++; caArg[i++] = NUL; if (*cps == '\n') cps++; - sprintf(caStr, "%s } elsif (%s) { _%s//\n", + snprintf(caStr, sizeof(caStr), "%s } elsif (%s) { _%s//\n", ePerl_begin_delimiter, caArg, ePerl_end_delimiter); + caStr[sizeof(caStr)-1] = NUL; cp = caStr; } else if (strncmp(cp, "#else", 5) == 0) { @@ -348,8 +358,9 @@ cps++; /* create replacement string */ - sprintf(caStr, "%s } else { _%s//\n", + snprintf(caStr, sizeof(caStr), "%s } else { _%s//\n", ePerl_begin_delimiter, ePerl_end_delimiter); + caStr[sizeof(caStr)-1] = NUL; cp = caStr; } else if (strncmp(cp, "#endif", 6) == 0) { @@ -365,8 +376,9 @@ cps++; /* create replacement string */ - sprintf(caStr, "%s } _%s//\n", + snprintf(caStr, sizeof(caStr), "%s } _%s//\n", ePerl_begin_delimiter, ePerl_end_delimiter); + caStr[sizeof(caStr)-1] = NUL; cp = caStr; } else if (strncmp(cp, "#c", 2) == 0) { @@ -396,7 +408,8 @@ return NULL; } cpOutBuf = cp2; - strcpy(cpOutBuf+nOut, cp); + strncpy(cpOutBuf+nOut, cp, nOutBuf - nOut); + *(cpOutBuf+nOutBuf-1) = NUL; nOut += i; continue; @@ -413,7 +426,8 @@ return NULL; } cpOutBuf = cp2; - strcpy(cpOutBuf+nOut, cps); + strncpy(cpOutBuf+nOut, cps, nOutBuf - nOut); + *(cpOutBuf+nOutBuf-1) = NUL; break; } --- eperl-2.2.14.orig/eperl_version.c +++ eperl-2.2.14/eperl_version.c @@ -1,30 +1,46 @@ -/* !! This file was automatically generated by NEWVERS !! */ +/* +** eperl_version.c -- Version Information for ePerl (syntax: C/C++) +** [automatically generated and maintained by GNU shtool] +*/ + +#ifdef _EPERL_VERSION_C_AS_HEADER_ + +#ifndef _EPERL_VERSION_C_ +#define _EPERL_VERSION_C_ + +#define EPERL_VERSION 0x20220E + +typedef struct { + const int v_hex; + const char *v_short; + const char *v_long; + const char *v_tex; + const char *v_gnu; + const char *v_web; + const char *v_sccs; + const char *v_rcs; +} eperl_version_t; + +extern eperl_version_t eperl_version; + +#endif /* _EPERL_VERSION_C_ */ + +#else /* _EPERL_VERSION_C_AS_HEADER_ */ + +#define _EPERL_VERSION_C_AS_HEADER_ +#include "eperl_version.c" +#undef _EPERL_VERSION_C_AS_HEADER_ + +eperl_version_t eperl_version = { + 0x20220E, + "2.2.14", + "2.2.14 (02-Aug-1998)", + "This is ePerl, Version 2.2.14 (02-Aug-1998)", + "ePerl 2.2.14 (02-Aug-1998)", + "ePerl/2.2.14", + "@(#)ePerl 2.2.14 (02-Aug-1998)", + "$Id: ePerl 2.2.14 (02-Aug-1998) $" +}; -/* for logfiles, etc. */ -char ePerl_Version[] = - "2.2.14 (02-08-1998)"; - -/* interactive 'hello' string to identify us to the user */ -char ePerl_Hello[] = - "This is ePerl Version 2.2.14 (02-08-1998)"; - -/* a GNU --version output */ -char ePerl_GNUVersion[] = - "ePerl Version 2.2.14"; - -/* a UNIX what(1) id string */ -char ePerl_WhatID[] = - "@(#)ePerl Version 2.2.14 (02-08-1998)"; - -/* a RCS ident(1) id string */ -char ePerl_RCSIdentID[] = - "$Id: ePerl 2.2.14 02-08-1998 $"; - -/* a WWW id string */ -char ePerl_WebID[] = - "ePerl/2.2.14"; - -/* a plain id string */ -char ePerl_PlainID[] = - "2.2.14"; +#endif /* _EPERL_VERSION_C_AS_HEADER_ */ --- eperl-2.2.14.orig/configure +++ eperl-2.2.14/configure @@ -1,56 +1,717 @@ #! /bin/sh +# From configure.in Revision: 1.9 . +# 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 -# From configure.in Revision: 2.0 -echo "Configuring for ePerl `./etc/newvers -l c -D eperl_version.c`" +fi -ac_aux_dir= -for ac_dir in etc $srcdir/etc; 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 + + + +# 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 -if test -z "$ac_aux_dir"; then - { echo "configure: error: can not find install-sh or install.sh in etc $srcdir/etc" 1>&2; exit 1; } +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 -ac_config_guess=$ac_aux_dir/config.guess -ac_config_sub=$ac_aux_dir/config.sub -ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. +# 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 -# Guess values for system-dependent variables and create Makefiles. -# Generated automatically using autoconf version 2.12 -# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. -# -# This configure script is free software; the Free Software Foundation -# gives unlimited permission to copy, distribute and modify it. +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'" -# Defaults: -ac_help= + + +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 -# Any additions from configure.in: +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="README" ac_default_prefix=/usr/local -ac_help="$ac_help - --with-perl=PATH force the usage of a specific installed Perl" -ac_help="$ac_help - --enable-debug to enable the debugging options for compilation" +# 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 +libsubdir +tmpdir +PATH_PERL +perlprog +perlvers +perl_prog +perl_vers +perl_osname +perl_osvers +perl_os +perl_cc +perl_optimize +perl_ccflags +perl_ldflags +perl_libs +perl_archlib +perl_dla +perl_cccdlflags +perl_ccdlflags +build_user +build_time_ctime +build_time_iso +CC +CFLAGS +LDFLAGS +CPPFLAGS +ac_ct_CC +EXEEXT +OBJEXT +RANLIB +AR +SIZE +debug +dmalloc +SET_MAKE +CPP +GREP +EGREP +LIBOBJS +LTLIBOBJS' +ac_subst_files='' + ac_precious_vars='build_alias +host_alias +target_alias +CC +CFLAGS +LDFLAGS +LIBS +CPPFLAGS +CPP' + # 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. -build=NONE -cache_file=./config.cache +cache_file=/dev/null exec_prefix=NONE -host=NONE no_create= -nonopt=NONE no_recursion= prefix=NONE program_prefix=NONE @@ -59,93 +720,117 @@ silent= site= srcdir= -target=NONE verbose= x_includes=NONE x_libraries=NONE + +# Installation directory options. +# These are left unexpanded so users can "make install exec_prefix=/foo" +# and all the variables that are supposed to be based on exec_prefix +# by default will actually change. +# Use braces instead of parens because sh, perl, etc. also accept them. +# (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' -datadir='${prefix}/share' +datarootdir='${prefix}/share' +datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' -libdir='${exec_prefix}/lib' includedir='${prefix}/include' oldincludedir='/usr/include' -infodir='${prefix}/info' -mandir='${prefix}/man' - -# Initialize some other variables. -subdirs= -MFLAGS= MAKEFLAGS= -# Maximum number of lines to put in a shell here document. -ac_max_here_lines=12 +docdir='${datarootdir}/doc/${PACKAGE}' +infodir='${datarootdir}/info' +htmldir='${docdir}' +dvidir='${docdir}' +pdfdir='${docdir}' +psdir='${docdir}' +libdir='${exec_prefix}/lib' +localedir='${datarootdir}/locale' +mandir='${datarootdir}/man' ac_prev= +ac_dashdash= for ac_option do - # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then - eval "$ac_prev=\$ac_option" + eval $ac_prev=\$ac_option ac_prev= continue fi - case "$ac_option" in - -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; - *) ac_optarg= ;; + case $ac_option in + *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; + *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. - case "$ac_option" in + case $ac_dashdash$ac_option in + --) + ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) - bindir="$ac_optarg" ;; + bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) - ac_prev=build ;; + ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) - build="$ac_optarg" ;; + build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) - cache_file="$ac_optarg" ;; + cache_file=$ac_optarg ;; - -datadir | --datadir | --datadi | --datad | --data | --dat | --da) + --config-cache | -C) + cache_file=config.cache ;; + + -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; - -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ - | --da=*) - datadir="$ac_optarg" ;; + -datadir=* | --datadir=* | --datadi=* | --datad=*) + datadir=$ac_optarg ;; + + -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ + | --dataroo | --dataro | --datar) + ac_prev=datarootdir ;; + -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ + | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) + datarootdir=$ac_optarg ;; -disable-* | --disable-*) - ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` + ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. - if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then - { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } - fi - ac_feature=`echo $ac_feature| sed 's/-/_/g'` - eval "enable_${ac_feature}=no" ;; + expr "x$ac_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=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` + ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. - if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then - { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } - fi - ac_feature=`echo $ac_feature| sed 's/-/_/g'` - case "$ac_option" in - *=*) ;; - *) ac_optarg=yes ;; - esac - eval "enable_${ac_feature}='$ac_optarg'" ;; + 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- \ @@ -154,116 +839,77 @@ -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) - exec_prefix="$ac_optarg" ;; + exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; - -help | --help | --hel | --he) - # Omit some internal or obsolete options to make the list less imposing. - # This message is too long to be a string in the A/UX 3.1 sh. - cat << EOF -Usage: configure [options] [host] -Options: [defaults in brackets after descriptions] -Configuration: - --cache-file=FILE cache test results in FILE - --help print this message - --no-create do not create output files - --quiet, --silent do not print \`checking...' messages - --version print the version of autoconf that created configure -Directory and file names: - --prefix=PREFIX install architecture-independent files in PREFIX - [$ac_default_prefix] - --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX - [same as prefix] - --bindir=DIR user executables in DIR [EPREFIX/bin] - --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] - --libexecdir=DIR program executables in DIR [EPREFIX/libexec] - --datadir=DIR read-only architecture-independent data in DIR - [PREFIX/share] - --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] - --sharedstatedir=DIR modifiable architecture-independent data in DIR - [PREFIX/com] - --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] - --libdir=DIR object code libraries in DIR [EPREFIX/lib] - --includedir=DIR C header files in DIR [PREFIX/include] - --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] - --infodir=DIR info documentation in DIR [PREFIX/info] - --mandir=DIR man documentation in DIR [PREFIX/man] - --srcdir=DIR find the sources in DIR [configure dir or ..] - --program-prefix=PREFIX prepend PREFIX to installed program names - --program-suffix=SUFFIX append SUFFIX to installed program names - --program-transform-name=PROGRAM - run sed PROGRAM on installed program names -EOF - cat << EOF -Host type: - --build=BUILD configure for building on BUILD [BUILD=HOST] - --host=HOST configure for HOST [guessed] - --target=TARGET configure for TARGET [TARGET=HOST] -Features and packages: - --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) - --enable-FEATURE[=ARG] include FEATURE [ARG=yes] - --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] - --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) - --x-includes=DIR X include files are in DIR - --x-libraries=DIR X library files are in DIR -EOF - if test -n "$ac_help"; then - echo "--enable and --with options recognized:$ac_help" - fi - exit 0 ;; + -help | --help | --hel | --he | -h) + ac_init_help=long ;; + -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) + ac_init_help=recursive ;; + -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) + ac_init_help=short ;; -host | --host | --hos | --ho) - ac_prev=host ;; + ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) - host="$ac_optarg" ;; + host_alias=$ac_optarg ;; + + -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) + ac_prev=htmldir ;; + -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ + | --ht=*) + htmldir=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) - includedir="$ac_optarg" ;; + includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) - infodir="$ac_optarg" ;; + infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) - libdir="$ac_optarg" ;; + libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) - libexecdir="$ac_optarg" ;; + libexecdir=$ac_optarg ;; + + -localedir | --localedir | --localedi | --localed | --locale) + ac_prev=localedir ;; + -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) + localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ - | --localstate | --localstat | --localsta | --localst \ - | --locals | --local | --loca | --loc | --lo) + | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ - | --localstate=* | --localstat=* | --localsta=* | --localst=* \ - | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) - localstatedir="$ac_optarg" ;; + | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) + localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) - mandir="$ac_optarg" ;; + mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c) + | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ @@ -277,26 +923,26 @@ -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) - oldincludedir="$ac_optarg" ;; + oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) - prefix="$ac_optarg" ;; + prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) - program_prefix="$ac_optarg" ;; + program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) - program_suffix="$ac_optarg" ;; + program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ @@ -313,7 +959,17 @@ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) - program_transform_name="$ac_optarg" ;; + program_transform_name=$ac_optarg ;; + + -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) + ac_prev=pdfdir ;; + -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) + pdfdir=$ac_optarg ;; + + -psdir | --psdir | --psdi | --psd | --ps) + ac_prev=psdir ;; + -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) + psdir=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) @@ -323,7 +979,7 @@ ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) - sbindir="$ac_optarg" ;; + sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ @@ -334,58 +990,53 @@ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) - sharedstatedir="$ac_optarg" ;; + sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) - site="$ac_optarg" ;; + site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) - srcdir="$ac_optarg" ;; + srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) - sysconfdir="$ac_optarg" ;; + sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) - ac_prev=target ;; + ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) - target="$ac_optarg" ;; + target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; - -version | --version | --versio | --versi | --vers) - echo "configure generated by autoconf version 2.12" - exit 0 ;; + -version | --version | --versio | --versi | --vers | -V) + ac_init_version=: ;; -with-* | --with-*) - ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` + ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. - if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then - { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } - fi - ac_package=`echo $ac_package| sed 's/-/_/g'` - case "$ac_option" in - *=*) ;; - *) ac_optarg=yes ;; - esac - eval "with_${ac_package}='$ac_optarg'" ;; + 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=`echo $ac_option|sed -e 's/-*without-//'` + ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. - if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then - { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } - fi - ac_package=`echo $ac_package| sed 's/-/_/g'` - eval "with_${ac_package}=no" ;; + expr "x$ac_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. @@ -396,155 +1047,643 @@ ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) - x_includes="$ac_optarg" ;; + x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) - x_libraries="$ac_optarg" ;; + x_libraries=$ac_optarg ;; - -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } + -*) { 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 ;; + *) - if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then - echo "configure: warning: $ac_option: invalid host type" 1>&2 - fi - if test "x$nonopt" != xNONE; then - { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } - fi - nonopt="$ac_option" + # FIXME: should be removed in autoconf 3.0. + 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 - { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } + ac_option=--`echo $ac_prev | sed 's/_/-/g'` + { echo "$as_me: error: missing argument to $ac_option" >&2 + { (exit 1); exit 1; }; } fi -trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 +# 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 -# File descriptor usage: -# 0 standard input -# 1 file creation -# 2 errors and warnings -# 3 some systems may open it to /dev/tty -# 4 used on the Kubota Titan -# 6 checking for... messages and results -# 5 compiler messages saved in config.log -if test "$silent" = yes; then - exec 6>/dev/null -else - exec 6>&1 +# 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 -exec 5>./config.log -echo "\ -This file contains any messages produced by compilers while -running configure, to aid debugging if configure makes a mistake. -" 1>&5 +ac_tool_prefix= +test -n "$host_alias" && ac_tool_prefix=$host_alias- -# Strip out --no-create and --no-recursion so they do not pile up. -# Also quote any args containing shell metacharacters. -ac_configure_args= -for ac_arg -do - case "$ac_arg" in - -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c) ;; - -no-recursion | --no-recursion | --no-recursio | --no-recursi \ - | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; - *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) - ac_configure_args="$ac_configure_args '$ac_arg'" ;; - *) ac_configure_args="$ac_configure_args $ac_arg" ;; - esac -done +test "$silent" = yes && exec 6>/dev/null -# NLS nuisances. -# Only set these to C if already set. These must not be set unconditionally -# because not all systems understand e.g. LANG=C (notably SCO). -# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! -# Non-C LC_CTYPE values break the ctype check. -if test "${LANG+set}" = set; then LANG=C; export LANG; fi -if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi -if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi -if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi -# confdefs.h avoids OS command line length limits that DEFS can exceed. -rm -rf conftest* confdefs.h -# AIX cpp loses on an empty file, so make sure it contains at least a newline. -echo > confdefs.h - -# A filename unique to this package, relative to the directory that -# configure is in, which we can look for to find out if srcdir is correct. -ac_unique_file=README +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 its parent. - ac_prog=$0 - ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` - test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. + # Try the directory containing this script, then the parent directory. + ac_confdir=`$as_dirname -- "$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 + if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi -if test ! -r $srcdir/$ac_unique_file; then - if test "$ac_srcdir_defaulted" = yes; then - { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } - else - { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } - fi -fi -srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` - -# Prefer explicitly selected file to automatically selected ones. -if test -z "$CONFIG_SITE"; then - if test "x$prefix" != xNONE; then - CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" - else - CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" - fi -fi -for ac_site_file in $CONFIG_SITE; do - if test -r "$ac_site_file"; then - echo "loading site script $ac_site_file" - . "$ac_site_file" - fi +if test ! -r "$srcdir/$ac_unique_file"; then + test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." + { 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 -if test -r "$cache_file"; then - echo "loading cache $cache_file" - . $cache_file -else - echo "creating cache $cache_file" - > $cache_file -fi +# +# Report the --help message. +# +if test "$ac_init_help" = "long"; then + # Omit some internal or obsolete options to make the list less imposing. + # This message is too long to be a string in the A/UX 3.1 sh. + cat <<_ACEOF +\`configure' configures this package to adapt to many kinds of systems. -ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. -ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cc_cross - -if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then - # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. - if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then - ac_n= ac_c=' -' ac_t=' ' - else - ac_n=-n ac_c= ac_t= +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 + +Optional Features: + --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) + --enable-FEATURE[=ARG] include FEATURE [ARG=yes] + --enable-debug to enable the debugging options for compilation + +Optional Packages: + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] + --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) + --with-perl=PATH force the usage of a specific Perl 5 interpreter + +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 + +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 - ac_n= ac_c='\c' ac_t= + { 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 @@ -552,6 +1691,35 @@ + + + + + + + + + + + +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_ac.h" + + +shtool=./etc/shtool +TERM_BOLD=`$shtool echo -e %B 2>/dev/null` +TERM_NORM=`$shtool echo -e %b 2>/dev/null` + +EPERL_VERSION="`$shtool version -lc -d long eperl_version.c`" +echo "${TERM_BOLD}Configuring for ePerl ${EPERL_VERSION}${TERM_NORM}" + + test "x$prefix" = xNONE && prefix=$ac_default_prefix eval "dir=$prefix" case $dir in @@ -560,155 +1728,155 @@ esac +tmpdir=${TMPDIR-/tmp} + + +{ echo "$as_me:$LINENO: result: " >&5 +echo "${ECHO_T}" >&6; } +{ echo "$as_me:$LINENO: result: ${TERM_BOLD}CHECK: Configuration of Perl Language${TERM_NORM}" >&5 +echo "${ECHO_T}${TERM_BOLD}CHECK: Configuration of Perl Language${TERM_NORM}" >&6; } -echo "$ac_t""" 1>&6 -echo "$ac_t""__ CHECK: Configuration of Perl Language __" 1>&6 +{ echo "$as_me:$LINENO: checking for Perl language" >&5 +echo $ECHO_N "checking for Perl language... $ECHO_C" >&6; } -echo $ac_n "checking for Perl language""... $ac_c" 1>&6 -echo "configure:570: checking for Perl language" >&5 -# Check whether --with-perl or --without-perl was given. +# Check whether --with-perl was given. if test "${with_perl+set}" = set; then - withval="$with_perl" - perlprog=$with_perl -perlvers=`$perlprog -v | grep version | sed -e 's/.* version //' -e 's/ built.*//' -e 's/ with.*//'` + withval=$with_perl; +perlprog=$with_perl +perlvers=`$perlprog -e 'printf "%.3f",$]'` else - TMPFILE=/tmp/x.$$ -rm -f $TMPFILE -touch $TMPFILE -c=0 -for dir in `echo $PATH | sed -e 's/:/ /g'` /tmp; do + +perlvers= +for dir in `echo $PATH | sed -e 's/:/ /g'` $tmpdir; do for perl in perl5 perl miniperl; do if test -f "$dir/$perl"; then if test -x "$dir/$perl"; then - perl="$dir/$perl" - version=`$perl -v | grep version | sed -e 's/.* version //' -e 's/ built.*//' -e 's/ with.*//'` - versionnum="`echo $version | sed -e 's/\.//g' -e 's/_//g'`" - versionnum=`expr $versionnum - $c` - echo "$versionnum $version $perl" >>$TMPFILE + perlprog="$dir/$perl" + if $perlprog -e 'require 5.003'; then + perlvers=`$perlprog -e 'printf "%.3f",$]'` + break 2 + fi fi fi done - c=`expr $c + 1` done -perlvers="`cat $TMPFILE | sort -u | tail -1 | cut '-d ' -f2`" -perlprog="`cat $TMPFILE | sort -u | tail -1 | cut '-d ' -f3`" -rm -f $TMPFILE fi PATH_PERL=$perlprog -echo "$ac_t""$perlprog v$perlvers" 1>&6 -case $perlvers in - 5.003* | 5.004* | 5.005* | 5.006* ) - ;; - * ) echo "" - echo "Latest Perl found on your system is $perlvers," - echo "but at least Perl version 5.003 is required." - echo "In case the newer one is not in PATH, just use" - echo "the option --with-perl=/path/to/bin/perl to" - echo "provide the correct executable." - echo "" - { echo "configure: error: Perl version too old" 1>&2; exit 1; } - ;; -esac -case $perlvers in - 5.00[3-6]_[0-9][0-9] ) - perlvnum=`echo $perlvers | sed -e 's/\.//' -e 's/_//'` ;; - 5.00[3-6] ) - perlvnum=`echo $perlvers | sed -e 's/\.//' -e 's/$/00/'` ;; - * ) - perlvnum=`echo $perlvers | sed -e 's/\.//' -e 's/_//'` ;; -esac - +{ echo "$as_me:$LINENO: result: $perlprog v$perlvers" >&5 +echo "${ECHO_T}$perlprog v$perlvers" >&6; } +if $perlprog -e 'require 5.003'; then + : +else + echo "" + echo "Latest Perl found on your system is $perlvers," + echo "but at least Perl version 5.003 is required." + echo "In case the newer one is not in PATH, just use" + echo "the option --with-perl=/path/to/bin/perl to" + echo "provide the correct executable." + echo "" + { { echo "$as_me:$LINENO: error: Perl version too old" >&5 +echo "$as_me: error: Perl version too old" >&2;} + { (exit 1); exit 1; }; } +fi perl_prog=$perlprog perl_vers=$perlvers -perl_vnum=$perlvnum - if test -f $PATH_PERL; then : else - { echo "configure: error: required program ``perl'' not found" 1>&2; exit 1; } + { { echo "$as_me:$LINENO: error: required program \`\`perl'' not found" >&5 +echo "$as_me: error: required program \`\`perl'' not found" >&2;} + { (exit 1); exit 1; }; } fi -echo $ac_n "checking for Perl knowledge of system""... $ac_c" 1>&6 -echo "configure:643: checking for Perl knowledge of system" >&5 +{ echo "$as_me:$LINENO: checking for Perl knowledge of system" >&5 +echo $ECHO_N "checking for Perl knowledge of system... $ECHO_C" >&6; } perl_osname="`$perl_prog -e 'use Config; print $Config{osname}'`"; perl_osvers="`$perl_prog -e 'use Config; print $Config{osvers}'`"; perl_os="$perl_osname-$perl_osvers" -echo "$ac_t""$perl_os" 1>&6 +{ echo "$as_me:$LINENO: result: $perl_os" >&5 +echo "${ECHO_T}$perl_os" >&6; } -echo $ac_n "checking for Perl standard compiler""... $ac_c" 1>&6 -echo "configure:653: checking for Perl standard compiler" >&5 +{ echo "$as_me:$LINENO: checking for Perl standard compiler" >&5 +echo $ECHO_N "checking for Perl standard compiler... $ECHO_C" >&6; } perl_cc="`$perl_prog -e 'use Config; print $Config{cc}'`"; if test ".$CC" = .; then CC=$perl_cc export CC - echo "$ac_t""$perl_cc" 1>&6 + { echo "$as_me:$LINENO: result: $perl_cc" >&5 +echo "${ECHO_T}$perl_cc" >&6; } else perl_cc=$CC - echo "$ac_t""$perl_cc (OVERWRITTEN)" 1>&6 + { echo "$as_me:$LINENO: result: $perl_cc (OVERWRITTEN)" >&5 +echo "${ECHO_T}$perl_cc (OVERWRITTEN)" >&6; } fi -echo $ac_n "checking for Perl standard optimization flags""... $ac_c" 1>&6 -echo "configure:666: checking for Perl standard optimization flags" >&5 +{ echo "$as_me:$LINENO: checking for Perl standard optimization flags" >&5 +echo $ECHO_N "checking for Perl standard optimization flags... $ECHO_C" >&6; } perl_optimize="`$perl_prog -e 'use Config; print $Config{optimize}'`"; -echo "$ac_t""$perl_optimize" 1>&6 +{ echo "$as_me:$LINENO: result: $perl_optimize" >&5 +echo "${ECHO_T}$perl_optimize" >&6; } -echo $ac_n "checking for Perl standard compilation flags""... $ac_c" 1>&6 -echo "configure:672: checking for Perl standard compilation flags" >&5 +{ echo "$as_me:$LINENO: checking for Perl standard compilation flags" >&5 +echo $ECHO_N "checking for Perl standard compilation flags... $ECHO_C" >&6; } perl_ccflags="`$perl_prog -e 'use Config; print $Config{ccflags}'`"; case $perl_os in *hpux* ) perl_ccflags="$perl_ccflags -Wp,-H32768" ;; *irix-5.* ) perl_ccflags="`echo $perl_ccflags | sed -e 's/-D_POSIX_SOURCE//'`" ;; esac -echo "$ac_t""$perl_ccflags" 1>&6 +{ echo "$as_me:$LINENO: result: $perl_ccflags" >&5 +echo "${ECHO_T}$perl_ccflags" >&6; } -echo $ac_n "checking for Perl standard link flags""... $ac_c" 1>&6 -echo "configure:682: checking for Perl standard link flags" >&5 +{ echo "$as_me:$LINENO: checking for Perl standard link flags" >&5 +echo $ECHO_N "checking for Perl standard link flags... $ECHO_C" >&6; } perl_ldflags="`$perl_prog -e 'use Config; print $Config{ldflags}'`"; case $perl_os in *irix-6.* ) perl_ldflags="$perl_ldflags '-Wl,-woff 85'" ;; esac -echo "$ac_t""$perl_ldflags" 1>&6 +{ echo "$as_me:$LINENO: result: $perl_ldflags" >&5 +echo "${ECHO_T}$perl_ldflags" >&6; } -echo $ac_n "checking for Perl library files""... $ac_c" 1>&6 -echo "configure:691: checking for Perl library files" >&5 +{ echo "$as_me:$LINENO: checking for Perl library files" >&5 +echo $ECHO_N "checking for Perl library files... $ECHO_C" >&6; } perl_libs="`$perl_prog -e 'use Config; print $Config{libs}'`" -echo "$ac_t""$perl_libs" 1>&6 +{ echo "$as_me:$LINENO: result: $perl_libs" >&5 +echo "${ECHO_T}$perl_libs" >&6; } -echo $ac_n "checking for Perl architecture directory""... $ac_c" 1>&6 -echo "configure:697: checking for Perl architecture directory" >&5 +{ echo "$as_me:$LINENO: checking for Perl architecture directory" >&5 +echo $ECHO_N "checking for Perl architecture directory... $ECHO_C" >&6; } perl_archlib="`$perlprog -e 'use Config; print $Config{archlib}'`"; -echo "$ac_t""$perl_archlib" 1>&6 +{ echo "$as_me:$LINENO: result: $perl_archlib" >&5 +echo "${ECHO_T}$perl_archlib" >&6; } -echo $ac_n "checking for Perl dynamic loading support""... $ac_c" 1>&6 -echo "configure:703: checking for Perl dynamic loading support" >&5 +{ echo "$as_me:$LINENO: checking for Perl dynamic loading support" >&5 +echo $ECHO_N "checking for Perl dynamic loading support... $ECHO_C" >&6; } usedl="`$perlprog -e 'use Config; print $Config{usedl}'`"; case $usedl in define ) rc=yes - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_PERL_DYNALOADER 1 -EOF +_ACEOF - perl_dla=$perl_archlib/auto/DynaLoader/DynaLoader.a + perl_dla=`perl -MExtUtils::Embed -e ldopts` ;; * ) rc=no @@ -716,20 +1884,22 @@ ;; esac -echo "$ac_t""$rc" 1>&6 +{ echo "$as_me:$LINENO: result: $rc" >&5 +echo "${ECHO_T}$rc" >&6; } -echo $ac_n "checking for Perl dynamic loading compilation flags""... $ac_c" 1>&6 -echo "configure:723: checking for Perl dynamic loading compilation flags" >&5 +{ echo "$as_me:$LINENO: checking for Perl dynamic loading compilation flags" >&5 +echo $ECHO_N "checking for Perl dynamic loading compilation flags... $ECHO_C" >&6; } perl_cccdlflags="`$perlprog -e 'use Config; print $Config{cccdlflags}'`"; case $perl_cccdlflags in " " ) x="none" ;; * ) x="$perl_cccdlflags" ;; esac -echo "$ac_t""$x" 1>&6 +{ echo "$as_me:$LINENO: result: $x" >&5 +echo "${ECHO_T}$x" >&6; } -echo $ac_n "checking for Perl dynamic loading link flags""... $ac_c" 1>&6 -echo "configure:733: checking for Perl dynamic loading link flags" >&5 +{ echo "$as_me:$LINENO: checking for Perl dynamic loading link flags" >&5 +echo $ECHO_N "checking for Perl dynamic loading link flags... $ECHO_C" >&6; } perl_ccdlflags="`$perlprog -e 'use Config; print $Config{ccdlflags}'`"; case $perl_os in *aix* ) perl_ccdlflags="`echo $perl_ccdlflags | sed -e 's;-bE:perl.exp;-bE:${perl_archlib}/CORE/perl.exp;'`" ;; @@ -738,293 +1908,1131 @@ " " ) x="none" ;; * ) x="$perl_ccdlflags" ;; esac -echo "$ac_t""$x" 1>&6 +{ echo "$as_me:$LINENO: result: $x" >&5 +echo "${ECHO_T}$x" >&6; } -echo "$ac_t""" 1>&6 -echo "$ac_t""__ CHECK: System Build Environment __" 1>&6 +{ echo "$as_me:$LINENO: result: " >&5 +echo "${ECHO_T}" >&6; } +{ echo "$as_me:$LINENO: result: ${TERM_BOLD}CHECK: System Build Environment${TERM_NORM}" >&5 +echo "${ECHO_T}${TERM_BOLD}CHECK: System Build Environment${TERM_NORM}" >&6; } -echo $ac_n "checking for build user""... $ac_c" 1>&6 -echo "configure:751: checking for build user" >&5 -build_user="`$ac_aux_dir/buildinfo -n %u@%h%d`" +{ echo "$as_me:$LINENO: checking for build user" >&5 +echo $ECHO_N "checking for build user... $ECHO_C" >&6; } +build_user="`$shtool echo -n -e %u@%h%d`" -echo "$ac_t""$build_user" 1>&6 +{ echo "$as_me:$LINENO: result: $build_user" >&5 +echo "${ECHO_T}$build_user" >&6; } -echo $ac_n "checking for build time""... $ac_c" 1>&6 -echo "configure:757: checking for build time" >&5 +{ echo "$as_me:$LINENO: checking for build time" >&5 +echo $ECHO_N "checking for build time... $ECHO_C" >&6; } build_time_ctime="`date | sed -e 's/\n$//'`" -build_time_iso="`$ac_aux_dir/buildinfo -n '%D-%m-%Y'`" -echo "$ac_t""$build_time_iso" 1>&6 +build_time_iso="`$shtool echo -n -e '%D-%m-%Y'`" +{ echo "$as_me:$LINENO: result: $build_time_iso" >&5 +echo "${ECHO_T}$build_time_iso" >&6; } + + +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 -# Extract the first word of "gcc", so it can be a program name with args. +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 $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:767: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +{ 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 - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_CC="gcc" - break - fi - done - IFS="$ac_save_ifs" +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" +CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$ac_t""$CC" 1>&6 + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } else - echo "$ac_t""no" 1>&6 + { 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 $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:796: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +{ 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 - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" ac_prog_rejected=no - for ac_dir in $PATH; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then - ac_prog_rejected=yes - continue - fi - ac_cv_prog_CC="cc" - break - fi - done - IFS="$ac_save_ifs" +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 $# -gt 0; then + 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 - set dummy "$ac_dir/$ac_word" "$@" - shift - ac_cv_prog_CC="$@" + ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi -CC="$ac_cv_prog_CC" +CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$ac_t""$CC" 1>&6 + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } else - echo "$ac_t""no" 1>&6 -fi - - test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi -echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:844: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 -ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. -ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cc_cross - -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - ac_cv_prog_cc_works=yes - # If we can't run a trivial program, we are probably using a cross compiler. - if (./conftest; exit) 2>/dev/null; then - ac_cv_prog_cc_cross=no - else - ac_cv_prog_cc_cross=yes +fi +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 "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - ac_cv_prog_cc_works=no + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi -rm -fr conftest* -echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 -if test $ac_cv_prog_cc_works = no; then - { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } -fi -echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:878: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 -echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 -cross_compiling=$ac_cv_prog_cc_cross -echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:883: checking whether we are using GNU C" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + 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 - cat > conftest.c <&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then - ac_cv_prog_gcc=yes + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else - ac_cv_prog_gcc=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 + 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 - -echo "$ac_t""$ac_cv_prog_gcc" 1>&6 - -if test $ac_cv_prog_gcc = yes; then - GCC=yes - ac_test_CFLAGS="${CFLAGS+set}" - ac_save_CFLAGS="$CFLAGS" - CFLAGS= - echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:907: checking whether ${CC-cc} accepts -g" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - echo 'void f(){}' > conftest.c -if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then - ac_cv_prog_cc_g=yes +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 - ac_cv_prog_cc_g=no + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi -rm -f conftest* -fi -echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 - if test "$ac_test_CFLAGS" = set; then - CFLAGS="$ac_save_CFLAGS" - elif test $ac_cv_prog_cc_g = yes; then - CFLAGS="-g -O2" + test -n "$ac_ct_CC" && break +done + + if test "x$ac_ct_CC" = x; then + CC="" else - CFLAGS="-O2" + 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 - GCC= - test "${CFLAGS+set}" = set || CFLAGS="-g" fi -# Extract the first word of "ranlib", so it can be a program name with args. -set dummy ranlib; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:937: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test -n "$RANLIB"; then - ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_RANLIB="ranlib" - break - fi - done - IFS="$ac_save_ifs" - test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" -fi fi -RANLIB="$ac_cv_prog_RANLIB" -if test -n "$RANLIB"; then - echo "$ac_t""$RANLIB" 1>&6 + + +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 - echo "$ac_t""no" 1>&6 + ac_file='' fi -# Extract the first word of "ar", so it can be a program name with args. -set dummy ar; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:966: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else +{ 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 -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. +set dummy ${ac_tool_prefix}ranlib; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_RANLIB+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$RANLIB"; then + ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +RANLIB=$ac_cv_prog_RANLIB +if test -n "$RANLIB"; then + { echo "$as_me:$LINENO: result: $RANLIB" >&5 +echo "${ECHO_T}$RANLIB" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_RANLIB"; then + ac_ct_RANLIB=$RANLIB + # Extract the first word of "ranlib", so it can be a program name with args. +set dummy ranlib; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_RANLIB"; then + ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_RANLIB="ranlib" + 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_RANLIB=$ac_cv_prog_ac_ct_RANLIB +if test -n "$ac_ct_RANLIB"; then + { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 +echo "${ECHO_T}$ac_ct_RANLIB" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + if test "x$ac_ct_RANLIB" = x; then + RANLIB=":" + 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 + RANLIB=$ac_ct_RANLIB + fi +else + RANLIB="$ac_cv_prog_RANLIB" +fi + +# Extract the first word of "ar", so it can be a program name with args. +set dummy ar; 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_AR+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else if test -n "$AR"; then ac_cv_prog_AR="$AR" # Let the user override the test. else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_AR="ar" - break - fi - done - IFS="$ac_save_ifs" +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_AR="ar" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + fi fi -AR="$ac_cv_prog_AR" +AR=$ac_cv_prog_AR if test -n "$AR"; then - echo "$ac_t""$AR" 1>&6 + { echo "$as_me:$LINENO: result: $AR" >&5 +echo "${ECHO_T}$AR" >&6; } else - echo "$ac_t""no" 1>&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + # Extract the first word of "size", so it can be a program name with args. set dummy size; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:994: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_SIZE'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_SIZE+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$SIZE"; then ac_cv_prog_SIZE="$SIZE" # Let the user override the test. else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_SIZE="size" - break - fi - done - IFS="$ac_save_ifs" +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_SIZE="size" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + fi fi -SIZE="$ac_cv_prog_SIZE" +SIZE=$ac_cv_prog_SIZE if test -n "$SIZE"; then - echo "$ac_t""$SIZE" 1>&6 + { echo "$as_me:$LINENO: result: $SIZE" >&5 +echo "${ECHO_T}$SIZE" >&6; } else - echo "$ac_t""no" 1>&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + case $perl_os in *irix* ) SIZE="$SIZE -B" ;; esac -echo $ac_n "checking for compilation debug mode""... $ac_c" 1>&6 -echo "configure:1024: checking for compilation debug mode" >&5 -# Check whether --enable-debug or --disable-debug was given. +{ echo "$as_me:$LINENO: checking for compilation debug mode" >&5 +echo $ECHO_N "checking for compilation debug mode... $ECHO_C" >&6; } +# Check whether --enable-debug was given. if test "${enable_debug+set}" = set; then - enableval="$enable_debug" - if test ".$ac_cv_prog_gcc" = ".yes"; then + enableval=$enable_debug; if test ".$ac_cv_c_compiler_gnu" = ".yes"; then CFLAGS="-Wall -g -ggdb3" LDFLAGS="-g -ggdb3" else @@ -1033,9 +3041,9 @@ fi x="enabled" debug=on -cat >> confdefs.h <<\EOF +cat >>confdefs.h <<\_ACEOF #define DEBUG_ENABLED 1 -EOF +_ACEOF else @@ -1046,18 +3054,19 @@ fi -echo "$ac_t""$x" 1>&6 +{ echo "$as_me:$LINENO: result: $x" >&5 +echo "${ECHO_T}$x" >&6; } if test "$debug" = "on"; then - echo $ac_n "checking for dmalloc library""... $ac_c" 1>&6 -echo "configure:1054: checking for dmalloc library" >&5 + { echo "$as_me:$LINENO: checking for dmalloc library" >&5 +echo $ECHO_N "checking for dmalloc library... $ECHO_C" >&6; } dmalloc="" x=no if test -f /sw/include/dmalloc.h; then if test -f /sw/shlib/libdmalloc.a; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_DMALLOC 1 -EOF +_ACEOF CFLAGS="$CFLAGS -I/sw/include" LDFLAGS="$LDFLAGS -L/sw/shlib" @@ -1065,281 +3074,614 @@ x=yes fi fi - - echo "$ac_t""$x" 1>&6 + + { echo "$as_me:$LINENO: result: $x" >&5 +echo "${ECHO_T}$x" >&6; } fi -echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 -echo "configure:1074: checking whether ${MAKE-make} sets \${MAKE}" >&5 -set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +{ echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 +echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; } +set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` +if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftestmake <<\EOF + cat >conftest.make <<\_ACEOF +SHELL = /bin/sh all: - @echo 'ac_maketemp="${MAKE}"' -EOF + @echo '@@@%%%=$(MAKE)=@@@%%%' +_ACEOF # GNU make sometimes prints "make[1]: Entering...", which would confuse us. -eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=` -if test -n "$ac_maketemp"; then - eval ac_cv_prog_make_${ac_make}_set=yes -else - eval ac_cv_prog_make_${ac_make}_set=no -fi -rm -f conftestmake +case `${MAKE-make} -f conftest.make 2>/dev/null` in + *@@@%%%=?*=@@@%%%*) + eval ac_cv_prog_make_${ac_make}_set=yes;; + *) + eval ac_cv_prog_make_${ac_make}_set=no;; +esac +rm -f conftest.make fi -if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then - echo "$ac_t""yes" 1>&6 +if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } SET_MAKE= else - echo "$ac_t""no" 1>&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi -# Find a good install program. We prefer a C program (faster), -# so one script is as good as another. But avoid the broken or -# incompatible versions: -# SysV /etc/install, /usr/sbin/install -# SunOS /usr/etc/install -# IRIX /sbin/install -# AIX /bin/install -# AFS /usr/afsws/bin/install, which mishandles nonexistent args -# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" -# ./install, which can be erroneously created by make from ./install.sh. -echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:1111: checking for a BSD compatible install" >&5 -if test -z "$INSTALL"; then -if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do - # Account for people who put trailing slashes in PATH elements. - case "$ac_dir/" in - /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; - *) - # OSF1 and SCO ODT 3.0 have their own names for install. - for ac_prog in ginstall installbsd scoinst install; do - if test -f $ac_dir/$ac_prog; then - if test $ac_prog = install && - grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then - # AIX install. It has an incompatible calling convention. - # OSF/1 installbsd also uses dspmsg, but is usable. - : - else - ac_cv_path_install="$ac_dir/$ac_prog -c" - break 2 - fi - fi - done - ;; - esac - done - IFS="$ac_save_IFS" -fi - if test "${ac_cv_path_install+set}" = set; then - INSTALL="$ac_cv_path_install" - else - # As a last resort, use the slow shell script. We don't cache a - # path for INSTALL within a source directory, because that will - # break other packages using the cache if that directory is - # removed, or if the path is relative. - INSTALL="$ac_install_sh" - fi -fi -echo "$ac_t""$INSTALL" 1>&6 - -# Use test -z because SunOS4 sh mishandles braces in ${var-val}. -# It thinks the first close brace ends the variable substitution. -test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' - -test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' - -INSTALL_DATA='${INSTALL} -m 644' -INSTALL_PROGRAM="${INSTALL_PROGRAM} -m 755" - - - -echo "$ac_t""" 1>&6 -echo "$ac_t""__ CHECK: Characteristic of System Headers and Libraries __" 1>&6 - -echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:1169: checking for working const" >&5 -if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext <j = 5; -} -{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ - const int foo = 10; -} - -; return 0; } -EOF -if { (eval echo configure:1223: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* + +{ echo "$as_me:$LINENO: result: " >&5 +echo "${ECHO_T}" >&6; } +{ echo "$as_me:$LINENO: result: ${TERM_BOLD}CHECK: Characteristic of System Headers and Libraries${TERM_NORM}" >&5 +echo "${ECHO_T}${TERM_BOLD}CHECK: Characteristic of System Headers and Libraries${TERM_NORM}" >&6; } + + +{ echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5 +echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; } +if test "${ac_cv_c_const+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ +/* FIXME: Include the comments suggested by Paul. */ +#ifndef __cplusplus + /* Ultrix mips cc rejects this. */ + typedef int charset[2]; + const charset cs; + /* SunOS 4.1.1 cc rejects this. */ + char const *const *pcpcc; + char **ppc; + /* NEC SVR4.0.2 mips cc rejects this. */ + struct point {int x, y;}; + static struct point const zero = {0,0}; + /* AIX XL C 1.02.0.0 rejects this. + It does not let you subtract one const X* pointer from another in + an arm of an if-expression whose if-part is not a constant + expression */ + const char *g = "string"; + pcpcc = &g + (g ? g-g : 0); + /* HPUX 7.0 cc rejects these. */ + ++pcpcc; + ppc = (char**) pcpcc; + pcpcc = (char const *const *) ppc; + { /* SCO 3.2v4 cc rejects this. */ + char *t; + char const *s = 0 ? (char *) 0 : (char const *) 0; + + *t++ = 0; + if (s) return 0; + } + { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ + int x[] = {25, 17}; + const int *foo = &x[0]; + ++foo; + } + { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ + typedef const int *iptr; + iptr p = 0; + ++p; + } + { /* AIX XL C 1.02.0.0 rejects this saying + "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ + struct s { int j; const int *ap[3]; }; + struct s *b; b->j = 5; + } + { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ + const int foo = 10; + if (!foo) return 0; + } + return !cs[0] && !zero.x; +#endif + + ; + return 0; +} +_ACEOF +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_c_const=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_c_const=no -fi -rm -f conftest* + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_c_const=no fi -echo "$ac_t""$ac_cv_c_const" 1>&6 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5 +echo "${ECHO_T}$ac_cv_c_const" >&6; } if test $ac_cv_c_const = no; then - cat >> confdefs.h <<\EOF -#define const -EOF + +cat >>confdefs.h <<\_ACEOF +#define const +_ACEOF fi -echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:1244: checking how to run the C preprocessor" >&5 +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +{ 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 eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + if test "${ac_cv_prog_CPP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - # This must be in double quotes, not single quotes, because CPP may get - # substituted into the Makefile and "${CC-cc}" will confuse make. - CPP="${CC-cc} -E" + # Double quotes because CPP needs to be expanded + for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" + do + ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. - cat > conftest.$ac_ext < -Syntax Error -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1265: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` -if test -z "$ac_err"; then + # 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 "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - CPP="${CC-cc} -E -traditional-cpp" - cat > conftest.$ac_ext < -Syntax Error -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1282: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` -if test -z "$ac_err"; then + 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 "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - CPP=/lib/cpp + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Broken: fails on valid input. +continue fi -rm -f conftest* + +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* - ac_cv_prog_CPP="$CPP" + +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 - CPP="$ac_cv_prog_CPP" + else - ac_cv_prog_CPP="$CPP" + ac_cv_path_GREP=$GREP +fi + + fi -echo "$ac_t""$CPP" 1>&6 +{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 +echo "${ECHO_T}$ac_cv_path_GREP" >&6; } + GREP="$ac_cv_path_GREP" -echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:1305: checking for ANSI C header files" >&5 -if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + +{ 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 - cat > conftest.$ac_ext <&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 -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1318: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` -if test -z "$ac_err"; then - rm -rf conftest* + +int +main () +{ + + ; + return 0; +} +_ACEOF +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 "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_header_stdc=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_header_stdc=no fi -rm -f conftest* + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include -EOF + +_ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "memchr" >/dev/null 2>&1; then + $EGREP "memchr" >/dev/null 2>&1; then : else - rm -rf conftest* ac_cv_header_stdc=no fi rm -f conftest* @@ -1348,16 +3690,19 @@ if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include -EOF + +_ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "free" >/dev/null 2>&1; then + $EGREP "free" >/dev/null 2>&1; then : else - rm -rf conftest* ac_cv_header_stdc=no fi rm -f conftest* @@ -1366,727 +3711,1875 @@ if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. -if test "$cross_compiling" = yes; then + if test "$cross_compiling" = yes; then : else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include -#define ISLOWER(c) ('a' <= (c) && (c) <= 'z') -#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#include +#if ((' ' & 0x0FF) == 0x020) +# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#else +# define ISLOWER(c) \ + (('a' <= (c) && (c) <= 'i') \ + || ('j' <= (c) && (c) <= 'r') \ + || ('s' <= (c) && (c) <= 'z')) +# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) +#endif + #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) -int main () { int i; for (i = 0; i < 256; i++) -if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); -exit (0); } - -EOF -if { (eval echo configure:1385: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null -then +int +main () +{ + int i; + for (i = 0; i < 256; i++) + if (XOR (islower (i), ISLOWER (i)) + || toupper (i) != TOUPPER (i)) + return 2; + return 0; +} +_ACEOF +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 "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_header_stdc=no + 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 -fr conftest* +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + fi fi - -echo "$ac_t""$ac_cv_header_stdc" 1>&6 +{ 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 <<\EOF + +cat >>confdefs.h <<\_ACEOF #define STDC_HEADERS 1 -EOF +_ACEOF fi -for ac_hdr in stdio.h stdarg.h stdlib.h string.h ctype.h unistd.h time.h signal.h pwd.h grp.h sys/types.h sys/stat.h sys/param.h sys/socket.h netinet/in.h netdb.h +# 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 -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:1412: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1422: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* +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 -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` - cat >> confdefs.h <&6 + +done + + + + + + + + + + + + + + + + + + +for ac_header in stdio.h stdarg.h stdlib.h string.h ctype.h unistd.h time.h signal.h pwd.h grp.h sys/types.h sys/stat.h sys/param.h sys/socket.h netinet/in.h netdb.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 -echo $ac_n "checking for bool""... $ac_c" 1>&6 -echo "configure:1449: checking for bool" >&5 -if eval "test \"`echo '$''{'ac_cv_type_bool'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -#if STDC_HEADERS -#include -#include -#endif -EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "bool[^a-zA-Z_0-9]" >/dev/null 2>&1; then - rm -rf conftest* +{ echo "$as_me:$LINENO: checking for bool" >&5 +echo $ECHO_N "checking for bool... $ECHO_C" >&6; } +if test "${ac_cv_type_bool+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 +typedef bool ac__type_new_; +int +main () +{ +if ((ac__type_new_ *) 0) + return 0; +if (sizeof (ac__type_new_)) + return 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_type_bool=yes else - rm -rf conftest* - ac_cv_type_bool=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_type_bool=no fi -rm -f conftest* +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$ac_t""$ac_cv_type_bool" 1>&6 -if test $ac_cv_type_bool = no; then - cat >> confdefs.h <<\EOF +{ echo "$as_me:$LINENO: result: $ac_cv_type_bool" >&5 +echo "${ECHO_T}$ac_cv_type_bool" >&6; } +if test $ac_cv_type_bool = yes; then + : +else + +cat >>confdefs.h <<_ACEOF #define bool char -EOF +_ACEOF fi + for ac_func in memmove do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:1484: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext <&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. */ -#include -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); + 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 -int main() { +#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) +#if defined __stub_$ac_func || defined __stub___$ac_func choke me -#else -$ac_func(); #endif -; return 0; } -EOF -if { (eval echo configure:1512: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi +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 -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 fi done + for ac_func in seteuid do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:1539: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext <&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. */ -#include -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ -int main() { +#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) +#if defined __stub_$ac_func || defined __stub___$ac_func choke me -#else -$ac_func(); #endif -; return 0; } -EOF -if { (eval echo configure:1567: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi +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 -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 fi done + for ac_func in setegid do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:1594: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext <&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. */ -#include -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); + 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 -int main() { +#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) +#if defined __stub_$ac_func || defined __stub___$ac_func choke me -#else -$ac_func(); #endif -; return 0; } -EOF -if { (eval echo configure:1622: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi +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 -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 fi done + for ac_func in strdup do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:1649: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext <&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. */ -#include -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); + 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 -int main() { +#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) +#if defined __stub_$ac_func || defined __stub___$ac_func choke me -#else -$ac_func(); #endif -; return 0; } -EOF -if { (eval echo configure:1677: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi +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 -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 fi done -echo "$ac_t""" 1>&6 -echo "$ac_t""__ RESULT: Sourcefile Substitution __" 1>&6 +{ echo "$as_me:$LINENO: result: " >&5 +echo "${ECHO_T}" >&6; } +{ echo "$as_me:$LINENO: result: ${TERM_BOLD}RESULT: Sourcefile Substitution${TERM_NORM}" >&5 +echo "${ECHO_T}${TERM_BOLD}RESULT: Sourcefile Substitution${TERM_NORM}" >&6; } + +ac_config_files="$ac_config_files Makefile t/Makefile config_sc.h" -trap '' 1 2 15 -cat > confcache <<\EOF +cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure -# scripts and configure runs. It is not useful on other systems. -# If it contains results you don't want to keep, you may remove or edit it. +# scripts and configure runs, see configure's option --config-cache. +# It is not useful on other systems. If it contains results you don't +# want to keep, you may remove or edit it. # -# By default, configure uses ./config.cache as the cache file, -# creating it if it does not exist already. You can give configure -# the --cache-file=FILE option to use a different cache file; that is -# what configure does when it calls configure scripts in -# subdirectories, so they share the cache. -# Giving --cache-file=/dev/null disables caching, for debugging configure. -# config.status only pays attention to the cache file if you give it the -# --recheck option to rerun configure. +# config.status only pays attention to the cache file if you give it +# the --recheck option to rerun configure. # -EOF +# `ac_cv_env_foo' variables (set or unset) will be overridden when +# loading this file, other *unset* `ac_cv_foo' will be assigned the +# following values. + +_ACEOF + # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. -# So, don't put newlines in cache variables' values. +# So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. -(set) 2>&1 | - case `(ac_space=' '; set) 2>&1` in - *ac_space=\ *) - # `set' does not quote correctly, so add quotes (double-quote substitution - # turns \\\\ into \\, and sed turns \\ into \). - sed -n \ - -e "s/'/'\\\\''/g" \ - -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" - ;; - *) - # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' - ;; - esac >> confcache -if cmp -s $cache_file confcache; then - : -else - if test -w $cache_file; then - echo "updating cache $cache_file" - cat confcache > $cache_file +( + for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { 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 "not updating unwritable cache $cache_file" + { 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 -trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 - test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' -# Any assignment to VPATH causes Sun make to only execute -# the first set of double-colon rules, so remove it if not needed. -# If there is a colon in the path, we need to keep it. -if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' -fi +DEFS=-DHAVE_CONFIG_H -trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 +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 -DEFS=-DHAVE_CONFIG_H +LTLIBOBJS=$ac_ltlibobjs -# Without the "./", some shells look in PATH for config.status. -: ${CONFIG_STATUS=./config.status} -echo creating $CONFIG_STATUS -rm -f $CONFIG_STATUS -cat > $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. -# This directory was configured as follows, -# on host `(hostname || uname -n) 2>/dev/null | sed 1q`: -# -# $0 $ac_configure_args -# # Compiler output produced by configure, useful for debugging -# configure, is in ./config.log if it exists. +# configure, is in config.log if it exists. -ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" -for ac_option +debug=false +ac_cs_recheck=false +ac_cs_silent=false +SHELL=\${CONFIG_SHELL-$SHELL} +_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 - case "\$ac_option" in - -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) - echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" - exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; - -version | --version | --versio | --versi | --vers | --ver | --ve | --v) - echo "$CONFIG_STATUS generated by autoconf version 2.12" - exit 0 ;; - -help | --help | --hel | --he | --h) - echo "\$ac_cs_usage"; exit 0 ;; - *) echo "\$ac_cs_usage"; exit 1 ;; - esac + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + { (exit 1); exit 1; } +fi -ac_given_srcdir=$srcdir -ac_given_INSTALL="$INSTALL" +# 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='+ ' -trap 'rm -fr `echo "Makefile t/Makefile config_sc.h config_ac.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 -EOF -cat >> $CONFIG_STATUS < conftest.subs <<\\CEOF -$ac_vpsub -$extrasub -s%@CFLAGS@%$CFLAGS%g -s%@CPPFLAGS@%$CPPFLAGS%g -s%@CXXFLAGS@%$CXXFLAGS%g -s%@DEFS@%$DEFS%g -s%@LDFLAGS@%$LDFLAGS%g -s%@LIBS@%$LIBS%g -s%@exec_prefix@%$exec_prefix%g -s%@prefix@%$prefix%g -s%@program_transform_name@%$program_transform_name%g -s%@bindir@%$bindir%g -s%@sbindir@%$sbindir%g -s%@libexecdir@%$libexecdir%g -s%@datadir@%$datadir%g -s%@sysconfdir@%$sysconfdir%g -s%@sharedstatedir@%$sharedstatedir%g -s%@localstatedir@%$localstatedir%g -s%@libdir@%$libdir%g -s%@includedir@%$includedir%g -s%@oldincludedir@%$oldincludedir%g -s%@infodir@%$infodir%g -s%@mandir@%$mandir%g -s%@libsubdir@%$libsubdir%g -s%@PATH_PERL@%$PATH_PERL%g -s%@perlprog@%$perlprog%g -s%@perlvers@%$perlvers%g -s%@perlvnum@%$perlvnum%g -s%@perl_prog@%$perl_prog%g -s%@perl_vers@%$perl_vers%g -s%@perl_vnum@%$perl_vnum%g -s%@perl_osname@%$perl_osname%g -s%@perl_osvers@%$perl_osvers%g -s%@perl_os@%$perl_os%g -s%@perl_cc@%$perl_cc%g -s%@perl_optimize@%$perl_optimize%g -s%@perl_ccflags@%$perl_ccflags%g -s%@perl_ldflags@%$perl_ldflags%g -s%@perl_libs@%$perl_libs%g -s%@perl_archlib@%$perl_archlib%g -s%@perl_dla@%$perl_dla%g -s%@perl_cccdlflags@%$perl_cccdlflags%g -s%@perl_ccdlflags@%$perl_ccdlflags%g -s%@build_user@%$build_user%g -s%@build_time_ctime@%$build_time_ctime%g -s%@build_time_iso@%$build_time_iso%g -s%@CC@%$CC%g -s%@RANLIB@%$RANLIB%g -s%@AR@%$AR%g -s%@SIZE@%$SIZE%g -s%@debug@%$debug%g -s%@dmalloc@%$dmalloc%g -s%@SET_MAKE@%$SET_MAKE%g -s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g -s%@INSTALL_DATA@%$INSTALL_DATA%g -s%@CPP@%$CPP%g - -CEOF -EOF - -cat >> $CONFIG_STATUS <<\EOF - -# Split the substitutions into bite-sized pieces for seds with -# small command number limits, like on Digital OSF/1 and HP-UX. -ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. -ac_file=1 # Number of current file. -ac_beg=1 # First line for current file. -ac_end=$ac_max_sed_cmds # Line after last line for current file. -ac_more_lines=: -ac_sed_cmds="" -while $ac_more_lines; do - if test $ac_beg -gt 1; then - sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file +# NLS nuisances. +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 - sed "${ac_end}q" conftest.subs > conftest.s$ac_file + ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var fi - if test ! -s conftest.s$ac_file; then - ac_more_lines=false - rm -f conftest.s$ac_file +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 - if test -z "$ac_sed_cmds"; then - ac_sed_cmds="sed -f conftest.s$ac_file" - else - ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" - fi - ac_file=`expr $ac_file + 1` - ac_beg=$ac_end - ac_end=`expr $ac_end + $ac_max_sed_cmds` - fi -done -if test -z "$ac_sed_cmds"; then - ac_sed_cmds=cat -fi -EOF - -cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF -for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then - # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". - case "$ac_file" in - *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` - ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; - *) ac_file_in="${ac_file}.in" ;; + 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' +_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_ac.h") CONFIG_HEADERS="$CONFIG_HEADERS config_ac.h" ;; + "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; + "t/Makefile") CONFIG_FILES="$CONFIG_FILES t/Makefile" ;; + "config_sc.h") CONFIG_FILES="$CONFIG_FILES config_sc.h" ;; + + *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 +echo "$as_me: error: invalid argument: $ac_config_target" >&2;} + { (exit 1); exit 1; }; };; esac +done + + +# If the user did not use the arguments to specify the items to instantiate, +# then the envvar interface is used. Set only those that are not. +# We use the long form for the default assignment because of an extremely +# bizarre bug on SunOS 4.1.3. +if $ac_need_defaults; then + test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files + test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers +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. +# - # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. +# 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 +libsubdir!$libsubdir$ac_delim +tmpdir!$tmpdir$ac_delim +PATH_PERL!$PATH_PERL$ac_delim +perlprog!$perlprog$ac_delim +perlvers!$perlvers$ac_delim +perl_prog!$perl_prog$ac_delim +perl_vers!$perl_vers$ac_delim +perl_osname!$perl_osname$ac_delim +perl_osvers!$perl_osvers$ac_delim +perl_os!$perl_os$ac_delim +perl_cc!$perl_cc$ac_delim +perl_optimize!$perl_optimize$ac_delim +perl_ccflags!$perl_ccflags$ac_delim +perl_ldflags!$perl_ldflags$ac_delim +perl_libs!$perl_libs$ac_delim +perl_archlib!$perl_archlib$ac_delim +perl_dla!$perl_dla$ac_delim +perl_cccdlflags!$perl_cccdlflags$ac_delim +perl_ccdlflags!$perl_ccdlflags$ac_delim +build_user!$build_user$ac_delim +build_time_ctime!$build_time_ctime$ac_delim +build_time_iso!$build_time_iso$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 +RANLIB!$RANLIB$ac_delim +AR!$AR$ac_delim +SIZE!$SIZE$ac_delim +debug!$debug$ac_delim +dmalloc!$dmalloc$ac_delim +SET_MAKE!$SET_MAKE$ac_delim +CPP!$CPP$ac_delim +GREP!$GREP$ac_delim +EGREP!$EGREP$ac_delim +LIBOBJS!$LIBOBJS$ac_delim +LTLIBOBJS!$LTLIBOBJS$ac_delim +_ACEOF - # Remove last slash and all that follows it. Not all systems have dirname. - ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` - if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then - # The file is in a subdirectory. - test ! -d "$ac_dir" && mkdir "$ac_dir" - ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" - # A "../" for each directory in $ac_dir_suffix. - ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 77; 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_dir_suffix= ac_dots= + 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" + - case "$ac_given_srcdir" in - .) srcdir=. - if test -z "$ac_dots"; then top_srcdir=. - else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; - /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; - *) # Relative path. - srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" - top_srcdir="$ac_dots$ac_given_srcdir" ;; +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_given_INSTALL" in - [/$]*) INSTALL="$ac_given_INSTALL" ;; - *) INSTALL="$ac_dots$ac_given_INSTALL" ;; + case $ac_tag in + *:-:* | *:-) cat >"$tmp/stdin";; + esac + ;; esac - echo creating "$ac_file" - rm -f "$ac_file" - configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." - case "$ac_file" in - *Makefile*) ac_comsub="1i\\ -# $configure_input" ;; - *) ac_comsub= ;; + 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 - ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` - sed -e "$ac_comsub -s%@configure_input@%$configure_input%g -s%@srcdir@%$srcdir%g -s%@top_srcdir@%$top_srcdir%g -s%@INSTALL@%$INSTALL%g -" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file -fi; done -rm -f conftest.s* -# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where -# NAME is the cpp macro being defined and VALUE is the value it is being given. -# -# ac_d sets the value in "#define NAME VALUE" lines. -ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)' -ac_dB='\([ ][ ]*\)[^ ]*%\1#\2' -ac_dC='\3' -ac_dD='%g' -# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE". -ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' -ac_uB='\([ ]\)%\1#\2define\3' -ac_uC=' ' -ac_uD='\4%g' -# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE". -ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' -ac_eB='$%\1#\2define\3' -ac_eC=' ' -ac_eD='%g' - -if test "${CONFIG_HEADERS+set}" != set; then -EOF -cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF -fi -for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then - # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". - case "$ac_file" in - *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` - ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; - *) ac_file_in="${ac_file}.in" ;; - esac + case $ac_mode in + :F) + # + # CONFIG_FILE + # + +_ACEOF - echo creating $ac_file +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= - rm -f conftest.frag conftest.in conftest.out - ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` - cat $ac_file_inputs > conftest.in - -EOF - -# Transform confdefs.h into a sed script conftest.vals that substitutes -# the proper values into config.h.in to produce config.h. And first: -# Protect against being on the right side of a sed subst in config.status. -# Protect against being in an unquoted here document in config.status. -rm -f conftest.vals -cat > conftest.hdr <<\EOF -s/[\\&%]/\\&/g -s%[\\$`]%\\&%g -s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp -s%ac_d%ac_u%gp -s%ac_u%ac_e%gp -EOF -sed -n -f conftest.hdr confdefs.h > conftest.vals -rm -f conftest.hdr +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 +$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 -# This sed command replaces #undef with comments. This is necessary, for +# 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. -cat >> conftest.vals <<\EOF -s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */% -EOF - -# Break up conftest.vals because some shells have a limit on -# the size of here documents, and old seds have small limits too. +# (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"' -rm -f conftest.tail while : do - ac_lines=`grep -c . conftest.vals` - # grep -c gives empty output for an empty file on some AIX systems. - if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi - # Write a limited-size here document to conftest.frag. - echo ' cat > conftest.frag <> $CONFIG_STATUS - sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS + # 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 conftest.frag conftest.in > conftest.out - rm -f conftest.in - mv conftest.out conftest.in -' >> $CONFIG_STATUS - sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail - rm -f conftest.vals - mv conftest.tail conftest.vals -done -rm -f conftest.vals - -cat >> $CONFIG_STATUS <<\EOF - rm -f conftest.frag conftest.h - echo "/* $ac_file. Generated automatically by configure. */" > conftest.h - cat conftest.in >> conftest.h - rm -f conftest.in - if cmp -s $ac_file conftest.h 2>/dev/null; then - echo "$ac_file is unchanged" - rm -f conftest.h - else - # Remove last slash and all that follows it. Not all systems have dirname. - ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` - if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then - # The file is in a subdirectory. - test ! -d "$ac_dir" && mkdir "$ac_dir" + 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 - rm -f $ac_file - mv conftest.h $ac_file + else + echo "/* $configure_input */" + cat "$ac_result" fi -fi; done + rm -f "$tmp/out12" + ;; + -EOF -cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF -exit 0 -EOF +{ (exit 0); exit 0; } +_ACEOF chmod +x $CONFIG_STATUS -rm -fr confdefs* $ac_clean_files -test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 +ac_clean_files=$ac_clean_files_save -echo "" -echo "Now please type 'make' to compile. Good luck." -echo "" + +# 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 --- eperl-2.2.14.orig/eperl_security.h +++ eperl-2.2.14/eperl_security.h @@ -15,7 +15,7 @@ ** ** ====================================================================== ** -** Copyright (c) 1996,1997,1998 Ralf S. Engelschall +** Copyright (c) 1996,1997,1998,1999 Ralf S. Engelschall ** ** This program is free software; it may be redistributed and/or modified ** only under the terms of either the Artistic License or the GNU General @@ -58,7 +58,7 @@ #define SETUID_NEEDS_VALID_OWNER_UID TRUE #define SETUID_NEEDS_VALID_OWNER_GID TRUE #define SETUID_NEEDS_BELOW_OWNER_HOME TRUE -#define LIST_OF_ALLOWED_CALLER_UID { "nobody", "root", NULL } +#define LIST_OF_ALLOWED_CALLER_UID { "nobody", "root", "www-data", NULL } /* * Action when a SetUID security check failed. --- eperl-2.2.14.orig/eperl_logo.c +++ eperl-2.2.14/eperl_logo.c @@ -1,7 +1,7 @@ /* eperl_logo.gif.c -- automatically generated by bin2c */ int ePerl_LOGO_size = 6805; -char ePerl_LOGO_data[] = { +unsigned char ePerl_LOGO_data[] = { 0x47,0x49,0x46,0x38,0x39,0x61,0xf1,0x00,0x6c,0x00,0xf7,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x33,0x00,0x00,0x66,0x00,0x00,0x99,0x00,0x00,0xcc,0x00,0x00, 0xff,0x00,0x33,0x00,0x00,0x33,0x33,0x00,0x33,0x66,0x00,0x33,0x99,0x00,0x33, --- eperl-2.2.14.orig/eperl_debug.c +++ eperl-2.2.14/eperl_debug.c @@ -15,7 +15,7 @@ ** ** ====================================================================== ** -** Copyright (c) 1996,1997,1998 Ralf S. Engelschall +** Copyright (c) 1996,1997,1998,1999 Ralf S. Engelschall ** ** This program is free software; it may be redistributed and/or modified ** only under the terms of either the Artistic License or the GNU General @@ -51,7 +51,8 @@ va_start(ap, str); if (fDebug) { if ((fp = fopen(cpDebugFile, "a")) != NULL) { - vsprintf(buf, str, ap); + vsnprintf(buf, sizeof(buf), str, ap); + buf[sizeof(buf)-1] = '\0'; fprintf(fp, "%s", buf); fclose(fp); } --- eperl-2.2.14.orig/configure.in +++ eperl-2.2.14/configure.in @@ -5,20 +5,23 @@ dnl ## Process this file with ``autoconf'' to produce a configure script. dnl ## - dnl # dnl # standard autoconf prolog dnl # AC_PREREQ(2.10)dnl -AC_REVISION($Revision: 2.0$) -echo "Configuring for ePerl `./etc/newvers -l c -D eperl_version.c`" - -AC_CONFIG_AUX_DIR(etc) +AC_REVISION($Revision: 1.9 $) AC_INIT(README) AC_CONFIG_HEADER(config_ac.h)dnl AC_PREFIX_DEFAULT(/usr/local) +shtool=./etc/shtool +TERM_BOLD=`$shtool echo -e %B 2>/dev/null` +TERM_NORM=`$shtool echo -e %b 2>/dev/null` + +dnl ## version id +EPERL_VERSION="`$shtool version -lc -d long eperl_version.c`" +echo "${TERM_BOLD}Configuring for ePerl ${EPERL_VERSION}${TERM_NORM}" dnl # dnl # libdir adjustment @@ -32,6 +35,8 @@ esac AC_SUBST(libsubdir) +tmpdir=${TMPDIR-/tmp} +AC_SUBST(tmpdir) dnl # dnl # latest find Perl interpreter @@ -40,65 +45,50 @@ AC_CONFIGURE_PART(CHECK: Configuration of Perl Language) AC_MSG_CHECKING([for Perl language]) AC_ARG_WITH(perl,dnl -[ --with-perl=PATH force the usage of a specific installed Perl], +[ --with-perl=PATH force the usage of a specific Perl 5 interpreter],[ +dnl [[ perlprog=$with_perl -perlvers=`$perlprog -v | grep version | sed -e 's/.* version //' -e 's/ built.*//' -e 's/ with.*//'` -, -TMPFILE=/tmp/x.$$ -rm -f $TMPFILE -touch $TMPFILE -c=0 -for dir in `echo $PATH | sed -e 's/:/ /g'` /tmp; do +perlvers=`$perlprog -e 'printf "%.3f",$]'` +dnl ] +],[ +perlvers= +for dir in `echo $PATH | sed -e 's/:/ /g'` $tmpdir; do for perl in perl5 perl miniperl; do if test -f "$dir/$perl"; then if test -x "$dir/$perl"; then - perl="$dir/$perl" - version=`$perl -v | grep version | sed -e 's/.* version //' -e 's/ built.*//' -e 's/ with.*//'` - versionnum="`echo $version | sed -e 's/\.//g' -e 's/_//g'`" - versionnum=`expr $versionnum - $c` - echo "$versionnum $version $perl" >>$TMPFILE + perlprog="$dir/$perl" + if $perlprog -e 'require 5.003'; then +dnl [[ + perlvers=`$perlprog -e 'printf "%.3f",$]'` +dnl ] + break 2 + fi fi fi done - c=`expr $c + 1` done -perlvers="`cat $TMPFILE | sort -u | tail -1 | cut '-d ' -f2`" -perlprog="`cat $TMPFILE | sort -u | tail -1 | cut '-d ' -f3`" -rm -f $TMPFILE -)dnl +])dnl PATH_PERL=$perlprog AC_MSG_RESULT([$perlprog v$perlvers]) -case $perlvers in - 5.003* | 5.004* | 5.005* | 5.006* ) - ;; - * ) echo "" - echo "Latest Perl found on your system is $perlvers," - echo "but at least Perl version 5.003 is required." - echo "In case the newer one is not in PATH, just use" - echo "the option --with-perl=/path/to/bin/perl to" - echo "provide the correct executable." - echo "" - AC_ERROR([Perl version too old]) - ;; -esac -case $perlvers in - 5.00[[3-6]_[0-9][0-9]] ) - perlvnum=`echo $perlvers | sed -e 's/\.//' -e 's/_//'` ;; - 5.00[[3-6]] ) - perlvnum=`echo $perlvers | sed -e 's/\.//' -e 's/$/00/'` ;; - * ) - perlvnum=`echo $perlvers | sed -e 's/\.//' -e 's/_//'` ;; -esac +if $perlprog -e 'require 5.003'; then + : +else + echo "" + echo "Latest Perl found on your system is $perlvers," + echo "but at least Perl version 5.003 is required." + echo "In case the newer one is not in PATH, just use" + echo "the option --with-perl=/path/to/bin/perl to" + echo "provide the correct executable." + echo "" + AC_ERROR([Perl version too old]) +fi AC_SUBST(PATH_PERL) AC_SUBST(perlprog) AC_SUBST(perlvers) -AC_SUBST(perlvnum) perl_prog=$perlprog perl_vers=$perlvers -perl_vnum=$perlvnum AC_SUBST(perl_prog) AC_SUBST(perl_vers) -AC_SUBST(perl_vnum) if test -f $PATH_PERL; then : else @@ -169,7 +159,7 @@ define ) rc=yes AC_DEFINE(HAVE_PERL_DYNALOADER) - perl_dla=$perl_archlib/auto/DynaLoader/DynaLoader.a + perl_dla=`perl -MExtUtils::Embed -e ldopts` ;; * ) rc=no @@ -256,10 +246,6 @@ fi AC_SET_MAKE -AC_PROG_INSTALL -INSTALL_DATA='${INSTALL} -m 644' -INSTALL_PROGRAM="${INSTALL_PROGRAM} -m 755" - dnl # dnl # determine system parameters @@ -291,8 +277,4 @@ ,dnl )dnl -echo "" -echo "Now please type 'make' to compile. Good luck." -echo "" - dnl ##EOF## --- eperl-2.2.14.orig/eperl_perl5.h +++ eperl-2.2.14/eperl_perl5.h @@ -15,7 +15,7 @@ ** ** ====================================================================== ** -** Copyright (c) 1996,1997,1998 Ralf S. Engelschall +** Copyright (c) 1996,1997,1998,1999 Ralf S. Engelschall ** ** This program is free software; it may be redistributed and/or modified ** only under the terms of either the Artistic License or the GNU General @@ -38,28 +38,69 @@ /* first include the standard Perl includes designed for embedding */ +#define PERL_NO_GET_CONTEXT /* for efficiency reasons, see perlguts(3) */ #include #include - -/* try to adjust for PerlIO handling */ -#ifdef USE_PERLIO -#undef fwrite -#define fwrite(buf,size,count,f) PerlIO_write(f,buf,size*count) +#ifndef dTHR +# ifdef WIN32 +# define dTHR extern int Perl___notused +# else +# define dTHR extern int errno +# endif #endif +#ifndef aTHX +# define aTHX +# define aTHX_ +# define pTHX void +# define pTHX_ +#endif /* define the I/O type string for verbosity */ #ifdef USE_PERLIO -#ifdef USE_SFIO -#define PERL_IO_LAYER_ID "PerlIO/SfIO" +# ifdef USE_SFIO +# define PERL_IO_LAYER_ID "PerlIO/SfIO" +# else +# define PERL_IO_LAYER_ID "PerlIO/StdIO" +# endif #else -#define PERL_IO_LAYER_ID "PerlIO/StdIO" +# define PERL_IO_LAYER_ID "Raw/StdIO" +#endif + +#if (PERL_VERSION < 4) || ((PERL_VERSION == 4) && (PERL_SUBVERSION <= 5)) +# define PL_curstash curstash #endif + +#ifndef WITH_THR +# define PL_defoutgv defoutgv +#endif + +/* + Initialization of locales when building a new Perl interpreter. + Perl 5.003 calls perl_init_i18nl14n + Perl 5.004 and 5.005 call perl_init_i18nl10n + In Perl 5.6.0 this routine is already called by perl_construct +*/ +#ifndef perl_init_i18nl10n +# define perl_init_i18nl10n perl_init_i18nl14n #else -#define PERL_IO_LAYER_ID "Raw/StdIO" +# if (PERL_REVISION > 5) || ((PERL_REVISION == 5) && (PERL_VERSION >= 6)) +# undef perl_init_i18nl10n +# define perl_init_i18nl10n(a) +# endif #endif +/* eperl_perl5.c */ +/* These prototypes can no longer be included in eperl_proto.h because + pTHX argument has been introduced in Perl 5.6.0 */ +extern void Perl5_XSInit(pTHX); +extern void Perl5_ForceUnbufferedStdout(pTHX); +extern char **Perl5_SetEnvVar(char **env, char *str); +extern void Perl5_SetScalar(pTHX_ char *pname, char *vname, char *vvalue); +extern char *Perl5_RememberedScalars[1024]; +extern void Perl5_RememberScalar(char *str); +extern void Perl5_SetRememberedScalars(pTHX); #endif /* EPERL_PERL5_H */ /*EOF*/ --- eperl-2.2.14.orig/README +++ eperl-2.2.14/README @@ -15,9 +15,9 @@ scripting language for dynamic HTML page programming. The documentation and latest release can be found on - http://www.engelschall.com/sw/eperl/ + http://www.ossp.org/pkg/tool/eperl/ - Copyright (c) 1996,1997,1998 Ralf S. Engelschall + Copyright (c) 1996,1997,1998,1999 Ralf S. Engelschall This program is free software; it may be redistributed and/or modified only under the terms of either the Artistic License or the GNU General Public --- eperl-2.2.14.orig/eperl_getopt.c +++ eperl-2.2.14/eperl_getopt.c @@ -15,7 +15,7 @@ ** ** ====================================================================== ** -** Copyright (c) 1996,1997,1998 Ralf S. Engelschall +** Copyright (c) 1996,1997,1998,1999 Ralf S. Engelschall ** ** This program is free software; it may be redistributed and/or modified ** only under the terms of either the Artistic License or the GNU General --- eperl-2.2.14.orig/eperl_proto.h +++ eperl-2.2.14/eperl_proto.h @@ -15,7 +15,7 @@ ** ** ====================================================================== ** -** Copyright (c) 1996,1997,1998 Ralf S. Engelschall +** Copyright (c) 1996,1997,1998,1999 Ralf S. Engelschall ** ** This program is free software; it may be redistributed and/or modified ** only under the terms of either the Artistic License or the GNU General @@ -43,7 +43,6 @@ extern char *allowed_caller_uid[]; extern void PrintError(int mode, char *scripturl, char *scriptfile, char *logfile, char *str, ...); extern void give_version(void); -extern void give_version_extended(void); extern void give_readme(void); extern void give_license(void); extern void give_img_logo(void); @@ -54,18 +53,8 @@ extern void mysighandler(int rc); extern void myinit(void); extern void myexit(int rc); -extern struct option options[]; extern int main(int argc, char **argv, char **env); -/* eperl_perl5.c */ -extern void Perl5_XSInit(void); -extern void Perl5_ForceUnbufferedStdout(void); -extern char **Perl5_SetEnvVar(char **env, char *str); -extern void Perl5_SetScalar(char *pname, char *vname, char *vvalue); -extern char *Perl5_RememberedScalars[1024]; -extern void Perl5_RememberScalar(char *str); -extern void Perl5_SetRememberedScalars(void); - /* eperl_parse.c */ extern char *ePerl_begin_delimiter; extern char *ePerl_end_delimiter; @@ -75,15 +64,24 @@ extern void ePerl_SetError(char *str, ...); extern char *ePerl_GetError(void); extern char *ePerl_fprintf(char *cpOut, char *str, ...); +extern char *ePerl_fnprintf(char *cpOut, int *n, char *str, ...); extern char *ePerl_fwrite(char *cpBuf, int nBuf, int cNum, char *cpOut); +extern char *ePerl_fnwrite(char *cpBuf, int nBuf, int cNum, char *cpOut, int *cpOutLen); extern char *ePerl_Efwrite(char *cpBuf, int nBuf, int cNum, char *cpOut); +extern char *ePerl_Efnwrite(char *cpBuf, int nBuf, int cNum, char *cpOut, int *n); extern char *ePerl_Cfwrite(char *cpBuf, int nBuf, int cNum, char *cpOut); +extern char *ePerl_Cfnwrite(char *cpBuf, int nBuf, int cNum, char *cpOut, int *cpOutLen); extern char *strnchr(char *buf, char chr, int n); extern char *strnstr(char *buf, char *str, int n); extern char *strncasestr(char *buf, char *str, int n); -extern char *strndup(char *buf, int n); extern char *ePerl_Bristled2Plain(char *cpBuf); +/* eperl_perl5.c */ +extern void give_version_extended_perl(void); +extern int Perl5_Run(int myargc, char **myargv, int mode, int fCheck, int keepcwd, char *source, char **env, char *perlscript, char *perlstderr, char *perlstdout); +extern void Perl5_RememberScalar(char *str); +extern char **Perl5_SetEnvVar(char **env, char *str); + /* eperl_pp.c */ extern void ePerl_PP_SetError(char *str, ...); extern char *ePerl_PP_GetError(void); @@ -111,7 +109,7 @@ extern char *abspath(char *path); /* eperl_http.c */ -extern void HTTP_PrintResponseHeaders(char *cpBuf); +extern char *HTTP_PrintResponseHeaders(char *cpBuf); extern void HTTP_StripResponseHeaders(char **cpBuf, int *nBuf); extern int HTTP_IsHeaderLine(char *cp1, char *cp2); extern int HTTP_HeadersExists(char *cpBuf); @@ -127,13 +125,6 @@ /* eperl_config.c */ /* eperl_version.c */ -extern char ePerl_Version[]; -extern char ePerl_Hello[]; -extern char ePerl_GNUVersion[]; -extern char ePerl_WhatID[]; -extern char ePerl_RCSIdentID[]; -extern char ePerl_WebID[]; -extern char ePerl_PlainID[]; /* eperl_readme.c */ extern char *ePerl_README; @@ -143,11 +134,11 @@ /* eperl_logo.c */ extern int ePerl_LOGO_size; -extern char ePerl_LOGO_data[]; +extern unsigned char ePerl_LOGO_data[]; /* eperl_powered.c */ extern int ePerl_POWERED_size; -extern char ePerl_POWERED_data[]; +extern unsigned char ePerl_POWERED_data[]; /*_END_PROTO_*/ #endif /* EPERL_PROTO_H */ --- eperl-2.2.14.orig/aclocal.m4 +++ eperl-2.2.14/aclocal.m4 @@ -7,426 +7,27 @@ dnl # all defined and used variables are named acl-* dnl # dnl -dnl -dnl ########################################################## -dnl ## -dnl ## support for User Variables -dnl ## -dnl ########################################################## -dnl -define(AC_UVAR_CODE,[dnl -if test .[$]ac_with_uvar = .yes; then -$1 -fi -]) -dnl -define(AC_UVAR_ANTICODE,[dnl -if test .[$]ac_with_uvar = .no; then -$1 -fi -]) -dnl -dnl -dnl ----------- -dnl -dnl -define(AC_UVAR_INIT,[dnl -AC_ARG_WITH(uvar,dnl -[ --with-uvar support for Runtime User Variable Setup], -ac_with_uvar=yes, -ac_with_uvar=no -)dnl -dnl -dnl # because since autoconf 2.3 the following two lines -dnl # are at AC_OUTPUT which is to late for us :-( -test "x$prefix" = xNONE && prefix=$ac_default_prefix -test "x$exec_prefix" = xNONE && exec_prefix="${prefix}" -dnl -AC_UVAR_CODE(dnl -ac_uvar_editfile=/tmp/usrvar.tmp -rm -f $ac_uvar_editfile -echo "##" >>$ac_uvar_editfile -echo "## RunTime User Variable Setup" >>$ac_uvar_editfile -echo -n "## GNU autoconf Version " >>$ac_uvar_editfile -echo "AC_ACVERSION" >>$ac_uvar_editfile -echo "## created: `date`" >>$ac_uvar_editfile -echo "##" >>$ac_uvar_editfile -echo "" >>$ac_uvar_editfile -)dnl -])dnl -dnl -dnl -dnl ----------- -dnl -define(AC_UVAR_VERB,[dnl -AC_UVAR_CODE(dnl -cat >>$ac_uvar_editfile <<'EOF' -$1dnl -EOF -)dnl -])dnl -dnl -dnl ----------- -dnl -define(AC_SET,[dnl -$1="$2" -AC_SUBST($1) dnl -])dnl -dnl -dnl ----------- -dnl -define(AC_UVAR_SET,[dnl -AC_SET($1, $2) dnl -AC_UVAR_CODE(dnl - echo '$1="$2"' >>$ac_uvar_editfile -)dnl -])dnl -dnl -dnl ----------- -dnl -define(AC_UVAR_SETQUOTE,[dnl -AC_SET($1, $2) dnl -AC_UVAR_CODE(dnl - echo -n '$1="' >>$ac_uvar_editfile - echo -n "$2" >>$ac_uvar_editfile - echo '"' >>$ac_uvar_editfile -)dnl -])dnl -dnl -dnl ----------- -dnl -define(AC_UVAR_SETCHK,[dnl -if test -z "[$]$1"; then -AC_UVAR_SET($1, $2) dnl -else -if test .[$]$1 = .NONE; then -AC_UVAR_SET($1, $2) dnl -else -AC_SUBST($1)dnl -AC_UVAR_CODE(dnl - echo -n '$1="' >>$ac_uvar_editfile - echo -n "[$]$1" >>$ac_uvar_editfile - echo '"' >>$ac_uvar_editfile -)dnl -fi -fi -])dnl -dnl -dnl ----------- -dnl -define(AC_UVAR_SETCHKQUOTE,[dnl -if test -z "[$]$1"; then -AC_UVAR_SET($1, $2) dnl -else -if test .[$]$1 = .NONE; then -AC_UVAR_SET($1, $2) dnl -else -AC_SUBST($1)dnl -AC_UVAR_CODE(dnl - echo -n '$1="' >>$ac_uvar_editfile - echo -n "$2" >>$ac_uvar_editfile - echo '"' >>$ac_uvar_editfile -)dnl -fi -fi -])dnl -dnl -dnl ----------- -dnl -define(AC_UVAR_OUTPUT,[dnl -AC_UVAR_CODE(dnl -cat >>$ac_uvar_editfile <<'EOF' - -##EOF## -EOF -if test x$withval = xyes ; then - ${EDITOR-vi} $ac_uvar_editfile - . $ac_uvar_editfile -else - if test -r $withval ; then - cp $withval $ac_uvar_editfile - ${EDITOR-vi} $ac_uvar_editfile - . $ac_uvar_editfile - cp $ac_uvar_editfile $withval - else - ${EDITOR-vi} $ac_uvar_editfile - . $ac_uvar_editfile - cp $ac_uvar_editfile $withval - fi -fi -rm -f $ac_uvar_editfile -)dnl -])dnl -dnl -dnl -dnl -dnl ########################################################## -dnl ## -dnl ## check for existence of HAVE_SYSEXISTS definitions -dnl ## -dnl ########################################################## -dnl -dnl -define(AC_EXRC,[dnl -dnl -> HAVE_EXRC -])dnl -dnl -dnl -dnl -dnl ########################################################## -dnl ## -dnl ## check for ANSI compiler -dnl ## -dnl ## Copyright (C) 1992, 1994 Free Software Foundation, Inc. -dnl ## Francois Pinard , 1992. -dnl ## Check for function prototypes. Including a few ideas from -dnl ## Brook G. Milligan . -dnl ## -dnl ## taken from shar-4.0's aclocal.m4 -dnl ## -dnl ########################################################## -dnl -AC_DEFUN(AC_C_PROTOTYPES, -[AC_MSG_CHECKING([for function prototypes]) -AC_CACHE_VAL(ac_cv_c_prototypes, -[AC_TRY_LINK([#ifndef __STDC__ -Syntax Error -#endif], [extern int test (int i, double x); -struct s1 {int (*f) (int a);}; -struct s2 {int (*f) (double a);};], - ac_cv_c_prototypes=yes, ac_cv_c_prototypes=no)])dnl -AC_MSG_RESULT([$ac_cv_c_prototypes]) -if test $ac_cv_c_prototypes = yes; then - AC_DEFINE(HAVE_PROTOTYPES) - ANSI_CC=yes -else - ANSI_CC=no -fi -AC_SUBST(ANSI_CC) -])dnl -dnl -dnl -dnl ########################################################## -dnl ## -dnl ## check for supported system type -dnl ## -dnl ########################################################## -dnl -dnl -AC_DEFUN(AC_SUPPORTED_CANONICAL_SYSTEM,[dnl -AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl - -ac_config_sup=$ac_aux_dir/config.sup - -AC_MSG_CHECKING(for supported host system type) -host=`$ac_config_sup $host_alias` -host_cpu=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'` -host_vendor=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'` -host_os=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'` -AC_MSG_RESULT($host) - -AC_MSG_CHECKING(for supported target system type) -target=`$ac_config_sup $target_alias` -target_cpu=`echo $target | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'` -target_vendor=`echo $target | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'` -target_os=`echo $target | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'` -AC_MSG_RESULT($target) - -AC_MSG_CHECKING(for supported build system type) -build=`$ac_config_sup $build_alias` -build_cpu=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'` -build_vendor=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'` -build_os=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'` -AC_MSG_RESULT($build) - -ac_config_hc_dir=config - -if test -r ${ac_config_hc_dir}/cpu-${host_cpu}.h; then - host_cpu_H=1 -else - host_cpu_H=0 -fi -if test -r ${ac_config_hc_dir}/cpu-${host_cpu}.c; then - host_cpu_C=1 -else - host_cpu_C=0 -fi - -if test -r ${ac_config_hc_dir}/vendor-${host_vendor}.h; then - host_vendor_H=1 -else - host_vendor_H=0 -fi -if test -r ${ac_config_hc_dir}/vendor-${host_vendor}.c; then - host_vendor_C=1 -else - host_vendor_C=0 -fi - -if test -r ${ac_config_hc_dir}/os-${host_os}.h; then - host_os_H=1 -else - host_os_H=0 -fi -if test -r ${ac_config_hc_dir}/os-${host_os}.c; then - host_os_C=1 -else - host_os_C=0 -fi -AC_SUBST(host_cpu_H) -AC_SUBST(host_cpu_C) -AC_SUBST(host_vendor_H) -AC_SUBST(host_vendor_C) -AC_SUBST(host_os_H) -AC_SUBST(host_os_C) -])dnl -dnl -dnl -dnl -define(AC_CONFIG_PARAMS,[dnl - -AC_MSG_CHECKING(for name of user) -confuser="$LOGNAME" -AC_MSG_RESULT($confuser) -AC_SUBST(confuser) - -AC_MSG_CHECKING(for name of host) -confhost="`uname -n`" -AC_MSG_RESULT($confhost) -AC_SUBST(confhost) - -AC_MSG_CHECKING(for current date) -confdate="`date`" -AC_MSG_RESULT($confdate) -AC_SUBST(confdate) - -])dnl -dnl -dnl -dnl ########################################################## -dnl ## -dnl ## check for fixed distribution tree and fix it if needed -dnl ## -dnl ########################################################## -dnl -dnl -AC_DEFUN(AC_FIX_DIST_TREE,[dnl -AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl - -ac_fixdist=$ac_aux_dir/fixdist - -AC_MSG_CHECKING(for fixed distribution) -# Make sure we can run fixdist -if $ac_fixdist -t >/dev/null 2>&1; then - AC_MSG_RESULT(already fixed tree) -else - AC_MSG_RESULT(vanilla tree => fixing...) - $ac_fixdist -fi -])dnl -dnl -dnl -dnl ########################################################## -dnl ## -dnl ## check for generation mode: production or debug -dnl ## -dnl ########################################################## -dnl -dnl -define(AC_GENMODE,[dnl -AC_MSG_CHECKING(genmode) -AC_ARG_ENABLE(production,dnl -[ --enable-production to enable procution code and disable debug], -GENMODE=production -CFLAGS="-O" -CXXFLAGS="-O" -LDFLAGS="-O" -LDXXFLAGS="-O" -if test X$GCC = Xyes; then - CFLAGS="$CFLAGS -pipe" - CXXFLAGS="$CXXFLAGS -pipe" -fi -, -GENMODE=debug -CFLAGS="-DDEBUG -g" -CXXFLAGS="-DDEBUG -g" -LDFLAGS="-g" -LDXXFLAGS="-g" -if test X$GCC = Xyes; then - CFLAGS="$CFLAGS -ggdb3 -pipe" - CXXFLAGS="$CXXFLAGS -ggdb3 -pipe" - LDFLAGS="$LDFLAGS -ggdb3" - LDXXFLAGS="$LDXXFLAGS -ggdb3" -fi -)dnl -AC_SUBST(CFLAGS) -AC_SUBST(CXXFLAGS) -AC_SUBST(LDFLAGS) -AC_SUBST(LDXXFLAGS) -AC_SUBST(GENMODE) -AC_MSG_RESULT($GENMODE) -])dnl -dnl -dnl -dnl ########################################################## -dnl ## -dnl ## Startup Message -dnl ## -dnl ########################################################## -dnl -define(AC_STARTUP_MSG,[dnl -X=`cat Laby/Src/Config/Version.c | sed -e '1,/GNUVersion/d' | head -1 | sed -e 's/^ *"//' | sed -e 's/"; *$//'` -AC_MSG_RESULT(Configuring $X) -])dnl -dnl define(AC_CONFIGURE_PART,[dnl AC_MSG_RESULT() -AC_MSG_RESULT(__ $1 __) +AC_MSG_RESULT(${TERM_BOLD}$1${TERM_NORM}) ])dnl dnl dnl ########################################################## dnl ## -dnl ## GNU Make detection -dnl ## -dnl ########################################################## -dnl -define(AC_IS_GNU_MAKE,[dnl -AC_MSG_CHECKING([whether your default make program is GNU make]) -if test ".`make -v 2>/dev/null | grep 'GNU Make'`" = . ; then - IS_GNU_MAKE=0 - STATIC_MFLAGS="" - AC_MSG_RESULT([no, but that's ok]) -else - IS_GNU_MAKE=1 - STATIC_MFLAGS="--no-print-directory" - AC_MSG_RESULT([yes, fine but overkill]) -fi -AC_SUBST(IS_GNU_MAKE) -AC_SUBST(STATIC_MFLAGS) -])dnl -dnl -dnl ####### -define(AC_INIT_BINSH, -[#! /bin/sh -# AAA -]) -dnl -dnl ########################################################## -dnl ## dnl ## Built Environment dnl ## dnl ########################################################## dnl define(AC_BUILD_USER,[dnl AC_MSG_CHECKING(for build user) -build_user="`$ac_aux_dir/buildinfo -n %u@%h%d`" +build_user="`$shtool echo -n -e %u@%h%d`" AC_SUBST(build_user) AC_MSG_RESULT($build_user) ])dnl define(AC_BUILD_TIME,[dnl AC_MSG_CHECKING(for build time) build_time_ctime="`date | sed -e 's/\n$//'`" -build_time_iso="`$ac_aux_dir/buildinfo -n '%D-%m-%Y'`" +build_time_iso="`$shtool echo -n -e '%D-%m-%Y'`" AC_MSG_RESULT($build_time_iso) AC_SUBST(build_time_ctime) AC_SUBST(build_time_iso) --- eperl-2.2.14.orig/eperl_config.h +++ eperl-2.2.14/eperl_config.h @@ -15,7 +15,7 @@ ** ** ====================================================================== ** -** Copyright (c) 1996,1997,1998 Ralf S. Engelschall +** Copyright (c) 1996,1997,1998,1999 Ralf S. Engelschall ** ** This program is free software; it may be redistributed and/or modified ** only under the terms of either the Artistic License or the GNU General @@ -260,6 +260,36 @@ /* ** +** MAXPATHLEN +** PATH_MAX should be used in .c files, but it needs to be +** fixed upstream +*/ +/* Cut'n'paste from perl.h */ +#ifndef MAXPATHLEN +# ifdef PATH_MAX +# ifdef _POSIX_PATH_MAX +# if PATH_MAX > _POSIX_PATH_MAX +/* MAXPATHLEN is supposed to include the final null character, + * * as opposed to PATH_MAX and _POSIX_PATH_MAX. */ +# define MAXPATHLEN (PATH_MAX+1) +# else +# define MAXPATHLEN (_POSIX_PATH_MAX+1) +# endif +# else +# define MAXPATHLEN (PATH_MAX+1) +# endif +# else +# ifdef _POSIX_PATH_MAX +# define MAXPATHLEN (_POSIX_PATH_MAX+1) +# else +# define MAXPATHLEN 1024 /* Err on the large side. */ +# endif +# endif +#endif + + +/* +** ** Boolean Values -- defined in a general and portable way ** */ --- eperl-2.2.14.orig/eperl_http.c +++ eperl-2.2.14/eperl_http.c @@ -15,7 +15,7 @@ ** ** ====================================================================== ** -** Copyright (c) 1996,1997,1998 Ralf S. Engelschall +** Copyright (c) 1996,1997,1998,1999 Ralf S. Engelschall ** ** This program is free software; it may be redistributed and/or modified ** only under the terms of either the Artistic License or the GNU General @@ -37,33 +37,53 @@ #include "eperl_global.h" #include "eperl_proto.h" +#define _EPERL_VERSION_C_AS_HEADER_ +#include "eperl_version.c" +#undef _EPERL_VERSION_C_AS_HEADER_ /* ** ** print a standard HTTP reponse of header lines ** */ -void HTTP_PrintResponseHeaders(char *cpBuf) +char *HTTP_PrintResponseHeaders(char *cpBuf) { char *cp; - if ((cp = getenv("SERVER_PROTOCOL")) == NULL) - cp = "HTTP/1.0"; - printf("%s 200 OK\n", cp); + if ((strncmp(cpBuf, "HTTP/1.0 ", 9) == 0 + || (strncmp(cpBuf, "HTTP/1.1 ", 9) == 0)) + && (cpBuf[9] >= '1' && cpBuf[9] <= '5') + && (cpBuf[10] >= '0' && cpBuf[10] <= '9') + && (cpBuf[11] >= '0' && cpBuf[11] <= '9') + && (cpBuf[12] == ' ') + && ((cp = strchr(cpBuf + 12, '\n')) != NULL)) { + /* found HTTP status code */ + if (*(cp-1) == '\r') { + *(cp-1) = '\0'; + } + *cp++ = '\0'; + printf("%s\r\n", cpBuf); + cpBuf = cp; + } else { + /* no HTTP status code */ + if ((cp = getenv("SERVER_PROTOCOL")) == NULL) + cp = "HTTP/1.0"; + printf("%s 200 OK\r\n", cp); + } if (!HTTP_HeaderLineExists(cpBuf, "Server")) { if ((cp = getenv("SERVER_SOFTWARE")) == NULL) cp = "unknown-server/0.0"; - printf("Server: %s %s Perl/%s\n", cp, ePerl_WebID, AC_perl_vers); + printf("Server: %s %s Perl/%s\r\n", cp, eperl_version.v_web, AC_perl_vers); } if (!HTTP_HeaderLineExists(cpBuf, "Date")) - printf("Date: %s\n", WebTime()); + printf("Date: %s\r\n", WebTime()); if (!HTTP_HeaderLineExists(cpBuf, "Connection")) - printf("Connection: close\n"); + printf("Connection: close\r\n"); - return; + return cpBuf; } /* @@ -242,7 +262,8 @@ if (cps == NUL) strcpy(file, "/"); else - strcpy(file, cps); + strncpy(file, cps, sizeof(file)); + file[sizeof(file)-1] = NUL; return file; } @@ -254,7 +275,7 @@ struct hostent *he; struct sockaddr_in sar; struct protoent *pe; - char cmd[1024]; + char *cmd; char buf[1024]; char newurl[8192]; char *host; @@ -292,13 +313,19 @@ return NULL; /* form the HTTP/1.0 request */ - sprintf(cmd, "GET %s HTTP/1.0\n", file); - sprintf(cmd+strlen(cmd), "Host: %s:%s\n", host, port); - sprintf(cmd+strlen(cmd), "User-Agent: %s\n", ePerl_WebID); - sprintf(cmd+strlen(cmd), "\n"); + cmd = malloc(64 + strlen(file) + strlen(host) + + strlen(port) + strlen(eperl_version.v_web)); + if (cmd == NULL) + return NULL; + /* cmd has enough space */ + sprintf(cmd, "GET %s HTTP/1.0\r\n", file); + sprintf(cmd+strlen(cmd), "Host: %s:%s\r\n", host, port); + sprintf(cmd+strlen(cmd), "User-Agent: %s\r\n", eperl_version.v_web); + sprintf(cmd+strlen(cmd), "\r\n"); /* send the request */ write(s, cmd, strlen(cmd)); + free(cmd); /* convert the file descriptor to a FILE pointer */ fp = fdopen(s, "r"); @@ -330,7 +357,8 @@ for (cp2 = cp; *cp2 != ' ' && *cp2 != '\t' && *cp2 != '\n' && *cp2 != NUL; cp2++) ; *cp2 = NUL; - strcpy(newurl, cp); + strncpy(newurl, cp, sizeof(newurl)); + newurl[sizeof(newurl)-1] = NUL; break; } } --- eperl-2.2.14.orig/eperl_readme.c +++ eperl-2.2.14/eperl_readme.c @@ -18,9 +18,9 @@ " scripting language for dynamic HTML page programming. \n"\ "\n"\ " The documentation and latest release can be found on\n"\ -" http://www.engelschall.com/sw/eperl/\n"\ +" http://www.ossp.org/pkg/tool/eperl/\n"\ "\n"\ -" Copyright (c) 1996,1997,1998 Ralf S. Engelschall \n"\ +" Copyright (c) 1996,1997,1998,1999 Ralf S. Engelschall \n"\ "\n"\ " This program is free software; it may be redistributed and/or modified only\n"\ " under the terms of either the Artistic License or the GNU General Public\n"\ --- eperl-2.2.14.orig/eperl.pod +++ eperl-2.2.14/eperl.pod @@ -402,7 +402,7 @@ blocks (or the transformation into a CGI script would be useless). Alternatively (or even additionally) a webmaster can enable ePerl support in a -more seemless way by configuring ePerl as a real implicit server-side +more seamless way by configuring ePerl as a real implicit server-side scripting language. This is done by assigning a MIME-type to the various valid ePerl file extensions and forcing all files with this MIME-type to be internally processed via the ePerl interpreter. You can accomplish this for @@ -898,7 +898,7 @@ Web-References: Perl: perl(1), http://www.perl.com/ - ePerl: eperl(1), http://www.engelschall.com/sw/eperl/ + ePerl: eperl(1), http://www.ossp.org/pkg/tool/eperl/ Apache: httpd(8), http://www.apache.org/ =cut --- eperl-2.2.14.orig/eperl_main.c +++ eperl-2.2.14/eperl_main.c @@ -15,7 +15,7 @@ ** ** ====================================================================== ** -** Copyright (c) 1996,1997,1998 Ralf S. Engelschall +** Copyright (c) 1996,1997,1998,1999 Ralf S. Engelschall ** ** This program is free software; it may be redistributed and/or modified ** only under the terms of either the Artistic License or the GNU General @@ -37,9 +37,12 @@ #include "eperl_global.h" #include "eperl_security.h" #include "eperl_getopt.h" -#include "eperl_perl5.h" #include "eperl_proto.h" +#define _EPERL_VERSION_C_AS_HEADER_ +#include "eperl_version.c" +#undef _EPERL_VERSION_C_AS_HEADER_ + int mode = MODE_UNKNOWN; char *allowed_file_ext[] = LIST_OF_ALLOWED_FILE_EXT; @@ -56,7 +59,8 @@ char *cp; va_start(ap, str); - vsprintf(ca, str, ap); + vsnprintf(ca, sizeof(ca), str, ap); + ca[sizeof(ca)-1] = NUL; IO_restore_stdout(); IO_restore_stderr(); @@ -64,7 +68,7 @@ if (mode == MODE_CGI || mode == MODE_NPHCGI) { if (mode == MODE_NPHCGI) HTTP_PrintResponseHeaders(""); - printf("Content-Type: text/html\n\n"); + printf("Content-Type: text/html\r\n\r\n"); printf("\n"); printf("\n"); printf("ePerl: ERROR: %s\n", ca); @@ -80,7 +84,7 @@ printf("\"Embedded\n", cp); printf("\n"); printf("\n"); - printf("Version %s\n", ePerl_Version); + printf("Version %s\n", eperl_version.v_short); printf("\n"); printf("\n"); printf("

\n"); @@ -133,9 +137,9 @@ void give_version(void) { - fprintf(stdout, "%s\n", ePerl_Hello); + fprintf(stdout, "%s\n", eperl_version.v_tex); fprintf(stdout, "\n"); - fprintf(stdout, "Copyright (c) 1996,1997,1998 Ralf S. Engelschall \n"); + fprintf(stdout, "Copyright (c) 1996,1997,1998,1999 Ralf S. Engelschall \n"); fprintf(stdout, "\n"); fprintf(stdout, "This program is distributed in the hope that it will be useful,\n"); fprintf(stdout, "but WITHOUT ANY WARRANTY; without even the implied warranty of\n"); @@ -144,20 +148,6 @@ fprintf(stdout, "\n"); } -void give_version_extended(void) -{ - give_version(); - fprintf(stdout, "Characteristics of this binary:\n"); - fprintf(stdout, " Perl Version : %s (%s)\n", AC_perl_vers, AC_perl_prog); - fprintf(stdout, " Perl I/O Layer : %s\n", PERL_IO_LAYER_ID); - fprintf(stdout, " Perl Library : %s/CORE/libperl.a\n", AC_perl_archlib); - fprintf(stdout, " Perl DynaLoader : %s\n", AC_perl_dla); - fprintf(stdout, " System Libs : %s\n", AC_perl_libs); - fprintf(stdout, " Built User : %s\n", AC_build_user); - fprintf(stdout, " Built Time : %s\n", AC_build_time_iso); - fprintf(stdout, "\n"); -} - void give_readme(void) { fprintf(stdout, ePerl_README); @@ -172,7 +162,7 @@ { if (mode == MODE_NPHCGI) HTTP_PrintResponseHeaders(""); - printf("Content-Type: image/gif\n\n"); + printf("Content-Type: image/gif\r\n\r\n"); fwrite(ePerl_LOGO_data, ePerl_LOGO_size, 1, stdout); } @@ -180,7 +170,7 @@ { if (mode == MODE_NPHCGI) HTTP_PrintResponseHeaders(""); - printf("Content-Type: image/gif\n\n"); + printf("Content-Type: image/gif\r\n\r\n"); fwrite(ePerl_POWERED_data, ePerl_POWERED_size, 1, stdout); } @@ -306,8 +296,6 @@ { DECL_EXRC; FILE *fp = NULL; - FILE *er = NULL; - FILE *out = NULL; char *cpBuf = NULL; char *cpBuf2 = NULL; char *cpBuf3 = NULL; @@ -326,10 +314,9 @@ char *source = NULL; char sourcedir[2048]; char *cp; - static PerlInterpreter *my_perl = NULL; struct stat st; + char *cpOut0 = NULL; char *cpOut = NULL; - int size; struct passwd *pw; struct passwd *pw2; struct group *gr; @@ -446,7 +433,7 @@ give_version(); myexit(EX_OK); case 'V': - give_version_extended(); + give_version_extended_perl(); myexit(EX_OK); case 'h': give_usage(progname); @@ -521,7 +508,8 @@ /* determine whether pure CGI or NPH-CGI mode */ if ((cp = getenv("SCRIPT_FILENAME")) != NULL) { - strcpy(ca, cp); + strncpy(ca, cp, sizeof(ca)); + ca[sizeof(ca)-1] = NUL; if ((cp = strrchr(ca, '/')) != NULL) *cp++ = NUL; else @@ -536,7 +524,8 @@ } /* set the command line for ``ps'' output */ - sprintf(ca, "%s %s [%sCGI/SSSL]", argv[0], source, mode == MODE_NPHCGI ? "NPH-" : ""); + snprintf(ca, sizeof(ca), "%s %s [%sCGI/SSSL]", argv[0], source, mode == MODE_NPHCGI ? "NPH-" : ""); + ca[sizeof(ca)-1] = NUL; argv[0] = strdup(ca); } /* @@ -581,7 +570,8 @@ /* determine whether pure CGI or NPH-CGI mode */ if ((cp = getenv("SCRIPT_FILENAME")) != NULL) { - strcpy(ca, cp); + strncpy(ca, cp, sizeof(ca)); + ca[sizeof(ca)-1] = NUL; if ((cp = strrchr(ca, '/')) != NULL) *cp++ = NUL; else @@ -596,7 +586,8 @@ } /* set the command line for ``ps'' output */ - sprintf(ca, "%s %s [%sCGI/stand-alone]", argv[0], source, mode == MODE_NPHCGI ? "NPH-" : ""); + snprintf(ca, sizeof(ca), "%s %s [%sCGI/stand-alone]", argv[0], source, mode == MODE_NPHCGI ? "NPH-" : ""); + ca[sizeof(ca)-1] = NUL; argv[0] = strdup(ca); } /* @@ -836,7 +827,8 @@ dir_home = getcwd(NULL, 1024); /* determine physical dir of file */ - strcpy(dir_tmp, source); + strncpy(dir_tmp, source, sizeof(dir_tmp)); + dir_tmp[sizeof(dir_tmp)-1] = NUL; if ((cp = strrchr(dir_tmp, '/')) == NULL) { if (DO_FOR_FAILED_STEP == STOP_AND_ERROR) { PrintError(mode, source, NULL, NULL, "Invalid script ``%s'': no absolute path", source); @@ -936,15 +928,16 @@ /* now set the additional env vars */ env = mysetenv(env, "SCRIPT_SRC_PATH", "%s", abspath(source)); env = mysetenv(env, "SCRIPT_SRC_PATH_FILE", "%s", filename(source)); - env = mysetenv(env, "SCRIPT_SRC_PATH_DIR", "%s", abspath(dirname(source))); + env = mysetenv(env, "SCRIPT_SRC_PATH_DIR", "%s", dirname(abspath(source))); if ((cpPath = getenv("PATH_INFO")) != NULL) { if ((cpHost = getenv("SERVER_NAME")) == NULL) cpHost = "localhost"; cpPort = getenv("SERVER_PORT"); if (stringEQ(cpPort, "80")) cpPort = NULL; - sprintf(ca, "http://%s%s%s%s", + snprintf(ca, sizeof(ca), "http://%s%s%s%s", cpHost, cpPort != NULL ? ":" : "", cpPort != NULL ? cpPort : "", cpPath); + ca[sizeof(ca)-1] = NUL; env = mysetenv(env, "SCRIPT_SRC_URL", "%s", ca); env = mysetenv(env, "SCRIPT_SRC_URL_FILE", "%s", filename(ca)); env = mysetenv(env, "SCRIPT_SRC_URL_DIR", "%s", dirname(ca)); @@ -966,14 +959,15 @@ env = mysetenv(env, "SCRIPT_SRC_OWNER", "%s", pw->pw_name); else env = mysetenv(env, "SCRIPT_SRC_OWNER", "unknown-uid-%d", st.st_uid); - env = mysetenv(env, "VERSION_INTERPRETER", "%s", ePerl_WebID); + env = mysetenv(env, "VERSION_INTERPRETER", "%s", eperl_version.v_web); env = mysetenv(env, "VERSION_LANGUAGE", "Perl/%s", AC_perl_vers); /* optionally run the ePerl preprocessor */ if (fPP) { /* switch to directory where script stays */ getcwd(cwd, MAXPATHLEN); - strcpy(sourcedir, source); + strncpy(sourcedir, source, sizeof(sourcedir)); + sourcedir[sizeof(sourcedir)-1] = NUL; for (cp = sourcedir+strlen(sourcedir); cp > sourcedir && *cp != '/'; cp--) ; *cp = NUL; @@ -996,7 +990,8 @@ cpScript = cpBuf2; /* write buffer to temporary script file */ - strcpy(perlscript, mytmpfile("ePerl.script")); + strncpy(perlscript, mytmpfile("ePerl.script"), sizeof(perlscript)); + perlscript[sizeof(perlscript)-1] = NUL; #ifndef DEBUG_ENABLED unlink(perlscript); #endif @@ -1023,41 +1018,19 @@ fclose(fp); fp = NULL; } - /* open a file for Perl's STDOUT channel - and redirect stdout to the new channel */ - strcpy(perlstdout, mytmpfile("ePerl.stdout")); + /* temporary filename for Perl's STDOUT channel */ + strncpy(perlstdout, mytmpfile("ePerl.stdout"), sizeof(perlstdout)); + perlstdout[sizeof(perlstdout)-1] = NUL; #ifndef DEBUG_ENABLED unlink(perlstdout); #endif - if ((out = fopen(perlstdout, "w")) == NULL) { - PrintError(mode, source, NULL, NULL, "Cannot open STDOUT file `%s' for writing", perlstdout); - CU(mode == MODE_FILTER ? EX_IOERR : EX_OK); - } - IO_redirect_stdout(out); - /* open a file for Perl's STDERR channel - and redirect stderr to the new channel */ - strcpy(perlstderr, mytmpfile("ePerl.stderr")); + /* temporary filename for Perl's STDERR channel */ + strncpy(perlstderr, mytmpfile("ePerl.stderr"), sizeof(perlstderr)); + perlstderr[sizeof(perlstderr)-1] = NUL; #ifndef DEBUG_ENABLED unlink(perlstderr); #endif - if ((er = fopen(perlstderr, "w")) == NULL) { - PrintError(mode, source, NULL, NULL, "Cannot open STDERR file `%s' for writing", perlstderr); - CU(mode == MODE_FILTER ? EX_IOERR : EX_OK); - } - IO_redirect_stderr(er); - - /* now allocate the Perl interpreter */ - my_perl = perl_alloc(); - perl_construct(my_perl); - /* perl_destruct_level = 1; */ - - /* initialise the Perl Locale environment */ -#if AC_perl_vnum < 500400 - perl_init_i18nl14n(1); /* Perl 5.003 or lower */ -#else - perl_init_i18nl10n(1); /* Perl 5.004 or higher */ -#endif /* create command line... */ myargc = 0; @@ -1075,105 +1048,43 @@ /* - and the script itself */ myargv[myargc++] = perlscript; - /* now parse the script! - NOTICE: At this point, the script gets - only _parsed_, not evaluated/executed! */ -#ifdef HAVE_PERL_DYNALOADER - rc = perl_parse(my_perl, Perl5_XSInit, myargc, myargv, env); -#else - rc = perl_parse(my_perl, NULL, myargc, myargv, env); -#endif - if (rc != 0) { - if (fCheck && mode == MODE_FILTER) { - fclose(er); er = NULL; - IO_restore_stdout(); - IO_restore_stderr(); - if ((cpBuf = ePerl_ReadErrorFile(perlstderr, perlscript, source)) != NULL) { - fprintf(stderr, cpBuf); - } - CU(EX_IOERR); - } - else { - fclose(er); er = NULL; - PrintError(mode, source, perlscript, perlstderr, "Perl parsing error (interpreter rc=%d)", rc); - CU(mode == MODE_FILTER ? EX_IOERR : EX_OK); - } - } - - /* Stop when we are just doing a syntax check */ - if (fCheck && mode == MODE_FILTER) { - fclose(er); er = NULL; - IO_restore_stdout(); - IO_restore_stderr(); - fprintf(stderr, "%s syntax OK\n", source); - CU(EX_OK); - } - - /* change to directory of script: - this actually is not important to us, but really useful - for the ePerl source file programmer!! */ - cwd[0] = NUL; - if (!keepcwd) { - /* if running as a Unix filter remember the cwd for outputfile */ - if (mode == MODE_FILTER) - getcwd(cwd, MAXPATHLEN); - /* determine dir of source file and switch to it */ - strcpy(sourcedir, source); - for (cp = sourcedir+strlen(sourcedir); cp > sourcedir && *cp != '/'; cp--) - ; - *cp = NUL; - chdir(sourcedir); - } - - /* Set the previously remembered Perl 5 scalars (option -d) */ - Perl5_SetRememberedScalars(); - - /* Force unbuffered I/O */ - Perl5_ForceUnbufferedStdout(); - - /* NOW IT IS TIME to evaluate/execute the script!!! */ - rc = perl_run(my_perl); - - /* pre-close the handles, to be able to check - its size and to be able to display the contents */ - fclose(out); out = NULL; - fclose(er); er = NULL; - - /* when the Perl interpreter failed or there - is data on stderr, we print a error page */ - if (stat(perlstderr, &st) == 0) - size = st.st_size; - else - size = 0; - if (rc != 0 || size > 0) { - PrintError(mode, source, perlscript, perlstderr, "Perl runtime error (interpreter rc=%d)", rc); - CU(mode == MODE_FILTER ? EX_IOERR : EX_OK); + rc = Perl5_Run(myargc, myargv, mode, fCheck, keepcwd, source, env, perlscript, perlstderr, perlstdout); + /* Return code: + * 0: ok + * -1: fCheck && mode == MODE_FILTER and + * no error detected by perl_parse() + * otherwise: error detected by perl_parse() or perl_run() + * Error message has already been delivered bu Perl5_Run. + */ + if (rc != 0) { + if (rc == -1) + CU(EX_OK); + CU(mode == MODE_FILTER ? EX_FAIL : EX_OK); } /* else all processing was fine, so we read in the stdout contents */ if ((cpOut = ePerl_ReadSourceFile(perlstdout, &cpOut, &nOut)) == NULL) { PrintError(mode, source, NULL, NULL, "Cannot open STDOUT file `%s' for reading", perlstdout); - CU(mode == MODE_FILTER ? EX_IOERR : EX_OK); + CU(mode == MODE_FILTER ? EX_FAIL : EX_OK); } + cpOut0 = cpOut; /* cpOut will move by HTTP_PrintResponseHeaders() later */ stat(perlstdout, &st); - /* ok, now recover the stdout and stderr and - print out the real contents on stdout or outputfile */ - IO_restore_stdout(); - IO_restore_stderr(); - /* if we are running as a NPH-CGI/1.1 script we had to provide the HTTP reponse headers ourself */ if (mode == MODE_NPHCGI) { - HTTP_PrintResponseHeaders(cpOut); + char *p = HTTP_PrintResponseHeaders(cpOut); + /* HTTP_PrintResponseHeader will skip HTTP status line */ + nOut -= (p - cpOut); /* adjust length */ + cpOut = p; /* points top of HTTP response header */ /* if there are no HTTP header lines, we print a basic Content-Type header which should be ok */ if (!HTTP_HeadersExists(cpOut)) { - printf("Content-Type: text/html\n"); - printf("Content-Length: %d\n", nOut); - printf("\n"); + printf("Content-Type: text/html\r\n"); + printf("Content-Length: %d\r\n", nOut); + printf("\r\n"); } } else if (mode == MODE_CGI) { @@ -1191,10 +1102,6 @@ HTTP_StripResponseHeaders(&cpOut, &nOut); } - /* now when the request was not a HEAD request we create the output */ - cp = getenv("REQUEST_METHOD"); - if (! ((mode == MODE_CGI || mode == MODE_NPHCGI) && - cp != NULL && stringEQ(cp, "HEAD"))) { if (outputfile != NULL && stringNE(outputfile, "-")) { /* if we remembered current working dir, restore it now */ if (mode == MODE_FILTER && cwd[0] != NUL) @@ -1213,22 +1120,10 @@ /* make sure that the data is out before we exit */ fflush(stdout); } - } CUS: /* the Clean Up Sequence */ - /* Ok, the script got evaluated. Now we can destroy - and de-allocate the Perl interpreter */ - if (my_perl) { - perl_destruct(my_perl); - perl_free(my_perl); - } - /* close all still open file handles */ - if (out) - fclose(out); - if (er) - fclose(er); if (fp) fclose(fp); @@ -1237,8 +1132,8 @@ free(cpBuf); if (cpBuf2) free(cpBuf2); - if (cpOut) - free(cpOut); + if (cpOut0) + free(cpOut0); /* remove temporary files */ #ifndef DEBUG_ENABLED --- eperl-2.2.14.orig/config_ac.h.in +++ eperl-2.2.14/config_ac.h.in @@ -1,18 +1,12 @@ -/* config_ac.h.in. Generated automatically from configure.in by autoheader. */ +/* config_ac.h.in. Generated from configure.in by autoheader. */ #ifndef CONFIG_AC_H #define CONFIG_AC_H /* ** config_ac.h -- AUTO configuration header file -** Copyright (c) 1996,1997,1998 Ralf S. Engelschall +** Copyright (c) 1996,1997,1998,1999 Ralf S. Engelschall */ -/* Define to empty if the keyword does not work. */ -#undef const - -/* Define if you have the ANSI C header files. */ -#undef STDC_HEADERS - /* defined if Perl support the DynLoader interface for dynamic library loading */ #undef HAVE_PERL_DYNALOADER @@ -26,64 +20,101 @@ /* define if libdmalloc.a is available */ #undef HAVE_DMALLOC -/* Define if you have the memmove function. */ -#undef HAVE_MEMMOVE -/* Define if you have the setegid function. */ -#undef HAVE_SETEGID +/* Define to 1 if you have the header file. */ +#undef HAVE_CTYPE_H -/* Define if you have the seteuid function. */ -#undef HAVE_SETEUID +/* Define to 1 if you have the header file. */ +#undef HAVE_GRP_H -/* Define if you have the strdup function. */ -#undef HAVE_STRDUP +/* Define to 1 if you have the header file. */ +#undef HAVE_INTTYPES_H -/* Define if you have the header file. */ -#undef HAVE_CTYPE_H +/* Define to 1 if you have the `memmove' function. */ +#undef HAVE_MEMMOVE -/* Define if you have the header file. */ -#undef HAVE_GRP_H +/* Define to 1 if you have the header file. */ +#undef HAVE_MEMORY_H -/* Define if you have the header file. */ +/* Define to 1 if you have the header file. */ #undef HAVE_NETDB_H -/* Define if you have the header file. */ +/* Define to 1 if you have the header file. */ #undef HAVE_NETINET_IN_H -/* Define if you have the header file. */ +/* Define to 1 if you have the header file. */ #undef HAVE_PWD_H -/* Define if you have the header file. */ +/* Define to 1 if you have the `setegid' function. */ +#undef HAVE_SETEGID + +/* Define to 1 if you have the `seteuid' function. */ +#undef HAVE_SETEUID + +/* Define to 1 if you have the header file. */ #undef HAVE_SIGNAL_H -/* Define if you have the header file. */ +/* Define to 1 if you have the header file. */ #undef HAVE_STDARG_H -/* Define if you have the header file. */ +/* Define to 1 if you have the header file. */ +#undef HAVE_STDINT_H + +/* Define to 1 if you have the header file. */ #undef HAVE_STDIO_H -/* Define if you have the header file. */ +/* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H -/* Define if you have the header file. */ +/* Define to 1 if you have the `strdup' function. */ +#undef HAVE_STRDUP + +/* Define to 1 if you have the header file. */ +#undef HAVE_STRINGS_H + +/* Define to 1 if you have the header file. */ #undef HAVE_STRING_H -/* Define if you have the header file. */ +/* Define to 1 if you have the header file. */ #undef HAVE_SYS_PARAM_H -/* Define if you have the header file. */ +/* Define to 1 if you have the header file. */ #undef HAVE_SYS_SOCKET_H -/* Define if you have the header file. */ +/* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H -/* Define if you have the header file. */ +/* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H -/* Define if you have the header file. */ +/* Define to 1 if you have the header file. */ #undef HAVE_TIME_H -/* Define if you have the header file. */ +/* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H +/* 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 + +/* Define to `char' if does not define. */ +#undef bool + +/* Define to empty if `const' does not conform to ANSI C. */ +#undef const + #endif /* CONFIG_AC_H */ --- eperl-2.2.14.orig/eperl_getopt.h +++ eperl-2.2.14/eperl_getopt.h @@ -15,7 +15,7 @@ ** ** ====================================================================== ** -** Copyright (c) 1996,1997,1998 Ralf S. Engelschall +** Copyright (c) 1996,1997,1998,1999 Ralf S. Engelschall ** ** This program is free software; it may be redistributed and/or modified ** only under the terms of either the Artistic License or the GNU General --- eperl-2.2.14.orig/eperl_global.h +++ eperl-2.2.14/eperl_global.h @@ -15,7 +15,7 @@ ** ** ====================================================================== ** -** Copyright (c) 1996,1997,1998 Ralf S. Engelschall +** Copyright (c) 1996,1997,1998,1999 Ralf S. Engelschall ** ** This program is free software; it may be redistributed and/or modified ** only under the terms of either the Artistic License or the GNU General @@ -89,10 +89,8 @@ /* ** Shortcuts for string comparisons */ -#define stringEQ(s1,s2) strcmp(s1,s2) == 0 -#define stringNE(s1,s2) strcmp(s1,s2) != 0 -#define stringEQn(s1,s2,n) strcmp(s1,s2,n) == 0 -#define stringNEn(s1,s2,n) strcmp(s1,s2,n) != 0 +#define stringEQ(s1,s2) (s1 != NULL && s2 != NULL && strcmp(s1,s2) == 0) +#define stringNE(s1,s2) (s1 != NULL && s2 != NULL && strcmp(s1,s2) != 0) #endif /* EPERL_GLOBAL_H */ /*EOF*/ --- eperl-2.2.14.orig/Makefile.in +++ eperl-2.2.14/Makefile.in @@ -4,6 +4,9 @@ ## @SET_MAKE@ +top_srcdir = @top_srcdir@ +srcdir = @srcdir@ + # ------------------------------------------------ # DEFINITIONS # ------------------------------------------------ @@ -33,10 +36,12 @@ dmalloc = @dmalloc@ # installation tools -INSTALL = @INSTALL@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_DATA = @INSTALL_DATA@ -MKDIR = ./etc/mkdir.sh +SHTOOL = $(top_srcdir)/etc/shtool +INSTALL_PROGRAM = install -c -m 755 -s +INSTALL_DATA = install -c -m 644 +MKDIR = mkdir -p -m 755 +VERSION_TOOL = $(SHTOOL) version +FIXPERM = $(SHTOOL) fixperm CP = cp # installation paths @@ -45,7 +50,8 @@ bindir = $(prefix)/bin libsubdir = @libsubdir@ libdir = $(prefix)/lib$(libsubdir) -mandir = $(prefix)/man/man1 +mandir = $(prefix)/share/man/man1 +tmpdir = @tmpdir@ # ------------------------------------------------ @@ -53,33 +59,34 @@ # ------------------------------------------------ _GETDISTINFO = \ - _version=`./etc/newvers -lc -d eperl_version.c`; \ - _date=`date '+%y%m%d_%H%M'` + _version=`$(VERSION_TOOL) -lc -d short eperl_version.c`; \ + _date=`date '+%Y%m%d_%H%M'` _BUILDDIST = \ echo "Creating tarball..."; \ - gtar --no-recursion -cvf - `find * -depth -print | sort` |\ - tardy --user_number=1000 --user_name=rse \ - --group_number=1000 --group_name=en \ - --prefix=$${_distname} - |\ - gzip >$${_tarball}; \ + find * -depth -print |\ + sort | xargs tar --no-recursion -cf - |\ + tarcust --user-name=rse --group-name=en --prefix=$${_distname} \ + --exclude='.*CVS.*' --exclude='.*\.cvsignore' \ + --exclude='eperl-.*\.tar\.gz' |\ + gzip -9 >$${_tarball}; \ echo "Done"; \ ls -l $${_tarball} _NEWVERS = \ - ./etc/newvers -lc -p ePerl $$OPT eperl_version.c; \ - V=`./etc/newvers -lc -D eperl_version.c`;\ + $(VERSION_TOOL) -lc -p ePerl $$OPT eperl_version.c; \ + V=`$(VERSION_TOOL) -lc -d long eperl_version.c`;\ sed -e "s/Version .*(.*)/Version $$V/g" README.n && mv README.n README; \ - V=`./etc/newvers -lc -d eperl_version.c`;\ + V=`$(VERSION_TOOL) -lc -d short eperl_version.c`;\ sed -e "s/@v=(\"[0-9.]*\"/@v=(\"$$V\"/g" mod/Parse/ePerl.pm.n && mv mod/Parse/ePerl.pm.n mod/Parse/ePerl.pm; \ sed -e "s/@v=(\"[0-9.]*\"/@v=(\"$$V\"/g" mod/Apache/ePerl.pm.n && mv mod/Apache/ePerl.pm.n mod/Apache/ePerl.pm _UPDATEVERS = \ - V=`./etc/newvers -lc -d eperl_version.c`;\ - ./etc/newvers -lc -p ePerl -r $$V eperl_version.c; \ - V=`./etc/newvers -lc -D eperl_version.c`;\ + V=`$(VERSION_TOOL) -lc -d short eperl_version.c`;\ + $(VERSION_TOOL) -lc -p ePerl -s $$V eperl_version.c; \ + V=`$(VERSION_TOOL) -lc -d long eperl_version.c`;\ sed -e "s/Version .*(.*)/Version $$V/g" README.n && mv README.n README; \ - V=`./etc/newvers -lc -d eperl_version.c`;\ + V=`$(VERSION_TOOL) -lc -d short eperl_version.c`;\ sed -e "s/@v=(\"[0-9.]*\"/@v=(\"$$V\"/g" mod/Parse/ePerl.pm.n && mv mod/Parse/ePerl.pm.n mod/Parse/ePerl.pm; \ sed -e "s/@v=(\"[0-9.]*\"/@v=(\"$$V\"/g" mod/Apache/ePerl.pm.n && mv mod/Apache/ePerl.pm.n mod/Apache/ePerl.pm @@ -88,7 +95,7 @@ # THE DEFAULT TARGET # ------------------------------------------------ -all: config eperl eperl.1 +all: eperl eperl.1 # ------------------------------------------------ @@ -106,6 +113,8 @@ rm -f config_ac.h.in autoheader configure.in >config_ac.h.in +etc/shtool: + shtoolize -o $@ install mkdir version echo fixperm # ------------------------------------------------ # THE RELEASE STUFF (TARGETS) @@ -114,18 +123,18 @@ release: distclean fixperm @$(_GETDISTINFO); \ _distname="eperl-$${_version}"; \ - _tarball="/tmp/$${_distname}.tar.gz"; \ + _tarball="$(tmpdir)/$${_distname}.tar.gz"; \ echo "Release Distribution: ePerl Version $$_version"; \ $(_BUILDDIST); \ - mv /tmp/$${_distname}.tar.gz $${_distname}.tar.gz + mv $(tmpdir)/$${_distname}.tar.gz $${_distname}.tar.gz snap: distclean fixperm @$(_GETDISTINFO); \ - _distname="eperl-$${_version}-SNAP-$${_date}"; \ - _tarball="/tmp/$${_distname}.tar.gz"; \ + _distname="eperl-$${_version}-SNAP"; \ + _tarball="$(tmpdir)/$${_distname}.tar.gz"; \ echo "Snap of whole source tree: ePerl Version $$_version as of $${_date}"; \ $(_BUILDDIST); \ - mv /tmp/$${_distname}.tar.gz $${_distname}.tar.gz + mv $(tmpdir)/$${_distname}.tar.gz $${_distname}.tar.gz new-version: OPT=-iv; $(_NEWVERS) @@ -146,7 +155,7 @@ OPT=-is; $(_NEWVERS) new-release: - OPT=-r$(R); $(_NEWVERS) + OPT=-s$(R); $(_NEWVERS) update-version: $(_UPDATEVERS) @@ -205,10 +214,7 @@ eperl: $(OBJS) $(CC) $(LDFLAGS) -o eperl $(OBJS) $(LDLIBS) $(dmalloc) - @if [ "x$(debug)" = xoff ]; then \ - strip eperl; \ - fi - @ls -l eperl; @SIZE@ eperl + @[ "x$(debug)" = xon ] || strip eperl eperl_main.o: eperl_main.c $(CC) $(CFLAGS) -c eperl_main.c @@ -279,7 +285,7 @@ ./etc/mkproto eperl_proto.h $(PROTO_SRCS) fixperm: - ./etc/fixperm * + $(FIXPERM) * # ------------------------------------------------ @@ -287,13 +293,13 @@ # ------------------------------------------------ eperl.1: eperl.pod eperl_version.c - V=`./etc/newvers -l c -D eperl_version.c`; \ - sed -e "s|\@V\@|$$V|g" -e "s|\@prefix\@|$(prefix)|" /tmp/eperl.pod; \ + set -e; \ + V=`$(VERSION_TOOL) -lc -d long eperl_version.c`; \ pod2man --section=1 \ --center="Ralf S. Engelschall" \ - --release="EN" \ - /tmp/eperl.pod >eperl.1 && \ - rm -f /tmp/eperl.pod + --release="EN" \ + eperl.pod |\ + sed -e "s|\@V\@|$$V|g" -e "s|\@prefix\@|$(prefix)|" >$@ # ------------------------------------------------ @@ -356,24 +362,15 @@ -rm -f libeperl.a -rm -f core *.core -realclean: - -rm -f $(OBJS) - -rm -f eperl - -rm -f $(SOBJS) - -rm -f libeperl.a - -rm -f core *.core +realclean: clean -rm -f eperl_perl5_sm.h -rm -f eperl.1 -rm -f eperl_readme.[ch] -rm -f eperl_license.[ch] -distclean: - -rm -f $(OBJS) - -rm -f eperl - -rm -f $(SOBJS) - -rm -f libeperl.a - -rm -f core *.core +distclean: clean -rm -f eperl_perl5_sm.h + -rm -f eperl.1 eperl-*.tar.gz -rm -f config_ac.h config_sc.h -rm -f config.status config.cache config.log -rm -f Makefile --- eperl-2.2.14.orig/debian/NEWS +++ eperl-2.2.14/debian/NEWS @@ -0,0 +1,12 @@ +eperl (2.2.14-8) unstable; urgency=low + + For security reasons (see http://bugs.debian.org/57886), the Debian + package does not provide /usr/lib/cgi-bin/nph-eperl any more, and + thus ePerl can not be used directly as a server-side scripting + language in its default configuration. + + If you want to enable this feature, simply type + ln -sf ../../bin/eperl /usr/lib/cgi-bin/nph-eperl + as root. + + -- Denis Barbier Sat, 13 Sep 2003 00:23:04 +0200 --- eperl-2.2.14.orig/debian/postrm +++ eperl-2.2.14/debian/postrm @@ -0,0 +1,16 @@ +#!/bin/sh -e + +# This file was shipped by eperl (<= 2.2.14-7), but since 2.2.14-8 +# users are encouraged to put a symlink to /usr/bin/eperl if they +# need CGI scripting. This link is removed when uninstalling eperl. +cgi_nph_eperl=/usr/lib/cgi-bin/nph-eperl + +# This file is managed by postinst, so remove it too. +cgi_suid_eperl=/usr/lib/cgi-bin/suideperl + +[ "$1" = "remove" ] && [ -L $cgi_nph_eperl ] && rm -f $cgi_nph_eperl +[ "$1" = "remove" ] && [ -f $cgi_suid_eperl ] && rm -f $cgi_suid_eperl + +#DEBHELPER# + +exit 0 --- eperl-2.2.14.orig/debian/compat +++ eperl-2.2.14/debian/compat @@ -0,0 +1 @@ +4 --- eperl-2.2.14.orig/debian/watch +++ eperl-2.2.14/debian/watch @@ -0,0 +1,2 @@ +version=3 +ftp://ftp.ossp.org/pkg/tool/eperl/eperl-(.*).tar.gz debian uupdate --- eperl-2.2.14.orig/debian/copyright +++ eperl-2.2.14/debian/copyright @@ -0,0 +1,17 @@ +This is Debian GNU/Linux's prepackaged version of +Ā© 1996,1997,1998,1999 Ralf S. Engelschall + +This package was originally put together by Heiko Schlittermann + and has been updated from the sources obtained from +http://www.engelschall.com/sw/eperl/distrib/eperl-2.2.14.tar.gz. + +Currently maintained by Luk Claes and + Felipe Augusto van de Wiel + +Now available at: + ftp://ftp.ossp.org/pkg/tool/eperl/ + +This program is free software; it may be redistributed and/or modified only +under the terms of either the Artistic License or the GNU General Public +License, which may be found on Debian GNU/Linux systems as +`/usr/share/common-licenses/GPL' and `/usr/share/common-licenses/Artistic'. --- eperl-2.2.14.orig/debian/lintian +++ eperl-2.2.14/debian/lintian @@ -0,0 +1 @@ +eperl: package-installs-nonbinary-perl-in-usr-lib-perl5 usr/lib/perl5/Parse/ePerl.pm --- eperl-2.2.14.orig/debian/rules +++ eperl-2.2.14/debian/rules @@ -0,0 +1,84 @@ +#!/usr/bin/make -f + +SHELL = /bin/sh + +ifndef PERL +PERL = /usr/bin/perl +endif + +TMP = `pwd`/debian/`dh_listpackages` +package = eperl + +build: build-stamp +build-stamp: + dh_testdir + # File etc/shtool comes from a patch and must be set executable + chmod a+x etc/shtool + ./configure --prefix=/usr + # Remove unneded library flags + perl -pi -e 's/ -l\S*db\S*//g' Makefile config.status config_sc.h + $(MAKE) + + #$(MAKE) test + mv Makefile Makefile.stand-alone + + $(PERL) Makefile.PL INSTALLDIRS=vendor + $(MAKE) OPTIMIZE="-O2 -g -Wall" LD_RUN_PATH= + #$(MAKE) test + touch build-stamp + +clean: + dh_testdir + dh_testroot + rm -f build-stamp +ifeq (Makefile,$(wildcard Makefile)) + $(MAKE) distclean +endif + rm -f Makefile.stand-alone + dh_clean + +install: build + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs usr/share/perl5 + + # Install eperl binary + $(MAKE) -f Makefile.stand-alone install prefix=$(TMP)/usr + # ... and perl modules + $(MAKE) install PREFIX=$(TMP)/usr + # ... and move Apache/ePerl.pm + mv $(TMP)/usr/lib/perl5/Apache $(TMP)/usr/share/perl5/ + find $(TMP) -type d -empty | xargs -r rmdir -p --ignore-fail-on-non-empty + rm -rf $(TMP)/usr/lib/eperl + +# Build architecture-independent files here. +binary-indep: build +# There are no architecture-independent files to be uploaded +# generated by this package. If there were any they would be +# made here. + +# Build architecture-dependent files here. +binary-arch: build install + dh_testdir + dh_testroot + dh_installdocs ANNOUNCE CREDITS KNOWN.BUGS NEWS PORTING \ + README VERSIONS ChangeLog.* contrib/utils/ + dh_installexamples eg/* + dh_installchangelogs ChangeLog + # Do not provide this link for security reason, see README.Debian + #dh_link usr/bin/eperl usr/lib/cgi-bin/nph-eperl +ifeq "$(findstring nostrip,$(DEB_BUILD_OPTIONS))" "" + dh_strip +endif + dh_compress + dh_fixperms + dh_installdeb + dh_perl + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install --- eperl-2.2.14.orig/debian/control +++ eperl-2.2.14/debian/control @@ -0,0 +1,17 @@ +Source: eperl +Section: devel +Priority: optional +Maintainer: Felipe Augusto van de Wiel (faw) +Build-Depends: debhelper (>= 4), libperl-dev, perl (>= 5.8.1) +Standards-Version: 3.7.3 + +Package: eperl +Architecture: any +Depends: ${shlibs:Depends}, ${perl:Depends} +Suggests: libapache-mod-perl (>= 1.24.01-1) +Description: Embedded Perl 5 Language + ePerl interprets an ASCII file bristled with Perl 5 program statements by + evaluating the Perl 5 code while passing through the plain ASCII data. It + can operate in various ways: As a stand-alone Unix filter or integrated + Perl 5 module for general file generation tasks and as a powerful Webserver + scripting language for dynamic HTML page programming. --- eperl-2.2.14.orig/debian/changelog +++ eperl-2.2.14/debian/changelog @@ -0,0 +1,361 @@ +eperl (2.2.14-15.2build1) lucid; urgency=low + + * rebuild rest of main for armel armv7/thumb2 optimization; + UbuntuSpec:mobile-lucid-arm-gcc-v7-thumb2 + + -- Alexander Sack Fri, 05 Mar 2010 04:14:23 +0100 + +eperl (2.2.14-15.2) unstable; urgency=low + + * Non-maintainer upload. + * Call PERL_SYS_INIT3() before perl_alloc(), fixing uninitialized lock + issues on hppa. (Closes: #494191) + + -- Marc 'HE' Brockschmidt Sat, 06 Sep 2008 21:30:21 +0200 + +eperl (2.2.14-15.1) unstable; urgency=low + + * Non-maintainer upload. + * Fix FTBFS with perl5.10 (closes: #463083) + * Stop ignoring errors in clean target + * Update Standards-Version (no changes) + + -- Stephen Gran Sun, 06 Apr 2008 00:37:02 +0100 + +eperl (2.2.14-15) unstable; urgency=low + + * Remove me from Maintainers. + * Handle nostrip build option (Closes: #436818). + + -- Luk Claes Wed, 23 Jan 2008 22:58:38 +0000 + +eperl (2.2.14-14) unstable; urgency=low + + * New maintainers. + * Bumped Standards-Version. + * Updated debian/watch to version=3 and new upstream location. + * Updated debian/copyright. + + -- Luk Claes Sat, 30 Sep 2006 13:35:57 +0200 + +eperl (2.2.14-13) unstable; urgency=low + + * eperl_main.c: slight changes when computing SCRIPT_SRC_PATH_DIR; + valgrind reported that in strncpy, src and dest strings had the + same address. + * Bump Standards-Version: 3.6.2, no changes needed in packaging. + * Depends on debhelper >= 4, and set debian/compat to 4. + + -- Denis Barbier Sun, 25 Sep 2005 22:42:02 +0200 + +eperl (2.2.14-12) unstable; urgency=low + + * Fix compilation on amd64 with gcc-4.0. Closes: #300093 + Thanks Andreas Jochens for reporting this bug and providing a patch. + * Fix typo in eperl.1. Closes: #300134 + Thanks A Costa for reporting this bug and providing a patch. + + -- Denis Barbier Thu, 17 Mar 2005 22:27:45 +0100 + +eperl (2.2.14-11) unstable; urgency=low + + * Vladislav Safronov sent a patch to change cache behavior of + Apache::ePerl. All cached Perl code was previously evaluated in + a single environment, whereas a unique package name is now assigned + to each script, which is evaluated from within this package. + Closes: #228644 Thanks Vladislav Safronov. + + -- Denis Barbier Sat, 7 Feb 2004 20:40:04 +0100 + +eperl (2.2.14-10) unstable; urgency=low + + * Improve spelling in NEWS file. Closes: #226426 + Thanks Pascal Hakim. + + -- Denis Barbier Sun, 18 Jan 2004 22:42:46 +0200 + +eperl (2.2.14-9) unstable; urgency=low + + * Rebuild againt perl 5.8.1. This is a temporary fix to work around + the current incompatibility between 5.8.0 and 5.8.1 + Closes: #213727 + + -- Denis Barbier Wed, 1 Oct 2003 22:04:15 +0200 + +eperl (2.2.14-8) unstable; urgency=low + + * When receiving an HEAD request, ePerl did not output HTTP headers. + (Closes: #186340) Thanks Gergely Nagy + * Bump Standards-Version: 3.6.1 and convert this file to UTF-8. + * Move /usr/lib/perl5/Apache/ePerl.pm under /usr/share/perl5/ + * Remove /usr/lib/cgi-bin/nph-eperl for security reason. + NEWS.Debian explains how to enable CGI scripting if needed. + (Closes: #57886) Thanks Steve Dodd + * debian/postrm: Remove /usr/lib/cgi-bin/nph-eperl if it is a symlink. + + -- Denis Barbier Sat, 13 Sep 2003 00:23:04 +0200 + +eperl (2.2.14-7) unstable; urgency=low + + * Fix bug in Parse::ePerl::Preprocess: BD and ED are now initialized + Bugreport and patch provided by Holger Krug + Thanks. (Closes: #184785) + + -- Denis Barbier Fri, 14 Mar 2003 22:14:47 +0100 + +eperl (2.2.14-6) unstable; urgency=low + + * eperl_perl5.c eperl_main.c: move the whole Perl processing stuff + into eperl_perl5.c, so that eperl_perl5.h is no more needed by + eperl_main.c. This is needed to let ePerl compile with future + Perl 5.8 + * eperl_config.h: define MAXPATHLEN if necessary + * Makefile.PL: restore original file, old hack does not seem to + be necessary anymore + * configure.in: can be processed by Autoconf 2.1x and 2.5x + * Build against Perl 5.8 + + -- Denis Barbier Thu, 8 Aug 2002 10:13:26 +0200 + +eperl (2.2.14-5) unstable; urgency=low + + * eperl_parse.c eperl_proto.h: remove useless definition of strndup + * eperl_perl5.h: remove broken pseudo-support for PerlIO + * new ePerl homepage mentioned in eperl(1) manpage + * remove author and homepage information from debian/control + + -- Denis Barbier Tue, 6 Aug 2002 22:52:46 +0200 + +eperl (2.2.14-4) unstable; urgency=low + + * Remove emacs crap from debian/changelog + * Fix misspelling in debian/copyright + + -- Denis Barbier Tue, 18 Dec 2001 20:40:24 +0100 + +eperl (2.2.14-3) unstable; urgency=low + + * The #sinclude directive calling an external server could allow + execution of arbitrary code (Bug reported by David Madison on the + ePerl mailing list). + * Argh, -l*db* are back in Perl ldflags :( + * Remove INSTALL* files from documentation + * Remove dh_testversion from debian/rules + * Fix rpath related lintian error in Makefile.PL + + -- Denis Barbier Sat, 16 Jun 2001 00:29:53 +0200 + +eperl (2.2.14-2) unstable; urgency=high + + * Urgency set to high because previous security fix could not compile + from source. + * Fix debian/rules so that dh_perl can perform its job and find Perl + dependencies (Closes: Bug#86852). + * A Build-Depends against perl versioned 5.6.0-19 is added since + perl ldflags do no more refer to -lposix nor -l*db* + (Closes: Bug#86938). + + -- Denis Barbier Thu, 22 Feb 2001 23:09:40 +0100 + +eperl (2.2.14-1) unstable; urgency=high + + * After auditing all string manipulations, some new buffer + overflows are detected and fixed. This is why urgency is set to high. + Closes: Bug#71479 + * All header lines now end up with `\r\n', not only Content-type. + * Change t/05-mode_nphcgi.t to reflect these changes in HTTP headers. + * Fix Build-Depends (Closes: Bug#86550) + + -- Denis Barbier Mon, 19 Feb 2001 00:37:55 +0100 + +eperl (2.2.14-0.8) unstable; urgency=low + + * Hijacked ePerl because Heiko seems not having time to work on it. + This is not the kindest action i made, and my apologies go to Heiko, + but i really need to make this package work quickly. + * Make etc/shtool executable before building (Closes: Bug#81198). + + -- Denis Barbier Sat, 17 Feb 2001 10:23:25 +0000 + +eperl (2.2.14-0.7) unstable; urgency=low + + * Non-maintainer upload. + * Recompiled for perl-5.6 (Closes: Bug#76506). + * Added Build-Depends (Closes: Bug#70318). + * Applied Fumitoshi UKAI's security patch against possible buffer + overflow. UKAI says it still needs auditing, so I'm leaving this bug + report open (Bug#71479). + * Patch from Fumitoshi UKAI that fixes problem with sending HTTP status + code (Closes: Bug#66204). + * Fixed ePerl Y2K bug in ePerl.pm and etc/newvers (Closes: Bug#69312). + * Added missing #DEBHELPER# in postinst and postrm so that the + /usr/doc/eperl symlink is created (Closes: Bug#76507). + * Extraneous .packlist, fixed in 2.2.14-0.4 (Closes: Bug#38957). + * Added a temporary, ugly kludge in debian/rules so that the build won't + look for the obsolete (?) libposix on woody. + * Merged in newer eperl code from wml-2.0.6. + * "Modernized" debian/rules. + + -- Anthony Fok Wed, 20 Dec 2000 15:20:52 -0700 + +eperl (2.2.14-0.6) unstable; urgency=medium + + * Non-maintainer upload during bug-squashing-party. + * Applied patch from Vincent Renardias (closes: #54278). + + -- Christian Kurz Sat, 8 Jan 2000 13:07:00 +0100 + +eperl (2.2.14-0.5) unstable; urgency=medium + + * Non-maintainer upload. + * Recompiled for perl-5.005. + * Partially upgraded to standards version 3.0.0: + - Updated copyright to point to /usr/share/common-licenses + - FHS-compliance, with the notable exception of the + /usr/doc/eperl -> /usr/share/doc/eperl switch. + * [debian/rules]: Uses dh_perl to generate perl dependency instead of + hard-coding it in debian/control. (Thanks RaphaĆ«l! :-) + * Removed the hack in ./Makefile.PL as the new Perl package seems + to have fixed the segfault problemI had with eperl_2.2.14-0.3. + * Suggests: libapache-mod-perl (>= 1.19-2), which does not yet + exist but is predicted to be compatible with the new Perl. :-) + + -- Anthony Fok Tue, 6 Jul 1999 03:53:39 -0600 + +eperl (2.2.14-0.4) unstable; urgency=low + + * Non-maintainer upload. + * Recompiled on master (slink) because the copy of eperl 2.2.14-0.3 + compiled on my i386 computer (potato) gives a segmentation fault. + * Suggests: libapache-mod-perl (>= 1.16-2) from slink instead of + (>= 1.19-1) which is only in potato. + * Removed /usr/lib/perl5/i386-linux/5.004/auto/Parse/ePerl/.packlist + + -- Anthony Fok Fri, 11 Jun 1999 19:53:02 -0500 + +eperl (2.2.14-0.3) unstable; urgency=low + + * Non-maintainer upload. + * Incorporated some fixes from WML 1.7.1. + * Upgraded to standards version 2.5.1 (no change). + * [./Makefile.PL]: A small hack which in effect changes + "-lc -leperl" to "-leperl -lc" in ./mod/Parse/Makefile to keep ld + from complaining about "undefined versioned symbol name + strndup@@GLIBC_2.0". Thanks to Joel Klecker for pinpointing the + problem! :-) + * Suggests: libapache-mod-perl (>= 1.19-1), thanks to Lintian. :-) + + -- Anthony Fok Fri, 11 Jun 1999 09:31:56 -0600 + +eperl (2.2.14-0.2) stable unstable; urgency=low + + * Non-maintainer upload. + * Re-uploaded to both stable (hamm) and unstable (slink) to + fix the security bug in ePerl 2.2.12 (closes: Bug#24498). + + -- Anthony Fok Sun, 9 Aug 1998 23:44:22 -0600 + +eperl (2.2.14-0.1) unstable; urgency=low + + * New upstream release. + * Non-maintainer release. + * Now installs README and the new CREDITS to /usr/doc/eperl. + + -- Anthony Fok Sun, 2 Aug 1998 18:44:26 -0600 + +eperl (2.2.13-0.1) unstable; urgency=low + + * New upstream release (Security and Bug Fixes). + * Non-maintainer release. + * Upgraded to standards version 2.4.1.0 (no changes). + + -- Anthony Fok Sat, 1 Aug 1998 17:06:41 -0600 + +eperl (2.2.12-2) frozen unstable; urgency=low + + * should go to frozen as well as to unstable + * updating /usr/lib/cgi-bin/suideperl iff exists + + -- Heiko Schlittermann Mon, 11 May 1998 23:58:14 +0200 + +eperl (2.2.12-1) unstable; urgency=low + + * added www-data as suid permitted caller + * added symlink + /usr/lib/cgi-bin/nph-eperl -> /usr/bin/eperl + + -- Heiko Schlittermann Mon, 11 May 1998 13:48:55 +0200 + +eperl (2.2.12-0.2) unstable; urgency=low + + * Non-maintainer release. + * No longer installs /usr/lib/perl5/i386-linux/5.004/perllocal.pod. + * Revised copyright file (GPL.gz -> GPL, Artistic.gz -> Artistic), + thanks to the Lintian error report. :-) + * Upgraded to standards version 2.4.0.0 (no changes). + + -- Anthony Fok Tue, 10 Feb 1998 18:01:14 -0700 + +eperl (2.2.12-0.1) unstable; urgency=low + + * New upstream non-maintainer release. + * Have a Happy New Year 1998! :) + + -- Anthony Fok Wed, 31 Dec 1997 17:25:00 -0700 + +eperl (2.2.11-0.1) unstable; urgency=low + + * New upstream non-maintainer release. + * Have a Happy New Year! :) + + -- Anthony Fok Tue, 30 Dec 1997 19:44:02 -0700 + +eperl (2.2.9-0.1) unstable; urgency=low + + * New upstream non-maintainer release. + * The upstream author has fixed the segmentation fault problem! Hurray! + + -- Anthony Fok Tue, 23 Dec 1997 22:16:15 -0700 + +eperl (2.2.8-0.2) unstable; urgency=low + + * Yet another non-maintainer release. :) + * Commented out fclose(fp) at the end of eperl_main.c. This should solve + the segmentation fault problem. Thanks to Tommi Virtanen for pointing + out the solution! :) (Fixes Bug#15818) + * Fixed /usr/doc/eperl/copyright. I failed to mention that ePerl + may be redistributed and/or modified under the terms of either the + Artistic License or the GNU General Public License. + + -- Anthony Fok Mon, 22 Dec 1997 06:46:27 -0700 + +eperl (2.2.8-0.1) unstable; urgency=low + + * New upstream (non-maintainer) release + * Rewrote debian/rules and switched to debhelper (Fixes Bug#14865). + * Now installs the integrated the Perl 5 interface modules "Parse::ePerl" + and "Apache::ePerl". + * debian/control: + - Updated Standards-Version to 2.3.0.1. + - Now Depends on perl (>= 5.004.04-3). + - Revised package Description. + * Revised /usr/doc/eperl/copyright. + * Added README.Debian to explain the current /usr/bin/eperl segmentation + fault problem (Bug#15818). The bug report has been forwarded upstream + earlier today, and we hope to hear from the author soon. + * Other minor changes and fixes here and there. :) + + -- Anthony Fok Mon, 22 Dec 1997 00:26:36 -0700 + +eperl (2.2.5-1.1) unstable; urgency=low + + * Non-maintainer libc6 release. + + -- Joey Hess Sun, 16 Nov 1997 14:22:34 -0500 + +eperl (2.2.5-1) unstable; urgency=low + + * initial release + + -- Heiko Schlittermann Sat, 6 Sep 1997 11:14:58 +0200 + --- eperl-2.2.14.orig/debian/postinst +++ eperl-2.2.14/debian/postinst @@ -0,0 +1,9 @@ +#!/bin/sh -e + +cgi_suid_eperl=/usr/lib/cgi-bin/suideperl + +[ -f $cgi_suid_eperl ] && cp -av /usr/bin/eperl $cgi_suid_eperl + +#DEBHELPER# + +exit 0 --- eperl-2.2.14.orig/etc/newvers +++ eperl-2.2.14/etc/newvers @@ -182,7 +182,7 @@ bplevel=0 ;; esac - date=`date '+%d-%m-19%y'` + date=`date '+%d-%m-%Y'` fi else @@ -191,7 +191,7 @@ revision=5 bptype=b bplevel=0 - date=`date '+%d-%m-19%y'` + date=`date '+%d-%m-%Y'` fi else # take given version @@ -200,7 +200,7 @@ revision=`echo $VERSION | awk -F: '{ print $2 }'` bptype=`echo $VERSION | awk -F: '{ print $3 }'` bplevel=`echo $VERSION | awk -F: '{ print $4 }'` - date=`date '+%d-%m-19%y'` + date=`date '+%d-%m-%Y'` fi if [ $REPORT = YES ]; then @@ -215,7 +215,7 @@ fi # create date string -year=`date '+19%y'` +year=`date '+%Y'` month=`date '+%m'` day=`date '+%d'` --- eperl-2.2.14.orig/etc/asc2c +++ eperl-2.2.14/etc/asc2c @@ -1,4 +1,6 @@ -#!/sw/bin/perl +: +eval 'exec perl -S $0 ${1+"$@"}' + if $running_under_some_shell; ## ## asc2c -- convert an ASCII file into a statically initialised ## C array of characters --- eperl-2.2.14.orig/etc/mkproto +++ eperl-2.2.14/etc/mkproto @@ -1,4 +1,6 @@ -#!/sw/bin/perl +: +eval 'exec perl -S $0 ${1+"$@"}' + if $running_under_some_shell; $header = $ARGV[0]; shift @ARGV; --- eperl-2.2.14.orig/etc/bin2c +++ eperl-2.2.14/etc/bin2c @@ -1,4 +1,6 @@ -#!/sw/bin/perl +: +eval 'exec perl -S $0 ${1+"$@"}' + if $running_under_some_shell; ## ## bin2c -- convert an binary file into a statically initialised ## C array of characters @@ -25,7 +27,7 @@ print OUTC "/* $filein.c -- automatically generated by bin2c */\n"; print OUTC "\n"; print OUTC "int ${name}_size = " . $size . ";\n"; -print OUTC "char ${name}_data[] = {\n"; +print OUTC "unsigned char ${name}_data[] = {\n"; $i = 1; while (read(IN, $c, 1)) { @@ -46,7 +48,7 @@ #print OUTH "#ifndef __$filename\n"; #print OUTH "#define __$filename\n"; #print OUTH "\n"; -#print OUTH "extern char *$name;\n"; +#print OUTH "extern unsigned char *$name;\n"; #print OUTH "\n"; #print OUTH "#endif /* __$filename */\n"; --- eperl-2.2.14.orig/etc/shtool +++ eperl-2.2.14/etc/shtool @@ -0,0 +1,1104 @@ +#!/bin/sh +## +## GNU shtool -- The GNU Portable Shell Tool +## Copyright (c) 1994-2000 Ralf S. Engelschall +## +## See http://www.gnu.org/software/shtool/ for more information. +## See ftp://ftp.gnu.org/gnu/shtool/ for latest version. +## +## Version: 1.5.1 (29-Jul-2000) +## Contents: 5/17 available modules +## + +## +## This program is free software; you can redistribute it and/or modify +## it under the terms of the GNU General Public License as published by +## the Free Software Foundation; either version 2 of the License, or +## (at your option) any later version. +## +## This program is distributed in the hope that it will be useful, +## but WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +## General Public License for more details. +## +## You should have received a copy of the GNU General Public License +## along with this program; if not, write to the Free Software +## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, +## USA, or contact Ralf S. Engelschall . +## +## Notice: Given that you include this file verbatim into your own +## source tree, you are justified in saying that it remains separate +## from your package, and that this way you are simply just using GNU +## shtool. So, in this situation, there is no requirement that your +## package itself is licensed under the GNU General Public License in +## order to take advantage of GNU shtool. +## + +## +## Usage: shtool [] [ [] []] +## +## Available commands: +## echo Print string with optional construct expansion +## install Install a program, script or datafile +## mkdir Make one or more directories +## fixperm Fix file permissions inside a source tree +## version Maintain a version information file +## +## Not available commands (because module was not built-in): +## mdate Pretty-print modification time of a file or dir +## table Pretty-print a field-separated list as a table +## prop Display progress with a running propeller +## move Move files with simultaneous substitution +## mkln Make link with calculation of relative paths +## mkshadow Make a shadow tree through symbolic links +## tarball Roll distribution tarballs +## guessos Simple operating system guesser +## arx Extended archive command +## slo Separate linker options by library class +## scpp Sharing C Pre-Processor +## path Deal with program paths +## + +if [ $# -eq 0 ]; then + echo "$0:Error: invalid command line" 1>&2 + echo "$0:Hint: run \`$0 -h' for usage" 1>&2 + exit 1 +fi +if [ ".$1" = ".-h" -o ".$1" = ".--help" ]; then + echo "This is GNU shtool, version 1.5.1 (29-Jul-2000)" + echo "Copyright (c) 1994-2000 Ralf S. Engelschall " + echo "Report bugs to " + echo '' + echo "Usage: shtool [] [ [] []]" + echo '' + echo 'Available global :' + echo ' -v, --version display shtool version information' + echo ' -h, --help display shtool usage help page (this one)' + echo ' -d, --debug display shell trace information' + echo ' -r, --recreate recreate this shtool script via shtoolize' + echo '' + echo 'Available [] []:' + echo ' echo [-n] [-e] [ ...]' + echo ' install [-v] [-t] [-c] [-C] [-s] [-m] [-o] [-g]' + echo ' [-e] [ ...] ' + echo ' mkdir [-t] [-f] [-p] [-m]

[ ...]' + echo ' fixperm [-v] [-t] [ ...]' + echo ' version [-l] [-n] [-p] [-s] [-e]' + echo ' [-i] [-d] ' + echo '' + echo 'Not available (because module was not built-in):' + echo ' mdate [-n] [-z] [-s] [-d] [-f] [-o] ' + echo ' table [-F] [-w] [-c] [-s] ...' + echo ' prop [-p]' + echo ' move [-v] [-t] [-e] [-p] ' + echo ' mkln [-t] [-f] [-s] [ ...] ' + echo ' mkshadow [-v] [-t] [-a] ' + echo ' tarball [-t] [-v] [-o ] [-c ] [-d ] [-u' + echo ' ] [-g ] [-e ] [ ...]' + echo ' guessos ' + echo ' arx [-t] [-C] [ ...]' + echo ' slo [-p] -- -L -l [-L -l ...]' + echo ' scpp [-v] [-p] [-f] [-o] [-t] [-M]' + echo ' [-D] [-C] [ ...]' + echo ' path [-s] [-r] [-d] [-b] [-m] [-p] [ ...]' + echo '' + exit 0 +fi +if [ ".$1" = ".-v" -o ".$1" = ."--version" ]; then + echo "GNU shtool 1.5.1 (29-Jul-2000)" + exit 0 +fi +if [ ".$1" = ".-r" -o ".$1" = ."--recreate" ]; then + shtoolize -oetc/shtool echo install mkdir fixperm version + exit 0 +fi +if [ ".$1" = ".-d" -o ".$1" = ."--debug" ]; then + shift + set -x +fi +name=`echo "$0" | sed -e 's;.*/\([^/]*\)$;\1;' -e 's;-sh$;;' -e 's;\.sh$;;'` +case "$name" in + echo|install|mkdir|fixperm|version ) + # implicit tool command selection + tool="$name" + ;; + * ) + # explicit tool command selection + tool="$1" + shift + ;; +esac +arg_spec="" +opt_spec="" +gen_tmpfile=no + +## +## DISPATCH INTO SCRIPT PROLOG +## + +case $tool in + echo ) + str_tool="echo" + str_usage="[-n] [-e] [ ...]" + arg_spec="0+" + opt_spec="n.e." + opt_n=no + opt_e=no + ;; + install ) + str_tool="install" + str_usage="[-v] [-t] [-c] [-C] [-s] [-m] [-o] [-g] [-e] [ ...] " + arg_spec="2+" + opt_spec="v.t.c.C.s.m:o:g:e:" + opt_v=no + opt_t=no + opt_c=no + opt_C=no + opt_s=no + opt_m="" + opt_o="" + opt_g="" + opt_e="" + ;; + mkdir ) + str_tool="mkdir" + str_usage="[-t] [-f] [-p] [-m] [ ...]" + arg_spec="1+" + opt_spec="t.f.p.m:" + opt_t=no + opt_f=no + opt_p=no + opt_m="" + ;; + fixperm ) + str_tool="fixperm" + str_usage="[-v] [-t] [ ...]" + arg_spec="1+" + opt_spec="v.t." + opt_v=no + opt_t=no + ;; + version ) + str_tool="version" + str_usage="[-l] [-n] [-p] [-s] [-e] [-i] [-d] " + arg_spec="1=" + opt_spec="l:n:p:s:i:e.d:" + opt_l="txt" + opt_n="unknown" + opt_p="" + opt_s="" + opt_e="no" + opt_i="" + opt_d="short" + ;; + -* ) + echo "$0:Error: unknown option \`$tool'" 2>&1 + echo "$0:Hint: run \`$0 -h' for usage" 2>&1 + exit 1 + ;; + * ) + echo "$0:Error: unknown command \`$tool'" 2>&1 + echo "$0:Hint: run \`$0 -h' for usage" 2>&1 + exit 1 + ;; +esac + +## +## COMMON UTILITY CODE +## + +# determine name of tool +if [ ".$tool" != . ]; then + # used inside shtool script + toolcmd="$0 $tool" + toolcmdhelp="shtool $tool" + msgprefix="shtool:$tool" +else + # used as standalone script + toolcmd="$0" + toolcmdhelp="sh $0" + msgprefix="$str_tool" +fi + +# parse argument specification string +eval `echo $arg_spec |\ + sed -e 's/^\([0-9]*\)\([+=]\)/arg_NUMS=\1; arg_MODE=\2/'` + +# parse option specification string +eval `echo h.$opt_spec |\ + sed -e 's/\([a-zA-Z0-9]\)\([.:+]\)/opt_MODE_\1=\2;/g'` + +# interate over argument line +opt_PREV='' +while [ $# -gt 0 ]; do + # special option stops processing + if [ ".$1" = ".--" ]; then + shift + break + fi + + # determine option and argument + opt_ARG_OK=no + if [ ".$opt_PREV" != . ]; then + # merge previous seen option with argument + opt_OPT="$opt_PREV" + opt_ARG="$1" + opt_ARG_OK=yes + opt_PREV='' + else + # split argument into option and argument + case "$1" in + -[a-zA-Z0-9]*) + eval `echo "x$1" |\ + sed -e 's/^x-\([a-zA-Z0-9]\)/opt_OPT="\1";/' \ + -e 's/";\(.*\)$/"; opt_ARG="\1"/'` + ;; + -[a-zA-Z0-9]) + opt_OPT=`echo "x$1" | cut -c3-` + opt_ARG='' + ;; + *) + break + ;; + esac + fi + + # eat up option + shift + + # determine whether option needs an argument + eval "opt_MODE=\$opt_MODE_${opt_OPT}" + if [ ".$opt_ARG" = . -a ".$opt_ARG_OK" != .yes ]; then + if [ ".$opt_MODE" = ".:" -o ".$opt_MODE" = ".+" ]; then + opt_PREV="$opt_OPT" + continue + fi + fi + + # process option + case $opt_MODE in + '.' ) + # boolean option + eval "opt_${opt_OPT}=yes" + ;; + ':' ) + # option with argument (multiple occurances override) + eval "opt_${opt_OPT}=\"\$opt_ARG\"" + ;; + '+' ) + # option with argument (multiple occurances append) + eval "opt_${opt_OPT}=\"\$opt_${opt_OPT} \$opt_ARG\"" + ;; + * ) + echo "$msgprefix:Error: unknown option: \`-$opt_OPT'" 1>&2 + echo "$msgprefix:Hint: run \`$toolcmdhelp -h' or \`man shtool' for details" 1>&2 + exit 1 + ;; + esac +done +if [ ".$opt_PREV" != . ]; then + echo "$msgprefix:Error: missing argument to option \`-$opt_PREV'" 1>&2 + echo "$msgprefix:Hint: run \`$toolcmdhelp -h' or \`man shtool' for details" 1>&2 + exit 1 +fi + +# process help option +if [ ".$opt_h" = .yes ]; then + echo "Usage: $toolcmdhelp $str_usage" + exit 0 +fi + +# complain about incorrect number of arguments +case $arg_MODE in + '=' ) + if [ $# -ne $arg_NUMS ]; then + echo "$msgprefix:Error: invalid number of arguments (exactly $arg_NUMS expected)" 1>&2 + echo "$msgprefix:Hint: run \`$toolcmd -h' or \`man shtool' for details" 1>&2 + exit 1 + fi + ;; + '+' ) + if [ $# -lt $arg_NUMS ]; then + echo "$msgprefix:Error: invalid number of arguments (at least $arg_NUMS expected)" 1>&2 + echo "$msgprefix:Hint: run \`$toolcmd -h' or \`man shtool' for details" 1>&2 + exit 1 + fi + ;; +esac + +# establish a temporary file on request +if [ ".$gen_tmpfile" = .yes ]; then + if [ ".$TMPDIR" != . ]; then + tmpdir="$TMPDIR" + elif [ ".$TEMPDIR" != . ]; then + tmpdir="$TEMPDIR" + else + tmpdir="/tmp" + fi + tmpfile="$tmpdir/.shtool.$$" + rm -f $tmpfile >/dev/null 2>&1 + touch $tmpfile +fi + +## +## DISPATCH INTO SCRIPT BODY +## + +case $tool in + +echo ) + ## + ## echo -- Print string with optional construct expansion + ## Copyright (c) 1998-2000 Ralf S. Engelschall + ## Originally written for WML as buildinfo + ## + + text="$*" + + # check for broken escape sequence expansion + seo='' + bytes=`echo '\1' | wc -c | awk '{ printf("%s", $1); }'` + if [ ".$bytes" != .3 ]; then + bytes=`echo -E '\1' | wc -c | awk '{ printf("%s", $1); }'` + if [ ".$bytes" = .3 ]; then + seo='-E' + fi + fi + + # check for existing -n option (to suppress newline) + minusn='' + bytes=`echo -n 123 2>/dev/null | wc -c | awk '{ printf("%s", $1); }'` + if [ ".$bytes" = .3 ]; then + minusn='-n' + fi + + # determine terminal bold sequence + term_bold='' + term_norm='' + if [ ".$opt_e" = .yes -a ".`echo $text | egrep '%[Bb]'`" != . ]; then + case $TERM in + # for the most important terminal types we directly know the sequences + xterm|xterm*|vt220|vt220*) + term_bold=`awk 'BEGIN { printf("%c%c%c%c", 27, 91, 49, 109); }' /dev/null` + term_norm=`awk 'BEGIN { printf("%c%c%c", 27, 91, 109); }' /dev/null` + ;; + vt100|vt100*) + term_bold=`awk 'BEGIN { printf("%c%c%c%c%c%c", 27, 91, 49, 109, 0, 0); }' /dev/null` + term_norm=`awk 'BEGIN { printf("%c%c%c%c%c", 27, 91, 109, 0, 0); }' /dev/null` + ;; + # for all others, we try to use a possibly existing `tput' or `tcout' utility + * ) + paths=`echo $PATH | sed -e 's/:/ /g'` + for tool in tput tcout; do + for dir in $paths; do + if [ -r "$dir/$tool" ]; then + for seq in bold md smso; do # 'smso' is last + bold="`$dir/$tool $seq 2>/dev/null`" + if [ ".$bold" != . ]; then + term_bold="$bold" + break + fi + done + if [ ".$term_bold" != . ]; then + for seq in sgr0 me rmso reset; do # 'reset' is last + norm="`$dir/$tool $seq 2>/dev/null`" + if [ ".$norm" != . ]; then + term_norm="$norm" + break + fi + done + fi + break + fi + done + if [ ".$term_bold" != . -a ".$term_norm" != . ]; then + break; + fi + done + ;; + esac + if [ ".$term_bold" = . -o ".$term_norm" = . ]; then + echo "$msgprefix:Warning: unable to determine terminal sequence for bold mode" 1>&2 + fi + fi + + # determine user name + username='' + if [ ".$opt_e" = .yes -a ".`echo $text | egrep '%[uU]'`" != . ]; then + username="$LOGNAME" + if [ ".$username" = . ]; then + username="$USER" + if [ ".$username" = . ]; then + username="`(whoami) 2>/dev/null |\ + awk '{ printf("%s", $1); }'`" + if [ ".$username" = . ]; then + username="`(who am i) 2>/dev/null |\ + awk '{ printf("%s", $1); }'`" + if [ ".$username" = . ]; then + username='unknown' + fi + fi + fi + fi + fi + + # determine user id + userid='' + if [ ".$opt_e" = .yes -a ".`echo $text | egrep '%U'`" != . ]; then + userid="`(id -u) 2>/dev/null`" + if [ ".$userid" = . ]; then + str="`(id) 2>/dev/null`" + if [ ".`echo $str | grep '^uid[ ]*=[ ]*[0-9]*('`" != . ]; then + userid=`echo $str | sed -e 's/^uid[ ]*=[ ]*//' -e 's/(.*//'` + fi + if [ ".$userid" = . ]; then + userid=`egrep "^${username}:" /etc/passwd 2>/dev/null | \ + sed -e 's/[^:]*:[^:]*://' -e 's/:.*$//'` + if [ ".$userid" = . ]; then + userid=`(ypcat passwd) 2>/dev/null | + egrep "^${username}:" | \ + sed -e 's/[^:]*:[^:]*://' -e 's/:.*$//'` + if [ ".$userid" = . ]; then + userid='?' + fi + fi + fi + fi + fi + + # determine host name + hostname='' + if [ ".$opt_e" = .yes -a ".`echo $text | egrep '%h'`" != . ]; then + hostname="`(uname -n) 2>/dev/null |\ + awk '{ printf("%s", $1); }'`" + if [ ".$hostname" = . ]; then + hostname="`(hostname) 2>/dev/null |\ + awk '{ printf("%s", $1); }'`" + if [ ".$hostname" = . ]; then + hostname='unknown' + fi + fi + case $hostname in + *.* ) + domainname=".`echo $hostname | cut -d. -f2-`" + hostname="`echo $hostname | cut -d. -f1`" + ;; + esac + fi + + # determine domain name + domainname='' + if [ ".$opt_e" = .yes -a ".`echo $text | egrep '%d'`" != . ]; then + if [ ".$domainname" = . ]; then + if [ -f /etc/resolv.conf ]; then + domainname="`egrep '^[ ]*domain' /etc/resolv.conf | head -1 |\ + sed -e 's/.*domain//' \ + -e 's/^[ ]*//' -e 's/^ *//' -e 's/^ *//' \ + -e 's/^\.//' -e 's/^/./' |\ + awk '{ printf("%s", $1); }'`" + if [ ".$domainname" = . ]; then + domainname="`egrep '^[ ]*search' /etc/resolv.conf | head -1 |\ + sed -e 's/.*search//' \ + -e 's/^[ ]*//' -e 's/^ *//' -e 's/^ *//' \ + -e 's/ .*//' -e 's/ .*//' \ + -e 's/^\.//' -e 's/^/./' |\ + awk '{ printf("%s", $1); }'`" + fi + fi + fi + fi + + # determine current time + time_day='' + time_month='' + time_year='' + time_monthname='' + if [ ".$opt_e" = .yes -a ".`echo $text | egrep '%[DMYm]'`" != . ]; then + time_day=`date '+%d'` + time_month=`date '+%m'` + time_year=`date '+%Y' 2>/dev/null` + if [ ".$time_year" = . ]; then + time_year=`date '+%y'` + case $time_year in + [5-9][0-9]) time_year="19$time_year" ;; + [0-4][0-9]) time_year="20$time_year" ;; + esac + fi + case $time_month in + 1|01) time_monthname='Jan' ;; + 2|02) time_monthname='Feb' ;; + 3|03) time_monthname='Mar' ;; + 4|04) time_monthname='Apr' ;; + 5|05) time_monthname='May' ;; + 6|06) time_monthname='Jun' ;; + 7|07) time_monthname='Jul' ;; + 8|08) time_monthname='Aug' ;; + 9|09) time_monthname='Sep' ;; + 10) time_monthname='Oct' ;; + 11) time_monthname='Nov' ;; + 12) time_monthname='Dec' ;; + esac + fi + + # expand special ``%x'' constructs + if [ ".$opt_e" = .yes ]; then + text=`echo $seo "$text" |\ + sed -e "s/%B/${term_bold}/g" \ + -e "s/%b/${term_norm}/g" \ + -e "s/%u/${username}/g" \ + -e "s/%U/${userid}/g" \ + -e "s/%h/${hostname}/g" \ + -e "s/%d/${domainname}/g" \ + -e "s/%D/${time_day}/g" \ + -e "s/%M/${time_month}/g" \ + -e "s/%Y/${time_year}/g" \ + -e "s/%m/${time_monthname}/g" 2>/dev/null` + fi + + # create output + if [ .$opt_n = .no ]; then + echo $seo "$text" + else + # the harder part: echo -n is best, because + # awk may complain about some \xx sequences. + if [ ".$minusn" != . ]; then + echo $seo $minusn "$text" + else + echo dummy | awk '{ printf("%s", TEXT); }' TEXT="$text" + fi + fi + ;; + +install ) + ## + ## install -- Install a program, script or datafile + ## Copyright (c) 1997-2000 Ralf S. Engelschall + ## Originally written for shtool + ## + + # determine source(s) and destination + argc=$# + srcs="" + while [ $# -gt 1 ]; do + srcs="$srcs $1" + shift + done + dstpath="$1" + + # type check for destination + dstisdir=0 + if [ -d $dstpath ]; then + dstpath=`echo "$dstpath" | sed -e 's:/$::'` + dstisdir=1 + fi + + # consistency check for destination + if [ $argc -gt 2 -a $dstisdir = 0 ]; then + echo "$msgprefix:Error: multiple sources require destination to be directory" 1>&2 + exit 1 + fi + + # iterate over all source(s) + for src in $srcs; do + dst=$dstpath + + # If destination is a directory, append the input filename + if [ $dstisdir = 1 ]; then + dstfile=`echo "$src" | sed -e 's;.*/\([^/]*\)$;\1;'` + dst="$dst/$dstfile" + fi + + # Add a possible extension to src and dst + if [ ".$opt_e" != . ]; then + src="$src$opt_e" + dst="$dst$opt_e" + fi + + # Check for correct arguments + if [ ".$src" = ".$dst" ]; then + echo "$msgprefix:Warning: source and destination are the same - skipped" 1>&2 + continue + fi + if [ -d "$src" ]; then + echo "$msgprefix:Warning: source \`$src' is a directory - skipped" 1>&2 + continue + fi + + # Make a temp file name in the destination directory + dsttmp=`echo $dst |\ + sed -e 's;[^/]*$;;' -e 's;\(.\)/$;\1;' -e 's;^$;.;' \ + -e "s;\$;/#INST@$$#;"` + + # Verbosity + if [ ".$opt_v" = .yes ]; then + echo "$src -> $dst" 1>&2 + fi + + # Copy or move the file name to the temp name + # (because we might be not allowed to change the source) + if [ ".$opt_C" = .yes ]; then + opt_c=yes + fi + if [ ".$opt_c" = .yes ]; then + if [ ".$opt_t" = .yes ]; then + echo "cp $src $dsttmp" 1>&2 + fi + cp $src $dsttmp || exit $? + else + if [ ".$opt_t" = .yes ]; then + echo "mv $src $dsttmp" 1>&2 + fi + mv $src $dsttmp || exit $? + fi + + # Adjust the target file + # (we do chmod last to preserve setuid bits) + if [ ".$opt_s" = .yes ]; then + if [ ".$opt_t" = .yes ]; then + echo "strip $dsttmp" 1>&2 + fi + strip $dsttmp || exit $? + fi + if [ ".$opt_o" != . ]; then + if [ ".$opt_t" = .yes ]; then + echo "chown $opt_o $dsttmp" 1>&2 + fi + chown $opt_o $dsttmp || exit $? + fi + if [ ".$opt_g" != . ]; then + if [ ".$opt_t" = .yes ]; then + echo "chgrp $opt_g $dsttmp" 1>&2 + fi + chgrp $opt_g $dsttmp || exit $? + fi + if [ ".$opt_m" != . ]; then + if [ ".$opt_t" = .yes ]; then + echo "chmod $opt_m $dsttmp" 1>&2 + fi + chmod $opt_m $dsttmp || exit $? + fi + + # Determine whether to do a quick install + # (has to be done _after_ the strip was already done) + quick=no + if [ ".$opt_C" = .yes ]; then + if [ -r $dst ]; then + if cmp -s $src $dst; then + quick=yes + fi + fi + fi + + # Finally install the file to the real destination + if [ $quick = yes ]; then + if [ ".$opt_t" = .yes ]; then + echo "rm -f $dsttmp" 1>&2 + fi + rm -f $dsttmp + else + if [ ".$opt_t" = .yes ]; then + echo "rm -f $dst && mv $dsttmp $dst" 1>&2 + fi + rm -f $dst && mv $dsttmp $dst + fi + done + ;; + +mkdir ) + ## + ## mkdir -- Make one or more directories + ## Copyright (c) 1996-2000 Ralf S. Engelschall + ## Originally written for public domain by Noah Friedman + ## Cleaned up and enhanced for shtool + ## + + errstatus=0 + for p in ${1+"$@"}; do + # if the directory already exists... + if [ -d "$p" ]; then + if [ ".$opt_f" = .no ] && [ ".$opt_p" = .no ]; then + echo "$msgprefix:Error: directory already exists: $p" 1>&2 + errstatus=1 + break + else + continue + fi + fi + # if the directory has to be created... + if [ ".$opt_p" = .no ]; then + if [ ".$opt_t" = .yes ]; then + echo "mkdir $p" 1>&2 + fi + mkdir $p || errstatus=$? + else + # the smart situation + set fnord `echo ":$p" |\ + sed -e 's/^:\//%/' \ + -e 's/^://' \ + -e 's/\// /g' \ + -e 's/^%/\//'` + shift + pathcomp='' + for d in ${1+"$@"}; do + pathcomp="$pathcomp$d" + case "$pathcomp" in + -* ) pathcomp="./$pathcomp" ;; + esac + if [ ! -d "$pathcomp" ]; then + if [ ".$opt_t" = .yes ]; then + echo "mkdir $pathcomp" 1>&2 + fi + mkdir $pathcomp || errstatus=$? + if [ ".$opt_m" != . ]; then + if [ ".$opt_t" = .yes ]; then + echo "chmod $opt_m $pathcomp" 1>&2 + fi + chmod $opt_m $pathcomp || errstatus=$? + fi + fi + pathcomp="$pathcomp/" + done + fi + done + exit $errstatus + ;; + +fixperm ) + ## + ## fixperm -- Fix file permissions inside a source tree + ## Copyright (c) 1996-2000 Ralf S. Engelschall + ## Originally written for ePerl + ## + + paths="$*" + + # check whether the test command supports the -x option + if [ -x /bin/sh ] 2>/dev/null; then + minusx="-x" + else + minusx="-r" + fi + + # iterate over paths + for p in $paths; do + for file in `find $p -depth -print`; do + if [ -f $file ]; then + if [ $minusx $file ]; then + if [ ".$opt_v" = .yes ]; then + echo "-rwxrwxr-x $file" 2>&1 + fi + if [ ".$opt_t" = .yes ]; then + echo "chmod 775 $file" 2>&1 + fi + chmod 775 $file + else + if [ ".$opt_v" = .yes ]; then + echo "-rw-rw-r-- $file" 2>&1 + fi + if [ ".$opt_t" = .yes ]; then + echo "chmod 664 $file" 2>&1 + fi + chmod 664 $file + fi + continue + fi + if [ -d $file ]; then + if [ ".$opt_v" = .yes ]; then + echo "drwxrwxr-x $file" 2>&1 + fi + if [ ".$opt_t" = .yes ]; then + echo "chmod 775 $file" 2>&1 + fi + chmod 775 $file + continue + fi + if [ ".$opt_v" = .yes ]; then + echo "?????????? $file" 2>&1 + fi + done + done + ;; + +version ) + ## + ## version -- Maintain a version information file + ## Copyright (c) 1994-2000 Ralf S. Engelschall + ## Originally written for ePerl, rewritten from scratch for shtool + ## + + file="$1" + + # determine prefix and name + name="$opt_n" + prefix="$opt_p" + + # determine current version + triple="$opt_s" + if [ ".$triple" != . ]; then + # use given triple + if [ ".`echo $triple | grep '[0-9]*.[0-9]*[sabp.][0-9]*'`" = . ]; then + echo "$msgprefix:Error: invalid argument to option \`-s': \`$opt_s'" 1>&2 + exit 1 + fi + eval `echo $triple |\ + sed -e 's%\([0-9]*\)\.\([0-9]*\)\([sabp.]\)\([0-9]*\).*%\ + ver="\1";rev="\2";typ="\3";lev="\4"%'` + tim=calc + elif [ -r $file ]; then + # determine triple from given file + eval `grep 'Version [0-9]*.[0-9]*[sabp.][0-9]* ([0-9]*-[a-zA-Z]*-[0-9]*)' $file |\ + head -1 | sed -e 's%.*Version \([0-9]*\)\.\([0-9]*\)\([sabp.]\)\([0-9]*\) (\([0-9]*-[a-zA-Z]*-[0-9]*\)).*%\ + ver="\1";rev="\2";typ="\3";lev="\4";tim="\5"%'` + else + # intialise to first version + ver=0 + rev=1 + typ=. + lev=0 + tim=calc + fi + + # determine new version in batch + if [ ".$opt_i" != . ]; then + case $opt_i in + v ) ver=`expr $ver + 1` + rev=0 + lev=0 + ;; + r ) rev=`expr $rev + 1` + lev=0 + ;; + l ) lev=`expr $lev + 1` + ;; + * ) echo "$msgprefix:Error: invalid argument to option \`-i': \`$opt_i'" 1>&2 + exit 1 + ;; + esac + tim=calc + fi + + # determine new version interactively + if [ ".$opt_e" = .yes ]; then + echo "old version: ${ver}.${rev}${typ}${lev}" + while [ 1 ]; do + echo dummy | awk '{ printf("new version: "); }' + read triple + case $triple in + [0-9]*.[0-9]*[sabp.][0-9]* ) + ;; + * ) echo "$msgprefix:Error: invalid version string entered: \`$triple'" 1>&2 + continue + ;; + esac + break + done + eval `echo $triple |\ + sed -e 's%^\([0-9]*\)\.\([0-9]*\)\([sabp.]\)\([0-9]*\)$%\ + ver="\1";rev="\2";typ="\3";lev="\4"%'` + tim=calc + fi + + # determine hexadecimal and libtool value of version + case $typ in + a ) typnum=0; levnum=$lev ;; + b ) typnum=1; levnum=$lev ;; + p | . ) typnum=2; levnum=$lev ;; + s ) typnum=15; levnum=255 ;; # snapshots are special + esac + hex=`echo "$ver:$rev:$typnum:$levnum" |\ + awk -F: '{ printf("0x%x%02x%1x%02x", $1, $2, $3, $4); }' |\ + tr 'abcdef' 'ABCDEF'` + ltv=`echo "$ver:$rev:$typnum:$levnum" |\ + awk -F: '{ printf("%d:%d", $1*10 + $2, $3*10 + $4); }'` + + # determine date + if [ ".$tim" = .calc ]; then + day=`date '+%d'` + month=`date '+%m'` + year=`date '+%Y' 2>/dev/null` + if [ ".$time_year" = . ]; then + year=`date '+%y'` + case $year in + [5-9][0-9]) year="19$year" ;; + [0-4][0-9]) year="20$year" ;; + esac + fi + case $month in + 1|01) month='Jan' ;; + 2|02) month='Feb' ;; + 3|03) month='Mar' ;; + 4|04) month='Apr' ;; + 5|05) month='May' ;; + 6|06) month='Jun' ;; + 7|07) month='Jul' ;; + 8|08) month='Aug' ;; + 9|09) month='Sep' ;; + 10) month='Oct' ;; + 11) month='Nov' ;; + 12) month='Dec' ;; + esac + tim="${day}-${month}-${year}" + fi + + # perform result actions + mode=show + if [ ".$opt_i" != . ]; then + mode=edit + elif [ ".$opt_e" = .yes ]; then + mode=edit + elif [ ".$opt_s" != . ]; then + mode=edit + fi + if [ ".$mode" = .show ]; then + # just display the current version + case $opt_d in + short ) + echo "${ver}.${rev}${typ}${lev}" + ;; + long ) + echo "${ver}.${rev}${typ}${lev} ($tim)" + ;; + libtool ) + echo "${ltv}" + ;; + hex ) + echo "${hex}" + ;; + * ) echo "$msgprefix:Error: invalid argument to option \`-d': \`$opt_d'" 1>&2 + exit 1 + ;; + esac + else + # update the version file + + # pre-generate various strings + triple="${ver}.${rev}${typ}${lev}" + vHex="$hex" + vShort="${triple}" + vLong="${triple} (${tim})" + vTeX="This is ${name}, Version ${triple} (${tim})" + vGNU="${name} ${triple} (${tim})" + vWeb="${name}/${triple}" + vSCCS="@(#)${name} ${triple} (${tim})" + vRCS="\$Id: ${name} ${triple} (${tim}) \$" + + # determine string out of filename + # (do NOT try to optimize this in any way because of portability) + filestr=`echo $file |\ + tr 'abcdefghijklmnopqrstuvwxyz./%+' \ + 'ABCDEFGHIJKLMNOPQRSTUVWXYZ____' | sed -e 's/-/_/g'` + + # generate uppercase prefix + prefixupper=`echo $prefix |\ + tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + + # create the version file according the the selected language + echo "new version: ${vLong}" + + cp /dev/null $file + case $opt_l in + txt ) + echo >>$file "" + echo >>$file " ${file} -- Version Information for ${name} (syntax: Text)" + echo >>$file " [automatically generated and maintained by GNU shtool]" + echo >>$file "" + echo >>$file " $vTeX" + echo >>$file "" + ;; + c ) + echo >>$file "/*" + echo >>$file "** ${file} -- Version Information for ${name} (syntax: C/C++)" + echo >>$file "** [automatically generated and maintained by GNU shtool]" + echo >>$file "*/" + echo >>$file "" + echo >>$file "#ifdef _${filestr}_AS_HEADER_" + echo >>$file "" + echo >>$file "#ifndef _${filestr}_" + echo >>$file "#define _${filestr}_" + echo >>$file "" + echo >>$file "#define ${prefixupper}VERSION ${vHex}" + echo >>$file "" + echo >>$file "typedef struct {" + echo >>$file " const int v_hex;" + echo >>$file " const char *v_short;" + echo >>$file " const char *v_long;" + echo >>$file " const char *v_tex;" + echo >>$file " const char *v_gnu;" + echo >>$file " const char *v_web;" + echo >>$file " const char *v_sccs;" + echo >>$file " const char *v_rcs;" + echo >>$file "} ${prefix}version_t;" + echo >>$file "" + echo >>$file "extern ${prefix}version_t ${prefix}version;" + echo >>$file "" + echo >>$file "#endif /* _${filestr}_ */" + echo >>$file "" + echo >>$file "#else /* _${filestr}_AS_HEADER_ */" + echo >>$file "" + echo >>$file "#define _${filestr}_AS_HEADER_" + echo >>$file "#include \"${file}\"" + echo >>$file "#undef _${filestr}_AS_HEADER_" + echo >>$file "" + echo >>$file "${prefix}version_t ${prefix}version = {" + echo >>$file " ${vHex}," + echo >>$file " \"${vShort}\"," + echo >>$file " \"${vLong}\"," + echo >>$file " \"${vTeX}\"," + echo >>$file " \"${vGNU}\"," + echo >>$file " \"${vWeb}\"," + echo >>$file " \"${vSCCS}\"," + echo >>$file " \"${vRCS}\"" + echo >>$file "};" + echo >>$file "" + echo >>$file "#endif /* _${filestr}_AS_HEADER_ */" + echo >>$file "" + ;; + perl ) + echo >>$file "##" + echo >>$file "## ${file} -- Version Information for ${name} (syntax: Perl)" + echo >>$file "## [automatically generated and maintained by GNU shtool]" + echo >>$file "##" + echo >>$file "" + echo >>$file "my \$${prefix}version = {" + echo >>$file " 'v_hex' => ${vHex}," + echo >>$file " 'v_short' => \"${vShort}\"," + echo >>$file " 'v_long' => \"${vLong}\"," + echo >>$file " 'v_tex' => \"${vTeX}\"," + echo >>$file " 'v_gnu' => \"${vGNU}\"," + echo >>$file " 'v_web' => \"${vWeb}\"," + echo >>$file " 'v_sccs' => \"${vSCCS}\"," + echo >>$file " 'v_rcs' => \"\\${vRCS}/\"" + echo >>$file "};" + echo >>$file "" + echo >>$file "1;" + echo >>$file "" + ;; + python ) + echo >>$file "##" + echo >>$file "## ${file} -- Version Information for ${name} (syntax: Python)" + echo >>$file "## [automatically generated and maintained by GNU shtool]" + echo >>$file "##" + echo >>$file "" + echo >>$file "class ${prefix}version:" + echo >>$file " v_hex = ${vHex}" + echo >>$file " v_short = \"${vShort}\"" + echo >>$file " v_long = \"${vLong}\"" + echo >>$file " v_tex = \"${vTeX}\"" + echo >>$file " v_gnu = \"${vGNU}\"" + echo >>$file " v_web = \"${vWeb}\"" + echo >>$file " v_sccs = \"${vSCCS}\"" + echo >>$file " v_rcs = \"${vRCS}\"" + echo >>$file "" + ;; + * ) echo "$msgprefix:Error: invalid argument to option \`-l': \`$opt_l'" 1>&2 + exit 1 + ;; + esac + fi + ;; + +esac + +exit 0 + +##EOF## --- eperl-2.2.14.orig/mod/Parse/ePerl.pm +++ eperl-2.2.14/mod/Parse/ePerl.pm @@ -87,6 +87,8 @@ # set defaults $p->{INC} ||= [ '.' ]; + $p->{BeginDelimiter} ||= '<:'; + $p->{EndDelimiter} ||= ':>'; # switch to directory of file if ($p->{Cwd}) { @@ -98,7 +100,9 @@ # use XS part: PP (preprocessor) $result = PP( $p->{Script}, - $p->{INC} + $p->{INC}, + $p->{BeginDelimiter}, + $p->{EndDelimiter} ); # restore Cwd @@ -397,6 +401,14 @@ Reference to scalar receiving the resulting script in bristled Perl format. +=item I + +Scalar specifying the begin delimiter. Default is ``C:>''. + +=item I + +Scalar specifying the end delimiter. Default is ``C<:E>''. + =item I A reference to a list specifying include directories. Default is C<\@INC>. --- eperl-2.2.14.orig/mod/Parse/ePerl.xs +++ eperl-2.2.14/mod/Parse/ePerl.xs @@ -88,10 +88,12 @@ ## $buffer = Parse::ePerl::PP($buffer, \@INC); ## void -PP(cpIn, avpsvpINC) +PP(cpIn, avpsvpINC, cpBegin = "<:", cpEnd = ":>") char *cpIn; + char *cpBegin; + char *cpEnd; SV *avpsvpINC; -PROTOTYPE: $$ +PROTOTYPE: $$;$$ PPCODE: { SV *sv; @@ -103,6 +105,9 @@ int i; STRLEN l; + ePerl_begin_delimiter = cpBegin; + ePerl_end_delimiter = cpEnd; + if (!SvROK(avpsvpINC)) croak("arg2 is not of reference type"); sv = SvRV(avpsvpINC); --- eperl-2.2.14.orig/mod/Apache/ePerl.pm +++ eperl-2.2.14/mod/Apache/ePerl.pm @@ -127,8 +127,8 @@ 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec' ); my ($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst) = localtime($time); - my ($str) = sprintf("%s %s %2d %02d:%02d:%02d 19%s%s", - $dow[$wday], $moy[$mon], $mday, $hour, $min, $sec, $year, + my ($str) = sprintf("%s %s %2d %02d:%02d:%02d %s%s", + $dow[$wday], $moy[$mon], $mday, $hour, $min, $sec, $year+1900, $isdst ? " DST" : ""); return $str; } @@ -136,8 +136,8 @@ my ($time) = @_; my ($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst) = localtime($time); - my ($str) = sprintf("%02d-%02d-19%02d %02d:%02d", - $mday, $mon+1, $year, $hour, $min); + my ($str) = sprintf("%02d-%02d-%04d %02d:%02d", + $mday, $mon+1, $year+1900, $hour, $min); return $str; } @@ -181,12 +181,43 @@ $mtime = $S[9]; $owner = (getpwuid($S[4]))[0] || 'UNKNOWN'; + my $uri = $r->uri; + # turn into a package name, borrowed from great Apache::Registry + $r->log_error(sprintf "Apache::ePerl::handler examining %s", + $uri) if $Debug; + my $path_info = $r->path_info; + my $script_name = $path_info && $uri =~ /\Q$path_info\E$/ ? + substr($uri, 0, length($uri)-length($path_info)) : + $uri; + + $script_name =~ s:/+$:/__INDEX__:; + + if ($Apache::ePerl::NameWithVirtualHost && $r->server->is_virtual) { + my $name = $r->get_server_name; + $script_name = join "", $name, $script_name if $name; + } + + # Escape everything into valid perl identifiers + $script_name =~ s/([^A-Za-z0-9_\/])/sprintf("_%2x",unpack("C",$1))/eg; + + # second pass cares for slashes and words starting with a digit + $script_name =~ s{ + (/+) # directory + (\d?) # package's first character + }[ + "::" . (length $2 ? sprintf("_%2x",unpack("C",$2)) : "") + ]egx; + + my $package = "Apache::EPERLCACHE$script_name"; + $r->log_error("Apache::ePerl::handler package $package") + if $Debug; + # check cache for existing P-code - if (not ( $Cache->{$filename} - and $Cache->{$filename}->{CODE} - and $Cache->{$filename}->{SIZE} == $size - and $Cache->{$filename}->{MTIME} == $mtime - and $Cache->{$filename}->{OWNER} eq $owner)) { + if (not ( $Cache->{$package} + and $Cache->{$package}->{CODE} + and $Cache->{$package}->{SIZE} == $size + and $Cache->{$package}->{MTIME} == $mtime + and $Cache->{$package}->{OWNER} eq $owner)) { # read script local ($/) = undef; $fh = new FileHandle $filename; @@ -219,6 +250,14 @@ return OK; } + $data = join( + '', + 'package ', + $package, + ';use Apache qw(exit);', + $data + ); + # precompile the source into P-code $error = ''; if (not Parse::ePerl::Precompile({ @@ -234,15 +273,15 @@ } # set the new results - $Cache->{$filename} = {}; - $Cache->{$filename}->{CODE} = $data; - $Cache->{$filename}->{SIZE} = $size; - $Cache->{$filename}->{MTIME} = $mtime; - $Cache->{$filename}->{OWNER} = $owner; + $Cache->{$package} = {}; + $Cache->{$package}->{CODE} = $data; + $Cache->{$package}->{SIZE} = $size; + $Cache->{$package}->{MTIME} = $mtime; + $Cache->{$package}->{OWNER} = $owner; } # retrieve precompiled script from cache - $data = $Cache->{$filename}->{CODE}; + $data = $Cache->{$package}->{CODE}; # create runtime environment %env = $r->cgi_env; --- eperl-2.2.14.orig/t/05-mode_nphcgi.t +++ eperl-2.2.14/t/05-mode_nphcgi.t @@ -13,13 +13,13 @@ ); $testfile1b = &TEST::tmpfile(<<"EOT" -HTTP/1.0 200 OK -Server: XXXX -Date: XXXX -Connection: close -Content-Type: text/html -Content-Length: 27 - +HTTP/1.0 200 OK\r +Server: XXXX\r +Date: XXXX\r +Connection: close\r +Content-Type: text/html\r +Content-Length: 27\r +\r some stuff some more stuff EOT @@ -31,13 +31,13 @@ EOT ); $testfile3 = &TEST::tmpfile(<<"EOT" -HTTP/1.0 200 OK -Server: XXXX -Date: XXXX -Connection: close -Content-Type: text/html -Content-Length: 35 - +HTTP/1.0 200 OK\r +Server: XXXX\r +Date: XXXX\r +Connection: close\r +Content-Type: text/html\r +Content-Length: 35\r +\r some stuff foo bar some more stuff @@ -46,14 +46,14 @@ # test for working forced NPH-CGI mode $tempfile1 = &TEST::tmpfile; -$rc = &TEST::system("../eperl -m n $testfile1 | sed -e 's/^Server:.*/Server: XXXX/' -e 's/^Date:.*/Date: XXXX/' >$tempfile1"); +$rc = &TEST::system("../eperl -m n $testfile1 | sed -e 's/^Server:.* /Server: XXXX /' -e 's/^Date:.* /Date: XXXX /' >$tempfile1"); print ($rc == 0 ? "ok\n" : "not ok\n"); $rc = &TEST::system("cmp $testfile1b $tempfile1"); print ($rc == 0 ? "ok\n" : "not ok\n"); # test for working implicit CGI mode $tempfile2 = &TEST::tmpfile; -$rc = &TEST::system("PATH_TRANSLATED=$testfile1; export PATH_TRANSLATED; GATEWAY_INTERFACE=CGI/1.1; export GATEWAY_INTERFACE; ../eperl -m n | sed -e 's/^Server:.*/Server: XXXX/' -e 's/^Date:.*/Date: XXXX/' >$tempfile2"); +$rc = &TEST::system("PATH_TRANSLATED=$testfile1; export PATH_TRANSLATED; GATEWAY_INTERFACE=CGI/1.1; export GATEWAY_INTERFACE; ../eperl -m n | sed -e 's/^Server:.* /Server: XXXX /' -e 's/^Date:.* /Date: XXXX /' >$tempfile2"); print ($rc == 0 ? "ok\n" : "not ok\n"); $rc = &TEST::system("cmp $testfile1b $tempfile2"); print ($rc == 0 ? "ok\n" : "not ok\n"); @@ -64,7 +64,7 @@ # test if filter mode actually works for embedded Perl 5 blocks $tempfile3 = &TEST::tmpfile; -&TEST::system("../eperl -m n $testfile2 | sed -e 's/^Server:.*/Server: XXXX/' -e 's/^Date:.*/Date: XXXX/' >$tempfile3"); +&TEST::system("../eperl -m n $testfile2 | sed -e 's/^Server:.* /Server: XXXX /' -e 's/^Date:.* /Date: XXXX /' >$tempfile3"); $rc = &TEST::system("cmp $tempfile3 $testfile3"); print ($rc == 0 ? "ok\n" : "not ok\n"); --- eperl-2.2.14.orig/eg/demo.func.phtml +++ eperl-2.2.14/eg/demo.func.phtml @@ -22,8 +22,8 @@ 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec' ); my ($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst) = localtime($time); - my ($str) = sprintf("%s %s %2d %02d:%02d:%02d 19%s%s", - $dow[$wday], $moy[$mon], $mday, $hour, $min, $sec, $year, + my ($str) = sprintf("%s %s %2d %02d:%02d:%02d %s%s", + $dow[$wday], $moy[$mon], $mday, $hour, $min, $sec, $year+1900, $isdst ? " DST" : ""); return $str; }