1#! /bin/sh 2# cygwin.sh - hints for building perl using the Cygwin environment for Win32 3# 4 5# not otherwise settable 6exe_ext='.exe' 7firstmakefile='GNUmakefile' 8case "$ldlibpthname" in 9'') ldlibpthname=PATH ;; 10esac 11archobjs='cygwin.o' 12 13# mandatory (overrides incorrect defaults) 14test -z "$cc" && cc='gcc' 15if test -z "$plibpth" 16then 17 plibpth=`gcc -print-file-name=libc.a` 18 plibpth=`dirname $plibpth` 19 plibpth=`cd $plibpth && pwd` 20fi 21so='dll' 22# - eliminate -lc, implied by gcc and a symlink to libcygwin.a 23libswanted=`echo " $libswanted " | sed -e 's/ c / /g'` 24# - eliminate -lm, symlink to libcygwin.a 25libswanted=`echo " $libswanted " | sed -e 's/ m / /g'` 26# - eliminate -lutil, symbols are all in libcygwin.a 27libswanted=`echo " $libswanted " | sed -e 's/ util / /g'` 28# - add libgdbm_compat $libswanted 29# - libcygipc doesn't work much at all with 30# the Perl SysV IPC tests so not adding it --jhi 2003-08-09 31# (with cygwin 1.5.7, cygipc is deprecated in favor of the builtin cygserver) 32libswanted="$libswanted gdbm_compat" 33test -z "$optimize" && optimize='-O2' 34ccflags="$ccflags -DPERL_USE_SAFE_PUTENV -U__STRICT_ANSI__" 35# - otherwise i686-cygwin 36archname='cygwin' 37 38# dynamic loading 39# - otherwise -fpic 40cccdlflags=' ' 41lddlflags=' --shared' 42ld='g++' 43 44case "$osvers" in 45 46# Configure gets these wrong if the IPC server isn't yet running: 47# only use for 1.5.7 and onwards 48[2-9]*|1.[6-9]*|1.[1-5][0-9]*|1.5.[7-9]*|1.5.[1-6][0-9]*) 49 d_semctl_semid_ds='define' 50 d_semctl_semun='define' 51 ;; 52esac; 53 54# compile Win32CORE "module" as static 55static_ext="$static_ext Win32CORE" 56 57# Win9x problem with non-blocking read from a closed pipe 58d_eofnblk='define' 59 60# suppress auto-import warnings 61ldflags="$ldflags -Wl,--enable-auto-import -Wl,--export-all-symbols -Wl,--stack,8388608 -Wl,--enable-auto-image-base -Wl,--enable-auto-import" 62lddlflags="$lddlflags $ldflags" 63 64# strip exe's and dll's 65#ldflags="$ldflags -s" 66ccdlflags="$ccdlflags -s" 67#lddlflags="$lddlflags -s" 68