Hello,

I've got the following extconf.rb:

# begin
require "mkmf"

dir_config "SQLite", "/usr/local"

if find_library("sqlite", "sqlite_open", "/usr/local/lib", "/usr/pkg/lib", "/sw/lib") and have_header("sqlite.h")
  create_makefile "SQLite"
end
#end

When I run it I get "checking for sqlite_open() in -lsqlite... no",
although the sqlite lib exists in /sw/lib and the header file in
/sw/include.

mkmf.log follows:

find_library: checking for sqlite_open() in -lsqlite... --------------------
gcc -o conftest -I/sw/lib/ruby/1.8/powerpc-darwin -I/sw/lib/ruby/1.8/powerpc-darwin -I/usr/local/include -I/sw/include -g -O2 -fno-common -pipe conftest.c -L/sw/lib -L/usr/local/lib -lruby-static -lsqlite -ldl -lobjc
ld: warning -L: directory name (/usr/local/lib) does not exist
ld: can't locate file for: -lruby-static
checked program was:
/* begin */

int main() { return 0; }
int t() { sqlite_open(); return 0; }
/* end */

gcc -o conftest -I/sw/lib/ruby/1.8/powerpc-darwin -I/sw/lib/ruby/1.8/powerpc-darwin -I/usr/local/include -I/sw/include -g -O2 -fno-common -pipe conftest.c -L/sw/lib -L/usr/local/lib -lruby-static -lsqlite -ldl -lobjc
conftest.c: In function `t':
conftest.c:4: error: `sqlite_open' undeclared (first use in this function)
conftest.c:4: error: (Each undeclared identifier is reported only once
conftest.c:4: error: for each function it appears in.)
checked program was:
/* begin */


int main() { return 0; }
int t() { void ((*volatile p)()); p = (void ((*)()))sqlite_open; return 0; }
/* end */

gcc -o conftest -I/sw/lib/ruby/1.8/powerpc-darwin -I/sw/lib/ruby/1.8/powerpc-darwin -I/usr/local/include -I/sw/include -g -O2 -fno-common -pipe conftest.c -L/sw/lib -L/usr/local/lib -lruby-static -lsqlite -ldl -lobjc
ld: warning -L: directory name (/usr/local/lib) does not exist
ld: can't locate file for: -lruby-static
checked program was:
/* begin */

int main() { return 0; }
int t() { sqlite_open(); return 0; }
/* end */

gcc -o conftest -I/sw/lib/ruby/1.8/powerpc-darwin -I/sw/lib/ruby/1.8/powerpc-darwin -I/usr/local/include -I/sw/include -g -O2 -fno-common -pipe conftest.c -L/sw/lib -L/usr/local/lib -lruby-static -lsqlite -ldl -lobjc
conftest.c: In function `t':
conftest.c:4: error: `sqlite_open' undeclared (first use in this function)
conftest.c:4: error: (Each undeclared identifier is reported only once
conftest.c:4: error: for each function it appears in.)
checked program was:
/* begin */


int main() { return 0; }
int t() { void ((*volatile p)()); p = (void ((*)()))sqlite_open; return 0; }
/* end */

gcc -o conftest -I/sw/lib/ruby/1.8/powerpc-darwin -I/sw/lib/ruby/1.8/powerpc-darwin -I/usr/local/include -I/sw/include -g -O2 -fno-common -pipe conftest.c -L/sw/lib -L/usr/local/lib -L/usr/pkg/lib -lruby-static -lsqlite -ldl -lobjc
ld: warning -L: directory name (/usr/local/lib) does not exist
ld: warning -L: directory name (/usr/pkg/lib) does not exist
ld: can't locate file for: -lruby-static
checked program was:
/* begin */

int main() { return 0; }
int t() { sqlite_open(); return 0; }
/* end */

gcc -o conftest -I/sw/lib/ruby/1.8/powerpc-darwin -I/sw/lib/ruby/1.8/powerpc-darwin -I/usr/local/include -I/sw/include -g -O2 -fno-common -pipe conftest.c -L/sw/lib -L/usr/local/lib -L/usr/pkg/lib -lruby-static -lsqlite -ldl -lobjc
conftest.c: In function `t':
conftest.c:4: error: `sqlite_open' undeclared (first use in this function)
conftest.c:4: error: (Each undeclared identifier is reported only once
conftest.c:4: error: for each function it appears in.)
checked program was:
/* begin */


int main() { return 0; }
int t() { void ((*volatile p)()); p = (void ((*)()))sqlite_open; return 0; }
/* end */

gcc -o conftest -I/sw/lib/ruby/1.8/powerpc-darwin -I/sw/lib/ruby/1.8/powerpc-darwin -I/usr/local/include -I/sw/include -g -O2 -fno-common -pipe conftest.c -L/sw/lib -L/usr/local/lib -L/sw/lib -lruby-static -lsqlite -ldl -lobjc
ld: warning -L: directory name (/usr/local/lib) does not exist
ld: can't locate file for: -lruby-static
checked program was:
/* begin */

int main() { return 0; }
int t() { sqlite_open(); return 0; }
/* end */

gcc -o conftest -I/sw/lib/ruby/1.8/powerpc-darwin -I/sw/lib/ruby/1.8/powerpc-darwin -I/usr/local/include -I/sw/include -g -O2 -fno-common -pipe conftest.c -L/sw/lib -L/usr/local/lib -L/sw/lib -lruby-static -lsqlite -ldl -lobjc
conftest.c: In function `t':
conftest.c:4: error: `sqlite_open' undeclared (first use in this function)
conftest.c:4: error: (Each undeclared identifier is reported only once
conftest.c:4: error: for each function it appears in.)
checked program was:
/* begin */


int main() { return 0; }
int t() { void ((*volatile p)()); p = (void ((*)()))sqlite_open; return 0; }
/* end */

-------------------- no