summaryrefslogtreecommitdiff
path: root/source3/wscript
diff options
context:
space:
mode:
authorKai Blin <kai@samba.org>2010-03-22 22:58:43 +0100
committerAndrew Tridgell <tridge@samba.org>2010-04-06 20:27:03 +1000
commit38f8b86c7756893a32d24eee101d272b35209f78 (patch)
tree278fbf30bab85bc184595b4f1c22edf28cde4865 /source3/wscript
parentf7569922d929efde85324f2a50ff7c45f92fe3c9 (diff)
downloadsamba-38f8b86c7756893a32d24eee101d272b35209f78.tar.gz
samba-38f8b86c7756893a32d24eee101d272b35209f78.tar.bz2
samba-38f8b86c7756893a32d24eee101d272b35209f78.zip
build: Check if the compiler will optimize out functions
Diffstat (limited to 'source3/wscript')
-rw-r--r--source3/wscript9
1 files changed, 9 insertions, 0 deletions
diff --git a/source3/wscript b/source3/wscript
index e6f44f463d..ef682c5e11 100644
--- a/source3/wscript
+++ b/source3/wscript
@@ -152,6 +152,15 @@ main() {
headers='sys/types.h rpc/rpc.h',
msg="Checking for uint32 typedef included by rpc/rpc.h")
+ # Check if the compiler will optimize out functions
+ conf.CHECK_CODE('''
+if (0) {
+ this_function_does_not_exist();
+} else {
+ return 1;
+}''', 'HAVE_COMPILER_WILL_OPTIMIZE_OUT_FNS',
+ msg="Checking if the compiler will optimize out functions")
+
# Look for CUPS
conf.find_program('cups-config', var='CUPS_CONFIG')
if conf.env.CUPS_CONFIG: