1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

--with-xxx=yyy

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_3@447 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
matz 1999-04-27 05:11:13 +00:00
parent e5ce6155af
commit 6c840ba8f4
7 changed files with 87 additions and 3 deletions

View file

@ -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.

5
configure vendored
View file

@ -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

View file

@ -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}"

View file

@ -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")

View file

@ -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

View file

@ -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

View file

@ -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))