Include alloca.h into glib.h if needed.
authorZoltan Varga <vargaz@gmail.com>
Thu, 2 Dec 2010 13:31:59 +0000 (14:31 +0100)
committerZoltan Varga <vargaz@gmail.com>
Thu, 2 Dec 2010 13:32:29 +0000 (14:32 +0100)
eglib/configure.ac
eglib/src/eglib-config.h.in
eglib/src/glib.h

index 26a8e58d3232553412fb5ccff1a44b96c01c49cb..7d52c708efba2d3e2851c22fe4069c4a10aa4986 100644 (file)
@@ -127,6 +127,8 @@ fi
 AC_SUBST(G_HAVE_ISO_VARARGS)
 
 AC_CHECK_HEADERS(getopt.h sys/time.h sys/wait.h pwd.h langinfo.h iconv.h localcharset.h)
+AC_CHECK_HEADER(alloca.h, [HAVE_ALLOCA_H=1], [HAVE_ALLOCA_H=0])
+AC_SUBST(HAVE_ALLOCA_H)
 
 if test $ac_cv_sizeof_void_p != $ac_cv_sizeof_int; then
    GPOINTER_TO_INT="((gint)(long) (ptr))"
index 03ecbfd129d46b4c160a1014ac081e64e6cea925..7df691974848e916442ff8e8189a55ac3ce0bf25 100644 (file)
 #define GINT_TO_POINTER(v)     @GINT_TO_POINTER@
 #define GUINT_TO_POINTER(v)    @GUINT_TO_POINTER@
 
+#if @HAVE_ALLOCA_H@ == 1
+#define G_HAVE_ALLOCA_H
+#endif
+
 typedef unsigned @GSIZE@ gsize;
 typedef signed   @GSIZE@ gssize;
 
index 50b61b4cb347f7887d42927485e6447e88fcb72f..8b6082e83a9b2622eed69f0499709861851afad9 100644 (file)
 #include <eglib-remap.h>
 #endif
 
+#ifdef G_HAVE_ALLOCA_H
+#include <alloca.h>
+#endif
+
 #ifndef offsetof
 #   define offsetof(s_name,n_name) (size_t)(char *)&(((s_name*)0)->m_name)
 #endif