[trunk] add libopenjpeg-jpwl.pc.in. fix output when --disable-shared or --disable...
authorVincent Torri <vincent.torri@gmail.com>
Mon, 10 Oct 2011 06:51:08 +0000 (06:51 +0000)
committerVincent Torri <vincent.torri@gmail.com>
Mon, 10 Oct 2011 06:51:08 +0000 (06:51 +0000)
CHANGES
Makefile.am
applications/jpip/libopenjpip/Makefile.am
configure.ac
libopenjpeg-jpwl.pc.in [new file with mode: 0644]
libopenjpeg/Makefile.am
libopenjpeg/jpwl/Makefile.am

diff --git a/CHANGES b/CHANGES
index cb264ce28187e4c5177165674f04f0ddc589bfba..92a9b34aad01e802f8e04db4665f1e7aceb18d99 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -7,6 +7,8 @@ What's New for OpenJPEG
 
 October 10, 2011
 * [vincent] fix 'distcheck' rule
++ [vincent] add libopenjpeg-jpwl.pc
+* [vincent] fix output when --disable-shared or --disable-static is passed to configure. Minor clean up of configure.ac.
 
 October 07, 2011
 * [mickael] WIP: correct mistake in text output inside set_decoded_area function (credit to Winfried)
index a742f5efc9b62b1cf01cb5e2b98482c2925a9a4d..7e5dc5c82522404fab5324390a1ef4d3f478c0fe 100644 (file)
@@ -7,6 +7,11 @@ SUBDIRS = libopenjpeg applications doc
 pkgconfigdir = $(libdir)/pkgconfig
 pkgconfig_DATA = libopenjpeg1.pc
 
+if WANT_JPWL
+pkgconfig_DATA += libopenjpeg-jpwl.pc
+endif
+
+
 
 MAINTAINERCLEANFILES = \
 Makefile.in \
@@ -39,6 +44,7 @@ THANKS \
 bootstrap.sh \
 libopenjpeg1.pc.cmake \
 libopenjpeg1.pc.in \
+libopenjpeg-jpwl.pc.in \
 opj_config.h.cmake.in \
 m4/opj_check_lib.m4 \
 m4/opj_doxygen.m4 \
index da5bbb5be75eac4621f09a6a715b7e7d11734e7a..df32184d9916713e754e258464ebacd579ecfa0a 100644 (file)
@@ -66,11 +66,19 @@ libopenjpip_local_la_SOURCES = $(JPIP_SRC)
 
 install-data-hook:
        @echo -e " (LA)\t$(libdir)/libopenjpip_server.la" >> $(top_builddir)/report.txt
+if BUILD_SHARED
        @( $(call solist_s) ) >> $(top_builddir)/report.txt
+endif
+if BUILD_STATIC
        @echo -e " (A)\t$(base_s)/$(a_s)" >> $(top_builddir)/report.txt
+endif
        @echo -e " (LA)\t$(libdir)/libopenjpip_local.la" >> $(top_builddir)/report.txt
+if BUILD_SHARED
        @( $(call solist_c) ) >> $(top_builddir)/report.txt
+endif
+if BUILD_STATIC
        @echo -e " (A)\t$(base_c)/$(a_c)" >> $(top_builddir)/report.txt
+endif
 
 solist_s    = $(foreach f, $(dll_s) $(so_s), echo -e ' $(SO_PREFIX)\t$(base_s)/$(f)' ;)
 get_tok_s   = $(shell grep -E "^$(1)=" libopenjpip_server.la | cut -d "'" -f 2)
index 0ff6a32d40aade5c6c16c8b13b00985b32fbba8b..f703a5547a24b8d8aa4be5499dc78a81db9dc5e4 100644 (file)
@@ -183,13 +183,13 @@ AC_MSG_RESULT([${want_png}])
 
 if test "x${want_png}" = "xyes" ; then
 
