configure

RubyPHPPerl みたいに ./configure の設定を出力する方法ってあったっけ?
いや、今 PHP の環境調べてるんですけど、phpinfo 便利だなぁと。


追記:
そう、それ! thx!

$ ruby -rrbconfig -e 'puts Config::CONFIG["configure_args"]'
'--enable-frame-address' '--target=i386-linux' '--program-suffix=1.8' '--prefix=/usr' '--datadir=/usr/share' '--mandir=/usr/share/man' '--sysconfdir=/etc' '--localstatedir=/var' '--with-sitedir=/usr/local/lib/site_ruby' '--with-default-kcode=none' '--with-dbm-type=gdbm_compat' '--with-tklib=tk8.4' '--with-tcllib=tcl8.4' '--with-tcl-include=/usr/include/tcl8.4' '--with-bundled-sha1' '--with-bundled-md5' '--with-bundled-rmd160' '--enable-pthread' '--enable-shared' '--enable-ipv6' '--with-lookup-order-hack=INET' '--disable-rpath' 'CFLAGS=-Wall -g -O2' 'target_alias=i386-linux'

Config なんていい名前もってやがるなぁ。


↓やりすぎ。

$ ruby -rrbconfig -e "puts Config::CONFIG['configure_args'].split(/\s/).map{|s| s.gsub(/^'([^']+)'$/){ \$1 } }.reject{|s| s \!~ /^--/}.join(' ')"
--enable-frame-address --target=i386-linux --program-suffix=1.8 --prefix=/usr --datadir=/usr/share --mandir=/usr/share/man --sysconfdir=/etc --localstatedir=/var --with-sitedir=/usr/local/lib/site_ruby --with-default-kcode=none --with-dbm-type=gdbm_compat --with-tklib=tk8.4 --with-tcllib=tcl8.4 --with-tcl-include=/usr/include/tcl8.4 --with-bundled-sha1 --with-bundled-md5 --with-bundled-rmd160 --enable-pthread --enable-shared --enable-ipv6 --with-lookup-order-hack=INET --disable-rpath