SUP-376: Patch for grib_api, path handling in autotools

This commit is contained in:
Shahram Najm 2013-04-12 11:00:07 +01:00
parent 38e613f4b8
commit 319ec4d534
3 changed files with 10 additions and 20 deletions

View File

@ -30,22 +30,10 @@ AC_CONFIG_HEADER([src/config.h])
AC_CONFIG_FILES([grib_api.pc grib_api.spec grib_api_f90.pc])
AM_INIT_AUTOMAKE($PACKAGE_NAME,[${PACKAGE_VERSION}],[http://www.ecmwf.int])
definition_files_path=/usr/local/share/grib_api/definitions
samples_files_path=/usr/local/share/grib_api/samples
ifs_samples_files_path=/usr/local/share/grib_api/ifs_samples
default_perl_install=/usr/local/perl
if test "$prefix" != 'NONE' ; then
definition_files_path=${prefix}/share/grib_api/definitions
samples_files_path=${prefix}/share/grib_api/samples
ifs_samples_files_path=${prefix}/share/grib_api/ifs_samples
default_perl_install=${prefix}/perl
fi
if test "$datadir" != '${datarootdir}' ; then
definition_files_path=$datadir/grib_api/definitions
fi
definition_files_path="${datadir}/grib_api/definitions"
samples_files_path="${datadir}/grib_api/samples"
ifs_samples_files_path="${datadir}/grib_api/ifs_samples"
default_perl_install="${prefix}/perl"
AC_DEFINE_UNQUOTED(GRIB_API_MAIN_VERSION,$GRIB_API_MAIN_VERSION,Grib Api version)
AC_DEFINE_UNQUOTED(GRIB_API_MAJOR_VERSION,$GRIB_API_MAJOR_VERSION,Grib Api Major release)
@ -201,10 +189,6 @@ GRIB_SAMPLES_PATH=$samples_files_path
GRIB_TEMPLATES_PATH=$samples_files_path
GRIB_DEFINITION_PATH=$definition_files_path
AC_DEFINE_UNQUOTED(GRIB_TEMPLATES_PATH,"$samples_files_path",Directory where templates are)
AC_DEFINE_UNQUOTED(GRIB_SAMPLES_PATH,"$samples_files_path",Directory where samples are)
AC_DEFINE_UNQUOTED(GRIB_DEFINITION_PATH,"$definition_files_path",Directory where definition files are)
AC_SUBST(GRIB_TEMPLATES_PATH)
AC_SUBST(GRIB_SAMPLES_PATH)
AC_SUBST(GRIB_DEFINITION_PATH)

View File

@ -2,6 +2,9 @@
AM_CFLAGS = @WARN_PEDANTIC@
AM_CPPFLAGS = -DGRIB_TEMPLATES_PATH=\"$(GRIB_TEMPLATES_PATH)\" \
-DGRIB_SAMPLES_PATH=\"$(GRIB_SAMPLES_PATH)\" \
-DGRIB_DEFINITION_PATH=\"$(GRIB_DEFINITION_PATH)\"
# -DUSE_JPEG2000
# -DYYDEBUG

View File

@ -1,5 +1,8 @@
AM_CFLAGS = @WARN_PEDANTIC@ @WERROR@ -DYYDEBUG
AM_CPPFLAGS = -DGRIB_TEMPLATES_PATH=\"$(GRIB_TEMPLATES_PATH)\" \
-DGRIB_SAMPLES_PATH=\"$(GRIB_SAMPLES_PATH)\" \
-DGRIB_DEFINITION_PATH=\"$(GRIB_DEFINITION_PATH)\"
AM_YFLAGS = -d