diff options
author | Andrew Bartlett <abartlet@samba.org> | 2003-03-05 09:33:43 +0000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2003-03-05 09:33:43 +0000 |
commit | ce7f54e953a4f6676c3569dc113e76147e19ef45 (patch) | |
tree | 943cc382247801a0e2155587d24909ceb2b0bf17 /source3 | |
parent | b4e60e5d7b1abcbf519fb2fdf4e6a5b121d32d60 (diff) | |
download | samba-ce7f54e953a4f6676c3569dc113e76147e19ef45.tar.gz samba-ce7f54e953a4f6676c3569dc113e76147e19ef45.tar.bz2 samba-ce7f54e953a4f6676c3569dc113e76147e19ef45.zip |
Add a test for a useful property of the compiler - we can get link-time
failures for some compile-time properties this way.
Andrew Bartlett
(This used to be commit ce618624b7df797e228f8ef0f19820b318c62ae9)
Diffstat (limited to 'source3')
-rw-r--r-- | source3/configure.in | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/source3/configure.in b/source3/configure.in index 269d70c2fc..cc38e37f3f 100644 --- a/source3/configure.in +++ b/source3/configure.in @@ -653,6 +653,24 @@ if test x"$samba_cv_immediate_structures" = x"yes"; then fi ############################################ +# check if the compiler can do immediate structures +AC_CACHE_CHECK([if the compiler will optimize out function calls],samba_cv_optimize_out_funcation_calls, [ + AC_TRY_LINK([ +#include <stdio.h>], +[ + if (1) { + this_function_does_not_exist(); + } else { + return 1; + } + +], + samba_cv_optimize_out_funcation_calls=yes,samba_cv_optimize_out_funcation_calls=no)]) +if test x"$samba_cv_optimize_out_funcation_calls" = x"yes"; then + AC_DEFINE(HAVE_COMPILER_WILL_OPTIMIZE_OUT_FNS,1,[Whether the compiler will optimize out function calls]) +fi + +############################################ # check for unix domain sockets AC_CACHE_CHECK([for unix domain sockets],samba_cv_unixsocket, [ AC_TRY_COMPILE([ |