summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.ac3
-rw-r--r--glib/Makefile.am2
-rw-r--r--glib/demo/Makefile.am2
-rw-r--r--test/Makefile.am2
-rw-r--r--utils/Makefile.am2
5 files changed, 10 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 47f2e70e..96ebe8d5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -29,15 +29,18 @@ AC_DEFINE([TEXTOUT_WORD_LIST], [1], [Enable word list support.])
dnl Check for OS specific flags
win32_libs=""
create_shared_lib=""
+auto_import_flags=""
case "$host_os" in
mingw*)
win32_libs="-lgdi32"
create_shared_lib="-no-undefined"
+ auto_import_flags="-Wl,--enable-auto-import"
;;
esac
AC_SUBST(win32_libs)
AC_SUBST(create_shared_lib)
+AC_SUBST(auto_import_flags)
ACX_PTHREAD()
diff --git a/glib/Makefile.am b/glib/Makefile.am
index 806a37a2..faa85a6b 100644
--- a/glib/Makefile.am
+++ b/glib/Makefile.am
@@ -98,7 +98,7 @@ libpoppler_glib_la_LIBADD = \
$(FONTCONFIG_LIBS) \
$(cairo_libs)
-libpoppler_glib_la_LDFLAGS = -version-info 4:0:0 @create_shared_lib@
+libpoppler_glib_la_LDFLAGS = -version-info 4:0:0 @create_shared_lib@ @auto_import_flags@
if BUILD_WITH_GDK
noinst_PROGRAMS = test-poppler-glib
diff --git a/glib/demo/Makefile.am b/glib/demo/Makefile.am
index 13bccb3d..4c301de5 100644
--- a/glib/demo/Makefile.am
+++ b/glib/demo/Makefile.am
@@ -6,6 +6,8 @@ INCLUDES = \
-DGTK_DISABLE_DEPRECATED \
$(POPPLER_GLIB_DISABLE_SINGLE_INCLUDES)
+AM_LDFLAGS = @auto_import_flags@
+
if BUILD_GTK_TEST
noinst_PROGRAMS = poppler-glib-demo
endif
diff --git a/test/Makefile.am b/test/Makefile.am
index 6abef193..8c873d36 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -47,6 +47,8 @@ INCLUDES = \
noinst_PROGRAMS = $(gtk_splash_test) $(gtk_cairo_test) $(pdf_inspector) $(perf_test) $(pdf_fullrewrite)
+AM_LDFLAGS = @auto_import_flags@
+
gtk_splash_test_SOURCES = \
gtk-splash-test.cc
diff --git a/utils/Makefile.am b/utils/Makefile.am
index 342fa737..19e8a20c 100644
--- a/utils/Makefile.am
+++ b/utils/Makefile.am
@@ -33,6 +33,8 @@ LDADD = \
$(UTILS_LIBS) \
$(FONTCONFIG_LIBS)
+AM_LDFLAGS = @auto_import_flags@
+
bin_PROGRAMS = \
pdffonts \
pdfimages \