AC_INIT(gnokiifs, 1.0) AC_PROG_CXX AC_LANG(C++) a=1 AC_CHECK_HEADERS(gnokii.h, [], [a=0]) if test $a == 0 then AC_MSG_ERROR([The gnokii headers are required for this to build.]) fi AC_CHECK_LIB(gnokii, gn_sm_functions, [], [a=0]) if test $a == 0 then AC_MSG_ERROR([The gnokii library is either broken or missing.]) fi AC_MSG_CHECKING([for file I/O in libgnokii]) AC_COMPILE_IFELSE([ #include int main() { gn_operation a = GN_OP_GetFileList; }], [a=1], [a=0]) if test $a == 0 then AC_MSG_RESULT([no]) AC_MSG_ERROR([Your version of gnokii is too old. Please upgrade to 0.6.5 or newer.]) else AC_MSG_RESULT([yes]) fi AC_OUTPUT(Makefile)