summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac454
1 files changed, 0 insertions, 454 deletions
diff --git a/configure.ac b/configure.ac
deleted file mode 100644
index 023e592..0000000
--- a/configure.ac
+++ /dev/null
@@ -1,454 +0,0 @@
-# Copyright (C) 2010 Richard Hughes <richard@hughsie.com>
-AC_PREREQ(2.63)
-
-m4_define([cd_major_version], [1])
-m4_define([cd_minor_version], [3])
-m4_define([cd_micro_version], [6])
-m4_define([cd_version],
- [cd_major_version.cd_minor_version.cd_micro_version])
-
-AC_INIT([colord],[cd_version],[http://www.freedesktop.org/software/colord/])
-AC_CONFIG_SRCDIR(src)
-AM_INIT_AUTOMAKE([1.9 no-dist-gzip dist-xz tar-ustar foreign])
-AC_CONFIG_HEADERS([config.h])
-AC_CONFIG_MACRO_DIR([m4])
-AC_PROG_LIBTOOL
-
-m4_ifdef([GOBJECT_INTROSPECTION_CHECK], [GOBJECT_INTROSPECTION_CHECK([0.9.8])])
-AM_CONDITIONAL(HAVE_INTROSPECTION, test "x$found_introspection" = xyes)
-GLIB_GSETTINGS
-
-# set up gtk-doc
-GTK_DOC_CHECK(1.9)
-
-# use this in cd-version.h
-CD_MAJOR_VERSION=cd_major_version
-CD_MINOR_VERSION=cd_minor_version
-CD_MICRO_VERSION=cd_micro_version
-AC_SUBST(VERSION)
-AC_SUBST(CD_MAJOR_VERSION)
-AC_SUBST(CD_MINOR_VERSION)
-AC_SUBST(CD_MICRO_VERSION)
-
-# libtool versioning - this applies to libcolord
-#
-# See http://sources.redhat.com/autobook/autobook/autobook_91.html#SEC91 for details
-#
-# increment;
-# CURRENT If the API or ABI interface has changed (reset REVISION to 0)
-# REVISION If the API and ABI remains the same, but bugs are fixed.
-# AGE Don't use.
-LT_CURRENT=2
-LT_REVISION=5
-LT_AGE=0
-AC_SUBST(LT_CURRENT)
-AC_SUBST(LT_REVISION)
-AC_SUBST(LT_AGE)
-
-# enable nice build output on automake1.11
-m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
-
-AS_ALL_LINGUAS
-AC_PROG_CC_C99
-AC_PROG_INSTALL
-LT_INIT
-AM_PROG_CC_C_O
-IT_PROG_INTLTOOL([0.35.0])
-AC_PATH_PROG(XSLTPROC, xsltproc)
-
-GNOME_COMPILE_WARNINGS([maximum],[
- -Wmissing-declarations
- -Wcast-align
- -Wwrite-strings
- -Wreturn-type
- -Wformat-nonliteral
- -Wmissing-format-attribute
- -Wclobbered
- -Wempty-body
- -Wignored-qualifiers
- -Wsign-compare
- -Wtype-limits
- -Wuninitialized
- -Waggregate-return
- -Wdeclaration-after-statement
- -Wshadow
- -Wno-strict-aliasing
- -Winline
- -Wmissing-parameter-type
- -Woverride-init
- -Wno-discarded-qualifiers
- -Wformat-signedness
-])
-
-dnl ---------------------------------------------------------------------------
-dnl - gettext stuff
-dnl ---------------------------------------------------------------------------
-AM_GNU_GETTEXT_VERSION([0.17])
-AM_GNU_GETTEXT([external])
-
-GETTEXT_PACKAGE=AC_PACKAGE_NAME
-AC_SUBST(GETTEXT_PACKAGE)
-AC_DEFINE(GETTEXT_PACKAGE, "AC_PACKAGE_NAME", [foo])
-
-LT_LIB_M
-AC_SUBST(LIBM)
-
-GLIB_GSETTINGS
-
-# check for PIE (position independent executable) support
-if test x$with_pic != xno; then
- AX_CHECK_COMPILE_FLAG([-fPIE],
- [AX_CHECK_LINK_FLAG([-fPIE -pie],
- [PIE_CFLAGS="-fPIE" PIE_LDFLAGS="-pie"])])
- AC_SUBST(PIE_CFLAGS)
- AC_SUBST(PIE_LDFLAGS)
-fi
-
-# check for full RELRO (relocation read-only) support
-AX_CHECK_LINK_FLAG([-Wl,-z,relro,-z,now],
- [RELRO_LDFLAGS="-Wl,-z,relro,-z,now"])
-AC_SUBST([RELRO_LDFLAGS])
-
-dnl ---------------------------------------------------------------------------
-dnl - Check headers and functions that may not exist on all platforms
-dnl ---------------------------------------------------------------------------
-AC_CHECK_HEADERS([pwd.h])
-AC_CHECK_HEADERS([syslog.h])
-AC_CHECK_FUNC(getuid, AC_DEFINE([HAVE_GETUID], [], [getuid() is available]))
-
-dnl ---------------------------------------------------------------------------
-dnl - Check library dependencies
-dnl ---------------------------------------------------------------------------
-COLORD_REQUIRES_PRIVATE="lcms2"
-PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.44.0 gobject-2.0 gthread-2.0 gio-2.0 >= 2.25.9 gmodule-2.0)
-
-dnl ---------------------------------------------------------------------------
-dnl - Check Linux-specific dependencies
-dnl ---------------------------------------------------------------------------
-AC_CHECK_DEFINE([__unix__], enable_unix="yes", enable_unix="no")
-if test x$enable_unix != xno; then
- PKG_CHECK_MODULES(GLIB_UNIX, gio-unix-2.0)
- CD_IT8="\$(top_builddir)/client/cd-it8"
- CD_CREATE_PROFILE="\$(top_builddir)/client/cd-create-profile"
-else
- # look for a wine that can run our win32 and win64 client tools
- case "$build_cpu" in
- x86_64*)
- AC_PATH_PROG(WINE, wine64, no);;
- *)
- AC_PATH_PROG(WINE, wine, no);;
- esac
-
- # we don't have wine, so try to use the system tools instead
- if test $WINE = no; then
- AC_PATH_PROG(CD_IT8, [cd-it8], no)
- if test $CD_IT8 = no; then
- AC_MSG_ERROR([Non-UNIX build requires either wine or colord])
- fi
- AC_PATH_PROG(CD_CREATE_PROFILE, [cd-create-profile], no)
- if test $CD_CREATE_PROFILE = no; then
- AC_MSG_ERROR([Non-UNIX build requires either wine or colord])
- fi
- else
- CD_IT8="$WINE \$(top_builddir)/client/cd-it8\$(EXEEXT)"
- CD_CREATE_PROFILE="$WINE \$(top_builddir)/client/cd-create-profile\$(EXEEXT)"
- fi
-fi
-AC_SUBST([CD_IT8])
-AC_SUBST([CD_CREATE_PROFILE])
-
-# optional
-AC_ARG_ENABLE(session_helper, AS_HELP_STRING([--enable-session-helper],[Enable Session Helper]),
- enable_session_helper=$enableval, enable_session_helper=$enable_unix)
-AM_CONDITIONAL(HAVE_SESSION_HELPER, test x$enable_session_helper = xyes)
-
-PKG_CHECK_MODULES(GUSB, gusb >= 0.2.7)
-PKG_CHECK_MODULES(LCMS, lcms2 >= 2.6)
-
-PKG_CHECK_MODULES(SQLITE, sqlite3)
-
-dnl **** Check for UDEV ****
-PKG_CHECK_MODULES(UDEV, libudev)
-PKG_CHECK_MODULES(GUDEV, gudev-1.0)
-COLORD_REQUIRES_PRIVATE+=", libudev"
-
-dnl **** Bash completion ****
-AC_ARG_ENABLE(bash_completion, AS_HELP_STRING([--enable-bash-completion],[Enable bash completion]),
- enable_bash_completion=$enableval, enable_bash_completion=yes)
-if test x$enable_bash_completion != xno; then
- PKG_CHECK_MODULES([BASH_COMPLETION], [bash-completion >= 2.0])
- BASH_COMPLETIONS_DIR="`pkg-config --variable=completionsdir bash-completion`"
- AC_SUBST([BASH_COMPLETIONS_DIR])
-fi
-AM_CONDITIONAL([HAVE_BASH_COMPLETION],[test "x$enable_bash_completion" = "xyes"])
-
-dnl ---------------------------------------------------------------------------
-dnl - Is docbook2man available?
-dnl ---------------------------------------------------------------------------
-AC_PATH_PROG(DOCBOOK2MAN, docbook2man, no)
-if test "$DOCBOOK2MAN" = "no" ; then
- AC_MSG_WARN([docbook2man not found, will not be able to build man documentation (if tarball, pre-generated documentation will be installed)])
-fi
-AM_CONDITIONAL(HAVE_DOCBOOK2MAN, [test "$DOCBOOK2MAN" != "no"])
-
-PKG_CHECK_MODULES(POLKIT, polkit-gobject-1 >= 0.103)
-PKG_CHECK_EXISTS([polkit-gobject-1 >= 0.114],
- [AC_DEFINE(POLKIT_HAS_AUTOPTR_MACROS, 1, [if PolKit has autoptr macros])],
- [])
-
-dnl ---------------------------------------------------------------------------
-dnl - Select whether and where to install systemd system service files
-dnl ---------------------------------------------------------------------------
-
-AC_ARG_WITH([systemdsystemunitdir],
- AS_HELP_STRING([--with-systemdsystemunitdir=DIR], [Directory for systemd service files]),
- [],
- [with_systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd)])
-if test "x$with_systemdsystemunitdir" != "xno"; then
- AC_SUBST([systemdsystemunitdir], [$with_systemdsystemunitdir])
-fi
-
-dnl ---------------------------------------------------------------------------
-dnl - Where to install tmpfiles.d snippet rules
-dnl ---------------------------------------------------------------------------
-AC_ARG_WITH([tmpfilesdir],
- AS_HELP_STRING([--with-tmpfilesdir=DIR], [Directory for tmpfiles.d snippet files]),
- [],
- [with_tmpfilesdir=$($PKG_CONFIG --variable=tmpfilesdir systemd)])
-if test "x$with_tmpfilesdir" != "xno"; then
- AC_SUBST([tmpfilesdir], [$with_tmpfilesdir])
-fi
-
-dnl **** Check if we should build libcolordcompat ****
-AC_ARG_ENABLE(libcolordcompat, AS_HELP_STRING([--enable-libcolordcompat],
- [Enable libcolordcompat.so which is used by ArgyllCMS]),
- build_libcolordcompat=$enableval, build_libcolordcompat=no)
-if test x$build_libcolordcompat != xno; then
- AC_DEFINE(BUILD_LIBCOLORDCOMPAT,1,[Build libcolordcompat.so])
-fi
-AM_CONDITIONAL(BUILD_LIBCOLORDCOMPAT, test x$build_libcolordcompat = xyes)
-
-dnl ---------------------------------------------------------------------------
-dnl - Use systemd to track the process seat
-dnl ---------------------------------------------------------------------------
-AC_ARG_ENABLE(systemd, AS_HELP_STRING([--enable-systemd],[Build systemd seat-tracking support]),
- enable_systemd=$enableval, enable_systemd=yes)
-AM_CONDITIONAL(HAVE_SYSTEMD, test x$enable_systemd = xyes)
-if test x$enable_systemd != xno; then
- PKG_CHECK_MODULES(LIBSYSTEMD,
- [libsystemd],
- [LIBSYSTEMD_CFLAGS=$LIBSYSTEMD_CFLAGS;
- LIBSYSTEMD_LIBS=$LIBSYSTEMD_LIBS],
- [PKG_CHECK_MODULES(LIBSYSTEMD,
- [libsystemd >= 44])])
- AC_DEFINE([HAVE_SYSTEMD], 1, [Define to 1 if systemd login is available])
-fi
-
-dnl ---------------------------------------------------------------------------
-dnl - Where to install udev rules
-dnl ---------------------------------------------------------------------------
-AC_ARG_WITH([udevrulesdir],
- AS_HELP_STRING([--with-udevrulesdir=DIR], [Directory for udev rules files]),
- [],
- [with_udevrulesdir=$($PKG_CONFIG --variable=udevdir udev)/rules.d])
-AC_SUBST([udevrulesdir], [$with_udevrulesdir])
-
-dnl ---------------------------------------------------------------------------
-dnl - Build ArgyllCMS sensor
-dnl ---------------------------------------------------------------------------
-AC_ARG_ENABLE(argyllcms-sensor, AS_HELP_STRING([--enable-argyllcms-sensor],[enable ArgllCMS sensor]),
- enable_argyllcms_sensor=$enableval,enable_argyllcms_sensor=yes)
-AM_CONDITIONAL(HAVE_ARGYLLCMS_SENSOR, test x$enable_argyllcms_sensor = xyes)
-if test x$enable_argyllcms_sensor = xyes; then
- AC_PATH_PROG(SPOTREAD, spotread, no)
- if test "$SPOTREAD" = "no" ; then
- AC_MSG_ERROR([argyllcms sensor requires spotread, not found])
- fi
-fi
-
-dnl **** Check for SANE ****
-AC_ARG_ENABLE(sane, AS_HELP_STRING([--enable-sane],[Enable SANE support]),
- enable_sane=$enableval,enable_sane=no)
-has_sane=no
-if test x$enable_sane != xno; then
- PKG_CHECK_MODULES(SANE, sane-backends, has_sane=yes, has_sane=no)
- PKG_CHECK_MODULES(DBUS, dbus-1, have_dbus=yes, have_dbus=no)
- if test $has_sane = "no"; then
- # fall back to detecting the header for some distros
- AC_CHECK_HEADER(sane/sane.h, has_sane=yes, has_sane=no)
- if test $has_sane = "yes"; then
- SANE_CFLAGS=""
- SANE_LIBS="-lsane"
- AC_SUBST(SANE_CFLAGS)
- AC_SUBST(SANE_LIBS)
- fi
- if test x$enable_sane = xyes -a $has_sane = "no"; then
- AC_MSG_ERROR([--enable-sane was specified and SANE was not found])
- fi
-
- fi
- if test x$have_dbus != xyes; then
- has_sane=no
- if test x$enable_sane = xyes; then
- AC_MSG_ERROR([--enable-sane was specified and SANE requires dbus support, not found])
- fi
- AC_MSG_WARN([dbus not found, SANE support will not be enabled])
- fi
-fi
-AM_CONDITIONAL(HAVE_SANE, test x$has_sane = xyes)
-if test x$has_sane = xyes; then
- AC_DEFINE(HAVE_SANE,1,[Use SANE support for detecting scanners])
-fi
-
-# custom daemon user
-AC_ARG_WITH(
- [daemon_user],
- AC_HELP_STRING([--with-daemon-user],
- [User for running the colord daemon (root)]),
- [daemon_user=$withval],
- [daemon_user=root]
-)
-AC_SUBST(daemon_user)
-AC_DEFINE_UNQUOTED([DAEMON_USER], ["$daemon_user"], [Daemon user])
-
-dnl ---------------------------------------------------------------------------
-dnl - Build VALA support
-dnl ---------------------------------------------------------------------------
-AC_ARG_ENABLE(vala, AS_HELP_STRING([--enable-vala],[build vala bindings]),
- enable_vala=$enableval,enable_vala=no)
-if test x$found_introspection != xno -a x$enable_vala != xno; then
- AC_PATH_PROG([VAPIGEN], [vapigen], [])
- if test "x$VAPIGEN" = "x"; then
- has_vapigen="no"
- AC_MSG_WARN([vapigen not found, will not build Vala binding])
- else
- has_vapigen="yes"
- fi
-else
- has_vapigen="no"
- if test x$found_introspection = xno; then
- AC_MSG_WARN([introspection not found, will not build Vala binding])
- fi
-fi
-AM_CONDITIONAL(HAVE_VAPIGEN, [test "x$has_vapigen" = "xyes"])
-
-dnl ---------------------------------------------------------------------------
-dnl - Build session helper example
-dnl ---------------------------------------------------------------------------
-AC_ARG_ENABLE(session-example, AS_HELP_STRING([--enable-session-example],[Enable session example]),
- enable_session_example=$enableval, enable_session_example=no)
-AM_CONDITIONAL(CD_BUILD_SESSION_EXAMPLE, test x$enable_session_example = xyes)
-if test x$enable_session_example != xno; then
- PKG_CHECK_MODULES(GNOME_DESKTOP, gnome-desktop-3.0)
- PKG_CHECK_MODULES(COLORD_GTK, colord-gtk >= 0.1.24)
-fi
-
-dnl ---------------------------------------------------------------------------
-dnl - Build extra print profiles (requires argyllcms)
-dnl ---------------------------------------------------------------------------
-AC_ARG_ENABLE(print-profiles, AS_HELP_STRING([--enable-print-profiles],[Build extra print profiles]),
- enable_print_profiles=$enableval, enable_print_profiles=no)
-AM_CONDITIONAL(CD_BUILD_PRINT_PROFILES, test x$enable_print_profiles = xyes)
-if test x$enable_print_profiles != xno; then
- AC_PATH_PROG(COLPROF, [colprof], false)
- if test "$COLPROF" = "false"; then
- AC_MSG_ERROR([colprof not found, please install argyllcms])
- fi
- AC_DEFINE_UNQUOTED([TOOL_COLPROF], ["$COLPROF"], [Full path of colprof binary])
-fi
-
-AC_ARG_ENABLE(installed_tests,
- AS_HELP_STRING([--enable-installed-tests],
- [Install test programs (default: no)]),,
- [enable_installed_tests=no])
-AM_CONDITIONAL(BUILDOPT_INSTALL_TESTS, test x$enable_installed_tests = xyes)
-
-# per-machine directory
-AC_SUBST(CD_SYSTEM_PROFILES_DIR, "\$(localstatedir)/lib/colord/icc")
-
-# only include the colord.pc Requires.private of the libraries we actually use
-AC_SUBST(COLORD_REQUIRES_PRIVATE)
-
-dnl ---------------------------------------------------------------------------
-dnl - Makefiles, etc.
-dnl ---------------------------------------------------------------------------
-AC_CONFIG_FILES([
-Makefile
-contrib/Makefile
-contrib/session-helper/Makefile
-contrib/colord-sane/Makefile
-man/Makefile
-doc/Makefile
-doc/api/Makefile
-doc/api/dbus/Makefile
-doc/api/version.xml
-data/Makefile
-data/cmf/Makefile
-data/illuminant/Makefile
-data/figures/Makefile
-data/profiles/Makefile
-data/ref/Makefile
-data/ti1/Makefile
-data/org.freedesktop.ColorManager.conf
-data/tests/Makefile
-policy/Makefile
-rules/Makefile
-rules/69-cd-sensors.rules
-po/Makefile.in
-src/Makefile
-src/plugins/Makefile
-src/sensors/Makefile
-src/sensors/argyll/Makefile
-src/sensors/colorhug/Makefile
-src/sensors/dtp94/Makefile
-src/sensors/dummy/Makefile
-src/sensors/huey/Makefile
-src/sensors/munki/Makefile
-src/sensors/spark/Makefile
-client/Makefile
-lib/Makefile
-lib/colord/cd-version.h
-lib/colord/colord.pc
-lib/colord/Makefile
-lib/colorhug/Makefile
-lib/colorhug/colorhug.pc
-lib/colorhug/ch-version.h
-lib/compat/Makefile
-])
-AC_OUTPUT
-
-dnl ==========================================================================
-echo "
- colord $VERSION
- ===================
-
- prefix: ${prefix}
- datadir: ${datadir}
- compiler: ${CC}
- cflags: ${CFLAGS}
- cppflags: ${CPPFLAGS}
- cd-it8: ${CD_IT8}
- cd-create-profile: ${CD_CREATE_PROFILE}
- gobject-introspection: ${found_introspection}
- BASH completion support: ${enable_bash_completion}
- SANE support: ${has_sane}
- Extra print profiles: ${enable_print_profiles}
- Install tests: ${enable_installed_tests}
- ArgyllCMS sensor: ${enable_argyllcms_sensor}
- Building libcolordcompat: ${build_libcolordcompat}
- Vala API generator: ${has_vapigen}
- Daemon user: ${daemon_user}
- udev rules.d dir: ${with_udevrulesdir}
- systemd support: ${enable_systemd}
- systemd service dir: ${with_systemdsystemunitdir}
- tmpfiles.d dir: ${with_tmpfilesdir}
- Session helper support: ${enable_session_helper}
- Unix support: ${enable_unix}
-"
-
-# warn that using the default root user isn't always a good idea
-if test x$daemon_user = xroot; then
- echo "*******************************************************************"
- echo "** RUNNING THIS AS root ISN'T A GOOD IDEA SEE --with-daemon-user **"
- echo "*******************************************************************"
-fi