diff --git a/build/pkgs/freetype/spkg-configure.m4 b/build/pkgs/freetype/spkg-configure.m4 index 09dc7a5d4b5..6cfc640efbe 100644 --- a/build/pkgs/freetype/spkg-configure.m4 +++ b/build/pkgs/freetype/spkg-configure.m4 @@ -11,7 +11,7 @@ SAGE_SPKG_CONFIGURE([freetype], [ if test x$sage_spkg_install_freetype = xyes; then AC_SUBST(SAGE_FREETYPE_PREFIX, ['$SAGE_LOCAL']) else - AC_SUBST(SAGE_FREETYPE_PREFIX, [yes]) + AC_SUBST(SAGE_FREETYPE_PREFIX, ['']) fi ]) diff --git a/build/pkgs/libgd/spkg-install b/build/pkgs/libgd/spkg-install index d538e850b48..b1825347f2d 100644 --- a/build/pkgs/libgd/spkg-install +++ b/build/pkgs/libgd/spkg-install @@ -7,10 +7,15 @@ cd src export CFLAGS="-g $CFLAGS" +if [ -n "$SAGE_FREETYPE_PREFIX" ]; then + LIBGD_CONFIGURE="--with-freetype=$SAGE_FREETYPE_PREFIX $LIBGD_CONFIGURE" +else + LIBGD_CONFIGURE="--with-freetype=yes $LIBGD_CONFIGURE" +fi + # We explicitly disable X and fontconfig support, since (1) X is not a SAGE dependency, # and (2) the gd build fails on a lot of OS X PPC machines when X is enabled. sdh_configure --without-jpeg --without-xpm --without-x --without-fontconfig \ - --with-zlib="$SAGE_LOCAL" --with-freetype="$SAGE_FREETYPE_PREFIX" \ - $LIBGD_CONFIGURE + --with-zlib="$SAGE_LOCAL" $LIBGD_CONFIGURE sdh_make sdh_make_install