Commit | Line | Data |
5aabfad6 |
1 | #! /bin/sh |
2c2d71f5 |
2 | # cygwin.sh - hints for building perl using the Cygwin environment for Win32 |
5aabfad6 |
3 | # |
f89d6eaa |
4 | |
d702ae42 |
5 | # not otherwise settable |
f89d6eaa |
6 | exe_ext='.exe' |
f89d6eaa |
7 | firstmakefile='GNUmakefile' |
d702ae42 |
8 | case "$ldlibpthname" in |
9 | '') ldlibpthname=PATH ;; |
10 | esac |
5db16f6a |
11 | archobjs='cygwin.o' |
f89d6eaa |
12 | |
4fabb596 |
13 | # mandatory (overrides incorrect defaults) |
c22e42be |
14 | test -z "$cc" && cc='gcc' |
4fabb596 |
15 | if test -z "$plibpth" |
d702ae42 |
16 | then |
4fabb596 |
17 | plibpth=`gcc -print-file-name=libc.a` |
18 | plibpth=`dirname $plibpth` |
19 | plibpth=`cd $plibpth && pwd` |
d702ae42 |
20 | fi |
f89d6eaa |
21 | so='dll' |
5d129265 |
22 | # - eliminate -lc, implied by gcc and a symlink to libcygwin.a |
4fabb596 |
23 | libswanted=`echo " $libswanted " | sed -e 's/ c / /g'` |
5d129265 |
24 | # - eliminate -lm, symlink to libcygwin.a |
25 | libswanted=`echo " $libswanted " | sed -e 's/ m / /g'` |
ab9778ab |
26 | # - eliminate -lutil, symbols are all in libcygwin.a |
27 | libswanted=`echo " $libswanted " | sed -e 's/ util / /g'` |
2bf8728c |
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 |
ab9778ab |
31 | # (with cygwin 1.5.7, cygipc is deprecated in favor of the builtin cygserver) |
2bf8728c |
32 | libswanted="$libswanted gdbm_compat" |
b4bcd662 |
33 | test -z "$optimize" && optimize='-O2' |
47dafe4d |
34 | ccflags="$ccflags -DPERL_USE_SAFE_PUTENV" |
4fabb596 |
35 | # - otherwise i686-cygwin |
d702ae42 |
36 | archname='cygwin' |
4fabb596 |
37 | |
38 | # dynamic loading |
4fabb596 |
39 | # - otherwise -fpic |
40 | cccdlflags=' ' |
5db16f6a |
41 | ld='ld2' |
d702ae42 |
42 | |
ab9778ab |
43 | case "$osvers" in |
44 | |
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' |
50 | ;; |
51 | esac; |
52 | |
5db16f6a |
53 | # Win9x problem with non-blocking read from a closed pipe |
54 | d_eofnblk='define' |
55 | |
d702ae42 |
56 | # strip exe's and dll's |
57 | #ldflags="$ldflags -s" |
58 | #ccdlflags="$ccdlflags -s" |
59 | #lddlflags="$lddlflags -s" |