Commit 57f7076b authored by Ralf Müller's avatar Ralf Müller
Browse files

Changed default build: CDO is directly linked to CDI object files and NOT libcdi

Linking to libcdi can still be done with '--enable-cdi-lib' (refs #492)
parent 3867d82b
......@@ -136,7 +136,7 @@ ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
ENABLE_CDI_SHARED = @ENABLE_CDI_SHARED@
ENABLE_CDI_LIB = @ENABLE_CDI_LIB@
ENABLE_CGRIBEX = @ENABLE_CGRIBEX@
ENABLE_EXTRA = @ENABLE_EXTRA@
ENABLE_GRIB = @ENABLE_GRIB@
......
......@@ -18,7 +18,7 @@
"RANLIB" : "@RANLIB@",
"INSTALL" : "@INSTALL@",
"cdi" : {
"enable_cdi_shared" : @ENABLE_CDI_SHARED@
"enable_cdi_lib" : @ENABLE_CDI_LIB@
},
"threads" : {
"lib" : "@THREADS_LDFLAGS@",
......
......@@ -614,9 +614,9 @@ CLIBS
CLDFLAGS
FCFLAGS
subdirs
ENABLE_CDI_SHARED
ENABLE_CDI_SHARED_FALSE
ENABLE_CDI_SHARED_TRUE
ENABLE_CDI_LIB
ENABLE_CDI_LIB_FALSE
ENABLE_CDI_LIB_TRUE
PROJ_INCLUDE
PROJ_LDFLAGS
ENABLE_IEG
......@@ -776,7 +776,7 @@ enable_service
enable_extra
enable_ieg
with_proj
enable_cdi_shared
enable_cdi_lib
'
ac_precious_vars='build_alias
host_alias
......@@ -1423,8 +1423,8 @@ Optional Features:
--enable-service Use the service library [default=yes]
--enable-extra Use the extra library [default=yes]
--enable-ieg Use the ieg library [default=yes]
--enable-cdi-shared Build, install and link CDO with a shared CDI
library [default=no]
--enable-cdi-lib build + install a CDI library [default=no] and link
CDO to it |CDO build only|
 
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
......@@ -1448,7 +1448,7 @@ Optional Packages:
--with-jasper=<directory>
Specify location of JASPER library. You must specify
its location if GRIB_API was built with JASPER.
--with-jasper=<yes|no|directory>
--with-grib-api=<yes|no|directory>
library for grib2 compression; if a directory is
given, it will be used as a value for
--with-jasper-root
......@@ -16194,7 +16194,9 @@ _ACEOF
fi
 
# ----------------------------------------------------------------------
# Add basic configure options
# Add configure options
 
# ----------------------------------------------------------------------
# Checks for pthread library
......@@ -17724,7 +17726,6 @@ fi
$as_echo "$enable_ieg" >&6; }
ENABLE_IEG=$enable_ieg
 
# ----------------------------------------------------------------------
# Checks for PROJ.4 library
 
......@@ -17908,48 +17909,47 @@ $as_echo "suppressed" >&6; }
fi
 
# ----------------------------------------------------------------------
# Compile with CDI
# How to build CDI into CDI?
INTERNAL_CDI_DIR=libcdi
# At the moment, there are two possible CDI bindgins
# At the moment, there are two possible CDI bindings
# (default) linking directly to CDI's object files in ./libcdi/src
# (--enable-cdi-shared) build and link to a shared CDI library
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for building shared cdi bindings" >&5
$as_echo_n "checking for building shared cdi bindings... " >&6; }
# Check whether --enable-cdi-shared was given.
if test "${enable_cdi_shared+set}" = set; then :
enableval=$enable_cdi_shared; if test "x$enable_cdi_shared" == "xno"; then :
enable_cdi_shared=no
# (--enable-cdi-lib) build and link to a shared CDI library
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build a separate CDI library and link CDO to it |valid for CDO build only|" >&5
$as_echo_n "checking for build a separate CDI library and link CDO to it |valid for CDO build only|... " >&6; }
# Check whether --enable-cdi-lib was given.
if test "${enable_cdi_lib+set}" = set; then :
enableval=$enable_cdi_lib; if test "x$enable_cdi_lib" != "xno"; then :
enable_cdi_lib=yes
else
enable_cdi_shared=yes
enable_cdi_lib=no
fi
else
enable_cdi_shared=no
enable_cdi_lib=no
fi
 
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_cdi_shared" >&5
$as_echo "$enable_cdi_shared" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_cdi_lib" >&5
$as_echo "$enable_cdi_lib" >&6; }
# save CDI binding mode for later automake use
if test x$enable_cdi_shared = 'xyes'; then
ENABLE_CDI_SHARED_TRUE=
ENABLE_CDI_SHARED_FALSE='#'
if test x$enable_cdi_lib = 'xyes'; then
ENABLE_CDI_LIB_TRUE=
ENABLE_CDI_LIB_FALSE='#'
else
ENABLE_CDI_SHARED_TRUE='#'
ENABLE_CDI_SHARED_FALSE=
ENABLE_CDI_LIB_TRUE='#'
ENABLE_CDI_LIB_FALSE=
fi
 
