;;
*) case "$useshrplib" in
'') case "$osname" in
- svr4*|dgux|dynixptx|esix|powerux|beos)
+ svr4*|dgux|dynixptx|esix|powerux|beos|cygwin*)
dflt=y
also='Building a shared libperl is required for dynamic loading to work on your system.'
;;
linux*) # ld won't link with a bare -lperl otherwise.
dflt=libperl.$so
;;
+ cygwin*) # include version
+ dflt=`echo libperl$version | sed -e 's/\./_/g'`$lib_ext
+ ;;
*) # Try to guess based on whether libc has major.minor.
case "$libc" in
*libc.$so.[0-9]*.[0-9]*) dflt=$majmin ;;
To build a shared libperl, the environment variable controlling shared
library search (LD_LIBRARY_PATH in most systems, DYLD_LIBRARY_PATH for
NeXTSTEP/OPENSTEP/Rhapsody, LIBRARY_PATH for BeOS, SHLIB_PATH for
-HP-UX, LIBPATH for AIX, PATH for cygwin) must be set up to include
+HP-UX, LIBPATH for AIX, PATH for Cygwin) must be set up to include
the Perl build directory because that's where the shared libperl will
be created. Configure arranges makefile to have the correct shared
library search settings.
ext/IPC/SysV/Semaphore.pm IPC::SysV extension Perl module
ext/IPC/SysV/SysV.pm IPC::SysV extension Perl module
ext/IPC/SysV/SysV.xs IPC::SysV extension Perl module
+ext/IPC/SysV/hints/cygwin.pl Hint for IPC::SysV for named architecture
ext/IPC/SysV/hints/next_3.pl Hint for IPC::SysV for named architecture
ext/IPC/SysV/t/msg.t IPC::SysV extension Perl module
ext/IPC/SysV/t/sem.t IPC::SysV extension Perl module
ext/NDBM_File/Makefile.PL NDBM extension makefile writer
ext/NDBM_File/NDBM_File.pm NDBM extension Perl module
ext/NDBM_File/NDBM_File.xs NDBM extension external subroutines
+ext/NDBM_File/hints/cygwin.pl Hint for NDBM_File for named architecture
ext/NDBM_File/hints/dec_osf.pl Hint for NDBM_File for named architecture
ext/NDBM_File/hints/dynixptx.pl Hint for NDBM_File for named architecture
ext/NDBM_File/hints/solaris.pl Hint for NDBM_File for named architecture
ext/ODBM_File/Makefile.PL ODBM extension makefile writer
ext/ODBM_File/ODBM_File.pm ODBM extension Perl module
ext/ODBM_File/ODBM_File.xs ODBM extension external subroutines
+ext/ODBM_File/hints/cygwin.pl Hint for ODBM_File for named architecture
ext/ODBM_File/hints/dec_osf.pl Hint for ODBM_File for named architecture
ext/ODBM_File/hints/hpux.pl Hint for ODBM_File for named architecture
ext/ODBM_File/hints/sco.pl Hint for ODBM_File for named architecture
--- /dev/null
+# SysV IPC is an optional Cygwin package
+$self->{LIBS} = ['-lcygipc']
--- /dev/null
+# uses GDBM ndbm compatibility feature
+$self->{LIBS} = ['-lgdbm'];
--- /dev/null
+# uses GDBM dbm compatibility feature
+$self->{LIBS} = ['-lgdbm'];
use ExtUtils::MakeMaker;
WriteMakefile(
NAME => 'POSIX',
- ($^O eq 'MSWin32' ? () : ($^O =~ /cygwin/ ? () :
- (LIBS => ["-lm -lposix -lcposix"])
- )),
+ ($^O eq 'MSWin32' ? () : (LIBS => ["-lm -lposix -lcposix"])),
MAN3PODS => {}, # Pods will be built by installman.
XSPROTOARG => '-noprototypes', # XXX remove later?
VERSION_FROM => 'POSIX.pm',
'') ldlibpthname=PATH ;;
esac
-# mandatory (overrides defaults)
+# mandatory (overrides incorrect defaults)
test -z "$cc" && cc='gcc'
-if test -z "$libpth"
+if test -z "$plibpth"
then
- libpth=`gcc -print-file-name=libc.a`
- libpth=`dirname $libpth`
- libpth=`cd $libpth && pwd`
+ plibpth=`gcc -print-file-name=libc.a`
+ plibpth=`dirname $plibpth`
+ plibpth=`cd $plibpth && pwd`
fi
so='dll'
-libs='-lcygwin -lm -lkernel32'
+# - eliminate -lc, implied by gcc
+libswanted=`echo " $libswanted " | sed -e 's/ c / /g'`
+libswanted="$libswanted cygipc cygwin kernel32"
ccflags="$ccflags -DCYGWIN"
+# - otherwise i686-cygwin
archname='cygwin'
-cccdlflags=' '
+
+# dynamic loading
ld='ld2'
+# - otherwise -fpic
+cccdlflags=' '
# optional(ish)
# - perl malloc needs to be unpolluted
bincompat5005='undef'
-# - build shared libperl.dll
-useshrplib='true'
-libperl='libperl.a'
# strip exe's and dll's
#ldflags="$ldflags -s"
# Convert name from File/Basename.pm to File::Basename.3 format,
# if necessary.
$manpage =~ s#\.p(m|od)$##;
- if ($^O eq 'os2' || $^O eq 'amigaos' || $^O eq 'uwin' || $^O =~ /cygwin/) {
+ if ($^O eq 'os2' || $^O eq 'amigaos' || $^O eq 'uwin' || $^O eq 'cygwin') {
$manpage =~ s#/#.#g;
}
else {
$Is_VMS = $^O eq 'VMS';
$Is_W32 = $^O eq 'MSWin32';
$Is_OS2 = $^O eq 'os2';
- $Is_Cygwin = $^O =~ /cygwin/i;
+ $Is_Cygwin = $^O eq 'cygwin';
if ($Is_VMS) { eval 'use VMS::Filespec;' }
}
*abs_path = \&_qnx_abs_path;
*fast_abs_path = \&_qnx_abs_path;
}
- elsif ($^O =~ /cygwin/) {
+ elsif ($^O eq 'cygwin') {
*getcwd = \&cwd;
*fastgetcwd = \&cwd;
*fastcwd = \&cwd;
$Is_OS2 = $^O eq 'os2';
$Is_Mac = $^O eq 'MacOS';
$Is_Win32 = $^O eq 'MSWin32';
-$Is_Cygwin= $^O =~ /cygwin/i;
+$Is_Cygwin= $^O eq 'cygwin';
require ExtUtils::MM_Unix;
sub canonpath {
my ($self,$path,$reduce_ricochet) = @_;
- $path =~ s|/+|/|g unless($^O =~ /cygwin/); # xx////xx -> xx/xx
+ $path =~ s|/+|/|g unless($^O eq 'cygwin'); # xx////xx -> xx/xx
$path =~ s|(/\.)+/|/|g; # xx/././xx -> xx/xx
$path =~ s|^(\./)+|| unless $path eq "./"; # ./xx -> xx
$path =~ s|^/(\.\./)+|/|; # /../../xx -> xx
#require Term::ReadLine;
- if ($^O =~ /cygwin/) {
+ if ($^O eq 'cygwin') {
# /dev/tty is binary. use stdin for textmode
undef $console;
} elsif (-e "/dev/tty") {
#ifdef HAS_SETLINEBUF
#define PerlIO_setlinebuf(f) setlinebuf(f);
#else
-# ifdef CYGWIN
-# define PerlIO_setlinebuf(f)
-# else
-# define PerlIO_setlinebuf(f) setvbuf(f, Nullch, _IOLBF, 0);
-# endif
+#define PerlIO_setlinebuf(f) setvbuf(f, Nullch, _IOLBF, 0);
#endif
/* Now our interface to Configure's FILE_xxx macros */
$Is_VMS = $^O eq 'VMS';
$Is_Dos = $^O eq 'dos';
$Is_os2 = $^O eq 'os2';
-$Is_Cygwin = $^O =~ /cygwin/;
+$Is_Cygwin = $^O eq 'cygwin';
$PERL = ($Is_MSWin32 ? '.\perl' : './perl');
print "1..35\n";
$Is_MSWin32 = $^O eq 'MSWin32';
$Is_Dos = $^O eq 'dos';
$Is_Dosish = $Is_Dos || $^O eq 'os2' || $Is_MSWin32;
-$Is_Cygwin = $^O =~ /cygwin/;
+$Is_Cygwin = $^O eq 'cygwin';
chop($cwd = ($Is_MSWin32 ? `cd` : `pwd`));
$DEV = `ls -l /dev` unless $Is_Dosish or $Is_Cygwin;
my $lperl = $^O eq 'os2' ? '-llibperl'
: $^O eq 'MSWin32' ? "$Config{archlibexp}\\CORE\\perl.lib"
: '-lperl';
+ ($lperl = $Config{libperl}) =~ s/lib(.*)\Q$Config{_a}\E/-l$1/
+ if($^O eq 'cygwin');
$optimize = $Config{'optimize'} =~ /-O\d/ ? '' : $Config{'optimize'};
my $libs = _getSharedObjects($sourceprog);
@$libs = grep { !(/DynaLoader\.a$/ && ($dynaloader = $_)) } @$libs
- if($^O =~ /cygwin/i);
+ if($^O eq 'cygwin');
my $ccflags = $Config{ccflags};
- $ccflags .= ' -DUSEIMPORTLIB' if $Config{osname} =~ /cygwin/i;
+ $ccflags .= ' -DUSEIMPORTLIB' if $^O eq 'cygwin';
my $cccmd = "$Config{cc} $ccflags $optimize $incdir "
."@args $dynaloader $linkargs @$libs";