| 16 |
|
echo "Set the environment variable RAYPATH=.:$ldir" |
| 17 |
|
echo 'For C-shell users, put the following into ~/.cshrc' |
| 18 |
|
echo " setenv RAYPATH .:$ldir" |
| 19 |
< |
echo 'For Bourne shell users, put the following into $HOME/profile' |
| 19 |
> |
echo 'For Bourne shell users, put the following into $HOME/.profile' |
| 20 |
|
echo " RAYPATH=.:$ldir" |
| 21 |
|
echo " export RAYPATH" |
| 22 |
|
echo "" |
| 23 |
|
exit 0 |
| 24 |
|
endif |
| 25 |
< |
set srcdirs=( common meta cv gen ot rt px hd util cal ) |
| 25 |
> |
set srcdirs=( common rt meta cv gen ot px hd util cal ) |
| 26 |
|
if ( "$1" == install ) then |
| 27 |
|
cat << _EOF_ |
| 28 |
|
|
| 72 |
|
goto again1 |
| 73 |
|
endif |
| 74 |
|
endif |
| 75 |
+ |
set inpath=0 |
| 76 |
+ |
foreach i ( $path ) |
| 77 |
+ |
if ( "$i" == "$idir" ) then |
| 78 |
+ |
set inpath=1 |
| 79 |
+ |
break |
| 80 |
+ |
endif |
| 81 |
+ |
end |
| 82 |
|
set rmake=$idir/rmake |
| 83 |
|
if ( "`ls -tL $rmake $0 |& head -1`" == $rmake ) then |
| 84 |
|
goto gotrmake |
| 85 |
|
endif |
| 86 |
|
set newrmake |
| 87 |
< |
goto skiplicense |
| 81 |
< |
cat << _EOF_ |
| 82 |
< |
|
| 83 |
< |
RADIANCE LICENSE AGREEMENT |
| 84 |
< |
|
| 85 |
< |
Radiance is a registered copyright of The Regents of the University of |
| 86 |
< |
California ("The Regents"). The Regents grant to you a nonexclusive, |
| 87 |
< |
nontransferable license ("License") to use Radiance source code without |
| 88 |
< |
fee. You may not sell or distribute Radiance to others without the |
| 89 |
< |
prior express written permission of The Regents. You may compile and |
| 90 |
< |
use this software on any machines to which you have personal access, |
| 91 |
< |
and may share its use with others who have access to the same machines. |
| 92 |
< |
|
| 93 |
< |
NEITHER THE UNITED STATES NOR THE UNITED STATES DEPARTMENT OF ENERGY, NOR ANY |
| 94 |
< |
OF THEIR EMPLOYEES, MAKES ANY WARRANTY, EXPRESS OR IMPLIED, OR ASSUMES ANY |
| 95 |
< |
LEGAL LIABILITY OR RESPONSIBILITY FOR THE ACCURACY, COMPLETENESS, OR USEFULNESS |
| 96 |
< |
OF ANY INFORMATION, APPARATUS, PRODUCT, OR PROCESS DISCLOSED, OR REPRESENTS |
| 97 |
< |
THAT ITS USE WOULD NOT INFRINGE PRIVATELY OWNED RIGHTS. By downloading, using |
| 98 |
< |
or copying this software, you agree to abide by the intellectual property laws |
| 99 |
< |
and all other applicable laws of the United States, and by the terms of this |
| 100 |
< |
License Agreement. Ownership of the software shall remain solely in The |
| 101 |
< |
Regents. The Regents shall have the right to terminate this License |
| 102 |
< |
immediately by written notice upon your breach of, or noncompliance with, any |
| 103 |
< |
of its terms. You shall be liable for any infringement or damages resulting |
| 104 |
< |
from your failure to abide by the terms of this License Agreement. |
| 105 |
< |
|
| 106 |
< |
_EOF_ |
| 87 |
> |
more src/common/copyright.h |
| 88 |
|
echo -n "Do you understand and accept the terms of this agreement [n]? " |
| 89 |
|
set ans="$<" |
| 90 |
|
if ( "$ans" !~ [yY]* ) exit |
| 110 |
– |
echo -n "Are you a new Radiance user or with a new address [y]? " |
| 111 |
– |
set ans="$<" |
| 112 |
– |
if ( "$ans" !~ [nN]* ) then |
| 113 |
– |
csh -f newuser |
| 114 |
– |
else |
| 115 |
– |
echo `cat src/rt/VERSION` compiled by `whoami` | mail [email protected] |
| 116 |
– |
endif |
| 117 |
– |
skiplicense: |
| 91 |
|
set special= |
| 92 |
|
set arch= |
| 93 |
|
set opt= |
| 100 |
|
Please select your system type from the following list: |
| 101 |
|
|
| 102 |
|
1) Sun Solaris |
| 103 |
< |
2) HP workstation |
| 104 |
< |
3) Silicon Graphics |
| 105 |
< |
4) AIX (RS/6000) |
| 106 |
< |
5) BSDI BSD/386 |
| 107 |
< |
6) Linux |
| 135 |
< |
7) MacOS X |
| 136 |
< |
8) FreeBSD |
| 137 |
< |
9) Cygwin |
| 138 |
< |
10) Other |
| 103 |
> |
2) Linux |
| 104 |
> |
3) MacOS X |
| 105 |
> |
4) FreeBSD |
| 106 |
> |
5) Cygwin |
| 107 |
> |
6) Other |
| 108 |
|
|
| 109 |
|
_EOF_ |
| 110 |
|
echo -n "Choice? " |
| 113 |
|
case 1: # SPARC Station |
| 114 |
|
set arch=sun |
| 115 |
|
set mach="-I/usr/openwin/include -L/usr/openwin/lib -DNOSTEREO" |
| 147 |
– |
set opt="-O -DSPEED=80" |
| 148 |
– |
set compat="bmalloc.o strcmp.o getpagesize.o" |
| 149 |
– |
breaksw |
| 150 |
– |
case 2: # HP workstation |
| 151 |
– |
set mach="" |
| 152 |
– |
set opt="-O -DSPEED=80 -Aa -D_HPUX_SOURCE" |
| 153 |
– |
set compat="bmalloc.o getpagesize.o strcmp.o" |
| 154 |
– |
set arch=hpux |
| 155 |
– |
breaksw |
| 156 |
– |
case 3: # Silicon Graphics |
| 157 |
– |
set arch=sgi |
| 158 |
– |
switch (`uname -r`) |
| 159 |
– |
case 3.*: |
| 160 |
– |
set mach="-noprototypes" |
| 161 |
– |
set opt="-O -DSPEED=80" |
| 162 |
– |
set special="sgi" |
| 163 |
– |
set compat="malloc.o strcmp.o" |
| 164 |
– |
breaksw |
| 165 |
– |
case 4.*: |
| 166 |
– |
set mach="" |
| 167 |
– |
set opt="-O2 -DSPEED=100" |
| 168 |
– |
set compat="malloc.o strcmp.o" |
| 169 |
– |
set extras='"MLIB=-lfastm -lm"' |
| 170 |
– |
breaksw |
| 171 |
– |
default: # 5.x or later |
| 172 |
– |
ln -s `which wish` $idir/wish4.0 |
| 173 |
– |
set path=($idir $path) |
| 174 |
– |
set mach="-w" |
| 175 |
– |
set opt="-O2 -DSPEED=200" |
| 176 |
– |
set special="ogl" |
| 177 |
– |
set compat="bmalloc.o strcmp.o" |
| 178 |
– |
breaksw |
| 179 |
– |
endsw |
| 180 |
– |
breaksw |
| 181 |
– |
case 4: # AIX |
| 116 |
|
set opt="-O" |
| 117 |
< |
set compat="bmalloc.o erf.o strcmp.o" |
| 184 |
< |
set arch=PowerPC |
| 117 |
> |
set compat="strcmp.o timegm.o" |
| 118 |
|
breaksw |
| 119 |
< |
case 5: # BSDI BSD/386 |
| 187 |
< |
set mach="-DBSD -L/usr/X11/lib -I/usr/X11/include" |
| 188 |
< |
set opt="-O -DSPEED=100" |
| 189 |
< |
set arch=IBMPC |
| 190 |
< |
set compat="malloc.o erf.o strcmp.o" |
| 191 |
< |
breaksw |
| 192 |
< |
case 6: # Linux |
| 119 |
> |
case 2: # Linux |
| 120 |
|
set mach="-Dlinux -D_FILE_OFFSET_BITS=64 -L/usr/X11R6/lib -I/usr/include/X11 -DNOSTEREO" |
| 121 |
< |
set opt="-O2 -DSPEED=200" |
| 121 |
> |
set opt="-O2" |
| 122 |
|
set arch=IBMPC |
| 123 |
< |
set compat="bmalloc.o erf.o getpagesize.o" |
| 123 |
> |
set compat="erf.o" |
| 124 |
|
set extras=CC=gcc |
| 125 |
|
breaksw |
| 126 |
< |
case 7: # MacOS X |
| 126 |
> |
case 3: # MacOS X |
| 127 |
|
set mach="-DBSD -DNOSTEREO -Dfreebsd -I/usr/X11R6/include -L/usr/X11R6/lib" |
| 128 |
< |
set opt="-O2 -DSPEED=200" |
| 129 |
< |
set arch=PowerPC |
| 130 |
< |
set compat="bmalloc.o" |
| 204 |
< |
set extras="CC=cc CONFIGURE_ARCH=powerpc" |
| 128 |
> |
set opt="-O2" |
| 129 |
> |
set arch=Intel |
| 130 |
> |
set extras="CC=cc CONFIGURE_ARCH=i386" |
| 131 |
|
set special="ogl" |
| 132 |
|
breaksw |
| 133 |
< |
case 8: # FreeBSD |
| 133 |
> |
case 4: # FreeBSD |
| 134 |
|
set mach="-DBSD -DNOSTEREO -Dfreebsd -I/usr/X11R6/include -L/usr/X11R6/lib" |
| 135 |
< |
set opt="-O -DSPEED=200" |
| 136 |
< |
set compat="bmalloc.o erf.o" |
| 137 |
< |
set extras="CC=cc" |
| 135 |
> |
set opt="-O" |
| 136 |
> |
set compat="erf.o" |
| 137 |
> |
set extras='CC=cc MLIB="-lcompat -lm"' |
| 138 |
|
set arch=IBMPC |
| 139 |
|
breaksw |
| 140 |
< |
case 9: # Cygwin |
| 140 |
> |
case 5: # Cygwin |
| 141 |
|
set mach="-Dfreebsd -L/usr/lib -L/usr/X11R6/lib -I/usr/include/X11 -I/usr/X11R6/include -DNOSTEREO" |
| 142 |
< |
set opt="-O2 -DSPEED=200" |
| 142 |
> |
set opt="-O2" |
| 143 |
|
set arch=IBMPC |
| 144 |
< |
set compat="bmalloc.o erf.o getpagesize.o" |
| 144 |
> |
set compat="erf.o" |
| 145 |
|
set extras="CC=gcc" |
| 146 |
|
set special="ogl" |
| 147 |
|
set esuffix=".exe" |
| 148 |
|
breaksw |
| 149 |
< |
case 10: # Other |
| 149 |
> |
case 6: # Other |
| 150 |
|
set opt="-O" |
| 151 |
< |
set compat="bmalloc.o erf.o strcmp.o" |
| 151 |
> |
set compat="erf.o strcmp.o" |
| 152 |
|
echo -n "Are you using the GNU C compiler [n]? " |
| 153 |
|
if ( "$<" =~ [yY]* ) then |
| 154 |
|
set extras="CC=gcc" |
| 155 |
+ |
else |
| 156 |
+ |
set compat="$compat timegm.o" |
| 157 |
|
endif |
| 158 |
|
set arch=other |
| 159 |
|
breaksw |
| 211 |
|
echo "Done." |
| 212 |
|
endif |
| 213 |
|
cd .. |
| 214 |
< |
if (! -d /usr/tmp) then |
| 215 |
< |
ln -s /tmp /usr/tmp |
| 216 |
< |
if ($status) then |
| 217 |
< |
echo "" |
| 218 |
< |
echo "IMPORTANT: Execute 'sudo ln -s /tmp /usr/tmp'" |
| 219 |
< |
echo "" |
| 220 |
< |
endif |
| 214 |
> |
if (! $inpath ) then |
| 215 |
> |
echo "" |
| 216 |
> |
echo "Add $idir to the beginning of your execution path:" |
| 217 |
> |
echo 'For C-shell users, put the following into ~/.cshrc' |
| 218 |
> |
echo " set path=( $idir "'$path )' |
| 219 |
> |
echo 'For Bourne shell users, put the following into $HOME/.profile' |
| 220 |
> |
echo " PATH=$idir"':$PATH' |
| 221 |
> |
echo " export PATH" |
| 222 |
|
endif |
| 223 |
|
else |
| 224 |
|
cd src |
| 228 |
|
make -f Rmakefile $* |
| 229 |
|
popd |
| 230 |
|
end |
| 302 |
– |
echo "Done." |
| 231 |
|
cd .. |
| 304 |
– |
endif |
| 232 |
|
foreach i ( $* ) |
| 233 |
|
if ( "$i" == clean ) then |
| 234 |
|
echo "Removing library archives..." |
| 235 |
< |
rm -f src/lib/*.[ao] |
| 235 |
> |
rm -f src/lib/*.{a,o,la} |
| 236 |
|
endif |
| 237 |
|
end |
| 238 |
+ |
echo "Done." |
| 239 |
+ |
endif |
| 240 |
|
exit 0 |