diff options
author | Carlos Garcia Campos <carlosgc@gnome.org> | 2013-07-08 20:19:30 +0200 |
---|---|---|
committer | Carlos Garcia Campos <carlosgc@gnome.org> | 2013-07-08 20:22:05 +0200 |
commit | 269b3f3d572a15f1007f8cc84f758b1a293ef8af (patch) | |
tree | 6c59e35fa1b05a652459a02dee2a6de7877d33c5 | |
parent | 40f857d27930aa002a99c96f3892c5e240e7ecb5 (diff) |
build: Make -lpthread take preference over -pthread
This makes libpoppler link to pthreads and fixes runtime error due to
unresolved pthread symbols when running some of the utils and tests.
-rw-r--r-- | m4/ax_pthread.m4 | 2 | ||||
-rw-r--r-- | test/Makefile.am | 6 | ||||
-rw-r--r-- | utils/Makefile.am | 4 |
3 files changed, 8 insertions, 4 deletions
diff --git a/m4/ax_pthread.m4 b/m4/ax_pthread.m4 index 6d400ed4..de0ab8f5 100644 --- a/m4/ax_pthread.m4 +++ b/m4/ax_pthread.m4 @@ -123,7 +123,7 @@ fi # which indicates that we try without any flags at all, and "pthread-config" # which is a program returning the flags for the Pth emulation library. -ax_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config" +ax_pthread_flags="pthreads none -Kthread -kthread lthread pthread -pthread -pthreads -mthreads --thread-safe -mt pthread-config" # The ordering *is* (sometimes) important. Some notes on the # individual items follow: diff --git a/test/Makefile.am b/test/Makefile.am index b3289c72..af5bcf22 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -52,7 +52,8 @@ gtk_test_LDADD = \ $(top_builddir)/poppler/libpoppler.la \ $(top_builddir)/glib/libpoppler-glib.la \ $(CAIRO_LIBS) \ - $(GTK_TEST_LIBS) + $(GTK_TEST_LIBS) \ + $(PTHREAD_LIBS) pdf_inspector_SOURCES = \ @@ -64,7 +65,8 @@ pdf_inspector_LDADD = \ $(CAIRO_LIBS) \ $(FREETYPE_LIBS) \ $(GTK_TEST_LIBS) \ - $(X_EXTRA_LIBS) + $(X_EXTRA_LIBS) \ + $(PTHREAD_LIBS) perf_test_SOURCES = \ perf-test.cc \ diff --git a/utils/Makefile.am b/utils/Makefile.am index d56cc9c6..0c954413 100644 --- a/utils/Makefile.am +++ b/utils/Makefile.am @@ -35,7 +35,9 @@ endif pdftocairo_LDADD = \ $(top_builddir)/poppler/libpoppler-cairo.la \ - $(LDADD) $(PDFTOCAIRO_LIBS) + $(LDADD) \ + $(PDFTOCAIRO_LIBS) \ + $(PTHREAD_LIBS) pdftocairo_binary = pdftocairo |