Changeset 5899 for trunk/Ohana/configure
- Timestamp:
- Jan 4, 2006, 10:00:03 PM (21 years ago)
- File:
-
- 1 edited
-
trunk/Ohana/configure (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/configure
r3892 r5899 18 18 set vararch = 0 19 19 set prefix = "" 20 21 set bindir = "" 22 set libdir = "" 23 set incdir = "" 24 set mandir = "" 25 set datadir = "" 26 set sysconfdir = "" 27 set optflags = "-g -O0" 28 set pedantic = "" 29 20 30 set root = "" 21 31 set args = "" 22 32 while ("$1" != "") 23 33 switch ($1) 24 case --prefix25 shift26 set prefix = $127 breaksw;28 34 case --vararch 29 35 set vararch = 1 30 36 breaksw; 37 case --enable-optimze 38 set optflags = "-O2" 39 breaksw; 40 case --pedantic 41 set pedantic = "-Wall -Werror" 42 breaksw; 43 case --prefix* 44 set prefix = `echo $1 | tr = ' ' | awk '{print $2}'` 45 breaksw; 46 case --bindir* 47 set bindir = `echo $1 | tr = ' ' | awk '{print $2}'` 48 breaksw; 49 case --libdir* 50 set libdir = `echo $1 | tr = ' ' | awk '{print $2}'` 51 breaksw; 52 case --includedir* 53 set incdir = `echo $1 | tr = ' ' | awk '{print $2}'` 54 breaksw; 55 case --sysconfdir* 56 set sysconfdir = `echo $1 | tr = ' ' | awk '{print $2}'` 57 breaksw; 58 case --datadir* 59 set datadir = `echo $1 | tr = ' ' | awk '{print $2}'` 60 breaksw; 61 case --mandir* 62 set mandir = `echo $1 | tr = ' ' | awk '{print $2}'` 63 breaksw; 64 case --help: 31 65 case -*: 32 66 goto usage … … 157 191 echo ROOT: $root 158 192 echo PREFIX: $prefix 193 echo 194 195 #echo BINDIR $bindir 196 #echo LIBDIR $libdir 197 #echo INCDIR $incdir 198 #echo DATADIR $datadir 199 #echo MANDIR $mandir 159 200 160 201 if (-e Configure) mv Configure Configure.bak 161 202 203 rm -f Configure.in.tmp Configure.tmp 204 cp Configure.in Configure.in.tmp 205 206 # modify the BINDIR 207 if ("$bindir" == "") then 208 set subdir = bin/$arch 209 if ($vararch) set subdir = 'bin/$(ARCH)' 210 set bindir = $prefix/$subdir 211 endif 212 cat Configure.in.tmp | sed "s| BINDIR| $bindir|" > Configure.tmp 213 rm -f Configure.in.tmp 214 mv Configure.tmp Configure.in.tmp 215 echo BINDIR $bindir 216 217 # modify the INCDIR 218 if ("$incdir" == "") then 219 set subdir = include/$arch 220 if ($vararch) set subdir = 'include/$(ARCH)' 221 set incdir = $prefix/$subdir 222 endif 223 cat Configure.in.tmp | sed "s| INCDIR| $incdir|" > Configure.tmp 224 rm -f Configure.in.tmp 225 mv Configure.tmp Configure.in.tmp 226 echo INCDIR $incdir 227 228 # modify the LIBDIR 229 if ("$libdir" == "") then 230 set subdir = lib/$arch 231 if ($vararch) set subdir = 'lib/$(ARCH)' 232 set libdir = $prefix/$subdir 233 endif 234 cat Configure.in.tmp | sed "s| LIBDIR| $libdir|" > Configure.tmp 235 rm -f Configure.in.tmp 236 mv Configure.tmp Configure.in.tmp 237 echo LIBDIR $libdir 238 239 # modify the MANDIR 240 if ("$mandir" == "") then 241 set mandir = $prefix/man 242 endif 243 cat Configure.in.tmp | sed "s| MANDIR| $mandir|" > Configure.tmp 244 rm -f Configure.in.tmp 245 mv Configure.tmp Configure.in.tmp 246 echo MANDIR $mandir 247 248 # modify the HELPDIR 249 if ("$datadir" == "") then 250 set datadir = $prefix 251 endif 252 set helpdir = $datadir/help 253 cat Configure.in.tmp | sed "s| HELPDIR| $helpdir|" > Configure.tmp 254 rm -f Configure.in.tmp 255 mv Configure.tmp Configure.in.tmp 256 echo HELPDIR $helpdir 257 162 258 if ($vararch) then 163 cat Configure.in | sed "s|ROOTDIR|$root|" | sed "s|PREFIX|$prefix|" | sed "s|^\s*ARCH|# ARCH|" | sed "s|XINCDIR|$xinc|" | sed "s|XLIBDIR|$xlib|" > Configure 164 echo "" 165 echo "include $prefix/bin/"\$"ARCH in your path" 259 cat Configure.in.tmp | sed "s|^\s*ARCH|# ARCH|" > Configure.tmp 166 260 else 167 cat Configure.in | sed "s|ROOTDIR|$root|" | sed "s|PREFIX|$prefix|" | sed "s|ARCHVAL|$arch|" | sed "s|XINCDIR|$xinc|" | sed "s|XLIBDIR|$xlib|" > Configure 168 echo "" 169 echo "include $prefix/bin/$arch in your path" 261 cat Configure.in.tmp | sed "s|ARCHVAL|$arch|" > Configure.tmp 170 262 endif 263 rm -f Configure.in.tmp 264 mv Configure.tmp Configure.in.tmp 265 266 cat Configure.in.tmp | sed "s|ROOTDIR|$root|" | sed "s|XINCDIR|$xinc|" | sed "s|XLIBDIR|$xlib|" | sed "s|OPTFLAGS|$optflags $pedantic|" > Configure 267 268 echo "" 269 echo "include $bindir in your path" 171 270 172 271 exit 0 173 272 174 273 usage: 175 echo "USAGE: configure [--prefix (dir)] [--vararch]" 176 echo "set the installation directory root with --prefix" 177 echo "if you define the environment variable $ARCH, you can set --vararch" 274 cat <<EOF 275 USAGE: configure [OPTION] 276 277 set the installation directory root with --prefix 278 if you define the environment variable ARCH, you can set --vararch 279 280 Configuration: 281 -h, --help display this help and exit 282 --enable-optimize enable compiler optimization 283 --pedantic include -Wall -Werror on compilation 284 285 Installation directories: 286 --prefix=PREFIX install architecture-independent files in PREFIX 287 --vararch install with ARCH suffixes for variable architectures 288 289 Fine tuning of the installation directories: 290 --bindir=DIR user executables [PREFIX/bin/$ARCH] 291 --libdir=DIR object code libraries [PREFIX/lib/$ARCH] 292 --includedir=DIR C header files [PREFIX/include] 293 --mandir=DIR man documentation [PREFIX/man] 294 --datadir=DIR read-only architecture-independent data [PREFIX/share] 295 --sysconfdir=DIR read-only single-machine data [PREFIX/etc] 296 297 EOF 178 298 exit 2;
Note:
See TracChangeset
for help on using the changeset viewer.
