AC_INIT([wnews],[0.7],[samy@kerneled.org]) AC_CONFIG_HEADERS AC_ISC_POSIX AC_SUBST(CFLAGS) AC_SUBST(USEGTK) AC_PROG_CC AC_PROG_MAKE_SET AC_C_INLINE AC_PROG_CC_STDC AC_HEADER_STDC AC_CONFIG_HEADER(include/defines.h) # should use PKG_CHECK_MODULES(GTK, gtk+-2.0 gdk-2.0,,exit) AC_CHECK_LIB([curses], [main]) AC_CHECK_LIB([ncurses], [main]) AC_ARG_WITH(gtk2, [ --with-gtk2 Compile GTK version of wnews], if test x$withval = xyes; then want_gtk2=yes else if text "x$withval" = xno; then want_gtk2=no else want_gtk2=yes fi fi, want_gtk2=no) AC_HEADER_STDC AC_CHECK_HEADERS(sys/time.h unistd.h netdb.h netinet/in.h sys/socket.h) AC_C_CONST AC_STRUCT_ST_RDEV AC_HEADER_TIME AC_TYPE_SIGNAL AC_FUNC_VPRINTF AC_CHECK_FUNCS(mkdir select socket strdup strerror strstr gethostbyname memset strcasecmp strchr strncasecmp) AC_FUNC_MALLOC AC_FUNC_REALLOC AC_FUNC_SELECT_ARGTYPES if test "x$want_gtk2" = "xyes"; then if `pkg-config --exists gtk+-2.0`; then AC_SUBST(GTKCFLAGS) AC_SUBST(GTKLIBS) AC_SUBST(GTKOBJ) GTKCFLAGS="`pkg-config --cflags gtk+-2.0`" GTKLIBS="`pkg-config --libs gtk+-2.0` -lpthread" GTKOBJ="wnewsgtk.o" AC_DEFINE(WITH_GTK,1) else echo "Could not find gtk+ libraries, compiling curses version only" exit fi fi AC_OUTPUT([Makefile doc/Makefile src/Makefile])