mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
configure.in: use /usr/include
* configure.in (CPPFLAGS): override /usr/local/include by /usr/include, unless explicitly /usr/local is given. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49555 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
53053bcac6
commit
6f2a41e995
1 changed files with 12 additions and 8 deletions
20
configure.in
20
configure.in
|
|
@ -1007,6 +1007,18 @@ AS_CASE(["$target_os"],
|
|||
AC_DEFINE(BROKEN_SETREUID, 1)
|
||||
AC_DEFINE(BROKEN_SETREGID, 1)
|
||||
fi
|
||||
AC_CACHE_CHECK([if $CC includes /usr/local/include by default], [rb_cv_isystem_usr_include], [
|
||||
AS_CASE([" $CC "], [*' -isystem /usr/local/include '*], [rb_cv_isystem_usr_include=unknown], [
|
||||
rb_cv_isystem_usr_include=no
|
||||
if $CC -E -v -xc - < /dev/null 2>&1 | grep -A1 '^@%:@include <' | grep -q /usr/local/include; then
|
||||
$CC -print-search-dirs | grep -q '^libraries:.*:/usr/local/lib/*' ||
|
||||
rb_cv_isystem_usr_include=yes
|
||||
fi
|
||||
])
|
||||
])
|
||||
AS_CASE(["$rb_cv_isystem_usr_include: $CPPFLAGS $LDFLAGS "],
|
||||
[no:* | *" -I/usr/local/include "* | *" -L/usr/local/lib "*], [],
|
||||
[CPPFLAGS="$CPPFLAGS -isystem /usr/include"])
|
||||
ac_cv_type_getgroups=gid_t # getgroups() on Rosetta fills garbage
|
||||
ac_cv_lib_crypt_crypt=no
|
||||
ac_cv_func_fdatasync=no # Mac OS X wrongly reports it has fdatasync()
|
||||
|
|
@ -2952,14 +2964,6 @@ if test "$with_dln_a_out" != yes; then
|
|||
[darwin*], [ : ${LDSHARED='$(CC) -dynamic -bundle'}
|
||||
: ${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 2>/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*], [ : ${LDSHARED='$(CC)'}
|
||||
LDSHARED="$LDSHARED ${linker_flag}-G"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue