diff options
author | Werner Lemberg <wl@gnu.org> | 2018-01-07 18:41:54 +0100 |
---|---|---|
committer | Werner Lemberg <wl@gnu.org> | 2018-01-07 19:06:19 +0100 |
commit | 1d6773e6d999c37e7927c5d9cc48fb87d0dbf0cb (patch) | |
tree | 61e2902489755515d085e459b5c079f69423cf5c /builds | |
parent | 21bd9c2f8ce57b20204ef505e9a64f55350edec0 (diff) | |
download | freetype2-1d6773e6d999c37e7927c5d9cc48fb87d0dbf0cb.tar.gz |
Add check for librt, needed for `ftbench' (#52824).
* builds/unix/configure.raw: Call AC_USE_SYSTEM_EXTENSIONS.
(LIB_CLOCK_GETTIME): Define; this will hold `-lrt' if necessary.
* builds/unix/unix-cc.in (LIB_CLOCK_GETTIME): New variable.
Diffstat (limited to 'builds')
-rw-r--r-- | builds/unix/configure.raw | 15 | ||||
-rw-r--r-- | builds/unix/unix-cc.in | 3 |
2 files changed, 17 insertions, 1 deletions
diff --git a/builds/unix/configure.raw b/builds/unix/configure.raw index 126e0914b..b5d11b2fb 100644 --- a/builds/unix/configure.raw +++ b/builds/unix/configure.raw @@ -509,6 +509,21 @@ if test x"$with_harfbuzz" = xyes -a "$have_harfbuzz" = no; then fi +# check for librt +# +# We need `clock_gettime' for the `ftbench' demo program. +# +# The code is modeled after gnulib's file `clock_time.m4', ignoring +# very old Solaris systems. + +LIB_CLOCK_GETTIME= +AC_SEARCH_LIBS([clock_gettime], + [rt], + [test "$ac_cv_search_clock_gettime" = "none required" \ + || LIB_CLOCK_GETTIME=$ac_cv_search_clock_gettime]) +AC_SUBST([LIB_CLOCK_GETTIME]) + + # Some options handling SDKs/archs in CFLAGS should be copied # to LDFLAGS. Apple TechNote 2137 recommends to include these # options in CFLAGS but not in LDFLAGS. diff --git a/builds/unix/unix-cc.in b/builds/unix/unix-cc.in index 9b888c7d4..a06246d63 100644 --- a/builds/unix/unix-cc.in +++ b/builds/unix/unix-cc.in @@ -93,7 +93,8 @@ CC := $(LIBTOOL) --mode=compile $(CCraw) # Linker flags. # -LDFLAGS := @LDFLAGS@ +LDFLAGS := @LDFLAGS@ +LIB_CLOCK_GETTIME := @LIB_CLOCK_GETTIME@ # for ftbench # export symbols |