lmi-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi-commits] [6290] Link with wxPdfDocument library in autotools build


From: Vadim Zeitlin
Subject: [lmi-commits] [6290] Link with wxPdfDocument library in autotools build system
Date: Sat, 19 Sep 2015 23:46:03 +0000

Revision: 6290
          http://svn.sv.gnu.org/viewvc/?view=rev&root=lmi&revision=6290
Author:   zeitlin
Date:     2015-09-19 23:46:02 +0000 (Sat, 19 Sep 2015)
Log Message:
-----------
Link with wxPdfDocument library in autotools build system

Add wxPdfDocument headers and library detection to configure and use it the
makefile.

Modified Paths:
--------------
    lmi/trunk/Makefile.am
    lmi/trunk/configure.ac

Modified: lmi/trunk/Makefile.am
===================================================================
--- lmi/trunk/Makefile.am       2015-09-19 23:45:58 UTC (rev 6289)
+++ lmi/trunk/Makefile.am       2015-09-19 23:46:02 UTC (rev 6290)
@@ -215,6 +215,7 @@
     $(XMLWRAPP_LIBS) \
     $(GTK_LIBS) \
     $(BOOST_LIBS) \
+    $(WXPDFDOC_LIBS) \
     $(WX_LIBS)
 
 lmi_wx_CXXFLAGS = $(AM_CXXFLAGS) $(WX_CXXFLAGS) $(XMLWRAPP_CFLAGS) 
$(GTK_CFLAGS)
@@ -233,6 +234,7 @@
     $(XMLWRAPP_LIBS) \
     $(GTK_LIBS) \
     $(BOOST_LIBS) \
+    $(WXPDFDOC_LIBS) \
     $(WX_LIBS)
 if LMI_MSW
     lmi_wx_SOURCES += lmi_msw_res.rc
@@ -280,6 +282,7 @@
     $(XMLWRAPP_LIBS) \
     $(GTK_LIBS) \
     $(BOOST_LIBS) \
+    $(WXPDFDOC_LIBS) \
     $(WX_LIBS)
 
 # libraries

Modified: lmi/trunk/configure.ac
===================================================================
--- lmi/trunk/configure.ac      2015-09-19 23:45:58 UTC (rev 6289)
+++ lmi/trunk/configure.ac      2015-09-19 23:46:02 UTC (rev 6290)
@@ -311,11 +311,27 @@
     AC_MSG_WARN([Inappropriate wxWidgets build options detected but 
continuing.])
 )
 
-CPPFLAGS=$save_CPPFLAGS
-
 WX_DETECT_STANDARD_OPTION_VALUES
 WX_STANDARD_OPTIONS_SUMMARY_MSG
 
+dnl --- wxPdfDocument ---
+AC_CHECK_HEADER([wx/pdfdc.h],
+    [],
+    [AC_MSG_ERROR([wxPdfDocument header not found.])])
+
+dnl Defer to the same macro used by wxPdfDocument itself for constructing its
+dnl library name.
+WX_LIKE_LIBNAME([pdfdoc_lib], [wxcode], [pdfdoc])
+AC_CHECK_LIB([$pdfdoc_lib], [main],
+    [WXPDFDOC_LIBS="-l$pdfdoc_lib"],
+    [AC_MSG_ERROR([wxPdfDocument library $pdfdoc_lib not found.])])
+
+AC_SUBST(WXPDFDOC_LIBS)
+
+dnl Restore pre-wx CPPFLAGS value only now, we needed wx flags for
+dnl wxPdfDocument checks.
+CPPFLAGS=$save_CPPFLAGS
+
 dnl --- Boost (required) ---
 if test "x$lmi_boost_headers" != "x"; then
     CPPFLAGS="$CPPFLAGS -I$lmi_boost_headers"




reply via email to

[Prev in Thread] Current Thread [Next in Thread]