| 1 | # -*- Autoconf -*- |
|---|
| 2 | # Process this file with autoconf to produce a configure script. |
|---|
| 3 | |
|---|
| 4 | AC_PREREQ(2.59) |
|---|
| 5 | AC_INIT([gobby], [0.4.95], [crew@0x539.de]) |
|---|
| 6 | AM_INIT_AUTOMAKE(1.9 check-news) |
|---|
| 7 | m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES]) |
|---|
| 8 | AM_MAINTAINER_MODE |
|---|
| 9 | AC_CONFIG_SRCDIR([code/window.hpp]) |
|---|
| 10 | AC_CONFIG_HEADER([code/features.hpp]) |
|---|
| 11 | |
|---|
| 12 | # Extract host information. |
|---|
| 13 | AC_CANONICAL_HOST |
|---|
| 14 | |
|---|
| 15 | # Checks for programs. |
|---|
| 16 | AC_PROG_CXX |
|---|
| 17 | AC_PROG_CC |
|---|
| 18 | AC_PROG_CPP |
|---|
| 19 | AC_PROG_INSTALL |
|---|
| 20 | AC_PROG_LN_S |
|---|
| 21 | AC_PROG_MAKE_SET |
|---|
| 22 | AC_PROG_RANLIB |
|---|
| 23 | AM_PROG_CC_C_O |
|---|
| 24 | AC_CACHE_SAVE |
|---|
| 25 | |
|---|
| 26 | ################################### |
|---|
| 27 | # Check for Win32 |
|---|
| 28 | ################################### |
|---|
| 29 | |
|---|
| 30 | AC_MSG_CHECKING([whether to enable WIN32 specific flags]) |
|---|
| 31 | case "$host_os" in |
|---|
| 32 | *mingw*) |
|---|
| 33 | win32=true |
|---|
| 34 | AC_MSG_RESULT([yes]) |
|---|
| 35 | AC_CHECK_TOOL(WINDRES, windres) |
|---|
| 36 | ;; |
|---|
| 37 | *) |
|---|
| 38 | win32=false |
|---|
| 39 | AC_MSG_RESULT([no]) |
|---|
| 40 | ;; |
|---|
| 41 | esac |
|---|
| 42 | AM_CONDITIONAL(WIN32, test x$win32 = xtrue) |
|---|
| 43 | |
|---|
| 44 | ################################### |
|---|
| 45 | # Check for GTK+ 3 |
|---|
| 46 | ################################### |
|---|
| 47 | |
|---|
| 48 | AC_ARG_WITH([gtk3], AS_HELP_STRING([--with-gtk3], |
|---|
| 49 | [Builds gobby against GTK+ 3 instead of GTK+ 2[[default=no]]]), |
|---|
| 50 | [with_gtk3=$withval], [with_gtk3=no]) |
|---|
| 51 | |
|---|
| 52 | if test "x$with_gtk3" = "xyes"; then |
|---|
| 53 | # TODO: Increase to 2.99.2 once it's out |
|---|
| 54 | gtk_requirement="gtkmm-3.0 >= 2.99.1 gtksourceview-3.0 >= 2.91.0" |
|---|
| 55 | gtk_version=3 |
|---|
| 56 | else |
|---|
| 57 | gtk_requirement="gtkmm-2.4 >= 2.12.0 gtksourceview-2.0 >= 2.4" |
|---|
| 58 | gtk_version=2 |
|---|
| 59 | fi |
|---|
| 60 | |
|---|
| 61 | required_libs="libxml++-2.6 glibmm-2.4 >= 2.18.0 giomm-2.4 >= 2.18.0 gthread-2.0 libgsasl >= 0.2.21 $gtk_requirement" |
|---|
| 62 | |
|---|
| 63 | ################################### |
|---|
| 64 | # Check for Mac OS X |
|---|
| 65 | ################################### |
|---|
| 66 | |
|---|
| 67 | # Check if we are running on OS X, for special link handling. |
|---|
| 68 | if test "x$build_vendor" = "xapple" ; then |
|---|
| 69 | AC_DEFINE([PLATFORM_OSX], 1, [Define whether we are running on Mac OS X.]) |
|---|
| 70 | |
|---|
| 71 | # Check whether we are running the native quartz backend |
|---|
| 72 | if test "$gtk_version" == "2"; then |
|---|
| 73 | target=`pkg-config --variable=target gtk+-2.0` |
|---|
| 74 | else |
|---|
| 75 | target=`pkg-config --variable=targets gtk+-3.0` |
|---|
| 76 | fi |
|---|
| 77 | |
|---|
| 78 | # If so use ige-mac-integration |
|---|
| 79 | if test "$target" = "quartz" ; then |
|---|
| 80 | AC_DEFINE([PLATFORM_OSX_NATIVE], 1, [Define whether we are running on |
|---|
| 81 | Mac OS X with the quartz GDK target]) |
|---|
| 82 | required_libs="$required_libs ige-mac-integration" |
|---|
| 83 | fi |
|---|
| 84 | fi |
|---|
| 85 | AC_CACHE_SAVE |
|---|
| 86 | |
|---|
| 87 | ################################### |
|---|
| 88 | # Check for libraries. |
|---|
| 89 | ################################### |
|---|
| 90 | |
|---|
| 91 | PKG_CHECK_MODULES([gobby], [$required_libs]) |
|---|
| 92 | PKG_CHECK_MODULES([infinote], [libinfinity-0.6 libinftext-0.6 libinfgtk-0.6 libinftextgtk-0.6]) |
|---|
| 93 | AC_CACHE_SAVE |
|---|
| 94 | |
|---|
| 95 | ################################### |
|---|
| 96 | # Check libinfinity GTK+ version |
|---|
| 97 | ################################### |
|---|
| 98 | |
|---|
| 99 | inf_gtk_version=`pkg-config --variable=gtk_version libinfgtk-0.6` |
|---|
| 100 | if test "$inf_gtk_version" != "$gtk_version"; then |
|---|
| 101 | AC_MSG_ERROR([Gobby is being built with GTK+ $gtk_version but libinfinity was built against GTK+ $inf_gtk_version]) |
|---|
| 102 | fi |
|---|
| 103 | |
|---|
| 104 | ################################### |
|---|
| 105 | # Check for unique (optional) |
|---|
| 106 | ################################### |
|---|
| 107 | |
|---|
| 108 | AC_ARG_WITH([unique], AS_HELP_STRING([--with-unique], |
|---|
| 109 | [Enables support for single-instance [[default=auto]]]), |
|---|
| 110 | [use_unique=$withval], [use_unique=auto]) |
|---|
| 111 | |
|---|
| 112 | if test "$with_gtk3" != "yes"; then |
|---|
| 113 | unique_req="unique-1.0 >= 1.1.2" |
|---|
| 114 | else |
|---|
| 115 | unique_req="unique-3.0" |
|---|
| 116 | fi |
|---|
| 117 | |
|---|
| 118 | if test "x$use_unique" = "xauto"; then |
|---|
| 119 | PKG_CHECK_MODULES([unique], [$unique_req], [use_unique=yes], [use_unique=no]) |
|---|
| 120 | elif test "x$use_unique" = "xyes"; then |
|---|
| 121 | PKG_CHECK_MODULES([unique], [$unique_req]) |
|---|
| 122 | fi |
|---|
| 123 | |
|---|
| 124 | if test "x$use_unique" = "xyes"; then |
|---|
| 125 | AC_DEFINE([WITH_UNIQUE], 1, [Whether support for unique is enabled]) |
|---|
| 126 | fi |
|---|
| 127 | |
|---|
| 128 | AM_CONDITIONAL([WITH_UNIQUE], test "x$use_unique" = "xyes") |
|---|
| 129 | AC_CACHE_SAVE |
|---|
| 130 | |
|---|
| 131 | ################################### |
|---|
| 132 | # Glib i18n/gettext support. |
|---|
| 133 | ################################### |
|---|
| 134 | ALL_LINGUAS="`grep -v '^#' "$srcdir/po/LINGUAS" | tr '\n' ' '`" |
|---|
| 135 | AM_GLIB_GNU_GETTEXT |
|---|
| 136 | AM_GLIB_DEFINE_LOCALEDIR(GOBBY_LOCALEDIR) |
|---|
| 137 | IT_PROG_INTLTOOL([0.35.0]) |
|---|
| 138 | |
|---|
| 139 | GETTEXT_PACKAGE=gobby05 |
|---|
| 140 | AC_SUBST(GETTEXT_PACKAGE) |
|---|
| 141 | AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE], ["${GETTEXT_PACKAGE}"], [gettext domain]) |
|---|
| 142 | |
|---|
| 143 | ################################### |
|---|
| 144 | # Help file building |
|---|
| 145 | ################################### |
|---|
| 146 | GNOME_DOC_INIT([0.9.0],, |
|---|
| 147 | [AC_MSG_WARN([[gnome-doc-utils not found: documentation will not be built.]])]) |
|---|
| 148 | |
|---|
| 149 | # AC_DEFINE(GOBBY_CONFIGDIR, [".gobby-0.5"], |
|---|
| 150 | # [where to store Gobby's config files, |
|---|
| 151 | # relative to the user's home directory]) |
|---|
| 152 | |
|---|
| 153 | ################################### |
|---|
| 154 | # Output |
|---|
| 155 | ################################### |
|---|
| 156 | |
|---|
| 157 | AC_OUTPUT([ |
|---|
| 158 | Makefile |
|---|
| 159 | m4/Makefile |
|---|
| 160 | po/Makefile.in |
|---|
| 161 | |
|---|
| 162 | code/Makefile |
|---|
| 163 | code/util/Makefile |
|---|
| 164 | code/core/Makefile |
|---|
| 165 | code/dialogs/Makefile |
|---|
| 166 | code/operations/Makefile |
|---|
| 167 | code/commands/Makefile |
|---|
| 168 | code/commands/file-tasks/Makefile |
|---|
| 169 | |
|---|
| 170 | icons/Makefile |
|---|
| 171 | icons/hicolor/Makefile |
|---|
| 172 | icons/hicolor/48x48/Makefile |
|---|
| 173 | icons/hicolor/48x48/apps/Makefile |
|---|
| 174 | icons/hicolor/48x48/actions/Makefile |
|---|
| 175 | icons/hicolor/48x48/status/Makefile |
|---|
| 176 | icons/hicolor/scalable/Makefile |
|---|
| 177 | icons/hicolor/scalable/apps/Makefile |
|---|
| 178 | icons/hicolor/scalable/actions/Makefile |
|---|
| 179 | icons/hicolor/scalable/status/Makefile |
|---|
| 180 | icons/HighContrastLargePrint/Makefile |
|---|
| 181 | icons/HighContrastLargePrint/48x48/Makefile |
|---|
| 182 | icons/HighContrastLargePrint/48x48/apps/Makefile |
|---|
| 183 | icons/HighContrastLargePrint/48x48/actions/Makefile |
|---|
| 184 | icons/HighContrastLargePrint/scalable/Makefile |
|---|
| 185 | icons/HighContrastLargePrint/scalable/apps/Makefile |
|---|
| 186 | icons/HighContrastLargePrint/scalable/actions/Makefile |
|---|
| 187 | icons/HighContrastLargePrintInverse/Makefile |
|---|
| 188 | icons/HighContrastLargePrintInverse/48x48/Makefile |
|---|
| 189 | icons/HighContrastLargePrintInverse/48x48/apps/Makefile |
|---|
| 190 | icons/HighContrastLargePrintInverse/48x48/actions/Makefile |
|---|
| 191 | icons/HighContrastLargePrintInverse/scalable/Makefile |
|---|
| 192 | icons/HighContrastLargePrintInverse/scalable/apps/Makefile |
|---|
| 193 | icons/HighContrastLargePrintInverse/scalable/actions/Makefile |
|---|
| 194 | |
|---|
| 195 | help/Makefile |
|---|
| 196 | |
|---|
| 197 | win32/Makefile |
|---|
| 198 | ]) |
|---|
| 199 | |
|---|
| 200 | # vim:set et sw=2 ts=2: |
|---|