#!/bin/sh ################################################################ # Basic IO: ################################################################ ################################################################ # read: called with the name of a variable and (optionally) a # different message text. Keeps the old value of the # variable, if the empty string in entered. ################################################################ gets() { gets_var=$1; gets_text=${2-$gets_var} eval old=\$$gets_var eval $echon \""New value for $gets_text [$old]: "\" read $gets_var eval test -z \"\$$gets_var\" && eval $gets_var=\'$old\' } ################################################################ # getopt: get a menu choice. # $1: string with valid characters # $2: message for prompting ################################################################ getopt() { chars=$1; msg=$2 while true; do #$echon "$msg ([$chars]): " $echon "$msg: " >&2 read ans ans=`echo $ans | tr '[a-z]' '[A-Z]'` case "$ans" in [$chars]) echo "$ans" return esac done } ################################################################ # toolge: given the name of a variable, toogle switches between # the values ' ' and X. ################################################################ toggle() { if eval test \"\$$1\" = X; then eval $1=\' \' else eval $1=X fi } ################################################################ # This tricky function displays the value of a variable that can # contain newline characters. Variables will be expanded, too. # Arguments: # 1: the name of the variable ################################################################ textvar_show() { # eval + quoting. That's it! eval eval echo \\\"\"\$$1\"\\\" } readln() { $echon 'Press return to continue... ' read foo } help() { var=$1 cls textvar_show $var 2>&1 | eval $PAGER echo readln } ################################################################ # Use the yesno functions to ask the user a simple yes/no # question. # Arguments: # $1: test to display for the question (" (Y/N)? " will # automatically be appended). ################################################################ yesno() { while true; do $echon "$1 (Y/N)? " read ans case $ans in y|Y) return 0;; n|N) return 1;; esac done } ################################################################ # A set of functions the might do an echo without linefeed in # the end. Function find_echo sets the variable "echon" to a # suitable function. ################################################################ echo_a() { echo -n "$@"; } echo_b() { echo "$@\c"; } echo_c() { echo -e "$@\c"; } echo_d() { /bin/echo -n "$@"; } echo_e() { /bin/echo "$@\c"; } echo_f() { /bin/echo -e "$@\c"; } ################################################################ # Test which of the above functions does the trick. We set # the variable "echon" to the first function that works # correctly. ################################################################ find_echo() { for i in a b c d e f; do test "`echo_$i c``echo_$i a`" = ca && echon=echo_$i && return done echon=echo } ################################################################ # series and packages management: ################################################################ ############################################################################### # The series structure: # s_${series}_la: "list of all packages" # s_${series}_lf: "list of packages we found on the disk" # s_${series}_ls: "list of selected packages" # s_${series}_mis: "list of packages that are missing" # s_${series}_nf: "number of packages we find" # s_${series}_ns: "number of selected packages" # s_${series}_nmis: "number of packages that are missing" # s_${series}_du: "disk space usage of all packages found" # s_${series}_dus: "disk space usage of selected packages" # s_${series}_h: "help text" ############################################################################### ############################################################################### # The package structure: # p_${package}_n: "the name of the package" # p_${package}_s: "is the package selected?" # p_${package}_l: "level: required, recommended or optional" # p_${package}_da: "did we find the package?" # p_${package}_fn: "the filename of a package the we found" # p_${package}_h: "help text" ############################################################################### allseries_locate() { for al_series in $S_all_la; do series_locate $al_series; done } allseries_locate_check() { notall=false hasbin=false if test "$this_platform" != ""; then eval test \"\$p_${this_platform}_da\" = true && hasbin=true fi for alc_series in $S_all_la; do test $alc_series = bin && $hasbin && continue eval alc_all_packages=\"\$s_${alc_series}_la\" for alc_p in $alc_all_packages; do if eval test \"\$p_${alc_p}_da\" = false; then notall=true eval echo \""Warning: package not found: \${p_${alc_p}_d-$alc_p} (series: $alc_series)."\" fi done done if test "$notall" = true; then echo echo "Notice: ignore the warnings, if the packages are missing intentionally." echo $echon "Press return to continue or Control-C to abort... " read foo fi } series_locate() { sl_series=$1 eval sl_all_packages=\"\$s_${sl_series}_la\" eval dft_dir=\"\$s_${sl_series}_d\" lf=; mis=; nmis=0; nf=0 for sl_p in $sl_all_packages; do eval bn=\${p_${sl_p}_d-$sl_p} fn= test -f $here/$dft_dir/$bn.tar.gz && fn=$here/$dft_dir/$bn.tar.gz test -f $here/$bn.tar.gz && fn=$here/$bn.tar.gz if test -z "$fn"; then eval p_${sl_p}_da=false eval p_${sl_p}_fn= mis="$mis $sl_p" nmis=`expr $nmis + 1` else eval p_${sl_p}_da=true eval p_${sl_p}_fn=$fn lf="$lf $sl_p" nf=`expr $nf + 1` fi done eval s_${sl_series}_lf=\"$lf\" eval s_${sl_series}_mis=\"$mis\" eval s_${sl_series}_nmis=$nmis eval s_${sl_series}_nf=$nf setlength s_${sl_series}_nf 2 } series_select_all() { ssa_series=$1 eval all_packages=\"\$s_${ssa_series}_lf\" for ssa_p in $all_packages; do package_select $ssa_p done series_stat $ssa_series } series_deselect_all() { sda_series=$1 eval all_packages=\"\$s_${sda_series}_lf\" for sda_p in $all_packages; do package_deselect $sda_p done series_stat $sda_series } series_stat() { series=$1 dus=0 ns=0 ls= eval ss_all_packages=\"\$s_${series}_lf\" for ss_p in $ss_all_packages; do eval \$p_${ss_p}_s || continue eval newdu=\"\$p_${ss_p}_du\" if test -z "$newdu"; then echo "unknown disk space usage for package: $ss_p" newdu=0 fi ls="$ls $ss_p" ns=`expr $ns + 1` dus=`expr $dus + $newdu` done eval s_${series}_dus=\$dus setlength s_${series}_dus 6 eval s_${series}_ns=\$ns setlength s_${series}_ns 2 eval s_${series}_ls=\$ls } nobin_stat() { dus=0; nf=0; ns=0; for ns_series in $S_nobin_la; do eval dus=\`expr \$dus + \$s_${ns_series}_dus\` eval nf=\` expr \$nf + \$s_${ns_series}_nf\` eval ns=\` expr \$ns + \$s_${ns_series}_ns\` done S_nobin_dus=$dus; setlength S_nobin_dus 6 S_nobin_nf=$nf; setlength S_nobin_nf 2 S_nobin_ns=$ns; setlength S_nobin_ns 2 total_stat } total_stat() { s_total_dus=`expr $s_bin_dus + $S_nobin_dus`; setlength s_total_dus 6 s_total_nf=`expr $s_bin_nf + $S_nobin_nf`; setlength s_total_nf 2 s_total_ns=`expr $s_bin_ns + $S_nobin_ns`; setlength s_total_du 2 } package_select() { eval p_${1}_s=true; } package_deselect() { eval p_${1}_s=false; } series_list() { sl_series=$1 cls echo "Series \`\`$sl_series'' statistics:"; echo echo " package name size selected" echo " ----------------------------------------------------------------" eval sl_all_p=\"\$s_${sl_series}_lf\" for sl_p in $sl_all_p; do eval sl_n=\"\$p_${sl_p}_n\" eval sl_du=\"\$p_${sl_p}_du\" eval sl_s=\"\$p_${sl_p}_s\" if $sl_s; then sl_s='[X]'; else sl_s='[ ]'; fi setlength sl_n 50 setlength sl_du 6 echo "$sl_n ${sl_du}k $sl_s" done eval sl_s_dus=\"\$s_${sl_series}_dus\" setlength sl_s_dus 6 echo " ----------------------------------------------------------------" echo " selected size: ${sl_s_dus}k" echo echo readln } series_init() { $echon "Locating packages... "; allseries_locate; echo "Done." $echon "Initializing series... " for si_series in $S_nobin_la; do series_select_all $si_series done echo "Done." series_deselect_all bin test -z "$this_platform" || { this_platform_set "$this_platform" package_select "$this_platform" series_stat bin } allseries_locate_check } this_platform_set() { this_platform="$1" for tps_p in $s_bin_lf; do eval p_${tps_p}_l=optional done series_deselect_all bin if test -z "$this_platform"; then this_platform_n= this_platform_d= else package_select ${this_platform} series_stat bin eval this_platform_n=\$p_${this_platform}_n eval this_platform_d=\$p_${this_platform}_d eval p_${this_platform}_l=required fi nobin_stat } ################################################################ #debugging: ################################################################ series_dbg() { series=$1 eval echo \""all packages: '\$s_${series}_la'"\" eval echo \""default dir: '\$s_${series}_d'"\" eval echo \""selected: '\$s_${series}_ls'"\" eval echo \""found: '\$s_${series}_lf'"\" eval echo \""missing: '\$s_${series}_mis'"\" eval echo \""anz found: '\$s_${series}_nf'"\" eval echo \""anz missing: '\$s_${series}_nmis'"\" eval echo \""anz selected: '\$s_${series}_ns'"\" eval echo \""du total: '\$s_${series}_du'"\" eval echo \""du selected: '\$s_${series}_dus'"\" echo help: textvar_show s_${series}_h echo } package_dbg() { p=$1 eval echo \""gefunden: '\$p_${p}_da'"\" eval echo \""filename: '\$p_${p}_fn'"\" eval echo \""du: '\$p_${p}_du'"\" eval echo \""version: '\$p_${p}_v'"\" eval echo \""selected: '\$p_${p}_s'"\" eval echo \""name: '\$p_${p}_n'"\" echo help: textvar_show p_${p}_h echo } ################################################################ # utility functions: ################################################################ bad_sh() { /bin/sh -c 'exit 1' retval=$? if test "$retval" != 1; then echo echo 'Your /bin/sh is completely broken. A simple program like' echo echo " /bin/sh -c 'exit 1'; echo \$?" echo echo "gives a wrong result." echo echo 'Your shell is likely to break some scripts of teTeX. Please' echo 'update your /bin/sh first and try to install teTeX later.' echo 'GNU bash 1.14.5 will do, whereas bash 1.14.3 is known to have' echo 'problems.' echo exit 1 fi } warning() { echo "$@"; } cls() { test "$debug" = true || clear; } check_for_binary() { testbin=$1 case "$testbin" in /*) test -x "$testbin" && test -f "$testbin"; return;; *) OLDIFS=$IFS; IFS=:; eval set $PATH; IFS=$OLDIFS for this_dir do test -x "$this_dir/$testbin" && test -f "$this_dir/$testbin" && return 0 done return 1;; esac } require_binaries() { for this_bin do check_for_binary $this_bin || fatal "program '$this_bin' not found in PATH" done } maketex_setopt() { mtsite=$dest_dir_texmf/web2c/mktex.cnf test -w "$mtsite" || return test -w "$dest_dir_texmf/web2c/texmf.cnf" || return test "$opt_varfonts" = X || return ed "$dest_dir_texmf/web2c/texmf.cnf" >$ERRLOG 2>&1 <$ERRLOG 2>&1 <<'eof' /^: \${MT_FEATURES=/ s/}/:varfonts}/ w q eof show_error } selfauto() { selfauto_ok=true case $platform_subdir_strip in true) d=$dest_dir_bin ;; *) d=$dest_dir_bin/$this_platform_d ;; esac dest_dir_binp=`echo /$d | sed 's@/[^/]*$@@; s@//@/@g'` dest_dir_binpp=`echo /$dest_dir_binp | sed 's@/[^/]*$@@; s@//@/@g'` case $dest_dir_texmf in $d) dest_dir_texmf_sa='$SELFAUTOLOC';; $d/share/texmf) dest_dir_texmf_sa='$SELFAUTOLOC/share/texmf';; $d/texmf) dest_dir_texmf_sa='$SELFAUTOLOC/texmf';; $dest_dir_binp) dest_dir_texmf_sa='$SELFAUTODIR';; $dest_dir_binp/share/texmf) dest_dir_texmf_sa='$SELFAUTODIR/share/texmf';; $dest_dir_binp/texmf) dest_dir_texmf_sa='$SELFAUTODIR/texmf';; $dest_dir_binpp) dest_dir_texmf_sa='$SELFAUTOPARENT';; $dest_dir_binpp/share/texmf) dest_dir_texmf_sa='$SELFAUTOPARENT/share/texmf';; $dest_dir_binpp/texmf) dest_dir_texmf_sa='$SELFAUTOPARENT/texmf';; *) selfauto_ok=false esac } texmfcnf_setup() { test -f "$dest_dir_texmf/web2c/texmf.cnf" || return if test ! -w "$dest_dir_texmf/web2c/texmf.cnf"; then warning "Warning: cannot write to file $dest_dir_texmf/web2c/texmf.cnf" readln return fi selfauto case $selfauto_ok in true) tf_dest=$dest_dir_texmf_sa ;; false) tf_dest=$dest_dir_texmf ;; esac ed "$dest_dir_texmf/web2c/texmf.cnf" >$ERRLOG 2>&1 <<-eof /^TEXMFMAIN.*=/ c TEXMFMAIN = $tf_dest . w q eof show_error texmf='$TEXMFMAIN' braces=false if test "$opt_vartexmf" = X; then braces=true texmf="\$VARTEXMF,$texmf" ed "$dest_dir_texmf/web2c/texmf.cnf" >$ERRLOG 2>&1 <<-eof /^% *VARTEXMF *=/ c VARTEXMF = $opt_vartexmf_dir . w q eof show_error fi if test "$opt_texmflocal" = X; then braces=true if test "$opt_texmflocal_first" = X; then texmf="\$TEXMFLOCAL,$texmf" else texmf="$texmf,\$TEXMFLOCAL" fi ed "$dest_dir_texmf/web2c/texmf.cnf" >$ERRLOG 2>&1 <<-eof /^% *TEXMFLOCAL *=/ c TEXMFLOCAL = $opt_texmflocal_dir . w q eof show_error fi if test "$braces" = true; then texmf='!!{'"$texmf"'}' else texmf='!!'"$texmf" fi ed "$dest_dir_texmf/web2c/texmf.cnf" >$ERRLOG 2>&1 <<-eof /^TEXMF *=/ c TEXMF = $texmf . w q eof show_error } # fill a string with blanks: setlength() { var=$1 length=$2 eval value=\"\$$var\" l=`expr "$value" : '.*'` test $l -lt $length || return d=`expr $length - $l` OLDIFS=$IFS; IFS= substr=`awk 'END {print substr(" ", 1, ANZ)}' ANZ=$d &2 gzip -dc < $fullname | (umask 0; cd "$TMPDIR"; tar xf - kpsewhich) exp=`(foo=$foo $TMPDIR/kpsewhich --expand-var='$foo') 2>/dev/null` if test "x$foo" = "x$exp"; then echo "yes" >&2 ok=$i else echo "no" >&2 fi done test -n "$ok" && echo "$ok" } unset_vars() { for var in $envvars; do unset $var done } mkdirhier() { case $1 in /*) cd /;; esac OLDIFS=$IFS; IFS=/; eval set $1; IFS=$OLDIFS for i do test -d $i || mkdir $i || break cd $i || break done } # [t]ry again, [r]econfigure, [a] abort tra() { msg=$1 cls echo "Oops, I am in trouble here! The error was:" echo ">> $msg <<" echo case `getopt TRQ 'What shall we do now: t: try again, r: reconfigure, q: quit'` in T) return;; R) menu_main;; Q) exit 1;; esac } warn() { msg=$1 cls echo "Oops, I am in trouble here! The problem was:" echo ">> $msg <<" echo case `getopt CQ 'What shall we do now: c: ccontinue, q: quit'` in C) return;; Q) exit 1;; esac } fatal() { echo; echo echo "ERROR: $@." echo "This was a fatal error, my friend. Installation aborted." exit 1 } show_error() { test $? = 0 && return cls echo 'WARNING: the last command returned an error.' if yesno 'Do you want to see the errorlog'; then cat $ERRLOG | eval $PAGER readln fi cls } nonemptydir() { test -d "$1" && test -n "`ls \"$1\"`" return $? } # this is a hard job... trying to anticipiate trouble... sanity_checks() { while test "$opt_symlink" = X && test ! -z "$opt_symlinks_bin" && test -d "$opt_symlinks_bin" && test ! -w "$opt_symlinks_bin"; do tra "cannot write to directory $opt_symlinks_bin" done while test "$opt_symlink" = X && test ! -z "$opt_symlinks_man" && test -d "$opt_symlinks_man" && test ! -w "$opt_symlinks_man"; do tra "cannot write to directory $opt_symlinks_man" done while test "$opt_symlink" = X && test ! -z "$opt_symlinks_info" && test -d "$opt_symlinks_info" && test ! -w "$opt_symlinks_info"; do tra "cannot write to directory $opt_symlinks_info" done while test ! -z "$opt_varfonts_dir" && test -d "$opt_varfonts_dir" && test ! -w "$opt_varfonts_dir"; do tra "cannot write to directory $opt_varfonts_dir" done } prepare_directories() { platform_subdir_strip=false if test $s_bin_ns = 1; then cls textvar_show screen_mplatform_msg echo if yesno 'Do you want to omit the extra subdirectory'; then platform_subdir_strip=true fi fi alldirs="$TMPDIR $dest_dir_bin $dest_dir_texmf $dest_dir_man $dest_dir_info $opt_symlinks_bin $opt_symlinks_info" test -z "$opt_symlinks_man" || alldirs="$alldirs $opt_symlinks_man/man1 $opt_symlinks_man/man5" test -z "$opt_varfonts_dir" || alldirs="$alldirs $opt_varfonts_dir/pk $opt_varfonts_dir/tfm" test $platform_subdir_strip = true || alldirs="$alldirs $dest_dir_bin/$this_platform_d" for dir in $alldirs; do while test ! -d $dir || test ! -w $dir; do mkdirhier $dir test -d $dir || { tra "could not make directory '$dir'"; continue; } test -w $dir || { tra "cannot write to directory '$dir'"; continue; } done done chmod 700 $TMPDIR || fatal "command 'chmod 700 $TMPDIR' failed" if test -n "$opt_varfonts_dir"; then chmod 1777 $opt_varfonts_dir/pk $opt_varfonts_dir/tfm || fatal "command 'chmod 1777 $opt_varfonts_dir/pk $opt_varfonts_dir/tfm' failed" fi } opt_do_symlinks() { test "$opt_symlinks" = X || return $echon 'Creating symbolic links... ' if test -d $dest_dir_man/man1 && test -w $opt_symlinks_man/man1; then cd $opt_symlinks_man/man1 rm -f `ls $dest_dir_man/man1`; ln -s $dest_dir_man/man1/* . fi if test -d $dest_dir_info && test -w "$opt_symlinks_info"; then cd $opt_symlinks_info rm -f `(cd $dest_dir_info; ls *info*)`; ln -s $dest_dir_info/*info* . fi if test "$opt_symlinks" = X; then if test ! -z "$this_platform_bin"; then if test -w "$opt_symlinks_bin"; then cd $opt_symlinks_bin rm -f `ls $this_platform_bin`; ln -s $this_platform_bin/* . echo 'Done.' fi else cls echo ' WARNING! ' echo echo 'teTeX binaries for this platform are not installed. If you install' echo 'them later, you can create symbolic links to $opt_symlinks_bin' echo 'with a command like:' echo echo " ln -s $dest_dir_bin/PLATFORM/* $opt_symlinks_bin" echo echo 'PLATFORM needs to be replaced by the name of the subdirectory that' echo 'contains the binaries for this platform.' echo readln fi fi } locate_binaties() { this_platform_bin= for d in $dest_dir_bin/$this_platform_d $dest_dir_bin; do test -f $d/kpsewhich && this_platform_bin=$d done test -z "$this_platform_bin" && return PATH="${this_platform_bin}:${PATH}"; export PATH } untgz() { cd $TMPDIR for u_series in $S_all_la; do eval selected=\$s_${u_series}_ls for u_package in $selected; do case $u_series--$u_package in bin--*) d=$dest_dir_bin case "$platform_subdir_strip" in true) ;; *) eval thisp=\$p_${u_package}_d d=$d/$thisp mkdirhier $d esac;; doc--info) d=$dest_dir_info;; doc--man) d=$dest_dir_man;; *) d=$dest_dir_texmf;; esac eval file=\$p_${u_package}_fn list=`basename $file| sed 's@.tar.gz$@@'` package_showinfo $u_package if $checkit; then echo $echon "Testing integrity of file $file... " gzip --test $file if test $? = 0; then echo "Ok." else warn "Integrity of file $file is void." continue fi fi $echon "Extracting package $p_current_n... " gzip -dc < $file | (cd $d; tar xvf - ) >$ERRLOG 2>&1 if test $? = 0; then echo 'Done.' else show_error continue fi done done } prepare_errorlog() { touch "$ERRLOG" test -w "$ERRLOG" || fatal "cannot write to file '$ERRLOG'" } locate_binaries() { require_binaries touch sed awk gzip ln rm ls tar tr mkdir cat pwd } init() { cd $here # for fast installation: set CHECKIT_OVERRIDE to false in your environment. checkit=${CHECKIT_OVERRIDE-true} bad_sh prepare_errorlog locate_binaries find_echo unset_vars this_platform=`platform_guess` series_init nobin_stat } fixperm() { $echon 'Fixing permissions... ' echo 'Done.' } install_now() { umask 022 cls; sanity_checks cls; prepare_directories umask 0 cls; untgz cls; fixperm umask 022 locate_binaties opt_do_symlinks init_tetex cls if test ! -z "$this_platform_bin"; then if test -z "$opt_symlinks_bin"; then bin=$this_platform_bin else bin=$opt_symlinks_bin fi cat < $lsrfile ( cd $dest_dir_texmf \ls -LRa 2>/dev/null | sed 's%^[^.].*:$%./&%; /^\.$/d; /^\.\.$/d; /^lsR[0-9]*\.tmp$/d' ) 2>$ERRLOG >> $lsrfile show_error chmod 666 $lsrfile echo 'Done.' if test -n "$this_platform_bin"; then test "$debug" = true && { set; sleep 5; } $echon 'Creating base/fmt/mem files... ' TEXMFMAIN=$dest_dir_texmf TEXMF=$dest_dir_texmf $this_platform_bin/texconfig init >$ERRLOG 2>&1 show_error echo 'Done.' $echon "Setting permissions for fonts tree... " if test "x$opt_varfonts" = xX; then texconfig font ro else texconfig font rw fi >/dev/null 2>&1 echo Done. fi } init_tetex() { maketex_setopt texmfcnf_setup tetex_dump } ################################################################ # menus: ################################################################ menu_main() { while true; do cls textvar_show screen_main; echo case `getopt SDOIHQ 'Enter command'` in S) menu_series;; D) menu_directories;; O) menu_options;; I) install_now;; H) help help_1;; Q) exit_on_confirm;; esac done } dir_normalize() { dir=$1 eval val=\"\$$dir\" nval=`echo "$val/x" | sed 's@//*@/@g;s/^[^\/]*$/./; s/\/[^\/]*$//'` eval $dir='"$nval"' } selfauto_check() { selfauto case $selfauto_ok in false) cls echo 'Please note, that this combination of binary and texmf destinations' echo 'require that you set the TEXMFCNF environment variable to' echo " $dest_dir_texmf/web2c" echo echo 'If you do not change this setup and do not set the TEXMFCNF' echo 'environment variable, almost nothing in teTeX will work.' echo readln ;; esac } menu_directories() { while true; do cls textvar_show screen_directories; echo case `getopt 12345RQ 'Enter command'` in 1) gets dest_dir_prefix dir_normalize dest_dir_prefix #dest_dir_prefix=`echo "$dest_dir_prefix/x" | # sed 's@//*@/@g;s/^[^\/]*$/./; s/\/[^\/]*$//'` init_destdirs_by_prefix "$dest_dir_prefix";; 2) gets dest_dir_bin; dir_normalize dest_dir_bin; selfauto_check;; 3) gets dest_dir_texmf; dir_normalize dest_dir_texmf; selfauto_check;; 4) gets dest_dir_man; dir_normalize dest_dir_man;; 5) gets dest_dir_info; dir_normalize dest_dir_info;; R) return;; Q) exit_on_confirm;; esac done } menu_options() { while true; do cls textvar_show screen_options; echo case `getopt AVLSMRQ 'Enter command'` in A) toggle opt_varfonts if test "$opt_varfonts" = X; then cls; textvar_show screen_options; echo opt_varfonts_dir=$opt_varfonts_dir_last test -z "$opt_varfonts_dir" && opt_varfonts_dir=/var/tmp/texfonts gets opt_varfonts_dir 'varfonts directory' else opt_varfonts_dir_last=$opt_varfonts_dir opt_varfonts_dir= fi ;; V) toggle opt_vartexmf if test "$opt_vartexmf" = X; then cls; textvar_show screen_options; echo opt_vartexmf_dir=$opt_vartexmf_dir_last test -z "$opt_vartexmf_dir" && opt_vartexmf_dir=/var/tmp/texmf gets opt_vartexmf_dir 'vartexmf directory' else opt_vartexmf_dir_last=$opt_vartexmf_dir opt_vartexmf_dir= fi ;; L) toggle opt_texmflocal if test "$opt_texmflocal" = X; then cls; textvar_show screen_options; echo opt_texmflocal_dir=$opt_texmflocal_dir_last test -z "$opt_texmflocal_dir" && opt_texmflocal_dir=$dest_dir_texmf.local gets opt_texmflocal_dir 'local texmf directory' if yesno "search local tree before main tree"; then opt_texmflocal_first=X else opt_texmflocal_first=' ' fi else opt_texmflocal_dir_last=$opt_texmflocal_dir opt_texmflocal_dir= fi ;; S) toggle opt_symlinks if test "$opt_symlinks" = X; then cls; textvar_show screen_options; echo opt_symlinks_bin=$opt_symlinks_bin_last test -z "$opt_symlinks_bin" && opt_symlinks_bin=/usr/local/bin gets opt_symlinks_bin 'binary directory' opt_symlinks_man=$opt_symlinks_man_last test -z "$opt_symlinks_man" && opt_symlinks_man=`echo $opt_symlinks_bin | sed 's@//*@/@g; s/^[^\/]*$/./; s/\/[^\/]*$//'`/man gets opt_symlinks_man 'man directory ' opt_symlinks_info=$opt_symlinks_info_last test -z "$opt_symlinks_info" && opt_symlinks_info=`echo $opt_symlinks_bin | sed 's@//*@/@g; s/^[^\/]*$/./; s/\/[^\/]*$//'`/info gets opt_symlinks_info 'info directory ' else opt_symlinks_bin_last=$opt_symlinks_bin opt_symlinks_man_last=$opt_symlinks_man opt_symlinks_info_last=$opt_symlinks_info opt_symlinks_bin=; opt_symlinks_man=; opt_symlinks_info= fi ;; R) return;; Q) exit_on_confirm;; esac done } menu_series() { while true; do cls textvar_show screen_series; echo menu_series_ans=`getopt PBGFDRQ 'Enter command'` case "$menu_series_ans" in P) series=bin;; B) series=base;; G) series=goodies;; F) series=fonts;; D) series=doc;; esac case "$menu_series_ans" in [PBGFD]) while true; do cls; textvar_show screen_series; textvar_show s_${series}_h; echo case `getopt ANSLR "install series $series ([A]ll, [N]o, [S]elect, [L]ist, [R]eturn)"` in A) series_select_all $series; nobin_stat; break;; N) series_deselect_all $series; nobin_stat; break;; S) series_usersetup $series; series_list $series; nobin_stat; break;; L) series_list $series;; R) break;; esac done;; R) return;; Q) exit_on_confirm;; esac done } package_showinfo() { p=$1 cls eval p_current_du=\$p_${p}_du eval p_current_n=\$p_${p}_n eval p_current_l=\$p_${p}_l eval p_current_v=\$p_${p}_v echo "Package: $p_current_n" echo "Series: $series" if [ ! -z "$p_current_v" ] ; then echo "Version: $p_current_v" fi echo "Status: $p_current_l" echo "Disk space: $p_current_du" textvar_show p_${p}_h } series_usersetup() { su_series=$1 eval all_packages=\"\$s_${su_series}_lf\" for p in $all_packages; do package_showinfo $p echo p_current_s=false yesno "install package $p_current_n" && p_current_s=true eval p_${p}_s=$p_current_s done series_stat $su_series } exit_on_confirm() { cls yesno 'Really quit' && exit } ################################################################ # global variables ################################################################ here=`pwd` VERSION=1.0 # prefix in the archives. DO NOT CHANGE THE FOLLOWING LINE!! TMPDIR=${TMP-/tmp}/inst.tmp.$$ trap 'cd /; rm -rf "$TMPDIR"; trap 0; exit 0' 0 1 2 15 while test -d $TMPDIR; do tra "temporal directory $TMPDIR already exists" done mkdirhier $TMPDIR || exit ERRLOG=${TMPDIR}/inst.errlog.$$ : ${PAGER=more} envvars=' AFMFONTS BIBINPUTS BSTINPUTS DVILJFONTS DVIPSFONTS DVIPSHEADERS GFFONTS GLYPHFONTS INDEXSTYLE MFBASES MFINPUTS MFPOOL MFTINPUTS MPINPUTS MPMEMS MPPOOL MPSUPPORT OCPINPUTS OFMFONTS OPLFONTS OTPINPUTS OVFFONTS OVPFONTS PKFONTS PSHEADERS T1FONTS T1INPUTS TEXBIB TEXCONFIG TEXDOCS TEXFONTMAPS TEXFONTS TEXFORMATS TEXINDEXSTYLE TEXINPUTS TEXMFCNF TEXMFDBS TEXMFINI TEXPICTS TEXPKS TEXPOOL TEXPSHEADERS TEXSOURCES TFMFONTS TRFONTS VFFONTS XDVIFONTS XDVIVFS TEXMF VARTEXMF ' opt_varfonts=' ' opt_varfonts_dir= opt_varfonts_dir_last= opt_vartexmf=' ' opt_vartexmf_dir= opt_vartexmf_dir_last= opt_texmflocal=' ' opt_texmflocal_dir= opt_texmflocal_dir_last= opt_texmflocal_first=' ' opt_symlinks=' ' opt_symlinks_bin= opt_symlinks_man= opt_symlinks_info= opt_symlinks_bin_last= opt_symlinks_man_last= opt_symlinks_info_last= dest_dir_prefix=/usr/local/teTeX init_destdirs_by_prefix() { p=$1 dest_dir_bin=`echo $p/bin | sed s@//@/@g` dest_dir_texmf=`echo $p/share/texmf | sed s@//@/@g` dest_dir_man=`echo $p/man | sed s@//@/@g` dest_dir_info=`echo $p/info | sed s@//@/@g` } init_destdirs_by_prefix "$dest_dir_prefix" this_platform= S_nobin_la=' base goodies fonts doc ' S_all_la=" $S_nobin_la bin " s_base_la=' latex_base tetex_base ' # NEW PLATFORM: add entry in s_bin_la variable. s_bin_la=' alpha_linux_libc6 alpha_osf hppa11_hpux10 hppa11_hpux9 ix86_freebsd3 ix86_linux_libc5 ix86_linux_libc6 ix86_netbsd mab_nextstep3 mips_irix5 mips_irix6 mips_ultrix powerpc_aix4 powerpc_linux_libc60 powerpc_linux_libc61 powerpc_rhapsody rs6000_aix3 rs6000_aix4 sparc_linux_libc60 sparc_linux_libc61 sparc_solaris sparc_sunos ' s_doc_la=' catalogue faqs man info ' s_fonts_la=' ae ams blackboard hplj concrete ec yandy misc_mf misc_type1 sauter ' s_goodies_la=' latex_extra context drawing fontinst omega metapost misc_macros cyrillic polish greek ' s_base_n=base s_bin_n=binaries s_doc_n=documentation s_fonts_n=fonts s_goodies_n=goodies s_base_d=base s_bin_d=binaries s_doc_d=doc s_fonts_d=fonts s_goodies_d=goodies s_base_h=' This series contains the most basic packages that are needed for the basic functionality of teTeX and a small LaTeX system. ' s_bin_h=' This series contains the binaries for teTeX. There is one binary package for each supported platform containing all teTeX binaries for that platform. ' s_doc_h=' This series contains some larger documentation packages. ' s_fonts_h=' This series contains font packages. ' s_goodies_h=' This series contains some additional packages. ' ############################################################################# # packages: ############################################################################# p_latex_base_l=required p_tetex_base_l=required p_catalogue_l=optional p_faqs_l=optional p_man_l=recommended p_info_l=recommended p_ae_l=optional p_ams_l=recommended p_blackboard_l=optional p_hpljfonts_l=optional p_concrete_l=optional p_ec_l=optional p_misc_mf_l=optional p_misc_type1_l=optional p_sauter_l=optional p_yandy_l=optional p_context_l=optional p_czech_l=optional p_cyrillic_l=optional p_drawing_l=optional p_fontinst_l=optional p_greek_l=optional p_latex_extra_l=recommended p_metapost_l=optional p_misc_macros_l=optional p_omega_l=optional p_polish_l=optional ############################################################################# # The supported binaries. Add new platforms to the s_bin_la list and create # a p_PLATFORM st structure with the following variables: # _d: the directory name below bin for this platform # _du: disk usage # _n: name of the package # -h: help text ############################################################################# # NEW PLATFORM: add p_*_{l,d,du,n,h} variables. p_alpha_linux_libc6_l='optional' p_alpha_linux_libc6_d=alpha-linux-libc6 p_alpha_linux_libc6_du=10790 p_alpha_linux_libc6_n='DEC Alpha/Linux (libc 6.0 or later)' p_alpha_linux_libc6_h=' This package contains all binaries for DEC Alpha/Linux (libc 6.0 or later) platforms. ' p_alpha_osf_l='optional' p_alpha_osf_d=alpha-osf p_alpha_osf_du=12830 p_alpha_osf_n='DEC Alpha/Digital Unix (3.2 or later)' p_alpha_osf_h=' This package contains all binaries for DEC Alpha/Digital Unix (3.2 and later) platforms. ' p_hppa11_hpux10_l=optional p_hppa11_hpux10_d=hppa1.1-hpux10 p_hppa11_hpux10_du=10760 p_hppa11_hpux10_n='HPPA/HP-UX 10.xx' p_hppa11_hpux10_h=' This package contains all binaries for HPPA/HP-UX 10.xx platforms. ' p_hppa11_hpux9_l=optional p_hppa11_hpux9_d=hppa1.1-hpux9 p_hppa11_hpux9_du=10020 p_hppa11_hpux9_n='HPPA/HP-UX 9.xx' p_hppa11_hpux9_h=' This package contains all binaries for HPPA/HP-UX 9.xx platforms. ' p_ix86_freebsd2_l=optional p_ix86_freebsd2_d=ix86-freebsd2 p_ix86_freebsd2_du=3710 p_ix86_freebsd2_n='Intel x86/FreeBSD 2.x.y' p_ix86_freebsd2_h=' This package contains all binaries for Intel x86/FreeBSD 2.x.y platforms. ' p_ix86_freebsd3_l=optional p_ix86_freebsd3_d=ix86-freebsd3 p_ix86_freebsd3_du=7010 p_ix86_freebsd3_n='Intel x86/FreeBSD 3.x.y' p_ix86_freebsd3_h=' This package contains all binaries for Intel x86/FreeBSD 3.x.y platforms. ' p_ix86_linux_libc5_l=optional p_ix86_linux_libc5_d=ix86-linux-libc5 p_ix86_linux_libc5_du=7640 p_ix86_linux_libc5_n='Intel x86/Linux (libc 5)' p_ix86_linux_libc5_h=' This package contains all binaries for Linux on Intel x86 machines using libc 5. ' p_ix86_linux_libc6_l=optional p_ix86_linux_libc6_d=ix86-linux-libc6 p_ix86_linux_libc6_du=7570 p_ix86_linux_libc6_n='Intel x86/Linux (libc 6)' p_ix86_linux_libc6_h=' This package contains all binaries for Linux on Intel x86 machines using libc 6 (aka glibc 2). ' p_ix86_netbsd_l=optional p_ix86_netbsd_d=ix86-netbsd p_ix86_netbsd_du=7630 p_ix86_netbsd_n='Intel x86/NetBSD >= 1.3 and < 1.5' p_ix86_netbsd_h=' This package contains all binaries for Intel x86/NetBSD (version 1.3.2 and later, but before version 1.5) platforms. ' p_ix86_nextstep3_l=optional p_ix86_nextstep3_d=ix86-nextstep3 p_ix86_nextstep3_du=4780 p_ix86_nextstep3_n='Intel x86/NEXTSTEP 3' p_ix86_nextstep3_h=' This package contains all binaries for Intel x86/NEXTSTEP 3 platforms. ' p_ix86_solaris25_l=optional p_ix86_solaris25_d=ix86-solaris2.5 p_ix86_solaris25_du=3800 p_ix86_solaris25_n='Intel x86/Solaris2.5' p_ix86_solaris25_h=' This package contains all binaries for Intel x86/Solaris2.5 platforms. ' p_mab_nextstep3_l=optional p_mab_nextstep3_d=mab-nextstep3 p_mab_nextstep3_du=28492 p_mab_nextstep3_n='NEXTSTEP mab' p_mab_nextstep3_h=' This package contains all binaries for NEXTSTEP (NeXT,Intel,HP-PA,SPARC) platforms. ' p_mips_irix5_l=optional p_mips_irix5_d=mips-irix5 p_mips_irix5_du=16750 p_mips_irix5_n='SGI Irix 5.3 (or later)' p_mips_irix5_h=' This package contains all binaries for SGI Indigo machines running Irix-5.3 (or later). ' p_mips_irix6_l=optional p_mips_irix6_d=mips-irix6 p_mips_irix6_du=16430 p_mips_irix6_n='SGI Irix 6.2 (or later)' p_mips_irix6_h=' This package contains all binaries for SGI Indigo machines running Irix-6.2 (or later) ' p_mips_ultrix_l=optional p_mips_ultrix_d=mips-ultrix p_mips_ultrix_du=14830 p_mips_ultrix_n='Mips/Ultrix 4.4 (or later)' p_mips_ultrix_h=' This package contains all binaries for Mips/Ultrix 4.4 (or later) platforms. ' p_powerpc_aix4_l=optional p_powerpc_aix4_d=powerpc-aix4 p_powerpc_aix4_du=12840 p_powerpc_aix4_n='PowerPC AIX 4.2 (or later)' p_powerpc_aix4_h=' This package contains all binaries for PowerPC machines running AIX 4.2 (or later) ' p_powerpc_linux_libc60_l=optional p_powerpc_linux_libc60_d=powerpc-linux-libc6 p_powerpc_linux_libc60_du=8868 p_powerpc_linux_libc60_n='PowerPC Mklinux, glibc version 1.99 (or later)' p_powerpc_linux_libc60_h=' This package contains all binaries for PowerPC machines running Mklinux, glibc version 1.99 (or later). This corresponts to DR3 of Mklinux. ' p_powerpc_linux_libc61_l=optional p_powerpc_linux_libc61_d=powerpc-linux-libc6 p_powerpc_linux_libc61_du=8848 p_powerpc_linux_libc61_n='PowerPC Mklinux, glibc version 2.1.1 (or later)' p_powerpc_linux_libc61_h=' This package contains all binaries for PowerPC machines running Mklinux, glibc version 2.1.1 (or later). This corresponts to DR5 of Mklinux. ' p_powerpc_rhapsody_l=optional p_powerpc_rhapsody_d=powerpc-rhapsody p_powerpc_rhapsody_du=8620 p_powerpc_rhapsody_n='PowerPC MacOS X (Rhapsody 5.3 or later)' p_powerpc_rhapsody_h=' This package contains all binaries for PowerPC machines running MacOS X (Rhapsody 5.3 or later) ' p_rs6000_aix3_l=optional p_rs6000_aix3_d=rs6000-aix3 p_rs6000_aix3_du=10690 p_rs6000_aix3_n='IBM RS6000 AIX 3.2.5 (or later)' p_rs6000_aix3_h=' This package contains all binaries for IBM RS600 machines running AIX 3.2.5 (or later). ' p_rs6000_aix4_l=optional p_rs6000_aix4_d=rs6000-aix4 p_rs6000_aix4_du=11400 p_rs6000_aix4_n='IBM RS6000 AIX 4.1.4 (or later)' p_rs6000_aix4_h=' This package contains all binaries for IBM RS600 machines running AIX 4.1.4 (or later). ' p_sparc_linux_libc60_l=optional p_sparc_linux_libc60_d=sparc-linux-libc60 p_sparc_linux_libc60_du=7880 p_sparc_linux_libc60_n='SUN Sparc Linux, glibc 2.0' p_sparc_linux_libc60_h=' This package contains all binaries for SUN Sparcs running Linux, glibc 2.0. ' p_sparc_linux_libc61_l=optional p_sparc_linux_libc61_d=sparc-linux-libc61 p_sparc_linux_libc61_du=8170 p_sparc_linux_libc61_n='SUN Sparc Linux, glibc 2.1' p_sparc_linux_libc61_h=' This package contains all binaries for SUN Sparcs running Linux, glibc 2.1. ' p_sparc_solaris_l=optional p_sparc_solaris_d=sparc-solaris p_sparc_solaris_du=8910 p_sparc_solaris_n='SUN Sparc Solaris 2.4 (or later)' p_sparc_solaris_h=' This package contains all binaries for SUN Sparcs running Solaris 2.4 (or later). ' p_sparc_sunos_l=optional p_sparc_sunos_d=sparc-sunos p_sparc_sunos_du=12780 p_sparc_sunos_n='SUN Sparc SunOS 4.1.1 (or later)' p_sparc_sunos_h=' This package contains all binaries for SUN Sparcs running SunOS 4.1.1 (or later) ' p_latex_base_d=latex-base p_latex_base_du=6940 p_latex_base_v='<1998/12/01>' p_latex_base_n='LaTeX base' p_latex_base_h=' This package contains a minimal set of macros to use the LaTeX format. ' p_tetex_base_d=tetex-base p_tetex_base_du=19700 p_tetex_base_n='teTeX base' p_tetex_base_h=' This package contains the most basic input files for teTeX: runtime configuration files, hyphenation tables, manpages and the computer modern fonts. ' p_catalogue_d=catalogue p_catalogue_du=3660 p_catalogue_n='The TeX Catalogue' p_catalogue_h=' This package contains TeX Catalogue in html format. It is a quite complete list of all known TeX packages. ' p_faqs_d=faqs p_faqs_du=1220 p_faqs_n='FAQs' p_faqs_h=' This package contains several versions of the TeX FAQ (frequently asked questions; with answers, of course). ' p_man_d=man p_man_du=310 p_man_n='UNIX manual pages' p_man_h=' This package contains UNIX manual pages for almost all programs that are contained in teTeX. ' p_info_d=info p_info_du=1400 p_info_n='GNU info pages' p_info_h=' This package contains some documentation in GNU info format. ' p_ae_d=ae p_ae_du=520 p_ae_n='Virtual Cork encoded Computer Modern (AE)' p_ae_h=' If you use T1 encoding in LaTeX using the standard fonts, LaTeX usually uses the EC fonts. One drawback of these fonts is, that they are not freely available in type1 format. This package conbines the best of type1 computer modern fonts (suitable for creating PDF documents of high quality) and T1 encoding (good hyphenation when using \"8bit\" characters). ' p_concrete_d=concrete p_concrete_du=390 p_concrete_n='Concrete' p_concrete_h=' This package contains the following font families: Concrete, Concrete Math and European Concrete. ' p_ec_d=ec p_ec_du=1160 p_ec_n='European Computer Modern (EC / TC)' p_ec_h=' This package contains the European Computer Modern font family. ' p_yandy_d=yandy p_yandy_du=3520 p_yandy_n='Y&Y fonts support (Lucida / Mathtime)' p_yandy_h=' This package contains the support files (metrics) for Lucida Bright, Lucida New Math and Mathtime. It is only useful if you already have the fonts in Postscript Type1 format. They can be bought from Y&Y (http://www.yandy.com/). ' p_misc_mf_d=misc-mf p_misc_mf_du=3180 p_misc_mf_n='miscellaneous' p_misc_mf_h=' This package contains miscellaneous fonts: cmbright cmextra euxm gothic pandora rsfs stmary wasy ' p_misc_type1_d=misc-type1 p_misc_type1_du=1040 p_misc_type1_n='miscellaneous (type1)' p_misc_type1_h=' This package contains miscellaneous fonts in Postscript Type1 format: Adobe Utopia, Bitstream Charter, Martin Vogels Symbole ' p_sauter_d=sauter p_sauter_du=410 p_sauter_n='Sauter' p_sauter_h=' This package contains the sauter fonts. This package allows to use several fonts at (nearly) arbitrary sizes. ' p_ams_d=ams p_ams_du=2690 p_ams_n='AMS fonts' p_ams_h=' This package contains the AMS (american mathematical society) fonts. ' p_blackboard_d=blackboard p_blackboard_du=610 p_blackboard_n='Blackboard' p_blackboard_h=' This package contains several fonts for blackboard bold or doublestroke characters, namely: dstroke, bbm, bbold. ' p_hplj_d=hplj p_hplj_du=1580 p_hplj_n='HP Laserjet fonts' p_hplj_h=' This package contains font metrics for the fonts build into HP Laserwriter printers. ' p_context_d=context p_context_du=8100 p_context_n='Context macros' p_context_h=' ConTeXt is a parameter driven macro package written in TeX. It is integrated, rather complete and has extensive support for interactive documents. You can define your own layouts without hacking TeX code. Visit www.pragma-ade.nl for the latest source code, (interactive) example documents and manuals. ' p_cyrillic_d=cyrillic p_cyrillic_du=5060 p_cyrillic_n='Cyrillic fonts / macros' p_cyrillic_h=' This package contains the fonts (lh) and macros (cyrplain) for typesetting cyrillic. ' p_czech_d=czech p_czech_du=3000 p_czech_n='Czech/Slovak fonts / macros' p_czech_h=' This package contains the fonts and macros for typesetting Czech / Slovak. ' p_drawing_d=drawing p_drawing_du=6650 p_drawing_n='Drawing support' p_drawing_h=' This package contains several macro packages for doing graphics in TeX: pstricks texdraw xypic ' p_fontinst_d=fontinst p_fontinst_du=650 p_fontinst_n='fontinst utility' p_fontinst_h=' This package contains the macros for the fontinst utility. Fontinst allows you to create the metrics for using Postscript Type1 fonts in TeX. ' p_greek_d=greek p_greek_du=560 p_greek_n='Greek fonts' p_greek_h=' This package contains some fonts in Metafont format for typesetting text in the Greek language (from Claudio Beccari). ' p_latex_extra_d=latex-extra p_latex_extra_du=15430 p_latex_extra_n='LaTeX extra' p_latex_extra_h=' This package contains a lot of extra packages for LaTeX. You should install it is you are using LaTeX seriously. ' p_metapost_d=metapost p_metapost_du=1600 p_metapost_n='Metapost support' p_metapost_h=' This package contains the support files for using Metapost. Metapost is similar to Metafont, but its output format is Postscript. ' p_misc_macros_d=misc-macros p_misc_macros_du=1100 p_misc_macros_n='Miscellaneous TeX macro files' p_misc_macros_h=' This package contains miscellaneous TeX macro files. Among them are macro files for eplain, amstex, eijkhout and the localloc package. ' p_omega_d=omega p_omega_du=5290 p_omega_n='Omega support' p_omega_h=' This package contains the support files for a TeX variant named Omega. Omega is based on Unicode and has much better support for non-latin languages than standard TeX. ' p_polish_d=polish p_polish_du=2790 p_polish_n='Polish fonts / macros' p_polish_h=' This package contains support for using the Polish language in TeX. It contains the fonts plfonts, cc-pl and the macros for mex and platex. ' ################################################################ # screens: ################################################################ screen_main='====================> teTeX $VERSION installation procedure <==================== detected platform: $this_platform_n series: binaries: $s_bin_ns out of $s_bin_nf, disk space required: $s_bin_dus kB other (summary): $S_nobin_ns out of $S_nobin_nf, disk space required: $S_nobin_dus kB total disk space: $s_total_dus kB directories (destination prefix: $dest_dir_prefix) options: [$opt_varfonts] use alternate directory for automatically generated fonts [$opt_vartexmf] use separate tree for variable files [$opt_texmflocal] use local texmf support tree [$opt_symlinks] create symlinks in standard directories Other commands: start installation, help, quit ' screen_directories='Current directories setup: ============================================================================== <1> target (prefix): $dest_dir_prefix <2> directory for binaries: $dest_dir_bin <3> main texmf tree: $dest_dir_texmf <4> UNIX man pages: $dest_dir_man <5> GNU info pages: $dest_dir_info Other options: ============================================================================== return to main menu quit ' screen_options='Current options setup: ============================================================================== alternate directory for automatically generated fonts: [$opt_varfonts] directory name: $opt_varfonts_dir separate tree for variable files: [$opt_vartexmf] directory name: $opt_vartexmf_dir local texmf support tree [$opt_texmflocal] search local tree before main tree [$opt_texmflocal_first] directory name: $opt_texmflocal_dir create symlinks in standard directories: [$opt_symlinks] binaries to: $opt_symlinks_bin manpages to: $opt_symlinks_man info to: $opt_symlinks_info Other options: ============================================================================== return to main menu quit ' screen_series='Current series setup: ==============================================================================

