s4:heimdal_build: try to fix the build on systems without ifaddrs.h
authorStefan Metzmacher <metze@samba.org>
Thu, 16 Jul 2009 10:08:56 +0000 (12:08 +0200)
committerStefan Metzmacher <metze@samba.org>
Thu, 16 Jul 2009 10:08:56 +0000 (12:08 +0200)
metze

source4/heimdal_build/ifaddrs.hin [new file with mode: 0644]
source4/heimdal_build/internal.m4

diff --git a/source4/heimdal_build/ifaddrs.hin b/source4/heimdal_build/ifaddrs.hin
new file mode 100644 (file)
index 0000000..a50b033
--- /dev/null
@@ -0,0 +1 @@
+#include "system/network.h"
index 5c8d78e56d0346f7b486636924656b5abcfddaa7..e7e7ae184273079db3d430bafb8a7bfaf71bd40e 100644 (file)
@@ -46,6 +46,15 @@ dnl declarations will be correct). Phew!
 AC_CHECK_HEADERS([err.h], [],
        [ cp heimdal/lib/roken/err.hin heimdal_build/err.h ])
 
+dnl Not all systems have ifaddrs.h, so we provide a replacement. Heimdal
+dnl unconditionally #includes <ifaddrs.h>, so we need to create an ifaddrs.h,
+dnl but we can't just have a static one because we don't want to use
+dnl it on systems that have a real ifaddrs.h. If the system has a real
+dnl ifaddrs.h. We don't use heimdal's lib/roken/ifaddrs.hin because
+dnl our libreplace would conflict with it.
+AC_CHECK_HEADERS([ifaddrs.h], [],
+       [ cp heimdal_build/ifaddrs.hin heimdal_build/ifaddrs.h ])
+
 AC_CHECK_HEADERS([                             \
        crypt.h                                 \
        curses.h                                \