AC_PREREQ(2.53) AC_INIT(web, 0.0, http://www.chrislord.net/) AM_INIT_AUTOMAKE() AC_CONFIG_SRCDIR(src/web_main.c) AM_CONFIG_HEADER(src/config.h) AM_MAINTAINER_MODE AC_ISC_POSIX AC_PROG_CC AC_STDC_HEADERS AC_PROG_LIBTOOL m4_include(libcurl.m4) PKG_CHECK_MODULES(WEB, libxml-2.0 glib-2.0 gthread-2.0 gtk+-2.0 libglade-2.0 gconf-2.0 gobject-2.0) # -- Hildon stuff for Maemo hildon=false AC_ARG_ENABLE(hildon,AS_HELP_STRING([--enable-hildon],[Turn on hildon support]),[ if test "x$enableval" = "xyes"; then hildon=true PKG_CHECK_MODULES(HILDON,[ hildon-libs, dbus-1, libosso, libosso-gsf-1 ], AC_DEFINE(WITH_HILDON, 1, [Define if you want hildon-libs to be used])) WEB_CFLAGS="$WEB_CFLAGS $HILDON_CFLAGS" WEB_LIBS="$WEB_LIBS $HILDON_LIBS" fi ]) AM_CONDITIONAL(WITH_HILDON, test "x$hildon" = "xtrue") # -- End of Hildon Stuff -- LIBCURL_CHECK_CONFIG([yes], [7.14.0], [WEB_CFLAGS="$WEB_CFLAGS $LIBCURL_CPPFLAGS" WEB_LIBS="$WEB_LIBS $LIBCURL" ], AC_MSG_ERROR([libcurl >= 7.14.0 not found])) # Find how and where to put the GConf schemas AC_PATH_PROG(GCONFTOOL, gconftool-2, no) if test x"$GCONFTOOL" = xno; then AC_MSG_WARN([gconftool-2 executable not found in your path - should be installed with GConf]) fi AM_GCONF_SOURCE_2 # gtkhtml2 back-end AC_ARG_ENABLE(gtkhtml2,AS_HELP_STRING([--disable-gtkhtml2],[don't compile the gtkhtml2 backend]),,enable_gtkhtml2=yes) AC_ARG_ENABLE(libtidy,AS_HELP_STRING([--enable-libtidy],[Use libtidy with the gtkhtml2 backend [[default=no]]]),want_libtidy=yes,want_libtidy=no) AC_ARG_WITH(libspidermonkey,AS_HELP_STRING([--with-libspidermonkey],[Prefix where libspidermonkey is installed]),[ CPPFLAGS="$CPPFLAGS -I$withval/include" LIBS="$LIBS -L$withval/lib"],) if test x"$enable_gtkhtml2" = "xyes"; then dnl AC_MSG_CHECKING([for GtkHTML2 support]) PKG_CHECK_MODULES(GTKHTML2, libgtkhtml-2.0 libxml-2.0) # libtidy check if test x"$want_libtidy" = "xyes"; then AC_CHECK_HEADER([tidy/tidy.h], [GTKHTML2_LIBS="$GTKHTML2_LIBS -ltidy" AC_DEFINE(HAVE_LIBTIDY, 1, [Define if you want libtidy to be used]) ], [AC_MSG_ERROR([libtidy not found])]) fi # spidermonkey check, copied from gxine dnl Check for Spidermonkey in two locations. dnl This is necessary because in Debian, libjs.so is already taken by the dnl NGS Javascript interpreter (ngs-js); consequently, the Spidermonkey dnl library is named libsmjs.so and has its include files in dnl /usr/include/smjs rather than /usr/include/js. AC_CHECK_HEADER([smjs/jsapi.h], [GTKHTML2_LIBS="$GTKHTML2_LIBS -lsmjs"], [AC_CHECK_HEADER([js/jsapi.h], [GTKHTML2_LIBS="$GTKHTML2_LIBS -ljs" AC_DEFINE(LIBJS_IS_SMJS, 1, [Define if you have rather than ])], [PKG_CHECK_MODULES(JS, xulrunner-js, [GTKHTML2_LIBS="$GTKHTML2_LIBS $JS_LIBS" AC_DEFINE(LIBJS_IS_MOZJS, 1, [Define if you have ])], [AC_MSG_ERROR([libsmjs not found])])], [#define XP_UNIX])], [#define XP_UNIX]) fi if test x"$enable_gtkhtml2" != "xyes" ; then AC_MSG_ERROR([ *** You must enable at least one HTML back-end ]) fi AM_CONDITIONAL(WITH_GTKHTML2, test x"$enable_gtkhtml2" = "xyes") AC_OUTPUT([ Makefile data/Makefile src/Makefile src/gtkhtml2/Makefile ])