Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

configure: add CPPFLAGS and LDFLAGS where missing #1879

Merged
merged 2 commits into from

3 participants

@r-stu31

In my setup, the needed libraries are not under /lib or /usr/lib, so for "configure" and "rake" I use a wrapper, which looks like:

#!/bin/sh
env LDFLAGS="-L/usr/pkg/lib -Wl,-R/usr/pkg/lib" CPPFLAGS="-I/usr/pkg/include" ./configure
env LDFLAGS="-L/usr/pkg/lib -Wl,-R/usr/pkg/lib" CPPFLAGS="-I/usr/pkg/include" rake

Without the proposed patch, some libraries are not found by the configure script. The "CFLAGS --> CXXFLAGS" change is just cosmetics, feel free to omit it, my setup does not depend on it, but i think, that this way is more correct.

@brixen brixen merged commit 72207d9 into from
@travisbot

This pull request passes (merged bce2db8 into 8cf8366).

@r-stu31 r-stu31 deleted the branch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Aug 27, 2012
  1. @r-stu31

    Use CPPFLAGS and LDFLAGS when checking libraries, after all, they are…

    r-stu31 authored
    … also used afterwards for the real compilation and linking.
  2. @r-stu31
This page is out of date. Refresh to see the latest.
Showing with 2 additions and 2 deletions.
  1. +2 −2 configure
View
4 configure
@@ -793,7 +793,7 @@ Unsupported language version requested: #{ver}. Options are #{@supported_version
libs = (default_link_libs + link_libs).map { |l| "-l#{l}" }.join(" ")
- cmd = "#{@cxx} #{env('CFLAGS')} -o #{basename} #{source} #{c_includes} #{c_libs} -lstdc++ #{libs} >>#{@log.path} 2>&1"
+ cmd = "#{@cxx} #{env('CPPFLAGS')} #{env('CXXFLAGS')} #{env('LDFLAGS')} -o #{basename} #{source} #{c_includes} #{c_libs} -lstdc++ #{libs} >>#{@log.path} 2>&1"
@log.log cmd
system cmd
return $?.exitstatus unless run
@@ -1033,7 +1033,7 @@ int main() { return tgetnum(""); }
@log.log string
- cmd = "#{@cxx} -S -o - -x c #{c_includes} #{c_libs} #{env('CFLAGS')} #{file.path} >>#{@log.path} 2>&1"
+ cmd = "#{@cxx} -S -o - -x c #{c_includes} #{c_libs} #{env('CPPFLAGS')} #{env('CFLAGS')} #{env('LDFLAGS')} #{file.path} >>#{@log.path} 2>&1"
@log.log cmd
system cmd
Something went wrong with that request. Please try again.