Skip to content

Commit

Permalink
Make pkg_config in mkmf include -I cflags in return value
Browse files Browse the repository at this point in the history
This was the historical behavior, it was modified unintentionally
by 097c3e9, which started storing
these flags in a different global variable.

Also, include the incflags when logging, and document that the
method modifies $INCFLAGS.

Fixes [Bug #10651]
  • Loading branch information
jeremyevans committed Jul 23, 2019
1 parent b6f07f7 commit 325f7b6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/mkmf.rb
Expand Up @@ -1801,7 +1801,7 @@ def dir_config(target, idefault=nil, ldefault=nil)
#
# Where {option} is, for instance, <code>--cflags</code>.
#
# The values obtained are appended to +$CFLAGS+, +$LDFLAGS+ and
# The values obtained are appended to +$INCFLAGS+, +$CFLAGS+, +$LDFLAGS+ and
# +$libs+.
#
# If an <code>option</code> argument is given, the config command is
Expand Down Expand Up @@ -1857,9 +1857,9 @@ def pkg_config(pkg, option=nil)

$LDFLAGS = [orig_ldflags, ldflags].join(' ')
Logging::message "package configuration for %s\n", pkg
Logging::message "cflags: %s\nldflags: %s\nlibs: %s\n\n",
cflags, ldflags, libs
[cflags, ldflags, libs]
Logging::message "incflags: %s\ncflags: %s\nldflags: %s\nlibs: %s\n\n",
incflags, cflags, ldflags, libs
[[incflags, cflags].join(' '), ldflags, libs]
else
Logging::message "package configuration for %s is not found\n", pkg
nil
Expand Down

0 comments on commit 325f7b6

Please sign in to comment.