AC_PREREQ(2.52) dnl Process this file with autoconf to produce a configure script. AC_INIT( screem, 0.16.1, http://www.screem.org/ ) AC_CONFIG_SRCDIR(src/screem-application.c) AM_CONFIG_HEADER(config.h) AM_INIT_AUTOMAKE( AC_PACKAGE_NAME, AC_PACKAGE_VERSION ) ACLOCAL_AMFLAGS="\${ACLOCAL_FLAGS}" AC_SUBST([ACLOCAL_AMFLAGS]) dnl get rid of those horrible static library things AC_ENABLE_STATIC(no) AC_PROG_LIBTOOL AC_ISC_POSIX AC_PROG_CC AC_HEADER_STDC AC_PATH_PROG(GCONFTOOL, gconftool-2) AC_PROG_INTLTOOL([0.29]) dnl taken from atk configure.in dnl This PATH_GLIB is somewhat redundant, but does a sanity compile and dnl importantly defines the GLIB_GENMARSHAL variable for subst into the dnl Makefile AM_PATH_GLIB_2_0(2.5.6, :, AC_MSG_ERROR([ *** GLIB 2.5.6 or better is required. The latest version of *** GLIB is always available from ftp://ftp.gtk.org/.]), gobject gmodule) dnl ****************************** dnl Check for required libs dnl ****************************** AC_PATH_PROG([PKG_CONFIG], [pkg-config], [no]) dnl ************************* dnl startup notification dnl ************************* if $PKG_CONFIG --atleast-version 0.5 libstartup-notification-1.0; then STARTUP_NOTIFICATION_PACKAGE=libstartup-notification-1.0 AC_DEFINE( [HAVE_STARTUP_NOTIFICATION], [1], [if startup notification is enabled or not] ) else STARTUP_NOTIFICATION_PACKAGE= fi dnl ************************* dnl launchpad dnl ************************* if $PKG_CONFIG --atleast-version 0.0 launchpad-integration; then LAUNCHPAD_PACKAGE=launchpad-integration AC_DEFINE( [HAVE_LAUNCHPAD], [1], [if launchpad integration is enabled or not] ) else LAUNCHPAD_PACKAGE= fi PKG_CHECK_MODULES(SCREEM, \ gtk+-2.0 >= 2.6.0 \ glib-2.0 >= 2.6.0 \ libgnome-2.0 >= 2.2.0 \ libgnomeui-2.0 >= 2.6.0 \ libxml-2.0 >= 2.4.3 \ libglade-2.0 >= 2.3.0 \ gconf-2.0 >= 2.2.0 \ gnome-vfs-2.0 >= 2.8.3 \ gdk-pixbuf-2.0 >= 2.2.0 \ gthread-2.0 >= 2.2.0 \ libgtkhtml-2.0 >= 2.2.0 \ gmodule-2.0 >= 2.2.0 \ libgnomeprint-2.2 >= 2.2.0 \ libgnomeprintui-2.2 >= 2.2.0 \ gtksourceview-1.0 >= 1.1.90 \ $STARTUP_NOTIFICATION_PACKAGE \ $LAUNCHPAD_PACKAGE \ libgnome-menu >= 2.9.2 ) AC_SUBST(SCREEM_LIBS) dnl ********************** dnl gnome-menus dnl ********************** PKG_CHECK_MODULES( GNOMEMENU, libgnome-menu >= 2.9.2 ) GNOMEMENU_VERSION=`pkg-config --modversion libgnome-menu | $AWK 'BEGIN { FS = "."; } { printf "%d", ($1 * 1000 + $2) * 1000 + $3;}'` AC_DEFINE_UNQUOTED(GNOMEMENU_VERSION,$GNOMEMENU_VERSION, [libgnome-menu version]) dnl ********************** dnl dbus dnl ********************** DBUS_LIBS= DBUS_CFLAGS= AC_ARG_ENABLE(dbus, AC_HELP_STRING([--enable-dbus Build with dbus support]), HAVE_DBUS=$enableval, HAVE_DBUS=yes) if test "$HAVE_DBUS" = "yes"; then AC_DEFINE( [HAVE_DBUS], [1], [if dbus support is enabled or not] ) PKG_CHECK_MODULES(DBUS, dbus-1 >= 0.22 dbus-glib-1 >= 0.22 ) DBUS_VERSION=`pkg-config --modversion dbus-1 | $AWK 'BEGIN { FS = "."; } { printf "%d", ($1 * 1000 + $2) * 1000 + $3;}'` AC_DEFINE_UNQUOTED(DBUS_VERSION,$DBUS_VERSION, [dbus version]) fi AC_SUBST(DBUS_LIBS) AC_SUBST(DBUS_CFLAGS) dnl **************************** dnl libegg stuff dnl **************************** PKG_CHECK_MODULES(EGG, gtk+-2.0 >= 2.0.0) AC_SUBST(EGG_CFLAGS) AC_SUBST(EGG_LIBS) dnl dnl libcroco stuff dnl PKG_CHECK_MODULES(CROCO, libcroco-0.6 >= 0.6.0) AC_SUBST(CROCO_CFLAGS) AC_SUBST(CROCO_LIBS) dnl end of libcroco stuff dnl *************************** dnl enchant dnl *************************** ENCHANT_LIBS= ENCHANT_CFLAGS= AC_ARG_ENABLE(enchant, AC_HELP_STRING([--enable-enchant Use enchant for spell checking]), HAVE_ENCHANT=$enableval, HAVE_ENCHANT=no) if test "$HAVE_ENCHANT" = "yes"; then AC_DEFINE( [HAVE_ENCHANT], [1], [Use enchant for spell checking] ) PKG_CHECK_MODULES(ENCHANT, enchant >= 1.1.6) fi AC_SUBST(ENCHANT_CFLAGS) AC_SUBST(ENCHANT_LIBS) AC_ARG_ENABLE(update_mime, AC_HELP_STRING([--disable-update-mime Do not run update-mime-database when installing]), UPDATE_MIME=$enableval,UPDATE_MIME=yes) AM_CONDITIONAL(UPDATE_MIME, test x"$UPDATE_MIME" = x"yes") AC_ARG_ENABLE(update_desktop, AC_HELP_STRING([--disable-update-desktop Do not run update-desktop-database when installing]), UPDATE_DESKTOP=$enableval,UPDATE_DESKTOP=yes) update_desktop_database=`which update-desktop-database` if test -z "$update_desktop_database" ; then UPDATE_DESKTOP=no fi AM_CONDITIONAL(UPDATE_DESKTOP, test x"$UPDATE_DESKTOP" = x"yes") dnl ************************************** dnl Mozilla stuff for when / if we use it dnl ************************************** MOZ_CFLAGS="" MOZ_LIBS="" dnl AC_ARG_ENABLE( mozilla, dnl [ --enable-mozilla Build with Mozilla support ],, ) dnl if test x"$enable_mozilla" = xyes; then dnl AC_PATH_PROG(MOZILLA_CONFIG, mozilla-config,no) dnl if test "$MOZILLA_CONFIG" = "no"; then dnl AC_MSG_ERROR(Couldn't find mozilla-config, please install the mozilla development package) dnl fi dnl AC_DEFINE( [SCREEM_MOZ], [1], [if mozilla support is enabled or not] ) dnl PKG_CHECK_MODULES(MOZ, mozilla-gtkmozembed >= 1.7) dnl fi AC_SUBST(MOZ_CFLAGS) AC_SUBST(MOZ_LIBS) dnl dnl Gconf stuff dnl AM_GCONF_SOURCE_2 dnl Checks for library functions. AC_CHECK_FUNCS(mkdir strsignal strerror memcpy strstr) dnl fnmatch AC_CHECK_FUNCS( fnmatch, [ have_fnmatch=true], [ have_fnmatch=false ]) AM_CONDITIONAL(HAVE_FNMATCH, $have_fnmatch) dnl Checks for header files. AC_HEADER_DIRENT AC_HEADER_SYS_WAIT AC_CHECK_HEADERS(fcntl.h unistd.h \ stdarg.h strings.h sys/time.h \ stdlib.h termios.h) dnl dnl Perform checks that are required for Sitecopy dnl AC_TYPE_OFF_T AC_CHECK_SIZEOF(long) AC_CHECK_SIZEOF(off_t) if test $ac_cv_sizeof_off_t -le $ac_cv_sizeof_long; then fmt="ld" else fmt="lld" fi AC_DEFINE_UNQUOTED(NE_FMT_OFF_T,"$fmt", [off_t printf format]) dnl internationalisation support GETTEXT_PACKAGE=screem AC_SUBST(GETTEXT_PACKAGE) AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [gettext package]) ALL_LINGUAS="az cs da de el es fr it ja ko nb no pl pt_BR ru rw sk sv tr uk vi zh_CN" AM_GLIB_GNU_GETTEXT AM_GLIB_DEFINE_LOCALEDIR(GNOMELOCALEDIR) dnl scrollkeeper AC_PATH_PROG(SCROLLKEEPER_CONFIG, scrollkeeper-config,no) if test "$SCROLLKEEPER_CONFIG" = "no"; then AC_MSG_ERROR(Couldn't find scrollkeeper-config, please install the scrollkeeper package) fi SCROLLKEEPER_BUILD_REQUIRED=0.1.1 AC_SUBST(SCROLLKEEPER_BUILD_REQUIRED) dnl Set PACKAGE_LOCALE_DIR in config.h. if test "x${prefix}" = "xNONE"; then AC_DEFINE_UNQUOTED(PACKAGE_LOCALE_DIR, "${ac_default_prefix}/${DATADIRNAME}/locale", [locale directory]) else AC_DEFINE_UNQUOTED(PACKAGE_LOCALE_DIR, "${prefix}/${DATADIRNAME}/locale", [locale directory]) fi dnl Subst PACKAGE_PIXMAPS_DIR. if test "x${prefix}" = "xNONE"; then AC_DEFINE_UNQUOTED(PACKAGE_PIXMAPS_DIR, "${ac_default_prefix}/${DATADIRNAME}/${PACKAGE}/pixmaps", [pixmap directory]) pixmapsdir=${ac_default_prefix}/${DATADIRNAME}/${PACKAGE}/pixmaps else AC_DEFINE_UNQUOTED(PACKAGE_PIXMAPS_DIR, "${prefix}/${DATADIRNAME}/${PACKAGE}/pixmaps", [pixmap directory]) pixmapsdir=${prefix}/${DATADIRNAME}/${PACKAGE}/pixmaps fi AC_SUBST(pixmapsdir) dnl we can't disable gtk deprecated widgets as libgnomeui uses them dnl can't disable libgnomeui as glade doesn't support gtk+2.5 which dnl replaces some of them, or others haven't got a replacement dnl can't disable glib deprecated functions yet either, g_strcasecmp dnl being the blocker here, need a util function which does the dnl same for utf-8 DEPRECATION_FLAGS="-DGTK_DISABLE_DEPRECATED -DGNOME_DISABLE_DEPRECATED -DGNOMEUI_DISABLE_DEPRECATED" CFLAGS="$SCREEM_CFLAGS -Wall $DEPRECATION_FLAGS $CFLAGS" AC_SUBST(CFLAGS) AC_SUBST(CPPFLAGS) AC_SUBST(LDFLAGS) AC_OUTPUT([ Makefile libegg/Makefile libegg/recent-files/Makefile libegg/util/Makefile libegg/toolbar-editor/Makefile gdl/Makefile include/Makefile src/Makefile glade/Makefile ui/Makefile po/Makefile.in plugins/Makefile plugins/screem-plugin.pc plugins/colourWizard/Makefile plugins/entityWizard/Makefile plugins/linkWizard/Makefile plugins/tableWizard/Makefile plugins/ssiWizard/Makefile plugins/formWizard/Makefile plugins/uploadWizard/Makefile plugins/css-wizard/Makefile plugins/object-wizard/Makefile resources/Makefile resources/Applets/Makefile resources/Images/Makefile resources/Javascript/Makefile resources/PHP3/Makefile resources/HTML/Makefile resources/Templates/Makefile splash/Makefile docs/Makefile docs/C/Makefile docs/C/figures/Makefile pixmaps/Makefile hints/Makefile dtd/Makefile data/Makefile data/mime/Makefile data/tagtrees/Makefile helpers/Makefile helpers/Tidy/Makefile helpers/browsers/Makefile helpers/browsers-remote/Makefile tests/Makefile ],[sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile]) echo " Configuration: Source code location: ${srcdir} Compiler: ${CC} Install location: ${prefix} Type make to build Screem."