Permalink
Browse files

use `apxs -q EXTRA_CFLAGS' etc....

  • Loading branch information...
1 parent 49da4dd commit fc5f6a4ef0f86ae1880555010b79a71e493da656 shugo committed Feb 16, 2006
Showing with 14 additions and 2 deletions.
  1. +7 −1 configure.rb
  2. +7 −1 configure.rb.in
View
@@ -497,7 +497,13 @@ def AC_PROG_INSTALL
if $APXS
$APACHE_INCLUDES = "-I" + `#{$APXS} -q INCLUDEDIR`.chomp
- apache_cflags = `#{$APXS} -q CFLAGS`.chomp
+ apache_cflags = ""
+ for x in %w(CFLAGS NOTEST_CPPFLAGS EXTRA_CPPFLAGS EXTRA_CFLAGS)
+ s = `#{$APXS} -q #{x} 2> /dev/null`.chomp
+ if $? == 0
+ apache_cflags += " #{s}"
+ end
+ end
apache_cflags.gsub!(/-I\S+/) do |inc|
$APACHE_INCLUDES += " " + inc
""
View
@@ -83,7 +83,13 @@ AC_ARG_WITH("apxs",
if $APXS
$APACHE_INCLUDES = "-I" + `#{$APXS} -q INCLUDEDIR`.chomp
- apache_cflags = `#{$APXS} -q CFLAGS`.chomp
+ apache_cflags = ""
+ for x in %w(CFLAGS NOTEST_CPPFLAGS EXTRA_CPPFLAGS EXTRA_CFLAGS)
+ s = `#{$APXS} -q #{x} 2> /dev/null`.chomp
+ if $? == 0
+ apache_cflags += " #{s}"
+ end
+ end
apache_cflags.gsub!(/-I\S+/) do |inc|
$APACHE_INCLUDES += " " + inc
""

0 comments on commit fc5f6a4

Please sign in to comment.