From 95b22614631e9ec157e1436d860883a8938cc21a Mon Sep 17 00:00:00 2001 From: nobu Date: Thu, 5 Feb 2009 12:01:25 +0000 Subject: [PATCH] merged revision 21628: * 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: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@22079 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 9 +++++++++ configure.in | 8 ++++++++ ext/readline/readline.c | 2 +- 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 20eae7d9b6..d68ded600b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +Thu Feb 5 21:01:24 2009 Nobuyoshi Nakada + + * 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. + Tue Feb 3 18:35:48 2009 Nobuyoshi Nakada * ext/thread/thread.c (rb_queue_pop, rb_queue_push): should not lock diff --git a/configure.in b/configure.in index 469a52cbd7..3ecdfacc3d 100644 --- a/configure.in +++ b/configure.in @@ -1247,6 +1247,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'} diff --git a/ext/readline/readline.c b/ext/readline/readline.c index c9acaadac9..6566507b8f 100644 --- a/ext/readline/readline.c +++ b/ext/readline/readline.c @@ -750,7 +750,7 @@ Init_readline() VALUE history, fcomp, ucomp; /* Allow conditional parsing of the ~/.inputrc file. */ - rl_readline_name = "Ruby"; + rl_readline_name = (char *)"Ruby"; using_history();