summaryrefslogtreecommitdiffstats
path: root/configure.in
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-01-17 10:20:07 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-01-17 10:20:07 +0000
commit8855a63c5a039c35cc9cf75152b124924488c628 (patch)
tree484a8e9c401de33cf9d187990283579145157462 /configure.in
parent785dddbf9ebc7a513087ed7593d6e2a66d4c003c (diff)
downloadruby-8855a63c5a039c35cc9cf75152b124924488c628.tar.gz
ruby-8855a63c5a039c35cc9cf75152b124924488c628.tar.xz
ruby-8855a63c5a039c35cc9cf75152b124924488c628.zip
* configure.in (darwin): get rid of strange settings issue of
apple gcc port, which searches /usr/local/include always but /usr/local/lib not. * ext/readline/readline.c (Init_readline): suppress warnings with libedit. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@21628 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in8
1 files changed, 8 insertions, 0 deletions
diff --git a/configure.in b/configure.in
index a2ea066d2..77c00343a 100644
--- a/configure.in
+++ b/configure.in
@@ -1418,6 +1418,14 @@ if test "$with_dln_a_out" != yes; then
darwin*) : ${LDSHARED='cc -dynamic -bundle -undefined suppress -flat_namespace'}
: ${LDFLAGS=""}
: ${LIBPATHENV=DYLD_LIBRARY_PATH}
+ # /usr/local/include is always searched for
+ # some reason, but /usr/local/lib is not.
+ hdr=`find /usr/local/include -name \*.h -type f | sed 's:^/usr/local/include/::;q'`
+ if test -n "$hdr" && $CC -E -include "$hdr" -xc /dev/null | fgrep -q "$hdr"; then
+ $CC -print-search-dirs | grep -q '^libraries:.*:/usr/local/lib/*' ||
+ echo " $LDFLAGS " | grep -q ' -L */usr/local/lib/* ' ||
+ LDFLAGS="${LDFLAGS:+$LDFLAGS }-L/usr/local/lib"
+ fi
rb_cv_dlopen=yes ;;
aix*) if test "$GCC" = yes; then
: ${LDSHARED='$(CC) -shared'}