debian/rules: Improve detection of gcc version and allow compilation with gcc-4.9.

This commit is contained in:
Sebastian Lackner 2015-07-28 00:59:48 +02:00
parent 56447bdb5b
commit 0c6e311cea
2 changed files with 4 additions and 7 deletions

2
debian/control vendored
View File

@ -14,7 +14,7 @@ Build-Depends: autotools-dev,
flex,
fontforge,
gawk,
gcc-4.5 | gcc-4.7 | ubuntu-desktop (<< 1.207),
gcc-4.5 | gcc-4.7 | gcc-4.9 | ubuntu-desktop (<< 1.207),
gettext,
libacl1-dev,
libasound2-dev,

9
debian/rules vendored
View File

@ -1,11 +1,8 @@
#!/usr/bin/make -f
# Use gcc-4.5 if it's available
ifeq ($(shell which gcc-4.5),)
CC = gcc
else
CC = gcc-4.5
endif
# Prefer gcc-4.5, then 4.7, then 4.9 - otherwise fallback to gcc.
export CC = $(shell for _cc in gcc-4.5 gcc-4.7 gcc-4.9 gcc false; do \
if which "$$_cc" >/dev/null 2>&1; then echo "$$_cc"; break; fi; done)
%:
dh $@ --parallel