New file boinc_check_fcgi.m4. Checks whether fcgi headers are installed.

svn path=/trunk/boinc/; revision=16440
This commit is contained in:
Eric J. Korpela 2008-11-07 00:15:24 +00:00
parent 812dc63bd0
commit ac952126f5
1 changed files with 46 additions and 0 deletions

46
m4/boinc_check_fcgi.m4 Normal file
View File

@ -0,0 +1,46 @@
AC_DEFUN([BOINC_CHECK_FCGI],[
if ( test "x${enable_server}" = "xyes" ) || ( test "x${enable_libraries}" = "xyes" ) ; then
if test "x${enable_fcgi}" = "xyes" ; then
AC_MSG_CHECKING([if CFLAG '-include fcgi_stdio.h' works])
AC_LANG_PUSH(C)
save_cflags="${CFLAGS}"
CFLAGS="-I${prefix} -include fcgi_stdio.h -D_USING_FCGI_ ${CFLAGS}"
AC_COMPILE_IFELSE(
AC_LANG_PROGRAM(
[[
#define CONFIG_TEST
]],
[
fprintf(stderr,"Hello\n");
return 0;
]
),
[
AC_MSG_RESULT(yes)
],
[
AC_MSG_RESULT(no)
AC_MSG_WARN([ fcgi-stdio.h not found.
------------------------------------------------------------
Disabling FCGI. Will not build components that require FCGI
------------------------------------------------------------
])
enable_fcgi="no"
]
)
CFLAGS="${save_cflags}"
AC_LANG_POP(C)
fi
if test "x${enable_fcgi}" = "xyes" ; then
AC_CHECK_LIB([fcgi],[FCGI_printf],[enable_fcgi="yes"],[
enable_fcgi="no"
AC_MSG_WARN([libfcgi not found.
------------------------------------------------------------
Disabling FCGI. Will not build components that require FCGI
------------------------------------------------------------
])
])
fi
fi
])