diff options
-rw-r--r-- | configure.ac | 14 | ||||
-rw-r--r-- | test/Makefile.am | 6 |
2 files changed, 18 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac index 71794ca7..5fa58326 100644 --- a/configure.ac +++ b/configure.ac @@ -71,6 +71,20 @@ if test $ac_cv_func_gethostbyname = no; then AC_CHECK_LIB(bsd, gethostbyname, X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd") fi +AC_CHECK_FUNC(nanosleep,,) +dnl try in librt if not found in current LIBS +if test x$ac_cv_func_nanosleep = xno +then + AC_CHECK_LIB(rt,nanosleep, X_EXTRA_LIBS="$X_EXTRA_LIBS -lrt") +fi + +dnl try in libposix4, if not found so far +if test x$ac_cv_func_nanosleep = xno && test x$ac_cv_lib_rt_nanosleep = xno +then + AC_CHECK_LIB(posix4,nanosleep, X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix4") +fi + + dnl ##### Checks for library functions. AC_CHECK_FUNCS(popen mkstemp mkstemps) diff --git a/test/Makefile.am b/test/Makefile.am index 0ec255f6..6abef193 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -72,7 +72,8 @@ pdf_inspector_LDADD = \ $(top_builddir)/poppler/libpoppler.la \ $(CAIRO_LIBS) \ $(FREETYPE_LIBS) \ - $(GTK_TEST_LIBS) + $(GTK_TEST_LIBS) \ + $(X_EXTRA_LIBS) perf_test_SOURCES = \ perf-test.cc \ @@ -80,7 +81,8 @@ perf_test_SOURCES = \ perf_test_LDADD = \ $(top_builddir)/poppler/libpoppler.la \ - $(FREETYPE_LIBS) + $(FREETYPE_LIBS) \ + $(X_EXTRA_LIBS) pdf_fullrewrite_SOURCES = \ pdf-fullrewrite.cc |