32d03266fe2c9b47c5ae2eafeb67f9c1f08a177a
[p5sagit/p5-mst-13.2.git] / hints / cygwin.sh
1 #! /bin/sh
2 # cygwin.sh - hints for building perl using the Cygwin environment for Win32
3 #
4
5 # not otherwise settable
6 exe_ext='.exe'
7 firstmakefile='GNUmakefile'
8 case "$ldlibpthname" in
9 '') ldlibpthname=PATH ;;
10 esac
11 archobjs='cygwin.o'
12
13 # mandatory (overrides incorrect defaults)
14 test -z "$cc" && cc='gcc'
15 if test -z "$plibpth"
16 then
17     plibpth=`gcc -print-file-name=libc.a`
18     plibpth=`dirname $plibpth`
19     plibpth=`cd $plibpth && pwd`
20 fi
21 so='dll'
22 # - eliminate -lc, implied by gcc and a symlink to libcygwin.a
23 libswanted=`echo " $libswanted " | sed -e 's/ c / /g'`
24 # - eliminate -lm, symlink to libcygwin.a
25 libswanted=`echo " $libswanted " | sed -e 's/ m / /g'`
26 # - add libgdbm_compat & libcygipc to $libswanted
27 libswanted="$libswanted gdbm_compat cygipc"
28 test -z "$optimize" && optimize='-O2'
29 ccflags="$ccflags -DPERL_USE_SAFE_PUTENV"
30 # - otherwise i686-cygwin
31 archname='cygwin'
32
33 # dynamic loading
34 # - otherwise -fpic
35 cccdlflags=' '
36 ld='ld2'
37
38 # Win9x problem with non-blocking read from a closed pipe
39 d_eofnblk='define'
40
41 # strip exe's and dll's
42 #ldflags="$ldflags -s"
43 #ccdlflags="$ccdlflags -s"
44 #lddlflags="$lddlflags -s"