summaryrefslogtreecommitdiff
path: root/common/elapi/conf_macros.m4
diff options
context:
space:
mode:
authorDmitri Pal <dpal@redhat.com>2009-10-07 09:45:39 -0400
committerStephen Gallagher <sgallagh@redhat.com>2009-10-16 14:27:24 -0400
commit01bf2fcf57944104f9a774c8716950f397d666ce (patch)
tree7d20b82674596a0946a2b339f807cf84fc58c769 /common/elapi/conf_macros.m4
parent82648b5af3cb5e68a48fe1e798ef48254ccbecb8 (diff)
downloadsssd-01bf2fcf57944104f9a774c8716950f397d666ce.tar.gz
sssd-01bf2fcf57944104f9a774c8716950f397d666ce.tar.bz2
sssd-01bf2fcf57944104f9a774c8716950f397d666ce.zip
ELAPI Compatibility code for getifaddr()
Addreses ticket #94 Actually works pretty well. To try use --enable-compat when build ELAPI. It will use compatibility code instead of getifaddr(). The trick in the elapi_ioctl.h with memory allocation is taken from Stevens book.
Diffstat (limited to 'common/elapi/conf_macros.m4')
-rw-r--r--common/elapi/conf_macros.m415
1 files changed, 15 insertions, 0 deletions
diff --git a/common/elapi/conf_macros.m4 b/common/elapi/conf_macros.m4
index e20dfdba..e3de2b7f 100644
--- a/common/elapi/conf_macros.m4
+++ b/common/elapi/conf_macros.m4
@@ -54,3 +54,18 @@ AC_DEFUN([WITH_APP_NAME_SIZE],
fi
AC_SUBST(appnamesize)
])
+
+AC_DEFUN([WITH_COMPAT],
+ [ AC_ARG_ENABLE([compat],
+ [AC_HELP_STRING([--enable-compat],
+ [use platform compatibility code])
+ ],
+ ,
+ [AC_CHECK_FUNC([getifaddrs],
+ AC_DEFINE([HAVE_GETIFADDRS], [1],
+ [Define if platform has getifaddrs()])
+ )
+ ]
+ )
+
+ ])