Hello,
When configured as a static lib, it would be convenient to have the "-DLQR_DISABLE_DECLSPEC" added to the pkg-config CFLAGS. Bellow diff achieves this:
diff --git a/configure.ac b/configure.ac
index eaaa3ae..9b761cc 100644
--- a/configure.ac
+++ b/configure.ac
@@ -141,7 +141,8 @@ AC_ARG_ENABLE([declspec],
)],
[declspec=true])
AS_IF([test "x$declspec" = "xfalse"],
- [AC_DEFINE([LQR_DISABLE_DECLSPEC],[],[Disable __declspec directives])],
+ [AC_DEFINE([LQR_DISABLE_DECLSPEC],[],[Disable __declspec directives])]
+ [AC_SUBST(EXTRA_CFLAGS,-DLQR_DISABLE_DECLSPEC)],
[:]
)
diff --git a/lqr-1.pc.in b/lqr-1.pc.in
index 5ced291..3babc99 100644
--- a/lqr-1.pc.in
+++ b/lqr-1.pc.in
@@ -8,4 +8,4 @@ Description: LiquidRescale seam-carving library
Requires: glib-2.0
Version: @PACKAGE_VERSION@
Libs: -l@LIBRARY_SNAME@
-Cflags: -I${includedir}/@LIBRARY_SNAME@
+Cflags: -I${includedir}/@LIBRARY_SNAME@ @EXTRA_CFLAGS@
Cheers,
Tony