diff options
Diffstat (limited to 'source3/aclocal.m4')
-rw-r--r-- | source3/aclocal.m4 | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/source3/aclocal.m4 b/source3/aclocal.m4 index 3d6642d373..86c43f80dc 100644 --- a/source3/aclocal.m4 +++ b/source3/aclocal.m4 @@ -76,6 +76,18 @@ AC_DEFUN(SMB_SUBSYSTEM, ifelse([$2], , :, [rm -f $2]) ]) +dnl AC_PROG_CC_FLAG(flag) +AC_DEFUN(AC_PROG_CC_FLAG, +[AC_CACHE_CHECK(whether ${CC-cc} accepts -$1, ac_cv_prog_cc_$1, +[echo 'void f(){}' > conftest.c +if test -z "`${CC-cc} -$1 -c conftest.c 2>&1`"; then + ac_cv_prog_cc_$1=yes +else + ac_cv_prog_cc_$1=no +fi +rm -f conftest* +])]) + dnl see if a declaration exists for a function or variable dnl defines HAVE_function_DECL if it exists dnl AC_HAVE_DECL(var, includes) |