-   PKG_CHECK_MODULES([PNG], [libpng14],
+   PKG_CHECK_MODULES([PNG], [libpng15],
       [have_libpng="yes"],
       [
-       PKG_CHECK_MODULES([PNG], [libpng12],
+       PKG_CHECK_MODULES([PNG], [libpng14],
           [have_libpng="yes"],
           [
-           PKG_CHECK_MODULES([PNG], [libpng10],
+           PKG_CHECK_MODULES([PNG], [libpng12],
               [have_libpng="yes"],
               [
                PKG_CHECK_MODULES([PNG], [libpng],
@@ -284,10 +284,7 @@ AC_MSG_RESULT([${want_lcms2}])
 
 if test "x${want_lcms2}" = "xyes" ; then
    PKG_CHECK_MODULES([LCMS2], [lcms2],
-      [
-       have_lcms2="yes"
-       requirements="lcms2"
-      ],
+      [have_lcms2="yes"],
       [have_lcms2="no"])
 fi
 
@@ -319,15 +316,9 @@ if test "x${have_lcms2}" = "xno" ; then
 
    if test "x${want_lcms1}" = "xyes" ; then
       PKG_CHECK_MODULES([LCMS1], [lcms1],
-         [
-          have_lcms1="yes"
-          requirements="lcms1"
-         ],
+         [have_lcms1="yes"],
          [PKG_CHECK_MODULES([LCMS1], [lcms],
-            [
-             have_lcms1="yes"
-             requirements="lcms"
-            ],
+            [have_lcms1="yes"],
             [have_lcms1="no"])])
    fi
 
@@ -402,9 +393,17 @@ fi
 
 ### Checks for library functions
 
+
+### Post configuration
+
+AM_CONDITIONAL([BUILD_SHARED], [test "x${enable_shared}" = "xyes"])
+AM_CONDITIONAL([BUILD_STATIC], [test "x${enable_static}" = "xyes"])
+
+
 AC_CONFIG_FILES([
 Makefile
 libopenjpeg1.pc
+libopenjpeg-jpwl.pc
 libopenjpeg/Makefile
 libopenjpeg/jpwl/Makefile
 applications/Makefile
diff --git a/libopenjpeg-jpwl.pc.in b/libopenjpeg-jpwl.pc.in
new file mode 100644 (file)
index 0000000..ae73add
--- /dev/null
@@ -0,0 +1,13 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: openjpeg
+Description: JPEG2000 Wireless (Part 11 - JPWL) library
+URL: http://www.openjpeg.org/
+Version: @VERSION@
+@pkgconfig_requires_private@: @requirements@
+Libs: -L${libdir} -lopenjpeg_JPWL
+Libs.private: -lm
+Cflags: -I${includedir}
index aef6ba6f23aedde47c6a1d6130ff1d25affaa9a6..0c551e0c0e0b8a88cb4d6b855dbe74f2c2803ac8 100644 (file)
@@ -81,8 +81,12 @@ install-data-hook:
                  openjpeg.h
        @rm -rf $(top_builddir)/report.txt
        @echo -e " (LA)\t$(libdir)/libopenjpeg.la" >> $(top_builddir)/report.txt
+if BUILD_SHARED
        @( $(call solist) ) >> $(top_builddir)/report.txt
+endif
+if BUILD_STATIC
        @echo -e " (A)\t$(base)/$(a)" >> $(top_builddir)/report.txt
+endif
        @echo -e " (H)\t$(includedir)/openjpeg-$(MAJOR_NR).$(MINOR_NR)/openjpeg.h" >> $(top_builddir)/report.txt
        @echo -e " (LN)\t$(includedir)/openjpeg.h" >> $(top_builddir)/report.txt
 
index 701348b6d27450c69be87ff15a189035873ead95..26ab4eba37d3ef6192a1cef4bc3e0218ec631fca 100644 (file)
@@ -51,8 +51,12 @@ rs.h
 
 install-data-hook:
        @echo -e " (LA)\t$(libdir)/libopenjpeg_JPWL.la" >> $(top_builddir)/report.txt
+if BUILD_SHARED
        @( $(call solist) ) >> $(top_builddir)/report.txt
+endif
+if BUILD_STATIC
        @echo -e " (A)\t$(base)/$(a)" >> $(top_builddir)/report.txt
+endif
 
 solist    = $(foreach f, $(dll) $(so), echo -e ' $(SO_PREFIX)\t$(base)/$(f)' ;)
 get_tok   = $(shell grep -E "^$(1)=" $(lib_LTLIBRARIES) | cut -d "'" -f 2)