Skip to content

Commit

Permalink
Merge pull request #82 from sgn/fix-configure
Browse files Browse the repository at this point in the history
configure: respect environment variable
  • Loading branch information
moinejf authored Dec 17, 2020
2 parents 76e60ba + 0c6a966 commit 81f49bd
Showing 1 changed file with 11 additions and 17 deletions.
28 changes: 11 additions & 17 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
VERSION=8.14.11
VDATE=2020-12-05

CC=gcc
PKG_CONFIG=pkg-config
CFLAGS="-g -O2 -Wall -pipe"
: "${CC:=gcc}"
: "${PKG_CONFIG:=pkg-config}"
CFLAGS="-g -O2 -Wall -pipe $CFLAGS"

srcdir=.
prefix=/usr/local
: "${prefix=/usr/local}"

INSTALL="/usr/bin/install -c"
: "${INSTALL:=/usr/bin/install -c}"

if test -f ./custom; then
. ./custom
Expand Down Expand Up @@ -58,19 +58,13 @@ if test "x$DEFAULT_FDIR" = x; then
DEFAULT_FDIR="$prefix/share/abcm2ps"
fi

if which $PKG_CONFIG > /dev/null ; then
if $PKG_CONFIG --exists freetype2 ; then
if $PKG_CONFIG --exists pangocairo ; then
CPPFLAGS="$CPPFLAGS -DHAVE_PANGO=1 `$PKG_CONFIG pango cairo freetype2 --cflags`"
LDLIBS="$LDLIBS `$PKG_CONFIG pangocairo pangoft2 freetype2 --libs`"
else
echo "pangocairo not found - no pango support"
fi
else
echo "freetype2 not found - no pango support"
fi
if ! $PKG_CONFIG --exists freetype2 ; then
echo "pkg-config/freetype2 not found - no pango support"
elif ! $PKG_CONFIG --exists pangocairo ; then
echo "pangocairo not found - no pango support"
else
echo "pkg-config not found - no pango support"
CPPFLAGS="$CPPFLAGS -DHAVE_PANGO=1 `$PKG_CONFIG pango cairo freetype2 --cflags`"
LDLIBS="`$PKG_CONFIG pangocairo pangoft2 freetype2 --libs` $LDLIBS"
fi

CPPFLAGS="$CPPFLAGS -I."
Expand Down

0 comments on commit 81f49bd

Please sign in to comment.