summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
Diffstat (limited to 'ext')
-rw-r--r--ext/curses/extconf.rb1
-rw-r--r--ext/dbm/extconf.rb1
-rw-r--r--ext/etc/extconf.rb1
-rw-r--r--ext/extmk.rb.in17
-rw-r--r--ext/socket/extconf.rb1
5 files changed, 14 insertions, 7 deletions
diff --git a/ext/curses/extconf.rb b/ext/curses/extconf.rb
index 9b284378438..720bccb8d28 100644
--- a/ext/curses/extconf.rb
+++ b/ext/curses/extconf.rb
@@ -1,3 +1,4 @@
+require 'mkmf'
$CFLAGS="-I/usr/include/ncurses -I/usr/local/include/ncurses"
$LDFLAGS="-L/usr/local/lib"
make=FALSE
diff --git a/ext/dbm/extconf.rb b/ext/dbm/extconf.rb
index 595640737d4..38a0efbf195 100644
--- a/ext/dbm/extconf.rb
+++ b/ext/dbm/extconf.rb
@@ -1,3 +1,4 @@
+require 'mkmf'
$LDFLAGS = "-L/usr/local/lib"
have_library("gdbm", "dbm_open") or have_library("dbm", "dbm_open")
if have_func("dbm_open")
diff --git a/ext/etc/extconf.rb b/ext/etc/extconf.rb
index 884de93ec89..a02ff8c0911 100644
--- a/ext/etc/extconf.rb
+++ b/ext/etc/extconf.rb
@@ -1,3 +1,4 @@
+require 'mkmf'
have_library("sun", "getpwnam") # NIS (== YP) interface for IRIX 4
a = have_func("getlogin")
b = have_func("getpwent")
diff --git a/ext/extmk.rb.in b/ext/extmk.rb.in
index 2ea88ee2dd5..5aba7253016 100644
--- a/ext/extmk.rb.in
+++ b/ext/extmk.rb.in
@@ -59,13 +59,11 @@ end
if PLATFORM == "m68k-human"
CFLAGS = "@CFLAGS@".gsub(/-c..-stack=[0-9]+ */, '')
-LINK = "@CC@ -o conftest -I#{$topdir} " + CFLAGS + " %s @LDFLAGS@ %s conftest.c @LIBS@ %s"
-CPP = "@CPP@ @CPPFLAGS@ -I#{$topdir} " + CFLAGS + " %s conftest.c"
else
CFLAGS = "@CFLAGS@"
-LINK = "@CC@ -o conftest -I#{$topdir} " + CFLAGS + " %s @LDFLAGS@ %s conftest.c %s"
-CPP = "@CPP@ @CPPFLAGS@ -I#{$topdir} " + CFLAGS + " %s conftest.c"
end
+LINK = "@CC@ -o conftest -I#{$topdir} " + CFLAGS + " %s @LDFLAGS@ %s conftest.c @LIBS@ %s"
+CPP = "@CPP@ @CPPFLAGS@ -I#{$topdir} " + CFLAGS + " %s conftest.c"
if /win32|djgpp|mingw32|m68k-human/i =~ PLATFORM
$null = open("nul", "w")
@@ -76,6 +74,9 @@ end
$orgerr = $stderr.dup
$orgout = $stdout.dup
def xsystem command
+ if $DEBUG
+ return system(command)
+ end
$stderr.reopen($null)
$stdout.reopen($null)
r = system(command)
@@ -238,7 +239,8 @@ hdrdir = #{$topdir}
CC = @CC@
-CFLAGS = %s -I#{$topdir} %s #$CFLAGS %s
+prefix = @prefix@
+CFLAGS = %s -I@includedir@ -I#{$topdir} %s #$CFLAGS %s
DLDFLAGS = @DLDFLAGS@ #$LDFLAGS
LDSHARED = @LDSHARED@
", if $static then "" else "@CCDLFLAGS@" end, CFLAGS, $defs.join(" ")
@@ -274,6 +276,7 @@ libdir = @libdir@/$(RUBY_INSTALL_NAME)/@arch@
TARGET = %s.%s
INSTALL = %s@INSTALL@
+INSTALL_DATA = %s@INSTALL_DATA@
binsuffix = @binsuffix@
@@ -285,7 +288,7 @@ clean:; @rm -f *.o *.so *.sl
realclean: clean
", target,
- if $static then "o" else "@DLEXT@" end, $dots
+ if $static then "o" else "@DLEXT@" end, $dots, $dots
mfile.printf "\
@@ -298,7 +301,7 @@ install:
"
end
for rb in Dir["lib/*.rb"]
- mfile.printf "\t$(INSTALL) %s @libdir@/$(RUBY_INSTALL_NAME)\n", rb
+ mfile.printf "\t$(INSTALL_DATA) %s @libdir@/$(RUBY_INSTALL_NAME)\n", rb
end
mfile.printf "\n"
diff --git a/ext/socket/extconf.rb b/ext/socket/extconf.rb
index bbda95cf83f..80bd74338c2 100644
--- a/ext/socket/extconf.rb
+++ b/ext/socket/extconf.rb
@@ -1,3 +1,4 @@
+require 'mkmf'
$LDFLAGS = "-L/usr/local/lib"
case PLATFORM
when /mswin32/