Skip to content

Commit

Permalink
Merge pull request #14 from michalorman/fix-compilation-on-cups-1.7
Browse files Browse the repository at this point in the history
Include IPP private structures if compiling with cups 1.7
  • Loading branch information
m0wfo committed Nov 28, 2013
2 parents d73ebf5 + 0c0330d commit d44bfc9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ext/extconf.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@
exit
end

def has_cups_1_6_installed?
def include_ipp_private_structures?
puts 'cups version:'
puts `cups-config --version`
`cups-config --version`.scan(/1.6/).size > 0
`cups-config --version`.scan(/1.(6|7)/).size > 0
end

cups_cflags = `cups-config --cflags`.chomp || ""
cups_cflags += ' -D_IPP_PRIVATE_STRUCTURES' if has_cups_1_6_installed?
cups_cflags += ' -D_IPP_PRIVATE_STRUCTURES' if include_ipp_private_structures?
cups_libs = `cups-config --libs`.chomp || ""

with_cflags(cups_cflags) {
with_ldflags(cups_libs) {
create_makefile("cups")
}
}
}

0 comments on commit d44bfc9

Please sign in to comment.