From 4b93c68bc4ddc62343c5034264b6428b9ada3539 Mon Sep 17 00:00:00 2001 From: "Clifford T. Matthews" Date: Sat, 6 Jun 2009 11:49:53 -0600 Subject: [PATCH] Added execstack back in since it really is needed on some platforms. --- configure.ac | 15 +++++++++++++++ test/Makefile.am | 2 +- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index eca1e81..2295c8f 100644 --- a/configure.ac +++ b/configure.ac @@ -135,6 +135,21 @@ AC_CHECK_FUNCS([getpagesize memmove memset strchr strdup strerror strstr]) #AC_SUBST(SUBDIRS) + +# The following is taken from wine-0.9.25's configure.ac + +AC_SUBST(EXECSTACK,"") +saved_LDFLAGS="$LDFLAGS" +LDFLAGS="$LDFLAGS -z execstack" +AC_CACHE_CHECK([for -z execstack], ac_cv_z_execstack, + AC_TRY_LINK([],[int main(void) {return 0;}], + ac_cv_z_execstack=yes,ac_cv_z_execstack=no)) +if test $ac_cv_z_execstack +then + EXECSTACK="-z execstack" +fi +LDFLAGS="$saved_LDFLAGS" + AM_CONDITIONAL([M68K_HOSTCPU], [test "$host_alias" = "m68k-next-ns3"]) AC_CONFIG_FILES([Makefile diff --git a/test/Makefile.am b/test/Makefile.am index e309542..18c2aaf 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -19,7 +19,7 @@ testbattery.c: tests.c maketestbattery.pl syngentest_LDADD = ../runtime/libsyn68k.a -syngentest_LDFLAGS = +syngentest_LDFLAGS = @EXECSTACK@ INCLUDES = -I$(srcdir)/include -I$(srcdir)/../include -I../include