aboutsummaryrefslogtreecommitdiff
path: root/ares/m4/cares-confopts.m4
diff options
context:
space:
mode:
Diffstat (limited to 'ares/m4/cares-confopts.m4')
-rw-r--r--ares/m4/cares-confopts.m444
1 files changed, 42 insertions, 2 deletions
diff --git a/ares/m4/cares-confopts.m4 b/ares/m4/cares-confopts.m4
index c34197a48..d265a4d18 100644
--- a/ares/m4/cares-confopts.m4
+++ b/ares/m4/cares-confopts.m4
@@ -1,7 +1,7 @@
#***************************************************************************
# $Id$
#
-# Copyright (C) 2008 by Daniel Stenberg et al
+# Copyright (C) 2008 - 2009 by Daniel Stenberg et al
#
# Permission to use, copy, modify, and distribute this software and its
# documentation for any purpose and without fee is hereby granted, provided
@@ -16,7 +16,46 @@
#***************************************************************************
# File version for 'aclocal' use. Keep it a single number.
-# serial 3
+# serial 4
+
+
+dnl CARES_CHECK_OPTION_CURLDEBUG
+dnl -------------------------------------------------
+dnl Verify if configure has been invoked with option
+dnl --enable-curldebug or --disable-curldebug, and set
+dnl shell variable want_curldebug value as appropriate.
+
+AC_DEFUN([CARES_CHECK_OPTION_CURLDEBUG], [
+ AC_BEFORE([$0],[CARES_CHECK_CURLDEBUG])dnl
+ AC_MSG_CHECKING([whether to enable curl debug memory tracking requested])
+ OPT_CURLDEBUG_BUILD="default"
+ AC_ARG_ENABLE(curldebug,
+AC_HELP_STRING([--enable-curldebug],[Enable curl debug memory tracking])
+AC_HELP_STRING([--disable-curldebug],[Disable curl debug memory tracking]),
+ OPT_CURLDEBUG_BUILD=$enableval)
+ case "$OPT_CURLDEBUG_BUILD" in
+ no)
+ dnl --disable-curldebug option used
+ want_curldebug="no"
+ ;;
+ default)
+ dnl configure option not specified
+ want_curldebug="no"
+ ;;
+ *)
+ dnl --enable-curldebug option used.
+ dnl The use of this option value is a request to enable curl's
+ dnl debug memory tracking for the c-ares library. This is a big
+ dnl hack that can only be done when a whole bunch of requisites
+ dnl are simultaneously satisfied. Later on, these requisites are
+ dnl verified and if they are not fully satisfied the option will
+ dnl be ignored and act as if --disable-curldebug had been given
+ dnl setting shell variable want_curldebug to 'no'.
+ want_curldebug="yes"
+ ;;
+ esac
+ AC_MSG_RESULT([$want_curldebug])
+])
dnl CARES_CHECK_OPTION_DEBUG
@@ -28,6 +67,7 @@ dnl variable want_debug value as appropriate.
AC_DEFUN([CARES_CHECK_OPTION_DEBUG], [
AC_BEFORE([$0],[CARES_CHECK_OPTION_WARNINGS])dnl
AC_BEFORE([$0],[CARES_CHECK_PROG_CC])dnl
+ AC_BEFORE([$0],[CARES_CHECK_CURLDEBUG])dnl
AC_MSG_CHECKING([whether to enable debug build options])
OPT_DEBUG_BUILD="default"
AC_ARG_ENABLE(debug,