diff options
Diffstat (limited to 'ext')
-rw-r--r-- | ext/extmk.rb.in | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/ext/extmk.rb.in b/ext/extmk.rb.in index 272a508e0f..7622880a1a 100644 --- a/ext/extmk.rb.in +++ b/ext/extmk.rb.in @@ -64,10 +64,12 @@ end LINK = "@CC@ -o conftest -I#$topdir -I#$top_srcdir #{CFLAGS} -I#$includedir @LDFLAGS@ %s %s conftest.c %s %s @LIBS@" CPP = "@CPP@ @CPPFLAGS@ -I#$topdir -I#$top_srcdir #{CFLAGS} -I#$includedir %s %s conftest.c" -if /cygwin|mswin32|djgpp|mingw|m68k-human|i386-os2_emx/i =~ RUBY_PLATFORM - $null = open("nul", "w") +if FileTest.readable? 'nul' + $null = open('nul', 'w') +elsif FileTest.readable? '/dev/null' + $null = open('/dev/null', 'w') else - $null = open("/dev/null", "w") + $null = open('test.log', 'w') end $orgerr = $stderr.dup @@ -342,7 +344,7 @@ def create_makefile(target) $DLDFLAGS = '@DLDFLAGS@' - if $configure_args['--enable-shared'] + if $configure_args['--enable-shared'] or /cygwin|mingw/ === RUBY_PLATFORM $libs = "@LIBRUBYARG@ " + $libs $DLDFLAGS = $DLDFLAGS + " -L" + $topdir end |