Skip to content
Commits on Source (14)
......@@ -9,3 +9,4 @@ OBJ.win64
lib/Linux
ogdi-config
ogdi.pc
autom4te.cache/
compiler: gcc
language: cpp
cache:
apt: true
directories:
- $HOME/.ccache
before_install:
- sudo apt install libz-dev libexpat-dev ccache
install:
- export TOPDIR=$PWD
- CC="ccache gcc" ./configure --with-zlib --with-expat --prefix=$HOME/install-ogdi
- make
- make install -j3
script:
- echo "done"
notifications:
#email:
# recipients:
# - gdal-commits@lists.osgeo.org
irc:
channels:
- "irc.freenode.org#gdal"
use_notice: true
......@@ -4,7 +4,7 @@
1) Ensure the OGDI_VERSION and OGDI_RELEASEDATE values are up to date in
ogdi/include/ecs_util.h.
2) Update OGDI_MINOR OGDI_MAJOR and OGDI_VERSION in configure.in for
2) Update OGDI_MINOR OGDI_MAJOR and OGDI_VERSION in configure.ac for
proper soname versioning of libraries. Run autoconf to regenerate
configure script.
......
OGDI 3.x Core News
==================
OGDI Core News
==============
View the ChangeLog file for detailed, file by file notes on changes. The
NEWS file is just used to sumarize major changes, and new features.
4.0.0
=====
o Remove PROJ.4 dependency, functionality and related API
With PROJ 6 being released and removing completely projects.h old API,
a major upgrade would have been needed. I'd rater choose to completely
cut off PROJ related functionality from OGDI.
For the VRF case, projection support can be done through the GDAL/OGR
OGDI driver.
The dtusa and dtcanada drivers are removed.
The following functions are removed from ecs_util.h:
cln_SetServerProjection
cln_SetClientProjection
cln_ProjInit
cln_CompareProjections
cln_ConvRegion
cln_ConvTtoS
cln_ConvStoT
cln_ChangeProjection
cln_ChangeProjectionArea
cln_ChangeProjectionLine
cln_ChangeProjectionPoint
cln_ChangeProjectionMatrix
cln_ChangeProjectionImage
cln_ChangeProjectionText
ecs_distance_meters
o Update server version to 4.0 to reflect removal of SetServerProjection
capability
o Build: add -fPIC when required
o Rename aclocal.m4 to acinclude.m4 and apply stricter quoting
o Respect LDFLAGS provided to ./configure
o Fall back to libtirpc if libc does not provide rpc/rpc.h
o Don't hardcode compiler to fix cross compilation.
3.2.1
=====
......
......@@ -46,6 +46,8 @@ OGDI_VERSION = $(OGDI_MAJOR)$(OGDI_MINOR)
# Default definitions
#
AUTOCONF_CC = @CC@
ifndef CFG
CFG = release
endif
......@@ -101,7 +103,6 @@ VPF_DIR = $(topdir)/vpflib
#
EXPAT_SETTING = internal
ZLIB_SETTING = internal
PROJ_SETTING = internal
#
# Standard location of include files.
......@@ -113,7 +114,6 @@ GENERAL_INCLUDE = $(INCL_SW)$(TOPDIR)/include/$(TARGET)
OGDI_INCLUDE = $(INCL_SW)$(TOPDIR)/ogdi/include
VRF_INCLUDE = $(INCL_SW)$(TOPDIR)/ogdi/driver/vrf
PROJ_INCLUDE = $(INCL_SW)$(TOPDIR)/proj
VPF_INCLUDE = $(INCL_SW)$(TOPDIR)/vpflib/include $(INCL_SW)$(TOPDIR)/vpflib
ZLIB_INCLUDE = $(INCL_SW)$(TOPDIR)/external/zlib
GLUTIL_INCLUDE = $(INCL_SW)$(TOPDIR)/ogdi/glutil
......@@ -132,7 +132,6 @@ EXPAT_LINKLIB = $(LINK_SW)$(LINKDIR)$(LIB_SW)expat_ogdi$(OGDI_VERSION)$(LIB_SUFF
# Static libraries (archives)
#
PROJ_STATICLIB = $(LINK_SW)$(LIBDIR)/static$(LIB_SW)proj$(LIB_SUFFIX)
VPF_STATICLIB = $(LINK_SW)$(LIBDIR)/static$(LIB_SW)vpf$(LIB_SUFFIX)
REMOTE_STATICLIB = $(LINK_SW)$(LIBDIR)/static$(LIB_SW)remote$(LIB_SUFFIX)
GLUTIL_STATICLIB = $(LINK_SW)$(LIBDIR)/static$(LIB_SW)glutil$(LIB_SUFFIX)
......
......@@ -35,10 +35,10 @@ AR = ar cr
# Compilation and linking flags
#
SHLIB_CFLAGS = @C_PIC@
COMMON_CFLAGS = $(OPTIMIZATION) @CFLAGS@ @C_WFLAGS@ -DUNIX=1
COMMON_CFLAGS = $(OPTIMIZATION) @CFLAGS@ @C_WFLAGS@ -DUNIX=1 @C_PIC@ @RPC_CFLAGS@
SHLIB_LDFLAGS = -shared
COMMON_LDFLAGS = $(OPTIMIZATION)
COMMON_LDFLAGS = $(OPTIMIZATION) @LDFLAGS@
RPC_INCLUDES = @RPC_INCLUDES@
......@@ -61,24 +61,13 @@ INST_BIN = @bindir@
#
#RPC_LINKLIB = -lrpcsvc -lnsl -lsocket
#RPC_LINKLIB = -ldl -ldbmalloc
RPC_LINKLIB = @LIBS@
RPC_LINKLIB = @LIBS@ @RPC_LIBS@
#
# Endian definition, could be little or big
#
BIG_ENDIAN = @BIG_ENDIAN@
#
# Handle internal/external PROJ.4 library usage.
#
PROJ_SETTING=@PROJ_SETTING@
ifeq ($(PROJ_SETTING),external)
PROJ_INCLUDE := @PROJ_INCLUDE@
PROJ_STATICLIB := @PROJ_LIB@
endif
#
# Handle internal/external ZLIB library usage.
#
......
......@@ -22,9 +22,9 @@ UNIX_DEFINE = -Dunix
#
# Standard tools
#
CC = gcc
LD = gcc
SHLIB_LD = gcc
CC = ${AUTOCONF_CC}
LD = ${AUTOCONF_CC}
SHLIB_LD = ${AUTOCONF_CC}
AR = ar cr
RM = rm
RMALL = rm -rf
......
......@@ -629,11 +629,10 @@ EXPAT_SETTING
ZLIB_LIB
ZLIB_INCLUDE
ZLIB_SETTING
PROJ_LIB
PROJ_INCLUDE
PROJ_SETTING
BIG_ENDIAN
RPC_INCLUDES
RPC_LIBS
RPC_CFLAGS
EGREP
GREP
CPP
......@@ -643,6 +642,9 @@ CXX_PIC
C_WFLAGS
CXX_WFLAGS
HAVE_ICONV
PKG_CONFIG_LIBDIR
PKG_CONFIG_PATH
PKG_CONFIG
OBJEXT
EXEEXT
ac_ct_CC
......@@ -695,9 +697,6 @@ SHELL'
ac_subst_files=''
ac_user_opts='
enable_option_checking
with_proj
with_projlib
with_projinc
with_zlib
with_zliblib
with_zlibinc
......@@ -715,7 +714,12 @@ CFLAGS
LDFLAGS
LIBS
CPPFLAGS
CPP'
PKG_CONFIG
PKG_CONFIG_PATH
PKG_CONFIG_LIBDIR
CPP
RPC_CFLAGS
RPC_LIBS'
# Initialize some variables set by options.
......@@ -1333,9 +1337,6 @@ if test -n "$ac_init_help"; then
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
--with-proj=ARG Utilize external PROJ.4 support
--with-projlib=path Select PROJ.4 library
--with-projinc=path Select PROJ.4 include directory
--with-zlib=ARG Utilize external ZLIB support
--with-zliblib=path Select ZLIB library
--with-zlibinc=path Select ZLIB include directory
......@@ -1355,7 +1356,14 @@ Some influential environment variables:
LIBS libraries to pass to the linker, e.g. -l<library>
CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
you have headers in a nonstandard directory <include dir>
PKG_CONFIG path to pkg-config utility
PKG_CONFIG_PATH
directories to add to pkg-config's search path
PKG_CONFIG_LIBDIR
path overriding pkg-config's built-in search path
CPP C preprocessor
RPC_CFLAGS C compiler flags for RPC, overriding pkg-config
RPC_LIBS linker flags for RPC, overriding pkg-config
Use these variables to override the choices made by `configure' or to help
it to find libraries and programs with nonstandard names/locations.
......@@ -2070,9 +2078,11 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
OGDI_VERSION=3.2.1
OGDI_MAJOR=3
OGDI_MINOR=2
OGDI_VERSION=4.0.0
OGDI_MAJOR=4
OGDI_MINOR=0
......@@ -2879,6 +2889,126 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_PKG_CONFIG+:} false; then :
$as_echo_n "(cached) " >&6
else
case $PKG_CONFIG in
[\\/]* | ?:[\\/]*)
ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
;;
*)
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
IFS=$as_save_IFS
;;
esac
fi
PKG_CONFIG=$ac_cv_path_PKG_CONFIG
if test -n "$PKG_CONFIG"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
$as_echo "$PKG_CONFIG" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
fi
if test -z "$ac_cv_path_PKG_CONFIG"; then
ac_pt_PKG_CONFIG=$PKG_CONFIG
# Extract the first word of "pkg-config", so it can be a program name with args.
set dummy pkg-config; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
$as_echo_n "(cached) " >&6
else
case $ac_pt_PKG_CONFIG in
[\\/]* | ?:[\\/]*)
ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
;;
*)
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
IFS=$as_save_IFS
;;
esac
fi
ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
if test -n "$ac_pt_PKG_CONFIG"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
$as_echo "$ac_pt_PKG_CONFIG" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
if test "x$ac_pt_PKG_CONFIG" = x; then
PKG_CONFIG=""
else
case $cross_compiling:$ac_tool_warned in
yes:)
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
PKG_CONFIG=$ac_pt_PKG_CONFIG
fi
else
PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
fi
fi
if test -n "$PKG_CONFIG"; then
_pkg_min_version=0.9.0
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
PKG_CONFIG=""
fi
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
$as_echo_n "checking for dlopen in -ldl... " >&6; }
if ${ac_cv_lib_dl_dlopen+:} false; then :
......@@ -3057,7 +3187,6 @@ HAVE_ICONV=$HAVE_ICONV
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
......@@ -3455,6 +3584,111 @@ fi
done
for ac_header in rpc/rpc.h
do :
ac_fn_c_check_header_mongrel "$LINENO" "rpc/rpc.h" "ac_cv_header_rpc_rpc_h" "$ac_includes_default"
if test "x$ac_cv_header_rpc_rpc_h" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_RPC_RPC_H 1
_ACEOF
else
pkg_failed=no
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for RPC" >&5
$as_echo_n "checking for RPC... " >&6; }
if test -n "$RPC_CFLAGS"; then
pkg_cv_RPC_CFLAGS="$RPC_CFLAGS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
{ { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libtirpc\""; } >&5
($PKG_CONFIG --exists --print-errors "libtirpc") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
pkg_cv_RPC_CFLAGS=`$PKG_CONFIG --cflags "libtirpc" 2>/dev/null`
test "x$?" != "x0" && pkg_failed=yes
else
pkg_failed=yes
fi
else
pkg_failed=untried
fi
if test -n "$RPC_LIBS"; then
pkg_cv_RPC_LIBS="$RPC_LIBS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
{ { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libtirpc\""; } >&5
($PKG_CONFIG --exists --print-errors "libtirpc") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
pkg_cv_RPC_LIBS=`$PKG_CONFIG --libs "libtirpc" 2>/dev/null`
test "x$?" != "x0" && pkg_failed=yes
else
pkg_failed=yes
fi
else
pkg_failed=untried
fi
if test $pkg_failed = yes; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
_pkg_short_errors_supported=yes
else
_pkg_short_errors_supported=no
fi
if test $_pkg_short_errors_supported = yes; then
RPC_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libtirpc" 2>&1`
else
RPC_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libtirpc" 2>&1`
fi
# Put the nasty error message in config.log where it belongs
echo "$RPC_PKG_ERRORS" >&5
as_fn_error $? "Package requirements (libtirpc) were not met:
$RPC_PKG_ERRORS
Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.
Alternatively, you may set the environment variables RPC_CFLAGS
and RPC_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details." "$LINENO" 5
elif test $pkg_failed = untried; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it
is in your PATH or set the PKG_CONFIG environment variable to the full
path to pkg-config.
Alternatively, you may set the environment variables RPC_CFLAGS
and RPC_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
To get pkg-config, see <http://pkg-config.freedesktop.org/>.
See \`config.log' for more details" "$LINENO" 5; }
else
RPC_CFLAGS=$pkg_cv_RPC_CFLAGS
RPC_LIBS=$pkg_cv_RPC_LIBS
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
CPPFLAGS="$CPPFLAGS $RPC_CFLAGS"
fi
fi
done
for ac_header in rpc/pmap_clnt.h float.h dlfcn.h
do :
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
......@@ -3717,148 +3951,6 @@ BIG_ENDIAN=$BIG_ENDIAN
PROJ_SETTING=internal
PROJ_INCLUDE=
PROJ_LIB=
export PROJ_LIB PROJ_INCLUDE PROJ_SETTING
# Check whether --with-proj was given.
if test "${with_proj+set}" = set; then :
withval=$with_proj;
fi
if test "$with_proj" = "yes" ; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pj_init in -lproj" >&5
$as_echo_n "checking for pj_init in -lproj... " >&6; }
if ${ac_cv_lib_proj_pj_init+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lproj $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
#ifdef __cplusplus
extern "C"
#endif
char pj_init ();
int
main ()
{
return pj_init ();
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
ac_cv_lib_proj_pj_init=yes
else
ac_cv_lib_proj_pj_init=no
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_proj_pj_init" >&5
$as_echo "$ac_cv_lib_proj_pj_init" >&6; }
if test "x$ac_cv_lib_proj_pj_init" = xyes; then :
PROJ_SETTING=external
else
PROJ_SETTING=missing
fi
for ac_header in projects.h
do :
ac_fn_c_check_header_mongrel "$LINENO" "projects.h" "ac_cv_header_projects_h" "$ac_includes_default"
if test "x$ac_cv_header_projects_h" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_PROJECTS_H 1
_ACEOF
fi
done
if test $PROJ_SETTING = missing ; then
as_fn_error $? "Unable to find external PROJ.4 library, give path or use default internal library." "$LINENO" 5
fi
if test "$ac_cv_header_projects_h" = no ; then
as_fn_error $? "Unable to find external PROJ.4 projects.h file, give path or use default internal library." "$LINENO" 5
fi
PROJ_SETTING=external
PROJ_LIB=-lproj
elif test "$with_proj" != "no" -a "$with_proj" != "" ; then
if test -r $with_proj/include/projects.h ; then
echo "checking for $with_proj/include/projects.h ... found"
PROJ_INCLUDE=-I$with_proj/include
else
as_fn_error $? "Unable to find $with_proj/include/projects.h" "$LINENO" 5
fi
if test -r $with_proj/lib/libproj.so ; then
PROJ_LIB=$with_proj/lib/libproj.so
echo "checking for $PROJ_LIB ... found"
elif test -r $with_proj/lib/libproj.a ; then
PROJ_LIB=$with_proj/lib/libproj.a
echo "checking for $PROJ_LIB ... found"
else
as_fn_error $? "Unable to find $with_proj/lib/libproj.{so,a}" "$LINENO" 5
fi
PROJ_SETTING=external
fi
# Check whether --with-projlib was given.
if test "${with_projlib+set}" = set; then :
withval=$with_projlib;
fi
if test "$with_projlib" != "" ; then
PROJ_LIB=$with_projlib
PROJ_SETTING=external
echo "Using PROJ_LIB=$PROJ_LIB for PROJ.4 library."
fi
# Check whether --with-projinc was given.
if test "${with_projinc+set}" = set; then :
withval=$with_projinc;
fi
if test "$with_projinc" != "" ; then
PROJ_INCLUDE=-I${with_projinc}
PROJ_SETTING=external
echo "Using PROJ_INCLUDE=$PROJ_INCLUDE for PROJ.4 includes."
fi
if test "$PROJ_SETTING" = "internal" ; then
echo "Using internal PROJ.4 implementation."
fi
PROJ_SETTING=$PROJ_SETTING
PROJ_INCLUDE=$PROJ_INCLUDE
PROJ_LIB=$PROJ_LIB
ZLIB_SETTING=internal
ZLIB_INCLUDE=
ZLIB_LIB=
......
dnl Process this file with autoconf to produce a configure script.
AC_INIT(config/unix.mak)
OGDI_VERSION=3.2.1
OGDI_MAJOR=3
OGDI_MINOR=2
OGDI_VERSION=4.0.0
OGDI_MAJOR=4
OGDI_MINOR=0
AC_SUBST(OGDI_VERSION)
AC_SUBST(OGDI_MAJOR)
AC_SUBST(OGDI_MINOR)
AC_CONFIG_MACRO_DIR(m4)
dnl ---------------------------------------------------------------------------
dnl Check if we have a doomed configuration.
dnl ---------------------------------------------------------------------------
......@@ -23,6 +25,7 @@ fi
dnl Checks for programs.
AC_PROG_CC
PKG_PROG_PKG_CONFIG
dnl We always want to check /usr/local for stuff.
dnl LIBS="$LIBS -L/usr/local/lib"
......@@ -38,6 +41,11 @@ AC_COMPILER_WFLAGS
AC_COMPILER_PIC
AC_LD_SHARED
dnl ---------------------------------------------------------------------------
dnl Do we have rpc/rpc.h
dnl ---------------------------------------------------------------------------
AC_CHECK_HEADERS([rpc/rpc.h],,
[PKG_CHECK_MODULES([RPC], [libtirpc], [CPPFLAGS="$CPPFLAGS $RPC_CFLAGS"])])
dnl ---------------------------------------------------------------------------
dnl Do we have rpc/pmap_clnt.h, float.h, dlfcn.h?
......@@ -69,81 +77,6 @@ else
fi
AC_SUBST(BIG_ENDIAN,$BIG_ENDIAN)
dnl ---------------------------------------------------------------------------
dnl Check for libproj override.
dnl ---------------------------------------------------------------------------
PROJ_SETTING=internal
PROJ_INCLUDE=
PROJ_LIB=
export PROJ_LIB PROJ_INCLUDE PROJ_SETTING
AC_ARG_WITH(proj,[ --with-proj[=ARG] Utilize external PROJ.4 support],,)
if test "$with_proj" = "yes" ; then
AC_CHECK_LIB(proj,pj_init,PROJ_SETTING=external,PROJ_SETTING=missing,)
AC_CHECK_HEADERS(projects.h)
if test $PROJ_SETTING = missing ; then
AC_MSG_ERROR([Unable to find external PROJ.4 library, give path or use default internal library.])
fi
if test "$ac_cv_header_projects_h" = no ; then
AC_MSG_ERROR([Unable to find external PROJ.4 projects.h file, give path or use default internal library.])
fi
PROJ_SETTING=external
PROJ_LIB=-lproj
elif test "$with_proj" != "no" -a "$with_proj" != "" ; then
if test -r $with_proj/include/projects.h ; then
echo "checking for $with_proj/include/projects.h ... found"
PROJ_INCLUDE=-I$with_proj/include
else
AC_MSG_ERROR([Unable to find $with_proj/include/projects.h])
fi
if test -r $with_proj/lib/libproj.so ; then
PROJ_LIB=$with_proj/lib/libproj.so
echo "checking for $PROJ_LIB ... found"
elif test -r $with_proj/lib/libproj.a ; then
PROJ_LIB=$with_proj/lib/libproj.a
echo "checking for $PROJ_LIB ... found"
else
AC_MSG_ERROR([Unable to find $with_proj/lib/libproj.{so,a}])
fi
PROJ_SETTING=external
fi
AC_ARG_WITH(projlib,[ --with-projlib=path Select PROJ.4 library],,)
if test "$with_projlib" != "" ; then
PROJ_LIB=$with_projlib
PROJ_SETTING=external
echo "Using PROJ_LIB=$PROJ_LIB for PROJ.4 library."
fi
AC_ARG_WITH(projinc,[ --with-projinc=path Select PROJ.4 include directory],,)
if test "$with_projinc" != "" ; then
PROJ_INCLUDE=-I${with_projinc}
PROJ_SETTING=external
echo "Using PROJ_INCLUDE=$PROJ_INCLUDE for PROJ.4 includes."
fi
if test "$PROJ_SETTING" = "internal" ; then
echo "Using internal PROJ.4 implementation."
fi
AC_SUBST(PROJ_SETTING,$PROJ_SETTING)
AC_SUBST(PROJ_INCLUDE,$PROJ_INCLUDE)
AC_SUBST(PROJ_LIB,$PROJ_LIB)
dnl ---------------------------------------------------------------------------
dnl Check for zlib override.
dnl ---------------------------------------------------------------------------
......
......@@ -585,7 +585,7 @@ ecs_Result *dyn_UpdateDictionary(ecs_Server *s, char *arg)
{
ecs_AddText(&(s->result),
"<?xml version=\"1.0\" ?>\n"
"<OGDI_Capabilities version=\"3.1\">\n"
"<OGDI_Capabilities version=\"4.0\">\n"
"</OGDI_Capabilities>\n" );
}
......@@ -595,7 +595,7 @@ ecs_Result *dyn_UpdateDictionary(ecs_Server *s, char *arg)
ecs_AddText(&(s->result),
"<?xml version=\"1.0\" ?>\n"
"<OGDI_Capabilities version=\"3.1\">\n" );
"<OGDI_Capabilities version=\"4.0\">\n" );
ecs_AddText(&(s->result),
" <FeatureTypeList>\n"
" <Operations>\n"
......
......@@ -9,8 +9,7 @@ SOURCES = \
gbgetsymbol.c
INCLUDES = $(CURRENT_INCLUDE) $(GENERAL_INCLUDE) $(OGDI_INCLUDE) \
$(PROJ_INCLUDE)
INCLUDES = $(CURRENT_INCLUDE) $(GENERAL_INCLUDE) $(OGDI_INCLUDE)
CFLAGS = $(INCLUDES) $(COMMON_CFLAGS)
LINK_LIBS= $(OGDI_LINKLIB) $(GUTIL_LINKLIB)
......
......@@ -16,13 +16,13 @@ TARGETGEN=$(PROGGEN)
SOURCES = ogdi_import.c shpopen.c dbfopen.c
INCLUDES = $(CURRENT_INCLUDE) $(OGDI_INCLUDE) $(PROJ_INCLUDE)\
INCLUDES = $(CURRENT_INCLUDE) $(OGDI_INCLUDE)\
$(ZLIB_INCLUDE) $(GENERAL_INCLUDE) $(TCLTK_INCLUDE)
CFLAGS = $(INCLUDES) $(COMMON_CFLAGS) $(FLAGS_X86DEF)
LINK_LIBS= $(OGDI_LINKLIB) $(ZLIB_LINKLIB) $(RPC_LINKLIB) \
$(PROJ_STATICLIB) $(MATH_LINKLIB) \
$(MATH_LINKLIB) \
$(LIBC_LINKLIB) $(UCB_STATICLIB) $(DL_LINKLIB) \
$(WIN_LINKLIB)
......
......@@ -63,12 +63,6 @@
#include "ecs.h"
#include "shapefil.h"
#include <assert.h>
#include "projects.h"
#ifndef PJ_VERSION
#define projPJ PJ*
#define projUV UV
#endif
static int ClientID = -1;
static int bNoDict = FALSE;
......@@ -720,167 +714,6 @@ static void ImportImage( ecs_Region *region, const char * layer,
fclose( fp_raw );
}
/************************************************************************/
/* ParseProjection() */
/************************************************************************/
projPJ ParseProjection( const char *projection )
{
char wproj[1024];
char *proj_parms[30];
int parm_count = 0;
projPJ pj;
/* -------------------------------------------------------------------- */
/* Parse into tokens. */
/* -------------------------------------------------------------------- */
strcpy( wproj, projection );
proj_parms[parm_count] = strtok( wproj, " " );
while( proj_parms[parm_count] != NULL )
proj_parms[++parm_count] = strtok( NULL, " " );
/* -------------------------------------------------------------------- */
/* Call pj_init() */
/* -------------------------------------------------------------------- */
pj = pj_init( parm_count, proj_parms );
if( pj == NULL )
{
printf( "Failed to initialize projection from: %s\n", projection );
}
return pj;
}
/************************************************************************/
/* RecomputeRegion() */
/* */
/* Translate the source region into the indicate output */
/* coordinate system. */
/************************************************************************/
static int RecomputeRegion( const char * output_projection,
ecs_Region *region )
{
ecs_Result *result;
projPJ src;
projPJ dst;
projUV corners[4];
ecs_Region out_region = {0,0,0,0,0,0};
int iCorner, src_xsize, src_ysize, max_dim;
/* -------------------------------------------------------------------- */
/* Fetch source projection. */
/* -------------------------------------------------------------------- */
result = cln_GetServerProjection( ClientID );
if( CheckError( result ) )
return( FALSE );
src = ParseProjection( ECSTEXT(result) );
/* -------------------------------------------------------------------- */
/* Parse destination projection. */
/* -------------------------------------------------------------------- */
dst = ParseProjection( output_projection );
/* -------------------------------------------------------------------- */
/* Setup input coordinates of corners. */
/* -------------------------------------------------------------------- */
corners[0].u = region->west;
corners[0].v = region->north;
corners[1].u = region->east;
corners[1].v = region->north;
corners[2].u = region->east;
corners[2].v = region->south;
corners[3].u = region->west;
corners[3].v = region->south;
/* -------------------------------------------------------------------- */
/* Reproject, and establish new bounding region. */
/* -------------------------------------------------------------------- */
for( iCorner = 0; iCorner < 4; iCorner++ )
{
/* Translate source to radians */
if( src != NULL )
{
corners[iCorner] = pj_inv( corners[iCorner], src );
}
else
{
corners[iCorner].u *= DEG_TO_RAD;
corners[iCorner].v *= DEG_TO_RAD;
}
/* Translate into destination projection or back to degrees */
if( dst != NULL )
{
corners[iCorner] = pj_fwd( corners[iCorner], dst );
}
else
{
corners[iCorner].u *= DEG_TO_RAD;
corners[iCorner].v *= DEG_TO_RAD;
}
/* Grow region to hold result */
if( iCorner == 0 )
{
out_region.north = out_region.south = corners[iCorner].v;
out_region.east = out_region.west = corners[iCorner].u;
}
else
{
out_region.north = MAX(out_region.north,corners[iCorner].v);
out_region.south = MIN(out_region.south,corners[iCorner].v);
out_region.east = MAX(out_region.east,corners[iCorner].u);
out_region.west = MIN(out_region.west,corners[iCorner].u);
}
}
/* -------------------------------------------------------------------- */
/* Establish output resolution. */
/* -------------------------------------------------------------------- */
src_xsize = (int) ceil((region->east - region->west) / region->ew_res);
src_ysize = (int) ceil((region->north - region->south) / region->ns_res);
max_dim = MAX(src_xsize,src_ysize);
if( out_region.north - out_region.south >
out_region.east - out_region.west )
{
out_region.ns_res = (out_region.north - out_region.south) / max_dim;
out_region.ew_res = out_region.ns_res;
}
else
{
out_region.ew_res = (out_region.east - out_region.west) / max_dim;
out_region.ns_res = out_region.ew_res;
}
/* -------------------------------------------------------------------- */
/* Grow region by one pixel to help with weird round off issues. */
/* -------------------------------------------------------------------- */
out_region.north += out_region.ns_res;
out_region.south -= out_region.ns_res;
out_region.east += out_region.ew_res;
out_region.west -= out_region.ew_res;
*region = out_region;
printf( "out_region.north = %f\n", out_region.north );
printf( "out_region.south = %f\n", out_region.south );
printf( "out_region.east = %f\n", out_region.east );
printf( "out_region.west = %f\n", out_region.west );
printf( "out_region.ns_res = %f\n", out_region.ns_res );
printf( "out_region.ew_res = %f\n", out_region.ew_res );
return TRUE;
}
/************************************************************************/
/* main() */
/************************************************************************/
......@@ -893,12 +726,10 @@ int main( int argc, char ** argv )
ecs_Result *result;
int i, set_region = FALSE, set_res = FALSE;
char *out_file = "ogdi_out";
const char *output_projection = NULL;
if( argc == 1 )
{
printf("Usage: ogdi_import [-no-dict] -u url -f family\n");
printf(" [-op output_projection]\n" );
printf(" [-r north south east west] [-res ns_res ew_res]\n" );
printf(" [-o filename]\n" );
printf(" -l layername [more_opts -l layername]\n" );
......@@ -925,14 +756,8 @@ int main( int argc, char ** argv )
out_file = argv[++i];
}
else if( strcmp(argv[i],"-op") == 0 ) {
output_projection = argv[++i];
RecomputeRegion( output_projection, region );
set_res = TRUE;
set_region = TRUE;
result = cln_SetClientProjection( ClientID,
(char *) output_projection );
if( CheckError( result ) )
break;
printf("No longer supported option\n");
exit(1);
}
else if( strcmp(argv[i], "-l") == 0 ) {
layer = argv[++i];
......
......@@ -16,13 +16,13 @@ TARGETGEN=$(PROGGEN)
SOURCES = ogdi_info.c
INCLUDES = $(CURRENT_INCLUDE) $(OGDI_INCLUDE) $(PROJ_INCLUDE)\
INCLUDES = $(CURRENT_INCLUDE) $(OGDI_INCLUDE)\
$(ZLIB_INCLUDE) $(GENERAL_INCLUDE) $(TCLTK_INCLUDE)
CFLAGS = $(INCLUDES) $(COMMON_CFLAGS) $(FLAGS_X86DEF)
LINK_LIBS= $(OGDI_LINKLIB) $(ZLIB_LINKLIB) $(RPC_LINKLIB) \
$(PROJ_STATICLIB) $(MATH_LINKLIB) \
$(MATH_LINKLIB) \
$(LIBC_LINKLIB) $(UCB_STATICLIB) $(DL_LINKLIB) \
$(WIN_LINKLIB)
......
......@@ -63,7 +63,6 @@
*/
#include "ecs.h"
#include "projects.h"
static int ClientID = -1;
static int bNoDict = FALSE;
......@@ -214,12 +213,11 @@ const char * DecToDMS( double dfAngle )
/* DumpGlobalRegion() */
/************************************************************************/
static int DumpGlobalRegion( ecs_Region * region, PJ * proj_defn )
static int DumpGlobalRegion( ecs_Region * region )
{
ecs_Result *result;
ecs_Region tmpRegion;
projUV proj_pnt;
if( region == NULL )
region = &tmpRegion;
......@@ -241,48 +239,6 @@ static int DumpGlobalRegion( ecs_Region * region, PJ * proj_defn )
*region = ECSREGION(result);
/* -------------------------------------------------------------------- */
/* Print the corner coordinates in lat/long. */
/* -------------------------------------------------------------------- */
#ifndef _WINDOWS
if( proj_defn != NULL )
{
printf( "Lat/Long Corners\n" );
proj_pnt.v = region->north;
proj_pnt.u = region->west;
proj_pnt = pj_inv(proj_pnt, proj_defn);
printf( "Upper Left: (%s,%s) (%g,%g)\n",
DecToDMS(proj_pnt.u/DEG_TO_RAD),
DecToDMS(proj_pnt.v/DEG_TO_RAD),
proj_pnt.u/DEG_TO_RAD, proj_pnt.v/DEG_TO_RAD );
proj_pnt.v = region->north;
proj_pnt.u = region->east;
proj_pnt = pj_inv(proj_pnt, proj_defn);
printf( "Upper Right: (%s,%s) (%g,%g)\n",
DecToDMS(proj_pnt.u/DEG_TO_RAD),
DecToDMS(proj_pnt.v/DEG_TO_RAD),
proj_pnt.u/DEG_TO_RAD, proj_pnt.v/DEG_TO_RAD );
proj_pnt.v = region->south;
proj_pnt.u = region->west;
proj_pnt = pj_inv(proj_pnt, proj_defn);
printf( "Lower Left: (%s,%s) (%g,%g)\n",
DecToDMS(proj_pnt.u/DEG_TO_RAD),
DecToDMS(proj_pnt.v/DEG_TO_RAD),
proj_pnt.u/DEG_TO_RAD, proj_pnt.v/DEG_TO_RAD );
proj_pnt.v = region->south;
proj_pnt.u = region->east;
proj_pnt = pj_inv(proj_pnt, proj_defn);
printf( "Lower Right: (%s,%s) (%g,%g)\n",
DecToDMS(proj_pnt.u/DEG_TO_RAD),
DecToDMS(proj_pnt.v/DEG_TO_RAD),
proj_pnt.u/DEG_TO_RAD, proj_pnt.v/DEG_TO_RAD );
}
#endif
return TRUE;
}
......@@ -398,7 +354,6 @@ static int AccessURL( char * url, ecs_Region * region )
{
ecs_Result *result;
PJ *proj_defn = NULL;
/* -------------------------------------------------------------------- */
/* Close old client if there is one active. */
......@@ -426,17 +381,10 @@ static int AccessURL( char * url, ecs_Region * region )
printf( "Projection = `%s'\n", ECSTEXT(result) );
#ifndef _WINDOWS
if( !bNoProj
&& strstr(ECSTEXT(result),"latlong") == NULL
&& strstr(ECSTEXT(result),"longlat") == NULL )
proj_defn = cln_ProjInit( ECSTEXT(result) );
#endif
/* -------------------------------------------------------------------- */
/* Dump the global region. */
/* -------------------------------------------------------------------- */
DumpGlobalRegion( region, proj_defn );
DumpGlobalRegion( region );
/* -------------------------------------------------------------------- */
/* Print the Dictionary (update). */
......@@ -580,7 +528,7 @@ static void DumpLayer( const char * options, ecs_Region * region,
if( CheckError( result ) )
return;
DumpGlobalRegion( NULL, NULL );
DumpGlobalRegion( NULL );
/* -------------------------------------------------------------------- */
/* Dump the attribute definitions. */
......@@ -760,7 +708,7 @@ int main( int argc, char ** argv )
DumpLayer( "", region, layer, featureType );
}
else if( strcmp(argv[i],"-dr") == 0 ) {
DumpGlobalRegion( NULL, NULL );
DumpGlobalRegion( NULL );
}
else if( strcmp(argv[i], "-no-proj") == 0 ) {
bNoProj = TRUE;
......
ogdi-dfsg (3.2.1+ds-5) UNRELEASED; urgency=medium
ogdi-dfsg (4.0.0~rc1+ds-1~exp1) experimental; urgency=medium
* Team upload.
* New upstream release candidate.
* Bump Standards-Version to 4.3.0, no changes.
* Update watch file to limit matches to archive path.
* Add Build-Depends-Package field to symbols file.
-- Bas Couwenberg <sebastic@debian.org> Sun, 05 Aug 2018 20:36:26 +0200
* Update copyright file, changes:
- Update Files-Excluded to not remove proj/*, files removed upstream.
- Drop ogdi/datum_driver/makefile, file removed upstream.
* Drop cross.patch, applied upstream. Refresh remaining patches.
* Drop proj related configure options.
* Drop proj (build) dependencies.
* Add pkg-config to build dependencies.
* Rename library packages for SONAME bump.
* Append -DNDEBUG to CFLAGS to remove buildpath from binaries.
* Update symbols for 4.0.0~rc1.
* Drop unused hardening-no-fortify-functions override.
* Add lintian override for file-references-package-build-path.
-- Bas Couwenberg <sebastic@debian.org> Fri, 01 Mar 2019 16:51:43 +0100
ogdi-dfsg (3.2.1+ds-4) unstable; urgency=medium
......
......@@ -7,7 +7,7 @@ Build-Depends: debhelper (>= 9),
dh-autoreconf,
autotools-dev,
libexpat1-dev,
libproj-dev,
pkg-config,
tcl-dev (>= 8.4),
zlib1g-dev
Standards-Version: 4.3.0
......@@ -15,11 +15,10 @@ Vcs-Browser: https://salsa.debian.org/debian-gis-team/ogdi-dfsg
Vcs-Git: https://salsa.debian.org/debian-gis-team/ogdi-dfsg.git
Homepage: http://ogdi.sourceforge.net/
Package: libogdi3.2-dev
Package: libogdi4.0-dev
Architecture: any
Section: libdevel
Depends: libogdi3.2 (= ${binary:Version}),
libproj-dev,
Depends: libogdi4.0 (= ${binary:Version}),
${misc:Depends}
Suggests: pkg-config
Replaces: libogdi3.2 (<< 3.2.0~beta2-2)
......@@ -35,7 +34,7 @@ Description: Open Geographic Datastore Interface Library -- development
This package contains the development files to build OGDI enabled
programs.
Package: libogdi3.2
Package: libogdi4.0
Architecture: any
Depends: ${shlibs:Depends},
${misc:Depends}
......
......@@ -5,7 +5,6 @@ Source: https://github.com/libogdi/ogdi
Embedded copies of 3rd party code are excluded from the repacked upstream
tarball.
Files-Excluded: external/*
proj/*
Files: *
Copyright: 1995-1997, Logiciels et Applications Scientifiques (L.A.S.), Inc.
......@@ -54,7 +53,6 @@ Copyright: 2001, Information Interoperability Institute (3i)
License: OGDI-3I
Files: ogdi/c-api/makefile
ogdi/datum_driver/makefile
ogdi/driver/makefile
ogdi/examples/makefile
config/*
......
# Build uses -D_FORTIFY_SOURCE=2, but hardening-check reports:
# Fortify Source functions: no, only unprotected functions found!
libogdi3.2: hardening-no-fortify-functions *
# False positive, string not included in the source.
libogdi3.2: spelling-error-in-binary usr/lib/ogdi/libvrf.so allow to allow one to