Skip to content

Commit

Permalink
Merge pull request #13 from rsbivand/master
Browse files Browse the repository at this point in the history
copied current rgdal check for version wrt pcs.csv #11
  • Loading branch information
appelmar authored May 25, 2019
2 parents a78a2b5 + a7c38a9 commit 5edfb78
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 17 deletions.
41 changes: 26 additions & 15 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -633,7 +633,6 @@ infodir
docdir
oldincludedir
includedir
runstatedir
localstatedir
sharedstatedir
sysconfdir
Expand Down Expand Up @@ -714,7 +713,6 @@ datadir='${datarootdir}'
sysconfdir='${prefix}/etc'
sharedstatedir='${prefix}/com'
localstatedir='${prefix}/var'
runstatedir='${localstatedir}/run'
includedir='${prefix}/include'
oldincludedir='/usr/include'
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
Expand Down Expand Up @@ -967,15 +965,6 @@ do
| -silent | --silent | --silen | --sile | --sil)
silent=yes ;;

-runstatedir | --runstatedir | --runstatedi | --runstated \
| --runstate | --runstat | --runsta | --runst | --runs \
| --run | --ru | --r)
ac_prev=runstatedir ;;
-runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
| --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
| --run=* | --ru=* | --r=*)
runstatedir=$ac_optarg ;;

-sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
ac_prev=sbindir ;;
-sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
Expand Down Expand Up @@ -1113,7 +1102,7 @@ fi
for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
datadir sysconfdir sharedstatedir localstatedir includedir \
oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
libdir localedir mandir runstatedir
libdir localedir mandir
do
eval ac_val=\$$ac_var
# Remove trailing slashes.
Expand Down Expand Up @@ -1266,7 +1255,6 @@ Fine tuning of the installation directories:
--sysconfdir=DIR read-only single-machine data [PREFIX/etc]
--sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
--localstatedir=DIR modifiable single-machine data [PREFIX/var]
--runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
--libdir=DIR object code libraries [EPREFIX/lib]
--includedir=DIR C header files [PREFIX/include]
--oldincludedir=DIR C header files for non-gcc [/usr/include]
Expand Down Expand Up @@ -2164,6 +2152,28 @@ $as_echo "no" >&6; }
fi
fi
#GDAL_DATA_TEST_FILE="${GDAL_DATADIR}/pcs.csv"
#AC_MSG_CHECKING(GDAL: ${GDAL_DATADIR}/pcs.csv readable)
#if test -r "${GDAL_DATA_TEST_FILE}" ; then
# AC_MSG_RESULT(yes)
#else
# AC_MSG_RESULT(no)
# AC_MSG_ERROR([pcs.csv not found in GDAL data directory.])
#fi
GDAL_GE_250="no"
#GDAL_MAJ_VER=`echo $GDAL_VERSION | cut -d "." -f1`
#GDAL_MOD_VER=`echo $GDAL_VERSION | cut -d "." -f2`
if test "${GDAL_MAJOR}" = 2 ; then
if test "${GDAL_MINOR}" -ge 5 ; then
GDAL_GE_250="yes"
fi
else
if test "${GDAL_MAJOR}" -ge 3 ; then
GDAL_GE_250="yes"
fi
fi
GDAL_DATA_TEST_FILE="${GDAL_DATADIR}/pcs.csv"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking GDAL: ${GDAL_DATADIR}/pcs.csv readable" >&5
$as_echo_n "checking GDAL: ${GDAL_DATADIR}/pcs.csv readable... " >&6; }
Expand All @@ -2173,7 +2183,9 @@ $as_echo "yes" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
as_fn_error $? "pcs.csv not found in GDAL data directory." "$LINENO" 5
if test "${GDAL_GE_250}" = no; then
as_fn_error $? "pcs.csv not found in GDAL data directory." "$LINENO" 5
fi
fi
Expand All @@ -2182,7 +2194,6 @@ fi
# proj #########################################################################################################
# largely copied from https://github.com/cran/rgdal/blob/master/configure.ac
Expand Down
27 changes: 25 additions & 2 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -222,13 +222,37 @@ else
fi
fi

#GDAL_DATA_TEST_FILE="${GDAL_DATADIR}/pcs.csv"
#AC_MSG_CHECKING(GDAL: ${GDAL_DATADIR}/pcs.csv readable)
#if test -r "${GDAL_DATA_TEST_FILE}" ; then
# AC_MSG_RESULT(yes)
#else
# AC_MSG_RESULT(no)
# AC_MSG_ERROR([pcs.csv not found in GDAL data directory.])
#fi

GDAL_GE_250="no"
#GDAL_MAJ_VER=`echo $GDAL_VERSION | cut -d "." -f1`
#GDAL_MOD_VER=`echo $GDAL_VERSION | cut -d "." -f2`
if test "${GDAL_MAJOR}" = 2 ; then
if test "${GDAL_MINOR}" -ge 5 ; then
GDAL_GE_250="yes"
fi
else
if test "${GDAL_MAJOR}" -ge 3 ; then
GDAL_GE_250="yes"
fi
fi

GDAL_DATA_TEST_FILE="${GDAL_DATADIR}/pcs.csv"
AC_MSG_CHECKING(GDAL: ${GDAL_DATADIR}/pcs.csv readable)
if test -r "${GDAL_DATA_TEST_FILE}" ; then
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
AC_MSG_ERROR([pcs.csv not found in GDAL data directory.])
if test "${GDAL_GE_250}" = no; then
AC_MSG_ERROR([pcs.csv not found in GDAL data directory.])
fi
fi


Expand All @@ -237,7 +261,6 @@ fi




# proj #########################################################################################################
# largely copied from https://github.com/cran/rgdal/blob/master/configure.ac

Expand Down

0 comments on commit 5edfb78

Please sign in to comment.