diff --git a/Makefile.am b/Makefile.am index 7cc05bc8ad1ecc3b89d908f4480b7034782805a8..0ddcb5e4b4cd8a0b61af8888fb19a53447c3ee6b 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,7 +1,5 @@ ## Process this file with automake to produce Makefile.in # -DISTCHECK_CONFIGURE_FLAGS = --enable-cdi-lib -# SUBDIRS = src interfaces app examples tests # EXTRA_DIST=config/default doc/cdi_cman.pdf doc/cdi_fman.pdf src/cfortran.doc diff --git a/Makefile.in b/Makefile.in index 017fcd043a8bab00eabffd282fac6f28c0c29ee0..6b93760c50315519b389f7b5819ab0115a0a24e9 100644 --- a/Makefile.in +++ b/Makefile.in @@ -254,15 +254,12 @@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ -subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -# -DISTCHECK_CONFIGURE_FLAGS = --enable-cdi-lib # SUBDIRS = src interfaces app examples tests # diff --git a/app/Makefile.am b/app/Makefile.am index 8a2248eb712f894da789fe9475e40026a2bf9c75..295d4b860c834d54e1288b2e2fe89b5740c81e62 100644 --- a/app/Makefile.am +++ b/app/Makefile.am @@ -4,12 +4,14 @@ bin_PROGRAMS = noinst_PROGRAMS = if ENABLE_CDI_LIB bin_PROGRAMS += cdi +if CREATE_ALL_STATIC + bin_PROGRAMS += cdi_static +endif else noinst_PROGRAMS += cdi -endif -# if CREATE_ALL_STATIC -bin_PROGRAMS += cdi_static + noinst_PROGRAMS += cdi_static +endif endif # noinst_PROGRAMS += createtable diff --git a/app/Makefile.in b/app/Makefile.in index a9b5e2b280661f156ff81d870cfa9af73dbe80de..dfb1049dafc73db8a69d54b6cf39a386f3daa3cc 100644 --- a/app/Makefile.in +++ b/app/Makefile.in @@ -35,11 +35,11 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = $(am__EXEEXT_1) $(am__EXEEXT_2) -noinst_PROGRAMS = $(am__EXEEXT_3) createtable$(EXEEXT) +noinst_PROGRAMS = $(am__EXEEXT_3) $(am__EXEEXT_4) createtable$(EXEEXT) @ENABLE_CDI_LIB_TRUE@am__append_1 = cdi -@ENABLE_CDI_LIB_FALSE@am__append_2 = cdi -# -@CREATE_ALL_STATIC_TRUE@am__append_3 = cdi_static +@CREATE_ALL_STATIC_TRUE@@ENABLE_CDI_LIB_TRUE@am__append_2 = cdi_static +@ENABLE_CDI_LIB_FALSE@am__append_3 = cdi +@CREATE_ALL_STATIC_TRUE@@ENABLE_CDI_LIB_FALSE@am__append_4 = cdi_static subdir = app DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 @@ -56,9 +56,10 @@ CONFIG_HEADER = $(top_builddir)/src/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = @ENABLE_CDI_LIB_TRUE@am__EXEEXT_1 = cdi$(EXEEXT) -@CREATE_ALL_STATIC_TRUE@am__EXEEXT_2 = cdi_static$(EXEEXT) +@CREATE_ALL_STATIC_TRUE@@ENABLE_CDI_LIB_TRUE@am__EXEEXT_2 = cdi_static$(EXEEXT) am__installdirs = "$(DESTDIR)$(bindir)" @ENABLE_CDI_LIB_FALSE@am__EXEEXT_3 = cdi$(EXEEXT) +@CREATE_ALL_STATIC_TRUE@@ENABLE_CDI_LIB_FALSE@am__EXEEXT_4 = cdi_static$(EXEEXT) PROGRAMS = $(bin_PROGRAMS) $(noinst_PROGRAMS) am_cdi_OBJECTS = cdi.$(OBJEXT) cdi_OBJECTS = $(am_cdi_OBJECTS) @@ -237,7 +238,6 @@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ -subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ diff --git a/configure b/configure index 50e34aa369ec0a2223fdbe7d7bc4ae72bc6b1cb3..469289b794e19a0f3b22ade63553852a80a1b23e 100755 --- a/configure +++ b/configure @@ -604,7 +604,6 @@ ac_includes_default="\ #endif" ac_header_list= -enable_option_checking=no ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS @@ -624,7 +623,6 @@ FCMODCASE FCMODEXT CREATE_ISOC_FALSE CREATE_ISOC_TRUE -subdirs ENABLE_CDI_LIB ENABLE_CDI_LIB_FALSE ENABLE_CDI_LIB_TRUE @@ -796,7 +794,6 @@ enable_service enable_extra enable_ieg with_proj -enable_cdi_lib enable_mpi enable_iso_c_interface enable_swig @@ -821,7 +818,7 @@ CXXFLAGS CCC CXXCPP FCMODEXT' -ac_subdirs_all='libcdi' + # Initialize some variables set by options. ac_init_help= @@ -1455,8 +1452,6 @@ 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-lib build + install a CDI library [default=no] and link - CDO to it |CDO build only| --enable-mpi Compile with MPI compiler [default=no] --enable-iso-c-interface Create Fortran Interface via iso_c_bindings facility @@ -21953,8 +21948,6 @@ fi # ---------------------------------------------------------------------- # Add basic configure options - - # ---------------------------------------------------------------------- # Checks for pthread library @@ -23666,26 +23659,15 @@ $as_echo "suppressed" >&6; } fi # ---------------------------------------------------------------------- -# How to build CDI into CDI? -INTERNAL_CDI_DIR=libcdi +# How to build CDI into CDO? # 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 -{ $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 +# (default for CDO) linking directly to CDI's object files in ./libcdi/src +# (default for CDI) build and link to a shared CDI library +if test "x$CDO_DISABLE_CDILIB" = "x1"; then : enable_cdi_lib=no -fi else - enable_cdi_lib=no + enable_cdi_lib=yes fi - -{ $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_lib = 'xyes'; then ENABLE_CDI_LIB_TRUE= @@ -23703,9 +23685,6 @@ else ENABLE_CDI_LIB=true fi -# scan libcdi for CDI as a subproject -subdirs="$subdirs libcdi" - # ---------------------------------------------------------------------- # Compile with MPI support @@ -27237,151 +27216,6 @@ if test "$no_create" != yes; then # would make configure fail if this is the last instruction. $ac_cs_success || as_fn_exit 1 fi - -# -# CONFIG_SUBDIRS section. -# -if test "$no_recursion" != yes; then - - # Remove --cache-file, --srcdir, and --disable-option-checking arguments - # so they do not pile up. - ac_sub_configure_args= - ac_prev= - eval "set x $ac_configure_args" - shift - for ac_arg - do - if test -n "$ac_prev"; then - ac_prev= - continue - fi - case $ac_arg in - -cache-file | --cache-file | --cache-fil | --cache-fi \ - | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) - ac_prev=cache_file ;; - -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ - | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \ - | --c=*) - ;; - --config-cache | -C) - ;; - -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) - ac_prev=srcdir ;; - -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) - ;; - -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) - ac_prev=prefix ;; - -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) - ;; - --disable-option-checking) - ;; - *) - case $ac_arg in - *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - as_fn_append ac_sub_configure_args " '$ac_arg'" ;; - esac - done - - # Always prepend --prefix to ensure using the same prefix - # in subdir configurations. - ac_arg="--prefix=$prefix" - case $ac_arg in - *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args" - - # Pass --silent - if test "$silent" = yes; then - ac_sub_configure_args="--silent $ac_sub_configure_args" - fi - - # Always prepend --disable-option-checking to silence warnings, since - # different subdirs can have different --enable and --with options. - ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args" - - ac_popdir=`pwd` - for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue - - # Do not complain, so a configure script can configure whichever - # parts of a large source tree are present. - test -d "$srcdir/$ac_dir" || continue - - ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)" - $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5 - $as_echo "$ac_msg" >&6 - as_dir="$ac_dir"; as_fn_mkdir_p - ac_builddir=. - -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix - -case $srcdir in - .) # We are building in place. - ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; -esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - - - cd "$ac_dir" - - # Check for guested configure; otherwise get Cygnus style configure. - if test -f "$ac_srcdir/configure.gnu"; then - ac_sub_configure=$ac_srcdir/configure.gnu - elif test -f "$ac_srcdir/configure"; then - ac_sub_configure=$ac_srcdir/configure - elif test -f "$ac_srcdir/configure.in"; then - # This should be Cygnus configure. - ac_sub_configure=$ac_aux_dir/configure - else - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5 -$as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;} - ac_sub_configure= - fi - - # The recursion is here. - if test -n "$ac_sub_configure"; then - # Make the cache file name correct relative to the subdirectory. - case $cache_file in - [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;; - *) # Relative name. - ac_sub_cache_file=$ac_top_build_prefix$cache_file ;; - esac - - { $as_echo "$as_me:${as_lineno-$LINENO}: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&5 -$as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;} - # The eval makes quoting arguments work. - eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \ - --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" || - as_fn_error $? "$ac_sub_configure failed for $ac_dir" "$LINENO" 5 - fi - - cd "$ac_popdir" - done -fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} diff --git a/examples/Makefile.in b/examples/Makefile.in index 3154d9dcaf75663b6075a8fb60322edf42e4f265..9327ea7898d733f2eff039a4b23e95294cbe8a37 100644 --- a/examples/Makefile.in +++ b/examples/Makefile.in @@ -253,7 +253,6 @@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ -subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ diff --git a/interfaces/Makefile.in b/interfaces/Makefile.in index ced8a6284686fc0723b914fc2a921c9052a2741d..861b045f7f762320046ceb165084680279a79df8 100644 --- a/interfaces/Makefile.in +++ b/interfaces/Makefile.in @@ -238,7 +238,6 @@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ -subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ diff --git a/m4/acx_options.m4 b/m4/acx_options.m4 index 14b27b39dfd19f0023b22e0010c40fb4d602f909..019e462087ddc58cd9807e8c5e04fadecabe0f1b 100644 --- a/m4/acx_options.m4 +++ b/m4/acx_options.m4 @@ -280,22 +280,13 @@ AC_ARG_WITH([proj], [AC_MSG_CHECKING([for the PROJ library]) AC_MSG_RESULT([suppressed])]) # ---------------------------------------------------------------------- -# How to build CDI into CDI? -INTERNAL_CDI_DIR=libcdi +# How to build CDI into CDO? # 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]) +# (default for CDO) linking directly to CDI's object files in ./libcdi/src +# (default for CDI) build and link to a shared CDI library +AS_IF([test "x$CDO_DISABLE_CDILIB" = "x1"],[enable_cdi_lib=no],[enable_cdi_lib=yes]) # 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]) ]) diff --git a/src/Makefile.am b/src/Makefile.am index 4c3e7058a1c03d6a7e4b6bbfe73a87b4772dc32a..b032e76fda9f4706b42b9054ce751e5414abf51a 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -3,7 +3,7 @@ EXTRA_DIST = make_cdilib mo_cdi.f90 if ENABLE_CDI_LIB - lib_LTLIBRARIES = libcdi.la + lib_LTLIBRARIES = libcdi.la include_HEADERS = cdi.h cdi.inc else noinst_LTLIBRARIES = libcdi.la diff --git a/src/Makefile.in b/src/Makefile.in index c7ba1e62130df74fa91866dcd84a5ea9e208b01e..bcf6cdf83ed69cb83875830463ab2601f2b13bf4 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -256,7 +256,6 @@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ -subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ diff --git a/tests/Makefile.in b/tests/Makefile.in index d62683f26a9c17c9817dea649b05d9820b0d6dba..a51297a9ad0163110403f425519c8d72c78a0c02 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -219,7 +219,6 @@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ -subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@