summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1999-04-27 05:11:13 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1999-04-27 05:11:13 +0000
commit6c840ba8f466d3050bfb4bfcc092c9459481fdb1 (patch)
treeaf08481f8b534cc56f0b2fe9cbe974224efa509a
parente5ce6155af93a5cdaaef02ad44dfc143d0bafd9c (diff)
--with-xxx=yyy
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_3@447 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog9
-rw-r--r--configure5
-rw-r--r--configure.in5
-rw-r--r--ext/extmk.rb.in23
-rw-r--r--ext/readline/extconf.rb16
-rw-r--r--lib/mkmf.rb30
-rw-r--r--misc/ruby-mode.el2
7 files changed, 87 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 5f7d6ce796..54035badf8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+Tue Apr 27 14:11:45 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+
+ * ext/extmk.rb.in: `--with-xxx=yyy' argument configuration.
+
+ * misc/ruby-mode.el: forgot to handle $`.
+
+ * ext/extmk.rb.in: better AIX link support proposed by
+ <komatsu@sarion.co.jp>.
+
Mon Apr 26 16:46:59 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
* ext/extmk.rb.in: AIX shared library support modified.
diff --git a/configure b/configure
index bc0dd323ec..d2a11e95cf 100644
--- a/configure
+++ b/configure
@@ -656,7 +656,7 @@ echo "configure:624: checking target architecture" >&5
echo -n " $archs"
done
cat >> confdefs.h <<\EOF
-#define NEXT_FAT_BINARY 1
+#define NEXT_FAT_BINARY 1
EOF
echo "."
@@ -4527,6 +4527,8 @@ cat >> confdefs.h <<EOF
EOF
+configure_args=$ac_configure_args
+
if test "$fat_binary" = yes ; then
arch="fat-${host_os}"
@@ -4746,6 +4748,7 @@ s%@LIBRUBY@%$LIBRUBY%g
s%@LIBRUBYARG@%$LIBRUBYARG%g
s%@SOLIBS@%$SOLIBS%g
s%@arch@%$arch%g
+s%@configure_args@%$configure_args%g
CEOF
EOF
diff --git a/configure.in b/configure.in
index a64188ac2e..d33d7d73bb 100644
--- a/configure.in
+++ b/configure.in
@@ -69,7 +69,7 @@ AC_ARG_ENABLE(fat-binary,
ARCH_FLAG="$ARCH_FLAG -arch $archs "
echo -n " $archs"
done
- AC_DEFINE( NEXT_FAT_BINARY )
+ AC_DEFINE(NEXT_FAT_BINARY)
echo "."
fi
@@ -718,6 +718,9 @@ RUBY_SITE_LIB_PATH="${RUBY_LIB_PATH}/site_ruby"
AC_DEFINE_UNQUOTED(RUBY_SITE_LIB, "${RUBY_SITE_LIB_PATH}")
AC_SUBST(arch)dnl
+configure_args=$ac_configure_args
+AC_SUBST(configure_args)dnl
+
if test "$fat_binary" = yes ; then
arch="fat-${host_os}"
diff --git a/ext/extmk.rb.in b/ext/extmk.rb.in
index 57d7a4a455..743ec16b34 100644
--- a/ext/extmk.rb.in
+++ b/ext/extmk.rb.in
@@ -242,6 +242,29 @@ def have_header(header)
return TRUE
end
+def arg_config(config, default=nil)
+ unless defined? $configure_args
+ $configure_args = {}
+ for arg in CONFIG["configure_args"].split
+ next unless /^--/ =~ arg
+ if /=/ =~ arg
+ $configure_args[$`] = $'
+ else
+ $configure_args[arg] = default
+ end
+ end
+ end
+ p [$configure_args, config]
+ $configure_args.fetch(config, default)
+end
+
+def with_config(config, default=nil)
+ unless /^--with-/ =~ config
+ config = '--with-' + config
+ end
+ arg_config(config, default)
+end
+
def create_header()
if $defs.length > 0
hfile = open("extconf.h", "w")
diff --git a/ext/readline/extconf.rb b/ext/readline/extconf.rb
index e55233eb20..1cf55bb4d9 100644
--- a/ext/readline/extconf.rb
+++ b/ext/readline/extconf.rb
@@ -1,5 +1,21 @@
require "mkmf"
+readline_dir = with_config("readline-dir")
+if readline_dir
+ $CFLAGS = "-I#{readline_dir}/include"
+ $LDFLAGS = "-L#{readline_dir}/lib"
+end
+
+readline_dir = with_config("readline-include-dir")
+if readline_dir
+ $CFLAGS = "-I#{readline_dir}"
+end
+
+readline_dir = with_config("readline-lib-dir")
+if readline_dir
+ $LDFLAGS = "-L#{readline_dir}"
+end
+
have_library("termcap", "tgetnum")
if have_header("readline/readline.h") and
have_header("readline/history.h") and
diff --git a/lib/mkmf.rb b/lib/mkmf.rb
index 2b314fd21e..d4d24e1c6b 100644
--- a/lib/mkmf.rb
+++ b/lib/mkmf.rb
@@ -242,6 +242,36 @@ def have_header(header)
return TRUE
end
+def arg_config(config, default="yes")
+ unless defined? $configure_args
+ $configure_args = {}
+ for arg in CONFIG["configure_args"].split + ARGV
+ next unless /^--/ =~ arg
+ if /=/ =~ arg
+ $configure_args[$`] = $'
+ else
+ $configure_args[arg] = default
+ end
+ end
+ end
+ p [$configure_args, config]
+ $configure_args.fetch(config, default)
+end
+
+def with_config(config, default="yes")
+ unless /^--with-/ =~ config
+ config = '--with-' + config
+ end
+ arg_config(config, default)
+end
+
+def with_config(config, value="yes")
+ unless /^-with-/ =~ config
+ config = '-with-' + config
+ end
+ arg_config(config, value)
+end
+
def create_header()
print "creating extconf.h\n"
STDOUT.flush
diff --git a/misc/ruby-mode.el b/misc/ruby-mode.el
index b9dc078976..d017030d94 100644
--- a/misc/ruby-mode.el
+++ b/misc/ruby-mode.el
@@ -691,7 +691,7 @@ An end of a defun is found by moving forward from the beginning of one."
(lambda ()
(make-local-variable 'font-lock-syntactic-keywords)
(setq font-lock-syntactic-keywords
- '(("\\$\\([#\"'$\\]\\)" 1 (1 . nil))
+ '(("\\$\\([#\"'`$\\]\\)" 1 (1 . nil))
("\\(#\\)[{$@]" 1 (1 . nil))))
(make-local-variable 'font-lock-defaults)
(setq font-lock-defaults '((ruby-font-lock-keywords) nil nil))