From 81b9e78565e48d5b66e8a5c2b1698ef47ccf5c9e Mon Sep 17 00:00:00 2001 From: Vincent Torri Date: Mon, 10 Oct 2011 06:51:08 +0000 Subject: [PATCH] [trunk] add libopenjpeg-jpwl.pc.in. fix output when --disable-shared or --disable-static is passed to configure. Minor clean up of configure.ac. --- CHANGES | 2 ++ Makefile.am | 6 +++++ applications/jpip/libopenjpip/Makefile.am | 8 +++++++ configure.ac | 29 +++++++++++------------ libopenjpeg-jpwl.pc.in | 13 ++++++++++ libopenjpeg/Makefile.am | 4 ++++ libopenjpeg/jpwl/Makefile.am | 4 ++++ 7 files changed, 51 insertions(+), 15 deletions(-) create mode 100644 libopenjpeg-jpwl.pc.in diff --git a/CHANGES b/CHANGES index cb264ce2..92a9b34a 100644 --- 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) diff --git a/Makefile.am b/Makefile.am index a742f5ef..7e5dc5c8 100644 --- a/Makefile.am +++ b/Makefile.am @@ -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 \ diff --git a/applications/jpip/libopenjpip/Makefile.am b/applications/jpip/libopenjpip/Makefile.am index da5bbb5b..df32184d 100644 --- a/applications/jpip/libopenjpip/Makefile.am +++ b/applications/jpip/libopenjpip/Makefile.am @@ -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) diff --git a/configure.ac b/configure.ac index 0ff6a32d..f703a554 100644 --- a/configure.ac +++ b/configure.ac @@ -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 index 00000000..ae73add4 --- /dev/null +++ b/libopenjpeg-jpwl.pc.in @@ -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} diff --git a/libopenjpeg/Makefile.am b/libopenjpeg/Makefile.am index aef6ba6f..0c551e0c 100644 --- a/libopenjpeg/Makefile.am +++ b/libopenjpeg/Makefile.am @@ -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 diff --git a/libopenjpeg/jpwl/Makefile.am b/libopenjpeg/jpwl/Makefile.am index 701348b6..26ab4eba 100644 --- a/libopenjpeg/jpwl/Makefile.am +++ b/libopenjpeg/jpwl/Makefile.am @@ -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)