From: Michal Suchanek Date: 2006-09-25T21:28:05+09:00 Subject: Re: some default ruby extensions don't get -L/path/to/lib/dir On 9/16/06, Nobuyoshi Nakada wrote: > Hi, > > At Sat, 16 Sep 2006 06:30:59 +0900, > Tim Mooney wrote in [ruby-talk:214683]: > > Before I configure ruby, I add a few include directories to CFLAGS and > > CPPFLAGS, so that configure can find headers installed in nonstandard > > places. I add a few library directories to LDFLAGS, e.g. > > > > LDFLAGS='-L/local/openssl/lib -L/local/gnu/lib/64 > > -L/local/BerkeleyDB/lib/64' > > export LDFLAGS > > $ configure --with-opt-lib=/local/openssl/lib:/local/gnu/lib/64:/local/BerkeleyDB/lib/64 > doesn't help you? > I use a patch for pulling libs from /sw. Ruby does not use LDFLAGS for some reason, not even in the tests. At least it did not when I created the patch. It may be that some weird option to configure would make it work as well. But I could not find out which, and I even looked at mkmf.rb to patch it. --- ruby-1.8.5/lib/mkmf.rb.orig 2006-08-17 07:47:50.000000000 +0200 +++ ruby-1.8.5/lib/mkmf.rb 2006-08-29 16:24:38.000000000 +0200 @@ -1400,7 +1400,7 @@ $CFLAGS = with_config("cflags", arg_config("CFLAGS", config["CFLAGS"])).dup $ARCH_FLAG = with_config("arch_flag", arg_config("ARCH_FLAG", config["ARCH_FLAG"])).dup $CPPFLAGS = with_config("cppflags", arg_config("CPPFLAGS", config["CPPFLAGS"])).dup - $LDFLAGS = (with_config("ldflags") || "").dup + $LDFLAGS = with_config("ldflags", arg_config("LDFLAGS", config["LDFLAGS"])).dup $INCFLAGS = "-I$(topdir) -I$(hdrdir) -I$(srcdir)" $DLDFLAGS = with_config("dldflags", arg_config("DLDFLAGS", config["DLDFLAGS"])).dup $LIBEXT = config['LIBEXT'].dup @@ -1501,7 +1501,7 @@ Thanks MS