# Generated by make-macros-linking on 2014/07/25 13:53:16 +0000

#
# ABINIT fallback support for the "configure" script
#

#
# IMPORTANT NOTE
#
# This file has been automatically generated by the make-macros-linking
# script. If you try to edit it, your changes will systematically be
# overwritten.
#



# ABI_FALLBACKS_PARAMS()
# ----------------------
#
# Sets all variables needed to link against fallbacks.
#
AC_DEFUN([ABI_FALLBACKS_PARAMS],[

  dnl Include flags
  if test "${enable_bigdft}" = "yes"; then
    lib_bigdft_incs="${fallbacks_incs}"
  fi
  if test "${enable_etsf_io}" = "yes"; then
    lib_etsf_io_incs="${fallbacks_incs}"
  fi
  if test "${enable_fox}" = "yes"; then
    lib_fox_incs="${fallbacks_incs}"
  fi
  if test "${enable_libxc}" = "yes"; then
    lib_libxc_incs="${fallbacks_incs}"
  fi
  if test "${enable_netcdf}" = "yes"; then
    lib_netcdf_incs="${fallbacks_incs}"
  fi

  dnl Library flags
  if test "${enable_atompaw}" = "yes"; then
    lib_atompaw_libs='-L$(fallbacks_instdir)/lib -latompaw'
  fi
  if test "${enable_bigdft}" = "yes"; then
    lib_bigdft_libs='-L$(fallbacks_instdir)/lib -lbigdft-1 -labinit -lyaml'
  fi
  if test "${enable_etsf_io}" = "yes"; then
    lib_etsf_io_libs='-L$(fallbacks_instdir)/lib -letsf_io_low_level -letsf_io_utils -letsf_io'
  fi
  if test "${enable_fox}" = "yes"; then
    lib_fox_libs='-L$(fallbacks_instdir)/lib -lFoX_sax -lFoX_utils -lFoX_fsys -lFoX_common'
  fi
  if test "${enable_libxc}" = "yes"; then
    lib_libxc_libs='-L$(fallbacks_instdir)/lib -lxc'
  fi
  if test "${enable_linalg}" = "yes"; then
    lib_linalg_libs='-L$(fallbacks_instdir)/lib -llapack -lblas'
  fi
  if test "${enable_netcdf}" = "yes"; then
    lib_netcdf_libs='-L$(fallbacks_instdir)/lib -lnetcdf'
  fi
  if test "${enable_wannier90}" = "yes"; then
    lib_wannier90_libs='-L$(fallbacks_instdir)/lib -lwannier90'
  fi

  dnl Binary command lines
  if test "${enable_atompaw}" = "yes"; then
    run_atompaw="${fallbacks_instdir}/bin/atompaw-abinit"
    run_graphatom="${fallbacks_instdir}/bin/graphatom-abinit"
  else
    run_atompaw="${ATOMPAW_BIN}"
    run_graphatom="${GRAPHATOM_BIN}"
  fi
  AC_SUBST(run_atompaw)
  AC_SUBST(run_graphatom)

  if test "${enable_etsf_io}" = "yes"; then
    run_etsf_io="${fallbacks_instdir}/bin/etsf_io-abinit"
  else
    run_etsf_io="${ETSF_IO_BIN}"
  fi
  AC_SUBST(run_etsf_io)

  if test "${enable_fox}" = "yes"; then
    run_fox_config="${fallbacks_instdir}/bin/FoX-config-abinit"
  else
    run_fox_config="${FOX_CONFIG_BIN}"
  fi
  AC_SUBST(run_fox_config)

  if test "${enable_netcdf}" = "yes"; then
    run_nc_config="${fallbacks_instdir}/bin/nc-config-abinit"
    run_nccopy="${fallbacks_instdir}/bin/nccopy-abinit"
    run_ncdump="${fallbacks_instdir}/bin/ncdump-abinit"
    run_ncgen="${fallbacks_instdir}/bin/ncgen-abinit"
    run_ncgen3="${fallbacks_instdir}/bin/ncgen3-abinit"
  else
    run_nc_config="${NC_CONFIG_BIN}"
    run_nccopy="${NCCOPY_BIN}"
    run_ncdump="${NCDUMP_BIN}"
    run_ncgen="${NCGEN_BIN}"
    run_ncgen3="${NCGEN3_BIN}"
  fi
  AC_SUBST(run_nc_config)
  AC_SUBST(run_nccopy)
  AC_SUBST(run_ncdump)
  AC_SUBST(run_ncgen)
  AC_SUBST(run_ncgen3)

  if test "${enable_wannier90}" = "yes"; then
    run_wannier90_x="${fallbacks_instdir}/bin/wannier90.x-abinit"
  else
    run_wannier90_x="${WANNIER90_X_BIN}"
  fi
  AC_SUBST(run_wannier90_x)

]) # ABI_FALLBACKS_PARAMS
