[builds/unix] Handle 'librsvg' for demo programs.
* builds/unix/configure.raw: Check for 'librsvg'. (LIB_CLOCK_GETTIME): Don't call `AC_SUBST` on this but on... (FT_DEMO_CFLAGS, FT_DEMO_LDFLAGS): ... these two new variables. * builds/unix/unix-cc.in (LIB_CLOCK_GETTIME): Replaced by... (FT_DEMO_CFLAGS, FT_DEMO_LDFLAGS): ... these two new variables.
This commit is contained in:
parent
0bf49bd229
commit
02fa26f4cd
|
@ -514,19 +514,36 @@ if test x"$with_brotli" = xyes -a "$have_brotli" = no; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
# check for librt
|
# Checks for the demo programs.
|
||||||
#
|
#
|
||||||
# We need `clock_gettime' for the `ftbench' demo program.
|
# FreeType doesn't need this. However, since the demo program repository
|
||||||
#
|
# doesn't come with a `configure` script of its own, we integrate the tests
|
||||||
# The code is modeled after gnulib's file `clock_time.m4', ignoring
|
# here for simplicity.
|
||||||
# very old Solaris systems.
|
|
||||||
|
|
||||||
|
# We need `clock_gettime` from 'librt' for the `ftbench` demo program.
|
||||||
|
#
|
||||||
|
# The code is modeled after gnulib's file `clock_time.m4`, ignoring
|
||||||
|
# very old Solaris systems.
|
||||||
LIB_CLOCK_GETTIME=
|
LIB_CLOCK_GETTIME=
|
||||||
AC_SEARCH_LIBS([clock_gettime],
|
AC_SEARCH_LIBS([clock_gettime],
|
||||||
[rt],
|
[rt],
|
||||||
[test "$ac_cv_search_clock_gettime" = "none required" \
|
[test "$ac_cv_search_clock_gettime" = "none required" \
|
||||||
|| LIB_CLOCK_GETTIME=$ac_cv_search_clock_gettime])
|
|| LIB_CLOCK_GETTIME=$ac_cv_search_clock_gettime])
|
||||||
AC_SUBST([LIB_CLOCK_GETTIME])
|
|
||||||
|
# 'librsvg' is needed to demonstrate SVG support.
|
||||||
|
PKG_CHECK_MODULES([LIBRSVG], [librsvg-2.0],
|
||||||
|
[have_librsvg="yes (pkg-config)"], [have_librsvg=no])
|
||||||
|
|
||||||
|
FT_DEMO_CFLAGS=""
|
||||||
|
FT_DEMO_LDFLAGS="$LIB_CLOCK_GETTIME"
|
||||||
|
|
||||||
|
if test "$have_librsvg" != no; then
|
||||||
|
FT_DEMO_CFLAGS="$FT_DEMO_CFLAGS $LIBRSVG_CFLAGS"
|
||||||
|
FT_DEMO_LDFLAGS="$FT_DEMO_LDFLAGS $LIBRSVG_LIBS"
|
||||||
|
fi
|
||||||
|
|
||||||
|
AC_SUBST([FT_DEMO_CFLAGS])
|
||||||
|
AC_SUBST([FT_DEMO_LDFLAGS])
|
||||||
|
|
||||||
|
|
||||||
# Some options handling SDKs/archs in CFLAGS should be copied
|
# Some options handling SDKs/archs in CFLAGS should be copied
|
||||||
|
|
|
@ -106,9 +106,7 @@ endif
|
||||||
|
|
||||||
# Linker flags.
|
# Linker flags.
|
||||||
#
|
#
|
||||||
LDFLAGS := @LDFLAGS@
|
LDFLAGS := @LDFLAGS@
|
||||||
LIB_CLOCK_GETTIME := @LIB_CLOCK_GETTIME@ # for ftbench
|
|
||||||
|
|
||||||
|
|
||||||
# export symbols
|
# export symbols
|
||||||
#
|
#
|
||||||
|
@ -118,11 +116,15 @@ EXPORTS_LIST := $(OBJ_DIR)/ftexport.sym
|
||||||
CCexe := $(CCraw_build) # used to compile `apinames' only
|
CCexe := $(CCraw_build) # used to compile `apinames' only
|
||||||
|
|
||||||
|
|
||||||
# Library linking
|
# Library linking.
|
||||||
#
|
#
|
||||||
LINK_LIBRARY = $(LIBTOOL) --mode=link $(CCraw) -o $@ $(OBJECTS_LIST) \
|
LINK_LIBRARY = $(LIBTOOL) --mode=link $(CCraw) -o $@ $(OBJECTS_LIST) \
|
||||||
-rpath $(libdir) -version-info $(version_info) \
|
-rpath $(libdir) -version-info $(version_info) \
|
||||||
$(LDFLAGS) -no-undefined \
|
$(LDFLAGS) -no-undefined \
|
||||||
-export-symbols $(EXPORTS_LIST)
|
-export-symbols $(EXPORTS_LIST)
|
||||||
|
|
||||||
|
# For the demo programs.
|
||||||
|
FT_DEMO_CFLAGS := @FT_DEMO_CFLAGS@
|
||||||
|
FT_DEMO_LDFLAGS := @FT_DEMO_LDFLAGS@
|
||||||
|
|
||||||
# EOF
|
# EOF
|
||||||
|
|
Loading…
Reference in New Issue