2 # cygwin.sh - hints for building perl using the Cygwin environment for Win32
5 # not otherwise settable
7 firstmakefile='GNUmakefile'
8 case "$ldlibpthname" in
9 '') ldlibpthname=PATH ;;
13 # mandatory (overrides incorrect defaults)
14 test -z "$cc" && cc='gcc'
17 plibpth=`gcc -print-file-name=libc.a`
18 plibpth=`dirname $plibpth`
19 plibpth=`cd $plibpth && pwd`
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 # - eliminate -lutil, symbols are all in libcygwin.a
27 libswanted=`echo " $libswanted " | sed -e 's/ util / /g'`
28 # - add libgdbm_compat $libswanted
29 libswanted="$libswanted gdbm_compat"
30 test -z "$optimize" && optimize='-O3'
32 test -z "$use64bitint" && use64bitint='define'
33 test -z "$usethreads" && usethreads='define'
34 ccflags="$ccflags -DPERL_USE_SAFE_PUTENV -U__STRICT_ANSI__"
35 # - otherwise i686-cygwin
42 test -z "$ld" && ld='g++'
45 # Configure gets these wrong if the IPC server isn't yet running:
46 # only use for 1.5.7 and onwards
47 [2-9]*|1.[6-9]*|1.[1-5][0-9]*|1.5.[7-9]*|1.5.[1-6][0-9]*)
48 d_semctl_semid_ds='define'
49 d_semctl_semun='define'
60 # IPv6 not implemented before cygwin-1.7
65 # compile Win32CORE "module" as static. try to avoid the space.
66 if test -z "$static_ext"; then
67 static_ext="Win32CORE"
69 static_ext="$static_ext Win32CORE"
72 # Win9x problem with non-blocking read from a closed pipe
75 # suppress auto-import warnings
76 ldflags="$ldflags -Wl,--enable-auto-import -Wl,--export-all-symbols -Wl,--enable-auto-image-base"
77 lddlflags="$lddlflags $ldflags"
79 # strip exe's and dll's, better do it afterwards
80 #ldflags="$ldflags -s"
81 #ccdlflags="$ccdlflags -s"
82 #lddlflags="$lddlflags -s"