# create shell variables for the representation of configure results
if test x$enable_cdi_shared = 'xno'; then :
ENABLE_CDI_SHARED=false
if test x$enable_cdi_lib = 'xno'; then :
ENABLE_CDI_LIB=false
 
else
ENABLE_CDI_SHARED=true
ENABLE_CDI_LIB=true
 
fi
# scan libcdi for CDI as a subproject
subdirs="$subdirs libcdi"
 
# ----------------------------------------------------------------------
 
 
......@@ -18078,8 +18078,8 @@ if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then
as_fn_error $? "conditional \"am__fastdepCXX\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${ENABLE_CDI_SHARED_TRUE}" && test -z "${ENABLE_CDI_SHARED_FALSE}"; then
as_fn_error $? "conditional \"ENABLE_CDI_SHARED\" was never defined.
if test -z "${ENABLE_CDI_LIB_TRUE}" && test -z "${ENABLE_CDI_LIB_FALSE}"; then
as_fn_error $? "conditional \"ENABLE_CDI_LIB\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
 
......
......@@ -96,55 +96,9 @@ AC_SUBST([SYSTEM_TYPE],["$ac_cv_build"])
# Check for math library
AC_CHECK_LIB([m],[floor])
# ----------------------------------------------------------------------
# Add basic configure options
# Add configure options
ACX_OPTIONS
# ----------------------------------------------------------------------
# Checks for PROJ.4 library
AC_ARG_WITH([proj],
[AS_HELP_STRING([--with-proj=<directory>],
[Specify location of PROJ library for cartographic projections.])],
[AS_CASE(["$with_proj"],
[no],[AC_MSG_CHECKING([for proj library])
AC_MSG_RESULT([suppressed])],
[yes],[AC_CHECK_HEADERS([projects.h])
AC_SEARCH_LIBS([pj_init],[proj],[AC_DEFINE([HAVE_LIBPROJ],[1],[Define to 1 for PROJ support])],
[AC_MSG_ERROR([Could not link to PROJ library!])])
AC_SUBST([PROJ_LDFLAGS],[" -lproj"])
AC_SUBST([PROJ_INCLUDE],[""])],
[*],[PROJ_ROOT=$with_proj
AS_IF([test -d "$PROJ_ROOT"],
[LDFLAGS="$LDFLAGS -L$PROJ_ROOT/lib"
CPPFLAGS="$CPPFLAGS -I$PROJ_ROOT/include"
AC_CHECK_HEADERS([projects.h])
AC_SEARCH_LIBS([pj_init],
[proj],
[AC_DEFINE([HAVE_LIBPROJ],[1],[Define to 1 for PROJ support])],
[AC_MSG_ERROR([Could not link to PROJ library!])])
AC_SUBST([PROJ_LDFLAGS],[" -L$PROJ_ROOT/lib -lproj"])
AC_SUBST([PROJ_INCLUDE],[" -I$PROJ_ROOT/include"])],
[AC_MSG_ERROR([$PROJ_ROOT is not a directory! PROJ suppressed])])])],
[AC_MSG_CHECKING([for the PROJ library])
AC_MSG_RESULT([suppressed])])
# ----------------------------------------------------------------------
# Compile with CDI
INTERNAL_CDI_DIR=libcdi
# At the moment, there are two possible CDI bindgins
# (default) linking directly to CDI's object files in ./libcdi/src
# (--enable-cdi-shared) build and link to a shared CDI library
AC_MSG_CHECKING([for building shared cdi bindings])
AC_ARG_ENABLE([cdi-shared],
[AS_HELP_STRING([--enable-cdi-shared],[Build, install and link CDO with a shared CDI library [default=no]])],
[AS_IF([test "x$enable_cdi_shared" == "xno"],
[enable_cdi_shared=no],
[enable_cdi_shared=yes])],[enable_cdi_shared=no])
AC_MSG_RESULT([$enable_cdi_shared])
# save CDI binding mode for later automake use
AM_CONDITIONAL([ENABLE_CDI_SHARED],[test x$enable_cdi_shared = 'xyes'])
# create shell variables for the representation of configure results
AS_IF([test x$enable_cdi_shared = 'xno'],[AC_SUBST([ENABLE_CDI_SHARED],[false])],[AC_SUBST([ENABLE_CDI_SHARED],[true])])
# scan libcdi for CDI as a subproject
AC_CONFIG_SUBDIRS([libcdi])
# ----------------------------------------------------------------------
AC_SUBST([CPPFLAGS])
AC_SUBST([FCFLAGS])
AC_SUBST([CLDFLAGS])
......
......@@ -79,7 +79,7 @@ ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
ENABLE_CDI_SHARED = @ENABLE_CDI_SHARED@
ENABLE_CDI_LIB = @ENABLE_CDI_LIB@
ENABLE_CGRIBEX = @ENABLE_CGRIBEX@
ENABLE_EXTRA = @ENABLE_EXTRA@
ENABLE_GRIB = @ENABLE_GRIB@
......
......@@ -168,7 +168,7 @@ AC_ARG_WITH([jasper],
# ----------------------------------------------------------------------
# Compile application with GRIB_API library (for GRIB2 support)
AC_ARG_WITH([grib_api],
[AS_HELP_STRING([--with-jasper=<yes|no|directory>],
[AS_HELP_STRING([--with-grib-api=<yes|no|directory>],
[library for grib2 compression; if a directory is given, it will be used as a value for --with-jasper-root])],
[AS_CASE(["$with_grib_api"],
[no],[AC_MSG_CHECKING([for GRIB_API library])
......@@ -252,4 +252,50 @@ AC_ARG_ENABLE([ieg],
enable_ieg=yes])
AC_MSG_RESULT([$enable_ieg])
AC_SUBST([ENABLE_IEG],[$enable_ieg])
# ----------------------------------------------------------------------
# Checks for PROJ.4 library
AC_ARG_WITH([proj],
[AS_HELP_STRING([--with-proj=<directory>],
[Specify location of PROJ library for cartographic projections.])],
[AS_CASE(["$with_proj"],
[no],[AC_MSG_CHECKING([for proj library])
AC_MSG_RESULT([suppressed])],
[yes],[AC_CHECK_HEADERS([projects.h])
AC_SEARCH_LIBS([pj_init],[proj],[AC_DEFINE([HAVE_LIBPROJ],[1],[Define to 1 for PROJ support])],
[AC_MSG_ERROR([Could not link to PROJ library!])])
AC_SUBST([PROJ_LDFLAGS],[" -lproj"])
AC_SUBST([PROJ_INCLUDE],[""])],
[*],[PROJ_ROOT=$with_proj
AS_IF([test -d "$PROJ_ROOT"],
[LDFLAGS="$LDFLAGS -L$PROJ_ROOT/lib"
CPPFLAGS="$CPPFLAGS -I$PROJ_ROOT/include"
AC_CHECK_HEADERS([projects.h])
AC_SEARCH_LIBS([pj_init],
[proj],
[AC_DEFINE([HAVE_LIBPROJ],[1],[Define to 1 for PROJ support])],
[AC_MSG_ERROR([Could not link to PROJ library!])])
AC_SUBST([PROJ_LDFLAGS],[" -L$PROJ_ROOT/lib -lproj"])
AC_SUBST([PROJ_INCLUDE],[" -I$PROJ_ROOT/include"])],
[AC_MSG_ERROR([$PROJ_ROOT is not a directory! PROJ suppressed])])])],
[AC_MSG_CHECKING([for the PROJ library])
AC_MSG_RESULT([suppressed])])
# ----------------------------------------------------------------------
# How to build CDI into CDI?
INTERNAL_CDI_DIR=libcdi
# At the moment, there are two possible CDI bindings
# (default) linking directly to CDI's object files in ./libcdi/src
# (--enable-cdi-lib) build and link to a shared CDI library
AC_MSG_CHECKING([for build a separate CDI library and link CDO to it |valid for CDO build only|])
AC_ARG_ENABLE([cdi-lib],
[AS_HELP_STRING([--enable-cdi-lib],[build + install a CDI library [default=no] and link CDO to it |CDO build only|])],
[AS_IF([test "x$enable_cdi_lib" != "xno"],
[enable_cdi_lib=yes],
[enable_cdi_lib=no])],[enable_cdi_lib=no])
AC_MSG_RESULT([$enable_cdi_lib])
# save CDI binding mode for later automake use
AM_CONDITIONAL([ENABLE_CDI_LIB],[test x$enable_cdi_lib = 'xyes'])
# create shell variables for the representation of configure results
AS_IF([test x$enable_cdi_lib = 'xno'],[AC_SUBST([ENABLE_CDI_LIB],[false])],[AC_SUBST([ENABLE_CDI_LIB],[true])])
# scan libcdi for CDI as a subproject
AC_CONFIG_SUBDIRS([libcdi])
])
......@@ -256,7 +256,7 @@ cdo_LDADD =
cdo_CPPFLAGS =
cdo_CPPFLAGS += -I$(top_srcdir)/libcdi/src
if ENABLE_CDI_SHARED
if ENABLE_CDI_LIB
cdo_LDADD += $(top_builddir)/libcdi/src/libcdi.la
else
# cdo_LDADD += $(top_builddir)/libcdi/src/basetime.lo \
......@@ -304,6 +304,7 @@ else
# $(top_builddir)/libcdi/src/zaxis.lo
cdo_LDADD += $(filter-out $(top_builddir)/libcdi/src/cdiFortran.lo,$(wildcard $(top_builddir)/libcdi/src/*.lo))
endif
cdo_LDADD += @NETCDF_LDFLAGS@ \
@HDF5_LDFLAGS@ \
@GRIB_API_LDFLAGS@ \
......
......@@ -35,7 +35,7 @@ POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
bin_PROGRAMS = cdo$(EXEEXT)
@ENABLE_CDI_SHARED_TRUE@am__append_1 = $(top_builddir)/libcdi/src/libcdi.la
@ENABLE_CDI_LIB_TRUE@am__append_1 = $(top_builddir)/libcdi/src/libcdi.la
# cdo_LDADD += $(top_builddir)/libcdi/src/basetime.lo \
# $(top_builddir)/libcdi/src/binary.lo \
# $(top_builddir)/libcdi/src/calendar.lo \
......@@ -79,7 +79,7 @@ bin_PROGRAMS = cdo$(EXEEXT)
# $(top_builddir)/libcdi/src/vlist_att.lo \
# $(top_builddir)/libcdi/src/vlist_var.lo \
# $(top_builddir)/libcdi/src/zaxis.lo
@ENABLE_CDI_SHARED_FALSE@am__append_2 = $(filter-out $(top_builddir)/libcdi/src/cdiFortran.lo,$(wildcard $(top_builddir)/libcdi/src/*.lo))
@ENABLE_CDI_LIB_FALSE@am__append_2 = $(filter-out $(top_builddir)/libcdi/src/cdiFortran.lo,$(wildcard $(top_builddir)/libcdi/src/*.lo))
noinst_PROGRAMS = cdotest$(EXEEXT)
subdir = src
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
......@@ -250,7 +250,7 @@ ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
ENABLE_CDI_SHARED = @ENABLE_CDI_SHARED@
ENABLE_CDI_LIB = @ENABLE_CDI_LIB@
ENABLE_CGRIBEX = @ENABLE_CGRIBEX@
ENABLE_EXTRA = @ENABLE_EXTRA@
ENABLE_GRIB = @ENABLE_GRIB@
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment