From 2239a52fecc5e630e61d72b3b13e18bad9c582e0 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 22 Mar 2010 13:01:58 +1100 Subject: build: check if a simple C program runs This will be helpful for working out why AIX is failing --- lib/replace/test/simple.c | 8 ++++++++ lib/replace/wscript | 9 +++++++++ 2 files changed, 17 insertions(+) create mode 100644 lib/replace/test/simple.c (limited to 'lib/replace') diff --git a/lib/replace/test/simple.c b/lib/replace/test/simple.c new file mode 100644 index 0000000000..e60b68f275 --- /dev/null +++ b/lib/replace/test/simple.c @@ -0,0 +1,8 @@ +/* simple program to make sure the compiler is OK */ +#include + +int main(void) +{ + printf("Hello world\n"); + return 0; +} diff --git a/lib/replace/wscript b/lib/replace/wscript index 73a89f0060..052b55b098 100644 --- a/lib/replace/wscript +++ b/lib/replace/wscript @@ -73,6 +73,15 @@ def configure(conf): conf.env.DISABLE_SHARED = Options.options.disable_shared + # see if we can compile and run a simple C program + conf.CHECK_CODE('#include "test/simple.c"', + addmain=False, + define='HAVE_SIMPLE_C_PROG', + mandatory=True, + execute=True, + msg='Checking simple C program') + + # check for rpath if not conf.env.DISABLE_SHARED and conf.CHECK_RPATH_SUPPORT(): conf.env.RPATH_ON_BUILD = not Options.options.disable_rpath_build -- cgit