From ec773964eda80e7b8082675bcaadc081852f1c5b Mon Sep 17 00:00:00 2001 From: Shahram Najm Date: Fri, 10 Oct 2014 18:09:04 +0100 Subject: [PATCH] GRIB-179: Data representation template 5.42 (CCSDS). Python fixes --- configure.ac | 5 +++++ python/Makefile.am | 2 ++ python/setup.py.in | 12 ++++++++++++ 3 files changed, 19 insertions(+) diff --git a/configure.ac b/configure.ac index 530661a6b..25272503f 100755 --- a/configure.ac +++ b/configure.ac @@ -470,6 +470,11 @@ if test "x$with_aec" != xno ; then AC_CHECK_LIB(aec, aec_encode, , [AC_MSG_FAILURE( [aec test failed (--without-aec to disable)])]) CCSDS_TEST="ccsds.sh" + LIB_AEC='-laec' + AC_SUBST(LIB_AEC) + AEC_DIR="$with_aec" + AC_SUBST(AEC_DIR) + fi AC_SUBST(CCSDS_TEST) diff --git a/python/Makefile.am b/python/Makefile.am index 96a845d16..dc528c63b 100644 --- a/python/Makefile.am +++ b/python/Makefile.am @@ -84,6 +84,8 @@ do_subst = sed -e 's,[@]LIB_JASPER[@],$(LIB_JASPER),g' \ -e 's,[@]JASPER_DIR[@],$(JASPER_DIR),g' \ -e 's,[@]LIB_OPENJPEG[@],$(LIB_OPENJPEG),g' \ -e 's,[@]OPENJPEG_DIR[@],$(OPENJPEG_DIR),g' \ + -e 's,[@]LIB_AEC[@],$(LIB_AEC),g' \ + -e 's,[@]AEC_DIR[@],$(AEC_DIR),g' \ -e 's,[@]LIB_PNG[@],$(LIB_PNG),g' \ -e 's,[@]BUILD_DIR[@],$(top_builddir),g' \ -e 's,[@]DATA_HANDLER[@],$(PYTHON_DATA_HANDLER),g' diff --git a/python/setup.py.in b/python/setup.py.in index 019ff7588..c485368f1 100644 --- a/python/setup.py.in +++ b/python/setup.py.in @@ -46,6 +46,18 @@ png = '@LIB_PNG@' if png: add_attribute(libraries = 'png') + +with_aec = '@LIB_AEC@' +if with_aec: + aec_dir = '@AEC_DIR@' + if aec_dir and aec_dir != 'system': + add_attribute( + include_dirs = os.path.join(aec_dir,'include'), + library_dirs = os.path.join(aec_dir,'lib') + ) + add_attribute(libraries = 'aec') + + data_handler = '@DATA_HANDLER@' if data_handler == "numpy": import numpy