#! /bin/sh # configure - configuration script for retawq 0.2.6b # # This configuration script file has been auto-generated by # itchconfig 0.0.4 . # Copyright (C) 2002 Arne Thomassen # This configuration script file is free software WITHOUT ANY WARRANTY; # you are given unlimited permission to copy, distribute and modify this file, # as long as this notice is kept intact and you indicate file modifications. exec 5>/dev/null if test -n "${ZSH_VERSION+set}" && (emulate sh) >&5 2>&1; then emulate sh NULLCMD=: elif test -n "${BASH_VERSION+set}" && (set -o posix) >&5 2>&1; then set -o posix fi ic_nl=' ' IFS=" $ic_nl" export IFS if (FOO=FOO; unset FOO) >&5 2>&1; then ic_unset=unset else ic_unset=false fi $ic_unset ENV MAIL MAILPATH PS1='$ ' PS2='> ' PS4='+ ' for i_x in LANG LANGUAGE LC_ALL LC_COLLATE LC_CTYPE LC_MESSAGES LC_NUMERIC LC_TIME do if (set +x; test -n "`(eval $i_x=C; export $i_x) 2>&1`"); then eval $i_x=C; export $i_x else $ic_unset $i_x fi done ic_me=`echo "$0" | sed 's,.*[/],,'` ic_version='0.0.4' ic_package_name='retawq' ic_package_version='0.2.6b' ic_fatal_error=echo ic_show_message=echo ic_show_info=false ic_site_file= ic_site_next= i_site="${ITCHCONFIG_SITE-}" if test -n "$i_site"; then for i_x in '-retawq' '' do i_s=`echo "$i_site" | sed "s,%P%,$i_x,g"` if test -n "$i_s" && test -f "$i_s"; then ic_site_file="$i_s" ic_site_next=init1 break fi done fi if test -n "$ic_site_file" && test "x$ic_site_next" = xinit1; then ic_site_stage=init1 ic_site_next= . "$ic_site_file" fi ic_AZ=ABCDEFGHIJKLMNOPQRSTUVWXYZ ic_az=abcdefghijklmnopqrstuvwxyz ic_Az=$ic_AZ$ic_az ic_Az09=${ic_Az}0123456789 # Override env vars? for i_arg do case $i_arg in [_$ic_Az]*=*) i_var=`expr "x$i_arg" : 'x\([^=]*\)='` i_val=`expr "x$i_arg" : 'x[^=]*=\(.*\)' | sed "s/'/'\\\\\\\\''/g"` eval "$i_var='$i_val'"; export $i_var ;; esac done SHELL="${ITCHCONFIG_SHELL-/bin/sh}" export SHELL ic_makedir="${MKDIRPROG-mkdir}" if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: fi $ic_unset CDPATH case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in *c*,-n*) ic_ECHO_N= ic_ECHO_C=' ' ic_ECHO_T=' ' ;; *c*,* ) ic_ECHO_N=-n ic_ECHO_C= ic_ECHO_T= ;; *) ic_ECHO_N= ic_ECHO_C='\c' ic_ECHO_T= ;; esac ic_option_tg=ncurses ic_option_textmodemouse=1 ic_option_i18n=0 ic_option_news=1 ic_option_cookies=1 ic_option_local_cgi=0 ic_option_ipv6=0 ic_option_birtcfg=0 ic_option_tls=0 ic_option_execext=0 ic_option_ced=1 ic_option_threading=1 if echo a | (grep -E '(a|b)') >&5 2>&1 then ic_egrep='grep -E' else ic_egrep='egrep' fi ic_path_archprefix='${ic_path_prefix}' ic_path_prefix=/usr/local ic_path_bin='${ic_path_archprefix}/bin' ic_path_man='${ic_path_prefix}/man' ic_path_doc='${ic_path_prefix}/doc/retawq' ic_path_locale='${ic_path_prefix}/share/locale' ic_installs= ic_program_prefix= ic_program_suffix= ic_binaries= ic_CC=${CC-gcc} ic_CFLAGS0="${CFLAGS-}" ic_CFLAGS="$ic_CFLAGS0" ic_CPPFLAGS0="${CPPFLAGS-}" if test "x$ic_CC" = "xgcc"; then ic_CFLAGS="-O2 $ic_CFLAGS" fi if test "${LDFLAGS+set}" = set; then ic_LDFLAGS="$LDFLAGS" else ic_LDFLAGS='-s' fi ic_objext="${OBJEXT-o}" if test -n "$ic_site_file" && test "x$ic_site_next" = xinit2; then ic_site_stage=init2 ic_site_next= . "$ic_site_file" fi # Parse args i_premature_exit=a for i_arg do i_aval=`expr "x$i_arg" : 'x[^=]*=\(.*\)'` case $i_arg in --set-tg=*) ic_option_tg="$i_aval" ;; --enable-textmodemouse) ic_option_textmodemouse=1 ;; --disable-textmodemouse) ic_option_textmodemouse=0 ;; --enable-i18n) ic_option_i18n=1 ;; --disable-i18n) ic_option_i18n=0 ;; --enable-news) ic_option_news=1 ;; --disable-news) ic_option_news=0 ;; --enable-cookies) ic_option_cookies=1 ;; --disable-cookies) ic_option_cookies=0 ;; --enable-local-cgi) ic_option_local_cgi=1 ;; --disable-local-cgi) ic_option_local_cgi=0 ;; --enable-ipv6) ic_option_ipv6=1 ;; --disable-ipv6) ic_option_ipv6=0 ;; --enable-birtcfg) ic_option_birtcfg=1 ;; --disable-birtcfg) ic_option_birtcfg=0 ;; --set-tls=*) ic_option_tls="$i_aval" ;; --set-execext=*) ic_option_execext="$i_aval" ;; --set-ced=*) ic_option_ced="$i_aval" ;; --set-threading=*) ic_option_threading="$i_aval" ;; --path-archprefix=*) ic_path_archprefix="$i_aval" ;; --path-prefix=*) ic_path_prefix="$i_aval" ;; --path-bin=*) ic_path_bin="$i_aval" ;; --path-man=*) ic_path_man="$i_aval" ;; --path-doc=*) ic_path_doc="$i_aval" ;; --path-locale=*) ic_path_locale="$i_aval" ;; --program-prefix=*) ic_program_prefix="$i_aval" ;; --program-suffix=*) ic_program_suffix="$i_aval" ;; --verbose) ic_show_info=echo ;; --quiet) ic_fatal_error=false ic_show_message=false ;; --version | -V) i_premature_exit=b break ;; --report) i_premature_exit=c break ;; --help) i_premature_exit=d break ;; --site* | [_$ic_Az]*=*) ;; *) $ic_fatal_error "$ic_me: unrecognized option: $i_arg. Try \"./$ic_me --help\"!" >&2 { (exit 1); exit 1; } ;; esac done case $i_premature_exit in a) ;; b) cat <. Copyright (C) 2002 Arne Thomassen This configuration script file is free software WITHOUT ANY WARRANTY; you are given unlimited permission to copy, distribute and modify this file, as long as this notice is kept intact and you indicate file modifications. EOF { :; exit 0; } ;; c) echo "$ic_me report for retawq 0.2.6b (by itchconfig 0.0.4):" if test -f "./config.guess"; then i_xv="`./config.guess --version 2>&5 | sed 1q`" i_x="`./config.guess 2>&5`" echo "config.guess ($i_xv) says: $i_x" fi i_x="`uname -a 2>&5`" echo "uname -a says: $i_x" i_x="`make --version 2>&5 | sed 1q`" echo "make version: $i_x" i_x="`$ic_CC --version 2>&5 | sed 1q`" echo "C compiler: $ic_CC, $i_x" { :; exit 0; } ;; d) cat <. Usage: ./$ic_me [option] ... Default values are shown in brackets below. General Options: --verbose print more information about what happens --quiet don't print any messages --version, -V print the version information and exit --report print a little configuration report and exit --help print this help and exit Installation Options: --program-prefix=... standard program prefix [NONE] --program-suffix=... standard program suffix [NONE] Installation Paths: --path-archprefix=PATH path prefix for architecture-dependent files [PREFIX] --path-prefix=PATH path prefix for architecture-independent files [/usr/local] --path-bin=PATH normal programs [ARCHPREFIX/bin] --path-man=PATH manual documentation [PREFIX/man] --path-doc=PATH HTML documentation [PREFIX/doc/retawq] --path-locale=PATH natural language texts [PREFIX/share/locale] Package Options: --disable-FEATURE the opposite of --enable-FEATURE --set-tg=VALUE text/graphics mode (curses, ncurses, ...) [ncurses] --enable-textmodemouse text-mode mouse [ENABLED] --enable-i18n internationalization [DISABLED] --enable-news news/NNTP support [ENABLED] --enable-cookies HTTP cookies [ENABLED] --enable-local-cgi local CGI scripts [DISABLED] --enable-ipv6 IPv6 support [DISABLED] --enable-birtcfg built-in run-time configuration file [DISABLED] --set-tls=VALUE TLS support (0=none, 1=GnuTLS, 2=OpenSSL) [0] --set-execext=VALUE execution of "external" programs [0] --set-ced=VALUE quality of character entity display (0..1) [1] --set-threading=VALUE threading (0=none, 1=pthreads, 2=Linux clone()) [1] EOF { :; exit 0; } ;; esac if test -f "parser.c"; then :; else $ic_fatal_error "$ic_me: configuration script launched from wrong directory!" >&2 { (exit 1); exit 1; } fi # Make sure that paths are absolute for i_path in ic_path_archprefix ic_path_prefix ic_path_bin ic_path_man \ ic_path_doc ic_path_locale do eval ic_val=$`echo $i_path` case $ic_val in [/$]*) ;; *) $ic_fatal_error "$ic_me: $i_path must be absolute, but is \"$ic_val\"" >&2 { (exit 1); exit 1; } ;; esac done # Create a temporary directory { trap 'exit_status=$?; rm -rf $ic_tempdir && exit $exit_status' 0 trap '{ (exit 1); exit 1; }' 1 2 13 15 } : ${TMPDIR=/tmp} { ic_tempdir=`(umask 077 && mktemp -d -q "$TMPDIR/icXXXXXX") 2>&5` && test -n "$ic_tempdir" && test -d "$ic_tempdir" } || { ic_tempdir=$TMPDIR/ic$$-$RANDOM (umask 077 && $ic_makedir $ic_tempdir) } || { $ic_fatal_error "$ic_me: cannot create a temporary directory in $TMPDIR" >&2 { (exit 1); exit 1; } } $ic_show_info "Configuring retawq 0.2.6b..." ic_testfile=$ic_tempdir/test ic_substfile=$ic_tempdir/subst exec 8>$ic_substfile ic_int_config_h=$ic_tempdir/int_config.h echo >$ic_int_config_h ic_c_definc='#include #if HAVE_SYS_TYPES_H # include #endif #if HAVE_SYS_STAT_H # include #endif #if STDC_HEADERS # include # include #else # if HAVE_STDLIB_H # include # endif #endif #if HAVE_STRING_H # if !STDC_HEADERS && HAVE_MEMORY_H # include # endif # include #endif #if HAVE_STRINGS_H # include #endif #if HAVE_INTTYPES_H # include #else # if HAVE_STDINT_H # include # endif #endif #if HAVE_UNISTD_H # include #endif ' $ic_show_message $ic_ECHO_N "Checking how to run the C pre-processor... $ic_ECHO_C" if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -n "$CPP"; then ic_CPP="$CPP" else ic_CPP= cat >$ic_testfile.c <<__IC_EOF__ #include Syntax error __IC_EOF__ for CPP in "$ic_CC -E" "$ic_CC -E -traditional-cpp" /lib/cpp do if $CPP $ic_CPPFLAGS0 $ic_testfile.c >&5 2>&1; then ic_CPP="$CPP" break fi done fi $ic_show_message "${ic_ECHO_T}$ic_CPP" if test -z "$ic_CPP"; then $ic_fatal_error "$ic_me: cannot find out how to run the C pre-processor; set the environment variable CPP and try again" >&2 { (exit 1); exit 1; } fi $ic_show_message $ic_ECHO_N "Checking for ANSI-compliant C header files... $ic_ECHO_C" cat >$ic_testfile.c <<__IC_EOF__ #include #include #include #include __IC_EOF__ i_result=0 if $ic_CC $ic_CFLAGS0 $ic_CPPFLAGS0 -c $ic_testfile.c -o $ic_testfile.$ic_objext >&5 2>&5; then i_result=1 fi ic_c_stdc=$i_result case $ic_c_stdc in 1) cat >$ic_testfile.c <<__IC_EOF__ #include __IC_EOF__ if $ic_CPP $ic_CPPFLAGS0 $ic_testfile.c 2>&5 | $ic_egrep "memchr" >&5 2>&5; then i_result=1 else i_result=0 fi case $i_result in 0) ic_c_stdc=0 ;; esac ;; esac case $ic_c_stdc in 1) cat >$ic_testfile.c <<__IC_EOF__ #include __IC_EOF__ if $ic_CPP $ic_CPPFLAGS0 $ic_testfile.c 2>&5 | $ic_egrep "free" >&5 2>&5; then i_result=1 else i_result=0 fi case $i_result in 0) ic_c_stdc=0 ;; esac ;; esac case $ic_c_stdc in 1) cat >$ic_testfile.c <<__IC_EOF__ #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') || ('j' <= (c) && (c) <= 'r') || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main() { int i; for (i = 0; i < 256; i++) if (XOR(islower(i), ISLOWER(i)) || toupper(i) != TOUPPER(i)) return(2); return(0); } __IC_EOF__ i_result=0 if $ic_CC $ic_CFLAGS0 $ic_CPPFLAGS0 -c $ic_testfile.c -o $ic_testfile.$ic_objext >&5 2>&5; then if $ic_CC $ic_CFLAGS0 $ic_CPPFLAGS0 $ic_LDFLAGS $ic_testfile.$ic_objext $LIBS -o $ic_testfile >&5 2>&5; then i_result=1 $ic_testfile >&5 2>&5 i_x=$? if test "x$i_x" != "x0"; then i_result=0 fi fi fi case $i_result in 0) ic_c_stdc=0 ;; esac ;; esac case $ic_c_stdc in 0) i_x=no ;; *) i_x=yes ;; esac $ic_show_message "${ic_ECHO_T}$i_x" echo "#define STDC_HEADERS $ic_c_stdc" >>$ic_int_config_h # IC_C_HEADERS for i_header in inttypes.h memory.h stdint.h stdlib.h string.h strings.h sys/param.h sys/stat.h sys/types.h unistd.h do i_r=`echo "$i_header" | sed "y,$ic_az,$ic_AZ,;s,[^_${ic_Az09}],_,g"` i_resultid='HAVE_'${i_r} $ic_show_message $ic_ECHO_N "Checking whether the C header file $i_header exists... $ic_ECHO_C" cat >$ic_testfile.c <<__IC_EOF__ #include <$i_header> __IC_EOF__ i_result=0 if $ic_CC $ic_CFLAGS0 $ic_CPPFLAGS0 -c $ic_testfile.c -o $ic_testfile.$ic_objext >&5 2>&5; then i_result=1 fi case $i_result in 0) i_x=no ;; *) i_x=yes ;; esac $ic_show_message "${ic_ECHO_T}$i_x" echo "#define $i_resultid $i_result" >>$ic_int_config_h done ic_makefile=$ic_tempdir/Makefile exec 6>$ic_makefile cat >&6 <. # Copyright (C) 2002 Arne Thomassen # This Makefile is free software WITHOUT ANY WARRANTY; # you are given unlimited permission to copy, distribute and modify this file, # as long as this notice is kept intact and you indicate file modifications. all: default-target SHELL=$SHELL EOF ic_config_h=$ic_tempdir/config.h exec 7>$ic_config_h cat >&7 <. Copyright (C) 2002 Arne Thomassen This config.h file is free software WITHOUT ANY WARRANTY; you are given unlimited permission to copy, distribute and modify this file, as long as this notice is kept intact and you indicate file modifications. */ EOF cat >&7 <&7 <&2 { (exit 1); exit 1; } :; } } cftg=`tool/tgmode --cftg $ic_option_tg` cat >&7 <&7 <$ic_testfile.c <<__IC_EOF__ #include <$i_header> __IC_EOF__ i_result=0 if $ic_CC $ic_CFLAGS0 $ic_CPPFLAGS0 -c $ic_testfile.c -o $ic_testfile.$ic_objext >&5 2>&5; then i_result=1 fi case $i_result in 0) i_x=no ;; *) i_x=yes ;; esac $ic_show_message "${ic_ECHO_T}$i_x" cat >&7 <$ic_testfile.c <<__IC_EOF__ int main() { #ifndef __cplusplus /* Ultrix mips cc rejects this. */ typedef int charset[2]; const charset x; /* SunOS 4.1.1 cc rejects this. */ char const *const *ccp; char **p; /* NEC SVR4.0.2 mips cc rejects this. */ struct point {int x, y;}; static struct point const zero = {0,0}; /* AIX XL C 1.02.0.0 rejects this. It does not let you subtract one const X* pointer from another in an arm of an if-expression whose if-part is not a constant expression. */ const char *g = "string"; ccp = &g + (g ? g-g : 0); /* HPUX 7.0 cc rejects these. */ ++ccp; p = (char**) ccp; ccp = (char const *const *) p; { /* SCO 3.2v4 cc rejects this. */ char *t; char const *s = 0 ? (char *) 0 : (char const *) 0; *t++ = 0; } { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ int x[] = {25, 17}; const int *foo = &x[0]; ++foo; } { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ typedef const int *iptr; iptr p = 0; ++p; } { /* AIX XL C 1.02.0.0 rejects this saying "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ struct s { int j; const int *ap[3]; }; struct s *b; b->j = 5; } { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this. */ const int foo = 10; } #endif return(0); } __IC_EOF__ i_result=0 if $ic_CC $ic_CFLAGS0 $ic_CPPFLAGS0 -c $ic_testfile.c -o $ic_testfile.$ic_objext >&5 2>&5; then i_result=1 fi if test "x$i_result" = "x0"; then $ic_show_message "${ic_ECHO_T}no" cat >&7 <$ic_testfile.c <<__IC_EOF__ #ifndef __cplusplus typedef int foo_type; static $keyword foo_type static_foo_func() { return(0); } $keyword foo_type foo_func() { return(0); } #endif int main() { return(0); } __IC_EOF__ i_result=0 if $ic_CC $ic_CFLAGS0 $ic_CPPFLAGS0 -c $ic_testfile.c -o $ic_testfile.$ic_objext >&5 2>&5; then i_result=1 fi if test "x$i_result" = "x1"; then working_inline="$keyword" break fi done if test "$working_inline" != "inline"; then cat >&7 <$ic_testfile.c <<__IC_EOF__ #include "int_config.h" $ic_c_definc int main() { if ((gid_t *) 0) return(0); if (sizeof(gid_t)) return(0); return(0); } __IC_EOF__ i_result=0 if $ic_CC $ic_CFLAGS0 $ic_CPPFLAGS0 -c $ic_testfile.c -o $ic_testfile.$ic_objext >&5 2>&5; then i_result=1 fi if test "x$i_result" = "x0"; then $ic_show_message "${ic_ECHO_T}no" cat >&7 <$ic_testfile.c <<__IC_EOF__ #include "int_config.h" $ic_c_definc int main() { if ((mode_t *) 0) return(0); if (sizeof(mode_t)) return(0); return(0); } __IC_EOF__ i_result=0 if $ic_CC $ic_CFLAGS0 $ic_CPPFLAGS0 -c $ic_testfile.c -o $ic_testfile.$ic_objext >&5 2>&5; then i_result=1 fi if test "x$i_result" = "x0"; then $ic_show_message "${ic_ECHO_T}no" cat >&7 <$ic_testfile.c <<__IC_EOF__ #include "int_config.h" $ic_c_definc int main() { if ((off_t *) 0) return(0); if (sizeof(off_t)) return(0); return(0); } __IC_EOF__ i_result=0 if $ic_CC $ic_CFLAGS0 $ic_CPPFLAGS0 -c $ic_testfile.c -o $ic_testfile.$ic_objext >&5 2>&5; then i_result=1 fi if test "x$i_result" = "x0"; then $ic_show_message "${ic_ECHO_T}no" cat >&7 <$ic_testfile.c <<__IC_EOF__ #include "int_config.h" $ic_c_definc int main() { if ((pid_t *) 0) return(0); if (sizeof(pid_t)) return(0); return(0); } __IC_EOF__ i_result=0 if $ic_CC $ic_CFLAGS0 $ic_CPPFLAGS0 -c $ic_testfile.c -o $ic_testfile.$ic_objext >&5 2>&5; then i_result=1 fi if test "x$i_result" = "x0"; then $ic_show_message "${ic_ECHO_T}no" cat >&7 <$ic_testfile.c <<__IC_EOF__ #include "int_config.h" $ic_c_definc int main() { if ((size_t *) 0) return(0); if (sizeof(size_t)) return(0); return(0); } __IC_EOF__ i_result=0 if $ic_CC $ic_CFLAGS0 $ic_CPPFLAGS0 -c $ic_testfile.c -o $ic_testfile.$ic_objext >&5 2>&5; then i_result=1 fi if test "x$i_result" = "x0"; then $ic_show_message "${ic_ECHO_T}no" cat >&7 <$ic_testfile.c <<__IC_EOF__ /* Thanks to Mike Haertel and Jim Avera for this test (from GNU autoconf). */ #include "int_config.h" $ic_c_definc #include #include #if !STDC_HEADERS && !HAVE_STDLIB_H char *malloc(); #endif /* This mess was copied from the GNU getpagesize.h. */ #if !HAVE_GETPAGESIZE /* Assume that all systems that can run configure have sys/param.h. */ # if !HAVE_SYS_PARAM_H # define HAVE_SYS_PARAM_H 1 # endif # ifdef _SC_PAGESIZE # define getpagesize() sysconf(_SC_PAGESIZE) # else /* no _SC_PAGESIZE */ # if HAVE_SYS_PARAM_H # include # ifdef EXEC_PAGESIZE # define getpagesize() EXEC_PAGESIZE # else /* no EXEC_PAGESIZE */ # ifdef NBPG # define getpagesize() NBPG * CLSIZE # ifndef CLSIZE # define CLSIZE 1 # endif /* no CLSIZE */ # else /* no NBPG */ # ifdef NBPC # define getpagesize() NBPC # else /* no NBPC */ # ifdef PAGESIZE # define getpagesize() PAGESIZE # endif /* PAGESIZE */ # endif /* no NBPC */ # endif /* no NBPG */ # endif /* no EXEC_PAGESIZE */ # else /* no HAVE_SYS_PARAM_H */ # define getpagesize() 8192 /* punt totally */ # endif /* no HAVE_SYS_PARAM_H */ # endif /* no _SC_PAGESIZE */ #endif /* no HAVE_GETPAGESIZE */ int main() { char *data, *data2, *data3; int i, pagesize; int fd; pagesize = getpagesize(); /* First, make a file with some known garbage in it. */ data = (char *) malloc(pagesize); if (!data) return(1); for (i = 0; i < pagesize; ++i) *(data + i) = rand(); umask(0); fd = creat("$ic_testfile.mmap", 0600); if (fd < 0) return(2); if (write(fd, data, pagesize) != pagesize) return(3); close(fd); /* Next, try to mmap the file at a fixed address which already has something else allocated at it. If we can, also make sure that we see the same garbage. */ fd = open("$ic_testfile.mmap", O_RDWR); if (fd < 0) return(4); data2 = (char *) malloc(2 * pagesize); if (!data2) return(5); data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1); if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_FIXED, fd, 0L)) return(6); for (i = 0; i < pagesize; ++i) if (*(data + i) != *(data2 + i)) return(7); /* Finally, make sure that changes to the mapped area do not percolate back to the file as seen by read(). (This is a bug on some variants of i386 svr4.0.) */ for (i = 0; i < pagesize; ++i) *(data2 + i) = *(data2 + i) + 1; data3 = (char *) malloc(pagesize); if (!data3) return(8); if (read(fd, data3, pagesize) != pagesize) return(9); for (i = 0; i < pagesize; ++i) if (*(data + i) != *(data3 + i)) return(10); close(fd); return(0); } __IC_EOF__ i_result=0 if $ic_CC $ic_CFLAGS0 $ic_CPPFLAGS0 -c $ic_testfile.c -o $ic_testfile.$ic_objext >&5 2>&5; then if $ic_CC $ic_CFLAGS0 $ic_CPPFLAGS0 $ic_LDFLAGS $ic_testfile.$ic_objext $LIBS -o $ic_testfile >&5 2>&5; then i_result=1 $ic_testfile >&5 2>&5 i_x=$? if test "x$i_x" != "x0"; then i_result=0 fi fi fi cat >&7 <$ic_testfile.c <<__IC_EOF__ #include "int_config.h" #include #ifdef __cplusplus extern "C" #endif char $i_func(); char (*f)(); int main() { #if defined(__stub_$i_func) || defined(__stub___$i_func) choke me #else f=$i_func; #endif return(0); } __IC_EOF__ i_result=0 if $ic_CC $ic_CFLAGS0 $ic_CPPFLAGS0 -c $ic_testfile.c -o $ic_testfile.$ic_objext >&5 2>&5; then if $ic_CC $ic_CFLAGS0 $ic_CPPFLAGS0 $ic_LDFLAGS $ic_testfile.$ic_objext $LIBS -o $ic_testfile >&5 2>&5; then i_result=1 fi fi case $i_result in 0) i_x=no ;; *) i_x=yes ;; esac $ic_show_message "${ic_ECHO_T}$i_x" cat >&7 <$ic_testfile.c <<__IC_EOF__ #include "int_config.h" #include #ifdef __cplusplus extern "C" #endif char $i_func(); char (*f)(); int main() { #if defined(__stub_$i_func) || defined(__stub___$i_func) choke me #else f=$i_func; #endif return(0); } __IC_EOF__ i_result=0 if $ic_CC $ic_CFLAGS0 $ic_CPPFLAGS0 -c $ic_testfile.c -o $ic_testfile.$ic_objext >&5 2>&5; then case $i_lib in '') i_realib='' ;; *) i_realib="-l$i_lib" ;; esac if $ic_CC $ic_CFLAGS0 $ic_CPPFLAGS0 $ic_LDFLAGS $ic_testfile.$ic_objext $LIBS $i_realib -o $ic_testfile >&5 2>&5; then i_result=1 fi fi case $i_result in 1) break ;; esac i_need_lib=: done case $i_result in 0) i_x=no i_need_lib=false ;; *) i_x=yes case $i_lib in '') i_x="$i_x (libc)" ;; *) i_x="$i_x (-l$i_lib)" ;; esac ;; esac $ic_show_message "${ic_ECHO_T}$i_x" if $i_putsym; then cat >&7 <$ic_testfile.c <<__IC_EOF__ #include "int_config.h" #include #ifdef __cplusplus extern "C" #endif char $i_func(); char (*f)(); int main() { #if defined(__stub_$i_func) || defined(__stub___$i_func) choke me #else f=$i_func; #endif return(0); } __IC_EOF__ i_result=0 if $ic_CC $ic_CFLAGS0 $ic_CPPFLAGS0 -c $ic_testfile.c -o $ic_testfile.$ic_objext >&5 2>&5; then case $i_lib in '') i_realib='' ;; *) i_realib="-l$i_lib" ;; esac if $ic_CC $ic_CFLAGS0 $ic_CPPFLAGS0 $ic_LDFLAGS $ic_testfile.$ic_objext $LIBS $i_realib -o $ic_testfile >&5 2>&5; then i_result=1 fi fi case $i_result in 1) break ;; esac i_need_lib=: done case $i_result in 0) i_x=no i_need_lib=false ;; *) i_x=yes case $i_lib in '') i_x="$i_x (libc)" ;; *) i_x="$i_x (-l$i_lib)" ;; esac ;; esac $ic_show_message "${ic_ECHO_T}$i_x" if $i_putsym; then cat >&7 <$ic_testfile.c <<__IC_EOF__ #include "int_config.h" #include #ifdef __cplusplus extern "C" #endif char $i_func(); char (*f)(); int main() { #if defined(__stub_$i_func) || defined(__stub___$i_func) choke me #else f=$i_func; #endif return(0); } __IC_EOF__ i_result=0 if $ic_CC $ic_CFLAGS0 $ic_CPPFLAGS0 -c $ic_testfile.c -o $ic_testfile.$ic_objext >&5 2>&5; then case $i_lib in '') i_realib='' ;; *) i_realib="-l$i_lib" ;; esac if $ic_CC $ic_CFLAGS0 $ic_CPPFLAGS0 $ic_LDFLAGS $ic_testfile.$ic_objext $LIBS $i_realib -o $ic_testfile >&5 2>&5; then i_result=1 fi fi case $i_result in 1) break ;; esac i_need_lib=: done case $i_result in 0) i_x=no i_need_lib=false ;; *) i_x=yes case $i_lib in '') i_x="$i_x (libc)" ;; *) i_x="$i_x (-l$i_lib)" ;; esac ;; esac $ic_show_message "${ic_ECHO_T}$i_x" if $i_putsym; then cat >&7 <$ic_testfile.c <<__IC_EOF__ #include "int_config.h" #include #ifdef __cplusplus extern "C" #endif char $i_func(); char (*f)(); int main() { #if defined(__stub_$i_func) || defined(__stub___$i_func) choke me #else f=$i_func; #endif return(0); } __IC_EOF__ i_result=0 if $ic_CC $ic_CFLAGS0 $ic_CPPFLAGS0 -c $ic_testfile.c -o $ic_testfile.$ic_objext >&5 2>&5; then case $i_lib in '') i_realib='' ;; *) i_realib="-l$i_lib" ;; esac if $ic_CC $ic_CFLAGS0 $ic_CPPFLAGS0 $ic_LDFLAGS $ic_testfile.$ic_objext $LIBS $i_realib -o $ic_testfile >&5 2>&5; then i_result=1 fi fi case $i_result in 1) break ;; esac i_need_lib=: done case $i_result in 0) i_x=no i_need_lib=false ;; *) i_x=yes case $i_lib in '') i_x="$i_x (libc)" ;; *) i_x="$i_x (-l$i_lib)" ;; esac ;; esac $ic_show_message "${ic_ECHO_T}$i_x" if $i_putsym; then cat >&7 <$ic_testfile.c <<__IC_EOF__ #include "int_config.h" #include #ifdef __cplusplus extern "C" #endif char resizeterm(); char (*f)(); int main() { #if defined(__stub_resizeterm) || defined(__stub___resizeterm) choke me #else f=resizeterm; #endif return(0); } __IC_EOF__ i_result=0 if $ic_CC $ic_CFLAGS0 $ic_CPPFLAGS0 -c $ic_testfile.c -o $ic_testfile.$ic_objext >&5 2>&5; then case $rszt in '') i_realib='' ;; *) i_realib="-l$rszt" ;; esac if $ic_CC $ic_CFLAGS0 $ic_CPPFLAGS0 $ic_LDFLAGS $ic_testfile.$ic_objext $LIBS $i_realib -o $ic_testfile >&5 2>&5; then i_result=1 fi fi ICV_has_resizeterm="$i_result" ;; esac cat >&7 <&7 <&7 <&6 <&6 <&6 <&6 <&2 EOF fi if test -n "$ic_installs"; then allinst="install:" for inst in $ic_installs do eval ic_val=$`echo "ic_install_${inst}_files"` if test -n "$ic_val"; then eval path=$`echo "ic_path_${inst}" | sed "s,[^$ic_Az09],_,g"` eval pfinal0="$path" eval pfinal="$pfinal0" eval perm=$`echo "ic_install_${inst}_perm"` eval magic=$`echo "ic_install_${inst}_magic"` allinst="$allinst install-$inst" cat >&6 <&6 fi mf_mostlyclean=" -@rm -f" for mfm in init. main. parser. resource. stuff. do mf_mostlyclean="$mf_mostlyclean $mfm$ic_objext" done cat >&6 <&5 exec 7>&5 exec 8>&5 $ic_show_info "Writing configure.act" exec 6>configure.act cat >&6 <. # Copyright (C) 2002 Arne Thomassen # This configuration script file is free software WITHOUT ANY WARRANTY; # you are given unlimited permission to copy, distribute and modify this file, # as long as this notice is kept intact and you indicate file modifications. exec 5>/dev/null if test -n "\${ZSH_VERSION+set}" && (emulate sh) >&5 2>&1; then emulate sh NULLCMD=: elif test -n "\${BASH_VERSION+set}" && (set -o posix) >&5 2>&1; then set -o posix fi ic_nl=' ' IFS=" \$ic_nl" export IFS if (FOO=FOO; unset FOO) >&5 2>&1; then ic_unset=unset else ic_unset=false fi \$ic_unset ENV MAIL MAILPATH PS1='\$ ' PS2='> ' PS4='+ ' for i_x in LANG LANGUAGE LC_ALL LC_COLLATE LC_CTYPE LC_MESSAGES LC_NUMERIC LC_TIME do if (set +x; test -n "\`(eval \$i_x=C; export \$i_x) 2>&1\`"); then eval \$i_x=C; export \$i_x else \$ic_unset \$i_x fi done ic_me=\`echo "\$0" | sed 's,.*[/],,'\` ic_fatal_error=$ic_fatal_error ic_show_info=$ic_show_info if test -f "parser.c"; then :; else \$ic_fatal_error "\$ic_me: configuration script launched from wrong directory!" >&2 { (exit 1); exit 1; } fi case \$1 in --int-install) mode="\$2" magic="\$3" initial_path="\$4" files="\$5" act="\${ITCHCONFIG_ACT-}" ic_makedir="\${MKDIRPROG-mkdir}" ic_program_prefix="$ic_program_prefix" ic_program_suffix="$ic_program_suffix" checked_path= for one_file in \$files do path="\$initial_path" file=\`echo "\$one_file" | sed 's,.*[/],,'\` case \$magic in m0) ;; m1) file="\$ic_program_prefix\$file\$ic_program_suffix" ;; m2) num=\`echo "\$file" | sed 's,.*\\.\\([0123456789]\\).*,\\1,'\` path="\$path/man\$num" ;; m3) tool/instdocu \$path break ;; m4) mcf=\`echo "\$file" | sed 's,\\.mo\$,,'\` path="\$path/\$mcf/LC_MESSAGES" file="retawq.mo" ;; *) \$ic_fatal_error "\$ic_me: unknown installer magic \\"\$magic\\"" >&2 { (exit 1); exit 1; } ;; esac if test "x\$checked_path" != "x\$path"; then checked_path="\$path" parts=\`echo "\$path" | sed 's,/, ,g'\` p= for part in \$parts do p="\$p/\$part" if test -d "\$p" || \$act \$ic_makedir "\$p"; then :; else \$ic_fatal_error "\$ic_me: cannot create directory \\"\$p\\"" >&2 { (exit 1); exit 1; } fi done fi dest_file="\$path/\$file" if test -f "\$dest_file"; then temp_file=\$path/#itch.\$\$# \$act trap "mv -f \$temp_file \$dest_file" 1 2 13 15 \$act mv -f \$dest_file \$temp_file \$act cp \$one_file \$dest_file \$act rm -f \$temp_file else \$act cp \$one_file \$dest_file fi \$act chmod \$mode \$dest_file done { :; exit 0; } ;; esac # Parse args i_premature_exit=a for i_arg do case \$i_arg in --version | -V) i_premature_exit=b break ;; --help) i_premature_exit=c break ;; *) \$ic_fatal_error "\$ic_me: unrecognized option: \$i_arg. Try \\"./\$ic_me --help\\"!" >&2 { (exit 1); exit 1; } ;; esac done case \$i_premature_exit in a) ;; b) cat <. Copyright (C) 2002 Arne Thomassen This configuration script file is free software WITHOUT ANY WARRANTY; you are given unlimited permission to copy, distribute and modify this file, as long as this notice is kept intact and you indicate file modifications. EOF { :; exit 0; } ;; c) cat <. Usage: ./\$ic_me [option] ... General Options: --version, -V print the version information and exit --help print this help and exit EOF { :; exit 0; } ;; esac EOFACT cat >&6 <&6 <Makefile <&6 cat >&6 <$ic_makefile echo "EOFINACT" >&6 cat >&6 <.config <&6 cat >&6 <$ic_config_h echo "EOFINACT" >&6 echo "{ :; exit 0; }" >&6 exec 6>&5 $ic_show_info "Executing configure.act" chmod u+rx configure.act $SHELL configure.act { :; exit 0; }