# vi:set et ai sw=2 sts=2 ts=2: */ #- # Copyright (c) 2004-2007 Benedikt Meurer # Copyright (c) 2009-2011 Jannis Pohlmann # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of # the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public # License along with this program; if not, write to the Free # Software Foundation, Inc., 51 Franklin Street, Fifth Floor, # Boston, MA 02110-1301, USA. dnl *************************** dnl *** Version information *** dnl *************************** m4_define([thunarx_verinfo], [0:0:0]) m4_define([thunarx_version_api], [2]) m4_define([thunar_version_major], [1]) m4_define([thunar_version_minor], [3]) m4_define([thunar_version_micro], [0]) m4_define([thunar_version_nano], []) m4_define([thunar_version_build], [@REVISION@]) m4_define([thunar_version_tag], []) m4_define([thunar_version], [thunar_version_major().thunar_version_minor().thunar_version_micro()ifelse(thunar_version_nano(), [], [], [.thunar_version_nano()])ifelse(thunar_version_tag(), [git], [thunar_version_tag()-thunar_version_build()], [thunar_version_tag()])]) dnl ******************************************* dnl *** Debugging support for SVN snapshots *** dnl ******************************************* m4_define([thunar_debug_default], [ifelse(thunar_version_tag(), [git], [yes], [minimum])]) dnl *************************** dnl *** Initialize autoconf *** dnl *************************** AC_COPYRIGHT([Copyright (c) 2004-2011 The Thunar development team. All rights reserved.]) AC_INIT([Thunar], [thunar_version], [http://bugzilla.xfce.org/], [Thunar]) AC_PREREQ([2.50]) AC_CANONICAL_TARGET() AC_REVISION([$Id$]) dnl *************************** dnl *** Initialize automake *** dnl *************************** AM_INIT_AUTOMAKE([1.8 dist-bzip2 tar-ustar no-dist-gzip]) AM_CONFIG_HEADER([config.h]) AM_MAINTAINER_MODE() m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) dnl ******************************* dnl *** Check for UNIX variants *** dnl ******************************* AC_AIX() AC_ISC_POSIX() AC_MINIX() if test "x$target_os" = "xlinux-gnu"; then AC_DEFINE([HAVE_LINUX], [], [Whether we are building on Linux or not]) fi dnl ******************************** dnl *** Check for basic programs *** dnl ******************************** AC_PROG_CC() AC_PROG_LD() AM_PROG_CC_C_O() AC_PROG_INSTALL() AC_PROG_INTLTOOL() AC_CHECK_PROGS([PERL], [perl5 perl]) dnl ************************** dnl *** Initialize libtool *** dnl ************************** LT_PREREQ([2.2.6]) LT_INIT([disable-static]) dnl ************************************** dnl *** Substitute version information *** dnl ************************************** THUNARX_VERINFO=thunarx_verinfo() THUNARX_VERSION_API=thunarx_version_api() THUNAR_VERSION_MAJOR=thunar_version_major() THUNAR_VERSION_MINOR=thunar_version_minor() THUNAR_VERSION_MICRO=thunar_version_micro() AC_SUBST([THUNARX_VERINFO]) AC_SUBST([THUNARX_VERSION_API]) AC_SUBST([THUNAR_VERSION_MAJOR]) AC_SUBST([THUNAR_VERSION_MINOR]) AC_SUBST([THUNAR_VERSION_MICRO]) dnl ****************************** dnl *** Set helper path prefix *** dnl ****************************** AC_ARG_WITH([helper-path-prefix], [AC_HELP_STRING([--with-helper-path-prefix=PATH], [Path prefix under which helper executables will be installed (default: $libdir)])], [HELPER_PATH_PREFIX="$withval"], [HELPER_PATH_PREFIX="$libdir"]) AC_SUBST([HELPER_PATH_PREFIX]) dnl *********************************************** dnl *** Determine the u32 type required for tdb *** dnl *********************************************** AC_CHECK_SIZEOF([int]) AC_CHECK_SIZEOF([long]) AC_CHECK_SIZEOF([short]) AC_MSG_CHECKING([for 32bit unsigned integer]) case 4 in $ac_cv_sizeof_int) TDB_U32_TYPE="unsigned int" ;; $ac_cv_sizeof_long) TDB_U32_TYPE="unsigned long" ;; $ac_cv_sizeof_short) TDB_U32_TYPE="unsigned short" ;; esac AC_SUBST([TDB_U32_TYPE]) AC_MSG_RESULT([$TDB_U32_TYPE]) dnl *********************************************** dnl *** Work-around system-specific limitations *** dnl *********************************************** AC_SYS_LARGEFILE() dnl ********************************** dnl *** Check for standard headers *** dnl ********************************** AC_CHECK_HEADERS([ctype.h errno.h fcntl.h grp.h limits.h locale.h memory.h \ paths.h pwd.h sched.h signal.h stdarg.h stdlib.h string.h \ sys/mman.h sys/param.h sys/stat.h sys/time.h sys/types.h \ sys/uio.h sys/wait.h time.h]) dnl ************************************ dnl *** Check for standard functions *** dnl ************************************ AC_FUNC_MMAP() AC_CHECK_FUNCS([localeconv mkdtemp pread pwrite sched_yield setgroupent \ setpassent strcoll strlcpy strptime symlink]) dnl ****************************** dnl *** Check for i18n support *** dnl ****************************** XDT_I18N([@LINGUAS@]) dnl ********************* dnl *** Check for X11 *** dnl ********************* XDT_CHECK_LIBX11_REQUIRE() dnl *********************************** dnl *** Check for required packages *** dnl *********************************** XDT_CHECK_PACKAGE([EXO], [exo-1], [0.6.0]) XDT_CHECK_PACKAGE([GLIB], [glib-2.0], [2.18.0]) XDT_CHECK_PACKAGE([GIO], [gio-2.0], [2.18.0]) XDT_CHECK_PACKAGE([GTHREAD], [gthread-2.0], [2.18.0]) XDT_CHECK_PACKAGE([GTK], [gtk+-2.0], [2.14.0]) XDT_CHECK_PACKAGE([GDK_PIXBUF], [gdk-pixbuf-2.0], [2.14.0]) XDT_CHECK_PACKAGE([LIBXFCE4UTIL], [libxfce4util-1.0], [4.8.0]) XDT_CHECK_PACKAGE([LIBXFCE4UI], [libxfce4ui-1], [4.8.0]) dnl ******************************************** dnl *** Check for session management support *** dnl ******************************************** XDT_CHECK_LIBSM() dnl ********************************** dnl *** Optional GIO UNIX features *** dnl ********************************** XDT_CHECK_OPTIONAL_PACKAGE([GIO_UNIX], [gio-unix-2.0], [2.18.0], [gio-unix], [GIO UNIX features]) dnl ********************************** dnl *** Optional support for D-BUS *** dnl ********************************** XDT_CHECK_OPTIONAL_PACKAGE([DBUS], [dbus-glib-1], [0.34], [dbus], [D-BUS support]) dnl ************************************************* dnl *** Optional support for startup notification *** dnl ************************************************* XDT_CHECK_OPTIONAL_PACKAGE([LIBSTARTUP_NOTIFICATION], [libstartup-notification-1.0], [0.4], [startup-notification], [startup notification library]) dnl *************************************************************** dnl *** Optional support for GUDev (required for thunar-volman) *** dnl *************************************************************** XDT_CHECK_OPTIONAL_PACKAGE([GUDEV], [gudev-1.0], [145], [gudev], [GUDev (required for thunar-volman)]) dnl ************************************** dnl *** Optional support for libnotify *** dnl ************************************** XDT_CHECK_OPTIONAL_PACKAGE([LIBNOTIFY], [libnotify], [0.4.0], [notifications], [Mount notification support], [yes]) dnl ************************* dnl *** Check for gtk-doc *** dnl ************************* GTK_DOC_CHECK([1.0]) dnl *************************************************** dnl *** Check if we need to build the documentation *** dnl *************************************************** AC_ARG_ENABLE([gen-doc], [AC_HELP_STRING([--enable-gen-doc], [Generate HTML documentation (requires xsltproc, xml2po and xmllint) [default=no]])],, [enable_gen_doc=no]) if test x"$enable_gen_doc" = x"yes"; then AC_PATH_PROG([XSLTPROC], [xsltproc], [no]) if test x"$XSLTPROC" = x"no"; then enable_gen_doc=no fi AC_PATH_PROG([XML2PO], [xml2po], [no]) if test x"$XML2PO" = x"no"; then enable_gen_doc=no fi AC_PATH_PROG([XMLLINT], [xmllint], [no]) if test x"$XML2PO" = x"no"; then enable_gen_doc=no fi if test x"$enable_gen_doc" = x"no"; then AC_MSG_ERROR([Compiling with --enable-gen-doc but one of xml2po, xsltproc or xmllint not found.]) fi fi AM_CONDITIONAL([GENERATE_DOCUMENTATION], [test x"$enable_gen_doc" = x"yes"]) dnl *********************************** dnl *** Check for debugging support *** dnl *********************************** XDT_FEATURE_DEBUG([thunar_debug_default]) dnl ************************************* dnl *** Compensate for broken gtk-doc *** dnl ************************************* XDT_SUPPORTED_FLAGS([GTK_DOC_EXTRA_CFLAGS], [-Wno-sign-compare]) AC_SUBST([GTK_DOC_EXTRA_CFLAGS]) dnl ************************************** dnl *** Check for linker optimizations *** dnl ************************************** XDT_FEATURE_LINKER_OPTS() dnl dnl **************************************** dnl dnl *** Check for ELF visibility support *** dnl dnl **************************************** dnl XDT_FEATURE_VISIBILITY() dnl ********************************* dnl *** Substitute platform flags *** dnl ********************************* AC_MSG_CHECKING([PLATFORM_CPPFLAGS]) AC_MSG_RESULT([$PLATFORM_CPPFLAGS]) AC_SUBST([PLATFORM_CPPFLAGS]) AC_MSG_CHECKING([PLATFORM_CFLAGS]) AC_MSG_RESULT([$PLATFORM_CFLAGS]) AC_SUBST([PLATFORM_CFLAGS]) AC_MSG_CHECKING([PLATFORM_LDFLAGS]) AC_MSG_RESULT([$PLATFORM_LDFLAGS]) AC_SUBST([PLATFORM_LDFLAGS]) dnl ************************************ dnl *** Check for additional plugins *** dnl ************************************ BM_THUNAR_PLUGIN_APR() BM_THUNAR_PLUGIN_SBR() BM_THUNAR_PLUGIN_TPA() BM_THUNAR_PLUGIN_UCA() BM_THUNAR_PLUGIN_WALLPAPER() AC_OUTPUT([ Makefile docs/Makefile docs/design/Makefile docs/manual/Makefile docs/manual/images/Makefile docs/manual/images/el/Makefile docs/manual/images/fr/Makefile docs/manual/images/ja/Makefile docs/manual/images/pl/Makefile docs/manual/po/Makefile docs/papers/Makefile docs/reference/Makefile docs/reference/thunarx/Makefile docs/reference/thunarx/version.xml examples/Makefile examples/tex-open-terminal/Makefile icons/Makefile icons/16x16/Makefile icons/24x24/Makefile icons/48x48/Makefile icons/scalable/Makefile pixmaps/Makefile plugins/Makefile plugins/thunar-apr/Makefile plugins/thunar-sbr/Makefile plugins/thunar-sendto-email/Makefile plugins/thunar-tpa/Makefile plugins/thunar-uca/Makefile plugins/thunar-wallpaper/Makefile po/Makefile.in tdb/Makefile tdb/tdbconfig.h thunar/Makefile thunarx/Makefile thunarx/thunarx-2.pc thunarx/thunarx-config.h ]) dnl *************************** dnl *** Print configuration *** dnl *************************** echo echo "Build Configuration:" echo if test x"$DBUS_FOUND" = x"yes"; then echo "* D-BUS support: yes" else echo "* D-BUS support: no" fi if test x"$GIO_UNIX_FOUND" = x"yes"; then echo "* GIO UNIX features: yes" else echo "* GIO UNIX features: no" fi if test x"$LIBSTARTUP_NOTIFICATION_FOUND" = x"yes"; then echo "* Startup Notification: yes" else echo "* Startup Notification: no" fi if test x"$GUDEV_FOUND" = x"yes"; then echo "* GUDev (required for thunar-volman): yes" else echo "* GUDev (required for thunar-volman): no" fi if test x"$LIBNOTIFY_FOUND" = x"yes"; then echo "* Mount notification support: yes" else echo "* Mount notification support: no" fi echo "* Debug Support: $enable_debug" if test x"$enable_gen_doc" = x"yes"; then echo "* Documentation: yes (generate)" elif test -d "${srcdir}/docs/manual/html"; then echo "* Documentation: yes (in tarball)" else echo "* Documentation: no" fi echo echo "Additional Plugins:" echo echo "* Advanced Properties: $ac_bm_thunar_plugin_apr" echo "* Simple Builtin Renamers: $ac_bm_thunar_plugin_sbr" echo "* Trash Panel Applet: $ac_bm_thunar_plugin_tpa" echo "* User Customizable Actions: $ac_bm_thunar_plugin_uca" echo "* Wallpaper support: $ac_bm_thunar_plugin_wallpaper" echo