packages feed

augeas-0.3.2: configure.ac

AC_PREREQ(2.65)
AC_INIT([haskell-augeas],[0.3.2])
AC_CONFIG_SRCDIR(Setup.hs)
AC_CONFIG_HEADERS([Config.h])

AC_ARG_WITH([compiler],[])

# augeas-specific content
has_augeas_init=no
AC_SEARCH_LIBS([aug_init],[augeas],[has_augeas_init=yes])


if test "x${has_augeas_init}" = "xyes" ; then
   AC_CHECK_HEADERS([augeas.h],[],[has_augeas_h=no])
else
   AC_MSG_ERROR([Unable to find aug_init in an augeas library.])
fi

if test "x${has_augeas_h}" = "xno"; then
   AC_MSG_ERROR([Unable to find augeas.h.])
fi

## Checking for specific augeas  lib functions.
has_augeas_close=no
AC_SEARCH_LIBS([aug_close],[augeas],[has_augeas_close=yes],[has_augeas_close=no])

if test "x${has_augeas_close}" = "xno" ; then
   AC_MSG_ERROR([Unable to find aug_close in an augeas library.])
fi

## Treat all the rest of the API calls as potentially missing

# HAS_AUGEAS_FUNC(library_method_name,config_define_name)
AC_DEFUN([HAS_AUGEAS_FUNC],
[
has_$1=no
AC_SEARCH_LIBS([$1],[augeas],[has_$1=yes])
if test "x${has_$1}" = "xyes"; then
   AC_DEFINE([$2],[],[Augeas library has the $1 function.])
fi
])

HAS_AUGEAS_FUNC(aug_defvar,HAS_AUGEAS_DEFVAR)
HAS_AUGEAS_FUNC(aug_missing,HAS_AUGEAS_MISSING)
HAS_AUGEAS_FUNC(aug_defnode,HAS_AUGEAS_DEFNODE)
HAS_AUGEAS_FUNC(aug_get,HAS_AUGEAS_GET)
HAS_AUGEAS_FUNC(aug_set,HAS_AUGEAS_SET)
HAS_AUGEAS_FUNC(aug_insert,HAS_AUGEAS_INSERT)
HAS_AUGEAS_FUNC(aug_rm,HAS_AUGEAS_RM)
HAS_AUGEAS_FUNC(aug_mv,HAS_AUGEAS_MV)
HAS_AUGEAS_FUNC(aug_match,HAS_AUGEAS_MATCH)
HAS_AUGEAS_FUNC(aug_save,HAS_AUGEAS_SAVE)
HAS_AUGEAS_FUNC(aug_load,HAS_AUGEAS_LOAD)
HAS_AUGEAS_FUNC(aug_print,HAS_AUGEAS_PRINT)
HAS_AUGEAS_FUNC(aug_error,HAS_AUGEAS_ERROR)
HAS_AUGEAS_FUNC(aug_error_message,HAS_AUGEAS_ERROR_MESSAGE)
HAS_AUGEAS_FUNC(aug_error_minor_message,HAS_AUGEAS_ERROR_MINOR_MESSAGE)
HAS_AUGEAS_FUNC(aug_error_details,HAS_AUGEAS_ERROR_DETAILS)
HAS_AUGEAS_FUNC(aug_setm,HAS_AUGEAS_SETM)


## fdopen
## fflush
## fclose

AC_OUTPUT