Alien-cares

 view release on metacpan or  search on metacpan

libcares/configure.ac  view on Meta::CPAN

AC_PREREQ(2.57)

AC_INIT([c-ares], [1.15.0],
  [c-ares mailing list: http://cool.haxx.se/mailman/listinfo/c-ares])

XC_OVR_ZZ50
XC_OVR_ZZ60
CARES_OVERRIDE_AUTOCONF

AC_CONFIG_SRCDIR([ares_ipv6.h])
AC_CONFIG_HEADERS([ares_config.h ares_build.h])
AC_CONFIG_MACRO_DIR([m4])
AM_MAINTAINER_MODE
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])

CARES_CHECK_OPTION_DEBUG
CARES_CHECK_OPTION_OPTIMIZE
CARES_CHECK_OPTION_WARNINGS
CARES_CHECK_OPTION_WERROR
CARES_CHECK_OPTION_CURLDEBUG
CARES_CHECK_OPTION_SYMBOL_HIDING
CARES_CHECK_OPTION_EXPOSE_STATICS

XC_CHECK_PATH_SEPARATOR

dnl SED is mandatory for configure process and libtool.
dnl Set it now, allowing it to be changed later.
AC_PATH_PROG([SED], [sed], [not_found],
  [$PATH:/usr/bin:/usr/local/bin])
if test -z "$SED" || test "$SED" = "not_found"; then
  AC_MSG_ERROR([sed not found in PATH. Cannot continue without sed.])
fi
AC_SUBST([SED])

dnl GREP is mandatory for configure process and libtool.
dnl Set it now, allowing it to be changed later.
AC_PATH_PROG([GREP], [grep], [not_found],
  [$PATH:/usr/bin:/usr/local/bin])
if test -z "$GREP" || test "$GREP" = "not_found"; then
  AC_MSG_ERROR([grep not found in PATH. Cannot continue without grep.])
fi
AC_SUBST([GREP])

dnl EGREP is mandatory for configure process and libtool.
dnl Set it now, allowing it to be changed later.
if echo a | ($GREP -E '(a|b)') >/dev/null 2>&1; then
  AC_MSG_CHECKING([for egrep])
  EGREP="$GREP -E"
  AC_MSG_RESULT([$EGREP])
else
  AC_PATH_PROG([EGREP], [egrep], [not_found],
    [$PATH:/usr/bin:/usr/local/bin])
fi
if test -z "$EGREP" || test "$EGREP" = "not_found"; then
  AC_MSG_ERROR([egrep not found in PATH. Cannot continue without egrep.])
fi
AC_SUBST([EGREP])

dnl AR is mandatory for configure process and libtool.
dnl This is target dependent, so check it as a tool.
if test -z "$AR"; then
  dnl allow it to be overridden
  AC_PATH_TOOL([AR], [ar], [not_found],
    [$PATH:/usr/bin:/usr/local/bin])
  if test -z "$AR" || test "$AR" = "not_found"; then
    AC_MSG_ERROR([ar not found in PATH. Cannot continue without ar.])
  fi
fi
AC_SUBST([AR])

AX_CODE_COVERAGE

dnl Remove non-configure distributed ares_build.h
if test -f ${srcdir}/ares_build.h; then
  rm -f ${srcdir}/ares_build.h
fi

dnl
dnl Detect the canonical host and target build environment
dnl

AC_CANONICAL_HOST
dnl Get system canonical name
AC_DEFINE_UNQUOTED(OS, "${host}", [cpu-machine-OS])

XC_CHECK_PROG_CC
AX_CXX_COMPILE_STDCXX_11([noext],[optional])

XC_AUTOMAKE

dnl This defines _ALL_SOURCE for AIX
CARES_CHECK_AIX_ALL_SOURCE

dnl Our configure and build reentrant settings
CARES_CONFIGURE_THREAD_SAFE
CARES_CONFIGURE_REENTRANT

dnl check for how to do large files
AC_SYS_LARGEFILE

case $host_os in
  solaris*)
    AC_DEFINE(ETC_INET, 1, [if a /etc/inet dir is being used])
    ;;
esac

XC_LIBTOOL

#
# Automake conditionals based on libtool related checks
#

AM_CONDITIONAL([CARES_LT_SHLIB_USE_VERSION_INFO],
  [test "x$xc_lt_shlib_use_version_info" = 'xyes'])
AM_CONDITIONAL([CARES_LT_SHLIB_USE_NO_UNDEFINED],
  [test "x$xc_lt_shlib_use_no_undefined" = 'xyes'])
AM_CONDITIONAL([CARES_LT_SHLIB_USE_MIMPURE_TEXT],
  [test "x$xc_lt_shlib_use_mimpure_text" = 'xyes'])

#
# Due to libtool and automake machinery limitations of not allowing
# specifying separate CPPFLAGS or CFLAGS when compiling objects for
# inclusion of these in shared or static libraries, we are forced to
# build using separate configure runs for shared and static libraries
# on systems where different CPPFLAGS or CFLAGS are mandatory in order



( run in 0.964 second using v1.01-cache-2.11-cpan-e1769b4cff6 )