summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Vander Stichele <thomas@apestaart.org>2002-12-10 15:12:55 +0000
committerThomas Vander Stichele <thomas@apestaart.org>2002-12-10 15:12:55 +0000
commite13cff348f35860c683275e531e93b328a733663 (patch)
tree693bd0fb93b6d01512815e9b64d2e79dcae73739
parent59a3d07db1b3010e234d73a8b0ed17967bd26f8c (diff)
Original commit message from CVS: check for makecontext
-rw-r--r--m4/gst-makecontext.m434
1 files changed, 34 insertions, 0 deletions
diff --git a/m4/gst-makecontext.m4 b/m4/gst-makecontext.m4
new file mode 100644
index 0000000..467aa13
--- /dev/null
+++ b/m4/gst-makecontext.m4
@@ -0,0 +1,34 @@
+AC_DEFUN(GST_CHECK_MAKECONTEXT, [
+ AC_MSG_CHECKING([whether we have makecontext])
+ AC_TRY_RUN([
+#include <ucontext.h>
+#include <stdlib.h>
+
+void test(void)
+{
+ exit(0);
+}
+
+int main(int argc, char *argv[])
+{
+ ucontext_t ucp;
+ int ret;
+
+ ret = getcontext(&ucp);
+ if(ret<0)exit(1);
+
+ ucp.uc_stack.ss_sp = malloc(65536);
+ ucp.uc_stack.ss_size = 65536;
+
+ makecontext(&ucp,test,0);
+ setcontext(&ucp);
+
+ exit(1);
+}
+], HAVE_MAKECONTEXT="yes", HAVE_MAKECONTEXT="no")
+AC_MSG_RESULT($HAVE_MAKECONTEXT)
+if test "$HAVE_MAKECONTEXT" == "yes"; then
+ AC_DEFINE_UNQUOTED(HAVE_MAKECONTEXT, $HAVE_MAKECONTEXT,
+ [defined if we have makecontext ()])
+fi
+])