Finding Libraries in Non-standard Places

C

Curt Sampson

I want to get my ruby readline extension working, but my readline
library is in /usr/pkg/lib. How do I make ruby find it there?

cjs
 
W

WATANABE Hirofumi

Hi,

Curt Sampson said:
I want to get my ruby readline extension working, but my readline
library is in /usr/pkg/lib. How do I make ruby find it there?

If readline.h is in /usr/pkg/include/readline and
libreadline.* is in /usr/pkg/lib, try this:

./configure --with-readline-dir=/usr/pkg
 
W

WATANABE Hirofumi

Hi,

Curt Sampson said:
That's it. How does one figure out these options?

% ruby -ne 'print if /^ dir_config/ .. /^Return/' README.EXT
dir_config(target[, default_dir])
dir_config(target[, default_include, default_lib])

Parses the command line options and adds the directories specified by
--with-<target>-dir, --with-<target>-include, and/or --with-<target>-lib
to $CFLAGS and/or $LDFLAGS. --with-<target>-dir=/path is equivalent to
--with-<target>-include=/path/include --with-<target>-lib=/path/lib.
Returns an array of the added directories ([include_dir, lib_dir]).

% ruby -ne 'print if /^dir_config/' ext/readline/extconf.rb
dir_config('curses')
dir_config('ncurses')
dir_config('termcap')
dir_config("readline")
 
D

Dick Davies

* Curt Sampson said:
That's it. How does one figure out these options?

look at extconf.rb - see the online pickaxes description of it
(I have resorted to reading the mkmf.rb source before now however...).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,160
Messages
2,570,889
Members
47,421
Latest member
StacyTaver

Latest Threads

Top