| 1 | extproc perl -S -w
|
|---|
| 2 |
|
|---|
| 3 | # The converted script is written to stdout, so run this script as
|
|---|
| 4 | # convert_configure configure > configure.cmd
|
|---|
| 5 | #
|
|---|
| 6 | # When the converted script runs, it expects that /tmp dir is
|
|---|
| 7 | # available (so we create it).
|
|---|
| 8 | #
|
|---|
| 9 | # run the result like this:
|
|---|
| 10 | # .\configure
|
|---|
| 11 |
|
|---|
| 12 | # Some frequent manual intervention:
|
|---|
| 13 | # a) Some makefiles hardwire SHELL = /bin/sh ==> change to: sh
|
|---|
| 14 | # b) Some makefiles recognize that exe files terminate on .exe
|
|---|
| 15 | # You need to give this script -no-zexe option...
|
|---|
| 16 |
|
|---|
| 17 | shift, $no_zexe = 1 if @ARGV and $ARGV[0] eq '-no-zexe';
|
|---|
| 18 |
|
|---|
| 19 | mkdir '/tmp', 0777 unless -d '/tmp';
|
|---|
| 20 |
|
|---|
| 21 | print <<EOF;
|
|---|
| 22 | extproc sh
|
|---|
| 23 |
|
|---|
| 24 | EOF
|
|---|
| 25 |
|
|---|
| 26 | print <<EOF unless $no_zexe;
|
|---|
| 27 | # Make sensible defaults:
|
|---|
| 28 | CC="gcc -Zexe -Zmt"
|
|---|
| 29 | export CC
|
|---|
| 30 | CXX="gcc -Zexe -Zmt"
|
|---|
| 31 | export CXX
|
|---|
| 32 | #GCCOPT="$GCCOPT -Zexe"
|
|---|
| 33 | #export GCCOPT
|
|---|
| 34 | EOF
|
|---|
| 35 |
|
|---|
| 36 | print <<EOF;
|
|---|
| 37 | CONFIG_SHELL=sh
|
|---|
| 38 | export CONFIG_SHELL
|
|---|
| 39 |
|
|---|
| 40 | # Optimization (GNU make 3.74 cannot be loaded :-():
|
|---|
| 41 | emxload -m 30 sh.exe ls.exe tr.exe id.exe sed.exe # make.exe
|
|---|
| 42 | emxload -m 30 grep.exe egrep.exe fgrep.exe cat.exe rm.exe mv.exe cp.exe
|
|---|
| 43 | emxload -m 30 uniq.exe basename.exe sort.exe awk.exe echo.exe
|
|---|
| 44 |
|
|---|
| 45 |
|
|---|
| 46 | EOF
|
|---|
| 47 |
|
|---|
| 48 | $checking_path = 0;
|
|---|
| 49 |
|
|---|
|
|---|