platforms: $s_bin_ns out of $s_bin_nf, disk space required: $s_bin_dus kB base: $s_base_ns out of $s_base_nf, disk space required: $s_base_dus kB goodies: $s_goodies_ns out of $s_goodies_nf, disk space required: $s_goodies_dus kB fonts: $s_fonts_ns out of $s_fonts_nf, disk space required: $s_fonts_dus kB doc: $s_doc_ns out of $s_doc_nf, disk space required: $s_doc_dus kB total disk space: $s_total_dus kB ============================================================================== return to main menu quit ' screen_mplatform_msg='teTeX can be used on multiple platforms by having a subdirectory for each installed binary package in $dest_dir_bin. However, if you do not plan to add binaries for other platforms to your teTeX installation, your binaries can directly be put into the $dest_dir_bin directory.' help_1=' This is the installation program of the teTeX distribution. The installation procedure is really simple: just go through the menus and select \"start installation\" if all options are set up all right. To select a menu item (a letter or a number makred with brackets) just enter the corresponding letter or number and press return (the letters are case insensitive). Right now, the each menu item is explained in detail: ====================================================================== The detected platform: ====================================================================== From the list of supported platforms, the installation procedure tries to find out which binaries do run best on your system, if it is supported. These binaries are then pre-selected. If you plan an installation for a hetrogenous network, you may need to add binaries for other platforms via the series menue (see below). ====================================================================== The series menu () ====================================================================== The series menu allows you to select and deselect packages. The packages are grouped in some series: binaries: you need one binary package for each platform you use base: this series contains a minimal TeX+LaTeX system All other series are \"add-ons\": goodies: useful extra stuff, including much about LaTeX fonts: many extra fonts: amsfonts, PostScript fonts, dc, ec, ... doc: much documentation. But one cannot have enough, right? ====================================================================== The directories menu () ====================================================================== The teTeX distribution will be installed to the destination directories that you choose here. Selecting a new target (prefix) resets all the other directories to defaults relative to the selected prefix. The binaries will be put directly into \"directory for binaries\" or into one or more platform specific subdirectories. The \"main texmf tree\" is a large directory tree with fonts, macros and documentation. It can be shared between different operating systems and different TeX implementations. ====================================================================== The options menu () ====================================================================== The options are optional part of the installation, as they are not always applicable or useful. \"alternate directory (fonts)\" ============================= If you choose an alternate directory for automatically generated fonts, you can mount your TEXMFMAIN tree readonly (as long as you do not want to perform administrative tasks: change configuration, install new inputs and the like). There are two good reasons to do this: - TEXMFMAIN is in your /usr partition and you want to mount it readonly (or in another partition that you mount readonly) - TEXMFMAIN will be accessable via NFS and you do not want to give write permissions to your NFS clients If the second case applies to you, please note that the filename database (ls-R) and the automatically generated fonts will be installed in the alternate directory you choose. If this directory is local to each client, you need to run texhash on each machine to build the filename database there. Another disadvantage is that new fonts are not shared in that case. \"separate tree for variable files\" ================================== You kan keep some variable data (format files for TeX and configuration data) outside your main support tree. The advantages are that you can have your configuration files outside the large system support tree (which you can replace/remove without loosing your configuration data if you choose this option) and eventually store the main support tree in a read-only area. \"local texmf support tree\" ========================== The recommended way to add new fonts/macros or to replace existing versions by more recent ones is to put them into a local support tree. Such a support tree should be listed in the TEXMF variable in a texmf.cnf configuration file to make sure that all programs will use it. By choosing this option, the installer will do that modification for you. You should only choose to \"search local tree before main tree\" if you are sure that no obsolete or otherwise conflicting files in your local texmf tree will cause trouble. \"symlinks in standard directories\" ================================== To make your binaries, manpages and infopages available to your system, there are two common ways: 1) install them in \"standard places\" that are searched for these files 2) change your search paths to include the new directories If you select the \"symlinks\" option, symbolic links will be installed in the directories you choose. Note that if you share the teTeX installation accross several machines via NFS and if the chosen \"standard places\" are not shared, you need to create the symbolic links on each client, too (or use method 2 on your clients). If you do not use the \"symlinks\" option, you propably need to set up your search paths (PATH, MANPATH, INFOPATH). ====================================================================== Other commands (, and ) ====================================================================== Well, this is easy to explain: starts the installation after you are confident with set setup displays this help quits the installation program ' guess() { cat > $TMPDIR/config.guess <<'eof-for-guess' #! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 93, 94, 95, 96, 97, 1998 Free Software Foundation, Inc. # # This file 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. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Written by Per Bothner . # The master version of this file is at the FSF in /home/gd/gnu/lib. # # This script attempts to guess a canonical system name similar to # config.sub. If it succeeds, it prints the system name on stdout, and # exits with 0. Otherwise, it exits with 1. # # The plan is that this can be called by configure scripts if you # don't specify an explicit system type (host/target name). # # Only a few systems have been added to this list; please add others # (but try to keep the structure clean). # # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 8/24/94.) if (test -f /.attbin/uname) >/dev/null 2>&1 ; then PATH=$PATH:/.attbin ; export PATH fi UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown trap 'rm -f dummy.c dummy.o dummy; exit 1' 1 2 15 # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in alpha:OSF1:*:*) if test $UNAME_RELEASE = "V4.0"; then UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` fi # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. cat <dummy.s .globl main .ent main main: .frame \$30,0,\$26,0 .prologue 0 .long 0x47e03d80 # implver $0 lda \$2,259 .long 0x47e20c21 # amask $2,$1 srl \$1,8,\$2 sll \$2,2,\$2 sll \$0,3,\$0 addl \$1,\$0,\$0 addl \$2,\$0,\$0 ret \$31,(\$26),1 .end main EOF ${CC-cc} dummy.s -o dummy 2>/dev/null if test "$?" = 0 ; then ./dummy case "$?" in 7) UNAME_MACHINE="alpha" ;; 15) UNAME_MACHINE="alphaev5" ;; 14) UNAME_MACHINE="alphaev56" ;; 10) UNAME_MACHINE="alphapca56" ;; 16) UNAME_MACHINE="alphaev6" ;; esac fi rm -f dummy.s dummy echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr [[A-Z]] [[a-z]]` exit 0 ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 exit 0 ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-cbm-sysv4 exit 0;; amiga:NetBSD:*:*) echo m68k-cbm-netbsd${UNAME_RELEASE} exit 0 ;; amiga:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos exit 0 ;; arc64:OpenBSD:*:*) echo mips64el-unknown-openbsd${UNAME_RELEASE} exit 0 ;; arc:OpenBSD:*:*) echo mipsel-unknown-openbsd${UNAME_RELEASE} exit 0 ;; hkmips:OpenBSD:*:*) echo mips-unknown-openbsd${UNAME_RELEASE} exit 0 ;; pmax:OpenBSD:*:*) echo mipsel-unknown-openbsd${UNAME_RELEASE} exit 0 ;; sgi:OpenBSD:*:*) echo mips-unknown-openbsd${UNAME_RELEASE} exit 0 ;; wgrisc:OpenBSD:*:*) echo mipsel-unknown-openbsd${UNAME_RELEASE} exit 0 ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit 0;; arm32:NetBSD:*:*) echo arm-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` exit 0 ;; SR2?01:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp exit 0;; Pyramid*:OSx*:*:*|MIS*:OSx*:*:*|MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. if test "`(/bin/universe) 2>/dev/null`" = att ; then echo pyramid-pyramid-sysv3 else echo pyramid-pyramid-bsd fi exit 0 ;; NILE:*:*:dcosx) echo pyramid-pyramid-svr4 exit 0 ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; i86pc:SunOS:5.*:*) echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; sun4*:SunOS:*:*) case "`/usr/bin/arch -k`" in Series*|S4*) UNAME_RELEASE=`uname -v` ;; esac # Japanese Language versions have a version number like `4.1.3-JL'. echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` exit 0 ;; sun3*:SunOS:*:*) echo m68k-sun-sunos${UNAME_RELEASE} exit 0 ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(head -1 /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 case "`/bin/arch`" in sun3) echo m68k-sun-sunos${UNAME_RELEASE} ;; sun4) echo sparc-sun-sunos${UNAME_RELEASE} ;; esac exit 0 ;; aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} exit 0 ;; atari*:NetBSD:*:*) echo m68k-atari-netbsd${UNAME_RELEASE} exit 0 ;; atari*:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; sun3*:NetBSD:*:*) echo m68k-sun-netbsd${UNAME_RELEASE} exit 0 ;; sun3*:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; mac68k:NetBSD:*:*) echo m68k-apple-netbsd${UNAME_RELEASE} exit 0 ;; mac68k:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; mvme68k:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; mvme88k:OpenBSD:*:*) echo m88k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} exit 0 ;; macppc:NetBSD:*:*) echo powerpc-apple-netbsd${UNAME_RELEASE} exit 0 ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 exit 0 ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix${UNAME_RELEASE} exit 0 ;; VAX*:ULTRIX*:*:*) echo vax-dec-ultrix${UNAME_RELEASE} exit 0 ;; 2020:CLIX:*:*) echo clipper-intergraph-clix${UNAME_RELEASE} exit 0 ;; mips:*:*:UMIPS | mips:*:*:RISCos) sed 's/^ //' << EOF >dummy.c int main (argc, argv) int argc; char **argv; { #if defined (host_mips) && defined (MIPSEB) #if defined (SYSTYPE_SYSV) printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_SVR4) printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); #endif #endif exit (-1); } EOF ${CC-cc} dummy.c -o dummy \ && ./dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ && rm dummy.c dummy && exit 0 rm -f dummy.c dummy echo mips-mips-riscos${UNAME_RELEASE} exit 0 ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix exit 0 ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 exit 0 ;; m88k:*:4*:R4*) echo m88k-motorola-sysv4 exit 0 ;; m88k:*:3*:R3*) echo m88k-motorola-sysv3 exit 0 ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` if [ $UNAME_PROCESSOR = mc88100 -o $UNAME_PROCESSOR = mc88110 ] ; then if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx \ -o ${TARGET_BINARY_INTERFACE}x = x ] ; then echo m88k-dg-dgux${UNAME_RELEASE} else echo m88k-dg-dguxbcs${UNAME_RELEASE} fi else echo i586-dg-dgux${UNAME_RELEASE} fi exit 0 ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit 0 ;; M88*:*:R3*:*) # Delta 88k system running SVR3 echo m88k-motorola-sysv3 exit 0 ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) echo m88k-tektronix-sysv3 exit 0 ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd exit 0 ;; *:IRIX*:*:*) echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` exit 0 ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i?86:AIX:*:*) echo i386-ibm-aix exit 0 ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then sed 's/^ //' << EOF >dummy.c #include main() { if (!__power_pc()) exit(1); puts("powerpc-ibm-aix3.2.5"); exit(0); } EOF ${CC-cc} dummy.c -o dummy && ./dummy && rm dummy.c dummy && exit 0 rm -f dummy.c dummy echo rs6000-ibm-aix3.2.5 elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then echo rs6000-ibm-aix3.2.4 else echo rs6000-ibm-aix3.2 fi exit 0 ;; *:AIX:*:4) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | head -1 | awk '{ print $1 }'` if /usr/sbin/lsattr -EHl ${IBM_CPU_ID} | grep POWER >/dev/null 2>&1; then IBM_ARCH=rs6000 else IBM_ARCH=powerpc fi if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=4.${UNAME_RELEASE} fi echo ${IBM_ARCH}-ibm-aix${IBM_REV} exit 0 ;; *:AIX:*:*) echo rs6000-ibm-aix exit 0 ;; ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 exit 0 ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC NetBSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to exit 0 ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx exit 0 ;; DPX/2?00:B.O.S.:*:*) echo m68k-bull-sysv3 exit 0 ;; 9000/[34]??:4.3bsd:1.*:*) echo m68k-hp-bsd exit 0 ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 exit 0 ;; 9000/[34678]??:HP-UX:*:*) case "${UNAME_MACHINE}" in 9000/31? ) HP_ARCH=m68000 ;; 9000/[34]?? ) HP_ARCH=m68k ;; 9000/6?? | 9000/7?? | 9000/80[24] | 9000/8?[13679] | 9000/892 ) sed 's/^ //' << EOF >dummy.c #include #include int main () { #if defined(_SC_KERNEL_BITS) long bits = sysconf(_SC_KERNEL_BITS); #endif long cpu = sysconf (_SC_CPU_VERSION); switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0"); break; case CPU_PA_RISC1_1: puts ("hppa1.1"); break; case CPU_PA_RISC2_0: #if defined(_SC_KERNEL_BITS) switch (bits) { case 64: puts ("hppa2.0w"); break; case 32: puts ("hppa2.0n"); break; default: puts ("hppa2.0"); break; } break; #else /* !defined(_SC_KERNEL_BITS) */ puts ("hppa2.0"); break; #endif default: puts ("hppa1.0"); break; } exit (0); } EOF (${CC-cc} dummy.c -o dummy 2>/dev/null ) && HP_ARCH=`./dummy` rm -f dummy.c dummy esac HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit 0 ;; 3050*:HI-UX:*:*) sed 's/^ //' << EOF >dummy.c #include int main () { long cpu = sysconf (_SC_CPU_VERSION); /* The order matters, because CPU_IS_HP_MC68K erroneously returns true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct results, however. */ if (CPU_IS_PA_RISC (cpu)) { switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; default: puts ("hppa-hitachi-hiuxwe2"); break; } } else if (CPU_IS_HP_MC68K (cpu)) puts ("m68k-hitachi-hiuxwe2"); else puts ("unknown-hitachi-hiuxwe2"); exit (0); } EOF ${CC-cc} dummy.c -o dummy && ./dummy && rm dummy.c dummy && exit 0 rm -f dummy.c dummy echo unknown-hitachi-hiuxwe2 exit 0 ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) echo hppa1.1-hp-bsd exit 0 ;; 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd exit 0 ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) echo hppa1.1-hp-osf exit 0 ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf exit 0 ;; i?86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-unknown-osf1mk else echo ${UNAME_MACHINE}-unknown-osf1 fi exit 0 ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites exit 0 ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd exit 0 ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit 0 ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd exit 0 ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd exit 0 ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd exit 0 ;; CRAY*X-MP:*:*:*) echo xmp-cray-unicos exit 0 ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} exit 0 ;; CRAY*[A-Z]90:*:*:*) echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ exit 0 ;; CRAY*TS:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} exit 0 ;; CRAY-2:*:*:*) echo cray2-cray-unicos exit 0 ;; F300:UNIX_System_V:*:*) FUJITSU_SYS=`uname -p | tr [A-Z] [a-z] | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` echo "f300-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit 0 ;; F301:UNIX_System_V:*:*) echo f301-fujitsu-uxpv`echo $UNAME_RELEASE | sed 's/ .*//'` exit 0 ;; hp3[0-9][05]:NetBSD:*:*) echo m68k-hp-netbsd${UNAME_RELEASE} exit 0 ;; hp300:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; sparc*:BSD/OS:*:*) echo sparc-unknown-bsdi${UNAME_RELEASE} exit 0 ;; i?86:BSD/386:*:* | *:BSD/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} exit 0 ;; *:FreeBSD:*:*) echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit 0 ;; *:NetBSD:*:*) echo ${UNAME_MACHINE}-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` exit 0 ;; *:OpenBSD:*:*) echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` exit 0 ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit 0 ;; i*:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit 0 ;; p*:CYGWIN*:*) echo powerpcle-unknown-cygwin exit 0 ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; *:GNU:*:*) echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit 0 ;; *:Linux:*:*) # uname on the ARM produces all sorts of strangeness, and we need to # filter it out. case "$UNAME_MACHINE" in arm* | sa110*) UNAME_MACHINE="arm" ;; esac # The BFD linker knows what the default object file format is, so # first see if it will tell us. ld_help_string=`ld --help 2>&1` ld_supported_emulations=`echo $ld_help_string \ | sed -ne '/supported emulations:/!d s/[ ][ ]*/ /g s/.*supported emulations: *// s/ .*// p'` case "$ld_supported_emulations" in i?86linux) echo "${UNAME_MACHINE}-pc-linux-gnuaout" ; exit 0 ;; i?86coff) echo "${UNAME_MACHINE}-pc-linux-gnucoff" ; exit 0 ;; sparclinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;; armlinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;; m68klinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;; elf32ppc) echo "powerpc-unknown-linux-gnu" ; exit 0 ;; esac if test "${UNAME_MACHINE}" = "alpha" ; then sed 's/^ //' <dummy.s .globl main .ent main main: .frame \$30,0,\$26,0 .prologue 0 .long 0x47e03d80 # implver $0 lda \$2,259 .long 0x47e20c21 # amask $2,$1 srl \$1,8,\$2 sll \$2,2,\$2 sll \$0,3,\$0 addl \$1,\$0,\$0 addl \$2,\$0,\$0 ret \$31,(\$26),1 .end main EOF LIBC="" ${CC-cc} dummy.s -o dummy 2>/dev/null if test "$?" = 0 ; then ./dummy case "$?" in 7) UNAME_MACHINE="alpha" ;; 15) UNAME_MACHINE="alphaev5" ;; 14) UNAME_MACHINE="alphaev56" ;; 10) UNAME_MACHINE="alphapca56" ;; 16) UNAME_MACHINE="alphaev6" ;; esac objdump --private-headers dummy | \ grep ld.so.1 > /dev/null if test "$?" = 0 ; then LIBC="libc1" fi fi rm -f dummy.s dummy echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} ; exit 0 elif test "${UNAME_MACHINE}" = "mips" ; then cat >dummy.c </dev/null && ./dummy "${UNAME_MACHINE}" && rm dummy.c dummy && exit 0 rm -f dummy.c dummy else # Either a pre-BFD a.out linker (linux-gnuoldld) # or one that does not give us useful --help. # GCC wants to distinguish between linux-gnuoldld and linux-gnuaout. # If ld does not provide *any* "supported emulations:" # that means it is gnuoldld. echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations:" test $? != 0 && echo "${UNAME_MACHINE}-pc-linux-gnuoldld" && exit 0 case "${UNAME_MACHINE}" in i?86) VENDOR=pc; ;; *) VENDOR=unknown; ;; esac # Determine whether the default compiler is a.out or elf cat >dummy.c < main(argc, argv) int argc; char *argv[]; { #ifdef __ELF__ # ifdef __GLIBC__ # if __GLIBC__ >= 2 printf ("%s-${VENDOR}-linux-gnu\n", argv[1]); # else printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]); # endif # else printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]); # endif #else printf ("%s-${VENDOR}-linux-gnuaout\n", argv[1]); #endif return 0; } EOF ${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy "${UNAME_MACHINE}" && rm dummy.c dummy && exit 0 rm -f dummy.c dummy fi ;; # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. earlier versions # are messed up and put the nodename in both sysname and nodename. i?86:DYNIX/ptx:4*:*) echo i386-sequent-sysv4 exit 0 ;; i?86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} exit 0 ;; i?86:*:4.*:* | i?86:SYSTEM_V:4.*:*) if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then echo ${UNAME_MACHINE}-univel-sysv${UNAME_RELEASE} else echo ${UNAME_MACHINE}-pc-sysv${UNAME_RELEASE} fi exit 0 ;; i?86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')` (/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486 (/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL else echo ${UNAME_MACHINE}-pc-sysv32 fi exit 0 ;; i?86:UnixWare:*:*) if /bin/uname -X 2>/dev/null >/dev/null ; then (/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 fi echo ${UNAME_MACHINE}-unixware-${UNAME_RELEASE}-${UNAME_VERSION} exit 0 ;; pc:*:*:*) # uname -m prints for DJGPP always 'pc', but it prints nothing about # the processor, so we play safe by assuming i386. echo i386-pc-msdosdjgpp exit 0 ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit 0 ;; paragon:*:*:*) echo i860-intel-osf1 exit 0 ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 fi exit 0 ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv exit 0 ;; M68*:*:R3V[567]*:*) test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; 3[34]??:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && echo i486-ncr-sysv4.3${OS_REL} && exit 0 /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && echo i486-ncr-sysv4 && exit 0 ;; m68*:LynxOS:2.*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} exit 0 ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit 0 ;; i?86:LynxOS:2.*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit 0 ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} exit 0 ;; rs6000:LynxOS:2.*:* | PowerPC:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit 0 ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} exit 0 ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 exit 0 ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` echo ${UNAME_MACHINE}-sni-sysv4 else echo ns32k-sni-sysv fi exit 0 ;; PENTIUM:CPunix:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says echo i586-unisys-sysv4 exit 0 ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm echo hppa1.1-stratus-sysv4 exit 0 ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 exit 0 ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} exit 0 ;; news*:NEWS-OS:*:6*) echo mips-sony-newsos6 exit 0 ;; R3000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R4000:UNIX_SV:*:*) if [ -d /usr/nec ]; then echo mips-nec-sysv${UNAME_RELEASE} else echo mips-unknown-sysv${UNAME_RELEASE} fi exit 0 ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos exit 0 ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. echo powerpc-apple-beos exit 0 ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos exit 0 ;; esac #echo '(No uname command or uname output not recognized.)' 1>&2 #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 cat >dummy.c < # include #endif main () { #if defined (sony) #if defined (MIPSEB) /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, I don't know.... */ printf ("mips-sony-bsd\n"); exit (0); #else #include printf ("m68k-sony-newsos%s\n", #ifdef NEWSOS4 "4" #else "" #endif ); exit (0); #endif #endif #if defined (__arm) && defined (__acorn) && defined (__unix) printf ("arm-acorn-riscix"); exit (0); #endif #if defined (hp300) && !defined (hpux) printf ("m68k-hp-bsd\n"); exit (0); #endif #if defined (NeXT) #if !defined (__ARCHITECTURE__) #define __ARCHITECTURE__ "m68k" #endif int version; version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); exit (0); #endif #if defined (MULTIMAX) || defined (n16) #if defined (UMAXV) printf ("ns32k-encore-sysv\n"); exit (0); #else #if defined (CMU) printf ("ns32k-encore-mach\n"); exit (0); #else printf ("ns32k-encore-bsd\n"); exit (0); #endif #endif #endif #if defined (__386BSD__) printf ("i386-pc-bsd\n"); exit (0); #endif #if defined (sequent) #if defined (i386) printf ("i386-sequent-dynix\n"); exit (0); #endif #if defined (ns32000) printf ("ns32k-sequent-dynix\n"); exit (0); #endif #endif #if defined (_SEQUENT_) struct utsname un; uname(&un); if (strncmp(un.version, "V2", 2) == 0) { printf ("i386-sequent-ptx2\n"); exit (0); } if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ printf ("i386-sequent-ptx1\n"); exit (0); } printf ("i386-sequent-ptx\n"); exit (0); #endif #if defined (vax) #if !defined (ultrix) printf ("vax-dec-bsd\n"); exit (0); #else printf ("vax-dec-ultrix\n"); exit (0); #endif #endif #if defined (alliant) && defined (i860) printf ("i860-alliant-bsd\n"); exit (0); #endif exit (1); } EOF ${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy && rm dummy.c dummy && exit 0 rm -f dummy.c dummy # Apollos put the system type in the environment. test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; } # Convex versions that predate uname can use getsysinfo(1) if [ -x /usr/convex/getsysinfo ] then case `getsysinfo -f cpu_type` in c1*) echo c1-convex-bsd exit 0 ;; c2*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit 0 ;; c34*) echo c34-convex-bsd exit 0 ;; c38*) echo c38-convex-bsd exit 0 ;; c4*) echo c4-convex-bsd exit 0 ;; esac fi #echo '(Unable to guess system type)' 1>&2 exit 1 eof-for-guess cd $TMPDIR; sh $TMPDIR/config.guess } #debug=true debug= ################################################################ # main() ################################################################ init menu_main