summaryrefslogtreecommitdiff
path: root/ext/extmk.rb.in
diff options
context:
space:
mode:
Diffstat (limited to 'ext/extmk.rb.in')
-rw-r--r--ext/extmk.rb.in5
1 files changed, 3 insertions, 2 deletions
diff --git a/ext/extmk.rb.in b/ext/extmk.rb.in
index 86dd67e558..b073a1586d 100644
--- a/ext/extmk.rb.in
+++ b/ext/extmk.rb.in
@@ -26,6 +26,7 @@ SRC_EXT = ["c", "cc", "m", "cxx", "cpp", "C"]
$extlist = []
$includedir = "@includedir@".gsub(/\$\{prefix\}|\$\(prefix\)/,'@prefix@')
+$libdir = "@libdir@".gsub(/\$\{exec_prefix\}|\$\(exec_prefix\)/,'@exec_prefix@')
$top_srcdir = "@top_srcdir@"
if $top_srcdir !~ "^/"
@@ -73,7 +74,7 @@ if /mswin32/ =~ RUBY_PLATFORM
else
OUTFLAG = '-o '
end
-LINK = "@CC@ #{OUTFLAG}conftest -I#$topdir -I#$top_srcdir #{CFLAGS} -I#$includedir @LDFLAGS@ %s %s %s conftest.c %s %s @LIBS@"
+LINK = "@CC@ #{OUTFLAG}conftest -I#$topdir -I#$top_srcdir #{CFLAGS} -I#$includedir -L#$libdir @LDFLAGS@ %s %s %s conftest.c %s %s @LIBS@"
CPP = "@CPP@ @CPPFLAGS@ -I#$topdir -I#$top_srcdir #{CFLAGS} -I#$includedir %s %s %s conftest.c"
$log = open('extmk.log', 'w')
@@ -450,7 +451,7 @@ target_prefix = #{target_prefix}
"
mfile.printf "LOCAL_LIBS = %s %s\n", $LOCAL_LIBS, $local_flags
- mfile.printf "LIBS = %s\n", $libs
+ mfile.printf "LIBS = -L%s %s\n", $libdir, $libs
mfile.printf "OBJS = "
if !$objs then
$objs = []